1"""The parameter and component model: "nothing hardcoded", as a type.
3Every number describing hardware is a :class:`Param` -- a value, the unit it was
4written in, where it came from, and how well it is known::
6 from feedtwin.model import Param, Provenance
8 Param(1.2, "Cv", Provenance.MANUFACTURER, "SS-8BK-V51 datasheet rev C")
10There is no default for the source. A number with no provenance is a validation
11error, because "nobody remembers where this came from" is the state this layer
12exists to make impossible -- and it is the state most of a propulsion team's
13numbers are in by the second year.
17:mod:`~feedtwin.model.units`
18 Conversion at the boundary and dimension checking. Author in psi and
19 inches; the solver sees SI floats. A pressure written where a length
20 belongs fails at load with both dimensions named.
22:mod:`~feedtwin.model.param`
23 :class:`Param`, :class:`Provenance`, :class:`Uncertainty`, and the report
24 helpers that turn a pile of parameters into "nine measured, four datasheet,
27:mod:`~feedtwin.model.spec`
28 :class:`ComponentSpec` -- what a kind of component has. Loaded from
29 ``components.toml``, so a component's schema is data and only its physics is
30 code. Validation, the Phase 10 inspector and the generated parameter tables
31 all read this one declaration.
33:mod:`~feedtwin.model.segments`
34 :class:`LineSegment` and the loss-method ladder -- how a line's resistance
35 is known, and which of several statements of it wins.
37:mod:`~feedtwin.model.component`
38 :class:`ComponentInstance`, one configured piece of hardware, and the
39 provisional :class:`Component` protocol that Phase 03 implements against.
41:mod:`~feedtwin.model.catalog`
42 Part numbers to parameters, with datasheet values and measurements kept
43 separately so the difference between them stays visible.
45Serialisation is TOML in, plain dicts through, JSON for exact round-trips.
46Deliberately not YAML: PyYAML parses ``1e-3`` as the *string* ``"1e-3"``, which
47in a config full of orifice diameters is a silent, load-bearing bug.
50from __future__
import annotations
83 register_component_spec,
84 registered_component_types,
129 "get_component_spec",
131 "load_component_specs",
134 "provenance_summary",
135 "register_component_spec",
137 "registered_component_types",