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 |
|---|---|
| Control bus for heat pump plant | |
| Interface class for heat pump plant |
Buildings.Templates.Plants.HeatPumps.Interfaces.Bus
Control bus for heat pump plant
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
Interface class for heat pump plant
Information
This partial class provides a standard interface for heat pump plant models.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| replaceable package MediumHeaWat | Buildings.Media.Water | HW medium | |
| replaceable package MediumHotWat | Buildings.Media.Water | DHW medium | |
| replaceable package MediumChiWat | Buildings.Media.Water | CHW medium | |
| replaceable package MediumSou | Buildings.Media.Water | Source-side medium | |
| replaceable package MediumAir | Buildings.Media.Air | Air medium | |
| PlantHeatPump | typ | Buildings.Templates.Plants.C... | Type of plant |
| HeatPumpPlant | dat | dat(cfg=cfg) | Design and operating parameters |
| Configuration | |||
| Distribution | typDis_select1 | Buildings.Templates.Plants.H... | Type of distribution system |
| Distribution | typDis_select2 | Type of distribution system | |
| Heat pumps | |||
| HeatPump | typHp | Type of heat pump | |
| Integer | nHp_select | Number of heat pumps (excluding polyvalent HPs) | |
| polyvalent heat pumps | |||
| Integer | nPhp_select | Number of polyvalent heat pumps | |
| Primary loop | |||
| PumpArrangement | typArrPumPri_select | Buildings.Templates.Componen... | Type of primary pump arrangement |
| PumpsPrimary | typPumPri_select | Buildings.Templates.Plants.H... | Type of CHW/HW primary pumps |
| Integer | nPumHeaWatPri_select | nHp + nPhp | Number of primary HW pumps |
| IntegrationPoint | typTanHeaWat_select | Buildings.Templates.Componen... | Specify if there is a HW buffer tank and where it is integrated into the system |
| Boolean | have_pumPriDedComHp_select | true | Set to true for HP with single dedicated primary pump serving both CHW and HW circuits |
| Integer | nPumChiWatPri_select | nHp + nPhp | Number of primary CHW pumps |
| IntegrationPoint | typTanChiWat_select | Buildings.Templates.Componen... | Specify if there is a CHW buffer tank and where it is integrated into the system |
| Secondary HW loop | |||
| Integer | nPumHeaWatSec_select | Number of secondary HW pumps | |
| Secondary CHW loop | |||
| Integer | nPumChiWatSec_select | Number of secondary CHW pumps | |
| Controls | |||
| PartialController | ctl | redeclare Buildings.Template... | Plant controller |
| Assumptions | |||
| Boolean | allowFlowReversal | true | = true to allow flow reversal, false restricts to design direction (port_a -> port_b) |
| Advanced | |||
| Boolean | linearized | false | = true, use linear relation between m_flow and dp for all valves |
| Diagnostics | |||
| Boolean | show_T | false | = true, if actual temperature at port is computed |
Connectors
| Type | Name | Description |
|---|---|---|
| replaceable package MediumHeaWat | HW medium | |
| replaceable package MediumHotWat | DHW medium | |
| replaceable package MediumChiWat | CHW medium | |
| replaceable package MediumSou | Source-side medium | |
| replaceable package MediumAir | Air medium | |
| FluidPort_a | port_aHeaWat | HW return |
| FluidPort_b | port_bHeaWat | HW supply |
| FluidPort_a | port_aChiWat | CHW return |
| FluidPort_b | port_bChiWat | CHW supply |
| Bus | bus | Plant control bus |
| Bus | busAirHan[cfg.nAirHan] | Air handling unit control bus |
| Bus | busEquZon[cfg.nEquZon] | Terminal unit control bus |
| Bus | busWea | Weather 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 at least provide HHW.
final parameter Boolean have_heaWat = true
"Set to true if the plant provides HW";
final parameter Boolean have_chiWat =
typ <> Buildings.Templates.Plants.Controls.Types.PlantHeatPump.HeatingOnly
"Set to true if the plant provides CHW";
// RFE: To be exposed for templates that support optional DHW service.
final parameter Boolean have_hotWat = false
"Set to true if the plant provides DHW";
final parameter Boolean have_hp =
typ <> Buildings.Templates.Plants.Controls.Types.PlantHeatPump.Polyvalent
"Set to true for plants with non-reversible or reversible heat pumps";
final parameter Boolean have_hrc =
typ ==
Buildings.Templates.Plants.Controls.Types.PlantHeatPump.ReversibleHeatRecovery
"Set to true for plants with sidestream heat recovery chiller";
final parameter Boolean have_php =
typ == Buildings.Templates.Plants.Controls.Types.PlantHeatPump.ReversiblePolyvalent
or typ == Buildings.Templates.Plants.Controls.Types.PlantHeatPump.Polyvalent
"Set to true for plants with polyvalent heat pumps";
parameter Buildings.Templates.Plants.Controls.Types.PlantHeatPump typ =
Buildings.Templates.Plants.Controls.Types.PlantHeatPump.Reversible
"Type of plant";
parameter Buildings.Templates.Components.Types.HeatPump typHp
"Type of heat pump";
final 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_hp=have_hp,
final have_hrc=have_hrc,
final have_hotWat=have_hotWat,
final have_pumChiWatPriDedHp=have_pumChiWatPriDedHp,
final have_php=have_php,
final have_valChiWatMinByp=have_valChiWatMinByp,
final have_valHeaWatMinByp=have_valHeaWatMinByp,
final have_valHpInlIso=have_valHpInlIso,
final have_valHpOutIso=have_valHpOutIso,
final have_valPhpInlIso=have_valPhpInlIso,
final have_valPhpOutIso=have_valPhpOutIso,
final is_rev=is_rev,
final nHp=nHp,
final nPumChiWatPri=nPumChiWatPri,
final nPumChiWatSec=nPumChiWatSec,
final nPumHeaWatPri=nPumHeaWatPri,
final nPumHeaWatSec=nPumHeaWatSec,
final nPhp=nPhp,
final rhoChiWat_default=rhoChiWat_default,
final rhoHeaWat_default=rhoHeaWat_default,
final rhoSou_default=rhoSou_default,
final typ=typ,
final typHp=typHp,
final typArrPumPri=typArrPumPri,
final typDis=typDis,
final typPumChiWatPri=typPumChiWatPri,
final typPumChiWatSec=typPumChiWatSec,
final typPumHeaWatPri=typPumHeaWatPri,
final typPumHeaWatSec=typPumHeaWatSec,
final typTanChiWat=typTanChiWat,
final typTanHeaWat=typTanHeaWat,
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_select(start=0)
"Number of heat pumps (excluding polyvalent HPs)";
final parameter Integer nHp(
final max=if have_hp then 10 else 0,
final min=if have_hp then 1 else 0) = if have_hp then nHp_select else 0
"Number of heat pumps (excluding polyvalent HPs)";
parameter Integer nPhp_select(start=0)
"Number of polyvalent heat pumps";
final parameter Integer nPhp(
final max=if have_php then 10 else 0,
final min=if have_php then 1 else 0) =
if have_php then nPhp_select else 0
"Number of polyvalent heat pumps";
final parameter Boolean is_rev =
typ == Buildings.Templates.Plants.Controls.Types.PlantHeatPump.Reversible
or typ ==
Buildings.Templates.Plants.Controls.Types.PlantHeatPump.ReversibleHeatRecovery
or typ ==
Buildings.Templates.Plants.Controls.Types.PlantHeatPump.ReversiblePolyvalent
"Set to true for reversible heat pumps, false for heating only";
// Plants with AWHP.
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 typHp == Buildings.Templates.Components.Types.HeatPump.AirToWater
then typDis_select1 else typDis_select2
"Type of distribution system";
// RFE(AntoineGautier): Default integration of isolation valves at HP inlet,
// not configurable.
final parameter Boolean have_valHpInlIso =
if not have_hp
then false
elseif 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_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 true
"Set to true for isolation valves at HP outlet";
// RFE(AntoineGautier): Default integration of isolation valves at polyvalent HP inlet,
// not configurable.
final parameter Boolean have_valPhpInlIso =
if not have_php
then false
elseif typArrPumPri ==
Buildings.Templates.Components.Types.PumpArrangement.Dedicated
then false
else true
"Set to true for isolation valves at polyvalent HP inlet";
final parameter Boolean have_valPhpOutIso = false
"Set to true for isolation valves at polyvalent HP outlet";
// Constant-primary plants with 2-pipe and 4-pipe HP require dedicated pumps.
parameter Buildings.Templates.Components.Types.PumpArrangement typArrPumPri_select =
Buildings.Templates.Components.Types.PumpArrangement.Dedicated
"Type of primary pump arrangement";
final parameter Buildings.Templates.Components.Types.PumpArrangement typArrPumPri =
if 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_select
"Type of primary pump arrangement";
final parameter Boolean have_bypHeaWatFix =
have_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";
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";
// Selection only possible for constant primary-variable secondary plants.
// Constant primary-only plants and variable primary plants require variable speed pumps.
parameter Buildings.Templates.Plants.HeatPumps.Types.PumpsPrimary typPumPri_select(
start=Buildings.Templates.Plants.HeatPumps.Types.PumpsPrimary.Variable) =
Buildings.Templates.Plants.HeatPumps.Types.PumpsPrimary.Variable
"Type of CHW/HW primary pumps";
final parameter Buildings.Templates.Plants.HeatPumps.Types.PumpsPrimary typPumPri =
if typDis ==
Buildings.Templates.Plants.HeatPumps.Types.Distribution.Constant1Variable2
then typPumPri_select
else Buildings.Templates.Plants.HeatPumps.Types.PumpsPrimary.Variable
"Type of primary CHW/HW pumps";
final parameter Buildings.Templates.Plants.HeatPumps.Types.PumpsPrimary typPumHeaWatPri =
if have_heaWat then typPumPri else Buildings.Templates.Plants.HeatPumps.Types.PumpsPrimary.None
"Type of primary HW pumps";
parameter Integer nPumHeaWatPri_select(final min=1, start=1) = nHp + nPhp
"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 + nPhp)
else 0
"Number of primary HW pumps";
parameter Buildings.Templates.Components.Types.IntegrationPoint typTanHeaWat_select(
start=Buildings.Templates.Components.Types.IntegrationPoint.None) =
Buildings.Templates.Components.Types.IntegrationPoint.Supply
"Specify if there is a HW buffer tank and where it is integrated into the system";
final parameter Buildings.Templates.Components.Types.IntegrationPoint typTanHeaWat =
if have_heaWat
then typTanHeaWat_select
else Buildings.Templates.Components.Types.IntegrationPoint.None
"Specify if there is a HW buffer tank and where it is integrated into the system";
// 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";
parameter Integer nPumHeaWatSec_select(final min=1, start=1)
"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";
parameter Boolean have_pumPriDedComHp_select(start=true) = true
"Set to true for HP with single dedicated primary pump serving both CHW and HW circuits";
final parameter Boolean have_pumPriDedComHp=if have_hp and have_chiWat and
typArrPumPri == Buildings.Templates.Components.Types.PumpArrangement.Dedicated
then have_pumPriDedComHp_select else false
"Set to true for HP with single dedicated primary pump serving both CHW and HW circuits";
final parameter Boolean have_pumChiWatPriDedHp=have_hp and have_chiWat and
typArrPumPri == Buildings.Templates.Components.Types.PumpArrangement.Dedicated
and not have_pumPriDedComHp
"Set to true for HP with separate dedicated primary pumps for CHW and HW circuits";
final parameter Buildings.Templates.Plants.HeatPumps.Types.PumpsPrimary typPumChiWatPri =
if 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.None
"Type of primary CHW pumps";
final parameter Boolean have_bypChiWatFix =
have_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";
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";
final parameter Buildings.Templates.Plants.HeatPumps.Types.PumpsPrimary
typPumChiWatPriHp=if 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.None
"Type of HP primary CHW pumps";
final parameter Buildings.Templates.Plants.HeatPumps.Types.PumpsPrimary typPumChiWatPriPhp =
if have_php
then typPumPri
else Buildings.Templates.Plants.HeatPumps.Types.PumpsPrimary.None
"Type of polyvalent HP primary CHW pumps";
// Plants with headered primary CHW pumps.
parameter Integer nPumChiWatPri_select(final min=1, start=1) = nHp + nPhp
"Number of primary CHW pumps";
final parameter Integer nPumChiWatPri=if have_chiWat then (if typArrPumPri
== Buildings.Templates.Components.Types.PumpArrangement.Headered then
nPumChiWatPri_select elseif not have_pumPriDedComHp then nHp + nPhp else
nPhp) else 0 "Number of primary CHW pumps";
parameter Buildings.Templates.Components.Types.IntegrationPoint typTanChiWat_select(
start=Buildings.Templates.Components.Types.IntegrationPoint.None) =
Buildings.Templates.Components.Types.IntegrationPoint.Return
"Specify if there is a CHW buffer tank and where it is integrated into the system";
final parameter Buildings.Templates.Components.Types.IntegrationPoint typTanChiWat =
if have_chiWat
then typTanChiWat_select
else Buildings.Templates.Components.Types.IntegrationPoint.None
"Specify if there is a CHW buffer tank and where it is integrated into the system";
// 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=1, start=1)
"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 + dat.hp.mHeaWatPhp_flow_nominal *
nPhp
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 + abs(dat.hp.capHeaPhp_nominal) *
nPhp
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 + dat.hp.mChiWatPhp_flow_nominal *
nPhp
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 + abs(dat.hp.capCooPhp_nominal) *
nPhp
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 or have_php
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 =
if have_hp then dat.hp.TSouHeaHp_nominal else dat.hp.TSouHeaPhp_nominal
"OAT or source fluid supply temperature (evaporator entering) in heating mode - Each unit";
final parameter Modelica.Units.SI.Temperature TSouCoo_nominal =
if have_hp then dat.hp.TSouCooHp_nominal else dat.hp.TSouCooPhp_nominal
"OAT or source fluid supply temperature (evaporator entering) in cooling mode - Each unit";
// Dynamics and miscellaneous parameters.
final parameter Modelica.Fluid.Types.Dynamics energyDynamics =
Modelica.Fluid.Types.Dynamics.FixedInitial
"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 linearized = false
"= true, use linear relation between m_flow and dp for all valves";
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";
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;