Incompressible Fluid simulation - SPH doesn't work

In summary, the difficulty with initialization is due to an erroneous low density value at the boundaries. You can choose one of the following methods to fix the problem: - 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. - 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
  • #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
 
Physics news on Phys.org
  • #2
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])
 
  • #3


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.
 

1. Why doesn't SPH work for incompressible fluid simulation?

SPH (Smoothed Particle Hydrodynamics) is a numerical method commonly used for fluid simulation. However, it is based on the assumption that fluids are compressible, which is not always the case. Incompressible fluids, such as water, have a constant density and do not change volume under pressure. This means that SPH, which requires particles to have a variable density, is not suitable for simulating incompressible fluids.

2. Can SPH be modified to work with incompressible fluids?

Yes, there are modifications of the SPH method that can be used for incompressible fluid simulation. These include the Weakly Compressible SPH (WCSPH) and the Incompressible SPH (ISPH) methods. These modifications account for the constant density of incompressible fluids and improve the accuracy of the simulation.

3. What are the limitations of using SPH for incompressible fluid simulation?

One of the main limitations of using SPH for incompressible fluid simulation is the issue of tensile instability. This occurs when particles move too far apart and lose their connection, resulting in gaps or holes in the fluid. Another limitation is the computational cost, as SPH requires a large number of particles to accurately simulate incompressible fluids.

4. Are there other methods besides SPH for simulating incompressible fluids?

Yes, there are other methods that can be used for incompressible fluid simulation, such as the Grid-based Eulerian method and the Volume of Fluid (VOF) method. These methods have their own advantages and limitations, and the choice of which method to use depends on the specific needs of the simulation.

5. How can I improve the accuracy of my incompressible fluid simulation using SPH?

There are a few ways to improve the accuracy of an incompressible fluid simulation using SPH. One way is to use a higher number of particles, which can reduce the size of the gaps and improve the overall accuracy. Another way is to use a more advanced SPH variant, such as WCSPH or ISPH. Additionally, adjusting the smoothing length and kernel function can also lead to more accurate results.

Similar threads

Replies
18
Views
992
Replies
5
Views
2K
Replies
9
Views
2K
  • Programming and Computer Science
Replies
4
Views
3K
  • Classical Physics
Replies
6
Views
289
  • Mechanical Engineering
Replies
2
Views
746
Replies
48
Views
13K
  • Programming and Computer Science
Replies
19
Views
2K
Replies
31
Views
1K
  • Mechanics
Replies
11
Views
2K
Back
Top