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

Tool to compute the power energy components. More...

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

Functions

__kernel void fluid (__global float *dekdt, __global float *depdt, __global float *devdt, __global float *decdt, __global float *deddt, const __global uint *iset, const __global int *imove, const __global vec *u, const __global float *rho, const __global float *m, const __global float *p, const __global vec *grad_p, const __global vec *lap_u, const __global float *div_u, const __global float *lap_p, __constant float *refd, __constant float *visc_dyn, __constant float *delta, unsigned int N, vec g, float dt)
 Tool to compute the power components due to the interactions between fluid particles, i.e. excluding the effect of the boundaries.
 
__kernel void bound (__global float *desdt, const __global uint *iset, 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, const __global float *dekdt, const __global float *decdt, unsigned int N)
 Tool to compute the power due to the interactions of fluid particles with the boundaries.
 

Detailed Description

Tool to compute the power energy components.

Function Documentation

◆ bound()

__kernel void bound ( __global float *  desdt,
const __global uint *  iset,
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,
const __global float *  dekdt,
const __global float *  decdt,
unsigned int  N 
)

Tool to compute the power due to the interactions of fluid particles with the boundaries.

Parameters
desdtpower due to the interactions of fluid particles with the boundaries.
isetSet of particles index.
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} \).
dekdtVariation of the kinetic energy due to the interactions between fluid particles: \( \frac{dE^{kin}_a}{dt} = m_a \mathbf{u}_a \cdot \frac{d \mathbf{u}_a}{dt}\)
decdtVariation of the compressibility energy due to the interactions between fluid particles: \( \frac{dE^{com}_a}{dt} = \frac{m_a}{\rho_a} \frac{p_a}{\rho_a} \frac{d \rho_a}{dt} \)
NNumber of particles.

◆ fluid()

__kernel void fluid ( __global float *  dekdt,
__global float *  depdt,
__global float *  devdt,
__global float *  decdt,
__global float *  deddt,
const __global uint *  iset,
const __global int *  imove,
const __global vec u,
const __global float *  rho,
const __global float *  m,
const __global float *  p,
const __global vec grad_p,
const __global vec lap_u,
const __global float *  div_u,
const __global float *  lap_p,
__constant float *  refd,
__constant float *  visc_dyn,
__constant float *  delta,
unsigned int  N,
vec  g,
float  dt 
)

Tool to compute the power components due to the interactions between fluid particles, i.e. excluding the effect of the boundaries.

Parameters
dekdtVariation of the kinetic energy: \( \frac{dE^{kin}_a}{dt} = m_a \mathbf{u}_a \cdot \frac{d \mathbf{u}_a}{dt}\)
depdtVariation of the potential energy: \( \frac{dE^{pot}_a}{dt} = - m_a \mathbf{g} \cdot \mathbf{u}_a\)
devdtViscous dissipation function: \( \frac{dE^{\mu}_a}{dt} = - \mu m_a \mathbf{u}_a \cdot \frac{\Delta \mathbf{u}}{rho} \)
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} \)
deddtEnergy due tot he compressibility dissipated by the \(\delta\)-SPH term: \( \frac{dE^{\delta}_a}{dt} = - \delta \Delta t \frac{m_a}{\rho_0} \frac{p_a}{\rho_a^2} \Delta p \)
isetSet of particles index.
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 \).
grad_pPressure gradient \( \frac{\nabla p}{rho} \).
lap_uVelocity laplacian \( \frac{\Delta \mathbf{u}}{rho} \).
div_uVelocity divergence \( \rho \nabla \cdot \mathbf{u} \).
lap_pPressure laplacian \( \Delta p \).
refdDensity of reference of the fluid \( \rho_0 \).
visc_dynDynamic viscosity \( \mu \).
deltaDiffusive term \( \delta \) multiplier.
NNumber of particles.
gGravity acceleration \( \mathbf{g} \).
dtTime step \( \Delta t \).