Spiky kernel definition (2D version). The main feature of the spiky kernel is the uniform sign of the gradient, which should naturally avoid the particles clamping.
More...
|
float | kernelW (float q) |
| The kernel value \( W \left(\mathbf{r_j} - \mathbf{r_i}; h\right) \).
|
|
float | kernelF (float q) |
| The kernel gradient factor \( F \left(\mathbf{r_j} - \mathbf{r_i}; h\right) \).
|
|
float | kernelS (float q) |
| An equivalent kernel function to compute the Shepard factor using the boundary integral elements instead of the fluid volume.
|
|
float | kernelH (float q) |
| The kernel partial derivative with respect to the characteristic height \( \frac{\partial W}{\partial h} \).
|
|
Spiky kernel definition (2D version). The main feature of the spiky kernel is the uniform sign of the gradient, which should naturally avoid the particles clamping.
◆ _KERNEL_H_INCLUDED_
#define _KERNEL_H_INCLUDED_ |
◆ iM_PI
#define iM_PI 0.318309886f |
\( \frac{1}{\pi} \) value.
◆ M_PI
#define M_PI 3.14159265359f |
◆ kernelF()
The kernel gradient factor \( F \left(\mathbf{r_j} - \mathbf{r_i}; h\right) \).
The factor \( F \) is defined such that \( \nabla W \left(\mathbf{r_j} - \mathbf{r_i}; h\right) =
\frac{\mathbf{r_j} - \mathbf{r_i}}{h} \cdot
F \left(\mathbf{r_j} - \mathbf{r_i}; h\right)
\).
- Parameters
-
q | Normalized distance \( \frac{\mathbf{r_j} - \mathbf{r_i}}{h} \). |
- Returns
- Kernel gradient factor value
◆ kernelH()
The kernel partial derivative with respect to the characteristic height \( \frac{\partial W}{\partial h} \).
The result returned by this function should be multiplied by \( \frac{1}{h^{d + 1}} \), where d is 2,3 for 2D and 3D respectively.
- Parameters
-
q | Normalized distance \( \frac{\mathbf{r_j} - \mathbf{r_i}}{h} \). |
- Returns
- Kernel partial derivative factor
- Note
- This function is useful for variable resolution (non-constant kernel height)
- See also
- Iason Zisis, Bas van der Linden, Christina Giannopapa and Barry Koren, On the derivation of SPH schemes for shocks through inhomogeneous media. Int. Jnl. of Multiphysics (2015).
◆ kernelS()
An equivalent kernel function to compute the Shepard factor using the boundary integral elements instead of the fluid volume.
The kernel is defined as follows: \( \hat{W} \left(\rho; h\right) =
\frac{1}{\rho^d} \int \rho^{d - 1} W \left(\rho; h\right) d\rho \)
- Parameters
-
q | Normalized distance \( \frac{\mathbf{r_j} - \mathbf{r_i}}{h} \). |
- Returns
- Equivalent kernel
◆ kernelW()
The kernel value \( W \left(\mathbf{r_j} - \mathbf{r_i}; h\right) \).
- Parameters
-
q | Normalized distance \( \frac{\mathbf{r_j} - \mathbf{r_i}}{h} \). |
- Returns
- Kernel value.