xx NewRadX

NewRadX

Cheng-Hsin Cheng, Jake Doherty, Michail Chabanov, Alexandru Dima

April 17 2024

Abstract

This thorn implements radiative boundary conditions for CarpetX. The original implementation was introduced in the Carpet-based NewRad thorn in the EinsteinEvolvex[1] arrangement.

1 Introduction This thorn provides routines to implement radiative boundary conditions as described in section VI ofx[2]: in its differential form where is the asymptotic propagation speed of the field and is its asymptotic value.

2 Physical System

Quotingx[2]:

At the outer boundary we use a radiation (Sommerfeld) boundary condition. We start from the assumption that near the boundary all fields behave as spherical waves, namely we impose the condition

Where is the asymptotic value of a given dynamical variable (typically 1 for the lapse and diagonal metric components, and zero for everything else), and is some wave speed. If our boundary is sufficiently far away one can safely assume that the speed of light is 1, so for most fields. However, the gauge variables can easily propagate with a different speed implying a different value of .

In practice, we do not use the boundary conditionx(??) as it stands, but rather we use it in differential form:

Since our code is written in Cartesian coordinates, we transform the last condition to We finite difference this condition consistently to second order in both space and time and apply it to all dynamic variables (with possible different values of and ) at all boundaries.

There is a final subtlety in our boundary treatment. Wave propagation is not the only reason why fields evolve near a boundary. Simple infall of the coordinate observers will cause some small evolution as well, and such evolution is poorly modeled by a propagating wave. This is particularly important at early times, when the radiative boundary condition introduces a bad transient effect. In order to minimize the error at our boundaries introduced by such non-wavelike evolution, we allow for boundary behavior of the form:

with a function of alone and some unknown power. This leads to the differential equation

or in Cartesian coordinates

This expression still contains the unknown function . Having chosen a value of , one can evaluate the above expression one point away from the boundary to solve for , and then use this value at the boundary itself. Empirically, we have found that taking almost completely eliminates the bad transient caused by the radiative boundary condition on its own.

3 Numerical Implementation

The thorn implements the boundary condition x(??) for the evolution. The original Carpet-based version of NewRad provides an additional routine ExtrapolateGammas, which can be used to extrapolate a grid function from the interior to the outer boundaries at . Originally, this was used in the BSSN evolution thorn MLxBSSN on the contracted Christoffel symbols (Xt1xXt3 in the code). This extrapolation routine is not yet ported over to the current version of NewRadX.

3.1 Radiative boundary condition

The derivatives appearing in (??) are approximated as 2nd order accurate finite difference expressions using centred expressions and one sided expressions for boundaries around the coordinate direction.

Finally we try to extrapolate for the part of the boundary that does not behave as a pure wave (i.e.xCoulomb type terms caused by infall of the coordinate lines).

This we do by comparing the source term nghostzones grid points away from the boundary (which we already have), to what we would have obtained if we had used the boundary condition there. The difference gives us an idea of the missing part and we extrapolate that to the boundary assuming a power-law decay.

4 Using This Thorn

The thorn provides the routine NewRadXxApply, which should be scheduled in the ODESolversxRHS bin to apply radiative boundary conditions on evolved variables. To use it in an evolution thorn, it can either be called inside the RHS evaluation routine, or scheduled in a separate function right after the RHS routine.

The call signature is:

voidxNewRadX_Applyxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\
xxxxxxxx(constxcGHx*restrictxconstxcctkGH,xxxxxxx\
xxxxxxxxxconstxLoop::GF3D2<constxCCTK_REAL>xvar,x\
xxxxxxxxxLoop::GF3D2<CCTK_REAL>xrhs,xxxxxxxxxxxxx\
xxxxxxxxxCCTK_REALxvar0,xxxxxxxxxxxxxxxxxxxxxxxxx\
xxxxxxxxxCCTK_REALxv0,xxxxxxxxxxxxxxxxxxxxxxxxxxx\
xxxxxxxxxCCTK_REALxradpower)

where var0 corresponds to , v0 is and radpower is the assumed decay exponent .

4.1 Obtaining This Thorn

The thorn is part of the SpacetimeX arrangement available on GitHub.

gitxclonexgit@github.com:lwJi/SpacetimeX.git

4.2 Basic Usage

For an overview of the implementation and usage of this thorn, please seex[3] for a presentation by Alexandru Dima and Cheng-Hsin Cheng during the weekly CarpetX developer meetings.

4.3 Special Behaviour

In contrast with the Carpet-version of NewRad, which updates the RHS variables on the physical outer boundary of the simulation domain, NewRadX updates them on the so-called “outermost interior points”. These points are defined as the interior points which are located nghostzones or fewer grid points from the outer boundary. Therefore, the boundary conditions are effectively applied on a set of points that are labelled as “interior” in CarpetX. It is necessary to introduce this change because imposing a wave-like time evolution on the CarpetX “proper” boundary points is incompatible with the synchronization conducted by AMReX.

Currently, this thorn only supports single-patch, Cartesian grids provided by CarpetX, but not multi-patch coordinate systems.

4.4 Interaction With Other Thorns

This thorn requires thorn Loop which is part of CarpetX.

4.5 Examples

The simplest example is likely to inspect the source code for TestNewRadX, which is a thorn from SpacetimeX that tests the boundary condition on the evolution of a scalar pulse on flat background. Here the boundary conditions are applied in the RHS calculation routine TestNewRadXxRHS, where NewRadXxApply is called after the main loop that updates the RHS of the state variables in the interior.

<configuration.ccl>
REQUIRESxLoopxNewRadX

<interface.ccl>
USESxINCLUDExHEADER:xnewradx.hxx

<schedule.ccl>
SCHEDULExTestNewRadX_RHSxINxODESolvers_RHS
{
xxLANG:xC
xxREADS:xstate(everywhere)
xxWRITES:xrhs(interior)
xxSYNC:xrhs
}x"CalculatexscalarxwavexRHS"

<test_newradx.cxx>
#includex<newradx.hxx>
externx"C"xvoidxTestNewRadX_RHS(CCTK_ARGUMENTS)x{
xxDECLARE_CCTK_ARGUMENTSX_TestNewRadX_RHS;
xxDECLARE_CCTK_PARAMETERS;
xx/*xFirstxloopxoverxthexinteriorxtoxupdatexRHSxofxthexstatexvariablesx*/
xxgrid.loop_int_device<0,x0,x0>(grid.nghostzones,
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx[=]xCCTK_DEVICE(constxLoop::PointDescx&p)
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxCCTK_ATTRIBUTE_ALWAYS_INLINEx{
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxuu_rhs(p.I)x=xvv(p.I);
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxvv_rhs(p.I)x=xLaplacian_4thorder(uu,xp);
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx});
xx/*xAfterxRHSxgridxfunctionsxarexupdated,xapplyxboundaryxconditionsx*/
xxifx(test_use_newradx)x{
xxxxNewRadX::NewRadX_Apply(cctkGH,xuu,xuu_rhs,x0,x1,xn_falloff);
xxxxNewRadX::NewRadX_Apply(cctkGH,xvv,xvv_rhs,x0,x1,xn_falloffx+x1);
xx}
}

Other examples of CarpetX evolution thorns that use NewRadX include CanudaXxBSSNMoL[4] and Z4c[5].

4.6 Support and Feedback

Please use the Einstein Toolkit mailing list users@einsteintoolkit.org to report issues and ask for help.

5 History

5.1 Thorn Source Code

Initial version of method likely by Miguel Alcubierre; Carpet version of code by Erik Schnetter; CarpetX version of code by Cheng-Hsin Cheng, Jake Doherty, Michail Chabanov, Alexandru Dima.

5.2 Thorn Documentation

Initial version by Roland Haas using text by Miguel, Erik. Current version by Alexandru Dima and Cheng-Hsin Cheng.

5.3 Acknowledgements This documentation is based on the original one for the Carpet version of NewRad, which copies text from comments in the source code as well as the paperx[2].

References

[1]xxx“EinsteinEvolve“, https://bitbucket.org/einsteintoolkit/einsteinevolve.

[2]xxxM.xAlcubierre, B.xBruegmann, P.xDiener, M.xKoppitz, D.xPollney, E.xSeidel and R.xTakahashi, “Gauge conditions for long term numerical black hole evolutions without excision,” Phys.xRev.xD 67, 084023 (2003) doi:10.1103/PhysRevD.67.084023 [gr-qc/0206072].

[3]xxx“NewRadX Intro“, https://github.com/eschnett/CarpetX/wiki/NewRadX-Intro.
[4]xxx“CanudaXxLean“, https://bitbucket.org/canuda/canudax_lean.
[5]xxx“Z4c”, https://github.com/lwJi/SpacetimeX/tree/main/Z4c.

6 Parameters 7 Interfaces

General Implements: newradx

Adds header: newradx.hxx

Uses header: loopxdevice.hxx

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