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 files (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.* 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
(which are the defaults), the output should be
The conservative to primitive to conservative test outputs the initial and final data which should agree.
There are three possible shock-tube problems, referred to as Sod, Simple and Blast, with initial data
Type | ||||||
Sod | 1 | 0 | 1.5 | 0.125 | 0 | 0.15 |
Simple | 10 | 0 | 20 | 1 | 0 | |
Blast | 1 | 0 | 1500 | 1 | 0 | |
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.