AQUAgpusph 5.0.4
Loading...
Searching...
No Matches
Spiky3D.hcl File Reference

Spiky kernel definition (3D version). The spiky kernel is a common Cubic Spline kernel, where the middle know is displaced to grant that the maximum of the gradient lies on 1 / hfac. More...

Macros

#define _KERNEL_H_INCLUDED_
#define M_PI   3.14159265359f
#define WA   2.f / (2.f * HFAC - 1.f)
 Spline middle knot.
#define WCON   15.f / (2.f * M_PI * (WA * WA + 4.f))
 Renormalization factors.
#define FCON   3.f / 2.f * WCON

Functions

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) \).

Variables

__constant float wa = WA
__constant float wcon = WCON
__constant float fcon = FCON

Detailed Description

Spiky kernel definition (3D version). The spiky kernel is a common Cubic Spline kernel, where the middle know is displaced to grant that the maximum of the gradient lies on 1 / hfac.

see Lahiri, Saptarshi Kumar, et al. "A stable SPH with adaptive B-spline kernel." Journal of Computational Physics 422 (2020): 109761.

Macro Definition Documentation

◆ _KERNEL_H_INCLUDED_

#define _KERNEL_H_INCLUDED_

◆ FCON

#define FCON   3.f / 2.f * WCON

◆ M_PI

#define M_PI   3.14159265359f

\( \pi \) value.

◆ WA

#define WA   2.f / (2.f * HFAC - 1.f)

Spline middle knot.

◆ WCON

#define WCON   15.f / (2.f * M_PI * (WA * WA + 4.f))

Renormalization factors.

Function Documentation

◆ kernelF()

float kernelF ( 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^d} \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

◆ kernelW()

float kernelW ( 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.

Variable Documentation

◆ fcon

__constant float fcon = FCON

◆ wa

__constant float wa = WA

◆ wcon

__constant float wcon = WCON