AQUAgpusph 5.0.4
|
Tool to compute the fluid global energy components. More...
#include "resources/Scripts/types/types.h"
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. |
Tool to compute the fluid global energy 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.
Actually, in this kernel the energy componets are computed per particle.
energy_ek | Kinetic energy: \( E^{kin}_a = \frac{1}{2} m_a \vert \mathbf{u}_a \vert^2\) |
energy_ep | Potential energy: \( E^{pot}_a = - m_a \mathbf{g} \cdot \mathbf{r}_a\) |
energy_ec | Compressibility energy: \( E^{com}_a = m_a c_0^2 \left( \frac{\rho_0}{\rho_a} + \log(\rho_a) \right) \) |
iset | Set of particles index. |
imove | Moving flags.
|
r | Position \( \mathbf{r} \). |
u | Velocity \( \mathbf{u} \). |
rho | Density \( \rho \). |
m | Mass \( m \). |
N | Number of particles. |
g | Gravity acceleration \( \mathbf{g} \). |
cs | Speed of sound \( c_s \). |
__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.
energy_dekdt | Variation of the kinetic energy: \( \frac{dE^{kin}_a}{dt} = m_a \mathbf{u}_a \cdot \frac{d \mathbf{u}_a}{dt}\) |
energy_depdt | Variation of the potential energy: \( \frac{dE^{pot}_a}{dt} = - m_a \mathbf{g} \cdot \mathbf{u}_a\) |
energy_decdt | Variation of the compressibility energy: \( \frac{dE^{com}_a}{dt} = \frac{m_a}{\rho_a} \frac{p_a}{\rho_a} \frac{d \rho_a}{dt} \) |
imove | Moving flags.
|
u | Velocity \( \mathbf{u} \). |
rho | Density \( \rho \). |
m | Mass \( m \). |
p | Pressure \( p \). |
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. |
g | Gravity acceleration \( \mathbf{g} \). |