This module provides the definition and methods for time step computations.
Function to find a single global time step for all levels and processes.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(inout), | allocatable | :: | local_dt(:) |
Process local time steps on each level. |
|
type(tem_comm_env_type), | intent(in) | :: | proc |
mpi communication enviroment with mpi communicator |
Resulting global time step for all processes and levels.
Subrountine which gather all calls to get the timestep for the current iteration
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(treelmesh_type), | intent(in) | :: | tree |
The treelmesh data structure |
||
type(atl_cube_elem_type), | intent(in) | :: | mesh_list(tree%global%minLevel:tree%global%maxLevel) |
List of meshes for different kernels |
||
type(atl_scheme_type), | intent(inout) | :: | scheme_list(tree%global%minLevel:tree%global%maxLevel) |
scheme desription |
||
type(atl_material_type), | intent(in) | :: | material_list(tree%global%minLevel:tree%global%maxLevel) |
List of material parameter information for the mesh. One entry for level, running from minlevel to maxlevel. |
||
type(atl_Equations_type), | intent(inout) | :: | equation | |||
type(atl_global_timestep_type), | intent(in) | :: | time |
Global timediscretization type |
||
type(atl_statedata_type), | intent(in) | :: | statedata_list(tree%global%minLevel:tree%global%maxLevel) |
Local time |
||
integer, | intent(in) | :: | nCellsNoBnd(:) | |||
type(tem_general_type), | intent(in) | :: | general |
general data coming from treelem |
||
logical, | intent(in) | :: | adaptive_timestep |
Flag for adaptive timestep calculation |
||
logical, | intent(in) | :: | initial |
Flag for timestep calculation because it is the init step |
||
real(kind=rk), | intent(out), | optional | :: | precice_dt |
Timestep specified from precice. If this value is present, precice is considered active. |
Calculate the timestep for a whole part of a cubic mesh by a CFL condition.
Type | Intent | Optional | 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 |
Calculate time step based on a given CFL condition for a cube in a flow simulation.
Type | Intent | Optional | 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(out) | :: | dt |
Resulting time step width |
||
type(atl_Equations_type), | intent(in) | :: | equation | |||
integer, | intent(in) | :: | nPoly |
The number of polynomials per spatial direction The equation system to be used in the simulation. |
Calculate time step based on a given CFL number of cubes in a advection simulation.
Type | Intent | Optional | 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 |
Upper bound of the advection velocity |
||
real(kind=rk), | intent(out) | :: | dt |
Resulting time step width |
||
integer, | intent(in) | :: | nPoly |
The number of polynomials per spatial direction |
Calculate time step based on a given CFL number of cubes in a electrodynamic simulation.
Type | Intent | Optional | 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) | :: | speedOfLight |
Speed of light |
||
real(kind=rk), | intent(out) | :: | dt |
Resulting time step width |
||
integer, | intent(in) | :: | nPoly |
The number of polynomials per spatial direction |
Calculate time step based on a given CFL number of cubes in a Nernst-Planck simulation.
Type | Intent | Optional | 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(out) | :: | dt |
Resulting time step width |
||
integer, | intent(in) | :: | nPoly |
The number of polynomials per spatial direction |
Calculate time step based on a given CFL condition for a cube in a linear Euler simulation.
Type | Intent | Optional | 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(3) |
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 |
Calculate time step based on a given CFL condition for a cube in a linear Euler 2d simulation.
Type | Intent | Optional | 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 |
Calculate time step based on a given CFL condition for a cube in a acoustic simulation.
Type | Intent | Optional | 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 |
Calculate time step based on a given CFL condition for a cube in a acoustic simulation.
Type | Intent | Optional | 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(3) |
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 |
Calculate time step based on a given CFL condition for a cube in a flow simulation.
Type | Intent | Optional | 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(out) | :: | dt |
Resulting time step width |
||
type(atl_timestep_type), | intent(in) | :: | timestep |
Info about the timestep type |
||
integer, | intent(in) | :: | nPoly |
The number of polynomials per spatial direction |
Type | Intent | Optional | 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(out) | :: | dt |
Resulting time step width |
||
type(atl_timestep_type), | intent(in) | :: | timestep |
Info about the timestep type |
||
integer, | intent(in) | :: | nPoly |
Calculate time step based on a given CFL condition for a cube in a flow simulation.
Type | Intent | Optional | 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(out) | :: | dt |
Resulting time step width |
||
type(atl_timestep_type), | intent(in) | :: | timestep |
Info about the timestep type |
||
integer, | intent(in) | :: | nPoly |
The number of polynomials per spatial direction |
Calculate time step based on a given CFL condition for a cube in a viscous flow simulation.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(in) | :: | cfl_conv |
CFL number for the convective part |
||
real(kind=rk), | intent(in) | :: | cfl_visc |
CFL number for the viscous part |
||
real(kind=rk), | intent(in) | :: | length |
Reference length of all elements |
||
real(kind=rk), | intent(out) | :: | dt |
Resulting time step width |
||
type(atl_timestep_type), | intent(in) | :: | timestep |
Info about the timestep type |
||
integer, | intent(in) | :: | nPoly |
The number of polynomials per spatial direction |
||
real(kind=rk), | intent(in) | :: | mu |
The dynamic viscosity |
||
real(kind=rk), | intent(in) | :: | therm_cond |
The thermal conductivity |
Calculate time step based on a given CFL condition for a cube in a viscous flow simulation.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(in) | :: | cfl_conv |
CFL number for the convective part |
||
real(kind=rk), | intent(in) | :: | cfl_visc |
CFL number for the viscous part |
||
real(kind=rk), | intent(in) | :: | length |
Reference length of all elements |
||
real(kind=rk), | intent(out) | :: | dt |
Resulting time step width |
||
type(atl_timestep_type), | intent(in) | :: | timestep |
Info about the timestep type |
||
integer, | intent(in) | :: | nPoly |
The number of polynomials per spatial direction |
||
real(kind=rk), | intent(in) | :: | mu |
The dynamic viscosity |
||
real(kind=rk), | intent(in) | :: | therm_cond |
Calculate time step based on a given CFL condition for a cube in a flow simulation.
Type | Intent | Optional | 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(out) | :: | dt |
Resulting time step width |
||
type(atl_timestep_type), | intent(in) | :: | timestep |
Info about the timestep type |
||
integer, | intent(in) | :: | nPoly |
The number of polynomials per spatial direction |
\brief subroutine to create a single global timestep.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(inout) | :: | dt(minLevel:maxLevel) |
The delta t on the levels of your mesh. This will be update with the new global, local timestep. |
||
integer, | intent(in) | :: | nCells(minLevel:maxLevel) |
The number of cells on the different levels. |
||
integer, | intent(in) | :: | minLevel |
The minimum level of your mesh. |
||
integer, | intent(in) | :: | maxLevel |
The maximum level of your mesh. |
||
type(tem_comm_env_type), | intent(in) | :: | proc |
mpi communication enviroment with mpi communicator |