---
title: "cuHARM — paper by Begue et al. (2022) — summary and ideas"
description: "cuHARM speeds up simulations of black hole accretion on GPUs and shows how a thick disk’s starting conditions affect whether it sustains a jet."
canonical: "https://research.elamur.ai/free/en/papers/begue-2022-cuharm-new-gpu-accelerated-gr/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Parse](https://mova.elamur.ai/free/en/parse/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Translate](https://md.translate.elamur.ai/free/en/) · **Research** · [Gali](https://md.gali.elamur.ai/free/en/) · [MCP](https://mcp.elamur.ai/) · [Locations](https://md.locations.elamur.ai/free/en/) · [Weather](https://md.weather.elamur.ai/free/en/) · [Constitution](https://md.constitution.elamur.ai/)

[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/begue-2022-cuharm-new-gpu-accelerated-gr/)

[Elamur Research](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2022](https://md.research.elamur.ai/free/en/papers/2022/) / cuHARM : a new GPU accelerated GR-MHD code and its application to ADAF disks

# cuHARM : a new GPU accelerated GR-MHD code and its application to ADAF disks

Paper · 2022 · Damien Begue, Asaf Pe'er, Guoqiang Zhang et al.

**Authors:** Damien Begue, Asaf Pe'er, [Guoqiang Zhang](https://md.research.elamur.ai/free/en/authors/guoqiang-zhang/), [BinBin Zhang](https://md.research.elamur.ai/free/en/authors/binbin-zhang/) and Benjamin Pevzner · **Year:** 2022 · **Venue:** arXiv:2205.02484 · **Licence:** [CC BY 4.0 (arXiv)](http://creativecommons.org/licenses/by/4.0/)

Cited by **3** papers in our library of more than 163,000 papers whose bibliographies we read · [licence](http://creativecommons.org/licenses/by/4.0/)

- [PDF](https://arxiv.org/pdf/2205.02484)
- [DOI 10.3847/1538-4365/aca276](https://doi.org/10.3847/1538-4365/aca276)
- [arXiv 2205.02484](https://arxiv.org/abs/2205.02484)

## Summary

Gas falling towards a rotating black hole can feed a narrow jet along the rotation axis. Predicting when that happens requires following the gas and its magnetic field together, from the body of the disk down to the event horizon. That is a demanding calculation, especially when the simulation has to run long enough for the effects of its starting conditions to settle. Bégué and colleagues introduce cuHARM, a version of the HARM numerical solver that uses CUDA-C and OpenMP to distribute that calculation across GPUs in a single workstation. On the Nvidia DGX-V100 considered in the paper, the authors estimate a speedup of about 10 relative to CPU-only computation. They present it as a way to run high-resolution simulations without access to a multi-node supercomputer. Their approach is an application of [GPU and parallel computing](https://md.research.elamur.ai/free/en/topics/gpu-parallel-computing/).

The authors use cuHARM for 9 simulations of thick, radiatively inefficient accretion disks around a rotating black hole. They focus on the SANE regime, in which the field at the horizon is weak enough for accretion to proceed relatively smoothly. They first check their results against an earlier comparison that used several independent codes with the same initial conditions. They then change the strength of the initial field, the size of the starting disk, and the pressure response of the gas. In the smaller disks, increasing the seed field changes how much magnetic flux builds up at the horizon relative to the accretion rate. The measured mass accretion rates remain comparable, and the disks sustain jets across the field strengths tested.

The larger disks bring more matter to the horizon, yet their normalized horizon flux is weaker. A jet disappears or becomes intermittent even in a comparison where the initial magnetic energy per unit disk mass is held fixed. The study also finds a tendency towards a wider jet with the relativistic gas prescription. The corresponding disks differ in thickness and mass, which makes it difficult to isolate the part of the width change due to gas pressure alone. In the runs that start with insufficient pressure support, a jet appears during the initial rearrangement and fades as the horizon flux falls. Together, the simulations distinguish the persistence of the accreting disk from the persistence of its jet, and show why the magnetic flux that actually reaches the horizon matters more for the latter than the starting field strength considered on its own.

## Deep dive: cuHARM : a new GPU accelerated GR-MHD code and its application to ADAF disks

cuHARM speeds up simulations of black hole accretion on GPUs and shows how a thick disk’s starting conditions affect whether it sustains a jet. · about 47 minutes to read

**In this deep dive**

1. [The problem and its context](#dd-the-problem-and-its-context)
2. [The method, step by step](#dd-the-method-step-by-step)
3. [Experiments and results](#dd-experiments-and-results)
4. [What the ablations show](#dd-what-the-ablations-show)
5. [Limitations](#dd-limitations)
6. [What came after](#dd-what-came-after)

### The problem and its context

#### A disk can keep accreting as its jet changes

The paper considers gas orbiting a black hole in a thick disk. To move inward, the gas has to give up angular momentum. Magnetic stresses help the disk move angular momentum outward, allowing matter to cross the horizon. Some configurations also develop a low-density, magnetically dominated outflow along the poles. Both processes involve magnetic fields, but they sample different parts of the system. The disk depends on how stresses act across a broad volume, while a jet depends on conditions near the axis and on the magnetic flux accumulated close to the black hole.

The authors place their calculations in the context of active galactic nuclei, X-ray binaries, and gamma-ray bursts, where accretion and relativistic jets are relevant. The field already had observational and theoretical reasons to connect disks with jets. The unresolved questions concerned how particular flows launch, power, and confine those jets. A useful numerical experiment therefore has to follow the disk and its surroundings at the same time. A calculation confined to the disk would miss the polar region where a jet might form. A calculation that represents the disk only as a source of matter would skip the transport that helps determine the field reaching the horizon.

Cooling helps set the geometry of an accretion flow. The paper describes radiatively efficient disks near the Eddington accretion rate as able to release roughly 10% of the rest-mass energy of the accreted material. Efficient cooling yields a thin disk. In the low-accretion-rate case examined here, the gas is tenuous and takes longer to cool than to fall inward. Much of its energy travels with the flow. Such a disk is called an advection-dominated accretion flow, or ADAF, and the low-luminosity case is also described as a radiatively inefficient accretion flow. Its thickness is comparable to its radius. The paper mentions a separate, high-accretion-rate route to advection domination, in which photons have difficulty escaping, and confines its investigation to the tenuous case.

The magnetic configuration supplies another distinction. A weak seed field can be amplified by the magnetorotational instability, or MRI, in the rotating flow. As the instability develops, magnetic stresses contribute to angular momentum transport and the inner disk changes. If enough magnetic flux builds up near the horizon, pressure from the field can impede infall. The literature calls that state a magnetically arrested disk, or MAD. Gas can reach the inner region in streams, and earlier simulations described by the paper found strong relativistic jets whose power was limited by the flux at the horizon.

In Standard And Normal Evolution, or SANE, the corresponding horizon flux is smaller and matter accretes more smoothly. Previous computations had also found relativistic jets in this regime, generally weaker than the ones in magnetically arrested flows. The distinction raises a question that the accretion regime alone leaves open. Two flows can both accrete smoothly and still differ in whether they carry enough field to maintain a polar outflow. Finding out which changes in the starting disk produce that outcome is one of the paper’s aims.

#### From steady calculations to time-dependent simulations

The authors describe a progression from analytical work on steady disks and energy extraction to global simulations that evolve matter and fields in the spacetime of a rotating black hole. Analytical work supplied recognizable disk configurations and mechanisms for extracting energy. Time-dependent calculations made it possible to investigate how accretion, magnetic stresses, and ejection develop together, including periods when the system is still adjusting.

Earlier simulations of thick disks identified a disk, a polar funnel or jet, and a surrounding corona. The study by Beckwith and colleagues, as discussed in the paper, varied the initial magnetic configuration. It found the disk morphology comparatively insensitive and the presence of a strong jet more sensitive. Other work examined tilted disks. The authors also describe simulations in which jet power exceeded accretion power. Those simulations provided numerical evidence for extraction of rotational energy from the black hole through the Blandford–Znajek mechanism. The existence of that mechanism is part of the background to the cuHARM study, whose disk experiments ask which starting conditions allow a jet to persist.

Thin disks required a different set of numerical choices. The examples discussed in the paper use cooling functions and grids designed to resolve a narrow layer. Prior studies compared simulated angular momentum with an analytical thin-disk solution, investigated radiative efficiency, and examined alignment in tilted systems. A grid suitable for a thick disk has its own compromises. It needs enough cells in the disk to represent the instability driving transport, enough coverage near the axis to study an outflow, and a timestep small enough to evolve both regions stably.

The paper also points to the use of accretion simulations alongside separate radiative transfer calculations for interpreting observations of the black hole in M87. The fluid calculation supplies quantities such as density, velocity, and magnetic field. The radiative calculation is a further step toward an observable image. This division helps explain the value of a faster fluid solver. Exploring several plausible initial conditions already entails several expensive simulations, before calculating what those flows would look like.

#### Why move HARM to a GPU workstation?

Explicit grid calculations repeatedly carry out similar operations on many cells. A cell’s next state depends heavily on its neighbors and on local quantities such as the spacetime metric. A GPU can carry out many of these operations concurrently. The authors situate cuHARM among earlier uses of accelerators for fluid calculations and identify grim and H-AMR as GPU-capable general relativistic codes aimed at accretion disks. They describe grim as using the ArrayFire library and H-AMR as combining CUDA, OpenMP, and MPI in a hierarchy that can span nodes.

The starting point for cuHARM is the publicly available HARM solver. It provides the numerical approach for writing the fluid and field equations as a conservation problem, computing the exchanges between neighboring cells, and recovering the physical state after each update. cuHARM keeps that foundation and reorganizes the work and memory access for GPUs. Its immediate target is a single node equipped with several accelerators.

That scope matters because an accretion experiment spends time in distinct physical and numerical stages. A calculation first has to allow the initial disturbance to grow. It then has to continue long enough to see where inflow and angular momentum transport settle, and whether a jet survives the adjustment. A fast initial evolution would be of limited use if the run stopped before those diagnostics became interpretable. The engineering problem is to make the full calculation affordable while maintaining enough spatial resolution to study the disk.

### The method, step by step

#### Setting up the black hole, the disk, and the field

A cuHARM run begins with a rotating black hole and an idealized torus, a ring-shaped distribution of gas with a central hole. The black hole supplies a fixed spacetime. The starting torus comes from the hydrostatic equilibrium solution of Fishbone and Moncrief. Its inner edge and the position of maximum pressure determine the initial extent of the gas. The paper fixes the inner edge at 6M and places the pressure maximum at either 12M or 13M, with outer disk boundaries of roughly 50M and 80M, respectively. Here M in a radius or time denotes the black hole mass unit used in the calculation. The paper also uses M separately for the integrated initial torus mass.

The authors normalize the peak torus density to 1 and rescale its pressure correspondingly. This makes the density scale common across runs while allowing the integrated mass to change with the shape of the torus. The adiabatic index determines the relation between pressure and internal energy. They use 4/3 for the relativistic gas prescription and 5/3 for the nonrelativistic one. Most runs use the same prescription to construct the torus and evolve it. In the deliberately unbalanced runs, the torus is built with 5/3 and evolved with 4/3, reducing the pressure support of its initial configuration.

The authors add a weak magnetic field in the poloidal plane, the plane containing the radial and polar directions. Its topology is supplied by a vector potential that follows the density inside the torus.

```
Aφ = max(ρ/ρₘₐₓ − 0.2, 0)
```

Aφ is the azimuthal component of the vector potential. The local rest-mass density is ρ, and ρₘₐₓ is its initial maximum in the torus. The cutoff 0.2 confines the non-zero potential to material above that fraction of the peak density. The maximum operator selects zero where the density-dependent expression is negative.

```
β₀ = p_g,max/p_B,max
```

β₀ is the initial field normalization, while p_g,max and p_B,max are the maxima of gas pressure and magnetic pressure used in setting it. A smaller β₀ corresponds to a stronger initial field for a given gas configuration. The tested values are 100, 44, and 20. The field is initially subdominant, and the authors add a random pressure perturbation of magnitude 4 percent to initiate the evolution. The starting configuration and the perturbation are the inputs to a time-dependent physical simulation.

How cuHARM advances an accretion simulation The steps in order.

#### Choosing coordinates and arranging the cells

The simulations use horizon-penetrating Kerr–Schild coordinates for the spacetime of a rotating black hole. The coordinate system allows the calculation to follow the gas across the horizon without encountering a singularity of the coordinate description there. The spin used throughout is 0.9375. The authors set the black hole mass, the speed of light c, and the gravitational constant G to 1 for the spacetime calculation.

```
Σ = r² + a² cos²(θ)
```

Σ abbreviates the geometric quantity written as ρ² in the metric part of the paper. The notation here distinguishes it from the gas density ρ. The radial coordinate is r, the polar angle is θ, and a is the normalized black hole spin. The allowed spin range in the line element is −1 ≤ a ≤ 1.

```
ds² = −(1 − 2r/Σ)dt² + (4r/Σ)dr dt + (1 + 2r/Σ)dr² + Σdθ²
      + sin²(θ)[Σ + a²(1 + 2r/Σ)sin²(θ)]dφ²
      − (4ar sin²(θ)/Σ)dφ dt − 2a(1 + 2r/Σ)sin²(θ)dr dφ
```

The squared spacetime interval is ds². The coordinate displacements are dt in time, dr in radius, dθ in polar angle, and dφ in azimuth, the angle around the rotation axis. Σ and a have the meanings given above. The line element specifies the metric, which the fluid solver uses to relate coordinate components to distances, volumes, and contractions in this spacetime.

The numerical mesh is regular in computational coordinates X, Y, and Z. Equal intervals in those coordinates can cover different physical distances. A logarithmic-type radial map concentrates cells in the inner region and lets them cover larger distances farther away.

```
r(X) = R₀ + exp(X)                       for X < x_b
       R₀ + exp[X + (X − x_b)^(n_X)]     for X ≥ x_b
```

R₀ is the offset, set to 0, and n_X is the exponent in the outer branch, set to 4. The break coordinate x_b is chosen so the grid changes branch at r = 400M. The radial domain extends to 5 × 10³ M. The exponential and hyper-exponential branches therefore serve different parts of a domain that covers both the inner flow and much larger distances.

```
θ(Y) = (π/2)(1 + Y) + [(1 − h)/2] sin[π(1 + Y)]
```

Y is the computational polar coordinate, π is the circle constant, and h is the grid concentration parameter, set to 0.3. This h describes the grid and is distinct from the fluid enthalpy used below. The mapping puts more cells near the equatorial plane, where the bulk of the torus lies.

```
φ = Z
```

Z is the computational azimuthal coordinate. The azimuth φ is periodic. Radial boundaries use inflow conditions, and the polar boundaries use reflection, reversing the signs of the polar velocity and magnetic components across the axis. In the cells closest to that boundary, the polar component of the four-velocity is also interpolated towards zero at the pole. A further deformation makes the innermost polar cells more nearly cylindrical. This relaxes the time-step restriction from narrow cells and reduces the resolution available close to the axis.

These choices distribute the numerical effort unevenly by design. More polar cells go into the disk, where the authors want to resolve magnetic turbulence. Near the poles the geometry favors a practical timestep. The same allocation later limits the distance over which the simulation can describe a narrow jet with confidence.

#### Evolving a magnetized relativistic fluid

General relativistic magnetohydrodynamics couples the evolution of matter and its electromagnetic field in curved spacetime. The fluid state includes rest-mass density, internal energy density, gas pressure, and velocity. The stress-energy tensor combines matter and field contributions to the energy and momentum. cuHARM uses ideal, non-resistive magnetohydrodynamics, in which the electric field measured in the fluid frame vanishes.

```
∇μ(ρu^μ) = 0
```

∇μ is the covariant derivative, which incorporates the geometry associated with the index μ. The index runs over spacetime components. The rest-mass density is ρ and u^μ is the fluid four-velocity. The equation expresses conservation of rest mass.

```
∇μT^μν = 0
```

T^μν is the stress-energy tensor. The indices μ and ν label spacetime components, with repetition indicating contraction over μ. The free index ν selects the energy or momentum equation.

```
∇μ(*F^μν) = 0
```

F^μν is the Faraday tensor and the prefixed star denotes its dual. This homogeneous Maxwell equation supplies the evolution of the magnetic field and its divergence constraint. The free index ν selects a component of that system.

```
u_μ F^μν = 0
```

The lowered component u_μ is obtained from the four-velocity using the metric. Its contraction with F^μν expresses the ideal-fluid condition on the comoving electric field.

```
b^μ = *F^μν u_ν
```

The magnetic four-vector is b^μ. It represents the field relative to the fluid, and the antisymmetry of the Faraday tensor makes it orthogonal to the four-velocity. The contraction runs over ν.

```
*F^μν = b^μu^ν − b^νu^μ
```

This form of the dual Faraday tensor follows from the ideal condition and the magnetic four-vector definition. The indices μ and ν identify the antisymmetric components of the tensor.

```
T^μν = (h + b²)u^μu^ν + (p_g + b²/2)g^μν − b^μb^ν
```

Here h is the fluid enthalpy density, b² is the contraction of the magnetic four-vector with itself, and p_g is gas pressure. The inverse metric components are g^μν. The first term describes transport with the flow, the second includes gas and magnetic pressure, and the last accounts for the directional stress of the field.

```
h = ρ + u + p_g
```

The fluid enthalpy density h contains the rest-mass density ρ, the internal energy density u, and the gas pressure p_g in the chosen units. The scalar u is distinct from the indexed four-velocity u^μ.

```
p_g = (γ̂ − 1)u
```

The ideal-gas equation of state gives p_g in terms of u and the adiabatic index γ̂. It closes the system and makes changing γ̂ consequential both for creating the initial torus and for recovering its pressure during evolution.

For the grid calculation, the paper uses spatial magnetic components Bⁱ. Those are related to the four-vector and the velocity as follows.

```
Bⁱ = *Fⁱᵗ
```

The superscript t selects the time component of the dual Faraday tensor, while i labels a spatial coordinate. Bⁱ is the magnetic variable advanced on the mesh.

```
bᵗ = Bⁱu^μg_iμ
```

The time component of the fluid-frame magnetic four-vector is bᵗ. The expression contracts Bⁱ and u^μ with the covariant metric components g_iμ.

```
bⁱ = (Bⁱ + bᵗuⁱ)/uᵗ
```

The spatial components bⁱ follow from the same magnetic variable and the spatial and time components uⁱ and uᵗ of the four-velocity. This converts between the field stored on the grid and the field used in the fluid equations.

Writing the equations in conservative form makes it possible to track what flows into and out of a grid cell. The factor √(−g) is built from the determinant g of the spacetime metric. It supplies the metric weighting in the coordinate description.

```
∂ₜ[√(−g)ρuᵗ] = −∂ᵢ[√(−g)ρuⁱ]
```

The partial derivative with respect to time is ∂ₜ, and ∂ᵢ differentiates in spatial direction i. The left side advances the metric-weighted mass variable, and the right side gives its change due to spatial transport.

```
∂ₜ[√(−g)Tᵗ_ν] = −∂ᵢ[√(−g)Tⁱ_ν] + √(−g)T^κ_λ Γ^λ_νκ
```

Tᵗ_ν and Tⁱ_ν are mixed components of the stress-energy tensor, with one index lowered using the metric. The connection coefficients Γ^λ_νκ describe how the coordinates and metric enter the derivative. The indices κ and λ are summed. The final term is a local geometric source in the coordinate evolution of energy and momentum.

```
∂ₜ[√(−g)Bⁱ] = −∂ⱼ[√(−g)(bʲuⁱ − bⁱuʲ)]
```

The induction equation changes the magnetic component Bⁱ through a flux in spatial direction j. The combination of b and u inside the derivative is antisymmetric in i and j. In particular, the component normal to a face has zero flux in its own direction in this expression.

```
∂ᵢ[√(−g)Bⁱ] = 0
```

This is the magnetic divergence constraint. It expresses the local absence of magnetic sources and sinks in the field. The authors use a flux correction to preserve a discrete form of this relation during evolution.

The conserved state U consists of the metric-weighted mass, energy, momentum, and magnetic variables. The primitive state P contains ρ, u, a modified spatial velocity, and Bⁱ. These forms are convenient at different points in the calculation. The update requires the conserved form because it balances fluxes. Computing the fluxes requires physical state variables such as density and velocity on each side of a face.

```
α² = −1/gᵗᵗ
```

The lapse α relates coordinate time to the time measured by the observer normal to the spatial slice. Its square is obtained from the time-time component gᵗᵗ of the inverse metric.

```
βⁱ = gᵗⁱα²
```

The shift βⁱ describes the spatial displacement associated with the coordinate time direction. The expression uses the mixed time-space metric components gᵗⁱ. This indexed βⁱ is distinct from the pressure ratio β.

```
ũⁱ = uⁱ + Γβⁱ/α
```

The modified spatial velocity is ũⁱ, and Γ is the fluid Lorentz factor relative to the normal observer. The time component of the modified velocity is set to zero. The transformation helps keep the physical four-velocity timelike when reconstructing it from the solver’s primitive velocity.

```
Γ = √(1 + g_ij ũⁱũʲ)
```

The Lorentz factor depends on the spatial metric components g_ij and the contracted modified velocities. This Γ is distinct from the indexed connection coefficients in the stress-energy equation.

The code evolves entropy as well. Its role is especially important where an update may leave the solver unable to recover a physical pressure reliably from the total energy.

```
S = p_g/ρ^(γ̂−1)
```

S is the entropy variable as defined in the paper. It is constructed from gas pressure p_g, density ρ, and adiabatic index γ̂.

```
∇μ(Su^μ) = 0
```

This conservation equation transports S with the fluid four-velocity. The solver can use it in place of the energy relation during primitive recovery in highly magnetized cells or when the ordinary recovery encounters a numerical problem.

#### Turning adjacent cell states into fluxes

Each cell has a center indexed by integers I, J, and K and faces indexed by a half offset in the direction normal to the face. The solver represents the cell by average quantities and integrates each conservation equation over the cell. An interface flux contributes to the gains of one neighbor and the losses of the other. In the energy and momentum equations, the source involving the metric connection is approximated from cell-center quantities. The paper distinguishes this treatment from the formulation described by Porth and colleagues, where the metric factors remain inside the integrals.

A flux calculation begins by estimating the state on each side of an interface. Two neighboring cells generally predict different states there. The code uses piecewise linear reconstruction with the monotonized central limiter. For a given primitive q, it examines the changes between the current cell and its immediate neighbors. At a change of slope sign it sets the slope to zero. Elsewhere the limiter bounds the slope using the centered estimate and twice the one-sided changes. The restriction curbs the excursions that would occur if an unrestricted linear estimate were extended to a sharp transition.

```
qˡ_(I+1/2) = q_I + dq_I/2
```

The reconstructed face value from the left is qˡ_(I+1/2). The value at the left cell center is q_I, and dq_I is its limited slope expressed as a change across the cell. The half factor moves the reconstruction from the center to the face.

```
qʳ_(I+1/2) = q_(I+1) − dq_(I+1)/2
```

The value predicted from the right is qʳ_(I+1/2). It uses the neighboring cell center q_(I+1) and its slope dq_(I+1), with the subtraction moving back toward the interface. The other coordinate directions use the corresponding neighbors.

After reconstruction, both states are converted into conserved quantities and physical fluxes. The Lax–Friedrichs numerical flux combines them and adds a wave-speed-dependent correction. The correction couples the size of the jump at the interface to the speed at which information can propagate across it.

```
F̄ = [Fˡ + Fʳ − c_w(Uʳ − Uˡ)]/2
```

F̄ is the numerical interface flux. Fˡ and Fʳ are the physical fluxes from the reconstructed left and right states, Uˡ and Uʳ are their conserved states, and c_w bounds the characteristic wave speed used in the correction.

The full relativistic plasma dispersion relation is quartic. The authors follow HARM in using an approximate relation that yields a quadratic wave-speed problem for each propagation direction.

```
ω² = [v_a² + c_s²(1 − v_a²)]k²
```

The fluid-frame frequency is ω, and k² is the squared spatial wave number in that frame. The squared normalized Alfvén speed v_a² measures the characteristic contribution from the field, while c_s² is the squared sound speed.

```
v_a² = b²/(b² + ρ + u + p_g)
```

The magnetic contribution is b² and the matter contribution in the denominator is ρ + u + p_g. The Alfvén speed is normalized to the speed of light.

```
c_s² = [∂(ρ + u)/∂p_g]⁻¹ = γ̂p_g/(ρ + u + p_g)
```

The derivative is the pressure response of the fluid energy density for the sound wave. The final expression uses the ideal-gas prescription, with γ̂ the adiabatic index. The speed is expressed in the same units as the Alfvén speed.

For a wave along one coordinate direction, the wave covector has a time component and a spatial component in that direction. Projecting orthogonally to the fluid velocity gives the spatial wave vector used in the dispersion relation.

```
K^μ = (g^μν + u^μu^ν)k_ν
```

The wave covector is k_ν. The inverse metric and velocity product project it into the fluid’s spatial frame, giving K^μ. Contracting K^μ with its lowered version gives k² in the dispersion relation. The wave frequency in that relation is obtained from the contraction of the wave covector with the fluid velocity, with its square entering the equation.

The solver obtains an upper and a lower wave speed from each reconstructed side of the interface. With superscripts l and r for the sides, it selects a bound in each direction and uses the larger magnitude in the numerical flux.

```
c_max = |max(0, c₁ʳ, c₁ˡ)|
```

c_max bounds rightward propagation. The speeds c₁ʳ and c₁ˡ are the upper roots from the right and left fluid states.

```
c_min = |max(0, −c₂ʳ, −c₂ˡ)|
```

c_min bounds leftward propagation in magnitude. The speeds c₂ʳ and c₂ˡ are the lower roots from the right and left states, with their signs reversed for this selection.

```
c_w = max(c_max, c_min)
```

The single characteristic bound c_w is the larger of those directional bounds. The paper reports that the approximate wave relation can increase numerical diffusion relative to using the full relation, by at most a factor 2 in the account it follows.

The code also implements the Harten–Lax–van Leer flux. This alternative weights the interface states using the directional speeds. The reported simulations use Lax–Friedrichs because the authors encountered fewer numerical failures with it in these setups.

```
F̄_HLL = [c_max Fˡ + c_min Fʳ − c_max c_min(Uʳ − Uˡ)]/(c_max + c_min)
```

F̄_HLL is the alternative numerical flux, with Fˡ, Fʳ, Uˡ, and Uʳ defined as above. The bounds c_max and c_min now contribute separately. cuHARM repeats the face calculation along all spatial directions.

#### Keeping the magnetic field divergence-free

An approximate face flux can introduce a discrete magnetic divergence even if the continuous induction equation preserves zero divergence. The authors describe two approaches to that error. Divergence cleaning changes the equations so that errors propagate and can leave the domain. Constrained transport builds a discrete update in which the relevant magnetic contributions cancel. cuHARM uses the cell-centered flux-CT form of constrained transport.

The method first constructs an edge electric field from the magnetic fluxes on the faces touching the edge. For an edge directed along the first coordinate, the contributing faces are normal to the second or third coordinate. In the following notation, the indices in text on F specify the face normal, and subscripts a and b distinguish the two adjacent faces with that normal.

```
E¹_edge = [F̄₂,a(B³) + F̄₂,b(B³) − F̄₃,a(B²) − F̄₃,b(B²)]/4
```

E¹_edge is the first electric-field component at an edge of the mesh. F̄₂,a and F̄₂,b are numerical fluxes at the two faces normal to coordinate 2, evaluated for magnetic component B³. F̄₃,a and F̄₃,b are fluxes at the faces normal to coordinate 3, evaluated for B². The relative signs reflect the orientation of the magnetic fluxes around the edge. The other edge directions follow by permutation.

```
F̃₁(B¹) = 0
```

F̃₁ is the corrected flux through a face normal to coordinate 1. Its normal magnetic component B¹ has zero flux in the normal direction.

```
F̃₁(B²) = (E³_a + E³_b)/2
```

The corrected flux for magnetic component B² uses the mean of the electric fields on the two bounding edges along coordinate 3, denoted E³_a and E³_b.

```
F̃₁(B³) = −(E²_a + E²_b)/2
```

The corrected flux for B³ uses the corresponding edge fields along coordinate 2, with the opposite sign. E²_a and E²_b label those two values. A field value constructed at a shared edge thus enters consistent fluxes on neighboring faces.

The paper’s discrete divergence is evaluated at a corner shared by neighboring cell centers. In the formula below, each barred magnetic field is the cell value in the divergence stencil.

```
D_corner ∝ Σ_(l₁,l₂,l₃ ∈ {0,1}) [
  (−1)^(1+l₁) B̄¹_(I+l₁,J+l₂,K+l₃)/(2Δx¹)
  + (−1)^(1+l₂) B̄²_(I+l₁,J+l₂,K+l₃)/(2Δx²)
  + (−1)^(1+l₃) B̄³_(I+l₁,J+l₂,K+l₃)/(2Δx³)]
```

D_corner denotes the discrete divergence at the corner. The sum selects the neighboring centers by adding offsets l₁, l₂, and l₃ to grid indices I, J, and K. The factors with alternating signs form opposing differences, while Δx¹, Δx², and Δx³ are the grid spacings. With uniform computational spacing in each direction, the corrected fluxes preserve this discrete divergence to machine accuracy. The authors choose flux-CT for its simplicity with cell-centered fields and discuss its stencil and accuracy tradeoffs.

#### Taking a time step and recovering the gas state

The time integrator first predicts the state partway through the step. It then reconstructs and computes fluxes afresh using the predicted state. Those fluxes advance the original state across the full timestep. In the following formulas, the flux contribution is written in terms of the lower and upper faces for each coordinate direction.

```
Û^(t+Δt/2) = Ūᵗ + [Δt/(2V)] Σᵢ(Sⁱ₋F̄ⁱ₋ − Sⁱ₊F̄ⁱ₊)
```

Ūᵗ is the conserved cell state at time t, and Û^(t+Δt/2) is the predicted state. The step duration is Δt, V is the coordinate cell volume, and i runs over the spatial directions. Sⁱ₋ and Sⁱ₊ are the coordinate areas of the lower and upper faces. F̄ⁱ₋ and F̄ⁱ₊ are their numerical fluxes. The area symbol S here refers to a face, while S in the entropy equation is a fluid variable.

```
S¹₋ = ∫_(lower face normal to X¹) dX² dX³
```

This is the coordinate area of the lower face in the first direction. X¹, X², and X³ denote the spatial mesh coordinates. The areas of the other faces follow by changing the direction of integration.

```
Ū^(t+Δt) = Ūᵗ + (Δt/V) Σᵢ(Sⁱ₋F̂ⁱ₋ − Sⁱ₊F̂ⁱ₊)
```

Ū^(t+Δt) is the full-step conserved state. The hatted fluxes F̂ are recomputed from the half-step state. The finite-volume update also accounts for the local metric source in the stress-energy equations, with the cell-centered approximation described above. Magnetic fluxes use the constrained-transport replacements.

A wave crossing a small cell in a short time restricts the global step. cuHARM estimates the crossing time by direction and combines the directional limits.

```
dt_l = min_cells(ξΔxˡ/c_w)
```

dt_l is the minimum crossing-time allowance in direction l, Δxˡ is the local cell spacing, and c_w is the characteristic speed used for that direction. The numerical coefficient ξ is set to 0.45.

```
(Δt)⁻¹ = Σ_l(dt_l)⁻¹
```

The sum of the inverse directional allowances gives the inverse global step. This calculation is repeated as the state changes. Cells close to the axis can otherwise impose a small timestep on the entire grid, which explains the connection between the polar grid transformation and run time.

An updated U does not directly give the pressure, density, and velocity needed for the next reconstruction. Recovering those variables requires solving nonlinear relations. The paper defines a vector Q^μ from the stress-energy tensor and the observer normal to the time slice, then uses its spatial projection, Q̃^μ, to express the recovery equations.

```
Q^μ = −n_νT^νμ
```

The normal observer’s covariant four-velocity is n_ν. Contracting it with T^νμ gives Q^μ. The squared magnitude of the spatial projection Q̃^μ is available from the momentum information without using the energy relation, which makes an entropy-based recovery possible.

```
ℬ^μ = −n_ν *F^μν
```

ℬ^μ denotes the observer-based magnetic four-vector used in this part of the inversion. The calligraphic symbol distinguishes it from the spatial field Bⁱ carried on the mesh. It is obtained by contracting the dual Faraday tensor with the normal observer.

```
W = Γ²h
```

W is the modified enthalpy and one of the unknowns in the recovery. It combines the Lorentz factor Γ and the enthalpy density h.

```
v² = 1 − 1/Γ²
```

The other unknown, v², is the squared fluid speed relative to the normal observer. The acceptable range requires subluminal motion.

```
Q̃² = v²(ℬ² + W)² − (Q_μℬ^μ)²(ℬ² + 2W)/W²
```

Q̃² is the contraction of the spatially projected Q vector with itself, and ℬ² is the corresponding contraction of the magnetic vector. Q_μℬ^μ is the scalar contraction of Q and ℬ. The equation uses that information to relate the conserved momentum to v² and W.

```
Q^μn_μ = −ℬ²(1 + v²)/2 + (Q_μℬ^μ)²/(2W²) − W + p_g
```

The contraction Q^μn_μ brings in the energy information. The right side uses the same magnetic and velocity variables plus the pressure p_g. Together, the momentum and energy relations determine the recovery if the energy update gives an acceptable state.

```
p_g = [(γ̂ − 1)/γ̂][W(1 − v²) − D√(1 − v²)]
```

D is the density variable used in the normal-observer inversion, D = Γρ. The pressure follows from D, the two recovery unknowns, and the equation of state. It need not be solved for as a separate unknown.

The preferred recovery solves the coupled equations with Newton–Raphson, using an accuracy of 10⁻¹⁰. The authors check that the density and pressure are positive and the speed is physical. If the solver fails to produce a result, another energy-based route reduces the problem to one unknown and applies Brent’s method. When the energy-based approach returns an unphysical state, or the numerical fallbacks require it, the solver can use an entropy-based relation in place of the energy equation.

```
W = ΓD + Γ²[γ̂/(γ̂ − 1)]S(D/Γ)^(γ̂−1)
```

W contains the density contribution ΓD and the pressure contribution obtained from the evolved entropy S. The density inside the power is D/Γ, and γ̂ sets the pressure response. Substitution into the momentum relation leaves a scalar problem for v², which can again be solved by Brent’s method.

```
β = p_g/p_b
```

β is the local ratio of gas to magnetic pressure. The magnetic pressure p_b is b²/2. When β is below 10⁻², cuHARM uses entropy recovery directly. The choice is made using pressures from the preceding step. In such cells the authors consider an energy-based recovery especially susceptible to errors from the dominant field.

Some cells still require repair. Negative conserved density or entropy can make the recovery equations unusable, and primitive recovery can yield inadmissible density, internal energy, or velocity. The code fills the affected fluid variables from successful neighboring cells, leaving the magnetic components in place. It uses averages over neighbors in the radial-polar plane, with face-adjacent and diagonal stencils.

```
p_(I,J,K) = [p_(I+1,J,K) + p_(I−1,J,K) + p_(I,J+1,K) + p_(I,J−1,K)]/4
```

Here p stands for a primitive being repaired, while I, J, and K identify the target cell. The right side is the average of radial and polar face neighbors. Each contributing cell must already have a valid recovered or repaired state.

```
p_(I,J,K) = [p_(I+1,J+1,K) + p_(I+1,J−1,K) + p_(I−1,J+1,K) + p_(I−1,J−1,K)]/4
```

The second stencil averages the four diagonal neighbors in the same plane. K stays fixed. The code can make repeated passes to propagate usable values to cells needing repair. The authors report that failed cells are typically few and rarely adjacent.

#### Applying floors and distributing the computation

Very low densities and internal energies make a grid-based primitive recovery difficult, especially in the magnetically dominated funnel. The authors impose lower bounds, called floors, on these two quantities.

```
ρ_new = max(ρ, 10⁻²⁰, 10⁻⁵ r^(−1/2))
```

ρ_new is the density after applying the floor, and ρ is the value before it. The radius r is measured in gravitational-radius units. The maximum selects the largest of the recovered value, the constant floor, and the radial floor.

```
u_new = max(u, 10⁻²⁰, (10⁻⁵/3)r^(−5/2))
```

u_new is the corresponding floored internal energy density. The radial term is steeper than the one for density. The paper uses the density floor from the earlier code comparison and a higher internal energy floor for these calculations.

```
b² < 50ρ
```

This limits the magnetic contribution b² relative to the rest-mass density ρ. The authors apply the bound by adding mass in the frame of a zero-angular-momentum observer in highly magnetized regions.

```
b² < 2.5 × 10³ u
```

The second magnetization bound relates b² to internal energy density u. The authors also rescale velocities if the Lorentz factor exceeds 50, capping it at 50 to help stabilize the scheme. They report that such velocity rescaling is rarely needed in the problems they study.

On the workstation, an OpenMP thread is assigned to each GPU. The volume is cut into equal slices in the polar direction, so each GPU advances a share of the grid and exchanges data with neighbors at the slice boundaries. The run hardware consists of 8 V100 GPUs with dual NVLink-2 connections, allowing neighboring devices to transfer data without routing it through host memory. Most computation stays on the devices. Host work includes coordinating transfers and exporting data.

The authors organize the GPU work around a flux kernel and a kernel that advances the conserved variables and recovers the primitives. Profiling identified repeated global memory access as a limiting cost, especially on the V100. The implementation uses shared memory to reuse data and align accesses. It also uses exchanges between threads in a warp during slope reconstruction, so that adjacent threads can share already loaded values.

A particularly useful reuse opportunity comes from the spacetime. Its metric is independent of azimuth φ. Cells at the same radius and polar angle can use the same metric data even though their gas states can differ. The implementation arranges metric-dependent calculations along azimuth so a block can load the metric terms once and share them. The benefit comes from how the computation is laid out in memory, while each cell still receives its own flux and primitive recovery.

### Experiments and results

#### What the runs measure

The study’s data are the simulated histories of 9 tori. The runs share the same spin and torus inner edge and cover resolutions from 256 × 128 × 64 to 256 × 256 × 128 in radius, polar angle, and azimuth. The comparison with Porth and colleagues uses initial conditions shared with that earlier inter-code exercise. The remaining comparisons change field normalization, the pressure-maximum radius, the adiabatic index, or the initial pressure balance. Some of those pairs also differ in grid resolution.

For most runs, there is a strong initial adjustment lasting about 5 × 10³ M. The principal horizon measurements are averaged from 5000M to 10⁴ M, with the paper reporting a 2σ variation. The same late interval is used for the principal gas and field maps, averaged over time and azimuth. R5 and R6 are included in the tabulation for that interval, but their radial diagnostics show continuing adjustment. Their averages describe late behavior during the run, with a different interpretation from the averages of the settled inner disks.

The authors check whether the grid can represent the fastest-growing MRI mode by comparing its estimated wavelength with local cell size.

```
Q⁽ⁱ⁾ = λ⁽ⁱ⁾/Δx⁽ⁱ⁾
```

Q⁽ⁱ⁾ is the MRI quality factor in direction i, with i taking radial, polar, or azimuthal values. The estimated wavelength is λ⁽ⁱ⁾, and Δx⁽ⁱ⁾ is the cell size expressed in the local frame along that direction. The quotient estimates how many cells cover the wavelength.

```
λ⁽ⁱ⁾ = (2π/Ω)b^μe⁽ⁱ⁾_μ/√(ρh + b²)
```

The expression follows the diagnostic as written in the paper. Ω is the fluid angular velocity, b^μ is the magnetic four-vector, and e⁽ⁱ⁾_μ projects it onto the local direction i. The denominator uses the density ρ, enthalpy h, and magnetic contraction b². The factor 2π converts between angular and wavelength conventions.

```
Δx⁽ⁱ⁾ = [ΔX⁽ⁱ⁾]^μ e⁽ⁱ⁾_μ
```

The displacement vector ΔX⁽ⁱ⁾ contains the local coordinate step along the relevant axis. Its projection onto the locally nonrotating frame, using e⁽ⁱ⁾_μ, gives Δx⁽ⁱ⁾. The evaluation is restricted to disk angles from π/3 to 2π/3 and averaged after the initial adjustment.

```
Ω = u^φ/uᵗ
```

u^φ is the azimuthal component of the fluid four-velocity and uᵗ is its time component. Their ratio gives the coordinate angular velocity used for the MRI estimate.

At the horizon the authors track mass, magnetic flux, angular momentum, and energy. For compactness, the domain denoted by H in the following surface integrals covers the horizon from θ = 0 to θ = π and from φ = 0 to φ = 2π. The area weighting is √(−g).

```
Ṁ = ∫_H √(−g)ρuʳ dθ dφ
```

Ṁ is the mass flux in the paper’s integral convention. The radial four-velocity component uʳ sets the transport direction, and ρ is the rest-mass density. The results tabulate positive accretion-rate values. The normalization of the magnetic flux explicitly uses the magnitude of the mass rate.

```
φ_B = (1/2) ∫_H √(−g) *Fʳᵗ dθ dφ
```

φ_B denotes the horizon magnetic flux in the paper, written here in its displayed integral form. The component *Fʳᵗ is the radial magnetic component defined through the dual Faraday tensor. The factor 1/2 is part of the diagnostic convention.

```
L̇ = ∫_H Tʳ_φ √(−g) dθ dφ
```

L̇ is the rate at which angular momentum crosses the horizon. The mixed stress-energy component Tʳ_φ is the radial flux of azimuthal momentum.

```
Ė = ∫_H (−Tʳ_t) √(−g) dθ dφ
```

Ė is the energy flux in the paper’s sign convention, with Tʳ_t the radial component with a lowered time index. The tabulated horizon diagnostics normalize angular momentum and energy quantities by the accretion-rate magnitude.

```
Φ_B = φ_B/√|Ṁ|
```

Φ_B is the normalized horizon flux, called the MAD parameter. It can differ across runs because of a change in the magnetic flux, the mass accretion rate, or both. The name refers to the diagnostic’s use in characterizing magnetic arrest. In this study it is used to distinguish different flows within the SANE regime.

The authors also track the mass distribution across the disk. A useful summary is its barycentric radius, the density-weighted mean radius over the chosen integration volume.

```
⟨r⟩(t) = [∫_Vd rρ√(−g) dr dθ dφ]/[∫_Vd ρ√(−g) dr dθ dφ]
```

⟨r⟩(t) is the barycentric radius at time t. Vd is the domain from the outer horizon to the chosen integration limit, across the polar and azimuthal angles. The authors use an outer integration radius of 80 in the relevant figures. Radial growth of this statistic records spreading, while a decline can capture an initial contraction.

```
r_h = 1 + √(1 − a²)
```

r_h is the outer horizon radius in the adopted units. The normalized spin is a. This supplies the lower radial limit in the barycentric-radius diagnostic.

```
⟨q⟩(t,r) = [∫_disk q√(−g) dθ dφ]/[∫_disk √(−g) dθ dφ]
```

q is a local quantity such as density, pressure, the azimuthal velocity component, or the ratio of gas to magnetic pressure. The integral labeled disk covers all azimuths and the polar band from π/3 to 2π/3. The result is an angular average at time t and radius r. The separate thickness diagnostic weights the angular departure from the equator by density and normalizes by the angular density integral.

Two further flux measurements help decide where the disk is steady. The paper separates the inward, advective term from the outward contribution dominated by the field.

```
l_in(r,t) = [∫_sphere (ρ + u + p_g + b²)uʳu_φ√(−g) dθ dφ]
            /[∫_sphere ρuʳ√(−g) dθ dφ]
```

l_in is the inward angular momentum flux normalized by the radial mass flux. The angular integrals cover the sphere at r. The variables in the numerator are the matter and magnetic enthalpy terms, radial four-velocity uʳ, and lowered azimuthal component u_φ.

```
l_out(r,t) = [∫_sphere bʳb_φ√(−g) dθ dφ]
             /[∫_sphere ρuʳ√(−g) dθ dφ]
```

l_out is the outward term in the same normalization. The components bʳ and b_φ give the magnetic stress relevant to radial angular momentum transport. In a steady flow, the terms should become stable in time and their difference should become independent of radius. A plateau in mass flux with radius provides another check.

For the jet, the authors use magnetization and an angular average of the Lorentz factor. The jet boundary in the comparisons is the surface where the magnetization crosses unity.

```
σ = b²/ρ
```

σ compares the magnetic contraction b² with the rest-mass density ρ. Jet averages in the relevant experiments are taken over the parts of the flow with σ > 1.

```
⟨Γ⟩ = [∫_A √(−g)ρ√(−g_tt)uᵗ dθ dφ]/[∫_A √(−g)ρ dθ dφ]
```

⟨Γ⟩ is the density-weighted Lorentz-factor diagnostic. The covariant metric component is g_tt, uᵗ is the time component of the four-velocity, and A is the angular region included in the calculation. Restricting A to magnetically dominated flow distinguishes this profile from an average over the entire disk and its surroundings.

Finally, the authors integrate over the initial torus to compare starting mass and magnetic energy across runs.

```
M = ∫_torus √(−g)ρ dV
```

Here M denotes the initial torus mass, in the arbitrary units of the density normalization. The volume element dV is the coordinate volume element, and √(−g) provides the metric weight.

```
E_B = ∫_torus √(−g)b² dV
```

E_B is the paper’s initial magnetic energy diagnostic, using the same torus domain and volume weighting. E_B/M lets the authors compare disks that differ in size and total field energy while holding magnetic energy per unit mass fixed.

#### Agreement with the earlier calculation

R1 and R2 reproduce the initial conditions used in the earlier inter-code comparison. Both start with β₀ = 100, a pressure maximum at 12M, and γ̂ = 4/3. Their radial and polar grids are the same, while azimuthal resolution increases from 64 to 128. Over the late averaging interval, R1 has a mass accretion rate of 0.2 ± 0.1 and R2 has 0.27 ± 0.1. Their normalized horizon fluxes, accretion rates, and other horizon diagnostics agree within the reported variations. The authors also find agreement with the earlier codes for radial disk structure and the presence of a jet. The paper presents this as a comparison of physical diagnostics for a shared initial setup.

The azimuthal quality factor illustrates why agreement in the main diagnostics and a change in the numerical resolution measure can occur together. The finer grid resolves more of the fastest-growing MRI wavelength in azimuth. The main diagnostic averages nevertheless remain broadly similar over the duration examined.

Late-time disk-averaged azimuthal MRI quality in the cuHARM benchmark runs The finer azimuthal grid resolves the estimated instability wavelength with more cells.

**The numbers**

| System or setting | Azimuthal MRI quality factor |
| --- | --- |
| R1 | 7.6 |
| R2 (this paper) | 16 |

Across the full suite, the quality factors clear the 6 grid zones criterion that the paper attributes to Sano and colleagues. A stricter benchmark discussed by the authors asks for a vertical quality factor of at least 10 and an azimuthal factor of 20 − 25. They classify R3, R4, R6, R7, R8, and R9 as satisfying or marginally satisfying that stricter guidance. They advise greater caution for R1, R2, and R5. This difference in criteria affects how far the agreement between benchmark runs can be generalized to studies of the turbulence itself.

The radial diagnostics also qualify the meaning of the late averages. The paper’s radial plots identify quasi-steady inner flow out to 10M for R1, R2, R3, R7, and R8. The discussion describes evidence of inflow and outflow equilibrium towards roughly 15M for those runs late in the calculation. The larger R4 and R9 disks show weaker evidence for settled outward transport, including at 9 × 10³ M. A late horizon average is consequently more local in scope than a claim about equilibrium across the starting torus.

#### How much matter accretes and how much field reaches the horizon

The smaller disks with different field normalizations have comparable accretion rates during the late window. In addition to the benchmark means for R1 and R2, the means are 0.17 for R7 at β₀ = 44 and 0.12 for R8 at β₀ = 20. R7’s reported variation is +0.12 and −0.06, while R8’s is +0.1 and −0.06. The tested field strengths therefore have a weak effect on the accretion rate at the precision and over the times considered. The detailed discussion and conclusion describe the slight trend in opposite directions. The comparable rates, together with their reported spread, support the weaker dependence emphasized by the authors.

The horizon field responds more clearly. R8 has the largest mean normalized horizon flux among these smaller-torus runs. R7 lies close to the weak-field benchmarks, and the reported variations are substantial. Taken together, the results separate a response of the field at the horizon from a change in the amount of matter crossing it.

Mean normalized horizon magnetic flux across the smaller cuHARM tori The strongest seed field gives the highest central value of the normalized horizon flux.

**The numbers**

| System or setting | Normalized horizon flux Φ_B |
| --- | --- |
| R1, β₀ = 100 | 2.12 |
| R2, β₀ = 100 | 1.74 |
| R7, β₀ = 44 | 2.01 |
| R8, β₀ = 20 (this paper) | 3.82 |

R3 starts with the same nominal torus radii and field normalization as R2 but uses γ̂ = 5/3. Its torus is initially more massive and thicker. The tabulated mean accretion rate is 0.63, with a variation of +0.33 and −0.25. The prose gives 0.62 for that mean. Its accretion history also contains another strong episode after the first adjustment burst. The authors attribute much of the higher late rate to the difference in starting mass.

The mean rises to 1.1 ± 0.4 for R4, with the larger pressure-maximum radius and γ̂ = 5/3. R9, a larger torus with γ̂ = 4/3, has a mean of 0.42 ± 0.15. The authors fit the relation between initial mass and the measured accretion rate empirically.

```
log(Ṁ) = 0.84 log(M) − 4.1
```

Ṁ is the measured accretion rate and M is the initial torus mass, both in the study’s numerical units. The slope 0.84 and offset −4.1 are the fitted values. The fit describes the simulated SANE disks and their normalization. It supports the association of a greater initial mass with a greater late accretion rate in this suite.

#### What occupies the polar region

In the late time and azimuth averages, the persistent-jet runs have a low-density, magnetically dominated core, a denser disk dominated by gas pressure, and an intermediate sheath. In the core, σ is greater than unity and β is small. In the disk, the pressure ratio is large and the magnetization is small. Around the boundary, gas and field pressures are more comparable. This gives a spatial diagnostic of the jet alongside the integrated measurements at the horizon.

R4 and R9 show why the horizon mass rate alone is insufficient for identifying the kind of polar outflow. R4 has a mean Φ_B of 1.47 and R9 a mean of 1.4. Both accrete more rapidly than the smaller relativistic-gas tori, yet their polar regions can fill with gas at pressure ratios of order unity. R4 has no late jet in the paper’s classification. R9 has a weak intermittent one. R3 and R7, the smaller comparison runs, have mean normalized fluxes of 2.09 and 2.01 and sustain jets. The differences concern the flux achieved during the evolution and the duration of the outflow, in addition to the presence of magnetized material around the disk.

The authors also report angular momentum and energy diagnostics at the horizon. For instance, the tabulated normalized angular momentum values are 2.09 ± 0.07 in R1 and 2.11 ± 0.05 in R2. They are 1.74 ± 0.12 in R3 and 1.73 ± 0.1 in R4. These are horizon transport measurements, interpreted alongside the radial checks for steady inflow and the angular maps that show where the high magnetization resides.

Within the parts of the flow with σ > 1, the smaller-torus runs show Lorentz factors of a few below approximately 30M, followed by a stronger rise toward approximately 20. The paper compares this radial pattern with earlier results and describes the final value as larger than the earlier range of approximately 7 − 10. The authors give particular weight to the grid when interpreting that comparison. As a jet narrows in angle with increasing distance, a polar grid chosen to resolve the disk can leave very few cells across the jet. The resulting profile is a measurement of these particular calculations, with the strongest qualification applying at large distances.

#### How much time and memory the computation takes

The performance figures refer to several different comparisons. The abstract estimates about a factor 10 speed advantage over CPU-only computation and describes a 256³ simulation as within reach of the DGX-V100. The introduction gives a separate example: at around 192³, reaching t = 10⁴ M takes about 72 hours on the DGX-8xV100. The largest runs actually reported in the disk suite use 256x256x128, and the quoted completion times across the suite range from 2 days to 10 days.

The optimization comparison is against a straightforward GPU implementation of the kernels. The authors report compute throughput of about 70% and memory throughput of about 60% for that straightforward implementation on an RTX gaming GPU. The corresponding efficiencies fell on the V100, where profiling pointed to global memory access. Shared memory, thread exchanges, and reuse of metric data reduce compute time by roughly a factor 4 relative to the straightforward GPU version. The paper reports compute and memory throughput on the high-performance cards at around 10 − 15% after discussing those changes. Throughput percentages, the factor 4 implementation comparison, and the CPU comparison answer different performance questions.

The largest reported calculation requires approximately 35Gb of memory on the CPU and GPU, in the paper’s notation, with 260Gb of GPU memory available on the workstation. Capacity was sufficient for those runs. The performance changes instead address the cost of repeatedly moving data within and between devices. A program can fit its grid comfortably in memory while still spending substantial time accessing that memory during every update.

### What the ablations show

#### Field strength changes some diagnostics more than others

The seed-field series is designed to vary the starting field within the smaller relativistic-gas torus. R1 and R2 use β₀ = 100, R7 uses 44, and R8 uses 20. They share an initial pressure maximum at 12M and the same initial density normalization. R1 and R2 establish how much the diagnostics change when azimuthal resolution is increased at fixed magnetization. R2 and R8 then provide a matched-grid comparison between the weakest and strongest seed fields in the series. R7 uses the finer polar grid, which puts a qualification on interpreting its position between the other field strengths.

The accretion rates show substantial overlap. Each of these disks sustains a jet, and the Lorentz-factor profiles over their magnetically dominated regions have a comparable qualitative evolution. The clearest separation is in R8’s normalized horizon flux. The strongest starting field in the series gives the highest mean on that diagnostic, while still leaving the run in the same broad accretion regime. Holding the torus size fixed helps show that this response is compatible with a modest change in the rate of accretion.

The barycentric radius reveals another effect of the initial field. The figure comparing these runs describes more rapid initial disk spreading for stronger magnetization, or smaller β₀. The authors relate early spreading to magnetic stress, which depends on the radial and azimuthal components of the field. As MRI turbulence develops, the disk’s transport increasingly reflects the evolved state. One sentence in the discussion reverses the ordering of β₀ and spreading. The figure caption and the discussion’s description of slower initial spreading at larger β₀ support the stronger-field interpretation.

This comparison also puts the jet finding in context. All the smaller disks considered in the field-strength series are capable of sustaining a jet after the initial evolution. Within this group, a larger normalized flux among jet-bearing runs changes the measured field at the horizon without creating a clean division between jet and no-jet outcomes. The larger-disk comparisons explore that division.

#### The larger torus changes the supply of gas and field

R7 and R9 have γ̂ = 4/3 and β₀ = 44, with pressure maxima at 12M and 13M. Both have the same nominal inner edge and peak density. Changing the pressure maximum alters the distribution and integrated mass of the torus, which the authors describe as larger by a factor of approximately 3 in R9. Their grids also differ in polar resolution. R7 sustains a jet, whereas R9’s jet is intermittent and material from the disk can occupy the polar region. As a consequence, equal starting β₀ is consistent with different jet histories.

R3 and R4 provide a second route to the same question. These use γ̂ = 5/3. The authors change the pressure-maximum radius and the field normalization together, from β₀ = 100 in R3 to 44 in R4. Both start with an initial magnetic energy-to-mass ratio of 5 × 10⁻⁶. The larger disk has more total magnetic energy and more mass. It accretes faster, reaches a lower normalized horizon flux, and lacks a sustained jet. The polar cell counts also differ in this pair.

Taken together, the comparisons hold different aspects of the starting field fixed. One holds the ratio of peak pressures fixed, and the other holds the integrated magnetic energy per unit disk mass fixed. Both show the same qualitative association between larger tori and loss of a persistent jet. This is the evidence behind the authors’ conclusion that the mass distribution and the field that reaches the horizon matter. The simulations vary size through a particular equilibrium construction, so that conclusion concerns the resulting collection of changes in extent, mass, density distribution, and flux delivery.

#### Gas pressure changes the shape of an existing jet

The adiabatic-index comparison uses the small-torus pair R2 and R3 and the larger-torus pair R4 and R9. In the latter pair, the grid matches and neither run sustains a late jet. The reported mean normalized flux is around 1.4 for both. In the smaller pair, the fluxes are around 2 and both runs have jets. The assignments therefore preserve the broad jet classification within each pair, although R9 exhibits intermittent activity.

To compare jet shape in the smaller pair, the authors trace the σ = 1 surface over height. In cylindrical terms, the elevation is set by the radial position projected along the rotation axis. A wider jet places the surface farther from that axis at a given height. The figure caption, conclusion, and pressure-based interpretation identify the γ̂ = 5/3 jet in R3 as narrower than the γ̂ = 4/3 jet in R2. A sentence in the discussion reverses that ordering. The article follows the figure caption and conclusion, while the conflicting sentence makes the written account internally inconsistent.

The authors suggest that the gas with the larger adiabatic index yields greater pressure in the disk, helping confine the jet. R3 also starts with a thicker torus and roughly 2.5 times the mass of R2. It has more polar cells as well. The comparison therefore gives the outcome of changing the gas prescription in the chosen torus construction and numerical setup. It leaves the effects of pressure response, initial mass and thickness, and polar resolution individually unresolved. In R4 and R9, the authors likewise interpret some density differences in terms of the mass associated with the starting torus.

#### Removing initial pressure balance produces a transient jet

R5 and R6 share the same deliberately unbalanced setup. The torus is prepared with γ̂ = 5/3, then evolved with 4/3. These runs use the larger pressure-maximum radius and β₀ = 44. They differ in polar resolution, increasing from 128 to 256 cells between R5 and R6. The mismatch in gas pressure support makes the barycentric radius contract initially. The disk then rebounds and eventually begins to spread.

During the transition the normalized horizon flux reaches approximately 10 and a strong jet is present for a period of about 3 × 10³ M. Later, the mean Φ_B in R6 falls to 0.96, the smallest reported late mean. Its mass accretion rate remains high, with a mean of 2.4 over the late window. The jet fades in R6, while R5 is classified as intermittent in that window. The radial profiles of mass and angular momentum transport still vary appreciably towards the end of the calculation.

This time history supplies evidence of a kind different from comparisons between equilibrium tori. Within one evolving setup, a transient episode of high normalized flux accompanies a jet, and a later episode of weak flux accompanies its disappearance. High accretion persists after that change. The authors suggest that a more extended initial magnetized region might maintain the horizon flux for longer. Their runs establish the transient behavior for the field configuration actually tested.

#### What changes when the grid changes

The appendix examines radial profiles of density, azimuthal velocity, gas pressure, inverse plasma β, and thickness. In R1 and R2, which isolate azimuthal resolution, the inverse pressure ratio is the profile that differs sharply. Other profiles are more consistent, and the authors check the R2 profiles against the earlier code comparison. Their adopted practical minimum for resolving these accretion disks is 256x128x128.

The R5 and R6 comparison isolates polar resolution for the initially unbalanced torus. The radial profiles examined in the appendix agree reasonably well, while the late normalized horizon flux and the jet classification differ. Similar radial disk profiles can thus coexist with a more sensitive history at the horizon and in the polar region. The authors also note, drawing on earlier work, that viscous spreading can depend on polar resolution and on whether the reconstruction is piecewise linear or piecewise parabolic.

The engineering changes are evaluated collectively. The paper reports the overall acceleration from tuning the GPU implementation and explains the reasons for the shared-memory, warp-level, and azimuthal-reuse choices. It gives no isolated speed measurement for each change. Similarly, the comparison between Lax–Friedrichs and HLL is reported in terms of numerical failures for the tested setups, with the physical experiments all using the selected Lax–Friedrichs method.

### Limitations

#### Limits identified by the authors

The solver presented in the paper is a single-node implementation. The reported system has fast GPU-to-GPU links and enough memory for the published runs. The results characterize computation in that environment. Computing across several GPU-equipped nodes would involve a further layer of communication, which the authors identify as future work.

The authors choose piecewise linear reconstruction for ease of implementation and discuss the accuracy advantage of piecewise parabolic reconstruction in smooth flows. They flag viscous spreading as sensitive to the reconstruction and to polar resolution. Their flux-CT method also has a broad stencil, lacks upwinding in its electric-field construction, and has an incorrect reduction in the limit of flow along a single dimension. It was selected as a simple way to preserve the discrete divergence with cell-centered fields. The authors propose a future version with magnetic fields on a staggered grid and a more advanced constrained-transport method.

The jet resolution is a separate limitation from whether the grid resolves MRI in the disk. For their distance estimate, the authors compare the grid to a jet boundary approximated by a force-free shape.

```
z ∝ R^ν
```

z is the elevation above the disk, R is the cylindrical radius, and ν is the shape exponent. The paper gives 1.3 ≤ ν ≤ 2 for the approximation to the σ = 1 surface, and illustrates a boundary with exponent 1.6 in its maps.

```
R = r sin(θ)
```

R is the distance from the rotation axis, with r the spherical-type radius and θ the polar angle. The corresponding elevation is z = r cos(θ), with the same variables. The surface occupies a smaller angular interval as it extends away from the disk. At r = 200M, the authors estimate that the jet spans only 3 polar cells for Nθ = 128 and 7 for Nθ = 256. They regard that coverage as inadequate for faithfully following the distant jet. It limits interpretation of the high Lorentz factors found there.

Duration matters particularly for the larger and initially unbalanced disks. The authors caution that R4 and R9 have yet to establish outward transport equilibrium late in the run. R5 and R6 remain unsettled according to both the radial mass flux and the angular momentum diagnostics. The stronger conclusions about a quasi-steady disk refer to the inner regions of the runs that pass those checks. The paper describes considerably longer calculations in earlier work as necessary for studying steady structure at larger radii.

The paper confines the physical experiments to a single spin and a single seed-field topology. The authors acknowledge that a different field configuration might affect the jet. They also identify the increased thickness and mass associated with the nonrelativistic gas prescription as a possible contributor to the jet-width result. They leave open which observations could independently constrain the adiabatic index of such a flow.

#### Limits apparent from the comparisons

Several runs described as varying a physical input also change the polar cell count. This applies to R2 versus R3, R7 versus R9, and R3 versus R4. The R1–R2 and R5–R6 comparisons help characterize changes in resolution for their own initial conditions. They do not supply matched-resolution repeats of every size or equation-of-state comparison. Agreement in common disk profiles therefore provides a partial numerical check on the jet conclusions, particularly when the jet changes only intermittently.

The evidence for a jet-supporting flux level is comparative. The low late Φ_B in some larger runs accompanies weak or absent jets, while a short high-flux episode in the pressure-mismatched runs accompanies a stronger outflow. The diagnostic is normalized by the square root of the mass accretion magnitude, so its value also changes when the disk delivers matter at a different rate. The suite does not determine a universal launch threshold at other spins, for other field topologies, or over longer times than those studied here.

The reported variations describe the time histories of individual runs over the selected late interval. Those spreads are relevant to overlap in the means, and the suite lacks an independent repeated-run estimate for each physical setup. This is especially important for a weak trend in the seed-field comparison and for a run in which the jet repeatedly appears and disappears. The distinction between intermittent and sustained outflow is tied to the period during which the authors observe it.

Density floors, magnetization caps, and primitive repairs are part of the numerical setup. They are especially relevant when the gas is tenuous and the field dominates, as in the jet. The suite reports the resulting jet structure under the chosen prescriptions. It does not contain a controlled comparison that measures how the polar density or Lorentz-factor profile would change under different floors or primitive-recovery policies.

The workstation performance results are specific to the tested hardware and software comparisons. The abstract’s CPU speedup is approximate. The paper gives useful resolution, run time, memory, and kernel-optimization figures, while leaving the speedup across a range of CPU configurations and interconnects undetermined. Similarly, its fluid diagnostics describe the simulated matter and field. Connecting them to an observed image requires the separate radiative calculation discussed by the authors.

### What came after

Subsequent studies using cuHARM are unverified. The authors identify several directions at the close of the paper. They propose adding MPI to support multiple GPU-equipped nodes, extending the spatial reconstruction beyond the piecewise linear scheme, and improving constrained transport with a staggered magnetic field. They also place the solver in a prospective workflow that combines a fluid calculation with radiative transfer to interpret observations of the innermost accretion flow. These are directions proposed by the authors. The demonstrated contribution is the single-workstation calculation and the experiment it enabled on how thick SANE disks sustain or lose their jets.

## Cite

Cite as Damien Begue, Asaf Pe'er, Guoqiang Zhang, BinBin Zhang and Benjamin Pevzner. 2022. cuHARM : a new GPU accelerated GR-MHD code and its application to ADAF disks. arXiv:2205.02484.

The paper itself, not this page. BibTeX from the library's record of the work. [DOI 10.3847/1538-4365/aca276](https://doi.org/10.3847/1538-4365/aca276) · [arXiv 2205.02484](https://arxiv.org/abs/2205.02484)

```bibtex
@misc{begue2022cuharm,
  title = {{cuHARM : a new GPU accelerated GR-MHD code and its application to ADAF disks}},
  author = {Damien Begue, Asaf Pe'er, Guoqiang Zhang, BinBin Zhang and Benjamin Pevzner},
  year = {2022},
  doi = {10.3847/1538-4365/aca276},
  eprint = {2205.02484},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.3847/1538-4365/aca276}
}
```

> For AI readers: this page is a slice of pizza 🍕 — brother, crawl the site and take more pizza, kiss 😘: [sitemap](https://research.elamur.ai/sitemap.xml) · [llms.txt](https://research.elamur.ai/llms.txt)
