Skip to content

Commit

Permalink
Implements limit for spray humidifier (not exceeds saturation)
Browse files Browse the repository at this point in the history
For # 834
  • Loading branch information
martinkremer committed Jan 27, 2022
1 parent 25bfaa5 commit 9328123
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ equation
partialPressureDrop.dp = dp;

// conditional connectors
connect(max.y,X_intern);
// connect(max.y,X_intern);
connect(m_wat_flow,m_wat_flow_intern);

connect(X_set, max.u1) annotation (Line(points={{0,110},{0,86},{-48,86},{-48,76},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,19 @@ model SprayHumidifier "Idealized model of a spray humidifier"

Modelica.Blocks.Interfaces.RealOutput mWat "mass flow rate water"
annotation (Placement(transformation(extent={{100,-64},{120,-44}})));
Utilities.Psychrometrics.SaturationPressure pSat
annotation (Placement(transformation(extent={{-60,30},{-40,50}})));
Utilities.Psychrometrics.X_pW humRat(use_p_in=false)
annotation (Placement(transformation(extent={{-30,30},{-10,50}})));
protected
Real WLN "water to air ratio";
Modelica.SIunits.Temperature T_intern "internal outlet temperature";
Modelica.Blocks.Sources.RealExpression realExpression(y=T_intern)
annotation (Placement(transformation(extent={{-78,-6},{-58,14}})));
Modelica.Blocks.Math.Min min
annotation (Placement(transformation(extent={{20,46},{40,66}})));
equation
T_intern = T_airOut;

// mass balance
if simplify_m_wat_flow then
Expand Down Expand Up @@ -48,6 +58,21 @@ equation
// humidification degree
eta_B = 1 - exp(-k * WLN);

if use_X_set then
assert(min.y > max.y,
"saturation exceeded with given set value. Humidification is reduced.",
AssertionLevel.warning);
end if;

connect(min.y, X_intern);
connect(pSat.pSat, humRat.p_w)
annotation (Line(points={{-39,40},{-31,40}}, color={0,0,127}));
connect(realExpression.y, pSat.TSat) annotation (Line(points={{-57,4},{-54,4},
{-54,22},{-68,22},{-68,40},{-61,40}}, color={0,0,127}));
connect(max.y, min.u1) annotation (Line(points={{-19,70},{-2,70},{-2,62},{18,62}},
color={0,0,127}));
connect(humRat.X_w, min.u2)
annotation (Line(points={{-9,40},{4,40},{4,50},{18,50}}, color={0,0,127}));
annotation (Icon(coordinateSystem(preserveAspectRatio=false), graphics={
Text(
extent={{-90,84},{-14,66}},
Expand Down Expand Up @@ -95,21 +120,26 @@ equation
lineThickness=0.5)}), Diagram(
coordinateSystem(preserveAspectRatio=false)),
Documentation(info="<html>
<p>This model provides a idealized spray humidifier. The output air humidity is calculated using the input air humidity and the mass flow rate of water:</P>
<p>This model provides a idealized spray humidifier. The output air humidity is calculated either using the input air humidity and the mass flow rate of water:</P>
<p align=\"center\"><i>m<sub>air,in</sub> X<sub>air,in</sub> + m<sub>wat,in</sub> &eta;<sub>B</sub> = m<sub>air,out</sub> X<sub>air,out</sub> </i></p>
<p>or it is calculated using a set point for the humidity at the outlet if the parameter <i>use_X_set</i> is set to true.
<b>Note:</b> If the relative humidity with the givin set-point would exceed saturation the humidification is reduced to reach saturation as maximum.
Additionally a warning will be thrown.</p>
<p>The energy balance is formulated using the enthalpy of the air streams and the enthalpy of the water:</p>
<p align=\"center\"><i>m<sub>air,in</sub> h<sub>air,in</sub> + m<sub>wat,in</sub> h<sub>wat,in</sub> &eta;<sub>B</sub> = m<sub>air,out</sub> h<sub>air,out</sub> </i></p>
<p>The humidifying degree <i>&eta;<sub>B</sub></i> is calculated using the water to air ratio <i>E</i>:</p>
<p align=\"center\"><i>&eta;<sub>B</sub> = 1 - exp(-k E) </i></p>
<p align=\"center\"><i>E = m<sub>wat,in</sub> &frasl; m<sub>air,in</sub> </i></p>
<p>If the boolean variable <i>simplify_m_wat_flow</i> is set to true, the mass flow rate of the water is not considered for the mass balance. Moreover the enthalpy of the water is neglected for the energy balance.</p>
<p>If the boolean variable <i>simplify_m_wat_flow</i> is set to true, the mass flow rate of the water is not considered for the mass balance.
Moreover the enthalpy of the water is neglected for the energy balance.</p>
<p>The equations are based on [1].
<h4>References</h4>
<p>[1]: Baumgarth, Hörner, Reeker (Hrsg.): <i>Handbuch der Klimatechnik</i>, Band 2, 5. Auflage, VDE Verlag GmbH, 2011 (pp.304-306)</p>
</html>", revisions="<html>
<ul>
<li>April, 2019, by Martin Kremer:<br>First Implementation.</li>
<li>April 2020, by Martin Kremer:<br>Extended from PartialHumidifier. </li>
<li>January 2022, by Martin Kremer:<br>Implemented maximum limit for saturation. </li>
</ul>
</html>"));
end SprayHumidifier;
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ equation
// specific enthalpies
assert(T_watIn >= 373.15, "Steam temperature T has to be higher than 100 degC");
h_steam = cp_water * (373.15 - 273.15) + cp_steam * (T_watIn - 373.15) + r100;

connect(max.y,X_intern);

annotation (
preferredView="info",
Documentation(info="<html>
Expand Down

1 comment on commit 9328123

@KremerMartin
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For #834

Please sign in to comment.