AQUAgpusph 5.0.4
Loading...
Searching...
No Matches
Preset to model ideal gases

A preset to model ideal gases within Cfd preset. More...

Files

file  EOS.cl
 Equation Of State (EOS) for ideal gases.
file  Rates.cl
 Internal energy variation rates computation.
file  Sort.cl
 Sort the internal energy by the cell indexes.
file  euler.cl
 1st order Euler integration scheme for the internal energy.
file  improved_euler.cl
 Improved Euler integration scheme for the internal energy.
file  midpoint.cl
 Semi-implicit Midpoint Euler time integration scheme for the internal energy.

Macros

#define EXCLUDED_PARTICLE(index)

Functions

__kernel void entry (const __global unsigned int *iset, const __global int *imove, const __global float *rho, const __global float *eint, __global float *p, __constant float *gamma, usize N)
 Ideal gas Equation Of State (EOS) computation.
__kernel void entry (const __global uint *iset, const __global int *imove, const __global float *rho, const __global float *p, const __global float *div_u, __global float *deintdt, const usize N)
 Internal energy variation rates computation.
__kernel void entry (const __global float *eint_in, __global float *eint, const __global float *deintdt, __global float *deintdt_in, const __global usize *id_sorted, usize N)
 Sort the internal energy.
__kernel void predictor (const __global float *eint, const __global float *deintdt, __global float *eint_in, __global float *deintdt_in, const usize N)
 1st order Euler time integration scheme predictor stage
__kernel void corrector (const __global int *imove, __global float *eint, const __global float *deintdt, const unsigned int N, const float dt)
 1st order Euler time integration scheme corrector stage
__kernel void predictor (__global int *imove, const __global float *eint, const __global float *deintdt, __global float *eint_in, __global float *deintdt_in, usize N, float dt)
 Improved Euler time integration scheme predictor stage.
__kernel void corrector (const __global int *imove, const __global float *deintdt, const __global float *deintdt_in, __global float *eint, usize N, float dt)
 Improved Euler time integration scheme corrector stage.
__kernel void midpoint (const __global int *imove, const __global float *eint_in, const __global float *deintdt, __global float *eint, usize N, float dt)
 Advance to the time step midpoint.
__kernel void relax (const __global int *imove, const __global float *deintdt_in, __global float *deintdt, usize N, float relax_midpoint)
 Relax the obtained output to avoid diverging inner iterator.

Detailed Description

A preset to model ideal gases within Cfd preset.

Macro Definition Documentation

◆ EXCLUDED_PARTICLE

#define EXCLUDED_PARTICLE ( index)
Value:
(imove[index] <= 0) && (imove[index] != -1)

Function Documentation

◆ corrector() [1/2]

__kernel void corrector ( const __global int * imove,
__global float * eint,
const __global float * deintdt,
const unsigned int N,
const float dt )

1st order Euler time integration scheme corrector stage

Parameters
imoveMoving flags.
  • imove > 0 for regular fluid particles.
  • imove = 0 for sensors.
  • imove < 0 for boundary elements/particles.
eintInternal energy \( \e_{n+1/2} \).
deintdtInternal energy rate of change \( \left. \frac{d e}{d t} \right\vert_{n+1/2} \).
NNumber of particles.
dtTime step \( \Delta t \).

◆ corrector() [2/2]

__kernel void corrector ( const __global int * imove,
const __global float * eint_in,
const __global float * deintdt,
__global float * eint,
usize N,
float dt )

Improved Euler time integration scheme corrector stage.

1st order Semi-implicit Euler time integration scheme corrector stage

Parameters
imoveMoving flags.
  • imove > 0 for regular fluid particles.
  • imove = 0 for sensors.
  • imove < 0 for boundary elements/particles.
deintdtInternal energy rate of change \( \left. \frac{d e}{d t} \right\vert_{n+1/2} \).
deintdt_inInternal energy rate of change \( \left. \frac{d e}{d t} \right\vert_{n} \).
eintInternal energy \( \e_{n+1/2} \).
NNumber of particles.
dtTime step \( \Delta t \).
imoveMoving flags.
  • imove > 0 for regular fluid particles.
  • imove = 0 for sensors.
  • imove < 0 for boundary elements/particles.
eint_inInternal energy \( e_{n+1/2} \).
deintdtInternal energy rate of change \( \left. \frac{d e}{d t} \right\vert_{n+1/2} \).
eintInternal energy \( \e_{n+1} \).
NNumber of particles.
dtTime step \( \Delta t \).

◆ entry() [1/3]

__kernel void entry ( const __global float * eint_in,
__global float * eint,
const __global float * deintdt,
__global float * deintdt_in,
const __global usize * id_sorted,
usize N )

Sort the internal energy.

Parameters
eint_inUnsorted internal energy \( e \).
eintSorted internal energy \( e \).
deintdtUnsorted internal energy rate of change \( \frac{d e}{d t} \).
deintdt_inSorted internal energy rate of change \( \frac{d e}{d t} \).
id_sortedPermutations list from the unsorted space to the sorted one.
NNumber of particles.

◆ entry() [2/3]

__kernel void entry ( const __global uint * iset,
const __global int * imove,
const __global float * rho,
const __global float * p,
const __global float * div_u,
__global float * deintdt,
const usize N )

Internal energy variation rates computation.

The internal energy equation is applied from the already computed differential operators:

  • \( \frac{\mathrm{d} \e}{\mathrm{d} t} = - \frac{p}{\rho} \nabla \cdot \mathbf{u} \)
Parameters
isetSet of particles index.
imoveMoving flags.
  • imove > 0 for regular fluid particles.
  • imove = 0 for sensors.
  • imove < 0 for boundary elements/particles.
rhoDensity \( \rho_{n+1} \).
pPressure \( p_{n+1/2} \).
div_uVelocity divergence \( \rho \nabla \cdot \mathbf{u} \).
deintdtInternal energy rate of change \( \left. \frac{d e}{d t} \right\vert_{n+1} \).
NNumber of particles.

◆ entry() [3/3]

__kernel void entry ( const __global unsigned int * iset,
const __global int * imove,
const __global float * rho,
const __global float * eint,
__global float * p,
__constant float * gamma,
usize N )

Ideal gas Equation Of State (EOS) computation.

The equation of state relates the pressure, density and internal energy fields, \( p = \rho \left( \gamma - 1 \right) e \)

Parameters
isetSet of particles index.
imoveMoving flags.
  • imove > 0 for regular fluid particles.
  • imove = 0 for sensors.
  • imove < 0 for boundary elements/particles.
rhoDensity \( \rho_{n+1/2} \).
eintInternal energy \( e_{n+1/2} \).
pPressure \( p_{n+1/2} \).
gammaHeat capacity ratio \( \gamma \).
NNumber of particles.
Here is the call graph for this function:

◆ midpoint()

__kernel void midpoint ( const __global int * imove,
const __global float * eint_in,
const __global float * deintdt,
__global float * eint,
usize N,
float dt )

Advance to the time step midpoint.

Parameters
imoveMoving flags.
  • imove > 0 for regular fluid particles.
  • imove = 0 for sensors.
  • imove < 0 for boundary elements/particles.
eint_inInternal energy \( e_{n+1/2} \).
deintdtInternal energy rate of change \( \left. \frac{d e}{d t} \right\vert_{n+1/2} \).
eintInternal energy \( \e_{n} \).
NNumber of particles.
dtTime step \( \Delta t \).

◆ predictor() [1/2]

__kernel void predictor ( __global int * imove,
const __global float * eint,
const __global float * deintdt,
__global float * eint_in,
__global float * deintdt_in,
usize N,
float dt )

Improved Euler time integration scheme predictor stage.

Parameters
imoveMoving flags.
  • imove > 0 for regular fluid/solid particles.
  • imove = 0 for sensors.
  • imove < 0 for boundary elements/particles.
eintInternal energy \( \e_{n+1/2} \).
deintdtInternal energy rate of change \( \left. \frac{d e}{d t} \right\vert_{n+1/2} \).
eint_inInternal energy \( e_{n+1} \).
deintdt_inInternal energy rate of change \( \left. \frac{d e}{d t} \right\vert_{n+1} \).
NNumber of particles.
dtTime step \( \Delta t \).

◆ predictor() [2/2]

__kernel void predictor ( const __global float * eint,
const __global float * deintdt,
__global float * eint_in,
__global float * deintdt_in,
const usize N )

1st order Euler time integration scheme predictor stage

Semi-implicit Midpoint Euler time integration scheme predictor stage.

Parameters
eintInternal energy \( \e_{n+1/2} \).
deintdtInternal energy rate of change \( \left. \frac{d e}{d t} \right\vert_{n+1/2} \).
eint_inInternal energy \( e_{n+1} \).
deintdt_inInternal energy rate of change \( \left. \frac{d e}{d t} \right\vert_{n+1} \).
NNumber of particles.
imoveMoving flags.
  • imove > 0 for regular fluid/solid particles.
  • imove = 0 for sensors.
  • imove < 0 for boundary elements/particles.
eintInternal energy \( \e_{n} \).
deintdtInternal energy rate of change \( \left. \frac{d e}{d t} \right\vert_{n} \).
eint_inInternal energy \( e_{n} \).
deintdt_inInternal energy rate of change \( \left. \frac{d e}{d t} \right\vert_{n+1/2} \).
NNumber of particles.

◆ relax()

__kernel void relax ( const __global int * imove,
const __global float * deintdt_in,
__global float * deintdt,
usize N,
float relax_midpoint )

Relax the obtained output to avoid diverging inner iterator.

Parameters
imoveMoving flags.
  • imove > 0 for regular fluid particles.
  • imove = 0 for sensors.
  • imove < 0 for boundary elements/particles.
deintdt_inInternal energy rate of change \( \left. \frac{d e}{d t} \right\vert_{n+1/2} \).
deintdtInternal energy rate of change \( \left. \frac{d e}{d t} \right\vert_{n+1/2} \).
NNumber of particles.
dtTime step \( \Delta t \).