SimTime Class Reference
|
AMR-Wind API v0.1.0
CFD solver for wind plant simulations
|
#include <SimTime.H>
Public Member Functions | |
| SimTime ()=default | |
| ~SimTime ()=default | |
| bool | new_timestep () |
| bool | continue_simulation () const |
| bool | do_regrid () const |
| bool | write_plot_file () const |
| bool | write_checkpoint () const |
| bool | write_last_plot_file () const |
| bool | write_last_checkpoint () const |
| void | set_current_cfl (const amrex::Real conv_cfl, const amrex::Real diff_cfl, const amrex::Real src_cfl) |
| void | advance_time () |
| void | set_restart_time (int tidx, amrex::Real time) |
| AMREX_FORCE_INLINE amrex::Real | delta_t () const |
| AMREX_FORCE_INLINE amrex::Real & | delta_t () |
| AMREX_FORCE_INLINE amrex::Real | delta_t_nm1 () const |
| AMREX_FORCE_INLINE amrex::Real | delta_t_nm2 () const |
| AMREX_FORCE_INLINE amrex::Real & | delta_t_nm1 () |
| AMREX_FORCE_INLINE amrex::Real & | delta_t_nm2 () |
| AMREX_FORCE_INLINE amrex::Real | current_time () const |
| AMREX_FORCE_INLINE amrex::Real & | current_time () |
| AMREX_FORCE_INLINE amrex::Real | new_time () const |
| AMREX_FORCE_INLINE amrex::Real | max_cfl () const |
| AMREX_FORCE_INLINE amrex::Real | get_minimum_enforce_dt_abs_tol () const |
| AMREX_FORCE_INLINE int | time_index () const |
| AMREX_FORCE_INLINE int & | time_index () |
| AMREX_FORCE_INLINE bool | adaptive_timestep () const |
| AMREX_FORCE_INLINE bool | use_force_cfl () const |
| AMREX_FORCE_INLINE int | regrid_interval () const |
| AMREX_FORCE_INLINE amrex::Real | start_time () const |
| AMREX_FORCE_INLINE amrex::Real | stop_time () const |
| AMREX_FORCE_INLINE int | start_time_index () const |
| AMREX_FORCE_INLINE int | stop_time_index () const |
| AMREX_FORCE_INLINE int | chkpt_interval () const |
| void | parse_parameters () |
| Read user defined options from input file. | |
| void | add_postproc_dt_parameters (const bool enforce_dt_flag, const amrex::Real enforce_dt_tol, const amrex::Real time_interval, const amrex::Real time_delay) |
| Get timestep considerations from postprocessing instances. | |
| void | calculate_minimum_enforce_dt_abs_tol () |
| Calculate minimum enforce dt tolerance based on all considerations. | |
| void | override_simulation_end_parameters () |
| Deactivate ending parameters (overset should be externally controlled) | |
| bool | output_profiling_info () const |
Static Public Attributes | |
| static constexpr int | max_time_states = 3 |
Private Attributes | |
| amrex::Vector< amrex::Real > | m_dt |
| Timestep sizes. | |
| amrex::Real | m_cur_time {0.0} |
| Current simulation time. | |
| amrex::Real | m_new_time {0.0} |
| Time where a new timestep will advance to. | |
| amrex::Real | m_start_time {0.0} |
| Starting simulation time (to track restart) | |
| amrex::Real | m_stop_time {-1.0} |
| Max time for simulation. | |
| amrex::Real | m_delay_time {-1.0} |
| Delayed adaptive stepping. | |
| amrex::Real | m_max_cfl {1.0} |
| Maximum CFL constraint. | |
| amrex::Real | m_fixed_dt {-1.0} |
| Fixed delta_t indicated by user. | |
| amrex::Real | m_initial_dt {-1.0} |
| Initial delta_t indicated by user. | |
| amrex::Real | m_max_dt {-1.0} |
| Maximum delta_t indicated by user. | |
| amrex::Real | m_min_dt {-1.0} |
| Minimum delta_t indicated by user. | |
| amrex::Real | m_current_cfl {0.0} |
| Current CFL. | |
| amrex::Real | m_conv_cfl {0.0} |
| Current CFL categories. | |
| amrex::Real | m_diff_cfl {0.0} |
| amrex::Real | m_src_cfl {0.0} |
| amrex::Real | m_dt_calc {0.0} |
| delta_t calculated using CFL constraint | |
| amrex::Real | m_init_shrink {0.1} |
| Initial reduction in timestep size for startup. | |
| amrex::Real | m_dt_growth {0.1} |
| Maximum growth of dt between timesteps. | |
| amrex::Real | m_chkpt_t_interval {-1.0} |
| Time interval for writing checkpoint/restart files. | |
| amrex::Real | m_chkpt_t_delay {0.0} |
| Time delay for checkpoint/restart output. | |
| amrex::Real | m_chkpt_t_tol {1e-8} |
| Relative (to dt) tolerance for checkpoint time interval output. | |
| amrex::Real | m_force_chkpt_tol {1e-3} |
| Relative (to chkpt_t_interval) tolerance for enforcing dt. | |
| amrex::Real | m_plt_t_interval {-1.0} |
| Time interval for plot file output. | |
| amrex::Real | m_plt_t_delay {0.0} |
| Time delay for plot file output. | |
| amrex::Real | m_plt_t_tol {1e-8} |
| Relative (to dt) tolerance for plot time interval output. | |
| amrex::Real | m_force_plt_tol {1e-3} |
| Relative (to plt_t_interval) tolerance for enforcing dt. | |
| amrex::Real | m_force_dt_abs_tol {1e8} |
| Smallest absolute tolerance for enforcing dt, considering all. | |
| int | m_time_index {0} |
| Counter for the number of timesteps since start of simulation. | |
| int | m_start_time_index {0} |
| Initial starting time index. | |
| int | m_chkpt_start_index {0} |
| Initial starting time index for generating checkpoint files. | |
| int | m_plt_start_index {0} |
| Initial starting time index for generating output files. | |
| int | m_regrid_start_index {0} |
| Initial starting time index for regriding. | |
| int | m_stop_time_index {-1} |
| Maximum timesteps for simulation. | |
| int | m_chkpt_interval {-1} |
| Time step interval for writing checkpoint/restart files. | |
| int | m_chkpt_delay {0} |
| Time step delay for checkpoint/restart output (this means that output only happens after the delay) | |
| int | m_plt_interval {-1} |
| Time step interval for plot file output. | |
| int | m_plt_delay {0} |
| Time step delay for plot file output. | |
| int | m_regrid_interval {-1} |
| Time interval for regridding. | |
| int | m_profiling_interval {-1} |
| Time step interval for profiling output. | |
| int | m_verbose {0} |
| Verbosity. | |
| bool | m_adaptive {false} |
| Flag indicating whether timestep is adaptive. | |
| bool | m_is_init {true} |
| Flag indicating if this is initialization. | |
| bool | m_use_force_cfl {true} |
| Flag indicating if forcing should be included in CFL calculation. | |
| bool | m_force_chkpt_dt {false} |
| Bool for if checkpoint time interval should be forced. | |
| bool | m_force_plt_dt {false} |
| Bool for if plt time interval should be forced. | |
| std::vector< bool > | m_postprocess_enforce_dt |
| Timestep considerations from postprocessing instances. | |
| amrex::Vector< amrex::Real > | m_postprocess_enforce_dt_tol |
| amrex::Vector< amrex::Real > | m_postprocess_time_interval |
| amrex::Vector< amrex::Real > | m_postprocess_time_delay |
Detailed Description
Time manager for simulations
Constructor & Destructor Documentation
◆ SimTime()
|
default |
◆ ~SimTime()
|
default |
Member Function Documentation
◆ adaptive_timestep()
|
inline |
◆ add_postproc_dt_parameters()
|
inline |
Get timestep considerations from postprocessing instances.
◆ advance_time()
| void amr_wind::SimTime::advance_time | ( | ) |
Use results of CFL and timestepping parameters to advance time to new, output time information
◆ calculate_minimum_enforce_dt_abs_tol()
| void amr_wind::SimTime::calculate_minimum_enforce_dt_abs_tol | ( | ) |
Calculate minimum enforce dt tolerance based on all considerations.
◆ chkpt_interval()
|
inline |
◆ continue_simulation()
| bool amr_wind::SimTime::continue_simulation | ( | ) | const |
Return true if simulation should continue
◆ current_time() [1/2]
|
inline |
◆ current_time() [2/2]
|
inline |
◆ delta_t() [1/2]
|
inline |
◆ delta_t() [2/2]
|
inline |
◆ delta_t_nm1() [1/2]
|
inline |
◆ delta_t_nm1() [2/2]
|
inline |
◆ delta_t_nm2() [1/2]
|
inline |
◆ delta_t_nm2() [2/2]
|
inline |
◆ do_regrid()
| bool amr_wind::SimTime::do_regrid | ( | ) | const |
Return true if mesh refinement should be performed at this timestep
◆ get_minimum_enforce_dt_abs_tol()
|
inline |
◆ max_cfl()
|
inline |
◆ new_time()
|
inline |
◆ new_timestep()
| bool amr_wind::SimTime::new_timestep | ( | ) |
Advance to a new time state and update internal time states
Return a boolean flag indicating if the simulation should continue.
◆ output_profiling_info()
| bool amr_wind::SimTime::output_profiling_info | ( | ) | const |
Return true if TinyProfiler output should be sent to the log file at this timestep
◆ override_simulation_end_parameters()
|
inline |
Deactivate ending parameters (overset should be externally controlled)
◆ parse_parameters()
| void amr_wind::SimTime::parse_parameters | ( | ) |
Read user defined options from input file.
◆ regrid_interval()
|
inline |
◆ set_current_cfl()
| void amr_wind::SimTime::set_current_cfl | ( | const amrex::Real | conv_cfl, |
| const amrex::Real | diff_cfl, | ||
| const amrex::Real | src_cfl ) |
Set current CFL and update timestep based on CFL components
◆ set_restart_time()
| void amr_wind::SimTime::set_restart_time | ( | int | tidx, |
| amrex::Real | time ) |
Set start time and index based on checkpoint/restart file
- Parameters
-
tidx Time index from checkpoint file time Time read from checkpoint file
◆ start_time()
|
inline |
◆ start_time_index()
|
inline |
◆ stop_time()
|
inline |
◆ stop_time_index()
|
inline |
◆ time_index() [1/2]
|
inline |
◆ time_index() [2/2]
|
inline |
◆ use_force_cfl()
|
inline |
◆ write_checkpoint()
| bool amr_wind::SimTime::write_checkpoint | ( | ) | const |
Return true if checkpoint files should be written at this timestep
◆ write_last_checkpoint()
| bool amr_wind::SimTime::write_last_checkpoint | ( | ) | const |
Return true if checkpoint files should be written at this timestep
◆ write_last_plot_file()
| bool amr_wind::SimTime::write_last_plot_file | ( | ) | const |
Return true if plot files should be written at this timestep
◆ write_plot_file()
| bool amr_wind::SimTime::write_plot_file | ( | ) | const |
Return true if plot files should be written at this timestep
Member Data Documentation
◆ m_adaptive
|
private |
Flag indicating whether timestep is adaptive.
◆ m_chkpt_delay
|
private |
Time step delay for checkpoint/restart output (this means that output only happens after the delay)
◆ m_chkpt_interval
|
private |
Time step interval for writing checkpoint/restart files.
◆ m_chkpt_start_index
|
private |
Initial starting time index for generating checkpoint files.
◆ m_chkpt_t_delay
|
private |
Time delay for checkpoint/restart output.
◆ m_chkpt_t_interval
|
private |
Time interval for writing checkpoint/restart files.
◆ m_chkpt_t_tol
|
private |
Relative (to dt) tolerance for checkpoint time interval output.
◆ m_conv_cfl
|
private |
Current CFL categories.
◆ m_cur_time
|
private |
Current simulation time.
◆ m_current_cfl
|
private |
Current CFL.
◆ m_delay_time
|
private |
Delayed adaptive stepping.
◆ m_diff_cfl
|
private |
◆ m_dt
|
private |
Timestep sizes.
◆ m_dt_calc
|
private |
delta_t calculated using CFL constraint
◆ m_dt_growth
|
private |
Maximum growth of dt between timesteps.
◆ m_fixed_dt
|
private |
Fixed delta_t indicated by user.
◆ m_force_chkpt_dt
|
private |
Bool for if checkpoint time interval should be forced.
◆ m_force_chkpt_tol
|
private |
Relative (to chkpt_t_interval) tolerance for enforcing dt.
◆ m_force_dt_abs_tol
|
private |
Smallest absolute tolerance for enforcing dt, considering all.
◆ m_force_plt_dt
|
private |
Bool for if plt time interval should be forced.
◆ m_force_plt_tol
|
private |
Relative (to plt_t_interval) tolerance for enforcing dt.
◆ m_init_shrink
|
private |
Initial reduction in timestep size for startup.
◆ m_initial_dt
|
private |
Initial delta_t indicated by user.
◆ m_is_init
|
private |
Flag indicating if this is initialization.
◆ m_max_cfl
|
private |
Maximum CFL constraint.
◆ m_max_dt
|
private |
Maximum delta_t indicated by user.
◆ m_min_dt
|
private |
Minimum delta_t indicated by user.
◆ m_new_time
|
private |
Time where a new timestep will advance to.
◆ m_plt_delay
|
private |
Time step delay for plot file output.
◆ m_plt_interval
|
private |
Time step interval for plot file output.
◆ m_plt_start_index
|
private |
Initial starting time index for generating output files.
◆ m_plt_t_delay
|
private |
Time delay for plot file output.
◆ m_plt_t_interval
|
private |
Time interval for plot file output.
◆ m_plt_t_tol
|
private |
Relative (to dt) tolerance for plot time interval output.
◆ m_postprocess_enforce_dt
|
private |
Timestep considerations from postprocessing instances.
◆ m_postprocess_enforce_dt_tol
|
private |
◆ m_postprocess_time_delay
|
private |
◆ m_postprocess_time_interval
|
private |
◆ m_profiling_interval
|
private |
Time step interval for profiling output.
◆ m_regrid_interval
|
private |
Time interval for regridding.
◆ m_regrid_start_index
|
private |
Initial starting time index for regriding.
◆ m_src_cfl
|
private |
◆ m_start_time
|
private |
Starting simulation time (to track restart)
◆ m_start_time_index
|
private |
Initial starting time index.
◆ m_stop_time
|
private |
Max time for simulation.
◆ m_stop_time_index
|
private |
Maximum timesteps for simulation.
◆ m_time_index
|
private |
Counter for the number of timesteps since start of simulation.
◆ m_use_force_cfl
|
private |
Flag indicating if forcing should be included in CFL calculation.
◆ m_verbose
|
private |
Verbosity.
◆ max_time_states
|
staticconstexpr |
The documentation for this class was generated from the following files:
- /home/runner/work/amr-wind/amr-wind/amr-wind/core/SimTime.H
- /home/runner/work/amr-wind/amr-wind/amr-wind/core/SimTime.cpp
Generated by