Skip to content

Commit

Permalink
Issue3027 wet coil sensible heat (#3049)
Browse files Browse the repository at this point in the history
* Added test case from #3043

Files were added manually to exclude the large file Buildings/Resources/Data/Fluid/HeatExchangers/Examples/WetCoilCounterFlowPescribedBoundary.dat

* Simplified example

* Avoided division by zero if nEle=1

* Updated reference results for #3027
  • Loading branch information
mwetter authored May 28, 2022
1 parent dff251c commit df7415e
Show file tree
Hide file tree
Showing 19 changed files with 313 additions and 117 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ equation
info="<html>
<p>
Validation test for the block
<a href=\"modelica://Buildings.Controls.OBC.Continuous.Derivative\">
Buildings.Controls.OBC.Continuous.Derivative</a>.
<a href=\"modelica://Buildings.Controls.OBC.CDL.Continuous.Derivative\">
Buildings.Controls.OBC.CDL.Continuous.Derivative</a>.
The model integrates a time varying signal, and the differentiates this integrated signal.
Hence, the output <code>der1.y</code> matches the non-integrated signal <code>intWitRes.u</code>,
within a small approximation tolerance.
Expand Down
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
within Buildings.Fluid.HeatExchangers.Validation;
model WetCoilCounterFlowLowWaterFlowRate
"Model that tests a heat exchanger with prescribed boundary conditions, in terms of properties of inlet water and inlet air"
extends Modelica.Icons.Example;
package Medium1 = Buildings.Media.Water
"Medium model for water";
package Medium2 = Buildings.Media.Air
"Medium model for air";

parameter Modelica.Units.SI.MassFlowRate mWat_flow_nominal=0.44732114
"Nominal mass flow rate";
parameter Modelica.Units.SI.MassFlowRate mAir_flow_nominal=0.65844
"Nominal mass flow rate";

Buildings.Fluid.HeatExchangers.WetCoilCounterFlow
hex(
redeclare package Medium1 = Medium1,
redeclare package Medium2 = Medium2,
m1_flow_nominal=mWat_flow_nominal,
m2_flow_nominal=mAir_flow_nominal,
dp2_nominal(displayUnit="Pa") = 200,
dp1_nominal(displayUnit="Pa") = 3000,
UA_nominal=mWat_flow_nominal*4200*10/30,
show_T=true,
nEle=1,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial)
"Cooling coil"
annotation(Placement(transformation(extent={{10,-12},{30,8}})));
Buildings.Fluid.Sources.MassFlowSource_T sou_w(
redeclare package Medium = Medium1,
use_Xi_in=false,
m_flow=1E-4*mWat_flow_nominal,
use_T_in=false,
T=282.15,
nPorts=1,
use_m_flow_in=true)
"Source for water"
annotation (Placement(transformation(extent={{-58,10},{-38,30}})));
Buildings.Fluid.Sources.Boundary_pT sin_w(
redeclare package Medium = Medium1,
use_p_in=false,
T=293.15,
nPorts=1)
"sink for water"
annotation (Placement(transformation(extent={{90,10},{70,30}})));
Buildings.Fluid.Sources.MassFlowSource_T sou_a(
use_Xi_in=false,
X={0.01,0.99},
m_flow=0.3*mAir_flow_nominal,
use_T_in=false,
T=285.15,
nPorts=1,
redeclare package Medium = Medium2,
use_m_flow_in=false)
"Source for air"
annotation (Placement(transformation(extent={{90,-50},{70,-30}})));
Buildings.Fluid.Sources.Boundary_pT sin_a(
redeclare package Medium = Medium2,
use_p_in=false,
T=293.15,
nPorts=1)
"sink for air"
annotation (Placement(transformation(extent={{-60,-50},{-40,-30}})));
Controls.OBC.CDL.Continuous.Sources.Ramp ram(
height=-mWat_flow_nominal,
duration=1800,
offset=mWat_flow_nominal,
startTime=900)
annotation (Placement(transformation(extent={{-92,18},{-72,38}})));
Sensors.TemperatureTwoPort senTemWatIn(
redeclare package Medium = Medium1,
allowFlowReversal=false,
m_flow_nominal=mWat_flow_nominal,
tau=0) "Temperature sensor"
annotation (Placement(transformation(extent={{-30,10},{-10,30}})));
Sensors.TemperatureTwoPort senTemWatOut(
redeclare package Medium = Medium1,
allowFlowReversal=false,
m_flow_nominal=mWat_flow_nominal,
tau=0) "Temperature sensor"
annotation (Placement(transformation(extent={{40,10},{60,30}})));
Sensors.TemperatureTwoPort senTemAirIn(
redeclare package Medium = Medium2,
allowFlowReversal=false,
m_flow_nominal=mAir_flow_nominal,
tau=0) "Temperature sensor"
annotation (Placement(transformation(extent={{60,-50},{40,-30}})));

Sensors.TemperatureTwoPort senTemAirOut(
redeclare package Medium = Medium2,
allowFlowReversal=false,
m_flow_nominal=mAir_flow_nominal,
tau=0) "Temperature sensor"
annotation (Placement(transformation(extent={{-10,-50},{-30,-30}})));
equation
connect(sou_w.m_flow_in, ram.y)
annotation (Line(points={{-60,28},{-70,28}}, color={0,0,127}));
connect(sou_w.ports[1], senTemWatIn.port_a)
annotation (Line(points={{-38,20},{-30,20}}, color={0,127,255}));
connect(senTemWatIn.port_b, hex.port_a1)
annotation (Line(points={{-10,20},{0,20},{0,4},{10,4}},
color={0,127,255}));
connect(sin_w.ports[1], senTemWatOut.port_b)
annotation (Line(points={{70,20},{60,20}}, color={0,127,255}));
connect(senTemWatOut.port_a, hex.port_b1) annotation (Line(points={{40,20},{34,
20},{34,4},{30,4}}, color={0,127,255}));
connect(sou_a.ports[1], senTemAirIn.port_a)
annotation (Line(points={{70,-40},{60,-40}}, color={0,127,255}));
connect(senTemAirIn.port_b, hex.port_a2) annotation (Line(points={{40,-40},{34,
-40},{34,-8},{30,-8}}, color={0,127,255}));
connect(sin_a.ports[1], senTemAirOut.port_b)
annotation (Line(points={{-40,-40},{-30,-40}}, color={0,127,255}));
connect(senTemAirOut.port_a, hex.port_b2) annotation (Line(points={{-10,-40},{
0,-40},{0,-8},{10,-8}}, color={0,127,255}));
annotation (
Icon(coordinateSystem(preserveAspectRatio=false)),
Diagram(coordinateSystem(preserveAspectRatio=false)),
experiment(
StopTime=3600,
Tolerance=1e-06),
__Dymola_Commands(file="modelica://Buildings/Resources/Scripts/Dymola/Fluid/HeatExchangers/Validation/WetCoilCounterFlowLowWaterFlowRate.mos"
"Simulate and plot"),
Documentation(info="<html>
<p>
This is a validation case in which the air flow rate is about a third of the design flow rate,
and the water mass flow rate is ramped to zero.
The validation verifies that the outlet temperatures approach the inlet temperature of the air.
</p>
</html>", revisions="<html>
<ul>
<li>
May 26, 2022, by Michael Wetter:<br/>
First implementation.<br/>
This is for
<a href=\"https://github.com/lbl-srg/modelica-buildings/issues/3027\">issue 3027</a>.
</li>
</ul>
</html>"));
end WetCoilCounterFlowLowWaterFlowRate;
1 change: 1 addition & 0 deletions Buildings/Fluid/HeatExchangers/Validation/package.order
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ EvaporatorCondenser
HeaterCooler_u
PrescribedOutlet
PrescribedOutlet_dynamic
WetCoilCounterFlowLowWaterFlowRate
WetCoilDiscretizedInitialization
WetCoilDiscretizedInitializationPerfectGases
WetCoilEffectivenessNTU
Expand Down
16 changes: 9 additions & 7 deletions Buildings/Fluid/HeatExchangers/WetCoilCounterFlow.mo
Original file line number Diff line number Diff line change
Expand Up @@ -77,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 @@ -183,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;
8 changes: 8 additions & 0 deletions Buildings/Fluid/HeatExchangers/WetCoilDiscretized.mo
Original file line number Diff line number Diff line change
Expand Up @@ -56,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 df7415e

Please sign in to comment.