modelHeatExchanger_TSet

Heat exchanger

Extends from Buildings.Applications.DataCenters.ChillerCooled.Equipment.BaseClasses.PartialHeatExchanger (Partial model for heat exchangers ), Buildings.Applications.DataCenters.ChillerCooled.Equipment.BaseClasses.PartialControllerInterface (Partial interface model for waterside economizer temperature controller).

Information

This module impliments a heat exchanger model with a built-in PID controller to control the outlet temperature at port_b2 if set parameter use_controller=true . Otherwise, if set use_controller=false, the PID controller and the three-way valve are removed and the outlet temperature at port_b2 will not be controlled.

Note that if the three-way valve is activated, it'll have the same differential pressure as the heat exchanger.

Parameters

TypeNameDefaultDescription
Booleanactivate_ThrWayVal (from ThreeWayValveParameters)Activate the use of three-way valve: True-use three-way valve; False-not use the three-way valve
BooleanhomotopyInitialization (from PartialHeatExchanger)true= true, use homotopy method
Modelica.Units.SI.Efficiencyeta (from PartialHeatExchanger)constant effectiveness
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
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
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
Modelica.Units.SI.PressureDifferencedpValve_nominal (from PartialHeatExchanger)6000Nominal pressure drop of fully open valve
Dynamics › Time needed to open or close valve
Booleanuse_strokeTime (from PartialHeatExchanger)trueSet to true to continuously open and close valve
Modelica.Units.SI.TimestrokeTime (from PartialHeatExchanger)30Time needed to open or close valve
Modelica.Blocks.Types.Initinit (from PartialHeatExchanger)Modelica.Blocks.Types.Init.InitialOutputType of initialization (no init/steady state/initial state/initial output)
RealyThrWayVal_start (from PartialHeatExchanger)1Initial value of output from the filter in the bypass valve
Dynamics › Nominal condition
Modelica.Units.SI.TimetauThrWayVal (from PartialHeatExchanger)10Time constant at nominal flow for dynamic energy and momentum balance of the three-way valve
Advanced › Nominal condition
Modelica.Units.SI.DensityrhoStd (from PartialHeatExchanger)Medium2.density_pTX(101325, 273.15 + 4, Medium2.X_default)Inlet density for which valve coefficients are defined
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

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.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.RealInputTSetTemperature setpoint for port_b2

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
Buildings.Fluid.Actuators.Valves.ThreeWayEqualPercentageLinearthrWayVal (from PartialHeatExchanger)Three-way valve used to control the outlet temperature
Buildings.Fluid.HeatExchangers.ConstantEffectivenesshex (from PartialHeatExchanger)Heat exchanger
Buildings.Controls.Continuous.LimPIDconController for temperature at port_b2
Modelica.Blocks.Sources.RealExpressionT_b2Temperature at port_b2

Revisions

  • June 30, 2017, by Yangyang Fu:
    First implementation.