Two Way Valve $—$ Two way valve with second-order spool dynamics

The Two Way Valve component describes a two way valve with second-order spool dynamics. The laminar/turbulent flow through the valve is modeled as flow through an orifice without cavitation. The parameter qnom gives the nominal flow rate of the fully opened valve at the pressure drop dpnom. The parameter ${d}_{\mathrm{leak}}$ gives the equivalent diameter of an orifice to describe the leakage flow if the valve is closed.

${A}_{\mathrm{max}}={q}_{\mathrm{nom}}\sqrt{\frac{1}{2}\frac{\mathrm{\rho }{k}_{2}}{{\mathrm{Δp}}_{\mathrm{nom}}}}$

${A}_{\mathrm{leak}}=\frac{1}{4}\mathrm{\pi }{d}_{\mathrm{leak}}^{2}$

The commanded relative opening of the valve is input at $\mathrm{command}$.

 $\mathrm{command}\le 0$ Valve closed (only leakage) $1\le \mathrm{command}$ Valve completely open

The position of the spool is modeled as a second-order system with natural frequency ${\mathrm{\omega }}_{0}$, damping damp, input $\mathrm{command}$, and output $\mathrm{position}$ [0...1]. The flow area depends linearly on the spool position.

 $\mathrm{position}\le \mathrm{overlap}$ Leakage from P $\to$ A. Flow area: ${A}_{\mathrm{leak}}$. $\mathrm{overlap}<\mathrm{position}$ $<$ $1$ Flow from P $\to$ A. Flow area: $\frac{\left(\mathrm{position}-\mathrm{overlap}\right){A}_{\mathrm{max}}}{1-\mathrm{overlap}}+{A}_{\mathrm{leak}}$ $1\le \mathrm{position}$ Maximum flow from P $\to$ A. Flow area: ${A}_{\mathrm{max}}+{A}_{\mathrm{leak}}$

The mass and flow forces are not included. Use the modifier(s)

VolumeA(port_A(p(start=1e5,fixed=true)))

and/or

VolumeB(port_A(p(start=1e5,fixed=true)))

to set the initial condition(s) for the pressure of the lumped volume(s) $\left[\mathrm{Pa}\right]$. Use the modifier(s)

TWVnS(FlA(position(start=0.1,fixed=true)))

or

TWVnS(FlA(velocity(start=0.1,fixed=true)))

or

TWVnS(FlA(velocity(start=0.1,fixed=true),position(start=1,fixed=true)))

to set the initial condition(s) for the position/velocity of the spool.

 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}}$ $q=\frac{{m}_{\mathrm{flow}\left(A\right)}}{\mathrm{\rho }}$ $\mathrm{Δp}={p}_{A\left(\mathrm{limited}\right)}-{p}_{B\left(\mathrm{limited}\right)}$ ${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)$

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 ${V}_{A}$ VolumeA ${V}_{B}$ VolumeB $\mathrm{TWVnS}$ TWVnS

[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 $\mathrm{command}$ Command signal for spool position command

Parameters

General Parameters

 Name Default Units Description Modelica ID ${\mathrm{ΔT}}_{\mathrm{system}}$ $0$ $K$ Temperature offset from system temperature dT_system use volume A $\mathrm{true}$ If true, a volume is present at port_A useVolumeA use volume B $\mathrm{true}$ If true, a volume is present at port_B useVolumeB ${V}_{A}$ ${10}^{-6}$ ${m}^{3}$ Geometric volume at port A volumeA ${V}_{B}$ ${10}^{-6}$ ${m}^{3}$ Geometric volume at port B volumeB

Actuation Parameters

 Name Default Units Description Modelica ID ${\mathrm{\omega }}_{0}$ $500$ $\frac{\mathrm{rad}}{s}$ Natural frequency of spool omega0 $\mathrm{damp}$ $\frac{7}{10}$ Damping coefficient of spool damp $\mathrm{overlap}$ $0.02$ Overlap relative to max. displacement = 1 overlap

Flow Parameters

 Name Default Units Description Modelica ID ${q}_{\mathrm{nom}}$ $8.33·{10}^{-4}$ $\frac{{m}^{3}}{s}$ Nominal flow rate qnom ${\mathrm{Δp}}_{\mathrm{nom}}$ $3.5·{10}^{6}$ $\mathrm{Pa}$ Pressure drop at qnom dpnom ${d}_{\mathrm{leak}}$ $1.67·{10}^{-5}$ $m$ Diameter of equivalent orifice to model leakage of closed valve dleak ${k}_{1}$ $10$ Laminar part of orifice model k1 ${k}_{2}$ $2$ Turbulent part of orifice model, ${k}_{2}=\frac{1}{{C}_{d}^{2}}$ k2