STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
test_chamber_unlit.py
Go to the documentation of this file.
1"""Nothing burns unless both propellants reach the chamber.
2
3A one-sided flow used to be evaluated at mixture ratio zero, which the c* table
4clamps to its leanest point: on the ethalox stand, the step after the LOX tank
5ran dry read 3,480 N from fuel alone. Checked against what happens in a
6chamber: one liquid passing through the throat is not combustion, so the
7chamber is at ambient and makes no thrust -- for the CEA chamber and for an
8engine card alike.
9"""
10
11from __future__ import annotations
12
13import pytest
14
15from feedtwin.engine.chamber import MIN_CHAMBER_FLOW, Chamber, CombustionState
16
17
18class _Table:
19 """c* 1500 m/s and Cf 1.5 at any pressure and any O/F -- including zero,
20 which is what made a fuel-only flow burn."""
21
22 def combustion(self, pressure: float, mixture_ratio: float) -> CombustionState:
23 return CombustionState(cstar=1500.0, thrust_coefficient=1.5)
24
25
26@pytest.fixture
27def chamber() -> Chamber:
28 return Chamber(throat_area=4.0e-4, cstar_model=_Table())
29
30
31def test_both_propellants_burn(chamber: Chamber) -> None:
32 lit = chamber.evaluate(1.9, 1.1)
33 assert lit.thrust > 5000.0
34 assert lit.pressure > 10 * chamber.ambient_pressure
35
36
37@pytest.mark.parametrize("ox, fuel", [(0.0, 1.8), (1.9, 0.0), (MIN_CHAMBER_FLOW, 1.8)])
39 chamber: Chamber, ox: float, fuel: float
40) -> None:
41 result = chamber.evaluate(ox, fuel)
42 assert result.thrust == 0.0
43 assert result.specific_impulse == 0.0
44 assert result.pressure == chamber.ambient_pressure
45 assert result.mdot_total == pytest.approx(ox + fuel), "the liquid still leaves"
CombustionState combustion(self, float pressure, float mixture_ratio)
None test_one_propellant_alone_is_unlit(Chamber chamber, float ox, float fuel)
None test_both_propellants_burn(Chamber chamber)