core.mass_balance¶
Right-hand side of the chamber-pressure ODE solved during internal-ballistics simulation. A single control-volume mass balance covers both choked and sub-critical nozzle flow (Seidel 1965, Eq. 35), and is shared by the SRM and LRE state integrations — the caller supplies the appropriate \(\dot{m}_{in}\) (propellant regression for SRM, summed injector flows for LRE).
machwave.core.mass_balance
¶
compute_chamber_pressure_mass_balance(chamber_pressure, external_pressure, mass_flow_in, free_chamber_volume, throat_area, k, R, flame_temperature, discharge_coefficient=1.0)
¶
Right-hand side of the chamber pressure ODE from a control-volume mass balance.
Handles both choked and sub-critical nozzle flow (Seidel 1965, Eq. 35).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
chamber_pressure
|
float
|
Chamber pressure [Pa]. |
required |
external_pressure
|
float
|
External pressure [Pa]. |
required |
mass_flow_in
|
float
|
Mass flow rate into the chamber [kg/s]. |
required |
free_chamber_volume
|
float
|
Chamber free volume [m^3]. |
required |
throat_area
|
float
|
Nozzle throat area [m^2]. |
required |
k
|
float
|
Isentropic exponent of the mix. |
required |
R
|
float
|
Gas constant per molecular weight [J/(kg·K)]. |
required |
flame_temperature
|
float
|
Flame temperature [K]. |
required |
discharge_coefficient
|
float
|
Discharge coefficient. |
1.0
|
Returns:
| Type | Description |
|---|---|
tuple[float]
|
Derivative of chamber pressure with respect to time, as a one-tuple. |