You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Generalize VAFT's current confinement-scaling support into a machine-independent architecture for database-derived empirical scaling laws, operational boundaries, and reduced predictive relations used across tokamak physics.
The scope is broader than energy confinement. Representative targets include:
energy confinement time;
L–H transition power threshold;
minimum L–H transition density;
Greenwald and modern density-limit relations;
separatrix density;
SOL heat-flux width;
divertor / ELM heat-load scalings;
pedestal empirical relations;
reduced operational-space boundaries;
detachment-related empirical relations;
other multi-machine database-derived physics relations.
The main goal is not to add many formulas at once. It is to establish a scientific API contract that allows physically different empirical relations to be represented, discovered, evaluated, and later applied to ODS/IDS data without embedding machine-specific assumptions in the formulas themselves.
1. Motivation: empirical scaling is not only a confinement problem
VAFT currently represents confinement scalings through a shared coefficient table and a common evaluator, conceptually:
_SCALING_COEFS
-> confinement_time_from_engineering_parameters(...)
-> OMAS wrapper extracts engineering parameters
This works reasonably well for a small family of confinement laws such as ITER89P, IPB98(y,2), NSTX scalings, and ST multi-machine scalings.
However, tokamak empirical physics spans a much wider set of quantities:
global confinement
tau_E
regime transition
P_LH
n_e,min for the L-H transition
operational limits
n_G
modern density-limit boundaries
beta_N-related reference limits
edge / pedestal
n_e,sep
pedestal width / height relations
SOL / exhaust
lambda_q
divertor heat load
transients
ELM energy / parallel fluence
operational-space classification
SepOS-type boundaries
These relations are all empirical or reduced-order in a broad sense, but their predictor semantics differ substantially.
For example, these are not interchangeable quantities:
Therefore, extending the current confinement coefficient dictionary into a universal empirical-scaling registry would eventually obscure rather than clarify the physical contract.
The new architecture should preserve VAFT's established layer boundaries:
vaft.machine_mapping
machine-specific source, hardware, calibration, geometry and shot-era policy
vaft.formula
pure machine-independent physical / numerical formulas
vaft.process
reusable scientific processing, fitting and inference
vaft.omas / vaft.imas
ODS/IDS-aware extraction and schema-facing adapters
vaft.validation
scientific applicability / validity assessment
Do not introduce a new top-level vaft.physics package unless a later architecture decision independently justifies it.
2. Representative scaling laws
The following examples are not all required in the first PR. They define the design envelope: the API should be able to represent these different physical signatures without forcing them into one universal vector of generic engineering parameters.
2.1 L–H transition power — Martin 2008
A widely used ITPA multi-machine L–H transition threshold scaling is
because the signature itself documents which density, magnetic field and geometric quantity the model expects.
The Martin scaling also has regime/configuration applicability assumptions and is normally interpreted on the high-density branch. This already motivates separating:
numerical formula evaluation
from
validity / applicability assessment
Reference:
Y. R. Martin et al., Power requirement for accessing the H-mode in ITER, Journal of Physics: Conference Series 123 (2008).
P_LH / S : transition power per plasma surface area
B_t : toroidal magnetic field
n_e_bar : line-averaged electron density
M_eff : effective ion mass
D : divertor-configuration factor
This predicts the same broad target as Martin 2008 but requires a different physical signature, including isotope mass and a categorical/configuration factor.
The API should therefore naturally allow distinct public functions such as
These models demonstrate why semantic input names matter even within confinement physics:
p_loss
p_l_th
p_abs
p_heat
are not automatically equivalent, and
kappa_boundary
kappa_area
need not represent the same shape definition.
Long term, confinement relations should follow the same explicit semantic contract as the new empirical-model families rather than relying only on a shared coefficient dictionary.
References:
ITER Physics Basis / IPB98(y,2).
G. Verdoolaege et al., updated ITPA H-mode energy-confinement scaling, 2021.
2.5 Greenwald density limit
The Greenwald relation is a simple but important operational reference:
VAFT already provides Greenwald-related Formula functions, making this a useful existing reference for the generalized architecture.
The API must preserve the physical definition of the comparison density. n_e_line_avg should not silently become n_e_volume_avg merely because both have density units.
2.6 Modern density-limit boundaries
Modern multi-machine work has proposed operational boundaries that go beyond a simple Greenwald fraction.
For example, an L-mode multi-machine analysis reports an edge-collisionality / beta boundary of the approximate form
$$
\nu_{\mathrm{limit}} = 3.5,\beta^{-0.40}.
$$
This kind of model is better interpreted as an operational boundary or classifier than as a scalar engineering prediction.
The architecture should therefore eventually support both:
predicted=model(...)
and higher-level constructions such as
margin=observed-boundary(...)
without forcing every empirical model into one identical user-facing abstraction.
2.7 SOL heat-flux width — Eich 2013
One of the most important multi-machine H-mode SOL relations is
$$
\lambda_q^{H\text{-mode}}[\mathrm{mm}]
0.63,
B_{\mathrm{pol,OMP}}^{-1.19}.
$$
The predictor is specifically the outboard-midplane poloidal magnetic field.
This is a strong example of why a generic B argument is insufficient:
b_t_axis
b_t_ref
b_pol_omp
are physically different quantities.
A natural Formula API is
heat_flux_width_eich_2013(
b_pol_omp,
)
This model is particularly attractive for VAFT because the workflow can eventually be
equilibrium
-> B_pol at OMP
-> Eich lambda_q
The underlying database also included spherical tokamak data such as NSTX and MAST, making it a useful architecture test for both conventional and low-aspect-ratio machines.
Reference:
T. Eich et al., Scaling of the tokamak near the scrape-off layer H-mode power width and implications for ITER, Nuclear Fusion 53 (2013) 093031.
2.8 H-mode separatrix density
Separatrix electron density connects pedestal, SOL, detachment, and confinement physics.
Recent multi-machine work across C-Mod, ASDEX Upgrade, and JET considers relations of the form
which are very different from confinement or L–H threshold predictors.
This is also an important applicability example: a relation trained mainly on conventional-aspect-ratio C-Mod/AUG/JET data may be mathematically evaluable for MAST-U or VEST while still being out of the original regression domain.
Therefore the architecture must distinguish
numerically evaluable
from
supported by the original database domain
Reference:
Silvagni et al., A predictive formula for the H-mode electron separatrix density: Bridging regression and physics-based models across C-Mod, AUG and JET tokamaks, 2026 preprint / submitted work.
Before implementation, confirm the final publication status and coefficients.
2.9 ELM parallel energy fluence
Transient ELM heat loading also has multi-machine empirical relations.
A representative JET / MAST / ASDEX Upgrade relation is
and database / regime information, but the implementation should avoid creating a second source of truth unless the existing Formula contract genuinely cannot express the required metadata.
8. Organize Formula modules by physics domain
Do not create one large scaling.py containing unrelated empirical models.
Prefer flat physics-domain modules consistent with the current Formula architecture:
published formula signature
↓
required canonical physical quantities
↓
ODS/IDS resolvers
↓
pure Formula API
↓
prediction
The first implementation does not need to complete this adapter, but the Formula API must be designed so that the adapter can later be added without changing model semantics.
10. ODS resolution should be based on physical semantics
A future resolver may map canonical semantic names to ODS extraction logic, conceptually:
If a published model requires a physical quantity that is unavailable, the resolver should report it as missing rather than inventing a machine-specific approximation.
12. Do not silently substitute physically different predictors
The resolver must distinguish physically different measurements and derived quantities.
Examples:
measured interferometer line-average density
profile-derived midplane line-average density
volume-averaged density
pedestal density
separatrix density
Likewise:
p_abs
p_loss
p_net
p_transport
p_sol
Recommended policy:
1. exact requested physical definition exists
-> use it
2. formally equivalent derivation exists
-> derive it and retain provenance
3. only a physically different proxy exists
-> do not silently substitute
Explicit caller overrides may later be supported, but they must remain explicit and provenance-aware.
13. Preserve input provenance
ODS-aware scaling evaluation should eventually retain not only predictor values but also their provenance.
Do not mix newly fitted VEST-specific coefficients into the generic published-model registry unless they are intentionally promoted into a separately documented empirical model with explicit provenance and applicability.
16. Support the same model across machines and datasets
The long-term target is that the same pure Formula function can be evaluated from
VEST ODS
MAST-U ODS
KSTAR ODS
ITER / reactor design point
multi-machine DataFrame
published database row
user-supplied scalar inputs
without changing the model implementation.
The central interface should therefore be
canonical semantic physical variables
↓
Formula model
rather than machine-specific wrappers.
17. Initial implementation set
The first implementation should deliberately use models with different physical signatures.
Recommended minimum:
Transition
Martin 2008 L-H threshold
Exhaust
Eich 2013 H-mode lambda_q
Edge
one qualified H-mode n_e,sep relation
Existing:
Greenwald density
can serve as an operational-limit reference.
Optional additional model:
ITPA20 confinement
This set exercises, at minimum:
line-average density
surface area
toroidal field
OMP poloidal field
SOL power
divertor pressure
machine geometry
and is therefore a meaningful test of whether the abstraction is genuinely general.
Proposed implementation phases
Phase 1 — Formula API contract
define canonical semantic predictor naming;
add formula.transition;
add formula.edge;
add formula.exhaust;
implement a small representative literature-model set;
integrate the new functions with the existing Formula catalog;
document original unit conventions, databases, validity and references;
add published-value regression tests.
Do not add generic ODS auto-resolution in this phase.
Phase 2 — ODS/IDS model evaluation
Add generic input resolution and provenance-aware evaluation, conceptually:
Any later scaling regression/inference implementation should follow the final vaft.process ownership rules rather than expanding miscellaneous statistical modules.
Adding a new published relation should primarily require:
1. identify the exact physical predictor definitions;
2. implement the pure numerical relation;
3. document the original database, units, assumptions and validity;
4. add published-reference tests;
5. optionally connect the semantic predictors to generic ODS/IDS resolvers.
It should not require a new machine-specific scaling workflow.
Summary
Generalize VAFT's current confinement-scaling support into a machine-independent architecture for database-derived empirical scaling laws, operational boundaries, and reduced predictive relations used across tokamak physics.
The scope is broader than energy confinement. Representative targets include:
The main goal is not to add many formulas at once. It is to establish a scientific API contract that allows physically different empirical relations to be represented, discovered, evaluated, and later applied to ODS/IDS data without embedding machine-specific assumptions in the formulas themselves.
1. Motivation: empirical scaling is not only a confinement problem
VAFT currently represents confinement scalings through a shared coefficient table and a common evaluator, conceptually:
This works reasonably well for a small family of confinement laws such as ITER89P, IPB98(y,2), NSTX scalings, and ST multi-machine scalings.
However, tokamak empirical physics spans a much wider set of quantities:
These relations are all empirical or reduced-order in a broad sense, but their predictor semantics differ substantially.
For example, these are not interchangeable quantities:
Therefore, extending the current confinement coefficient dictionary into a universal empirical-scaling registry would eventually obscure rather than clarify the physical contract.
The new architecture should preserve VAFT's established layer boundaries:
Do not introduce a new top-level
vaft.physicspackage unless a later architecture decision independently justifies it.2. Representative scaling laws
The following examples are not all required in the first PR. They define the design envelope: the API should be able to represent these different physical signatures without forcing them into one universal vector of generic engineering parameters.
2.1 L–H transition power — Martin 2008
A widely used ITPA multi-machine L–H transition threshold scaling is
$$
P_{L-H}^{2008},[\mathrm{MW}]
0.0488,
\bar n_e^{0.717}
B_t^{0.803}
S^{0.941},
$$
with approximately
A natural Formula API is therefore closer to
than to
because the signature itself documents which density, magnetic field and geometric quantity the model expects.
The Martin scaling also has regime/configuration applicability assumptions and is normally interpreted on the high-density branch. This already motivates separating:
from
Reference:
2.2 Updated metallic-wall L–H threshold — ITPA TC-26 / Delabie 2026
A recent metallic-wall multi-machine regression gives a relation of the form
$$
\frac{P_{L-H}}{S}
0.0441,
B_t^{0.580}
\bar n_e^{1.08}
\frac{2}{M_{\mathrm{eff}}^{0.975}}
D,
$$
where, schematically,
This predicts the same broad target as Martin 2008 but requires a different physical signature, including isotope mass and a categorical/configuration factor.
The API should therefore naturally allow distinct public functions such as
rather than hiding materially different physical models behind one undifferentiated argument set.
Reference:
2.3 Minimum density for the L–H transition
The L–H threshold is non-monotonic with density, with a low-density branch where the threshold rises again.
One semi-empirical minimum-density relation has the form
This is useful not merely as another density predictor, but as a guard on which density branch is being used for a threshold law.
A future analysis should be able to compose independent empirical relations explicitly:
Do not hide one empirical relation inside another unless that composition is itself the published model.
2.4 Energy confinement — IPB98(y,2), ITPA20, and ST scalings
Confinement remains an important reference family.
IPB98(y,2) has the familiar structure
$$
\tau_E
C,
I_p^{0.93}
B_t^{0.15}
\bar n_e^{0.41}
P^{-0.69}
R^{1.97}
\epsilon^{0.58}
\kappa^{0.78}
M^{0.19}.
$$
A more recent ITPA20 engineering scaling is approximately
$$
\tau_{E,\mathrm{th}}
0.053,
I_p^{0.98}
B_t^{0.22}
\bar n_e^{0.24}
P_{l,\mathrm{th}}^{-0.669}
R_{\mathrm{geo}}^{1.71}
(1+\delta)^{0.36}
\kappa_a^{0.80}
\epsilon^{0.35}
M_{\mathrm{eff}}^{0.20}.
$$
These models demonstrate why semantic input names matter even within confinement physics:
are not automatically equivalent, and
need not represent the same shape definition.
Long term, confinement relations should follow the same explicit semantic contract as the new empirical-model families rather than relying only on a shared coefficient dictionary.
References:
2.5 Greenwald density limit
The Greenwald relation is a simple but important operational reference:
$$
n_G[10^{20},\mathrm{m^{-3}}]
\frac{I_p[\mathrm{MA}]}{\pi a^2[\mathrm{m^2}]},
$$
with
VAFT already provides Greenwald-related Formula functions, making this a useful existing reference for the generalized architecture.
The API must preserve the physical definition of the comparison density.
n_e_line_avgshould not silently becomen_e_volume_avgmerely because both have density units.2.6 Modern density-limit boundaries
Modern multi-machine work has proposed operational boundaries that go beyond a simple Greenwald fraction.
For example, an L-mode multi-machine analysis reports an edge-collisionality / beta boundary of the approximate form
This kind of model is better interpreted as an operational boundary or classifier than as a scalar engineering prediction.
The architecture should therefore eventually support both:
and higher-level constructions such as
without forcing every empirical model into one identical user-facing abstraction.
2.7 SOL heat-flux width — Eich 2013
One of the most important multi-machine H-mode SOL relations is
$$
\lambda_q^{H\text{-mode}}[\mathrm{mm}]
0.63,
B_{\mathrm{pol,OMP}}^{-1.19}.
$$
The predictor is specifically the outboard-midplane poloidal magnetic field.
This is a strong example of why a generic
Bargument is insufficient:are physically different quantities.
A natural Formula API is
This model is particularly attractive for VAFT because the workflow can eventually be
The underlying database also included spherical tokamak data such as NSTX and MAST, making it a useful architecture test for both conventional and low-aspect-ratio machines.
Reference:
2.8 H-mode separatrix density
Separatrix electron density connects pedestal, SOL, detachment, and confinement physics.
Recent multi-machine work across C-Mod, ASDEX Upgrade, and JET considers relations of the form
$$
n_{e,\mathrm{sep}}
C_{\mathrm{dev}}
p_{0,\mathrm{div}}^{\alpha_p}
I_p^{\alpha_I}
B_t^{\alpha_B}
\left(\frac{P_{\mathrm{SOL}}}{R_{\mathrm{geo}}}\right)^{\alpha_{P/R}}
a_{\mathrm{geo}}^{\alpha_a}.
$$
Representative input semantics include
which are very different from confinement or L–H threshold predictors.
This is also an important applicability example: a relation trained mainly on conventional-aspect-ratio C-Mod/AUG/JET data may be mathematically evaluable for MAST-U or VEST while still being out of the original regression domain.
Therefore the architecture must distinguish
from
Reference:
Before implementation, confirm the final publication status and coefficients.
2.9 ELM parallel energy fluence
Transient ELM heat loading also has multi-machine empirical relations.
A representative JET / MAST / ASDEX Upgrade relation is
$$
\epsilon_{\parallel,\mathrm{ELM}}
0.28,
n_{e,\mathrm{ped}}^{0.75}
T_{e,\mathrm{ped}}^{0.98}
(\Delta E_{\mathrm{ELM}}[%])^{0.52}
R_{\mathrm{geo}},
$$
with the published engineering-unit convention documented by the source.
This requires predictor semantics such as
By this point, density alone already appears in at least four distinct scientific forms:
This is one of the clearest reasons to make semantic naming part of the API contract.
Reference:
2.10 Pedestal width — EPED-type reduced relation
Not every reduced relation is a pure database power law.
The EPED pedestal-width relation is commonly written approximately as
This is better regarded as a hybrid empirical / physics-informed reduced relation than as a generic engineering regression.
Long term, VAFT should be able to distinguish concepts such as
without requiring a new top-level architecture for each category.
Reference:
2.11 Separatrix Operational Space — SepOS
SepOS is not one scalar power law. It is a reduced operational-space framework involving quantities such as
and is used to describe boundaries between operating regimes such as H-mode, QCE-like operation, and density-limit-related regions.
This shows that future empirical/reduced-model infrastructure may need to support
as related but distinct concepts.
Implementing SepOS itself is not required in the first PR. The architecture should simply avoid making it impossible later.
3. What these examples imply for the API
The examples above show that the central abstraction should not be one universal vector of engineering parameters.
n_e_line_avg,b_t,plasma_surface_arean_e_line_avg,b_t,m_eff, divertor configurationi_p,b_t,a_minor,r_geo,kappa,m_effi_p,b_t, density, power, geometry, shaping, massi_p,a_minorlambda_qb_pol_ompdivertor_neutral_pressure,p_sol, geometry,b_tn_e_ped,t_e_ped, relative ELM loss,r_geobeta_p_pedThe target abstraction is therefore:
4. Pure empirical laws belong to
vaft.formulaPublished empirical relations should be implemented as machine-independent pure functions.
Conceptually:
Formula functions must:
The function signature itself should communicate the physical definition of each predictor.
Avoid a primary Formula API such as
when
n_e,P, andBmean different quantities for different published laws.5. Canonical semantic variable names
Define and use consistent names for common empirical-model inputs.
Examples:
Do not use a shorter generic name when multiple physically distinct definitions are common in the literature.
The public signature is part of the scientific contract.
6. Unit convention
Where practical, new Formula API inputs and outputs should follow a consistent canonical convention, preferably SI.
Published equations should remain documented in their original engineering units.
Examples:
and
For each implemented law, document:
and add regression tests that reproduce the published expression numerically.
Do not detach a fitted prefactor from the unit convention in which it was derived.
7. Reuse the existing Formula catalog
VAFT already provides a docstring-derived discovery layer:
Do not create a parallel empirical-scaling registry solely for discovery or documentation.
New models should be discoverable through the existing catalog, for example:
Potential future catalog metadata may include distinctions such as
and database / regime information, but the implementation should avoid creating a second source of truth unless the existing Formula contract genuinely cannot express the required metadata.
8. Organize Formula modules by physics domain
Do not create one large
scaling.pycontaining unrelated empirical models.Prefer flat physics-domain modules consistent with the current Formula architecture:
Conceptual ownership:
Existing confinement functions may initially remain in
equilibrium.pyfor compatibility.A later issue may decide whether confinement/transport relations justify a dedicated
transport.py.Avoid nested packages solely for organizational symmetry unless the public responsibilities later justify them.
9. Separate Formula evaluation from ODS/IDS input resolution
Formula functions must not know how ODS/IDS stores the required physical quantity.
A later schema-aware adapter may live conceptually under
with APIs such as
The intended flow is
The first implementation does not need to complete this adapter, but the Formula API must be designed so that the adapter can later be added without changing model semantics.
10. ODS resolution should be based on physical semantics
A future resolver may map canonical semantic names to ODS extraction logic, conceptually:
Do not create per-machine wrappers such as
unless the underlying empirical relation itself is genuinely machine-specific.
Machine-specific acquisition, calibration, geometry and shot-era knowledge should have been resolved before the generic scaling evaluator is called.
11. Remove machine-specific assumptions from generic scaling extraction
Generic scaling evaluation must not contain assumptions such as
or conditionals such as
The intended data flow is
If a published model requires a physical quantity that is unavailable, the resolver should report it as missing rather than inventing a machine-specific approximation.
12. Do not silently substitute physically different predictors
The resolver must distinguish physically different measurements and derived quantities.
Examples:
Likewise:
Recommended policy:
Explicit caller overrides may later be supported, but they must remain explicit and provenance-aware.
13. Preserve input provenance
ODS-aware scaling evaluation should eventually retain not only predictor values but also their provenance.
Conceptually:
versus
Pure Formula functions should continue to return numerical values only.
Structured provenance belongs to the ODS/IDS-aware evaluation layer.
14. Separate numerical evaluation from applicability assessment
A published empirical law may be mathematically evaluable outside the parameter domain of its original regression database.
These are different questions:
and
Formula functions answer only the first.
A later validation layer should assess the second, conceptually under
using evidence such as
Possible states may include
Do not embed machine-specific applicability warnings directly in pure Formula functions.
15. Separate published-law evaluation from new database inference
There are two distinct workflows.
A. Evaluate an existing published relation
B. Infer a new scaling from experimental data
For example, the VEST confinement analysis in #548 belongs primarily to the second category.
Conceptual future APIs may include
under the appropriate processing domain.
Do not mix newly fitted VEST-specific coefficients into the generic published-model registry unless they are intentionally promoted into a separately documented empirical model with explicit provenance and applicability.
16. Support the same model across machines and datasets
The long-term target is that the same pure Formula function can be evaluated from
without changing the model implementation.
The central interface should therefore be
rather than machine-specific wrappers.
17. Initial implementation set
The first implementation should deliberately use models with different physical signatures.
Recommended minimum:
Transition
Exhaust
Edge
Existing:
can serve as an operational-limit reference.
Optional additional model:
This set exercises, at minimum:
and is therefore a meaningful test of whether the abstraction is genuinely general.
Proposed implementation phases
Phase 1 — Formula API contract
formula.transition;formula.edge;formula.exhaust;Do not add generic ODS auto-resolution in this phase.
Phase 2 — ODS/IDS model evaluation
Add generic input resolution and provenance-aware evaluation, conceptually:
Phase 3 — applicability / validation
Add regression-domain and regime applicability assessment.
Phase 4 — database inference
Add reusable scaling fitting / model-comparison operations under the appropriate
vaft.processdomain, reusing generic statistics and validation infrastructure.Tests
Formula-level reference tests
For every implemented empirical law:
Semantic-definition tests
Explicitly protect distinctions such as
Catalog tests
Verify new models are discoverable through
and retain their empirical/reference metadata.
Import tests
Preserve Formula lazy-loading behavior. Adding new physics modules must not make
eagerly load unrelated heavy modules.
Relationship to existing work
Formula catalog
Reuse the existing Formula catalog and docstring parser rather than introducing a second model-discovery framework.
#103 — architectural layer boundaries
Follow the established separation between
and avoid reintroducing machine-specific behavior into generic physics functions.
#252 — processing contracts and provenance
Any future ODS-aware scaling extraction/evaluation should follow the established provenance and input/output semantic contracts.
#253 — validation architecture
Applicability evidence, scientific assessment, and downstream acceptance policy should remain separate concepts.
#263 — process ownership rationalization
Any later scaling regression/inference implementation should follow the final
vaft.processownership rules rather than expanding miscellaneous statistical modules.#548 — VEST confinement scaling
#548 owns the VEST-specific scientific inference workflow for deriving and assessing confinement scaling from VEST observations.
This issue owns the generic architecture for representing and evaluating published empirical / reduced scaling laws.
The two should share canonical physical-variable semantics while remaining separate workflows.
Acceptance criteria
p_loss,p_sol,p_abs,p_net, and related power definitions remain semantically distinct.scaling.py.Non-goals
This issue does not require:
vaft.physicstop-level package;vaft.formula.catalog;Completion condition
Closing this issue means VAFT can represent physically different relations such as
within one consistent architectural philosophy without pretending that they share one universal engineering-parameter vector.
The target abstraction is
Adding a new published relation should primarily require:
It should not require a new machine-specific scaling workflow.