modelTableData2DLoadDepSHC1Only
Extends from Modelica.Icons.Example (Icon for runnable examples).
Information
This model illustrates the use of Buildings.Fluid.HeatPumps.ModularReversible.TableData2DLoadDepSHC to model a primary-only heating and cooling plant. The simulation covers a 24-hour period with overlapping heating and cooling loads. The heating loads reach their peak value first, the cooling loads reach it last.
The plant model includes the following components.
- Modular four-pipe heat pump with three units
- HW and CHW isolation valves represented by an equivalent actuator
- Three headered variable-speed primary HW and CHW pumps
- HW and CHW minimum flow bypass valves
A unique aggregated load is modeled on each loop by means of a cooling or heating component controlled to maintain a constant ΔT and a modulating valve controlled to track a prescribed flow rate.
The closed-loop controls includes the following logic.
-
Heating and cooling plant enable: See
Buildings.Templates.Plants.Controls.Enabling.Enable.
The HW and CHW plant requests used in this logic are generated based on an opening threshold of 10 % of the equivalent terminal valves. - Heat pump operating mode: When the heating plant is enabled and the cooling plant is disabled, the heat pump is commanded in heating-only mode. When the cooling plant is enabled and the heating plant is disabled, the heat pump is commanded in cooling-only mode. When both the cooling plant and the heating plant are enabled, the heat pump is commanded in simultaneous heating and cooling mode. When both the cooling plant and the heating plant are disabled, the heat pump is commanded off.
- HW and CHW supply temperature: The heat pump is controlled with constant setpoints equal to the design values.
- Primary HW and CHW pumps controlled to maintain a remote differential pressure setpoint: See Buildings.Templates.Plants.Controls.Pumps.Generic.StagingHeadered for the staging and rotation logic, and Buildings.Templates.Plants.Controls.Pumps.Generic.ControlDifferentialPressure for the control logic.
- Minimum flow HW and CHW bypass valves controlled to maintain the differential pressure across the heat pump HW and CHW headers at design value.
Simulating this model shows how the plant responds to a varying load by
- enabling or disabling the heating and cooling plants, and switching the heat pump operating mode accordingly,
- staging or unstaging the heat pump modules in various modes,
- actuating the corresponding isolation valves,
- staging, rotating and controlling the primary pumps to meet the remote differential pressure setpoint.
- modulating the minimum flow bypass valve to keep the header differential pressure at its design value, which, in conjunction with the isolation valves' control, effectively results in a flowrate through the heat pump heat exchangers varying linearly with the number of enabled modules on each loop.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Data.TableData2DLoadDepSHC.Generic | dat | Performance data | |
| Nominal condition | |||
| Modelica.Units.SI.HeatFlowRate | QHea_flow_nominal | 1500E3 | Heating heat flow rate |
| Modelica.Units.SI.HeatFlowRate | QCoo_flow_nominal | -1500E3 | Cooling heat flow rate |
| Modelica.Units.SI.MassFlowRate | mHw_flow_nominal | abs(QHea_flow_nominal/(THwSup_nominal - THwRet_nominal))/Buildings.Utilities.Psychrometrics.Constants.cpWatLiq | HW mass flow rate |
| Modelica.Units.SI.MassFlowRate | mChw_flow_nominal | abs(QCoo_flow_nominal/(TChwSup_nominal - TChwRet_nominal))/Buildings.Utilities.Psychrometrics.Constants.cpWatLiq | CHW mass flow rate |
| Modelica.Units.SI.Temperature | THwSup_nominal | Buildings.Templates.Data.Defaults.THeaWatSupMed | HW supply temperature |
| Modelica.Units.SI.Temperature | TChwSup_nominal | Buildings.Templates.Data.Defaults.TChiWatSup | CHW supply temperature |
| Modelica.Units.SI.Temperature | THwRet_nominal | Buildings.Templates.Data.Defaults.THeaWatRetMed | HW return temperature |
| Modelica.Units.SI.Temperature | TChwRet_nominal | Buildings.Templates.Data.Defaults.TChiWatRet | CHW return temperature |
| Modelica.Units.SI.PressureDifference | dpHwRemSet_max | Buildings.Templates.Data.Defaults.dpHeaWatRemSet_max | Maximum HW differential pressure setpoint - At remote location |
| Modelica.Units.SI.PressureDifference | dpChwRemSet_max | Buildings.Templates.Data.Defaults.dpChiWatRemSet_max | Maximum CHW differential pressure setpoint - At remote location |
| Modelica.Units.SI.PressureDifference | dpHwLocSet_max | Buildings.Templates.Data.Defaults.dpHeaWatLocSet_max | Maximum HW differential pressure setpoint - local to the plant |
| Modelica.Units.SI.PressureDifference | dpChwLocSet_max | Buildings.Templates.Data.Defaults.dpChiWatLocSet_max | Maximum CHW differential pressure setpoint - local to the plant |
| Dynamics › Conservation equations | |||
| Modelica.Fluid.Types.Dynamics | energyDynamics | Modelica.Fluid.Types.Dynamics.FixedInitial | Type of energy balance: dynamic (3 initialization options) or steady state |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Templates.Components.Interfaces.Bus | busPumChwPri | Primary CHW pump control bus | |
| Templates.Components.Interfaces.Bus | busPumHwPri | Primary HW pump control bus |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| BoundaryConditions.WeatherData.ReaderTMY3 | weaDat | Outdoor conditions | |
| Fluid.HeatExchangers.SensibleCooler_T | loaHw | HW system approximated by prescribed return temperature | |
| Fluid.HeatExchangers.Heater_T | loaChw | CHW system system approximated by prescribed return temperature | |
| Fluid.Actuators.Valves.TwoWayEqualPercentage | valDisHw | Distribution system approximated by variable flow resistance | |
| Fluid.Actuators.Valves.TwoWayEqualPercentage | valDisChw | Distribution system approximated by variable flow resistance | |
| Fluid.Sensors.RelativePressure | dpHwRem | HW differential pressure at one remote location | |
| Fluid.Sensors.RelativePressure | dpChwRem | CHW differential pressure at one remote location | |
| Buildings.Controls.OBC.CDL.Reals.Sources.TimeTable | ratFlo | Source signal for flow rate ratio – Index 1 for HW, 2 for CHW | |
| Buildings.Controls.OBC.CDL.Reals.PID[2] | ctlEquZon | Zone equipment controller | |
| Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter[2] | norFlo | Normalize flow rate | |
| Fluid.Sensors.MassFlowRate | mChw_flow | CHW mass flow rate | |
| Fluid.Sensors.MassFlowRate | mHw_flow | HW mass flow rate | |
| Buildings.Controls.OBC.CDL.Reals.AddParameter | TChwRetPre | Prescribed CHW return temperature | |
| Buildings.Controls.OBC.CDL.Reals.AddParameter | THwRetPre | Prescribed HW return temperature | |
| Buildings.Controls.OBC.CDL.Reals.Max | max2 | Limit prescribed HWRT | |
| Buildings.Controls.OBC.CDL.Reals.Min | min1 | Limit prescribed CHWRT | |
| Buildings.Fluid.FixedResistances.PressureDrop | pipHw | Piping | |
| Buildings.Fluid.FixedResistances.PressureDrop | pipChw | Piping | |
| Buildings.Controls.OBC.CDL.Reals.Sources.Constant | con | Constant limiting prescribed return temperature | |
| Buildings.Fluid.HeatPumps.ModularReversible.TableData2DLoadDepSHC | hp | Modular heat pump | |
| Sensors.TemperatureTwoPort | TChwSup | CHW supply temperature | |
| Sensors.TemperatureTwoPort | THwSup | HW supply temperature | |
| Buildings.Controls.OBC.CDL.Reals.Sources.Constant[2] | TSupSet | Supply temperature setpoints | |
| Sources.Boundary_pT | pChwRet | Pressure boundary conditions at HP inlet | |
| Sources.Boundary_pT | pHwRet | Pressure boundary condition at HP inlet | |
| Actuators.Valves.TwoWayTable | valHwIso | Equivalent actuator for modules' condenser barrels and HW isolation valves | |
| Actuators.Valves.TwoWayTable | valChwIso | Equivalent actuator for modules' evaporator barrels and CHW isolation valves | |
| Buildings.Controls.OBC.CDL.Integers.MultiSum | sumNumUni | Total number of enabled modules | |
| Buildings.Controls.OBC.CDL.Utilities.Assert | assMes | Assert condition on number of enabled modules | |
| Buildings.Controls.OBC.CDL.Integers.LessEqualThreshold | intLesEquThr | True if number of enabled modules lower or equal to number of modules | |
| Sensors.RelativePressure | dpChwHea | Module CHW header differential pressure | |
| Sensors.RelativePressure | dpHwHea | Module HW header differential pressure | |
| Actuators.Valves.TwoWayLinear | valChwByp | CHW minimum flow bypass valve | |
| Buildings.Controls.OBC.CDL.Reals.Sources.Constant[2] | dpHeaSet | Module header dp setpoint | |
| Buildings.Controls.OBC.Utilities.PIDWithEnable | ctlValChwByp | CHW minimum flow bypass valve controller | |
| Buildings.Controls.OBC.CDL.Reals.Sources.Constant[2] | dpRemSet | Remote dp setpoint | |
| Sensors.TemperatureTwoPort | THwRetPla | Plant HW return temperature | |
| Sensors.TemperatureTwoPort | TChwRetPla | Plant CHW return temperature | |
| Actuators.Valves.TwoWayLinear | valHwByp | HW minimum flow bypass valve | |
| Buildings.Controls.OBC.Utilities.PIDWithEnable | ctlValHwByp | HW minimum flow bypass valve controller | |
| Sensors.TemperatureTwoPort | TChwRet | CHW return temperature | |
| Sensors.TemperatureTwoPort | THwRet | HW return temperature | |
| Buildings.Controls.OBC.CDL.Reals.GreaterThreshold | valChwReq | CHW plant request from terminal valve | |
| Buildings.Controls.OBC.CDL.Reals.GreaterThreshold | valHwReq | HW plant request from terminal valve | |
| Buildings.Controls.OBC.CDL.Conversions.BooleanToInteger | reqHea | Heating plant request | |
| Buildings.Controls.OBC.CDL.Conversions.BooleanToInteger | reqCoo | Cooling plant request | |
| Templates.Plants.Controls.Enabling.Enable | enaHea | Enable heating | |
| Templates.Plants.Controls.Enabling.Enable | enaCoo | Enable cooling | |
| Templates.Components.Routing.SingleToMultiple | inlPumChwPri | Primary CHW pumps suction header | |
| Templates.Components.Pumps.Multiple | pumChwPri | Primary CHW pumps | |
| Templates.Components.Routing.MultipleToSingle | outPumChwPri | Primary CHW pumps discharge header | |
| Templates.Plants.Controls.Pumps.Generic.ControlDifferentialPressure | ctlPumChwPri | Primary CHW pump control | |
| Sensors.VolumeFlowRate | VChwPri | Primary CHW flow (plant side) | |
| Templates.Plants.Controls.Pumps.Generic.StagingHeadered | staPumChwPri | Primary CHW pump staging | |
| Templates.Components.Routing.SingleToMultiple | inlPumHwPri | Primary HW pumps suction header | |
| Templates.Components.Pumps.Multiple | pumHwPri | Primary HW pumps | |
| Templates.Components.Routing.MultipleToSingle | outPumHwPri | Primary HW pumps discharge header | |
| Sensors.VolumeFlowRate | VHwPri | Primary HW flow (plant side) | |
| Templates.Plants.Controls.Pumps.Generic.ControlDifferentialPressure | ctlPumHwPri | Primary HW pump control | |
| Templates.Plants.Controls.Pumps.Generic.StagingHeadered | staPumHwPri | Primary HW pump staging | |
| Buildings.Controls.OBC.CDL.Logical.MultiOr | anyPumHwPri | True if any primary HW pump is proven on | |
| Buildings.Controls.OBC.CDL.Logical.MultiOr | anyPumChwPri | True if any primary CHW pump is proven on | |
| FixedResistances.Junction | junChwBypSup | CHW bypass supply junction | |
| FixedResistances.Junction | junChwBypRet | CHW bypass return junction | |
| FixedResistances.Junction | junHwBypSup | HW bypass supply junction | |
| FixedResistances.Junction | junHwBypRet | HW bypass return junction |
Contents
| Name | Description |
|---|---|
| Main medium (common for CHW and HW) |
Revisions
-
March 23, 2026, by Antoine Gautier:
Refactored with two separate connectors for heating and cooling on/off commands.
This is for #4507. -
July 1, 2025, by Antoine Gautier:
First implementation.