elements.catalog.CompositeElementSpec
elements.catalog.CompositeElementSpec(
name,
sub_elements,
internal_edges,
upstream_sub=0,
downstream_sub=-1,
kind='',
params=dict(),
name_auto=False,
)A convenience element that expands to >= 2 atomic ElementSpec sub-elements.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| name | str | Display name; sub-elements are namespaced under it (orifice.iac). |
required |
| sub_elements | list of ElementSpec | The atomic elements the composite expands to (all atomic – no nesting yet). | required |
| internal_edges | list of (int, int, float or callable) | Directed internal edges (tail_sub, head_sub, area) between sub-elements, by local sub-element index. Each internal edge is an intermediate flow state (no junction needed for a serial chain). An area may be a callable f(a_up, a_down) -> float resolved at expansion from the areas of the composite’s external inflow/outflow edges, so a recipe can size itself relative to the edges it is wired to (areas live on edges, never on elements). |
required |
| upstream_sub | int | Local index of the sub-element the inflow (external head) edge attaches to (default 0, the first sub-element, which keeps the composite’s node id). | 0 |
| downstream_sub | int | Local index of the sub-element the outflow (external tail) edge attaches to (default -1, the last sub-element). | -1 |
| kind | str | A short type label for reporting (e.g. "orifice"); defaults to name. |
'' |
| params | dict | The composite’s own constructor parameters, as passed to its catalog factory (e.g. {"throat_area": 1e-3}). Purely descriptive – the expansion never reads it – but it lets reporting and the UI serialization (:mod:nefes.io.yaml_out) recover the composite as the single element the user specified instead of its expanded internals. |
dict() |