← Latest papers
🔬 physics

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

This paper introduces \textsc{MHDEquilSolver}, an interactive MATLAB-based graphical user interface that employs the finite element method to solve the Grad--Shafranov equation for axisymmetric tokamak plasmas, enabling real-time parameter adjustment, sensitivity analysis, and educational exploration of magnetohydrodynamic equilibria.

Original authors: Yahya Sadeghi, Samaneh Yarmahmoodi

Published 2026-09-28
📖 4 min read☕ Coffee break read

Original authors: Yahya Sadeghi, Samaneh Yarmahmoodi

Original paper licensed under CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). ✨ This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Inside the heart of a fusion reactor, a superheated gas called plasma swirls in a donut-shaped chamber, held in place not by physical walls, but by an invisible cage of magnetic fields. Keeping this plasma stable is one of the most difficult challenges in modern physics. If the magnetic cage wavers, the plasma cools instantly, and the energy production stops. To design a reactor that works, scientists must first understand exactly how the plasma settles into a balanced state, a condition known as equilibrium. This balance is a tug-of-war between the pressure of the hot gas trying to expand outward and the magnetic forces squeezing it inward. Because the shape of the plasma and the strength of the magnetic fields change constantly, calculating this balance requires solving a complex mathematical puzzle that has no simple, direct answer.

For decades, researchers have relied on powerful computer programs to solve this puzzle, but these tools were often built for experts, written in older languages, and difficult to modify or understand. They acted like black boxes: you put numbers in, and a result came out, but the process in between was hidden. A new study by Yahya Sadeghi and Samaneh Yarmahmoodi from the Nuclear Science and Technology Research Institute in Iran aims to open that box. They have created a new, interactive software tool called MHDEquilSolver. Unlike previous programs, this tool is designed to be transparent and adaptable, allowing scientists and students to see exactly how changing a single setting ripples through the entire system to alter the shape and stability of the plasma.

The researchers built their tool using a popular programming environment known for its ability to handle complex math and create visual displays. At its core, the software solves the fundamental equation that governs the plasma's equilibrium. To do this, it breaks the donut-shaped space into thousands of tiny triangles, a technique called the finite element method. This allows the computer to approximate the solution by calculating the balance of forces in each small piece and then stitching them together. The software then uses a step-by-step mathematical process to refine this approximation until the solution is precise enough to be useful. The team ensured the program is robust, meaning it can handle difficult shapes or extreme settings without crashing, often by automatically simplifying the calculation if the initial attempt gets too complicated.

What makes this tool unique is its interactive interface, which puts the user in direct control of the plasma's shape and behavior. The screen displays a central image of the plasma cross-section, surrounded by six different graphs that update instantly as the user turns virtual knobs. These knobs control the physical properties of the reactor, such as the size of the donut, how stretched out the plasma is vertically, and how much it is indented on one side to form a "D" shape. Other controls adjust the internal pressure of the gas and the strength of the magnetic fields. As a user changes these values, the software immediately redraws the magnetic field lines, the pressure distribution, and the electric currents flowing within the plasma. This real-time feedback allows a user to see, for example, that increasing the vertical stretch of the plasma makes the magnetic cage stronger, or that changing the pressure profile shifts the center of the plasma slightly outward.

The authors tested the software on three distinct plasma shapes: a simple circle, an elongated oval, and the complex "D" shape used in modern reactors. In every case, the tool successfully calculated the equilibrium state and produced results that matched known theoretical solutions. The software is fast enough to run on a standard office computer, typically taking between ten and fifteen seconds to generate a full solution, even when the calculation involves thousands of tiny triangles. The researchers also performed a sensitivity analysis, a systematic check to see how much each input setting influences the final result. They found that small changes in the pressure settings can significantly shift the position of the magnetic center, while changes in the magnetic field settings alter the safety margin that keeps the plasma stable.

This work does not claim to solve the ultimate problems of fusion energy or to replace the massive, supercomputer-based codes used for final reactor design. Instead, it fills a specific gap by providing a clear, educational, and rapid prototyping environment. It serves as a bridge between abstract theory and practical application, allowing students to visualize the invisible forces at play and helping researchers quickly test new ideas before committing to more complex simulations. By making the mathematics of plasma equilibrium visible and adjustable, the tool offers a new way to explore the delicate balance required to harness the power of the stars.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →