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

Functions

 _q (mdot, rho, A)
 test_colebrook_matches_moody_chart (Re, eD, f_chart)
 test_fallback_colebrook_is_fluids_colebrook (Re, eD, _)
 test_laminar_is_64_over_re ()
 _fuel (**kw)
 test_fittings_sum_into_K_eff_on_the_K0_path ()
 test_fitting_without_a_source_is_refused ()
 test_roughness_replaces_K0_with_entrance_plus_colebrook_friction ()
 test_roughness_without_viscosity_falls_back_to_K0 ()
 test_roughness_needs_a_length ()
 test_shipped_6500N_feed_loss_is_unchanged ()
 _need_numba ()
 _with_feed (config, **kw)
 test_kernel_carries_fittings_to_1e9 ()
 test_roughness_configs_are_not_handled_by_the_kernel ()

Variables

 ROOT = Path(__file__).resolve().parents[1]
float PSI_TO_PA = 6894.76
float D_TUBE = 0.010922
float A_TUBE = math.pi / 4.0 * D_TUBE ** 2
float EPS_DRAWN_SS = 1.5e-6
list MOODY = [(1.0e5, 0.0, 0.0180), (1.0e6, 1.0e-4, 0.0134), (1.0e4, 1.0e-3, 0.0324)]
str KERNEL_CFG = "configs/impinging_lox_ch4_8000N.yaml"

Detailed Description

Feed-line loss from an itemised run: Colebrook friction at the actual Re, plus fittings.

    P_tank - P_manifold = (K_base + sum K_fittings + K1 phi(P)) q_line + K_exit q_exit
    K_base = K0                                   (roughness_m None: the measured override)
           = K_entrance + f(Re, e/D) L / D        (roughness_m set and mu given)

f is the Darcy factor from Colebrook-White. References: fluids.friction.Colebrook (the exact
Lambert-W solution) and Moody (1944) chart reads. Everything else is hand arithmetic.

Both new inputs are opt-in: a drawing that declares neither must give exactly the old number.

Function Documentation

◆ _fuel()

◆ _need_numba()

test_feed_friction_fittings._need_numba ( )
protected

◆ _q()

◆ _with_feed()

test_feed_friction_fittings._with_feed ( config,
** kw )
protected

◆ test_colebrook_matches_moody_chart()

test_feed_friction_fittings.test_colebrook_matches_moody_chart ( Re,
eD,
f_chart )

Definition at line 41 of file test_feed_friction_fittings.py.

◆ test_fallback_colebrook_is_fluids_colebrook()

test_feed_friction_fittings.test_fallback_colebrook_is_fluids_colebrook ( Re,
eD,
_ )
The no-fluids fallback solves the same equation to machine precision.

Definition at line 47 of file test_feed_friction_fittings.py.

◆ test_fitting_without_a_source_is_refused()

test_feed_friction_fittings.test_fitting_without_a_source_is_refused ( )

Definition at line 78 of file test_feed_friction_fittings.py.

References _fuel().

◆ test_fittings_sum_into_K_eff_on_the_K0_path()

test_feed_friction_fittings.test_fittings_sum_into_K_eff_on_the_K0_path ( )

Definition at line 65 of file test_feed_friction_fittings.py.

References _fuel(), and _q().

◆ test_kernel_carries_fittings_to_1e9()

test_feed_friction_fittings.test_kernel_carries_fittings_to_1e9 ( )
params._feed folds the fittings into K0; the injector solve must still be Python's.

Definition at line 151 of file test_feed_friction_fittings.py.

References _need_numba(), and _with_feed().

◆ test_laminar_is_64_over_re()

test_feed_friction_fittings.test_laminar_is_64_over_re ( )

Definition at line 54 of file test_feed_friction_fittings.py.

◆ test_roughness_configs_are_not_handled_by_the_kernel()

test_feed_friction_fittings.test_roughness_configs_are_not_handled_by_the_kernel ( )

Definition at line 176 of file test_feed_friction_fittings.py.

References _need_numba(), and _with_feed().

◆ test_roughness_needs_a_length()

test_feed_friction_fittings.test_roughness_needs_a_length ( )

Definition at line 111 of file test_feed_friction_fittings.py.

◆ test_roughness_replaces_K0_with_entrance_plus_colebrook_friction()

test_feed_friction_fittings.test_roughness_replaces_K0_with_entrance_plus_colebrook_friction ( )

Definition at line 85 of file test_feed_friction_fittings.py.

References _fuel(), and _q().

◆ test_roughness_without_viscosity_falls_back_to_K0()

test_feed_friction_fittings.test_roughness_without_viscosity_falls_back_to_K0 ( )

Definition at line 106 of file test_feed_friction_fittings.py.

References _fuel(), and _q().

◆ test_shipped_6500N_feed_loss_is_unchanged()

test_feed_friction_fittings.test_shipped_6500N_feed_loss_is_unchanged ( )
ethalox_6500N declares neither fittings nor roughness_m: old formula to 1e-12, with or
without a viscosity passed.

Definition at line 116 of file test_feed_friction_fittings.py.

References _q().

Variable Documentation

◆ A_TUBE

float test_feed_friction_fittings.A_TUBE = math.pi / 4.0 * D_TUBE ** 2

Definition at line 26 of file test_feed_friction_fittings.py.

◆ D_TUBE

float test_feed_friction_fittings.D_TUBE = 0.010922

Definition at line 25 of file test_feed_friction_fittings.py.

◆ EPS_DRAWN_SS

float test_feed_friction_fittings.EPS_DRAWN_SS = 1.5e-6

Definition at line 27 of file test_feed_friction_fittings.py.

◆ KERNEL_CFG

str test_feed_friction_fittings.KERNEL_CFG = "configs/impinging_lox_ch4_8000N.yaml"

Definition at line 136 of file test_feed_friction_fittings.py.

◆ MOODY

list test_feed_friction_fittings.MOODY = [(1.0e5, 0.0, 0.0180), (1.0e6, 1.0e-4, 0.0134), (1.0e4, 1.0e-3, 0.0324)]

Definition at line 37 of file test_feed_friction_fittings.py.

◆ PSI_TO_PA

float test_feed_friction_fittings.PSI_TO_PA = 6894.76

Definition at line 24 of file test_feed_friction_fittings.py.

◆ ROOT

test_feed_friction_fittings.ROOT = Path(__file__).resolve().parents[1]

Definition at line 23 of file test_feed_friction_fittings.py.