From the Lorentz Force & Toroidal Foliations to Torus Knots, Quasisymmetry, and the Perils of Classical & Microturbulent Transport
Illustrative / schematic: the animations and formulas here are teaching sketches, not outputs of PlasmaLean. For what is actually proved in Lean, see the implementation plan and the stellarator contract slide below.
Why a simple toroidal solenoid fails catastrophically via $\nabla B$ drift, and why field lines must twist ($\iota \neq 0$).
Why a stellarator is a closed toroidal helix (Călugăreanu writhe), when field lines form $(m,n)$-torus knots, and what parameters shape it.
Magnetic islands (KAM breakdown), Neoclassical $1/\nu$ banana losses, Microturbulence (ITG/TEM), and Coil Manufacturing Tolerances.
A particle of mass $m$, charge $q$ in a magnetic field $\mathbf{B}$ obeys $m\dot{\mathbf{v}} = q(\mathbf{E} + \mathbf{v} \times \mathbf{B})$. To lowest order, it gyrates around a field line at cyclotron frequency $\Omega = qB/m$ with Larmor radius $\rho = v_\perp / \Omega$, conserving magnetic moment $\mu = \frac{m v_\perp^2}{2B}$.
By the Poincaré–Hopf theorem, a closed orientable surface carrying a nowhere-vanishing tangent field has Euler characteristic $0$, so it is a torus $T^2$ (a sphere is excluded by the hairy ball theorem). But bending a solenoid into a torus of major radius $R$ forces $B \propto 1/R$ (by Ampère's Law $\oint \mathbf{B}\cdot d\mathbf{l} = \mu_0 I_{\text{tf}}$). This gradient & curvature drive a cross-field drift:
Helical twist alternates particle position between top and bottom, canceling net vertical drift.
Viewing the plasma macroscopically as a conducting fluid with pressure $p(x)$, current density $\mathbf{J}(x)$, and magnetic field $\mathbf{B}(x)$, static equilibrium requires:
Taking the inner product with $\mathbf{B}$ and $\mathbf{J}$ immediately yields two geometric orthogonality laws:
Label the nested flux surfaces by toroidal magnetic flux $\psi$. On each torus $\Sigma_\psi \cong S^1_\theta \times S^1_\phi$, the solenoidal field $\mathbf{B}$ defines a volume-preserving flow.
How do we generate $\iota(\psi) \neq 0$?
An axisymmetric current-free field has $\iota = 0$: its field lines do not rotate poloidally, so it confines nothing. A tokamak therefore needs a large toroidal plasma current, which brings kinks, tearing, disruptions and continuous current drive. A stellarator obtains $\iota$ from 3-D shaping of the external field instead.
Non-axisymmetry is a consequence, not a goal: a current-free field with $\iota > 0$ cannot be axisymmetric. What matters is the extra properties below, on one candidate with common witnesses.
Full statement: implementation plan, "The stellarator contract".
PlasmaLean status (30 October 2026): C1 + C4 only in vacuum, on one KAM-certified torus of an exact rational field (RationalStellarator.field_vacuum, rationalStellarator_confined_forever_exists); C2 is not yet defined in Lean.
By the Călugăreanu–White–Fuller Theorem, the self-linking of a ribbon around the magnetic axis $\gamma_0$ decomposes into geometric Writhe and frame Twist:
In straight-field-line (Boozer) coordinates $(\psi, \theta, \phi)$, the magnetic field 2-form is $\omega_B = d\psi \wedge (d\theta - \iota(\psi)d\phi)$, so field lines satisfy the linear flow:
Left: 3D Field Line on Torus · Right: Poloidal Poincaré Section $(\psi, \theta)$
In numerical optimizers, a stellarator's 3D geometry is commonly specified in three complementary ways (schematic summary):
Build outward from the magnetic axis $\gamma_0(s)$ in powers of $r = \sqrt{\psi}$:
Double Fourier series on $T^2$:
External Biot–Savart hardware curves $\gamma_k : S^1 \to \mathbb{R}^3$:
1. Quasisymmetry (Boozer, Nührenberg & Zille): Even though the 3D surface is non-axisymmetric in $\mathbb{R}^3$, sculpt the geometry so the field magnitude $|B(\psi,\theta_B,\phi_B)|$ in Boozer coordinates depends only on a single helical combination:
By Noether's theorem on guiding-center symplectic phase space, this hidden symmetry restores an exact conserved helical momentum $P_{\text{hel}}$, completely eliminating $1/\nu$ losses!
2. Omnigeneity (the general condition): the bounce-averaged radial drift of every trapped particle vanishes, $\langle \dot{\psi} \rangle_{\text{bounce}} = 0$ (equivalently $\partial_\alpha \mathcal{J}_\parallel = 0$ for the second adiabatic invariant). Quasisymmetry is one special case; quasi-isodynamic fields (the W7-X line), in which the $|B|$ contours close poloidally, are another. An axisymmetric field is automatically omnigenous; a generic 3-D field is not.
In Wendelstein 7-X, once 3D optimization suppressed neoclassical $1/\nu$ transport, radial heat loss was dominated by microturbulence—small-scale ($\sim \rho_i$) drift-wave instabilities driven by steep temperature and density gradients ($\nabla T_i, \nabla T_e, \nabla n$):
Sheared zonal flows and favorable bounce precession ($\partial_\psi \mathcal{J}_\parallel < 0$) suppress radial eddies.
The longitudinal second adiabatic bounce invariant for particles trapped between mirror points $l_\pm$ is:
Trapped particles precess toroidally at rate $\Delta\alpha = -\frac{1}{q}\frac{\partial \mathcal{J}_\parallel}{\partial \psi}$, where:
How much thermal free energy can a 3D magnetic geometry possibly release into turbulence while conserving phase-space volume and adiabatic invariants $(\mu, \mathcal{J}_\parallel)$?
Interactive Jacobian Univalence Test: Drag slider to over-shape $R_{2,1}$ and watch nested flux surfaces fold ($\det D\Phi \le 0$):
Shaping amplitude = 0.28 · ✓ Univalent Foliation ($\det D\Phi > 0$ everywhere)
stellarator-explorer.htmlThe explorer is an illustrative toy model: its formulas are schematic JavaScript, not computed or certified by PlasmaLean.
In Panel 3 of the explorer, you can type live mathematical expressions in phi, theta, and s:
0.28 * cos(2 * phi)iota - 0.25 * s + 0.35 * s * s1 - 0.22 * cos(theta - N * phi)1 - 0.25 * cos(theta) - 0.20 * cos(N * phi)You now have the complete geometric, topological, and physical toolkit. Click below to open the interactive laboratory, rotate the 3D magnetic bottle, test custom Fourier & field-line functions, and inspect the bad-curvature microturbulence zones in real time.
🚀 Open Stellarator & Microturbulence Explorer →Dictionary mapping Stellarator Physics $\leftrightarrow$ Pure Geometry $\leftrightarrow$ Lean 4 Kernel Contracts.
Inspect the small Lean 4 verification kernel and non-vacuity sanity checks.
6 self-contained Lean 4 challenge files in Topology, Diff. Geometry & Complex Analysis.