AQUAgpusph 4.1.2
Loading...
Searching...
No Matches
Macros | Functions
Shepard.cl File Reference

Boundary integral term computation. (See Aqua::CalcServer::Boundary::DeLeffe for details) More...

#include "resources/Scripts/types/types.h"
#include "resources/Scripts/KernelFunctions/Kernel.h"
Include dependency graph for Shepard.cl:

Macros

#define _SHEPARD_   shepard[i]
 

Functions

__kernel void compute (const __global int *imove, const __global vec *r, const __global vec *normal, const __global vec *tangent, const __global vec *binormal, const __global float *m, __global float *shepard, const __global uint *icell, const __global uint *ihoc, uint N, uivec4 n_cells)
 Shepard factor computation.
 
__kernel void apply (const __global int *imove, const __global float *shepard, __global vec *grad_p, __global vec *lap_u, __global float *div_u, uint N, float cs)
 Renormalize the differential operators.
 

Detailed Description

Boundary integral term computation. (See Aqua::CalcServer::Boundary::DeLeffe for details)

Macro Definition Documentation

◆ _SHEPARD_

#define _SHEPARD_   shepard[i]

Function Documentation

◆ apply()

__kernel void apply ( const __global int *  imove,
const __global float *  shepard,
__global vec grad_p,
__global vec lap_u,
__global float *  div_u,
uint  N,
float  cs 
)

Renormalize the differential operators.

The main drawback of the boundary integrals formulation is the requirement of the renormalization of the computed differentiqal operators, which is destroying several conservation properties.

Parameters
imoveMoving flags.
  • imove > 0 for regular fluid particles.
  • imove = 0 for sensors.
  • imove < 0 for boundary elements/particles.
shepardShepard term \( \gamma(\mathbf{x}) = \int_{\Omega} W(\mathbf{y} - \mathbf{x}) \mathrm{d}\mathbf{x} \).
grad_pPressure gradient \( \frac{\nabla p}{rho} \).
lap_uVelocity laplacian \( \frac{\Delta \mathbf{u}}{rho} \).
div_uVelocity divergence \( \rho \nabla \cdot \mathbf{u} \).
NTotal number of particles and boundary elements.
csSpeed of sound \( c_s \).
See also
Boundary/BI/Interactions.cl
Here is the call graph for this function:

◆ compute()

__kernel void compute ( const __global int *  imove,
const __global vec r,
const __global vec normal,
const __global vec tangent,
const __global vec binormal,
const __global float *  m,
__global float *  shepard,
const __global uint *  icell,
const __global uint *  ihoc,
uint  N,
uivec4  n_cells 
)

Shepard factor computation.

\[ \gamma(\mathbf{x}) = \int_{\Omega} W(\mathbf{y} - \mathbf{x}) \mathrm{d}\mathbf{y} \]

The shepard renormalization factor is applied for several purposes:

  • To interpolate values
  • To recover the consistency with the Boundary Integrals formulation
  • Debugging

In the shepard factor computation the fluid extension particles are not taken into account.

Parameters
imoveMoving flags.
  • imove > 0 for regular fluid particles.
  • imove = 0 for sensors.
  • imove < 0 for boundary elements/particles.
rPosition \( \mathbf{r} \).
normalNormal \( \mathbf{n} \).
tangentTangent \( \mathbf{t} \).
binormalBinormal \( \mathbf{b} \).
mArea of the boundary element \( s \).
shepardShepard term \( \gamma(\mathbf{x}) = \int_{\Omega} W(\mathbf{y} - \mathbf{x}) \mathrm{d}\mathbf{y} \).
icellCell where each particle is located.
ihocHead of chain for each cell (first particle found).
NNumber of particles.
n_cellsNumber of cells in each direction
Here is the call graph for this function: