AQUAgpusph 4.1.2
Loading...
Searching...
No Matches
Functions
FluidEnergy.cl File Reference

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

#include "resources/Scripts/types/types.h"
Include dependency graph for FluidEnergy.cl:

Functions

__kernel void entry (__global float *fluid_energy_dekindt, __global float *fluid_energy_depotdt, __global float *fluid_energy_decomdt, 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, unsigned int N, vec g)
 Tool to compute the fluid energy components.
 

Detailed Description

Tool to compute the fluid global energy components.

Function Documentation

◆ entry()

__kernel void entry ( __global float *  fluid_energy_dekindt,
__global float *  fluid_energy_depotdt,
__global float *  fluid_energy_decomdt,
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,
unsigned int  N,
vec  g 
)

Tool to compute the fluid energy components.

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

Parameters
fluid_energy_dekindtVariation of the kinetic energy: \( \frac{dE^{kin}_a}{dt} = m_a \mathbf{u}_a \cdot \frac{d \mathbf{u}_a}{dt}\)
fluid_energy_depotdtVariation of the potential energy: \( \frac{dE^{pot}_a}{dt} = - m_a \mathbf{g} \cdot \mathbf{u}_a\)
fluid_energy_decomdtVariation 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} \).