HydroBase

Tanja Bode <tanja.bode@physics.gatech.edu>
Frank Löffler <knarf@cct.lsu.edu>

April 29, 2010

Abstract

HydroBase extends the CactusEinstein framework to include an interface for magnetohydrodynamics to work within. HydroBase’s main function is to store the primitive variables, common among hydrodynamic simulations, commonly needed parameters, and schedule groups for the main functions of a hydrodynamics code. This has been done with an eye on Whisky, but can be used to implement any hydrodynamics formulation.

1 Introduction

The idea behind this thorn is to create a slim, common set of variables, parameters and scheduling groups which can then be used by different hydrodynamics codes. It should contain the common concepts of different hydrodynamics codes, but at the same time it should be as slim as possible to remain as general as possible. HydroBase should not contain the actual source code of typical routines of hydrodynamics codes, it should merely provide a common setup in which hydrodynamics codes can put their routines.

Because there exist different formulations of the hydrodynamics equations and not all of them involve concepts like conserved variabled or treat them differently, which is the reason why these variables are not defined in HydroBase but this is left to the hydrodynamics codes.

One of the advantages of such a common base is that modules of hydrodynamics codes only working with entities defined in HydroBase could be used interchangeably. Prime examples for this are initial data solvers or importers and analysis modules. Another advantage is that the format of output generated by different hydrodynamics codes in Cactus would be the same, including variable names and unit conventions, which would improve the ability to compare results of different codes directly a lot.

2 Using this Thorn

HydroBase is to be used as a central part of hydrodynamics fields just as ADMBase is used as a central part of spacetime evolution and analysis codes. HydroBase only stores variables which are common to most if not all hydrodynamics codes solving the Euler equations, the so called primitive variables. These are also the variables which are needed to couple to a spacetime solver and which are usually needed by analysis thorns. The usage of a common set of variables by different hydrodynamics codes creates the possibility to share parts of the code, e.g. initial data solvers or analysis routines.

Currently the defined primitive variables are (see [1] for details):

HydroBase also sets up scheduling blocks that organize the main functions which modules of a hydrodynamics code may need. All of those scheduling blocks are optional, however if used, they might simplify existing codes and make them more interoperable. HydroBase itself does not schedule something inside most of the groups which it provides.

Currently the scheduling blocks are:

In this way the initiation of the primitive variables, methods to recover the conservative variables, and basic atmosphere handling can be implemented in different thorns while allowing a central access point for analysis thorns.

3 Units

HydroBase does not require a specific set of units itself. However so that there are no misunderstandings between thorns a specific set of units is suggested. These units are derived from the conventions

Msun = 1 ; c = G = 1 (3)

which are commonly used in astrophysics and in relativity. The former sets the mass scale to the solar one and the latter adopts the same units for time, length and mass.

We assume the following definitions and constants of nature:

c = 299792458ms (4) G = 6.67428 1011m3kgs2 (5) μ0 = 4π107NA2 (6) 𝜖0 = 1 μ0c2 (7) Msun = 1.98892 1030kg (8)

This corresponds to the following units for mass, length, time, and magnetic field:

[M] = Msun (9) [L] = [M]Gc2 (10) [T] = [L]c (11) [B] = 1[L]𝜖0 Gc2(SI) (12) [B] = c2[L]G(Gaussian) (13)

Inserting the SI units into the above unit correspondences, we find the following conversion factors:

[L] = 1Msun 1.477km (14) [T] = 1Msun 4.92673μs (15) [B] = 1μ0 4πMsun 2.35537 1015T,(SI) (16) [B] = 1Msun1 2.35537 1019G,(Gaussian) (17)

where T (Tesla) is the magnetic field unit in SI, 1T = 1N(A m), and G (Gauss) is its cgs equivalent, 1Tesla = 104Gauss.

4 Acknowledgments

This thorn was produced by Tanja Bode, Roland Haas, Frank Löffler, and Erik Schnetter.

References

[1]   J. A. Font. Numerical hydrodynamics in General Relativity. Living Rev. Relativity, 3, 2000. [Article in on-line journal], cited on 31/07/01, http://www.livingreviews.org/ Articles/Volume3/2000-2font/index.html.