version 0.6.0
Time discretization

Namespaces

module  enum_flux_limiter
 Time order discrezation enumeration.
 
module  enum_refined_velocity_method
 Time order discrezation enumeration.
 
module  enum_time_order_discretization
 Time order discrezation enumeration.
 
module  variables_time_discretization
 Declaration of variables associated to the time discretization.
 

Functions

subroutine mod_compute_time_coefficients::compute_time_coefficients (time_order_discretization, time_step, time_step_n, time_discretization_coef_np1, time_discretization_coef_n, time_discretization_coef_nm1)
 Compute the time coefficients of the temporal scheme of a PDE. More...
 
subroutine compute_time_loop_cfl ()
 Compute time steps that fulfill a multiple of the CFL. More...
 
double precision function mod_compute_time_step_cfl_advection::compute_time_step_cfl_advection (velocity, cfl_coefficient)
 Compute the time step restricted by the CFL Warning: this is called "advection" refering the the mathematical advection equation Thus we look for the maximum velocity in the whole domain. More...
 
double precision function mod_compute_time_step_cfl_advection::compute_cfl_p_step_advection (velocity, time_step_local)
 Compute the time step restricted by the CFL for direction splitted advection Warning: this is called "advection" refering the the mathematical advection equation Thus we look for the maximum velocity in the whole domain. More...
 
double precision function mod_compute_time_step_cfl_advection::compute_cfl_acoustic (speed_of_sound, time_step_local)
 Compute the acoustic CFL. More...
 
double precision function mod_compute_time_step_cfl_advection::compute_time_step_cfl_acoustic (speed_of_sound, cfl_coefficient)
 Compute the time_step related to acoustic CFL. More...
 
double precision function mod_compute_time_step_cfl_advection_surface_tension::compute_time_step_cfl_advection_surface_tension (velocity, density, cfl_coefficient)
 Compute the time step restricted by the CFL Warning: this is called "advection" refering the the mathematical advection equation Thus we look for the maximum velocity plus the maximum capillary velocity (surface tension) in the whole domain. More...
 
double precision function mod_compute_time_step_cfl_advection_surface_tension::compute_time_step_cfl_advection_1d_surface_tension (velocity, density, cfl_coefficient)
 Compute the time step restricted by the CFL Warning: this is called "advection" refering the the mathematical advection equation Thus we look for the maximum velocity in the whole domain. More...
 
subroutine stop_tests ()
 Stops simulation when a stop tests is satisfied. More...
 
subroutine time_extrapolation_fields_material_properties ()
 Switch time dependant variables to next time step. More...
 
subroutine time_step_switch ()
 Switch time dependant variables to next time step. More...
 

Detailed Description

The reader willl find in this directory routines to:

The file variables.f90 contains the declaration of scalar variables associated to time discretization, and enum.f90 the enumarations.

Function Documentation

◆ compute_cfl_acoustic()

double precision function mod_compute_time_step_cfl_advection::compute_cfl_acoustic ( double precision, dimension(:,:,:), intent(in), allocatable  speed_of_sound,
double precision, intent(in)  time_step_local 
)
Parameters
[in]speed_of_soundthe speed_of_sound field
[in]time_step_localcurrent time step
Returns
the time_step

◆ compute_cfl_p_step_advection()

double precision function mod_compute_time_step_cfl_advection::compute_cfl_p_step_advection ( type(t_face_field), intent(in)  velocity,
double precision, intent(in)  time_step_local 
)
Parameters
[in]velocitythe velocity field
[in]time_step_localcurrent time step
Returns
the time_step

◆ compute_time_coefficients()

subroutine mod_compute_time_coefficients::compute_time_coefficients ( integer, intent(in)  time_order_discretization,
double precision, intent(in)  time_step,
double precision, intent(in)  time_step_n,
double precision, intent(out)  time_discretization_coef_np1,
double precision, intent(out)  time_discretization_coef_n,
double precision, intent(out)  time_discretization_coef_nm1 
)

This temporal term is written as follow:

∂φ/∂t ≈ α φⁿ⁺¹ + β φⁿ + γ φⁿ⁻¹

  • 1ˢᵗ order Euler scheme:
      1           -1
    
    α = ----— β = ----— γ = 0 Δtⁿ⁺¹ Δtⁿ⁺¹
  • 2ⁿᵈ order Backward Differentiation Formula:
      2Δtⁿ⁺¹ + Δtⁿ           -(Δtⁿ⁺¹ + Δtⁿ)             Δtⁿ⁺¹
    
    α = ---------------— β = -------------— γ = -------------— Δtⁿ⁺¹(Δtⁿ⁺¹+Δtⁿ) Δtⁿ⁺¹Δtⁿ Δtⁿ(Δtⁿ⁺¹+Δtⁿ)

◆ compute_time_loop_cfl()

subroutine compute_time_loop_cfl

This routine computes the time step that is equal to a multiple of the CFL.

This routine computes phase_advection_time_step, energy_time_step, navier_time_step equal to CFL*cfl_coefficient

◆ compute_time_step_cfl_acoustic()

double precision function mod_compute_time_step_cfl_advection::compute_time_step_cfl_acoustic ( double precision, dimension(:,:,:), intent(in), allocatable  speed_of_sound,
double precision, intent(in)  cfl_coefficient 
)
Parameters
[in]speed_of_soundthe velocity field
[in]cfl_coefficientthe coefficient multiplying the maximum time step
Returns
the time_step

◆ compute_time_step_cfl_advection()

double precision function mod_compute_time_step_cfl_advection::compute_time_step_cfl_advection ( type(t_face_field), intent(in)  velocity,
double precision, intent(in)  cfl_coefficient 
)
Parameters
[in]velocitythe velocity field
[in]cfl_coefficientthe coefficient multiplying the maximum time step
Returns
the time_step

◆ compute_time_step_cfl_advection_1d_surface_tension()

double precision function mod_compute_time_step_cfl_advection_surface_tension::compute_time_step_cfl_advection_1d_surface_tension ( type(t_face_field), intent(in)  velocity,
double precision, dimension(:,:,:), intent(in)  density,
double precision, intent(in)  cfl_coefficient 
)
Parameters
[in]velocitythe velocity field
[in]cfl_coefficientthe coefficient multiplying the maximum time step
Returns
the time_step

◆ compute_time_step_cfl_advection_surface_tension()

double precision function mod_compute_time_step_cfl_advection_surface_tension::compute_time_step_cfl_advection_surface_tension ( type(t_face_field), intent(in)  velocity,
double precision, dimension(:,:,:), intent(in)  density,
double precision, intent(in)  cfl_coefficient 
)
Parameters
[in]velocitythe velocity field
[in]cfl_coefficientthe coefficient multiplying the maximum time step
Returns
the time_step

◆ stop_tests()

subroutine stop_tests

The stop tests are based on:

  • ellapsed time;
  • the stationarity of the velocity, temperature, species concentration, and divergence fields, with respect to a tolerance value.

When all stop tests are satisfied, is_stop_simulation is set to .true. and the simulation is ended.

◆ time_extrapolation_fields_material_properties()

subroutine time_extrapolation_fields_material_properties

This routine switches time dependant variable defined at \(t^{n}\) to their value at \( t^{n+1} \). If second order time is used, switch is done between \(t^{n}\) and \(t^{n-1}\).

◆ time_step_switch()

subroutine time_step_switch

This routine switches time dependant variable defined at \(t^{n}\) to their value at \( t^{n+1} \). If second order time is used, switch is done between \(t^{n}\) and \(t^{n-1}\).