62 """Film cooling has no port; the accelerator must say so, not 'no solution'."""
63 from engine
import accel
65 bad = copy.deepcopy(cfg)
66 bad.film_cooling.enabled =
True
67 res, oc = accel.evaluate_ex(bad, r.cea_cache, 4.0e6, 4.0e6, PA)
69 assert oc
is accel.Outcome.NOT_HANDLED, (
70 "an unsupported config must NOT report NO_SOLUTION -- short-circuiting "
71 "that would silently drop the only implementation that can run it"
76 from engine
import accel
78 assert accel.solve_ex(cfg, 4.0e6, 4.0e6, 2.4e6)[1]
is accel.Outcome.OK
79 assert accel.chamber_solve_ex(cfg, r.cea_cache, 4.0e6, 4.0e6)[1]
is accel.Outcome.OK
80 bad = copy.deepcopy(cfg)
81 bad.film_cooling.enabled =
True
82 assert accel.solve_ex(bad, 4.0e6, 4.0e6, 2.4e6)[1]
is accel.Outcome.NOT_HANDLED
83 assert accel.chamber_solve_ex(bad, r.cea_cache, 4.0e6, 4.0e6)[1]
is accel.Outcome.NOT_HANDLED
87 """Callers key on `is None`; the *_ex split must not have changed that."""
88 from engine
import accel
90 ok = accel.evaluate(cfg, r.cea_cache, 4.0e6, 4.0e6, PA)
91 assert isinstance(ok, dict),
"evaluate() must still return the plain result dict"
92 assert accel.evaluate(cfg, r.cea_cache, 1.2e5, 1.2e5, PA)
is None
93 assert isinstance(accel.solve(cfg, 4.0e6, 4.0e6, 2.4e6), tuple)
94 assert isinstance(accel.chamber_solve(cfg, r.cea_cache, 4.0e6, 4.0e6), tuple)