|
STAR
Cal STAR — firmware, DAQ server, and engine design
|
Classes | |
| class | InfeasibleOperatingPoint |
| class | FlowConditions |
| class | Violation |
| class | HydraulicComponent |
Functions | |
| None | register_builder (str type_name, str model, Builder builder) |
| HydraulicComponent | build_component (ComponentInstance instance) |
| list[tuple[str, str]] | registered_builders () |
Variables | |
| float | R_UNIVERSAL = 8.31446261815324 |
| Builder = Callable[[ComponentInstance], HydraulicComponent] | |
| dict | _BUILDERS = {} |
What every hydraulic component is, and how one gets built. Each component exposes its physics **twice**, and the split is deliberate. ``pressure_drop(mdot, flow)`` is the causal form: given a mass flow and the fluid's state, what is the loss. Most liquid plumbing genuinely is this -- a pipe's Δp is a function of ṁ -- and it is the form that can be checked against a worked example in a book without a solver in the way. Every validation test in this phase calls it. ``residuals(ctx)`` is the acausal form the network solver will consume, and it is derived from the first for simple components. Components whose behaviour is *not* a function -- a check valve with a discrete open state, a regulator whose poppet has its own dynamics -- override it. The protocol is still provisional (see :mod:`feedtwin.model.component`). Phase 04 assembles a real Jacobian against it and is expected to reshape it. Keeping the physics in ``pressure_drop`` is what makes that cheap: when the solver interface moves, this module's ``residuals`` adapters move and no correlation is touched.
| HydraulicComponent feedtwin.comps.base.build_component | ( | ComponentInstance | instance | ) |
| None feedtwin.comps.base.register_builder | ( | str | type_name, |
| str | model, | ||
| Builder | builder ) |
Register the physics for one (component type, fidelity model) pair. Keyed on both because that pair is exactly what a fidelity model *is*: an orifice evaluated with a fixed discharge coefficient and the same orifice evaluated through ISO 5167 are different physics behind one declaration.
| list[tuple[str, str]] feedtwin.comps.base.registered_builders | ( | ) |
| feedtwin.comps.base.Builder = Callable[[ComponentInstance], HydraulicComponent] |