Skip to content

Commit

Permalink
Maint 8.1.x issue3027 wet coil sensible heat (#3051)
Browse files Browse the repository at this point in the history
* Updated release notes and date

* Added bug fix for #3027, updated releases notes and date
  • Loading branch information
mwetter committed May 28, 2022
1 parent dbad43c commit 891d0c2
Show file tree
Hide file tree
Showing 31 changed files with 406 additions and 471 deletions.
69 changes: 32 additions & 37 deletions Buildings/Fluid/HeatExchangers/BaseClasses/HexElementLatent.mo
Original file line number Diff line number Diff line change
Expand Up @@ -19,60 +19,47 @@ model HexElementLatent "Element of a heat exchanger with humidity condensation o

MassExchange masExc(
redeclare final package Medium=Medium2) "Model for mass exchange"
annotation (Placement(transformation(extent={{50,-40},{70,-20}})));
annotation (Placement(transformation(extent={{-10,-10},{10,10}})));

protected
Modelica.Thermal.HeatTransfer.Sensors.TemperatureSensor temSen(
T(final quantity="ThermodynamicTemperature",
final unit = "K", displayUnit = "degC", min=0))
"Temperature sensor of metal"
annotation (Placement(transformation(extent={{-60,-10},{-40,10}})));
annotation (Placement(transformation(extent={{-60,-2},{-40,18}})));
Buildings.HeatTransfer.Sources.PrescribedHeatFlow heaConVapAir
"Heat conductor for latent heat flow rate, accounting for latent heat removed with vapor"
annotation (Placement(transformation(extent={{0,-30},{-20,-10}})));
annotation (Placement(transformation(extent={{70,-10},{90,10}})));
Modelica.Blocks.Math.Product pro
"Product to compute the latent heat flow rate"
annotation (Placement(transformation(extent={{60,-10},{40,10}})));
annotation (Placement(transformation(extent={{40,-10},{60,10}})));
Modelica.Blocks.Sources.RealExpression h_fg(final y=Buildings.Utilities.Psychrometrics.Constants.h_fg)
"Enthalpy of vaporization"
annotation (Placement(transformation(extent={{90,-4},{70,16}})));
Buildings.HeatTransfer.Sources.PrescribedHeatFlow heaConVapCoi
"Heat conductor for latent heat flow rate, accounting for latent heat deposited with vapor on the coil"
annotation (Placement(transformation(extent={{0,10},{-20,30}})));
Modelica.Blocks.Math.Gain gain(final k=-1)
annotation (Placement(transformation(extent={{30,10},{10,30}})));
annotation (Placement(transformation(extent={{-10,10},{10,30}})));
equation
connect(temSen.T, masExc.TSur) annotation (Line(points={{-40,0},{20,0},{20,
-22},{48,-22}}, color={0,0,127}));
connect(masExc.mWat_flow, vol2.mWat_flow) annotation (Line(points={{71,-30},{
80,-30},{80,-44},{44,-44},{44,-52},{14,-52}},
color={0,0,127}));
connect(vol2.X_w, masExc.XInf) annotation (Line(points={{-10,-64},{-20,-64},{
-20,-44},{30,-44},{30,-30},{48,-30}},
color={0,0,127}));
connect(temSen.T, masExc.TSur) annotation (Line(points={{-39,8},{-12,8}},
color={0,0,127}));
connect(vol2.X_w, masExc.XInf) annotation (Line(points={{-10,-64},{-24,-64},{
-24,0},{-12,0}}, color={0,0,127}));
connect(Gc_2, masExc.Gc) annotation (Line(
points={{40,-100},{40,-38},{48,-38}},
points={{40,-100},{40,-20},{-20,-20},{-20,-8},{-12,-8}},
color={0,0,127},
smooth=Smooth.None));
connect(temSen.port, con1.solid) annotation (Line(
points={{-60,0},{-66,0},{-66,60},{-50,60}},
points={{-60,8},{-66,8},{-66,60},{-50,60}},
color={191,0,0},
smooth=Smooth.None));
connect(heaConVapAir.Q_flow, pro.y) annotation (Line(points={{0,-20},{0,-20},{
36,-20},{36,0},{39,0}}, color={0,0,127}));
connect(masExc.mWat_flow, pro.u2) annotation (Line(points={{71,-30},{80,-30},
{80,-6},{62,-6}},color={0,0,127}));
connect(masExc.mWat_flow, pro.u2) annotation (Line(points={{11,0},{26,0},{26,
-6},{38,-6}}, color={0,0,127}));
connect(pro.u1, h_fg.y)
annotation (Line(points={{62,6},{66,6},{69,6}},
annotation (Line(points={{38,6},{30,6},{30,20},{11,20}},
color={0,0,127}));
connect(heaConVapAir.port, con2.fluid) annotation (Line(points={{-20,-20},{-24,
-20},{-24,-40},{-30,-40}}, color={191,0,0}));
connect(heaConVapCoi.port, con2.solid) annotation (Line(points={{-20,20},{-66,
20},{-66,0},{-66,-40},{-50,-40}}, color={191,0,0}));
connect(gain.y, heaConVapCoi.Q_flow)
annotation (Line(points={{9,20},{6,20},{0,20}}, color={0,0,127}));
connect(pro.y, gain.u) annotation (Line(points={{39,0},{36,0},{36,0},{36,20},{
32,20}}, color={0,0,127}));
connect(heaConVapAir.port, con2.fluid) annotation (Line(points={{90,0},{94,0},
{94,-40},{-30,-40}}, color={191,0,0}));
connect(masExc.mWat_flow, vol2.mWat_flow) annotation (Line(points={{11,0},{26,
0},{26,-52},{14,-52}}, color={0,0,127}));
connect(pro.y, heaConVapAir.Q_flow) annotation (Line(points={{61,0},{70,0}},
color={0,0,127}));
annotation (
Documentation(info="<html>
<p>
Expand All @@ -86,15 +73,23 @@ Buildings.Fluid.HeatExchangers.BaseClasses.PartialHexElement</a>
for a description of the physics of the sensible heat exchange.
For the latent heat exchange, this model removes water vapor from the air stream, as
computed by the instance <code>masExc</code>. This effectively moves water vapor molecules
out of the air, and deposits them on the coil. Hence, the latent heat that is carried
by these water vapor molecules is removed from the air stream, and added to the coil
surface. This is done using the heat flow sources <code>heaConVapAir</code> and
<code>heaConVapWat</code>.
out of the air, and deposits them on the coil from where it drains from the system.
Hence, the latent heat that is carried
by these water vapor molecules is removed from the air stream. This is done using the heat flow source <code>heaConVapAir</code>.
</p>
<p>
Note that the driving potential for latent heat transfer is the temperature of the instance <code>mas</code>.
This is an approximation as it neglects the thermal resistance of the water film that builds up on the coil.
</p>
</html>",
revisions="<html>
<ul>
<li>
May 26, 2022, by Michael Wetter:<br/>
Removed addition of heat to <code>mas.T</code>.<br/>
This is for <a href=\"https://github.com/lbl-srg/modelica-buildings/issues/3027\">#3027</a>.
</li>
<li>
March 11, 2021, by Michael Wetter:<br/>
Changed constant <code>simplify_mWat_flow</code> from protected to public because it is assigned by
<a href=\"modelica://Buildings.Fluid.HeatExchangers.WetCoilCounterFlow\">Buildings.Fluid.HeatExchangers.WetCoilCounterFlow</a>.<br/>
Expand Down
27 changes: 14 additions & 13 deletions Buildings/Fluid/HeatExchangers/WetCoilCounterFlow.mo
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,11 @@ model WetCoilCounterFlow
"Set to true to cause port_a.m_flow + port_b.m_flow = 0 even if mWat_flow is non-zero. Used only if Medium.nX > 1"
annotation(HideResult=true);

Modelica.SIunits.HeatFlowRate QSen2_flow = Q2_flow - QLat2_flow
Modelica.SIunits.HeatFlowRate QSen2_flow=Q2_flow - QLat2_flow
"Sensible heat input into air stream (negative if air is cooled)";

Modelica.SIunits.HeatFlowRate QLat2_flow=
Buildings.Utilities.Psychrometrics.Constants.h_fg * mWat_flow
"Latent heat input into air (negative if air is dehumidified)";
Modelica.SIunits.HeatFlowRate QLat2_flow=Buildings.Utilities.Psychrometrics.Constants.h_fg
*mWat_flow "Latent heat input into air (negative if air is dehumidified)";

Real SHR(
min=0,
Expand All @@ -25,8 +24,8 @@ model WetCoilCounterFlow
noEvent(if (Q2_flow > 1E-6 or Q2_flow < -1E-6) then Q2_flow else 1)
"Sensible to total heat ratio";

Modelica.SIunits.MassFlowRate mWat_flow = sum(ele[i].vol2.mWat_flow for i in 1:nEle)
"Water flow rate";
Modelica.SIunits.MassFlowRate mWat_flow=sum(ele[i].vol2.mWat_flow for i in 1
:nEle) "Water flow rate";

annotation (
defaultComponentName="cooCoi",
Expand Down Expand Up @@ -78,6 +77,14 @@ Buildings.Fluid.HeatExchangers.DryCoilCounterFlow</a> instead of this model.
</html>", revisions="<html>
<ul>
<li>
May 26, 2022, by Michael Wetter:<br/>
Removed addition of heat to <code>mas.T</code> in
<a href=\"Buildings.Fluid.HeatExchangers.BaseClasses.HexElementLatent\">
Buildings.Fluid.HeatExchangers.BaseClasses.HexElementLatent</a>
to correct latent heat exchange calculation.<br/>
This is for <a href=\"https://github.com/lbl-srg/modelica-buildings/issues/3027\">#3027</a>.
</li>
<li>
March 12, 2021, by Michael Wetter:<br/>
Removed <code>final</code> declaration in redeclaration.<br/>
This is for <a href=\"https://github.com/lbl-srg/modelica-buildings/issues/2392\">#2392</a>.
Expand Down Expand Up @@ -184,11 +191,5 @@ First implementation.
preserveAspectRatio=true,
extent={{-100,-100},{100,100}},
grid={2,2},
initialScale=0.5), graphics={Text(
extent={{60,72},{84,58}},
textColor={0,0,255},
textString="water-side"), Text(
extent={{50,-32},{90,-38}},
textColor={0,0,255},
textString="air-side")}));
initialScale=0.5)));
end WetCoilCounterFlow;
19 changes: 13 additions & 6 deletions Buildings/Fluid/HeatExchangers/WetCoilDiscretized.mo
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,11 @@ model WetCoilDiscretized
temSen_1(m_flow_nominal=m1_flow_nominal),
temSen_2(m_flow_nominal=m2_flow_nominal));

Modelica.SIunits.HeatFlowRate QSen2_flow = Q2_flow - QLat2_flow
Modelica.SIunits.HeatFlowRate QSen2_flow=Q2_flow - QLat2_flow
"Sensible heat input into air stream (negative if air is cooled)";

Modelica.SIunits.HeatFlowRate QLat2_flow=
Buildings.Utilities.Psychrometrics.Constants.h_fg * mWat_flow
"Latent heat input into air (negative if air is dehumidified)";
Modelica.SIunits.HeatFlowRate QLat2_flow=Buildings.Utilities.Psychrometrics.Constants.h_fg
*mWat_flow "Latent heat input into air (negative if air is dehumidified)";

Real SHR(
min=0,
Expand All @@ -25,8 +24,8 @@ model WetCoilDiscretized
noEvent(if (Q2_flow > 1E-6 or Q2_flow < -1E-6) then Q2_flow else 1)
"Sensible to total heat ratio";

Modelica.SIunits.MassFlowRate mWat_flow = sum(hexReg[:].ele[:,:].vol2.mWat_flow)
"Water flow rate";
Modelica.SIunits.MassFlowRate mWat_flow=sum(hexReg[:].ele[:, :].vol2.mWat_flow)
"Water flow rate";

annotation (
defaultComponentName="cooCoi",
Expand Down Expand Up @@ -57,6 +56,14 @@ Modelica.Media.Air.MoistAir</a>.
</html>", revisions="<html>
<ul>
<li>
May 26, 2022, by Michael Wetter:<br/>
Removed addition of heat to <code>mas.T</code> in
<a href=\"Buildings.Fluid.HeatExchangers.BaseClasses.HexElementLatent\">
Buildings.Fluid.HeatExchangers.BaseClasses.HexElementLatent</a>
to correct latent heat exchange calculation.<br/>
This is for <a href=\"https://github.com/lbl-srg/modelica-buildings/issues/3027\">#3027</a>.
</li>
<li>
January 12, 2019, by Michael Wetter:<br/>
Corrected wrong use of <code>each</code>.
</li>
Expand Down
Loading

0 comments on commit 891d0c2

Please sign in to comment.