Nik Stergioulas, Roberto De Pietri, Frank Löfller

August 1 2017


Hydro_RNSID - rotating relativistic neutron stars.

1 Introduction

This thorn generates neutron star initial data for the GRHydro code. As with the Einstein Toolkit 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).

This thorn effectively takes the public domain code RNSID written by Nik Stergioulas and interpolates the output onto a Cartesian grid. This porting is based on an initila porting to Whisky by Luca Baiotti and Ian Hawke and has been adapted to GRHydro and Einstein Toolkit.


RNSID, or rotating neutron star initial data, is a code based on the Komatsu-Eriguch-Hachisu (KEH) method for constructing models of rotating neutron stars. It allows for polytropic or tabulated equations of state. For more details of the how the code works see [3], [4] (appendix A is particularly helpful) or especially [5] which is the most up to date and lists other possible methods of constructing rotating neutron star initial data.

In short Hydro_RNSID is a thorn that generate initial model for rotating isolated stars described by a zero-temperature tabulated Equation of State or an iso-entrophic politropic EOS. The activation of the thorn for genereting ID (The thorns “Hydro_Base” and “GRHydro” are the two prerequisites)

The model are generated specifing the central baryonic density (rho_central), the oblatness of the Star (axes_ratio) and the rotational profile (rotation_type). Currently two kinds of rotational profiles are implemented: “uniform” for uniformly rotating stars and “diff” for differentially rotating stars, described by the j-law profile (parametrized by the parameter A_diff=\(\hat {A}\)): \begin {equation} \Omega _c-\Omega = \frac {1}{\hat {A}^2 r_e^2} \left [ \frac {(\Omega -\omega ) r^2 \sin ^2 \theta e^{-2\nu }}{1-(\Omega -\omega )^2 r^2 \sin ^2 \theta e^{-2\nu }}\right ] \end {equation} where \(r_e\) is the equatorial radius of the star and \(\Omega \) is the rotational angular velocity \(\Omega =u^\phi /u^0\) and \(\Omega _c\) is \(\Omega \) at the center of the star.

3 Parameters of Thorn

Here one can find definition of the main parameter the determine the behaviour of the Thorn. The activation of the RNSID initial data is achieved by the following line:

ActiveThorns="Hydro_Base GRHydro Hydro_RNSID"
##### Setting for activating the ID
ADMBase::initial_data  = "hydro_rnsid"
ADMBase::initial_lapse = "hydro_rnsid"
ADMBase::initial_shift = "hydro_rnsid"

The correspongig section of the parameter file is:

##### Basic Setting
Hydro_rnsid::rho_central   = 1.28e-3  # central baryon density (G=c=1)
Hydro_rnsid::axes_ratio    = 1        # radial/equatorial axes ratio
Hydro_rnsid::rotation_type = diff     # uniform = uniform rotation
Hydro_rnsid::A_diff        = 1        # Parameter of the diff rot-law.
Hydro_rnsid::accuracy      = 1e-10    # accuracy goal for convergence

Than a section for setting the Equation of State (EOS) should be added. If this section is missing a “poly” EOS will be used with default parameters. The two possibilities are:

Isentropic Polytrope:

In this case the base setting for the initial data are specified giving the following parameters:

     ##### Setting for polytrope
     Hydro_rnsid::eos_type  = "poly"
     Hydro_rnsid::RNS_Gamma = 2.0
     Hydro_rnsid::RNS_K     = 165

They correspond at the following implementation of the EOS that it is consistent with the 1st Law of thermodinamics.

\begin {eqnarray} p &=& K \cdot \rho ^\Gamma \\ \epsilon &=& \frac {K}{\Gamma -1} \cdot \rho ^{\Gamma -1} \end {eqnarray}

and for the above choice of parameters corresponding to the choice \(K=165\) (in units where \(G=c=M_\odot =1\)) and \(\Gamma =2\).

Tabulated EOS:

In this case the (cold) EOS used to generate the initial data is read from a file

     ##### Setting for tabulated EOS
     Hydro_rnsid::eos_type  = "tab"
     Hydro_rnsid::eos_file  = "full_path_name_of_the tabulated_EOS_file"

The syntax of the tabulated file is the same as for the original RNSID program and assumes that all quantities are expressed in the cgs system of units. The first line contains the number of tabulated values (\(N\)) while the next \(N\) lines contain the values: \(e=\rho (1+\varepsilon )\), \(p\), \(\log h = c^2 \log _e((e+p)/\rho )\), and \(\rho \), respectively.

An additional section allows one to start initial data from a previously generated binary file or to save the data generated at this time. Usually the best way to proceed is to specify where the initial data file should be located.

##### Setting for recover and saving of 2d models
Hydro_rnsid::save_2Dmodel    = "yes"   # other possibility is no (default)
Hydro_rnsid::recover_2Dmodel = "yes"   # other possibility is no (default)
Hydro_rnsid::model2D_file    = "full_file_name"

For examples of initial data generated using RNSID and their evolutions, see [12]. In the par directory, examples are provided as a perl file that produces the corresponding Cactus par files. These examples correspond to the evolutions described in [12].

4 Utility program

Together with the Thorn, we distribute a self-executable version of the initial data routine RNSID that accepts the same parameters as the thorn and is able to create a binary file of the 2d initial data that can be directly imported into the evolution code. Moreover, the program RNS_readID is provided that reads a 2d initial data file and produces an hdf5 version of the data interpolated onto a 3d grid.


[1]   J. A. Font, N. Stergioulas and K. D. Kokkotas. Nonlinear hydrodynamical evolution of rotating relativistic stars: Numerical methods and code tests. Mon. Not. Roy. Astron. Soc., 313, 678, 2000.

[2]   F. Löffler, R. De Pietri, A. Feo, F. Maione and L. Franci, Stiffness effects on the dynamics of the bar-mode instability of neutron stars in full general relativity. Phys. Rev., D 91, 064057, 2015 (arXiv:1411.1963).

[3]   N. Stergioulas and J. L. Friedmann. Comparing models of rapidly rotating relativistic stars constructed by two numerical methods. ApJ., 444, 306, 1995.

[4]   N. Stergioulas. The structure and stability of rotating relativistic stars. PhD thesis, University of Wisconsin-Milwaukee, 1996.

[5]   N. Stergioulas. Rotating Stars in Relativity Living Rev. Relativity, 1, 1998. [Article in online journal], cited on 18/3/02, http://www.livingreviews.org/Articles/Volume1/1998-8stergio/index.html.

5 Parameters

Scope: private  REAL

Description: constant A in differential rotation law

Range   Default: 1.0
Any positive number

Scope: private  REAL

Description: rnsid accuracy in convergence

Range   Default: 1.0e-7
Any positive number

Scope: private  REAL

Description: rnsid axes ratio

Range   Default: 1
Any positive number

Scope: private  REAL

Description: Convergence factor

Range   Default: 1.0
Any positive number

Scope: private  STRING

Description: Equation of state table

Range   Default: (none)
EOS table file

Scope: private  KEYWORD

Description: Specify type of equation of state

Range   Default: poly
Polytropic EOS
Tabulated EOS

Scope: private  STRING

Description: Name of 2D model file

Range   Default: model2D.dat
Default 2D model file

Scope: private  KEYWORD

Description: Recover 2D model?

Range   Default: no
recover 2D model
don’t recover 2D model

Scope: private  REAL

Description: Central Density for Star

Range   Default: 1.24e-3

Scope: private  REAL

Description: A point is set to atmosphere if rho < (1+RNS_atmo_tolerance)*RNS_rho_min

Range   Default: 0.00001
Zero or larger. A useful value could be 0.0001

Scope: private  REAL

Description: If we’re using a different EoS at run time, this is the RNS Gamma

Range   Default: 2
Will be ignored if negative

Scope: private  REAL

Description: If we’re using a different EoS at run time, this is the RNS K

Range   Default: 100
Will be ignored if negative

Scope: private  INT

Description: max. term in Legendre poly.

Range   Default: 10
Any positive, non zero number

Scope: private  REAL

Description: A minimum rho below which evolution is turned off (atmosphere).

Range   Default: 1.0e-14
Atmosphere detection for RNSID

Scope: private  KEYWORD

Description: Specify type of rotation law

Range   Default: uniform
uniform rotation
KEH differential rotation law

Scope: private  KEYWORD

Description: Save 2D model?

Range   Default: no
save 2D model
don’t save 2D model

Scope: private  KEYWORD

Description: Set shift to zero?

Range   Default: no
set shift to zero
don’t set shift to zero

Scope: shared from HYDROBASE  KEYWORD

Extends ranges:

Construnct stationary initial data with rnsid

Scope: shared from HYDROBASE INT

6 Interfaces







Uses header:




7 Schedule

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



  ADMBase::metric[2] ADMBase::curv[2] ADMBase::lapse[2] ADMBase::shift[2]

Scheduled Functions

CCTK_PARAMCHECK (conditional)


  check parameters


 Type: function

HydroBase_Initial (conditional)


  create rotating neutron star initial data


 Sync: admbase::metric
 Type: function