Divergence in Navier-Stokes equation / Fluid simulation

This topic is 3622 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

Recommended Posts

Hi everybody, I'm currently writing a fluid simulator based on the Navier-Stokes equations for computer graphics an have one question concerning the divergence term div u = 0. Does this term relate to every single cell or to the whole volume? In my opinion either one is confusing: 1) If it relates to the whole volume this would mean that there cannot be any "inflow" cells which represent inflowing water in the domain. However, these cells are mentioned in some papers. 2) If it relates to every cell this would mean that the water cannot flow because as soon as it enters a previously empty cell the inflow in that cell is greater than the outflow. Obviously I have misunderstood something and I would greatly appreciate it if somebody could shed some light on this issue. Thanks, Icebraker

Share on other sites
If you are talking about surface fluid entering an empty region of space, that is another issue altogether. In that case, boundary conditions and velocity extension handles velocities for "new" cells. Have a look in bridsons book where this is discussed.

Share on other sites
Hi,

thanks for the answer. So if I understood you correctly then the div=0 needs to be fulfilled for every cell, and in the case when fluids extend to the AIR-regions then the velocities of the AIR-cells have to be set such that div u = 0. Is this correct?

Share on other sites
Yes, in short, that is what you do.

But I'm not entirely sure if the velocity extrapolation step itself conserves incompressibility or not. I seem to remember that this was ambigious and I couldn't really figure out how to combine this condition with the boundary conditions at the surface cells. I'm thinking about taking up this project again so perhaps I'll figure it out. I kind of gave up around this point....

The easiest way out seemed to be to extrapolate out as a constant and then just ignore the divergence that arises in the new air cells and just take care of it next time you run the solver with those cells included.

1. 1
2. 2
3. 3
Rutin
13
4. 4
5. 5

• 26
• 11
• 9
• 9
• 11
• Forum Statistics

• Total Topics
633697
• Total Posts
3013407
×