Z4c Thorn for use with CarpetX

Erik Schnetter <eschnetter@perimeterinstitute.ca >

April 26, 2024

Abstract

This Thorn implements the Z4c formulation of the Einstein Equations [?]. It also monitors the stability of those equations [?].

1 Using This Thorn

The SpacetimeX/Z4c thorn reads (i.e. in Z4c_Initial1) and, if the parameter Z4c::calc_ADM_vars is set (which is true by default), writes (i.e. in Z4c_ADM) the ADM variables (i.e. CarpetX/ADMBaseX) automatically.

Derivatives are hard-coded to fourth order. However, should it be desired, second order is also possible by editing the constant deriv_order in derivs.hxx to the value 2.

This thorn integrates with the CarpetX/ODESolvers thorn.

References

@articleHilditch:2012fp, author = ”Hilditch, David and Bernuzzi, Sebastiano and Thierfelder, Marcus and Cao, Zhoujian and Tichy, Wolfgang and Bruegmann, Bernd”, title = ”Compact binary evolutions with the Z4c formulation”, journal = ”Phys. Rev.”, volume = ”D88”, year = ”2013”, pages = ”084057”, doi = ”10.1103/PhysRevD.88.084057”, eprint = ”1212.2901”, archivePrefix = ”arXiv”, primaryClass = ”gr-qc”, SLACcitation = ” @articlecao2012numerical, title=Numerical stability of the Z4c formulation of general relativity, author=Cao, Zhoujian and Hilditch, David, journal=Physical Review D, volume=85, number=12, pages=124032, year=2012, publisher=APS

2 Parameters




alphag_floor
Scope: private  REAL



Description: Floor for alphaG



Range   Default: 1.0e-10
(0:*






boundary_conditions
Scope: private  KEYWORD



Description: boundary conditions



Range   Default: CarpetX
NewRadX
radiative boundary conditions using NewRadX
CarpetX
use CarpetX default boundary conditions






calc_adm_vars
Scope: private  BOOLEAN



Description: Calculate ADM variables



  Default: yes






calc_admrhs_vars
Scope: private  BOOLEAN



Description: Calculate RHS of ADM variables



  Default: yes






calc_constraints
Scope: private  BOOLEAN



Description: Calculate constraints



  Default: yes






chi_floor
Scope: private  REAL



Description: Floor for chi



Range   Default: 1.0e-10
(0:*






epsdiss
Scope: private  REAL



Description: Dissipation coefficient <arXiv:gr-qc/0610128>



Range   Default: 0.32
0.0:*






eta
Scope: private  REAL



Description: eta



Range   Default: 2.0
*:*






f_mu_l
Scope: private  REAL



Description: mu_L = f_mu_L / alpha



Range   Default: 2.0
*:*






f_mu_s
Scope: private  REAL



Description: mu_S = f_mu_S / alphaˆ
2



Range   Default: 1.0
*:*






kappa1
Scope: private  REAL



Description: kappa1



Range   Default: 0.02
*:*






kappa2
Scope: private  REAL



Description: kappa2



Range   Default: 0.0
*:*






n_alphag
Scope: private  INT



Description: n power of outgoing boundary rˆn  fall off rate for alpha



Range   Default: 1
0:2
1 is my guess






n_at
Scope: private  INT



Description: n power of outgoing boundary rˆn  fall off rate for At_ij



Range   Default: 1
0:2
Maybe 1?






n_betag
Scope: private  INT



Description: n power of outgoing boundary rˆn  fall off rate for beta



Range   Default: 1
0:2
1 is my guess






n_chi
Scope: private  INT



Description: n power of outgoing boundary rˆn  fall off rate for chi



Range   Default: 1
0:2
1 is reasonable






n_gammat
Scope: private  INT



Description: n power of outgoing boundary rˆn  fall off rate for gammat_ij



Range   Default: 1
0:2
1 is reasonable






n_gamt
Scope: private  INT



Description: n power of outgoing boundary rˆn  fall off rate for Gamtî



Range   Default: 1
0:2
Maybe 1?






n_kh
Scope: private  INT



Description: n power of outgoing boundary rˆn  fall off rate for Kh



Range   Default: 1
0:2
Maybe 1?






n_theta
Scope: private  INT



Description: n power of outgoing boundary rˆn  fall off rate for Theta



Range   Default: 1
0:2
Maybe 1?






set_theta_zero
Scope: private  BOOLEAN



Description: set Theta to zero, which converts Z4c to BSSN



  Default: no



3 Interfaces

General

Implements:

z4c

Inherits:

admbasex

tmunubasex

Grid Variables

3.0.1 PRIVATE GROUPS




  Group Names    Variable Names    Details   




chi chi   compact0
  descriptionchi
  dimensions3
  distributionDEFAULT
  group typeGF
  tagsrhs=”chi_rhs” dependents=”ADMBaseX::metric”
  timelevels1
 variable typeREAL




gamma_tilde   compact0
gammatxx   descriptiongamma-tilde
gammatxy   dimensions3
gammatxz   distributionDEFAULT
gammatyy   group typeGF
gammatyz   tagsparities={+1 +1 +1 -1 -1 +1 -1 +1 -1 +1 +1 +1 +1 -1 -1 +1 +1 +1} rhs=”gamma_tilde_rhs” dependents=”ADMBaseX::metric”
gammatzz   timelevels1
 variable typeREAL




k_hat   compact0
Kh   descriptionK-hat
  dimensions3
  distributionDEFAULT
  group typeGF
  tagsrhs=”K_hat_rhs” dependents=”ADMBaseX::curv”
  timelevels1
 variable typeREAL




a_tilde   compact0
Atxx   descriptionA-tilde
Atxy   dimensions3
Atxz   distributionDEFAULT
Atyy   group typeGF
Atyz   tagsparities={+1 +1 +1 -1 -1 +1 -1 +1 -1 +1 +1 +1 +1 -1 -1 +1 +1 +1} rhs=”A_tilde_rhs” dependents=”ADMBaseX::curv”
Atzz   timelevels1
 variable typeREAL




gam_tilde   compact0
Gamtx   descriptionGamma-tilde
Gamty   dimensions3
Gamtz   distributionDEFAULT
  group typeGF
  tagsparities={-1 +1 +1 +1 -1 +1 +1 +1 -1} rhs=”Gam_tilde_rhs”
  timelevels1
 variable typeREAL




theta Theta   compact0
  descriptionTheta
  dimensions3
  distributionDEFAULT
  group typeGF
  tagsrhs=”Theta_rhs” dependents=”ADMBaseX::curv”
  timelevels1
 variable typeREAL








  Group Names    Variable Names    Details   




alphag alphaG   compact0
  descriptionalpha
  dimensions3
  distributionDEFAULT
  group typeGF
  tagsrhs=”alphaG_rhs” dependents=”ADMBaseX::lapse ADMBaseX::dtlapse”
  timelevels1
 variable typeREAL




betag   compact0
betaGx   descriptionbeta
betaGy   dimensions3
betaGz   distributionDEFAULT
  group typeGF
  tagsparities={-1 +1 +1 +1 -1 +1 +1 +1 -1} rhs=”betaG_rhs” dependents=”ADMBaseX::shift ADMBaseX::dtshift”
  timelevels1
 variable typeREAL




ztc   compact0
ZtCx   descriptionZ-tilde
ZtCy   dimensions3
ZtCz   distributionDEFAULT
  group typeGF
  tagsparities={-1 +1 +1 +1 -1 +1 +1 +1 -1} checkpoint=”no”
  timelevels1
 variable typeREAL




hc HC   compact0
  descriptionH
  dimensions3
  distributionDEFAULT
  group typeGF
  tagscheckpoint=”no”
  timelevels1
 variable typeREAL




mtc   compact0
MtCx   descriptionM-tilde
MtCy   dimensions3
MtCz   distributionDEFAULT
  group typeGF
  tagsparities={-1 +1 +1 +1 -1 +1 +1 +1 -1} checkpoint=”no”
  timelevels1
 variable typeREAL




allc allC   compact0
  descriptionconstraint monitor
  dimensions3
  distributionDEFAULT
  group typeGF
  tagscheckpoint=”no”
  timelevels1
 variable typeREAL








  Group Names    Variable Names    Details   




chi_rhs chi_rhs   compact0
  descriptionchi
  dimensions3
  distributionDEFAULT
  group typeGF
  tagscheckpoint=”no”
  timelevels1
 variable typeREAL




gamma_tilde_rhs   compact0
gammatxx_rhs   descriptiongamma-tilde
gammatxy_rhs   dimensions3
gammatxz_rhs   distributionDEFAULT
gammatyy_rhs   group typeGF
gammatyz_rhs   tagsparities={+1 +1 +1 -1 -1 +1 -1 +1 -1 +1 +1 +1 +1 -1 -1 +1 +1 +1} checkpoint=”no”
gammatzz_rhs   timelevels1
 variable typeREAL




k_hat_rhs   compact0
Kh_rhs   descriptionK-hat
  dimensions3
  distributionDEFAULT
  group typeGF
  tagscheckpoint=”no”
  timelevels1
 variable typeREAL




a_tilde_rhs   compact0
Atxx_rhs   descriptionA-tilde
Atxy_rhs   dimensions3
Atxz_rhs   distributionDEFAULT
Atyy_rhs   group typeGF
Atyz_rhs   tagsparities={+1 +1 +1 -1 -1 +1 -1 +1 -1 +1 +1 +1 +1 -1 -1 +1 +1 +1} checkpoint=”no”
Atzz_rhs   timelevels1
 variable typeREAL




gam_tilde_rhs   compact0
Gamtx_rhs   descriptionGamma-tilde
Gamty_rhs   dimensions3
Gamtz_rhs   distributionDEFAULT
  group typeGF
  tagsparities={-1 +1 +1 +1 -1 +1 +1 +1 -1} checkpoint=”no”
  timelevels1
 variable typeREAL




theta_rhs Theta_rhs   compact0
  descriptionTheta
  dimensions3
  distributionDEFAULT
  group typeGF
  tagscheckpoint=”no”
  timelevels1
 variable typeREAL








  Group Names    Variable Names    Details   




alphag_rhs alphaG_rhs   compact0
  descriptionalpha
  dimensions3
  distributionDEFAULT
  group typeGF
  tagscheckpoint=”no”
  timelevels1
 variable typeREAL




betag_rhs   compact0
betaGx_rhs   descriptionbeta
betaGy_rhs   dimensions3
betaGz_rhs   distributionDEFAULT
  group typeGF
  tagsparities={-1 +1 +1 +1 -1 +1 +1 +1 -1} checkpoint=”no”
  timelevels1
 variable typeREAL




Uses header:

defs.hxx

div.hxx

dual.hxx

loop_device.hxx

mat.hxx

simd.hxx

sum.hxx

vec.hxx

vect.hxx

newradx.hxx

4 Schedule

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

 

Always:  
chi  
gamma_tilde  
MtC  
allC  
chi_rhs  
gamma_tilde_rhs 
K_hat_rhs  
A_tilde_rhs  
Gam_tilde_rhs  
Theta_rhs  
alphaG_rhs  
betaG_rhs  
K_hat  
A_tilde  
Gam_tilde  
Theta  
alphaG  
betaG  
ZtC  
HC  
   

Scheduled Functions

CCTK_INITIAL

  z4c_initialgroup

  convert adm to z4c variables

 

 After:admbasex_postinitial
 Type:group

CCTK_INITIAL (conditional)

  z4c_poststepgroup

  post-process z4c variables

 

 After: z4c_initialgroup
 Before:admbasex_setadmvars
 Type: group

Z4c_InitialGroup

  z4c_initial1

  convert adm to z4c variables, part 1

 

 Language:c
 Reads: admbasex::metric(interior)
   admbasex::curv(interior)
   admbasex::lapse(interior)
   admbasex::shift(interior)
 Sync: gamma_tilde
 Type: function
 Writes: chi(interior)
   gamma_tilde(interior)
   k_hat(interior)
   a_tilde(interior)
   theta(interior)
   alphag(interior)
   betag(interior)

Z4c_InitialGroup

  z4c_initial2

  convert adm to z4c variables, part 2

 

 After: z4c_initial1
  Language:c
 Reads: gamma_tilde(everywhere)
 Type: function
 Writes: gam_tilde(interior)

Z4c_PostStepGroup

  z4c_enforce

  enforce algebraic z4c constraints

 

 Language:c
 Reads: chi(interior)
   gamma_tilde(interior)
   a_tilde(interior)
   alphag(interior)
 Sync: chi
   gamma_tilde
   k_hat
    a_tilde
   gam_tilde
   theta
   alphag
   betag
 Type: function
 Writes: chi(interior)
   gamma_tilde(interior)
   a_tilde(interior)
   alphag(interior)

Z4c_PostStepGroup (conditional)

  z4c_adm

  convert z4c to adm variables

 

 After: z4c_enforce
  Language:c
 Reads: chi(everywhere)
   gamma_tilde(everywhere)
   k_hat(everywhere)
   a_tilde(everywhere)
   gam_tilde(everywhere)
   theta(everywhere)
   alphag(everywhere)
   betag(everywhere)
 Type: function
 Writes: admbasex::metric(everywhere)
   admbasex::curv(everywhere)
   admbasex::lapse(everywhere)
   admbasex::dtlapse(everywhere)
   admbasex::shift(everywhere)
   admbasex::dtshift(everywhere)

Z4c_PostStepGroup2 (conditional)

  z4c_adm2

  calculate second time derivatives of adm variables

 

 Language:c
 Reads: chi(everywhere)
   gamma_tilde(everywhere)
   k_hat(everywhere)
   a_tilde(everywhere)
   gam_tilde(everywhere)
   theta(everywhere)
   alphag(everywhere)
   betag(everywhere)
   tmunubasex::ettt(interior)
   tmunubasex::etti(interior)
   tmunubasex::etij(interior)
 Sync: admbasex::dtcurv
   admbasex::dt2lapse
   admbasex::dt2shift
 Type: function
 Writes: admbasex::dtcurv(interior)
   admbasex::dt2lapse(interior)
   admbasex::dt2shift(interior)

Z4c_AnalysisGroup (conditional)

  z4c_constraints

  calculate z4c constraints

 

 Language:c
 Reads: chi(everywhere)
   gamma_tilde(everywhere)
   k_hat(everywhere)
   a_tilde(everywhere)
   gam_tilde(everywhere)
   theta(everywhere)
   alphag(everywhere)
   betag(everywhere)
   tmunubasex::ettt(interior)
   tmunubasex::etti(interior)
   tmunubasex::etij(interior)
 Type: function
 Writes: ztc(interior)
   hc(interior)
   mtc(interior)
   allc(interior)

Z4c_RHSGroup (conditional)

  z4c_rhs

  calculate z4c rhs

 

 Language:c
 Reads: chi(everywhere)
   gamma_tilde(everywhere)
   k_hat(everywhere)
   a_tilde(everywhere)
   gam_tilde(everywhere)
   theta(everywhere)
   alphag(everywhere)
   betag(everywhere)
   tmunubasex::ettt(interior)
   tmunubasex::etti(interior)
   tmunubasex::etij(interior)
 Sync: chi_rhs
   gamma_tilde_rhs
   k_hat_rhs
   a_tilde_rhs
   gam_tilde_rhs
   theta_rhs
   alphag_rhs
   betag_rhs
 Type: function
 Writes: chi_rhs(interior)
   gamma_tilde_rhs(interior)
   k_hat_rhs(interior)
   a_tilde_rhs(interior)
   gam_tilde_rhs(interior)
   theta_rhs(interior)
   alphag_rhs(interior)
   betag_rhs(interior)

Z4c_RHSGroup (conditional)

  z4c_apply_newradx_boundary_conditions

  apply radiative boundary conditions to z4c rhs variables using newradx

 

 After: z4c_rhs
  Language:c
 Reads: chi(everywhere)
   gamma_tilde(everywhere)
   k_hat(everywhere)
   a_tilde(everywhere)
   gam_tilde(everywhere)
   theta(everywhere)
   alphag(everywhere)
   betag(everywhere)
   chi_rhs(everywhere)
   gamma_tilde_rhs(everywhere)
   k_hat_rhs(everywhere)
   a_tilde_rhs(everywhere)
   gam_tilde_rhs(everywhere)
   theta_rhs(everywhere)
   alphag_rhs(everywhere)
   betag_rhs(everywhere)
 Type: function
 Writes: chi_rhs(interior)
   gamma_tilde_rhs(interior)
   k_hat_rhs(interior)
   a_tilde_rhs(interior)
   gam_tilde_rhs(interior)
   theta_rhs(interior)
   alphag_rhs(interior)
   betag_rhs(interior)

CCTK_INITIAL

  z4c_poststepgroup2

  post-process z4c variables, part 2

 

 After: tmunubasex_settmunuvars
    z4c_poststepgroup
 Before:admbasex_setadmrhs
 Type: group

CCTK_POSTREGRID

  z4c_poststepgroup

  post-process z4c variables

 

 Before:admbasex_setadmvars
 Type: group

CCTK_POSTREGRID

  z4c_poststepgroup2

  post-process z4c variables, part 2

 

 After: tmunubasex_settmunuvars
    z4c_poststepgroup
 Before:admbasex_setadmrhs
 Type: group

CCTK_ANALYSIS

  z4c_analysisgroup

  analyse z4c variables

 

 Type:group

ODESolvers_PostStep

  z4c_poststepgroup

  post-process z4c variables

 

 Before:admbasex_setadmvars
 Type: group

ODESolvers_PostStep

  z4c_poststepgroup2

  post-process z4c variables, part 2

 

 After: tmunubasex_settmunuvars
    z4c_poststepgroup
 Before:admbasex_setadmrhs
 Type: group

ODESolvers_RHS

  z4c_rhsgroup

  calculate z4c rhs

 

 Type:group

CCTK_WRAGH

  z4c_test

  self-test

 

 Language:c
 Options: meta
 Type: function