GetTDryBulbFromEnthalpyAndHumRatio Function

public function GetTDryBulbFromEnthalpyAndHumRatio(MoistAirEnthalpy, HumRatio) result(TDryBulb)

Return dry bulb temperature from enthalpy and humidity ratio. Reference: ASHRAE Handbook - Fundamentals (2017) ch. 1 eqn 30 Notes: Based on the GetMoistAirEnthalpy function, rearranged for temperature.

Arguments

Type IntentOptional AttributesName
real, intent(in) :: MoistAirEnthalpy

Moist air enthalpy in Btu lb⁻¹ [IP] or J kg⁻¹

real, intent(in) :: HumRatio

Humidity ratio in lb_H₂O lb_Air⁻¹ [IP] or kg_H₂O kg_Air⁻¹ [SI]

Return Value real

Dry-bulb temperature in °F [IP] or °C [SI]


Calls

proc~~gettdrybulbfromenthalpyandhumratio~~CallsGraph proc~gettdrybulbfromenthalpyandhumratio GetTDryBulbFromEnthalpyAndHumRatio proc~isip isIP proc~gettdrybulbfromenthalpyandhumratio->proc~isip

Called by

proc~~gettdrybulbfromenthalpyandhumratio~~CalledByGraph proc~gettdrybulbfromenthalpyandhumratio GetTDryBulbFromEnthalpyAndHumRatio proc~calcminimaldxcooling CalcMinimalDXCooling proc~calcminimaldxcooling->proc~gettdrybulbfromenthalpyandhumratio proc~calcminimaldxheating CalcMinimalDXHeating proc~calcminimaldxheating->proc~gettdrybulbfromenthalpyandhumratio proc~simminimaldxheating SimMinimalDXHeating proc~simminimaldxheating->proc~calcminimaldxheating proc~simminimaldxcooling SimMinimalDXCooling proc~simminimaldxcooling->proc~calcminimaldxcooling

Contents


Source Code

  function GetTDryBulbFromEnthalpyAndHumRatio(MoistAirEnthalpy, HumRatio) result(TDryBulb)
    !+ Return dry bulb temperature from enthalpy and humidity ratio.
    !+ Reference:
    !+ ASHRAE Handbook - Fundamentals (2017) ch. 1 eqn 30
    !+ Notes:
    !+ Based on the `GetMoistAirEnthalpy` function, rearranged for temperature.

    real, intent(in)  ::  MoistAirEnthalpy
      !+ Moist air enthalpy in Btu lb⁻¹ [IP] or J kg⁻¹
    real, intent(in)  ::  HumRatio
      !+ Humidity ratio in lb_H₂O lb_Air⁻¹ [IP] or kg_H₂O kg_Air⁻¹ [SI]
    real              ::  TDryBulb
      !+ Dry-bulb temperature in °F [IP] or °C [SI]
    real              ::  BoundedHumRatio
      !+ Humidity ratio bounded to MIN_HUM_RATIO

    if (HumRatio < 0.0) then
      error stop "Error: humidity ratio is negative"
    end if
    BoundedHumRatio = max(HumRatio, MIN_HUM_RATIO)

    if (isIP()) then
      TDryBulb  = (MoistAirEnthalpy - 1061.0 * BoundedHumRatio) / (0.240 + 0.444 * BoundedHumRatio)
    else
      TDryBulb  = (MoistAirEnthalpy / 1000.0 - 2501.0 * BoundedHumRatio) / (1.006 + 1.86 * BoundedHumRatio)
    end if
  end function GetTDryBulbFromEnthalpyAndHumRatio