modelWatersideEconomizer

Waterside economizer

Extends from Buildings.Applications.DataCenters.ChillerCooled.Equipment.BaseClasses.PartialPlantParallel (Partial source plant model with associated valves), Buildings.Fluid.Interfaces.LumpedVolumeDeclarations (Declarations for lumped volumes), Buildings.Applications.DataCenters.ChillerCooled.Equipment.BaseClasses.ThreeWayValveParameters (Model with parameters for a three-way valve), Buildings.Applications.DataCenters.ChillerCooled.Equipment.BaseClasses.PartialControllerInterface (Partial interface model for waterside economizer temperature controller).

Information

This module impliments a waterside economizer model that consists of a heat exchanger and a shutoff valve on each medium side. This waterside economizer model can be used in two different control scenarios:

  1. The temperature at port_b2 is controlled by a built-in PID controller and a three-way valve by setting the parameter use_controller as true.
  2. The temperature at port_b2 is NOT controlled by a built-in controller by setting the parameter use_controller as false. Hence, an outside controller can be used to control the temperature. For example, in the free-cooling mode, the speed of variable-speed cooling tower fans can be adjusted to maintain the supply chilled water temperature around the setpoint.

Parameters

TypeNameDefaultDescription
Integernum (from PartialPlantParallelInterface)2Number of equipment
IntegernumVal (from ValvesParameters)Number of valves
IntegernumAct (from SignalFilterParameters)4Number of filters
BooleanhomotopyInitialization (from PartialPlantParallel)true= true, use homotopy method
Booleanactivate_ThrWayVal (from ThreeWayValveParameters)Activate the use of three-way valve: True-use three-way valve; False-not use the three-way valve
Booleanuse_controller (from PartialControllerInterface)trueSet to ture if the built-in controller is enabled to maintain the outlet temperature on the load side of a heat exchanger
Modelica.Units.SI.Efficiencyetaconstant effectiveness
Assumptions
BooleanallowFlowReversal1 (from PartialFourPort)true= false to simplify equations, assuming, but not enforcing, no flow reversal for medium 1
BooleanallowFlowReversal2 (from PartialFourPort)true= false to simplify equations, assuming, but not enforcing, no flow reversal for medium 2
Nominal condition
Modelica.Units.SI.MassFlowRatem1_flow_nominal (from PartialFourPortInterface)Nominal mass flow rate
Modelica.Units.SI.MassFlowRatem2_flow_nominal (from PartialFourPortInterface)Nominal mass flow rate
Modelica.Units.SI.PressureDifferencedp1_nominal (from FourPortFlowResistanceParameters)Pressure difference
Modelica.Units.SI.PressureDifferencedp2_nominal (from FourPortFlowResistanceParameters)Pressure difference
Advanced
Medium1.MassFlowRatem1_flow_small (from PartialFourPortInterface)1E-4*abs(m1_flow_nominal)Small mass flow rate for regularization of zero flow
Medium2.MassFlowRatem2_flow_small (from PartialFourPortInterface)1E-4*abs(m2_flow_nominal)Small mass flow rate for regularization of zero flow
Modelica.Fluid.Types.PortFlowDirectionportFlowDirection_1 (from ThreeWayValveParameters)Modelica.Fluid.Types.PortFlowDirection.BidirectionalFlow direction for port_1 in the three-way valve
Modelica.Fluid.Types.PortFlowDirectionportFlowDirection_2 (from ThreeWayValveParameters)Modelica.Fluid.Types.PortFlowDirection.BidirectionalFlow direction for port_2 in the three-way valve
Modelica.Fluid.Types.PortFlowDirectionportFlowDirection_3 (from ThreeWayValveParameters)Modelica.Fluid.Types.PortFlowDirection.BidirectionalFlow direction for port_3 in the three-way valve
Advanced › Diagnostics
Booleanshow_T (from PartialFourPortInterface)false= true, if actual temperature at port is computed
Flow resistance › Medium 1
BooleancomputeFlowResistance1 (from FourPortFlowResistanceParameters)true=true, compute flow resistance. Set to false to assume no friction
Booleanfrom_dp1 (from FourPortFlowResistanceParameters)false= true, use m_flow = f(dp) else dp = f(m_flow)
Realn1 (from FourPortFlowResistanceParameters)2Flow exponent for side 1, n=1 for laminar, n=2 for turbulent
BooleanlinearizeFlowResistance1 (from FourPortFlowResistanceParameters)false= true, use linear relation between m_flow and dp for any flow rate
RealdeltaM1 (from FourPortFlowResistanceParameters)0.1Fraction of nominal flow rate where flow transitions to laminar
Flow resistance › Medium 2
BooleancomputeFlowResistance2 (from FourPortFlowResistanceParameters)true=true, compute flow resistance. Set to false to assume no friction
Booleanfrom_dp2 (from FourPortFlowResistanceParameters)false= true, use m_flow = f(dp) else dp = f(m_flow)
Realn2 (from FourPortFlowResistanceParameters)2Flow exponent for side 2, n=1 for laminar, n=2 for turbulent
BooleanlinearizeFlowResistance2 (from FourPortFlowResistanceParameters)false= true, use linear relation between m_flow and dp for any flow rate
RealdeltaM2 (from FourPortFlowResistanceParameters)0.1Fraction of nominal flow rate where flow transitions to laminar
Two-way valve
Buildings.Fluid.Types.CvTypesCvData (from ValvesParameters)Buildings.Fluid.Types.CvTypes.OpPointSelection of flow coefficient
RealKv (from ValvesParameters)Kv (metric) flow coefficient [m3/h/(bar)^(1/2)]
RealCv (from ValvesParameters)Cv (US) flow coefficient [USG/min/(psi)^(1/2)]
Modelica.Units.SI.AreaAv (from ValvesParameters)Av (metric) flow coefficient
Modelica.Units.SI.MassFlowRatem_flow_nominal (from ValvesParameters)Nominal mass flow rate
Modelica.Units.SI.PressureDifferencedpValve_nominal (from ValvesParameters)fill(6000, numVal)Nominal pressure drop of fully open valve, used if CvData=Buildings.Fluid.Types.CvTypes.OpPoint
Real[2]l (from PartialPlantParallel){0.0001, 0.0001}Valve leakage, l=Kv(y=0)/Kv(y=1)
Pressure-flow linearization
RealdeltaM (from ValvesParameters)0.02Fraction of nominal flow rate where linearization starts, if y=1
Advanced › Two-way valve
Modelica.Units.SI.DensityrhoStd (from ValvesParameters)Inlet density for which valve coefficients are defined
Dynamics › Time needed to open or close valve
Booleanuse_strokeTime (from SignalFilterParameters)false= true, if opening is filtered to avoid a step change in actuator position
Modelica.Units.SI.TimestrokeTime (from SignalFilterParameters)30Time needed to open or close valve
Modelica.Blocks.Types.InitinitValve (from SignalFilterParameters)Modelica.Blocks.Types.Init.InitialOutputType of initialization (no init/steady state/initial state/initial output)
RealyValve_start (from SignalFilterParameters)fill(1, numAct)Initial value of output:0-closed, 1-fully opened
RealyThrWayVal_start1Initial value of output from the filter in the bypass valve
RealyValWSE_start1Initial value of output from the filter in the shutoff valve
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
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
Three-way Valve
Modelica.Units.SI.PressureDifferencedpThrWayVal_nominal (from ThreeWayValveParameters)6000Nominal pressure drop of fully open valve
RealfraK_ThrWayVal (from ThreeWayValveParameters)0.7Fraction Kv(port_3→port_2)/Kv(port_1→port_2)for the three-way valve
Real[2]l_ThrWayVal (from ThreeWayValveParameters){0.0001, 0.0001}Bypass valve leakage, l=Kv(y=0)/Kv(y=1)
RealR (from ThreeWayValveParameters)50Rangeability, R=50...100 typically for the three-way valve
Realdelta0 (from ThreeWayValveParameters)0.01Range of significant deviation from equal percentage law for the three-way valve
Controller
Modelica.Blocks.Types.SimpleControllercontrollerType (from PartialControllerInterface)Modelica.Blocks.Types.SimpleController.PIDType of controller
Realk (from PartialControllerInterface)1Gain of controller
Modelica.Units.SI.TimeTi (from PartialControllerInterface)0.5Time constant of integrator block
Modelica.Units.SI.TimeTd (from PartialControllerInterface)0.1Time constant of derivative block
RealyMax (from PartialControllerInterface)1Upper limit of output
RealyMin (from PartialControllerInterface)0Lower limit of output
Realwp (from PartialControllerInterface)1Set-point weight for Proportional block (0..1)
Realwd (from PartialControllerInterface)0Set-point weight for Derivative block (0..1)
RealNi (from PartialControllerInterface)0.9Ni*Ti is time constant of anti-windup compensation
RealNd (from PartialControllerInterface)10The higher Nd, the more ideal the derivative block
BooleanreverseActing (from PartialControllerInterface)falseSet to true for throttling the water flow rate through a cooling coil controller
Controller › Initialization
Modelica.Blocks.Types.InitinitType (from PartialControllerInterface)Modelica.Blocks.Types.Init.InitialStateType of initialization (1: no init, 2: steady state, 3: initial state, 4: initial output)
Realxi_start (from PartialControllerInterface)0Initial or guess value value for integrator output (= integrator state)
Realxd_start (from PartialControllerInterface)0Initial or guess value for state of derivative block
RealyCon_start (from PartialControllerInterface)0Initial value of output from the controller
Controller › Integrator reset
Buildings.Types.Resetreset (from PartialControllerInterface)Buildings.Types.Reset.DisabledType of controller output reset
Realy_reset (from PartialControllerInterface)xi_startValue to which the controller output is reset if the boolean trigger has a rising edge, used if reset == Buildings.Types.Reset.Parameter
Dynamics › Nominal condition
Modelica.Units.SI.TimetauThrWayVal10Time constant at nominal flow for dynamic energy and momentum balance of the three-way valve

Connectors

TypeNameDefaultDescription
Modelica.Fluid.Interfaces.FluidPort_aport_a1 (from PartialFourPort)Fluid connector a1 (positive design flow direction is from port_a1 to port_b1)
Modelica.Fluid.Interfaces.FluidPort_bport_b1 (from PartialFourPort)Fluid connector b1 (positive design flow direction is from port_a1 to port_b1)
Modelica.Fluid.Interfaces.FluidPort_aport_a2 (from PartialFourPort)Fluid connector a2 (positive design flow direction is from port_a2 to port_b2)
Modelica.Fluid.Interfaces.FluidPort_bport_b2 (from PartialFourPort)Fluid connector b2 (positive design flow direction is from port_a2 to port_b2)
Modelica.Blocks.Interfaces.BooleanInput[num]on (from PartialPlantParallelInterface)Set to true to enable equipment, or false to disable equipment
Modelica.Blocks.Interfaces.BooleanInputtrigger (from PartialControllerInterface)Resets the controller output when trigger becomes true
Modelica.Blocks.Interfaces.RealInputy_reset_in (from PartialControllerInterface)Input signal for state to which integrator is reset, enabled if reset = Buildings.Types.Reset.Input
Modelica.Blocks.Interfaces.RealInputTSetSet point for leaving water temperature

Components

TypeNameDefaultDescription
Medium1.MassFlowRatem1_flow (from PartialFourPortInterface)port_a1.m_flowMass flow rate from port_a1 to port_b1 (m1_flow > 0 is design flow direction)
Modelica.Units.SI.PressureDifferencedp1 (from PartialFourPortInterface)port_a1.p - port_b1.pPressure difference between port_a1 and port_b1
Medium2.MassFlowRatem2_flow (from PartialFourPortInterface)port_a2.m_flowMass flow rate from port_a2 to port_b2 (m2_flow > 0 is design flow direction)
Modelica.Units.SI.PressureDifferencedp2 (from PartialFourPortInterface)port_a2.p - port_b2.pPressure difference between port_a2 and port_b2
Medium1.ThermodynamicStatesta_a1 (from PartialFourPortInterface)if allowFlowReversal1 then Medium1.setState_phX(port_a1.p, noEvent(actualStream(port_a1.h_outflow)), noEvent(actualStream(port_a1.Xi_outflow))) else Medium1.setState_phX(port_a1.p, inStream(port_a1.h_outflow), inStream(port_a1.Xi_outflow))Medium properties in port_a1
Medium1.ThermodynamicStatesta_b1 (from PartialFourPortInterface)if allowFlowReversal1 then Medium1.setState_phX(port_b1.p, noEvent(actualStream(port_b1.h_outflow)), noEvent(actualStream(port_b1.Xi_outflow))) else Medium1.setState_phX(port_b1.p, port_b1.h_outflow, port_b1.Xi_outflow)Medium properties in port_b1
Medium2.ThermodynamicStatesta_a2 (from PartialFourPortInterface)if allowFlowReversal2 then Medium2.setState_phX(port_a2.p, noEvent(actualStream(port_a2.h_outflow)), noEvent(actualStream(port_a2.Xi_outflow))) else Medium2.setState_phX(port_a2.p, inStream(port_a2.h_outflow), inStream(port_a2.Xi_outflow))Medium properties in port_a2
Medium2.ThermodynamicStatesta_b2 (from PartialFourPortInterface)if allowFlowReversal2 then Medium2.setState_phX(port_b2.p, noEvent(actualStream(port_b2.h_outflow)), noEvent(actualStream(port_b2.Xi_outflow))) else Medium2.setState_phX(port_b2.p, port_b2.h_outflow, port_b2.Xi_outflow)Medium properties in port_b2
Modelica.Blocks.Math.BooleanToReal[num]booToRea (from PartialPlantParallelInterface)Boolean to real (if true then 1 else 0)
Buildings.Fluid.Actuators.Valves.TwoWayLinear[num]val2 (from PartialPlantParallel)Isolation valves on medium 2 side for on/off use
Buildings.Fluid.Actuators.Valves.TwoWayLinear[num]val1 (from PartialPlantParallel)Isolation valves on medium 1 side for on/off use
Buildings.Applications.DataCenters.ChillerCooled.Equipment.HeatExchanger_TSetheaExcWater-to-water heat exchanger

Revisions

  • April 9, 2021, by Kathryn Hinkelman:
    Moved nominal pressure differences to dpFixed_nominal at isolation valves to avoid redundant declarations and algebraic loops.
  • June 30, 2017, by Yangyang Fu:
    First implementation.