modelTableData2DLoadDepSHC1And2
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-secondary 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 constant-speed primary HW and CHW pumps.
- HW and CHW common legs.
- Three headered variable-speed secondary HW and CHW pumps.
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 use mostly the same logic as the one described in Buildings.Fluid.HeatPumps.ModularReversible.Examples.TableData2DLoadDepSHC1Only. Only the logic that differs is presented below.
- Primary HW and CHW pump staging based on the number of modules enabled in each mode: See Buildings.Templates.Plants.Controls.Pumps.Generic.StagingHeadered.
- Secondary 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.
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 and rotating the primary pumps, and
- staging, rotating and controlling the secondary pumps to meet the remote differential pressure setpoint.
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 | mHwSec_flow_nominal | abs(QHea_flow_nominal/(THwSup_nominal - THwRet_nominal))/Buildings.Utilities.Psychrometrics.Constants.cpWatLiq | Secondary HW mass flow rate |
| Modelica.Units.SI.MassFlowRate | mChwSec_flow_nominal | abs(QCoo_flow_nominal/(TChwSup_nominal - TChwRet_nominal))/Buildings.Utilities.Psychrometrics.Constants.cpWatLiq | Secondary CHW mass flow rate |
| Modelica.Units.SI.MassFlowRate | mHwPri_flow_nominal | mHwSec_flow_nominal/0.9 | Primary HW mass flow rate |
| Modelica.Units.SI.MassFlowRate | mChwPri_flow_nominal | mChwSec_flow_nominal/0.9 | Primary 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 | |
| Templates.Components.Interfaces.Bus | busPumHwSec | Secondary HW pump control bus | |
| Templates.Components.Interfaces.Bus | busPumChwPri1 | Primary CHW 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 | |
| Buildings.Controls.OBC.CDL.Reals.Sources.Constant[2] | dpHeaSet | Module header dp setpoint | |
| 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 | |
| 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.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 | |
| Templates.Plants.Controls.Pumps.Generic.StagingHeadered | staPumHwPri | Primary HW pump staging | |
| Templates.Components.Pumps.Multiple | pumHwSec | Secondary HW pumps | |
| Templates.Plants.Controls.Pumps.Generic.ControlDifferentialPressure | ctlPumHwSec | Secondary HW pump control | |
| Templates.Plants.Controls.Pumps.Generic.StagingHeadered | staPumHwSec | Secondary HW pump staging | |
| Templates.Components.Routing.SingleToMultiple | inlPumHwSec | Secondary HW pumps suction header | |
| Templates.Components.Routing.MultipleToSingle | outPumHwSec | Secondary HW pumps discharge header | |
| Templates.Components.Routing.SingleToMultiple | inlPumChwSec | Secondary CHW pumps suction header | |
| Templates.Components.Pumps.Multiple | pumChwSec | Secondary CHW pumps | |
| Templates.Components.Routing.MultipleToSingle | outPumChwSec | Secondary CHW pumps discharge header | |
| Templates.Plants.Controls.Pumps.Generic.ControlDifferentialPressure | ctlPumChwSec | Secondary CHW pump control | |
| Templates.Plants.Controls.Pumps.Generic.StagingHeadered | staPumChwSec | Secondary CHW pump staging | |
| Sensors.VolumeFlowRate | VChwSec | Secondary CHW flow | |
| Sensors.VolumeFlowRate | VHwSec | Secondary HW flow (plant side) | |
| Sensors.VolumeFlowRate | VChwPri | Primary CHW flow | |
| Sensors.TemperatureTwoPort | TChwSupPri | Primary CHW supply temperature | |
| Sensors.TemperatureTwoPort | THwSupPri | Primary HW supply temperature | |
| 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 | |
| Templates.Components.Routing.MultipleToSingle | outPumChwPri | Primary CHW pumps discharge header |
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.