Peano
Loading...
Searching...
No Matches
Gauge wave with a scalar field

The gauge wave is a pure gauge perturbation of flat spacetime, i.e.

an analytical solution of the Einstein equations that travels along the x-axis with speed one. It is periodic over the unit cube. This script evolves it with the first-order CCZ4 solver of exagrype.api (exagrype.api.FOCCZ4Solver). Next to CCZ4, it hosts four scalar fields which the spacetime advects (exagrype.api.scalarfield.ScalarField)

\( \partial_t \phi + \alpha^2 \partial_x \phi = 0, \)

with the lapse \( \alpha \) of CCZ4 (the metric component g_xx of the gauge wave is \( \alpha^2 \)). The coupling is a fake coupling: the spacetime advects the field, but the field does not feed back. The equation has a closed-form solution on the gauge wave, so the benchmark measures the error of the scalar field against the exact solution (see convergence-study.py).

Couplings

The coupling decides how the time integrators of the two solvers interact:

  • --coupling outer-multiplicative: each solver has its numerical scheme. CCZ4 completes its time step, then the scalar field performs its step with the frozen spacetime of the end of the step (exagrype.api.scalarfield.CCZ4WithScalarField_OuterMultiplicativeCoupling). The scalar field is first order in the time step size, whatever the order of the time integrators is.
  • --coupling inner-additive and --coupling inner-multiplicative: one numerical scheme for both solvers (a "generator" which one assigns to the coupled solver exagrype.api.scalarfield.CCZ4WithScalarField_InnerCoupling). The solvers exchange data in each stage of the time integrator, i.e. the scalar field sees the spacetime of the time level of its stage. The scalar field has the order of the time integrator (four for rk4fd4). Additive: the stages of the solvers run in parallel. Multiplicative: in each stage, the scalar field follows CCZ4.

The numerical scheme (--scheme) is the same for both solvers: fv (Finite Volumes, explicit Euler) or rk1fd4, ..., rk4fd4 (fourth-order Finite Differences with Runge-Kutta of order one to four). benchmarks/exagrype/gauge-wave-with-scalar-field/DESIGN.md documents the design.

Usage

The script requires a Peano build with

--enable-exahype --enable-blockstructured --enable-loadbalancing --enable-exagrype

and is run from this directory via

python3 gauge-wave-with-scalar-field.py --mode release --scheme rk4fd4 --coupling inner-additive
python3 gauge-wave-with-scalar-field.py --mode debug --scheme fv --coupling outer-multiplicative --mesh-size 0.1

The debug mode visualises the task graphs. The script convergence-study.py runs all couplings over several mesh sizes, and estimates the convergence orders.