Buildings.Templates.Plants.HeatPumps.Components.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.Components.Interfaces.PartialController PartialController Interface for heat pump plant controller
Buildings.Templates.Plants.HeatPumps.Components.Interfaces.PartialHeatPumpGroup PartialHeatPumpGroup Interface for heat pump group

Buildings.Templates.Plants.HeatPumps.Components.Interfaces.PartialController Buildings.Templates.Plants.HeatPumps.Components.Interfaces.PartialController

Interface for heat pump plant controller

Buildings.Templates.Plants.HeatPumps.Components.Interfaces.PartialController

Information

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

Parameters

TypeNameDefaultDescription
Controllerdatdat(cfg=cfg)Parameter record for controller
Configuration
HeatPumpPlantcfgcfg(typCtl=typ, nAirHan=nAir...Plant configuration parameters
Controllertyp Type of controller
IntegernAirHan Number of air handling units served by the plant
IntegernEquZon Number of terminal units (zone equipment) served by the plant
Booleanhave_senVHeaWatPri_select Set to true for plants with primary HW flow sensor
Booleanhave_senVChiWatPri_select Set to true for plants with primary CHW flow sensor
Booleanhave_senTHeaWatPriRet_select Set to true for plants with primary HW return temperature sensor
Booleanhave_senTChiWatPriRet_select Set to true for plants with primary CHW return temperature sensor
Booleanhave_senTHeaWatSecRet Set to true for plants with secondary HW return temperature sensor
Booleanhave_senTChiWatSecRet Set to true for plants with secondary CHW return temperature sensor
Booleanhave_senDpHeaWatRemWirfalseSet to true for remote HW differential pressure sensor(s) hardwired to plant or pump controller
IntegernSenDpHeaWatRem1Number of remote HW differential pressure sensors used for HW pump speed control
Booleanhave_senDpChiWatRemWirhave_senDpHeaWatRemWirSet to true for remote CHW differential pressure sensor(s) hardwired to plant or pump controller
IntegernSenDpChiWatRem1Number of remote CHW differential pressure sensors used for CHW pump speed control
Plant enable
Booleanhave_inpSchfalseSet to true to provide schedule via software input point

Connectors

TypeNameDescription
BusbusPlant control bus
BusbusAirHan[nAirHan]Air handling unit control bus
BusbusEquZon[nEquZon]Terminal unit control bus

Modelica definition

block PartialController "Interface for heat pump plant controller" /* The following bindings are for parameters that are propagated *up* from the controller to the plant configuration record. All other configuration parameters (e.g. nHp) are propagated *down* from the plant configuration record to the controller. */ parameter Buildings.Templates.Plants.HeatPumps.Configuration.HeatPumpPlant cfg( typCtl=typ, nAirHan=nAirHan, nEquZon=nEquZon, have_senDpHeaWatRemWir=have_senDpHeaWatRemWir, nSenDpHeaWatRem=nSenDpHeaWatRem, have_senDpChiWatRemWir=have_senDpChiWatRemWir, nSenDpChiWatRem=nSenDpChiWatRem) "Plant configuration parameters"; parameter Buildings.Templates.Plants.HeatPumps.Components.Data.Controller dat( cfg=cfg) "Parameter record for controller"; final parameter Integer nHp=cfg.nHp "Number of heat pumps"; parameter Buildings.Templates.Plants.HeatPumps.Types.Controller typ "Type of controller"; parameter Integer nAirHan( final min=if typ <> Buildings.Templates.Plants.HeatPumps.Types.Controller.OpenLoop and nEquZon == 0 then 1 else 0, start=0) "Number of air handling units served by the plant"; parameter Integer nEquZon( final min=if typ <> Buildings.Templates.Plants.HeatPumps.Types.Controller.OpenLoop and nAirHan == 0 then 1 else 0, start=0) "Number of terminal units (zone equipment) served by the plant"; parameter Boolean have_senVHeaWatPri_select(start=false) "Set to true for plants with primary HW flow sensor"; final parameter Boolean have_senVHeaWatPri=cfg.have_heaWat and (if cfg.have_hrc or not have_senVHeaWatSec then true else have_senVHeaWatPri_select) "Set to true for plants with primary HW flow sensor"; // Secondary flow sensor required for secondary HW pump staging. final parameter Boolean have_senVHeaWatSec= cfg.typPumHeaWatSec<>Buildings.Templates.Plants.HeatPumps.Types.PumpsSecondary.None "Set to true for plants with secondary HW flow sensor"; parameter Boolean have_senVChiWatPri_select(start=false) "Set to true for plants with primary CHW flow sensor"; final parameter Boolean have_senVChiWatPri=cfg.have_chiWat and (if cfg.have_hrc or not have_senVChiWatSec then true else have_senVChiWatPri_select) "Set to true for plants with primary CHW flow sensor"; // Secondary flow sensor required for secondary CHW pump staging. final parameter Boolean have_senVChiWatSec= cfg.typPumChiWatSec<>Buildings.Templates.Plants.HeatPumps.Types.PumpsSecondary.None "Set to true for plants with secondary CHW flow sensor"; parameter Boolean have_senTHeaWatPriRet_select(start=false) "Set to true for plants with primary HW return temperature sensor"; final parameter Boolean have_senTHeaWatPriRet=cfg.have_heaWat and (if cfg.have_hrc or not have_senTHeaWatSecRet then true else have_senTHeaWatPriRet_select) "Set to true for plants with primary HW return temperature sensor"; parameter Boolean have_senTChiWatPriRet_select(start=false) "Set to true for plants with primary CHW return temperature sensor"; final parameter Boolean have_senTChiWatPriRet=cfg.have_chiWat and (if cfg.have_hrc or not have_senTChiWatSecRet then true else have_senTChiWatPriRet_select) "Set to true for plants with primary CHW return temperature sensor"; // For primary-secondary plants, SHWST sensor is required for plant staging. final parameter Boolean have_senTHeaWatSecSup= cfg.typPumHeaWatSec<>Buildings.Templates.Plants.HeatPumps.Types.PumpsSecondary.None "Set to true for plants with secondary HW supply temperature sensor"; // For primary-secondary plants, SCHWST sensor is required for plant staging. final parameter Boolean have_senTChiWatSecSup= cfg.typPumChiWatSec<>Buildings.Templates.Plants.HeatPumps.Types.PumpsSecondary.None "Set to true for plants with secondary CHW supply temperature sensor"; parameter Boolean have_senTHeaWatSecRet(start=false) "Set to true for plants with secondary HW return temperature sensor"; parameter Boolean have_senTChiWatSecRet(start=false) "Set to true for plants with secondary CHW return temperature sensor"; parameter Boolean have_senDpHeaWatRemWir=false "Set to true for remote HW differential pressure sensor(s) hardwired to plant or pump controller"; parameter Integer nSenDpHeaWatRem( final min=if typ <> Buildings.Templates.Plants.HeatPumps.Types.Controller.OpenLoop then 1 else 0)=1 "Number of remote HW differential pressure sensors used for HW pump speed control"; parameter Boolean have_senDpChiWatRemWir=have_senDpHeaWatRemWir "Set to true for remote CHW differential pressure sensor(s) hardwired to plant or pump controller"; parameter Integer nSenDpChiWatRem( final min=if typ <> Buildings.Templates.Plants.HeatPumps.Types.Controller.OpenLoop then 1 else 0)=1 "Number of remote CHW differential pressure sensors used for CHW pump speed control"; parameter Boolean have_inpSch(start=false)=false "Set to true to provide schedule via software input point"; final parameter Real schHea[:, 2]=dat.schHea "Heating mode enable schedule"; final parameter Real schCoo[:, 2]=dat.schCoo "Cooling mode enable schedule"; Buildings.Templates.Plants.HeatPumps.Interfaces.Bus bus "Plant control bus"; Buildings.Templates.AirHandlersFans.Interfaces.Bus busAirHan[nAirHan] if nAirHan > 0 "Air handling unit control bus"; Buildings.Templates.ZoneEquipment.Interfaces.Bus busEquZon[nEquZon] if nEquZon > 0 "Terminal unit control bus"; protected Buildings.Templates.Components.Interfaces.Bus busHp[nHp] "Heat pump control bus"; Buildings.Templates.Components.Interfaces.Bus busPumHeaWatPri if cfg.typPumHeaWatPri<>Buildings.Templates.Plants.HeatPumps.Types.PumpsPrimary.None "Primary HW pump control bus"; Buildings.Templates.Components.Interfaces.Bus busPumHeaWatSec if cfg.typPumHeaWatSec == Buildings.Templates.Plants.HeatPumps.Types.PumpsSecondary.Centralized "Secondary HW pump control bus"; Buildings.Templates.Components.Interfaces.Bus busPumChiWatPri if cfg.typPumChiWatPri<>Buildings.Templates.Plants.HeatPumps.Types.PumpsPrimary.None "Primary CHW pump control bus"; Buildings.Templates.Components.Interfaces.Bus busPumChiWatSec if cfg.typPumHeaWatSec == Buildings.Templates.Plants.HeatPumps.Types.PumpsSecondary.Centralized "Secondary CHW pump control bus"; Buildings.Templates.Components.Interfaces.Bus busValHeaWatHpInlIso[nHp] if cfg.have_heaWat and cfg.have_valHpInlIso "Heat pump inlet HW isolation valve control bus"; Buildings.Templates.Components.Interfaces.Bus busValHeaWatHpOutIso[nHp] if cfg.have_heaWat and cfg.have_valHpOutIso "Heat pump outlet HW isolation valve control bus"; Buildings.Templates.Components.Interfaces.Bus busValChiWatHpInlIso[nHp] if cfg.have_chiWat and cfg.have_valHpInlIso "Heat pump inlet CHW isolation valve control bus"; Buildings.Templates.Components.Interfaces.Bus busValChiWatHpOutIso[nHp] if cfg.have_chiWat and cfg.have_valHpOutIso "Heat pump outlet CHW isolation valve control bus"; equation /* Control point connection - start */ connect(busPumHeaWatPri, bus.pumHeaWatPri); connect(busPumChiWatPri, bus.pumChiWatPri); connect(busPumChiWatSec, bus.pumChiWatSec); connect(busPumHeaWatSec, bus.pumHeaWatSec); connect(busHp, bus.hp); connect(busValHeaWatHpInlIso, bus.valHeaWatHpInlIso); connect(busValHeaWatHpOutIso, bus.valHeaWatHpOutIso); connect(busValChiWatHpInlIso, bus.valChiWatHpInlIso); connect(busValChiWatHpOutIso, bus.valChiWatHpOutIso); /* Control point connection - stop */ end PartialController;

Buildings.Templates.Plants.HeatPumps.Components.Interfaces.PartialHeatPumpGroup Buildings.Templates.Plants.HeatPumps.Components.Interfaces.PartialHeatPumpGroup

Interface for heat pump group

Buildings.Templates.Plants.HeatPumps.Components.Interfaces.PartialHeatPumpGroup

Information

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

Parameters

TypeNameDefaultDescription
replaceable package MediumHeaWatBuildings.Media.WaterHW medium
replaceable package MediumSouBuildings.Media.WaterSource-side medium
replaceable package MediumAirBuildings.Media.AirAir medium
HeatPumpGroupdatdat(nHp=nHp, typ=typ, is_rev...Design and operating parameters
Configuration
IntegernHp Number of heat pumps
HeatPumptyp Equipment type
Booleanis_rev Set to true for reversible heat pumps, false for heating only
HeatPumpModeltypModBuildings.Templates.Componen...Type of heat pump model
Dynamics
Conservation equations
DynamicsenergyDynamicsModelica.Fluid.Types.Dynamic...Type of energy balance: dynamic (3 initialization options) or steady state
Assumptions
BooleanallowFlowReversaltrueLoad side flow reversal: false to simplify equations, assuming, but not enforcing, no flow reversal
BooleanallowFlowReversalSoutrueSource side flow reversal: false to simplify equations, assuming, but not enforcing, no flow reversal
Booleanhave_preDroChiHeaWattrueSet to true for CHW/HW pressure drop computed by this model, false for external computation
Booleanhave_preDroSoutrueSet to true for source fluid pressure drop computed by this model, false for external computation
Advanced
Diagnostics
Booleanshow_Tfalse= true, if actual temperature at port is computed

Connectors

TypeNameDescription
replaceable package MediumHeaWatHW medium
replaceable package MediumSouSource-side medium
replaceable package MediumAirAir medium
FluidPorts_bports_bChiHeaWat[nHp]CHW/HW supply
FluidPorts_aports_aChiHeaWat[nHp]CHW/HW return
FluidPorts_bports_bSou[nHp]Source fluid return (from heat pumps)
FluidPorts_aports_aSou[nHp]Source fluid supply (to heat pumps)
BusbusPlant control bus
BusbusWeaWeather bus

Modelica definition

model PartialHeatPumpGroup "Interface for heat pump group" replaceable package MediumHeaWat=Buildings.Media.Water constrainedby Modelica.Media.Interfaces.PartialMedium "HW medium"; /* MediumChiWat is for internal use only. It is the same as MediumHeaWat for reversible HP. Non-reversible HP that can be controlled to produce either HW or CHW shall be modeled with chiller components (as a chiller/heater). */ final package MediumChiWat=MediumHeaWat "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"; parameter Integer nHp( final min=1) "Number of heat pumps"; parameter Buildings.Templates.Components.Types.HeatPump typ "Equipment type"; parameter Boolean is_rev "Set to true for reversible heat pumps, false for heating only"; parameter Buildings.Templates.Components.Types.HeatPumpModel typMod= Buildings.Templates.Components.Types.HeatPumpModel.EquationFit "Type of heat pump model"; parameter Buildings.Templates.Plants.HeatPumps.Components.Data.HeatPumpGroup dat( nHp=nHp, typ=typ, is_rev=is_rev, typMod=typMod, cpHeaWat_default=cpHeaWat_default, cpSou_default=cpSou_default) "Design and operating parameters"; final parameter Buildings.Templates.Components.Data.HeatPump datHp[nHp]( each final is_rev=is_rev, each final typ=typ, each final typMod=typMod, each final cpHeaWat_default=cpHeaWat_default, each final cpSou_default=cpSou_default, each final mHeaWat_flow_nominal=dat.mHeaWatHp_flow_nominal, each final mSouWwCoo_flow_nominal=dat.mSouWwCooHp_flow_nominal, each final TSouHea_nominal=dat.TSouHeaHp_nominal, each final mChiWat_flow_nominal=dat.mChiWatHp_flow_nominal, each final dpSouWwHea_nominal=dat.dpSouWwHeaHp_nominal, each final THeaWatSup_nominal=dat.THeaWatSupHp_nominal, each final dpHeaWat_nominal=dat.dpHeaWatHp_nominal, each final mSouWwHea_flow_nominal=dat.mSouWwHeaHp_flow_nominal, each final TSouCoo_nominal=dat.TSouCooHp_nominal, each final perFit=dat.perFitHp, each final capCoo_nominal=dat.capCooHp_nominal, each final TChiWatSup_nominal=dat.TChiWatSupHp_nominal, each final capHea_nominal=dat.capHeaHp_nominal) "Design and operating parameters - Each heat pump"; final parameter Modelica.Units.SI.MassFlowRate mHeaWatHp_flow_nominal=dat.mHeaWatHp_flow_nominal "Design HW mass flow rate - Each heat pump"; final parameter Modelica.Units.SI.HeatFlowRate capHeaHp_nominal=dat.capHeaHp_nominal "Design heating capacity - Each heat pump"; final parameter Modelica.Units.SI.HeatFlowRate QHeaHp_flow_nominal=abs(capHeaHp_nominal) "Design heating heat flow rate - Each heat pump"; final parameter Modelica.Units.SI.PressureDifference dpHeaWatHp_nominal=dat.dpHeaWatHp_nominal "Design HW pressure drop - Each heat pump"; final parameter Modelica.Units.SI.Temperature THeaWatSupHp_nominal=dat.THeaWatSupHp_nominal "Design HW supply temperature - Each heat pump"; final parameter Modelica.Units.SI.Temperature THeaWatRetHp_nominal=dat.THeaWatRetHp_nominal "Design HW return temperature - Each heat pump"; final parameter Modelica.Units.SI.MassFlowRate mChiWatHp_flow_nominal=dat.mChiWatHp_flow_nominal "Design CHW mass flow rate - Each heat pump"; final parameter Modelica.Units.SI.PressureDifference dpChiWatHp_nominal=dat.dpChiWatHp_nominal "Design CHW pressure drop - Each heat pump"; final parameter Modelica.Units.SI.HeatFlowRate capCooHp_nominal=dat.capCooHp_nominal "Design cooling capacity - Each heat pump"; final parameter Modelica.Units.SI.HeatFlowRate QCooHp_flow_nominal=- abs(capCooHp_nominal) "Design cooling heat flow rate - Each heat pump"; final parameter Modelica.Units.SI.Temperature TChiWatSupHp_nominal=dat.TChiWatSupHp_nominal "Design CHW supply temperature - Each heat pump"; final parameter Modelica.Units.SI.Temperature TChiWatRetHp_nominal=dat.TChiWatRetHp_nominal "Design CHW return temperature - Each heat pump"; final parameter Modelica.Units.SI.MassFlowRate mSouHeaHp_flow_nominal=dat.mSouHeaHp_flow_nominal "Design source fluid mass flow rate in heating mode - Each heat pump"; final parameter Modelica.Units.SI.PressureDifference dpSouHeaHp_nominal=dat.dpSouHeaHp_nominal "Design source fluid pressure drop in heating mode - Each heat pump"; final parameter Modelica.Units.SI.MassFlowRate mSouCooHp_flow_nominal=dat.mSouCooHp_flow_nominal "Design source fluid mass flow rate in cooling mode - Each heat pump"; final parameter Modelica.Units.SI.PressureDifference dpSouCooHp_nominal=dat.dpSouCooHp_nominal "Designs source fluid pressure drop in cooling mode - Each heat pump"; final parameter Modelica.Units.SI.Temperature TSouCooHp_nominal=dat.TSouCooHp_nominal "Design OAT or source fluid supply temperature (condenser entering) in cooling mode - Each heat pump"; final parameter Modelica.Units.SI.Temperature TSouHeaHp_nominal=dat.TSouHeaHp_nominal "Design OAT or source fluid supply temperature (evaporator entering) in heating mode - Each heat pump"; 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 "Load side flow reversal: false to simplify equations, assuming, but not enforcing, no flow reversal"; parameter Boolean allowFlowReversalSou=true "Source side flow reversal: false to simplify equations, assuming, but not enforcing, no flow reversal"; parameter Boolean have_preDroChiHeaWat=true "Set to true for CHW/HW pressure drop computed by this model, false for external computation"; parameter Boolean have_preDroSou=true "Set to true for source fluid pressure drop computed by this model, false for external computation"; 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=THeaWatSupHp_nominal, p=MediumHeaWat.p_default, X=MediumHeaWat.X_default) "HW default state"; 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=TChiWatSupHp_nominal, p=MediumChiWat.p_default, X=MediumChiWat.X_default) "CHW default state"; 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=TSouHeaHp_nominal, p=MediumSou.p_default, X=MediumSou.X_default) "Source fluid default state"; Modelica.Fluid.Interfaces.FluidPorts_b ports_bChiHeaWat[nHp]( redeclare each final package Medium=MediumHeaWat, each m_flow( max=if allowFlowReversal then + Modelica.Constants.inf else 0), each h_outflow( start=MediumHeaWat.h_default, nominal=MediumHeaWat.h_default)) "CHW/HW supply"; Modelica.Fluid.Interfaces.FluidPorts_a ports_aChiHeaWat[nHp]( redeclare each final package Medium=MediumHeaWat, each m_flow( min=if allowFlowReversal then - Modelica.Constants.inf else 0), each h_outflow( start=MediumHeaWat.h_default, nominal=MediumHeaWat.h_default)) "CHW/HW return"; Modelica.Fluid.Interfaces.FluidPorts_b ports_bSou[nHp]( redeclare each final package Medium=MediumSou, each m_flow( max=if allowFlowReversalSou then + Modelica.Constants.inf else 0), each h_outflow( start=MediumSou.h_default, nominal=MediumSou.h_default)) "Source fluid return (from heat pumps)"; Modelica.Fluid.Interfaces.FluidPorts_a ports_aSou[nHp]( redeclare each final package Medium=MediumSou, each m_flow( min=if allowFlowReversalSou then - Modelica.Constants.inf else 0), each h_outflow( start=MediumSou.h_default, nominal=MediumSou.h_default)) "Source fluid supply (to heat pumps)"; Buildings.Templates.Plants.HeatPumps.Interfaces.Bus bus "Plant control bus"; Buildings.BoundaryConditions.WeatherData.Bus busWea if typ == Buildings.Templates.Components.Types.HeatPump.AirToWater "Weather bus"; // Diagnostics parameter Boolean show_T=false "= true, if actual temperature at port is computed"; MediumHeaWat.ThermodynamicState sta_aChiHeaWat[nHp]=MediumHeaWat.setState_phX(ports_aChiHeaWat.p, noEvent(actualStream(ports_aChiHeaWat.h_outflow)), noEvent(actualStream(ports_aChiHeaWat.Xi_outflow))) if show_T "CHW/HW medium properties in port_aChiHeaWat"; MediumHeaWat.ThermodynamicState sta_bChiHeaWat[nHp]=MediumHeaWat.setState_phX(ports_bChiHeaWat.p, noEvent(actualStream(ports_bChiHeaWat.h_outflow)), noEvent(actualStream(ports_bChiHeaWat.Xi_outflow))) if show_T "CHW/HW medium properties in port_bChiHeaWat"; MediumSou.ThermodynamicState sta_aSou[nHp]=MediumSou.setState_phX(ports_aSou.p, noEvent(actualStream(ports_aSou.h_outflow)), noEvent(actualStream(ports_aSou.Xi_outflow))) if show_T "Source medium properties in port_aSou"; MediumSou.ThermodynamicState sta_bSou[nHp]=MediumSou.setState_phX(ports_bSou.p, noEvent(actualStream(ports_bSou.h_outflow)), noEvent(actualStream(ports_bSou.Xi_outflow))) if show_T "Source medium properties in port_bSou"; protected Buildings.Templates.Components.Interfaces.Bus busHp[nHp] "Heat pump control bus"; equation connect(bus.hp, busHp); end PartialHeatPumpGroup;