modelTwoWayPressureIndependent
Extends from Buildings.Fluid.Actuators.BaseClasses.PartialTwoWayValve (Partial model for a two way valve).
Information
Two way valve with a pressure-independent valve opening characteristic.
The mass flow rate is controlled such that it is nearly equal to its
set point y*m_flow_nominal, unless the pressure
dp is too low, in which case a regular Kv
characteristic is used.
Main equations
First the minimum pressure head dp_min
required for delivering the requested mass flow rate
y*m_flow_nominal is computed. If
dp > dp_min then the requested mass flow
rate is supplied. If dp < dp_min then
m_flow = Kv/sqrt(dp). Transition between
these two flow regimes happens in a smooth way.
Typical use and important parameters
This model is configured by setting m_flow_nominal
to the mass flow rate that the valve should supply when it is
completely open, i.e., y = 1. The pressure drop corresponding
to this working point can be set using dpValve_nominal,
or using a Kv, Cv or Av
value. The parameter dpValve_fixed can be used to add
additional pressure drops, although in this valve it is equivalent to
add these to dpValve_nominal.
The parameter l2 represents the non-ideal
leakage behaviour of this valve for high pressures.
It is assumed that the mass flow rate will rise beyond
the requested mass flow rate y*m_flow_nominal
if dp > dpValve_nominal+dpFixed_nominal.
The parameter l2 represents the slope
of this rise:
d(m_flow)/d(dp) = l2* m_flow_nominal/dp_nominal.
In the ideal case l2=0, but
this may introduce singularities, for instance when
connecting this component with a fixed mass flow source.
Options
Parameter deltax sets the duration of
the transition region between the two flow regimes
as a fraction of dp_nominal or m_flow_nominal,
depending on the value of from_dp.
Implementation
Note that the result in the transition region when
using from_dp = true is not identical to
the result when using from_dp = false.
Variables *_y1 and *_y2
serve a dual use.
They are used to
1) compute the support points at *_x1 and *_x2,
which should not depend on m_flow or dp and
2) to compute the flow functions when outside of this regime,
which does depend on m_flow or dp.
Min and max functions are therefore used such that one equation
can serve both puroposes.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Boolean | homotopyInitialization (from PartialResistance) | true | = true, use homotopy method |
| Modelica.Units.SI.MassFlowRate | m_flow_turbulent (from PartialResistance) | Turbulent flow if |m_flow| >= m_flow_turbulent | |
| Real | l (from PartialTwoWayValve) | 0.0001 | Valve leakage, l=Kv(y=0)/Kv(y=1) |
| Real | kFixed (from PartialTwoWayValve) | if dpFixed_nominal > Modelica.Constants.eps then m_flow_nominal/sqrt(dpFixed_nominal) else 0 | Flow coefficient of fixed resistance that may be in series with valve, k=m_flow/sqrt(dp), with unit=(kg.m)^(1/2). |
| Assumptions | |||
| Boolean | allowFlowReversal (from PartialTwoPort) | true | = false to simplify equations, assuming, but not enforcing, no flow reversal |
| Nominal condition | |||
| Modelica.Units.SI.MassFlowRate | m_flow_nominal (from PartialTwoPortInterface) | Nominal mass flow rate | |
| Modelica.Units.SI.PressureDifference | dp_nominal (from PartialResistance) | Pressure drop at nominal mass flow rate | |
| Modelica.Units.SI.PressureDifference | dpValve_nominal (from ValveParameters) | Nominal pressure drop of fully open valve, used if CvData=Buildings.Fluid.Types.CvTypes.OpPoint | |
| Modelica.Units.SI.PressureDifference | dpFixed_nominal (from PartialTwoWayValve) | 0 | Pressure drop of pipe and other resistances that are in series |
| Advanced | |||
| Modelica.Units.SI.MassFlowRate | m_flow_small (from PartialTwoPortInterface) | 1E-4*abs(m_flow_nominal) | Small mass flow rate for regularization of zero flow |
| Boolean | from_dp (from PartialResistance) | false | = true, use m_flow = f(dp) else dp = f(m_flow) |
| Real | n (from PartialResistance) | 2 | Flow exponent, n=1 for laminar, n=2 for turbulent |
| Boolean | linearized (from PartialResistance) | false | = true, use linear relation between m_flow and dp for any flow rate |
| Real | l2 | 0.01 | Gain for mass flow increase if pressure is above nominal pressure |
| Real | deltax | 0.02 | Transition interval for flow rate |
| Advanced › Diagnostics | |||
| Boolean | show_T (from PartialTwoPortInterface) | false | = true, if actual temperature at port is computed |
| Flow Coefficient | |||
| Buildings.Fluid.Types.CvTypes | CvData (from ValveParameters) | Buildings.Fluid.Types.CvTypes.OpPoint | Selection of flow coefficient |
| Real | Kv (from ValveParameters) | Kv (metric) flow coefficient [m3/h/(bar)^(1/2)] | |
| Real | Cv (from ValveParameters) | Cv (US) flow coefficient [USG/min/(psi)^(1/2)] | |
| Modelica.Units.SI.Area | Av (from ValveParameters) | Av (metric) flow coefficient | |
| Pressure-flow linearization | |||
| Real | deltaM (from ValveParameters) | 0.02 | Fraction of nominal flow rate where linearization starts, if y=1 |
| Advanced › Nominal condition | |||
| Modelica.Units.SI.Density | rhoStd (from ValveParameters) | Inlet density for which valve coefficients are defined | |
| Dynamics › Actuator position | |||
| Boolean | use_strokeTime (from ActuatorSignal) | true | Set to true to continuously open and close valve using strokeTime |
| Modelica.Units.SI.Time | strokeTime (from ActuatorSignal) | 120 | Time needed to fully open or close actuator |
| Modelica.Blocks.Types.Init | init (from ActuatorSignal) | Modelica.Blocks.Types.Init.InitialOutput | Type of initialization (no init/steady state/initial state/initial output) |
| Real | y_start (from ActuatorSignal) | 1 | Initial position of actuator |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Fluid.Interfaces.FluidPort_a | port_a (from PartialTwoPort) | Fluid connector a (positive design flow direction is from port_a to port_b) | |
| Modelica.Fluid.Interfaces.FluidPort_b | port_b (from PartialTwoPort) | Fluid connector b (positive design flow direction is from port_a to port_b) | |
| Modelica.Blocks.Interfaces.RealInput | y (from ActuatorSignal) | Actuator position (0: closed, 1: open) | |
| Modelica.Blocks.Interfaces.RealOutput | y_actual (from ActuatorSignal) | Actual actuator position |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Units.SI.MassFlowRate | m_flow (from PartialTwoPortInterface) | port_a.m_flow | Mass flow rate from port_a to port_b (m_flow > 0 is design flow direction) |
| Modelica.Units.SI.PressureDifference | dp (from PartialTwoPortInterface) | port_a.p - port_b.p | Pressure difference between port_a and port_b |
| Medium.ThermodynamicState | sta_a (from PartialTwoPortInterface) | if allowFlowReversal then Medium.setState_phX(port_a.p, noEvent(actualStream(port_a.h_outflow)), noEvent(actualStream(port_a.Xi_outflow))) else Medium.setState_phX(port_a.p, noEvent(inStream(port_a.h_outflow)), noEvent(inStream(port_a.Xi_outflow))) | Medium properties in port_a |
| Medium.ThermodynamicState | sta_b (from PartialTwoPortInterface) | if allowFlowReversal then Medium.setState_phX(port_b.p, noEvent(actualStream(port_b.h_outflow)), noEvent(actualStream(port_b.Xi_outflow))) else Medium.setState_phX(port_b.p, noEvent(port_b.h_outflow), noEvent(port_b.Xi_outflow)) | Medium properties in port_b |
| Real | phi (from PartialTwoWayValve) | Ratio actual to nominal mass flow rate of valve, phi=Kv(y)/Kv(y=1) | |
| Real | kVal (from PartialTwoWayValve) | Flow coefficient of valve, k=m_flow/sqrt(dp), with unit=(kg.m)^(1/2). | |
| Real | k (from PartialTwoWayValve) | Flow coefficient of valve and pipe in series, k=m_flow/sqrt(dp), with unit=(kg.m)^(1/2). |
Revisions
-
June 10, 2021, by Michael Wetter:
Changed implementation of the filter and changed the parameterorderto a constant as most users need not change this value.
This is for #1498. -
August 7, 2020, by Ettore Zanetti:
changed the computation ofphiusingmax(0.1*l, . )to avoid phi=0. See issue 1376. -
November 9, 2019, by Filip Jorissen:
Guarded the computation ofphiusingmax(0, . )to avoid negative phi. See issue 1223. -
October 25, 2019, by Jianjun Hu:
Removed icon graphics annotation. This is for #1225. -
April 14, 2017, by Filip Jorissen:
Revised implementation usingcubicHermitesuch that it does not have a local maximum and such that it is C2-continuous. See #156. -
March 24, 2017, by Michael Wetter:
RenamedfilteredInputtouse_inputFilter.
This is for #665. -
March 15, 2016, by Michael Wetter:
ReplacedspliceFunctionwithregStep. This is for issue 300. -
January 22, 2016, by Michael Wetter:
Corrected type declaration of pressure difference. This is for #404. -
January 29, 2015, by Filip Jorissen:
First implementation.