Incompressible Fluid simulation - SPH doesn't work

Click For Summary
SUMMARY

The discussion focuses on challenges faced in implementing Smoothed Particle Hydrodynamics (SPH) for incompressible fluid simulation. Key issues include calculating particle mass to maintain a density of 1000 without penetration and achieving stable particle separation. The user, Peter, has experimented with various kernel radii and approaches from two papers: "Particle-based simulation for Interactive Applications" and "Weakly compressible SPH for free surface flows." Recommendations include using the Tait equation for pressure and the Courant-Friedrichs-Lewy condition for adaptive time steps, with a kernel radius of approximately 2-2.2 times the particle radius.

PREREQUISITES
  • Understanding of Smoothed Particle Hydrodynamics (SPH)
  • Familiarity with the Tait equation for pressure calculations
  • Knowledge of the Courant-Friedrichs-Lewy (CFL) condition for time step management
  • Basic principles of fluid dynamics and particle simulation
NEXT STEPS
  • Research the implementation of the Tait equation in SPH simulations
  • Explore the Courant-Friedrichs-Lewy condition for adaptive time stepping in fluid simulations
  • Study the spline kernel function as discussed in Monaghan's 2005 work on SPH
  • Investigate boundary condition techniques for SPH, including density correction methods
USEFUL FOR

This discussion is beneficial for fluid simulation developers, computer graphics engineers, and researchers working with Smoothed Particle Hydrodynamics, particularly those facing challenges in maintaining particle density and stability in simulations.

PetoSVK
Messages
1
Reaction score
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
 
Physics news on Phys.org
Initializing SPH data sets

The difficulties with initializing SPH data sets has to do with an errorneous low density value at the boundaries (the sum over all particles is simply smaller at the boundaries than in the middle). You can do one of the following things:

1. let the simulation run with the initial bounding box as boundary for a few hundred timesteps and all particles damped in their absolute velocity. This will most likely lead to a more stable initial configuration.

2. if you're not interested in accuracy you can make the particles at the boundary heavier than the ones inside the fluid. You can simply choose the mass of the particles at the boundary in a way that you have the same density at the boundaries than in the middle. However, as particles start to move you might have heavier particles in the middle which is not at all perfect.

3. You can use a correction approach such as the one proposed in

Bonet, J. and Kulasegaram, S., A simplified approach to enhance the performance of
smooth particle hydrodynamics methods, Applied Mathematics and Computation,
126(2-3), pp. 133-155, 2002

If you choose 3. the note that the volume is always constant and can be precomputed for each particle. Either as V = (initial_distance)^3 or something like
V = 1 / (\sum_j W_{ij})

For the value of h I choose about the initial particle distance and use the spline kernel e.g. discussed in Monaghan - Smoothed Particle Hydrodynamics - 2005
which has support length of 4h ( interval [-2h,2h])
 


Hello, I have a question about Kernel function. What is the purpose of the derivatives o these function? there are used to keep the system stable without divergences?.. I understand that every passive system most be decreasing (derivative) in the sense of Lyapunov in order to be stable.

Regards.
 

Similar threads

  • · Replies 18 ·
Replies
18
Views
3K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 5 ·
Replies
5
Views
1K
  • · Replies 48 ·
2
Replies
48
Views
5K
  • · Replies 16 ·
Replies
16
Views
6K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 48 ·
2
Replies
48
Views
16K
  • · Replies 7 ·
Replies
7
Views
3K
Replies
3
Views
4K