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#
|
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 (
floator"gamma") – Polytropic indexk."gamma"uses the current adiabatic indexcp_mass / cv_mass. Must not be0.0ornp.inf– callers handlenp.inf(constant volume) themselves without calling this function;0.0is 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:
- Raises:
ValueError – If
polytropic_index == 0.0– isobaric (\(P V^0 = P =\) constant) provides no constraint ondV/dtat all, and the formula below divides byk. A genuine isobaric case needsPheld fixed anddV/dtderived from the energy/species equations instead (enthalpy-based energy balance, no separatedV/dtneeded there) – not implemented; reject explicitly rather than return NaN/Inf.