Technical internals
Organised by component, revised in place. Written for someone who would re-implement or audit it.
The bar for these pages: a competent reader should be able to re-implement any component from its section and expect to reproduce the published numbers to the stated tolerance. Where a section falls short of that, it says what is missing.
Notation correction: the conversion from IMAS gm3 to \(G\) below uses division by \(\rho_{t,b}^2\). The earlier table said multiplication. See the erratum.
Code excerpts are real, at most 15 lines, and labelled with their file and the commit they were copied from. The Python package is called tkit. Every number links to its row in the claims register; deliberate shortcuts are listed under known ceilings.
The strict physical-residual and continuous-closure protocol now passes the complete ensemble (all 33 original cases reach five seconds at all three maximum-step settings: 99 of 99 valid trajectories and 264 of 264 passing endpoint comparisonsC-305, the largest changes are 0.219% for coarse-to-middle and 0.0423% for middle-to-fine, both below the 1% acceptance limitC-306).
Sections
For a first pass, read core state, coupling loop, then guard and fallback. These explain what moves through the simulation and when a learned response is used. Use the routes below for a specific question.
| Reading goal | Route | Distinction to keep in mind |
|---|---|---|
| Reconstruct a time step | Transport solver, coupling loop, backends | The toy core and TORAX have separate solver paths. |
| Understand learned physics | Datasets, surrogates, guard | Held-out accuracy does not establish coupled trajectory accuracy. |
| Assess the evidence | Verification, solver protocol, uncertainty | Proofs, numerical convergence and uncertainty coverage answer different questions. |
| Trace a reported result | Provenance, tests, claims register | A retained result applies to its recorded model, settings and source revision. |
| Follow edge-stability work | JOREK | This is an offline study, with its own convergence limits. |
The interactive modelling explorer describes the landing-page map, its graduate-level physics panels and the provenance of its visual evidence.
In roughly the order you would build the system:
Invariants and environment: precision, units, coordinates, purity, the open/gated split and how each rule is enforced; versions and build notes.
Core state and interfaces: the data structures, the model contract, input domains and features.
Transport solver: the implicit finite-volume step.
Coupling loop: the fixed point per time step, Newton and Picard, the corrector solve, and the fixed-step driver over TORAX.
Backends: TORAX, FreeGSNKE, ASCOT5, Aurora.
Physics models: the analytic Tier A models and the Gaussian RF source.
Guard and fallback: the per-point decision, in the core loop and inside TORAX.
IMAS adapters: mapping tables and conversions.
Tests: what each category proves, with counts.
Datasets: TGLF, the sampling space per machine, the version 1 datasets and their domain against the measured equilibria.
Surrogates: the baseline ensembles, the recreated TGLF-NN network, output scaling, learning curves, active learning round 1, and the heat-flux sign; later sections record M3 closure and M4 feedback work.
Verification: checked exports, property contracts and saved-run closed-loop comparison. The scoped certification and the unresolved properties are recorded separately.
Uncertainty propagation: actual ITER prior propagation, linearisation cross-check, sensitivity and conditional reference-label calibration; physical validation limits.
Physical-residual solves and ensemble convergence: strict Newton trials, continuous closure, full rollback, acceptance gates and the complete ensemble result.
Notation
| symbol | meaning | unit |
|---|---|---|
| \(\rho\) | normalised toroidal-flux radius, rho_tor_norm, 0 on axis, 1 at the boundary |
– |
| \(\rho_{t,b}\) | toroidal-flux radius at the boundary, \(\sqrt{\Phi_b/(\pi B_0)}\) | m |
| \(a\) | geometric minor radius (half-width of the boundary) | m |
| \(R_0\) | major radius | m |
| \(B_0\) | vacuum toroidal field at \(R_0\) | T |
| \(T_e, T_i\) | electron and ion temperature | eV |
| \(n_e\) | electron density | m⁻³ |
| \(V\), \(V' = \partial V/\partial\rho\) | enclosed volume and its derivative with respect to \(\rho\) | m³ |
| \(G = \langle\lvert\nabla\rho\rvert^2\rangle\) | flux-surface average (IMAS gm3 divided by \(\rho_{t,b}^2\)) |
m⁻² |
| \(\chi_e, \chi_i\) | heat diffusivities | m² s⁻¹ |
| \(D_e\), \(v_e\) | particle diffusivity, pinch velocity (negative inward) | m² s⁻¹, m s⁻¹ |
| \(q_e, q_i\), \(s_n\) | heating densities, particle source | W m⁻³, m⁻³ s⁻¹ |
| \(\psi\) | poloidal flux (COCOS 11, as in IMAS) | Wb |
| \(R/L_u\) | normalised gradient \(-R_0\,(\partial u/\partial\rho)/(a\,u)\) | – |
| \(e\) | elementary charge; converts eV to J | C |
Profiles and sources live on \(n\) cell centres; transport coefficients live on the \(n+1\) cell faces, with face 0 on the axis and face \(n\) at the boundary.