rizer.state_equation.polytropic_volume#

Polytropic pressure-relaxation volume law.

P V^k = const, with P relaxing toward an external pressure on the acoustic (rarefaction) timescale.

Functions#

polytropic_volume_rate(→ tuple[float, float])

Return (dV/dt, k) for the polytropic pressure-relaxation volume law.

Module Contents#

rizer.state_equation.polytropic_volume.polytropic_volume_rate(plasma: cantera.Solution, V: float, radius: float, polytropic_index: float | str, p_ext: float) → tuple[float, float]#

Return (dV/dt, k) for the polytropic pressure-relaxation volume law.

For a polytropic process, the volume is related to the pressure by:

\[P V^k = \text{constant}\]

Differentiating this equation with respect to time gives the following relation between the volume and pressure derivatives, where the pressure is assumed to relax towards the external pressure with a time scale \(\tau_{rarefaction}\):

\[\frac{dV}{dt} = - \frac{V}{k P} \frac{dP}{dt} = \frac{V}{k P} \frac{P - P_{ext}}{\tau_{rarefaction}}\]

where:

  • \(k\) is the polytropic index,

  • \(P_{ext}\) is the external pressure, in Pa,

  • \(\tau_{rarefaction}\) is the rarefaction time scale, in s.

Parameters:
  • plasma (cantera.Solution) – Cantera plasma object (already at its current Tg/Te/composition).

  • V (float) – Current volume [m^3].

  • radius (float) – Current plasma radius [m], used for the acoustic rarefaction timescale (tau_rarefaction = radius / c_sound).

  • polytropic_index (float or "gamma") – Polytropic index k. "gamma" uses the current adiabatic index cp_mass / cv_mass. Must not be 0.0 or np.inf – callers handle np.inf (constant volume) themselves without calling this function; 0.0 is rejected here, see Raises.

  • p_ext (float) – External pressure [Pa] the plasma pressure relaxes toward.

Returns:

(dV_dt, k) – volume rate [m^3/s] and the resolved numeric polytropic index (with "gamma" already resolved to a number).

Return type:

tuple of float, float

Raises:

ValueError – If polytropic_index == 0.0 – isobaric (\(P V^0 = P =\) constant) provides no constraint on dV/dt at all, and the formula below divides by k. A genuine isobaric case needs P held fixed and dV/dt derived from the energy/species equations instead (enthalpy-based energy balance, no separate dV/dt needed there) – not implemented; reject explicitly rather than return NaN/Inf.