DNSdata

Wolfgang Tichy <wolf@fau.edu>
Michal Pirog <mpirog@fau.edu>

October 28 2023

Abstract

This thorn allows one to use SGRID-generated initial data of Binary Neutron Stars as a starting point for the Cactus simulation.

1 Introduction

To initiate the simulations of Binary Neutron Stars, one needs realistic initial data that accurately encodes the state of both stars in orbit prior to merger. The numerical code, SGRID, allows the generation of initial data for stars characterized by arbitrary masses, spins, and orbital eccentricities, along with an equation of state.

SGRID is a separate numerical code that can create initial data. To do this, it has to be compiled and run separately from Cactus. This initial data can then be used by Cactus to conduct a time-dependent simulation. However, SGRID writes ID files in its own format. To make it usable for Cactus, it is necessary to provide this data on the grid points used by Cactus. This is achieved by interpolating data from SGRID’s grid points onto the grid points used by Cactus. The functions that perform the actual interpolation reside inside the SGRID library, which is usually compiled into Cactus by adding the thorn ExternalLibraries-SGRID.

To simplify this process, we have developed a Cactus thorn called DNSdata, which can read SGRID initial data into Cactus, allowing Cactus to perform the subsequent evolution.

2 Numerical Implementation

Sgrid is a separate numerical code which creates initial data. One may find the details in:
https://www.physics.fau.edu/~wolf/Research/FAU-sgrid/

3 Using This Thorn

3.1 Obtaining This Thorn

The arrangement containing the thorn can be downloaded by typing:

git clone git@github.com:wofti/CactusSgrid.git

The thorn is in the directory DNSdata.

The directory ”DNSdata/useful_files” contains several files that might be useful to a new user, such as the parfile example ”dns.par”.

Among other files, there is also a script named ”prepare_DNSdata.sh”. One can use it to set up Cactus together with this thorn. The only thing you need to do is execute the script, which will result in the downloading of Cactus and its components according to the thornlist ”dns.th”. The script contains many more lines that are currently commented out. These lines allow the user more flexibility during compilation, but it requires more independent work.

Explanation of the files in ”DNSdata/useful_files”:

3.2 Basic Usage

In order to read SGRID-generated initial data and make them ready for interpolation, the correct path to the ID directory must be provided. It requires the following variable in the parfile:

DNSdata::sgrid_datadir = ”path_to_ID_directory”

The standard SGRID ID packet is a directory containing three files:

  1. ”checkpoint.0” - contains the SGIRD ID

  2. ”ID_directory.par” - is SGRID’s own parameter file - needs to have the same name as the containing dir plus the .par extension

  3. ”BNSdata_properties.txt” - contains essential system characteristics that summarize the model

After the first initial stage of the run, when the SGRID interpolation is completed, the rest belongs solely to Cactus and is independent on the choice of ID delivery, in particular it is independent on this thorn.

3.3 Interaction With Other Thorns

The thorn DNSdata requires the following other thorns: ExternalLibraries-SGRID, ADMBase, and HydroBase.

To import metric quantities from an initial data solution, the following HydroBase and ADMBase variables need to be set to DNSdata:

3.4 Other useful information

Since some system characteristics are required by Cactus and should be correctly set in Cactus’ .par file, it is recommended to get familiar with ”BNSdata_properties.txt” file. Important points are:

a) Ensure that the center of the grid box in Cactus, specified by ”CarpetRegrid2::position_x_1,” corresponds to the density maximum of the neutron star (NS), denoted as ”xmax1” in the SGRID-generated ”BNSdata_properties.txt” file. IMPORTANT COMMENT about unequal mass binaries: SGRID uses coordinates where the origin of the coordinate system is at the point halfway between the two stars, whereas Cactus prefers coordinates where the origin is at the center of mass of the binary. The DNSdata thorn will translate the stars accordingly, but the user must understand where the stars then lie and should adjust the Cactus grid centers accordingly. I.e. ”xmax1” in ”BNSdata_properties.txt” needs to be shifted by the CM location ”x_CM” to obtain the x-coordinate in Cactus.

b) Ensure that the parameters related to the choice of the equation of state (EoS) align with SGRID’s EoS parameters. SGRID’s EoS is described in the file ”BNSdata_properties.txt”. For a piecewise polytrope the relevant lines are indicated by ”rho0_list”, ”n_list”, and ”kappa”. Here ”rho0_list” specifies the rest mass densities at which we switch between polytropes. ”n_list” gives the polytropic index n for each piece. Note that \(\Gamma = 1 + 1/n\) and \(P = K \rho _0^\Gamma \). ”kappa” specifies the K of the polytrope used for the lowest density.

3.5 Examples

We provide a sample of initial data located in the directory ”sgrid_id” within a standard ”test” directory. A brief test, which does not produce any output for the importer’s verification interface, is set up in the parfile ”DNSdata_test.par”, also located in the standard ”test” directory. It is a parfile based on slightly modified version of the ”bns.par” available at: https://www.einsteintoolkit.org/gallery/bns/bns.par.

It loads low-resolution initial data for spinless, equal-mass, highly eccentric, SLy-EoS system of Binary Neutron Star. The ”cctk_final_time” is set to be equal to 10.0.

3.6 Thorn Source Code

3.7 Thorn Documentation

3.8 Acknowledgements

References

4 Parameters




idfiles_dir
Scope: private STRING



Description: Directory with ID .dat-files already interpolated to our current bam grid (needed if DNSdataReader_use_interpolator = no)



Range Default: (none)






interpolate_make_finer_grid2
Scope: private BOOLEAN



Description: make finer grid2 to get a good guess for X,Y,Z [yes,no]



Default: yes






interpolate_max_xyz_diff
Scope: private REAL



Description: if positive we quit if x(X,Y,Z), y(X,Y,Z), z(X,Y,Z) differ by more than this from bam’s x,y,x



Range Default: -1.0
:






interpolate_verbose
Scope: private BOOLEAN



Description: whether we print all points to stdout



Default: no






keep_sgrid_output
Scope: private BOOLEAN



Description: whether we keep the output sgrid creates while running [yes,no]



Default: no






rotation180
Scope: private BOOLEAN



Description: rotate DNSdata by 180 degrees about z-axis [yes,no]



Default: no






sgrid_datadir
Scope: private STRING



Description: location of sgrid outdir with data



Range Default: (none)






sgrid_exe
Scope: private STRING



Description: location of sgrid executable



Range Default: ./sgrid






use_interpolator
Scope: private BOOLEAN



Description: whether we use DNSdataReader_interpolator



Default: yes






out_dir
Scope: shared from IOSTRING



5 Interfaces

General

Implements:

dnsdata

Inherits:

grid

summationbyparts

admbase

hydrobase

6 Schedule

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

CCTK_PARAMCHECK (conditional)

  dnsdatapars

  read pars from bnsdata_properties.txt

 

  Language: c
  Type: function

HydroBase_Initial (conditional)

  dnsdatareader

  read binary neutron star initial data

 

  Language: c
  Type: function