AI-Derived 3D MHD Equilibrium Solutions: Construction Logic and Verification Checks
This article examines a two-round interaction in which a large language model produced explicit solution families for three-dimensional MHD static equilibrium. The first family has a non-planar magnetic axis and constant rotational transform; the second introduces magnetic shear with a planar axis and radially varying transform. It explains the construction logic, lists back-substitution and numerical checks, and discusses the limits of closed field lines, shear definitions, and the division of responsibility between the model and the researcher. It also notes how such analytical solutions can be used to test numerical equilibrium solvers.
Introduction: Involving AI in Analytical Derivation
Analytical solution of partial differential equations has long depended on a researcher’s judgment about symmetries, special functions, and transformation techniques. As large language models improve in symbolic computation assistance and mathematical reasoning, some researchers have begun testing whether they can complete the full process from problem formalization to solution-family construction.
The case discussed here involves two rounds of interaction in which the model produced explicit solutions for three-dimensional MHD static equilibrium. In the first round, it obtained a solution family with a non-planar magnetic axis and constant rotational transform. In the second round, after follow-up questions, it obtained an extended family that introduces magnetic shear. This article focuses on two points: what the construction logic of these solutions is, and how readers can verify them.
Problem Setup
A three-dimensional equilibrium in a magnetic confinement device usually needs to satisfy the following conditions at the same time.
- Non-axisymmetry: Axisymmetry limits the degrees of freedom of the configuration and cannot cover part of the design space of stellarators and advanced tokamaks.
- Nested flux surfaces: Magnetic field lines lie on a family of concentric toroidal surfaces, so that plasma is confined within a finite volume.
- Rotational transform ι: This corresponds to the average poloidal deflection angle when a field line goes once around the toroidal direction. ι and the safety factor q are reciprocals, that is, ι = 1/q. When ι is rational, field lines close; when ι is irrational, field lines can cover the entire flux surface.
- Equilibrium equation: The magnetic field satisfies ∇·B = 0, and the Lorentz force balances the pressure gradient, that is, (∇×B)×B = μ₀∇p.
Traditional methods mostly rely on numerical iterative solution of generalized forms of the Grad–Shafranov equation, or on high-symmetry assumptions to simplify the problem. In this case, the model chose an explicit construction route.
First Solution Family: Non-Planar Magnetic Axis and Constant Rotational Transform
In the prompt, the researcher explicitly made two requirements: the solution must be non-axisymmetric, and the magnetic axis must not lie in a single plane. The model gave the following parameterization for the magnetic axis:
R(φ) = R₀ + ε a cos(kφ)Z(φ) = ε a sin(kφ)
where k is a nonzero integer and ε denotes the strength of non-axisymmetry. Because Z varies with φ, this magnetic axis is a non-planar curve. Flux surfaces are obtained by constructing nested torus-like offsets around the axis.
The key step in the model’s output is the introduction of “poloidal-angle renormalization”, which makes the rotational transform constant at ι = 2, that is, q = 1/2. Under this constraint, a field line completes exactly two poloidal turns per toroidal turn and closes.
The effect of closed field lines on confinement needs careful judgment. Flux surfaces with rational rotational transform may develop magnetic islands under perturbation, so confinement quality must be assessed numerically; it cannot be concluded from the analytical form alone. This solution family is more suitable as a benchmark for numerical solvers or for studying the closed structure of magnetic field lines.
Back-Substitution Checks
Whether an analytical solution holds must be checked term by term, manually or programmatically. The following steps are recommended.
- From the magnetic field components given by the solution, compute ∇·B; the result should be zero within computational precision.
- Compute ∇×B, then (∇×B)×B, compare it with μ₀∇p, and give the relative residual on a grid.
- Check whether B·∇p is zero, to confirm that pressure is a flux function.
- Check whether the Jacobian determinant of the flux-surface mapping keeps the same sign throughout the region, to confirm that flux surfaces are nested and do not cross.
- Trace field lines numerically, compute the rotational transform, and compare it with the analytical value ι = 2.
The acceptance thresholds for the residuals are set by the user according to accuracy requirements. The original interaction did not provide complete expressions for the magnetic field components and pressure, so the checks above cannot be completed in this article in place of the original work.
Second Solution Family: Introducing Magnetic Shear
The researcher then asked the model to construct a solution with a non-integer rotational transform that varies with flux surface. The model noted that the constant ι in the first family comes from rigid rotation of the poloidal angle. To obtain a varying ι, this constraint must be abandoned, and the approach must switch to a planar magnetic axis plus a radially varying rotational transform.
Magnetic axis position. The magnetic axis lies in the Z = 0 plane and is a planar curve. The ellipse equation (R − R₀)²/a² + Z²/b² = 1 that appeared in the original interaction does not describe the magnetic axis itself; it should be understood as the shape of a flux surface in the R-Z poloidal cross-section. This correction makes the geometric definition consistent with the equations.
Flux-surface family. Different flux surfaces are distinguished by a radial label ρ. The original interaction did not give how the semi-axes of the flux surfaces vary with ρ; this part must be completed before nestedness can be tested.
Rotational transform. The model sets
ι(ρ) = ι₀ + ι₁ρ²
where ι₀ and ι₁ are adjustable parameters. When ι₁ ≠ 0, the rotational transform varies with ρ, and the field-line winding differs among flux surfaces.
Magnetic shear. This article defines magnetic shear as dι/dρ, with ρ taken as a dimensionless value. Compared with the commonly used magnetic shear s, the sign and normalization conventions differ. If the effective minor radius r is used as the basis, the safety-factor shear is defined as s = (r/q)dq/dr. From ι = 1/q, one obtains s = −(r/ι)dι/dr. The convention used should be stated to avoid confusion.
Continuous-spectrum properties. Rational ι corresponds to closed field lines, and irrational ι corresponds to dense winding. It should be noted that finite-length numerical tracing cannot strictly distinguish the two. In a real plasma, the rotational transform is mainly determined by the current profile, so an analytical solution can only serve as a reference and cannot directly represent an actual configuration.
Judgment on the Role of AI
In this case, the model performed symbolic derivation and candidate-solution generation, including coordinate transformations, parameterization, and the form of the rotational transform. The researcher was responsible for imposing hard constraints, judging which constraints had to be abandoned, and deciding whether the solutions were usable.
The model’s output needs human validation. The model itself does not judge physical merits. For example, closed field lines with ι = 2 have an adverse effect on confinement quality; this judgment comes from the researcher’s understanding of fusion physics, not from the model’s output.
The process record also affects the reliability of the conclusions. This article does not include the original dialogue, model version, or prompts, so the process described here should be regarded as the author’s account, and readers need to review it independently.
Recommendations for Comparison with Numerical Solvers
The most direct use of analytical solutions is to test numerical solvers. For fixed-boundary equilibrium codes such as VMEC, such analytical solutions can serve as reference cases for solver verification.
