@@ -828,28 +828,23 @@ function GetTDryBulbFromEnthalpyAndHumRatio(MoistAirEnthalpy, HumRatio) result(T
828828 ! + Reference:
829829 ! + ASHRAE Handbook - Fundamentals (2017) ch. 1 eqn 30
830830 ! + Notes:
831- ! + Based on the `GetMoistAirEnthalpy` function, rearranged for humidity ratio .
831+ ! + Based on the `GetMoistAirEnthalpy` function, rearranged for temperature .
832832
833833 real , intent (in ) :: MoistAirEnthalpy
834834 ! + Moist air enthalpy in Btu lb⁻¹ [IP] or J kg⁻¹
835835 real , intent (in ) :: HumRatio
836836 ! + Humidity ratio in lb_H₂O lb_Air⁻¹ [IP] or kg_H₂O kg_Air⁻¹ [SI]
837837 real :: TDryBulb
838838 ! + Dry-bulb temperature in °F [IP] or °C [SI]
839- real :: BoundedHumRatio
840- ! + Local function humidity ratio bounded to no less than 1.0E-5 kgH₂O kgAIR⁻¹
841839
842840 if (HumRatio < 0.0 ) then
843841 error stop " Error: humidity ratio is negative"
844842 end if
845843
846- ! Bound humidity ratio to no less than 1.0E-5 kgH₂O kgAIR⁻¹
847- BoundedHumRatio = max (HumRatio, 1.0E-5 )
848-
849844 if (isIP()) then
850- TDryBulb = (MoistAirEnthalpy - 1061.0 * BoundedHumRatio ) / (0.240 + 0.444 * BoundedHumRatio )
845+ TDryBulb = (MoistAirEnthalpy - 1061.0 * HumRatio ) / (0.240 + 0.444 * HumRatio )
851846 else
852- TDryBulb = (MoistAirEnthalpy / 1000.0 - 2501.0 * BoundedHumRatio ) / (1.006 + 1.86 * BoundedHumRatio )
847+ TDryBulb = (MoistAirEnthalpy / 1000.0 - 2501.0 * HumRatio ) / (1.006 + 1.86 * HumRatio )
853848 end if
854849 end function GetTDryBulbFromEnthalpyAndHumRatio
855850
@@ -858,7 +853,7 @@ function GetHumRatioFromEnthalpyAndTDryBulb(MoistAirEnthalpy, TDryBulb) result(H
858853 ! + Reference:
859854 ! + ASHRAE Handbook - Fundamentals (2017) ch. 1 eqn 30
860855 ! + Notes:
861- ! + Based on the `GetMoistAirEnthalpy` function, rearranged for dry-bulb temperature .
856+ ! + Based on the `GetMoistAirEnthalpy` function, rearranged for humidity ratio .
862857
863858 real , intent (in ) :: MoistAirEnthalpy
864859 ! + Moist air enthalpy in Btu lb⁻¹ [IP] or J kg⁻¹
0 commit comments