Provides a tool to set time step dt.
More...
|
| procedure, pass(this) | init (this, params) |
| | Initialize object.
|
| procedure, pass(this) | set_dt (this, time, cfl) |
| | Set time stepping.
|
| procedure, pass(this) | first_dt (this, time, cfl) |
| | The first time step of a variable time step run.
|
| procedure, pass(this) | land (this, time, time_to_next) |
| | Fit the time step to land on the next scheduled time.
|
Definition at line 57 of file time_step_controller.f90.
◆ first_dt()
| procedure, pass(this) time_step_controller::time_step_controller_t::first_dt |
( |
class(time_step_controller_t), intent(in) | this, |
|
|
type(time_state_t), intent(in) | time, |
|
|
real(kind=dp), intent(in) | cfl ) |
- Parameters
-
| time | The time state, whose dt is the step the CFL number was computed with. |
| cfl | The CFL number of that step. |
Definition at line 84 of file time_step_controller.f90.
◆ init()
| procedure, pass(this) time_step_controller::time_step_controller_t::init |
( |
class(time_step_controller_t), intent(inout) | this, |
|
|
type(json_file), intent(inout) | params ) |
◆ land()
| procedure, pass(this) time_step_controller::time_step_controller_t::land |
( |
class(time_step_controller_t), intent(inout) | this, |
|
|
type(time_state_t), intent(inout) | time, |
|
|
real(kind=dp), intent(in) | time_to_next ) |
- Parameters
-
| time | The time state, whose dt is the step proposed by the CFL controller, adjusted in place. |
| time_to_next | The time until the next scheduled time, as time_to_next of the controllers gives it, huge(0.0_dp) if none. |
To be called right after set_dt. The time up to the next target is divided into the number of equal steps nearest, in ratio, to the proposed step, within min_dt_decrease_factor and max_dt_increase_factor of the previous step and below max_timestep. As long as the CFL controller keeps the step and the step divides the remaining time, which it does between scheduled times and at those of equal intervals, the step is returned unchanged. The end is the target if the next scheduled time is within min_dt_decrease_factor times the previous step of it, and that scheduled time is executed at the end. A scheduled time closer than that is passed, and executed at the first step past it.
Designed for output intervals of several steps, the same for all controllers or whole multiples of each other. Schedules that produce scheduled times close to each other make the step shorter than needed.
Definition at line 86 of file time_step_controller.f90.
◆ set_dt()
| procedure, pass(this) time_step_controller::time_step_controller_t::set_dt |
( |
class(time_step_controller_t), intent(inout) | this, |
|
|
type(time_state_t), intent(inout) | time, |
|
|
real(kind=dp), intent(in) | cfl ) |
- Parameters
-
| time | The time state, whose dt is the step taken last on entry and the step about to be taken on exit. |
| cfl | courant number of current iteration. @Algorithm:
- Set the first time step such that cfl is the set one;
- During time-stepping, adjust dt when cfl_avg is offset by 20%.
- An exact zero cfl, e.g. from a zero velocity field, puts no limit on dt, so the first time step is the initial one and a later one is increased by the maximum increase factor. With exact_output_time the step is then fitted to the next scheduled time by land, which is to be called right after.
|
Definition at line 82 of file time_step_controller.f90.
◆ alpha
| real(kind=dp) time_step_controller::time_step_controller_t::alpha = 0.0_dp |
◆ cfl_avg
| real(kind=dp) time_step_controller::time_step_controller_t::cfl_avg = 0.0_dp |
◆ cfl_trg
| real(kind=dp) time_step_controller::time_step_controller_t::cfl_trg = 0.0_dp |
◆ dev_tol
| real(kind=dp) time_step_controller::time_step_controller_t::dev_tol = 0.0_dp |
◆ dt_last_change
| integer time_step_controller::time_step_controller_t::dt_last_change = -1 |
◆ dt_previous
| real(kind=dp) time_step_controller::time_step_controller_t::dt_previous = 0.0_dp |
◆ exact_output_time
| logical time_step_controller::time_step_controller_t::exact_output_time = .false. |
◆ init_dt
| real(kind=dp) time_step_controller::time_step_controller_t::init_dt = huge(0.0_dp) |
◆ is_variable_dt
| logical time_step_controller::time_step_controller_t::is_variable_dt = .false. |
◆ max_dt
| real(kind=dp) time_step_controller::time_step_controller_t::max_dt = 0.0_dp |
◆ max_dt_increase_factor
| real(kind=dp) time_step_controller::time_step_controller_t::max_dt_increase_factor = 0.0_dp |
◆ max_update_frequency
| integer time_step_controller::time_step_controller_t::max_update_frequency = 0 |
◆ min_dt
| real(kind=dp) time_step_controller::time_step_controller_t::min_dt = 0.0_dp |
◆ min_dt_decrease_factor
| real(kind=dp) time_step_controller::time_step_controller_t::min_dt_decrease_factor = 0.0_dp |
◆ min_update_frequency
| integer time_step_controller::time_step_controller_t::min_update_frequency = 0 |
The documentation for this type was generated from the following file: