Section: time
This section deals with parameters that control the time stepping of the simulation. This section also addresses the time-dependent nature of checkpoint files, plot files, and regridding.
amr-wind/core/SimTime.cpp.- time.stop_time
type: Real number
The time (in seconds) when the simulation should stop. This parameter is related to
time.max_stepdepending on whether the user provides a positive or negative value for this input. If the user provides a positive value, then the stop criteria is such that the simulation stops when it reaches thestop_time. If the user specifies a negative value, then the simulation stops when it has completed the prescribed number of steps as determined bytime.max_step.
- time.max_step
type: Integer
The number of timesteps to run before termination. See also
time.stop_time.
- time.fixed_dt
type: Real number
Fixed timestep size (in seconds) used to advance the simulation. If this parameter is negative, then
time.cflis used to determine the adaptive timestep during the simulation.
- time.initial_dt
type: Real number
Initial timestep size (in seconds) used to initialize the simulation. Only activated if
time.fixed_dtis negative (signaling CFL controlled time stepping) and iftime.initial_dtis positive. This parameter can be useful for starting CFL-controlled simulations like Rayleigh-Taylor flow that initialize with zero velocity.
- time.max_dt
type: Real number
Maximum timestep size (in seconds) used to limit CFL-controlled time stepping. Only activated if
time.max_dtis positive and fixed time stepping is disabled. This parameter can be useful if CFL-controlled timestepping is desired but there are additional constraints to the timestep size considerations.
- time.min_dt
type: Real number
Minimum timestep size (in seconds) used to limit CFL-controlled time stepping by stopping a simulation when the timestep size has become too small. Only activated if
time.min_dtis positive and fixed time stepping is disabled. This parameter is more useful in the development context when running simulations that are not reliably stable. If a simulation’s velocity values dramatically grow, i.e., they blow up, CFL-controlled timestepping would make the timestep size unrealistically small, often allowing the simulation to continue to run indefinitely with an nonphysical flow field. When this parameter is active, the code will abort when the timestep size becomes smaller than the specified minimum, preventing the simulation from continuing to run wastefully.
- time.cfl
type: Real number, optional, default = 0.5
The maximum CFL allowed during the simulation. Adaptive timestepping algorithm is used to ensure that the maximum CFL condition is not violated while using the largest allowable timestep to advance the simulation.
- time.init_shrink
type: Real number, optional, default = 0.1
init_shrinkindicates a reduction factor applied to the timestep size during initialization phased used to perform the initial iterations to determine pressure. This factor must be a value greater than zero but less than or equal to 1.0.
- time.max_dt_growth
type: Real number, optional, default = 0.1
max_dt_growthindicates a growth limit factor applied to the timestep size whenever it increases during a variable dt simulation. This factor must be a value greater than zero but less than or equal to 1.0. In most cases a value of0.1is sufficient, but if dt is forced to shrink harshly and often due totime.enforce_plot_time_dtortime.enforce_checkpoint_time_dtbeing active, a larger growth factor may be more practical.
- time.regrid_interval
type: Integer, optional, default = -1
If
amr.max_levelis greater than zero, this parameter indicates the frequency (in timesteps) at which the mesh is adaptively refined based on various user-specified criteria. If this value is negative, the mesh is only refined once during initialization and remains constant for the rest of the simulation.
- time.plot_interval
type: Integer, optional, default = -1
If this value is greater than zero, it indicates the frequency (in timesteps) at which outputs (plot files) are written to disk. If plotfile output is active, a plotfile will be written at the end of a simulation (when
time.stop_timeortime.max_stepis reached), regardless of the output timing parameters.
- time.plot_time_interval
type: Real number, optional, default = -1.0
If this value is greater than zero, it indicates the frequency (in seconds) at which outputs (plot files) are written to disk. This cannot be specified in conjunction with
time.plot_interval. Because the size of time steps (dt) do not automatically correspond to the size of the plot time interval, additional parameters are available if desired:time.plot_time_interval_reltol,time.enforce_plot_time_dt, andtime.enforce_plot_dt_reltol. These additional parameters are only relevant for simulations with a variable time step size (dt).
- time.plot_delay
type: Integer, optional, default = 0
If
time.plot_intervalis greater than zero, then the plot delay specifies how long (in timesteps) to wait before writing a plot file. The implementation waits until this threshold is reached to check if the interval allows for a file to be written. For example, if the plot delay is specified to be “1000”, and the plot interval is “10”, then the first plot file written would be at timestep “1000”. If the plot delay is “1001” and the plot interval is still “10”, then the first plot file file would be at timestep “1010”.
- time.plot_time_delay
type: Real number, optional, default = 0.0
If
time.plot_time_intervalis greater than zero, then the plot time delay specifies how long (in seconds) to wait before writing a plot file. Similar totime.plot_delay, the implementation waits until this threshold is reached to check if the time interval allows for a file to be written.
- time.checkpoint_interval
type: Integer
If this value is greater than zero, it indicates the frequency (in timesteps) at which checkpoint (restart) files are written to disk. If checkpoint output is active, a checkpoint will be written at the end of a simulation (when
time.stop_timeortime.max_stepis reached), regardless of the output timing parameters.
- time.checkpoint_time_interval
type: Real number, optional, default = -1.0
If this value is greater than zero, it indicates the frequency (in seconds) at which checkpoint (restart) files are written to disk. This cannot be specified in conjunction with
time.checkpoint_interval. Because the size of time steps (dt) do not automatically correspond to the size of the checkpoint time interval, additional parameters are available if desired:time.checkpoint_time_interval_reltol,time.enforce_checkpoint_time_dt, andtime.enforce_checkpoint_dt_reltol. These additional parameters are only relevant for simulations with a variable time step size (dt).
- time.checkpoint_delay
type: Integer, optional, default = 0
If
time.checkpoint_intervalis greater than zero, then the checkpoint delay specifies how long (in timesteps) to wait before writing a checkpoint file. The implementation waits until this threshold is reached to check if the interval allows for a file to be written. For example, if the checkpoint delay is specified to be “1000”, and the checkpoint interval is “10”, then the first checkpoint file written would be at timestep “1000”. If the checkpoint delay is “1001” and the checkpoint interval is still “10”, then the first checkpoint file would be at timestep “1010”.
- time.checkpoint_time_delay
type: Real number, optional, default = 0.0
If
time.checkpoint_time_intervalis greater than zero, then the checkpoint time delay specifies how long (in seconds) to wait before writing a checkpoint file. Similar totime.checkpoint_delay, the implementation waits until this threshold is reached to check if the time interval allows for a file to be written.
- time.regrid_start
type: Integer, optional, default = 0; default = start index upon restart
This user-specified parameter sets the base timestep onward which the mesh is adaptively refined.
- time.plot_start
type: Integer, optional, default = 0; default = start index upon restart
This user-specified parameter sets the base timestep onward which the output (plot files) are written to the disk. This parameter is specifically for offsetting the index following a restart.
- time.checkpoint_start
type: Integer, optional, default = 0; default = start index upon restart
This user-specified parameter sets the base timestep onward which the checkpoint (restart) files are written to the disk. This parameter is specifically for offsetting the index following a restart.
- time.use_force_cfl
type: Boolean, optional, default = true
If this flag is true then the forces (including the pressure gradient) are included in the CFL calculation.
- time.plot_time_interval_reltol
type: Real number, optional, default = 1e-8
When
time.plot_time_intervalis greater than zero, the implementation compares the current simulation time to the specified time interval in order to output the time step that meets or just passes the time interval. Because this involves a comparison between real numbers, this comparison uses a tolerance, which is relative to the current timestep, which helps avoid skipping time steps which are very close, but just shy, of the time interval. In most cases, this parameter need not be modified, but it can be changed by the user.
- time.enforce_plot_time_dt
type: Boolean, optional, default = false
In the case of a variable dt simulation, the simulation time will not likely correspond exactly to the plot time interval. However, by setting this parameter to true, the time step size (dt) will be shortened when necessary to enforce the simulation time to match the plot time interval. Enabling this feature while also enabling
time.enforce_checkpoint_time_dtwill result in a warning message.
- time.enforce_plot_dt_reltol
type: Real number, optional, default = 1e-3
When
time.enforce_plot_time_dtis true, a tolerance is needed to determine when it is necessary to shrink the time step size. This tolerance is relative to the plot time interval. In most cases, this parameter need not be modified, but it can be changed by the user.
- time.checkpoint_time_interval_reltol
type: Real number, optional, default = 1e-8
This parameter is active when
time.checkpoint_time_intervalis greater than zero, and it exists for the same reason astime.plot_time_interval_reltol.
- time.enforce_checkpoint_time_dt
type: Boolean, optional, default = false
Similar to
time.enforce_plot_time_dt, setting this parameter to true will enforce the simulation time to match the checkpoint time interval in the case of a variable dt simulation. Enabling this feature while also enablingtime.enforce_plot_time_dtwill result in a warning message.
- time.enforce_checkpoint_dt_reltol
type: Real number, optional, default = 1e-3
When
time.enforce_checkpoint_time_dtis true, a tolerance is needed to determine when it is necessary to shrink the time step size. This tolerance is relative to the checkpoint time interval. In most cases, this parameter need not be modified, but it can be changed by the user.
- time.profiling_interval
type: Integer, optional, default = -1
If this value is greater than zero, it indicates the frequency (in timesteps) at which profiling information is written to the log file. This will only work if the code was compiled with
AMR_WIND_ENABLE_TINY_PROFILEset toON.