AGNI: A differentiable MHD stability solver & optimizer for magnetic confinement fusion devices
Rahul Gaur, Sanket Patil, Prateek Gupta, Djin Patch, Tony Qian
Abstract
The existence of an ideal MagnetoHydroDynamic (MHD) equilibrium does not guarantee its stability. Finite toroidal mode number (n) instabilities degrade performance in both tokamaks and stellarators and differentiable stability optimization tools to date have operated only in the infinite-n limit. We present AGNI (Analysis of Global Normal modes in Ideal MHD), a GPU-accelerated, automatically differentiable finite-n ideal MHD stability solver and optimizer. AGNI discretizes the ideal MHD energy principle pseudospectrally in real space using differentiation matrices and geometric coefficients from a DESC equilibrium, giving a variational eigenvalue problem for the plasma displacement, and efficiently finds the most unstable modes. Built on JAX, AGNI yields reverse-mode gradients of the growth rate with respect to boundary-shape and profile parameters without re-solving the equilibrium. We benchmark AGNI against the initial-value code NIMSTELL for a modified Landreman-Buller-Drevlak quasi-helically symmetric equilibrium, recovering the dominant m = n = 4 interchange mode with agreement in both growth rate and eigenfunction structure, and verify the automatic differentiation gradients against central finite differences. We quantify CPU and GPU cost for eigenvalue and gradient evaluation, establish the finite-precision limit on resolving near-marginal eigenvalues, and present a robust scheme to impose incompressibility compatible with gradient-based optimization. AGNI will allow us to optimize tokamaks, stellarators, and mirrors against ideal MHD instabilities.
Create a lesson
Related papers
Helicon wave propagation, plasma generation and interaction with low-frequency waves in toroidal magnetic configurations
Simon P. H. Vincent, Mounir Alfazzaa, Patrick Quigley et al.
Kilojoule-scale laser acceleration enabling efficient generation of electron-positron and muon beams
R. Babjak, M. Pouyez, C. Badiali et al.
K-shell x-ray spectroscopy: A reliable probe for stimulated Raman scattering in inertial confinement fusion---
Tianluo Luo, Zeyang Li, Yunping Wang et al.
Landau Damping Beyond Smooth Velocity Distributions: A Dispersion-Free Lagrangian Time-Domain Framework
Huasheng Xie, Jinsong Zhao
Pellet-Size Scaling of Quasi-Steady-State Plasma Performance in Wendelstein 7-X
Keisuke Fujii, Edgardo Villalobos Granados, Maryam Huck et al.
On energy conservation laws in the drift-reduced Braginskii model
Sergio García Herreros, Brenno de Lucca, Davide Mancini et al.