- #1
PetoSVK
- 1
- 0
Incompressible Fluid simulation - SPH doesn't work :(
Hello all,
I've been stuck in my project: Fluid Simulation using Smoothed Particle Hydrodynamics for a few days now.
I do understand the core principle that fluid properties are calculated by integration on kernel W with range h. But somehow I cannot get this to work.
First, I just can't come up with an equation for calculation of particle's mass so that the neighbours stay in a distance R (particle radius) == they have density 1000 when they are not penetrating and >1000 when they penetrate. I have tried various values, but the effect I get is that particles get scattered at first and then they create few clusters to retain set density.If there are few particles they even start rotating around or moving through each other in response to low/high densities change. If I set the kernel radius to a smaller value, let's say 2.2x particle radius it more-less keeps particle separate, but it doesn't really act as a continuum fluid.
All SPH animations I have seen manage to keep spherical particles separated with at least their radius distance - I can do this only with small kernel as I said before.
I have tried even 2 different approaches from papers:
1)Particle-based simulation for Interactive Applications
2)Weakly compressible SPH for free surface flows
The best result I get is by combining all from paper 1 with Tait equation for pressure in paper 2 + Courant-Friedrich-Lewy law for adaptive time steps and kernel radius ~ 2-2.2x particle's radius,
Are there any recommended values - for particle's mass, kernel's smoothing length (they used 4*h (h-particle radius) in paper 2)?
Thanks for any comments.
Peter
Hello all,
I've been stuck in my project: Fluid Simulation using Smoothed Particle Hydrodynamics for a few days now.
I do understand the core principle that fluid properties are calculated by integration on kernel W with range h. But somehow I cannot get this to work.
First, I just can't come up with an equation for calculation of particle's mass so that the neighbours stay in a distance R (particle radius) == they have density 1000 when they are not penetrating and >1000 when they penetrate. I have tried various values, but the effect I get is that particles get scattered at first and then they create few clusters to retain set density.If there are few particles they even start rotating around or moving through each other in response to low/high densities change. If I set the kernel radius to a smaller value, let's say 2.2x particle radius it more-less keeps particle separate, but it doesn't really act as a continuum fluid.
All SPH animations I have seen manage to keep spherical particles separated with at least their radius distance - I can do this only with small kernel as I said before.
I have tried even 2 different approaches from papers:
1)Particle-based simulation for Interactive Applications
2)Weakly compressible SPH for free surface flows
The best result I get is by combining all from paper 1 with Tait equation for pressure in paper 2 + Courant-Friedrich-Lewy law for adaptive time steps and kernel radius ~ 2-2.2x particle's radius,
Are there any recommended values - for particle's mass, kernel's smoothing length (they used 4*h (h-particle radius) in paper 2)?
Thanks for any comments.
Peter