AQUAgpusph 4.1.2
Loading...
Searching...
No Matches
Macros | Functions
Wendland2D.hcl File Reference

Wendland kernel definition (2D version). More...

Macros

#define _KERNEL_H_INCLUDED_
 
#define M_PI   3.14159265359f
 
#define iM_PI   0.318309886f
 

Functions

const float kernelW (const float q)
 The kernel value \( W \left(\mathbf{r_j} - \mathbf{r_i}; h\right) \).
 
const float kernelF (const float q)
 The kernel gradient factor \( F \left(\mathbf{r_j} - \mathbf{r_i}; h\right) \).
 
const float kernelH (const float q)
 The kernel partial derivative with respect to the characteristic height \( \frac{\partial W}{\partial h} \).
 
const float kernelS_P (const float q)
 An equivalent kernel function to compute the Shepard factor using the boundary integral elements instead of the fluid volume.
 
const float kernelS_D (const float d, const float t, const float b, const float s)
 An equivalent kernel function to compute the Shepard factor using the boundary integral elements instead of the fluid volume.
 

Detailed Description

Wendland kernel definition (2D version).

Macro Definition Documentation

◆ _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

\( \pi \) value.

Function Documentation

◆ kernelF()

const float kernelF ( const float  q)
inline

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
qNormalized distance \( \frac{\mathbf{r_j} - \mathbf{r_i}}{h} \).
Returns
Kernel gradient factor value

◆ kernelH()

const float kernelH ( const float  q)
inline

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
qNormalized 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_D()

const float kernelS_D ( const float  d,
const float  t,
const float  b,
const float  s 
)
inline

An equivalent kernel function to compute the Shepard factor using the boundary integral elements instead of the fluid volume.

For practical purposes, the kernel computation is split in 2 parts: The polynomial part, where trucation errors are acceptable, and the divergent part, which requires an analytical solution. This function computes the divergent part.

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
dNormal distance to the wall, \( (\mathbf{r_j} - \mathbf{r_i}) \cdot \mathbf{n_j} \).
tTangential distance to the boundary element, \( (\mathbf{r_j} - \mathbf{r_i}) \cdot \mathbf{t_j} \).
b0 in 2D simulations, distance along the normal direction in 3D simulations, \( (\mathbf{r_j} - \mathbf{r_i}) \cdot \mathbf{b_j} \).
sArea of the boundary element, \( 2 * \Delta r \).
Returns
Equivalent kernel divergent part
See also
kernelS_P
Warning
Due to the analytical nature of the solution, this kernel should not be multiplied by the element area, nor divided by \( h^2 \)

◆ kernelS_P()

const float kernelS_P ( const float  q)
inline

An equivalent kernel function to compute the Shepard factor using the boundary integral elements instead of the fluid volume.

For practical purposes, the kernel computation is split in 2 parts: The polynomial part, where trucation errors are acceptable, and the divergent part, which requires an analytical solution. This function computes the polynomial part.

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
qNormalized distance \( \frac{\mathbf{r_j} - \mathbf{r_i}}{h} \).
Returns
Equivalent kernel polynomial part
See also
kernelS_D

◆ kernelW()

const float kernelW ( const float  q)
inline

The kernel value \( W \left(\mathbf{r_j} - \mathbf{r_i}; h\right) \).

Parameters
qNormalized distance \( \frac{\mathbf{r_j} - \mathbf{r_i}}{h} \).
Returns
Kernel value.