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
| Type | Name | Default | Description |
|---|---|---|---|
| Boolean | activate_ThrWayVal (from ThreeWayValveParameters) | Activate the use of three-way valve: True-use three-way valve; False-not use the three-way valve | |
| Boolean | homotopyInitialization (from PartialHeatExchanger) | true | = true, use homotopy method |
| Modelica.Units.SI.Efficiency | eta (from PartialHeatExchanger) | constant effectiveness | |
| Boolean | use_controller (from PartialControllerInterface) | true | Set to ture if the built-in controller is enabled to maintain the outlet temperature on the load side of a heat exchanger |
| Assumptions | |||
| Boolean | allowFlowReversal1 (from PartialFourPort) | true | = false to simplify equations, assuming, but not enforcing, no flow reversal for medium 1 |
| Boolean | allowFlowReversal2 (from PartialFourPort) | true | = false to simplify equations, assuming, but not enforcing, no flow reversal for medium 2 |
| Nominal condition | |||
| Modelica.Units.SI.MassFlowRate | m1_flow_nominal (from PartialFourPortInterface) | Nominal mass flow rate | |
| Modelica.Units.SI.MassFlowRate | m2_flow_nominal (from PartialFourPortInterface) | Nominal mass flow rate | |
| Modelica.Units.SI.PressureDifference | dp1_nominal (from FourPortFlowResistanceParameters) | Pressure difference | |
| Modelica.Units.SI.PressureDifference | dp2_nominal (from FourPortFlowResistanceParameters) | Pressure difference | |
| Advanced | |||
| Medium1.MassFlowRate | m1_flow_small (from PartialFourPortInterface) | 1E-4*abs(m1_flow_nominal) | Small mass flow rate for regularization of zero flow |
| Medium2.MassFlowRate | m2_flow_small (from PartialFourPortInterface) | 1E-4*abs(m2_flow_nominal) | Small mass flow rate for regularization of zero flow |
| Modelica.Fluid.Types.PortFlowDirection | portFlowDirection_1 (from ThreeWayValveParameters) | Modelica.Fluid.Types.PortFlowDirection.Bidirectional | Flow direction for port_1 in the three-way valve |
| Modelica.Fluid.Types.PortFlowDirection | portFlowDirection_2 (from ThreeWayValveParameters) | Modelica.Fluid.Types.PortFlowDirection.Bidirectional | Flow direction for port_2 in the three-way valve |
| Modelica.Fluid.Types.PortFlowDirection | portFlowDirection_3 (from ThreeWayValveParameters) | Modelica.Fluid.Types.PortFlowDirection.Bidirectional | Flow direction for port_3 in the three-way valve |
| Advanced › Diagnostics | |||
| Boolean | show_T (from PartialFourPortInterface) | false | = true, if actual temperature at port is computed |
| Flow resistance › Medium 1 | |||
| Boolean | computeFlowResistance1 (from FourPortFlowResistanceParameters) | true | =true, compute flow resistance. Set to false to assume no friction |
| Boolean | from_dp1 (from FourPortFlowResistanceParameters) | false | = true, use m_flow = f(dp) else dp = f(m_flow) |
| Real | n1 (from FourPortFlowResistanceParameters) | 2 | Flow exponent for side 1, n=1 for laminar, n=2 for turbulent |
| Boolean | linearizeFlowResistance1 (from FourPortFlowResistanceParameters) | false | = true, use linear relation between m_flow and dp for any flow rate |
| Real | deltaM1 (from FourPortFlowResistanceParameters) | 0.1 | Fraction of nominal flow rate where flow transitions to laminar |
| Flow resistance › Medium 2 | |||
| Boolean | computeFlowResistance2 (from FourPortFlowResistanceParameters) | true | =true, compute flow resistance. Set to false to assume no friction |
| Boolean | from_dp2 (from FourPortFlowResistanceParameters) | false | = true, use m_flow = f(dp) else dp = f(m_flow) |
| Real | n2 (from FourPortFlowResistanceParameters) | 2 | Flow exponent for side 2, n=1 for laminar, n=2 for turbulent |
| Boolean | linearizeFlowResistance2 (from FourPortFlowResistanceParameters) | false | = true, use linear relation between m_flow and dp for any flow rate |
| Real | deltaM2 (from FourPortFlowResistanceParameters) | 0.1 | Fraction of nominal flow rate where flow transitions to laminar |
| 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 |
| Three-way Valve | |||
| Modelica.Units.SI.PressureDifference | dpThrWayVal_nominal (from ThreeWayValveParameters) | 6000 | Nominal pressure drop of fully open valve |
| Real | fraK_ThrWayVal (from ThreeWayValveParameters) | 0.7 | Fraction 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) |
| Real | R (from ThreeWayValveParameters) | 50 | Rangeability, R=50...100 typically for the three-way valve |
| Real | delta0 (from ThreeWayValveParameters) | 0.01 | Range of significant deviation from equal percentage law for the three-way valve |
| Modelica.Units.SI.PressureDifference | dpValve_nominal (from PartialHeatExchanger) | 6000 | Nominal pressure drop of fully open valve |
| Dynamics › Time needed to open or close valve | |||
| Boolean | use_strokeTime (from PartialHeatExchanger) | true | Set to true to continuously open and close valve |
| Modelica.Units.SI.Time | strokeTime (from PartialHeatExchanger) | 30 | Time needed to open or close valve |
| Modelica.Blocks.Types.Init | init (from PartialHeatExchanger) | Modelica.Blocks.Types.Init.InitialOutput | Type of initialization (no init/steady state/initial state/initial output) |
| Real | yThrWayVal_start (from PartialHeatExchanger) | 1 | Initial value of output from the filter in the bypass valve |
| Dynamics › Nominal condition | |||
| Modelica.Units.SI.Time | tauThrWayVal (from PartialHeatExchanger) | 10 | Time constant at nominal flow for dynamic energy and momentum balance of the three-way valve |
| Advanced › Nominal condition | |||
| Modelica.Units.SI.Density | rhoStd (from PartialHeatExchanger) | Medium2.density_pTX(101325, 273.15 + 4, Medium2.X_default) | Inlet density for which valve coefficients are defined |
| Controller | |||
| Modelica.Blocks.Types.SimpleController | controllerType (from PartialControllerInterface) | Modelica.Blocks.Types.SimpleController.PID | Type of controller |
| Real | k (from PartialControllerInterface) | 1 | Gain of controller |
| Modelica.Units.SI.Time | Ti (from PartialControllerInterface) | 0.5 | Time constant of integrator block |
| Modelica.Units.SI.Time | Td (from PartialControllerInterface) | 0.1 | Time constant of derivative block |
| Real | yMax (from PartialControllerInterface) | 1 | Upper limit of output |
| Real | yMin (from PartialControllerInterface) | 0 | Lower limit of output |
| Real | wp (from PartialControllerInterface) | 1 | Set-point weight for Proportional block (0..1) |
| Real | wd (from PartialControllerInterface) | 0 | Set-point weight for Derivative block (0..1) |
| Real | Ni (from PartialControllerInterface) | 0.9 | Ni*Ti is time constant of anti-windup compensation |
| Real | Nd (from PartialControllerInterface) | 10 | The higher Nd, the more ideal the derivative block |
| Boolean | reverseActing (from PartialControllerInterface) | false | Set to true for throttling the water flow rate through a cooling coil controller |
| Controller › Initialization | |||
| Modelica.Blocks.Types.Init | initType (from PartialControllerInterface) | Modelica.Blocks.Types.Init.InitialState | Type of initialization (1: no init, 2: steady state, 3: initial state, 4: initial output) |
| Real | xi_start (from PartialControllerInterface) | 0 | Initial or guess value value for integrator output (= integrator state) |
| Real | xd_start (from PartialControllerInterface) | 0 | Initial or guess value for state of derivative block |
| Real | yCon_start (from PartialControllerInterface) | 0 | Initial value of output from the controller |
| Controller › Integrator reset | |||
| Buildings.Types.Reset | reset (from PartialControllerInterface) | Buildings.Types.Reset.Disabled | Type of controller output reset |
| Real | y_reset (from PartialControllerInterface) | xi_start | Value to which the controller output is reset if the boolean trigger has a rising edge, used if reset == Buildings.Types.Reset.Parameter |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Fluid.Interfaces.FluidPort_a | port_a1 (from PartialFourPort) | Fluid connector a1 (positive design flow direction is from port_a1 to port_b1) | |
| Modelica.Fluid.Interfaces.FluidPort_b | port_b1 (from PartialFourPort) | Fluid connector b1 (positive design flow direction is from port_a1 to port_b1) | |
| Modelica.Fluid.Interfaces.FluidPort_a | port_a2 (from PartialFourPort) | Fluid connector a2 (positive design flow direction is from port_a2 to port_b2) | |
| Modelica.Fluid.Interfaces.FluidPort_b | port_b2 (from PartialFourPort) | Fluid connector b2 (positive design flow direction is from port_a2 to port_b2) | |
| Modelica.Blocks.Interfaces.BooleanInput | trigger (from PartialControllerInterface) | Resets the controller output when trigger becomes true | |
| Modelica.Blocks.Interfaces.RealInput | y_reset_in (from PartialControllerInterface) | Input signal for state to which integrator is reset, enabled if reset = Buildings.Types.Reset.Input | |
| Modelica.Blocks.Interfaces.RealInput | TSet | Temperature setpoint for port_b2 |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Medium1.MassFlowRate | m1_flow (from PartialFourPortInterface) | port_a1.m_flow | Mass flow rate from port_a1 to port_b1 (m1_flow > 0 is design flow direction) |
| Modelica.Units.SI.PressureDifference | dp1 (from PartialFourPortInterface) | port_a1.p - port_b1.p | Pressure difference between port_a1 and port_b1 |
| Medium2.MassFlowRate | m2_flow (from PartialFourPortInterface) | port_a2.m_flow | Mass flow rate from port_a2 to port_b2 (m2_flow > 0 is design flow direction) |
| Modelica.Units.SI.PressureDifference | dp2 (from PartialFourPortInterface) | port_a2.p - port_b2.p | Pressure difference between port_a2 and port_b2 |
| Medium1.ThermodynamicState | sta_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.ThermodynamicState | sta_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.ThermodynamicState | sta_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.ThermodynamicState | sta_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.ThreeWayEqualPercentageLinear | thrWayVal (from PartialHeatExchanger) | Three-way valve used to control the outlet temperature | |
| Buildings.Fluid.HeatExchangers.ConstantEffectiveness | hex (from PartialHeatExchanger) | Heat exchanger | |
| Buildings.Controls.Continuous.LimPID | con | Controller for temperature at port_b2 | |
| Modelica.Blocks.Sources.RealExpression | T_b2 | Temperature at port_b2 |
Revisions
-
June 30, 2017, by Yangyang Fu:
First implementation.