modelPartialHeatPumpPlant

Interface class for heat pump plant

Information

This partial class provides a standard interface for heat pump plant models.

Parameters

TypeNameDefaultDescription
Booleanhave_hptyp <> Buildings.Templates.Plants.Controls.Types.PlantHeatPump.PolyvalentSet to true for plants with non-reversible or reversible heat pumps
Booleanhave_hrctyp == Buildings.Templates.Plants.Controls.Types.PlantHeatPump.ReversibleHeatRecoverySet to true for plants with sidestream heat recovery chiller
Booleanhave_phptyp == Buildings.Templates.Plants.Controls.Types.PlantHeatPump.ReversiblePolyvalent or typ == Buildings.Templates.Plants.Controls.Types.PlantHeatPump.PolyvalentSet to true for plants with polyvalent heat pumps
Buildings.Templates.Plants.Controls.Types.PlantHeatPumptypBuildings.Templates.Plants.Controls.Types.PlantHeatPump.ReversibleType of plant
Buildings.Templates.Plants.HeatPumps.Configuration.HeatPumpPlantcfgConfiguration parameters
Buildings.Templates.Plants.HeatPumps.Data.HeatPumpPlantdatDesign and operating parameters
IntegernHpif have_hp then nHp_select else 0Number of heat pumps (excluding polyvalent HPs)
IntegernPhpif have_php then nPhp_select else 0Number of polyvalent heat pumps
Booleanis_revtyp == Buildings.Templates.Plants.Controls.Types.PlantHeatPump.Reversible or typ == Buildings.Templates.Plants.Controls.Types.PlantHeatPump.ReversibleHeatRecovery or typ == Buildings.Templates.Plants.Controls.Types.PlantHeatPump.ReversiblePolyvalentSet to true for reversible heat pumps, false for heating only
Buildings.Templates.Plants.HeatPumps.Types.DistributiontypDisif typHp == Buildings.Templates.Components.Types.HeatPump.AirToWater then typDis_select1 else typDis_select2Type of distribution system
Booleanhave_valHpInlIsoif not have_hp then false elseif not have_chiWat and typArrPumPri == Buildings.Templates.Components.Types.PumpArrangement.Dedicated then false else trueSet to true for isolation valves at HP inlet
Booleanhave_valHpOutIsoif not have_hp then false elseif not have_chiWat and typArrPumPri == Buildings.Templates.Components.Types.PumpArrangement.Dedicated then false elseif nHp == 1 then false elseif have_chiWat and typArrPumPri == Buildings.Templates.Components.Types.PumpArrangement.Dedicated and not have_pumPriDedComHp then false else trueSet to true for isolation valves at HP outlet
Booleanhave_valPhpInlIsoif not have_php then false elseif typArrPumPri == Buildings.Templates.Components.Types.PumpArrangement.Dedicated then false else trueSet to true for isolation valves at polyvalent HP inlet
Booleanhave_valPhpOutIsofalseSet to true for isolation valves at polyvalent HP outlet
Buildings.Templates.Plants.HeatPumps.Types.PumpsPrimarytypPumPriif typDis == Buildings.Templates.Plants.HeatPumps.Types.Distribution.Constant1Variable2 then typPumPri_select else Buildings.Templates.Plants.HeatPumps.Types.PumpsPrimary.VariableType of primary CHW/HW pumps
Buildings.Templates.Plants.HeatPumps.Types.PumpsPrimarytypPumHeaWatPriif have_heaWat then typPumPri else Buildings.Templates.Plants.HeatPumps.Types.PumpsPrimary.NoneType of primary HW pumps
Buildings.Templates.Components.Types.IntegrationPointtypTanHeaWatif have_heaWat then typTanHeaWat_select else Buildings.Templates.Components.Types.IntegrationPoint.NoneSpecify if there is a HW buffer tank and where it is integrated into the system
Booleanhave_pumChiWatPriDedHphave_hp and have_chiWat and typArrPumPri == Buildings.Templates.Components.Types.PumpArrangement.Dedicated and not have_pumPriDedComHpSet to true for HP with separate dedicated primary pumps for CHW and HW circuits
Buildings.Templates.Plants.HeatPumps.Types.PumpsPrimarytypPumChiWatPriif have_chiWat and (typArrPumPri == Buildings.Templates.Components.Types.PumpArrangement.Headered or have_hp and have_pumChiWatPriDedHp or have_php) then typPumPri else Buildings.Templates.Plants.HeatPumps.Types.PumpsPrimary.NoneType of primary CHW pumps
Buildings.Templates.Plants.HeatPumps.Types.PumpsPrimarytypPumChiWatPriHpif have_hp and have_chiWat and (not have_pumPriDedComHp or typArrPumPri == Buildings.Templates.Components.Types.PumpArrangement.Headered) then typPumPri else Buildings.Templates.Plants.HeatPumps.Types.PumpsPrimary.NoneType of HP primary CHW pumps
Buildings.Templates.Plants.HeatPumps.Types.PumpsPrimarytypPumChiWatPriPhpif have_php then typPumPri else Buildings.Templates.Plants.HeatPumps.Types.PumpsPrimary.NoneType of polyvalent HP primary CHW pumps
Buildings.Templates.Components.Types.IntegrationPointtypTanChiWatif have_chiWat then typTanChiWat_select else Buildings.Templates.Components.Types.IntegrationPoint.NoneSpecify if there is a CHW buffer tank and where it is integrated into the system
Modelica.Units.SI.MassFlowRatemHeaWatPri_flow_nominalif have_heaWat then dat.hp.mHeaWatHp_flow_nominal*nHp + dat.hp.mHeaWatPhp_flow_nominal*nPhp else 0Primary HW mass flow rate
Modelica.Units.SI.MassFlowRatemHeaWat_flow_nominalif have_heaWat then (if typPumHeaWatSec == Buildings.Templates.Plants.HeatPumps.Types.PumpsSecondary.None then mHeaWatPri_flow_nominal else sum(dat.pumHeaWatSec.m_flow_nominal)) else 0HW mass flow rate (total, distributed to consumers)
Modelica.Units.SI.HeatFlowRatecapHea_nominalif have_heaWat then abs(dat.hp.capHeaHp_nominal)*nHp + abs(dat.hp.capHeaPhp_nominal)*nPhp else 0Heating capacity - All units
Modelica.Units.SI.HeatFlowRateQHea_flow_nominalcapHea_nominalHeating heat flow rate - All units
Modelica.Units.SI.TemperatureTHeaWatSup_nominaldat.ctl.THeaWatSup_nominalMaximum HW supply temperature
Modelica.Units.SI.TemperatureTHeaWatRet_nominalTHeaWatSup_nominal - QHea_flow_nominal/cpHeaWat_default/mHeaWat_flow_nominalHW return temperature
Modelica.Units.SI.MassFlowRatemChiWatPri_flow_nominalif have_chiWat then dat.hp.mChiWatHp_flow_nominal*nHp + dat.hp.mChiWatPhp_flow_nominal*nPhp else 0Primary CHW mass flow rate
Modelica.Units.SI.MassFlowRatemChiWat_flow_nominalif have_chiWat then (if typPumChiWatSec == Buildings.Templates.Plants.HeatPumps.Types.PumpsSecondary.None then mChiWatPri_flow_nominal else sum(dat.pumChiWatSec.m_flow_nominal)) else 0CHW mass flow rate - Total, distributed to consumers
Modelica.Units.SI.HeatFlowRatecapCoo_nominalif have_chiWat then abs(dat.hp.capCooHp_nominal)*nHp + abs(dat.hp.capCooPhp_nominal)*nPhp else 0Cooling capacity - All units
Modelica.Units.SI.HeatFlowRateQCoo_flow_nominal-capCoo_nominalCooling heat flow rate - All units
Modelica.Units.SI.TemperatureTChiWatSup_nominaldat.ctl.TChiWatSup_nominalMinimum CHW supply temperature
Modelica.Units.SI.TemperatureTSouHea_nominalif have_hp then dat.hp.TSouHeaHp_nominal else dat.hp.TSouHeaPhp_nominalOAT or source fluid supply temperature (evaporator entering) in heating mode - Each unit
Modelica.Units.SI.TemperatureTSouCoo_nominalif have_hp then dat.hp.TSouCooHp_nominal else dat.hp.TSouCooPhp_nominalOAT or source fluid supply temperature (evaporator entering) in cooling mode - Each unit
MediumHeaWat.DensityrhoHeaWat_defaultMediumHeaWat.density(staHeaWat_default)HW default density
MediumHeaWat.SpecificHeatCapacitycpHeaWat_defaultMediumHeaWat.specificHeatCapacityCp(staHeaWat_default)HW default specific heat capacity
MediumHeaWat.ThermodynamicStatestaHeaWat_defaultMediumHeaWat.setState_pTX(T = THeaWatSup_nominal, p = MediumHeaWat.p_default, X = MediumHeaWat.X_default)HW default state
MediumChiWat.DensityrhoChiWat_defaultMediumChiWat.density(staChiWat_default)CHW default density
MediumChiWat.SpecificHeatCapacitycpChiWat_defaultMediumChiWat.specificHeatCapacityCp(staChiWat_default)CHW default specific heat capacity
MediumChiWat.ThermodynamicStatestaChiWat_defaultMediumChiWat.setState_pTX(T = TChiWatSup_nominal, p = MediumChiWat.p_default, X = MediumChiWat.X_default)CHW default state
MediumSou.DensityrhoSou_defaultMediumSou.density(staSou_default)Source fluid default density
MediumSou.SpecificHeatCapacitycpSou_defaultMediumSou.specificHeatCapacityCp(staSou_default)Source fluid default specific heat capacity
MediumSou.ThermodynamicStatestaSou_defaultMediumSou.setState_pTX(T = TSouHea_nominal, p = MediumSou.p_default, X = MediumSou.X_default)Source fluid default state
Configuration
Booleanhave_heaWattrueSet to true if the plant provides HW
Booleanhave_chiWattyp <> Buildings.Templates.Plants.Controls.Types.PlantHeatPump.HeatingOnlySet to true if the plant provides CHW
Booleanhave_hotWatfalseSet to true if the plant provides DHW
Buildings.Templates.Plants.HeatPumps.Types.DistributiontypDis_select1Buildings.Templates.Plants.HeatPumps.Types.Distribution.Constant1Variable2Type of distribution system
Buildings.Templates.Plants.HeatPumps.Types.DistributiontypDis_select2Type of distribution system
Heat pumps
Buildings.Templates.Components.Types.HeatPumptypHpType of heat pump
IntegernHp_selectNumber of heat pumps (excluding polyvalent HPs)
polyvalent heat pumps
IntegernPhp_selectNumber of polyvalent heat pumps
Primary loop
Buildings.Templates.Components.Types.PumpArrangementtypArrPumPri_selectBuildings.Templates.Components.Types.PumpArrangement.DedicatedType of primary pump arrangement
Buildings.Templates.Components.Types.PumpArrangementtypArrPumPriif typ == Buildings.Templates.Plants.Controls.Types.PlantHeatPump.ReversiblePolyvalent and typDis == Buildings.Templates.Plants.HeatPumps.Types.Distribution.Constant1Variable2 then Buildings.Templates.Components.Types.PumpArrangement.Dedicated else typArrPumPri_selectType of primary pump arrangement
Booleanhave_bypHeaWatFixhave_heaWat and (typDis == Buildings.Templates.Plants.HeatPumps.Types.Distribution.Constant1Variable2 or typDis == Buildings.Templates.Plants.HeatPumps.Types.Distribution.Variable1And2)Set to true if the HW loop has a fixed bypass
Booleanhave_valHeaWatMinByphave_heaWat and typDis == Buildings.Templates.Plants.HeatPumps.Types.Distribution.Variable1OnlySet to true if the HW loop has a minimum flow bypass valve
Buildings.Templates.Plants.HeatPumps.Types.PumpsPrimarytypPumPri_selectBuildings.Templates.Plants.HeatPumps.Types.PumpsPrimary.VariableType of CHW/HW primary pumps
IntegernPumHeaWatPri_selectnHp + nPhpNumber of primary HW pumps
IntegernPumHeaWatPriif have_heaWat then (if typArrPumPri == Buildings.Templates.Components.Types.PumpArrangement.Headered then nPumHeaWatPri_select else nHp + nPhp) else 0Number of primary HW pumps
Buildings.Templates.Components.Types.IntegrationPointtypTanHeaWat_selectBuildings.Templates.Components.Types.IntegrationPoint.SupplySpecify if there is a HW buffer tank and where it is integrated into the system
Booleanhave_pumPriDedComHp_selecttrueSet to true for HP with single dedicated primary pump serving both CHW and HW circuits
Booleanhave_pumPriDedComHpif have_hp and have_chiWat and typArrPumPri == Buildings.Templates.Components.Types.PumpArrangement.Dedicated then have_pumPriDedComHp_select else falseSet to true for HP with single dedicated primary pump serving both CHW and HW circuits
Booleanhave_bypChiWatFixhave_chiWat and (typDis == Buildings.Templates.Plants.HeatPumps.Types.Distribution.Constant1Variable2 or typDis == Buildings.Templates.Plants.HeatPumps.Types.Distribution.Variable1And2)Set to true if the CHW loop has a fixed bypass
Booleanhave_valChiWatMinByphave_chiWat and typDis == Buildings.Templates.Plants.HeatPumps.Types.Distribution.Variable1OnlySet to true if the CHW loop has a minimum flow bypass valve
IntegernPumChiWatPri_selectnHp + nPhpNumber of primary CHW pumps
IntegernPumChiWatPriif have_chiWat then (if typArrPumPri == Buildings.Templates.Components.Types.PumpArrangement.Headered then nPumChiWatPri_select elseif not have_pumPriDedComHp then nHp + nPhp else nPhp) else 0Number of primary CHW pumps
Buildings.Templates.Components.Types.IntegrationPointtypTanChiWat_selectBuildings.Templates.Components.Types.IntegrationPoint.ReturnSpecify if there is a CHW buffer tank and where it is integrated into the system
Secondary HW loop
Buildings.Templates.Plants.HeatPumps.Types.PumpsSecondarytypPumHeaWatSecif have_heaWat and (typDis == Buildings.Templates.Plants.HeatPumps.Types.Distribution.Constant1Variable2 or typDis == Buildings.Templates.Plants.HeatPumps.Types.Distribution.Variable1And2) then Buildings.Templates.Plants.HeatPumps.Types.PumpsSecondary.Centralized else Buildings.Templates.Plants.HeatPumps.Types.PumpsSecondary.NoneType of secondary HW pumps
IntegernPumHeaWatSec_selectNumber of secondary HW pumps
IntegernPumHeaWatSecif not have_heaWat or typDis == Buildings.Templates.Plants.HeatPumps.Types.Distribution.Variable1Only then 0 else nPumHeaWatSec_selectNumber of secondary HW pumps
Secondary CHW loop
Buildings.Templates.Plants.HeatPumps.Types.PumpsSecondarytypPumChiWatSecif have_chiWat and (typDis == Buildings.Templates.Plants.HeatPumps.Types.Distribution.Constant1Variable2 or typDis == Buildings.Templates.Plants.HeatPumps.Types.Distribution.Variable1And2) then Buildings.Templates.Plants.HeatPumps.Types.PumpsSecondary.Centralized else Buildings.Templates.Plants.HeatPumps.Types.PumpsSecondary.NoneType of secondary CHW pumps
IntegernPumChiWatSec_selectNumber of secondary CHW pumps
IntegernPumChiWatSecif not have_chiWat or typDis == Buildings.Templates.Plants.HeatPumps.Types.Distribution.Variable1Only then 0 else nPumChiWatSec_selectNumber of secondary CHW pumps
Nominal condition
Modelica.Units.SI.TemperatureTChiWatRet_nominalif is_rev or have_php then TChiWatSup_nominal - QCoo_flow_nominal/cpChiWat_default/mChiWat_flow_nominal else Buildings.Templates.Data.Defaults.TChiWatRetCHW return temperature - Each heat pump
Dynamics › Conservation equations
Modelica.Fluid.Types.DynamicsenergyDynamicsModelica.Fluid.Types.Dynamics.FixedInitialType of energy balance: dynamic (3 initialization options) or steady state
Assumptions
BooleanallowFlowReversaltrue= true to allow flow reversal, false restricts to design direction (port_a -> port_b)
Advanced
Booleanlinearizedfalse= true, use linear relation between m_flow and dp for all valves
Advanced › Diagnostics
Booleanshow_Tfalse= true, if actual temperature at port is computed

Connectors

TypeNameDefaultDescription
Modelica.Fluid.Interfaces.FluidPort_aport_aHeaWatHW return
Modelica.Fluid.Interfaces.FluidPort_bport_bHeaWatHW supply
Modelica.Fluid.Interfaces.FluidPort_aport_aChiWatCHW return
Modelica.Fluid.Interfaces.FluidPort_bport_bChiWatCHW supply
Buildings.Templates.Plants.HeatPumps.Interfaces.BusbusPlant control bus
Buildings.Templates.AirHandlersFans.Interfaces.Bus[cfg.nAirHan]busAirHanAir handling unit control bus
Buildings.Templates.ZoneEquipment.Interfaces.Bus[cfg.nEquZon]busEquZonTerminal unit control bus
BoundaryConditions.WeatherData.BusbusWeaWeather bus

Components

TypeNameDefaultDescription
Buildings.Templates.Plants.HeatPumps.Components.Interfaces.PartialControllerctl
Buildings.Fluid.Sources.OutsideoutOutdoor air conditions
Buildings.Fluid.Sensors.TemperatureTOutOA temperature

Contents

NameDescription
MediumHeaWat
MediumHotWat
MediumChiWat
MediumSou
MediumAir

Revisions

  • July 10, 2026, by Antoine Gautier:
    Refactored for plants with polyvalent heat pumps.
    This is for #4512.
  • March 29, 2024, by Antoine Gautier:
    First implementation.