Buildings.Templates.Plants.HeatPumps.Interfaces

Interface classes

Information

This package contains interface classes.

Extends from Modelica.Icons.InterfacesPackage (Icon for packages containing interfaces).

Package Content

Name Description
Buildings.Templates.Plants.HeatPumps.Interfaces.Bus Bus Control bus for heat pump plant
Buildings.Templates.Plants.HeatPumps.Interfaces.PartialHeatPumpPlant PartialHeatPumpPlant Interface class for heat pump plant

Buildings.Templates.Plants.HeatPumps.Interfaces.Bus Buildings.Templates.Plants.HeatPumps.Interfaces.Bus

Control bus for heat pump plant

Buildings.Templates.Plants.HeatPumps.Interfaces.Bus

Information

This expandable connector provides a standard interface for all control signals of the heat pump plant models within Buildings.Templates.Plants.HeatPumps.

Extends from Modelica.Icons.SignalBus (Icon for signal bus).

Modelica definition

expandable connector Bus "Control bus for heat pump plant" extends Modelica.Icons.SignalBus; end Bus;

Buildings.Templates.Plants.HeatPumps.Interfaces.PartialHeatPumpPlant Buildings.Templates.Plants.HeatPumps.Interfaces.PartialHeatPumpPlant

Interface class for heat pump plant

Buildings.Templates.Plants.HeatPumps.Interfaces.PartialHeatPumpPlant

Information

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

Parameters

TypeNameDefaultDescription
replaceable package MediumHeaWatBuildings.Media.WaterHW medium
replaceable package MediumHotWatBuildings.Media.WaterDHW medium
replaceable package MediumChiWatBuildings.Media.WaterCHW medium
replaceable package MediumSouBuildings.Media.WaterSource-side medium
replaceable package MediumAirBuildings.Media.AirAir medium
HeatPumpPlantcfgcfg(final cpChiWat_default=c...Configuration parameters
HeatPumpPlantdatdat(cfg=cfg)Design and operating parameters
Configuration
Booleanhave_chiWattrueSet to true if the plant provides CHW
DistributiontypDis_select2 Type of distribution system
Heat pumps
HeatPumptyp Type of heat pump
IntegernHp Total number of heat pumps
Booleanis_rev Set 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
Controls
PartialControllerctlredeclare Buildings.Template...Plant controller
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 MediumHeaWatHW medium
replaceable package MediumHotWatDHW medium
replaceable package MediumChiWatCHW medium
replaceable package MediumSouSource-side medium
replaceable package MediumAirAir 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

partial model PartialHeatPumpPlant "Interface class for heat pump plant" replaceable package MediumHeaWat=Buildings.Media.Water constrainedby Modelica.Media.Interfaces.PartialMedium "HW medium"; replaceable package MediumHotWat=Buildings.Media.Water constrainedby Modelica.Media.Interfaces.PartialMedium "DHW medium"; replaceable package MediumChiWat=Buildings.Media.Water constrainedby Modelica.Media.Interfaces.PartialMedium "CHW medium"; /* Derived classes representing AWHP shall use: redeclare final package MediumSou = MediumAir */ replaceable package MediumSou=Buildings.Media.Water constrainedby Modelica.Media.Interfaces.PartialMedium "Source-side medium"; replaceable package MediumAir=Buildings.Media.Air constrainedby Modelica.Media.Interfaces.PartialMedium "Air medium"; // The current implementation only supports plants that provide HHW. final parameter Boolean have_heaWat=true "Set to true if the plant provides HW"; parameter Boolean have_chiWat=true "Set to true if the plant provides CHW"; // RFE: To be exposed for templates that include optional DHW service. final parameter Boolean have_hotWat=false "Set to true if the plant provides DHW"; // RFE(AntoineGautier): Add option for sidestream HRC. Always excluded for now. final parameter Boolean have_hrc( start=false)=false "Set to true for plants with a sidestream heat recovery chiller"; parameter Buildings.Templates.Components.Types.HeatPump typ "Type of heat pump"; parameter Buildings.Templates.Plants.HeatPumps.Configuration.HeatPumpPlant cfg( final cpChiWat_default=cpChiWat_default, final cpHeaWat_default=cpHeaWat_default, final cpSou_default=cpSou_default, final have_chiWat=have_chiWat, final have_heaWat=have_heaWat, final have_hrc=have_hrc, final have_hotWat=have_hotWat, final have_pumHeaWatPriVar=have_pumHeaWatPriVar, final have_pumChiWatPriVar=have_pumChiWatPriVar, final have_pumChiWatPriDed=have_pumChiWatPriDed, final have_valChiWatMinByp=have_valChiWatMinByp, final have_valHeaWatMinByp=have_valHeaWatMinByp, final have_valHpInlIso=have_valHpInlIso, final have_valHpOutIso=have_valHpOutIso, final is_rev=is_rev, final nHp=nHp, final nPumChiWatPri=nPumChiWatPri, final nPumChiWatSec=nPumChiWatSec, final nPumHeaWatPri=nPumHeaWatPri, final nPumHeaWatSec=nPumHeaWatSec, final rhoChiWat_default=rhoChiWat_default, final rhoHeaWat_default=rhoHeaWat_default, final rhoSou_default=rhoSou_default, final typ=typ, final typArrPumPri=typArrPumPri, final typDis=typDis, final typPumChiWatPri=typPumChiWatPri, final typPumHeaWatPri=typPumHeaWatPri, final typPumChiWatSec=typPumChiWatSec, final typPumHeaWatSec=typPumHeaWatSec, final typCtl=ctl.typ, final nAirHan=ctl.nAirHan, final nEquZon=ctl.nEquZon, final have_senDpHeaWatRemWir=ctl.have_senDpHeaWatRemWir, final nSenDpHeaWatRem=ctl.nSenDpHeaWatRem, final have_senDpChiWatRemWir=ctl.have_senDpChiWatRemWir, final nSenDpChiWatRem=ctl.nSenDpChiWatRem, final have_inpSch=ctl.have_inpSch) "Configuration parameters"; parameter Buildings.Templates.Plants.HeatPumps.Data.HeatPumpPlant dat( cfg=cfg) "Design and operating parameters"; // RFE(AntoineGautier): Allow specifying subset of units dedicated to HW, CHW or DHW production. parameter Integer nHp( final min=1, start=1) "Total number of heat pumps"; parameter Boolean is_rev "Set to true for reversible heat pumps, false for heating only"; // Plants with AWHP. // RFE(AntoineGautier): Add constant primary-only option. final parameter Buildings.Templates.Plants.HeatPumps.Types.Distribution typDis_select1( start=Buildings.Templates.Plants.HeatPumps.Types.Distribution.Constant1Variable2)= Buildings.Templates.Plants.HeatPumps.Types.Distribution.Constant1Variable2 "Type of distribution system"; // Plants with WWHP. parameter Buildings.Templates.Plants.HeatPumps.Types.Distribution typDis_select2( start=Buildings.Templates.Plants.HeatPumps.Types.Distribution.Constant1Variable2) "Type of distribution system"; final parameter Buildings.Templates.Plants.HeatPumps.Types.Distribution typDis= if typ == Buildings.Templates.Components.Types.HeatPump.AirToWater then typDis_select1 else typDis_select2 "Type of distribution system"; final parameter Boolean have_valHpInlIso=if not have_chiWat and typArrPumPri == Buildings.Templates.Components.Types.PumpArrangement.Dedicated then false else true "Set to true for isolation valves at HP inlet"; final parameter Boolean have_valHpOutIso=if not have_chiWat and typArrPumPri == Buildings.Templates.Components.Types.PumpArrangement.Dedicated then false elseif nHp == 1 then false elseif have_pumChiWatPriDed then false else true "Set to true for isolation valves at HP outlet"; parameter Buildings.Templates.Components.Types.PumpArrangement typArrPumPri= Buildings.Templates.Components.Types.PumpArrangement.Dedicated "Type of primary pump arrangement"; final parameter Boolean have_bypHeaWatFix= have_heaWat and typDis <> Buildings.Templates.Plants.HeatPumps.Types.Distribution.Constant1Only and typDis <> Buildings.Templates.Plants.HeatPumps.Types.Distribution.Variable1Only "Set to true if the HW loop has a fixed bypass"; final parameter Boolean have_valHeaWatMinByp=have_heaWat and typDis == Buildings.Templates.Plants.HeatPumps.Types.Distribution.Variable1Only "Set to true if the HW loop has a minimum flow bypass valve"; // Constant primary plants with dedicated primary pumps. parameter Buildings.Templates.Plants.HeatPumps.Types.PumpsPrimary typPumHeaWatPri_select1( start=Buildings.Templates.Plants.HeatPumps.Types.PumpsPrimary.Variable)= Buildings.Templates.Plants.HeatPumps.Types.PumpsPrimary.Variable "Type of primary HW pumps"; // Constant primary plants with headered primary pumps. parameter Buildings.Templates.Plants.HeatPumps.Types.PumpsPrimary typPumHeaWatPri_select2( start=Buildings.Templates.Plants.HeatPumps.Types.PumpsPrimary.Variable)= Buildings.Templates.Plants.HeatPumps.Types.PumpsPrimary.Variable "Type of primary HW pumps"; // Variable primary plants with headered primary pumps require variable speed pumps. final parameter Buildings.Templates.Plants.HeatPumps.Types.PumpsPrimary typPumHeaWatPri= if have_heaWat and typArrPumPri == Buildings.Templates.Components.Types.PumpArrangement.Dedicated and (typDis == Buildings.Templates.Plants.HeatPumps.Types.Distribution.Constant1Only or typDis == Buildings.Templates.Plants.HeatPumps.Types.Distribution.Constant1Variable2) then typPumHeaWatPri_select1 elseif have_heaWat and typArrPumPri == Buildings.Templates.Components.Types.PumpArrangement.Headered and (typDis == Buildings.Templates.Plants.HeatPumps.Types.Distribution.Constant1Only or typDis == Buildings.Templates.Plants.HeatPumps.Types.Distribution.Constant1Variable2) then typPumHeaWatPri_select2 elseif have_heaWat and typArrPumPri == Buildings.Templates.Components.Types.PumpArrangement.Dedicated and (typDis == Buildings.Templates.Plants.HeatPumps.Types.Distribution.Variable1Only or typDis == Buildings.Templates.Plants.HeatPumps.Types.Distribution.Variable1And2) then Buildings.Templates.Plants.HeatPumps.Types.PumpsPrimary.Variable elseif have_heaWat and typArrPumPri == Buildings.Templates.Components.Types.PumpArrangement.Headered and (typDis == Buildings.Templates.Plants.HeatPumps.Types.Distribution.Variable1Only or typDis == Buildings.Templates.Plants.HeatPumps.Types.Distribution.Variable1And2) then Buildings.Templates.Plants.HeatPumps.Types.PumpsPrimary.Variable else Buildings.Templates.Plants.HeatPumps.Types.PumpsPrimary.None "Type of primary HW pumps"; final parameter Boolean have_pumHeaWatPriVar= typPumHeaWatPri == Buildings.Templates.Plants.HeatPumps.Types.PumpsPrimary.Variable "Set to true for variable speed primary HW pumps"; parameter Integer nPumHeaWatPri_select( final min=0, start=0)=nHp "Number of primary HW pumps"; final parameter Integer nPumHeaWatPri=if have_heaWat then (if typArrPumPri == Buildings.Templates.Components.Types.PumpArrangement.Headered then nPumHeaWatPri_select else nHp) else 0 "Number of primary HW pumps"; // RFE: Only centralized secondary HW pumps are currently supported for primary-secondary plants. final parameter Buildings.Templates.Plants.HeatPumps.Types.PumpsSecondary typPumHeaWatSec= if 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.None "Type of secondary HW pumps"; // Primary-secondary plants. parameter Integer nPumHeaWatSec_select( final min=0)=nHp "Number of secondary HW pumps"; final parameter Integer nPumHeaWatSec( final min=0)=if not have_heaWat or typDis == Buildings.Templates.Plants.HeatPumps.Types.Distribution.Variable1Only then 0 else nPumHeaWatSec_select "Number of secondary HW pumps"; // Plants with dedicated primary pumps. parameter Boolean have_pumChiWatPriDed_select( start=false)=false "Set to true for plants with separate dedicated primary CHW pumps"; final parameter Boolean have_pumChiWatPriDed=if have_chiWat and typArrPumPri == Buildings.Templates.Components.Types.PumpArrangement.Dedicated then have_pumChiWatPriDed_select else false "Set to true for plants with separate dedicated primary CHW pumps"; final parameter Boolean have_bypChiWatFix= have_chiWat and typDis <> Buildings.Templates.Plants.HeatPumps.Types.Distribution.Constant1Only and typDis <> Buildings.Templates.Plants.HeatPumps.Types.Distribution.Variable1Only "Set to true if the CHW loop has a fixed bypass"; final parameter Boolean have_valChiWatMinByp=have_chiWat and typDis == Buildings.Templates.Plants.HeatPumps.Types.Distribution.Variable1Only "Set to true if the CHW loop has a minimum flow bypass valve"; // Constant primary plants with separate dedicated primary CHW pumps. parameter Buildings.Templates.Plants.HeatPumps.Types.PumpsPrimary typPumChiWatPri_select1( start=Buildings.Templates.Plants.HeatPumps.Types.PumpsPrimary.Variable)= typPumHeaWatPri "Type of primary CHW pumps"; // Constant primary plants with headered primary pumps. parameter Buildings.Templates.Plants.HeatPumps.Types.PumpsPrimary typPumChiWatPri_select2( start=Buildings.Templates.Plants.HeatPumps.Types.PumpsPrimary.Variable)= typPumHeaWatPri "Type of primary CHW pumps"; // Variable primary plants with headered primary CHW pumps require variable speed pumps. final parameter Buildings.Templates.Plants.HeatPumps.Types.PumpsPrimary typPumChiWatPri= if have_pumChiWatPriDed and (typDis == Buildings.Templates.Plants.HeatPumps.Types.Distribution.Constant1Only or typDis == Buildings.Templates.Plants.HeatPumps.Types.Distribution.Constant1Variable2) then typPumChiWatPri_select1 elseif have_chiWat and typArrPumPri == Buildings.Templates.Components.Types.PumpArrangement.Headered and (typDis == Buildings.Templates.Plants.HeatPumps.Types.Distribution.Constant1Only or typDis == Buildings.Templates.Plants.HeatPumps.Types.Distribution.Constant1Variable2) then typPumChiWatPri_select2 elseif have_pumChiWatPriDed and (typDis == Buildings.Templates.Plants.HeatPumps.Types.Distribution.Variable1Only or typDis == Buildings.Templates.Plants.HeatPumps.Types.Distribution.Variable1And2) then Buildings.Templates.Plants.HeatPumps.Types.PumpsPrimary.Variable elseif have_chiWat and typArrPumPri == Buildings.Templates.Components.Types.PumpArrangement.Headered and (typDis == Buildings.Templates.Plants.HeatPumps.Types.Distribution.Variable1Only or typDis == Buildings.Templates.Plants.HeatPumps.Types.Distribution.Variable1And2) then Buildings.Templates.Plants.HeatPumps.Types.PumpsPrimary.Variable else Buildings.Templates.Plants.HeatPumps.Types.PumpsPrimary.None "Type of primary CHW pumps"; final parameter Boolean have_pumChiWatPriVar= typPumChiWatPri == Buildings.Templates.Plants.HeatPumps.Types.PumpsPrimary.Variable "Set to true for variable speed primary CHW pumps"; // Plants with headered primary CHW pumps. parameter Integer nPumChiWatPri_select( final min=0, start=0)=nHp "Number of primary CHW pumps"; final parameter Integer nPumChiWatPri=if have_chiWat and typArrPumPri == Buildings.Templates.Components.Types.PumpArrangement.Headered then nPumChiWatPri_select elseif have_pumChiWatPriDed then nHp else 0 "Number of primary CHW pumps"; // RFE: Currently, only centralized secondary CHW pumps are supported for primary-secondary plants. final parameter Buildings.Templates.Plants.HeatPumps.Types.PumpsSecondary typPumChiWatSec= if 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.None "Type of secondary CHW pumps"; parameter Integer nPumChiWatSec_select( final min=0)=nHp "Number of secondary CHW pumps"; final parameter Integer nPumChiWatSec( final min=0)=if not have_chiWat or typDis == Buildings.Templates.Plants.HeatPumps.Types.Distribution.Variable1Only then 0 else nPumChiWatSec_select "Number of secondary CHW pumps"; // Design and operating parameters. final parameter Modelica.Units.SI.MassFlowRate mHeaWatPri_flow_nominal=if have_heaWat then dat.hp.mHeaWatHp_flow_nominal * nHp else 0 "Primary HW mass flow rate"; final parameter Modelica.Units.SI.MassFlowRate mHeaWat_flow_nominal=if have_heaWat then (if typPumHeaWatSec == Buildings.Templates.Plants.HeatPumps.Types.PumpsSecondary.None then mHeaWatPri_flow_nominal else sum(dat.pumHeaWatSec.m_flow_nominal)) else 0 "HW mass flow rate (total, distributed to consumers)"; final parameter Modelica.Units.SI.HeatFlowRate capHea_nominal=if have_heaWat then abs(dat.hp.capHeaHp_nominal) * nHp else 0 "Heating capacity - All units"; final parameter Modelica.Units.SI.HeatFlowRate QHea_flow_nominal= capHea_nominal "Heating heat flow rate - All units"; final parameter Modelica.Units.SI.Temperature THeaWatSup_nominal=dat.ctl.THeaWatSup_nominal "Maximum HW supply temperature"; final parameter Modelica.Units.SI.Temperature THeaWatRet_nominal= THeaWatSup_nominal - QHea_flow_nominal / cpHeaWat_default / mHeaWat_flow_nominal "HW return temperature"; final parameter Modelica.Units.SI.MassFlowRate mChiWatPri_flow_nominal=if have_chiWat then dat.hp.mChiWatHp_flow_nominal * nHp else 0 "Primary CHW mass flow rate"; final parameter Modelica.Units.SI.MassFlowRate mChiWat_flow_nominal=if have_chiWat then (if typPumChiWatSec == Buildings.Templates.Plants.HeatPumps.Types.PumpsSecondary.None then mChiWatPri_flow_nominal else sum(dat.pumChiWatSec.m_flow_nominal)) else 0 "CHW mass flow rate - Total, distributed to consumers"; final parameter Modelica.Units.SI.HeatFlowRate capCoo_nominal=if have_chiWat then abs(dat.hp.capCooHp_nominal) * nHp else 0 "Cooling capacity - All units"; final parameter Modelica.Units.SI.HeatFlowRate QCoo_flow_nominal=- capCoo_nominal "Cooling heat flow rate - All units"; final parameter Modelica.Units.SI.Temperature TChiWatSup_nominal=dat.ctl.TChiWatSup_nominal "Minimum CHW supply temperature"; final parameter Modelica.Units.SI.Temperature TChiWatRet_nominal=if is_rev then TChiWatSup_nominal - QCoo_flow_nominal / cpChiWat_default / mChiWat_flow_nominal else Buildings.Templates.Data.Defaults.TChiWatRet "CHW return temperature - Each heat pump"; final parameter Modelica.Units.SI.Temperature TSouHea_nominal=dat.hp.TSouHeaHp_nominal "OAT or source fluid supply temperature (evaporator entering) in heating mode - Each heat pump"; final parameter Modelica.Units.SI.Temperature TSouCoo_nominal=dat.hp.TSouCooHp_nominal "OAT or source fluid supply temperature (evaporator entering) in cooling mode - Each heat pump"; // Dynamics and miscellaneous parameterss. parameter Modelica.Units.SI.Time tau=30 "Time constant at nominal flow"; parameter Modelica.Fluid.Types.Dynamics energyDynamics=Modelica.Fluid.Types.Dynamics.DynamicFreeInitial "Type of energy balance: dynamic (3 initialization options) or steady state"; parameter Boolean allowFlowReversal=true "= true to allow flow reversal, false restricts to design direction (port_a -> port_b)"; parameter Boolean show_T=false "= true, if actual temperature at port is computed"; final parameter MediumHeaWat.Density rhoHeaWat_default=MediumHeaWat.density(staHeaWat_default) "HW default density"; final parameter MediumHeaWat.SpecificHeatCapacity cpHeaWat_default= MediumHeaWat.specificHeatCapacityCp(staHeaWat_default) "HW default specific heat capacity"; final parameter MediumHeaWat.ThermodynamicState staHeaWat_default=MediumHeaWat.setState_pTX( T=THeaWatSup_nominal, p=MediumHeaWat.p_default, X=MediumHeaWat.X_default) "HW default state"; final parameter MediumChiWat.Density rhoChiWat_default=MediumChiWat.density(staChiWat_default) "CHW default density"; final parameter MediumChiWat.SpecificHeatCapacity cpChiWat_default= MediumChiWat.specificHeatCapacityCp(staChiWat_default) "CHW default specific heat capacity"; final parameter MediumChiWat.ThermodynamicState staChiWat_default=MediumChiWat.setState_pTX( T=TChiWatSup_nominal, p=MediumChiWat.p_default, X=MediumChiWat.X_default) "CHW default state"; /* Source fluid default state = heating mode: - Impact of difference between TSouHea_nominal and TSouCoo_nominal on cp is about 0.5 %. - Impact of difference between TSouHea_nominal and TSouCoo_nominal on rho is about 2 %, with rhoSouHea_nominal > rhoSouCoo_nominal, so conservative for pump sizing. */ final parameter MediumSou.Density rhoSou_default=MediumSou.density(staSou_default) "Source fluid default density"; final parameter MediumSou.SpecificHeatCapacity cpSou_default=MediumSou.specificHeatCapacityCp(staSou_default) "Source fluid default specific heat capacity"; final parameter MediumSou.ThermodynamicState staSou_default=MediumSou.setState_pTX( T=TSouHea_nominal, p=MediumSou.p_default, X=MediumSou.X_default) "Source fluid default state"; Modelica.Fluid.Interfaces.FluidPort_a port_aHeaWat( redeclare final package Medium=MediumHeaWat, m_flow( final min=if allowFlowReversal then - Modelica.Constants.inf else 0), h_outflow( start=MediumHeaWat.h_default, nominal=MediumHeaWat.h_default)) if have_heaWat "HW return"; Modelica.Fluid.Interfaces.FluidPort_b port_bHeaWat( redeclare final package Medium=MediumHeaWat, m_flow( max=if allowFlowReversal then + Modelica.Constants.inf else 0), h_outflow( start=MediumHeaWat.h_default, nominal=MediumHeaWat.h_default)) if have_heaWat "HW supply"; Modelica.Fluid.Interfaces.FluidPort_a port_aChiWat( redeclare final package Medium=MediumChiWat, m_flow( final min=if allowFlowReversal then - Modelica.Constants.inf else 0), h_outflow( start=MediumChiWat.h_default, nominal=MediumChiWat.h_default)) if have_chiWat "CHW return"; Modelica.Fluid.Interfaces.FluidPort_b port_bChiWat( redeclare final package Medium=MediumChiWat, m_flow( max=if allowFlowReversal then + Modelica.Constants.inf else 0), h_outflow( start=MediumChiWat.h_default, nominal=MediumChiWat.h_default)) if have_chiWat "CHW supply"; Buildings.Templates.Plants.HeatPumps.Interfaces.Bus bus "Plant control bus"; Buildings.Templates.AirHandlersFans.Interfaces.Bus busAirHan[cfg.nAirHan] if cfg.nAirHan > 0 "Air handling unit control bus"; Buildings.Templates.ZoneEquipment.Interfaces.Bus busEquZon[cfg.nEquZon] if cfg.nEquZon > 0 "Terminal unit control bus"; BoundaryConditions.WeatherData.Bus busWea "Weather bus"; replaceable Buildings.Templates.Plants.HeatPumps.Components.Interfaces.PartialController ctl constrainedby Buildings.Templates.Plants.HeatPumps.Components.Interfaces.PartialController ( final cfg=cfg, final dat=dat.ctl) "Plant controller"; // Miscellaneous Buildings.Fluid.Sources.Outside out( redeclare replaceable package Medium=Buildings.Media.Air, nPorts=1) "Outdoor air conditions"; Buildings.Fluid.Sensors.Temperature TOut( redeclare replaceable package Medium=Buildings.Media.Air, warnAboutOnePortConnection=false) "OA temperature"; initial equation if typArrPumPri == Buildings.Templates.Components.Types.PumpArrangement.Dedicated then assert(nPumHeaWatPri == nHp, "In " + getInstanceName() + ": " + "In case of dedicated primary HW pumps, the number pumps (=" + String(nPumHeaWatPri) + ") must be equal to the number of heat pumps (=" + String(nHp) + ")."); end if; if have_pumChiWatPriDed then assert(nPumChiWatPri == nHp, "In " + getInstanceName() + ": " + "In case of separate dedicated primary CHW pumps, the number pumps (=" + String(nPumChiWatPri) + ") must be equal to the number of heat pumps (=" + String(nHp) + ")."); end if; equation /* Control point connection - start */ connect(TOut.T, bus.TOut); /* Control point connection - stop */ connect(bus, ctl.bus); connect(ctl.busAirHan, busAirHan); connect(ctl.busEquZon, busEquZon); connect(busWea, out.weaBus); connect(out.ports[1], TOut.port); end PartialHeatPumpPlant;