xx VolumeIntegralsvacuum: An Einstein Toolkit thorn for volume integrations in vacuum spacetimes

VolumeIntegralsxvacuum: An Einstein Toolkit thorn for volume integrations in vacuum spacetimes

Zachariah B.xEtienne <zachetie *at* gmail *dot* com > Leonardo R.xWerneck <wernecklr *at* gmail *dot* com >

Ian Ruchlin <ianruchlin *at* gmail *dot* com >

July 27, 2023

Abstract

VolumeIntegralsxvacuum is a thorn for integration of spacetime quantities, accepting integration volumes consisting of spherical shells, regions with hollowed balls, and simple spheres.

1 Volume integrals We now briefly describe the volume integrals that can be performed using the VolumeIntegralsxvacuum thorn.

1.1 -norm

For a given field , the -norm of the field, , is computed using the volume integral where is the volume element.

1.2 Center of the lapse

The center of the lapse, , volume integral yields results which are pretty consistent with the center of mass volume integral. We compute it using where is the lapse function, is the position vector and is the volume element.

1.3 ADM mass

The ADM mass, is computed using equation (A.5) inx[1] (see also eq. (7.15) inx[2]) where is the surface of integration and , with the unit outward-pointing normal vector to the surface and the area element. To obtain the equation above, the physical spatial metric, , has been decomposed using

where is the Kronecker delta and represents the flat space metric in Cartesian coordinates, while is a small perturbation around flat space physical spatial metric. In practice, we do not take the integration surface to be at infinity, and therefore we implement the expression where is the inverse spatial metric.

1.4 ADM momentum

The ADM momentum, , is obtained from equation (A.6) in [1] (see also eq. (7.56) in [2]) where is the extrinsic curvature and is the mean curvature. Like the ADM mass, the integration is not performed at infinity, and the implemented equation is 1.5 ADM angular momentum

The ADM angular momentum, , follows from equation (A.7) in [1] (see also eq. (7.63) in [2]) where is the three-dimensional Levi-Civita tensor and are the components of the position vector in Cartesian coordinates. At a finite distance from the origin this equation is written as

2 Basic usage

Except for the definition of the integrands, the behavior of this thorn is almost completely driver by the configuration of the parameter file. We present here an example of such a parameter file, which performs the following tasks:

2.1 Specifying the BSSN evolution thorn

The VolumeIntegralsxvacuum thorn requires information about the Hamiltonian and momentum constraint variables in order to perform certain volume integrals. For maximum flexibility, one can specify which variables to use, making VolumeIntegralsxvacuum compatible with any BSSN evolution thorn. This is achieved by setting the following variables:

     VolumeIntegralsxvacuum::HamiltonianVarString;

     VolumeIntegralsxvacuum::Momentum0VarString;

     VolumeIntegralsxvacuum::Momentum1VarString;

     VolumeIntegralsxvacuum::Momentum2VarString;

The default values for these variables are the variables from the MLxBSSN thorn, but you can use any thorn you want. For example, to use the variables Ham, MU0, MU1, and MU2 from an evolution thorn called MyBSSNthorn, one would add the following lines to the parameter file:

VolumeIntegrals_vacuum::HamiltonianVarStringx=x"MyBSSNthorn::Ham"
VolumeIntegrals_vacuum::Momentum0VarStringxxx=x"MyBSSNthorn::MU0"
VolumeIntegrals_vacuum::Momentum1VarStringxxx=x"MyBSSNthorn::MU1"
VolumeIntegrals_vacuum::Momentum2VarStringxxx=x"MyBSSNthorn::MU2"

2.2 Full parameter file configuration example

We now provide an example of a parameter file configuration which uses the Hamiltonian and momentum constraint variables of the Baikal thorn and performs the following tasks:

Integral of Hamiltonian & momentum constraints, over the entire grid volume.

Exactly the same asx1, but excising the region inside a sphere of radius 2.2 tracking the zeroth AMR grid (initially at );

Exactly the same as 2, but additionally excising the region inside a sphere of radius 2.2 tracking the center of the first AMR grid (initially at );

Integral of Hamiltonian & momentum constraints, over the entire grid volume, minus the spherical region inside coordinate radius 8.2;

Integral of Hamiltonian & momentum constraints, over the entire grid volume, minus the spherical region inside coordinate radius 12.0; Integral of Hamiltonian & momentum constraints, over the entire grid volume, minus the spherical region inside coordinate radius 16.0;

Integral of Hamiltonian & momentum constraints, over the entire grid volume, minus the spherical region inside coordinate radius 24.0;

Integral of Hamiltonian & momentum constraints, over the entire grid volume, minus the spherical region inside coordinate radius 48.0;

Integral of Hamiltonian & momentum constraints, over the entire grid volume, minus the spherical region inside coordinate radius 96.0;

Integral of Hamiltonian & momentum constraints, over the entire grid volume, minus the spherical region inside coordinate radius 192.0;

To achieve this, add the following configuration to your parameter file:

ActiveThornsx=x"VolumeIntegrals_vacuum"
#xSetxthexHamiltonianxandxmomentumxconstraintxvariablesxtoxBaikal's
VolumeIntegrals_vacuum::HamiltonianVarStringx=x"Baikal::HGF"
VolumeIntegrals_vacuum::Momentum0VarStringxxx=x"Baikal::MU0GF"
VolumeIntegrals_vacuum::Momentum1VarStringxxx=x"Baikal::MU1GF"
VolumeIntegrals_vacuum::Momentum2VarStringxxx=x"Baikal::MU2GF"
#xNowxsetupxbasicxinformationxaboutxthexintegrals
VolumeIntegrals_vacuum::NumIntegralsx=x10
VolumeIntegrals_vacuum::VolIntegral_out_everyx=x64
VolumeIntegrals_vacuum::enable_file_outputx=x1
VolumeIntegrals_vacuum::outVolIntegral_dirx=x"volume_integration"
VolumeIntegrals_vacuum::verbosex=x1
#xThexAMRxcentrexwillxonlyxtrackxthexfirstxreferencedxintegration
#xquantitiesxthatxtrackxsaidxcentre.xThus,xcenteroflapsexoutputxwill
#xnotxfeedxbackxintoxthexAMRxcentrexpositions.
VolumeIntegrals_vacuum::Integration_quantity_keyword[1]x=x"H_M_CnstraintsL2"
VolumeIntegrals_vacuum::Integration_quantity_keyword[2]x=x"usepreviousintegrands"
VolumeIntegrals_vacuum::Integration_quantity_keyword[3]x=x"usepreviousintegrands"
VolumeIntegrals_vacuum::Integration_quantity_keyword[4]x=x"H_M_CnstraintsL2"
VolumeIntegrals_vacuum::Integration_quantity_keyword[5]x=x"H_M_CnstraintsL2"
VolumeIntegrals_vacuum::Integration_quantity_keyword[6]x=x"H_M_CnstraintsL2"
VolumeIntegrals_vacuum::Integration_quantity_keyword[7]x=x"H_M_CnstraintsL2"
VolumeIntegrals_vacuum::Integration_quantity_keyword[8]x=x"H_M_CnstraintsL2"
VolumeIntegrals_vacuum::Integration_quantity_keyword[9]x=x"H_M_CnstraintsL2"
VolumeIntegrals_vacuum::Integration_quantity_keyword[10]=x"H_M_CnstraintsL2"
#xSecondxintegralxtakesxthexfirstxintegralxintegrand,
#xthenxexcisesxthexregionxaroundxthexfirstxBH
VolumeIntegrals_vacuum::volintegral_sphere__center_x_initialxxxxxxxxxxxx[2]x=x-5.9
VolumeIntegrals_vacuum::volintegral_outside_sphere__radiusxxxxxxxxxxxxxx[2]x=xx2.2
VolumeIntegrals_vacuum::volintegral_sphere__tracks__amr_centrexxxxxxxxxx[2]x=xx0
VolumeIntegrals_vacuum::volintegral_usepreviousintegrands_num_integrands[2]x=xx4
#xThirdxintegralxtakesxthexsecondxintegralxintegrand,
#xthenxexcisesxthexregionxaroundxthexfirstxBH
VolumeIntegrals_vacuum::volintegral_sphere__center_x_initialxxxxxxxxxxxx[3]x=xx5.9
VolumeIntegrals_vacuum::volintegral_outside_sphere__radiusxxxxxxxxxxxxxx[3]x=xx2.2
VolumeIntegrals_vacuum::volintegral_sphere__tracks__amr_centrexxxxxxxxxx[3]x=xx1
VolumeIntegrals_vacuum::volintegral_usepreviousintegrands_num_integrands[3]x=xx4
#xJustxanxouterxregion
VolumeIntegrals_vacuum::volintegral_outside_sphere__radius[4]x=x8.2
VolumeIntegrals_vacuum::volintegral_outside_sphere__radius[5]x=12.0
VolumeIntegrals_vacuum::volintegral_outside_sphere__radius[6]x=16.0

VolumeIntegrals_vacuum::volintegral_outside_sphere__radius[7]x=24.0
VolumeIntegrals_vacuum::volintegral_outside_sphere__radius[8]x=48.0
VolumeIntegrals_vacuum::volintegral_outside_sphere__radius[9]x=96.0
VolumeIntegrals_vacuum::volintegral_outside_sphere__radius[10]=192.0

References

[1]xxxAlcubierre, M. Introduction to 3+ 1 numerical relativity, Vol 140. Oxford University Press (2008).

[2]xxxGourgoulhon, E. 3+ 1 formalism and bases of numerical relativity, arXiv preprint gr-qc/0703035 (2007).

3 Parameters

11amrxcentrexxtracksxxvolintegralxinsidexsphere10Scope: privatex01  INT

11Description: Use output from volume integral to move AMR box centre N.

11 Range 10 x01 Default: -1
11-1:100  10-1 = do not track an AMR box centre. Otherwise track AMR box centre number N = [0,100]

11

11enablexfilexoutput  10Scope: privatex01  INT

11Description: Enable output file

11 Range 10 x01 Default: 1
110:1  100 = no output; 1 = yes, output to file

11

11enablextimexreparameterization  10Scope: privatex01  BOOLEAN

11Description: Enable time reparameterization a la http://arxiv.org/abs/1404.6523

11                                        10  x01  Default: no

11hamiltonianvarstring  10Scope: privatex01  STRING

11Description: Hamiltonian constraint variable name

11 Range 10 x01 Default: MLxBSSN::H
11MLxBSSN::H  10MLxBSSN thorn Hamiltonian constraint gridfunction name
11Baikal::HGF  10Baikal thorn Hamiltonian constraint gridfunction name
11BaikalVacuum::HGF  10BaikalVacuum thorn Hamiltonian constraint gridfunction name
11LeanBSSNMoL::hc  10LeanBSSNMoL thorn Hamiltonian constraint gridfunction name
11.+  10Or use you can use your own thorn’s Hamiltonian constraint gridfunction name

11

11integrationxquantityxkeyword  10Scope: privatex01  KEYWORD

11Description: Which quantity to integrate

11 Range 10 x01 Default: nothing
11nothing  10Default, null parameter
11HxMxCnstraintsL2  10Hamiltonian, Momentumx
11HxM2xCnstraintsL2  10Hamiltonian, Momentum squared
11see [1] below  10Use integrands from step(s) immediately preceeding. Useful for Swiss-cheese-type volume integrations.
11centeroflapse  10Center of Lapse
11one  10Integrand = 1. Useful for debugging
11ADMxMass  10ADM Mass
11ADMxMomentum  10ADM Momentum
11see [1] below  10ADM Angular Momentum

11

usepreviousintegrands

[1]

ADM\_Angular\_Momentum

11momentum0varstring  10Scope: privatex01  STRING

11Description: Momentum constraint variable name (x-direction)

11 Range 10 x01 Default: MLxBSSN::M1
11MLxBSSN::M1  10MLxBSSN thorn momentum constraint gridfunction name
11Baikal::MU0GF  10Baikal thorn momentum constraint gridfunction name
11BaikalVacuum::MU0GF  10BaikalVacuum thorn momentum constraint gridfunction name
11LeanBSSNMoL::mcx  10LeanBSSNMoL thorn momentum constraint gridfunction name
11.+  10Or use you can use your own thorn’s momentum constraint gridfunction name

11

11momentum1varstring  10Scope: privatex01  STRING

11Description: Momentum constraint variable name (y-direction)

11 Range 10 x01 Default: MLxBSSN::M2
11MLxBSSN::M2  10MLxBSSN thorn momentum constraint gridfunction name
11Baikal::MU1GF  10Baikal thorn momentum constraint gridfunction name
11BaikalVacuum::MU1GF  10BaikalVacuum thorn momentum constraint gridfunction name
11LeanBSSNMoL::mcy  10LeanBSSNMoL thorn momentum constraint gridfunction name
11.+  10Or use you can use your own thorn’s momentum constraint gridfunction name

11

11momentum2varstring  10Scope: privatex01  STRING

11Description: Momentum constraint variable name (z-direction)

11 Range 10 x01 Default: MLxBSSN::M3
11MLxBSSN::M3  10MLxBSSN thorn momentum constraint gridfunction name
11Baikal::MU2GF  10Baikal thorn momentum constraint gridfunction name
11BaikalVacuum::MU2GF  10BaikalVacuum thorn momentum constraint gridfunction name
11LeanBSSNMoL::mcz  10LeanBSSNMoL thorn momentum constraint gridfunction name
11.+  10Or use you can use your own thorn’s momentum constraint gridfunction name

11

11momentumsquaredvarstring  10Scope: privatex01  STRING

11Description: Momentum constraint squared variable name

11 Range 10 x01Default: BaikalVacuum::MSQUAREDGF
11see [1] below  10Baikal thorn momentum constraint squared gridfunction name
11.+  10Or use you can use your own thorn’s momentum constraint squared gridfunction name

[1]

BaikalVacuum::MSQUAREDGF

11numintegrals  10Scope: privatex01  INT

11Description: Number of volume integrals to perform

11 Range 10 x01 Default: (none)
110:1000  10zero (disable integration) or some other number

11

11outvolintegralxdir  10Scope: privatex01  STRING

11Description: Output directory for volume integration output files, overrides IO::outxdir

11 Range 10 x01 Default: (none)
11.+  10A valid directory name
11ˆ$  10An empty string to choose the default from IO::outxdir

11

11verbose  10Scope: privatex01  INT

11Description: Set verbosity level: 1=useful info; 2=moderately annoying (though useful for debugging)

11  Range  10  x01  Default: 1
110:2  100 = no output; 1=useful info; 2=moderately annoying (though useful for debugging)

11

11vivxtimexreparamxt0  10Scope: privatex01  REAL

11Description: Time reparameterization parameter tx0: Center of time reparameterization curve. SET TO BE SAME AS IN ImprovedPunctureGauge thorn

11  Range  10  x01  Default: 10.0
110:*  10Probably don’t want to set this <0, so >=0 enforced

11

11vivxtimexreparamxw  10Scope: privatex01  REAL

11Description: Time reparameterization parameter w: Width of time reparameterization curve. SET TO BE SAME AS IN ImprovedPunctureGauge thorn

11  Range  10  x01  Default: 5.0
110:*  10Probably don’t want to set this <0, so >=0 enforced

11

11volintegralxinsidexspherexxradius  10Scope: privatex01  REAL

11Description: Volume integral in a spherical region: radius of spherical region

11 Range 10 x01 Default: (none)
11*:*  10Any number

11

11volintegralxoutxevery  10Scope: privatex01  INT

11Description: How often to compute volume integrals?

11 Range 10 x01 Default: (none)
110:1000  10zero (disable integration) or some other number

11

11volintegralxoutsidexspherexxradius  10Scope: privatex01  REAL

11Description: Volume integral outside a spherical region: radius of spherical region

11 Range 10 x01 Default: (none)
11*:*  10Any number

11volintegralxspherexxcenterxxxinitial  10Scope: privatex01  REAL

11Description: Volume integral in a spherical region: x-coord of center(s)

11 Range 10 x01 Default: (none)
11*:*  10Any number

11

11volintegralxspherexxcenterxyxinitial  10Scope: privatex01  REAL

11Description: Volume integral in a spherical region: y-coord of center(s)

11 Range 10 x01 Default: (none)
11*:*  10Any number

11

11volintegralxspherexxcenterxzxinitial  10Scope: privatex01  REAL

11Description: Volume integral in a spherical region: z-coord of center(s)

11 Range 10 x01 Default: (none)
11*:*  10Any number

11

11volintegralxspherexxtracksxxamrxcentre  10Scope: privatex01  INT

11Description: Volume integral tracks AMR box centre N.

11 Range 10 x01 Default: -1
11-1:100  10-1 = do not track an AMR box centre. Otherwise track AMR box centre number N = [0,100]

11

11volintegralxusepreviousintegrandsxnumxintegrands 10Scope: privatex01  INT

11Description: Number of integrands for usepreviousintegrands, must be specified explicitly as information from previous integrand is not passed.

11  Range  10  x01  Default: 4
110:100  10Default is set to the maximum, 4.

11

11outxdir  10Scope: shared from IOx01STRING

11

4 Interfaces

General Implements: volumeintegralsxvacuum

Inherits: grid admbase carpetregrid2 Grid Variables 4.0.1 PRIVATE GROUPS

11 x Group Names x 10  x Variable Names x  x01 Details x11x
11  volintegrands  10  x01  compact110
11                     10  VolIntegrand1  x01 dimensions113
11                     10  VolIntegrand2  x01 distribution11DEFAULT
11                     10  VolIntegrand3  x01 group type11GF
11                     10  VolIntegrand4  x01  tags11InterpNumTimelevels=1 prolongation=”none” Checkpoint=”no”
11                     10  x01 timelevels111
11                     10  x01variable type11REAL
11  volintegrals  10  x01  compact110
11                     10  VolIntegral  x01 description11Volume integrals
11                     10  x  x01 description11post-sum. The first dimension denotes which integral(s)
11                     10  VolIntegral  x01 description11and the second denotes the values of the integral(s). E.g.
11                     10  VolIntegral  x01 description11a center of mass volume integral will have 3 outputs.
11                     10  x01 dimensions112
11                     10  x01 distribution11CONSTANT
11                     10  x01 group type11ARRAY

11                     10  x01  size11101
11                     10  x  x01  size114

11                     10  x01 timelevels111
11                     10  x01variable type11REAL
11movingsphregionintegrals10 x01 compact110
11                     10 volintegralxinsidexspherexxcenterxx x01 description11Specify regions for volume integrals inside/outside spheres THAT MOVE.
11                     10 volintegralxinsidexspherexxcenterxy x01 dimensions111
11                     10 volintegralxinsidexspherexxcenterxz x01 distribution11CONSTANT
11                     10volintegralxoutsidexspherexxcenterxxx01 group type11ARRAY
11                     10volintegralxoutsidexspherexxcenterxyx01  size11101
11                     10volintegralxoutsidexspherexxcenterxzx01 timelevels111
11                     10  x01variable type11REAL

11

4.0.2 PUBLIC GROUPS

11 x Group Names x 10x Variable Names xx01 Details x11x
11 integralcountervar 10 x01 compact110
11                      10 IntegralCounter x01 description11Counter that keeps track of which integral we are calculating.
11                      10  x01 dimensions110
11                      10  x01 distribution11CONSTANT
11                      10  x01 group type11SCALAR
11 10 x01 tags11checkpoint=”no”
11                      10  x01 timelevels111
11                      10  x01variable type11INT
11volintegralsxvacuumxtime10 x01 compact110
11                      10 physicalxtime x01 description11keeps track of the physical time
11 10 x x01 description11in case time coordinate is reparameterized
11                      10 physicalxtime x01 description11a la http://arxiv.org/abs/1404.6523
11                      10  x01 dimensions110
11                      10  x01 distribution11CONSTANT
11                      10  x01 group type11SCALAR
11 10 x01 tags11checkpoint=”no”
11                      10  x01 timelevels111
11                      10  x01variable type11REAL

11

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

11Always:  11x
11VolIntegrands VolIntegrals MovingSphRegionIntegrals IntegralCounterVar VolIntegralsxvacuumxtime11x

11x  11x

11

Scheduled Functions

CCTKxINITIAL (conditional) x vixvacuumxfilexoutputxroutinexstartup x create directory for file output. x

11x11Language:11c
11 x 11Type: 11function

CCTKxPOSTxRECOVERxVARIABLES (conditional) x vixvacuumxfilexoutputxroutinexstartup x create directory for file output. x

11x11Language:11c
11 x 11Type: 11function

11

CCTKxINITIAL x initializeintegralcountertozero x initialize integralcounter variable to zero x

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

11

CCTKxPOSTxRECOVERxVARIABLES x initializeintegralcountertozero x initialize integralcounter variable to zero x

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

11

CCTKxANALYSIS x initializeintegralcounter x initialize integralcounter variable x

11x11Before: 11volumeintegralgroup
11 x 11Language:11c
11 x 11Options: 11global
11 x 11Type: 11function

11

CCTKxANALYSIS x volumeintegralgroup x evaluate all volume integrals x

11x11Before:11carpetlibxprinttimestats
11 x 11x  11carpetlibxprintmemstats
11 x 11Type: 11group
11 x 11While: 11volumeintegralsxvacuum::integralcounter

11

VolumeIntegralGroup x volumeintegralsxvacuumxcomputeintegrand x compute integrand

11x11Before: 11dosum
11 x 11Language:11c
11 x 11Options: 11global
11 x 11x  11loop-local
11 x 11Storage: 11volintegrands
11 x 11x  11volintegrals
11 x 11x  11movingsphregionintegrals
11 x 11Type: 11function

11

VolumeIntegralGroup x dosum x do sum x

11x11After: 11volumeintegralsxvacuumxcomputeintegrand
11 x 11Language:11c
11 x 11Options: 11global
11 x 11Type: 11function

11

VolumeIntegralGroup x decrementintegralcounter x decrement integralcounter variable x

11x11After: 11dosum
11 x 11Language:11c
11 x 11Options: 11global
11 x 11Type: 11function

11

CCTKxANALYSIS x vixvacuumxfilexoutput x output volumeintegral results to disk x

11x11After: 11volumeintegralgroup
11 x 11Language:11c
11 x 11Options: 11global
11 x 11Type: 11function