rizer.hybrid.roger_engineering_model#

Classes#

RogerModel

Engineering model for discharge and post-discharge of non-equilibrium and thermal spark.

Functions#

load_roger_model_from_dict(→ RogerModel)

Load a RogerModel from a dictionary of parameters.

Module Contents#

class rizer.hybrid.roger_engineering_model.RogerModel(ΔE_pulse: float, r_0: float, L_gap: float, T_0: float, P_0: float, X_0: str, T_amb: float, P_amb: float, X_amb: str, mechanism_path: str, spark_regime: str, alpha_model: str, scenario_thermal_spark: str | None = None, theta_uh: float | None = None, theta_sh: float | None = None, Theta_vib: float | None = None, cv_vib_max: float | None = None, n_freedom: int | None = None, tau_VT: float | None = None, u_flow: float = 0.0, alpha_constant: float | None = None, alpha_file_gas_name: str | None = None, alpha_file_pressure_atm: int | None = None, alpha_file_source: str | None = None, alpha_thermo_transport_data: rizer.io.thermo_transport_data_reader.ThermoTransportDataReader | None = None, alpha_nb_zeros_to_use: int = 100, diffusion_model: str = 'simple_model')#

Engineering model for discharge and post-discharge of non-equilibrium and thermal spark.

This model is based on the equations of [Roger2026].

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

The discharge is supposed to follow several distinct phases:

  • Energy deposition phase (up to ~10 ns): the plasma kernel is formed and heated by the energy deposition from the electric field. The temperature rises very quickly, up to several tens of thousands of Kelvin. The pressure also rises, but more slowly than the temperature. The discharge volume remains constant (isochoric process) during this phase.

  • Expansion phase (from ~10 ns to ~1 µs): the plasma kernel expands due to the high temperature and pressure. The temperature decreases due to the expansion, but can still be very high (several thousands of Kelvin). The pressure also decreases to atmospheric pressure. The discharge volume increases during this phase, and pressure and temperature are roughly uniform inside the discharge.

  • Vibration relaxation phase (from ~100 ns to ~10 µs): If the spark regime is thermal, this phase is not present. The pressure remains constant at atmospheric pressure and volume remains constant (isochoric process). The gas temperature can increase due to the relaxation of vibrational energy (which may be higher than the translational energy at the end of the expansion phase, in the case of a non-thermal spark regime).

  • Diffusion phase (from ~1 µs to ~100 µs): the temperature continues to decrease due to thermal diffusion. The volume can increase due to diffusion, but the pressure remains constant at atmospheric pressure. At this point, the uniformity of the temperature in the discharge is not guaranteed anymore (the model only predicts the temperature and pressure at the center of the discharge, which can be different from the temperature and pressure at the edge of the discharge).

  • Recirculation phase (from ~10 µs to ~1 ms): Depending on the conditions, the discharge can recirculate (i.e. the hot gas can get expelled from the center of the discharge, creating a vortex). This cools down the center of the discharge, but can create hot spots at the edge of the discharge. The model does not predict the temperature and pressure outside the center of the discharge.

Parameters:
  • ΔE_pulse (float) – Energy deposited during the spark pulse [J].

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

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

  • T_0 (float) – Initial temperature of the discharge [K].

  • P_0 (float) – Initial pressure of the discharge [Pa].

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

  • T_amb (float) – Temperature of the surrounding gas outside the kernel [K].

  • P_amb (float) – Pressure of the surrounding gas outside the kernel [Pa].

  • X_amb (str) – Composition of the surrounding gas outside the kernel. Cantera format (e.g., “O2:0.21, N2:0.79”).

  • mechanism_path (str) – Thermodynamic data file (Cantera/NASA9 format), in ./data/thermo/.

  • spark_regime (str) –

    Spark regime. Either thermal or non_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.

    • non_thermal: Non-thermal spark model, taken from [Castela2016]. A fraction theta_uh of the pulse energy ΔE_pulse 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.

  • alpha_model (str) –

    Model for the thermal diffusivity during the diffusion phase. Either:

    • constant for constant diffusivity (alpha_constant must be provided).

    • file to read the diffusivity from a file located in ./data/transport/.

  • scenario_thermal_spark (str, optional) –

    Scenario for the thermal spark regime. Either:

    • LTE: Local Thermodynamic Equilibrium, where the composition is assumed to be in equilibrium at each time step and is computed using the current temperature and pressure.

    • frozen: The composition is frozen and does not change with time.

  • theta_uh (float, optional) – Fraction of the deposited energy that goes to trans-rotational ultrafast heating. Only used if spark_regime is “non_thermal”.

  • theta_sh (float, optional) – Fraction of the deposited energy that goes to vibrational heating. Only used if spark_regime is “non_thermal”.

  • Theta_vib (float, optional) – Characteristic vibrational temperature of the gas mixture [K]. Only used if spark_regime is “non_thermal”.

  • cv_vib_max (float, optional) – Maximum vibrational specific heat capacity per unit mass [J/kg/K]. Only used if spark_regime is “non_thermal”.

  • n_freedom (int, optional) –

    Number of degrees of freedom for the translational and rotational energy.

    • For atoms, this is typically 3 (translational only),

    • For linear molecules and diatomic molecules, this is typically 5 (3 translational + 2 rotational),

    • For non-linear molecules, this is typically 6 (3 translational + 3 rotational).

    Only used if spark_regime is “non_thermal”.

  • tau_VT (float, optional) – Characteristic time scale for vibrational-translational relaxation [s]. Only used if spark_regime is “non_thermal”.

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

  • alpha_constant (float, optional) – Thermal diffusivity of the gas mixture [m^2/s]. Should be provided if alpha_model is set to constant.

  • alpha_file_gas_name (str, optional) – Name of the gas mixture for which the thermal diffusivity file is provided. Should be provided if alpha_model is set to file. See ./data/transport/ for available files and formats.

  • alpha_file_pressure_atm (int, optional) – Pressure at which the thermal diffusivity file is valid [atm]. Should be provided if alpha_model is set to file. See ./data/transport/ for available files and formats.

  • alpha_file_source (str, optional) – Source or reference for the thermal diffusivity data file. Should be provided if alpha_model is set to file. See ./data/transport/ for available files and formats.

  • alpha_thermo_transport_data (ThermoTransportDataReader, optional) – ThermoTransportDataReader object containing the thermal diffusivity data as a function of temperature. If provided, it will be used directly instead of reading from a file. Should be provided if alpha_model is set to ThermoTransportDataReader. This allows to directly use the thermo-transport data loaded for the gas mixture, without having to read it again from a file.

  • alpha_nb_zeros_to_use (int, optional) – Number of zeros of the Bessel function of the first kind of order 0 to use in the computation of the temperature during the diffusion phase. Default is 100.

  • diffusion_model (str, optional) – Model to compute the temperature during the diffusion phase.

Examples

spark_regime#
pulse_output: rizer.hybrid.engineering_model.dataclass.pulse.PulseOutputs#
expansion_input#
expansion_model#
diffusion_input#
diffusion_model#
recirculation_input#
recirculation_model#
solve(times: numpy.ndarray, solve_up_to: str = 'recirculation', plot: bool = False) rizer.hybrid.engineering_model.dataclass.base.TimeSeriesState#

Solve the model up to the specified stage and plot the results.

Parameters:
  • times (numpy.ndarray) – Time points to evaluate the model [s]

  • solve_up_to (str, optional) – Stage up to which to solve the model. Must be one of ‘expansion’, ‘VT_relaxation’, ‘diffusion’, or ‘recirculation’. Default is ‘recirculation’.

  • plot (bool, optional) – Whether to plot the results. Default is False.

T(t: float) float#

Temperature at time t.

P(t: float) float#

Pressure at time t.

rizer.hybrid.roger_engineering_model.load_roger_model_from_dict(input_dict: dict) RogerModel#

Load a RogerModel from a dictionary of parameters.

This is a helper function to load the model from a YAML file, where the parameters are stored in a nested dictionary.

Parameters:

input_dict (dict) – Dictionary containing the parameters for the RogerModel. Should have the same structure as the nanosecond_model section of the input YAML file.

Returns:

An instance of the RogerModel initialized with the parameters from the input dictionary.

Return type:

RogerModel