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):
IsochoricPlasma0D2T–rizer.models.nrp.nrp_driver.build_nrp_case()/Isomass2TVolumeReactor(or its C++-backed twin), circuit-driven, isochoric, 2-T, chemistry.IsochoricEOS– the same reactor with the chemistry source zeroed (the cheap fidelity-interchange tier).IsentropicExpansion–ExpansionModel(analytic isentropic relaxation, chemistry frozen).IsobaricPlasma0D1T–Isomass2TIsobaricReactorin its single-temperature mode (isobaric, 1-T, chemistry, optional wall loss).
Attributes#
Classes#
The stage-solver contract: state access, |
|
Isochoric 2-T chemistry stage, driven by the NRP circuit. |
|
Chemistry-free variant of the isochoric stage (fidelity interchange). |
|
Low-fidelity isochoric deposition tier: circuit + LTE closure. |
|
Analytic isentropic expansion stage. |
|
Isobaric 1-T chemistry stage (cooling / recombination). |
|
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 differentFidelitySignatureflags, never different call sites.- case: Any#
- estimator = None#
- 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.
- 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:
BasePhysicalModelIsochoric 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’ssolver_backend) and integrates it with CVODES through acantera.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#
- input_end_time() float#
Nominal end of the circuit input window [s] (grid heuristic).
Generator pulse plus
FINE_GRID_ROUND_TRIPScable 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-orientedenergy_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_toltimes 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.
- 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:
IsochoricPlasma0D2TChemistry-free variant of the isochoric stage (fidelity interchange).
Same circuit/volume/energy physics,
dY/dt = 0(the reactor’scompute_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:
BasePhysicalModelLow-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’sMixtureCollisionFrequencies, 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#
- 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.
- get_state() rizer.adaptive_models.state.PlasmaState#
Return the current canonical state.
- 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:
BasePhysicalModelAnalytic 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 theExpansionModel, evaluated on the stage-local clockt - 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.
- 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:
BasePhysicalModelIsobaric 1-T chemistry stage (cooling / recombination).
Wraps
Isomass2TIsobaricReactorin itssingle_temperaturemode (Tetied toTg— documented limitation: late electron heating cannot re-trigger a switch-up, andprolongis stubbed anyway), integrated by CVODES through acantera.ReactorNet. Wall loss is the reactor’s ownT_wallconduction 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).
- 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:
BasePhysicalModelIsobaric 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. UnlikeIsochoricLTE(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
sis already chemically equilibrated.
- get_state() rizer.adaptive_models.state.PlasmaState#
Return the current canonical state.