Divergence Control in Relativistic MHD
Scrollable formula. Use Left and Right arrow keys to reveal hidden content.
Scrollable table. Use Left and Right arrow keys to reveal additional columns.
Scrollable figure. Use Left and Right arrow keys to inspect hidden content.
Ideal magnetohydrodynamics requires the magnetic field to satisfy a no-monopole constraint. Discretization, mesh refinement, and interpolation can create divergence errors that drive unphysical forces and contaminate conserved quantities. Constrained transport, vector-potential evolution, and hyperbolic cleaning control the error by different mechanisms and have different mesh and gauge failure modes. A fair comparison uses identical physical fluxes and tests both the divergence measure and the underlying MHD solution.
Helpful background. Formulations of General Relativity supplies the spacetime split, Ordinary Differential Equations supplies evolution stability, Relativistic Matter and Compact Objects supplies magnetized matter regimes, Computational Relativity supplies evidence standards, and Fluid and Kinetic Theory supplies induction and MHD waves.
The discrete magnetic constraint
Section titled “The discrete magnetic constraint”Let be the future-directed unit normal to a spatial slice and define the Eulerian magnetic four-vector by , so and its evolved spatial components are . This page absorbs into and uses . The constraint is
Its numerical norm must match the storage geometry. A cell-centered finite-difference divergence applied to a face-centered constrained-transport field is a useful independent diagnostic, but it need not vanish to roundoff even when the scheme’s staggered divergence does. Report both and normalize by a magnetic-gradient scale without hiding absolute values.
Magnetic divergence is not physical density. Cleaning it too aggressively can launch waves or dissipate magnetic energy; leaving it localized can produce forces parallel to the error. Monitor fluid and magnetic observables together.
Three control strategies
Section titled “Three control strategies”Constrained transport places magnetic fluxes on faces and electric fields on edges so the discrete divergence is preserved by telescoping curls. It can maintain its native constraint to roundoff on a fixed grid. AMR requires divergence-preserving prolongation, restriction, and refluxing; generic component interpolation destroys the property.
Evolving a vector potential and constructing from a discrete curl also makes divergence of curl vanish in a compatible operator. Gauge modes of are not physical but affect interpolation. Etienne et al. 2010, §§II–IV and Figures 1–14 develops vector-potential GRMHD on AMR grids and compares tests.
Hyperbolic or parabolic cleaning introduces a scalar field that propagates and damps divergence. Its wave speed and damping scale must be resolved and boundary conditions must let the cleaning pulse leave. Cleaning reduces rather than algebraically eliminates the error, but it is flexible on unstructured or cell-centered meshes.
The cancellation behind constrained transport is elementary on a Cartesian two-dimensional mesh. Store on vertical faces, on horizontal faces, and at their shared corners. With the same oriented difference operators used everywhere, Faraday’s law updates
Consequently,
because : every edge contribution cancels twice with opposite signs. Shared edge values, compatible boundary operators, and time-integrator stage values are essential. In curved coordinates the conserved face variable is the magnetic flux associated with ; the integral cancellation survives, while naive differences of undensitized components need not. Constrained transport preserves the initial native divergence, including any initial error; it does not magically remove an inconsistent initialization.
Gauge and AMR interactions
Section titled “Gauge and AMR interactions”For vector-potential evolution, an algebraic gauge can contain zero-speed gauge modes. Regridding interpolates those modes and can convert them into magnetic structures at refinement boundaries. A generalized Lorenz gauge propagates gauge content away and often behaves more robustly. Etienne et al. 2012, §III and §V, Figures 1–2 identifies this AMR gauge pathology and its mitigation.
The comparison axes are native and independent divergence norms, magnetic energy, conservation, interface artifacts, cost, and physical-wave accuracy. Constrained transport is strongest on compatible staggered meshes; cleaning is easier to compose with varied meshes; vector potentials handle AMR well only with appropriate gauge and transfer operators. None is universally best.
Benchmark ladder
Section titled “Benchmark ladder”Use a passive-induction translation as the common smooth record. In Minkowski spacetime on with periodic boundaries, prescribe and
with , , and . These expressions give the exact reference and satisfy the continuum constraint identically. Use fourth-order spatial operators and RK4; for cleaning use propagation speed one and damping parameters . Run grids with to , repeating CFL factors . Apply the same velocity, reconstruction order, and boundary data to constrained transport, vector-potential curl, and cleaning variants.
Compare fields with
where , and normalize both native and independently centered divergence norms as . Accept the , CFL- result only if , magnetic-energy drift is at most , and the last two refinements approach fourth order within . Require native for CT or compatible curl and independently evaluated for every variant. Reducing CFL from to may change by no more than ; varying must reveal, rather than hide, any cleaning-wave reflection.
Observed discrepancy: not available—specification only.
Then run a circularly polarized Alfvén wave, a magnetized shock tube, and a localized injected divergence pulse. Measure phase, shock locations, divergence, magnetic energy, and conserved budgets. For CT, verify native divergence to roundoff. For cleaning, measure propagation and decay rates. For vector potential, repeat with algebraic and Lorenz gauges across refinement boundaries.
Add a magnetized TOV star or torus, moving refinement boxes through the magnetic field. Track central density, baryon mass, magnetic energy, constraints, and any spurious field at interfaces. The validity regime is ideal GRMHD on the declared mesh and boundary conditions; low divergence does not validate resistive or kinetic physics.
Environment and failure criteria
Section titled “Environment and failure criteria”Pin magnetic variable placement, discrete curl and divergence, numerical flux, reconstruction, CT electric-field assembly or cleaning parameters or vector gauge, AMR transfer and reflux operators, boundaries, grid hierarchy, integrator, CFL factor, precision, and code revision. A clean interface could be divb-compare --config alfven-amr.toml --output run/, emitting native and independent norms, field data, budgets, interface profiles, refinement sweeps, and environment metadata. It specifies a rerun record without claiming supplied software.
Reject a method when divergence grows with resolution, a magnetic-energy budget has unexplained changes, cleaning waves reflect, or regridding creates persistent structures. Magnetic energy alone is not generally conserved: it exchanges energy with the fluid through electromagnetic work even in a closed domain. The passive uniform-translation benchmark has constant integrated magnetic energy, but a dynamical MHD test must include that exchange. Failure modes include incompatible CT prolongation, an algebraic zero-speed gauge on AMR, over-damped cleaning, inconsistent boundary fields, and comparing only the native divergence operator that the update preserves by construction.
Diagnostic
Section titled “Diagnostic”A vector-potential AMR run has roundoff native divergence, yet stationary magnetic loops appear at every refinement boundary and grow after regridding. Switching from algebraic to Lorenz gauge removes them. Was the original magnetic field physically accurate?
Solution
No. The curl construction preserved its discrete divergence while an interpolated zero-speed gauge mode generated spurious magnetic structure. The independent field and energy diagnostics reveal the failure. Use a propagating gauge and compatible transfers, then demonstrate convergence of the physical field and conserved budgets as well as the native constraint.
References
Section titled “References”- Etienne, Z. B., Liu, Y. T., and Shapiro, S. L. (2010). “Relativistic magnetohydrodynamics in dynamical spacetimes: A new AMR implementation.” Physical Review D 82, 084031. arXiv.
- Etienne, Z. B., Paschalidis, V., Liu, Y. T., and Shapiro, S. L. (2012). “Relativistic MHD in dynamical spacetimes: Improved EM gauge condition for AMR grids.” Physical Review D 85, 024013. arXiv.