blob: 316d514df22a37e982f939ec571abd39d0577296 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
\documentclass{article}
\begin{document}
\title{Time}
\author{Gabrielle Allen}
\date{1999}
\maketitle
\abstract{Calculates the timestep used for an evolution}
\section{Purpose}
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}
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}
% Automatically created from the ccl files by using gmake thorndoc
\include{interface}
\include{param}
\include{schedule}
\end{document}
|