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:
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 functionsCubic 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}$.DerivativesThe 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
|