modelHeatRecoveryHeatPump

An ETS model with a heat recovery heat pump producing CHW, HHW, and DHW

Extends from Buildings.DHC.ETS.BaseClasses.PartialETS (Partial class for modeling an energy transfer station).

Information

Model of an Energy Transfer Station with heat recovery heat pump, buffer tanks and optional domestic hot water preparation and optional water-side economizer.

The figure below shows the schematic diagram. The heat recovery heat pump preferentially operates in heat recovery mode, but if heating (or cooling) demand persists while the cold (or hot) water-side buffer tank is fully charged, the evaporator (or condenser) temperature is reset, the corresponding tank is decoupled to avoid flushing the tank, and heat is exchanged with the district energy system.

Schematic diagram of the ETS.

The operation is as follows:

Domestic Hot Water Tank and Buffer Tanks

The chilled water and heating hot water tanks are by default sized for five minutes and used as buffer tanks. The DHW tank is by default sized for 24 hours of storage. Each tank generates a signal to request charging. If the temperature of its supply side (top for the hot tank, bottom for the cold tank) deviates from the set point with hysteresis, charging is enabled until the temperature of its return side (bottom for the hot tank, top for the cold tank) achieves the set point with hysteresis.

When the space heating or cooling tank does not request charging, the diversion valve VAL_DIV_CON or VAL_DIV_EVA to the respective tank is closed, and the isolation valve VAL_ISO_CON or VAL_ISO_EVA is opened to allow energy exchange with the district heat exchanger. The diversion valves are necessary because, for example, when the ETS operates cooling only mode, rejecting heat to the ambient loop, the condenser outputs hot water at the minimum leaving temperature is 15°C. Without the diversion valve, the cool water from the condenser would flush out the energy stored in the space heating tank. This causes energy waste. It also causes short cycling because the tank will request charging repeatedly as its temperature falls below the heating set point, bring the system into a limit cycle.

Two-tank Coordination on the Condenser Side

The integration of the DHW tank is optional, as not all buildings prepare DHW using the ETS. When integrated, the space heating and DHW tank share the same condenser loop. The table below explains how the two loops are coordinated through valve control.

Control signal coordination of the DHW tank and the space heating tank. Depending on the charge signal, the control block computes the position ymix of the mixing valve VAL_MIX (position 1 is to the space heating tank, position 0 is to the DHW tank) and ydiv of the condenser-side diversion valve VAL_DIV_CON.
Charge signal Controller output
DHW HHW ymix ydiv
on on 0.5 1
on off 0 1
off on 1 1
off off 1 0

Heat Recovery Heat Pump

The heat recovery heat pump can produce heating, cooling, or both simultaneously. The condenser pump PUM_CON and the evaporator pump PUM_EVA are enabled when any of the respective tanks requests charging. The heat pump is turned on 30 seconds after PUM_CON and PUM_EVA are running.

When on, the primary pumps are operated at constant speed, and the condenser (resp. evaporator) mixing valve VAL_CON (resp. VAL_EVA) are modulated with a P controller to track the set point for the water that leaves the heat pump, with a small offset to open first the valve and then ramp up the compressor speed.

The compressor speed is controlled based on the same temperature measurement as the mixing valves. Based on a moving average of the compressor speed signal for heating and cooling, the heat pump control is switched into heating or cooling dominated operation, and the respective compressor speed setpoint is sent to the heat pump.

If only heating (or only cooling) is requested from the tank, then the evaporator (or condenser) set point temperature is reset to minimize the temperature lift across the heat pump.

District Heat Exchanger

The district heat exchanger hydraulically decouples the buildings system and the district system. Its primary and secondary circuits are enabled to operate if either any of the tanks request charging, and if an isolation valve VAL_ISO_CON or VAL_ISO_EVA is open. When enabled, the pumps PUM1_DHX and PUM2_DHX operate at a constant speed.

Temperature Set Points

The set points for the supply temperatures are input to this model. For the heating supply water, use THeaWatSupSet, for the cooling supply water, use TChiWatSupSet.

If a domestic hot water supply is present, as declared through the parameter have_hotWat, then use THotWatSupSet for the set point temperature to the end user (such as shower), and use TColWat for the temperature of the cold water supply and QReqHotWat_flow for the heat flow rate associated with the hot water supply, i.e., QReqHotWat_flow = mHotWat_flow cwat (THotWatSupSet-TColWat), where mHotWat_flow is the hot water mass flow rate, and cwat is the specific heat capacity of water.

Domestic Hot Water Preparation

The DHW preparation is optional. If present, a fresh water station is used. The fresh water station allows to store heat in the heating rather than the domestic hot water, therefore avoiding the potential problem of Legionella bacteria getting from the hot water tank to the DHW circuit. This allows to operate the storage at a lower temperature, thereby increasing the heat pump COP.

The integration of the domestic hot water is further described in Buildings.DHC.ETS.Combined.Subsystems.DHWConsumption, which uses the fresh water station that is described and shown with a schematic diagram at Buildings.DHC.ETS.Combined.Subsystems.StorageTankWithExternalHeatExchanger.

Water-side economizer

The water-side economizer is optional. Use of the water-side economizer can improve resilience during heat waves when power consumption of the ETS need to be curtailed by switching of the chiller, for example during a grid outage when the site operates on emergency power.

To use the water-side economizer, if the temperature conditions are favorable, the valves (or pumps) are activated in order to cool the chilled water supply to the building. This model and its operation is described in Buildings.DHC.ETS.Combined.Subsystems.WatersideEconomizer. and in Gautier et al. (2022).

References

Antoine Gautier, Michael Wetter and Matthias Sulzer.
Resilient cooling through geothermal district energy system.
Applied Energy, 325, November, 2022.

Parameters

TypeNameDefaultDescription
Buildings.Fluid.Data.Fuels.Generic[nFue]fue (from PartialETS)Fuel type
Buildings.DHC.ETS.Types.ConnectionConfigurationconConBuildings.DHC.ETS.Types.ConnectionConfiguration.PumpDistrict connection configuration
IntegernSysHea1Number of heating systems
IntegernSysCoonSysHeaNumber of cooling systems
IntegernSouAmb1Number of ambient sources
Modelica.Units.SI.MassFlowRatem1Hex_flow_nominalabs(QHex_flow_nominal/4200/(T_b1Hex_nominal - T_a1Hex_nominal))Design mass flow rate for heat exchanger on district side
Modelica.Units.SI.TemperatureDifferencedTOffSetHea1Temperature to be added to the set point in order to be slightly above what the heating load requires
Modelica.Units.SI.TemperatureDifferencedTOffSetCoo-1Temperature to be added to the set point in order to be slightly below what the cooling load requires
Buildings.DHC.Loads.HotWater.Data.GenericDomesticHotWaterWithHeatExchangerdatDhwPerformance data of the domestic hot water component
Booleanhave_WSEfalseSet to true in case a waterside economizer is used
Modelica.Units.SI.TemperatureTHeaWatSupSetMindatHeaPum.TConLvgMinMinimum value of heating water supply temperature set point (used for heat pump reset)
Configuration
TypDisSystyp (from PartialETS)Buildings.DHC.Types.DistrictSystemType.CombinedGeneration2to4Type of district system
IntegernPorts_aHeaWat (from PartialETS)0Number of heating water return ports
IntegernPorts_bHeaWat (from PartialETS)0Number of heating water supply ports
IntegernPorts_aChiWat (from PartialETS)0Number of chilled water return ports
IntegernPorts_bChiWat (from PartialETS)0Number of chilled water supply ports
Booleanhave_heaWat (from PartialETS)falseSet to true if the ETS supplies heating water
Booleanhave_hotWat (from PartialETS)falseSet to true if the ETS supplies hot water
Booleanhave_chiWat (from PartialETS)falseSet to true if the ETS supplies chilled water
Booleanhave_fan (from PartialETS)falseSet to true if fan power is computed
Booleanhave_pum (from PartialETS)falseSet to true if pump power is computed
Booleanhave_eleHea (from PartialETS)falseSet to true if the ETS has electric heating system
IntegernFue (from PartialETS)0Number of fuel types (0 means no combustion system)
Booleanhave_eleCoo (from PartialETS)falseSet to true if the ETS has electric cooling system
Booleanhave_weaBus (from PartialETS)falseSet to true to use a weather bus
Assumptions
BooleanallowFlowReversalSer (from PartialETS)falseSet to true to allow flow reversal on service side
BooleanallowFlowReversalBui (from PartialETS)falseSet to true to allow flow reversal on building side
Nominal condition
Modelica.Units.SI.HeatFlowRateQHeaWat_flow_nominal (from PartialETS)0Nominal capacity of heating system (>=0)
Modelica.Units.SI.HeatFlowRateQHotWat_flow_nominal (from PartialETS)0Nominal capacity of hot water production system (>=0)
Modelica.Units.SI.HeatFlowRateQChiWat_flow_nominal (from PartialETS)0Nominal capacity of cooling system (<=0)
Modelica.Units.SI.PressureDifferencedpValIso_nominal2E3Nominal pressure drop of ambient circuit isolation valves
District heat exchanger
Modelica.Units.SI.PressureDifferencedp1Hex_nominalNominal pressure drop across heat exchanger on district side
Modelica.Units.SI.PressureDifferencedp2Hex_nominalNominal pressure drop across heat exchanger on building side
Modelica.Units.SI.HeatFlowRateQHex_flow_nominalNominal heat flow rate through heat exchanger (from district to building)
Modelica.Units.SI.TemperatureT_a1Hex_nominalNominal water inlet temperature on district side
Modelica.Units.SI.TemperatureT_b1Hex_nominalNominal water outlet temperature on district side
Modelica.Units.SI.TemperatureT_a2Hex_nominalNominal water inlet temperature on building side
Modelica.Units.SI.TemperatureT_b2Hex_nominalNominal water outlet temperature on building side
RealspePum1HexMin0.1Heat exchanger primary pump minimum speed (fractional)
RealspePum2HexMin0.1Heat exchanger secondary pump minimum speed (fractional)
Buffer Tank
Modelica.Units.SI.VolumeVTanHeaWatdatHeaPum.PLRMin*datHeaPum.mCon_flow_nominal*5*60/1000Heating water tank volume
Modelica.Units.SI.LengthhTanHeaWat(VTanHeaWat*16/Modelica.Constants.pi)^(1/3)Heating water tank height (without insulation, assuming twice the diameter)
Modelica.Units.SI.LengthdInsTanHeaWat0.1Heating water tank insulation thickness
Modelica.Units.SI.VolumeVTanChiWatdatHeaPum.PLRMin*datHeaPum.mEva_flow_nominal*5*60/1000Chilled water tank volume
Modelica.Units.SI.LengthhTanChiWat(VTanChiWat*16/Modelica.Constants.pi)^(1/3)Chilled water tank height (without insulation, assuming twice the diameter)
Modelica.Units.SI.LengthdInsTanChiWat0.1Chilled water tank insulation thickness
IntegernSegTan3Number of volume segments for tanks
Heat recovery heat pump
Buildings.DHC.ETS.Combined.Data.GenericHeatPumpdatHeaPumHeat pump performance data
Modelica.Units.SI.PressureDifferencedpCon_nominaldatHeaPum.datHea.dpCon_nominalNominal pressure drop across condenser
Modelica.Units.SI.PressureDifferencedpEva_nominaldatHeaPum.datHea.dpEva_nominalNominal pressure drop across evaporator
Supervisory controller
Buildings.Controls.OBC.CDL.Types.SimpleControllercontrollerTypeBuildings.Controls.OBC.CDL.Types.SimpleController.PIType of controller
RealkHot0.05Gain of controller on hot side
RealkCol0.1Gain of controller on cold side
Modelica.Units.SI.TimeTiHot300Time constant of integrator block on hot side
Modelica.Units.SI.TimeTiCol120Time constant of integrator block on cold side
Modelica.Units.SI.TemperatureTChiWatSupSetMaxdatHeaPum.TEvaLvgMaxMaximum value of chilled water supply temperature set point for heat pump (used for heat pump reset)
Waterside economizer
Modelica.Units.SI.PressureDifferencedp1WSE_nominal40E3Nominal pressure drop across heat exchanger on district side
Modelica.Units.SI.PressureDifferencedp2WSE_nominal40E3Nominal pressure drop across heat exchanger on building side
Modelica.Units.SI.HeatFlowRateQWSE_flow_nominal0Nominal heat flow rate through water-side economizer exchanger (<=0)
Modelica.Units.SI.TemperatureT_a1WSE_nominal279.15Nominal water inlet temperature on district side
Modelica.Units.SI.TemperatureT_b1WSE_nominal284.15Nominal water outlet temperature on district side
Modelica.Units.SI.TemperatureT_a2WSE_nominal288.15Nominal water inlet temperature on building side
Modelica.Units.SI.TemperatureT_b2WSE_nominal281.15Nominal water outlet temperature on building side
Realy1WSEMin0.05Minimum pump flow rate or valve opening for temperature measurement (fractional)
Modelica.Units.SI.MassFlowRatem1WSE_flow_nominalabs(QWSE_flow_nominal/4200/(T_b1WSE_nominal - T_a1WSE_nominal))WSE primary mass flow rate
Initialization
MediumBui.TemperatureTCon_startMediumBui.T_defaultTemperature start value on the condenser side
MediumBui.TemperatureTEva_startMediumBui.T_defaultTemperature start value on the evaporator side

Connectors

TypeNameDefaultDescription
Modelica.Fluid.Interfaces.FluidPorts_a[nPorts_aHeaWat]ports_aHeaWat (from PartialETS)Fluid connectors for heating water return (from building)
Modelica.Fluid.Interfaces.FluidPorts_b[nPorts_bHeaWat]ports_bHeaWat (from PartialETS)Fluid connectors for heating water supply (to building)
Modelica.Fluid.Interfaces.FluidPorts_a[nPorts_aChiWat]ports_aChiWat (from PartialETS)Fluid connectors for chilled water return (from building)
Modelica.Fluid.Interfaces.FluidPorts_b[nPorts_bChiWat]ports_bChiWat (from PartialETS)Fluid connectors for chilled water supply (to building)
Modelica.Fluid.Interfaces.FluidPort_aport_aSerAmb (from PartialETS)Fluid connector for ambient water service supply line
Modelica.Fluid.Interfaces.FluidPort_bport_bSerAmb (from PartialETS)Fluid connector for ambient water service return line
Modelica.Fluid.Interfaces.FluidPort_aport_aSerHea (from PartialETS)Fluid connector for heating service supply line
Modelica.Fluid.Interfaces.FluidPort_bport_bSerHea (from PartialETS)Fluid connector for heating service return line
Modelica.Fluid.Interfaces.FluidPort_aport_aSerCoo (from PartialETS)Fluid connector for cooling service supply line
Modelica.Fluid.Interfaces.FluidPort_bport_bSerCoo (from PartialETS)Fluid connector for cooling service return line
Buildings.Controls.OBC.CDL.Interfaces.RealOutputPHea (from PartialETS)Power drawn by heating system
Buildings.Controls.OBC.CDL.Interfaces.RealOutputPCoo (from PartialETS)Power drawn by cooling system
Buildings.Controls.OBC.CDL.Interfaces.RealOutputPFan (from PartialETS)Power drawn by fan motors
Buildings.Controls.OBC.CDL.Interfaces.RealOutputPPum (from PartialETS)Power drawn by pump motors
Buildings.Controls.OBC.CDL.Interfaces.RealOutput[nFue]QFue_flow (from PartialETS)Fuel energy input rate
BoundaryConditions.WeatherData.BusweaBus (from PartialETS)Weather data bus
Buildings.Controls.OBC.CDL.Interfaces.RealInputTHeaWatSupSetHeating water supply temperature set point
Buildings.Controls.OBC.CDL.Interfaces.RealInputTChiWatSupSetChilled water supply temperature set point
Buildings.Controls.OBC.CDL.Interfaces.RealOutputdHHeaWat_flowHeating water distributed energy flow rate
Buildings.Controls.OBC.CDL.Interfaces.RealOutputdHChiWat_flowChilled water distributed energy flow rate
Buildings.Controls.OBC.CDL.Interfaces.RealInputTHotWatSupSetDomestic hot water temperature set point for supply to fixtures
Buildings.Controls.OBC.CDL.Interfaces.RealInputTColWatCold water temperature that is fed to domestic hot water preparation
Buildings.Controls.OBC.CDL.Interfaces.RealInputQReqHotWat_flowDomestic hot water load
Buildings.Controls.OBC.CDL.Interfaces.RealOutputdHHotWat_flowDomestic hot water distributed energy flow rate

Components

TypeNameDefaultDescription
Buildings.DHC.ETS.Combined.Subsystems.HeatPumpModularheaPumHeat pump
Buildings.DHC.ETS.Combined.Subsystems.HeatExchangerhexDistrict heat exchanger
Buildings.DHC.ETS.Combined.Subsystems.StratifiedTankWithCommandtanChiWatChilled water tank
Buildings.DHC.ETS.Combined.Subsystems.StratifiedTankWithCommandtanHeaWatHeating hot water tank
Buildings.DHC.ETS.Combined.Subsystems.DHWConsumptiontanDhwTank for domestic hot water
Buildings.Fluid.Actuators.Valves.TwoWayLinearvalIsoEvaEvaporator to ambient loop isolation valve
Buildings.Fluid.Actuators.Valves.TwoWayLinearvalIsoConCondenser to ambient loop isolation valve
Buildings.DHC.ETS.BaseClasses.CollectorDistributorcolChiWatCollector/distributor for chilled water
Buildings.DHC.ETS.BaseClasses.CollectorDistributorcolHeaWatCollector/distributor for heating water
Buildings.DHC.ETS.BaseClasses.CollectorDistributorcolAmbWatCollector/distributor for ambient water
Buildings.DHC.Networks.BaseClasses.DifferenceEnthalpyFlowRatedHFloHeaWatVariation of enthalpy flow rate
Buildings.Fluid.Sensors.TemperatureTwoPortsenTHexBuiEntHeat exchanger water entering temperature on building side
Buildings.Fluid.Sensors.TemperatureTwoPortsenTHexBuiLvgHeat exchanger water leaving temperature on building side
Buildings.Fluid.Sources.Boundary_pTbouPressure boundary condition representing expansion vessel (common to HHW and CHW)
Buildings.Controls.OBC.CDL.Reals.MultiSumtotPPumTotal pump power
Buildings.DHC.Networks.BaseClasses.DifferenceEnthalpyFlowRatedHFloChiWatVariation of enthalpy flow rate
Buildings.Controls.OBC.CDL.Reals.Sources.ConstantzerPHeaZero power
Buildings.Fluid.Actuators.Valves.ThreeWayLinearvalMixHeaThree way valve selecting condenser flow from HHW or DHW return
Buildings.Fluid.FixedResistances.JunctionjunDomHotWatJunction to domestic hot water tank
Buildings.DHC.ETS.Combined.Controls.TwoTankCoordinationtwoTanCooController to coordinate heat rejection vs use in space or DHW tank
Buildings.Controls.OBC.CDL.Conversions.BooleanToRealconDivValChiControl for diversion valve to avoid that tank is flushed when changing to district heat exchanger
Buildings.Fluid.Actuators.Valves.ThreeWayLinearvalDivConDiversion valve used to reject heat and not flow through the whole tank
Buildings.Fluid.Actuators.Valves.ThreeWayLinearvalDivEvaDiversion valve used to reject cold and not flow through the whole tank
Buildings.Fluid.FixedResistances.JunctionjunChiWatJunction at chilled water tank
Buildings.Fluid.FixedResistances.JunctionjunHeaWatJunction at heating water tank
Buildings.Controls.OBC.CDL.Conversions.BooleanToRealconAmbEvaControl for valve for ambient loop on evaporator side
Buildings.Controls.OBC.CDL.Conversions.BooleanToRealconDivValHeaControl for diversion valve to avoid that tank is flushed when changing to district heat exchanger
Buildings.Controls.OBC.CDL.Conversions.BooleanToRealconAmbConControl for valve for ambient loop on condenser side
Buildings.Fluid.Sensors.TemperatureTwoPortsenTSerEntHeat exchanger service line water entering temperature
Buildings.Fluid.Sensors.TemperatureTwoPortsenTSerLinLvgHeat exchanger service line water leaving temperature
Controls.EtsHexopeEtsHexOutput true to operate ETS heat exchanger
Subsystems.WatersideEconomizerWSEWaterside economizer
Buildings.DHC.ETS.BaseClasses.JunctionsplWSEFlow splitter for WSE
Buildings.DHC.ETS.BaseClasses.JunctionmixWSEFlow mixer for WSE

Revisions

  • November 14, 2025, by Michael Wetter:
    First implementation.