2
$\begingroup$

Sorry for the noob question.

I am trying to implement SPH using the directions shown in this paper.

The density needs to be updated using the formula density update

The smoothing kernel is enter image description here

If there are no particles within the smoothing length(h), won't the density of a particle become zero based on this formula.

$\endgroup$
2
$\begingroup$

Yes. You need to choose the radius $h$ large enough that for each particle, there is always a significant number of other particles within the first particle's radius.

$\endgroup$
  • $\begingroup$ That would make the amount of particles I need for the simulation really high. How do I handle rogue particles in case I'm simulating the particles in a huge space? I'll have to check if the density is zero and cancel all calculations for that particle? $\endgroup$ – punitjajodia Jan 30 '15 at 12:59
  • 1
    $\begingroup$ If you don't want to increase the number of particles, you have to choose $h$ large enough. $\endgroup$ – Wolfgang Bangerth Jan 31 '15 at 3:39
0
$\begingroup$

Actually, the density never becomes zero because of self-contribution (i=j). However, you need neighboring particles, unless the sampling of mass density is poor. The optimal number of neighbors is around 20 in 2D and 50 in 3D.

You can also check the discussion about the calculation of the desired smoothing length here.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.