Trying my chances here; anyone knows why particles stick to the wall in my SPH simulation?


For fun I’ve been writing a small dam break simulation in SPH. I start with a clump of rectangular water, which correctly moves down due to gravity. I have one issue though which is that the wall which fluid cannot fall towards, some particles closest to the wall stick to it:

And this seems to happen for all particles on the left side. Have anyone perhaps experienced something similar?

I would prefer not to share my code here initially, it still needs some clean up etc. I’ve been reading a bit and I think it might be something called “tensile instability”, but all the pictures on Google seems to look a bit different so not so sure…

Thanks in advance, would appreciate general pointers.

For those familiar what I have been using:

  • Wendland Quintic Kernel similar to the one in DualSPHysics
  • Dynamic Boundary Condition (boundary particles enter fluid equations etc)

Kind regards

If I were to dribble water into a cup from a hole in the side I might well find that there’s a little thin trail of water clinging to the side. Usually it would ball up into little ball/droplets. But you appear to have a 2D simulation preventing that. Still, surface tension/energy is a thing and not necessarily incorrect here.

Looking at your bottom wall - on the left side there are also particles ‘sticking’ to the wall.
There is a break point about 1/3 of the way along the wall where there is a gap under the particles.
You mention boundary conditions - how do you set these up?

Yep, but unfortunately this model is a bit simple in that regards, that no friction between boundary and fluid particles is present, but still it happens…

I know for other dam-break simulations using other SPH sofftware this did not happen at the same resolution, so that is why I assume something is wrong for me

Kind regards

Yep, that is because one of the simplest boundary conditions to implement in SPH is the “Dynamic Boundary Condition”, where boundary particles act like fluid particles, but with fixated positions if they are a fixed boundary such as in my case.

It has this artifact, so that is fine :blush:Here is a quote from a wellknown SPH software about it:

Kind regards

I think this means that the boundary is made up of “frozen in place” molecules identical to the liquid molecules.

So if that’s the case, the potential between them works just like the potential between any other two “liquid” molecules. We don’t need “a friction force” that’s explicit to get friction. Basically friction is an emergent property of the interactions. I’m not saying that’s definitely what’s going on, but it could be.

What does the potential between two molecules look like?

The wall is drawn as a grid of points, is it part of the simulation? Why doesn’t the wall gravitate down? (possibly, for the same reason the water freezes near the wall)

Hi again, sorry for the delayed answer

The potential between the functions is giving by the SPH estimation of the momentum equation:

Where a and b denote particles, m is mass, P is pressure and rho is density. PI_ab is artificial viscosity and W_ab is the kernel function.

Kind regards

Yes it is indeed

It does not fall down since I “fix” it by putting an acceleration minus gravity on those particles :slight_smile:

I think you might have a point that if there is too few fluid particles, they can get “overwhelmed” by the boundary particles close to the edge, which never lets them fall down so they “stick” to the wall.

Kind regards


After 18 days I found the answer by asking some experienced SPH solver developers. They mentioned that the issue was in the potential function specifically related to the pressure equation. Since it is a weakly compressible method, which uses density to relate the pressure, when the density of a particle becomes lower than the reference density, then it will create “suction”. This is fine for fluid particles, but unphysical for boundary particles. Here the simplest fix is simply to put the boundary particle density to reference density, if it ever gets below that reference value.

In this way a wall can never produce suction, but only “push”.

So this is the answer for anyone looking at it in the future :slight_smile: