calculate_cfl_timestep Subroutine

private subroutine calculate_cfl_timestep(length, cfl, cfl_visc, equation, dt, timestep, scheme, material, localtime)

Calculate the timestep for a whole part of a cubic mesh by a CFL condition.

This routine takes the primitive variables of the equation system and calculates the timestep size for the explicit time integration. The calculation is based on the cfl condition and the next restart timepoints.

Arguments

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

The length of the cubes you are calculating the cfl condition for.

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

The CFL factor to apply (for the convective part of the equation).

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

The CFL factor to apply (for the viscous part of the equation).

type(atl_Equations_type), intent(inout) :: equation

The equation system to be used in the simulation.

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

Resulting timestep.

type(atl_timestep_type), intent(in) :: timestep

Timestep information

type(atl_scheme_type), intent(in) :: scheme

Info about the scheme.

type(atl_material_type), intent(in) :: material

Material information for all elements on the current level

type(tem_time_type), intent(in) :: localtime

Local time, required for update of temporal background in linear Euler