modelThreeWayValve
Container class for three-way valves
Extends from Buildings.Fluid.Interfaces.LumpedVolumeDeclarations (Declarations for lumped volumes), Buildings.Fluid.Actuators.BaseClasses.ValveParameters (Model with parameters for valves).
Information
This is a container class for three-way valve models from Buildings.Fluid.Actuators.Valves.
The parameter typCha allows configuring the model
by selecting the valve characteristic to be used based on the enumeration
Buildings.Fluid.HydronicConfigurations.Types.ValveCharacteristic.
The default setting for the ratio of
the Kvs coefficient between the bypass branch and the
direct branch is fraK=1.0, see
Buildings.Fluid.HydronicConfigurations.UsersGuide.ControlValves
for the justification.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Buildings.Fluid.Actuators.Valves.Data.Generic | flowCharacteristics1 | Table with flow characteristics for direct flow path at port_1 | |
| Buildings.Fluid.Actuators.Valves.Data.Generic | flowCharacteristics3 | Table with flow characteristics for bypass flow path at port_3 | |
| Real | R | 50 | Rangeability, R=50...100 typically |
| Real | delta0 | 0.01 | Range of significant deviation from equal percentage law |
| Real | fraK | 1.0 | Fraction Kv(port_3→port_2)/Kv(port_1→port_2) |
| Real | l | {0.0001, 0.0001} | Valve leakage, l=Kv(y=0)/Kv(y=1) |
| Dynamics › Conservation equations | |||
| Modelica.Fluid.Types.Dynamics | energyDynamics (from LumpedVolumeDeclarations) | Modelica.Fluid.Types.Dynamics.DynamicFreeInitial | Type of energy balance: dynamic (3 initialization options) or steady state |
| Modelica.Fluid.Types.Dynamics | substanceDynamics (from LumpedVolumeDeclarations) | energyDynamics | Type of independent mass fraction balance: dynamic (3 initialization options) or steady state |
| Modelica.Fluid.Types.Dynamics | traceDynamics (from LumpedVolumeDeclarations) | energyDynamics | Type of trace substance balance: dynamic (3 initialization options) or steady state |
| Advanced › Dynamics | |||
| Modelica.Fluid.Types.Dynamics | massDynamics (from LumpedVolumeDeclarations) | energyDynamics | Type of mass balance: dynamic (3 initialization options) or steady state, must be steady state if energyDynamics is steady state |
| Initialization | |||
| Medium.AbsolutePressure | p_start (from LumpedVolumeDeclarations) | Medium.p_default | Start value of pressure |
| Medium.Temperature | T_start (from LumpedVolumeDeclarations) | Medium.T_default | Start value of temperature |
| Medium.MassFraction[Medium.nX] | X_start (from LumpedVolumeDeclarations) | Medium.X_default | Start 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 | |||
| Real | mSenFac (from LumpedVolumeDeclarations) | 1 | Factor for scaling the sensible thermal mass of the volume |
| 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 |
| Nominal condition | |||
| Modelica.Units.SI.MassFlowRate | m_flow_nominal (from ValveParameters) | 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[2] | dpFixed_nominal | {0, 0} | Nominal pressure drop of pipes and other equipment in flow legs at port_1 and port_3 |
| Modelica.Units.SI.PressureDifference | dp3Valve_nominal | dpValve_nominal/fraK^2 | Bypass branch valve pressure drop at design conditions |
| Modelica.Units.SI.PressureDifference | dp3Fixed_nominal | dpFixed_nominal[2] | Bypass branch fixed pressure drop at design conditions |
| Modelica.Units.SI.PressureDifference | dp3_nominal | dp3Valve_nominal + dp3Fixed_nominal | Bypass branch total pressure drop at design conditions |
| Advanced › Nominal condition | |||
| Modelica.Units.SI.Density | rhoStd (from ValveParameters) | Inlet density for which valve coefficients are defined | |
| Configuration | |||
| Buildings.Fluid.HydronicConfigurations.Types.ValveCharacteristic | typCha | Buildings.Fluid.HydronicConfigurations.Types.ValveCharacteristic.EqualPercentage | Valve characteristic |
| Advanced | |||
| Boolean | linearized | {false, false} | = true, use linear relation between m_flow and dp for any flow rate |
| Boolean | from_dp | true | = true, use m_flow = f(dp) else dp = f(m_flow) |
| Modelica.Fluid.Types.PortFlowDirection | portFlowDirection_1 | Modelica.Fluid.Types.PortFlowDirection.Bidirectional | Flow direction for port_1 |
| Modelica.Fluid.Types.PortFlowDirection | portFlowDirection_2 | Modelica.Fluid.Types.PortFlowDirection.Bidirectional | Flow direction for port_2 |
| Modelica.Fluid.Types.PortFlowDirection | portFlowDirection_3 | Modelica.Fluid.Types.PortFlowDirection.Bidirectional | Flow direction for port_3 |
| Boolean | verifyFlowReversal | false | =true, to assert that the flow does not reverse when portFlowDirection_* does not equal Bidirectional |
| Dynamics › Nominal condition | |||
| Modelica.Units.SI.Time | tau | 10 | Time constant at nominal flow for dynamic energy and momentum balance |
| Dynamics › Time needed to open or close valve | |||
| Boolean | use_strokeTime | true | Set to true to continuously open and close valve |
| Modelica.Units.SI.Time | strokeTime | 120 | Time needed to open or close valve |
| Modelica.Blocks.Types.Init | init | Modelica.Blocks.Types.Init.InitialOutput | Type of initialization (no init/steady state/initial state/initial output) |
| Real | y_start | 1 | Initial position of actuator |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Fluid.Interfaces.FluidPort_a | port_1 | First port, typically inlet | |
| Modelica.Fluid.Interfaces.FluidPort_b | port_2 | Second port, typically outlet | |
| Modelica.Fluid.Interfaces.FluidPort_a | port_3 | Third port, can be either inlet or outlet | |
| Buildings.Controls.OBC.CDL.Interfaces.RealInput | y | Input control signal | |
| Buildings.Controls.OBC.CDL.Interfaces.RealOutput | y_actual | Actual actuator position |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Units.SI.MassFlowRate | m1_flow | port_1.m_flow | Mass flow rate in direct branch |
| Modelica.Units.SI.MassFlowRate | m2_flow | -1*port_2.m_flow | Mass flow rate in common branch |
| Modelica.Units.SI.MassFlowRate | m3_flow | port_3.m_flow | Mass flow rate in bypass branch |
| Modelica.Units.SI.PressureDifference | dp1 | port_1.p - port_2.p | Pressure drop across direct branch |
| Modelica.Units.SI.PressureDifference | dp3 | port_3.p - port_2.p | Pressure drop across bypass branch |
| Actuators.Valves.ThreeWayEqualPercentageLinear | valEquLin | Three-way valve with equal percentage and linear characteristics | |
| Actuators.Valves.ThreeWayLinear | valLinLin | Three-way valve with linear characteristics | |
| Actuators.Valves.ThreeWayTable | valTab | Three-way valve with table-specified characteristics |
Revisions
-
June 17, 2026, by Michael Wetter:
Updated implementation to allow a flow coefficientnthat is different from2. This allows use of the model for not fully turbulent flow.
This is for Buildings, #4620. -
June 30, 2022, by Antoine Gautier:
First implementation.