24/07/2008

Abstract

GRHydro_Init_Data - some initial data for GRHydro

This thorn generates some initial data for the GRHydro code. There are more (and more physically interesting) initial-data codes in other thorns. As with the GRHydro code itself, please feel free to add, alter or extend any part of this code. However please keep the documentation up to date (even, or especially, if it’s just to say what doesn’t work).

Currently this thorn contains a few tests that should really be test suites, some shock-tube initial data, a routine to set atmopshere everywhere on the grid (for tests), a routine to read initial data from ﬁles (not very generic, tough) and a routine to set up the simple-wave initial data .

There are tests of the TVD reconstruction routine and of the routines that convert between conservative and primitive variables. These all just produce output to the screen or to fort.* ﬁles. The reconstruction test outputs the function to be reconstructed and the boundary-extended values. The conservative-to-primitive test just outputs the two sets of variables. If you haven’t altered the code an if you set

eos_polytrope::eos_gamma = 2.0

eos_polytrope::eos_k = 100.0

eos_polytrope::eos_k = 100.0

(which are the defaults), the output should be

primitive variables:

rho : 1.29047172182043

velx : 9.902578465178671E-004

vely : 9.902578465178671E-004

velz : 9.902578465178671E-004

eps : 0.374770481293314

press : 166.531726481819

w_lor : 1.00000147091915

rho : 1.29047172182043

velx : 9.902578465178671E-004

vely : 9.902578465178671E-004

velz : 9.902578465178671E-004

eps : 0.374770481293314

press : 166.531726481819

w_lor : 1.00000147091915

The conservative to primitive to conservative test outputs the initial and ﬁnal data which should agree.

There are three possible shock-tube problems, referred to as Sod, Simple and Blast, with initial data

Type | ${\rho}_{{}_{L}}$ | ${v}_{{}_{L}}^{i}$ | ${\mathit{\epsilon}}_{{}_{L}}$ | ${\rho}_{{}_{R}}$ | ${v}_{{}_{R}}^{i}$ | ${\mathit{\epsilon}}_{{}_{R}}$ |

Sod | 1 | 0 | 1.5 | 0.125 | 0 | 0.15 |

Simple | 10 | 0 | 20 | 1 | 0 | $1{0}^{-6}$ |

Blast | 1 | 0 | 1500 | 1 | 0 | $1.5\cdot 1{0}^{-2}$ |

The shock shape can be planar (along each axis or along the main diagonal) or spherical and the position of the plane or of the center of the sphere can be chosen though parameters. If a diagonal shock is selected, the initial data is set to either the left or right state depending on where the centre of the cell falls. Cleverer routines that weight the initial data to avoid “staircasing” may be added if there is demand. For more discussion on shock tubes see [1].

For testing purposes, this routine sets all the points to the values of the atmosphere.