GRHayLIDX

Samuel Cupp
Leonardo Rosa Werneck

\( \)Date\( \)

Abstract

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.

1 Introduction

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 HydroBaseX variables for compatibility with other thorns, but only Avec is set. The Aphi or B variables are not set by this thorn.

2 Parameters

The parameters are mostly self-explanatory or just extensions of HydroBaseX 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 HydroBaseX. 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.

2.1 HydroTest1D

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.

2.2 IsotropicGas

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 that the GRHayLibparameter GRHayLib::EOS_type is set to ”tabulated”, since this initial data setup only works for tabulated EOS. The run will end with an error message if this parameter

2.3 ConstantDensitySphere

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 that the GRHayLibparameter GRHayLib::EOS_type is set to ”tabulated”, since this initial data setup only works for tabulated EOS. The run will end with an error message if this parameter is not correctly set.

3 Parameters




beq_temperature
Scope: restricted REAL



Description: Temperature used to impose beta-equilibrium



Range Default: -1
0:*
Non-negative values
-1
Forbidden value






compute_entropy
Scope: restricted BOOLEAN



Description: Calculate entropy from initial data



Default: no






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_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






wave_amplitude
Scope: restricted REAL



Description: Wave amplitude for sound wave initial data



Range Default: 1.0e-3
0.0:*






initial_hydro
Scope: shared from HYDROBASEX 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

4 Interfaces

General

Implements:

grhaylidx

Inherits:

grhaylib

hydrobasex

Uses header:

GRHayLib.h

5 Schedule

This section lists all the variables which are assigned storage by thorn GRHayLET/GRHayLIDX. 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.

Storage

NONE

Scheduled Functions

HydroBaseX_InitialData (conditional)

  grhaylidx_1d_tests_hydro_data

  set initial hydrodynamic data for 1d test

 

  Language: c
  Type: function
  Writes: hydrobasex::rho(everywhere)
    hydrobasex::press(everywhere)
    hydrobasex::eps(everywhere)
    hydrobasex::vel(everywhere)

HydroBaseX_InitialData (conditional)

  grhaylidx_1d_tests_magnetic_data

  set initial magnetic data for 1d test

 

  After: grhaylidx_1d_tests_hydro_data
  Language: c
  Type: function
  Writes: hydrobasex::avecx(everywhere)
    hydrobasex::avecy(everywhere)
    hydrobasex::avecz(everywhere)
    hydrobasex::bvec(everywhere)

HydroBaseX_InitialData (conditional)

  grhaylidx_isotropicgas

  set initial hydrodynamic data for 1d test

 

  Language: c
  Type: function
  Writes: hydrobasex::rho(everywhere)
    hydrobasex::press(everywhere)
    hydrobasex::eps(everywhere)
    hydrobasex::vel(everywhere)
    hydrobasex::ye(everywhere)
    hydrobasex::temperature(everywhere)

HydroBaseX_InitialData (conditional)

  grhaylidx_constantdensitysphere

  set initial hydrodynamic data for 1d test

 

  Language: c
  Type: function
  Writes: hydrobasex::rho(everywhere)
    hydrobasex::press(everywhere)
    hydrobasex::eps(everywhere)
    hydrobasex::vel(everywhere)
    hydrobasex::ye(everywhere)
    hydrobasex::temperature(everywhere)

CCTK_INITIAL (conditional)

  grhaylidx_betaequilibrium

  set y_e, temperature, entropy, press, eps in neutrino free beta-equilibrium

 

  After: hydrobasex_initialdata
  Before: hydrobasex_postinitial
  Language: c
  Reads: hydrobasex::rho
  Type: function
  Writes: hydrobasex::press(everywhere)
    hydrobasex::eps(everywhere)
    hydrobasex::ye(everywhere)
    hydrobasex::temperature(everywhere)

(conditional)

  grhaylidx_compute_entropy_hybrid

  computes entropy from density and pressure using hybrid eos

 

  After: hydrobasex_initialdata
    impose_beta_equilibrium
  Before: hydrobasex_postinitial
  Language: c
  Reads: hydrobasex::rho
    hydrobasex::press
  Type: function
  Writes: hydrobasex::entropy(everywhere)

(conditional)

  grhaylidx_compute_entropy_tabulated

  computes entropy from density, y_e, and temperature using tabulated eos

 

  After: hydrobasex_initialdata
    impose_beta_equilibrium
  Before: hydrobasex_postinitial
  Language: c
  Reads: hydrobasex::rho
    hydrobasex::ye
    hydrobasex::temperature
  Type: function
  Writes: hydrobasex::rho(everywhere)
    hydrobasex::ye(everywhere)
    hydrobasex::temperature(everywhere)
    hydrobasex::entropy(everywhere)

Aliased Functions

 

Alias Name:         Function Name:
GRHayLIDX_BetaEquilibrium impose_beta_equilibrium