AQUAgpusph 5.0.4
Loading...
Searching...
No Matches
TimeStep.cl File Reference

Variable time step computation. More...

Include dependency graph for TimeStep.cl:

Functions

__kernel void entry (const __global int *imove, const __global vec *u, __global float *dt_var, const usize N, const float dt, const float dt_min, const float courant, const float dt_Ma, const float h)
 Compute the maximum time step for each particle.

Detailed Description

Variable time step computation.

Function Documentation

◆ entry()

__kernel void entry ( const __global int * imove,
const __global vec * u,
__global float * dt_var,
const usize N,
const float dt,
const float dt_min,
const float courant,
const float dt_Ma,
const float h )

Compute the maximum time step for each particle.

In SPH the time step is selected to enforce the particles may not move more than \( Ma_{\Delta t} h \), where the Courant factor is not taken into account yet.

Along this line, the distance moved by a particle can be written as follows:

\( \vert \mathbf{r}_{n+1} - \mathbf{r}_{n} \vert = \vert \mathbf{u} \vert \Delta t + \mathcal{O}({\Delta t}^2) \)

Such that rearraging the equation:

\( \Delta t = Ma \frac{h}{\vert \mathbf{u} \vert} \)

Parameters
imoveMoving flags.
  • imove > 0 for regular fluid particles.
  • imove = 0 for sensors.
  • imove < 0 for boundary elements/particles.
uVelocity \( \mathbf{u}_{n+1/2} \).
dt_varVariable time step \( \mathrm{min} \left( C_f \frac{h}{c_s}, C_f \frac{h}{10 \vert \mathbf{u} \vert}\right)\).
dt_MaThe maximum Mach number, \( Ma_{\Delta t} \)
dtFixed time step \( \Delta t = C_f \frac{h}{c_s} \).
dt_minMinimum time step \( \Delta t_{\mathrm{min}} \).
courantCourant factor \( C_{\Delta t} \).
hKernel characteristic length \( h \).
MaMach number \( Ma \).
NNumber of particles.