rizer.misc.simulation.post_process_quantities#
Physical-quantity compute functions for the post-process registry.
Each function is a pure ct.SolutionArray -> dict[str, numpy.ndarray] transform,
run once by rizer.misc.simulation.post_process_io.postprocess_and_save() right
after a simulation finishes (see rizer.misc.simulation.post_process_registry),
so both the matplotlib renderer (SimulationPlotter)
and the Rizer Spice backend’s web renderer read the same stored value instead of
recomputing it independently.
Functions#
|
Compute the mole fraction of every species in states. |
|
Compute plasma current and cumulated Joule energy. |
|
Compute the inelastic-to-elastic collisional power ratio. |
|
Compute the Maxwellian-distribution validity ratios (Mitchner VIII-3.8/3.12). |
|
Compute the reduced electric field E/N. |
Module Contents#
- rizer.misc.simulation.post_process_quantities.compute_mole_fractions(states: cantera.SolutionArray) dict[str, numpy.ndarray]#
Compute the mole fraction of every species in states.
- Parameters:
states (
cantera.SolutionArray) – Simulation state array.- Returns:
{"X_<species>": mole_fraction}for every species in states.species_names, dimensionless (0-1).- Return type:
dictofstrtonumpy.ndarray
- rizer.misc.simulation.post_process_quantities.compute_voltage_current_energy(states: cantera.SolutionArray) dict[str, numpy.ndarray]#
Compute plasma current and cumulated Joule energy.
- Parameters:
states (
cantera.SolutionArray) – Simulation state array with V_p [V] and R_p [Ohm] columns.- Returns:
“I_p” : Plasma current [A], via Ohm’s law on the plasma branch: V_p / R_p. “E_p” : Cumulated Joule energy [J]: cumsum(I_p * V_p * dt), where dt is each sample’s own spacing (numpy.diff(states.t, prepend=states.t[0])) rather than a single constant step, so the integral stays correct even where the time array is not uniformly spaced (e.g. the last sample of a radius-change segment).
- Return type:
dictofstrtonumpy.ndarray
- rizer.misc.simulation.post_process_quantities.compute_power_ratio(states: cantera.SolutionArray) dict[str, numpy.ndarray]#
Compute the inelastic-to-elastic collisional power ratio.
- Parameters:
states (
cantera.SolutionArray) – Simulation state array with P_inelastic and P_elastic columns [W/m^3].- Returns:
“power_ratio” : P_inelastic / P_elastic, elementwise, dimensionless.
- Return type:
dictofstrtonumpy.ndarray
- rizer.misc.simulation.post_process_quantities.compute_maxwellian_validity(states: cantera.SolutionArray) dict[str, numpy.ndarray]#
Compute the Maxwellian-distribution validity ratios (Mitchner VIII-3.8/3.12).
- Parameters:
states (
cantera.SolutionArray) – Simulation state array with cond_maxwell_1, cond_maxwell_2 [1/kg/s], T_e [K], P_Joule [W/m^3], and n_e [m^-3] columns.- Returns:
“nu_ee” : Electron-electron collision frequency [1/s]: cond_maxwell_1 * m_e. “v_th_e” : Electron thermal speed [m/s]: sqrt(8 k_b T_e / (pi m_e)). “maxwellian_condition_1” : Eq 3.8 validity ratio [-]: cond_maxwell_2 / cond_maxwell_1. “maxwellian_condition_3” : Eq 3.12 validity ratio [-]: P_Joule / (n_e m_e v_th_e^2 nu_ee).
- Return type:
dictofstrtonumpy.ndarray
- rizer.misc.simulation.post_process_quantities.compute_reduced_electric_field(states: cantera.SolutionArray) dict[str, numpy.ndarray]#
Compute the reduced electric field E/N.
- Parameters:
states (
cantera.SolutionArray) – Simulation state array with V_p [V], gap [m], P [Pa], and T [K] columns.- Returns:
“E_over_N” : Reduced electric field [V.m^2]: E / N, with E = V_p / gap [V/m] and N = P / (k_b T) [m^-3]. 1 Td = 1e-21 V.m^2.
- Return type:
dictofstrtonumpy.ndarray