xx LeanBSSNMoL: An Einstein Toolkit thorn for evolving Einstein’s equations in the BSSN formalism with the MoL thorn

LeanBSSNMoL: An Einstein Toolkit thorn for evolving Einstein’s equations in the BSSN formalism with the MoL thorn

MiguelxZilhxo and HelvixWitek

June 30, 2023

Abstract

LeanBSSNMoL solves Einstein’s equations in the BSSN formalism with up to 6th order accurate finite-difference stencils. It relies on the MoL thorn for the time integration.

1 LeanBSSNMoL

The Lean code was first introduced inx[1], to evolve vacuum spacetimes with the BSSN formalism. It has since been modified to run with the MoL thorn for the time integration and generalized to include matter terms through the TmunuBase thorn. It was made publicly available through the Canuda numerical relativity libraryx[2], and has since been distributed also as a part of the Einstein Toolkit.

The bulk of the code is written in Fortranx90 and should be simple to follow – emphasis has been given to readability. The main part of the code, where the right-hand side of the evolution equations is computed, can be found in the file calcxbssnxrhs.F90. For the conformal factor the code uses the “W” version, i.e.x, and it employs the usual “1+log” and “Gamma-driver” gauge conditions.

2 Obtaining this thorn

LeanBSSNMoL is included with the Einstein Toolkit and can also be obtained through the Canuda numerical relativity libraryx[2].

References

[1]xxxU.xSperhake, “Binary black-hole evolutions of excision and puncture data,” Phys. Rev. D 76 (2007), 104015 doi:10.1103/PhysRevD.76.104015 [arXiv:gr-qc/0606079 [gr-qc]].

[2]xxxH.xWitek, M.xZilhao, G.xBozzola, C.-H.xCheng, A.xDima, M.xElley, G.xFicarra, T.xIkeda, R.xLuna, C.xRichards, N.xSanchis-Gual, H.xOkadaxdaxSilva. “Canuda: a public numerical relativity library to probe fundamental physics,” Zenodo (2023) doi: 10.5281/zenodo.3565474

3 Parameters

11 betaxalp 10 Scope: private01 REAL

11 Description: Exponent for lapse in front of the Gammax term in the shift

11 Range 10 01 Default: 0.0
11 *:*  10 Anything possible, default is zero

11 betaxfxdelta1  10 Scope: private01  REAL

11 Description: delta1 coefficient for the shift condition of 1702.01755

11 Range 10 01 Default: 0.0125
11 0:*  10 non-negative

11

11 betaxfxdelta2  10 Scope: private01  REAL

11 Description: delta2 coefficient for the shift condition of 1702.01755

11 Range 10 01 Default: 0.0005
11 0:*  10 non-negative

11

11 betaxgamma  10 Scope: private01  REAL

11 Description: Coefficient in front of the Gammax term in the shift

11 Range 10 01 Default: 0.75
11 *:*  10 Anything possible

11

11 calculatexconstraints  10 Scope: private01  BOOLEAN

11 Description: Calculate the BSSN constraints?

11                         10              01  Default: no

11

11 calculatexconstraintsxevery 10 Scope: private01  INT

11 Description: Calculate the BSSN constraints every N iterations

11 Range 10 01 Default: 1
11 *:*  10 0 or a negative value means never compute them

11

11 chixgamma  10 Scope: private01  REAL

11 Description: adding Yo-term to the gamma equation

11 Range 10 01 Default: 0.0
11 *:*  10 2/3 is a good value; the sign must be the same as betak,k

11

11 computexrhsxatxinitial  10 Scope: private01  BOOLEAN

11 Description: Compute RHS after the initial data?

11                         10              01  Default: no

11

11 confxfacxfloor  10 Scope: private01  REAL

11 Description: Minimal value of conformal factor

11 Range 10 01 Default: 1.0d-04
11 *:*  10 Any value possible

11

11 derivsxorder  10 Scope: private01  INT

11 Description: Order for derivatives

11 Range 10 01 Default: 4
11 4  10 4th order stencils
11 6  10 6th order stencils

11 epsxr  10 Scope: private01  REAL

11 Description: Minimal value of radius for etaxtransition

11 Range 10 01 Default: 1.0d-06
11 0:*  10 Any value possible

11

11 etaxbeta  10 Scope: private01  REAL

11 Description: Damping parameter in live shift

11 Range 10 01 Default: 1
11 0:*  10 non-negative

11

11 etaxtransition  10 Scope: private01  BOOLEAN

11 Description: Use an r-dependent eta?

11                         10              01  Default: no

11

11 etaxtransitionxr  10 Scope: private01  REAL

11 Description: Damping parameter in live shift

11 Range 10 01 Default: 1
11 0:*  10 non-negative

11

11 imposexconfxfacxfloorxatxinitial 10 Scope: private01  BOOLEAN

11 Description: Use floor value on initial data?

11                         10              01  Default: no

11

11 makexaaxtracefree  10 Scope: private01  BOOLEAN

11 Description: Remove trace of aij after each timestep?

11                         10              01  Default: yes

11

11 nxaij  10 Scope: private01  INT

11 Description: n power of outgoing boundary rn̂ fall off rate for Axij

11 Range 10 01 Default: 2
11 0:2  10 2 is reasonable

11

11 nxalpha  10 Scope: private01  INT

11 Description: n power of outgoing boundary rn̂ fall off rate for alpha

11 Range 10 01 Default: 1
11 0:2  10 1 is my guess

11

11 nxbeta  10 Scope: private01  INT

11 Description: n power of outgoing boundary rn̂ fall off rate for beta

11 Range 10 01 Default: 1
11 0:2  10 1 is my guess

11 nxconfxfac  10 Scope: private01  INT

11 Description: n power of outgoing boundary rn̂ fall off rate for confxfac

11 Range 10 01 Default: 1
11 0:2  10 1 is reasonable

11

11 nxgammat  10 Scope: private01  INT

11 Description: n power of outgoing boundary rn̂ fall off rate for Gammax

11 Range 10 01 Default: 1
11 0:2  10 Maybe 1?

11

11 nxhij  10 Scope: private01  INT

11 Description: n power of outgoing boundary rn̂ fall off rate for hxij

11 Range 10 01 Default: 1
11 0:2  10 1 is reasonable

11

11 nxtrk  10 Scope: private01  INT

11 Description: n power of outgoing boundary rn̂ fall off rate for Axij

11 Range 10 01 Default: 2
11 0:2  10 2 is reasonable

11

11 precollapsedxlapse  10 Scope: private01  BOOLEAN

11 Description: Initialize lapse as alp*psiˆ{ -2} ?

11                         10              01  Default: no

11

11 rescalexshiftxinitial  10 Scope: private01  BOOLEAN

11 Description: Initialize shift as psiˆ{ -2} beta ?

11                         10              01  Default: no

11

11 resetxdethh  10 Scope: private01  BOOLEAN

11 Description: Reset determinant of conformal metric?

11                         10              01  Default: no

11

11 usexadvectionxstencils  10 Scope: private01  BOOLEAN

11 Description: Use lop-sided stencils for advection derivs

11                         10              01  Default: yes

11

11 zxisxradial  10 Scope: private01  BOOLEAN

11 Description: use with multipatch

11                         10              01  Default: no

11

11 zetaxalpha  10 Scope: private01  REAL

11 Description: Coefficient in front of the ad1xalpha term in slicing

11 Range 10 01 Default: 1
11 *:*  10 Anything possible

11 zetaxbeta  10 Scope: private01  REAL

11 Description: Factor in front of ad1xbeta in the live shift

11 Range 10 01 Default: 1
11 0:*  10 non-negative

11

11 leanbssnxmaxnumconstrainedvars 10 Scope: restricted01  INT

11 Description: The maximum number of constrained variables used by LeanBSSNMoL

11 Range 10 01 Default: 16
11 16:16  10 metric(6), extrinsic curvature(6), dtlapse(1) and dtshift(3)

11

11 leanbssnxmaxnumevolvedvars 10 Scope: restricted01  INT

11 Description: The maximum number of evolved variables used by LeanBSSNMoL

11 Range 10 01 Default: 21
11 21:21  10 lapse (1), shift(3), hmetric (6), hcurv(6), trK (1), confxfac(1), Gamma (3)

11

11 leanbssnxmaxnumsandrvars10 Scope: restricted01  INT

11 Description: The maximum number of save and restore variables used by LeanBSSNMoL

11 Range 10 01 Default: (none)
11 0:0  10 none

11

11 molxnumxconstrainedxvars 10 Scope: shared from METHODOFLINES01INT

11

11 molxnumxevolvedxvars  10 Scope: shared from METHODOFLINES01INT

11

11 molxnumxsaveandrestorexvars 10 Scope: shared from METHODOFLINES01INT

11

4 Interfaces General Implements: leanbssnmol

Inherits: admbase tmunubase boundary coordgauge

Grid Variables

4.0.1 PUBLIC GROUPS

11 x Group Names x 10 x Variable Names x01 Details x 11 x
11 confxfac 10 confxfac 01 compact 11 0
11                    10                    01 description 11 conformal factor
11                    10                    01 dimensions 11 3
11                    10                    01 distribution 11 DEFAULT
11                    10                    01 group type 11 GF
11                    10                    01  tags 11 tensortypealias=”Scalar” tensorweight=-0.33333333333333333333
11                    10                    01 timelevels 11 3
11                    10                    01 variable type 11 REAL
11 rhsxconfxfac 10 rhsxconfxfac 01 compact 11 0
11                    10                    01 description 11 conformal factor
11                    10                    01 dimensions 11 3
11                    10                    01 distribution 11 DEFAULT
11                    10                    01 group type 11 GF
11                    10                    01  tags 11 tensortypealias=”Scalar” tensorweight=-0.33333333333333333333 prolongation=”none”
11                    10                    01 timelevels 11 1
11                    10                    01 variable type 11 REAL
11  hmetric  10                    01  compact 11 0
11                    10  hxx  01 description 11 \tilde gammaxij
11                    10  hxy  01 dimensions 11 3
11                    10  hxz  01 distribution 11 DEFAULT
11                    10  hyy  01 group type 11 GF
11                    10  hyz  01  tags 11 tensortypealias=”DDxsym” tensorweight=-0.66666666666666666667
11                    10  hzz  01 timelevels 11 3
11                    10                    01 variable type 11 REAL
11  rhsxhmetric  10                    01  compact 11 0
11                    10  rhsxhxx  01 description 11 \tilde gammaxij
11                    10  rhsxhxy  01 dimensions 11 3
11                    10  rhsxhxz  01 distribution 11 DEFAULT
11                    10  rhsxhyy  01 group type 11 GF
11                    10  rhsxhyz  01  tags 11 tensortypealias=”DDxsym” tensorweight=-0.66666666666666666667 prolongation=”none”
11                    10  rhsxhzz  01 timelevels 11 1
11                    10                    01 variable type 11 REAL
11  hcurv  10                    01  compact 11 0
11                    10  axx  01 description 11 \tilde axij
11                    10  axy  01 dimensions 11 3
11                    10  axz  01 distribution 11 DEFAULT
11                    10  ayy  01 group type 11 GF
11                    10  ayz  01  tags 11 tensortypealias=”DDxsym” tensorweight=-0.66666666666666666667
11                    10  azz  01 timelevels 11 3
11                    10                    01 variable type 11 REAL
11  rhsxhcurv  10                    01  compact 11 0
11                    10  rhsxaxx  01 description 11 \tilde axij
11                    10  rhsxaxy  01 dimensions 11 3
11                    10  rhsxaxz  01 distribution 11 DEFAULT
11                    10  rhsxayy  01 group type 11 GF
11                    10  rhsxayz  01  tags 11 tensortypealias=”DDxsym” tensorweight=-0.66666666666666666667 prolongation=”none”
11                    10  rhsxazz  01 timelevels 11 1
11                    10                    01 variable type 11 REAL

11 x Group Names x 10 x Variable Names x01 Details x 11 x
11  trk  10                    01  compact 11 0
11                    10  tracek  01 description 11 Tr(K)
11                    10                    01 dimensions 11 3
11                    10                    01 distribution 11 DEFAULT
11                    10                    01 group type 11 GF
11                    10                    01  tags 11 tensortypealias=”Scalar” tensorweight=0
11                    10                    01 timelevels 11 3
11                    10                    01 variable type 11 REAL
11  rhsxtrk  10                    01  compact 11 0
11                    10  rhsxtracek  01 description 11 Tr(K)
11                    10                    01 dimensions 11 3
11                    10                    01 distribution 11 DEFAULT
11                    10                    01 group type 11 GF
11                    10                    01  tags 11 tensortypealias=”Scalar” tensorweight=0 prolongation=”none”
11                    10                    01 timelevels 11 1
11                    10                    01 variable type 11 REAL
11  gammat  10                    01  compact 11 0
11                    10  gammatx  01 description 11 \tilde \Gammax
11                    10  gammaty  01 dimensions 11 3
11                    10  gammatz  01 distribution 11 DEFAULT
11                    10                    01 group type 11 GF
11                    10                    01  tags 11 tensortypealias=”U” tensorweight=0.66666666666666666667 tensorspecial=”Gamma”
11                    10                    01 timelevels 11 3
11                    10                    01 variable type 11 REAL
11 rhsxgammat 10 01 compact 11 0
11                    10  rhsxgammatx 01 description 11 \tilde \Gammax
11                    10  rhsxgammaty 01 dimensions 11 3
11                    10  rhsxgammatz 01 distribution 11 DEFAULT
11                    10                    01 group type 11 GF
11                    10                    01  tags 11 tensortypealias=”U” tensorweight=0.66666666666666666667 tensorspecial=”Gamma” prolongation=”none”
11                    10                    01 timelevels 11 3
11                    10                    01 variable type 11 REAL
11  rhsxlapse  10                    01  compact 11 0
11                    10  rhsxalp  01 description 11 lapse function
11                    10                    01 dimensions 11 3
11                    10                    01 distribution 11 DEFAULT
11                    10                    01 group type 11 GF
11                    10                    01  tags 11 tensortypealias=”Scalar” prolongation=”none”
11                    10                    01 timelevels 11 1
11                    10                    01 variable type 11 REAL
11  rhsxshift  10                    01  compact 11 0
11                    10  rhsxbetax  01 description 11 shift vector
11                    10  rhsxbetay  01 dimensions 11 3
11                    10  rhsxbetaz  01 distribution 11 DEFAULT
11                    10                    01 group type 11 GF
11                    10                    01  tags 11 tensortypealias=”U” prolongation=”none”
11                    10                    01 timelevels 11 1
11                    10                    01 variable type 11 REAL

11

11 x Group Names x 10 x Variable Names x01 Details x 11 x
11  ham  10                    01  compact 11 0
11                    10  hc  01 description 11 Hamiltonian constraint
11                    10                    01 dimensions 11 3
11                    10                    01 distribution 11 DEFAULT
11                    10                    01 group type 11 GF
11                    10                    01  tags 11 tensortypealias=”Scalar” tensorweight=0
11                    10                    01 timelevels 11 3
11                    10                    01 variable type 11 REAL
11  mom  10                    01  compact 11 0
11                    10  mcx  01 description 11 momentum constraints
11                    10  mcy  01 dimensions 11 3
11                    10  mcz  01 distribution 11 DEFAULT
11                    10                    01 group type 11 GF
11                    10                    01  tags 11 tensortypealias=”D” tensorweight=0
11                    10                    01 timelevels 11 3
11                    10                    01 variable type 11 REAL

Uses header: Slicing.h

5 Schedule This section lists all the variables which are assigned storage by thorn Lean/LeanBSSNMoL. 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 x

11 x 11 Conditional:
11 x 11 confxfac[3] rhsxconfxfac[1]
11 x 11 hmetric[3] rhsxhmetric[1]
11 x 11 hcurv[3] rhsxhcurv[1]
11 x 11 trk[3] rhsxtrk[1]
11 x 11 gammat[3] rhsxgammat[1]
11 x 11 rhsxlapse[1]
11 x 11 rhsxshift[1]
11 x 11 ham[3]
11 x 11 mom[3]

11 x 11 x

11

Scheduled Functions

CCTKxPARAMCHECK (conditional) x leanxparamcheck x check lean parameters for consistency x

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

11

CCTKxSTARTUP (conditional) x leanbssnxregisterslicing x register slicing

11 x 11 Language: 11 c
11 x 11 Options: 11 meta
11 x 11 Type:  11 function

11

CCTKxPOSTINITIAL (conditional) x leanbssnxcalcxbssnxrhsxbdry x mol boundary rhs calculation x

11 x 11 After:  11 leanbssnxcalcrhs
11 x 11 Language: 11 fortran
11 x 11 Type:  11 function

11

CCTKxPOSTINITIAL (conditional) x leanbssnxcalcxbssnxrhsxbdryxsph x mol boundary rhs calculation in spherical coordinates x

11 x 11 Language: 11 fortran
11 x 11 Type:  11 function

11

MoLxCalcRHS (conditional) x leanbssnxcalcxbssnxrhsxbdry x mol boundary rhs calculation x

11 x 11 After:  11 leanbssnxcalcrhs
11 x 11 Language: 11 fortran
11 x 11 Type:  11 function

11

MoLxRHSBoundaries (conditional) x leanbssnxcalcxbssnxrhsxbdryxsph x mol boundary rhs calculation in spherical coordinates x

11 x 11 Language: 11 fortran
11 x 11 Type:  11 function

11

MoLxPostStep (conditional) x leanbssnxresetxdetmetric x reset dethh = 1 x

11 x 11 Before: 11 leanbssnxboundaries
11 x 11 Language: 11 fortran
11 x 11 Type:  11 function

11

MoLxPostStep (conditional) x leanbssnxremovextra x remove trace of a

11 x 11 After:  11 resetxdetmetric
11 x 11 Before: 11 leanbssnxboundaries
11 x 11 Language: 11 fortran
11 x 11 Type:  11 function

11

MoLxPostStep (conditional) x leanbssnximposexconfxfacxfloor x make sure conformal factor does not drop below specified value x

11 x 11 Before: 11 leanbssnxboundaries
11 x 11 Language: 11 fortran
11 x 11 Type:  11 function

11

MoLxPostStep (conditional) x leanbssnxboundaries x mol boundary enforcement x

11 x 11 Language: 11 fortran
11 x 11 Options: 11 level
11 x 11 Sync:  11 admbase::lapse
11 x 11 x  11 admbase::shift
11 x 11 x  11 leanbssnmol::confxfac
11 x 11 x  11 leanbssnmol::hmetric
11 x 11 x  11 leanbssnmol::hcurv
11 x 11 x  11 leanbssnmol::trk
11 x 11 x  11 leanbssnmol::gammat
11 x 11 Type:  11 function

11

MoLxPostStep (conditional) x applybcs x apply boundary conditions x

11 x 11 After: 11 leanbssnxboundaries
11 x 11 Type: 11 group

11

MoLxPostStep (conditional) x leanbssnxbssn2adm x convert variables back to the adm ones x

11 x 11 After:  11 leanbssnxapplybcs
11 x 11 Before: 11 admbasexsetadmvars
11 x 11 Language: 11 fortran
11 x 11 Options: 11 local
11 x 11 Type:  11 function

11

CCTKxBASEGRID (conditional) x leanbssnxsymmetries x register symmetries of the bssn grid functions

11 x 11 Language: 11 fortran
11 x 11 Options: 11 global
11 x 11 Type:  11 function

11

CCTKxANALYSIS (conditional) x leanbssnxconstraints x compute constraints x

11 x 11 Language: 11 fortran
11 x 11 Type:  11 group

11

LeanBSSNxconstraints (conditional) x leanbssnxbssnxconstraints x compute constraints x

11 x 11 Language: 11 fortran
11 x 11 Type:  11 function

11

LeanBSSNxconstraints (conditional) x leanbssnxconstraintsxboundaries x enforce symmetry bcs in constraint computation x

11 x 11 After:  11 leanbssnxbssnxconstraints
11 x 11 Language: 11 fortran
11 x 11 Options: 11 level
11 x 11 Sync:  11 leanbssnmol::ham
11 x 11 x  11 leanbssnmol::mom
11 x 11 Type:  11 function

11

LeanBSSNxconstraints (conditional) x applybcs x apply boundary conditions x

11 x 11 After: 11 leanbssnxconstraintsxboundaries
11 x 11 Type: 11 group

11

CCTKxBASEGRID (conditional) x leanbssnxzeroxrhs x set all rhs functions to zero to prevent spurious nans x

11 x 11 After:  11 leanbssnxsymmetries
11 x 11 Language: 11 fortran
11 x 11 Type:  11 function

11

CCTKxINITIAL (conditional) x leanbssnxadm2bssn x convert initial data into bssn variables x

11 x 11 After:  11 admbasexpostinitial
11 x 11 Language: 11 fortran
11 x 11 Options: 11 local
11 x 11 Type:  11 function

11

CCTKxINITIAL (conditional) x leanbssnxboundaries x boundary enforcement x

11 x 11 After:  11 leanbssnxadm2bssn
11 x 11 Language: 11 fortran
11 x 11 Options: 11 level
11 x 11 Sync:  11 leanbssnmol::gammat
11 x 11 Type:  11 function

11

CCTKxINITIAL (conditional) x applybcs x apply boundary conditions x

11 x 11 After: 11 leanbssnxboundaries
11 x 11 Type: 11 group

11

MoLxRegister (conditional) x leanbssnxregistervars x register variables for mol x

11 x 11 Language: 11 c
11 x 11 Options: 11 meta
11 x 11 Type:  11 function

11

MoLxCalcRHS (conditional) x leanbssnxcalcxbssnxrhs x mol rhs calculation x

11 x 11 Language: 11 fortran
11 x 11 Type:  11 function

11

CCTKxPOSTINITIAL (conditional) x leanbssnxcalcxbssnxrhs x mol rhs calculation x

11 x 11 Before: 11 leanbssnxboundaries
11 x 11 Language: 11 fortran
11 x 11 Type:  11 function

Aliased Functions x

11 Alias Name: xxxxxxx  11 Function Name:
11 ApplyBCs  11 LeanBSSNxApplyBCs
11 LeanBSSNxcalcxbssnxrhs  11 LeanBSSNxCalcRHS
11 LeanBSSNxcalcxbssnxrhsxbdry  11 LeanBSSNxCalcRHSxBdry
11 LeanBSSNxcalcxbssnxrhsxbdryxsph 11 LeanBSSNxCalcRHSxBdryxSph