MRX: A differentiable 3D MHD equilibrium solver without nested flux surfaces
Tobias Blickhan, Julianne Stratton, Alan A. Kaptanoglu
TL;DR
This paper addresses the challenge of computing three-dimensional magnetohydrostatic equilibria without assuming nested flux surfaces, a capability essential for accurately modeling islands and chaotic field lines in toroidal plasmas.It introduces MRX, a differentiable, structure-preserving solver built on Finite Element Exterior Calculus and implemented in JAX, enabling robust 3D equilibria while preserving divergence-free fields and helicity under admissible variations.Key contributions include a discretization that preserves core geometric identities, a midpoint relaxation scheme with Leray projection and harmonic regularization, and comprehensive diagnostics and axisymmetric/stellarator test cases.The framework supports nonuniform meshes, island seeding, and differentiable optimization workflows, offering a path toward 3D equilibrium optimization and topology-aware plasma modeling with high performance on modern accelerators.
Abstract
This article introduces a new 3D magnetohydrodynamic (MHD) equilibrium solver, based on the concept of admissible variations of B, p that allows for magnetic relaxation of a magnetic field in a perturbed/non-minimum energy state to a lower energy state. We describe the mathematical theory behind this method, including ensuring certain bounds on the magnetic energy, and the differential geometry behind transforming to and from a logical domain and physical domain. Our code is designed to address a number of traditional challenges to 3D MHD equilibrium solvers, e.g. exactly enforcing physical constraints such as divergence-free magnetic field, exhibiting high levels of numerical convergence, dealing with complex geometries, and modeling stochastic field lines or chaotic behavior. By using differentiable Python, our numerical method comes with the additional benefits of computational efficiency on modern computing architectures, high code accessibility, and differentiability at each step. The proposed magnetic relaxation solver is robustly benchmarked and tested with standard examples, including solving 2D toroidal equilibria at high-beta, and a rotating ellipse stellarator. Future work will address the integration of this code for 3D equilibrium optimization for modeling magnetic islands and chaos in stellarator fusion devices.
