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, on a or R0;
  • 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.

SymbolMeaningUnit
a, R0minor and major radiusm
B0toroidal field on axisT
n_eelectron densitym^-3
T_e, T_ielectron and ion temperatureseV
Z_effeffective charge; the main ion is singly charged-
lnLambdaCoulomb logarithm-
etaSpitzer resistivity (parallel)Ohm m
v_AAlfven speed in the ion mass densitym/s
L_Ttemperature 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_populationEvaluate one contract on the table its orderings live on.
global_ordering_quantitiesThe global ordering quantities of one plasma state, NaN where an input is missing. Convention
ordering_coverageThe fraction of states (or profile points) with a finite value, per ordering quantity, by #1627 tier.
ordering_inputs_from_odsThe ordering quantities of one ODS state, by name, for an adapter’s advisory check (#1823). Convention
ordering_marginsMedian ordering margin and the fraction on the permitted side, per assessable ordering.
ordering_tableThe global and time-history ordering quantities of every state in a table.
profile_ordering_quantitiesThe profile ordering quantities on each flux surface, NaN where an input is missing. Convention
time_history_ordering_quantitiesHow slowly a state evolves against Alfvenic and resistive times, NaN where an input is missing. Convention

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 evaluated

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}\]
NameTypeUnitDescription
contractApproximationContract-

A #1627 ordering contract.

statespandas.DataFrame-

One row per state.

pointspandas.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-

vaft.validation.applicability.evaluate_population output, with attrs['evaluated_on'] "states" or "points".

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

  1. 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}\]
NameTypeUnitDescription
minor_radiusfloatm

Minor radius a.

major_radiusfloatm

Major radius R0 the inverse aspect ratio is taken against.

b0floatT

Toroidal field on axis.

n_efloat, optionalm^-3

Electron density; a volume or line average, whichever the state has, recorded by the caller.

t_efloat, optionaleV

Electron temperature for the resistivity.

z_efffloat, optional-

Effective charge for the resistivity; never defaulted here.

ln_lambdafloat, optional-

Coulomb logarithm for the resistivity; never defaulted here.

ion_mass_amufloat, optional-

Main-ion mass number, 1 for hydrogen.

betafloat, optional-

Toroidal beta of the state, as a fraction (not percent).

Returns
—dict-

lundquist_number, ion_skin_depth_over_a, inverse_aspect_ratio, beta, beta_over_inverse_aspect_ratio, each a float or NaN.

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

  1. epsilon = a / R0.
  2. With n_e: d_i = c / omega_pi at n_i = n_e and v_A from B0 and n_i m_i.
  3. With T_e, Z_eff and lnLambda as well: Spitzer eta and S = mu0 a v_A / eta.
  4. beta passes through, and beta / epsilon follows.

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

  1. 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}\]
NameTypeUnitDescription
statespandas.DataFrame-

One row per state; global and time-history quantities are counted here.

pointspandas.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.

Applicability · Limitations · Provenance

Applicability

Machine-independent.

Limitations

Coverage counts finite values only; it says nothing about how well a quantity is determined.

Provenance

  1. 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}\]
NameTypeUnitDescription
odsomas.ODS-

Carries equilibrium and, optionally, core_profiles; read only, never modified.

timefloats

State time; the equilibrium slice nearest to it is used.

time_tolerancefloat, optionals
Largest accepted t_equilibrium - time and t_core_profiles - t_equilibrium .
z_efffloat, optional-

Effective charge for the resistivity and the electron collisions; when None, the area mean of core_profiles zeff if the matched slice carries it, otherwise the resistive quantities are NaN.

ln_lambdafloat, optional-

Coulomb logarithm; None evaluates the NRL electron value at the mean n_e and T_e, a form valid above about 10 eV.

ion_mass_amufloat, optional-

Main-ion mass number.

plasma_onsetfloat, optionals

Plasma onset time for the plasma age; without it tau_age_over_tau_resistive is NaN.

use_ion_temperaturebool, optional-

Use core_profiles ion temperature for the ion quantities. Off by default: a stored T_i may be a ratio fill or a pressure partition, which this function cannot tell from a measurement.

Returns
—OrderingInputs-

state (global and time-history quantities by registry name), points (profile quantities per surface with a rho_tor_norm column, or None) and provenance.

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

  • ValueError The ODS has no equilibrium slice within time_tolerance of time, or the slice has no positive minor radius, major radius or vacuum field.
Processing steps · Defaults · Applicability · Limitations · Provenance

Processing steps

  1. Match the equilibrium slice to time by its own time (the IDS time vector fills a slice without one), within the tolerance; never by index. The vacuum b0 is matched on the IDS time vector.
  2. Read a (boundary.minor_radius, else half the outline’s radial width), R0 (boundary.geometric_axis.r, else the outline’s radial centre), the vacuum b0 at that slice scaled to R0, I_p, beta_tor and the q profile.
  3. dI_p/dt from the equilibrium I_p history, numpy.gradient(I_p, t) at the slice.
  4. Match the core_profiles slice to the equilibrium time within the tolerance; area-mean n_e and T_e for the global quantities.
  5. global_ordering_quantities and time_history_ordering_quantities give state; profile_ordering_quantities on r = rho_tor_norm a gives points.

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

  1. Issue #1823 (advisory ordering check in adapter run provenance) and its follow-up proposal: one builder from a stage’s ODS to the ordering_state mapping, 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})\]
NameTypeUnitDescription
contractsMapping or iterable of ApproximationContract-

The contracts whose orderings are summarised; an ordering listed by several is reported once.

statespandas.DataFrame-

Global and time-history quantities, one row per state.

pointspandas.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 · Applicability · Provenance

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 vaft.validation.applicability.ordering_margin.

Applicability

Machine-independent.

Provenance

  1. 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 table

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\]
NameTypeUnitDescription
statespandas.DataFrame-

One row per plasma state; the inputs are read from the columns named in columns and a missing column means a missing input.

columnsMapping, optional-

Input name -> column name, overriding DEFAULT_COLUMNS (minor_radius, major_radius, b0, n_e, t_e, z_eff, ln_lambda, beta, plasma_current, current_rate, plasma_age).

ion_mass_amufloat, 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 · Applicability · Limitations · Provenance

Processing steps

  1. Resolve the input columns; an absent one is a missing input.
  2. global_ordering_quantities and time_history_ordering_quantities on every row.

Applicability

Machine-independent.

Limitations

Profile quantities need radial profiles and are built per state with profile_ordering_quantities, not here.

Provenance

  1. 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}}\]
NameTypeUnitDescription
minor_radius_coordinatearray-likem

Minor-radius coordinate r of each sample, increasing outward.

n_earray-likem^-3

Electron density on r.

t_earray-likeeV

Electron temperature on r.

magnetic_fieldfloat or array-likeT

Field strength at each sample, e.g. the vacuum B0 R0 / R.

safety_factorarray-like-

|q| on r from the equilibrium.

major_radiusfloatm

Major radius for the connection length qR and epsilon = r/R.

z_efffloat-

Effective charge for the electron collisions; NaN leaves the electron collisional quantities NaN and the gyroradius and Debye ones intact.

ln_lambdafloat-

Coulomb logarithm; NaN leaves every collisional quantity NaN.

ion_mass_amufloat, optional-

Main-ion mass number.

t_iarray-like, optionaleV

Ion temperature on r; without it every ion quantity is NaN.

Returns
—dict-

rho_s_over_LTe, rho_i_over_LTi, electron_parallel_knudsen_number, ion_parallel_knudsen_number, electron_magnetization, ion_magnetization, electron_collisionality, ion_collisionality, debye_length_over_L: arrays on r.

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

  • ValueError The profile arrays do not share one length, or r is not increasing.
Processing steps · Applicability · Limitations · Provenance

Processing steps

  1. Gradient lengths L_T = |T / (dT/dr)| per species on r, on the finite positive samples of that species’ temperature only.
  2. rho_s from T_e and rho_i = v_ti / Omega_ci with v_ti = sqrt(T_i/m_i); each over its own L_T.
  3. Braginskii collision times, mean free paths v_t tau and the parallel Knudsen numbers on qR; magnetizations |Omega_c| tau.
  4. Sauter collisionalities with the local epsilon = r / R.
  5. 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

  1. 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}\]
NameTypeUnitDescription
minor_radiusfloatm

Minor radius a.

b0floatT

Toroidal field on axis.

n_efloat, optionalm^-3

Electron density for v_A.

t_efloat, optionaleV

Electron temperature for eta.

z_efffloat, optional-

Effective charge for eta.

ln_lambdafloat, optional-

Coulomb logarithm for eta.

ion_mass_amufloat, optional-

Main-ion mass number.

plasma_currentfloat, optionalA

Plasma current at the state.

current_ratefloat, optionalA/s

dI_p/dt at the state, from the same current history.

plasma_agefloat, optionals

Time since plasma onset at the state.

Returns
—dict-

tau_evolution_over_tau_alfven and tau_age_over_tau_resistive, each a float or NaN.

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

  1. tau_A = a / v_A from B0 and n_i m_i (n_i = n_e).
  2. tau_evol = |I_p / (dI_p/dt)|; a zero rate leaves it NaN rather than infinite.
  3. tau_R = mu0 a^2 / eta with Spitzer eta, 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

  1. Issue #1627 §9 (quasi-static equilibrium) and §10 (resistive current relaxation).

results matching ""

    No results matching ""