Buildings.Templates.Plants.HeatPumps

Heat pump plant

Information

This package contains templates for heat pump plants.

Extends from Modelica.Icons.Package (Icon for standard packages).

Package Content

Name Description
Buildings.Templates.Plants.HeatPumps.AirToWater AirToWater Air-to-water heat pump plant
Buildings.Templates.Plants.HeatPumps.Components Components Package with component models
Buildings.Templates.Plants.HeatPumps.Configuration Configuration Records for configuration parameters
Buildings.Templates.Plants.HeatPumps.Data Data Records for design and operating parameters
Buildings.Templates.Plants.HeatPumps.Types Types Package with type definitions
Buildings.Templates.Plants.HeatPumps.Validation Validation Package with validation models
Buildings.Templates.Plants.HeatPumps.Interfaces Interfaces Interface classes

Buildings.Templates.Plants.HeatPumps.AirToWater Buildings.Templates.Plants.HeatPumps.AirToWater

Air-to-water heat pump plant

Buildings.Templates.Plants.HeatPumps.AirToWater

Information

Description

This template represents an air-to-water heat pump plant with closed-loop controls. While the heat pump plant configuration can be changed through parameters, a typical configuration is shown in the image below.

Image of heat pump plant

Only identical heat pumps are currently supported.

The supported plant configurations are enumerated in the table below. The first option displayed in bold characters corresponds to the default configuration.

Configuration parameterOptionsNotes
Function Heating and cooling
Heating-only
The plant always provides heating hot water.
Setting the parameter have_chiWat to true (default setting) allows modeling a plant that provides both heating hot water and chilled water.
Type of distribution Constant primary-variable secondary centralized It is assumed that the HW and the CHW loops have the same type of distribution, as specified by this parameter.
"Centralized secondary pumps" refers to configurations with a single group of secondary pumps that is typically integrated into the plant.
Distributed secondary pumps with multiple secondary loops served by dedicated secondary pumps are currently not supported.
Options are limited to constant primary distributions because most AWHPs on the market use a reverse cycle for defrosting. This requires maximum primary flow during defrost cycles and hinders variable primary distributions.
An option for constant primary-only distributions with ∆p-controlled variable speed pumps will be added in a next release.
Type of primary pump arrangement Dedicated
Headered
It is assumed that the HW and the CHW loops have the same type of primary pump arrangement, as specified by this parameter.
Separate dedicated primary CHW pumps False
True
This option is only available for heating and cooling plants with dedicated primary pumps. If this option is not selected (default setting), each AWHP uses a common dedicated primary pump for HW and CHW. Otherwise, each AWHP relies on a separate dedicated HW pump and a separate dedicated CHW pump.
Type of primary HW pumps Variable speed
Constant speed
For constant primary-variable secondary distributions, the variable speed primary pumps are commanded at fixed speeds, determined during the Testing, Adjusting and Balancing phase to provide design AWHP flow in heating and cooling modes. The same intent is achieved with constant speed primary pumps through the use of balancing valves.
Type of primary CHW pumps Variable speed
Constant speed
See the note above on primary HW pumps.
Controller Closed-loop controls with supply temperature and differential pressure reset
Most parts of the sequence of operation are similar to that described in ASHRAE, 2021 for chiller plants.
See the documentation of Buildings.Templates.Plants.Controls.HeatPumps.AirToWater for more details.
An open loop controller is also available for validation purposes.

Control points

The control sequence implemented in this template requires the external input points specified in the documentation of the controller Buildings.Templates.Plants.HeatPumps.Components.Controls.AirToWater.

Implementation details

The pressure drops of the heat pump CHW and HW heat exchangers are calculated within the isolation valve component valIso based on lumped flow coefficients for the sake of computational efficiency.

References

Extends from Buildings.Templates.Plants.HeatPumps.Interfaces.PartialHeatPumpPlant (Interface class for heat pump plant).

Parameters

TypeNameDefaultDescription
replaceable package MediumHeaWatWaterHW medium
replaceable package MediumHotWatWaterDHW medium
replaceable package MediumChiWatWaterCHW medium
replaceable package MediumSouWaterSource-side medium
replaceable package MediumAirAirAir medium
HeatPumpPlantdat Design and operating parameters
Configuration
Booleanhave_chiWattrueSet to true if the plant provides CHW
DistributiontypDis_select2 Type of distribution system
Heat pumps
HeatPumptypBuildings.Templates.Componen...Type of heat pump
IntegernHp Total number of heat pumps
Booleanis_revhave_chiWatSet to true for reversible heat pumps, false for heating only
Primary loop
PumpArrangementtypArrPumPriBuildings.Templates.Componen...Type of primary pump arrangement
PumpsPrimarytypPumHeaWatPri_select1Buildings.Templates.Plants.H...Type of primary HW pumps
PumpsPrimarytypPumHeaWatPri_select2Buildings.Templates.Plants.H...Type of primary HW pumps
IntegernPumHeaWatPri_selectnHpNumber of primary HW pumps
Booleanhave_pumChiWatPriDed_selectfalseSet to true for plants with separate dedicated primary CHW pumps
PumpsPrimarytypPumChiWatPri_select1typPumHeaWatPriType of primary CHW pumps
PumpsPrimarytypPumChiWatPri_select2typPumHeaWatPriType of primary CHW pumps
IntegernPumChiWatPri_selectnHpNumber of primary CHW pumps
Secondary HW loop
IntegernPumHeaWatSec_selectnHpNumber of secondary HW pumps
Secondary CHW loop
IntegernPumChiWatSec_selectnHpNumber of secondary CHW pumps
Dynamics
Nominal condition
Timetau30Time constant at nominal flow [s]
Conservation equations
DynamicsenergyDynamicsModelica.Fluid.Types.Dynamic...Type 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
Diagnostics
Booleanshow_Tfalse= true, if actual temperature at port is computed

Connectors

TypeNameDescription
replaceable package MediumChiWatCHW medium
replaceable package MediumSouSource-side medium
FluidPort_aport_aHeaWatHW return
FluidPort_bport_bHeaWatHW supply
FluidPort_aport_aChiWatCHW return
FluidPort_bport_bChiWatCHW supply
BusbusPlant control bus
BusbusAirHan[cfg.nAirHan]Air handling unit control bus
BusbusEquZon[cfg.nEquZon]Terminal unit control bus
BusbusWeaWeather bus

Modelica definition

model AirToWater "Air-to-water heat pump plant" extends Buildings.Templates.Plants.HeatPumps.Interfaces.PartialHeatPumpPlant( redeclare final package MediumChiWat=MediumHeaWat, redeclare final package MediumSou=MediumAir, redeclare Buildings.Templates.Plants.HeatPumps.Components.Controls.AirToWater ctl, final typ=Buildings.Templates.Components.Types.HeatPump.AirToWater, final is_rev=have_chiWat, final cfg( final typMod=hp.typMod)); // Heat pumps, dedicated primary pumps and isolation valves Buildings.Templates.Plants.HeatPumps.Components.HeatPumpGroups.AirToWater hp( redeclare final package MediumHeaWat=MediumHeaWat, redeclare final package MediumAir=MediumAir, final nHp=nHp, final is_rev=is_rev, final energyDynamics=energyDynamics, final have_preDroChiHeaWat=false, final have_preDroSou=false, final dat=dat.hp, final allowFlowReversal=allowFlowReversal, final allowFlowReversalSou=false) "Heat pump group"; Components.PumpsPrimaryDedicated pumPri( redeclare final package Medium=MediumHeaWat, final nHp=nHp, final typArrPumPri=typArrPumPri, final have_pumChiWatPriDed=have_pumChiWatPriDed, final have_pumHeaWatPriVar=have_pumHeaWatPriVar, final have_pumChiWatPriVar=have_pumChiWatPriVar, final datPumHeaWat=dat.pumHeaWatPri, final datPumChiWat=dat.pumChiWatPri, final energyDynamics=energyDynamics, final allowFlowReversal=allowFlowReversal) "Dedicated primary pumps"; Components.ValvesIsolation valIso( redeclare final package Medium=MediumHeaWat, final nHp=nHp, final have_chiWat=have_chiWat, final have_valHpInlIso=have_valHpInlIso, final have_valHpOutIso=have_valHpOutIso, final have_pumChiWatPriDed=have_pumChiWatPriDed, final mHeaWatHp_flow_nominal=fill(dat.hp.mHeaWatHp_flow_nominal, nHp), final dpHeaWatHp_nominal=fill(dat.hp.dpHeaWatHp_nominal, nHp), final mChiWatHp_flow_nominal=fill(dat.hp.mChiWatHp_flow_nominal, nHp), final energyDynamics=energyDynamics, final allowFlowReversal=allowFlowReversal) "Heat pump isolation valves"; // Primary CHW loop Buildings.Templates.Components.Pumps.Multiple pumChiWatPri( final energyDynamics=energyDynamics, redeclare final package Medium=MediumChiWat, final dat=dat.pumChiWatPri, final nPum=nPumChiWatPri, final have_var=have_pumChiWatPriVar, final have_varCom=true, final allowFlowReversal=allowFlowReversal) if have_chiWat and typArrPumPri == Buildings.Templates.Components.Types.PumpArrangement.Headered "Headered primary CHW pumps"; Buildings.Templates.Components.Routing.SingleToMultiple inlPumChiWatPri( redeclare final package Medium=MediumChiWat, final nPorts=nPumChiWatPri, final m_flow_nominal=mChiWatPri_flow_nominal, final energyDynamics=energyDynamics, final allowFlowReversal=allowFlowReversal, final icon_pipe=Buildings.Templates.Components.Types.IconPipe.Supply, final icon_dy=300) if have_chiWat and typArrPumPri == Buildings.Templates.Components.Types.PumpArrangement.Headered "Primary CHW pumps inlet manifold"; Buildings.Templates.Components.Routing.MultipleToSingle outPumChiWatPri( redeclare final package Medium=MediumChiWat, final nPorts=nPumChiWatPri, final m_flow_nominal=mChiWatPri_flow_nominal, final energyDynamics=energyDynamics, final allowFlowReversal=allowFlowReversal, final icon_pipe=Buildings.Templates.Components.Types.IconPipe.Supply, final icon_dy=300) if have_chiWat and typArrPumPri == Buildings.Templates.Components.Types.PumpArrangement.Headered "Primary CHW pumps outlet manifold"; Buildings.Templates.Components.Routing.PassThroughFluid supChiWatPri( redeclare final package Medium=MediumChiWat, final icon_pipe=Buildings.Templates.Components.Types.IconPipe.Supply, final allowFlowReversal=allowFlowReversal) if have_chiWat and typArrPumPri == Buildings.Templates.Components.Types.PumpArrangement.Dedicated "Primary CHW supply pipe - Plant with dedicated primary CHW pumps"; Buildings.Templates.Components.Sensors.VolumeFlowRate VChiWatPri_flow( redeclare final package Medium=MediumChiWat, final m_flow_nominal=mChiWatPri_flow_nominal, final allowFlowReversal=allowFlowReversal, final have_sen=ctl.have_senVChiWatPri, final text_flip=false, final typ=Buildings.Templates.Components.Types.SensorVolumeFlowRate.FlowMeter, icon_pipe=Buildings.Templates.Components.Types.IconPipe.Supply) if have_chiWat "Primary CHW volume flow rate"; Buildings.Templates.Components.Routing.Junction junChiWatBypSup( redeclare final package Medium=MediumChiWat, final tau=tau, final m_flow_nominal=mChiWatPri_flow_nominal * {1, - 1, - 1}, final energyDynamics=energyDynamics, dp_nominal=fill(0, 3), final portFlowDirection_1=if allowFlowReversal then Modelica.Fluid.Types.PortFlowDirection.Bidirectional else Modelica.Fluid.Types.PortFlowDirection.Entering, final portFlowDirection_2=if allowFlowReversal then Modelica.Fluid.Types.PortFlowDirection.Bidirectional else Modelica.Fluid.Types.PortFlowDirection.Leaving, final portFlowDirection_3=if allowFlowReversal then Modelica.Fluid.Types.PortFlowDirection.Bidirectional else Modelica.Fluid.Types.PortFlowDirection.Leaving) if have_chiWat "Fluid junction"; Buildings.Templates.Components.Sensors.Temperature TChiWatPriSup( redeclare final package Medium=MediumChiWat, final have_sen=true, final m_flow_nominal=mChiWatPri_flow_nominal, final typ=Buildings.Templates.Components.Types.SensorTemperature.InWell, final icon_pipe=Buildings.Templates.Components.Types.IconPipe.Supply, final allowFlowReversal=allowFlowReversal) if have_chiWat "Primary CHW supply temperature"; Buildings.Templates.Components.Routing.Junction junChiWatBypRet( redeclare final package Medium=MediumChiWat, final tau=tau, final m_flow_nominal=mChiWatPri_flow_nominal * {1, - 1, 1}, final energyDynamics=energyDynamics, dp_nominal=fill(0, 3), final portFlowDirection_1=if allowFlowReversal then Modelica.Fluid.Types.PortFlowDirection.Bidirectional else Modelica.Fluid.Types.PortFlowDirection.Entering, final portFlowDirection_2=if allowFlowReversal then Modelica.Fluid.Types.PortFlowDirection.Bidirectional else Modelica.Fluid.Types.PortFlowDirection.Leaving, final portFlowDirection_3=if allowFlowReversal then Modelica.Fluid.Types.PortFlowDirection.Bidirectional else Modelica.Fluid.Types.PortFlowDirection.Entering, icon_pipe1=Buildings.Templates.Components.Types.IconPipe.Return, icon_pipe3=Buildings.Templates.Components.Types.IconPipe.Supply) if have_chiWat "Fluid junction"; Buildings.Templates.Components.Sensors.Temperature TChiWatPriRet( redeclare final package Medium=MediumChiWat, final have_sen=ctl.have_senTChiWatPriRet, final m_flow_nominal=mChiWatPri_flow_nominal, final typ=Buildings.Templates.Components.Types.SensorTemperature.InWell, final icon_pipe=Buildings.Templates.Components.Types.IconPipe.Return, final allowFlowReversal=allowFlowReversal) if have_chiWat "Primary CHW return temperature"; // Secondary CHW loop Buildings.Templates.Components.Pumps.Multiple pumChiWatSec( final energyDynamics=energyDynamics, final allowFlowReversal=allowFlowReversal, redeclare final package Medium=MediumChiWat, final nPum=nPumChiWatSec, final have_var=true, final have_varCom=true, final dat=dat.pumChiWatSec) if have_chiWat and typPumChiWatSec == Buildings.Templates.Plants.HeatPumps.Types.PumpsSecondary.Centralized "Secondary CHW pumps"; Buildings.Templates.Components.Routing.SingleToMultiple inlPumChiWatSec( redeclare final package Medium=MediumChiWat, final nPorts=nPumChiWatSec, final m_flow_nominal=mChiWat_flow_nominal, final energyDynamics=energyDynamics, final allowFlowReversal=allowFlowReversal, final icon_pipe=Buildings.Templates.Components.Types.IconPipe.Supply, final icon_dy=300) if have_chiWat and typPumChiWatSec == Buildings.Templates.Plants.HeatPumps.Types.PumpsSecondary.Centralized "Secondary CHW pumps inlet manifold"; Buildings.Templates.Components.Routing.MultipleToSingle outPumChiWatSec( redeclare final package Medium=MediumChiWat, final nPorts=nPumChiWatSec, final m_flow_nominal=mChiWat_flow_nominal, final energyDynamics=energyDynamics, final allowFlowReversal=allowFlowReversal, final icon_pipe=Buildings.Templates.Components.Types.IconPipe.Supply, final icon_dy=300) if have_chiWat and typPumChiWatSec == Buildings.Templates.Plants.HeatPumps.Types.PumpsSecondary.Centralized "Secondary CHW pumps outlet manifold"; Buildings.Templates.Components.Routing.PassThroughFluid supChiWatSec( redeclare final package Medium=MediumChiWat, final icon_pipe=Buildings.Templates.Components.Types.IconPipe.Supply, final allowFlowReversal=allowFlowReversal) if have_chiWat and typPumChiWatSec <> Buildings.Templates.Plants.HeatPumps.Types.PumpsSecondary.Centralized "Secondary CHW supply pipe - Plant without secondary CHW pumps"; Buildings.Templates.Components.Sensors.VolumeFlowRate VChiWatSec_flow( redeclare final package Medium=MediumChiWat, final m_flow_nominal=mChiWat_flow_nominal, final allowFlowReversal=allowFlowReversal, final have_sen=ctl.have_senVChiWatSec, final text_flip=false, final typ=Buildings.Templates.Components.Types.SensorVolumeFlowRate.FlowMeter, final icon_pipe=Buildings.Templates.Components.Types.IconPipe.Supply) if have_chiWat "Secondary CHW volume flow rate"; Buildings.Templates.Components.Sensors.Temperature TChiWatSecSup( redeclare final package Medium=MediumChiWat, final have_sen=ctl.have_senTChiWatSecSup, final m_flow_nominal=mChiWat_flow_nominal, final typ=Buildings.Templates.Components.Types.SensorTemperature.InWell, final icon_pipe=Buildings.Templates.Components.Types.IconPipe.Supply, final allowFlowReversal=allowFlowReversal) if have_chiWat "Secondary CHW supply temperature"; Buildings.Templates.Components.Sensors.Temperature TChiWatSecRet( redeclare final package Medium=MediumChiWat, final have_sen=ctl.have_senTChiWatSecRet, final m_flow_nominal=mChiWat_flow_nominal, final typ=Buildings.Templates.Components.Types.SensorTemperature.InWell, final icon_pipe=Buildings.Templates.Components.Types.IconPipe.Return, final allowFlowReversal=allowFlowReversal) if have_chiWat "Secondary CHW return temperature"; // Primary HW loop Buildings.Templates.Components.Routing.SingleToMultiple inlPumHeaWatPri( redeclare final package Medium=MediumHeaWat, final nPorts=nPumHeaWatPri, final m_flow_nominal=mHeaWatPri_flow_nominal, final energyDynamics=energyDynamics, final allowFlowReversal=allowFlowReversal, final icon_pipe=Buildings.Templates.Components.Types.IconPipe.Supply, final icon_dy=300) if have_heaWat and typArrPumPri == Buildings.Templates.Components.Types.PumpArrangement.Headered "Primary HW pumps inlet manifold"; Buildings.Templates.Components.Pumps.Multiple pumHeaWatPri( final energyDynamics=energyDynamics, redeclare final package Medium=MediumHeaWat, final dat=dat.pumHeaWatPri, final nPum=nPumHeaWatPri, final have_var=have_pumHeaWatPriVar, final have_varCom=true, final allowFlowReversal=allowFlowReversal) if have_heaWat and typArrPumPri == Buildings.Templates.Components.Types.PumpArrangement.Headered "Headered primary HW pumps"; Buildings.Templates.Components.Routing.MultipleToSingle outPumHeaWatPri( redeclare final package Medium=MediumHeaWat, final nPorts=nPumHeaWatPri, final m_flow_nominal=mHeaWatPri_flow_nominal, final energyDynamics=energyDynamics, final allowFlowReversal=allowFlowReversal, final icon_pipe=Buildings.Templates.Components.Types.IconPipe.Supply, final icon_dy=300) if have_heaWat and typArrPumPri == Buildings.Templates.Components.Types.PumpArrangement.Headered "Primary HW pumps outlet manifold"; Buildings.Templates.Components.Routing.PassThroughFluid supHeaWatPri( redeclare final package Medium=MediumHeaWat, final icon_pipe=Buildings.Templates.Components.Types.IconPipe.Supply, final allowFlowReversal=allowFlowReversal) if have_heaWat and typArrPumPri == Buildings.Templates.Components.Types.PumpArrangement.Dedicated "Primary HW supply pipe - Plant with dedicated primary HW pumps"; Buildings.Templates.Components.Sensors.VolumeFlowRate VHeaWatPri_flow( redeclare final package Medium=MediumHeaWat, final m_flow_nominal=mHeaWatPri_flow_nominal, final allowFlowReversal=allowFlowReversal, final have_sen=ctl.have_senVHeaWatPri, final text_flip=false, final typ=Buildings.Templates.Components.Types.SensorVolumeFlowRate.FlowMeter, icon_pipe=Buildings.Templates.Components.Types.IconPipe.Supply) "Primary HW volume flow rate"; Buildings.Templates.Components.Routing.Junction junHeaWatBypSup( redeclare final package Medium=MediumHeaWat, final tau=tau, final m_flow_nominal=mHeaWatPri_flow_nominal * {1, - 1, - 1}, final energyDynamics=energyDynamics, dp_nominal=fill(0, 3), final portFlowDirection_1=if allowFlowReversal then Modelica.Fluid.Types.PortFlowDirection.Bidirectional else Modelica.Fluid.Types.PortFlowDirection.Entering, final portFlowDirection_2=if allowFlowReversal then Modelica.Fluid.Types.PortFlowDirection.Bidirectional else Modelica.Fluid.Types.PortFlowDirection.Leaving, final portFlowDirection_3=if allowFlowReversal then Modelica.Fluid.Types.PortFlowDirection.Bidirectional else Modelica.Fluid.Types.PortFlowDirection.Leaving) if have_heaWat "Fluid junction"; Buildings.Templates.Components.Sensors.Temperature THeaWatPriSup( redeclare final package Medium=MediumHeaWat, final have_sen=true, final m_flow_nominal=mHeaWatPri_flow_nominal, final typ=Buildings.Templates.Components.Types.SensorTemperature.InWell, final icon_pipe=Buildings.Templates.Components.Types.IconPipe.Supply, final allowFlowReversal=allowFlowReversal) "Primary HW supply temperature"; Buildings.Templates.Components.Sensors.Temperature THeaWatPriRet( redeclare final package Medium = MediumHeaWat, final have_sen=ctl.have_senTHeaWatPriRet, final m_flow_nominal=mHeaWatPri_flow_nominal, final typ=Buildings.Templates.Components.Types.SensorTemperature.InWell, final icon_pipe=Buildings.Templates.Components.Types.IconPipe.Return, final allowFlowReversal=allowFlowReversal) "Primary HW return temperature"; Buildings.Templates.Components.Routing.Junction junHeaWatBypRet( redeclare final package Medium=MediumHeaWat, final tau=tau, final m_flow_nominal=mHeaWatPri_flow_nominal * {1, - 1, 1}, final energyDynamics=energyDynamics, dp_nominal=fill(0, 3), final portFlowDirection_1=if allowFlowReversal then Modelica.Fluid.Types.PortFlowDirection.Bidirectional else Modelica.Fluid.Types.PortFlowDirection.Entering, final portFlowDirection_2=if allowFlowReversal then Modelica.Fluid.Types.PortFlowDirection.Bidirectional else Modelica.Fluid.Types.PortFlowDirection.Leaving, final portFlowDirection_3=if allowFlowReversal then Modelica.Fluid.Types.PortFlowDirection.Bidirectional else Modelica.Fluid.Types.PortFlowDirection.Entering, icon_pipe1=Buildings.Templates.Components.Types.IconPipe.Return, icon_pipe3=Buildings.Templates.Components.Types.IconPipe.Supply) if have_heaWat "Fluid junction"; Buildings.Fluid.Sources.Boundary_pT bouHeaWat( redeclare final package Medium=MediumHeaWat, p=Buildings.Templates.Data.Defaults.pHeaWat_rel_nominal + 101325, nPorts=1) if have_heaWat "Pressure boundary condition to mimic expansion tank"; // Secondary HW loop Buildings.Templates.Components.Pumps.Multiple pumHeaWatSec( final energyDynamics=energyDynamics, final allowFlowReversal=allowFlowReversal, redeclare final package Medium=MediumHeaWat, final nPum=nPumHeaWatSec, final have_var=true, final have_varCom=true, final dat=dat.pumHeaWatSec) if typPumHeaWatSec == Buildings.Templates.Plants.HeatPumps.Types.PumpsSecondary.Centralized "Secondary HW pumps"; Buildings.Templates.Components.Routing.SingleToMultiple inlPumHeaWatSec( redeclare final package Medium=MediumHeaWat, final nPorts=nPumHeaWatSec, final m_flow_nominal=mHeaWat_flow_nominal, final energyDynamics=energyDynamics, final allowFlowReversal=allowFlowReversal, final icon_pipe=Buildings.Templates.Components.Types.IconPipe.Supply, final icon_dy=300) if typPumHeaWatSec == Buildings.Templates.Plants.HeatPumps.Types.PumpsSecondary.Centralized "Secondary HW pumps inlet manifold"; Buildings.Templates.Components.Routing.MultipleToSingle outPumHeaWatSec( redeclare final package Medium=MediumHeaWat, final nPorts=nPumHeaWatSec, final m_flow_nominal=mHeaWat_flow_nominal, final energyDynamics=energyDynamics, final allowFlowReversal=allowFlowReversal, final icon_pipe=Buildings.Templates.Components.Types.IconPipe.Supply, final icon_dy=300) if typPumHeaWatSec == Buildings.Templates.Plants.HeatPumps.Types.PumpsSecondary.Centralized "Secondary HW pumps outlet manifold"; Buildings.Templates.Components.Routing.PassThroughFluid supHeaWatSec( redeclare final package Medium=MediumHeaWat, final icon_pipe=Buildings.Templates.Components.Types.IconPipe.Supply, final allowFlowReversal=allowFlowReversal) if have_heaWat and typPumHeaWatSec <> Buildings.Templates.Plants.HeatPumps.Types.PumpsSecondary.Centralized "Secondary HW supply pipe - Plant without secondary HW pumps"; Buildings.Templates.Components.Sensors.VolumeFlowRate VHeaWatSec_flow( redeclare final package Medium=MediumHeaWat, final m_flow_nominal=mHeaWat_flow_nominal, final allowFlowReversal=allowFlowReversal, final have_sen=ctl.have_senVHeaWatSec, final text_flip=false, final typ=Buildings.Templates.Components.Types.SensorVolumeFlowRate.FlowMeter, final icon_pipe=Buildings.Templates.Components.Types.IconPipe.Supply) "Secondary HW volume flow rate"; Buildings.Templates.Components.Sensors.Temperature THeaWatSecSup( redeclare final package Medium=MediumHeaWat, final have_sen=ctl.have_senTHeaWatSecSup, final m_flow_nominal=mHeaWat_flow_nominal, final typ=Buildings.Templates.Components.Types.SensorTemperature.InWell, final icon_pipe=Buildings.Templates.Components.Types.IconPipe.Supply, final allowFlowReversal=allowFlowReversal) "Secondary HW supply temperature"; Buildings.Templates.Components.Sensors.Temperature THeaWatSecRet( redeclare final package Medium=MediumHeaWat, final have_sen=ctl.have_senTHeaWatSecRet, final m_flow_nominal=mHeaWat_flow_nominal, final typ=Buildings.Templates.Components.Types.SensorTemperature.InWell, final icon_pipe=Buildings.Templates.Components.Types.IconPipe.Return, final allowFlowReversal=allowFlowReversal) "Secondary HW return temperature"; equation /* Control point connection - start */ connect(bus, hp.bus); connect(busWea, hp.busWea); connect(bus, pumPri.bus); connect(bus, valIso.bus); connect(bus.pumChiWatPri, pumChiWatPri.bus); connect(bus.pumHeaWatPri, pumHeaWatPri.bus); connect(bus.pumChiWatSec, pumChiWatSec.bus); connect(bus.pumHeaWatSec, pumHeaWatSec.bus); connect(VChiWatPri_flow.y, bus.VChiWatPri_flow); connect(VHeaWatPri_flow.y, bus.VHeaWatPri_flow); connect(VChiWatSec_flow.y, bus.VChiWatSec_flow); connect(VHeaWatSec_flow.y, bus.VHeaWatSec_flow); connect(TChiWatPriSup.y, bus.TChiWatPriSup); connect(THeaWatPriSup.y, bus.THeaWatPriSup); connect(TChiWatPriRet.y, bus.TChiWatPriRet); connect(THeaWatPriRet.y, bus.THeaWatPriRet); connect(TChiWatSecSup.y, bus.TChiWatSecSup); connect(THeaWatSecSup.y, bus.THeaWatSecSup); connect(TChiWatSecRet.y, bus.TChiWatSecRet); connect(THeaWatSecRet.y, bus.THeaWatSecRet); /* Control point connection - stop */ connect(pumChiWatPri.ports_b, outPumChiWatPri.ports_a); connect(inlPumChiWatPri.ports_b, pumChiWatPri.ports_a); connect(valIso.port_bChiWat, inlPumChiWatPri.port_a); connect(hp.ports_bChiHeaWat, pumPri.ports_aChiHeaWatHp); connect(pumPri.ports_bChiHeaWat, valIso.ports_aChiHeaWatHp); connect(pumPri.ports_bHeaWat, valIso.ports_aHeaWatHp); connect(pumPri.ports_bChiWat, valIso.ports_aChiWatHp); connect(outPumChiWatPri.port_b, VChiWatPri_flow.port_a); connect(VChiWatPri_flow.port_b, TChiWatPriSup.port_a); connect(TChiWatPriSup.port_b, junChiWatBypSup.port_1); connect(pumChiWatSec.ports_b, outPumChiWatSec.ports_a); connect(inlPumChiWatSec.ports_b, pumChiWatSec.ports_a); connect(valIso.port_bChiWat, supChiWatPri.port_a); connect(supChiWatPri.port_b, VChiWatPri_flow.port_a); connect(valIso.ports_bChiHeaWatHp, pumPri.ports_aChiHeaWat); connect(pumPri.ports_bChiHeaWatHp, hp.ports_aChiHeaWat); connect(VChiWatSec_flow.port_b, port_bChiWat); connect(supChiWatSec.port_b, VChiWatSec_flow.port_a); connect(pumHeaWatPri.ports_b, outPumHeaWatPri.ports_a); connect(inlPumHeaWatPri.ports_b, pumHeaWatPri.ports_a); connect(outPumHeaWatPri.port_b, VHeaWatPri_flow.port_a); connect(VHeaWatPri_flow.port_b, THeaWatPriSup.port_a); connect(THeaWatPriSup.port_b, junHeaWatBypSup.port_1); connect(pumHeaWatSec.ports_b, outPumHeaWatSec.ports_a); connect(inlPumHeaWatSec.ports_b, pumHeaWatSec.ports_a); connect(supHeaWatPri.port_b, VHeaWatPri_flow.port_a); connect(supHeaWatSec.port_b, VHeaWatSec_flow.port_a); connect(outPumHeaWatSec.port_b, VHeaWatSec_flow.port_a); connect(valIso.port_bHeaWat, inlPumHeaWatPri.port_a); connect(VHeaWatSec_flow.port_b, port_bHeaWat); connect(valIso.port_bHeaWat, supHeaWatPri.port_a); connect(junHeaWatBypSup.port_3, junHeaWatBypRet.port_3); connect(junChiWatBypSup.port_3, junChiWatBypRet.port_3); connect(junChiWatBypSup.port_2, TChiWatSecSup.port_a); connect(TChiWatSecSup.port_b, inlPumChiWatSec.port_a); connect(junChiWatBypRet.port_1, TChiWatSecRet.port_b); connect(port_aChiWat, TChiWatSecRet.port_a); connect(junChiWatBypRet.port_2, TChiWatPriRet.port_a); connect(port_aHeaWat, THeaWatSecRet.port_a); connect(junHeaWatBypSup.port_2, THeaWatSecSup.port_a); connect(THeaWatSecSup.port_b, inlPumHeaWatSec.port_a); connect(THeaWatSecSup.port_b, supHeaWatSec.port_a); connect(TChiWatSecSup.port_b, supChiWatSec.port_a); connect(bouHeaWat.ports[1], THeaWatPriRet.port_b); connect(junHeaWatBypRet.port_1, THeaWatSecRet.port_b); connect(junHeaWatBypRet.port_2, THeaWatPriRet.port_a); connect(THeaWatPriRet.port_b, valIso.port_aHeaWat); connect(outPumChiWatSec.port_b, VChiWatSec_flow.port_a); connect(TChiWatPriRet.port_b, valIso.port_aChiWat); end AirToWater;