rizer.models.nrp.engineering_model.pulse#

Attributes#

T

Classes#

BasePulseInputs

ThermalSparkInputs

NonThermalSparkInputs

PulseOutputs

PulseModel

Helper class that provides a standard way to create an ABC using

ThermalSpark

Compute temperature, pressure, vibrational temperature, and composition of a thermal spark.

NonThermalSpark

Compute temperature, pressure, vibrational temperature, and composition of a non-thermal spark.

Module Contents#

class rizer.models.nrp.engineering_model.pulse.BasePulseInputs#
ΔE_pulse: float#

Energy deposited during the spark pulse [J].

r_0: float#

Initial discharge radius [m].

L_gap: float#

Discharge length [m]. Assumed constant.

T_0: float#

Initial temperature of the discharge [K].

P_0: float#

Initial pressure of the discharge [Pa].

X_0: str | dict[str, float]#

Initial gas mixture composition. Either as a Cantera string (e.g., ‘CH4:1’ or ‘O2:0.21, N2:0.79’), or a dictionary of species mole fractions (e.g., {‘O2’: 0.21, ‘N2’: 0.79}).

mechanism_path: str = 'NASA9_thermo.yaml'#

Name of the Cantera mechanism file (to compute thermodynamic properties). Should be located in the data/thermo directory of the package.

gas: cantera.Solution#

Cantera gas object representing the initial gas mixture.

rho_ini: float#

Initial density of the discharge [kg/m^3].

Computed from the initial temperature, pressure and composition using Cantera, under the ideal gas assumption.

M_ini: float#

Molar mass of the gas [kg/mol].

Computed from initial composition using Cantera.

ΔE_pulse_per_vol_J_m3: float#

Energy deposited per unit volume during the spark pulse [J/m^3].

\[\Delta E_{pulse, per\_vol} = \frac{\Delta E_{pulse}}{V}\]

where:

  • \(\Delta E_{pulse}\) is the energy deposited during the spark pulse,

  • \(V=\pi R_d^2 L_{gap}\) is the volume of the discharge, approximated as a cylinder.

class rizer.models.nrp.engineering_model.pulse.ThermalSparkInputs#

Bases: BasePulseInputs

scenario_thermal_spark: str = 'LTE'#

Scenario for the thermal spark model. Supported scenarios are ‘LTE’ and ‘frozen’.

class rizer.models.nrp.engineering_model.pulse.NonThermalSparkInputs#

Bases: BasePulseInputs

theta_uh: float#

Fraction of the deposited energy that goes to trans-rotational ultrafast heating.

theta_sh: float#

Fraction of the deposited energy that goes to vibrational heating.

Theta_vib: float#

Characteristic vibrational temperature [K].

cv_vib_max: float#

Maximum vibrational heat capacity [J/(kg.K)].

cv_tr_rot: float#

Specific trans-rotational heat capacity [J/(kg.K)].

cv_tr_rot_init: dataclasses.InitVar[float | None] = None#

Specific trans-rotational heat capacity [J/(kg.K)].

If not provided, it will be computed from n_freedom and M.

n_freedom: dataclasses.InitVar[float | None] = None#

Number of degrees of freedom for the trans-rotational modes.

If not provided, cv_tr_rot_init must be provided. If provided, cv_tr_rot_init must not be provided, as it will be computed via:

\[c_{v, tr\_rot} = \frac{1}{2} n_{freedom} \frac{R}{M}\]
class rizer.models.nrp.engineering_model.pulse.PulseOutputs#
T_k: float#

Kernel temperature after the spark pulse [K].

P_k: float#

Kernel pressure after the spark pulse [Pa].

T_v: float#

Vibrational temperature after the spark pulse [K].

X_k: dict[str, float]#

Kernel composition after the spark pulse (mole fractions).

rizer.models.nrp.engineering_model.pulse.T#
class rizer.models.nrp.engineering_model.pulse.PulseModel(inputs: T)#

Bases: abc.ABC, Generic[T]

Helper class that provides a standard way to create an ABC using inheritance.

inputs#
abstractmethod solve() → PulseOutputs#
class rizer.models.nrp.engineering_model.pulse.ThermalSpark(inputs: ThermalSparkInputs)#

Bases: PulseModel[ThermalSparkInputs]

Compute temperature, pressure, vibrational temperature, and composition of a thermal spark.

Main assumptions of the thermal spark model are:

  • (a1) Isochoric pulse heating.

  • (a2) The pulse energy is provided to the gas, which is either at LTE or chemically frozen.

Note the mass density is kept constant during the thermal spark, but the composition is changed.

Parameters:

inputs (ThermalSparkInputs) – Inputs for the thermal spark model.

Notes

The thermal spark model is based on the equations from [Roger2026].

It assumes that the energy of the spark pulse is uniformly distributed throughout the volume of the discharge, leading to an homogeneous temperature and pressure increase, while keeping the mass density constant (closed and isochoric system).

Chemical composition can either be assumed to be unchanged during the thermal spark (scenario “frozen chemistry”) or at chemical equilibrium during the thermal spark (scenario “LTE”). In the latter case, the composition is changed during the thermal spark, and is computed at each iteration of the root-finding solver using the Cantera gas object.

The energy change is computed as (Eq. 8, LTE scenario, [Roger2026].):

\[\Delta E_{\text {pulse }}=\pi R_{d}^2 L \times \rho_{\text {ini }} \times \left( u_{\text {eq }}\left(T_{k}, P_{k}\right) - u_{\text {eq }}\left(T_{\text {ini }}, P_{\text {ini }}\right) \right)\]

or (Eq. 8, frozen chemistry scenario, [Roger2026].):

\[\Delta E_{\text {pulse }}=\pi R_{d}^2 L \times \rho_{\text {ini }} \times\left( u_{\text{f}} \left(T_{k}, P_{k}\right) -u_{\text{f}} \left(T_{\text {ini }}, P_{\text {ini }}\right) \right)\]

The mass density is kept constant during the thermal spark (Eq. 9, [Roger2026].):

\[\rho_{eq}\left(T_{k}, P_{k}\right)=\frac{P_{k} M _{k}}{R T_{k}}=\rho_{ini}\]

These equations are solved using the Cantera gas object.

The vibrational temperature is assumed to be equal to the trans-rotational temperature.

solve() → PulseOutputs#
class rizer.models.nrp.engineering_model.pulse.NonThermalSpark(inputs: NonThermalSparkInputs)#

Bases: PulseModel[NonThermalSparkInputs]

Compute temperature, pressure, vibrational temperature, and composition of a non-thermal spark.

Main assumptions of the non-thermal spark model are:

  • (a1) Isochoric pulse heating.

  • (a2) The gas molar mass remains unchanged during the pulse.

  • (a3) The vibrational heat capacity has a linear-constant profile.

The pulse model for non-thermal sparks is taken from [Castela2016] for air discharges. A fraction delta_uh of the pulse energy ΔE_pulse goes to trans-rotational ultrafast heating. Another fraction delta_sh of the pulse energy goes to vibrational excitation in the case of molecular gases only (the subscript “uh-sh” stands for ultrafast and slow heating). The rest of the energy goes to molecule dissociation or acoustics. After the pulse, the plasma is neither at thermal equilibrium nor chemical equilibrium. Equilibrium is reached during the interpulse, with a timescale much longer than the pulse duration.

Parameters:

inputs (NonThermalSparkInputs) – Inputs for the non-thermal spark model.

Notes

The non-thermal spark model is based on the equations (Eq. 2, 4, 7), of [Roger2026].

\[ \begin{align}\begin{aligned}\begin{split}T_k = T_{ini} + \frac{\theta_{uh} \Delta E_{pulse}}{V_d \rho_{ini} c_{v, tr, rot}} \\\end{split}\\\begin{split}P_k = P_{ini} \frac{T_k}{T_{ini}} \\\end{split}\\\begin{split}\Delta e_{sh} = \theta_{sh} \frac{\Delta E_{pulse}}{V_d \rho_{ini}} \\\end{split}\\\begin{split}T_k^{vib} = \begin{cases} \frac{\Delta e_{sh}}{c_{v, vib, max}} + T_{ini} & \text{if } T_{ini} \geq \Theta_{vib} \\ \frac{\Delta e_{sh}}{c_{v, vib, max}} + \frac{\Theta_{vib}}{2} + \frac{T_{ini}^2}{2 \Theta_{vib}} & \text{if } \frac{\Delta e_{sh}}{c_{v, vib, max}} > \frac{\Theta_{vib}^2 - T_{ini}^2}{2 \Theta_{vib}} \\ \sqrt{ \frac{2 \Theta_{vib} \Delta e_{sh}}{c_{v, vib, max}} + T_{ini}^2} & \text{otherwise} \end{cases}\end{split}\end{aligned}\end{align} \]

where:

  • \(V_d = \pi R_d^2 L\) is the discharge volume,

  • \(\rho_{ini}\) is the initial mass density,

  • \(c_{v, tr, rot}\) is the specific trans-rotational heat capacity,

  • \(\theta_{uh}\) is the fraction of the pulse energy that goes to ultrafast heating.

The composition is assumed to be unchanged during the non-thermal spark.

solve() → PulseOutputs#