diff options
Diffstat (limited to 'doc/documention.tex')
-rw-r--r-- | doc/documention.tex | 54 |
1 files changed, 46 insertions, 8 deletions
diff --git a/doc/documention.tex b/doc/documention.tex index 4f32b81..316d514 100644 --- a/doc/documention.tex +++ b/doc/documention.tex @@ -10,19 +10,57 @@ \section{Purpose} -This, currently very simple, thorn provides a routine for calculating -the timestep for an evolution based on the spatial Cartesian grid spacing. -This thorn will be extended in the future to include features like -a dynamic Courant condition. The thorn works for up to 3 spatial -dimensions. - +This thorn provides a routines for calculating +the timestep for an evolution based on the spatial Cartesian grid spacing and +a wave speed. \section{Comments} -The timestep, which is passed into the Cactus variable {\tt cctk\_delta\_time}, - is calculated by the algorithm +There are currently two methods for calculating the timestep, either the +simple courant method, or a dynamic courant method. The method is chosen +using the keyword parameter {\tt time::method} +The timestep, is passed into the Cactus variable {\tt cctk\_delta\_time}. +Both timesteps are based on the Courant condition, which states that for +numerical stability, the chosen timestep should satisfy +$$ +\Delta t \le \mbox{min}(\Delta x^i)/\mbox{wave speed}/\sqrt(\mbox{dim}) +$$ + +The two methods currently implemented are: +\begin{itemize} + +\item {\tt time::method = "standard"} (this is the default). The timestep is calculated once + at the start of the run in the {\tt BASEGRID} timebin, and is then held static + throughout the run. The algorithm, which uses the parameter {\tt time::dtfac} is $$ \Delta t = \mbox{\tt dtfac} * \mbox{min}(\Delta x^i) $$ + Note that the parameter {\tt dtfac} should take into account the dimension + of the space being used, and the wave speed. + +\item {\tt time::method = "courant"}. The timestep is calculated dynamically at the + start of each iteration in the {\tt PRESTEP} timebin. The algorithm is +$$ +\Delta t = \mbox{\tt courant\_fac} * \mbox{min}(\Delta x^i)/\mbox{maximum wavespeed}/\sqrt(\mbox{dim}) +$$ + + +\item {\tt time::method = "courant\_time"}. The timestep is calculated dynamically at the + start of each iteration in the {\tt PRESTEP} timebin. The algorithm is +$$ +\Delta t = \mbox{\tt courant\_fac} * \mbox{minimum time to cross a zone}/\sqrt(\mbox{dim}) +$$ + +\section{Technical Details} + +If a dynamic {\tt courant} condition is selected, a thorn must set the protected variable +{\tt courant\_wave\_speed} for the maximum wave speed before Time sets the timestep. + +If a dynamic {\tt courant_time} condition is selected, a thorn must set the protected variable +{\tt courant\_time} for the minimum time for a wave to cross a zone + before Time sets the timestep. + +\end{itemize} + |