xx TOVSolver

TOVSolver

I.xHawke,

F.xLoeffler <loeffler@sissa.it >

May 16, 2024

Abstract

This thorn solves the Tolman-Oppenheimer-Volkov equations of hydrostatic equilibrium for a spherically symmetric static star.

1 Introduction

The Tolman-Oppenheimer-Volkoff solution is a static perfect fluid “star”. It is frequently used as a test of relativistic hydro codes. Here it is intended for use without evolving the matter terms. This provides a compact strong field solution which is static but does not contain singularities.

2 Equations

The equations for a TOV starx[1,x2,x3] are usually derived in Schwarzschild coordinates. In these coordinates, the metric can be brought into the form

This thorn is based on the notes of Thomas Baumgartex[4] that have been partially included in this documentation. However the notation for the fluid quantities followsx[5]. Here we are assuming that the stress energy tensor is given by where is the total energy, the pressure, the fluid four velocity, the rest-mass density, the specific internal energy, and

This enforces a polytropic equation of state. We note that in Cactus the units are .

The equations to give the initial data are solved (as usual) in the Schwarzschild-like coordinates with the areal radius labelled . The equations of the relativistic hydrostatic equilibrium are

Here is the gravitational mass inside the sphere radius , and the logarithm of the lapse. Once the integration is done for the interior of the star we match to the exterior (see below). In the exterior we have

In order to impose initial data in cartesian coordinates, we want to transform this solution to isotropic coordinates, in which the metric takes the form Here denotes the isotropic radius. Matching the two metrics, one obviously finds

As a result, we have an additional differential equation to solve in order to have , that is Given such a solution, the missing metric potential is simply given by In the following section we concentrate on solving Eq.x(??) in the exterior and in the interior of the star.

Then, given these one-dimensional data we interpolate to get data on the three-dimensional Cactus grid; that is, we interpolate on the three dimensional r given by the x, y, z variables the physical hydro and spacetime quantities that are function of the isotropic radius computed above. Only linear interpolation is used. This avoids problems at the surface of the star, and does not cause problems if the number of points in the one dimensional array is sufficient ( is the default, which should be sufficient for medium-sized grids).

2.1 Exterior

In the exterior of the star, , the mass is constant, and Eq.x(??) can be solved analytically up to a constant of integration. Fixing this constant such that and agree at infinity, we find or, solving for [cfr. Exercise 31.7 of MTWx[3]] The metric potential as a function of is obviously

2.2 Interior

In the interior, Eq,x(??) can not be integrated analytically, because is now a function of . Instead, we have to integrate The left hand side can be integrated analytically, and has a singular point at . The right hand side cannot be integrated analytically, but will also be singular at , which poses problems when trying to integrate the equation numerically. We therefore rewrite the right hand side by adding and subracting a term , which yields

Since close to the origin, the first term on the right hand side is now regular and the second one can be integrated analytically. As a result, we find Replacing the lower limits () temporarily with and , we can integrate the right hand side and find

or Here the constant of integration is related to the ratio evaluated at the origin (which is perfectly regular). It can be chosen such that the interior solution matches the exterior solution at the surface of the star. This requirement implies In this respect, let us recall how we do initial data for the system of equations at . Given a value of the central density (in Cactus units) we pose , , and , . The TOVxTiny number is hardwired into the code to avoid divide by zero errors; it is . Also the default parameters will give the TOV star used for the long term evolutions inx[6]. That is, a nonrotating () polytropic star with gravitational mass , circumferential radius km, central rest-mass density and .

3 Use of this thorn

To use this thorn to provide initial data for the ADMBase variables , , and just activate the thorn and set

ADMBase:initialxdata = ``TOV''.

There are two ways of coupling the matter sources to the thorn that evolves the Einstein equations. One is to use the CalcTmunu interface. This will give the components of the stress energy tensor pointwise across the grid. For an example of this, see thorn ADM in CactusEinstein.

To use the CalcTmunu interface you should

put the lines

     friend:xADMCoupling
     USESxINCLUDE:xCalcTmunu.inc
     USESxINCLUDE:xCalcTmunu_temps.inc
     USESxINCLUDE:xCalcTmunu_rfr.inc
     in your interface.ccl

In any routine requiring the matter terms, put

         #include ``CalcTmunuxtemps.inc'' in the variable declarations

         declare CCTKxREALs Ttt, Ttx, Tty, Ttz, Txx, Txy, Txz, Tyy, Tyz, Tzz.

Inside an i,j,k loop put #include ``CalcTmunu.inc''. This must be a Fortran routine (We could probably fix this if requested).

You then use the real numbers Ttt etc.xas the stress energy tensor at a point.

As an alternative you can use the grid functions StressEnergytt, StressEnergytx, etc.xdirectly to have the stress energy tensor over the entire grid. To do this you just need the line friend: ADMCoupling in your interface.ccl. Although this seems much simpler, you will now only get the contributions from the TOVSolver thorn. If you want to use other matter sources, most of the current thorns (CosmologicalConstant, the hydro code, the scalar field code) all use the CalcTmunu interface.

You also have the possibility to use a parameter GRHydrotovsolver::TOVxSeparation to obtain a spacetime consisting of one TOV-system for and a second (similar) for . This parameter sets the separation of the centers of two neutron stars, has to be positive and should be larger than twice the radius of one star. Be aware that the spacetime obtained by this is no physical spacetime and no solution of Einsteins Equations and therefore an IVP-run has to follow. This parameter was only introduced for testing purposes of the IVP-Solver and should only be considered as such. There would be better (and also easy) ways to obtain initial data for two TOVs than that.

References

[1]xxxR.xC. Tolman, Phys. Rev. 55, 364 (1939).

[2]xxxJ.xR. Oppenheimer and G. Volkoff, Physical Review 55, 374 (1939).

[3]xxxC.W.xMisner, K.S.xThorn and J.A.xWheeler, Gravitation (Freeman and co. NY, 1973).

[4]xxxT.xW. Baumgarte. There is a copy of his notes in this directory:

TOVSolver/doc. [5]xxxJ.xA. Font, M. Miller, W. Suen and M. Tobias, Phys. Rev. D61, 044011 (2000). [6]xxxJ.xA. Font, T. Goodale, S. Iyer, M. Miller, L. Rezzolla, E. Seidel, N. Stergioulas, W. Suen and

M. Tobias, Phys. Rev. D65, 084024 (2002).

4 Parameters

11pertxamplitude 10Scope: privatex01 REAL

11Description: Amplitude of perturbation

11 Range 10 x01 Default: 0.0
11*:*  10Anything

11

11perturb  10Scope: privatex01  BOOLEAN

11Description: Add density perturbation (you should solve the IVP if true)

11                        10  x01  Default: no

11tovxclearxinitialxdata  10Scope: privatex01  BOOLEAN

11Description: Clear initial data (spacetime)? Default is yes.

11                        10  x01  Default: yes

11

11tovxcombinexmethod  10Scope: privatex01  KEYWORD

11Description: Which combine method should be used.

11 Range 10 x01 Default: average
11maximum  10Take the maximum of rho and gxx as clue for the rest as clue.
11average  10Take the average of all available parts.

11

11tovxconformalxflatxthreexmetric 10Scope: privatex01  BOOLEAN

11Description: Use conformal factor to get the 3-metric flat. default is no

11                        10  x01  Default: no

11

11tovxdr  10Scope: privatex01  REAL

11Description: The spacing in the radial direction on the 1d grid

11 Range 10 x01 Default: 5.e-4
11(0.0:*  10Greater than 0

11

11tovxenforcexinterpolation 10Scope: privatex01  BOOLEAN

11Description: Enforce the interpolation of the data onto the Hydro GFs even without tov as specified initial data

11                        10  x01  Default: no

11

11tovxfakexevolution  10Scope: privatex01  INT

11Description: Fake evolution by setting ID at every step

11 Range 10 x01 Default: (none)
11*:*  10anything, 0 as off (default), everything else as on

11

11tovxfastxinterpolation  10Scope: privatex01  BOOLEAN

11Description: Use faster interpolation algorithm? Default is yes.

11                        10  x01  Default: yes

11

11tovxgamma  10Scope: privatex01  REAL

11Description: The polytropic constant in P = K rhoxamma

11 Range 10 x01 Default: 2.0
111.0:  10The physical range at high Lorentz factors is [1,2], but otherwise higher values of gamma can also be used

11

11tovxk  10Scope: privatex01  REAL

11Description: The polytropic constant in P = K rhoxamma

11 Range 10 x01 Default: 100.0
11(0.0:*  10Greater than 0

11

11tovxmomentumxpsixpower 10Scope: privatex01  INT

11Description: Power of Psi to be multiplied with Jx for Mom

11 Range 10 x01 Default: (none)
11*:*  10anything, 0 as default

11

11tovxnumxradial  10Scope: privatex01  INT

11Description: The number of radial points for the ODE integration

11 Range 10 x01 Default: 100000
111:*  10Greater than 0

11tovxnumxtovs  10Scope: privatex01  INT

11Description: The number of TOVs

11 Range 10 x01 Default: 1
111:*  10Greater than 0

11

11tovxpopulatextimelevels 10Scope: privatex01  INT

11Description: Populate that amount of timelevels

11 Range 10 x01 Default: 1
111:3  101 (default) to 3

11

11tovxpositionxx  10Scope: privatex01  REAL

11Description: Position of neutron star, x coordinate

11 Range 10 x01 Default: 0.0
11*:*  10real

11

11tovxpositionxy  10Scope: privatex01  REAL

11Description: Position of neutron star, y coordinate

11 Range 10 x01 Default: 0.0
11*:*  10real

11

11tovxpositionxz  10Scope: privatex01  REAL

11Description: Position of neutron star, z coordinate

11 Range 10 x01 Default: 0.0
11*:*  10real

11

11tovxproperposition  10Scope: privatex01  BOOLEAN

11Description: For use only with two NSs, atm only handles equal mass

11                        10  x01  Default: no

11

11tovxrhoxcentral  10Scope: privatex01  REAL

11Description: The central density

11 Range 10 x01 Default: 1e-3
11(0.0:*  10Must be positive

11

11tovxsavextoxdatafile  10Scope: privatex01  STRING

11Description: Only save data to file and exit

11 Range 10 x01 Default: (none)
11.*  10Any filename, not used if empty

11

11tovxsolvexforxtovs  10Scope: privatex01  INT

11Description: Solve for TOVs even if no TOV initial data was requested?

11 Range 10 x01 Default: 3
110:3  10”depreciated in favour of TOVSolver::TOVxEnfor cexInterpolation”

11

11tovxusexoldxinitialxdata 10Scope: privatex01  BOOLEAN

11Description: Take old initial data into account (spacetime)? Default is no.

11                        10  x01  Default: no

11

11tovxusexoldxmatterxinitialxdata 10Scope: privatex01  BOOLEAN

11Description: Use also old matter initial data? Default is no.

11                        10  x01  Default: no

11tovxvelocityxx  10Scope: privatex01  REAL

11Description: (fixed) Velocity of neutron star, x coordinate (caution!)

11 Range 10 x01 Default: 0.0
11*:*  10real

11

11tovxvelocityxy  10Scope: privatex01  REAL

11Description: (fixed) Velocity of neutron star, y coordinate (caution!)

11 Range 10 x01 Default: 0.0
11*:*  10real

11

11tovxvelocityxz  10Scope: privatex01  REAL

11Description: (fixed) Velocity of neutron star, z coordinate (caution!)

11 Range 10 x01 Default: 0.0
11*:*  10real

11

11conformalxstorage  10Scope: shared from STATICCONFORMALx01KEYWORD

11

5 Interfaces

General Implements: tovsolver

Inherits: admbase hydrobase constants staticconformal

Uses header: constants.h

Provides: SetxRhoxADM to SetxMomentumxSource to SetxInitialxGuessxforxu to RescalexSources to 6 Schedule This section lists all the variables which are assigned storage by thorn EinsteinInitialData/TOVSolver. 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

CCTKxPARAMCHECK x tovxcxparamcheck x check parameters x

11x11Language:11c
11 x 11Options: 11global
11 x 11Type: 11function

11

CCTKxWRAGH x tovxcxallocatememory x allocate memory for tovsolverxc x

11x11Language:11c
11 x 11Options: 11global
11 x 11Type: 11function

11

CCTKxPOSTPOSTINITIAL (conditional) x tovxcxfreememory x free memory from tovsolverxc x

11x11Language:11c
11 x 11Options: 11global
11 x 11Type: 11function

11

HydroBasexInitial (conditional) x tovxinitialxdata x group for the tov initial data

11x11Sync: 11admbase::metric
11 x 11x  11admbase::curv
11 x 11x  11admbase::lapse
11 x 11x  11admbase::shift

11 x 11x  11rho

11 x 11x  11press

11 x 11x  11eps
11 x 11x  11vel

11 x 11x  11wxlorentz
11 x 11Type:11group

11

TOVxInitialxData (conditional) x tovxcxintegratexrhs x integrate the 1d equations for the tov star x

11x11Language:11c
11 x 11Options: 11global
11 x 11Type: 11function
11 x 11Writes: 11staticconformal::conformalxstate(everywhere)

11

TOVxInitialxData (conditional) x tovxwritex1dxdatafile x save data to file and exit x

11x11After: 11tovxcxintegratexrhs
11 x 11Before: 11tovxcxexact
11 x 11Language:11c
11 x 11Options: 11global
11 x 11Type: 11function

11

TOVxInitialxData (conditional) x tovxsetxproperpositions x steer ns position parameters according to proper distance x

11x11After: 11tovxcxintegratexrhs
11 x 11Before: 11tovxcxexact
11 x 11Language:11c
11 x 11Options: 11global
11 x 11Type: 11function

11

TOVxInitialxData (conditional) x tovxcxexact x set up the 3d quantities for the tov star

11x11After: 11tovxcxintegratexrhs
11 x 11Language:11c
11 x 11Reads: 11staticconformal::conformalxstate
11 x 11x  11admbase::shiftxstate
11 x 11x  11grid::coordinates
11 x 11Type: 11function
11 x 11Writes: 11admbase::alp(everywhere)
11 x 11x  11admbase::curv(everywhere)
11 x 11x  11admbase::metricxpxp(everywhere)
11 x 11x  11admbase::metricxp(everywhere)
11 x 11x  11admbase::metric(everywhere)
11 x 11x  11admbase::shift(everywhere)
11 x 11x  11hydrobase::epsxpxp(everywhere)
11 x 11x  11hydrobase::rhoxpxp(everywhere)
11 x 11x  11hydrobase::velxpxp(everywhere)
11 x 11x  11hydrobase::wxlorentzxpxp(everywhere)
11 x 11x  11hydrobase::epsxp(everywhere)
11 x 11x  11hydrobase::rhoxp(everywhere)
11 x 11x  11hydrobase::velxp(everywhere)
11 x 11x  11hydrobase::wxlorentzxp(everywhere)
11 x 11x  11hydrobase::eps(everywhere)
11 x 11x  11hydrobase::rho(everywhere)
11 x 11x  11hydrobase::vel(everywhere)
11 x 11x  11hydrobase::wxlorentz(everywhere)
11 x 11x  11hydrobase::press(everywhere)
11 x 11x  11staticconformal::psi(everywhere)
11 x 11x  11staticconformal::confacx1derivs(everywhere)
11 x 11x  11staticconformal::confacx2derivs(everywhere)

11

(conditional) x tovxpreparexfakexevolution x prepare for fake evolution x

11x11After: 11tovxcxexact
11 x 11Language:11c
11 x 11Type: 11function

11

MoLxPostStep (conditional) x tovxcxexact x use fake evolution x

11x11After: 11hydrobasexpoststep
11 x 11Language:11c
11 x 11Reads: 11staticconformal::conformalxstate
11 x 11x  11admbase::shiftxstate
11 x 11Type: 11function
11 x 11Writes: 11admbase::alp(everywhere)
11 x 11x  11admbase::curv(everywhere)
11 x 11x  11admbase::metric(everywhere)
11 x 11x  11admbase::shift(everywhere)
11 x 11x  11hydrobase::eps(everywhere)
11 x 11x  11hydrobase::press(everywhere)
11 x 11x  11hydrobase::rho(everywhere)
11 x 11x  11hydrobase::wxlorentz(everywhere)
11 x 11x  11hydrobase::vel(everywhere)
11 x 11x  11staticconformal::psi(everywhere)
11 x 11x  11staticconformal::confacx1derivs(everywhere)
11 x 11x  11staticconformal::confacx2derivs(everywhere)