-
Notifications
You must be signed in to change notification settings - Fork 179
Issue3492 direct evaporative cooler #3755
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
2286744
15f7242
82d4872
ab30959
77555e3
e80f545
756a60f
76ece54
f5af7c1
c36f05d
8e12210
d24661e
23ba270
a9346c9
f33ec8a
663f34d
1a538a5
f3764ee
d282647
e91ab53
4e7d5b1
7346572
bf409d6
449ec7d
697971d
35911fb
54e897c
42c8673
5419ec8
6a6fe59
689f601
8c252ba
f898a2b
ddbd8dd
56c0e2b
98b324c
b12878d
f51c0be
8eda1b9
a552549
971cfb8
e72321b
1b40511
3d3f7e0
ca28a08
4921db9
9a3e1c2
808cabf
d6728b4
e0d4237
b4bb7a3
683685b
373c45d
4f4aba3
88f5deb
86f3e0d
b62fe5c
32d717a
a1fd359
925e73d
0a72565
a3fbada
7f31be3
6b01c91
c48211b
6082fe7
17c66d1
6aea34b
ff028c7
0229f85
972e798
cd7b2c2
edb384e
990fcfa
d4a842a
3aa436f
a7a895b
aaebf5e
5d6ad17
4e4162f
54ad1ea
7c47337
6abf772
bee6fa6
82516f2
2fd64d2
f393bf5
4c71fcd
486ba50
3ae477f
0a94a5d
6b66f4a
7628455
4f64da5
bcc9874
40fe195
bfc76c5
d825c26
0689afd
80499db
32ab44b
eff5645
d07f5f6
adf3f68
961572a
90adf03
c6c0e30
6fff469
c438924
dc7bc77
69df39f
4665c41
0463d4a
02c94af
c844356
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,156 @@ | ||
| within Buildings.Fluid.Humidifiers.EvaporativeCoolers.Baseclasses; | ||
| block Direct | ||
| "Calculates the water vapor mass flow rate of a direct evaporative cooler" | ||
|
|
||
| replaceable package Medium = Modelica.Media.Interfaces.PartialMedium | ||
| "Medium"; | ||
|
|
||
| parameter Modelica.Units.SI.Area padAre | ||
| "Area of the rigid media evaporative pad"; | ||
|
|
||
| parameter Modelica.Units.SI.Length dep | ||
| "Depth of the rigid media evaporative pad"; | ||
|
|
||
| Real eff( | ||
| final unit="1") | ||
| "Evaporative humidifier efficiency"; | ||
|
|
||
| Buildings.Controls.OBC.CDL.Interfaces.RealInput V_flow( | ||
| final unit="m3/s", | ||
| final quantity = "VolumeFlowRate") | ||
| "Air volume flow rate" | ||
| annotation (Placement(transformation(origin={-120,-20},extent={{-20,-20},{20,20}}), | ||
| iconTransformation(origin={-120,-20}, extent={{-20,-20},{20,20}}))); | ||
|
|
||
| Buildings.Controls.OBC.CDL.Interfaces.RealInput TDryBulIn( | ||
| final unit="K", | ||
| displayUnit="degC", | ||
| final quantity="ThermodynamicTemperature") | ||
| "Dry bulb temperature of the inlet air" | ||
| annotation (Placement(transformation(origin={-120,60},extent={{-20,-20},{20,20}}), | ||
| iconTransformation(origin={-120,20}, extent={{-20,-20},{20,20}}))); | ||
|
|
||
| Buildings.Controls.OBC.CDL.Interfaces.RealInput TWetBulIn( | ||
| final unit="K", | ||
| displayUnit="degC", | ||
| final quantity="ThermodynamicTemperature") | ||
| "Wet bulb temperature of the inlet air" | ||
| annotation (Placement(transformation(origin={-120,20}, extent={{-20,-20},{20,20}}), | ||
| iconTransformation(origin={-120,60}, extent={{-20,-20},{20,20}}))); | ||
|
|
||
| Buildings.Controls.OBC.CDL.Interfaces.RealInput p( | ||
| final unit="Pa", | ||
| final quantity="Pressure") | ||
| "Inlet air pressure" | ||
| annotation (Placement(transformation(origin={-120,-60},extent={{-20,-20},{20,20}}), | ||
| iconTransformation(origin={-120,-60}, extent={{-20,-20},{20,20}}))); | ||
|
|
||
| Buildings.Controls.OBC.CDL.Interfaces.RealOutput dmWat_flow( | ||
| final unit="kg/s", | ||
| final quantity="MassFlowRate") | ||
| "Water vapor mass flow rate difference between inlet and outlet" | ||
| annotation (Placement(transformation(origin={120,0}, extent={{-20,-20},{20,20}}), | ||
| iconTransformation(origin={120,0}, extent={{-20,-20},{20,20}}))); | ||
|
|
||
| Buildings.Utilities.Psychrometrics.Xw_TDryBulTWetBul XWOut( | ||
| redeclare package Medium = Medium) | ||
| "Water vapor mass fraction at the outlet"; | ||
|
|
||
| Buildings.Utilities.Psychrometrics.Xw_TDryBulTWetBul XWIn( | ||
| redeclare package Medium = Medium) | ||
| "Water vapor mass fraction at the inlet"; | ||
|
|
||
| Modelica.Units.SI.Velocity vel | ||
| "Air velocity"; | ||
|
|
||
| Modelica.Units.SI.ThermodynamicTemperature TDryBulOut( | ||
| displayUnit="degC") | ||
| "Dry bulb temperature of the outlet air"; | ||
|
|
||
| protected | ||
| parameter Medium.ThermodynamicState sta_default=Medium.setState_pTX( | ||
| T=Medium.T_default, | ||
| p=Medium.p_default, | ||
| X=Medium.X_default) | ||
| "Default state of medium"; | ||
|
|
||
| parameter Modelica.Units.SI.Density rho_default=Medium.density(sta_default) | ||
| "Density, used to compute fluid volume"; | ||
|
|
||
| parameter Real effCoe[11] = {0.792714, 0.958569, -0.25193, -1.03215, 0.0262659, | ||
| 0.914869, -1.48241, -0.018992, 1.13137, 0.0327622, | ||
| -0.145384} | ||
| "Coefficients for evaporative medium efficiency calculation"; | ||
|
|
||
| equation | ||
| vel =abs(V_flow)/padAre; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We use regularization for this to make the function |
||
| eff = effCoe[1] + effCoe[2]*(dep) + effCoe[3]*(vel) + effCoe[4]*(dep^2) + | ||
| effCoe[5]*(vel^2) + effCoe[6]*(dep*vel) + effCoe[7]*(vel*dep^2) + | ||
| effCoe[8]*(dep*vel^3) + effCoe[9]*(dep^3*vel) + effCoe[10]*(vel^3*dep^2) + | ||
| effCoe[11]*(dep^3*vel^2); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This implementation is very expensive, computing the 2nd and 3rd power of |
||
| TDryBulOut = TDryBulIn - eff*(TDryBulIn - TWetBulIn); | ||
| TDryBulIn = XWIn.TDryBul; | ||
| TWetBulIn = XWIn.TWetBul; | ||
| p = XWIn.p; | ||
| TWetBulIn = XWOut.TWetBul; | ||
| p = XWOut.p; | ||
| TDryBulOut = XWOut.TDryBul; | ||
| dmWat_flow = (XWOut.X_w - XWIn.X_w)*V_flow*rho_default; | ||
|
|
||
| annotation (Documentation(info="<html> | ||
| <p> | ||
| Block that calculates the water vapor mass flow rate addition in the | ||
| direct evaporative cooler component. The calculations are based on the direct | ||
| evaporative cooler model in the Engineering Reference document from EnergyPlus v23.1.0. | ||
| </p> | ||
| <p> | ||
| The effectiveness of the evaporative media <code>eff</code> is calculated using | ||
| the curve | ||
| </p> | ||
| <p align=\"center\" style=\"font-style:italic;\"> | ||
| eff = effCoe[1] + effCoe[2]*(dep) + effCoe[3]*(vel) + effCoe[4]*(dep<sup>2</sup>) + | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use proper notation:
Also, explain where the user can get these data. |
||
| effCoe[5]*(vel<sup>2</sup>) + effCoe[6]*(dep*vel) + effCoe[7]*(vel*dep<sup>2</sup>) + | ||
| effCoe[8]*(dep*vel<sup>3</sup>) + effCoe[9]*(dep<sup>3</sup>*vel) + effCoe[10]*(vel<sup>3</sup>*dep<sup>2</sup>) + | ||
| effCoe[11]*(dep<sup>3</sup>*vel<sup>2</sup>) | ||
| </p> | ||
| <p> | ||
| where <code>effCoe[:]</code> is the evaporative efficiency coefficients for the | ||
| CelDek rigid media pad used in evaporative coolers. It is currently protected from | ||
| modification by the user, but can be modified for other materials within this class | ||
| by advanced users. <code>dep</code> is the depth of the evaporative media, and | ||
| <code>vel</code> is the velocity of the fluid media which is calculated from the volume flowrate | ||
| <code>V_flow</code> and evaporative media cross-sectional area <code>padAre</code> | ||
|
Comment on lines
+117
to
+122
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What??? You need to finish the implementation and documenation.
|
||
| using | ||
| </p> | ||
| <p align=\"center\" style=\"font-style:italic;\"> | ||
| vel = V_flow/padAre | ||
| </p> | ||
| <p> | ||
| The outlet air drybulb temperature <code>TDryBulOut</code> is calculated using | ||
| the heat-balance equation | ||
| </p> | ||
| <p align=\"center\" style=\"font-style:italic;\"> | ||
| TDryBulOut = TDryBulIn - eff*(TDryBulIn - TWetBulIn) | ||
| </p> | ||
| <p> | ||
| where <code>TDryBulIn</code> is the inlet air drybulb temperature and | ||
| <code>TWetBulIn</code> is the inlet air wetbulb temperature. | ||
| </p> | ||
| <p> | ||
| The humidity ratio difference between the inlet and outlet air is used to | ||
| calculate the added mass of water vapor <code>dmWat_flow</code>, with the humidity | ||
| ratios being determined from psychrometric relationships, while assuming the | ||
| outlet air wetbulb temperature is the same as inlet air wetbulb temperature. | ||
| </p> | ||
| </html>", revisions="<html> | ||
| <ul> | ||
| <li> | ||
| September 14, 2023 by Cerrina Mouchref, Karthikeya Devaprasad, Lingzhe Wang:<br/> | ||
| First implementation. | ||
| </li> | ||
| </ul> | ||
| </html>"), Icon(graphics={ | ||
| Text(extent={{-152,144},{148,104}}, textString="%name", textColor={0,0,255}), | ||
| Rectangle(extent={{-100,100},{100,-100}}, lineColor={0,0,0}, | ||
| fillColor={255,255,255}, fillPattern=FillPattern.Solid)})); | ||
| end Direct; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,117 @@ | ||
| within Buildings.Fluid.Humidifiers.EvaporativeCoolers.Baseclasses; | ||
| block IndirectWet | ||
| "Calculates the heat transfer in an indirect wet evaporative cooler" | ||
|
|
||
| parameter Real maxEff( | ||
| final unit="1") | ||
| "Maximum efficiency of heat exchanger coil"; | ||
|
|
||
| parameter Real floRat( | ||
| final unit="1") | ||
| "Coil flow efficency ratio of actual to maximum heat transfer rate"; | ||
|
|
||
| Buildings.Controls.OBC.CDL.Interfaces.RealInput VPri_flow( | ||
| final unit="m3/s", | ||
| final quantity = "VolumeFlowRate") | ||
| "Primary air volume flow rate" | ||
| annotation (Placement(transformation(origin={-120,-60}, extent={{-20,-20},{20,20}}), | ||
| iconTransformation(origin={-140,-60}, extent={{-20,-20},{20,20}}))); | ||
|
|
||
| Buildings.Controls.OBC.CDL.Interfaces.RealInput VSec_flow( | ||
| final unit="m3/s", | ||
| final quantity = "VolumeFlowRate") | ||
| "Secondary air volume flow rate" | ||
| annotation (Placement(transformation(origin={-120,-100}, extent={{-20,-20},{20,20}}), | ||
| iconTransformation(origin={-140,-100}, extent={{-20,-20},{20,20}}))); | ||
|
|
||
| Buildings.Controls.OBC.CDL.Interfaces.RealInput TDryBulPriIn( | ||
| final unit="K", | ||
| displayUnit="degC", | ||
| final quantity="ThermodynamicTemperature") | ||
| "Dry bulb temperature of the primary inlet air" | ||
| annotation (Placement(transformation(origin={-120,100}, extent={{-20,-20},{20,20}}), | ||
| iconTransformation(origin={-140,100}, extent={{-20,-20},{20,20}}))); | ||
|
|
||
| Buildings.Controls.OBC.CDL.Interfaces.RealInput TDryBulSecIn( | ||
| final unit="K", | ||
| displayUnit="degC", | ||
| final quantity="ThermodynamicTemperature") | ||
| "Dry bulb temperature of the secondary inlet air" | ||
| annotation (Placement(transformation(origin={-120,20}, extent={{-20,-20},{20,20}}), | ||
| iconTransformation(origin={-140,20}, extent={{-20,-20},{20,20}}))); | ||
|
|
||
| Buildings.Controls.OBC.CDL.Interfaces.RealInput TWetBulSecIn( | ||
| final unit="K", | ||
| displayUnit="degC", | ||
| final quantity="ThermodynamicTemperature") | ||
| "Wet bulb temperature of the secondary inlet air" | ||
| annotation (Placement(transformation(origin={-120,-20}, extent={{-20,-20},{20,20}}), | ||
| iconTransformation(origin={-140,-20}, extent={{-20,-20},{20,20}}))); | ||
|
|
||
| Buildings.Controls.OBC.CDL.Interfaces.RealOutput TDryBulPriOut( | ||
| displayUnit="degC", | ||
| final unit="K", | ||
| final quantity="ThermodynamicTemperature") | ||
| "Dry bulb temperature of the outlet air" | ||
| annotation (Placement(transformation(origin={120,0}, extent={{-20,-20},{20,20}}), | ||
| iconTransformation(origin={140,0}, extent={{-20,-20},{20,20}}))); | ||
|
|
||
| Real eff( | ||
| unit="1") | ||
| "Actual efficiency of component"; | ||
|
|
||
| equation | ||
| eff = max((maxEff - floRat*abs(VPri_flow)/abs(VSec_flow)),0); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We use regularization for this to make the function |
||
| TDryBulPriOut = TDryBulPriIn - eff*(TDryBulSecIn - TWetBulSecIn); | ||
|
|
||
| annotation (defaultComponentName="indWetCal", | ||
| Documentation(info="<html> | ||
| <p> | ||
| Block that calculates the water vapor mass flow rate addition in the | ||
| indirect evaporative cooler component. The calculations are based on the indirect | ||
| wet evaporative cooler model in the Engineering Reference document from EnergyPlus | ||
| v23.1.0. | ||
| </p> | ||
| <p> | ||
| The effective efficiency of the heat exchanger <code>eff</code> is calculated using | ||
| the formula | ||
| </p> | ||
| <p align=\"center\" style=\"font-style:italic;\"> | ||
| eff = max((maxEff - floRat*abs(VPri_flow)/abs(VSec_flow)), 0) | ||
| </p> | ||
| <p> | ||
| where <code>VPri_flow</code> and <code>VSec_flow</code> are the volume flow | ||
| rates of the primary and secondary fluid media respectively. The maximum | ||
| efficiency of the heat exchanger <code>maxEff</code> and the efficiency-reduction | ||
| coil flow ratio <code>floRat</code> are empirically determined for the specific | ||
| equipment based on experiments. | ||
| </p> | ||
| <p> | ||
| The outlet primary fluid drybulb temperature <code>TDryBulPriOut</code> is calculated | ||
| using the energy-balance equation | ||
| </p> | ||
| <p align=\"center\" style=\"font-style:italic;\"> | ||
| TDryBulPriOut = TDryBulPriIn - eff*(TDryBulSecIn - TWetBulSecIn) | ||
| </p> | ||
| <p> | ||
| where <code>TDryBulPriIn</code> is the inlet primary fluid drybulb temperature, | ||
| <code>TDryBulSecIn</code> is the inlet secondary fluid drybulb temperature and | ||
| <code>TWetBulSecIn</code> is the inlet secondary fluid wetbulb temperature. | ||
| </p> | ||
| </html>", revisions="<html> | ||
| <ul> | ||
| <li> | ||
| September 29, 2023 by Karthikeya Devaprasad:<br/> | ||
| First implementation. | ||
| </li> | ||
| </ul> | ||
| </html>"), Icon(coordinateSystem(extent={{-120,-120},{120,120}}), | ||
| graphics={Text( | ||
| extent={{-150,160},{150,120}}, | ||
| textString="%name", | ||
| textColor={0,0,255}), Rectangle(extent={{-120,120},{120,-120}}, | ||
| lineColor={0,0,0}, | ||
| fillColor={255,255,255}, | ||
| fillPattern=FillPattern.Solid)}), | ||
| Diagram(coordinateSystem(extent={{-100,-120},{100,120}}))); | ||
| end IndirectWet; | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change to using
m_flowas input. This implementation is very convoluted:First, in the sensor, density must be calculated to convert mass to volume flow rate. Then, here density must be computed to convert it back to mass flow rate. Moreover, the media must be propagated just to access the density function, which in fact uses default temperature and species, differently from the density computed in the volume flow meter.