GetHumRatioFromVapPres Function

public function GetHumRatioFromVapPres(VapPres, Pressure) result(HumRatio)

Return humidity ratio given water vapor pressure and atmospheric pressure. Reference: ASHRAE Fundamentals (2005) ch. 6 eqn. 22; ASHRAE Fundamentals (2009) ch. 1 eqn. 22.

Arguments

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

Partial pressure of water vapor in moist air in Psi [IP] or Pa [SI]

real, intent(in) :: Pressure

Atmospheric pressure in Psi [IP] or Pa [SI]

Return Value real

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


Called by

proc~~gethumratiofromvappres~~CalledByGraph proc~gethumratiofromvappres GetHumRatioFromVapPres proc~gethumratiofromrelhum GetHumRatioFromRelHum proc~gethumratiofromrelhum->proc~gethumratiofromvappres proc~gethumratiofromtdewpoint GetHumRatioFromTDewPoint proc~gethumratiofromtdewpoint->proc~gethumratiofromvappres proc~gettwetbulbfromtdewpoint GetTWetBulbFromTDewPoint proc~gettwetbulbfromtdewpoint->proc~gethumratiofromtdewpoint proc~calcpsychrometricsfromrelhum CalcPsychrometricsFromRelHum proc~calcpsychrometricsfromrelhum->proc~gethumratiofromrelhum proc~calcminimaldxheating CalcMinimalDXHeating proc~calcminimaldxheating->proc~gethumratiofromtdewpoint proc~gettwetbulbfromrelhum GetTWetBulbFromRelHum proc~gettwetbulbfromrelhum->proc~gethumratiofromrelhum proc~calcpsychrometricsfromtdewpoint CalcPsychrometricsFromTDewPoint proc~calcpsychrometricsfromtdewpoint->proc~gethumratiofromtdewpoint proc~simminimaldxheating SimMinimalDXHeating proc~simminimaldxheating->proc~calcminimaldxheating

Contents


Source Code

  function GetHumRatioFromVapPres(VapPres, Pressure) result(HumRatio)
    !+ Return humidity ratio given water vapor pressure and atmospheric pressure.
    !+ Reference:
    !+ ASHRAE Fundamentals (2005) ch. 6 eqn. 22;
    !+ ASHRAE Fundamentals (2009) ch. 1 eqn. 22.

    real, intent(in)  ::  VapPres
      !+ Partial pressure of water vapor in moist air in Psi [IP] or Pa [SI]
    real, intent(in)  ::  Pressure
      !+ Atmospheric pressure in Psi [IP] or Pa [SI]
    real              ::  HumRatio
      !+ Humidity ratio in lb_H₂O lb_Air⁻¹ [IP] or kg_H₂O kg_Air⁻¹ [SI]

    if (VapPres < 0.0) then
      error stop "Error: partial pressure of water vapor in moist air cannot be negative"
    end if

    HumRatio = 0.621945 * VapPres / (Pressure-VapPres)

    ! Validity check.
    HumRatio = max(HumRatio, MIN_HUM_RATIO)
  end function GetHumRatioFromVapPres