1. 3D Axis, Helix & Knot Parameters Near-Axis & Boundary
Field Periods $N_{\text{fp}}$ (Discrete Symmetry) 5
Rotational Transform $\iota_0 = d\theta / d\phi$ 0.94
Helical Axis Excursion $R_{0,1}, Z_{0,1}$ (Writhe) 0.18
Rotating Elongation $\bar{\eta} \sim R_{1,1}$ (Ellipse) 0.38
Bean / Triangularity $R_{2,1}$ (Magnetic Well) 0.28
2. Microturbulence & Gradient Drivers ITG / TEM / Max-J
Ion Temp Gradient $a / L_{T_i} = -a \nabla \ln T_i$ (ITG Drive) 2.2
Density Peaking $a / L_n = -a \nabla \ln n$ (ITG Stabilizer) 1.8
Radial Magnetic Well $\partial_\psi B$ (Max-$J$ Control) +0.25
3. Custom Function Expressions Live JS Math Eval

Enter custom periodic functions of toroidal angle phi and poloidal angle theta (using sin, cos, N, iota, axis, elong, tri):

3D Stellarator Surface, Coils & Field-Line Knot (Drag to Rotate) Rational Approximant
Good Curvature ($\kappa_n > 0$) Bad Curvature / ITG Drive ($\kappa_n < 0$) Modular Coils $\gamma_k$ Magnetic Axis $\gamma_0$
Poloidal Cross-Sections $\phi = 0, \frac{\pi}{2N}, \frac{\pi}{N}$ $\det(D\Phi) > 0$
Field Line $|B(l)|$, Trapped Wells & Bad-Curvature Drive Max-J Check
Field-Line Topology
--
Torus Knot $(p, q)$ / Orbit
Axis Curvature & Writhe
--
Călugăreanu $\mathrm{Wr}(\gamma_0)$
Bounce Action $\partial_\psi \mathcal{J}_\parallel$ (TEM)
--
Maximum-$J$ Criterion
ITG Parameter $\eta_i = L_n / L_{T_i}$
--
Critical Threshold $\eta_{\text{crit}} \approx 1.25$
Available Energy $\widehat{\mathcal{A}}$ (Æ)
--
Helander–Mackenbach Bound

1. 3D Toroidal Helix vs. Torus Knot & Călugăreanu Theorem

Closing a helix into a torus breaks continuous Euclidean symmetry. The magnetic axis $\gamma_0 : S^1 \to \mathbb{R}^3$ generates on-axis rotational transform $\iota_0$ via its spatial Writhe and cross-section rotation $\delta(s)$:

$$\iota_0 = \mathrm{Wr}(\gamma_0) + \frac{1}{2\pi}\oint \left(\frac{d\delta}{ds} - \tau(s)\right)ds, \qquad \theta(\phi) = \iota(\psi)\phi$$

When $\iota = n/m \in \mathbb{Q}$, closed field lines form $(m, n)$-torus knots (resonant island chains); irrational Diophantine $\iota$ yields dense KAM flux surfaces.

2. Double Fourier Boundary & Near-Axis Parameters

Each flux surface $\Sigma_s \cong T^2$ is parameterized by Fourier modes $(R_{m,n}, Z_{m,n})$ with $N_{\text{fp}}$-fold dihedral stellarator symmetry:

$$R(\theta,\phi) = R_{0,0} + \Delta R_{\text{axis}}(\phi) + a\big(1 + \bar{\eta}\cos(\theta - N_{\text{fp}}\phi) + R_{2,1}\cos(2\theta - N_{\text{fp}}\phi)\big)\cos\theta$$

Positive bean/triangularity $R_{2,1} > 0$ indents the cross-section on the inboard side, creating a stabilizing magnetic well ($\partial_\psi B > 0$) and preserving $\det(D\Phi) > 0$.

3. Bad Curvature, Maximum-$J$ & Microturbulence ($\widehat{\mathcal{A}}$)

Bad Conditions (Red on 3D Torus): Where normal curvature $\kappa_n < 0$ ($\nabla B$ parallel to $\nabla p$) overlaps trapped-particle wells ($|B|$ minima) and steep $\nabla T_i$ ($\eta_i = L_n/L_{T_i} > \eta_{\text{crit}}$), ITG & TEM streamers erupt:

$$\frac{\partial \mathcal{J}_\parallel}{\partial \psi} = -\frac{mv\lambda}{2}\int_{l_-}^{l_+} \frac{\partial_\psi B \, dl}{\sqrt{1-\lambda B}} < 0 \implies \widehat{\mathcal{A}} = \iint \Theta\!\big(\hat{\omega}_*(\hat{\omega}_* - \hat{\omega}_\alpha)\big)\,d\lambda\,dz \to \text{min}$$

Try clicking "⚠️ Unoptimized Bad-Curvature" above to see trapped wells align with bad curvature ($\partial_\psi \mathcal{J}_\parallel > 0$), causing Available Energy $\widehat{\mathcal{A}}$ to spike!