TOVola is a thorn for the Einstien Toolkit that solves the Tolman-Oppenheimer-Volkov (TOV) equations for spherically symmetric static stars using an adaptive ODE method (RK45 or DP78) using GSL’s ODE solver. This TOV solver is compatible with three types of Equations of State (EOS): Simple Polytrope, Piecewise Polytrope, and Tabulated EOS. Examples of using each EOS is included in the par directory. Raw data is solved for, normalized, and set onto the ET grid, and constraint tested via the Baikal thorn.[1]
TOVola is a thorn developed to handle the TOV equations using multiple different types of EOS and use adaptive methods to solve the system of ODEs. It is specifically developed to solve the TOV equations and adjust and interpolate the TOV data to the ET grid.
TOVola features multiple EOS compatibility, for Simple and Piecewise Polytropes, as well as Tabulated EOS. EOS parameters are stored by the GRHayL library, GRHayLib [2], so make sure you specify for it either your polytropic parameters or your specific table path in your parfile.
Note that this section will not be a derivation of the equations. If more information is desired, see the original TOV papers [3, 4].
The TOV equations are the equations of hydrostatic equilibrium for relativistic stars that are spherically symmetric and static. They are as follows:
where we adopt geometerized units (G=c=1). We followed the form used in nrpytutorial.[5]
I will note that I will be differentiating between total energy density and baryon matter density as \(\rho _e\) and \(\rho _b\), respectively. \(P\) is the system’s pressure, \(m\) is mass, \(r\) is Schwarzchild radius, \(\nu \) is an associated metric function tied to the lapse, and \(\bar {r}\) is the isotropic radius.
One must also declare an EOS the relates \(P\) and \(\rho _b\):
TOVola has compatibility with three different types of EOS: Simple Polytrope, Piecewise Polytrope, and Tabulated EOS:
Furthermore, \(\rho _e\) and \(\rho _b\) are related by the following equation:
where \(\epsilon \) is the internal energy density.
The ODE solver that TOVola uses is the GSL ODE solver. It can solve any ODE system it is given, as long as it is broken into a set of 1st-order ODEs (exactly what the TOV equations are in the first place). It can handle a variety of ODE methods, as well as adaptive and non-adaptive methods. TOVola only enables the adaptive RK4(5) method (ARKF) and the adaptive DP7(8) method (ADP8). If there is demand, I can enable more methods, but these are the ones that I felt were of the most use.
The integration starts by calculating the initial pressure of the system from a given central baryon density, \(\rho _c\). Then, using GSL, it steps through the integration. The integration will continue until the termination condition is hit, which was chosen to be the surface of the star. It saves the solution for each step, reallocating memory for the stored solution if the solution gets sufficiently large.
Afterwards, the raw \(\bar {r}\) is normalized and conformal factors and lapses are calculated for further use in the toolkit. TOVola then uses an interpolator heavily inspired from the nrpytutorial[5] library to interpolate the adjusted data to the ET grid. From there, the grid functions are saved and, if needed, time levels are populated by copying the data over (as the TOVs are static).
The example parfiles give an example of what you can do with that data from there. In the example parfiles, the initial data is stored with Hydrobase and ADMbase, and the Baikal thorn calculates the constraint violation of the initial data. Gallery examples are also currently in the works that use the thorn GRHydro to evolve the initial data that was calculated by TOVola. In [2], initial data from TOVola is being used for the evolutions of TOV data. Once TOVola creates the initial data, it is up to the user to then decide what they want to use that initial data for.
In this section, I will explain the general use of this thorn.
For finding TOV solutions using TOVola, one only needs to set up variables in a parfile. Since most of the EOS information is stored by GRHayL, most of the TOVola parameters are related to the error tolerances for GSL, with the exception of the beta equilibrium temperature Tin and the choice of EOS type TOVola_EOS_type. To see examples of how to build a TOV parfile, just look at the examples in the par directory and follow suit.
As mentioned earlier, TOVola has 3 types of EOS that are compatible: Simple Polytrope, Piecewise Polytrope, and Tabulated EOS.
As GRHayL[2] holds the information on the EOS, you must set its parameters in the parfile as well. Depending on the EOS you are using, you will set different parameters (\(K\) and \(Gamma\) for polytropes, or a beta_equilibrium_temperature for Tabulated). For more details, please refer to the example parfiles in the par directory. They act as templates of how your parfile should look.
Aside from telling both TOVola and GRHayLib which EOS type you are using, GRHayLib also needs to know the polytropic parameters:
GRHayLib::Gamma_th
GRHayLib::Gamma_ppoly_in[0]
GRHayLib::k_ppoly0
Piecewise Polytrope is practically identical in setting up as the simple polytrope, however, you need to tell GRHayLib the polytropic parameters of each region, as well as how many regions you are using:
GRHayLib::neos
GRHayLib::Gamma_th
GRHayLib::Gamma_ppoly_in[i] for each region
GRHayLib::rho_ppoly_in[i] for each region boundary
GRHayLib::k_ppoly0
Setting up a Tabulated EOS is going to be rather different than the last two EOS types. GRHayLib needs to know a completely different set of variables than the polytropes. Instead of the polytropic parameters, you need to give GRHayLib information that will help it slice the table you are using. Furthermore, you will need to activate the GRHayLID thorn to impose a beta equilibrium temperature. This will allow for proper table slicing:
TOVola::TOVola_Tin, beta equilibrium temperature, to take the table slice we want
GRHayLib::EOS_tablepath, where your table is located.
GRHayLib::Y_e_atm
GRHayLib::Y_e_min
GRHayLib::Y_e_max
GRHayLib::T_atm
GRHayLib::T_min
GRHayLib::T_max
GRHayLID::impose_beta_equilibrium = yes
GRHayLID::beq_temperature
Please note: TOVola does NOT provide the EOS table. You must provide your own table to be able to use the Tabulated feature. HDF5 EOS tables are readily available at ”stellarcollapse.org”.
Example parfiles can be found in the thorn’s par directory. There is one for each type of EOS:
Simple.par
A Simple Polytrope example, with \(K=1.0\) and \(\Gamma =2.0\)
Piecewise.par
A Piecewise Polytrope example, using the Piecewise parameters for \(K_i\) and \(\Gamma _i\) of Read et. al for the SLy EOS.[6] 7 Regions are used in this example.
Tabulated.par
An Example of using a Tabulated EOS. One must replace the GRHayLib::EOS_tablepath in the parfile to the location of you EOS table. We used an SLy4 table for this specific example.
Baikal was used to test each EOS type and example for any Hamiltonian or momentum constraint violation, so these example parfiles still include constraint violation calculations.
Gallery examples are also being created that evolve the initial data with GRHydro and will be included in the example parfiles once they are acceptable.
I acknowledge the use of nrpytutorial[5] to generate a base interpolator to put the TOV data on the grid, of which I edited from there. I acknowledge the use of the GRHayL thorn, which was used to store and use EOS specific data in the solution to the TOVs.
[1] Z. Etienne. Document in the nrpytutorial github repo: https://nbviewer.jupyter.org/github/zachetienne/nrpytutorial/blob/master/Tutorial-ETK_thorn-BaikalETK.ipynb
[2] S. Cupp, L. Werneck, T. Pierre Jacques, Z. Etienne. Paper In Prep (6/24). Thorn found in the GRHayL directory of the toolkit
[3] R. C. Tolman, Phys. Rev. 55, 364 (1939).
[4] J. R. Oppenheimer and G. Volkoff, Physical Review 55, 374 (1939).
[5] Z. Etienne. Github repository: https://github.com/zachetienne/nrpytutorial
[6] J. Read, B. Lackey, B. Owen, and J. Friedman, Phys. Rev. D 79, 124032 (2008).
tovola_absolute_max_step | Scope: private | REAL |
Description: Biggest possible step size.
| ||
Range | Default: 1.0 | |
(0.0:* | Must be positive
| |
tovola_absolute_min_step | Scope: private | REAL |
Description: Smallest possible step size
| ||
Range | Default: 1.0e-20 | |
(0.0:* | Must be positive
| |
tovola_central_baryon_density | Scope: private | REAL |
Description: What’s the initial baryon density? (Used to calculate initial pressure).
| ||
Range | Default: 0.125 | |
(0.0:* | Must be Positive
| |
tovola_eos_type | Scope: private | KEYWORD |
Description: What EOS type are you using?
| ||
Range | Default: Simple | |
Simple | Simple Polytrope
| |
Piecewise | Piecewise Polytrope
| |
Tabulated | Tabulated EOS
| |
tovola_error_limit | Scope: private | REAL |
Description: Limiting factor of the error. Determines GSL’s Tolerance.
| ||
Range | Default: 1.0e-8 | |
(0.0:* | Must be Positive
| |
tovola_initial_ode_step_size | Scope: private | REAL |
Description: Initial Step Size
| ||
Range | Default: 1.0e-20 | |
(0.0:* | Must be Positive
| |
tovola_interpolation_stencil | Scope: private | INT |
Description: Stencil Size for Interpollator to Grid
| ||
Range | Default: 11 | |
1:* | Minimum stencil of 1
| |
tovola_max_interpolation_stencil | Scope: private | INT |
Description: Maximum Interpollator stencil
| ||
Range | Default: 13 | |
1:* | Minimum stencil of 1
| |
tovola_ode_method | Scope: private | KEYWORD |
Description: What type of ODE method are we using (More Methods can be added if there is
demand)
| ||
Range | Default: ARKF | |
ARKF | ”Adaptive Runge-Kutta-Fehlberg (RK4(5))”
| |
ADP8 | Adaptive Dormand-Prince Eigth Order (DP7(8))
| |
tovola_size | Scope: private | INT |
Description: Maximum number of steps
| ||
Range | Default: 10000000 | |
1:* | Minimum of 1 step
| |
tovola_tin | Scope: private | REAL |
Description: Beta Equilibrium Temperature
| ||
Range | Default: 1.0e-2 | |
(0.0:* | Must be Positive
| |
tovola_tov_populate_timelevels | Scope: private | INT |
Description: Populate that amount of timelevels
| ||
Range | Default: 1 | |
1:3 | 1 (default) to 3
| |
initial_hydro | Scope: shared from HYDROBASE | KEYWORD |
Extends ranges:
| ||
TOVola | TOV star initial hydrobase variables
| |
Implements:
tovola
Inherits:
grhaylib
admbase
hydrobase
grid
This section lists all the variables which are assigned storage by thorn GRHayLET/TOVola. 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
CCTK_PARAMCHECK
tovola_parameter_checker
check if interpollation stencil does not exceed maximum value, and eos type is used appropriately.
Language: | c | |
Options: | global | |
Type: | function | |
HydroBase_Initial (conditional)
tovola_tov_grid
group for the tov initial data
Sync: | admbase::metric | |
admbase::curv | ||
admbase::lapse | ||
admbase::shift | ||
rho | ||
press | ||
eps | ||
vel | ||
w_lorentz | ||
Type: | group | |
TOVola_TOV_Grid (conditional)
tovola_solve_and_interp
performs/drives the tov initial data solution algorithm. calls the integration function for the raw data, normalizes the data to make it more usable, and interpolates to the et grid.
Language: | c | |
Reads: | grid::coordinates | |
Type: | function | |
Writes: | admbase::curv(everywhere) | |
admbase::shift(everywhere) | ||
admbase::alp(everywhere) | ||
admbase::metric_p_p(everywhere) | ||
admbase::metric_p(everywhere) | ||
admbase::metric(everywhere) | ||
hydrobase::rho_p_p(everywhere) | ||
hydrobase::rho_p(everywhere) | ||
hydrobase::rho(everywhere) | ||
hydrobase::press_p_p(everywhere) | ||
hydrobase::press_p(everywhere) | ||
hydrobase::press(everywhere) | ||
hydrobase::eps_p_p(everywhere) | ||
hydrobase::eps_p(everywhere) | ||
hydrobase::eps(everywhere) | ||
hydrobase::vel_p_p(everywhere) | ||
hydrobase::vel_p(everywhere) | ||
hydrobase::vel(everywhere) | ||
hydrobase::w_lorentz_p_p(everywhere) | ||
hydrobase::w_lorentz_p(everywhere) | ||
hydrobase::w_lorentz(everywhere) | ||