modelThreeWayTable

Three way valve with table-specified characteristics

Extends from BaseClasses.PartialThreeWayValve (Partial three way valve).

Information

Three way valve with table-specified opening characteristics. A separate characteristic for each flow path is used.

Each flow path uses an instance of the model Buildings.Fluid.Actuators.Valves.TwoWayTable. Therefore, this model needs to be parameterized the same way as Buildings.Fluid.Actuators.Valves.TwoWayTable. Specifically, the mass flow rate for the fully open valve is determined based on the value of the parameter CvData. For the different valve positions y ∈ [0, 1], this nominal flow rate is scaled by the values of the parameter flowCharacteristics1 and flowCharacteristics3, respectively. These parameters declare a table of the form

y 0 ... 1
φ l ... 1

where l = Kv(y=0)/Kv(y=1) > 0 is the valve leakage. The first row is the valve opening, and the second row is the mass flow rate, relative to the mass flow rate of the fully open valve, under the assumption of a constant pressure difference across the valve. A suggested value for the valve leakage is l=0.0001. If l = 0, then this model will replace it with l = 10-8 for numerical reasons. For example, if a valve has Kv=0.5 [m3/h/bar1/2] and a linear opening characteristics and a valve leakage of l=0.0001, then one would set

 CvData=Buildings.Fluid.Types.CvTypes.Kv
 Kv = 0.5
 flowCharacteristics1(y={0,1}, phi={0.0001,1})
 flowCharacteristics3(y={0,1}, phi={0.0001,1})

Note, however, that Buildings.Fluid.Actuators.Valves.ThreeWayLinear provides a more efficient implementation for this simple case.

The parameters flowCharacteristics1 and flowCharacteristics3 must meet the following requirements, otherwise the model stops with an error:

  • Their arrays y and phi must be strictly monotonic increasing.
  • The first value must satisfy y[1]=0, and phi[1] must be equal to the leakage flow rate, which must be bigger than zero. Otherwise, a default value of 1E-8 is used.
  • The last values must satisfy y[end]=1 and phi[end]=1.

This model is based on the partial valve model Buildings.Fluid.Actuators.BaseClasses.PartialTwoWayValve. Check this model for more information, such as the regularization near the origin.

For an example that specifies an opening characteristics, see Buildings.Fluid.Actuators.Valves.Examples.TwoWayValveTable.

Parameters

TypeNameDefaultDescription
BooleanhomotopyInitialization (from PartialThreeWayValve)true= true, use homotopy method
RealfraK (from PartialThreeWayValve)0.7Fraction Kv(port_3→port_2)/Kv(port_1→port_2)
Reall (from PartialThreeWayValve){0.0001, 0.0001}Valve leakage, l=Kv(y=0)/Kv(y=1)
Data.GenericflowCharacteristics1Table with flow characteristics for direct flow path at port_1
Data.GenericflowCharacteristics3Table with flow characteristics for bypass flow path at port_3
Dynamics › Conservation equations
Modelica.Fluid.Types.DynamicsenergyDynamics (from LumpedVolumeDeclarations)Modelica.Fluid.Types.Dynamics.DynamicFreeInitialType of energy balance: dynamic (3 initialization options) or steady state
Modelica.Fluid.Types.DynamicssubstanceDynamics (from LumpedVolumeDeclarations)energyDynamicsType of independent mass fraction balance: dynamic (3 initialization options) or steady state
Modelica.Fluid.Types.DynamicstraceDynamics (from LumpedVolumeDeclarations)energyDynamicsType of trace substance balance: dynamic (3 initialization options) or steady state
Modelica.Units.SI.MassFlowRatemDyn_flow_nominal (from PartialThreeWayResistance)Nominal mass flow rate for dynamic momentum and energy balance
Advanced › Dynamics
Modelica.Fluid.Types.DynamicsmassDynamics (from LumpedVolumeDeclarations)energyDynamicsType of mass balance: dynamic (3 initialization options) or steady state, must be steady state if energyDynamics is steady state
Initialization
Medium.AbsolutePressurep_start (from LumpedVolumeDeclarations)Medium.p_defaultStart value of pressure
Medium.TemperatureT_start (from LumpedVolumeDeclarations)Medium.T_defaultStart value of temperature
Medium.MassFraction[Medium.nX]X_start (from LumpedVolumeDeclarations)Medium.X_defaultStart value of mass fractions m_i/m
Medium.ExtraProperty[Medium.nC]C_start (from LumpedVolumeDeclarations)fill(0, Medium.nC)Start value of trace substances
Medium.ExtraProperty[Medium.nC]C_nominal (from LumpedVolumeDeclarations)fill(1E-2, Medium.nC)Nominal value of trace substances. (Set to typical order of magnitude.)
Dynamics
RealmSenFac (from LumpedVolumeDeclarations)1Factor for scaling the sensible thermal mass of the volume
Dynamics › Nominal condition
Modelica.Units.SI.Timetau (from PartialThreeWayResistance)10Time constant at nominal flow for dynamic energy and momentum balance
Advanced
Booleanfrom_dp (from PartialThreeWayResistance)true= true, use m_flow = f(dp) else dp = f(m_flow)
Modelica.Fluid.Types.PortFlowDirectionportFlowDirection_1 (from PartialThreeWayResistance)Modelica.Fluid.Types.PortFlowDirection.BidirectionalFlow direction for port_1
Modelica.Fluid.Types.PortFlowDirectionportFlowDirection_2 (from PartialThreeWayResistance)Modelica.Fluid.Types.PortFlowDirection.BidirectionalFlow direction for port_2
Modelica.Fluid.Types.PortFlowDirectionportFlowDirection_3 (from PartialThreeWayResistance)Modelica.Fluid.Types.PortFlowDirection.BidirectionalFlow direction for port_3
BooleanverifyFlowReversal (from PartialThreeWayResistance)false=true, to assert that the flow does not reverse when portFlowDirection_* does not equal Bidirectional
Modelica.Units.SI.MassFlowRatem_flow_small (from PartialThreeWayResistance)Small mass flow rate for checking flow reversal
Booleanlinearized (from PartialThreeWayValve){false, false}= true, use linear relation between m_flow and dp for any flow rate
Dynamics › Actuator position
Booleanuse_strokeTime (from ActuatorSignal)trueSet to true to continuously open and close valve using strokeTime
Modelica.Units.SI.TimestrokeTime (from ActuatorSignal)120Time needed to fully open or close actuator
Modelica.Blocks.Types.Initinit (from ActuatorSignal)Modelica.Blocks.Types.Init.InitialOutputType of initialization (no init/steady state/initial state/initial output)
Realy_start (from ActuatorSignal)1Initial position of actuator
Flow Coefficient
Buildings.Fluid.Types.CvTypesCvData (from ValveParameters)Buildings.Fluid.Types.CvTypes.OpPointSelection of flow coefficient
RealKv (from ValveParameters)Kv (metric) flow coefficient [m3/h/(bar)^(1/2)]
RealCv (from ValveParameters)Cv (US) flow coefficient [USG/min/(psi)^(1/2)]
Modelica.Units.SI.AreaAv (from ValveParameters)Av (metric) flow coefficient
Pressure-flow linearization
RealdeltaM (from ValveParameters)0.02Fraction of nominal flow rate where linearization starts, if y=1
Nominal condition
Modelica.Units.SI.MassFlowRatem_flow_nominal (from ValveParameters)Nominal mass flow rate
Modelica.Units.SI.PressureDifferencedpValve_nominal (from ValveParameters)Nominal pressure drop of fully open valve, used if CvData=Buildings.Fluid.Types.CvTypes.OpPoint
Modelica.Units.SI.PressureDifference[2]dpFixed_nominal (from PartialThreeWayValve){0, 0}Nominal pressure drop of pipes and other equipment in flow legs at port_1 and port_3
Advanced › Nominal condition
Modelica.Units.SI.DensityrhoStd (from ValveParameters)Inlet density for which valve coefficients are defined

Connectors

TypeNameDefaultDescription
Modelica.Fluid.Interfaces.FluidPort_aport_1 (from PartialThreeWayResistance)First port, typically inlet
Modelica.Fluid.Interfaces.FluidPort_bport_2 (from PartialThreeWayResistance)Second port, typically outlet
Modelica.Fluid.Interfaces.FluidPort_aport_3 (from PartialThreeWayResistance)Third port, can be either inlet or outlet
Modelica.Blocks.Interfaces.RealInputy (from ActuatorSignal)Actuator position (0: closed, 1: open)
Modelica.Blocks.Interfaces.RealOutputy_actual (from ActuatorSignal)Actual actuator position

Components

TypeNameDefaultDescription
Buildings.Fluid.Interfaces.PartialTwoPortInterfaceres1 (from PartialThreeWayResistance)
Buildings.Fluid.Interfaces.PartialTwoPortInterfaceres2 (from PartialThreeWayResistance)
Buildings.Fluid.Interfaces.PartialTwoPortInterfaceres3 (from PartialThreeWayResistance)
Buildings.Fluid.Delays.DelayFirstOrdervol (from PartialThreeWayResistance)Fluid volume to break algebraic loop

Revisions

  • March 7, 2022, by Michael Wetter:
    Set final massDynamics=energyDynamics.
    This is for #1542.
  • June 10, 2021, by Michael Wetter:
    Changed implementation of the filter and changed the parameter order to a constant as most users need not change this value.
    This is for #1498.
  • November 28, 2019, by Michael Wetter:
    Revised implementation.
  • November 15, 2019, by Alexander Kümpel:
    First implementation.