Skip to content

Commit

Permalink
Merge pull request #3525 from lbl-srg/issue3063_dhwLoaDisHea
Browse files Browse the repository at this point in the history
Closes #3063
  • Loading branch information
dhblum authored Jan 6, 2024
2 parents 37287eb + 1ef2c1f commit 259f6a4
Show file tree
Hide file tree
Showing 96 changed files with 5,866 additions and 1,160 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ model PartialDirect
"Bandwidth around reference signal for on/off controller"
annotation (Dialog(tab="Advanced"));

Modelica.Blocks.Interfaces.RealInput TSetDisRet(
Modelica.Blocks.Interfaces.RealInput TDisRetSet(
final unit="K",
displayUnit="degC")
"Setpoint for the district return temperature (min for cooling, max for heating)"
Expand Down Expand Up @@ -197,7 +197,7 @@ equation
connect(senTDisSup.T,dTDis. u2)
annotation (Line(points={{-170,-269},{-172,-269},{-172,-184},{60,-184},{60,-110},
{78,-110}}, color={0,0,127}));
connect(TSetDisRet, con.u_s)
connect(TDisRetSet, con.u_s)
annotation (Line(points={{-318,0},{-272,0},{-272,250},{-222,250}},
color={0,0,127}));
connect(senTBuiRet.T, con.u_m)
Expand All @@ -224,7 +224,7 @@ cooling network is at or above the minimum specified value. This configuration
naturally results in a fluctuating building supply tempearture.
</p>
<p align=\"center\">
<img src=\"modelica://Buildings/Resources/Images/Experimental/DHC/EnergyTransferStations/Cooling/Direct.PNG\" alt=\"DC ETS Direct\"/>
<img src=\"modelica://Buildings/Resources/Images/Experimental/DHC/EnergyTransferStations/Cooling/Direct.png\" alt=\"DC ETS Direct\"/>
</p>
<h4>
Reference
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ model PartialIndirect
parameter Real yMin=0.01
"Lower limit of output"
annotation (Dialog(group="PID controller"));
Modelica.Blocks.Interfaces.RealInput TSetBuiSup
Modelica.Blocks.Interfaces.RealInput TBuiSupSet
"Setpoint temperature for building supply"
annotation (Placement(transformation(extent={{-340,-20},{-300,20}})));
Modelica.Blocks.Interfaces.RealOutput Q_flow(
Expand Down Expand Up @@ -201,7 +201,7 @@ equation
annotation (Line(points={{-26,-193},{-26,-180},{-140,-180},{-140,-240},{-120,
-240},{-120,-232}},
color={0,0,127}));
connect(TSetBuiSup, con.u_s)
connect(TBuiSupSet, con.u_s)
annotation (Line(points={{-320,0},{-240,0},{-240,-220},{-132,-220}},
color={0,0,127}));
connect(con.y, conVal.y)
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -223,9 +223,11 @@ equation
annotation (Line(points={{282,-60},{290,-60},{290,-40},{320,-40}},
color={0,0,127}));
connect(hex.yValIso_actual[1],valIsoCon.y_actual)
annotation (Line(points={{-12,-251},{-40,-251},{-40,-113},{-55,-113}},color={0,0,127}));
annotation (Line(points={{-12,-251.5},{-40,-251.5},{-40,-113},{-55,-113}},
color={0,0,127}));
connect(hex.yValIso_actual[2],valIsoEva.y_actual)
annotation (Line(points={{-12,-253},{-16,-253},{-16,-240},{40,-240},{40,-113},{55,-113}},color={0,0,127}));
annotation (Line(points={{-12,-252.5},{-16,-252.5},{-16,-240},{40,-240},{40,
-113},{55,-113}}, color={0,0,127}));
connect(valIsoEva.port_b,colAmbWat.port_bDisSup)
annotation (Line(points={{50,-120},{30,-120},{30,-106},{20,-106}},color={0,127,255}));
connect(valIsoCon.port_b,colAmbWat.port_aDisSup)
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
PartialHeatPumpHeatExchanger
PartialParallel
Original file line number Diff line number Diff line change
Expand Up @@ -266,9 +266,11 @@ equation
connect(conSup.yAmb[1],borFie.u)
annotation (Line(points={{-238,25},{-200,25},{-200,-212},{-82,-212}},color={0,0,127}));
connect(valIsoCon.y_actual,borFie.yValIso_actual[1])
annotation (Line(points={{-55,-113},{-40,-113},{-40,-198},{-90,-198},{-90,-217},{-82,-217}},color={0,0,127}));
annotation (Line(points={{-55,-113},{-40,-113},{-40,-198},{-90,-198},{-90,
-216.5},{-82,-216.5}}, color={0,0,127}));
connect(valIsoEva.y_actual,borFie.yValIso_actual[2])
annotation (Line(points={{55,-113},{40,-113},{40,-200},{-88,-200},{-88,-215},{-82,-215}},color={0,0,127}));
annotation (Line(points={{55,-113},{40,-113},{40,-200},{-88,-200},{-88,
-215.5},{-82,-215.5}}, color={0,0,127}));
connect(borFie.PPum,totPPum.u[3])
annotation (Line(points={{-58,-216},{250,-216},{250,-62},{258,-62},{258,-60}},color={0,0,127}));
connect(zerPPum.y,totPPum.u[3])
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
within Buildings.Experimental.DHC.EnergyTransferStations.Combined;
model HeatPumpHeatExchangerDHWTank
"Model of a substation with heat pump for heating, heat pump with storage tank for domestic hot water, and compressor-less cooling"
extends
Buildings.Experimental.DHC.EnergyTransferStations.Combined.BaseClasses.PartialHeatPumpHeatExchanger(
volMix_b(nPorts=4),
volMix_a(nPorts=4));
Buildings.Fluid.Sources.Boundary_pT souDCW(
redeclare final package Medium = MediumBui,
use_T_in=true,
nPorts=1) if have_hotWat "Source for domestic cold water"
annotation (Placement(
transformation(
extent={{10,-10},{-10,10}},
rotation=180,
origin={-52,-56})));
Buildings.Experimental.DHC.EnergyTransferStations.Combined.Subsystems.HeatPumpDHWTank proHotWat(
redeclare final package Medium1 = MediumBui,
redeclare final package Medium2 = MediumSer,
final COP_nominal=COPHotWat_nominal,
TCon_nominal=THotWatSup_nominal,
TEva_nominal=TDisWatMin - dT_nominal,
QHotWat_flow_nominal=QHotWat_flow_nominal,
dT_nominal=dT_nominal,
final allowFlowReversal1=allowFlowReversalBui,
final allowFlowReversal2=allowFlowReversalSer,
dp1_nominal=6000,
dp2_nominal=6000,
datWatHea=datWatHea) if have_hotWat
"Subsystem for hot water production"
annotation (Placement(transformation(extent={{30,24},{50,44}})));
parameter Buildings.Experimental.DHC.Loads.HotWater.Data.GenericDomesticHotWaterWithHeatExchanger
datWatHea "Performance data"
annotation (Placement(transformation(extent={{36,48},{48,60}})));
Buildings.Experimental.DHC.Loads.HotWater.ThermostaticMixingValve theMixVal(
redeclare package Medium = MediumBui,
mMix_flow_nominal=QHotWat_flow_nominal/cpBui_default/(THotWatSup_nominal - TColWat_nominal))
if have_hotWat
"Thermostatic mixing valve"
annotation (Placement(transformation(extent={{-20,50},{-40,72}})));
Buildings.Experimental.DHC.EnergyTransferStations.BaseClasses.Junction dcwSpl(
redeclare final package Medium = MediumBui, final m_flow_nominal=
datWatHea.mDom_flow_nominal*{1,-1,-1})
"Splitter for domestic cold water"
annotation (Placement(transformation(
extent={{-10,-10},{10,10}},
rotation=90,
origin={-10,0})));
Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter gai(
k=1/QHotWat_flow_nominal) if have_hotWat
annotation (Placement(transformation(extent={{-80,50},{-60,70}})));
equation

connect(proHotWat.port_b2, volMix_b.ports[4])
annotation (Line(points={{30,28},{28,28},{28,0},{260,0},{260,-360}},
color={0,127,255}));
connect(proHotWat.PHea, PHeaTot.u[2]) annotation (Line(points={{52,37},{66,37},
{66,38},{268,38},{268,80.5}},
color={0,0,127}));
connect(proHotWat.PPum, PPumHeaTot.u[2]) annotation (Line(points={{52,34},{
176,34},{176,420.5},{188,420.5}},
color={0,0,127}));
connect(proHotWat.mEva_flow, masFloHeaTot.u[2]) annotation (Line(points={{52,31},
{68,31},{68,30},{256,30},{256,-139.5},{268,-139.5}},
color={0,0,127}));
connect(proHotWat.mEva_flow, masFloHea.u2) annotation (Line(points={{52,31},{
58,31},{58,-242},{-6,-242},{-6,-252}},
color={0,0,127}));
connect(proHotWat.port_a2, volMix_a.ports[4]) annotation (Line(points={{50,28},
{54,28},{54,20},{-260,20},{-260,-360}}, color={0,127,255}));
connect(souDCW.ports[1], dcwSpl.port_1) annotation (Line(points={{-42,-56},{
-10,-56},{-10,-10}},color={0,127,255}));
connect(dcwSpl.port_3, proHotWat.port_a1)
annotation (Line(points={{0,-6.66134e-16},{10,-6.66134e-16},{10,40},{30,40}},
color={0,127,255}));
connect(dcwSpl.port_2, theMixVal.port_col) annotation (Line(points={{-10,10},
{-10,52.2},{-20,52.2}}, color={0,127,255}));
connect(proHotWat.port_b1, theMixVal.port_hot) annotation (Line(points={{50,40},
{60,40},{60,80},{0,80},{0,56.6},{-20,56.6}},
color={0,127,255}));
connect(souDCW.T_in, TColWat) annotation (Line(points={{-64,-60},{-156,-60},{
-156,-80},{-320,-80}}, color={0,0,127}));
connect(THotWatSupSet, theMixVal.TMixSet) annotation (Line(points={{-320,-40},
{-32,-40},{-32,32},{-6,32},{-6,64},{-14,64},{-14,63.2},{-19,63.2}},
color={0,0,127}));
connect(QReqHotWat_flow, gai.u) annotation (Line(points={{-320,-120},{-288,-120},
{-288,60},{-82,60}},
color={0,0,127}));
connect(gai.y, theMixVal.yMixSet) annotation (Line(points={{-58,60},{-48,60},
{-48,78},{-6,78},{-6,70},{-12,70},{-12,69.8},{-19,69.8}},
color={0,0,127}));
connect(enaSHW.y, proHotWat.uEna) annotation (Line(points={{-118,80},{-108,80},
{-108,43},{28,43}}, color={255,0,255}));
annotation (
Documentation(info="<html>
<p>
This model uses the base energy transfer station defined in
<a href=\"modelica://Buildings.Experimental.DHC.EnergyTransferStations.Combined.BaseClasses.PartialHeatPumpHeatExchanger\">
Buildings.Experimental.DHC.EnergyTransferStations.Combined.BaseClasses.PartialHeatPumpHeatExchanger</a>.
</p>
<h4>Domestic Hot Water</h4>
<p>
Domestic hot water is produced using a dedicated water-to-water heat pump
with storage tank.
</p>
<p>
Heating is enabled based on the input signal <code>uSHW</code>
which is held for <i>15</i> minutes, meaning that,
when enabled, the mode remains active for at least <i>15</i> minutes and,
when disabled, the mode cannot be enabled again for at least <i>15</i> minutes.
The enable signal should be computed externally based
on a schedule (to lock out the system during off-hours), ideally in conjunction
with the number of requests or any other signal representative of the load.
</p>
<p>
When enabled,
</p>
<ul>
<li>
The heat pump and the evaporator and condenser hydronics are controlled
based on the principles described in
<a href=\"modelica://Buildings.Experimental.DHC.EnergyTransferStations.Combined.Subsystems.HeatPumpDHWTank\">
Buildings.Experimental.DHC.EnergyTransferStations.Combined.Subsystems.HeatPumpDHWTank</a>.
</li>
<li>
The mass flow rate of water leaving the domestic hot water heat exchanger is computed based on the domestic hot water
heating load (input <code>QReqHotWat_flow</code>) combined with the operation of a thermostatic
mixing valve used to mix down the temperature of hot water leaving the domestic hot water heat exchanger
to the temperature distributed to fixtures (parameter <code>THotWatSup_nominal</code>)
using domestic cold water at the cold water temperature (input <code>TColWat</code>).
The desired water flow rate leaving the thermostatic mixing valve
is determined according to the following equation:
<p align=\"center\" style=\"font-style:italic;\">
<code>QReqHotWat_flow</code> = m&#775; cp (<code>THotWatSup_nominal</code> - <code>TColWat</code>)
</p>
</li>
</ul>
</html>",
revisions="<html>
<ul>
<li>
September 13, 2023, by David Blum:<br/>
First implementation, extended from partial base class.
This is for
<a href=\"https://github.com/lbl-srg/modelica-buildings/issues/3063\">
issue 3063</a>.
</li>
</ul>
</html>"), Icon(graphics={
Rectangle(
extent={{-70,36},{-68,26}},
lineColor={0,0,255},
pattern=LinePattern.None,
fillColor={175,175,175},
fillPattern=FillPattern.Solid),
Rectangle(
extent={{-1.5,5.5},{1.5,-5.5}},
lineColor={0,0,255},
pattern=LinePattern.None,
fillColor={175,175,175},
fillPattern=FillPattern.Solid,
origin={-13.5,26.5},
rotation=90)}));
end HeatPumpHeatExchangerDHWTank;
Loading

0 comments on commit 259f6a4

Please sign in to comment.