With WCSPH, why is the density limited *after* using it in the viscosity? #277
Replies: 3 comments 4 replies
-
In SPH the density is often used to determine the volume (mass / density) that is represented by a particle. This volume is used in the SPH sum (e.g. when computing viscosity). However, when computing the pressure values the density value is used in another way. And the density value at the free surface leads to a negative pressure due to particle deficiency in the neighborhood of a surface particle. This can cause a particle clumping at the surface. To avoid this a common solution is the so-called pressure clamping to positive pressure values. In our implementation we clamped the density since it is not used anymore by other components. However, if you prefer, you could also clamp the pressure instead after line 106 which yields the same result. Hope this helps to understand the implementation. |
Beta Was this translation helpful? Give feedback.
-
This should not happen since there is no attraction force between the particles if you clamp the pressure. Do you use surface tension? Then you have an attraction force. |
Beta Was this translation helpful? Give feedback.
-
The problem at the surface is that due to particle deficiency in the neighborhood of a surface particle the repulsive forces are not strong enough the push the particles apart. I would assume a larger stiffness coefficient could help a bit. However, anyway I would recommend to use an implicit solver like DFSPH since this avoid stability issues and the vibrations in your simulation. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
With WCSPH, the density is limited to not be lower than the rest density of the fluid, resulting in a non-negative pressure.
This limiting happens here:
SPlisHSPlasH/SPlisHSPlasH/WCSPH/TimeStepWCSPH.cpp
Line 105 in 8454e9f
However, the non-limited density is already used earlier to calculate the viscosity, here:
SPlisHSPlasH/SPlisHSPlasH/WCSPH/TimeStepWCSPH.cpp
Line 92 in 8454e9f
Is there a specific reason for not using the limited density in the viscosity formulation?
Beta Was this translation helpful? Give feedback.
All reactions