From 932812316abeea6a2b7629a94bc83ce32c5e830b Mon Sep 17 00:00:00 2001 From: Martin Kremer Date: Thu, 27 Jan 2022 11:58:06 +0100 Subject: [PATCH] Implements limit for spray humidifier (not exceeds saturation) For # 834 --- .../BaseClasses/PartialHumidifier.mo | 2 +- .../Components/SprayHumidifier.mo | 34 +++++++++++++++++-- .../Components/SteamHumidifier.mo | 3 ++ 3 files changed, 36 insertions(+), 3 deletions(-) diff --git a/AixLib/Airflow/AirHandlingUnit/ModularAirHandlingUnit/Components/BaseClasses/PartialHumidifier.mo b/AixLib/Airflow/AirHandlingUnit/ModularAirHandlingUnit/Components/BaseClasses/PartialHumidifier.mo index 954caf57b6..52a5765576 100644 --- a/AixLib/Airflow/AirHandlingUnit/ModularAirHandlingUnit/Components/BaseClasses/PartialHumidifier.mo +++ b/AixLib/Airflow/AirHandlingUnit/ModularAirHandlingUnit/Components/BaseClasses/PartialHumidifier.mo @@ -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}, diff --git a/AixLib/Airflow/AirHandlingUnit/ModularAirHandlingUnit/Components/SprayHumidifier.mo b/AixLib/Airflow/AirHandlingUnit/ModularAirHandlingUnit/Components/SprayHumidifier.mo index 90e3424e02..c513928cce 100644 --- a/AixLib/Airflow/AirHandlingUnit/ModularAirHandlingUnit/Components/SprayHumidifier.mo +++ b/AixLib/Airflow/AirHandlingUnit/ModularAirHandlingUnit/Components/SprayHumidifier.mo @@ -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 @@ -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}}, @@ -95,14 +120,18 @@ equation lineThickness=0.5)}), Diagram( coordinateSystem(preserveAspectRatio=false)), Documentation(info=" -

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:

+

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:

mair,in Xair,in + mwat,in ηB = mair,out Xair,out

+

or it is calculated using a set point for the humidity at the outlet if the parameter use_X_set is set to true. +Note: 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.

The energy balance is formulated using the enthalpy of the air streams and the enthalpy of the water:

mair,in hair,in + mwat,in hwat,in ηB = mair,out hair,out

The humidifying degree ηB is calculated using the water to air ratio E:

ηB = 1 - exp(-k E)

E = mwat,in ⁄ mair,in

-

If the boolean variable simplify_m_wat_flow 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.

+

If the boolean variable simplify_m_wat_flow 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.

The equations are based on [1].

References

[1]: Baumgarth, Hörner, Reeker (Hrsg.): Handbuch der Klimatechnik, Band 2, 5. Auflage, VDE Verlag GmbH, 2011 (pp.304-306)

@@ -110,6 +139,7 @@ equation ")); end SprayHumidifier; diff --git a/AixLib/Airflow/AirHandlingUnit/ModularAirHandlingUnit/Components/SteamHumidifier.mo b/AixLib/Airflow/AirHandlingUnit/ModularAirHandlingUnit/Components/SteamHumidifier.mo index ce454fd5ab..35dce03fc3 100644 --- a/AixLib/Airflow/AirHandlingUnit/ModularAirHandlingUnit/Components/SteamHumidifier.mo +++ b/AixLib/Airflow/AirHandlingUnit/ModularAirHandlingUnit/Components/SteamHumidifier.mo @@ -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="