|
STAR
Cal STAR — firmware, DAQ server, and engine design
|
Variables | |
| ROOT = Path(__file__).resolve().parents[1] | |
| float | PA = 101325.0 |
The accelerator must distinguish "can't handle this" from "didn't converge".
Both used to surface as a bare None, which made them impossible to tell apart at
the call site or in instrumentation. They mean opposite things:
NOT_HANDLED no implementation exists for this config -- Python is the only
one, so the fallback is mandatory and does real work.
NO_SOLUTION the physics ran and did not converge. Measured over 102 such
candidates, the Python fallback then failed on every one, so that
fallback is re-deriving "infeasible" at full cost.
Only the second is a candidate for ever being short-circuited. Conflating them
would make that change unsafe, because skipping the fallback on NOT_HANDLED would
silently drop every config the accelerator doesn't cover.
The public evaluate/solve/chamber_solve keep the plain-None contract; these tests
also pin that, since every caller keys on `is None`.
| test_accel_outcomes.rig | ( | ) |
Definition at line 31 of file test_accel_outcomes.py.
| test_accel_outcomes.test_converged_is_ok | ( | rig | ) |
Definition at line 41 of file test_accel_outcomes.py.
| test_accel_outcomes.test_non_convergence_is_no_solution | ( | rig | ) |
Tank pressures below the chamber: the physics runs and gives up.
Definition at line 49 of file test_accel_outcomes.py.
| test_accel_outcomes.test_plain_api_still_returns_bare_none_or_result | ( | rig | ) |
Callers key on `is None`; the *_ex split must not have changed that.
Definition at line 86 of file test_accel_outcomes.py.
| test_accel_outcomes.test_solve_and_chamber_solve_discriminate | ( | rig | ) |
Definition at line 75 of file test_accel_outcomes.py.
| test_accel_outcomes.test_unsupported_config_is_not_handled | ( | rig | ) |
Film cooling has no port; the accelerator must say so, not 'no solution'.
Definition at line 61 of file test_accel_outcomes.py.
| float test_accel_outcomes.PA = 101325.0 |
Definition at line 27 of file test_accel_outcomes.py.
| test_accel_outcomes.ROOT = Path(__file__).resolve().parents[1] |
Definition at line 26 of file test_accel_outcomes.py.