5.3.11 Time Step Control

In this group parameters to control the time step restrictions can be set.

They are important because decide about performance and stability of COBOLD. They should be tested and adjusted for a simulation of a new type of object. But all the dimensionless parameters can stay unchanged for a group of similar simulations. Only the parameters with an explicit time dimension should be checked in all cases (they scale with characteristic timescales and depend particularly on gravity).

`real dtime_start`

:

The initial time step recommendation of a simulation is usually taken from the start model file. It can be overwritten e.g. withreal dtime_start f=E15.8 b=4 n='Start time step' u=s 1.0E+03

A value`0.0`

means that the original value from the start model is used.`real dtime_min`

:

In some rare cases it might be useful to specify explicitly the minimum time step with e.g.real dtime_min f=E15.8 b=4 n='Minimum time step' u=s & c0='dtime_min=0.0 => no restriction' 1.0

This value is used even if restrictions from the Courant condition try to enforce a smaller value. A fixed time step can be prescribed by setting`dtime_min`

=`dtime_max`

to some positive value. A value`dtime_min`

0.0 means that this time step restriction is completely ignored, which is the case that should usually be chosen.`real dtime_max`

:

It is possible to explicitly specify the maximum time step too, e.g. withreal dtime_max f=E15.8 b=4 n='Maximum time step' u=s & c0='dtime_max=0.0 => no restriction' 1.0E+05

A fixed time step can be prescribed by setting`dtime_min`

=`dtime_max`

to some positive value. A value`dtime_max`

0.0 means that this time step restriction is completely ignored, which is the case that should usually be chosen.`real dtime_min_stop`

:

Sometimes a simulation can run into a pathological state where the time step decreases rapidly without recovering. To prevent a simulation in such a case from running forever (or until some other process time restriction applies) without actually advancing significantly in time, it is possible to specify an absolute minimum time step, e.g. withreal dtime_min_stop f=E15.8 b=4 n='Minimum time step' u=s & c0='dtime_min_stop=0.0 => no restriction' & c1='dtime < dtime_min_stop => program stop' 1.0

If the actual time step falls below this value, the simulation finishes gracefully. This values has to specified as absolute time and has to be chosen carefully for each individual model (or each group of models). This time step restriction can be switched off by setting`real dtime_min_stop`

=`0.0`

. But in general, one should keep it activated and try to find a proper positive value.`real dtime_incmax`

:

Sometimes a time step restriction can lead to a sudden drastic drop in the time step. To prevent unwanted oscillations in the size of the time step its increase can be restricted e.g. withreal dtime_incmax f=E15.8 b=4 n='Maximum time step increment factor' u=1 & c0='dtime_max<1.0 => no restriction' c1='typically 1.1' 1.2

This value specifies the maximum factor by which the time step can be increased from step to step (even if the new Courant condition etc. would allow more). A value value`0.0`

deactivates this restriction.`real c_courant`

:

A typical Courant factor for each 1D hydrodynamics step can be specified with e.g.real c_courant f=E15.8 b=4 n='HD Courant factor' u=1 & c0='range: 0.0 < C_Courant <= 1.0, typically: 0.5' 0.5

From the minimum cell crossing time of a partial wave and this factor a recommendation for the*next*time step is computed. A value of`1.0`

is the upper limit which guarantees stability for some simple linear test problems. Values around`0.5`

are recommended for fully non-linear simulations.`real c_courantmax`

:

A typical Courant factor for each 1D hydrodynamics step can be specified with e.g.real c_courantmax f=E15.8 b=4 n='maximum HD Courant factor' u=1 & c0='range: C_Courant < C_Courantmax <= 1.0, typically: 0.9' 0.8

From the minimum cell crossing time of a partial wave and this factor an upper limit for the*current*time step is computed. If this limit is exceeded the computation is interrupted and resumed with a smaller time step (based on`c_courant`

). Usually this parameter should be restricted by`c_courant`

`c_courantmax`

`1.0`

. A value around`0.8`

appears to be a good choice.`real c_maxeichange`

:

The relative change in internal during a single 1D hydrodynamics step can be used to restrict the time step by specifyingreal c_maxeichange f=E15.8 b=4 n='maximum hydro energy change' u=1 & c0='range: 0.1 - 1.0, typically 0.5, off:0.0' 0.5

The default is`0.9`

. Nevertheless, since the Roe solver is constructed to handle shocks and rapid changes in density and energy, this check is usually not needed. It can be switched off by setting`c_maxeichange`

=`0.0`

.`real c_radcourant`

:

The radiation transport routines are subject so time step restrictions, too. And in typical scenarios, its the radiative timescale are the shortest one and poses the tightest restriction. Contrary to the hydrodynamics routines the timescale relevant for the stability of the radiation transport scheme can only be estimated using the characteristic timescale of a small sinusoidal temperature disturbance with a wavelength of the grid size in a homogeneous background and grey radiative energy exchange. The ``radiative Courant'' factor can be set e.g. withreal c_radcourant f=E15.8 b=4 n='RAD Courant factor' u=1 & c0='range: 0.0 < C_radCourant, typically: 1.0' 2.5

If the estimate of the timescale would be correct a value of`2.0`

would cause the temperature fluctuation on the shortest scale to flip its sign, setting the absolute stability limit. A value of`1.0`

would lead to a damping of theses fluctuations within one time step. But in practice, even higher values (for example`2.5`

) show a reasonable behavior. This might be due to the effect that the shortest radiative timescale only occurs at single points (or in 2D layers) but that already the immediate neighbors have longer timescales and can damp the ``most sensitive points''. Based on`real c_radcourant`

the recommended typical radiative time step is computed.`real c_radcourantmax`

:

With this parameter the maximum allowed radiative time step is prescribed as e.g. inreal c_radcourantmax f=E15.8 b=4 n='maximum RAD Courant factor' u=1 & c0='range: C_radCourant <= C_radCourantmax, typically: 2.0' 3.0

This value will typically be somewhat larger than`real c_radcourant`

.`real c_radmaxeichange`

:

The relative energy change per radiative sub step can be restricted e.g. withreal c_radmaxeichange f=E15.8 b=4 n='maximum radiative energy change' & u=1 c0='range: 0.01 - 1.0' 0.25

The default is`0.5`

. Values between`0.1`

and`0.5`

seem reasonable. A value`0.0`

deactivates this time step check. However, the check of the radiative energy change should usually be performed. A way to maximize the radiative time step (and therefore the performance of the entire code) can be to first set`real c_radmaxeichange`

to a proper value (say`0.25`

). Then,`real c_radcourant`

(and`real c_radcourantmax`

) are adjusted (by trial and error) in a way that the radiative time step is almost always restricted by the ``Courant'' condition and only sometimes in extreme cases by the maximum energy change restriction. The computed output intensity should be checked for the size of its fluctuations due to a possibly too large value of`c_radmaxeichange`

.`real c_radthintimefac`

:

In the`LHDrad`

module only the radiative time step restriction due to energy changes can be relaxed further in the optically thin by specifying e.g.real c_radthintimefac f=E15.8 b=4 & n='time scale reduction in optically thin' u=1 & c0='range: 0.1 - 1.0, typically: 0.5' 0.60

A value`0.0`

or`real c_radtvisdtau`

`0.0`

switches off this relaxation.`real c_viscourant`

:

The tensor viscosity routines have their own time step restriction. The recommended typical viscous time step can be set e.g. withreal c_viscourant f=E15.8 b=4 n='viscous Courant factor' u=1 & c0='range: 0.0 < C_visCourant, typically: 0.5-1.0, better 0.25' 0.5

As the corresponding viscous timescale is typically longer than the radiative one (and even the Courant timescale from the Roe hydrodynamics routines) this factor is often irrelevant. The absolute upper stability limit is located at`c_viscourant`

=`2.0`

. Values around`0.5`

to`1.0`

are more typical. In some extreme cases in simulations of the solar chromosphere it has turned out that an even lower value (`0.2`

) is necessary to prevent some spikes in the neighborhood of strong colliding shocks.`real c_viscourantmax`

:

The absolute upper limit for the viscous time scale can be set withreal c_viscourantmax f=E15.8 b=4 n='maximum viscous Courant factor' u=1 & c0='range: C_visCourant <= C_visCourantmax, typically smaller than 2.0' 1.0

Its value should be slightly above`c_viscourant`

and below`2.0`

.