xx DNSdata

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/usefulxfiles” 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 ”preparexDNSdata.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/usefulxfiles”: dns.th - it is a thorns list required by Cactus (and by GetComponents script to download all necessary components to compile Cactus).

dns.par - it is an example of Cactus input parameter file. There is a place in it to set the parameters related to DNSdata thorn. In particular, you must set the path to SGRID-generated initial data in it.

dns.cfg - it is a configuration file which contains a compilation options. (In particular, the SGRID library path is set in it. These lines are commented out because it is not necessary as you compile Cactus with SGRID as an External Library, see next line)

MyConfig - it is a file required by SGRID to be compiled with a proper options. You are setting here the compiler, libraries, etc. (Not necessary anymore, since SGRID exist as a Cactus External Library now and is already included in the thornlist ”dns.th”)

sxcomp.sh - it is just a sbatch submission script which you may use to compile Cactus. Of course, it is a template to be modified before using.

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::sgridxdatadir = ”pathxtoxIDxdirectory”

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

”checkpoint.0” - contains the SGIRD ID ”IDxdirectory.par” - is SGRID’s own parameter file - needs to have the same name as the containing dir plus the .par extension

”BNSdataxproperties.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:

HydroBase::initialxhydro = ”DNSdata”

ADMBase::initialxdata = ”DNSdata”

ADMBase::initialxlapse = ”DNSdata”

ADMBase::initialxshift = ”zero”

ADMBase::initialxdtlapse = ”DNSdata”

ADMBase::initialxdtshift = ”zero”

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 ”BNSdataxproperties.txt” file. Important points are:

a) Ensure that the center of the grid box in Cactus, specified by ”CarpetRegrid2::positionxxx1,” corresponds to the density maximum of the neutron star (NS), denoted as ”xmax1” in the SGRID-generated ”BNSdataxproperties.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 ”BNSdataxproperties.txt” needs to be shifted by the CM location ”xxCM” 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 ”BNSdataxproperties.txt”. For a piecewise polytrope the relevant lines are indicated by ”rho0xlist”, ”nxlist”, and ”kappa”. Here ”rho0xlist” specifies the rest mass densities at which we switch between polytropes. ”nxlist” gives the polytropic index n for each piece. Note that and . ”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 ”sgridxid” 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 ”DNSdataxtest.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 ”cctkxfinalxtime” is set to be equal to 10.0.

3.6 Thorn Source Code 3.7 Thorn Documentation 3.8 Acknowledgements References

4 Parameters

11 idfilesxdir 10 Scope: private01 STRING

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

11  Range  10              01  Default: (none)

11                        10

11

11 interpolatexmakexfinerxgrid2 10 Scope: private01  BOOLEAN

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

11                        10              01  Default: yes

11

11 interpolatexmaxxxyzxdiff 10 Scope: private01  REAL

11 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

11  Range  10              01  Default: -1.0

11 :  10

11

11 interpolatexverbose  10 Scope: private01  BOOLEAN

11 Description: whether we print all points to stdout

11                        10              01  Default: no

11 keepxsgridxoutput  10 Scope: private01  BOOLEAN

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

11                        10              01  Default: no

11

11 rotation180  10 Scope: private01  BOOLEAN

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

11                        10              01  Default: no

11

11 sgridxdatadir  10 Scope: private01  STRING

11 Description: location of sgrid outdir with data

11  Range  10              01  Default: (none)

11                        10

11

11 sgridxexe  10 Scope: private01  STRING

11 Description: location of sgrid executable

11  Range  10              01  Default: ./sgrid

11                        10

11

11 usexinterpolator  10 Scope: private01  BOOLEAN

11 Description: whether we use DNSdataReaderxinterpolator

11                        10              01  Default: yes

11

11 outxdir  10 Scope: shared from IO01STRING

11

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

CCTKxPARAMCHECK (conditional) x dnsdatapars x read pars from bnsdataxproperties.txt x

11 x 11 Language: 11 c
11 x 11 Type:  11 function

11

HydroBasexInitial (conditional) x dnsdatareader x read binary neutron star initial data x

11 x 11 Language: 11 c
11 x 11 Type:  11 function