Provides simple magnetohydrodynamic (MHD) initial data for testing, as well as functionality for imposing beta equilibrium on initial hydrodynamic data and computing the initial entropy. The test data includes the Balsara tests, a cylindrical explosion, etc. While some initial data requires EOS information provided by GRHayLib, the data can then be used by any evolution thorn so long as their EOS framework is set up to match GRHayLib.
This thorn provides a variety of initial data setups for testing GRMHD evolution codes. For 1D, this includes all five Balsara tests, equilibrium initial data, a sound wave, and a shock tube. For 3D, we provide isotropic gas and constant-density sphere initial data. We also provide the option to impose beta-equilibrium on provided initial data.
The initial data is separated into magnetic and hydrodynamic parts, so the magnetic initial data can be turned off if desired. All settings use the HydroBase variables for compatibility with other thorns, but only Avec is set. The Aphi or B variables are not set by this thorn.
The parameters are mostly self-explanatory or just extensions of HydroBase keywords. The param.ccl is divided into sections based on which tests the parameters are for, but we explain them here. The type of test is controlled by initial_hydro from HydroBase. All the options for these parameters are explicitly listed by the autogenerated parameter documentation below.
Note that neither beta equilibrium nor entropy calculation are tied to initial_hydro, so they can be used even if the actual initial data is set by another thorn. Beta equilibrium is controlled by the impose_beta_equilibrium parameter, and entropy calculation controlled by the compute_entropy parameter.
Some initial data is only valid for tabulated or hybrid EOS, and these check the EOS parameter from GRHayLib. If it is set incorrectly, the run will end with an error message stating the incompatibility. They will also check if HydroBase parameters are set in a compatible fashion (such as HydroBase::initial_temperature) and will also error out if these are set incorrectly.
This option is used for all the 1D tests we provide. The initial_data_1D parameter chooses the specific test and defaults to the Balsara1 test. For shocks and waves, the shock_direction parameter changes the direction of the shock, and the discontinuity_position parameter changes the location of the shock front. For the sound wave test, the amplitude can be set with wave_amplitude.
This option sets the hydrodynamic variables to an isotropic gas using the tabulated equation of state and does not work with other EOS settings. It does not set magnetic quantities. The thorn checks to ensure parameters are set correctly in GRHayLiband HydroBaseso that the initial data works, and the run will end with an error message if the core parameters are misconfigured.
Specifically, the thorn checks the following parameters:
Thorn & Parameter | Correct Setting |
GRHayLib::EOS_type | ”tabulated” |
HydroBase::initial_Y_e | ”GRHayLID” |
HydroBase::initial_temperature | ”GRHayLID” |
This option sets the hydrodynamic variables to a sphere of constant density using the tabulated equation of state and does not work with other EOS settings. It does not set magnetic quantities. The thorn checks to ensure parameters are set correctly in GRHayLiband HydroBaseso that the initial data works, and the run will end with an error message if the core parameters are misconfigured.
Specifically, the thorn checks the following parameters:
Thorn & Parameter | Correct Setting |
GRHayLib::EOS_type | ”tabulated” |
HydroBase::initial_Y_e | ”GRHayLID” |
HydroBase::initial_temperature | ”GRHayLID” |
beq_temperature | Scope: restricted | REAL |
Description: Temperature used to impose beta-equilibrium
| ||
Range | Default: -1 | |
0:* | Non-negative values
| |
-1 | Forbidden value
| |
constantdensitysphere_rho_exterior | Scope: restricted | REAL |
Description: Exterior density in geometrized units
| ||
Range | Default: -1 | |
0:* | Non-negative values
| |
-1 | Forbidden value
| |
constantdensitysphere_rho_interior | Scope: restricted | REAL |
Description: Interior density in geometrized units
| ||
Range | Default: -1 | |
0:* | Non-negative values
| |
-1 | Forbidden value
| |
constantdensitysphere_sphere_radius | Scope: restricted | REAL |
Description: Sphere radius in geometrized units
| ||
Range | Default: -1 | |
0:* | Non-negative values
| |
-1 | Forbidden value
| |
constantdensitysphere_t_exterior | Scope: restricted | REAL |
Description: Exterior temperature in MeV
| ||
Range | Default: -1 | |
0:* | Non-negative values
| |
-1 | Forbidden value
| |
constantdensitysphere_t_interior | Scope: restricted | REAL |
Description: Interior temperature in MeV
| ||
Range | Default: -1 | |
0:* | Non-negative values
| |
-1 | Forbidden value
| |
constantdensitysphere_vx_interior | Scope: restricted | REAL |
Description: Interior x-velocity
| ||
Range | Default: (none) | |
*:* | Anything goes
| |
constantdensitysphere_vy_interior | Scope: restricted | REAL |
Description: Interior y-velocity
| ||
Range | Default: (none) | |
*:* | Anything goes
| |
constantdensitysphere_vz_interior | Scope: restricted | REAL |
Description: Interior z-velocity
| ||
Range | Default: (none) | |
*:* | Anything goes
| |
constantdensitysphere_y_e_exterior | Scope: restricted | REAL |
Description: Exterior electron fraction (dimensionless)
| ||
Range | Default: -1 | |
0:* | Non-negative values
| |
-1 | Forbidden value
| |
constantdensitysphere_y_e_interior | Scope: restricted | REAL |
Description: Interior electron fraction (dimensionless)
| ||
Range | Default: -1 | |
0:* | Non-negative values
| |
-1 | Forbidden value
| |
discontinuity_position | Scope: restricted | REAL |
Description: Set location of the shock discontinuity
| ||
Range | Default: 0.0 | |
*:* | ||
impose_beta_equilibrium | Scope: restricted | BOOLEAN |
Description: Impose beta-equilibrium on initial data
| ||
Default: no | ||
initial_data_1d | Scope: restricted | KEYWORD |
Description: Set initial data type for 1D tests
| ||
Range | Default: Balsara1 | |
equilibrium | initial data for the equilibrium test
| |
sound wave | initial data for the sound wave test
| |
shock tube | initial data for the shock tube test
| |
Balsara1 | initial data for the Balsara1 test
| |
Balsara2 | initial data for the Balsara2 test
| |
Balsara3 | initial data for the Balsara3 test
| |
Balsara4 | initial data for the Balsara4 test
| |
Balsara5 | initial data for the Balsara5 test
| |
initialize_magnetic_quantities | Scope: restricted | BOOLEAN |
Description: Set whether Avec should be initialized
| ||
Default: yes | ||
isotropicgas_rho | Scope: restricted | REAL |
Description: Gas density in geometrized units
| ||
Range | Default: -1 | |
0:* | Non-negative values
| |
-1 | Forbidden value
| |
isotropicgas_temperature | Scope: restricted | REAL |
Description: Gas temperature in MeV
| ||
Range | Default: -1 | |
0:* | Non-negative values
| |
-1 | Forbidden value
| |
isotropicgas_y_e | Scope: restricted | REAL |
Description: Gas electron fraction (dimensionless)
| ||
Range | Default: -1 | |
0:* | Non-negative values
| |
-1 | Forbidden value
| |
shock_direction | Scope: restricted | KEYWORD |
Description: Set direction for shock in test data
| ||
Range | Default: x | |
x | Test data will have discontinuities along x direction
| |
y | Test data will have discontinuities along y direction
| |
z | Test data will have discontinuities along z direction
| |
stagger_a_fields | Scope: restricted | BOOLEAN |
Description: Sets whether Avec is staggered to +1/2 (following IllinoisGRMHD convention)
| ||
Default: yes | ||
wave_amplitude | Scope: restricted | REAL |
Description: Wave amplitude for sound wave initial data
| ||
Range | Default: 1.0e-3 | |
0.0:* | ||
initial_avec | Scope: shared from HYDROBASE | KEYWORD |
Extends ranges:
| ||
GRHayLID | Initial vector potential set by GRHayLID
| |
initial_bvec | Scope: shared from HYDROBASE | KEYWORD |
Extends ranges:
| ||
GRHayLID | Initial magnetic fields set by GRHayLID
| |
initial_entropy | Scope: shared from HYDROBASE | KEYWORD |
Extends ranges:
| ||
GRHayLID | Initial entropy set by GRHayLID
| |
initial_hydro | Scope: shared from HYDROBASE | KEYWORD |
Extends ranges:
| ||
HydroTest1D | ”Initial data set by 1D test; see test_1D_initial_data parameter
for options”
| |
IsotropicGas | Initial data set to isotropic gas
| |
see [1] below | Initial data set to constant density sphere
| |
[1]
ConstantDensitySphere
initial_temperature | Scope: shared from HYDROBASE | KEYWORD |
Extends ranges:
| ||
GRHayLID | Initial temperature set by GRHayLID
| |
initial_y_e | Scope: shared from HYDROBASE | KEYWORD |
Extends ranges:
| ||
GRHayLID | Initial Y_e set by GRHayLID
| |
Implements:
grhaylid
Inherits:
grhaylib
grid
hydrobase
Uses header:
GRHayLib.h
This section lists all the variables which are assigned storage by thorn GRHayLET/GRHayLID. Storage can either last for the duration of the run (Always means that if this thorn is activated storage will be assigned, Conditional means that if this thorn is activated storage will be assigned for the duration of the run if some condition is met), or can be turned on for the duration of a schedule function.
NONE
HydroBase_Initial (conditional)
grhaylid_1d_tests_hydro_data
set initial hydrodynamic data for 1d test
Language: | c | |
Reads: | grid::coordinates | |
Type: | function | |
Writes: | hydrobase::rho(everywhere) | |
hydrobase::press(everywhere) | ||
hydrobase::eps(everywhere) | ||
hydrobase::vel(everywhere) | ||
HydroBase_Initial (conditional)
grhaylid_1d_tests_magnetic_data
set initial magnetic data for 1d test
After: | grhaylid_1d_tests_hydro_data | |
Language: | c | |
Reads: | grid::coordinates | |
Type: | function | |
Writes: | hydrobase::avec(everywhere) | |
hydrobase::bvec(everywhere) | ||
HydroBase_Initial (conditional)
grhaylid_isotropicgas
set initial hydrodynamic data for 1d test
Language: | c | |
Reads: | grid::coordinates | |
Type: | function | |
Writes: | hydrobase::rho(everywhere) | |
hydrobase::press(everywhere) | ||
hydrobase::eps(everywhere) | ||
hydrobase::vel(everywhere) | ||
hydrobase::y_e(everywhere) | ||
hydrobase::temperature(everywhere) | ||
HydroBase_Initial (conditional)
grhaylid_constantdensitysphere
set initial hydrodynamic data for 1d test
Language: | c | |
Reads: | grid::coordinates | |
Type: | function | |
Writes: | hydrobase::rho(everywhere) | |
hydrobase::press(everywhere) | ||
hydrobase::eps(everywhere) | ||
hydrobase::vel(everywhere) | ||
hydrobase::y_e(everywhere) | ||
hydrobase::temperature(everywhere) | ||
CCTK_INITIAL (conditional)
grhaylid_betaequilibrium
set y_e, temperature, entropy, press, eps in neutrino free beta-equilibrium
After: | hydrobase_initial | |
Before: | hydrobase_prim2coninitial | |
Language: | c | |
Reads: | hydrobase::rho | |
Type: | function | |
Writes: | hydrobase::press(everywhere) | |
hydrobase::eps(everywhere) | ||
hydrobase::y_e(everywhere) | ||
hydrobase::temperature(everywhere) | ||
CCTK_INITIAL (conditional)
grhaylid_compute_entropy_hybrid
computes entropy from density and pressure using hybrid eos
After: | hydrobase_initial | |
impose_beta_equilibrium | ||
Before: | hydrobase_prim2coninitial | |
Language: | c | |
Reads: | hydrobase::rho | |
hydrobase::press | ||
Type: | function | |
Writes: | hydrobase::entropy(everywhere) | |
CCTK_INITIAL (conditional)
grhaylid_compute_entropy_tabulated
computes entropy from density, y_e, and temperature using tabulated eos
After: | hydrobase_initial | |
impose_beta_equilibrium | ||
Before: | hydrobase_prim2coninitial | |
Language: | c | |
Reads: | hydrobase::rho | |
hydrobase::y_e | ||
hydrobase::temperature | ||
Type: | function | |
Writes: | hydrobase::rho(everywhere) | |
hydrobase::press(everywhere) | ||
hydrobase::eps(everywhere) | ||
hydrobase::entropy(everywhere) | ||
hydrobase::y_e(everywhere) | ||
hydrobase::temperature(everywhere) | ||
Alias Name: | Function Name: |
GRHayLID_BetaEquilibrium | impose_beta_equilibrium |