rizer.adaptive_models.models_list#

Stage-solver wrappers over the existing rizer models.

Each stage subclasses BasePhysicalModel; advance(t) integrates to absolute time t so two stages can be marched concurrently through a blend band. Stages own their integrator (a cantera.ReactorNet around the 0D reactors, the analytic clock for the Roger expansion) – the contract does not impose one.

Wrapped physics (never reimplemented here):

Attributes#

Classes#

BasePhysicalModel

The stage-solver contract: state access, advance, modeling error.

IsochoricPlasma0D2T

Isochoric 2-T chemistry stage, driven by the NRP circuit.

IsochoricEOS

Chemistry-free variant of the isochoric stage (fidelity interchange).

IsochoricLTE

Low-fidelity isochoric deposition tier: circuit + LTE closure.

IsentropicExpansion

Analytic isentropic expansion stage.

IsobaricPlasma0D1T

Isobaric 1-T chemistry stage (cooling / recombination).

IsobaricLTE

Isobaric LTE tier: chemistry has caught up, hold the equilibrium state.

Module Contents#

rizer.adaptive_models.models_list.logger#
rizer.adaptive_models.models_list.ACOUSTIC_CAP_FACTOR = 1.0#
rizer.adaptive_models.models_list.FINE_GRID_ROUND_TRIPS = 5#
class rizer.adaptive_models.models_list.BasePhysicalModel(estimator: rizer.adaptive_models.selector.ModelingErrorEstimator | None = None)#

The stage-solver contract: state access, advance, modeling error.

Shaped after Cantera’s ReactorNet (advance-driven, states queryable at any time) so a stage is Boulder-compatible. “With vs without chemistry”, “2-T vs 1-T”, “ODE vs analytical” are the same API with different FidelitySignature flags, never different call sites.

name: str = 'stage'#
fidelity: rizer.adaptive_models.state.FidelitySignature#
reviewed_by: str | None = None#
drops_second_temperature: bool = False#
drops_chemistry: bool = False#
case: Any#
estimator = None#
error_timescale: float = 1e-09#
abstractmethod set_state(s: rizer.adaptive_models.state.PlasmaState) → None#

Seed (or re-seed) the stage from a canonical state.

abstractmethod get_state() → rizer.adaptive_models.state.PlasmaState#

Return the current canonical state.

abstractmethod advance(t: float) → None#

Integrate the transient stage to absolute time t [s].

modeling_error(s: rizer.adaptive_models.state.PlasmaState, qoi: rizer.adaptive_models.contract.QoISet) → float#

Physics-surrogate estimate of the neglected-terms error.

class rizer.adaptive_models.models_list.IsochoricPlasma0D2T(case: rizer.models.nrp.nrp_driver.NRPCase, estimator: rizer.adaptive_models.selector.ModelingErrorEstimator | None = None)#

Bases: BasePhysicalModel

Isochoric 2-T chemistry stage, driven by the NRP circuit.

Wraps a fully-built NRPCase: at each (re-)seeding it builds the case’s reactor from the seam state (make_reactor(), C++-backed or pure Python per the case’s solver_backend) and integrates it with CVODES through a cantera.ReactorNet — the same adaptive-order stiff BDF integrator as the run script. .. warning:

**UNREVIEWED PHYSICS** (``rizer/adaptive_models/PHYSICS.md``,
section 4.1). The equations above and their implementation
have not been validated by a human: do not use results from this
class for design decisions or publication. Open findings: PHY-05, PHY-16, PHY-20, PHY-23.

Reviewed-by: nobody yet -- set the class attribute ``reviewed_by``
(:mod:`rizer.adaptive_models.review`) to sign off.
name = 'isochoric_plasma_0d2t'#
fidelity#
case#
energy_tol: float = 0.01#
input_end_time() → float#

Nominal end of the circuit input window [s] (grid heuristic).

Generator pulse plus FINE_GRID_ROUND_TRIPS cable round trips when reflections are modelled. Reflections never truncate (the line rings its stored energy into a low-impedance load over \(\tau/(1-\Gamma_g\Gamma_p)\)), so this is only the fine-grid horizon — the switch guard uses the goal-oriented energy_input_active() instead.

energy_input_active(t: float) → bool#

Whether the circuit still matters for the deposited-energy QoI.

During the generator pulse: always. Afterwards (goal-oriented): the projected remaining deposit must stay below energy_tol times the energy already deposited. The projection must include the energy still in flight in the cable — the instantaneous Joule power alone is blind in the quiet gaps between reflection arrivals. The circuit’s reflected-wave buffer holds exactly that in-flight energy; the geometric ringing factor \(1/(1-\Gamma_g\Gamma_p)\) bounds its future replays. .. warning:

**UNREVIEWED PHYSICS** (``rizer/adaptive_models/PHYSICS.md``,
section 6.1). The equations above and their implementation
have not been validated by a human: do not use results from this
trigger for design decisions or publication. Open findings: PHY-21, PHY-23.

Reviewed-by: nobody yet -- set the class attribute ``reviewed_by``
(:mod:`rizer.adaptive_models.review`) to sign off.
set_state(s: rizer.adaptive_models.state.PlasmaState) → None#

Seed the stage integrator at s.

advance(t: float) → None#

Integrate to absolute time t, accumulating deposited energy.

get_state() → rizer.adaptive_models.state.PlasmaState#

Return the current canonical state.

class rizer.adaptive_models.models_list.IsochoricEOS(case: rizer.models.nrp.nrp_driver.NRPCase, estimator: rizer.adaptive_models.selector.ModelingErrorEstimator | None = None)#

Bases: IsochoricPlasma0D2T

Chemistry-free variant of the isochoric stage (fidelity interchange).

Same circuit/volume/energy physics, dY/dt = 0 (the reactor’s compute_chemistry=False). .. warning:

**UNREVIEWED PHYSICS** (``rizer/adaptive_models/PHYSICS.md``,
section 4.2). The equations above and their implementation
have not been validated by a human: do not use results from this
class for design decisions or publication.

Reviewed-by: nobody yet -- set the class attribute ``reviewed_by``
(:mod:`rizer.adaptive_models.review`) to sign off.
name = 'isochoric_eos'#
fidelity#
drops_chemistry = True#
class rizer.adaptive_models.models_list.IsochoricLTE(case: rizer.models.nrp.nrp_driver.NRPCase, estimator: rizer.adaptive_models.selector.ModelingErrorEstimator | None = None)#

Bases: BasePhysicalModel

Low-fidelity isochoric deposition tier: circuit + LTE closure.

The minimal model of the high-voltage phase: no finite-rate chemistry, no electron temperature — the column is assumed in local thermodynamic equilibrium at every instant (valid above the thermal-spark electron-density threshold, Minesi et al. 2020; equilibration criterion per Maillard et al.), and the only state is the deposited energy. What keeps the temperature finite is exactly the reflection of the incident wave against the plasma impedance: as the column heats, \(\sigma_{LTE}(T)\) rises, \(R_p \ll Z_0\), the transmission \((1+\Gamma_p) \to 0\) and the deposition self-throttles.

Implementation: at the (fixed) density of the seam state, a table of equilibrium \(T, P, Y, \sigma\) vs specific internal energy is built once (Cantera equilibrate('TV') on the plasma Solution; conductivity through the case’s MixtureCollisionFrequencies, with a floor at the seam conductivity so a cold start can bootstrap); the pulse then integrates the single ODE \(dE/dt = V_p^2/R_p\) with \(V_p\) from the (wave) circuit. .. warning:

**UNREVIEWED PHYSICS** (``rizer/adaptive_models/PHYSICS.md``,
section 4.3). The equations above and their implementation
have not been validated by a human: do not use results from this
class for design decisions or publication. Open findings: PHY-11, PHY-14.

Reviewed-by: nobody yet -- set the class attribute ``reviewed_by``
(:mod:`rizer.adaptive_models.review`) to sign off.
name = 'isochoric_lte'#
fidelity#
drops_second_temperature = True#
energy_tol: float = 0.01#
T_table_max = 40000.0#
n_table = 140#
case#
set_state(s: rizer.adaptive_models.state.PlasmaState) → None#

Seed the tier: build the fixed-rho equilibrium table.

advance(t: float) → None#

Integrate the single deposited-energy ODE to absolute t.

get_state() → rizer.adaptive_models.state.PlasmaState#

Return the current canonical state.

input_end_time() → float#

Nominal end of the circuit input window [s] (grid heuristic).

energy_input_active(t: float) → bool#

Goal-oriented circuit-input guard (see IsochoricPlasma0D2T).

class rizer.adaptive_models.models_list.IsentropicExpansion(plasma: cantera.Solution, p_ext: float, T_amb: float, X_amb: str = 'CH4:1.0', estimator: rizer.adaptive_models.selector.ModelingErrorEstimator | None = None)#

Bases: BasePhysicalModel

Analytic isentropic expansion stage.

The default closure is the Roger engineering rarefaction model (its piecewise T1(t)/P1(t) ramps and isentropic constants); any other isentropic closure could be substituted behind the same stage contract — “Roger” is the variant, “isentropic” is the physics.

Chemistry is frozen at the seam composition; T1(t)/P1(t) are the piecewise rarefaction formulas of the ExpansionModel, evaluated on the stage-local clock t - t0 (the pre-rarefaction plateau is physical: the wave transit time).

Warning

UNREVIEWED PHYSICS (rizer/adaptive_models/PHYSICS.md, section 4.4). The equations above and their implementation have not been validated by a human: do not use results from this class for design decisions or publication. Open findings: PHY-03, PHY-13.

Reviewed-by: nobody yet – set the class attribute reviewed_by (rizer.adaptive_models.review) to sign off.

Parameters:
  • plasma (cantera.Solution) – Shared plasma object.

  • p_ext (float) – Ambient pressure [Pa] the kernel relaxes to.

  • T_amb (float) – Ambient gas temperature [K] – a user-file quantity, no default. The Roger closure also uses it as a proxy for the kernel’s pre-pulse state (P_k/P_amb = T_k/T_amb), see spark-cleantech-l3/rizer#239.

  • X_amb (str) – Ambient composition (Cantera string). Only feeds the expansion inputs’ M_out, which the expansion model itself never uses.

  • estimator (ModelingErrorEstimator, optional) – Modeling-error surrogate.

name = 'isentropic'#
fidelity#
drops_second_temperature = True#
drops_chemistry = True#
max_dropped_mole_fraction = 0.001#
plasma#
p_ext#
T_amb#
X_amb = 'CH4:1.0'#
set_state(s: rizer.adaptive_models.state.PlasmaState) → None#

Seed the analytic model from the seam state.

advance(t: float) → None#

Evaluate the analytic solution at absolute time t (O(1)).

get_state() → rizer.adaptive_models.state.PlasmaState#

Return the current canonical state.

pressure_error() → float#

Relative deviation of the current pressure from p_ext [-].

The switch condition for handing off to the isobaric tier (“has the expansion relaxed to ambient pressure yet”) is a fact about this stage’s own trajectory, not composite-level context — it only needs the pressure this stage already tracks and the ambient pressure it was already constructed with. .. warning:

**UNREVIEWED PHYSICS** (``rizer/adaptive_models/PHYSICS.md``,
section 6.3). The equations above and their implementation
have not been validated by a human: do not use results from this
trigger for design decisions or publication.

Reviewed-by: nobody yet -- set the class attribute ``reviewed_by``
(:mod:`rizer.adaptive_models.review`) to sign off.
class rizer.adaptive_models.models_list.IsobaricPlasma0D1T(plasma: cantera.Solution, mtcf: list[rizer.transport.collision_frequency.MomentumTransferCollisionFrequencyModel], solver_input: dict[str, Any], estimator: rizer.adaptive_models.selector.ModelingErrorEstimator | None = None, T_wall: float | None = None)#

Bases: BasePhysicalModel

Isobaric 1-T chemistry stage (cooling / recombination).

Wraps Isomass2TIsobaricReactor in its single_temperature mode (Te tied to Tg — documented limitation: late electron heating cannot re-trigger a switch-up, and prolong is stubbed anyway), integrated by CVODES through a cantera.ReactorNet. Wall loss is the reactor’s own T_wall conduction term (conductive_heat_loss()) at the live column radius (derived from mass/gap/density each step); T_wall=None (default) is adiabatic, no wall-loss term.

Below chemistry_floor_K (or on an integrator failure there) the stage rebuilds the reactor with the chemistry source zeroed: the CH4 mechanism’s electron reverse rates underflow (kf / K_eq -> NaN) at low temperature, where recombination is complete anyway. .. warning:

**UNREVIEWED PHYSICS** (``rizer/adaptive_models/PHYSICS.md``,
section 4.5). The equations above and their implementation
have not been validated by a human: do not use results from this
class for design decisions or publication. Open findings: PHY-19.

Reviewed-by: nobody yet -- set the class attribute ``reviewed_by``
(:mod:`rizer.adaptive_models.review`) to sign off.
chemistry_floor_K = 700.0#
name = 'isobaric_plasma_0d1t'#
fidelity#
drops_second_temperature = True#
plasma#
mtcf#
T_wall = None#
solver_input#
set_state(s: rizer.adaptive_models.state.PlasmaState) → None#

Seed the isobaric reactor at s (P is frozen from the state).

advance(t: float) → None#

Integrate to absolute time t at fixed pressure.

get_state() → rizer.adaptive_models.state.PlasmaState#

Return the current canonical state.

class rizer.adaptive_models.models_list.IsobaricLTE(plasma: cantera.Solution, estimator: rizer.adaptive_models.selector.ModelingErrorEstimator | None = None)#

Bases: BasePhysicalModel

Isobaric LTE tier: chemistry has caught up, hold the equilibrium state.

The isobaric twin of IsochoricLTE, but with no circuit (or other ongoing driver) to track: the seam operator (IsobaricToThermochemicalEquilibrium) already equilibrates the incoming state at fixed specific enthalpy and pressure, so there is nothing left to integrate here – specific enthalpy is exactly conserved absent an external heat source, so the equilibrium composition and temperature stay fixed. Unlike IsochoricLTE (driven by ongoing circuit Joule heating), this tier needs no table or ODE at all. .. warning:

**UNREVIEWED PHYSICS** (``rizer/adaptive_models/PHYSICS.md``,
section 4.6). The equations above and their implementation
have not been validated by a human: do not use results from this
class for design decisions or publication.

Reviewed-by: nobody yet -- set the class attribute ``reviewed_by``
(:mod:`rizer.adaptive_models.review`) to sign off.
name = 'isobaric_lte'#
fidelity#
drops_second_temperature = True#
plasma#
set_state(s: rizer.adaptive_models.state.PlasmaState) → None#

Seed the tier. Trusts s is already chemically equilibrated.

advance(t: float) → None#

Hold the equilibrium state; only the clock advances.

get_state() → rizer.adaptive_models.state.PlasmaState#

Return the current canonical state.