calc_timestep_linearEuler_2d_cube Subroutine

private subroutine calc_timestep_linearEuler_2d_cube(cfl, length, vel, SpeedofSound, dt, nPoly)

Calculate time step based on a given CFL condition for a cube in a linear Euler 2d simulation.

This subroutine calculates the timstep according to the CFL condition. Please notice, that this routine can be applied for linear Euler 2d simulations only.

Arguments

Type IntentOptional Attributes Name
real(kind=rk), intent(in) :: cfl

CFL number

real(kind=rk), intent(in) :: length

Reference length of all elements

real(kind=rk), intent(in) :: vel(2)

Background velocity in the domain (x,y,z)

real(kind=rk), intent(in) :: SpeedofSound

Speed of sound, based on background density and pressure

real(kind=rk), intent(out) :: dt

Resulting time step width

integer, intent(in) :: nPoly

The number of polynomials per spatial direction