Rigid Line No States $—$ Losses of a rigid line as a function of Reynolds number

The RigidLineNoStates component describes the laminar/turbulent flow through a circular, smooth rigid line (that is, it calculates the flow rate q as a function of pressure drop dp). There are two flow modes:

 0 < Re < ReCrit laminar (Hagen-Poiseuille) ReCrit < Re turbulent (Blasius)

The functions q = q(Re) and q = q(dp) are unique.

 Equations $\mathrm{\nu }=\mathrm{Modelica.Media.Air.MoistAir.Utilities.spliceFunction}\left(x=\mathrm{Δp},\mathrm{pos}={\mathrm{\nu }}_{\mathrm{oil}}\left(p={p}_{A\left(\mathrm{abs}\right)},T=T,{v}_{\mathrm{air}}={v}_{\mathrm{gas}\left(\mathrm{oil}\right)},{p}_{\mathrm{sat}}={p}_{\mathrm{sat}}\right),\mathrm{neg}={\mathrm{\nu }}_{\mathrm{oil}}\left(p={p}_{B\left(\mathrm{abs}\right)},T=T,{v}_{\mathrm{air}}={v}_{\mathrm{gas}\left(\mathrm{oil}\right)},{p}_{\mathrm{sat}}={p}_{\mathrm{sat}}\right),\mathrm{Δx}=100\right)$ $\mathrm{\rho }=\mathrm{Modelica.Media.Air.MoistAir.Utilities.spliceFunction}\left(x=\mathrm{Δp},\mathrm{pos}={\mathrm{\rho }}_{\mathrm{oil}}\left(p={p}_{A\left(\mathrm{abs}\right)},T=T,{v}_{\mathrm{air}}={v}_{\mathrm{gas}\left(\mathrm{oil}\right)},{p}_{\mathrm{sat}}={p}_{\mathrm{sat}}\right),\mathrm{neg}={\mathrm{\rho }}_{\mathrm{oil}}\left(p={p}_{B\left(\mathrm{abs}\right)},T=T,{v}_{\mathrm{air}}={v}_{\mathrm{gas}\left(\mathrm{oil}\right)},{p}_{\mathrm{sat}}={p}_{\mathrm{sat}}\right),\mathrm{Δx}=100\right)$ $T={T}_{0\left(\mathrm{oil}\right)}+{\mathrm{ΔT}}_{\mathrm{system}}$ ${\mathrm{Δp}}_{\mathrm{abs}}=\mathrm{noEvent}\left(\left|\mathrm{Δp}\right|\right)$ ${\mathrm{Δp}}_{\mathrm{turb}}=\mathrm{max}\left(1,{\mathrm{Δp}}_{\mathrm{abs}}\right)$ $\mathrm{laminar}=\mathrm{noEvent}\left(\left\{\begin{array}{cc}1& \left|\mathrm{Δp}\right|<\mathrm{laminarLimit}\\ 0& \mathrm{otherwise}\end{array}\right\\right)$ $q=\frac{{m}_{\mathrm{flow}\left(A\right)}}{\mathrm{\rho }}$ $q=\mathrm{Modelica.Media.Air.MoistAir.Utilities.spliceFunction}\left(\mathrm{qturbunsigned},\mathrm{qlam},\mathrm{dp_abs}-\mathrm{laminarLimit},\mathrm{laminarLimit}\right)$ $\mathrm{qlam}=\frac{1}{128}\frac{\mathrm{Δp}{d}^{4}\mathrm{\pi }}{\ell \mathrm{\nu }\mathrm{\rho }}$ $\mathrm{Δp}={p}_{A\left(\mathrm{limited}\right)}-{p}_{B\left(\mathrm{limited}\right)}$ $\mathrm{ReynoldsNumber}=\frac{4\mathrm{noEvent}\left(\left|q\right|\right)}{d\mathrm{\pi }\mathrm{\nu }}$ $\mathrm{laminarLimit}=\frac{32\ell {\mathrm{\nu }}^{2}\mathrm{ReCrit}\mathrm{\rho }}{{d}^{3}}$ $\mathrm{qturbunsigned}=\frac{1}{16}\frac{{8}^{6/7}{\mathrm{dpturb}}^{4/7}{d}^{19/7}\mathrm{\pi }}{{\mathrm{\nu }}^{1/7}{\left(\mathrm{Blasiusconstant}\mathrm{\rho }\ell \right)}^{4/7}}$ ${p}_{A\left(\mathrm{abs}\right)}={p}_{A}+{p}_{\mathrm{atm}\left(\mathrm{oil}\right)}$ ${p}_{A\left(\mathrm{limited}\right)}=\mathrm{max}\left({p}_{A},{p}_{\mathrm{vapour}\left(\mathrm{oil}\right)}-{p}_{\mathrm{atm}\left(\mathrm{oil}\right)}\right)$ ${p}_{B\left(\mathrm{abs}\right)}={p}_{B}+{p}_{\mathrm{atm}\left(\mathrm{oil}\right)}$ ${p}_{B\left(\mathrm{limited}\right)}=\mathrm{max}\left({p}_{B},{p}_{\mathrm{vapour}\left(\mathrm{oil}\right)}-{p}_{\mathrm{atm}\left(\mathrm{oil}\right)}\right)$ ${m}_{\mathrm{flow}\left(A\right)}+{m}_{\mathrm{flow}\left(B\right)}=0$

Variables

 Name Value Units Description Modelica ID $\mathrm{Δp}$ $\mathrm{Pa}$ Pressure drop dp $q$ $\frac{{m}^{3}}{s}$ Flow rate flowing into port_A q ${p}_{A\left(\mathrm{limited}\right)}$ $\mathrm{Pa}$ Limited gauge pressure pA_limited ${p}_{B\left(\mathrm{limited}\right)}$ $\mathrm{Pa}$ Limited gauge pressure pB_limited $\mathrm{\rho }$ $\frac{\mathrm{kg}}{{m}^{3}}$ Upstream density rho $\mathrm{\nu }$ $\frac{{m}^{2}}{s}$ Upstream kinematic viscosity nu ${p}_{A\left(\mathrm{abs}\right)}$ $\mathrm{Pa}$ Absolute pressure pA pA_abs ${p}_{B\left(\mathrm{abs}\right)}$ $\mathrm{Pa}$ Absolute pressure pB pB_abs $T$ $K$ Local temperature T ${p}_{A\left(\mathrm{summary}\right)}$ ${p}_{A}$ $\mathrm{Pa}$ Pressure at port A summary_pA ${p}_{B\left(\mathrm{summary}\right)}$ ${p}_{B}$ $\mathrm{Pa}$ Pressure at port B summary_pB ${\mathrm{Δp}}_{\mathrm{summary}}$ $\mathrm{Δp}$ $\mathrm{Pa}$ Pressure drop summary_dp ${q}_{\mathrm{summary}}$ $q$ $\frac{{m}^{3}}{s}$ Flow rate flowing into port_A summary_q ${P}_{\mathrm{hyd}\left(\mathrm{summary}\right)}$ $-\mathrm{Δp}q$ $W$ Hydraulic Power summary_HP ${p}_{\mathrm{sat}}$ [1] $\mathrm{Pa}$ Gas saturation pressure p_sat $\mathrm{laminar}$ laminar $\mathrm{qlam}$ $\frac{{m}^{3}}{s}$ qlam $\mathrm{qturbunsigned}$ $\frac{{m}^{3}}{s}$ qturbunsigned $\mathrm{dpturb}$ $\mathrm{Pa}$ dpturb $\mathrm{ReynoldsNumber}$ $1$ Reynolds number ReynoldsNumber

[1] $\mathrm{oil.gasSaturationPressure}\left(T=T,{v}_{\mathrm{gas}}={\mathrm{oil.v}}_{\mathrm{gas}}\right)$

Connections

 Name Description Modelica ID ${\mathrm{port}}_{A}$ Layout of port where oil flows into an element ($0<{m}_{\mathrm{flow}}$, ${p}_{B}<{p}_{A}$ means $0<\mathrm{Δp}$) port_A ${\mathrm{port}}_{B}$ Hydraulic port where oil leaves the component (${m}_{\mathrm{flow}}<0$, ${p}_{B}<{p}_{A}$ means $0<\mathrm{Δp}$) port_B $\mathrm{oil}$ oil

Parameters

 Name Default Units Description Modelica ID ${\mathrm{ΔT}}_{\mathrm{system}}$ $0$ $K$ Temperature offset from system temperature dT_system $d$ $0.05$ $m$ Line diameter diameter $\ell$ $10$ $m$ Line length length

Constants

 Name Value Units Description Modelica ID $\mathrm{Blasiusconstant}$ $0.316$ Coefficient for blasius Blasiusconstant $\mathrm{ReCrit}$ $2.32·{10}^{3}$ $1$ Critical Reynolds number ReCrit