AQUAgpusph 4.1.2
Loading...
Searching...
No Matches
Files | Macros | Functions
Cfd

Files

file  Inlet.cl
 Vanish the velocity and desnity rates of variation of the velocity and density for the dummy particles of the inlet.
 
file  Inflow.cl
 Vanish the velocity and desnity rates of variation of the velocity and density for the dummy particles of the inlet.
 
file  Inlet.cl
 Vanish the velocity and desnity rates of variation of the velocity and density for the dummy particles of the inlet.
 
file  deltaSPH.cl
 delta-SPH for the CFD module.
 
file  Shepard.cl
 Shepard renormalization factor for the CFD module.
 
file  Omega.cl
 Omega term computation.
 
file  Omega.cl
 Omega term computation.
 
file  deltaSPH.cl
 delta-SPH for the CFD module.
 
file  Omega.cl
 Omega term computation.
 
file  Predictor.cl
 Kernel length computation.
 
file  Shepard.cl
 Shepard renormalization factor for the CFD module, when variable kernel length is considered.
 

Macros

#define M_ITERS   10
 
#define EXCLUDED_PARTICLE(index)   imove[index] != 1
 Restrict the aplication to the fluid particles (imove=1)
 
#define EXCLUDED_PARTICLE(index)   imove[index] != 1
 Restrict the aplication to the fluid particles (imove=1)
 
#define EXCLUDED_PARTICLE(index)   imove[index] != 1
 Restrict the aplication to the fluid particles (imove=1)
 
#define EXCLUDED_PARTICLE(index)   imove[index] != 1
 Restrict the aplication to the fluid particles (imove=1)
 

Functions

__kernel void feed (__global int *imove, __global unsigned int *iset, __global vec *r, __global vec *u, __global vec *dudt, __global float *rho, __global float *drhodt, __global float *m, __global float *m0, __global int *miter, __global unsigned int *ilevel, __global unsigned int *level, __global float *p, __constant float *refd, unsigned int N, unsigned int nbuffer, float dt, float cs, float p0, vec g, float dr, vec inlet_r, vec inlet_ru, vec inlet_rv, uivec2 inlet_N, vec inlet_n, float inlet_U, vec inlet_rFS, float inlet_R, int inlet_starving)
 Particles generation at the inlet (i.e. inflow) boundary condition.
 
__kernel void feed (__global int *imove, __global unsigned int *iset, __global vec *r, __global vec *u, __global vec *dudt, __global float *rho, __global float *drhodt, __global float *m, __global float *p, __constant float *refd, unsigned int N, unsigned int nbuffer, float dt, float cs, float p0, vec g, float dr, vec inlet_r, vec inlet_ru, vec inlet_rv, uivec2 inlet_N, vec inlet_n, float inlet_U, vec inlet_rFS, float inlet_R, int inlet_starving)
 Particles generation at the inlet (i.e. inflow) boundary condition.
 
__kernel void rates (__global int *imove, __global vec *r, __global vec *u, __global vec *dudt, __global float *drhodt, unsigned int N, vec inlet_r, float inlet_U, vec inlet_n)
 Vanish the velocity and desnity rates of variation of the velocity and density for the dummy particles of the inlet.
 
__kernel void entry (const __global int *imove, const __global int *imirrored, const __global vec *r, const __global float *rho, const __global float *m, const __global float *h_var, __global float *Omega, const __global uint *icell, const __global uint *ihoc, uint N, uivec4 n_cells)
 Compute the \( \Omega \) term.
 
__kernel void entry (const __global int *imove, const __global int *imirrored, const __global vec *r, const __global vec *rmirrored, const __global float *rho, const __global float *m, const __global float *h_var, __global float *Omega, const __global uint *icell, const __global uint *ihoc, uint N, uivec4 n_cells)
 Compute the \( \Omega \) term.
 
__kernel void entry (const __global int *imove, const __global vec *r, const __global float *rho, const __global float *m, const __global float *h_var, __global float *Omega, const __global uint *icell, const __global uint *ihoc, uint N, uivec4 n_cells)
 Compute the \( \Omega \) term.
 
__kernel void entry (__global const int *imove, __global const float *rho_in, __global const float *m, __global float *h_var_in, unsigned int N, float hfac)
 Recompute the kernel length for each particle.
 

Detailed Description

Macro Definition Documentation

◆ EXCLUDED_PARTICLE [1/4]

#define EXCLUDED_PARTICLE (   index)    imove[index] != 1

Restrict the aplication to the fluid particles (imove=1)

◆ EXCLUDED_PARTICLE [2/4]

#define EXCLUDED_PARTICLE (   index)    imove[index] != 1

Restrict the aplication to the fluid particles (imove=1)

◆ EXCLUDED_PARTICLE [3/4]

#define EXCLUDED_PARTICLE (   index)    imove[index] != 1

Restrict the aplication to the fluid particles (imove=1)

◆ EXCLUDED_PARTICLE [4/4]

#define EXCLUDED_PARTICLE (   index)    imove[index] != 1

Restrict the aplication to the fluid particles (imove=1)

◆ M_ITERS

#define M_ITERS   10

Function Documentation

◆ entry() [1/4]

__kernel void entry ( __global const int *  imove,
__global const float *  rho_in,
__global const float *  m,
__global float *  h_var_in,
unsigned int  N,
float  hfac 
)

Recompute the kernel length for each particle.

\( h_i = \nu \left( \frac{m_i}{\rho_i} \right)^{1 / d} \)

where \( \nu \) is the hfac ratio, and \( d \) is the dimension, 2 and 3 for 2D and 3D respectively.

Parameters
imoveMoving flags.
  • imove > 0 for regular fluid/solid particles.
  • imove = 0 for sensors.
  • imove < 0 for boundary elements/particles.
rho_inDensity \( \rho \).
mMass \( m \).
h_var_invariable kernel lenght \( h \).
NNumber of particles.
hfacRatio between the kernel length and the distance between particles.
See also
Iason Zisis, Bas van der Linden, Christina Giannopapa, Barry Koren. On the derivation of SPH schemes for shocks through inhomogeneous media. Int. Jnl. of Multiphysics. Vol. 9, Number 2. 2015

◆ entry() [2/4]

__kernel void entry ( const __global int *  imove,
const __global int *  imirrored,
const __global vec r,
const __global float *  rho,
const __global float *  m,
const __global float *  h_var,
__global float *  Omega,
const __global uint *  icell,
const __global uint *  ihoc,
uint  N,
uivec4  n_cells 
)

Compute the \( \Omega \) term.

\( \Omega_i = 1 - m_i \frac{\partial h_i}{\partial \rho_i} \sum_j \frac{\partial W_{ij}}{\partial h_i} \)

Parameters
imoveMoving flags.
  • imove > 0 for regular fluid/solid particles.
  • imove = 0 for sensors.
  • imove < 0 for boundary elements/particles.
imirrored0 if the particle has not been mirrored, 1 otherwise.
rPosition \( \mathbf{r} \).
rhoDensity \( \rho \).
mMass \( m \).
h_varvariable kernel lenght \( h \).
Omega\( \Omega \) term.
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
See also
Iason Zisis, Bas van der Linden, Christina Giannopapa, Barry Koren. On the derivation of SPH schemes for shocks through inhomogeneous media. Int. Jnl. of Multiphysics. Vol. 9, Number 2. 2015
Here is the call graph for this function:

◆ entry() [3/4]

__kernel void entry ( const __global int *  imove,
const __global int *  imirrored,
const __global vec r,
const __global vec rmirrored,
const __global float *  rho,
const __global float *  m,
const __global float *  h_var,
__global float *  Omega,
const __global uint *  icell,
const __global uint *  ihoc,
uint  N,
uivec4  n_cells 
)

Compute the \( \Omega \) term.

\( \Omega_i = 1 - m_i \frac{\partial h_i}{\partial \rho_i} \sum_j \frac{\partial W_{ij}}{\partial h_i} \)

Parameters
imoveMoving flags.
  • imove > 0 for regular fluid/solid particles.
  • imove = 0 for sensors.
  • imove < 0 for boundary elements/particles.
imirrored0 if the particle has not been mirrored, 1 otherwise.
rPosition \( \mathbf{r} \).
rmirroredMirrored position of the particle, r if imirrored is false (0).
rhoDensity \( \rho \).
mMass \( m \).
h_varvariable kernel lenght \( h \).
Omega\( \Omega \) term.
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
See also
Iason Zisis, Bas van der Linden, Christina Giannopapa, Barry Koren. On the derivation of SPH schemes for shocks through inhomogeneous media. Int. Jnl. of Multiphysics. Vol. 9, Number 2. 2015
Here is the call graph for this function:

◆ entry() [4/4]

__kernel void entry ( const __global int *  imove,
const __global vec r,
const __global float *  rho,
const __global float *  m,
const __global float *  h_var,
__global float *  Omega,
const __global uint *  icell,
const __global uint *  ihoc,
uint  N,
uivec4  n_cells 
)

Compute the \( \Omega \) term.

\( \Omega_i = 1 - m_i \frac{\partial h_i}{\partial \rho_i} \sum_j \frac{\partial W_{ij}}{\partial h_i} \)

Parameters
imoveMoving flags.
  • imove > 0 for regular fluid/solid particles.
  • imove = 0 for sensors.
  • imove < 0 for boundary elements/particles.
rPosition \( \mathbf{r} \).
rhoDensity \( \rho \).
mMass \( m \).
h_varvariable kernel lenght \( h \).
Omega\( \Omega \) term.
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
See also
Iason Zisis, Bas van der Linden, Christina Giannopapa, Barry Koren. On the derivation of SPH schemes for shocks through inhomogeneous media. Int. Jnl. of Multiphysics. Vol. 9, Number 2. 2015
Here is the call graph for this function:

◆ feed() [1/2]

__kernel void feed ( __global int *  imove,
__global unsigned int *  iset,
__global vec r,
__global vec u,
__global vec dudt,
__global float *  rho,
__global float *  drhodt,
__global float *  m,
__global float *  m0,
__global int *  miter,
__global unsigned int *  ilevel,
__global unsigned int *  level,
__global float *  p,
__constant float *  refd,
unsigned int  N,
unsigned int  nbuffer,
float  dt,
float  cs,
float  p0,
vec  g,
float  dr,
vec  inlet_r,
vec  inlet_ru,
vec  inlet_rv,
uivec2  inlet_N,
vec  inlet_n,
float  inlet_U,
vec  inlet_rFS,
float  inlet_R,
int  inlet_starving 
)

Particles generation at the inlet (i.e. inflow) boundary condition.

Particles are generated just when the inlet is starving, i.e. the previously generated layer of particles have moved more than dr. To do that inlet is extracting the particles from the "buffer", which are the last particles in the sorted list.

This is a patched version for the multiresolution module, which is setting also the variables m0 and miter

Parameters
imoveMoving flags.
  • imove > 0 for regular fluid particles.
  • imove = 0 for sensors.
  • imove < 0 for boundary elements/particles.
isetSet of particles index.
rPosition \( \mathbf{r} \).
uVelocity \( \mathbf{u} \).
dudtVelocity rate of change \( \frac{d \mathbf{u}}{d t} \).
rhoDensity \( \rho \).
drhodtDensity rate of change \( \frac{d \rho}{d t} \).
mCurrent mass, \( m \).
m0Target mass \( m_0 \).
miterMass transfer iteration (Positive for growing particles, negative for shrinking particles).
ilevelCurrent refinement level of the particle.
levelTarget refinement level of the particle.
pPressure \( p \).
refdDensity of reference of the fluid \( \rho_0 \).
NNumber of particles.
nbufferNumber of buffer particles.
dtTime step \( \Delta t \).
csSpeed of sound \( c_s \).
p0Background pressure \( p_0 \).
gGravity acceleration \( \mathbf{g} \).
drDistance between particles \( \Delta r \).
inlet_rLower corner of the inlet square.
inlet_ruSquare U vector.
inlet_rvSquare V vector.
inlet_NNumber of particles to be generated in each direction.
inlet_n= Velocity direction of the generated particles.
inlet_U= Constant inlet velocity magnitude
inlet_rFSThe point where the pressure is the reference one (0 Pa).
inlet_RAccumulated displacement (to be added to the generation point)
inlet_starvingIs the inlet starving, so we need to feed it?

◆ feed() [2/2]

__kernel void feed ( __global int *  imove,
__global unsigned int *  iset,
__global vec r,
__global vec u,
__global vec dudt,
__global float *  rho,
__global float *  drhodt,
__global float *  m,
__global float *  p,
__constant float *  refd,
unsigned int  N,
unsigned int  nbuffer,
float  dt,
float  cs,
float  p0,
vec  g,
float  dr,
vec  inlet_r,
vec  inlet_ru,
vec  inlet_rv,
uivec2  inlet_N,
vec  inlet_n,
float  inlet_U,
vec  inlet_rFS,
float  inlet_R,
int  inlet_starving 
)

Particles generation at the inlet (i.e. inflow) boundary condition.

Particles are generated just when the inlet is starving, i.e. the previously generated layer of particles have moved more than dr. To do that inlet is extracting the particles from the "buffer", which are the last particles in the sorted list.

Parameters
imoveMoving flags.
  • imove > 0 for regular fluid particles.
  • imove = 0 for sensors.
  • imove < 0 for boundary elements/particles.
isetSet of particles index.
rPosition \( \mathbf{r} \).
uVelocity \( \mathbf{u} \).
dudtVelocity rate of change \( \frac{d \mathbf{u}}{d t} \).
rhoDensity \( \rho \).
drhodtDensity rate of change \( \frac{d \rho}{d t} \).
mMass \( m \).
pPressure \( p \).
refdDensity of reference of the fluid \( \rho_0 \).
NNumber of particles.
nbufferNumber of buffer particles.
dtTime step \( \Delta t \).
csSpeed of sound \( c_s \).
p0Background pressure \( p_0 \).
gGravity acceleration \( \mathbf{g} \).
drDistance between particles \( \Delta r \).
inlet_rLower corner of the inlet square.
inlet_ruSquare U vector.
inlet_rvSquare V vector.
inlet_NNumber of particles to be generated in each direction.
inlet_n= Velocity direction of the generated particles.
inlet_U= Constant inlet velocity magnitude
inlet_rFSThe point where the pressure is the reference one (0 Pa).
inlet_RAccumulated displacement (to be added to the generation point)
inlet_starvingIs the inlet starving, so we need to feed it?

◆ rates()

__kernel void rates ( __global int *  imove,
__global vec r,
__global vec u,
__global vec dudt,
__global float *  drhodt,
unsigned int  N,
vec  inlet_r,
float  inlet_U,
vec  inlet_n 
)

Vanish the velocity and desnity rates of variation of the velocity and density for the dummy particles of the inlet.

Parameters
imoveMoving flags.
  • imove > 0 for regular fluid particles.
  • imove = 0 for sensors.
  • imove < 0 for boundary elements/particles.
rPosition \( \mathbf{r} \).
uVelocity \( \mathbf{u} \).
dudtVelocity rate of change \( \frac{d \mathbf{u}}{d t} \).
drhodtDensity rate of change \( \frac{d \rho}{d t} \).
NNumber of particles.
inlet_rLower corner of the inlet square.
inlet_UVelocity magnitude of the generated particles.
inlet_nVelocity direction of the generated particles.