$$Date$$

Abstract

Calculates the timestep used for an evolution

This thorn provides routines for calculating the timestep for an evolution based on the spatial Cartesian grid spacing and a wave speed.

Thorn Time uses one of four methods to decide on the timestep to be used for the simulation. The method is chosen using the keyword parameter time::timestep_method.

- time::timestep_method = "given"
The timestep is ﬁxed to the value of the parameter time::timestep.

- time::timestep_method = "courant_static"
This is the default method, which calculates the timestep once at the start of the simulation, based on a simple courant type condition using the spatial gridsizes and the parameter time::dtfac.

$$\Delta t=\text{dtfac}\ast \text{min}\left(\Delta {x}^{i}\right)$$Note that it is up to the user to custom dtfac to take into account the dimension of the space being used, and the wave speed.

- time::timestep_method = "courant_speed"
This choice implements a dynamic courant type condition, the timestep being set before each iteration using the spatial dimension of the grid, the spatial grid sizes, the parameter courant_fac and the grid variable courant_wave_speed. The algorithm used is

$$\Delta t=\text{courant\_fac}\ast \text{min}\left(\Delta {x}^{i}\right)\u2215\text{courant\_wave\_speed}\u2215\sqrt{\text{d}im}$$For this algorithm to be successful, the variable courant_wave_speed must have been set by some thorn to the maximum propagation speed on the grid before this thorn sets the timestep, that is AT POSTSTEP BEFORE Time_Courant (or earlier in the evolution loop). [Note: The name courant_wave_speed was poorly chosen here, the required speed is the maximum propagation speed on the grid which may be larger than the maximum wave speed (for example with a shock wave in hydrodynamics, also it is possible to have propagation without waves as with a pure advection equation).

- time::timestep_method = "courant_time"
This choice is similar to the method courant_speed above, in implementing a dynamic timestep. However the timestep is chosen using

$$\Delta t=\text{courant\_fac}\ast \text{courant\_min\_time}\u2215\sqrt{\text{d}im}$$where the grid variable courant_min_time must be set by some thorn to the minimum time for a wave to cross a gridzone before this thorn sets the timestep, that is AT POSTSTEP BEFORE Time_Courant (or earlier in the evolution loop).

In all cases, Thorn Time sets the Cactus variable cctk_delta_time which is passed as part of the macro CCTK_ARGUMENTS to thorns called by the scheduler.

Note that for hyperbolic problems, the Courant condition gives a minimum requirement for stability, namely that the numerical domain of dependency must encompass the physical domain of dependency, or

$$\Delta t\le \text{min}\left(\Delta {x}^{i}\right)\u2215\text{wavespeed}\u2215\sqrt{\text{d}im}$$

Fixed Value Timestep

time::timestep_method = "given"

time::timestep = 0.1

time::timestep = 0.1

Calculate Static Timestep Based on Grid Spacings

The following parameters set the timestep to be 0.25