STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
test_cstar_fluid_props_plumbing.py
Go to the documentation of this file.
1"""The c* vaporization march gets the config's own liquid properties, for BOTH propellants.
2
3The chamber solver used to pass only four fuel keys with RP-1 fallbacks (boiling point 489 K,
4latent heat 300 kJ/kg, MW 170) and no oxidizer properties at all, so the march took LOX as
5vaporized at the face and the fuel's cp and injection temperature as assumed values.
6"""
7import pytest
8
9
10
11def _solver():
12 from engine.pipeline.io import load_config
13 from engine.core.runner import PintleEngineRunner
14 cfg = load_config("configs/ethalox_6500N.yaml")
15 return cfg, PintleEngineRunner(cfg)
16
17
19 cfg, runner = _solver()
20 solver = runner.solver
21 fuel, ox = solver._get_fuel_props(), solver._get_ox_props()
22 assert fuel["boiling_point"] == pytest.approx(cfg.fluids["fuel"].boiling_point)
23 assert fuel["latent_heat"] == pytest.approx(cfg.fluids["fuel"].latent_heat)
24 assert fuel["specific_heat"] == pytest.approx(cfg.fluids["fuel"].specific_heat)
25 assert ox["boiling_point"] == pytest.approx(cfg.fluids["oxidizer"].boiling_point)
26 assert ox["molecular_weight"] == pytest.approx(cfg.fluids["oxidizer"].molecular_weight)
27
28
30 monkeypatch.setenv("ED_ACCEL", "off")
31 _, runner = _solver()
32 r = runner.evaluate(584.27 * 6894.757, 584.27 * 6894.757, P_ambient=94070.0, silent=True)
33 ce = r["diagnostics"]["cstar_efficiency"]
34 assumed = [a for a in (ce.get("assumptions") or [])
35 if "vaporization" in str(a.get("name", a) if isinstance(a, dict) else a)]
36 assert assumed == []
37 assert ce["T_surface_O"] < 154.6 # LOX drops evaporate below its critical temperature