Incompressible Fluid simulation - SPH doesn't work

AI Thread Summary
The discussion focuses on challenges faced in implementing Smoothed Particle Hydrodynamics (SPH) for incompressible fluid simulations. Key issues include difficulties in maintaining particle separation and achieving the desired density of 1000 without penetration, leading to unwanted particle scattering and clustering. Various approaches from academic papers have been attempted, with some success noted when combining techniques and adjusting kernel radius. Recommendations for initializing SPH datasets include allowing the simulation to stabilize over time or adjusting boundary particle mass to match density. The conversation also touches on the importance of kernel function derivatives for system stability.
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.
 
I have recently been really interested in the derivation of Hamiltons Principle. On my research I found that with the term ##m \cdot \frac{d}{dt} (\frac{dr}{dt} \cdot \delta r) = 0## (1) one may derivate ##\delta \int (T - V) dt = 0## (2). The derivation itself I understood quiet good, but what I don't understand is where the equation (1) came from, because in my research it was just given and not derived from anywhere. Does anybody know where (1) comes from or why from it the...
Back
Top