An adaptive Newton-based free-boundary Grad-Shafranov solver

Daniel A. Serino, Qi Tang, Xian-Zhu Tang, Tzanio Kolev, Konstantin Lipnikov

In the quest for clean fusion energy, scientists rely on tokamaks—donut-shaped devices that use powerful magnetic fields to confine scorching hot plasma. To design and operate these machines, researchers must solve the Grad–Shafranov (GS) equation, which describes the delicate balance of forces keeping the plasma in equilibrium. However, traditional solvers often struggle when the plasma boundary is "free" to move or when dealing with complex physical states.

A new paper by Daniel A. Serino and colleagues at Los Alamos and Lawrence Livermore National Laboratories introduces a robust, scalable, and highly accurate solver that tackles these challenges head-on using a Newton-based approach and adaptive mesh refinement.

TL;DR

The researchers developed a Newton-based solver for the free-boundary Grad–Shafranov equation that uses shape calculus to compute exact derivatives of moving boundaries. By combining this with adaptive mesh refinement (AMR) and specialized preconditioning, they successfully solved "Taylor state" equilibria—a notoriously difficult problem where conventional solvers typically fail to converge.

What Problem Does This Paper Address?

In a tokamak, the plasma isn't held in a fixed box; its shape is determined by the magnetic fields generated by external coils. This is a free-boundary problem: you have to solve for the plasma state and the external coil currents simultaneously to achieve a desired shape.

Most existing tools use "Picard-based" iterative methods. While simple to implement, these methods often converge slowly or fail entirely for challenging physics scenarios, such as the Taylor state (a zero-pressure equilibrium relevant to plasma disruptions). Furthermore, as we move toward more complex reactor designs like SPARC or ITER, we need solvers that are both mathematically "stiff-resistant" and computationally scalable on parallel supercomputers.

Methods

The authors depart from standard practices by implementing a full Newton method within the MFEM (Modular Finite Element Methods) framework. Key technical innovations include:

  • Shape Calculus: Since the plasma boundary moves during the optimization, the authors used shape calculus to analytically compute the Jacobian matrix. This allows the Newton solver to "understand" how a change in the magnetic field affects the physical boundary of the plasma.
  • Adaptive Mesh Refinement (AMR): Instead of using a uniform grid, the solver automatically identifies regions with high error (like near the coils or the plasma edge) and increases the mesh resolution there. This provides high accuracy without the massive computational cost of a globally fine grid.
  • Advanced Preconditioning: The linearized systems in these problems are non-symmetric and difficult to solve. The team developed block-triangular and block-diagonal preconditioners that utilize Algebraic Multigrid (AMG) to keep the solver efficient even as the problem size grows.
  • Nonlocal Constraints: The solver handles global constraints, such as maintaining a specific total plasma current, by reformulating them into the block system.

Datasets

The solver was evaluated using three prototypical tokamak configurations:

  1. Luxon and Brown Model: A standard analytical model used for ITER-like configurations.
  2. Taylor State Equilibrium: A challenging zero-beta ($0-\beta$) case where the plasma pressure is zero, and the current is purely force-free.
  3. 15MA ITER Baseline: A high-fidelity case using synthetic measurement data from proposed ITER discharge scenarios.

Key Insights and Ideas

  • Newton > Picard: The Newton-based approach is significantly more robust. While Picard iterations often stall at a relative residual of $10^{-1}$ or $10^{-2}$ for Taylor states, the Newton solver consistently drives the error down to $10^{-6}$ or lower.
  • The Power of the Jacobian: Incorporating the boundary's sensitivity (via shape calculus) into the Jacobian is the "secret sauce" that allows the solver to handle the non-linear interaction between the plasma and external coils effectively.
  • Feature-Based AMR: The authors found that using the toroidal magnetic field as an indicator for mesh refinement (rather than just the poloidal flux) better captures the sharp gradients and "jumps" in current that occur at the plasma boundary.

Key Results

  • Rapid Convergence: For most cases, the solver reached an absolute error tolerance of $10^{-6}$ in just 4 to 8 Newton iterations.
  • Robustness: The solver successfully converged on the Taylor state equilibrium, a feat "impossible to solve by our previous Picard-based solver."
  • Efficiency: By using AMR, the solver achieved high-resolution results on subsequent refinement levels in an average of only 2 Newton iterations per level, demonstrating the benefit of starting with a good guess from a coarser mesh.

Limitations and Future Work

While the solver is a major step forward, the authors note a few areas for improvement:

  • Preconditioner Tuning: There is still room to optimize the "smoother" strategies within the AMG blocks to further speed up the linear solver.
  • Dynamic Mesh Generation: Currently, the mesh is refined but the underlying topology is somewhat static. Future work aims to integrate a full mesh generator into the solver loop to handle extreme changes in the plasma domain (like those seen in vertical displacement events) more dynamically.

Check out the code: The implementation is maintained in the tds-gs branch of the MFEM library on GitHub.

Summary updated

Abstract

Equilibria in magnetic confinement devices result from force balancing between the Lorentz force and the plasma pressure gradient. In an axisymmetric configuration like a tokamak, such an equilibrium is described by an elliptic equation for the poloidal magnetic flux, commonly known as the Grad--Shafranov equation. It is challenging to develop a scalable and accurate free-boundary Grad--Shafranov solver, since it is a fully nonlinear optimization problem that simultaneously solves for the magnetic field coil current outside the plasma to control the plasma shape. In this work, we develop a Newton-based free-boundary Grad--Shafranov solver using adaptive finite elements and preconditioning strategies. The free-boundary interaction leads to the evaluation of a domain-dependent nonlinear form of which its contribution to the Jacobian matrix is achieved through shape calculus. The optimization problem aims to minimize the distance between the plasma boundary and specified control points while satisfying two non-trivial constraints, which correspond to the nonlinear finite element discretization of the Grad--Shafranov equation and a constraint on the total plasma current involving a nonlocal coupling term. The linear system is solved by a block factorization, and AMG is called for subblock elliptic operators. The unique contributions of this work include the treatment of a global constraint, preconditioning strategies, nonlocal reformulation, and the implementation of adaptive finite elements. It is found that the resulting Newton solver is robust, successfully reducing the nonlinear residual to 1e-6 and lower in a small handful of iterations while addressing the challenging case to find a Taylor state equilibrium where conventional Picard-based solvers fail to converge.
BibTeX
@inproceedings{serino2025adaptive,
  author = {Daniel A. Serino and Qi Tang and Xian-Zhu Tang and Tzanio Kolev and Konstantin Lipnikov},
  title = {{An adaptive Newton-based free-boundary Grad-Shafranov solver}},
  booktitle = {SIAM},
  year = {2025},
  doi = {10.1137/24m1674108},
}
Figure