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

Functions

object _measured (str tag)
None _ethanol (Network net, *tuple[str, float|None] nodes)
None test_a_sweep_that_brackets_the_answer_solves ()
None test_a_capped_measured_stub_back_fills_without_raising ()
None test_off_the_ends_is_continued_quadratically_and_flagged ()

Variables

float PSI = 6894.757293168361
 BENCH

Detailed Description

A measured component whose flow-bench sweep does not start at zero.

Flow benches rarely measure at zero flow, and a Newton solve starts every
branch at 1 g/s and probes past the top of any sweep. A measurement that
brackets the operating point must solve, the excursions off its ends are
continued (``dp ~ mdot^2``, the law the curve measures) and flagged, and a solve
asked not to raise never raises.

Function Documentation

◆ _ethanol()

None test_measured_off_curve._ethanol ( Network net,
*tuple[str, float | None] nodes )
protected

◆ _measured()

◆ test_a_capped_measured_stub_back_fills_without_raising()

None test_measured_off_curve.test_a_capped_measured_stub_back_fills_without_raising ( )
A capped stub is back-filled at exactly zero flow, off the curve.

Definition at line 61 of file test_measured_off_curve.py.

References _ethanol(), and _measured().

◆ test_a_sweep_that_brackets_the_answer_solves()

None test_measured_off_curve.test_a_sweep_that_brackets_the_answer_solves ( )
20 psi across a sweep of 2-32 psi over 0.05-0.2 kg/s: inside the curve
(8 psi at 0.1, 32 at 0.2, so about 0.158 kg/s). The first iterate at
1 g/s used to raise off the bottom of the curve and fail the solve.

Definition at line 46 of file test_measured_off_curve.py.

References _ethanol(), _measured(), and BENCH.

◆ test_off_the_ends_is_continued_quadratically_and_flagged()

None test_measured_off_curve.test_off_the_ends_is_continued_quadratically_and_flagged ( )
Above the sweep the loss keeps its measured ``mdot^2`` shape, and the
diagnostics say the point was not measured.

Definition at line 83 of file test_measured_off_curve.py.

References _ethanol(), _measured(), and BENCH.

Variable Documentation

◆ BENCH

test_measured_off_curve.BENCH
Initial value:
1= Curve(
2 x=(0.05, 0.1, 0.2),
3 y=(2.0, 8.0, 32.0),
4 x_unit="kg/s",
5 y_unit="psi",
6 source=Provenance.MEASURED,
7)

Definition at line 21 of file test_measured_off_curve.py.

Referenced by test_a_sweep_that_brackets_the_answer_solves(), and test_off_the_ends_is_continued_quadratically_and_flagged().

◆ PSI

float test_measured_off_curve.PSI = 6894.757293168361

Definition at line 20 of file test_measured_off_curve.py.