Process reference: ordering_state
Generated from the docstrings of vaft.process.ordering_state:
8 public functions. Each entry is what
vaft.process.describe("ordering_state.<name>") prints.
All process categories
Overview
The ordering contracts of vaft.validation.orderings read a state as a
row keyed by the names in
vaft.validation.orderings.ORDERING_QUANTITIES. This module builds
those rows from what a reconstructed VEST state actually carries – global
equilibrium scalars, Thomson profiles, the plasma-current history – with the
vaft.formula kernels the quantity registry names, and with nothing
else.
Three builders, one per scope, because a global d_i/a and a profile
rho_s/L_Te are different quantities on different scales (#1627):
global_ordering_quantities– one number per state, onaorR0;profile_ordering_quantities– one number per flux surface, on that surface’s own gradient length or connection length;time_history_ordering_quantities– one number per state from its time history (evolution rate, age since onset).
ordering_table applies the global and time-history builders row by row
to a table of states; ordering_coverage reports which quantities a
table could assess, by the data-availability tiers of #1627.
| Symbol | Meaning | Unit |
|---|---|---|
| a, R0 | minor and major radius | m |
| B0 | toroidal field on axis | T |
| n_e | electron density | m^-3 |
| T_e, T_i | electron and ion temperatures | eV |
| Z_eff | effective charge; the main ion is singly charged | - |
| lnLambda | Coulomb logarithm | - |
| eta | Spitzer resistivity (parallel) | Ohm m |
| v_A | Alfven speed in the ion mass density | m/s |
| L_T | temperature gradient length |T / (dT/dr)| | m |
Nothing is imputed. A quantity whose inputs are missing, non-finite or
non-positive is NaN, so the contract evaluation reports it UNASSESSED; an
ion temperature is never set equal to T_e here, and a density is never
filled in from another diagnostic. A caller who adopts such an assumption does
it explicitly and records it.
One ion species. The ion mass density is n_i m_i with n_i = n_e
(quasineutral, singly charged main ion); Z_eff enters only the
resistivity and the electron collisions. Thermal speeds are
sqrt(T/m) (NRL formulary), as vaft.formula.ordering uses.
Gradient lengths are |T/(dT/dr)| on the minor-radius coordinate r
in metres, from vaft.formula.utils.normalized_gradient_scale_length;
a flat or non-monotonic stretch gives a long L and a small ordering, never
a sign.
Functions
contract_population | Evaluate one contract on the table its orderings live on. |
global_ordering_quantities | The global ordering quantities of one plasma state, NaN where an input is missing. Convention |
ordering_coverage | The fraction of states (or profile points) with a finite value, per ordering quantity, by #1627 tier. |
ordering_inputs_from_ods | The ordering quantities of one ODS state, by name, for an adapter’s advisory check (#1823). Convention |
ordering_margins | Median ordering margin and the fraction on the permitted side, per assessable ordering. |
ordering_table | The global and time-history ordering quantities of every state in a table. |
profile_ordering_quantities | The profile ordering quantities on each flux surface, NaN where an input is missing. Convention |
time_history_ordering_quantities | How slowly a state evolves against Alfvenic and resistive times, NaN where an input is missing. Convention |
No function matches.
contract_population
Machine-independent
source
contract_population(contract, states, points=None)
Show source vaft/process/ordering_state.py, lines 720–765
def contract_population(contract, states, points=None):
r"""Evaluate one contract on the table its orderings live on.
$$\text{table} = \begin{cases}\text{states} & \text{every ordering global or time-history}\\
\text{points} & \text{otherwise}\end{cases}$$
Parameters
----------
contract : ApproximationContract
A #1627 ordering contract [-].
states : pandas.DataFrame
One row per state [-].
points : pandas.DataFrame, optional
One row per state and flux surface, carrying the state's global and
time-history quantities as well. Without it every contract is
evaluated per state, and its profile orderings are then
``UNASSESSED`` [-].
Returns
-------
pandas.DataFrame
:func:`vaft.validation.applicability.evaluate_population` output, with
``attrs['evaluated_on']`` ``"states"`` or ``"points"`` [-].
Limitations
-----------
A contract mixing global and profile orderings is evaluated per flux
surface, so a state contributes one row per surface; a state without
profiles is then absent from it.
Applicability
-------------
Machine-independent.
Provenance
----------
.. [1] Issue #1629 §8-§9: per-state evaluation of state-level contracts,
per-surface of local ones.
"""
from vaft.validation.applicability import evaluate_population
state_level = all(_state_quantity(a.quantity) for a in contract.assumptions)
table = states if (state_level or points is None) else points
evaluated = evaluate_population(contract, table)
evaluated.attrs["evaluated_on"] = "states" if table is states else "points"
return evaluatedEvaluate one contract on the table its orderings live on.
\[\text{table} = \begin{cases}\text{states} & \text{every ordering global or time-history}\\ \text{points} & \text{otherwise}\end{cases}\]| Name | Type | Unit | Description |
|---|---|---|---|
contract | ApproximationContract | - | A #1627 ordering contract. |
states | pandas.DataFrame | - | One row per state. |
points | pandas.DataFrame, optional | - | One row per state and flux surface, carrying the state’s global and time-history quantities as well. Without it every contract is evaluated per state, and its profile orderings are then |
| Returns | |||
| — | pandas.DataFrame | - |
|
Applicability · Limitations · Provenance
Applicability
Machine-independent.
Limitations
A contract mixing global and profile orderings is evaluated per flux surface, so a state contributes one row per surface; a state without profiles is then absent from it.
Provenance
- Issue #1629 §8-§9: per-state evaluation of state-level contracts, per-surface of local ones.
global_ordering_quantities
Machine-independentConvention-sensitive
source
global_ordering_quantities(*, minor_radius, major_radius, b0, n_e=None, t_e=None, z_eff=None, ln_lambda=None, ion_mass_amu=1.0, beta=None)
The global ordering quantities of one plasma state, NaN where an input is missing.
\[S = \frac{\mu_0 a v_A}{\eta},\quad \frac{d_i}{a},\quad \epsilon = \frac{a}{R_0},\quad \beta,\quad \frac{\beta}{\epsilon}\]| Name | Type | Unit | Description |
|---|---|---|---|
minor_radius | float | m | Minor radius |
major_radius | float | m | Major radius |
b0 | float | T | Toroidal field on axis. |
n_e | float, optional | m^-3 | Electron density; a volume or line average, whichever the state has, recorded by the caller. |
t_e | float, optional | eV | Electron temperature for the resistivity. |
z_eff | float, optional | - | Effective charge for the resistivity; never defaulted here. |
ln_lambda | float, optional | - | Coulomb logarithm for the resistivity; never defaulted here. |
ion_mass_amu | float, optional | - | Main-ion mass number, 1 for hydrogen. |
beta | float, optional | - | Toroidal beta of the state, as a fraction (not percent). |
| Returns | |||
| — | dict | - |
|
Convention
S is taken on the minor radius a, the scale of
vaft.validation.orderings.ORDERING_QUANTITIES; the ion density
is n_e (singly charged main ion).
Processing steps · Applicability · Limitations · Provenance
Processing steps
epsilon = a / R0.- With
n_e:d_i = c / omega_piatn_i = n_eandv_AfromB0andn_i m_i. - With
T_e,Z_effandlnLambdaas well: SpitzeretaandS = mu0 a v_A / eta. betapasses through, andbeta / epsilonfollows.
Applicability
Machine-independent.
Limitations
A single global T_e stands for the whole plasma in eta; the
resistivity of a peaked profile varies by an order of magnitude from core
to edge, so S is an order-of-magnitude statement.
Provenance
- Issue #1627 §1 and §4; the Lundquist number as in D. Biskamp, Magnetic Reconnection in Plasmas, Cambridge (2000), Ch. 1.
ordering_coverage
Machine-independent
source
ordering_coverage(states, points=None)
Show source vaft/process/ordering_state.py, lines 598–651
def ordering_coverage(states, points=None):
r"""The fraction of states (or profile points) with a finite value, per ordering quantity, by #1627 tier.
$$f_q = \frac{\#\{k : q_k\ \text{finite}\}}{N}$$
Parameters
----------
states : pandas.DataFrame
One row per state; global and time-history quantities are counted
here [-].
points : pandas.DataFrame, optional
One row per state and flux surface; profile, foundational and mode
quantities are counted here when given, else in ``states`` [-].
Returns
-------
pandas.DataFrame
One row per registered quantity: ``group``, ``tier``, ``of`` (states or
points), ``assessed`` (count) and ``fraction``; a quantity the table
lacks has fraction 0 [-].
Limitations
-----------
Coverage counts finite values only; it says nothing about how well a
quantity is determined.
Applicability
-------------
Machine-independent.
Provenance
----------
.. [1] Issue #1627 "Data-availability tiers": the summary reports coverage
by tier.
"""
import pandas as pd
from vaft.validation.orderings import ORDERING_QUANTITIES
tier_of = {group: tier for tier, groups in COVERAGE_TIERS.items() for group in groups}
flow = set(COVERAGE_TIERS["tier3_flow"])
rows = []
for name, quantity in ORDERING_QUANTITIES.items():
table = states if (points is None or quantity.group in _STATE_GROUPS) else points
if name in table.columns:
values = pd.to_numeric(table[name], errors="coerce").to_numpy(dtype=float)
assessed = int(np.isfinite(values).sum())
else:
assessed = 0
rows.append({"quantity": name, "group": quantity.group,
"tier": "tier3_flow" if name in flow else tier_of[quantity.group],
"of": "states" if table is states else "points",
"assessed": assessed, "fraction": assessed / len(table) if len(table) else math.nan})
return pd.DataFrame(rows).set_index("quantity")The fraction of states (or profile points) with a finite value, per ordering quantity, by #1627 tier.
\[f_q = \frac{\#\{k : q_k\ \text{finite}\}}{N}\]| Name | Type | Unit | Description |
|---|---|---|---|
states | pandas.DataFrame | - | One row per state; global and time-history quantities are counted here. |
points | pandas.DataFrame, optional | - | One row per state and flux surface; profile, foundational and mode quantities are counted here when given, else in |
| Returns | |||
| — | pandas.DataFrame | - | One row per registered quantity: |
Applicability · Limitations · Provenance
Applicability
Machine-independent.
Limitations
Coverage counts finite values only; it says nothing about how well a quantity is determined.
Provenance
- Issue #1627 “Data-availability tiers”: the summary reports coverage by tier.
ordering_inputs_from_ods
Machine-independentConvention-sensitive
source
ordering_inputs_from_ods(ods, time, *, time_tolerance=0.0005, z_eff=None, ln_lambda=None, ion_mass_amu=1.0, plasma_onset=None, use_ion_temperature=False)
The ordering quantities of one ODS state, by name, for an adapter’s advisory check (#1823).
\[\left\{S,\ \frac{d_i}{a},\ \epsilon,\ \beta,\ \frac{\beta}{\epsilon},\ \frac{\tau_{evol}}{\tau_A},\ \frac{\tau_{age}}{\tau_R}\right\} \ \text{per state},\qquad \left\{\frac{\rho_s}{L_{T_e}},\ Kn_e,\ \Omega_{ce}\tau_e,\ \nu_{*e},\ \ldots\right\} \ \text{per flux surface}\]| Name | Type | Unit | Description | |||||
|---|---|---|---|---|---|---|---|---|
ods | omas.ODS | - | Carries | |||||
time | float | s | State time; the equilibrium slice nearest to it is used. | |||||
time_tolerance | float, optional | s |
| |||||
z_eff | float, optional | - | Effective charge for the resistivity and the electron collisions; when | |||||
ln_lambda | float, optional | - | Coulomb logarithm; | |||||
ion_mass_amu | float, optional | - | Main-ion mass number. | |||||
plasma_onset | float, optional | s | Plasma onset time for the plasma age; without it | |||||
use_ion_temperature | bool, optional | - | Use | |||||
| Returns | ||||||||
| — | OrderingInputs | - |
| |||||
Convention
b0 is the vacuum field scaled to the geometric centre,
B0 = b0 r0 / R0; the profile field is B0 R0 / (R0 + r) (vacuum,
outboard midplane) and r = rho_tor_norm a (circular approximation).
The global n_e and T_e are cross-section means
int f rho drho / int rho drho. beta is IMAS beta_tor, a
fraction. These are the conventions of the #1629 ordering atlas.
Raises
ValueErrorThe ODS has no equilibrium slice withintime_toleranceoftime, or the slice has no positive minor radius, major radius or vacuum field.
Processing steps · Defaults · Applicability · Limitations · Provenance
Processing steps
- Match the equilibrium slice to
timeby its owntime(the IDStimevector fills a slice without one), within the tolerance; never by index. The vacuumb0is matched on the IDStimevector. - Read
a(boundary.minor_radius, else half the outline’s radial width),R0(boundary.geometric_axis.r, else the outline’s radial centre), the vacuumb0at that slice scaled toR0,I_p,beta_torand theqprofile. dI_p/dtfrom the equilibriumI_phistory,numpy.gradient(I_p, t)at the slice.- Match the
core_profilesslice to the equilibrium time within the tolerance; area-meann_eandT_efor the global quantities. global_ordering_quantitiesandtime_history_ordering_quantitiesgivestate;profile_ordering_quantitiesonr = rho_tor_norm agivespoints.
Defaults
time_tolerance = 0.5 ms is a validated-workflow default, the pairing
tolerance of vaft.process.transport_state. use_ion_temperature
= False is a conventional choice: no ion temperature is assumed.
Applicability
Machine-independent.
Limitations
Mode and layer quantities (k_perp_rho_i, ion_skin_depth_over_layer,
…) need mode numbers or a layer width the ODS does not carry; the caller
adds them to state. The circular r overstates r in an elongated
plasma by up to sqrt(kappa), which shortens L_T in metres by the
same factor.
Provenance
- Issue #1823 (advisory ordering check in adapter run provenance) and its follow-up proposal: one builder from a stage’s ODS to the
ordering_statemapping, matched by time.
ordering_margins
Machine-independent
source
ordering_margins(contracts, states, points=None)
Show source vaft/process/ordering_state.py, lines 654–717
def ordering_margins(contracts, states, points=None):
r"""Median ordering margin and the fraction on the permitted side, per assessable ordering.
$$m = \log_{10}(x_0/x)\ (\text{small}),\qquad m = \log_{10}(x/x_0)\ (\text{large})$$
Parameters
----------
contracts : Mapping or iterable of ApproximationContract
The contracts whose orderings are summarised; an ordering listed by
several is reported once [-].
states : pandas.DataFrame
Global and time-history quantities, one row per state [-].
points : pandas.DataFrame, optional
Profile quantities, one row per flux surface; ``states`` is used when
absent [-].
Returns
-------
pandas.DataFrame
Indexed by ``"<quantity> (<ordering>)"``: ``per`` (state or point), ``n``,
``median_margin`` [decades] and ``permitted`` (fraction with ``m > 0``),
sorted from the least to the most room [-].
Processing steps
----------------
1. Collect each distinct ``(quantity, ordering, threshold)`` once.
2. Take a global or time-history quantity from ``states`` (one value per
state, never repeated per profile point) and any other from ``points``.
3. Margins with :func:`vaft.validation.applicability.ordering_margin`.
Applicability
-------------
Machine-independent.
Provenance
----------
.. [1] Issues #1627 (margins first) and #1629 §5.
"""
import pandas as pd
from vaft.validation.applicability import ordering_margin
items = contracts.values() if hasattr(contracts, "values") else contracts
seen, rows = set(), []
for contract in items:
for a in contract.assumptions:
key = (a.quantity, a.ordering, a.threshold)
if key in seen:
continue
seen.add(key)
table = states if (points is None or _state_quantity(a.quantity)) else points
if a.quantity not in table:
continue
values = pd.to_numeric(table[a.quantity], errors="coerce").dropna()
if values.empty:
continue
m = values.map(lambda v: ordering_margin(v, a.ordering, a.threshold)).dropna()
if m.empty:
continue
rows.append({"ordering": f"{a.quantity} ({a.ordering})",
"per": "state" if table is states else "point", "n": int(len(m)),
"median_margin": float(m.median()), "permitted": float((m > 0).mean())})
frame = pd.DataFrame(rows, columns=["ordering", "per", "n", "median_margin", "permitted"])
return frame.set_index("ordering").sort_values("median_margin")Median ordering margin and the fraction on the permitted side, per assessable ordering.
\[m = \log_{10}(x_0/x)\ (\text{small}),\qquad m = \log_{10}(x/x_0)\ (\text{large})\]| Name | Type | Unit | Description |
|---|---|---|---|
contracts | Mapping or iterable of ApproximationContract | - | The contracts whose orderings are summarised; an ordering listed by several is reported once. |
states | pandas.DataFrame | - | Global and time-history quantities, one row per state. |
points | pandas.DataFrame, optional | - | Profile quantities, one row per flux surface; |
| Returns | |||
| — | pandas.DataFrame | - | Indexed by |
Processing steps · Applicability · Provenance
Processing steps
- Collect each distinct
(quantity, ordering, threshold)once. - Take a global or time-history quantity from
states(one value per state, never repeated per profile point) and any other frompoints. - Margins with
vaft.validation.applicability.ordering_margin.
Applicability
Machine-independent.
Provenance
- Issues #1627 (margins first) and #1629 §5.
ordering_table
Machine-independent
source
ordering_table(states, *, columns=None, ion_mass_amu=1.0)
Show source vaft/process/ordering_state.py, lines 525–585
def ordering_table(states, *, columns: Mapping[str, str] | None = None, ion_mass_amu=1.0):
r"""The global and time-history ordering quantities of every state in a table.
$$\text{row}_k \mapsto \{S, d_i/a, \epsilon, \beta, \beta/\epsilon,
\tau_{evol}/\tau_A, \tau_{age}/\tau_R\}_k$$
Parameters
----------
states : pandas.DataFrame
One row per plasma state; the inputs are read from the columns named
in ``columns`` and a missing column means a missing input [-].
columns : Mapping, optional
Input name -> column name, overriding :data:`DEFAULT_COLUMNS`
(``minor_radius``, ``major_radius``, ``b0``, ``n_e``, ``t_e``,
``z_eff``, ``ln_lambda``, ``beta``, ``plasma_current``,
``current_rate``, ``plasma_age``) [-].
ion_mass_amu : float, optional
Main-ion mass number [-].
Returns
-------
pandas.DataFrame
The input index, the seven ordering columns, and ``attrs['columns']``
recording which input column fed each argument [-].
Processing steps
----------------
1. Resolve the input columns; an absent one is a missing input.
2. :func:`global_ordering_quantities` and
:func:`time_history_ordering_quantities` on every row.
Limitations
-----------
Profile quantities need radial profiles and are built per state with
:func:`profile_ordering_quantities`, not here.
Applicability
-------------
Machine-independent.
Provenance
----------
.. [1] Issue #1627 §2 (the summary layer) and #1629 (the VEST atlas).
"""
import pandas as pd
mapping = {**DEFAULT_COLUMNS, **dict(columns or {})}
rows = []
for _, row in states.iterrows():
get = {name: (row[column] if column in states.columns else None) for name, column in mapping.items()}
common = dict(minor_radius=get["minor_radius"], b0=get["b0"], n_e=get["n_e"], t_e=get["t_e"],
z_eff=get["z_eff"], ln_lambda=get["ln_lambda"], ion_mass_amu=ion_mass_amu)
values = global_ordering_quantities(major_radius=get["major_radius"], beta=get["beta"], **common)
values.update(time_history_ordering_quantities(plasma_current=get["plasma_current"],
current_rate=get["current_rate"],
plasma_age=get["plasma_age"], **common))
rows.append(values)
table = pd.DataFrame(rows, index=states.index)
table.attrs["columns"] = {name: column for name, column in mapping.items() if column in states.columns}
table.attrs["ion_mass_amu"] = float(ion_mass_amu)
return tableThe global and time-history ordering quantities of every state in a table.
\[\text{row}_k \mapsto \{S, d_i/a, \epsilon, \beta, \beta/\epsilon, \tau_{evol}/\tau_A, \tau_{age}/\tau_R\}_k\]| Name | Type | Unit | Description |
|---|---|---|---|
states | pandas.DataFrame | - | One row per plasma state; the inputs are read from the columns named in |
columns | Mapping, optional | - | Input name -> column name, overriding |
ion_mass_amu | float, optional | - | Main-ion mass number. |
| Returns | |||
| — | pandas.DataFrame | - | The input index, the seven ordering columns, and |
Processing steps · Applicability · Limitations · Provenance
Processing steps
- Resolve the input columns; an absent one is a missing input.
global_ordering_quantitiesandtime_history_ordering_quantitieson every row.
Applicability
Machine-independent.
Limitations
Profile quantities need radial profiles and are built per state with
profile_ordering_quantities, not here.
Provenance
- Issue #1627 §2 (the summary layer) and #1629 (the VEST atlas).
profile_ordering_quantities
Machine-independentConvention-sensitive
source
profile_ordering_quantities(*, minor_radius_coordinate, n_e, t_e, magnetic_field, safety_factor, major_radius, z_eff, ln_lambda, ion_mass_amu=1.0, t_i=None)
The profile ordering quantities on each flux surface, NaN where an input is missing.
\[\frac{\rho_s}{L_{T_e}},\ \frac{\rho_i}{L_{T_i}},\ Kn_s = \frac{v_{ts}\tau_s}{qR},\ \Omega_{cs}\tau_s,\ \nu_{*s},\ \frac{\lambda_D}{L_{T_e}}\]| Name | Type | Unit | Description |
|---|---|---|---|
minor_radius_coordinate | array-like | m | Minor-radius coordinate |
n_e | array-like | m^-3 | Electron density on |
t_e | array-like | eV | Electron temperature on |
magnetic_field | float or array-like | T | Field strength at each sample, e.g. the vacuum |
safety_factor | array-like | - |
|
major_radius | float | m | Major radius for the connection length |
z_eff | float | - | Effective charge for the electron collisions; NaN leaves the electron collisional quantities NaN and the gyroradius and Debye ones intact. |
ln_lambda | float | - | Coulomb logarithm; NaN leaves every collisional quantity NaN. |
ion_mass_amu | float, optional | - | Main-ion mass number. |
t_i | array-like, optional | eV | Ion temperature on |
| Returns | |||
| — | dict | - |
|
Convention
rho_i uses sqrt(T_i/m_i) (NRL), the convention of
vaft.formula.ordering; sqrt(2T/m) would raise it by sqrt 2.
The Debye length is taken against L_Te, the profile’s own scale.
Raises
ValueErrorThe profile arrays do not share one length, orris not increasing.
Processing steps · Applicability · Limitations · Provenance
Processing steps
- Gradient lengths
L_T = |T / (dT/dr)|per species onr, on the finite positive samples of that species’ temperature only. rho_sfromT_eandrho_i = v_ti / Omega_ciwithv_ti = sqrt(T_i/m_i); each over its ownL_T.- Braginskii collision times, mean free paths
v_t tauand the parallel Knudsen numbers onqR; magnetizations|Omega_c| tau. - Sauter collisionalities with the local
epsilon = r / R. lambda_D / L_Te.
Applicability
Machine-independent.
Limitations
Gradient lengths of sparse Thomson channels are finite differences of a
few points; a profile fit should be passed when the raw channels are
noisy. One main-ion species with n_i = n_e (no impurity dilution);
impurities enter only through Z_eff in the electron collisions. One
Coulomb logarithm serves both species, so the ion collision time and
Sauter’s nu*_i use the caller’s (electron) lnLambda rather than
Sauter’s own ion value – a 10-20 % effect on the ion quantities.
Provenance
- Issue #1627 §6-§8 and the registry
vaft.validation.orderings.ORDERING_QUANTITIES; collisionality as in O. Sauter, C. Angioni and Y. R. Lin-Liu, Phys. Plasmas 6, 2834 (1999).
time_history_ordering_quantities
Machine-independentConvention-sensitive
source
time_history_ordering_quantities(*, minor_radius, b0, n_e=None, t_e=None, z_eff=None, ln_lambda=None, ion_mass_amu=1.0, plasma_current=None, current_rate=None, plasma_age=None)
How slowly a state evolves against Alfvenic and resistive times, NaN where an input is missing.
\[\frac{\tau_{evol}}{\tau_A} = \frac{|I_p / \dot I_p|}{a / v_A},\qquad \frac{\tau_{age}}{\tau_R} = \frac{t - t_{onset}}{\mu_0 a^2/\eta}\]| Name | Type | Unit | Description |
|---|---|---|---|
minor_radius | float | m | Minor radius |
b0 | float | T | Toroidal field on axis. |
n_e | float, optional | m^-3 | Electron density for |
t_e | float, optional | eV | Electron temperature for |
z_eff | float, optional | - | Effective charge for |
ln_lambda | float, optional | - | Coulomb logarithm for |
ion_mass_amu | float, optional | - | Main-ion mass number. |
plasma_current | float, optional | A | Plasma current at the state. |
current_rate | float, optional | A/s |
|
plasma_age | float, optional | s | Time since plasma onset at the state. |
| Returns | |||
| — | dict | - |
|
Convention
The evolution time is the plasma current’s; another state variable
(stored energy, axis position) gives another tau_evol and is the
caller’s to pass. Both ratios use the minor radius a.
Processing steps · Applicability · Limitations · Provenance
Processing steps
tau_A = a / v_AfromB0andn_i m_i(n_i = n_e).tau_evol = |I_p / (dI_p/dt)|; a zero rate leaves it NaN rather than infinite.tau_R = mu0 a^2 / etawith Spitzereta, and the age over it.
Applicability
Machine-independent.
Limitations
tau_R uses one global T_e, as in
global_ordering_quantities; the current-relaxation statement is
order-of-magnitude.
Provenance
- Issue #1627 §9 (quasi-static equilibrium) and §10 (resistive current relaxation).