STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
feedtwin.session.diagnostics Namespace Reference

Classes

class  SolverRecord

Functions

frozenset[str] boundary_nodes (Network net, Iterable[str] vessel_nodes)
tuple[float, float] crossing (Network net, Mapping[str, float] flows, frozenset[str] boundary)

Detailed Description

What the solver did each tick, and whether mass was kept: the solver tab.

A run that converges, plots smoothly and violates no assertion is not evidence
(docs/PHYSICS-BENCHMARK.md opens with that). This is the other half: the
numbers a CFD code shows beside every answer, so a person can see when one is
not to be trusted.

Per tick, a :class:`SolverRecord`:

* **Newton.** How many coupling steps the tick took, the network iterations
  they cost, the worst scaled residual and whether every solve converged.
* **Continuity.** The worst net mass imbalance at any free node of the network
  [kg/s] -- the solve's own conservation, which a converged solve can still
  violate if its tolerance is loose.
* **Chamber closure.** How far apart the network's flow and the engine's
  chamber pressure were left [psi].
* **Global mass balance.** Everything held in the vessels, against everything
  that crossed the stand's boundary: the engine, vents, a drawn supply, and the
  built-in loads and charges. Cumulative, so a leak of micrograms a step shows
  as a line that drifts. Zero is the only right answer.
* **Integrator guards.** What the vessels' own floors and clamps changed beyond
  what their rates said -- mass [kg] and ullage energy [J], cumulative. Each
  guard is physics (a vent cannot pull a tank below atmosphere), but each one
  changes the inventory, and seeing how much is the point.

Read-only: nothing here changes a step.

Function Documentation

◆ boundary_nodes()

frozenset[str] feedtwin.session.diagnostics.boundary_nodes ( Network net,
Iterable[str] vessel_nodes )
Fixed-pressure nodes that are not a vessel's: atmosphere at a vent, the
chamber, a drawn source the session does not integrate.

Definition at line 93 of file diagnostics.py.

◆ crossing()

tuple[float, float] feedtwin.session.diagnostics.crossing ( Network net,
Mapping[str, float] flows,
frozenset[str] boundary )
``(in, out)`` [kg/s] across the boundary, from one solve's flows.

A branch between two boundary nodes carries nothing the stand holds, and a
branch with neither end on the boundary is internal; only a branch with
exactly one end there crosses it.

Definition at line 104 of file diagnostics.py.