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

Functions

object _valve ()
object _pipe ()
float _flow (float tank_psia, bool drawn_with_the_flow, object part)
None test_a_valve_drawn_either_way_passes_the_same_flow (float tank_psia)
None test_reverse_flow_chokes_like_forward_flow ()
None test_a_gas_pipe_drawn_either_way_passes_the_same_flow ()
None test_a_check_valve_keeps_its_drawn_direction ()

Variables

float PSI = 6894.757293168361
 M = Provenance.MANUFACTURER

Detailed Description

A symmetric component does not care which way it was drawn.

pid-designer reads a symbol's in/out from its left/right ports, so a vent or
press solenoid placed mirrored is a branch drawn against its flow. The solve
used to price every branch at its drawn upstream node -- the low-pressure end
when the flow runs backwards -- and never let reverse flow choke: a Cv 4 valve
on 3000 psia nitrogen to atmosphere passed 3.81 kg/s drawn with the flow and
0.47 drawn against it, both converged.

One-way laws keep their drawn direction: a check valve, a regulator, a relief.

Function Documentation

◆ _flow()

float test_branch_direction._flow ( float tank_psia,
bool drawn_with_the_flow,
object part )
protected
A gas tank to atmosphere through one component, drawn either way.
Returned as the flow out of the tank.

Definition at line 46 of file test_branch_direction.py.

Referenced by test_a_gas_pipe_drawn_either_way_passes_the_same_flow(), and test_a_valve_drawn_either_way_passes_the_same_flow().

◆ _pipe()

object test_branch_direction._pipe ( )
protected

◆ _valve()

◆ test_a_check_valve_keeps_its_drawn_direction()

None test_branch_direction.test_a_check_valve_keeps_its_drawn_direction ( )
Drawn against the gradient it holds: a one-way law is not mirrored.

Definition at line 93 of file test_branch_direction.py.

References _valve().

◆ test_a_gas_pipe_drawn_either_way_passes_the_same_flow()

None test_branch_direction.test_a_gas_pipe_drawn_either_way_passes_the_same_flow ( )

Definition at line 87 of file test_branch_direction.py.

References _flow(), and _pipe().

◆ test_a_valve_drawn_either_way_passes_the_same_flow()

None test_branch_direction.test_a_valve_drawn_either_way_passes_the_same_flow ( float tank_psia)

Definition at line 64 of file test_branch_direction.py.

References _flow(), and _valve().

◆ test_reverse_flow_chokes_like_forward_flow()

None test_branch_direction.test_reverse_flow_chokes_like_forward_flow ( )
3000 psia to atmosphere is far past the critical ratio either way.

Definition at line 71 of file test_branch_direction.py.

References _valve().

Variable Documentation

◆ M

test_branch_direction.M = Provenance.MANUFACTURER

Definition at line 23 of file test_branch_direction.py.

◆ PSI

float test_branch_direction.PSI = 6894.757293168361

Definition at line 22 of file test_branch_direction.py.