AQUAgpusph 4.1.2
Loading...
Searching...
No Matches
Functions
PressureForces.cl File Reference

Tool to compute the fluid pressure force and moment. More...

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

Functions

__kernel void entry (__global vec *pressureForces_f, __global vec4 *pressureForces_m, const __global uint *iset, const __global int *imove, const __global vec *r, const __global vec *normal, const __global float *p, const __global float *rho, const __global float *m, uint N, unsigned int pressureForces_iset, vec pressureForces_r)
 Tool to compute the pressure force and moment for an especific body.
 

Detailed Description

Tool to compute the fluid pressure force and moment.

Function Documentation

◆ entry()

__kernel void entry ( __global vec pressureForces_f,
__global vec4 pressureForces_m,
const __global uint *  iset,
const __global int *  imove,
const __global vec r,
const __global vec normal,
const __global float *  p,
const __global float *  rho,
const __global float *  m,
uint  N,
unsigned int  pressureForces_iset,
vec  pressureForces_r 
)

Tool to compute the pressure force and moment for an especific body.

The force at each boundary element is just \( \mathbf{f}_a = p_a \mathbf{n}_a s_a \) where \( s_a \) is the area of the element, stored in the masses array. The moment is consequently computed as: \( \mathbf{m}_a = \mathbf{f}_a \times \left(\mathbf{r}_a - \mathbf{r}_0 \right) \) with \( \mathbf{r}_0 \) the reference point where the moment should be computed.

Parameters
pressureForces_fForce of each boundary element to be computed [N].
pressureForces_mMoment of each boundary element to be computed [N \( \cdot \) m].
isetSet of particles index.
imoveMoving flags.
  • imove > 0 for regular fluid particles.
  • imove = 0 for sensors.
  • imove < 0 for boundary elements/particles.
rPosition \( \mathbf{r} \).
normalNormal \( \mathbf{n} \).
pPressure \( p \).
rhoDensity \( \rho \).
mMass \( m \).
NNumber of particles.
pressureForces_isetParticles set to be computed.
pressureForces_rPoint with respect the moments are computed, \( \mathbf{r}_0 \).