MUCUR GRMHD 2D Meridional Plane

An axisymmetric general-relativistic magnetohydrodynamics code for accretion flows and jets around rotating (Kerr) black holes. It evolves the full meridional plane (r, θ), from pole to pole, with all three components of velocity and magnetic field.

  • Release v4o
  • Fortran 90 · MPI · PARAMESH
  • Kerr space-time, Boyer–Lindquist and Kerr–Schild
  • 70 modified-gravity and alternative space-times
  • Validated: Blandford–Znajek power, Michel inflow

What the code does

The code solves the equations of ideal GRMHD for a perfect fluid with an ideal-gas equation of state on a fixed, stationary, axisymmetric black-hole background. All quantities depend on (t, r, θ), with 0 ≤ θ ≤ π. Every velocity, momentum and magnetic-field component is evolved, so the gas can rotate and poloidal field can be wound into a toroidal component. Frame dragging creates toroidal field from poloidal field in exactly this way, so the Blandford–Znajek process works self-consistently in the code.

Integrated rates are totals through a sphere, so the results compare directly with 3D simulations and with analytic accretion formulae.

The release comes with five ready-to-run set-ups and five test problems with exact or published solutions to compare with.

Typical applications

  • Bondi–Hoyle–Lyttleton accretion of a wind moving along the spin axis onto a Kerr black hole, with or without magnetic field
  • Spherical (Bondi, Michel) accretion, with or without a radial field
  • Feeding a spinning hole through an equatorial window with both poles open
  • Magnetised black holes (split monopole), extraction of rotational energy by the Blandford–Znajek process, and jet formation
  • Any axisymmetric initial state: tori, shells, clouds, custom magnetic fields

Physics and numerical method

ComponentImplementation
EquationsIdeal GRMHD in the Valencia 3+1 conservative formulation. Conserved variables D, Sj, τ, B̃k; geometric sources from the Christoffel symbols; the Sφ source is exactly zero, so angular momentum changes only through boundary fluxes.
Space-timeKerr black hole in Boyer–Lindquist coordinates, or in horizon-penetrating ingoing Kerr–Schild coordinates with the inner boundary inside the horizon. The full θ dependence of the metric is evaluated at cell centres and on both kinds of faces. Any spin, prograde or retrograde. In addition, 70 alternative black-hole space-times from modified gravity and other theories, with the full θ dependence, in Boyer–Lindquist-type coordinates.
Equation of stateIdeal gas, p = (Γ − 1)ρε, with adjustable adiabatic index Γ
Reconstruction and fluxesMinmod reconstruction of ρ, p, vi, Bi; HLLE Riemann solver with the fast-magnetosonic characteristic speeds
Divergence of BFlux-constrained transport keeps ∇·B = 0 to round-off (relative ~10−14), including the cells on the polar axis
Time integrationSecond-order Runge–Kutta with Strang-type splitting of the source terms; Courant time step
Primitive recoveryOne-dimensional Newton–Raphson iteration safeguarded by bisection (Noble et al. type), with an entropy-based fallback where the energy equation has no physical root (highly magnetised cells)
RobustnessDensity and magnetisation floors that add mass at rest in the normal-observer frame; a pressure floor, with a temperature floor set automatically from the injected gas, and an entropy floor; Lorentz-factor and temperature ceilings; optional magnetised atmosphere; optional limits for the cells inside the horizon (Kerr–Schild); a safety stop and full bookkeeping of what the floors add; a start-up check that the Kerr–Schild inner boundary lies outside the inner horizon
Initial statesGrid filled with the injected wind, a Fishbone–Moncrief torus, or your own state; magnetic field none, uniform vertical, split monopole, Wald field, or a torus field loop, with an optional toroidal part
BoundariesReflection at the polar axis θ = 0 and π (zero flux, zero EMF); outflow inner boundary; outer boundary with injection of a BHL wind, spherical inflow, or an equatorial feeding window, with zero-gradient outflow elsewhere; optional absorbing layer near rmax that removes outgoing waves without reflection
Grid and parallelismPARAMESH blocks of 32 × 32 cells, uniform resolution, MPI parallel. Nθ = 256 and Nr = 256 × n (e.g. 512 × 256 up to 2048 × 256)
Run controlCheckpoint and restart, including a wall-clock limit for queue systems; all problem parameters in a single user header file

Beyond Kerr: 70 modified-gravity and alternative space-times

The code is not limited to the Kerr metric. Besides Kerr, it evolves the flow in 70 further black-hole space-times from modified theories of gravity, quantum-corrected and regular black holes, nonlinear electrodynamics, and black holes surrounded by dark matter. With the same code, the same set-up and the same diagnostics, you can see directly how the theory of gravity changes accretion, outflows and jets.

  • Schwarzschild
  • Einstein–Gauss–Bonnet
  • Proca–Gauss–Bonnet
  • Hartle–Thorne
  • Horndeski
  • DHOST
  • Hořava
  • f(R, T)
  • Bumblebee
  • Kalb–Ramond
  • Barrow
  • Weyl
  • Lee–Wick
  • Disformal Kerr
  • Konoplya–Zhidenko
  • Johannsen–Psaltis
  • Hairy Kerr
  • Kerr–Sen
  • Kerr–EMDA
  • Kerr–Bertotti–Robinson
  • Euler–Heisenberg
  • ModMax
  • Magnetic (confining NLED)
  • Yang–Mills
  • SU(N) sigma model
  • Dyonic
  • Freund–Nambu
  • Yukawa
  • Global monopole
  • Hayward
  • Dymnikova
  • Ghosh–Kumar
  • Generalised Ghosh
  • Quantum-corrected
  • Covariant quantum-corrected
  • Quantum-improved Kerr in PFDM
  • qOS
  • Non-commutative
  • Dunkl
  • CBH
  • Perfect-fluid dark matter (PFDM)
  • Dark-matter halos
  • … and more

How the metrics are implemented

  • Every space-time has the full θ dependence of the metric, so the whole (r, θ) plane is evolved consistently, not just the equator.
  • The metric derivatives come from the complex-step method, which is exact to round-off.
  • Each metric was checked against the formulas in the literature, its derivatives against finite differences, its north–south symmetry, and its Kerr or Schwarzschild limit.

Good to know

  • The alternative space-times use Boyer–Lindquist-type coordinates, so the grid lies outside the horizon. The code checks this at start-up.
  • The parameters of each theory (couplings, charges, hair, dark-matter density and so on) are set in the user header file.
  • A new space-time can be added from a template and is checked the same way. If the metric you need is not in the list, we can add it.

The computational domain

All set-ups share one grid: the full meridional half-plane rmin ≤ r ≤ rmax, 0 ≤ θ ≤ π, with uniform cells in r and θ. Both halves of the spin axis are reflection boundaries, so outflows along the axis in both directions are part of the solution.

In Boyer–Lindquist coordinates the inner boundary lies outside the horizon. In Kerr–Schild coordinates it lies inside the horizon, so the ergosphere and the horizon are both on the grid, the natural choice for jet launching. The code checks at start-up that this boundary stays outside the inner horizon.

At rmax gas is injected where the set-up feeds it: on the upstream hemisphere for a wind along the axis, at all angles for spherical inflow, or through a window around the equator. Elsewhere the boundary lets gas leave freely, and an absorbing layer inside rmax removes outgoing waves without reflection.

Computational domain: meridional half-plane with the spin axis, black hole, horizon and ergosphere, inner and outer boundaries and the absorbing layer
The computational domain shared by all set-ups (not to scale)

Ready-to-run set-ups

The code comes with five complete set-ups, plus the headers of every test problem. Each set-up is one user header file with all its initial and boundary values. To start a new problem, pick the closest set-up and change what you need.

Set-upCoordinates and gridMagnetic field at t = 0Purpose
GRHDBoyer–Lindquist, 2.3 ≤ r ≤ 100 M, 512 × 256NoneHydrodynamic Bondi–Hoyle–Lyttleton accretion along the spin axis; reference for the magnetised runs
GRMHD (default)Boyer–Lindquist, 2.3 ≤ r ≤ 100 M, 512 × 256Uniform vertical field, β0 = 10, also carried by the windMagnetised BHL accretion; flux accumulating on the hole
GRMHD_BHfieldBoyer–Lindquist, 2.3 ≤ r ≤ 100 M, 512 × 256Split monopole on the hole (β = 1 at rmin); unmagnetised windMagnetised black hole in an unmagnetised wind
GRMHD_jet_KSKerr–Schild, 1.0 ≤ r ≤ 100 M, 1024 × 256Uniform vertical field, β0 = 10Jet launching by the Blandford–Znajek process, with the ergosphere and the horizon on the grid
GRMHD_jet_equatorialKerr–Schild, 1.0 ≤ r ≤ 100 M, 1024 × 256Uniform vertical field, β0 = 10; gas injected only in 3π/8 ≤ θ ≤ 5π/8Jets along both open poles, fed by gas that drags magnetic flux onto the hole

The first four inject the same wind along the spin axis onto a Kerr hole with a = 0.9: v∞ = 0.2, cs,∞ = 0.1, ρ∞ = 1, Γ = 4/3 (Mach 2, accretion radius 40 M).

Beyond these, the code can start from a Fishbone–Moncrief torus with a poloidal field loop, a split monopole, the Wald field of a Kerr hole in a uniform field, or any axisymmetric state you write yourself: tori, shells, clouds, custom fields and perturbations.

Six cartoons of the initial set-ups: BHL wind, spherical inflow, equatorial feeding with jets, magnetised torus, split monopole, uniform Wald field
The initial set-ups of the code (cartoons, not to scale; blue: injection at rmax): (a) BHL wind along the spin axis, (b) spherical inflow with the exact Michel state, (c) gas fed through an equatorial window with both poles open for jets, (d) Fishbone–Moncrief torus with a field loop, (e) split monopole on the hole, (f) Wald field of a Kerr hole in a uniform field.

Validation: five test problems

The compiled code is tested on five problems, each with an exact solution, a conserved quantity or published results to compare with. Every test has a ready header, a script that builds and runs it, pass criteria and an analysis script.

TestRunsWhat it testsStatus
Blandford–Znajek power of a split monopoleV1–V3Rotating magnetosphere of a Kerr hole, extraction of rotational energy, magnetic terms in Kerr–Schild coordinatesPassed
Spherical accretion: Michel and Bondi flowV4a–c,
V5, V6
Hydrodynamics and gravity against an exact solution, flow through the horizon, order of convergenceV4a passed; V4b, V4c, V5 running; V6 to be run
Bondi–Hoyle–Lyttleton accretion along the spin axisB1–B4Shocks in curved space, dependence on Γ and spin, against published axisymmetric runsTo be run
Kerr black hole in a uniform magnetic field (Wald)W1–W4Magnetic field around a Kerr hole: static field, horizon flux, Blandford–Znajek powerTo be run
Magnetised Fishbone–Moncrief torusFM1–FM4MRI-driven accretion: accretion rate, horizon flux, efficiency and spin-up against published 2D runsTo be run

Blandford–Znajek power of a split monopole (V1–V3): passed

The standard test for jet physics around a spinning black hole is a split-monopole magnetic field on the hole, in a strongly magnetised plasma (σ = b²/ρ = 50). Frame dragging forces the field lines to rotate, and they carry an outgoing Poynting flux that must match the Blandford–Znajek formula:

PBZ = κ Φ² ΩH²,   κ = (1 + 1.38 ΩH² − 9.2 ΩH⁴) / 6π,   ΩH = a / 2r+

We ran the test for three spins in Kerr–Schild coordinates, with the horizon and the ergosphere on the grid: V1 (a = 0.9) and V2 (a = 0.5) on 1024 × 256 cells, and V3 (a = 0.99) on 2048 × 256 cells with rmax = 100 M, to t = 80 M.

0.93–0.99
measured power / PBZ near the horizon
≈ 0.5
field-line rotation ΩF/ΩH, as expected
ΩH1.98
measured scaling of power per unit flux (theory: ΩH²)
≤ 10−13
maximum relative ∇·B: round-off level
TestSpin aΩHPEM / PBZΩF / ΩHNorth–south differencemax relative ∇·B
V20.50.1340.930.49≤ 0.7 %4 × 10−14
V10.90.3130.960.50≤ 0.4 %5 × 10−14
V30.990.4340.990.48≤ 0.1 %3 × 10−13

Power ratio measured just outside the horizon (r ≈ 1.1 r+) at t = 50 M; field-line rotation is the median over θ = 10°–80° at r = 3 M. Behind the outgoing front the power ratio is flat in radius to within a few per cent; V3 stays at 0.99 near the horizon at t = 70 M and reproduces an earlier run with rmax = 50 M. At a = 0.99 the measured power agrees with the formula above, including its high-spin correction, to within 1 %; the simple second-order formula ΩH²/6π overestimates it by 8 %.

Maps of magnetisation, temperature, Lorentz factor and field-line twist for the a = 0.9 split-monopole test at t = 50 M
Test V1 (a = 0.9) at t = 50 M: magnetisation σ, temperature Θ = p/ρ, Lorentz factor W and field-line twist Bφ̂/Br̂, with poloidal field lines in black. The top row shows the inner 6 M and the bottom row 50 M. The white dashed line is the outer horizon and the cyan dotted line the inner horizon. The hot, low-σ layer on the equator is the current sheet of the split monopole.
Comparison of the three spins: power relative to Blandford-Znajek, field-line rotation, electromagnetic power, spin dependence, angular distribution
All three spins at t = 50 M. Top: power relative to PBZ, field-line rotation and electromagnetic power against radius. Bottom: power per unit flux against ΩH compared with theory, the angular distribution of the power (following the sin³θ profile of the monopole solution), and ΩF/ΩH across θ.

Michel inflow onto a black hole (V4a): passed

Spherical accretion of an ideal gas (Γ = 4/3) onto a non-rotating black hole has an exact solution: the flow is subsonic far out, passes the sonic point (here at 8 M) and falls supersonically through the horizon. The exact state is injected at rmax = 100 M at all angles, and the code must relax to the solution, with the accretion rate Ṁ = 876.13 and the Bernoulli constant −hut = 1.17180 the same at every radius. The test checks the gravitational source terms, the radial fluxes through the horizon in Kerr–Schild coordinates, and the inner and outer boundaries against an answer known to all digits.

Run V4a: Kerr–Schild coordinates, a = 0, 1.4 ≤ r ≤ 100 M, 512 × 256 cells, to t = 3000 M (292 008 steps). The results below are averaged over t = 2000–3000 M.

0.04 %
L1 error of the density, r = 2.27–100 M (ur: 0.11 %)
876.84
accretion rate, exact 876.13 (+0.08 %)
1.17182
Bernoulli constant, exact 1.17180
0
floors, failed inversions or NaN in the whole run

In the subsonic region (r > 8 M) the code reproduces the Michel solution to a few 10−4, and Ṁ and the Bernoulli constant are flat to the same accuracy. The largest deviation, 0.4–0.7 % in ρ, p and Ṁ at r = 2.3–3 M next to the horizon, is the truncation error of this coarsest grid; the runs on 1024 × 256 and 2048 × 256 cells (V4b, V4c) will give the order of convergence. The flow stays spherical to |ρ/⟨ρ⟩θ − 1| ≤ 3.7 × 10−4 for r > 3 M, with north and south identical to round-off.

Michel test V4a: density against the exact solution, deviations, L1 errors against time, accretion rate against time, conserved quantities against radius, angular variation of density
Test V4a. Top: density against the exact solution; relative deviation of ρ, ur and p (time average t = 2000–3000 M; dashed line: horizon, dotted: sonic point); L1 errors of ρ and ur against time. Bottom: Ṁ/ṀMichel at the four flux radii against time; Ṁ and the Bernoulli constant against radius; angular variation of ρ at t = 3000 M.

Checks of the scheme

  • Before compilation, every new formula was checked against a line-by-line Python transcription of the scheme. The metric derivatives match finite differences to 2 × 10−10, and the 3+1 split and geometric sources are exact to round-off.
  • Steady geodesic inflow onto a Kerr hole, in both coordinate systems and through the horizon, converges with resolution.
  • Equatorial symmetry, the polar-axis boundary conditions and the corner ∇·B on the axis are preserved to round-off; no mass leaks through the axis.
  • Every run is checked for relative ∇·B < 10−12, no failed inversions, and mass added by the floors below 1 % of the accretion rate.

What a run produces

  • Accretion rates of mass, energy and angular momentum (Ṁ, Ė, L̇) through spheres at four radii, as functions of time
  • Binary VTK snapshots with 50 quantities on the (R, z) half-plane, ready for VisIt and ParaView: densities, velocities, four-velocities, Lorentz factor, Mach numbers, Bernoulli parameter, fluxes, magnetic field, magnetisation, plasma β, the magnetic flux function ψ and more
  • A time series of the magnetic flux on the hole and the MAD parameter φBH
  • Floor statistics, so the effect of numerical floors can be checked
  • Python tools for maps, radial profiles, time series and the Blandford–Znajek analysis

Physics extracted from the output

  • Accretion rate, efficiency and angular-momentum transport
  • Shock structure, sonic surfaces, bound and unbound gas
  • Magnetic flux on the horizon and the magnetically arrested state
  • Blandford–Znajek power and identification of the jet

All quantities are in geometrised units, G = c = M = 1, with lengths and times in M. The manual gives the conversion to physical units.

Working with the code: collaboration

The source code is not publicly distributed. The tests above show that the code works reliably in the (r, θ) plane around Kerr black holes. If you have an astrophysical problem that fits this framework, we are happy to solve it together as a collaboration.

  1. You

    Describe the problem

    The physical system, spin, initial state, magnetic field, how gas is fed, and the quantities you want to measure.
  2. We

    Check feasibility

    We check that the problem is axisymmetric and fits the meridional-plane code, and agree on a plan.
  3. We

    Prepare the set-up

    We write the user header file and the initial and boundary data for your problem.
  4. You

    Run the simulations

    You run the code with the prepared set-up, following the user manual.
  5. Together

    Analyse and publish

    We interpret the results together, and they go into a joint publication.

Contact

To discuss a collaboration, write to us with a short description of your problem.

E-mail: orhan.donmez71@gmail.com

Coming soon

Results and movies will be added to this page.

Jets around Kerr black holesNumerical modelling of jet launching and propagation
Code-test moviesTime evolution of the validation problems
More code testsMichel convergence study, Bondi–Hoyle–Lyttleton, Wald and magnetised-torus results

Methods the code builds on

  1. M. Abramowicz, M. Jaroszyński, M. Sikora, Relativistic, accreting disks, A&A 63, 221 (1978)
  2. L. Antón et al., Numerical 3+1 general relativistic magnetohydrodynamics: a local characteristic approach, ApJ 637, 296 (2006)
  3. R. D. Blandford, R. L. Znajek, Electromagnetic extraction of energy from Kerr black holes, MNRAS 179, 433 (1977)
  4. L. G. Fishbone, V. Moncrief, Relativistic fluid disks in orbit around Kerr black holes, ApJ 207, 962 (1976)
  5. J. A. Font, Numerical hydrodynamics and magnetohydrodynamics in general relativity, Living Rev. Relativ. 11, 7 (2008)
  6. C. F. Gammie, J. C. McKinney, G. Tóth, HARM: a numerical scheme for general relativistic magnetohydrodynamics, ApJ 589, 444 (2003)
  7. S. S. Komissarov, General relativistic magnetohydrodynamic simulations of monopole magnetospheres of black holes, MNRAS 350, 1431 (2004)
  8. J. C. McKinney, C. F. Gammie, A measurement of the electromagnetic luminosity of a Kerr black hole, ApJ 611, 977 (2004)
  9. F. C. Michel, Accretion of matter by condensed objects, Ap&SS 15, 153 (1972)
  10. P. Mösta et al., GRHydro: a new open-source general-relativistic magnetohydrodynamics code for the Einstein toolkit, Class. Quantum Grav. 31, 015005 (2014)
  11. S. C. Noble, C. F. Gammie, J. C. McKinney, L. Del Zanna, Primitive variable solvers for conservative general relativistic magnetohydrodynamics, ApJ 641, 626 (2006)
  12. A. J. Penner, General relativistic magnetohydrodynamic Bondi–Hoyle accretion, MNRAS 414, 1467 (2011)
  13. A. Tchekhovskoy, R. Narayan, J. C. McKinney, Black hole spin and the radio loud/quiet dichotomy of active galactic nuclei, ApJ 711, 50 (2010)
  14. A. Tchekhovskoy, R. Narayan, J. C. McKinney, Efficient generation of jets from magnetically arrested accretion on a rapidly spinning black hole, MNRAS 418, L79 (2011)
  15. G. Tóth, The ∇·B = 0 constraint in shock-capturing magnetohydrodynamics codes, J. Comput. Phys. 161, 605 (2000)
  16. R. M. Wald, Black hole in a uniform magnetic field, Phys. Rev. D 10, 1680 (1974)