Package with base classes
Information
This package contains base classes that are used to construct the classes in
Buildings.DHC.ETS.Combined.
Extends from Modelica.Icons.BasesPackage (Icon for packages containing base classes).
Package Content
Name |
Description |
PartialHeatPumpHeatExchanger
|
Partial model of a substation with heat pump and compressor-less cooling |
PartialParallel
|
Partial ETS model with district heat exchanger and parallel connection of production systems |
Partial model of a substation with heat pump and compressor-less cooling
Information
This model represents an energy transfer station based on that described in Sommer (2020),
with some additioinal details:
The cooling function is provided in a compressor-less mode by a heat exchanger
connected to the district supply line.
-
The cooling heat exchanger primary pump is modulated based on a PI control
loop tracking the chilled water supply temperature at the outlet of the heat exchanger
secondary side.
-
The chilled water is typically produced at high temperature and distributed
to radiant cooling systems, for instance at 19°C.
The space heating heating function is provided by a water-to-water heat pump
Buildings.DHC.ETS.Combined.Subsystems.HeatPump.
-
By default, the condenser loop is operated
with a variable mass flow rate to maintain a difference between supply and
return water of
dT_nominal
,
with a lower limit of mass flow specified by the ratio ratFloMin
.
The control logic is implemented and described in
Buildings.DHC.ETS.Combined.Controls.PrimaryVariableFlow.
The model can also represent a constant flow condenser loop
by setting have_varFloCon
to false
.
-
The evaporator loop is controlled according to the documentation in
Buildings.DHC.ETS.Combined.Subsystems.HeatPump.
Evaporator water is supplied by mixing flow directly from the district line with
flow leaving the district side of the cooling heat exchanger.
The hydronic arrangement modeled in
Buildings.DHC.ETS.Combined.Subsystems.SwitchBox
ensures that the resulting fluid stream in the district line always flows
in the same direction.
-
The space heating hot water is typically produced at low temperature,
for instance 40°C.
Space Heating and Cooling Enable/Disable
Heating (resp. cooling) is enabled based on the input signal uHea
(resp. uCoo
) which is held for 15 minutes, meaning that,
when enabled, the mode remains active for at least 15 minutes and,
when disabled, the mode cannot be enabled again for at least 15 minutes.
The heating and cooling enable signals should be computed externally based
on a schedule (to lock out the system during off-hours), ideally in conjunction
with the number of requests yielded by the terminal unit controllers, or any
other signal representative of the load.
Modeling considerations
There is a control volume at each of the two fluid ports that serve as inlet and outlet
of the heating and cooling systems. These approximate the dynamics
of the substation, and they also generally avoid nonlinear systems
of equations if multiple substations are connected to each other.
References
Sommer T., Sulzer M., Wetter M., Sotnikov A., Mennel S., Stettler C.
The reservoir network: A new network topology for district heating
and cooling.
Energy, Volume 199, 15 May 2020, 117418.
Extends from Buildings.DHC.ETS.BaseClasses.PartialETS (Partial class for modeling an energy transfer station).
Parameters
Type | Name | Default | Description |
replaceable package MediumSer | Water | Service side medium |
replaceable package MediumSerHea_a | Water | Service side medium at heating inlet |
replaceable package MediumBui | Water | Building side medium |
Generic | fue[nFue] | | Fuel type |
Boolean | have_varFloCon | true | Set to true for heat pumps with variable condenser flow |
Boolean | have_varFloEva | true | Set to true for heat pumps with variable evaporator flow |
Real | ratFloMin | 0.3 | Minimum condenser mass flow rate (ratio to nominal) [1] |
Configuration |
DistrictSystemType | typ | Buildings.DHC.Types.District... | Type of district system |
Boolean | have_heaWat | true | Set to true if the ETS supplies heating water |
Boolean | have_hotWat | false | Set to true if the ETS supplies hot water |
Boolean | have_chiWat | true | Set to true if the ETS supplies chilled water |
Boolean | have_fan | false | Set to true if fan power is computed |
Boolean | have_pum | true | Set to true if pump power is computed |
Boolean | have_eleHea | true | Set to true if the ETS has electric heating system |
Integer | nFue | 0 | Number of fuel types (0 means no combustion system) |
Boolean | have_eleCoo | false | Set to true if the ETS has electric cooling system |
Boolean | have_weaBus | false | Set to true to use a weather bus |
Nominal condition |
HeatFlowRate | QHeaWat_flow_nominal | 0 | Nominal capacity of heating system (>=0) [W] |
HeatFlowRate | QHotWat_flow_nominal | 0 | Nominal capacity of hot water production system (>=0) [W] |
HeatFlowRate | QChiWat_flow_nominal | 0 | Nominal capacity of cooling system (<=0) [W] |
TemperatureDifference | dT_nominal | 5 | Water temperature drop/increase accross load and source-side HX (always positive) [K] |
Temperature | THeaWatSup_nominal | 313.15 | Heating water supply temperature [K] |
Temperature | THotWatSup_nominal | 336.15 | Domestic hot water supply temperature to fixtures [K] |
Temperature | TColWat_nominal | 288.15 | Cold water temperature (for hot water production) [K] |
Pressure | dp_nominal | 50000 | Pressure difference at nominal flow rate (for each flow leg) [Pa] |
Real | COPHeaWat_nominal | | COP of heat pump for heating water production [1] |
Real | COPHotWat_nominal | | COP of heat pump for hot water production [1] |
DHC system |
Temperature | TDisWatMin | | District water minimum temperature [K] |
Temperature | TDisWatMax | | District water maximum temperature [K] |
Nominal conditions |
Temperature | TChiWatSup_nominal | 291.15 | Chilled water supply temperature [K] |
Assumptions |
Boolean | allowFlowReversalSer | false | Set to true to allow flow reversal on service side |
Boolean | allowFlowReversalBui | false | Set to true to allow flow reversal on building side |
Dynamics |
Dynamics | mixingVolumeEnergyDynamics | Modelica.Fluid.Types.Dynamic... | Formulation of energy balance for mixing volume at inlet and outlet |
Connectors
Type | Name | Description |
FluidPorts_a | ports_aHeaWat[nPorts_aHeaWat] | Fluid connectors for heating water return (from building) |
FluidPorts_b | ports_bHeaWat[nPorts_bHeaWat] | Fluid connectors for heating water supply (to building) |
FluidPorts_a | ports_aChiWat[nPorts_aChiWat] | Fluid connectors for chilled water return (from building) |
FluidPorts_b | ports_bChiWat[nPorts_bChiWat] | Fluid connectors for chilled water supply (to building) |
FluidPort_a | port_aSerAmb | Fluid connector for ambient water service supply line |
FluidPort_b | port_bSerAmb | Fluid connector for ambient water service return line |
FluidPort_a | port_aSerHea | Fluid connector for heating service supply line |
FluidPort_b | port_bSerHea | Fluid connector for heating service return line |
FluidPort_a | port_aSerCoo | Fluid connector for cooling service supply line |
FluidPort_b | port_bSerCoo | Fluid connector for cooling service return line |
output RealOutput | PHea | Power drawn by heating system [W] |
output RealOutput | PCoo | Power drawn by cooling system [W] |
output RealOutput | PFan | Power drawn by fan motors [W] |
output RealOutput | PPum | Power drawn by pump motors [W] |
output RealOutput | QFue_flow[nFue] | Fuel energy input rate [W] |
Bus | weaBus | Weather data bus |
input BooleanInput | uCoo | Cooling enable signal |
input BooleanInput | uHea | Heating enable signal |
input BooleanInput | uSHW | SHW production enable signal |
input RealInput | THeaWatSupSet | Heating water supply temperature set point [K] |
input RealInput | THotWatSupSet | Domestic hot water temperature set point for supply to fixtures [K] |
input RealInput | TColWat | Cold water temperature [K] |
input RealInput | QReqHotWat_flow | Service hot water load [W] |
input RealInput | TChiWatSupSet | Chilled water supply temperature set point [K] |
output RealOutput | mHea_flow | District water mass flow rate used for heating service [kg/s] |
output RealOutput | mCoo_flow | District water mass flow rate used for cooling service [kg/s] |
Modelica definition
model PartialHeatPumpHeatExchanger
extends Buildings.DHC.ETS.BaseClasses.PartialETS(
final typ=Buildings.DHC.Types.DistrictSystemType.CombinedGeneration5,
final have_weaBus=false,
final have_chiWat=true,
final have_heaWat=true,
have_hotWat=false,
final have_eleHea=true,
final nFue=0,
final have_eleCoo=false,
final have_pum=true,
final have_fan=false,
nPorts_aHeaWat=1,
nPorts_aChiWat=1);
parameter Boolean have_varFloCon = true
;
parameter Boolean have_varFloEva = true
;
parameter Real ratFloMin(
final unit="1",
final min=0,
final max=1)=0.3
;
parameter Modelica.Units.SI.Temperature TDisWatMin
;
parameter Modelica.Units.SI.Temperature TDisWatMax
;
parameter Modelica.Units.SI.TemperatureDifference dT_nominal(min=0) = 5
;
parameter Modelica.Units.SI.Temperature TChiWatSup_nominal=291.15
;
final parameter Modelica.Units.SI.Temperature TChiWatRet_nominal=
TChiWatSup_nominal + dT_nominal ;
parameter Modelica.Units.SI.Temperature THeaWatSup_nominal=313.15
;
final parameter Modelica.Units.SI.Temperature THeaWatRet_nominal=
THeaWatSup_nominal - dT_nominal ;
parameter Modelica.Units.SI.Temperature THotWatSup_nominal=336.15
;
parameter Modelica.Units.SI.Temperature TColWat_nominal=288.15
;
parameter Modelica.Units.SI.Pressure dp_nominal(displayUnit="Pa") = 50000
;
final parameter Modelica.Units.SI.MassFlowRate mHeaWat_flow_nominal(min=0)=
abs(QHeaWat_flow_nominal/cpBui_default/(THeaWatSup_nominal - THeaWatRet_nominal))
;
final parameter Modelica.Units.SI.MassFlowRate mChiWat_flow_nominal(min=0)=
abs(QChiWat_flow_nominal/cpBui_default/(TChiWatSup_nominal - TChiWatRet_nominal))
;
final parameter Modelica.Units.SI.MassFlowRate mEvaHotWat_flow_nominal(min=0)=
QHotWat_flow_nominal*(COPHotWat_nominal - 1)/COPHotWat_nominal/cpSer_default/dT_nominal
;
final parameter Modelica.Units.SI.MassFlowRate mSerWat_flow_nominal(min=0)=
max(proHeaWat.mCon_flow_nominal + mEvaHotWat_flow_nominal, hexChi.m1_flow_nominal)
;
constant Modelica.Units.SI.SpecificHeatCapacity cpBui_default=
MediumBui.specificHeatCapacityCp(
MediumBui.setState_pTX(
p=MediumBui.p_default,
T=MediumBui.T_default)) ;
constant Modelica.Units.SI.SpecificHeatCapacity cpSer_default=
MediumBui.specificHeatCapacityCp(
MediumSer.setState_pTX(
p=MediumSer.p_default,
T=MediumSer.T_default)) ;
parameter Real COPHeaWat_nominal(
final unit="1")
;
parameter Real COPHotWat_nominal(
final unit="1")
;
final parameter Modelica.Units.SI.MassFlowRate m1HexChi_flow_nominal(min=0)=
abs(QChiWat_flow_nominal/cpSer_default/dT_nominal)
;
final parameter Modelica.Units.SI.MassFlowRate m2HexChi_flow_nominal(min=0)=
abs(QChiWat_flow_nominal/cpSer_default/(THeaWatSup_nominal -
THeaWatRet_nominal)) ;
parameter Modelica.Fluid.Types.Dynamics mixingVolumeEnergyDynamics=
Modelica.Fluid.Types.Dynamics.FixedInitial
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput uCoo
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput uHea
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput uSHW
if have_hotWat
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput THeaWatSupSet(
final unit="K",
displayUnit="degC")
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput THotWatSupSet(
final unit="K",
displayUnit="degC")
if have_hotWat
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput TColWat(
final unit="K",
displayUnit="degC")
if have_hotWat
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput QReqHotWat_flow(
final unit="W")
if have_hotWat ;
Buildings.Controls.OBC.CDL.Interfaces.RealInput TChiWatSupSet(
final unit="K",
displayUnit="degC")
;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput mHea_flow(
final unit="kg/s")
;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput mCoo_flow(
final unit="kg/s")
;
Buildings.Fluid.Delays.DelayFirstOrder volMix_a(
redeclare final package Medium =
MediumSer,
final m_flow_nominal=mSerWat_flow_nominal,
tau=600,
final energyDynamics=mixingVolumeEnergyDynamics)
;
Buildings.Fluid.Delays.DelayFirstOrder volMix_b(
redeclare final package Medium =
MediumSer,
final m_flow_nominal=mSerWat_flow_nominal,
tau=600,
final energyDynamics=mixingVolumeEnergyDynamics)
;
Buildings.DHC.ETS.BaseClasses.Pump_m_flow pum1HexChi(
redeclare final package Medium =
MediumSer,
final m_flow_nominal=m1HexChi_flow_nominal,
final allowFlowReversal=allowFlowReversalSer,
dp_nominal=dp_nominal)
;
Buildings.Fluid.HeatExchangers.DryCoilEffectivenessNTU hexChi(
redeclare final package Medium1 =
MediumSer,
redeclare final package Medium2 =
MediumBui,
final m1_flow_nominal=m1HexChi_flow_nominal,
final m2_flow_nominal=m2HexChi_flow_nominal,
final dp1_nominal=dp_nominal/2,
final dp2_nominal=dp_nominal/2,
configuration=Buildings.Fluid.Types.HeatExchangerConfiguration.CounterFlow,
final Q_flow_nominal=QChiWat_flow_nominal,
final T_a1_nominal=TDisWatMax,
final T_a2_nominal=TChiWatRet_nominal,
final allowFlowReversal1=allowFlowReversalSer,
final allowFlowReversal2=allowFlowReversalBui)
;
Buildings.Fluid.Delays.DelayFirstOrder volHeaWatRet(
redeclare final package Medium =
MediumBui,
final m_flow_nominal=proHeaWat.mCon_flow_nominal,
tau=60,
final energyDynamics=mixingVolumeEnergyDynamics,
T_start=THeaWatSup_nominal,
nPorts=3) ;
Buildings.Fluid.Sensors.MassFlowRate senMasFloHeaWat(
redeclare final package Medium =
MediumBui,
final allowFlowReversal=allowFlowReversalBui)
;
Buildings.Fluid.Delays.DelayFirstOrder volChiWat(
redeclare final package Medium =
MediumBui,
final m_flow_nominal=m1HexChi_flow_nominal,
tau=60,
final energyDynamics=mixingVolumeEnergyDynamics,
T_start=TChiWatSup_nominal,
nPorts=3) ;
Buildings.Fluid.Sensors.MassFlowRate senMasFloChiWat(
redeclare final package Medium =
MediumBui,
final allowFlowReversal=allowFlowReversalBui)
;
Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter gai2(
final k=
m1HexChi_flow_nominal);
Buildings.DHC.ETS.Combined.Controls.PIDWithEnable conTChiWat(
k=0.05,
Ti=120,
yMax=1,
controllerType=Buildings.Controls.OBC.CDL.Types.SimpleController.PI,
reverseActing=false,
yMin=0) ;
Buildings.Controls.OBC.CDL.Reals.MultiSum PPumHeaTot(nin=2)
;
Buildings.Fluid.Sources.Boundary_pT bouHeaWat(
redeclare final package Medium =
MediumBui,
nPorts=1)
;
Buildings.Fluid.Sources.Boundary_pT bouChiWat(
redeclare final package Medium =
MediumBui,
nPorts=1)
;
Buildings.Controls.OBC.CDL.Reals.MultiSum PPumCooTot(nin=1)
;
Buildings.Controls.OBC.CDL.Reals.MultiSum PPumTot(nin=2)
;
Buildings.Fluid.Sensors.TemperatureTwoPort senTHeaWatSup(
redeclare final package Medium=
MediumBui,
final allowFlowReversal=allowFlowReversalBui,
final m_flow_nominal=mHeaWat_flow_nominal)
;
Buildings.Fluid.Sensors.TemperatureTwoPort senTChiWatSup(
redeclare final package Medium=
MediumBui,
final allowFlowReversal=allowFlowReversalBui,
final m_flow_nominal=mChiWat_flow_nominal)
;
Buildings.DHC.ETS.Combined.Subsystems.SwitchBox
swiFlo(
redeclare final package Medium =
MediumSer,
final m_flow_nominal=mSerWat_flow_nominal,
dpValve_nominal=1e-4) ;
Buildings.DHC.ETS.BaseClasses.Junction bypHeaWatSup(
redeclare final package Medium =
MediumBui,
final m_flow_nominal=proHeaWat.mCon_flow_nominal
*{1,-1,-1}) ;
Buildings.DHC.ETS.BaseClasses.Junction bypHeaWatRet(
redeclare final package Medium =
MediumBui,
final m_flow_nominal=proHeaWat.mCon_flow_nominal
*{1,-1,1})
;
Buildings.Controls.OBC.CDL.Logical.TrueFalseHold enaHea(
trueHoldDuration=15*60) ;
Buildings.DHC.ETS.Combined.Subsystems.HeatPump proHeaWat(
redeclare final package Medium1 =
MediumBui,
redeclare final package Medium2 =
MediumSer,
dT_nominal=dT_nominal,
final have_varFloCon=have_varFloCon,
final COP_nominal=COPHeaWat_nominal,
final TCon_nominal=THeaWatSup_nominal,
final TEva_nominal=TDisWatMin - dT_nominal,
final Q1_flow_nominal=QHeaWat_flow_nominal,
final allowFlowReversal1=allowFlowReversalBui,
final allowFlowReversal2=allowFlowReversalSer,
final dp1_nominal=dp_nominal,
final dp2_nominal=dp_nominal) ;
Buildings.Controls.OBC.CDL.Reals.MultiSum masFloHeaTot(nin=2)
;
Modelica.Blocks.Sources.Constant zer(
final k=0)
if not have_hotWat
;
Buildings.Fluid.Sensors.TemperatureTwoPort senTHeaWatRet(
redeclare final package Medium =
MediumBui,
final allowFlowReversal=allowFlowReversalBui,
final m_flow_nominal=mHeaWat_flow_nominal)
;
Buildings.Fluid.Sensors.TemperatureTwoPort senTChiWatRet(
redeclare final package Medium =
MediumBui,
final allowFlowReversal=allowFlowReversalBui,
final m_flow_nominal=mChiWat_flow_nominal)
;
Buildings.Fluid.Sensors.MassFlowRate senMasFloHeaWatPri(
redeclare final
package Medium =
MediumBui,
final allowFlowReversal=allowFlowReversalBui)
;
Buildings.Controls.OBC.CDL.Logical.TrueFalseHold enaSHW(
trueHoldDuration=15*60)
if have_hotWat ;
Modelica.Blocks.Sources.Constant zer1(k=0)
if not have_hotWat
;
Buildings.Controls.OBC.CDL.Reals.Add masFloHea
;
Buildings.Controls.OBC.CDL.Reals.MultiSum PHeaTot(nin=2)
;
Buildings.Controls.OBC.CDL.Reals.Subtract dTHHW
;
Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter capFloHHW(
final k=cpBui_default)
if have_varFloEva
or have_varFloCon ;
Buildings.DHC.ETS.Combined.Controls.PrimaryVariableFlow conFloConHHW(
final Q_flow_nominal=QHeaWat_flow_nominal,
final dT_nominal=dT_nominal,
final ratFloMin=ratFloMin,
final cp=cpBui_default)
if have_varFloCon
;
Buildings.Controls.OBC.CDL.Reals.Max priOve
if have_varFloCon
;
Buildings.Controls.OBC.CDL.Reals.Multiply loaHHW
if have_varFloEva
or have_varFloCon ;
equation
connect(TChiWatSupSet, conTChiWat.u_s);
connect(pum1HexChi.P, PPumCooTot.u[1]);
connect(PPumHeaTot.y, PPumTot.u[1]);
connect(PPumCooTot.y, PPumTot.u[2]);
connect(pum1HexChi.port_b, hexChi.port_a1);
connect(pum1HexChi.m_flow_actual, mCoo_flow);
connect(volMix_a.ports[1], swiFlo.port_bSup);
connect(swiFlo.port_aRet, volMix_b.ports[1]);
connect(volMix_b.ports[2], pum1HexChi.port_a);
connect(hexChi.port_b1, volMix_a.ports[2]);
connect(pum1HexChi.m_flow_actual, swiFlo.mRev_flow);
connect(gai2.y, pum1HexChi.m_flow_in);
connect(PPumTot.y, PPum);
connect(ports_aHeaWat[1], senMasFloHeaWat.port_a);
connect(bypHeaWatSup.port_2, senTHeaWatSup.port_a);
connect(senTHeaWatSup.port_b, ports_bHeaWat[1]);
connect(bypHeaWatRet.port_2, volHeaWatRet.ports[1]);
connect(bouHeaWat.ports[1], volHeaWatRet.ports[2]);
connect(ports_aChiWat[1], senMasFloChiWat.port_a);
connect(senTChiWatSup.port_b, ports_bChiWat[1]);
connect(bypHeaWatRet.port_3, bypHeaWatSup.port_3);
connect(volHeaWatRet.ports[3], proHeaWat.port_a1);
connect(proHeaWat.port_b2, volMix_b.ports[3]);
connect(volMix_a.ports[3], proHeaWat.port_a2);
connect(enaHea.y, proHeaWat.uEna);
connect(THeaWatSupSet, proHeaWat.TSupSet);
connect(proHeaWat.PPum, PPumHeaTot.u[1]);
connect(masFloHeaTot.y, mHea_flow);
connect(zer.y, masFloHeaTot.u[2]);
connect(proHeaWat.mEva_flow, masFloHeaTot.u[1]);
connect(zer.y, PPumHeaTot.u[2]);
connect(senMasFloHeaWat.port_b, senTHeaWatRet.port_a);
connect(senTHeaWatRet.port_b, bypHeaWatRet.port_1);
connect(senMasFloChiWat.port_b, senTChiWatRet.port_a);
connect(proHeaWat.port_b1, senMasFloHeaWatPri.port_a);
connect(senMasFloHeaWatPri.port_b, bypHeaWatSup.port_1);
connect(port_aSerAmb, swiFlo.port_aSup);
connect(swiFlo.port_bRet, port_bSerAmb);
connect(uHea, enaHea.u);
connect(conTChiWat.y, gai2.u);
connect(uCoo, conTChiWat.uEna);
connect(uSHW, enaSHW.u);
connect(senTChiWatRet.port_b, volChiWat.ports[1]);
connect(volChiWat.ports[2], hexChi.port_a2);
connect(hexChi.port_b2, senTChiWatSup.port_a);
connect(bouChiWat.ports[1], volChiWat.ports[3]);
connect(senTChiWatSup.T, conTChiWat.u_m);
connect(zer1.y, masFloHea.u2);
connect(proHeaWat.mEva_flow, masFloHea.u1);
connect(masFloHea.y, swiFlo.mPos_flow);
connect(proHeaWat.PHea, PHeaTot.u[1]);
connect(zer.y, PHeaTot.u[2]);
connect(PHeaTot.y, PHea);
connect(senTHeaWatRet.T, dTHHW.u2);
connect(senTHeaWatSup.T, dTHHW.u1);
connect(senMasFloHeaWat.m_flow, capFloHHW.u);
connect(senMasFloHeaWat.m_flow, priOve.u1);
connect(conFloConHHW.m_flow, priOve.u2);
connect(priOve.y, proHeaWat.m1_flow);
connect(capFloHHW.y, loaHHW.u2);
connect(dTHHW.y, loaHHW.u1);
connect(loaHHW.y, conFloConHHW.loa);
end PartialHeatPumpHeatExchanger;
Partial ETS model with district heat exchanger and parallel connection of production systems
Information
This is a base model providing the hydronic configuration for an energy transfer
station as described in the schematics below.
It is typically used to integrate systems providing both heating water and chilled
water, such as heat recovery chillers.
Furthermore, it can be connected to an adjustable number (nSouAmb
)
of systems serving as ambient sources (including the district heat exchanger).
Models that extend this base class must
-
specify the number of systems serving as ambient sources
nSouAmb
,
the number of heating water production systems nSysHea
, and
the number of chilled water production systems nSysCoo
(by default nSysCoo=nSysHea
which corresponds to a
configuration where both productions are ensured by the same system, such
as a heat recovery chiller),
-
modify the parameter binding with the nominal mass flow rate of each connection
to each collector/distributor model, namely the parameter
mCon_flow_nominal
(array) of the components colChiWat
,
colHeaWat
and colAmbWat
.
The connection index 1
for the components colChiWat
and
colHeaWat
is reserved for the connection with the ambient source
circuit. It increases with the distance from the buffer tank.
The connection index 1
for the component colAmbWat
is
reserved for the connection with the district heat exchanger.
Note that the order of the connections has no impact on the flow distribution
as the connections are in parallel.
Note that the model includes a pressure boundary condition which
is shared between the hot water and chilled water circuits, the two circuits
being hydronically connected.
Extends from Buildings.DHC.ETS.BaseClasses.PartialETS (Partial class for modeling an energy transfer station).
Parameters
Type | Name | Default | Description |
replaceable package MediumSer | Water | Service side medium |
replaceable package MediumSerHea_a | Water | Service side medium at heating inlet |
replaceable package MediumBui | Water | Building side medium |
Generic | fue[nFue] | | Fuel type |
ConnectionConfiguration | conCon | Buildings.DHC.ETS.Types.Conn... | District connection configuration |
Integer | nSysHea | | Number of heating systems |
Integer | nSysCoo | nSysHea | Number of cooling systems |
Integer | nSouAmb | 1 | Number of ambient sources |
PartialSupervisory | conSup | redeclare Buildings.DHC.ETS.... | Supervisory controller |
Configuration |
DistrictSystemType | typ | Buildings.DHC.Types.District... | Type of district system |
Boolean | have_heaWat | true | Set to true if the ETS supplies heating water |
Boolean | have_hotWat | false | Set to true if the ETS supplies hot water |
Boolean | have_chiWat | true | Set to true if the ETS supplies chilled water |
Boolean | have_fan | false | Set to true if fan power is computed |
Boolean | have_pum | true | Set to true if pump power is computed |
Boolean | have_eleHea | false | Set to true if the ETS has electric heating system |
Integer | nFue | 0 | Number of fuel types (0 means no combustion system) |
Boolean | have_eleCoo | false | Set to true if the ETS has electric cooling system |
Boolean | have_weaBus | false | Set to true to use a weather bus |
Nominal condition |
HeatFlowRate | QHeaWat_flow_nominal | 0 | Nominal capacity of heating system (>=0) [W] |
HeatFlowRate | QHotWat_flow_nominal | 0 | Nominal capacity of hot water production system (>=0) [W] |
HeatFlowRate | QChiWat_flow_nominal | 0 | Nominal capacity of cooling system (<=0) [W] |
PressureDifference | dpValIso_nominal | 2E3 | Nominal pressure drop of ambient circuit isolation valves [Pa] |
District heat exchanger |
PressureDifference | dp1Hex_nominal | | Nominal pressure drop across heat exchanger on district side [Pa] |
PressureDifference | dp2Hex_nominal | | Nominal pressure drop across heat exchanger on building side [Pa] |
HeatFlowRate | QHex_flow_nominal | | Nominal heat flow rate through heat exchanger (from district to building) [W] |
Temperature | T_a1Hex_nominal | | Nominal water inlet temperature on district side [K] |
Temperature | T_b1Hex_nominal | | Nominal water outlet temperature on district side [K] |
Temperature | T_a2Hex_nominal | | Nominal water inlet temperature on building side [K] |
Temperature | T_b2Hex_nominal | | Nominal water outlet temperature on building side [K] |
Real | spePum1HexMin | 0.1 | Heat exchanger primary pump minimum speed (fractional) [1] |
Real | spePum2HexMin | 0.1 | Heat exchanger secondary pump minimum speed (fractional) [1] |
Buffer Tank |
Volume | VTanHeaWat | | Heating water tank volume [m3] |
Length | hTanHeaWat | (VTanHeaWat*16/Modelica.Cons... | Heating water tank height (assuming twice the diameter) [m] |
Length | dInsTanHeaWat | 0.1 | Heating water tank insulation thickness [m] |
Volume | VTanChiWat | | Chilled water tank volume [m3] |
Length | hTanChiWat | (VTanChiWat*16/Modelica.Cons... | Chilled water tank height (without insulation) [m] |
Length | dInsTanChiWat | 0.1 | Chilled water tank insulation thickness [m] |
Integer | nSegTan | 3 | Number of volume segments for tanks |
Assumptions |
Boolean | allowFlowReversalSer | false | Set to true to allow flow reversal on service side |
Boolean | allowFlowReversalBui | false | Set to true to allow flow reversal on building side |
Connectors
Type | Name | Description |
FluidPorts_a | ports_aHeaWat[nPorts_aHeaWat] | Fluid connectors for heating water return (from building) |
FluidPorts_b | ports_bHeaWat[nPorts_bHeaWat] | Fluid connectors for heating water supply (to building) |
FluidPorts_a | ports_aChiWat[nPorts_aChiWat] | Fluid connectors for chilled water return (from building) |
FluidPorts_b | ports_bChiWat[nPorts_bChiWat] | Fluid connectors for chilled water supply (to building) |
FluidPort_a | port_aSerAmb | Fluid connector for ambient water service supply line |
FluidPort_b | port_bSerAmb | Fluid connector for ambient water service return line |
FluidPort_a | port_aSerHea | Fluid connector for heating service supply line |
FluidPort_b | port_bSerHea | Fluid connector for heating service return line |
FluidPort_a | port_aSerCoo | Fluid connector for cooling service supply line |
FluidPort_b | port_bSerCoo | Fluid connector for cooling service return line |
output RealOutput | PHea | Power drawn by heating system [W] |
output RealOutput | PCoo | Power drawn by cooling system [W] |
output RealOutput | PFan | Power drawn by fan motors [W] |
output RealOutput | PPum | Power drawn by pump motors [W] |
output RealOutput | QFue_flow[nFue] | Fuel energy input rate [W] |
Bus | weaBus | Weather data bus |
input BooleanInput | uHea | Heating enable signal |
input BooleanInput | uCoo | Cooling enable signal |
input RealInput | THeaWatSupSet | Heating water supply temperature set point [K] |
input RealInput | TChiWatSupSet | Chilled water supply temperature set point [K] |
Modelica definition
model PartialParallel
extends Buildings.DHC.ETS.BaseClasses.PartialETS(
final typ=Buildings.DHC.Types.DistrictSystemType.CombinedGeneration5,
final have_heaWat=true,
final have_chiWat=true,
final have_pum=true,
have_hotWat=false,
have_eleHea=false,
have_weaBus=false);
parameter Buildings.DHC.ETS.Types.ConnectionConfiguration conCon=
Buildings.DHC.ETS.Types.ConnectionConfiguration.Pump
;
parameter Integer nSysHea
;
parameter Integer nSysCoo=nSysHea
;
parameter Integer nSouAmb=1
;
parameter Modelica.Units.SI.PressureDifference dpValIso_nominal(displayUnit=
"Pa") = 2E3 ;
parameter Modelica.Units.SI.PressureDifference dp1Hex_nominal(displayUnit=
"Pa") ;
parameter Modelica.Units.SI.PressureDifference dp2Hex_nominal(displayUnit=
"Pa") ;
parameter Modelica.Units.SI.HeatFlowRate QHex_flow_nominal
;
parameter Modelica.Units.SI.Temperature T_a1Hex_nominal
;
parameter Modelica.Units.SI.Temperature T_b1Hex_nominal
;
parameter Modelica.Units.SI.Temperature T_a2Hex_nominal
;
parameter Modelica.Units.SI.Temperature T_b2Hex_nominal
;
parameter Real spePum1HexMin(
final unit="1",
min=0)=0.1
;
parameter Real spePum2HexMin(
final unit="1",
min=0.01)=0.1
;
parameter Modelica.Units.SI.Volume VTanHeaWat ;
parameter Modelica.Units.SI.Length hTanHeaWat=(VTanHeaWat*16/Modelica.Constants.pi)
^(1/3) ;
parameter Modelica.Units.SI.Length dInsTanHeaWat=0.1
;
parameter Modelica.Units.SI.Volume VTanChiWat ;
parameter Modelica.Units.SI.Length hTanChiWat=(VTanChiWat*16/Modelica.Constants.pi)
^(1/3) ;
parameter Modelica.Units.SI.Length dInsTanChiWat=0.1
;
parameter Integer nSegTan=3
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput uHea
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput uCoo
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput THeaWatSupSet(
final unit="K",
displayUnit="degC")
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput TChiWatSupSet(
final unit="K",
displayUnit="degC")
;
replaceable Buildings.DHC.ETS.Combined.Controls.BaseClasses.PartialSupervisory
conSup
constrainedby Buildings.DHC.ETS.Combined.Controls.BaseClasses.PartialSupervisory
(
final nSouAmb=nSouAmb)
;
Buildings.Fluid.Actuators.Valves.TwoWayLinear valIsoEva(
redeclare final package Medium =
MediumBui,
final dpValve_nominal=dpValIso_nominal,
final m_flow_nominal=colAmbWat.mDis_flow_nominal,
use_inputFilter=false) ;
Buildings.Fluid.Actuators.Valves.TwoWayLinear valIsoCon(
redeclare final package Medium =
MediumBui,
final dpValve_nominal=dpValIso_nominal,
final m_flow_nominal=colAmbWat.mDis_flow_nominal,
use_inputFilter=false) ;
Buildings.DHC.ETS.Combined.Subsystems.HeatExchanger hex(
redeclare final package Medium1=
MediumSer,
redeclare final package Medium2=
MediumBui,
final allowFlowReversal1=allowFlowReversalSer,
final allowFlowReversal2=allowFlowReversalBui,
final conCon=conCon,
final dp1Hex_nominal=dp1Hex_nominal,
final dp2Hex_nominal=dp2Hex_nominal,
final Q_flow_nominal=QHex_flow_nominal,
final T_a1_nominal=T_a1Hex_nominal,
final T_b1_nominal=T_b1Hex_nominal,
final T_a2_nominal=T_a2Hex_nominal,
final T_b2_nominal=T_b2Hex_nominal,
final spePum1Min=spePum1HexMin,
final spePum2Min=spePum2HexMin) ;
Buildings.DHC.ETS.BaseClasses.StratifiedTank tanChiWat(
redeclare final package Medium =
MediumBui,
final m_flow_nominal=colChiWat.mDis_flow_nominal,
final VTan=VTanChiWat,
final hTan=hTanChiWat,
final dIns=dInsTanChiWat,
final nSeg=nSegTan) ;
Buildings.DHC.ETS.BaseClasses.StratifiedTank tanHeaWat(
redeclare final package Medium =
MediumBui,
final m_flow_nominal=colHeaWat.mDis_flow_nominal,
final VTan=VTanHeaWat,
final hTan=hTanHeaWat,
final dIns=dInsTanHeaWat,
final nSeg=nSegTan) ;
Buildings.DHC.ETS.BaseClasses.CollectorDistributor colChiWat(
redeclare final package Medium =
MediumBui,
final nCon=1 + nSysCoo,
mCon_flow_nominal={colAmbWat.mDis_flow_nominal})
;
Buildings.DHC.ETS.BaseClasses.CollectorDistributor colHeaWat(
redeclare final package Medium =
MediumBui,
final nCon=1 + nSysHea,
mCon_flow_nominal={colAmbWat.mDis_flow_nominal})
;
Buildings.DHC.ETS.BaseClasses.CollectorDistributor colAmbWat(
redeclare final package Medium =
MediumBui,
final nCon=nSouAmb,
mCon_flow_nominal={hex.m2_flow_nominal})
;
Buildings.Controls.OBC.CDL.Reals.MultiSum totPPum(
nin=1)
;
Buildings.Controls.OBC.CDL.Reals.MultiSum totPHea(
nin=1)
;
Buildings.Controls.OBC.CDL.Reals.MultiSum totPCoo(
nin=1)
;
Buildings.Fluid.Sources.Boundary_pT bou(
redeclare final package Medium =
MediumBui, nPorts=1)
;
protected
parameter Boolean have_val1Hex=
conCon == DHC.ETS.Types.ConnectionConfiguration.TwoWayValve
;
equation
connect(hex.PPum,totPPum.u[1]);
connect(THeaWatSupSet,conSup.THeaWatSupPreSet);
connect(tanHeaWat.TTop,conSup.THeaWatTop);
connect(tanChiWat.TBot,conSup.TChiWatBot);
connect(hex.port_b2,colAmbWat.ports_aCon[1]);
connect(hex.port_a2,colAmbWat.ports_bCon[1]);
connect(totPPum.y,PPum);
connect(hex.yValIso_actual[1],valIsoCon.y_actual);
connect(hex.yValIso_actual[2],valIsoEva.y_actual);
connect(valIsoEva.port_b,colAmbWat.port_bDisSup);
connect(valIsoCon.port_b,colAmbWat.port_aDisSup);
connect(TChiWatSupSet,conSup.TChiWatSupPreSet);
connect(uCoo,conSup.uCoo);
connect(uHea,conSup.uHea);
connect(valIsoEva.port_a,colChiWat.ports_aCon[1]);
connect(colAmbWat.port_aDisRet,colChiWat.ports_bCon[1]);
connect(conSup.yValIsoEva,valIsoEva.y);
connect(conSup.yValIsoCon,valIsoCon.y);
connect(conSup.yAmb[nSouAmb],hex.u);
connect(colChiWat.port_bDisRet,tanChiWat.port_aBot);
connect(colChiWat.port_aDisSup,tanChiWat.port_bTop);
connect(colHeaWat.port_bDisRet,tanHeaWat.port_aTop);
connect(tanHeaWat.port_bBot,colHeaWat.port_aDisSup);
connect(valIsoCon.port_a,colHeaWat.ports_aCon[1]);
connect(colAmbWat.port_bDisRet,colHeaWat.ports_bCon[1]);
connect(totPHea.y,PHea);
connect(totPCoo.y,PCoo);
connect(bou.ports[1], colChiWat.port_aDisSup);
end PartialParallel;