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

Tool to compute the fluid global energy components. More...

Include dependency graph for Energy.cl:

Functions

__kernel void power (__global float *energy_dekdt, __global float *energy_depdt, __global float *energy_decdt, const __global int *imove, const __global vec *u, const __global float *rho, const __global float *m, const __global float *p, const __global vec *dudt, const __global float *drhodt, usize N, vec g)
 Tool to compute the fluid energy variation rate components.
__kernel void energy (__global float *energy_ek, __global float *energy_ep, __global float *energy_ec, const __global uint *iset, const __global int *imove, const __global vec *r, const __global vec *u, const __global float *rho, const __global float *m, __constant float *refd, usize N, vec g, float cs)
 Tool to compute the fluid energy components.

Detailed Description

Tool to compute the fluid global energy components.

Function Documentation

◆ energy()

__kernel void energy ( __global float * energy_ek,
__global float * energy_ep,
__global float * energy_ec,
const __global uint * iset,
const __global int * imove,
const __global vec * r,
const __global vec * u,
const __global float * rho,
const __global float * m,
__constant float * refd,
usize N,
vec g,
float cs )

Tool to compute the fluid energy components.

Actually, in this kernel the energy componets are computed per particle.

Parameters
energy_ekKinetic energy: \( E^{kin}_a = \frac{1}{2} m_a \vert \mathbf{u}_a \vert^2\)
energy_epPotential energy: \( E^{pot}_a = - m_a \mathbf{g} \cdot \mathbf{r}_a\)
energy_ecCompressibility energy: \( E^{com}_a = m_a c_0^2 \left( \frac{\rho_0}{\rho_a} + \log(\rho_a) \right) \)
isetSet of particles index.
imoveMoving flags.
  • imove > 0 for regular fluid particles.
  • imove = 0 for sensors.
  • imove < 0 for boundary elements/particles.
rPosition \( \mathbf{r} \).
uVelocity \( \mathbf{u} \).
rhoDensity \( \rho \).
mMass \( m \).
NNumber of particles.
gGravity acceleration \( \mathbf{g} \).
csSpeed of sound \( c_s \).

◆ power()

__kernel void power ( __global float * energy_dekdt,
__global float * energy_depdt,
__global float * energy_decdt,
const __global int * imove,
const __global vec * u,
const __global float * rho,
const __global float * m,
const __global float * p,
const __global vec * dudt,
const __global float * drhodt,
usize N,
vec g )

Tool to compute the fluid energy variation rate components.

Actually, in this kernel the energy componets variation are computed per particle.

Parameters
energy_dekdtVariation of the kinetic energy: \( \frac{dE^{kin}_a}{dt} = m_a \mathbf{u}_a \cdot \frac{d \mathbf{u}_a}{dt}\)
energy_depdtVariation of the potential energy: \( \frac{dE^{pot}_a}{dt} = - m_a \mathbf{g} \cdot \mathbf{u}_a\)
energy_decdtVariation of the compressibility energy: \( \frac{dE^{com}_a}{dt} = \frac{m_a}{\rho_a} \frac{p_a}{\rho_a} \frac{d \rho_a}{dt} \)
imoveMoving flags.
  • imove > 0 for regular fluid particles.
  • imove = 0 for sensors.
  • imove < 0 for boundary elements/particles.
uVelocity \( \mathbf{u} \).
rhoDensity \( \rho \).
mMass \( m \).
pPressure \( p \).
dudtVelocity rate of change \( \frac{d \mathbf{u}}{d t} \).
drhodtDensity rate of change \( \frac{d \rho}{d t} \).
NNumber of particles.
gGravity acceleration \( \mathbf{g} \).