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

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

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

Functions

__kernel void entry (__global float *energy_dekindt, __global float *energy_depotdt, __global float *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 *  energy_dekindt,
__global float *  energy_depotdt,
__global float *  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
energy_dekindtVariation of the kinetic energy: \( \frac{dE^{kin}_a}{dt} = m_a \mathbf{u}_a \cdot \frac{d \mathbf{u}_a}{dt}\)
energy_depotdtVariation of the potential energy: \( \frac{dE^{pot}_a}{dt} = - m_a \mathbf{g} \cdot \mathbf{u}_a\)
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} \).