From df7415ebeb3ab0ca09d476dccef9e3143b6fe1d0 Mon Sep 17 00:00:00 2001 From: Michael Wetter Date: Sat, 28 May 2022 16:25:48 -0700 Subject: [PATCH] Issue3027 wet coil sensible heat (#3049) * Added test case from https://github.com/lbl-srg/modelica-buildings/pull/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 --- .../CDL/Continuous/Validation/Derivative.mo | 4 +- .../BaseClasses/HexElementLatent.mo | 69 ++++----- .../WetCoilCounterFlowLowWaterFlowRate.mo | 139 ++++++++++++++++++ .../HeatExchangers/Validation/package.order | 1 + .../HeatExchangers/WetCoilCounterFlow.mo | 16 +- .../HeatExchangers/WetCoilDiscretized.mo | 8 + ..._BaseClasses_Examples_HexElementLatent.txt | 14 +- ...eClasses_Examples_HexElementLatentLoop.txt | 22 +-- ...rs_Examples_WetCoilCounterFlowMassFlow.txt | 10 +- ...rs_Examples_WetCoilCounterFlowPControl.txt | 12 +- ...rs_Examples_WetCoilDiscretizedMassFlow.txt | 8 +- ...rs_Examples_WetCoilDiscretizedPControl.txt | 22 +-- ...ion_WetCoilCounterFlowLowWaterFlowRate.txt | 20 +++ ...ation_WetCoilDiscretizedInitialization.txt | 14 +- ...lDiscretizedInitializationPerfectGases.txt | 14 +- ...ion_WetCoilEffectivenessNTUCounterFlow.txt | 24 +-- .../WetCoilCounterFlowLowWaterFlowRate.mos | 7 + ...ion.WetCoilCounterFlowLowWaterFlowRate.mos | 14 ++ Buildings/package.mo | 12 +- 19 files changed, 313 insertions(+), 117 deletions(-) create mode 100644 Buildings/Fluid/HeatExchangers/Validation/WetCoilCounterFlowLowWaterFlowRate.mo create mode 100644 Buildings/Resources/ReferenceResults/Dymola/Buildings_Fluid_HeatExchangers_Validation_WetCoilCounterFlowLowWaterFlowRate.txt create mode 100644 Buildings/Resources/Scripts/Dymola/Fluid/HeatExchangers/Validation/WetCoilCounterFlowLowWaterFlowRate.mos create mode 100644 Buildings/Resources/Scripts/OpenModelica/compareVars/Buildings.Fluid.HeatExchangers.Validation.WetCoilCounterFlowLowWaterFlowRate.mos diff --git a/Buildings/Controls/OBC/CDL/Continuous/Validation/Derivative.mo b/Buildings/Controls/OBC/CDL/Continuous/Validation/Derivative.mo index 9c523004f63..e070bf7c639 100644 --- a/Buildings/Controls/OBC/CDL/Continuous/Validation/Derivative.mo +++ b/Buildings/Controls/OBC/CDL/Continuous/Validation/Derivative.mo @@ -80,8 +80,8 @@ equation info="

Validation test for the block - -Buildings.Controls.OBC.Continuous.Derivative. + +Buildings.Controls.OBC.CDL.Continuous.Derivative. The model integrates a time varying signal, and the differentiates this integrated signal. Hence, the output der1.y matches the non-integrated signal intWitRes.u, within a small approximation tolerance. diff --git a/Buildings/Fluid/HeatExchangers/BaseClasses/HexElementLatent.mo b/Buildings/Fluid/HeatExchangers/BaseClasses/HexElementLatent.mo index 19bee0ad0d4..e1c5ea80500 100644 --- a/Buildings/Fluid/HeatExchangers/BaseClasses/HexElementLatent.mo +++ b/Buildings/Fluid/HeatExchangers/BaseClasses/HexElementLatent.mo @@ -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="

@@ -86,15 +73,23 @@ Buildings.Fluid.HeatExchangers.BaseClasses.PartialHexElement 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 masExc. 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 heaConVapAir and -heaConVapWat. +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 heaConVapAir. +

+

+Note that the driving potential for latent heat transfer is the temperature of the instance mas. +This is an approximation as it neglects the thermal resistance of the water film that builds up on the coil.

", revisions="