rizer.hybrid.engineering_model#

Attributes#

u

Classes#

RogerModel

Class to model post-discharge of non-thermal and thermal spark phenomena and related calculations.

Module Contents#

rizer.hybrid.engineering_model.u#
class rizer.hybrid.engineering_model.RogerModel(T_out: float, P_out: float, T_ini: float, P_ini: float, X_ini: str, mechanism_path: pathlib.Path, thermo_transport_data: rizer.io.thermo_transport_data_reader.ThermoTransportDataReader, R_d_ini: float, L: float, spark_regime: str, ΔE_pulse_J: float, theta_uh: float | None = None, n_freedom: int | None = None, Theta_vib_K: float | None = None, theta_sh: float | None = None, cv_vib_max: float | None = None, tau_VT: float | None = None, u_flow: float = 0.0, log: bool = False)#

Class to model post-discharge of non-thermal and thermal spark phenomena and related calculations.

This model is based on the equations from Roger et al. (2025), “An Engineering Model for Temperature and Pressure Evolution during and after Nanosecond Discharges”

Note that Edouard’s model is calibrated on CFD calculations where initial conditions are perfectly symmetric (e.g. not representative of repetitive pulses with turbulence & hot spots from previous pulses).

Also note that these are mostly correlations for the mean temperature and pressure along the inter-electrode axis (mean over z of T(r=0,z,t) and P(r=0,z,t), for z in [0, L]), which happened to be representative of the (uniform) kernel for the energy deposition phase, and expansion regime. For more details, see the discussion at: spark-cleantech-l3/rizer#111

Parameters:
  • T_out (float) – Outside temperature [K].

  • P_out (float) – Outside pressure [Pa].

  • T_ini (float) – Initial temperature [K].

  • P_ini (float) – Initial pressure [Pa].

  • X_ini (str) – Initial composition. Cantera format (e.g., “CH4:1.0”).

  • mechanism_path (Path) – Path to Cantera mechanism file.

  • thermo_transport_data (ThermoTransportDataReader) – ThermoTransportDataReader instance for transport properties.

  • R_d_ini (float) – Initial discharge radius [m].

  • L (float) – Discharge length [m].

  • spark_regime (str) –

    Type of spark regime (‘non-thermal’ or ‘thermal’).

    • ”thermal”: Thermal spark model. All the deposited energy is converted into internal energy (translational, rotational, vibrational, electronic, and chemical energy) during the pulse. The gas is assumed to be at chemical equilibrium. For details, see RogerModel.thermal_spark().

    • ”non-thermal”: Non-thermal spark model, taken from [Castela2016]. A fraction theta_uh of the pulse energy ΔE_pulse_J goes to trans-rotational ultrafast heating. Another fraction theta_sh of the pulse energy goes to vibrational excitation in the case of molecular gases only. The rest of the energy goes to molecule dissociation or acoustics. For details, see RogerModel.non_thermal_spark(). This model requires additional parameters: theta_uh, n_freedom, Theta_vib_K, theta_sh, cv_vib_max and tau_VT.

  • ΔE_pulse_J (float) – Energy of the spark pulse [J].

  • theta_uh (float, optional) – Energy partition parameter for non-thermal spark [0-1]. Only used if spark_regime is “non-thermal”.

  • n_freedom (int, optional) – Number of degrees of freedom for non-thermal spark. Only used if spark_regime is “non-thermal”.

  • Theta_vib_K (float, optional) – Characteristic vibrational temperature for non-thermal spark [K]. Only used if spark_regime is “non-thermal”.

  • theta_sh (float, optional) – Energy partition parameter for vibrational excitation in non-thermal spark [0-1]. Only used if spark_regime is “non-thermal”.

  • cv_vib_max (float, optional) – Maximum vibrational heat capacity for non-thermal spark [J/K/kg]. Only used if spark_regime is “non-thermal”.

  • tau_VT (float, optional) – Time constant for vibrational relaxation in non-thermal spark [s]. Only used if spark_regime is “non-thermal”.

  • u_flow (float, optional) – Flow velocity [m/s]. Default is 0.0.

  • log (bool, optional) – Enable logging if True. Default is False.

  • minigallery: (..) – rizer.hybrid.engineering_model.RogerModel:

mechanism_path#
thermo_transport_data#
T_out#
P_out#
M_out#
gamma_out#
c_out#
T_ini#
P_ini#
X_ini#
gas#
rho_ini#
M_ini#
R_d_ini#
L#
V_d#
u_flow = 0.0#
ΔE_pulse_J#
spark_regime#
check_input(T_out: float, P_out: float, T_ini: float, P_ini: float, X_ini: str, mechanism_path: pathlib.Path, thermo_transport_data: rizer.io.thermo_transport_data_reader.ThermoTransportDataReader, R_d_ini: float, L: float, spark_regime: str, ΔE_pulse_J: float, theta_uh: float | None, n_freedom: int | None, Theta_vib_K: float | None, theta_sh: float | None, cv_vib_max: float | None, tau_VT: float | None, u_flow: float, log: bool = False) None#
compute_all()#
non_thermal_spark() tuple[float, float, float, float]#

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

The pulse model for non-thermal sparks is taken from [Castela2016] for air discharges. A fraction delta_uh of the pulse energy ΔEpulse 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.

Returns:

  • T_k (float) – Spark temperature [K].

  • P_k (float) – Spark pressure [Pa].

  • T_k_vib (float) – Vibrational temperature [K].

  • M_k (float) – Mean molecular weight [kg/mol].

Notes

The non-thermal spark model is based on the equations from Roger et al. (2025).

\[ \begin{align}\begin{aligned}\begin{split}c_{v, tr, rot} = \frac{n_{freedom}}{2} \frac{R}{M_{ini}} \\\end{split}\\\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} \]
thermal_spark() tuple[float, float, float, float]#

Compute temperature, pressure, vibrational temperature, and molecular weight of a thermal spark.

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

Returns:

  • T_k (float) – Spark temperature [K].

  • P_k (float) – Spark pressure [Pa].

  • T_k_vib (float) – Vibrational temperature [K]. Equal to T_k in thermal spark.

  • M_k (float) – Mean molecular weight [kg/mol].

Notes

The thermal spark model is based on the equations from Roger et al. (2025). 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). The chemical composition is assumed to be at equilibrium.

The energy change is computed as (eq. 7 of Roger):

\[\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)\]

The mass density is kept constant during the thermal spark (eq. 8 of Roger):

\[\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.

static compute_wave_speed(gamma: float, T: float, M: float) float#

Compute the wave speed.

Parameters:
  • gamma (float) – Ratio of specific heats.

  • T (float) – Spark temperature [K].

  • M (float) – Molecular weight [kg/mol].

Returns:

c – Wave speed [m/s].

Return type:

float

Notes

The wave speed is computed using the formula:

\[c = \sqrt{\gamma \frac{R T}{M}}\]
compute_tau_rarefaction(R_d: float, gamma: float, T: float, M: float) float#

Compute the rarefaction time.

Parameters:
  • R_d (float) – Radius of the discharge [m].

  • gamma (float) – Ratio of specific heats.

  • T (float) – Spark temperature [K].

  • M (float) – Molecular weight [kg/mol].

Returns:

tau – Rarefaction time [s].

Return type:

float

Notes

The rarefaction time is computed using the formula (Eq. 13 of Roger):

\[\tau_{rarefaction} = \frac{R_{d, ini}}{\sqrt{\gamma \frac{R T}{M}}}\]
compute_T_rarefaction(T: float, T_out: float, gamma: float) float#

Compute the rarefaction temperature.

Parameters:
  • T (float) – Spark temperature [K].

  • T_out (float) – Outside temperature [K].

  • gamma (float) – Ratio of specific heats.

Returns:

T_r – Rarefaction temperature [K].

Return type:

float

compute_delta_rarefaction(T: float, T_out: float, gamma: float, tau_rarefaction: float) float#

Compute the rarefaction duration.

Parameters:
  • T (float) – Spark temperature [K].

  • T_out (float) – Outside temperature [K].

  • gamma (float) – Ratio of specific heats.

  • tau_rarefaction (float) – Rarefaction time [s].

Returns:

delta – Rarefaction duration [s].

Return type:

float

get_T_TE() float#

Compute the temperature at the end of the thermal equilibrium phase.

Returns:

T_TE – Temperature at the end of the thermal equilibrium phase [K].

Return type:

float

compute_xi_expand(T: float, T_out: float, gamma: float) float#

Compute the expansion parameter xi.

Parameters:
  • T (float) – Spark temperature [K].

  • T_out (float) – Outside temperature [K].

  • gamma (float) – Ratio of specific heats.

Returns:

xi_expand – Expansion parameter.

Return type:

float

compute_thermal_diffusivity(T: float, thermo_transport_data: rizer.io.thermo_transport_data_reader.ThermoTransportDataReader) float#

Compute the thermal diffusivity.

Parameters:
  • T (float) – Temperature [K].

  • thermo_transport_data (ThermoTransportDataReader) – Thermo-transport data reader.

Returns:

alpha – Thermal diffusivity [m^2/s].

Return type:

float

compute_M_s(T: float, T_out: float, gamma: float) float#
compute_tau_shock(R_d: float, c_out: float, M_s: float) float#
compute_Γ(T: float, T_out: float, gamma: float) float#
compute_tau_vortex(L: float, Γ: float) float#

Compute the characteristic time of self-advection tau_vortex.

Parameters:
  • L (float) – The interelectrode length [m].

  • Γ (float) – The total integrated vorticity (as defined by Eq. 39 of Roger et al. (2025)) [m^2/s].

Returns:

Characteristic time of self-advection [s].

Return type:

float

compute_tau_flow(u_flow: float, R_d: float) float#
F_TE(t: float, tau_rarefaction: float, delta_rarefaction: float) float#

Compute the fraction of energy transferred to the thermal equilibrium phase.

Parameters:

t (float) – Time [s].

Returns:

F_TE – Fraction of energy transferred to the thermal equilibrium phase.

Return type:

float

F_advection(t: float, n: float = 2.0) float#
T_1(t: float) float#

Compute the temperature profile during rarefaction.

Parameters:

t (float) – Time [s].

Returns:

T – Temperature at time t [K].

Return type:

float

T_2(t: float) float#
T_3(t: float, N=100) float#
T_4(t: float) float#
T(t: float) float#

Compute the temperature at time t.

Parameters:

t (float) – Time [s].

Returns:

T – Temperature at time t [K].

Return type:

float

P_1(t: float) float#

Compute the pressure profile during rarefaction.

Parameters:

t (float) – Time [s].

Returns:

P – Pressure at time t [Pa].

Return type:

float

P_2(t: float) float#
P_3(t: float) float#
P_4(t: float) float#
P(t: float) float#

Compute the pressure at time t.

Parameters:

t (float) – Time [s].

Returns:

P – Pressure at time t [Pa].

Return type:

float

static beta_1(gamma_k: float) float#

Compute beta_1 parameter.

Parameters:

gamma_k (float) – Ratio of specific heats.

Returns:

beta1

Return type:

float

static beta_2(gamma_k: float) float#
static beta_3(gamma_k: float) float#
static beta_4(gamma_k: float) float#
static beta_5(gamma_k: float) float#
static beta_6(gamma_k: float) float#
static beta_7(gamma_k) float#
static beta_8(gamma_k) float#
static beta_9(gamma_k) float#
static beta_10(gamma_k) float#
static beta_11(gamma_k) float#
static beta_12(gamma_k) float#