Line Exit $—$ Exit element of a long line

The LineExit component contains the equations for the exit element (that is, the end of a long line). The connector port_B is used to connect the long line to another hydraulic component.

 Equations $\left\{\begin{array}{cc}\left\{\left\{\begin{array}{cc}\mathrm{\beta }=\frac{1}{\frac{1}{{\mathrm{\beta }}_{0}}+\frac{1}{{K}_{\mathrm{pipe}}}}& \mathrm{elasticWall}\\ \mathrm{\beta }={\mathrm{\beta }}_{0}& \mathrm{otherwise}\end{array}\right\,\mathrm{\nu }={\mathrm{\nu }}_{0},\mathrm{\rho }={\mathrm{\rho }}_{0}\right\}& \mathrm{constantProperties}\\ \left\{\left\{\begin{array}{cc}\mathrm{\beta }=\frac{1}{\frac{1}{\mathrm{oil.bulkModulus}\left(p=\mathrm{pk}+\mathrm{oil.p_atm},T=T,{v}_{\mathrm{air}}=\mathrm{oil.v_gas},{p}_{\mathrm{sat}}={p}_{\mathrm{sat}}\right)}+\frac{1}{{K}_{\mathrm{pipe}}}}& \mathrm{elasticWall}\\ \mathrm{\beta }=\mathrm{oil.bulkModulus}\left(p=\mathrm{pk}+\mathrm{oil.p_atm},T=T\right)& \mathrm{otherwise}\end{array}\right\,\mathrm{\nu }=\mathrm{oil.kinematicViscosity}\left(p=\mathrm{pk}+\mathrm{oil.p_atm},T=T,{v}_{\mathrm{air}}=\mathrm{oil.v_gas},{p}_{\mathrm{sat}}={p}_{\mathrm{sat}}\right),\mathrm{\rho }=\mathrm{oil.density}\left(p=\mathrm{pk}+\mathrm{oil.p_atm},T=T,{v}_{\mathrm{air}}=\mathrm{oil.v_gas},{p}_{\mathrm{sat}}={p}_{\mathrm{sat}}\right)\right\}& \mathrm{otherwise}\end{array}\right\$ $\left\{\begin{array}{cc}\left\{\mathrm{dx}=\mathrm{noEvent}\left(\left\{\begin{array}{cc}0& {\mathrm{Re}}_{\mathrm{friction}}<\mathrm{Re1}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathbf{or}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathrm{Re2}<{\mathrm{Re}}_{\mathrm{friction}}\\ \frac{\mathrm{ln}\left(\frac{{\mathrm{Re}}_{\mathrm{friction}}}{\mathrm{Re1}}\right)}{\mathrm{ln}\left(10\right)}& \mathrm{otherwise}\end{array}\right\\right),\mathrm{\lambda }=\mathrm{noEvent}\left(\left\{\begin{array}{cc}1& {\mathrm{Re}}_{\mathrm{friction}}<64\\ \frac{{\mathrm{\lambda }}_{2}}{{\mathrm{Re}}_{\mathrm{friction}}^{2}}& \mathrm{otherwise}\end{array}\right\\right),{\mathrm{\lambda }}_{2}=\mathrm{noEvent}\left(\left\{\begin{array}{cc}64{\mathrm{Re}}_{\mathrm{friction}}& {\mathrm{Re}}_{\mathrm{friction}}\le \mathrm{Re1}\\ \left\{\begin{array}{cc}\frac{{\mathrm{Re}}_{\mathrm{friction}}^{2}{\mathrm{ln}\left(10\right)}^{2}}{4{\mathrm{ln}\left(\frac{10{\mathrm{\Delta }}_{\mathrm{rel}}}{37}+\frac{287}{50{\mathrm{Re}}_{\mathrm{friction}}^{9}{10}}}\right)}^{2}}& \mathrm{Re2}\le {\mathrm{Re}}_{\mathrm{friction}}\\ 64\mathrm{Re1}{\left(\frac{{\mathrm{Re}}_{\mathrm{friction}}}{\mathrm{Re1}}\right)}^{1+\mathrm{dx}\left({c}_{2}+\mathrm{dx}\mathrm{c3}\right)}& \mathrm{otherwise}\end{array}\right\& \mathrm{otherwise}\end{array}\right\\right)\right\}& \mathrm{frictionType}=\mathrm{Hydraulics.Lines.FrictionTypes.LaminarTurbulent}\\ \left\{\mathrm{dx}=0,\mathrm{\lambda }=1,{\mathrm{\lambda }}_{2}=64{\mathrm{Re}}_{\mathrm{friction}}\right\}& \mathrm{otherwise}\end{array}\right\$ $\left\{\begin{array}{cc}\left\{{\mathrm{Δp}}_{\mathrm{dynfriction}}=\left(-\frac{\left(\frac{128{k}_{1}}{{\mathrm{\tau }}_{1}}+\frac{128{k}_{2}}{{\mathrm{\tau }}_{2}}+\frac{128{k}_{3}}{{\mathrm{\tau }}_{3}}\right)\mathrm{\nu }{q}_{\mathrm{k+}}}{{d}^{4}\mathrm{\pi }}+\frac{\left(32{\mathrm{wk}}_{1}+32{\mathrm{wk}}_{2}+32{\mathrm{wk}}_{3}\right)\mathrm{\nu }}{{d}^{2}\mathrm{\rho }{a}_{\mathrm{sound}}}\right){\ell }_{\mathrm{element}}\mathrm{\rho },{\partial }_{t}\left({\mathrm{wk}}_{1}\right)=\frac{\mathrm{\alpha }{k}_{1}\mathrm{Zc}{q}_{\mathrm{k+}}}{{\mathrm{\tau }}_{1}^{2}}-\frac{\mathrm{\alpha }{\mathrm{wk}}_{1}}{{\mathrm{\tau }}_{1}},{\partial }_{t}\left({\mathrm{wk}}_{2}\right)=\frac{\mathrm{\alpha }{k}_{2}\mathrm{Zc}{q}_{\mathrm{k+}}}{{\mathrm{\tau }}_{2}^{2}}-\frac{\mathrm{\alpha }{\mathrm{wk}}_{2}}{{\mathrm{\tau }}_{2}},{\partial }_{t}\left({\mathrm{wk}}_{3}\right)=\frac{\mathrm{\alpha }{k}_{3}\mathrm{Zc}{q}_{\mathrm{k+}}}{{\mathrm{\tau }}_{3}^{2}}-\frac{\mathrm{\alpha }{\mathrm{wk}}_{3}}{{\mathrm{\tau }}_{3}}\right\}& \mathrm{dynFriction}=\mathrm{true}\\ \left\{{\mathrm{wk}}_{1}=0,{\mathrm{wk}}_{2}=0,{\mathrm{wk}}_{3}=0,{\mathrm{Δp}}_{\mathrm{dynfriction}}=0\right\}& \mathrm{otherwise}\end{array}\right\$ $\mathrm{\alpha }=\frac{32\mathrm{\nu }}{{d}^{2}}$ $T={T}_{0\left(\mathrm{oil}\right)}+{\mathrm{ΔT}}_{\mathrm{system}}$ $\mathrm{Zc}=\frac{4{a}_{\mathrm{sound}}\mathrm{\rho }}{{d}^{2}\mathrm{\pi }}$ $\mathrm{pk}={p}_{A}$ $\mathrm{ReynoldsNumber}=\frac{4{q}_{\mathrm{k−}}}{d\mathrm{\pi }\mathrm{\nu }}$ ${\Re }_{\mathrm{friction}}=\mathrm{noEvent}\left(\frac{4\left|{q}_{\mathrm{k+}}\right|}{\mathrm{π}d\mathrm{ν}}\right)$ ${a}_{\mathrm{sound}}=\sqrt{\frac{\mathrm{\beta }}{\mathrm{\rho }}}$ ${p}_{\mathrm{k+}}={p}_{B}$ ${q}_{\mathrm{k+}}=-\frac{{m}_{\mathrm{flow}\left(B\right)}}{\mathrm{\rho }}$ ${q}_{\mathrm{k−}}=\frac{{m}_{\mathrm{flow}\left(A\right)}}{\mathrm{\rho }}$ ${\mathrm{Δp}}_{\mathrm{friction}}=\mathrm{noEvent}\left(\frac{1}{2}\frac{{\ell }_{\mathrm{element}}{\mathrm{lambda}}_{2}{\mathrm{\nu }}^{2}\mathrm{\rho }\left\{\begin{array}{cc}1& 0\le {q}_{\mathrm{k+}}\\ -1& \mathrm{otherwise}\end{array}\right\}{{d}^{3}}\right)$ ${\mathrm{Δp}}_{\mathrm{statichead}}=\frac{981}{100}\mathrm{\rho }\mathrm{Δh}$ $\mathrm{\rho }{\ell }_{\mathrm{element}}{\partial }_{t}\left({q}_{\mathrm{k+}}\right)=\frac{1}{4}{d}^{2}\mathrm{\pi }\left(\mathrm{pk}-{p}_{\mathrm{k+}}-{\mathrm{Δp}}_{\mathrm{friction}}+{\mathrm{Δp}}_{\mathrm{dynfriction}}+{\mathrm{Δp}}_{\mathrm{statichead}}\right)$ ${\partial }_{t}\left(\mathrm{pk}\right)=\frac{2{a}_{\mathrm{sound}}\mathrm{Zc}\left({q}_{\mathrm{k−}}-{q}_{\mathrm{k+}}\right)}{{\ell }_{\mathrm{element}}}$

Variables

 Name Value Units Description Modelica ID $\mathrm{\alpha }$ alpha $\mathrm{Zc}$ Zc ${\mathrm{wk}}_{1}$ wk1 ${\mathrm{wk}}_{2}$ wk2 ${\mathrm{wk}}_{3}$ wk3 $\mathrm{pk}$ $\mathrm{Pa}$ pk ${p}_{\mathrm{k+}}$ $\mathrm{Pa}$ pkplus ${q}_{\mathrm{k−}}$ $\frac{{m}^{3}}{s}$ qkminus ${q}_{\mathrm{k+}}$ $\frac{{m}^{3}}{s}$ qkplus ${p}_{\mathrm{sat}}$ [1] $\mathrm{Pa}$ Gas saturation pressure p_sat ${\Re }_{\mathrm{friction}}$ $1$ Dummy or Reynolds number of flow, if frictionType = DetailedFriction Re_friction $\mathrm{\lambda }$ Dummy or friction coefficient, if frictionType = DetailedFriction lambda ${\mathrm{\lambda }}_{2}$ Dummy or non-standard friction coefficient, if frictionType = DetailedFriction (= lambdaRe^2) lambda2 ${\mathrm{Δp}}_{\mathrm{friction}}$ Stationary friction loss dp_friction ${\mathrm{Δp}}_{\mathrm{dynfriction}}$ Dynamic friction term dp_dynfriction ${\mathrm{Δp}}_{\mathrm{statichead}}$ Static head dp_statichead ${a}_{\mathrm{sound}}$ $\frac{m}{s}$ Speed of sound in oil aSound $\mathrm{\nu }$ $\frac{{m}^{2}}{s}$ Viscosity, if constantProperties is false nu $\mathrm{\rho }$ $\frac{\mathrm{kg}}{{m}^{3}}$ Density  if constantProperties is false rho $\mathrm{\beta }$ $\mathrm{Pa}$ Bulk modulus if constantProperties is false beta $T$ $K$ Local temperature T $\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{oil}$ oil ${\mathrm{port}}_{A}$ Port A, where oil flows into the component ($0, ${p}_{B}<{p}_{A}$ means $0<\mathrm{Δp}$) port_A ${\mathrm{port}}_{B}$ Port A, where oil leaves the component ($q<0$, ${p}_{B}<{p}_{A}$ means $0<\mathrm{Δp}$) port_B

Parameters

General Parameters

 Name Default Units Description Modelica ID steady-state init $\mathrm{false}$ If true, initialize in steady state steadyStateInit constant properties $\mathrm{true}$ If true, properties are treated as constant over time constantProperties elastic wall $\mathrm{false}$ If true, pipe properties affect speed of sound in oil elasticWall dynamic friction $\mathrm{false}$ If true, dynamic friction dynFriction ${\ell }_{\mathrm{element}}$ $m$ Length of one element ElementLength $d$ $m$ Line diameter diameter $\mathrm{Δh}$ $0$ $m$ Height difference heightDiff friction type [1] Type of flow model frictionType ${K}_{\mathrm{pipe}}$ Pipe bulk modulus of elasticity bulkModPipe roughness $0$ $m$ Roughness of pipe roughness ${\mathrm{\rho }}_{0}$ $\frac{\mathrm{kg}}{{m}^{3}}$ Constant density, if constantProperties is true rho0 ${\mathrm{\nu }}_{0}$ $\frac{{m}^{2}}{s}$ Constant viscosity, if constantProperties is true nu0 ${\mathrm{\beta }}_{0}$ $\mathrm{Pa}$ Bulk Modulus beta0 ${\mathrm{ΔT}}_{\mathrm{system}}$ $0$ $K$ Temperature offset from system temperature dT_system

[1] $\mathrm{Hydraulics.Lines.FrictionTypes.Laminar}$

Constant Parameters

 Name Default Units Description Modelica ID ${\mathrm{\Delta }}_{\mathrm{rel}}$ $\frac{\mathrm{roughness}}{d}$ Relative roughness Delta

Constants

 Name Value Units Description Modelica ID ${k}_{1}$ $0.192$ k1 ${k}_{2}$ $0.0948$ k2 ${k}_{3}$ $0.0407$ k3 ${\mathrm{\tau }}_{1}$ $0.25$ tau1 ${\mathrm{\tau }}_{2}$ $0.0352$ tau2 ${\mathrm{\tau }}_{3}$ $0.0024$ tau3