The EinsteinExact arrangement provides a collection of thorns which compute exact solutions to the Einstein equation and set the \(3+1\) ADM variables provided by the ADMBase thorn. The solutions may be computed either as initial data, or at each iteration of an evolution. The computation is done analytically from expressions for the metric which are taken from a database of solutions provided by the Metrics package for Mathematica. Adding new solutions to EinsteinExact only requires that the metric be added to this database.
The EinsteinExact code relies on the fact that a given analytic expression for the \(4\)-metric \(g_{ab}\) (and its inverse \(g^{ab}\)) of a spacetime may be decomposed into the \(3+1\) ADM variables, \begin {equation} g_{ab} = \left ( \begin {array}{cc} -\alpha ^2 + \beta _k \beta ^k & \beta _i \\ \beta _i & \gamma _{ij}\\ \end {array} \right ),\quad g^{ab} = \left ( \begin {array}{cc} -1/\alpha ^2 & \beta ^i / \alpha ^2 \\ \beta ^i / \alpha ^2 & \gamma ^{ij} - \beta ^i \beta ^j / \alpha ^2\\ \end {array} \right ), \end {equation} where \(\alpha \) is the lapse, \(\beta ^i\) is the shift and \(\gamma _{ij}\) is the three metric on the slice. The ADMBase variables for the lapse, shift and three metric may therefore be directly obtained from components of the four metric and its inverse: \begin {equation} \alpha = \frac {1}{\sqrt {-g_{00}}},\quad \beta ^i = \alpha ^2 g^{0i},\quad \gamma _{ij} = g_{ij}. \end {equation} Another ADMBase variable which must be set is the extrinsic curvature \(K_{ij}\). This may be written as \begin {equation} K_{ij} = -\frac {1}{2\alpha } \mathcal {L}_{\alpha \vec {n}} \gamma _{ij} \end {equation} where \(\mathcal {L}\) is the Lie derivative and \(\vec {n}\) is the normal to the slice. Explicitly expanding this out gives \begin {align} K_{ij} = & \frac {1}{2\alpha } (-\partial _t \gamma _{ij} + D_i \beta _j + D_j \beta _i) \nonumber \\ = & \frac {1}{2\alpha } (-\partial _t \gamma _{ij} + \beta ^k \partial _k \gamma _{ij} + \gamma _{ik} \partial _j \beta ^k + \gamma _{kj} \partial _i \beta ^k ) \end {align}
which is readily computed from the previous analytic expressions for \(\alpha \), \(\beta ^i\) and \(\gamma _{ij}\). Finally, the ADMBase variables for the time derivatives for the lapse and shift are computed by analytically differentiating \(\alpha \) and \(\beta ^i\) with respect to \(t\).
The latest version of EinsteinExact will always be available from the project git repository:
git clone git://github.com/barrywardell/EinsteinExact
The EinsteinExact thorns are designed to work with Cactus as part of the Einstein Toolkit. All requirements are therefore already included with the Einstein Toolkit.
To use an EinsteinExact thorn, include the thorn for your desired spacetime in your thornlist and in the ActiveThorns section of your parameter file and set either the ADMBase::initial_data or ADMBase::evolution_method parameters (or both) described below. It is also necessary to set the ADMBase::initial_lapse, ADMBase::initial_dtlapse, ADMBase::initial_shift and ADMBase::initial_dtshift parameters in order for storage to be allocated for all ADMBase variables set by EinsteinExact.
As each thorn sets the ADM variables for a specific spacetime in some particular coordinate system it only makes sense to have one thorn in the arrangement activated at a time.
Although there is a separate Cactus thorn for each supported spacetime, all thorns are generated from the same Kranc script and therefore share some common parameters. The parameters supported by all thorns are listed in this section.
The ADM variables can be set by EinsteinExact as initial data for an evolution. Each EinsteinExact thorn extends the ADMBase::initial_data keyword parameter with another option corresponding to the name of the thorn. If the parameter is set to the thorn name, then initial data for the ADM variables will be set by the thorn in the ADMBase_InitialData schedule bin.
The setting of the ADM variables can optionally be done at each step in an evolution. Each EinsteinExact thorn extends the ADMBase::evolution_method keyword parameter with another option corresponding to the name of the thorn. If the parameter is set to the thorn name, then the ADM variables will be set by the thorn at each iteration during the ANALYSIS schedule bin.
Each EinsteinExact thorn extends this keyword parameter with another option corresponding to the name of the thorn. This parameter is currently ignored by the EinsteinExact code but must be set nonetheless in order to ensure storage is allocated for the lapse variable.
Each EinsteinExact thorn extends this keyword parameter with another option corresponding to the name of the thorn. This parameter is currently ignored by the EinsteinExact code but must be set nonetheless in order to ensure storage is allocated for the shift variables.
Each EinsteinExact thorn extends this keyword parameter with another option corresponding to the name of the thorn. This parameter is currently ignored by the EinsteinExact code but must be set nonetheless in order to ensure storage is allocated for the dtlapse variable.
Each EinsteinExact thorn extends this keyword parameter with another option corresponding to the name of the thorn. This parameter is currently ignored by the EinsteinExact code but must be set nonetheless in order to ensure storage is allocated for the dtshift variables.
These parameters specify the position at which the origin of the spacetime should be located.
Factor that should rescale the lapse such that \(\alpha ' = \tfrac {1}{\code {lapsefactor}}~ \alpha \). This has the effect of rescaling the time coordinate so that \(t' = \code {lapsefactor}~ t\). Note that this also has the effect of rescaling the shift by a factor \(\tfrac {1}{\code {lapsefactor}}\) (see xform.nb for more details).
Shift that should be added to the metric. This has the effect of adding an offset to the spatial coordinates so that \(x' = x - \code {shiftaddx}~ t'\), \(y' = y - \code {shiftaddy}~ t'\), \(z' = z - \code {shiftaddz}~ t'\) (see xform.nb for more details).
Lorentz-boost the spacetime by a velocity \(v^i = [\code {boostx}, \code {boosty}, \code {boostz}]\). This applies a Lorentz boost transformation to the coordinates of the form \begin {equation} \begin {bmatrix} t' \\ \mathbf {r'} \end {bmatrix} = \begin {bmatrix} \gamma & - \gamma \boldsymbol {\beta }^{\mathrm {T}} \\ -\gamma \boldsymbol {\beta } & \mathbf {I} + \gamma ^2 / (\gamma +1) \boldsymbol {\beta }\boldsymbol {\beta }^{\mathrm {T}} \\ \end {bmatrix} \begin {bmatrix} t \\ \mathbf {r} \end {bmatrix}. \end {equation}
The spacetime may have an arbitrary \(3\)D rigid rotation applied to it. This rotation is specified by the theta, phi and psi parameters which correspond to the Euler angles of the rotation. The conventions used are such that the rotations are given by the three rotation matrices [1]: \begin {align} R_\phi =& \left ( \begin {array}{ccc} \cos (\phi ) & \sin (\phi ) & 0 \\ -\sin (\phi ) & \cos (\phi ) & 0 \\ 0 & 0 & 1 \\ \end {array} \right ), \nonumber \\ R_\theta =& \left ( \begin {array}{ccc} 1 & 0 & 0 \\ 0 & \cos (\theta ) & \sin (\theta ) \\ 0 & -\sin (\theta ) & \cos (\theta ) \\ \end {array} \right ), \nonumber \\ R_\psi =& \left ( \begin {array}{ccc} \cos (\psi ) & \sin (\psi ) & 0 \\ -\sin (\psi ) & \cos (\psi ) & 0 \\ 0 & 0 & 1 \\ \end {array} \right ). \end {align}
This section lists all spacetimes currently supported by EinsteinExact.
Description: 4D flat spacetime in Cartesian gauge wave coordinates
Thorn name: GaugeWave
Parameters: amp, period
Metric:
\begin {equation} g_{ab} = \left ( \begin {array}{cccc} \text {amp} \sin \left (\frac {2 \pi (x-t)}{\text {period}}\right )-1 & 0 & 0 & 0 \\ 0 & 1-\text {amp} \sin \left (\frac {2 \pi (x-t)}{\text {period}}\right ) & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \\ \end {array} \right ) \end {equation}
Description: Kerr spacetime in Kerr-Schild coordinates
Thorn name: KerrSchild
Parameters: M, a
Metric:
\begin {equation} g_{ab} = \left ( \begin {array}{cccc} \frac {2 M r^3}{a^2 z^2+r^4}-1 & \frac {2 M r^3 (a y+r x)}{\left (a^2+r^2\right ) \left (a^2 z^2+r^4\right )} & \frac {2 M r^3 (r y-a x)}{\left (a^2+r^2\right ) \left (a^2 z^2+r^4\right )} & \frac {2 M r^2 z}{a^2 z^2+r^4} \\ \frac {2 M r^3 (a y+r x)}{\left (a^2+r^2\right ) \left (a^2 z^2+r^4\right )} & \frac {2 M r^3 (a y+r x)^2}{\left (a^2+r^2\right )^2 \left (a^2 z^2+r^4\right )}+1 & \frac {2 M r^3 (a y+r x) (r y-a x)}{\left (a^2+r^2\right )^2 \left (a^2 z^2+r^4\right )} & \frac {2 M r^2 z (a y+r x)}{\left (a^2+r^2\right ) \left (a^2 z^2+r^4\right )} \\ \frac {2 M r^3 (r y-a x)}{\left (a^2+r^2\right ) \left (a^2 z^2+r^4\right )} & \frac {2 M r^3 (a y+r x) (r y-a x)}{\left (a^2+r^2\right )^2 \left (a^2 z^2+r^4\right )} & \frac {2 M r^3 (r y-a x)^2}{\left (a^2+r^2\right )^2 \left (a^2 z^2+r^4\right )}+1 & \frac {2 M r^2 z (r y-a x)}{\left (a^2+r^2\right ) \left (a^2 z^2+r^4\right )} \\ \frac {2 M r^2 z}{a^2 z^2+r^4} & \frac {2 M r^2 z (a y+r x)}{\left (a^2+r^2\right ) \left (a^2 z^2+r^4\right )} & \frac {2 M r^2 z (r y-a x)}{\left (a^2+r^2\right ) \left (a^2 z^2+r^4\right )} & \frac {2 M r z^2}{a^2 z^2+r^4}+1 \\ \end {array} \right ) \end {equation}
where \begin {equation} r(x,y,z)=\frac {\sqrt {\sqrt {\left (-a^2+x^2+y^2+z^2\right )^2+4 a^2 z^2}-a^2+x^2+y^2+z^2}}{\sqrt {2}} \end {equation}
Description: 4D flat spacetime in Cartesian coordinates
Thorn name: Minkowski
Metric:
\begin {equation} g_{ab} = \left ( \begin {array}{cccc} -1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \\ \end {array} \right ) \end {equation}
Description: 4D flat spacetime in Cartesian shifted gauge wave coordinates
Thorn name: ShiftedGaugeWave
Parameters: amp, period
Metric:
\begin {equation} g_{ab} = \left ( \begin {array}{cccc} \text {amp} \sin \left (\frac {2 \pi (x-t)}{\text {period}}\right )-1 & -\text {amp} \sin \left (\frac {2 \pi (x-t)}{\text {period}}\right ) & 0 & 0 \\ -\text {amp} \sin \left (\frac {2 \pi (x-t)}{\text {period}}\right ) & \text {amp} \sin \left (\frac {2 \pi (x-t)}{\text {period}}\right )+1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \\ \end {array} \right ) \end {equation}
Description: A Vaidya spacetime with mass function m(v) = M (1 + Tanh[v dM / M]\({}^{\wedge }\)2)
Thorn name: Vaidya2
Parameters: M, dM
Metric:
\begin {equation} g_{ab} = \left ( \begin {array}{cccc} \frac {2 m}{r}-1 & \frac {2 m x}{r^2} & \frac {2 m y}{r^2} & \frac {2 m z}{r^2} \\ \frac {2 m x}{r^2} & \frac {2 m x^2}{r^3}+1 & \frac {2 m x y}{r^3} & \frac {2 m x z}{r^3} \\ \frac {2 m y}{r^2} & \frac {2 m x y}{r^3} & \frac {2 m y^2}{r^3}+1 & \frac {2 m y z}{r^3} \\ \frac {2 m z}{r^2} & \frac {2 m x z}{r^3} & \frac {2 m y z}{r^3} & \frac {2 m z^2}{r^3}+1 \\ \end {array} \right ) \end {equation}
where \begin {equation} r(x,y,z)=\sqrt {x^2+y^2+z^2} \end {equation}
\begin {equation} m(t,x,y,z)=M \left (\tanh ^2\left (\frac {\text {dM} \left (t+\sqrt {x^2+y^2+z^2}\right )}{M}\right )+1\right ) \end {equation}
Description: Modified Schwarzschild spacetime in Brill-Lindquist coordinates with a radially dependent mass
inside the black hole
Thorn name: ModifiedSchwarzschildBL
Parameters: M, epsilon
Metric:
\begin {equation} g_{ab} = \left ( \begin {array}{cccc} -1 & 0 & 0 & 0 \\ 0 & \left (1+\frac {M(r)}{2 r}\right )^4 & 0 & 0 \\ 0 & 0 & \left (1+\frac {M(r)}{2 r}\right )^4 & 0 \\ 0 & 0 & 0 & \left (1+\frac {M(r)}{2 r}\right )^4 \\ \end {array} \right ) \end {equation}
where \begin {equation} r(x,y,z)=\sqrt {x^2+y^2+z^2} \end {equation}
\begin {equation} M(r) = \left \{ \begin {array}{lr} 4 r - \frac {8 \frac {r^2}{2} + [\cos (\frac {4 \pi r}{M}) - 1] \left (\frac {M}{4 \pi }\right )^2}{M} & : r < M/2\\ M & : r \ge M/2 \end {array} \right . \end {equation}
The script which generates the thorns requires the Kranc and Metrics Mathematica packages to be installed. Kranc is included with the Einstein Toolkit and the Metrics package is included in the Metrics directory.
To regenerate the code make from within the m directory.
To add a new spacetime to EinsteinExact, simply create a new file for the spacetime under m/Metrics/metrics/ and then add this spacetime to the thorns = … and spacetimes = … lines at the end of the Kranc script in m/EinsteinExact.m. Also consider adding a regression test to the EinsteinExact_test thorn and correctness tests under the tests directory.
If you think this spacetime would be of use to others, please consider submitting a patch. As all of the spacetimes in the EinsteinExact arrangement come from them Metrics database it is highly preferable to have new spacetimes added to the upstream repository for the Metrics package. The version of the Metrics package used by EinsteinExact can then be updated.
The Metrics database exists as a separate git repository. For convenience, a version of it is included with EinsteinExact under the m/Metrics directory. This is a version of the standalone Metrics repository which has been merged using the git-subtree command1 .
If a new version of the Metrics package becomes available, the version in the EinsteinExact repository may be updated using the following command:
git subtree pull --prefix=m/Metrics --squash git://github.com/barrywardell/Metrics master
This will pull in new changes from the Metrics repository and merge them with the EinsteinExact repository under the m/Metrics directory.
There are correctness tests for the EinsteinExact thorns under the tests directory. These tests include:
Checks that the solutions provided by the Exact thorn converge to those provided by each of the EinsteinExact thorns at the appropriate order.
Checks that the constraints for the solutions provided by each of the EinsteinExact converge to \(0\) at the appropriate order.
In addition, the Metrics package has independent correctness tests which check that the provided metrics are correct.
Each thorn provided by EinsteinExact has a corresponding regression test in the EinsteinExact_code thorn which checks that no new bugs are introduced in the code.
Erik Schnetter contributed helpful comments and suggestions, along with some patches for the code.
[1] Eric W. Weisstein, Euler Angles, MathWorld–A Wolfram Web Resource. http://mathworld.wolfram.com/EulerAngles.html