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

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

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

Macros

#define __DR_FACTOR__   1.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.3f
 The elastic bounce is not tolerating that a particle becomes closer than this distance (multiplied by \( \Delta r \)).
 
#define __ELASTIC_FACTOR__   0.0f
 The amount of kinetic energy conserved in the interaction.
 

Functions

__kernel void entry (const __global int *imove, const __global vec *r, const __global vec *normal, __global vec *u, __global vec *dudt, __global uint *icell, __global uint *ihoc, uint N, uivec4 n_cells, float dr, float dt)
 Performs the boundary effect on the fluid particles.
 

Detailed Description

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

Macro Definition Documentation

◆ __DR_FACTOR__

#define __DR_FACTOR__   1.5f

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

◆ __ELASTIC_FACTOR__

#define __ELASTIC_FACTOR__   0.0f

The amount of kinetic energy conserved in the interaction.

A factor of 1 imply that the velocity of the particle will be preserved (except for the direction), while a factor of 0 imply that the particle will loss all its normal to the boundary velocity.

The tangential velocity is not affected.

◆ __MIN_BOUND_DIST__

#define __MIN_BOUND_DIST__   0.3f

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

Function Documentation

◆ entry()

__kernel void entry ( const __global int *  imove,
const __global vec r,
const __global vec normal,
__global vec u,
__global vec dudt,
__global uint *  icell,
__global uint *  ihoc,
uint  N,
uivec4  n_cells,
float  dr,
float  dt 
)

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} \).
uVelocity \( \mathbf{u} \).
dudtVelocity rate of change \( \left. \frac{d \mathbf{u}}{d t} \right\vert_{n+1} \).
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 \).
dtTime step \( \Delta t \).