|
STAR
Cal STAR — firmware, DAQ server, and engine design
|
Functions | |
| float | colebrook_darcy (float Re, float eD) |
| float | darcy_friction_factor (float Re, float eD) |
| float | fittings_K (FeedSystemConfig config) |
| float | delta_p_feed (float mdot, float rho, FeedSystemConfig config, float P_tank, Optional[float] mu=None) |
Variables | |
| _fluids_friction_factor = None | |
| _log = logging.getLogger(__name__) | |
| bool | _warned_no_mu = False |
| float | LAMINAR_TRANSITION_PIPE = 2040.0 |
Generalized feed system pressure loss model with K_eff(P) For twin balanced parallel runs each with nominal diameter ``d_line``, set YAML ``A_hydraulic = 2 × π (d_line/2)²`` with ``d_inlet`` omitted (the schema derives the equal-area bore) so bulk velocity halves vs a single tube at fixed ṁ. See constants: ``FEED_LINE_DUAL_3_8_EQUIVALENT_D_INLET_M`` and ``FEED_LINE_DUAL_3_8_EQUIVALENT_A_HYDRAULIC_M2`` for two 3/8″ lines.
| float engine.pipeline.feed_loss.colebrook_darcy | ( | float | Re, |
| float | eD ) |
Darcy f from Colebrook-White, 1/sqrt(f) = -2 log10(eD/3.7 + 2.51/(Re sqrt(f))). Solved to machine precision by fixed-point iteration on x = 1/sqrt(f) from the Haaland (1983) explicit start. This is the fallback for when ``fluids`` is not importable; the tests hold it to fluids.friction.Colebrook. Laminar (Re < 2040) returns 64/Re, as fluids.friction.friction_factor does.
Definition at line 31 of file feed_loss.py.
Referenced by darcy_friction_factor().
| float engine.pipeline.feed_loss.darcy_friction_factor | ( | float | Re, |
| float | eD ) |
Darcy friction factor: fluids.friction.friction_factor (Clamond's exact Colebrook solution) when fluids is installed, colebrook_darcy() otherwise.
Definition at line 54 of file feed_loss.py.
References _fluids_friction_factor, and colebrook_darcy().
Referenced by delta_p_feed().
| float engine.pipeline.feed_loss.delta_p_feed | ( | float | mdot, |
| float | rho, | ||
| FeedSystemConfig | config, | ||
| float | P_tank, | ||
| Optional[float] | mu = None ) |
Calculate feed system pressure loss using generalized K_eff(P) model.
Δp_feed = K_eff(P) × (ρ/2) × (ṁ/(ρ×A_hyd))² + K_exit × (ρ/2) × (ṁ/(ρ×A_exit))²
where K_eff(P) = K_base + ΣK_fittings + K1 × φ(P), K_base = K0, or (roughness_m set and mu
given) K_entrance + f L/d_inlet with Darcy f from Colebrook-White at Re = ρ v d_inlet/μ;
and the second term is the exit bore's velocity head
dumped into the manifold (Borda-Carnot; K_exit = 1 for a plenum). P_tank minus this is the
still-manifold pressure that drives the orifices.
Parameters:
-----------
mdot : float
Mass flow rate [kg/s]
rho : float
Fluid density [kg/m³]
config : FeedSystemConfig
Feed system configuration
P_tank : float
Tank pressure [Pa] (used for pressure-dependent K_eff)
mu : float, optional
Liquid dynamic viscosity [Pa s]. Needed only by the friction path (``roughness_m``
set): K0 is replaced by K_entrance + f L/d_inlet with Colebrook f at
Re = rho v d_inlet / mu. Without mu that path cannot run and the K0 path is used
(logged once).
Fittings (``config.fittings``) add to K_eff on either path.
Returns:
--------
delta_p : float
Pressure loss [Pa]
Definition at line 76 of file feed_loss.py.
References darcy_friction_factor(), fittings_K(), and max.
| float engine.pipeline.feed_loss.fittings_K | ( | FeedSystemConfig | config | ) |
Sum of the itemised fitting K's (line velocity heads); 0.0 when none are declared. engine/accel/params.py folds this into K0 for the kernel, so the order of summation here is the order there.
Definition at line 64 of file feed_loss.py.
Referenced by delta_p_feed().
|
protected |
Definition at line 21 of file feed_loss.py.
Referenced by darcy_friction_factor().
|
protected |
Definition at line 23 of file feed_loss.py.
|
protected |
Definition at line 24 of file feed_loss.py.
| float engine.pipeline.feed_loss.LAMINAR_TRANSITION_PIPE = 2040.0 |
Definition at line 28 of file feed_loss.py.