WorksMathematics
Structure-preserving finite element method for the 2D MHD- turbulence system
Abstract
We propose a structure-preserving finite element method for the two-dimensional MHD- turbulence model, which filters the transport velocity at a length while retaining the ideal invariants of the original MHD equations, with the energy replaced by an -dependent energy. The scheme preserves mass conservation and the magnetic Gauss law pointwise and satisfies discrete dissipation laws for the energy, the cross helicity and the mean square magnetic potential, which reduce to exact conservation in the ideal limit. The discrete systems are solved by an augmented Lagrangian preconditioner with monolithic geometric multigrid, observed to be robust with respect to the filter width and the Reynolds numbers, and to the mesh size for small time steps. The scheme converges at the optimal rates and agrees with a Fourier pseudo-spectral direct simulation of the original MHD equations at the large scales. In under-resolved flows, the unfiltered scheme has no numerical dissipation and accumulates energy at the grid scale. Filtering relieves this accumulation and a larger gives a more compact spectrum. Long-time simulations reproduce selective decay, including relaxation toward the Arnold-type bound and the inverse cascade of the mean square potential.
Introduction
The long-time dynamics of magnetohydrodynamic (MHD) turbulence is governed by its ideal invariants [9]. In three dimensions these are the total energy, the cross helicity, and the magnetic helicity. In two dimensions the magnetic helicity vanishes, and its role is taken by the mean square magnetic potential. We consider incompressible MHD in two dimensions on the periodic domain , written in terms of the velocity and the magnetic potential ,
with and magnetic field . Here and are the nondimensional viscosity and resistivity, the inverse kinetic and magnetic Reynolds numbers, is the coupling coefficient and is a prescribed forcing term. We use the two-dimensional curl operators and , and denote by the vorticity and by the current density. For and we write and . On a divergence-free field is the curl of a periodic potential if and only if its mean vanishes, the constant vector fields being the harmonic fields of the torus. We therefore assume that , and have zero mean. Since determines only up to a constant, we fix it by . For and , (1) conserves the energy, the cross helicity and the mean square potential,
With small viscosity and resistivity, these three invariants have been observed to decay at different rates in decaying turbulence [38, 10, 9]; the system then relaxes toward a state of minimal energy constrained by them, as observed in simulations of two-dimensional MHD [11]. This so-called selective decay mechanism underlies the inverse cascade of magnetic helicity in three-dimensional MHD turbulence [21] and of the mean square potential in two-dimensional MHD turbulence [43, 22, 11], and the relaxation toward Taylor states [47] in fusion plasmas.
In a turbulent flow, energy cascades from the large scales toward ever smaller scales until it is removed by viscosity at the dissipation scale according to Kolmogorov’s 1941 theory [31]. A direct numerical simulation (DNS) resolves all scales down to this dissipation scale, so its cost grows rapidly with the Reynolds number and becomes prohibitive [42]. Large eddy simulation (LES) instead resolves only the large scales and models the effect of the unresolved small scales on them [46]. The fundamental requirement is to truncate the scales to those representable on a computationally feasible mesh without substantially altering the large flow structures [34].
For long-time turbulence simulations to be reliable, the numerical method should respect the invariants and their dissipation laws, which calls for structure-preserving discretizations. A structure-preserving scheme, however, introduces no numerical dissipation. While the flow is resolved, this is an asset; but in long-time turbulent computations the energy it conserves cannot be removed there and accumulates at the smallest resolved scales, thus polluting the simulation. Conventional turbulence codes address under-resolution at the level of the scheme, through numerical or eddy viscosity, which, however, changes the dissipation rates of the ideal invariants. This highlights an interesting tension between structure-preserving schemes and the need for dissipation in under-resolved turbulence simulations. To address this issue, we seek to suppress the accumulation of energy at the smallest resolved scales without introducing additional dissipation, while retaining the cross helicity and the mean square potential (2) of the original MHD system, together with a modified energy, so that long-time computations remain reliable. This can be achieved with the regularized -model [36, 20], which we now review from the perspective of the ideal MHD invariants.
We aim to regularize the system (1) via filtering the transport velocity. The simplest way is to apply a Helmholtz filter to the velocity
which is divergence free. In the ideal case, the potential is transported by ,
and we write the momentum equation as with an unknown transport term . Our goal is to derive a transport term such that the three invariants (2) are preserved like the original MHD.
Mean square potential. Testing (4) with and using ,
for every . Transporting by any divergence-free velocity conserves , and its dissipation law is unchanged when is added.
Cross helicity. It is easy to derive that
For this to vanish for every divergence-free , the bracket must be a gradient, absorbed into the pressure, plus a constant vector, which vanishes since keeps zero mean. Hence
which reduces to up to a gradient when . Thus, we obtain the transport term.
Energy. By (5) and with , the magnetic energy changes by the work of the Lorentz force on ,
We therefore test the momentum equation with : the transport term (7) does no work since , the Lorentz terms cancel, and by the symmetry of the filter the conserved energy is
Adding viscosity, resistivity and forcing, we obtain the MHD- model [36]
with , and . It is the magnetohydrodynamic analog of the Navier–Stokes- model [15, 20].
Remark (Kelvin circulation). The transport term (7) is the one produced by Kelvin’s circulation theorem when material loops are advected by instead
of [20, 36]. A line element joining two such particles evolves by
so for a loop moving with ,
For the last term is , which integrates to zero around the loop, and the classical theorem is recovered.
The MHD- model (10) thus retains the three ideal invariants of MHD, with replaced by . The term in penalizes motions below the length , so small-scale velocity activity below this scale is suppressed, which may reduce the resolution required [20, 16], while no dissipation is added. The cross helicity and the mean square potential are unchanged and satisfy the same dissipation laws as in MHD.
To capture these dynamics, a discretization should preserve the ideal invariants and their nonideal dissipation laws at the discrete level, since numerical dissipation acting on the slowly decaying invariants alters the very hierarchy that drives selective decay. The past decades have seen significant progress in structure-preserving methods for flows and MHD. In particular, schemes based on the finite element exterior calculus (FEEC) [2] [4, 3] have been developed that precisely preserve important structure, such as the magnetic Gauss law and helicity conservation [30, 28, 29, 23, 33, 37, 7, 35]. Helicity-preserving discretizations have been used to study magnetic relaxation [27, 18], where preserving the magnetic helicity at the discrete level is essential: the ideal invariant constrains the evolution and determines the relaxed state. The same method has also been used to compute three-dimensional MHD equilibria of stellarators [12]. Energy- and helicity-conserving schemes have also been constructed with mixed finite elements for the Navier–Stokes equations [45] and the Navier–Stokes- model [39], and for the Navier–Stokes equations with mimetic dual-field discretizations [49, 50]. Beyond finite elements, long-time simulations of ideal MHD turbulence were carried out in [40] with a structure-preserving matrix discretization, and a structure-preserving spectral scheme for ideal MHD was proposed in [24].
In this work we construct a structure-preserving finite element method for the two-dimensional MHD- model (10), and show that both the filter and structure preservation are needed for accurate simulations on under-resolved meshes, i.e. for use as a large eddy simulation. Our contributions are:
The discretization. A structure-preserving finite element discretization of the MHD- model with pointwise divergence-free fields and discrete dissipation laws for all three ideal invariants, which reduce to exact conservation in the ideal limit.
The solver. An augmented Lagrangian preconditioner with a monolithic multigrid solver, whose iteration counts are observed to be robust with respect to the filter width and the Reynolds numbers, and to the mesh size for small time steps.
Why the MHD- model is necessary. A comparison with a direct numerical simulation shows that, once the flow is under-resolved, the unfiltered scheme accumulates energy at the grid scale, which pollutes the small scales with spurious oscillations. The filter suppresses this accumulation without introducing additional dissipation and with all three invariants preserved, so that a coarse mesh reproduces the large scales of the direct simulation free of oscillations.
Why structure-preservation is necessary. In the comparisons reported here, discretizations that fail to preserve the dissipation laws exhibit additional loss of the mean square potential and reach a different state at the same time, whereas the structure-preserving scheme reproduces selective decay and, in our experiments, approaches the Arnold-type bound.
The paper is organized as follows. Section 2 writes the MHD- model in the rotational form used by the discretization and states its dissipation laws. Section 3 presents the discretization and proves its structure-preserving properties, and Section 4 describes the solver. Section 5 verifies convergence and conservation. Section 6 studies selective decay and long-time relaxation, Section 7 compares the energy spectra with a direct simulation, Section 8 considers magnetic island coalescence, and Section 9 concludes.
The MHD- model and conserved quantities
With the pressure , the MHD- model (10) reads, in rotational form,
For , the energy in (9), the cross helicity and the mean square potential in (2) satisfy the dissipation laws
where . For brevity we refer to the three quantities as invariants, even in the nonideal case.
Structure-preserving finite element discretization
Notations and finite element spaces
Let be the periodic square and let be a shape-regular, quasi-uniform triangulation of with mesh size (the cell diameter). We use and for the norm and inner product, allowing to denote both scalar and vector-valued spaces. For let , and be the Lagrange space of degree , the Raviart–Thomas space [?] of degree , and the mean-zero discontinuous space of degree on respectively. These spaces are periodic by construction,
and they form the finite element de Rham complex
which is exact up to the harmonic forms of the torus:
where denotes the constant vector fields. We denote the discretely divergence-free subspace by . Since , a divergence constraint imposed weakly against holds pointwise. The discrete rotation is the -adjoint of ,
Constant fields lie in the kernel of , since for all , and taking in (17) shows that has zero mean for every .
Lemma 3.1. There exist constants , depending only on , and , independent of and depending only on the shape regularity of and on , such that
Proof. For (18), write with . Since annihilates constants, we may subtract the mean of and assume that has zero mean, and this does not change . Then by (17), the Poincaré inequality for mean-zero and pointwise. By (16), consists of the mean-zero fields in . The remaining two estimates are the standard inverse inequality on quasi-uniform meshes [13, Thm. 4.5.11]; for the last estimate, take in (17).
Discrete filters and -norms
The continuous filter is discretized in mixed form, with the auxiliary scalar . The velocity filter reads: given , find such that
By (17), equation (28) states . The analysis of the viscous term also requires the vorticity filter on : given , find such that
We denote by and the solution operators of the velocity filter, and , and by the solution operator of the vorticity filter, . All three are linear.
Proposition 3.1 (Discrete filters). For every the following hold.
(i) Both filters are well posed, and
(ii) and are symmetric and contractive:
(iii) The filters commute with : , that is,
Proof. (i) The systems are finite-dimensional, so it suffices to show uniqueness. For the velocity filter, take in (20a) and in (20b); adding, the cross terms cancel and , which vanishes when . The vorticity filter is treated by taking in (21).
(ii) For , taking in (20a) for and using (20b) for gives , which is symmetric; is symmetric because (21) is. By (22), , and likewise for .
(iii) For take in (20a). By (17) and ,
, which is (21) with .
The discrete energy norm on and dissipation norm on are
By Proposition 3.1 these are induced by symmetric bilinear forms, and they are positive definite: forces , , and then (20a) gives . The argument for is identical.
Theorem 3.2 (Norm equivalence). Let be fixed and assume . Then
*where , and is the constant of Theorem 3.1. In particular is independent of and .
Proof. Let and write , . For the upper bound, the Cauchy–Schwarz inequality and (31) give
For the lower bound, take in (27). By the Cauchy–Schwarz inequality, the inverse estimate (26) and ,
Dividing by , factoring out and using ,
The fully discrete scheme
The initial data are taken as and so that , where , is the Lagrange interpolant into , and are the stream functions of the velocity and the magnetic field, so that and are discretely divergence-free by construction. The filter width is constant on the mesh.
We present a structure-preserving discretization in space and time for (12). We use the implicit midpoint method as the temporal scheme. For the fluid variables and the potential we use the averages
The variables , and are treated as independent unknowns at the intermediate time level. The filter constraints for and are imposed at the endpoint , so that the energy pairing is evaluated at a single time level.
The formulation is chosen as follows. Conservation of the mean square potential relies on exactly, since exact divergence-free ensures that , so we discretize in the -conforming space . However, is not regular enough for the filter , so we write it in mixed form with the auxiliary variable . Since and , , so must also be exactly divergence free, and we use the pair for the velocity and pressure, for which makes the discretely divergence-free condition hold pointwise. The viscous term is written in mixed form with thanks to the periodic boundary conditions. For the energy and the cross helicity we follow [29], with one modification: since the momentum equation is tested with instead of , the kinetic energy is , which requires at both time levels, so and are included as independent unknowns of Algorithm 1, with the filter equations imposed at .
Algorithm 1 Fully discrete scheme for the 2D incompressible MHD- model
Given , set . For , find
such that for all test functions in the same space:
Throughout, , so that and . The second and fifth equations of Algorithm 1 are the velocity filter (20) at , so and, by linearity, . The fourth and last equations state and .
Structure-preserving properties
For convenience, we write , and define and analogously.
Theorem 3.3. Every solution of the discrete system (33) satisfies the following for all .
(a) discretely divergence-free property.
provided the initial conditions are discretely divergence-free.
(b) discrete energy dissipation law, with ,
In the ideal limit with , is exactly conserved. If and for every , then for every ,
so the scheme is unconditionally stable.
(c) discrete cross helicity dissipation law, with and ,
(d) discrete mean-square potential dissipation law, with ,
In the ideal limit, is conserved for and for .
Proof. Throughout the proof we drop the superscript on midpoint quantities. By Algorithm 1 we have , , and , so that (17) gives
We also use the pointwise identity for , , which implies and
The divergence-free properties of and are due to the properties of the de Rham complex. Since (20a) holds for all and all terms lie in , is a sum of two divergence-free fields.
For the energy law, we test the momentum equation with and the potential equation with . The nonlinear term drops since , and since the pressure term vanishes, so that
Adding the two equations, the coupling terms cancel by the pointwise identity, and it remains to identify the other terms. Since is symmetric by Proposition 3.1,
and by (17) and (24),
Multiplying by gives (35).
To obtain the stability bound, we estimate the forcing term. Let be the mean of , so that . Since has zero mean and , Young’s inequality, (18) and give
Inserting this into (49) and summing over gives (50).
Next, for the cross helicity, we test the momentum equation with and the potential equation with . Since the pressure term vanishes, , and , so that
Adding the two equations, the nonlinear terms cancel by the pointwise identity, and since , we obtain (51).
Finally, for the mean-square potential, we test the potential equation with . Since and is periodic,
so the equation reduces to . Since by (24), this is (52).
Remark 3.1 ( stability). Under the assumptions of Theorem 3.3(b) and Theorem 3.2, (50) and (35) give , with independent of , and .
Nonlinear solver and block preconditioning
Turbulence simulations typically require fine meshes and long time computation. Therefore, we develop block preconditioners for the fully discrete scheme of Algorithm 1. At each time step the nonlinear problem of Algorithm 1 is solved by Newton’s method. We group the pressure separately from the other fields and apply an augmented Lagrangian/grad-div stabilization term [8, 41], so that the Jacobian system has the form
where couples the six remaining fields, is the discrete divergence and is the pressure mass matrix. We take in all experiments. We apply FGMRES with the upper triangular preconditioner
where approximates the Schur complement and is inverted by one Jacobi step. Since the experiments using this preconditioner use piecewise-constant pressure, is diagonal and this step is exact. For the inversion of the block , we apply the monolithic multigrid in [32]. The block is solved inexactly with a fixed amount of work: we perform exactly two FGMRES iterations, preconditioned by one multigrid F-cycle, which starts with an exact solve on the coarsest mesh and performs one V-cycle on each finer level [32].
On the coarsest level we use a sparse LU factorization with MUMPS [1]. On the finer levels the smoother is six GMRES iterations preconditioned by additive Schwarz over vertex-star patches, with the patch problems solved exactly by LU [19]. We stop the nonlinear solver at a relative residual of , and the outer FGMRES iteration at a relative residual of or an absolute residual of , measured in the Euclidean norm. The filter width is fixed on the finest mesh and transferred to the coarse levels. The performance of the solver is assessed in the numerical experiments below. The overall structure of the solver is summarized in Figure 1.

Figure 1. Graphical outline of the nonlinear solver and the block preconditioner for one time step of Algorithm 1.
Numerical experiments
In this section, we present numerical results for the structure-preserving scheme of § 3. We first verify the scheme by a convergence test with manufactured solutions (§ 5.1) and a conservation test on the Orszag–Tang vortex (§ 5.2). The scheme is then used to study selective decay, energy spectra and island coalescence in § 6 to § 8. The convergence and conservation tests, the Orszag–Tang run toward the Arnold-type bound (§ 6.1) and the random-data experiment (§ 6.3) solve the linear system in each Newton step by a sparse direct LU factorization (MUMPS [1]). All other experiments use the solver of § 4, and its robustness with respect to the physical and discretization parameters is reported in Table 4 and Table 5.
| DOFs | , | , | , | , | |
| 32 | 12,288 | (2.00) 4.76 | (2.00) 4.94 | (2.60) 3.39 | (2.02) 3.49 |
| 64 | 49,152 | (2.00) 4.35 | (2.00) 4.41 | (2.88) 3.16 | (2.62) 3.07 |
| 128 | 196,608 | (2.15) 3.77 | (2.00) 3.79 | (3.15) 3.60 | (2.88) 3.28 |
| 256 | 786,432 | (2.46) 3.56 | (2.23) 3.54 | (3.30) 4.97 | (3.17) 4.35 |
| 512 | 3,145,728 | (2.53) 3.67 | (2.47) 3.59 | (3.40) 7.71 | (3.33) 6.37 |
Table 4. Solver performance: average number of Newton steps (in parentheses) and average number of outer FGMRES iterations per Newton step, both averaged over all time steps up to (200 steps for , 40 steps for ) on meshes.
| (2.00) 1.50 | (2.00) 1.50 | 3.4 | ||
| (2.00) 1.46 | (2.00) 1.50 | 80.4 | ||
| (2.00) 1.50 | (2.00) 1.50 | 32.4 | ||
| (2.00) 1.59 | (2.00) 1.92 | 115.1 | ||
| (2.00) 1.50 | (2.00) 1.50 | 3.5 | ||
| (2.00) 1.61 | (2.00) 2.00 | 129.1 |
Table 5. Robustness with respect to the Reynolds numbers for island coalescence up to : average number of Newton steps (in parentheses) and average number of outer FGMRES iterations per Newton step, over all 500 time steps and over , and the peak current at .
Convergence
Spatial convergence. For the convergence tests only, we augment the momentum and magnetic-potential equations in (33) by manufactured right-hand sides and , respectively, obtained by substituting the exact fields into the continuous equations. We test the spatial accuracy on the periodic square with , and physical parameters , . We choose a stationary manufactured solution to focus only on the spatial discretization error. The manufactured solution is
with , and following analytically. Errors are measured in the norm for , , and in the norm for . Tables 1 and 2 report optimal rates for .
| Rate | Rate | Rate | Rate | |||||
| 32 | – | – | – | – | ||||
| 64 | 1.00 | 1.00 | 1.00 | 1.00 | ||||
| 128 | 1.00 | 1.00 | 1.00 | 1.00 |
Table 1. 2D spatial convergence rate for on meshes.
| Rate | Rate | Rate | Rate | |||||
| 8 | – | – | – | – | ||||
| 16 | 1.95 | 2.04 | 1.95 | 1.95 | ||||
| 32 | 1.99 | 2.01 | 1.99 | 1.99 |
Table 2. 2D spatial convergence rate for on meshes.
Temporal convergence. We test the temporal accuracy on the periodic square with a fixed mesh, , and . We use polynomial degree in space, so that the spatial error is negligible, and vary the time step. The manufactured solution is
with and . The corresponding momentum and magnetic-potential source terms are evaluated at . The errors of , and are measured at , and the error of the pressure, which is a midpoint quantity, at . Table 3 shows the expected rates of the implicit midpoint rule.
| Rate | Rate | Rate | Rate | |||||
| – | – | – | – | |||||
Table 3. 2D temporal convergence test on the periodic square.
Conservation test
We now test the conservation properties of the scheme. The setting is the standard Orszag–Tang vortex on the periodic square , in the ideal regime , so that the three quadratic invariants should be conserved exactly. The initial magnetic and velocity fields are prescribed in terms of scalar stream functions to ensure divergence-free conditions, as in [11]. The initial magnetic and velocity fields are defined by
which satisfy and . The scalar potentials and are chosen as
We choose , with , , , where is the mesh size. The mesh is with the lowest-order element in space. The relative errors of the total energy, cross helicity and mean square potential are shown in Figure 2. All quantities are preserved.
Figure 2. Ideal Orszag–Tang test on the mesh with and . (a) Relative errors of the energy, cross helicity and mean square potential. (b) norms of , and .
Selective decay
In two-dimensional MHD, energy and cross helicity cascade forward to small scales, where they are dissipated by and , while the mean square potential cascades inversely to large scales [11, 43]. We now investigate how the scheme reproduces the resulting selective decay of the three invariants.
Orszag–Tang: timescale separation and the Arnold-type bound
We now focus on the non-ideal case and investigate the different dissipation rates of the ideal invariants. We repeat the Orszag–Tang test with and on the mesh with . Figure 3 reports the time evolution of the three invariants. For these initial data and parameters, the structure-preserving scheme reproduces the separation of timescales reported in [9]: and the magnitude of decay rapidly while changes more slowly.

Figure 3. Selective decay of the three invariants, each normalized by its initial value.
The relaxed state is characterized by a discrete Poincaré-type bound. In the periodic setting, taking in (46) shows that is conserved, so keeps the zero mean of the initial data. Since with , the Poincaré inequality , with the smallest nonzero eigenvalue of on , gives
This is an analog of the three-dimensional Arnold inequality , , which bounds the magnetic energy from below by the magnetic helicity [5]; in two dimensions vanishes and takes its role. For the numerical behavior of the three-dimensional bound we refer to [27, 18]. The bound is approached only when is concentrated in the lowest Fourier modes and the kinetic energy is small. For the original two-dimensional MHD equations on the torus, it was proposed in [38] and then shown in [48], under a condition on the ratio of viscosity to resistivity, that the kinetic energy decays faster than and that the ratio of the energy to converges to an eigenvalue of the Laplacian, the magnetic field approaching a force-free state on which decays like . The Arnold-type bound corresponds to the lowest eigenvalue , where decays like . Figure 4 shows a run up to . In this experiment the energy decays much faster than , and we observe that the evolution approaches the bound and then relaxes along it, which is consistent with the selective decay described in [48].

Figure 4. Orszag–Tang run up to , colored by time. (a) Evolution of . (b) Ratio . The dashed lines are the Arnold bound , i.e. , with .
Large-scale simulation and solver robustness test
We then run a large-scale simulation until . For the multigrid hierarchy we use a coarse mesh of cells and 6 levels of refinement, resulting in a mesh with 2 097 152 cells and 12 582 912 degrees of freedom, and we take . Figure 5 shows the evolution of the magnetic field at . Starting from smooth, large-scale fields, the magnetic eddies steepen into thin current sheets, which reconnect and destabilize, driving a cascade to small-scale MHD turbulence.

Figure 5. Orszag–Tang test on the mesh with and , colored by the magnetic field strength ; the color range is rescaled in each frame.
We further test the robustness of the solver of § 4 on the Orszag–Tang problem with , for and , on meshes obtained by refining a coarse mesh of cells. We run until , which covers the formation of the thinnest current sheets, and Table 4 reports the average number of Newton iterations and the average number of outer FGMRES iterations per Newton iteration over all time steps. For the small time step , the outer iteration counts do not grow under mesh refinement and are nearly independent of the filter width, while the average number of Newton steps increases mildly, from 2 to about 2.5. For the larger time step , the iteration counts grow under mesh refinement for , but they are smaller for than for . This is consistent with the physics: as the current sheets thin, increasingly small-scale structures develop on finer meshes, and with a large time step each Newton solve must resolve a larger change of the solution. A larger smooths these structures and therefore mitigates the growth.
Inverse cascade for random initial data
The inverse cascade of [22, 43, 10] is the mechanism commonly invoked for the relaxation to the bound (61) [38, 9]: we now test whether the scheme captures it starting from band-limited random data.
Initial data and parameters. We consider the long-time relaxation of a random configuration on the periodic square with no external
forcing. We define the following wavenumber set
with peak wavenumber . The velocity stream function and the magnetic flux function are sampled as
with amplitude and i.i.d. random phases , drawn once with NumPy’s default_rng(42) so the realization is reproducible: the modes are visited with and then in increasing order, and for each mode is drawn before .
The functions and are interpolated into , and the initial conditions are
so that are exactly divergence-free; the filtered velocity is obtained from by the discrete filter.
We take , a time step , and integrate to on a mesh with lowest-order elements in space, and ; the nonlinear systems are solved by Newton’s method with a sparse direct LU factorization (MUMPS).
Figure 6 shows the inverse cascade of the mean square potential: the peak of its spectrum moves from the initial band to the box mode . Figure 7 shows the corresponding formation of large-scale magnetic structures from the initial small-scale field.

Figure 6. Mean square potential spectrum at , normalized at each time by its maximum (see Appendix § 11). The band-limited initial state at develops a broad spectrum whose peak migrates to at and ultimately condenses at the box mode at , demonstrating the inverse cascade of .

Figure 7. Evolution of the magnetic potential .
Comparison with non-structure-preserving schemes. To see what the discrete laws of Theorem 3.3 contribute to this result, we repeat the computation with the same spatial discretization and time step, replacing the implicit midpoint rule by the BDF2 formula (with a midpoint first step) and by the backward Euler method, neither of which satisfies the three discrete laws. Figure 8 shows the mean square potential for and . Both alternative schemes lose substantially more than ours, backward Euler most of all, and the gap does not shrink when the dissipation is reduced tenfold. This additional loss is therefore numerical. It occurs mostly for , while the small scales are active, and it changes the state toward which the solution relaxes.
Figure 8. Mean square potential, relative to its initial value, for the random initial data on the mesh with and : the scheme of Algorithm 1, and BDF2 and backward Euler with the same spatial discretization. Left: , the computation of Figure 6 and Figure 7. Right: .
Relaxed state comparison. Figure 9 compares the magnetic potential computed by our scheme and by BDF2 at for . The solution of our scheme is concentrated in the first eigenspace of , the Fourier modes with , and is therefore close to the bound (61). With BDF2 a large part of remains in the modes with , which appear as the diagonal structures in Figure 9, and the solution is still far from the bound.
Figure 9. Magnetic potential (mean removed) at for : the scheme of Algorithm 1 (left) and BDF2 (right), with one color scale.
Energy spectra and the effect of filtering
In two-dimensional MHD, energy cascades forward to small scales, and following it down to the dissipation scale is what makes direct simulation expensive. In the -model, the term in the energy penalizes scales below , so the kinetic energy spectrum is expected to fall off for while the large scales are left unchanged [20, 16]. To check this, we compare kinetic energy spectra of the scheme with a Fourier pseudo-spectral direct numerical simulation of the original MHD equations computed with Dedalus [14].
We use the Orszag–Tang test of § 6 with , , and . For the multigrid method we use a coarse mesh of cells and 5 levels of refinement, resulting in a mesh with lowest-order elements and 786 432 degrees of freedom. At this Reynolds number a pseudo-spectral simulation on a grid would not resolve the dissipation scale, so the reference is computed on a grid. The shell-summed spectrum is the kinetic energy of all Fourier modes with , so that . For the scheme we plot the shell-summed spectrum of the kinetic part of the energy, , computed as described in Appendix A, and for the reference that of . They coincide when . Figure 10 shows the spectra and their ratio to the reference, and Figure 11 the corresponding vorticity fields.
Figure 10. Kinetic energy spectra of the Orszag–Tang test with on the mesh at , and (top), and their ratio to the spectral DNS of the original MHD equations on a grid (bottom). At the ratio is shown for .

Figure 11. Vorticity of the transport velocity at for . Columns: pseudo-spectral solutions on and grids, and the scheme on the mesh. Rows: , and , where is the mesh size of the mesh. The fields are restricted to . Each row shares one color scale.
Spectral space. At large scales, all runs agree with the reference. At the run with follows the reference over the whole range. At and 2 the forward cascade has reached the mesh scale. The scheme has no numerical dissipation, so the energy that arrives at the smallest resolved scales is not removed there. For it accumulates near the grid scale, and the spectrum rises above the reference for . For the spectrum falls off at high wavenumbers, with the cut-off moving to smaller as increases, and with and the accumulation is suppressed. Thus leaves the largest scales () unchanged and, as expected, also reduces the spectrum at intermediate wavenumbers , giving a more compact energy spectrum, in agreement with the regularization effect of the Navier–Stokes- model in [16, 20].
Physical space. The accumulated energy appears as grid-scale oscillations along the vortex sheets for ; with and the oscillations are absent. Figure 11 also shows pseudo-spectral solutions of the same equations: on a grid the unfiltered pseudo-spectral solution is polluted in the same way, while for both solutions on cells are close to the pseudo-spectral solution of the MHD- model on a grid. In these experiments the MHD- model therefore suppresses small-scale velocity activity below , which suggests a possible reduction of the resolution requirements of a direct simulation [20, 16]. We do not quantify this saving here, since the mesh is the same for all values of in our experiments.
This comparison also shows why structure preservation matters when assessing a turbulence model. Since our scheme preserves the ideal invariants and their dissipation laws (Theorem 3.3), it adds no numerical dissipation, so the departure of the spectra from the run with can be attributed to the filter rather than to numerical dissipation.
Island coalescence
We finally consider a two-dimensional island coalescence problem to demonstrate the effectiveness of our scheme for a physically relevant problem. We adopt the experimental setting from [37], in which two magnetic islands embedded in a Harris current sheet are attracted to each other by the Lorentz force and reconnect through a thin current sheet forming between them. The computational domain is the rectangle and the initial state is the Fadeev equilibrium perturbed by a coalescence seed,
with , and , so that the unperturbed equilibrium has its O-points at and and the X-point at . We take and . Following [37], the walls are slip walls with the tangential magnetic field held at its initial value,
where , so that the last condition is . The spaces of § 3.1 are taken on a triangulation of , and we write
The velocity conditions in (82) are built into the spaces of and . The magnetic variables carry no essential condition, and as in § 3; the tangential datum enters the current equation as a natural boundary term.
The full scheme reads as follows: given and , set . For , find
such that for all test functions in the same spaces:
Compared with Algorithm 1, only the spaces and the boundary term in the current equation change. The scheme still preserves pointwise. The boundary conditions allow nonzero normal magnetic flux, and the boundary terms in the cross-helicity balance need not vanish, so the cross helicity is not an invariant of this configuration and we do not report it here.
For the multigrid hierarchy we use a coarse mesh of cells and 5 levels of refinement, resulting in a mesh with 6,300,676 degrees of freedom. We fix the time step and integrate until . The filter width is . We use the solver tolerances of § 4; since the initial residual of each time step is small here, we additionally stop the nonlinear solver at an absolute residual of , the level reached by round-off in this computation. Figure 12 and Figure 13 report snapshots at .

(a) (a)

(b) (b)

(c) (c)

(d) (d)
Figure 12. Island coalescence: current density at , , and .

(a) (a)

(b) (b)

(c) (c)

(d) (d)
Figure 13. Island coalescence: magnetic potential (contours) at , , and .
At the two islands are separated by an X-point at . The Lorentz force pulls them together, and by they have moved toward the center and a current sheet forms at the X-point. At the islands are pressed against each other and reconnect through a thin X-shaped current layer, while flux is also driven out along the side walls. These fine structures are resolved without spurious oscillations.
We further report the robustness of the solver with respect to the fluid and magnetic Reynolds numbers. We run the experiment until for six combinations of and report in Table 5 the average numbers of Newton steps and outer FGMRES iterations per Newton step, over all 500 time steps and over , when the current sheet is strongest. Every time step takes two Newton steps, and the number of outer iterations stays between 1.46 and 2 per Newton step; it grows only slightly in the last phase for , where the peak current exceeds 100.
Effect of the filter on the current sheet
Figures 14 and 15 compare the current sheet for and on the same mesh. The filter smooths the sheet: with it is wider and its peak is lower, while the field away from the sheet is unchanged. We thus observe that the regularization effect also applies to the small scales of the magnetic field, even though the magnetic field was not filtered directly.
Figure 14. Island coalescence: current density on for (top) and (bottom) at , and (left to right). The two runs at each time share one color bar.
Conclusion
We have constructed a structure-preserving finite element method for the two-dimensional MHD- model. Built on a discrete de Rham complex, a discrete Helmholtz filter and the implicit midpoint rule, the scheme preserves mass conservation and the magnetic Gauss law pointwise and satisfies discrete dissipation laws for the energy, the cross helicity and the mean square magnetic potential, which reduce to exact conservation in the ideal limit. The discrete systems are solved by an augmented Lagrangian preconditioner with monolithic geometric multigrid, whose iteration counts are observed to be robust with respect to the filter width and the Reynolds numbers, and to the mesh size for small time steps. The scheme converges at the optimal rates, agrees with a pseudo-spectral direct simulation at the large scales, and reproduces selective decay over long times. Since the scheme introduces no numerical dissipation, the energy spectra measure the effect of the filter alone. The filter leaves the large scales unchanged and suppresses small-scale velocity activity, and when the cascade reaches the grid scale it reduces the energy accumulation there without introducing additional dissipation.
Figure 15. Island coalescence: current density across the sheet, , at (a) , (b) and (c) . The gray band has width .
A natural extension is the three-dimensional MHD- model, where the mean square potential is replaced by the magnetic helicity, together with a helicity-preserving discretization [27, 18, 29, 37, 35].
Acknowledgements
This work was funded by the Engineering and Physical Sciences Research Council [grant number EP/W026163/1], the Science and Technology Facilities Council [grant number UKRI/ST/B000495/1], the Donatio Universitatis Carolinae Chair “Mathematical modelling of multicomponent systems”, the UKRI Digital Research Infrastructure Programme through the Science and Technology Facilities Council’s Computational Science Centre for Re search Communities (CoSeC), the European Research Council (ERC Starting Grant, project 101164551 GeoFEM), and a Royal Society University Research Fellowship (URF\R1\221398).
Code availability
The scheme is implemented using Firedrake [25] and PETSc [6]. The code and the scripts that generate all tables and figures are archived on Zenodo [17]. The reference DNS in Figure 10 was computed with Dedalus [14].
Declaration of generative AI and AI-assisted technologies in the writing process
During the preparation of this work the authors used Claude Sonnet 5.5, Opus 5.5, Fable 5.2 (Anthropic) and GPT Sol 5.6 (OpenAI) in order to improve the clarity, readability, and language of the manuscript and to assist with typesetting. After using these tools, the authors reviewed and edited the content as needed and take full responsibility for the content of the publication. The AI tools were also used to check derivations and to help debug code; all mathematical statements, proofs and numerical results were produced and verified by the authors.
Computation of the energy spectra
On , let . The kinetic energy spectrum is the shell sum
so that . We compute this spectrum by the FFT of point samples of the finite element fields. The sampling points are chosen so that the computed spectrum sums exactly to the assembled energy , and the sampling grid is fine enough that aliasing does not affect the plotted range .
Sampling points. When sampling a finite element field to compute the energy spectrum, the samples must avoid being taken on the edges. For , the discrete fields are piecewise constant: a lowest-order Raviart–Thomas function is on each cell, with divergence $2b_T$, and , $\overline{\mathbf{u}}_h are divergence-free pointwise by Theorem 3.3(a). A point value anywhere inside a cell therefore equals the cell value. On an edge, however, the tangential component jumps and the field takes two values (Figure A.16(b)). We therefore sample at , , with , ; the offsets satisfy , which keeps every sample off the sides and diagonals of the cells (Figure A.16(a)).
Sampled versus assembled energy. We show that the sampled energy then equals the assembled energy . The samples are not distributed in proportion to the area, since for the two triangles of a square receive 10 and 6 samples. The equality holds because every square is split by the same diagonal, from its upper-left to its lower-right corner. For the -derivative on the upper triangle of a square equals that on the lower triangle of the square above it, and the -derivative equals that on the lower triangle of the square to its right. By (16) we may write and with and constant vectors . Then is a sum of products of two derivatives of and in the same direction, of single such derivatives times constants, and of the constant . Each of these terms is shifted from the upper triangles to the lower triangles as above, so the sums of over the lower and over the upper triangles coincide, and since the samples are split in the same way in every square,
Discrete spectrum. In (A.1) we replace the Fourier coefficients by the discrete coefficients \widehat{\mathbf{v}}_\boldsymbol{\kappa}^{M}=M^{-2}\sum_{i,j}\mathbf{v}(x_{ij})e^{-i\boldsymbol{\kappa}\cdot x_{ij}} of the samples, computed with the FFT of NumPy [26]. Here is even, is restricted to the representative index set , and the shell sums in (A.1) are restricted to . Parseval’s identity holds exactly for these coefficients, so the spectrum sums to the sampled energy, which equals the assembled energy. The constants enter only the mode . Table A.6 shows the check for an Orszag–Tang computation with on the mesh, where the relative differences are at the level of round-off. For the computations of Figure 10 we observed relative differences below for , and , which is the level of the remaining discrete divergence when the nonlinear systems are solved iteratively. We use and show the spectra for . For the reference we evaluate (A.1) with and the Fourier coefficients of the pseudo-spectral solution, obtained by the FFT of its vorticity on the collocation grid, ; since this solution is a trigonometric polynomial, these coefficients are exact and no sampling is needed.
Aliasing. The discrete coefficients differ from the exact ones by aliasing, . For only wavenumbers , corresponding to length scales far below the mesh scale, are folded back. Increasing beyond leaves the spectra of Figure 10 unchanged. Aliasing therefore does not affect the plotted spectra.
Mean square potential. The spectrum of the mean square potential in Figure 6 is computed in the same way from point samples of , , with ; since is continuous, the samples need not avoid the edges. At each time the spectrum is normalized by its maximum , so that only its shape is compared.
| assembled | ||||
| 0 | 0.5 | 21.694511 | ||
| 1.5 | 17.430970 | |||
| 2 | 15.372711 | |||
| 0.5 | 21.505903 | |||
| 1.5 | 16.455748 | |||
| 2 | 14.376904 | |||
| 0.5 | 20.989329 | |||
| 1.5 | 15.744024 | |||
| 2 | 13.655930 |
Table A.6. Sampled versus assembled kinetic energy for the Orszag–Tang test with on the mesh: assembled energy and relative difference for the sampling grids and .

Figure A.16. Sampling of the Raviart–Thomas fields. (a) Sample points on 2 × 2 cells of the mesh; no sample lies on a side or diagonal of a cell. (b) The field is constant on each triangle, so a sample on the diagonal takes two different values.
References
- [1]Amestoy, P.R., Duff, I.S., Koster, J., L’Excellent, J.Y., 2001. A fully asynchronous multifrontal solver using distributed dynamic scheduling. SIAM Journal on Matrix Analysis and Applications 23, 15–41. doi:10.1137/S0895479899358194.DOI
- [2]Arnold, D., Falk, R., Winther, R., 2010. Finite element exterior calculus: from Hodge theory to numerical stability. Bulletin of the American Mathematical Society 47, 281–354. doi:10.1090/S0273-0979-10-01278-4.DOI





