Luca Baiotti, Ian Hawke, Scott Hawley



GRHydro_Init_Data - some initial data for GRHydro

1 Introduction

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 files (not very generic, tough) and a routine to set up the simple-wave initial data .

1.1 Tests

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.* files. 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

(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

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

1.2 Shocktube tests

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

Type ρLvLi𝜀 LρRvRi𝜀 R

Sod 1 0 1.5 0.125 0 0.15
Simple 10 0 20 1 0 106
Blast 1 0 1500 1 0 1.5 102

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].

1.3 Only atmosphere

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