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

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

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

Macros

#define _F_   viscousForces_f[i].XYZ
 

Functions

__kernel void entry (const __global uint *iset, const __global int *imove, __global vec *viscousForces_f, __global vec4 *viscousForces_m, const __global vec *r, const __global vec *normal, const __global vec *u, const __global float *rho, const __global float *m, __constant float *visc_dyn, const __global uint *icell, const __global uint *ihoc, uint N, uivec4 n_cells, float dr, unsigned int viscousForces_iset, vec viscousForces_r)
 Tool to compute the viscous force and moment for an especific body.
 

Detailed Description

Tool to compute the fluid viscous force and moment.

Macro Definition Documentation

◆ _F_

#define _F_   viscousForces_f[i].XYZ

Function Documentation

◆ entry()

__kernel void entry ( const __global uint *  iset,
const __global int *  imove,
__global vec viscousForces_f,
__global vec4 viscousForces_m,
const __global vec r,
const __global vec normal,
const __global vec u,
const __global float *  rho,
const __global float *  m,
__constant float *  visc_dyn,
const __global uint *  icell,
const __global uint *  ihoc,
uint  N,
uivec4  n_cells,
float  dr,
unsigned int  viscousForces_iset,
vec  viscousForces_r 
)

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

In this approach the following operation is performed for the boundary elements: \( \mathbf{f}_a = \mu \, \sum_b -\frac{ \left(\mathbf{u}_b - \mathbf{u}_a\right) - \left(\left(\mathbf{u}_b - \mathbf{u}_a\right) \cdot \mathbf{n}_a \right) \mathbf{n}_a}{ \left(\mathbf{r}_b - \mathbf{r}_a\right) \cdot \mathbf{n}_a}s_a \, W\left(\mathbf{u}_b - \mathbf{u}_a\right) \frac{m_b}{\rho_b}\) where \( s_a \) is the area of the element, stored in the masses array. The moment is computed therefore as: \( \mathbf{m}_a = \mathbf{f}_a \times \left(\mathbf{r}_a - \mathbf{r}_0 \right) \) becoming \( \mathbf{r}_0 \) the reference point where the moment should be computed.

Parameters
isetSet of particles index.
imoveMoving flags.
  • imove > 0 for regular fluid particles.
  • imove = 0 for sensors.
  • imove < 0 for boundary elements/particles.
viscousForces_fForce of each boundary element to be computed [N].
viscousForces_mMoment of each boundary element to be computed
rPosition \( \mathbf{r} \).
normalNormal \( \mathbf{n} \).
uVelocity \( \mathbf{u} \).
rhoDensity \( \rho \).
mMass \( m \).
visc_dynDynamic viscosity \( \mu \).
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
drDistance between particles \( \Delta r \).
viscousForces_isetParticles set to be computed.
viscousForces_rPoint with respect the moments are computed \( \mathbf{r}_0 \).
Here is the call graph for this function: