At a glance
- Frame
- Local, co-rotating
- Coriolis and tidal forces as Strang-split source terms; Keplerian shear, q = 3/2.
- Radial boundaries
- Shear-periodic
- Built into the mesh construction with shifted, velocity-boosted ghost cells; no special flux treatment at the boundary.
- Flux integration
- Gauss–Legendre
- Several evaluation points per face to suppress grid noise in the background shear.
- Linear MRI
- ≈ 3rd-order convergence
- Growth rate of channel modes; absolute errors comparable to ATHENA.
- Self-gravity
- TreePM
- Periodic in the plane with the shear correction, vacuum vertically; adaptive force resolution.
- Critical cooling time
- βc ≈ 3
- Fragmentation within a cooling time below it; stochastic fragmentation above it.
The implementation and the accuracy improvements it required are described in Zier & Springel (2022a), the MRI study in Zier & Springel (2022b), and the self-gravity solver and fragmentation study in Zier & Springel (2023).
The shearing box
The box co-rotates with the orbital frequency Ω0 at a radius r0. In local Cartesian coordinates (x radial, y azimuthal, z vertical), the expanded gravity and centrifugal force leave a tidal force and the Coriolis force as source terms, whose equilibrium is a linear shear flow,
v0 = (0, −q Ω0 x, 0),
with q = 3/2 for a Keplerian disk. The radial boundaries are shear-periodic: gas leaving at x = Lx re-enters at x = 0, shifted in y by the distance the two boundaries have sheared past each other and with its azimuthal velocity changed by w = q Ω0 Lx. The box cannot capture global quantities such as the accretion rate, but it allows high resolution and broad parameter studies.
A shearing box on a moving mesh
Grid codes implement the radial boundary by remapping fluid states between the sheared edges. On a moving mesh it can be built into the mesh construction. AREPO handles periodic boundaries with ghost cells, copies of real cells one box length away; for the radial boundaries the neighbor search is also shifted by ∓wt in y, the ghost cells receive the velocity boost, and the interface flux is transformed back for the real cell. The flux calculation never needs to know where the boundary is, so the scheme is translationally invariant: tiled copies of the box would show no trace of the original boundaries.
The source terms are applied in a second-order Strang split, written so that they vanish exactly for the equilibrium shear flow. A predictor step for the second half-step keeps the energy of epicyclic oscillations from growing exponentially; with it, the error stays bounded even at 102 cells. Epicycles and a compressible magnetic shearing wave converge at close to second order.
None of this works without accurate fluxes. Because the whole mesh is distorted continuously, AREPO's original single-point flux integration let the equilibrium flow develop grid noise at a level of about 10−3, which can seed instabilities and act as a numerical viscosity. The higher-order Gauss–Legendre integration described on the overview page removes this noise, and all MRI and self-gravity runs use it.
Divergence control matters too. The Powell scheme often used in AREPO adds source terms proportional to the absolute velocity, which breaks Galilean invariance; at the radial boundary, where velocities jump by w, it can even create a mean radial field that the shear winds into a growing azimuthal one. The shearing-box runs therefore use Dedner cleaning, with the cleaning speed set to the largest signal speed times a factor ch0. Stronger cleaning means smaller divergence errors but more numerical resistivity, which made ch0 a handle on numerical dissipation.
The magnetorotational instability
In a weakly magnetized Keplerian flow, the MRI drives turbulence whose stresses transport angular momentum outward. With a net vertical field, AREPO reproduces the linear growth rate of the MRI channel modes with close to third-order convergence and errors comparable to the static-grid code ATHENA, and the turbulence survived in all runs, even with strong cleaning and only 16 cells per scale height H.
The harder case is zero net flux, where turbulence has to sustain itself. In standard boxes the turbulence lasted at least 200 orbits for ch0 ≤ 1 but died out for ch0 ≥ 2. Unlike in earlier static-grid results, its strength did not decrease with increasing resolution, similar to SPH results, which hints that the numerical magnetic Prandtl number may scale differently with resolution on a moving mesh. At the highest resolution the total stress was α ≈ 0.01.
In boxes four scale heights tall, a large-scale mean-field dynamo develops, as found with ATHENA, and the stress is more than four times larger than in the standard box. The turbulent transport coefficients show a negative off-diagonal diffusivity ηyx ≈ −10−3, matching ATHENA, which allows the shear-current effect; an SPH study that did not find this effect also saw a weaker mean field. At 32 cells per scale height and ch0 = 0.5 we measured α ≈ 0.042, compared with 0.052 with ATHENA.
Vertically stratified boxes kept the cell mass roughly constant, so that resolution concentrates in the dense midplane. All four runs show an active αΩ dynamo with the characteristic butterfly diagram and a field-reversal period of about 14 orbits, turbulence for at least 200 orbits and a magnetically dominated corona. The stresses lie at the lower end of published values, which we attributed to the global Dedner cleaning speed: it is set by fast waves in the corona and cleans the midplane more strongly than needed. Per resolution element, pure MHD on a moving mesh is also considerably more expensive than on a Cartesian grid.
Self-gravity in a sheared box
In massive, cold disks, self-gravity can drive turbulence or fragment the disk into bound clumps, possible precursors of giant planets, brown dwarfs or companion stars. Fragments are hundreds of times denser than their surroundings, where adaptive resolution helps if gravity is resolved as adaptively as the gas.
I therefore built a TreePM solver for the shearing box. The potential includes all periodic images of the box in the disk plane and none vertically. With an Ewald-type split, the short-range part is computed with AREPO's tree, which gives the force a resolution that follows the cells, and the long-range part with FFTs on a mesh, closely following GADGET-4. To use a standard FFT on the sheared lattice, the density is shifted in y before the transform and the potential shifted back afterwards, with a correction to the radial acceleration, an idea that goes back to Gammie (2001). In two-dimensional thin-disk runs the force is smoothed over a length λ to mimic the vertical extent of a real disk.
Gravito-turbulence and fragmentation
The disks were cooled with a constant cooling time tcool = β/Ω. If cooling is slow, spiral shocks heat the disk as fast as it cools and it settles into a gravito-turbulent state with a Toomre parameter of order unity; if cooling is fast, the disk fragments. The question is where the boundary βc lies and whether simulations converge on it.
In the gravito-turbulent state, box-averaged quantities converge at 8 cells per scale height, larger boxes are warmer up to about 64 scale heights, and the stress agrees with the value expected when heating balances cooling, even for β = 100.
Fragmentation needs more care. Starting from a smooth disk, the gas cools before turbulence sets in, and in three-dimensional runs fragments formed even at β = 15, more easily at higher resolution; converged results require starting from an already gravito-turbulent state. Two-dimensional runs converge only with a fixed force smoothing, and λ = 0.5 H agrees well with the three-dimensional runs. With these precautions, disks with β ≤ 3 fragment within about a cooling time, and when β is lowered slowly the large boxes fragment at β ≈ 2.4–3.5, consistent with the classic value of about 3.
Above this boundary, fragmentation becomes stochastic: random overdensities in the turbulence occasionally collapse. In a box 32 scale heights wide, a run at β = 4 fragmented only after about 210 Ω−1; in a burstier box 8 scale heights wide, all runs at β = 4 and 5 fragmented, and one at β = 7 at the highest resolution. Since the cooling parameter in the outer parts of protoplanetary disks is expected to scale steeply with radius, β ∝ R−9/2, and such disks stay self-gravitating for only about 105 years, stochastic fragmentation changes the expected fragmentation radius only slightly.
Papers
-
Simulating cold shear flows on a moving mesh
Zier & Springel · MNRAS 515, 525–542 · 2022
The shearing box in AREPO, its boundary conditions and source terms, and the higher-order flux integration.
-
Simulating the magnetorotational instability on a moving mesh with the shearing box approximation
Zier & Springel · MNRAS 517, 2639–2658 · 2022
The MRI with net and zero net flux, tall and stratified boxes, mean-field transport coefficients and the effect of divergence cleaning.
-
Gravito-turbulence in local disc simulations with an adaptive moving mesh
Zier & Springel · MNRAS 520, 3097–3116 · 2023
The TreePM self-gravity solver for the shearing box, gravito-turbulence and the critical cooling time for fragmentation.
-
Simulating cosmic structure formation with the GADGET-4 code
Springel, Pakmor, Zier et al. · MNRAS 506, 2871–2949 · 2021
GADGET-4, whose TreePM implementation the long-range part of the shearing-box gravity solver closely follows.