SPH Kernel

SPH kernel functions:

In the following we investigate different SPH kernel functions and their derivatives. A kernel function $W(\mathbf{r}, h)$ with the smoothing length $h$ must have the following properties:

  • Normalization condition: $\int_{\mathbb{R}^d} W(\mathbf x - \mathbf x^*, h) d \mathbf x^* = 1 $
  • Symmetry condition: $W(\mathbf x - \mathbf x^*, h) = W(\mathbf x^* - \mathbf x, h)$
  • Dirac-$\delta$ condition: $\lim_{h \rightarrow 0} W(\mathbf x - \mathbf x^*, h) = \delta(\mathbf x - \mathbf x^*)$
  • Non-negative condition: $W(\mathbf x - \mathbf x^*, h) \geq 0$
  • Compact support condition with support radius $r$: $W(\mathbf x - \mathbf x^*, h) = 0 \quad \text{if} \quad \|\mathbf x - \mathbf x^*\| > r$

Furthermore, a kernel function should be at least twice continuously differentiable to enable a consistent discretization of 2nd-order partial differential equations (PDEs). The smoothing length controls defines how strongly a value at position $\mathbf x$ is influenced by the values in its neighborhood. Hence, a larger value $h$ yields a larger smoothing effect.

Popular kernel functions

Cubic spline kernel [Mon92]

$$W(q) = \alpha_d \begin{cases} \frac23 - q^2 + \frac12 q^3 & 0 \leq q < 1 \\ \frac16 (2-q)^3 & 1 \leq q < 2 \\ 0 & q \geq 2, \end{cases}$$ where $q = \frac{\|r\|}{h}$ the kernel normalization factors $\alpha_d$ for the respective dimensions $d$ are $\alpha_1 = \frac1h$, $\alpha_2 = \frac{15}{7\pi h^2}$, and $\alpha_3 = \frac{3}{2\pi h^3}$.

Wendland C2 kernel for 1D [Wen95]

$$W(q) = \alpha_d \begin{cases} \left (1-\frac{q}{2} \right )^3 \left (\frac32 q+1 \right ) & 0 \leq q \leq 2 \\ 0 & q > 2, \end{cases}$$ where the kernel normalization factor is $\alpha_1 = \frac{5}{8h}$.

Quintic spline kernel [LL10]

$$W(q) = \alpha_d \begin{cases} (3-q)^5 - 6(2-q)^5 + 15 (1-q)^5 & 0 \leq q \leq 1 \\ (3-q)^5 - 6(2-q)^5 & 1 < q \leq 2 \\ (3-q)^5 & 2 < q \leq 3 \\ 0 & q > 3, \end{cases}$$ where the kernel normalization factors are $\alpha_1 = \frac{1}{120h}$, $\alpha_2 = \frac{7}{478 \pi h^2}$, and $\alpha_3 = \frac{1}{120 \pi h^3}$.

Derivatives

The gradient of the kernel function is $$\nabla W = \frac{\partial W}{\partial \mathbf r} = \frac{\partial W(q)}{\partial q} \cdot \frac{\partial q}{\partial \mathbf r} = \frac{\partial W(q)}{\partial q} \frac{\mathbf r} {h \| \mathbf r \|}$$ and the Laplacian $$\nabla^2 W = \frac{\partial^2 W(q)}{\partial q^2} \frac{1}{h^2} + \frac{\partial W(q)}{\partial q} \nabla^2 q$$

References

  • [Mon92] J. Monaghan. Smoothed Particle Hydrodynamics. Annual Review of Astronomy and Astrophysics, 1992, 30, 543-574
  • [Wen95] H. Wendland. Piecewise polynomial, positive definite and compactly supported radial functions of minimal degree. Advances in computational Mathematics 4.1, 389-396, 1995
  • [LL10] M. Liu, G. Liu. Smoothed Particle Hydrodynamics (SPH): an Overview and Recent Developments. Archives of Computational Methods in Engineering, 2010, 17, 25-76