xx A Multi-Patch Wave Toy

A Multi-Patch Wave Toy

Erik Schnetter <schnetter@aei.mpg.de> Luis Lehner <lehner@lsu.edu> Manuel Tiglio <tiglio@lsu.edu>

May 17, 2024

1 Physical System The massless wave equation for a scalar field can be written as

. ∂_{μ}(γ^{μν}d_{ν}) = 0 where , and . Using the expressions and where is the inverse of the three metric, the equation can be rewritten as with . The non-shift speed modes with respect to a boundary with normal are . v^{±} = λΠ + H^{ij}n_{i}d_{j}

and the shift speed modes are , with transversal directions. The physical energy is

. E = \frac{1}{2} ∫ \frac{1}{α}\left[Π^{2} + H^{ij}d_{i}d_{j}\right]\sqrt{h}dx^{3}

and the way the equations above have been written this energy is not increasing in the stationary background case if homogeneous boundary conditions are given at outer boundaries, also at the discrete level (replacing above by ). The implementation of the field equations in the code differs slightly from the above. Assuming a stationary background and expanding out the derivative operator, we obtain the equations in the final form

2 Non-linear addition to the multi-patch wave toy Simple addition to the wave multi-patch toy to get started on this.

2.1 Physical System This is just a non-linear wave equation obtained, a very minor modification to the wave equation thorn adding a different initial data and a slight modification to the right hand side. A reference to this is in a paper by Liebling to appear in Phys. Rev. D (2005). The non-linear wave equation is written as

. ∂_{u}(γ^{μν}d_{ν}) = ϕ^{p} where , and and must be an odd integer . The initial data coded is given by with . The parameters used for this initial data are given some distinct names to avoid conflicts with existing ones and are as follows:

initial-data = GaussianNonLinear (choose the above mentioned initial data) nonlinearrhs = turn on/off the right hand side for testing. a boolean variable. powerrhs = power above. epsx = epsy = ANL = deltaNL = omeNL = RNL = R

Note, as the solution is not known, one must set for now the incoming fields to . CPBC might one day be put... though who knows :-)

3 Formulations

3.1 Setting . RHS:

Propagation matrix:

Eigensystem:

3.2 Setting with , leading to . RHS:

Propagation matrix:

Eigensystem:

3.3 (This section very probably contains errors, say Erik on 2005-04-13.) Setting with a “Killing” vector , leading to . RHS:

Propagation matrix:

Eigensystem:

References

[1]xxxGioel Calabrese, Luis Lehner, Dave Neilsen, Jorge Pullin, Oscar Reula, Olivier Sarbach, Manuel Tiglio, Novel finite-differencing techniques for numerical relativity: application to black-hole excision, Class.xQuantum Grav.x20, L245 (2003), gr-qc/0302072.

4 Parameters

11amplitude 10Scope: privatex01 REAL

11Description: Amplitude

11  Range  10  x01  Default: 1.0

11*:*  10

11

11anl  10Scope: privatex01  REAL

11Description: Amplitude of the non-linear Gaussian

11  Range  10  x01  Default: 0.0

11*:*  10

11

11bound  10Scope: privatex01  STRING

11Description: Boundary condition

11 Range 10 x01 Default: static
11.*  10any registered boundary condition

11

11computexsecondxderivativexfromxfirstxderivative 10Scope: privatex01  BOOLEAN

11Description: Take first derivative twice to compute second derivate

11                                     10  x01  Default: no

11deltanl  10Scope: privatex01  REAL

11Description: sigma of the non-linear Gaussian

11  Range  10  x01  Default: 0.0

11*:*  10

11

11eps  10Scope: privatex01  REAL

11Description: A small number

11  Range  10  x01  Default: 1.0e-10

110:*  10

11

11epsx  10Scope: privatex01  REAL

11Description: eps in x-direction of the non-linear Gaussian

11  Range  10  x01  Default: 0.0

11*:*  10

11

11epsy  10Scope: privatex01  REAL

11Description: eps in y-direction of the non-linear Gaussian

11  Range  10  x01  Default: 0.0

11*:*  10

11

11initialxdata  10Scope: privatex01  KEYWORD

11Description: Type of initial data

11 Range 10 x01 Default: plane
11linear  10x and y coordinates
11plane  10Plane wave
11Gaussian  10Gaussian wave packet
11GaussianNonLinear  10Gaussian wave packet for the non-linear RHS
11GeneralMultipole  10Multipole with arbitrary l and m
11multipole  10L=1 initial data, Gaussian in r
11multipole l=1, m=0  10L=1 m=0 initial data, Gaussian in r, u=0
11multipole l=1, m=1  10L=1 m=1 initial data, Gaussian in r, u=0
11multipole l=1, m=-1  10L=1 m=-1 initial data, Gaussian in r, u=0
11multipole l=2  10L=2 initial data, Gaussian in r
11multipole l=2, u=0  10L=2 initial data, Gaussian in r, u=0
11multipole l=2, m=1  10L=2 m=1 initial data, Gaussian in r, u=0
11multipole l=2, m=-1  10L=2 m=-1 initial data, Gaussian in r, u=0
11multipole l=2, m=2  10L=2 m=2 initial data, Gaussian in r, u=0
11multipole l=2, m=-2  10L=2 m=-2 initial data, Gaussian in r, u=0
11multipole l=2, m=-2  10L=2 m=-2 initial data, Gaussian in r, u=0
11multipole l=4, m=0  10L=4 m=0 initial data, Gaussian in r, u=0
11multipole l=4, m=1  10L=4 m=1 initial data, Gaussian in r, u=0
11multipole l=4, m=-1  10L=4 m=-1 initial data, Gaussian in r, u=0
11multipole l=4, m=2  10L=4 m=-2 initial data, Gaussian in r, u=0
11multipole l=4, m=-2  10L=4 m=-2 initial data, Gaussian in r, u=0
11multipole l=4, m=3  10L=4 m=3 initial data, Gaussian in r, u=0
11multipole l=4, m=-3  10L=4 m=-3 initial data, Gaussian in r, u=0
11multipole l=4, m=4  10L=4 m=4 initial data, Gaussian in r, u=0
11multipole l=4, m=-4  10L=4 m=-4 initial data, Gaussian in r, u=0
11noise  10Random noise
11debug  10number of current patch and grid point index

11

11initialxdataxanalyticxderivatives  10Scope: privatex01  BOOLEAN

11Description: Calculate spatial derivatives of the initial data analytically?

11                                     10  x01  Default: no

11

11lapse  10Scope: privatex01  REAL

11Description: Lapse function multiplier

11 Range 10 x01 Default: 1.0
11*:*  10must not be zero

11mass  10Scope: privatex01  REAL

11Description: Mass M

11  Range  10  x01  Default: 1.0

11*:*  10

11

11metric  10Scope: privatex01  KEYWORD

11Description: Global metric

11 Range 10 x01 Default: Minkowski
11Minkowski  10Minkowski
11Kerr-Schild  10Kerr-Schild
11Kerr  10Kerr Black Hole

11

11multipolexl  10Scope: privatex01  INT

11Description: For GeneralMultipole initial data: degree of spherical harmonic function

11 Range 10 x01 Default: 2
110:*  10A positive integer

11

11multipolexm  10Scope: privatex01  INT

11Description: For GeneralMultipole initial data: order of spherical harmonic function

11 Range 10 x01 Default: 2
11*:*  10An integer -l<=m<=l

11

11multipolexs  10Scope: privatex01  INT

11Description: For GeneralMultipole initial data: spin weight spherical harmonic function

11 Range 10 x01 Default: (none)
11*:*  10A positive integer

11

11munl  10Scope: privatex01  REAL

11Description: Speed of the non-linear Gaussian

11  Range  10  x01  Default: 0.0

11*:*  10

11

11nonlinearrhs  10Scope: privatex01  BOOLEAN

11Description: Add a non-linear term to the RHS?

11                                     10  x01  Default: no

11

11numevolvedvars  10Scope: privatex01  INT

11Description: The number of evolved variables in this thorn

11 Range 10 x01 Default: 5
115:5  10five

11

11omenl  10Scope: privatex01  REAL

11Description: Omega of the non-linear Gaussian

11  Range  10  x01  Default: 0.0

11*:*  10

11

11outerxbound  10Scope: privatex01  STRING

11Description: outer boundary

11 Range 10 x01 Default: solution
11zero  10set all characteristics to zero
11solution  10use the same analytic solution as for the initial data
11dirichlet  10set all fields to zero
11radiative  10radiative boundary
11none  10no boundary condition

11outerxpenaltyxbound  10Scope: privatex01  STRING

11Description: outer penalty boundary

11 Range 10 x01 Default: zero
11zero  10set all characteristics to zero
11solution  10use the same analytic solution as for the initial data

11

11powerrhs  10Scope: privatex01  REAL

11Description: Exponent in the non-linear RHS term

11 Range 10 x01 Default: 5.0
113.0:13.0  10

11

11radius  10Scope: privatex01  REAL

11Description: Radius of the Gaussian

11  Range  10  x01  Default: 0.0

110:*  10

11

11recalculatexrhs  10Scope: privatex01  BOOLEAN

11Description: Recalculate the RHSs in the ANALYSIS timebin

11                                     10  x01  Default: yes

11

11rhsbound  10Scope: privatex01  STRING

11Description: Boundary condition during RHS evaluation

11 Range 10 x01 Default: none
11.*  10any registered boundary condition

11

11rnl  10Scope: privatex01  REAL

11Description: How fat the non-linear Gaussian is (r-R)

11  Range  10  x01  Default: 0.0

11*:*  10

11

11shift  10Scope: privatex01  REAL

11Description: Shift vector addition

11  Range  10  x01  Default: 0.0

11*:*  10

11

11shiftxinterpolationxtype  10Scope: privatex01  KEYWORD

11Description: Setting for the interpolating vector field bx (only used for the db formulation)

11 Range 10 x01 Default: shift
11shift  10Set bx = betax (corresponds to d0 formulation)
11zero  10Set bx = 0 (corresponds to dk formulation)

11

11shiftxomega  10Scope: privatex01  REAL

11Description: Rotational shift vector addition about z axis

11  Range  10  x01  Default: 0.0

11*:*  10

11

11spacexoffset  10Scope: privatex01  REAL

11Description: Space offset

11  Range  10  x01  Default: 0.0

11*:*  10

11

11spin  10Scope: privatex01  REAL

11Description: Spin a=J/Mˆ2

11 Range 10 x01 Default: 0.0
11-1:+1  10

11timexoffset  10Scope: privatex01  REAL

11Description: Time offset

11  Range  10  x01  Default: 0.0

11*:*  10

11

11wavexnumber  10Scope: privatex01  REAL

11Description: Wave number

11  Range  10  x01  Default: 0.0

11*:*  10

11

11width  10Scope: privatex01  REAL

11Description: Width of the Gaussian

11  Range  10  x01  Default: 1.0

11(0:*  10

11

11molxnumxevolvedxvars  10Scope: shared from METHODOFLINESx01INT

11

5 Interfaces

General Implements: llamawavetoy

Inherits: grid coordinates globalderivative summationbyparts interpolate

Grid Variables

5.0.1 PRIVATE GROUPS

11x Group Names x10x Variable Names xx01 Details x11x
11  scalar  10  x01  compact110
11                 10  u  x01 description11The scalar of the scalar wave equation fame
11                 10  x01 dimensions113
11                 10  x01 distribution11DEFAULT
11                 10  x01 group type11GF
11 10 x01 tags11tensortypealias=”scalar”
11                 10  x01 timelevels112
11                 10  x01variable type11REAL
11  density  10  x01  compact110
11                 10  rho  x01 description11Time derivative of u
11                 10  x01 dimensions113
11                 10  x01 distribution11DEFAULT
11                 10  x01 group type11GF
11 10 x01 tags11tensortypealias=”scalar”
11                 10  x01 timelevels112
11                 10  x01variable type11REAL
11  dxxscalar  10  x01  compact110
11                 10  dxxu  x01 description11Spatial derivatives of u
11                 10  dyxu  x01 dimensions113
11                 10  dzxu  x01 distribution11DEFAULT
11                 10  x01 group type11GF
11 10 x01 tags11tensortypealias=”scalar”
11                 10  x01 timelevels112
11                 10  x01variable type11REAL
11  dxxxscalar  10  x01  compact110
11                 10  dxxxu  x01 description11Spatial derivatives of u
11                 10  dyyxu  x01 dimensions113
11                 10  dzzxu  x01 distribution11DEFAULT
11                 10  dxyxu  x01 group type11GF
11                 10  dxzxu  x01  tags11tensortypealias=”scalar”
11                 10  dyzxu  x01 timelevels112
11                 10  x01variable type11REAL
11  dxxdensity  10  x01  compact110
11                 10  dxxrho  x01 description11Spatial derivatives of rho
11                 10  dyxrho  x01 dimensions113
11                 10  dzxrho  x01 distribution11DEFAULT
11                 10  x01 group type11GF
11 10 x01 tags11tensortypealias=”scalar”
11                 10  x01 timelevels112
11                 10  x01variable type11REAL
11  velocity  10  x01  compact110
11                 10  vx  x01 description11Spatial derivative of u
11                 10  vy  x01 dimensions113
11                 10  vz  x01 distribution11DEFAULT
11                 10  x01 group type11GF
11 10 x01 tags11tensortypealias=”scalar”
11                 10  x01 timelevels112
11                 10  x01variable type11REAL

11x Group Names x10x Variable Names xx01 Details x11x
11  debug  10  x01  compact110
11                 10  vxdebug  x01 description11Spatial derivative of u
11                 10  vydebug  x01 dimensions113
11                 10  vzdebug  x01 distribution11DEFAULT
11                 10  x01 group type11GF
11 10 x01 tags11tensortypealias=”scalar”
11                 10  x01 timelevels111
11                 10  x01variable type11REAL
11  scalardot  10  x01  compact110
11                 10  udot  x01 description11RHS of u
11                 10  x01 dimensions113
11                 10  x01 distribution11DEFAULT
11                 10  x01 group type11GF
11 10 x01 tags11tensortypealias=”scalar” Prolongation=”None”
11                 10  x01 timelevels111
11                 10  x01variable type11REAL
11  densitydot  10  x01  compact110
11                 10  rhodot  x01 description11RHS of rho
11                 10  x01 dimensions113
11                 10  x01 distribution11DEFAULT
11                 10  x01 group type11GF
11 10 x01 tags11tensortypealias=”scalar” Prolongation=”None”
11                 10  x01 timelevels111
11                 10  x01variable type11REAL
11  velocitydot  10  x01  compact110
11                 10  vxdot  x01 description11RHS ov v
11                 10  vydot  x01 dimensions113
11                 10  vzdot  x01 distribution11DEFAULT
11                 10  x01 group type11GF
11 10 x01 tags11tensortypealias=”scalar” Prolongation=”None”
11                 10  x01 timelevels111
11                 10  x01variable type11REAL
11  constraints  10  x01  compact110
11                 10  wx  x01 description11Integrability condition
11                 10  wy  x01 dimensions113
11                 10  wz  x01 distribution11DEFAULT
11                 10  x01 group type11GF
11 10 x01 tags11tensortypealias=”scalar” tensorparity=-1 Prolongation=”None”
11                 10  x01 timelevels111
11                 10  x01variable type11REAL
11 differencexv 10  x01  compact110
11                 10  diffxvx  x01 description11Difference between vxi and d/dxx u
11                 10  diffxvy  x01 dimensions113
11                 10  diffxvz  x01 distribution11DEFAULT
11                 10  x01 group type11GF
11 10 x01 tags11tensortypealias=”scalar” Prolongation=”None”
11                 10  x01 timelevels111
11                 10  x01variable type11REAL

11x Group Names x10x Variable Names xx01 Details x11x
11 velocityxsquared 10  x01  compact110
11                 10  v2  x01 description11Velocity squared
11                 10  x01 dimensions113
11                 10  x01 distribution11DEFAULT
11                 10  x01 group type11GF
11 10 x01 tags11tensortypealias=”scalar” Prolongation=”None”
11                 10  x01 timelevels111
11                 10  x01variable type11REAL
11 scalarenergy 10  x01  compact110
11                 10  energy  x01 description11Energy of the scalar field
11                 10  x01 dimensions113
11                 10  x01 distribution11DEFAULT
11                 10  x01 group type11GF
11 10 x01 tags11tensortypealias=”scalar” Prolongation=”None”
11                 10  x01 timelevels111
11                 10  x01variable type11REAL
11  errors  10  x01  compact110
11                 10  error  x01 description11Error of the solution
11                 10  errorxrho  x01 dimensions113
11                 10  errorxvx  x01 distribution11DEFAULT
11                 10  errorxvy  x01 group type11GF
11                 10  errorxvz  x01  tags11tensortypealias=”scalar” Prolongation=”None”
11                 10  exact  x01 timelevels111
11                 10  exactxrho  x01variable type11REAL
11 errorsperiodic 10  x01  compact110
11                 10  errorperiodic  x01 description11Error for a solution which is known to be periodic
11                 10 errorperiodicxrho x01 dimensions113
11                 10  x01 distribution11DEFAULT
11                 10  x01 group type11GF
11 10 x01 tags11tensortypealias=”scalar” Prolongation=”None”
11                 10  x01 timelevels111
11                 10  x01variable type11REAL
11  metric  10  x01  compact110
11                 10  gxx  x01 description11Spatial background metric
11                 10  gxy  x01 dimensions113
11                 10  gxz  x01 distribution11DEFAULT
11                 10  gyy  x01 group type11GF
11                 10  gyz  x01  tags11tensortypealias=”scalar” Prolongation=”None”
11                 10  gzz  x01 timelevels111
11                 10  x01variable type11REAL
11 inversexmetric 10  x01  compact110
11                 10  guxx  x01 description11Inverse of the spatial background metric
11                 10  guxy  x01 dimensions113
11                 10  guxz  x01 distribution11DEFAULT
11                 10  guyy  x01 group type11GF
11                 10  guyz  x01  tags11tensortypealias=”scalar” Prolongation=”None”
11                 10  guzz  x01 timelevels111
11                 10  x01variable type11REAL

11x Group Names x10x Variable Names xx01 Details x11x
11  lapse  10  x01  compact110
11                 10  alpha  x01 description11Spatial background metric
11                 10  x01 dimensions113
11                 10  x01 distribution11DEFAULT
11                 10  x01 group type11GF
11 10 x01 tags11tensortypealias=”scalar” Prolongation=”None”
11                 10  x01 timelevels111
11                 10  x01variable type11REAL
11  shift  10  x01  compact110
11                 10  betax  x01 description11Spatial background metric
11                 10  betay  x01 dimensions113
11                 10  betaz  x01 distribution11DEFAULT
11                 10  x01 group type11GF
11 10 x01 tags11tensortypealias=”scalar” Prolongation=”None”
11                 10  x01 timelevels111
11                 10  x01variable type11REAL
11 volumexelement 10  x01  compact110
11                 10  epsilon  x01 description11Volume element due to the spatial background metric
11                 10  x01 dimensions113
11                 10  x01 distribution11DEFAULT
11                 10  x01 group type11GF
11 10 x01 tags11tensortypealias=”scalar” Prolongation=”None”
11                 10  x01 timelevels111
11                 10  x01variable type11REAL
11 minxspacing 10 minxspacing x01 compact110
11                 10  x01 description11Minimum grid spacing
11                 10  x01 dimensions113
11                 10  x01 distribution11DEFAULT
11                 10  x01 group type11GF
11 10 x01 tags11tensortypealias=”scalar” Prolongation=”None”
11                 10  x01 timelevels111
11                 10  x01variable type11REAL

11

6 Schedule This section lists all the variables which are assigned storage by thorn Llama/LlamaWaveToy. 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
11scalar[2] density[2] velocity[2]  11x
11dxxscalar[2]  11x
11dxxxscalar[2]  11x
11dxxdensity[2]  11x
11errors  11x
11metric inversexmetric lapse shift volumexelement11x
11scalardot densitydot velocitydot  11x

11x  11x

Scheduled Functions

CCTKxSTARTUP x lwtxstartup x register banner with cactus x

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

11

MoLxRegister (conditional) x lwtxregisterxmol x register variables with mol x

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

11

CCTKxANALYSIS (conditional) x lwtxcalcxrhs x calculate the rhs x

11x11Language:11fortran
11 x 11Storage: 11scalardot
11 x 11x  11densitydot
11 x 11x  11velocitydot
11 x 11Sync:  11scalardot
11 x 11x  11densitydot
11 x 11x  11velocitydot
11 x 11Triggers: 11scalardot
11 x 11x  11densitydot
11 x 11x  11velocitydot
11 x 11Type: 11function

11

CCTKxANALYSIS x lwtxcalcenergy x calculate the energy of the scalar field x

11x11Language:11fortran
11 x 11Storage: 11scalarenergy
11 x 11Sync:  11scalarenergy
11 x 11Triggers: 11scalarenergy
11 x 11Type: 11function

11

CCTKxANALYSIS x lwtxerror x calculate errors of the solution x

11x11Language:11fortran
11 x 11Storage: 11errorsperiodic
11 x 11Triggers: 11errors
11 x 11x  11errorsperiodic
11 x 11Type: 11function

11

CCTKxANALYSIS x lwtxminxspacing x calculate the smallest grid spacing x

11x11Language:11fortran
11 x 11Storage: 11minxspacing
11 x 11Sync:  11minxspacing
11 x 11Triggers: 11minxspacing
11 x 11Type: 11function

11

CCTKxINITIAL x lwtxinitxmetric x initialise the metric x

11x11Language:11fortran
11 x 11Type: 11function

11

CCTKxINITIAL x lwtxcalcxinversexmetric x transform the metric x

11x11After: 11lwtxinitxmetric
11 x 11Language:11fortran
11 x 11Type: 11function

11

CCTKxINITIAL x lwtxinit x initialise the system x

11x11After: 11lwtxinitxmetric
11 x 11Language:11fortran
11 x 11Type: 11function

11

MoLxCalcRHS x lwtxcalcxrhs x calculate the rhs x

11x11Language:11fortran
11 x 11Type: 11function

MoLxPostStep x lwtxouterboundary x apply outer boundaries x

11x11Language:11fortran
11 x 11Type: 11function

11

MoLxRHSBoundaries x lwtxrhsxouterboundary x apply mol rhs outer boundaries (eg. radiative boundary condition) x

11x11Language:11fortran
11 x 11Type: 11function

11

MoLxPostStep x lwtxboundaries x select the boundary condition x

11x11After: 11lwtxouterbound
11 x 11Language:11fortran
11 x 11Options: 11level
11 x 11Sync:  11scalar
11 x 11x  11density
11 x 11x  11velocity
11 x 11Type: 11function

11

MoLxPostStep x applybcs x apply boundary conditions x

11x11After:11lwtxboundaries
11 x 11Type:11group

11

Aliased Functions x

11Alias Name: xxxxxxx11Function Name:
11ApplyBCs  11LWTxApplyBCs