|
STAR
Cal STAR — firmware, DAQ server, and engine design
|
Variables | |
| M = Provenance.MANUFACTURER | |
| WATER = FlowConditions(rho=999.0, mu=1.138e-3, p_upstream=1.0e6) | |
The component library's seams, exercised from outside. Same purpose as the property layer's modularity tests: "nothing hardcoded" decays silently, because adding a special case is always the cheap move and nothing fails when a seam stops working -- the code still runs, it just can no longer be extended without editing it. Three seams here, and one principle: * ``register_fitting`` -- a loss correlation the package never shipped. * ``register_builder`` -- the physics behind a (type, model) pair, which is how a component type declared in ``components.toml`` acquires behaviour. * ``options`` -- categorical configuration, of which the friction correlation is the one this phase cared about most. And the principle: **measured data supersedes the correlation**, for every component type, from the first phase that has components at all.
|
protected |
A deliberately steep measured curve, so 'did the data win?' is obvious.
Definition at line 48 of file test_comps_modularity.py.
Referenced by test_measured_data_never_falls_back_to_a_correlation(), and test_measured_data_supersedes_the_correlation_for_every_type().
| None test_comps_modularity.test_a_curve_must_declare_its_provenance_and_dimensions | ( | ) |
Same rules as a scalar: where it came from, and what it measures.
Definition at line 214 of file test_comps_modularity.py.
| None test_comps_modularity.test_a_declared_model_with_no_physics_fails_clearly | ( | ) |
The honest failure when a schema is ahead of the implementation. ``components.toml`` can declare a model before Phase 03 implements it. That should say so, naming what *is* implemented, rather than failing somewhere inside a solve.
Definition at line 117 of file test_comps_modularity.py.
| None test_comps_modularity.test_a_fitting_correlation_can_be_added_from_outside | ( | ) |
A loss coefficient this package never shipped, selected by config.
Definition at line 63 of file test_comps_modularity.py.
| None test_comps_modularity.test_a_tabulated_characteristic_without_its_curve_fails_clearly | ( | ) |
Definition at line 255 of file test_comps_modularity.py.
| None test_comps_modularity.test_a_tabulated_valve_characteristic_comes_from_a_curve | ( | ) |
Cv against travel, as a manufacturer's chart or a bench test gives it.
Definition at line 232 of file test_comps_modularity.py.
| None test_comps_modularity.test_an_unknown_fitting_lists_what_exists | ( | ) |
Definition at line 72 of file test_comps_modularity.py.
| None test_comps_modularity.test_evaluating_residuals_without_a_conditions_provider_says_so | ( | ) |
Phase 04 supplies it; until then the failure should be legible.
Definition at line 308 of file test_comps_modularity.py.
| None test_comps_modularity.test_every_shipped_type_and_model_has_physics | ( | ) |
The reverse gap: a schema model with nothing behind it. Catches the declaration and the implementation drifting apart, which is the predictable cost of keeping schemas in data and physics in code.
Definition at line 141 of file test_comps_modularity.py.
| None test_comps_modularity.test_measured_data_never_falls_back_to_a_correlation | ( | ) |
Off its range it does not switch to a correlation. Silently switching to a correlation halfway up a flow sweep would put a kink in the result that nobody asked for and nobody would see. It is continued in its own measured shape, ``dp ~ mdot^2`` from the last point, and the diagnostics say the point was not measured (see test_measured_off_curve: raising here made a sweep that did not start at zero unsolvable).
Definition at line 189 of file test_comps_modularity.py.
References _measured_curve().
| None test_comps_modularity.test_measured_data_supersedes_the_correlation_for_every_type | ( | str | type_name | ) |
The Phase 12 principle, available from the phase that has components. A measured curve replaces the correlation outright. Note the contrast with the property layer, where measured data falls *through* to an equation of state outside its range: a property has a defensible fallback and a component does not.
Definition at line 164 of file test_comps_modularity.py.
References _measured_curve().
| None test_comps_modularity.test_physics_can_be_registered_for_a_new_type_model_pair | ( | ) |
How a component declared in components.toml acquires behaviour.
Definition at line 96 of file test_comps_modularity.py.
| None test_comps_modularity.test_shipped_fittings_all_produce_a_finite_coefficient | ( | ) |
Every registered adapter is actually callable with the uniform context. The registry's whole point is that correlations with very different ``fluids`` signatures are reachable through one shape. An adapter that unpacks the context wrongly fails here rather than the first time somebody selects that fitting in a config.
Definition at line 78 of file test_comps_modularity.py.
| None test_comps_modularity.test_the_measured_model_says_what_it_needs | ( | ) |
Definition at line 209 of file test_comps_modularity.py.
| None test_comps_modularity.test_the_residual_form_agrees_with_the_causal_one | ( | ) |
The provisional protocol, checked against the physics it wraps. ``residuals`` is expected to move when Phase 04 assembles a real Jacobian. What must not move is this: whatever shape the solver interface takes, it has to agree with ``pressure_drop``, which is the form validated against published results. This test is the bridge, and it is the one to re-run when that interface changes.
Definition at line 271 of file test_comps_modularity.py.
| test_comps_modularity.M = Provenance.MANUFACTURER |
Definition at line 44 of file test_comps_modularity.py.
| test_comps_modularity.WATER = FlowConditions(rho=999.0, mu=1.138e-3, p_upstream=1.0e6) |
Definition at line 45 of file test_comps_modularity.py.