AQUAgpusph 5.0.4
Loading...
Searching...
No Matches
ElasticBounce.cl File Reference

The simplest boundary technique to assert the non-tresspasable boundary condition. More...

Include dependency graph for ElasticBounce.cl:

Macros

#define __DR_FACTOR__   0.5f
 The boundary elements effect is restricted to a quadrangular area of \( R \times R \), where \( R = DR_FACTOR \cdot \Delta r \).
#define __MIN_BOUND_DIST__   0.0f
 The elastic bounce is not tolerating that a particle becomes closer than this distance (multiplied by \( \Delta r \)).
#define _U_   u_i
#define _DUDT_   dudt[i].XYZ

Functions

__kernel void entry (const __global int *imove, const __global vec *r_in, const __global vec *normal, const __global float *m, const __global vec *u_in, __global vec *dudt, usize N, float dt, LINKLIST_LOCAL_PARAMS)
 Performs the boundary effect on the fluid particles.
__kernel void force_bound (const __global int *imove, const __global float *m, const __global vec *dudt_preelastic, const __global vec *dudt_elastic, __global vec *force_elastic, usize N)
 Compute the force of each fluid particle on the boundary due to the elastic bounce.

Detailed Description

The simplest boundary technique to assert the non-tresspasable boundary condition.

Macro Definition Documentation

◆ __DR_FACTOR__

#define __DR_FACTOR__   0.5f

The boundary elements effect is restricted to a quadrangular area of \( R \times R \), where \( R = DR_FACTOR \cdot \Delta r \).

◆ __MIN_BOUND_DIST__

#define __MIN_BOUND_DIST__   0.0f

The elastic bounce is not tolerating that a particle becomes closer than this distance (multiplied by \( \Delta r \)).

◆ _DUDT_

#define _DUDT_   dudt[i].XYZ

◆ _U_

#define _U_   u_i

Function Documentation

◆ entry()

__kernel void entry ( const __global int * imove,
const __global vec * r_in,
const __global vec * normal,
const __global float * m,
const __global vec * u_in,
__global vec * dudt,
usize N,
float dt,
LINKLIST_LOCAL_PARAMS  )

Performs the boundary effect on the fluid particles.

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} \).
mArea \( s \).
u_inVelocity \( \mathbf{u} \).
dudtVelocity rate of change \( \left. \frac{d \mathbf{u}}{d t} \right\vert_{n+1} \).
NNumber of particles.
dtTime step \( \Delta t \).
icellCell where each particle is located.
ihocHead of chain for each cell (first particle found).
n_cellsNumber of cells in each direction

◆ force_bound()

__kernel void force_bound ( const __global int * imove,
const __global float * m,
const __global vec * dudt_preelastic,
const __global vec * dudt_elastic,
__global vec * force_elastic,
usize N )

Compute the force of each fluid particle on the boundary due to the elastic bounce.

Parameters
imoveMoving flags.
  • imove > 0 for regular fluid particles.
  • imove = 0 for sensors.
  • imove < 0 for boundary elements/particles.
mMass \( m \).
dudt_preelasticVelocity rate of change before the elastic bounce \( \left. \frac{d \mathbf{u}}{d t} \right\vert_{n+1} \).
dudt_elasticVelocity rate of change after the elatic bounce \( \left. \frac{d \mathbf{u}}{d t} \right\vert_{n+1} \).
NNumber of particles.