ScalarEvolve

Miguel Zilhão <mzilhao@ua.pt>

July 1 2023

Abstract

ScalarEvolve solves the (Einstein-)Klein-Gordon system of equations with 4th order accurate finite-difference stencils. It relies on the MoL thorn for the time integration and can work with any spacetime evolution thorn to couple with the Einstein equations.

1 ScalarEvolve

This thorn provides the tools to evolve a complex scalar field with nonlinear potential in arbitrary background as first described in [1]. Additionally, it is possible to add an external periodic forcing to the right-hand side of the Klein-Gordon equation for studies of parametric resonances.

ScalarEvolve interfaces with the ScalarBase thorn, which defines the evolution variables phi1, phi2, Kphi1 and Kphi2. This thorn merely takes care of setting the scalar field stress-energy tensor and evolving (with MoL) the scalar field itself. The evolution of the metric sector needs to be done elsewhere.

2 Physical System

Conventions used here are as in [1] and as follows: \begin {align} G_{\mu \nu } & = 8 \pi G T_{\mu \nu } \\ \square \Phi & = \mu ^2 \Phi \end {align}

where \(\mu \) is the mass parameter defined in ScalarBase and \begin {equation} T_{\mu \nu } = \bar \Phi _{,\mu } \Phi _{,\nu } + \Phi _{,\mu } \bar \Phi _{,\nu } - g_{\mu \nu } [ \bar \Phi ^{,\sigma } \Phi _{,\sigma } + \mu ^2 \bar \Phi \Phi ] \end {equation} and the gridfunctions phi1 and phi2 used in the code (defined in ScalarBase) are the real and imaginary part of the complex field \(\Phi = \phi _1 + i \phi _2\), which for reasons of convenience are evolved as separate, independent, variables.

Let us briefly present the \(3+1\) decomposed equations of motion in the Einstein-Klein-Gordon case. To complete the characterization of the full spacetime we define the extrinsic curvature \begin {equation} \label {eq:KijDef} K_{ij} = - \frac {1}{2\alpha } \left ( \partial _{t} - \mathcal {L}_{\beta } \right ) \gamma _{ij} \ , \end {equation} and analogously introduce the “canonical momentum” of the complex scalar field \(\Phi \) \begin {equation} \label {eq:Kphi} K_{\Phi } = -\frac {1}{2\alpha } \left ( \partial _{t} - \mathcal {L}_{\beta } \right ) \Phi \,, \end {equation} where \(\mathcal {L}\) denotes the Lie derivative. Our evolution system can then be written in the form \begin {align} \partial _{t} \gamma _{ij} & = - 2 \alpha K_{ij} + \mathcal {L}_{\beta } \gamma _{ij} \,, \label {eq:dtgamma} \\ \partial _{t} K_{ij} & = - D_{i} \partial _{j} \alpha + \alpha \left ( R_{ij} - 2 K_{ik} K^{k}{}_{j} + K K_{ij} \right ) \nonumber \\ & \quad + \mathcal {L}_{\beta } K_{ij} + 4\pi \alpha \left [ (S-\rho ) \gamma _{ij} - 2 S_{ij} \right ] \,, \label {eq:dtKij} \\ \partial _{t} \Phi & = - 2 \alpha K_\Phi + \mathcal {L}_{\beta } \Phi \ \,, \label {eq:dtPhi} \\ \partial _{t} K_\Phi & = \alpha \left ( K K_{\Phi } - \frac {1}{2} \gamma ^{ij} D_i \partial _j \Phi + \frac {1}{2} \mu ^2 \Phi \right ) \nonumber \\ & \quad - \frac {1}{2} \gamma ^{ij} \partial _i \alpha \partial _j \Phi + \mathcal {L}_{\beta } K_\Phi \,, \label {eq:dtKphi} \end {align}

where \(D_i\) is the covariant derivative with respect to the \(3\)-metric.

For completeness, we present also the full evolution equations re-written in the BSSN scheme [23]. The full system of evolution equations is \begin {align} \partial _t \tilde {\gamma }_{ij} & = \beta ^k \partial _k \tilde {\gamma }_{ij} + 2\tilde {\gamma }_{k(i} \partial _{j)} \beta ^k - \frac {2}{3} \tilde {\gamma }_{ij} \partial _k \beta ^k -2\alpha \tilde {A}_{ij}, \\ \partial _t \chi & = \beta ^k \partial _k \chi + \frac {2}{3} \chi (\alpha K - \partial _k \beta ^k), \\ \partial _t \tilde {A}_{ij} & = \beta ^k \partial _k \tilde {A}_{ij} + 2\tilde {A}_{k(i} \partial _{j)} \beta ^k - \frac {2}{3} \tilde {A}_{ij} \partial _k \beta ^k \notag \\ & \quad + \chi \left ( \alpha R_{ij} - D_i \partial _j \alpha \right )^{\rm TF} + \alpha \left ( K\,\tilde {A}_{ij} - 2 \tilde {A}_i{}^k \tilde {A}_{kj} \right ) \notag \\ & \quad - 8 \pi \alpha \left ( \chi S_{ij} - \frac {S}{3} \tilde \gamma _{ij} \right ), \\ \partial _t K & = \beta ^k \partial _k K - D^k \partial _k \alpha + \alpha \left ( \tilde {A}^{ij} \tilde {A}_{ij} + \frac {1}{3} K^2 \right ) \notag \\ & \quad + 4 \pi \alpha (\rho + S), \\ \partial _t \tilde {\Gamma }^i & = \beta ^k \partial _k \tilde {\Gamma }^i - \tilde {\Gamma }^k \partial _k \beta ^i + \frac {2}{3} \tilde {\Gamma }^i \partial _k \beta ^k + 2 \alpha \tilde {\Gamma }^i_{jk} \tilde {A}^{jk} \notag \\ & \quad + \frac {1}{3} \tilde {\gamma }^{ij}\partial _j \partial _k \beta ^k + \tilde {\gamma }^{jk} \partial _j \partial _k \beta ^i \nonumber \\ & \quad - \frac {4}{3} \alpha \tilde {\gamma }^{ij} \partial _j K - \tilde {A}^{ij} \left ( 3 \alpha \chi ^{-1} \partial _j \chi + 2\partial _j \alpha \right ) \notag \\ & \quad - 16 \pi \alpha \chi ^{-1} j^i \label {eq:tilde-Gamma-evol} \,, \\ \partial _{t} \Phi & = - 2 \alpha K_\Phi + \mathcal {L}_{\beta } \Phi \ \,, \label {eq:dtPhi-BSSN} \\ \partial _{t} K_\Phi & = \alpha \left ( K K_{\Phi } - \frac {1}{2} \gamma ^{ij} D_i \partial _j \Phi + \frac {1}{2} \mu ^2 \Phi \right ) \nonumber \\ & \quad - \frac {1}{2} \gamma ^{ij} \partial _i \alpha \partial _j \Phi + \mathcal {L}_{\beta } K_\Phi \,, \label {eq:dtKphi-BSSN} \end {align}

with the source terms given by \begin {align*} \rho & \equiv T^{\mu \nu }n_{\mu }n_{\nu } \,,\\ j_i &\equiv -\gamma _{i\mu } T^{\mu \nu }n_{\nu } \,, \\ S_{ij} &\equiv \gamma ^{\mu }{}_i \gamma ^{\nu }{}_j T_{\mu \nu } \,, \\ S & \equiv \gamma ^{ij}S_{ij} \,. \end {align*}

Note however, as mentioned above, that the evolution of the metric sector is not done in this thorn, and thus needs to be done elsewhere (ie, LeanBSSNMoL or McLachlan).

3 Obtaining This Thorn

This thorn is included in the Einstein Toolkit and can also be obtained through the Canuda numerical relativity library [4].

References

[1]   P. V. P. Cunha, J. A. Font, C. Herdeiro, E. Radu, N. Sanchis-Gual and M. Zilhão, “Lensing and dynamics of ultracompact bosonic stars,” Phys. Rev. D 96, no.10, 104040 (2017) doi:10.1103/PhysRevD.96.104040 [arXiv:1709.06118 [gr-qc]].

[2]   M. Shibata and T. Nakamura, “Evolution of three-dimensional gravitational waves: Harmonic slicing case,” Phys. Rev. D 52, 5428-5444 (1995) doi:10.1103/PhysRevD.52.5428

[3]   T. W. Baumgarte and S. L. Shapiro, “On the numerical integration of Einstein’s field equations,” Phys. Rev. D 59, 024007 (1998) doi:10.1103/PhysRevD.59.024007 [arXiv:gr-qc/9810065 [gr-qc]].

[4]   H. Witek, M. Zilhao, G. Bozzola, C.-H. Cheng, A. Dima, M. Elley, G. Ficarra, T. Ikeda, R. Luna, C. Richards, N. Sanchis-Gual, H. Okada da Silva. “Canuda: a public numerical relativity library to probe fundamental physics,” Zenodo (2023) doi: 10.5281/zenodo.3565474

4 Parameters




chi_floor
Scope: private  REAL



Description: Minimal value of abs(chi)



Range   Default: 1.0d-06
*:*
Any value possible






compute_fluxes
Scope: private  BOOLEAN



Description: Calculate the energy fluxes of the scalar field? calculation not available with multipatch



  Default: no






eps_r
Scope: private  REAL



Description: of value if rr approaches zero in densities computation



Range   Default: 1.0d-06
0:*
any small positive value possible






outer_bound
Scope: private  KEYWORD



Description: outer boundary condition



Range   Default: radiative
radiative
Sommerfeld BC
reflecting
reflecting BC






use_advection_stencils
Scope: private  BOOLEAN



Description: Use lop-sided stencils for advection derivs



  Default: yes






z_is_radial
Scope: private  BOOLEAN



Description: use with multipatch



  Default: no






scalarevolve_maxnumconstrainedvars
Scope: restricted  INT



Description: The maximum number of constrained variables used by ScalarEvolve



Range   Default: (none)
0:0
none






scalarevolve_maxnumevolvedvars
Scope: restricted  INT



Description: The maximum number of evolved variables used by ScalarEvolve



Range   Default: 4
4:4
Just 4: phi1, phi2, Kphi1, Kphi2






scalarevolve_maxnumsandrvars
Scope: restricted  INT



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



Range   Default: 16
16:16
lapse, shift, metric, and extrinsic curvature






evolution_method
Scope: shared from SCALARBASE  KEYWORD



Extends ranges:



ScalarEvolve
Use ScalarEvolve to evolve scalar variables






forcing_switch
Scope: shared from SCALARBASE BOOLEAN






kphi1_0
Scope: shared from SCALARBASE REAL






kphi2_0
Scope: shared from SCALARBASE REAL






mu
Scope: shared from SCALARBASE REAL






n_kphi1
Scope: shared from SCALARBASE INT






n_kphi2
Scope: shared from SCALARBASE INT






n_phi1
Scope: shared from SCALARBASE INT






n_phi2
Scope: shared from SCALARBASE INT






phi1_0
Scope: shared from SCALARBASE REAL






phi2_0
Scope: shared from SCALARBASE REAL






v_lambda
Scope: shared from SCALARBASE REAL



5 Interfaces

General

Implements:

scalarevolve

Inherits:

admbase

tmunubase

scalarbase

boundary

sphericalsurface

Grid Variables

5.0.1 PRIVATE GROUPS




  Group Names    Variable Names    Details   




rhs_phi   compact0
rhs_phi1   descriptionright hand sides for scalar field evolution equations
rhs_phi2   dimensions3
  distributionDEFAULT
  group typeGF
  tagstensortypealias=”Scalar” tensorweight=0 prolongation=”none” Checkpoint=”no”
  timelevels1
 variable typeREAL




rhs_kphi   compact0
rhs_Kphi1   descriptionright hand sides for evolution of conjugated momenta
rhs_Kphi2   dimensions3
  distributionDEFAULT
  group typeGF
  tagstensortypealias=”Scalar” tensorweight=0 prolongation=”none” Checkpoint=”no”
  timelevels1
 variable typeREAL




hmetric   compact0
hxx   descriptiontilde gamma_ij
hxy   dimensions3
hxz   distributionDEFAULT
hyy   group typeGF
hyz   tagstensortypealias=”DD_sym” tensorweight=-0.66666666666666666667 prolongation=”none” Checkpoint=”no”
hzz   timelevels1
 variable typeREAL




conf_fac_chi   compact0
chi   descriptionconformal factor chi
  dimensions3
  distributionDEFAULT
  group typeGF
  tagstensortypealias=”Scalar” tensorweight=-0.66666666666666666667 prolongation=”none” Checkpoint=”no”
  timelevels1
 variable typeREAL




trk   compact0
tracek   descriptionTr(K)
  dimensions3
  distributionDEFAULT
  group typeGF
  tagstensortypealias=”Scalar” tensorweight=0 prolongation=”none” Checkpoint=”no”
  timelevels1
 variable typeREAL




densities_sf   compact0
rhoSF_gf   descriptionenergy-momentum densities of scalar field
jrSF_gf   dimensions3
SrrSF_gf   distributionDEFAULT
  group typeGF
  tagstensortypealias=”Scalar” tensorweight=0 prolongation=”none” Checkpoint=”no”
  timelevels3
 variable typeREAL




6 Schedule

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

 

 Conditional:
  rhs_phi rhs_Kphi
  hmetric conf_fac_chi trk
  densities_SF[3]
   

Scheduled Functions

SetTmunu (conditional)

  scalar_zero_densities

  initialise the sf densities to zero

 

 Language:fortran
 Type: function
 Writes: scalarevolve::rhosf_gf(everywhere)
   scalarevolve::jrsf_gf(everywhere)
   scalarevolve::srrsf_gf(everywhere)

CCTK_PARAMCHECK (conditional)

  scalar_init

  initialise flags and boundary condition

 

 Language:c
 Options: global
 Type: function

AddToTmunu (conditional)

  scalar_calc_tmunu

  compute the energy-momentum tensor

 

 Language:fortran
 Type: function

CCTK_BASEGRID (conditional)

  scalar_initsymbound

  schedule symmetries

 

 Language:fortran
 Options: meta
 Type: function

CCTK_BASEGRID (conditional)

  scalar_zero_rhs

  set all rhs functions to zero to prevent spurious nans

 

 After: scalar_initsymbound
 Language:fortran
 Type: function

MoL_Register (conditional)

  scalar_registervars

  register variables for mol

 

 Language:c
 Options: meta
 Type: function

MoL_CalcRHS (conditional)

  scalar_ord4_calc_rhs

  mol rhs calculation for scalar variables

 

 Language:fortran
 Type: function

MoL_CalcRHS (conditional)

  scalar_ord4_calc_rhs_bdry

  mol boundary rhs calculation for scalar variables

 

 After: scalar_calcrhs
  Language:fortran
 Type: function

MoL_RHSBoundaries (conditional)

  scalar_ord4_calc_rhs_bdry_sph

  mol boundary rhs calculation for scalar variables for the multipatch system

 

 Language:fortran
 Type: function

MoL_PostStep (conditional)

  scalar_boundaries

  mol boundary enforcement for scalar variables

 

 Language:fortran
 Options: level
 Sync: phi
   kphi
 Type: function

MoL_PostStep (conditional)

  applybcs

  apply boundary conditions

 

 After:scalar_boundaries
 Type:group

Aliased Functions

 

Alias Name:         Function Name:
ApplyBCs Scalar_ApplyBCs
Scalar_calc_Tmunu Scalar_AddToTmunu
Scalar_ord4_calc_rhs Scalar_CalcRHS
Scalar_ord4_calc_rhs_bdry Scalar_CalcRHS_Bdry
Scalar_ord4_calc_rhs_bdry_sphScalar_CalcRHS_Bdry_Sph