Skip to content

Commit

Permalink
added reference [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
JayHuLBL committed Apr 9, 2024
1 parent df47287 commit 5759a99
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 41 deletions.
54 changes: 31 additions & 23 deletions Buildings/Fluid/Humidifiers/DXDehumidifier.mo
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ model DXDehumidifier "DX dehumidifier"
redeclare package Medium = Medium,
final m_flow_nominal=mAir_flow_nominal)
"Inlet air temperature sensor"
annotation (Placement(transformation(extent={{-82,-10},{-62,10}})));
annotation (Placement(transformation(extent={{-90,-10},{-70,10}})));

Buildings.Fluid.Humidifiers.Humidifier_u deHum(
redeclare package Medium = Medium,
Expand Down Expand Up @@ -113,7 +113,7 @@ model DXDehumidifier "DX dehumidifier"
"Calculate dehumidification power consumption"
annotation (Placement(transformation(extent={{40,-90},{60,-70}})));

BaseClasses.PerformanceCurveModifier perCurMod(per=per)
Buildings.Fluid.Humidifiers.BaseClasses.PerformanceCurveModifier perCurMod(per=per)
"Block for calculating modifier curves"
annotation (Placement(transformation(extent={{-50,-110},{-30,-90}})));
protected
Expand All @@ -134,9 +134,9 @@ equation
connect(heaFloSen.port_b, senTem.port)
annotation (Line(points={{40,60},{60,60}}, color={191,0,0}));
connect(port_a, senTIn.port_a)
annotation (Line(points={{-100,0},{-82,0}}, color={0,127,255}));
annotation (Line(points={{-100,0},{-90,0}}, color={0,127,255}));
connect(deHum.port_b, port_b)
annotation (Line(points={{60,0},{100,0}}, color={0,127,255}));
annotation (Line(points={{80,0},{100,0}}, color={0,127,255}));
connect(senRelHum.port_b, deHum.port_a)
annotation (Line(points={{20,0},{60,0}},color={0,127,255}));
connect(QHea.y, preHeaFlo.Q_flow) annotation (Line(points={{-29,40},{-20,40},
Expand All @@ -151,24 +151,25 @@ equation
-20,60},{-10,60}}, color={0,0,127}));
connect(u.y, watRemRat.u) annotation (Line(points={{-18,-40},{-10,-40},{-10,
-60},{-2,-60}}, color={0,0,127}));
connect(watRemRat.y, PDeh.u1) annotation (Line(points={{22,-60},{30,-60},{30,
-64},{38,-64}}, color={0,0,127}));
connect(eneFac.y, PDeh.u2) annotation (Line(points={{22,-90},{30,-90},{30,-76},
{38,-76}}, color={0,0,127}));
connect(PDeh.y, QHea.u) annotation (Line(points={{62,-70},{80,-70},{80,-20},{
-56,-20},{-56,30},{-52,30}}, color={0,0,127}));
connect(PDeh.y, P) annotation (Line(points={{62,-70},{80,-70},{80,-30},{120,-30}},
connect(watRemRat.y, PDeh.u1) annotation (Line(points={{22,-60},{30,-60},{30,-74},
{38,-74}}, color={0,0,127}));
connect(eneFac.y, PDeh.u2) annotation (Line(points={{22,-100},{30,-100},{30,-86},
{38,-86}}, color={0,0,127}));
connect(PDeh.y, QHea.u) annotation (Line(points={{62,-80},{80,-80},{80,-20},{-56,
-20},{-56,40},{-52,40}}, color={0,0,127}));
connect(PDeh.y, P) annotation (Line(points={{62,-80},{80,-80},{80,-40},{120,-40}},
color={0,0,127}));
connect(senTIn.T, perCurMod.T) annotation (Line(points={{-72,11},{-66,11},{-66,
-80},{-52,-80}}, color={0,0,127}));
connect(senRelHum.phi, perCurMod.phi) annotation (Line(points={{0.1,11},{0.1,16},
{-60,16},{-60,-88},{-52,-88}}, color={0,0,127}));
connect(perCurMod.watRemMod, u.u1) annotation (Line(points={{-29,-80},{-24,-80},
{-24,-60},{-52,-60},{-52,-34},{-48,-34}}, color={0,0,127}));
connect(perCurMod.eneFacMod, eneFac.u) annotation (Line(points={{-29,-88},{-14,
-88},{-14,-90},{-2,-90}}, color={0,0,127}));
connect(senRelHum.phi, perCurMod.phi) annotation (Line(points={{10.1,11},{10.1,
20},{-60,20},{-60,-104},{-52,-104}}, color={0,0,127}));
connect(perCurMod.watRemMod, u.u1) annotation (Line(points={{-29,-96},{-20,-96},
{-20,-60},{-52,-60},{-52,-34},{-42,-34}}, color={0,0,127}));
connect(perCurMod.eneFacMod, eneFac.u) annotation (Line(points={{-29,-104},{-20,
-104},{-20,-100},{-2,-100}}, color={0,0,127}));
connect(senTIn.port_b, senRelHum.port_a)
annotation (Line(points={{-62,0},{-10,0}}, color={0,127,255}));
annotation (Line(points={{-70,0},{0,0}}, color={0,127,255}));
connect(senTIn.T, perCurMod.T) annotation (Line(points={{-80,11},{-80,20},{-64,
20},{-64,-96},{-52,-96}}, color={0,0,127}));

annotation (Icon(coordinateSystem(extent={{-100,-100},{100,100}}), graphics={
Rectangle(
extent={{-70,60},{70,-60}},
Expand Down Expand Up @@ -226,7 +227,7 @@ annotation (Icon(coordinateSystem(extent={{-100,-100},{100,100}}), graphics={
defaultComponentName="dxDeh",
Documentation(info="<html>
<p>
This is a zone air DX dehumidifier model based on the first principles and other
This is a zone air DX dehumidifier model based on the first principles and the
calculations as defined in the EnergyPlus model <code>ZoneHVAC:Dehumidifier:DX</code>.
While the EnergyPlus implementation adds the heat rejected by the condensor coil to the
zone air heat balance, this model assumes that this rejected heat is added to the
Expand All @@ -241,7 +242,7 @@ air conditions.
The amount of exchanged moisture <code>mWat_flow</code>
is equal to
</p>
<p align=\"center\"><i>ṁ<sub>wat_flow</sub> = watRemMod * &rho; *
<p align=\"center\"><i>ṁ<sub>wat_flow</sub> = watRemMod * &rho; *
V̇<sub>flow_nominal</sub></i>
</p>
<p>
Expand All @@ -250,7 +251,7 @@ The amount of heat added to the air stream <code>QHea</code> is equal to
<p align=\"center\"><i>Q̇<sub>hea</sub> = ṁ<sub>wat_flow</sub> * h<sub>fg</sub> + P<sub>deh</sub></i>
</p>
<p>
Please note that the enthalpy of the exchanged moisture has been considered
Please note that the enthalpy of the exchanged moisture has been considered
and therefore the added heat flow to the connector equals to P<sub>deh</sub>.
</p>
<p align=\"center\"><i>P<sub>deh</sub> = V̇<sub>flow_nominal</sub> * watRemMod /
Expand Down Expand Up @@ -281,6 +282,13 @@ and relative humidity of the air entering the dehumidifier.
b<sub>4</sub> phi<sub>in</sub> + b<sub>5</sub> phi<sub>in</sub> <sup>2</sup> +
b<sub>6</sub> T<sub>in</sub> phi<sub>in</sub></i>
</p>
<h4>References</h4>
<p>
U.S. Department of Energy,
<i>
EnergyPlus Version 22.1.0 Documentation: Engineering Reference.
</i>
</p>
</html>",
revisions="<html>
<ul>
Expand Down
36 changes: 18 additions & 18 deletions Buildings/Fluid/Humidifiers/Validation/DXDehumidifier.mo
Original file line number Diff line number Diff line change
Expand Up @@ -68,22 +68,22 @@ model DXDehumidifier "Validation model for DX dehumidifier"
Modelica.Blocks.Sources.RealExpression watRemRatMod(
final y=-dxDeh.deHum.mWat_flow)
"Water removal mass flow rate (Modelica)"
annotation (Placement(transformation(extent={{20,26},{40,46}})));
annotation (Placement(transformation(extent={{20,30},{40,50}})));

Modelica.Blocks.Math.Mean mWatMod(
final f=1/tStepAve)
"Average out Modelica results over time"
annotation (Placement(transformation(extent={{54,26},{74,46}})));
annotation (Placement(transformation(extent={{60,30},{80,50}})));

Modelica.Blocks.Math.Mean mWat_engPlu(
final f=1/tStepAve)
"Average out EnergyPlus results over time"
annotation (Placement(transformation(extent={{134,26},{154,46}})));
annotation (Placement(transformation(extent={{140,30},{160,50}})));

Modelica.Blocks.Sources.RealExpression watRemRat_engPlu(
final y=datRea.y[4])
"Water removal mass flow rate (EnergyPlus)"
annotation (Placement(transformation(extent={{98,26},{118,46}})));
annotation (Placement(transformation(extent={{100,30},{120,50}})));

Modelica.Blocks.Sources.RealExpression airHeaRatMod(
final y=dxDeh.P)
Expand All @@ -93,38 +93,38 @@ model DXDehumidifier "Validation model for DX dehumidifier"
Modelica.Blocks.Math.Mean PMod(
final f=1/tStepAve)
"Average out Modelica results over time"
annotation (Placement(transformation(extent={{54,-10},{74,10}})));
annotation (Placement(transformation(extent={{60,-10},{80,10}})));

Modelica.Blocks.Math.Mean P_engPlu(
final f=1/tStepAve)
"Average out EnergyPlus results over time"
annotation (Placement(transformation(extent={{134,-10},{154,10}})));
annotation (Placement(transformation(extent={{140,-10},{160,10}})));

Modelica.Blocks.Sources.RealExpression dehPowRat_engPlu(
final y=datRea.y[5])
"DX dehumidifier power rate (EnergyPlus)"
annotation (Placement(transformation(extent={{98,-10},{118,10}})));
annotation (Placement(transformation(extent={{100,-10},{120,10}})));

Modelica.Blocks.Sources.RealExpression dehHeaRatMod(
final y=dxDeh.heaFloSen.Q_flow -
dxDeh.deHum.mWat_flow*Buildings.Utilities.Psychrometrics.Constants.h_fg)
"DX dehumidifier heating rate (Modelica)"
annotation (Placement(transformation(extent={{20,-40},{40,-20}})));
annotation (Placement(transformation(extent={{20,-50},{40,-30}})));

Modelica.Blocks.Math.Mean QHeaMod(
final f=1/tStepAve)
"Average out Modelica results over time"
annotation (Placement(transformation(extent={{54,-40},{74,-20}})));
annotation (Placement(transformation(extent={{60,-50},{80,-30}})));

Modelica.Blocks.Math.Mean QHea_engPlu(
final f=1/tStepAve)
"Average out EnergyPlus results over time"
annotation (Placement(transformation(extent={{134,-40},{154,-20}})));
annotation (Placement(transformation(extent={{140,-50},{160,-30}})));

Modelica.Blocks.Sources.RealExpression dehHeaRat_engPlu(
final y=datRea.y[3])
"DX dehumidifier heating rate (EnergyPlus)"
annotation (Placement(transformation(extent={{98,-40},{118,-20}})));
annotation (Placement(transformation(extent={{100,-50},{120,-30}})));

Modelica.Blocks.Sources.CombiTimeTable datRea(
final tableOnFile=true,
Expand All @@ -139,17 +139,17 @@ model DXDehumidifier "Validation model for DX dehumidifier"

equation
connect(watRemRatMod.y, mWatMod.u)
annotation (Line(points={{41,36},{52,36}}, color={0,0,127}));
annotation (Line(points={{41,40},{58,40}}, color={0,0,127}));
connect(watRemRat_engPlu.y, mWat_engPlu.u)
annotation (Line(points={{119,36},{132,36}}, color={0,0,127}));
annotation (Line(points={{121,40},{138,40}}, color={0,0,127}));
connect(airHeaRatMod.y, PMod.u)
annotation (Line(points={{41,0},{52,0}}, color={0,0,127}));
annotation (Line(points={{41,0},{58,0}}, color={0,0,127}));
connect(dehPowRat_engPlu.y, P_engPlu.u)
annotation (Line(points={{119,0},{132,0}}, color={0,0,127}));
annotation (Line(points={{121,0},{138,0}}, color={0,0,127}));
connect(dehHeaRatMod.y, QHeaMod.u)
annotation (Line(points={{41,-30},{52,-30}}, color={0,0,127}));
annotation (Line(points={{41,-40},{58,-40}}, color={0,0,127}));
connect(dehHeaRat_engPlu.y, QHea_engPlu.u)
annotation (Line(points={{119,-30},{132,-30}}, color={0,0,127}));
annotation (Line(points={{121,-40},{138,-40}}, color={0,0,127}));
connect(plrToPul.yEna, dxDeh.uEna) annotation (Line(points={{-98,70},{-54,70},
{-54,-14},{-51,-14}}, color={255,0,255}));
connect(toTotAirIn.XiTotalAir, boundary.Xi_in[1]) annotation (Line(points={{-99,-50},
Expand Down Expand Up @@ -189,7 +189,7 @@ The module <code>plrToPul</code> translates the runtime fraction from EnergyPlus
to an on-off signal for the DX dehumidifier.
</p>
<p>
The generated plots show that <code>dxDeh</code> removes an amount of water
The generated plots show that DX dehumidifier removes an amount of water
that is similar to the reference EnergyPlus results, while consuming a similar amount
of power and adding similar amount of heat to the outlet air stream. The
comparison of the outlet air conditions such as the dry bulb temperature and humidity
Expand Down

0 comments on commit 5759a99

Please sign in to comment.