0
$\begingroup$

I am learning fluid dynamics, and noticing an odd problem in my computations which I understand, but wouldn't expect, so I would like to know what I'm missing. I feel like it's something silly.

At time zero, I create a fluid with constant density 1 and constant velocity 1 to the right. (In other words, mass and momentum is automatically conserved without solving any equations, for this simple starter example.) There is also a non-diffusing concentration of something (say, smoke) included on the the left side.

a

As time evolves, I expect this gradient to smoothly move to the right by convection. And it does, but something else happens, too:

b

It starts to segment into bands of higher concentration surrounded by troughs of lower ones:

c

And this behaviour is self-reinforcing, so after some time it goes really bad:

d


I'm evolving the concentration (since there's no diffusion, there's only the unstable and convection terms) according to

$$\frac{\partial (\rho \phi)}{\partial t} + \nabla \cdot (\rho \phi \vec{v}) = 0$$

where $\rho = 1$ and $\vec{v} = (1, 0)$ which makes this very easy to compute. In my Cartesian grid I'm computing the above as

$$\frac{\partial \rho}{\partial t} = - \frac{\partial \phi}{\partial x}$$

(with the derivative in the y axis disappearing due to the zero velocity in that direction.)

It's clear to me that the solution to that equation will amplify troughs in the concentration:

  • Just before the trough, the approximated derivative in the horizontal direction will be negative. This means the divergence will be negative, and the concentration will increase just before the trough.
  • In the middle of the trough, the approximated derivative in the horizontal direction will be near zero. This means the trough will stay at low concentration.
  • Just after the trough, the approximated derivative in the horizontal direction will be positive. This means the trough widens.
  • In addition to the above, there's also a slight movement to the right, but for the purposes of looking at local behaviour I'm ignoring it.

I get all that. As a consequence of the equation stating convection as the divergence of concentration times velocity, any troughs will "push aside" concentration and amplify themselves.

But that is really unsatisfying to me. What am I missing?

It also seems unrealistic to me that the troughs naturally form from a completely smooth gradient. Again, I get why it happens (this is in the interaction between the rightward velocity and the same trough-amplifying effect we already saw that creates "tears" in the concentration) – but that shouldn't be the case, I don't think! What am I missing?

I'm open to the suggestion that this might actually be the realistic behaviour of concentration in a fluid when convection is the sole driving force, and that it's just unintuitive to me because I'm used to diffusion smoothing this out.

However, I don't just want to add a diffusion term to fix this in case I am actually missing a critical insight that could cause problems down the line.


Edit: I guess this does remind me a little of a phenomenon I am aware of: waves. But would waves really spontaneously arise in one dimension from a concentration gradient interacting with itself in a moving fluid?

$\endgroup$

1 Answer 1

0
$\begingroup$

I'm starting to suspect the problem may have been a silly one: discretisation error in the time dimension.

When I run the same simulation with 50× higher temporal resolution (pracitcally: divide velocities by 50 and render out only every 50th timestep), the problem appears to go away.

I will do a few more sanity checks before I can say the above confidently, though.


Edit: Yup, that was it, confirmed both by testing and reading a book.

$\endgroup$
1
  • $\begingroup$ Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center. $\endgroup$
    – Community Bot
    Oct 11, 2022 at 19:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.