AQUAgpusph 4.1.2
|
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. | |
#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)
#define M_ITERS 10 |
__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.
imove | Moving flags.
|
rho_in | Density \( \rho \). |
m | Mass \( m \). |
h_var_in | variable kernel lenght \( h \). |
N | Number of particles. |
hfac | Ratio between the kernel length and the distance between particles. |
__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} \)
imove | Moving flags.
|
imirrored | 0 if the particle has not been mirrored, 1 otherwise. |
r | Position \( \mathbf{r} \). |
rho | Density \( \rho \). |
m | Mass \( m \). |
h_var | variable kernel lenght \( h \). |
Omega | \( \Omega \) term. |
icell | Cell where each particle is located. |
ihoc | Head of chain for each cell (first particle found). |
N | Number of particles. |
n_cells | Number of cells in each direction |
__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} \)
imove | Moving flags.
|
imirrored | 0 if the particle has not been mirrored, 1 otherwise. |
r | Position \( \mathbf{r} \). |
rmirrored | Mirrored position of the particle, r if imirrored is false (0). |
rho | Density \( \rho \). |
m | Mass \( m \). |
h_var | variable kernel lenght \( h \). |
Omega | \( \Omega \) term. |
icell | Cell where each particle is located. |
ihoc | Head of chain for each cell (first particle found). |
N | Number of particles. |
n_cells | Number of cells in each direction |
__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} \)
imove | Moving flags.
|
r | Position \( \mathbf{r} \). |
rho | Density \( \rho \). |
m | Mass \( m \). |
h_var | variable kernel lenght \( h \). |
Omega | \( \Omega \) term. |
icell | Cell where each particle is located. |
ihoc | Head of chain for each cell (first particle found). |
N | Number of particles. |
n_cells | Number of cells in each direction |
__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
imove | Moving flags.
|
iset | Set of particles index. |
r | Position \( \mathbf{r} \). |
u | Velocity \( \mathbf{u} \). |
dudt | Velocity rate of change \( \frac{d \mathbf{u}}{d t} \). |
rho | Density \( \rho \). |
drhodt | Density rate of change \( \frac{d \rho}{d t} \). |
m | Current mass, \( m \). |
m0 | Target mass \( m_0 \). |
miter | Mass transfer iteration (Positive for growing particles, negative for shrinking particles). |
ilevel | Current refinement level of the particle. |
level | Target refinement level of the particle. |
p | Pressure \( p \). |
refd | Density of reference of the fluid \( \rho_0 \). |
N | Number of particles. |
nbuffer | Number of buffer particles. |
dt | Time step \( \Delta t \). |
cs | Speed of sound \( c_s \). |
p0 | Background pressure \( p_0 \). |
g | Gravity acceleration \( \mathbf{g} \). |
dr | Distance between particles \( \Delta r \). |
inlet_r | Lower corner of the inlet square. |
inlet_ru | Square U vector. |
inlet_rv | Square V vector. |
inlet_N | Number of particles to be generated in each direction. |
inlet_n | = Velocity direction of the generated particles. |
inlet_U | = Constant inlet velocity magnitude |
inlet_rFS | The point where the pressure is the reference one (0 Pa). |
inlet_R | Accumulated displacement (to be added to the generation point) |
inlet_starving | Is the inlet starving, so we need to feed it? |
__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.
imove | Moving flags.
|
iset | Set of particles index. |
r | Position \( \mathbf{r} \). |
u | Velocity \( \mathbf{u} \). |
dudt | Velocity rate of change \( \frac{d \mathbf{u}}{d t} \). |
rho | Density \( \rho \). |
drhodt | Density rate of change \( \frac{d \rho}{d t} \). |
m | Mass \( m \). |
p | Pressure \( p \). |
refd | Density of reference of the fluid \( \rho_0 \). |
N | Number of particles. |
nbuffer | Number of buffer particles. |
dt | Time step \( \Delta t \). |
cs | Speed of sound \( c_s \). |
p0 | Background pressure \( p_0 \). |
g | Gravity acceleration \( \mathbf{g} \). |
dr | Distance between particles \( \Delta r \). |
inlet_r | Lower corner of the inlet square. |
inlet_ru | Square U vector. |
inlet_rv | Square V vector. |
inlet_N | Number of particles to be generated in each direction. |
inlet_n | = Velocity direction of the generated particles. |
inlet_U | = Constant inlet velocity magnitude |
inlet_rFS | The point where the pressure is the reference one (0 Pa). |
inlet_R | Accumulated displacement (to be added to the generation point) |
inlet_starving | Is the inlet starving, so we need to feed it? |
__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.
imove | Moving flags.
|
r | Position \( \mathbf{r} \). |
u | Velocity \( \mathbf{u} \). |
dudt | Velocity rate of change \( \frac{d \mathbf{u}}{d t} \). |
drhodt | Density rate of change \( \frac{d \rho}{d t} \). |
N | Number of particles. |
inlet_r | Lower corner of the inlet square. |
inlet_U | Velocity magnitude of the generated particles. |
inlet_n | Velocity direction of the generated particles. |