Work

A MATLAB-Based Graphical User Interface for Finite Element Solution of the Grad--Shafranov Equation

Year: 2026
Type: preprint
Abstract: This paper presents \textsc{MHDEquilSolver}, an interactive MATLAB-based graphical user interface (GUI) for solving the Grad--Shafranov equation, the fundamental nonlinear elliptic partial differential equation governing ideal magnetohydrodynamic (MHD) equilibrium in axisymmetric toroidal plasmas. The solver uses the finite element method with mesh refinement to compute the poloidal flux function $\psi(R,Z)$ and associated equilibrium quantities. The GUI allows real-time adjustment of key plasma parameters, including geometric properties ($R_0$, $a$, $\kappa$, $\delta$) and profile coefficients defining the toroidal field function $F(\psi) = f_0 + f_1\psi + f_2\psi^2$ and plasma pressure $p(\psi) = p_1\psi + p_2\psi^2$. A sensitivity analysis quantifies the dependence of the poloidal magnetic flux, magnetic field components, and toroidal current density on each input parameter. The solver includes error-handling mechanisms with fallback strategies for mesh generation, ensuring numerical stability across a wide parameter space. We detail the numerical framework, solution algorithms, and post-processing routines to ensure reproducibility. This tool serves both as an educational platform for teaching MHD equilibrium principles and as a rapid prototyping environment for tokamak plasma analysis.
Language: English
Open Access status: green
OpenAlex ID: W7214528547
Cites:
Cited by:
Related to: 10