Value of density when there are no or very few neighbours in SPH simulation

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

The density needs to be updated using the formula

$$\rho(\mathbf{x}_i)=\sum_j m_jW_\text{default}(\mathbf{x}_i-\mathbf{x}_j,h)$$

The smoothing kernel is $$W_\text{default}(\mathbf{r},h)=\frac{315}{64\pi h^9}\cases{(h^2-||\mathbf{r}||^2)^3,\quad 0\leq\mathbf{r}\leq h\\0,\quad\quad\quad\quad\quad ||\mathbf{r}||>h}$$

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

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.
• If you don't want to increase the number of particles, you have to choose $h$ large enough. Jan 31 '15 at 3:39