Vignesh Gopakumar
  • Home
  • Research
  • Talks
  • Blog

Known ceilings

Every deliberate shortcut the code currently takes, what it limits, and what would lift it. A ceiling is lifted, never deleted, so the history stays visible.

ID Component Shortcut Limit What lifts it Status
K-001 transport-solver dense linear solve for the tridiagonal system in the toy Tier A solver adequate to a few hundred cells; cost grows as n^3 tridiagonal (Thomas) scan open
K-002 coupling-loop dense Jacobian in the toy Newton solver (no band structure exploited) about 200x slower than Picard per step on the toy problem (C-004) banded Jacobian, once transport and pedestal models are confirmed local in radius open
K-003 coupling-loop fixed time step; no adaptive retry when a nonlinear step fails to converge up to 6 non-converged steps in the ITER hybrid ramp-up at dt <= 0.5 s; effect on stored energy 2e-5 relative (C-011) adaptive dt with retry (owner decision OQ-5, 1 Oct 2026: keep TORAX's line-search floor; stalls stay reported) open
K-004 equilibrium flux-surface cross-section area reconstructed as volume / (2 pi R_geo) with the centroid at the geometric centre (Pappus), since grid counting fails near a diverted boundary about 2% at mid-radius; the quantity is carried for export only, never used in the transport solve contour integration of each flux surface open
K-005 guard ensemble-spread check inactive (the current surrogate is a single network, not an ensemble); input-domain box, finiteness and output bounds are active no statistical uncertainty enters the guard decision yet ensemble surrogates (M3) and conformal calibration (M4) open
K-006 equilibrium the free-boundary equilibrium is solved standalone; it does not yet drive the transport loop no coupled free-boundary run exists feeding the equilibrium geometry into the transport solver, once a transport model valid for a spherical tokamak exists (M2/M3) open
K-007 imas-adapters exporting an equilibrium to IMAS assumes the toroidal-flux radius at the boundary equals the geometric minor radius, which is exact only for the circular toy geometry for shaped plasmas the exported rho_tor, dvolume_drho_tor and gm3 are scaled wrongly by rho_tor_b / a (C-030 for ITER, C-021 for MAST-U) and its square; found 2026-09-30 while writing the technical pages. Import is correct, the transport solve never uses these exported fields, and no published number depends on them carry rho_tor_b in the equilibrium state and use it in the export; test the exported boundary rho_tor against the source code's own value
Lifted 2026-09-30: Equilibrium.rho_tor_b (None means the circular case, where it equals a_minor); the analytic, transport-code and equilibrium-code backends each set it; regression test tests/unit/test_adapters_roundtrip.py::test_equilibrium_export_uses_toroidal_flux_radius exports a shaped case and round-trips it; independent checks against TORAX's and FreeGSNKE's own boundary flux radius (C-033). Commit 6b0845c, entry 7
lifted
K-008 guard the guard's normalised-gradient features use -R0 (du/drho_tor_norm) / (a u), not QLKNN's own input convention -R0 (du/dr_mid) / u with r_mid the midplane minor radius the two agree only for circular geometry; on the ITER hybrid scenario they differ by up to about a third at the edge (C-032). No published number is affected (open or arbitrary boxes so far), but a verified domain (M4) must be expressed in the surrogate's input space owner decision on the feature convention (OQ-10, deferred to M3), then features computed in the surrogate's own variables (or a documented map between the two) open
K-009 coupling-loop gradients through TORAX's Newton-Raphson solver are reverse mode only TORAX 1.4.3 differentiates its Newton solve implicitly (jax.lax.custom_root); reverse mode matches central differences (C-055), but forward mode (jax.jvp / jacfwd) returns NaN in every tangent, even through one step. Forward mode works with the linear solver. Matters for M5's linearised propagation, which the brief writes with jacfwd use reverse mode (jacrev) for Newton runs, or find and report the NaN upstream
Lifted 2026-10-01: Cause: custom_root's forward-mode rule differentiates the residual w.r.t. every closed-over constant with explicit zero tangents; TORAX's calculate_f_trap takes sqrt(epsilon) with epsilon = 0 on the axis face, so 0 * inf = NaN. tkit.physics.torax_patches replaces it (guarded by the upstream source hash) with a sqrt whose derivative at 0 is 0; values bit-identical; forward = reverse to 2e-15 (C-062). Commit 8aa70ee, entry 14
lifted
K-010 pedestal fixed pedestal (TORAX set_T_ped_n_ped), held at rho = 0.9 by an adaptive pinning source the pinning source removes 87-98% of the heating in the ITER hybrid ramp-up (C-038), and TORAX's P_SOL counts that power as crossing the edge. Accepted at the M1 physicist review for core profiles inside rho = 0.9; P_SOL and edge power accounting from these runs are not used a predictive pedestal model, revisited at M3 when the pedestal becomes a surrogate target open
K-011 fast-ions ASCOT5 alpha markers are taken as generated by tkit.physics.ascot_alpha the markers' birth power is 1.5% above AFSI's birth rate times 3.52 MeV. The marker weights sum to AFSI's rate exactly; the excess is the markers' mean birth energy, 3.573 MeV (C-063). Thermal motion of the reacting ions raises the mean alpha birth energy above 3.52 MeV; whether it accounts for all of the 1.5%, or AFSI's momentum binning adds to it, is not yet determined. Earlier estimates (1.3-1.4%) were 640-marker samples compare the mean birth energy with the D-T kinematics for TORAX's ion temperature, before ASCOT5 is used for neutral-beam ions (M1 physicist review, 1 Oct 2026) open
K-012 fast-ions ASCOT5 power-deposition moments on 50 equal-width rho_pol bins, interpolated onto TORAX's cells inside rho_tor_norm 0.3 the alpha heating profile is not resolved cell by cell: neighbouring cells of the 6400-marker run differ by up to 41% (ions), and its deviation from TORAX's local model there is no smaller than that of the 640-marker samples, so the scatter does not fall with marker count. Outside 0.3 every sample agrees with TORAX's model to 2-5% (NRMSD). Totals, the electron/ion split and the shape moments (C-064, C-065) are resolved a binning study (equal-volume bins near the axis, or a smoothed moment) before ASCOT5 profiles are used cell by cell in the core open
K-013 equilibrium FreeGSNKE's IMAS writer gives the flux-surface triangularity that TORAX reads (delta_face), on FreeGSNKE's default 65 x 129 grid inside rho_tor_norm about 0.6 the triangularity is grid noise: on the MAST-U-like reference the 65 x 129 and 129 x 257 grids give 0.194 and 0.028 at rho 0.1 and 0.012 and 0.073 at rho 0.4, and the profile is not monotonic. They agree within 0.01 from rho 0.7 out; elongation agrees within 0.01 everywhere. Any TORAX run on FreeGSNKE geometry with a shape-dependent transport model (TGLF) sees this noise. The M2 sampling ranges take delta and its shear from r/a >= 0.6 only a smooth Miller fit to FreeGSNKE's flux surfaces (or a finer grid checked for convergence) before TGLF-based transport runs on FreeGSNKE geometry open
K-014 guard inside TORAX, the fixed-step loop records the guard decision re-evaluated on each accepted end-of-step state the decisions TORAX's solver takes at its own transport evaluations (start of step and each nonlinear iterate) never reach its outputs, so the trace cannot say which model served each face during a step. It records a post-step domain diagnostic, rejected_fraction_poststep, not a fraction served by the fallback. With the guard always open or always closed (C-014, C-015) the two coincide; for a partial guard they can differ per-evaluation guard decisions returned from TORAX's solver (an upstream hook), or tkit's own iteration around TORAX's transport call, before a fallback fraction is reported for a partial guard (code review 2 Oct 2026, R11) open
K-015 transport TGLF runs as a TORAX transport model (in-process wrapper) with TORAX's legacy TGLF defaults and no transport radial domain on TORAX's iterhybrid_predictor_corrector case the first step fails (job 2293936): TGLF gives NaN fluxes on the axis face and about 1e6 gyro-Bohm units on the edge face, and TGLF then stops on a zero impurity charge, most likely from the diverged step (TORAX's neon charge follows T_e). TORAX's own TGLF transport-model tests pass on the same node, and every single-face TGLF call outside TORAX runs a transport domain excluding the axis and the pedestal (as the QLKNN setup has), then a short TORAX run with TGLF, before TGLF-in-TORAX spot checks at M3/M4 open
K-016 datasets the ITER dataset (v1) takes its geometry from one plasma shape, TORAX's ITER hybrid equilibrium, plus the q profiles of TORAX's ITER current ramp-up example elongation and triangularity rows are narrow (LCFS kappa 1.87, delta 0.43); the 15 MA baseline scenario (q95 about 3) is not covered. The ramp-up widens q and magnetic shear only (owner, OQ-16 b) baseline-scenario equilibria, from EQDSK files of the ITER scenario database or from FreeGSNKE's ITER-like machine with inverse solves, before an ITER v2 dataset open
K-017 datasets points are rejected above a fixed alpha_MHD (MAST-U 4, ITER 2), independent of the magnetic shear about half the Latin-hypercube draws are rejected and the kept set is reshaped: kept beta_e mean 23-25% below the box mean, kept q concentrated at low q since alpha_MHD grows as q^2 (C-073). An s-alpha ballooning boundary depends on the shear, which a fixed cap ignores (owner, OQ-16 c: fixed caps for v1) a shear-dependent cap (s-alpha boundary times a margin) set by the physicist, or sampling alpha_MHD in place of beta_e open
K-018 datasets geometry inputs are sampled independently, each over a range derived from the measured equilibria, not jointly from the measured flux surfaces the datasets contain combinations that no measured equilibrium has, for example high q at low magnetic shear on MAST-U (figure in the datasets section); 63-94% of points lie inside the measured 1st-99th percentile envelope input by input (C-076), fewer jointly joint sampling from the measured faces (a draw of face plus a perturbation), or a weighting of the training loss by distance to the measured set, decided before M3 training open
K-019 datasets the v1 datasets are stored with every TGLF output as computed; no filter on flux magnitude 28% of MAST-U cases and 10% of ITER cases have Q_e + Q_i above 10^4 gyro-Bohm units (C-075), mostly at steep electron temperature gradients. Not yet established whether these are physical (far above threshold, electromagnetic modes at high beta_e) or come from the inputs as constructed a check of a sample of the high-flux cases with the electromagnetic terms off and against CGYRO spot checks, and a physicist decision on a flux range or loss weighting, before M3 training open

© Copyright 2026 Vignesh Gopakumar

 
 
Code and first draft by Claude (Anthropic), working to a brief by Vignesh Gopakumar, who reviewed and approved this page. How this is built · Tokamak Toolkit home