atl_calc_time_module Module

This module provides the definition and methods for time step computations.


Uses

Used by

  • module~~atl_calc_time_module~~UsedByGraph module~atl_calc_time_module atl_calc_time_module module~atl_program_module atl_program_module module~atl_program_module->module~atl_calc_time_module program~ateles ateles program~ateles->module~atl_program_module program~atl_harvesting atl_harvesting program~atl_harvesting->module~atl_program_module

Functions

private function calc_common_global_timestep(local_dt, proc) result(dt)

Function to find a single global time step for all levels and processes.

Arguments

Type IntentOptional 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

Return Value real(kind=rk)

Resulting global time step for all processes and levels.


Subroutines

public subroutine atl_get_timestep(tree, mesh_list, scheme_list, material_list, equation, time, statedata_list, nCellsNoBnd, general, adaptive_timestep, initial, precice_dt)

Subrountine which gather all calls to get the timestep for the current iteration

Read more…

Arguments

Type IntentOptional 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.

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.

Read more…

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

private subroutine calc_timestep_heat_cube_1d(cfl, length, dt, equation, nPoly)

Calculate time step based on a given CFL condition for a cube in a flow simulation.

Read more…

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(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.

private subroutine calc_timestep_adv_cube(cfl, length, vel, dt, nPoly)

Calculate time step based on a given CFL number of cubes in a advection simulation.

Read more…

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

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

private subroutine calc_timestep_ed_cube(cfl, length, speedOfLight, dt, nPoly)

Calculate time step based on a given CFL number of cubes in a electrodynamic simulation.

Read more…

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) :: 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

private subroutine calc_timestep_nerplanck_cube(cfl, length, dt, nPoly)

Calculate time step based on a given CFL number of cubes in a Nernst-Planck simulation.

Read more…

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(out) :: dt

Resulting time step width

integer, intent(in) :: nPoly

The number of polynomials per spatial direction

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

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

Read more…

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(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

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.

Read more…

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

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

Calculate time step based on a given CFL condition for a cube in a acoustic simulation.

Read more…

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

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

Calculate time step based on a given CFL condition for a cube in a acoustic simulation.

Read more…

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(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

private subroutine calc_timestep_flow_cube(cfl, length, dt, timestep, nPoly)

Calculate time step based on a given CFL condition for a cube in a flow simulation.

Read more…

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(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

private subroutine calc_timestep_flow_cube_mod(cfl, length, dt, timestep, nPoly)

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(out) :: dt

Resulting time step width

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

Info about the timestep type

integer, intent(in) :: nPoly

private subroutine calc_timestep_flow_cube_2d(cfl, length, dt, timestep, nPoly)

Calculate time step based on a given CFL condition for a cube in a flow simulation.

Read more…

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(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

private subroutine calc_timestep_viscflow_cube(cfl_conv, cfl_visc, length, dt, timestep, nPoly, mu, therm_cond)

Calculate time step based on a given CFL condition for a cube in a viscous flow simulation.

Read more…

Arguments

Type IntentOptional 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

private subroutine calc_timestep_viscflow_cube_2d(cfl_conv, cfl_visc, length, dt, timestep, nPoly, mu, therm_cond)

Calculate time step based on a given CFL condition for a cube in a viscous flow simulation.

Read more…

Arguments

Type IntentOptional 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

private subroutine calc_timestep_flow_cube_1d(cfl, length, dt, timestep, nPoly)

Calculate time step based on a given CFL condition for a cube in a flow simulation.

Read more…

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(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

private subroutine create_global_timestep(dt, nCells, minLevel, maxLevel, proc)

\brief subroutine to create a single global timestep.

Arguments

Type IntentOptional 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