GetRelHumFromHumRatio Function

public function GetRelHumFromHumRatio(TDryBulb, HumRatio, Pressure) result(RelHum)

Return relative humidity given dry-bulb temperature, humidity ratio, and pressure. Reference: ASHRAE Handbook - Fundamentals (2017) ch. 1

Arguments

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

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

real, intent(in) :: HumRatio

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

real, intent(in) :: Pressure

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

Return Value real

Relative humidity in range [0, 1]


Calls

proc~~getrelhumfromhumratio~~CallsGraph proc~getrelhumfromhumratio GetRelHumFromHumRatio proc~getvappresfromhumratio GetVapPresFromHumRatio proc~getrelhumfromhumratio->proc~getvappresfromhumratio proc~getrelhumfromvappres GetRelHumFromVapPres proc~getrelhumfromhumratio->proc~getrelhumfromvappres proc~getsatvappres GetSatVapPres proc~getrelhumfromvappres->proc~getsatvappres proc~isip isIP proc~getsatvappres->proc~isip proc~gettrankinefromtfahrenheit GetTRankineFromTFahrenheit proc~getsatvappres->proc~gettrankinefromtfahrenheit proc~gettkelvinfromtcelsius GetTKelvinFromTCelsius proc~getsatvappres->proc~gettkelvinfromtcelsius

Called by

proc~~getrelhumfromhumratio~~CalledByGraph proc~getrelhumfromhumratio GetRelHumFromHumRatio proc~calcminimaldxheating CalcMinimalDXHeating proc~calcminimaldxheating->proc~getrelhumfromhumratio proc~getrelhumfromtwetbulb GetRelHumFromTWetBulb proc~getrelhumfromtwetbulb->proc~getrelhumfromhumratio proc~calcpsychrometricsfromtwetbulb CalcPsychrometricsFromTWetBulb proc~calcpsychrometricsfromtwetbulb->proc~getrelhumfromhumratio proc~getvaporpressuredeficit GetVaporPressureDeficit proc~getvaporpressuredeficit->proc~getrelhumfromhumratio proc~calcpsychrometricsfromtdewpoint CalcPsychrometricsFromTDewPoint proc~calcpsychrometricsfromtdewpoint->proc~getrelhumfromhumratio proc~simminimaldxheating SimMinimalDXHeating proc~simminimaldxheating->proc~calcminimaldxheating

Contents

Source Code


Source Code

  function GetRelHumFromHumRatio(TDryBulb, HumRatio, Pressure) result(RelHum)
  !+ Return relative humidity given dry-bulb temperature, humidity ratio, and pressure.
  !+ Reference:
  !+ ASHRAE Handbook - Fundamentals (2017) ch. 1

    real, intent(in)  ::  TDryBulb
      !+ Dry-bulb temperature in °F [IP] or °C [SI]
    real, intent(in)  ::  HumRatio
      !+ Humidity ratio in lb_H₂O lb_Air⁻¹ [IP] or kg_H₂O kg_Air⁻¹ [SI]
    real, intent(in)  ::  Pressure
      !+ Atmospheric pressure in Psi [IP] or Pa [SI]
    real              ::  RelHum
      !+ Relative humidity in range [0, 1]
    real              ::  VapPres
      !+ Partial pressure of water vapor in moist air in Psi [IP] or Pa [SI]

    if (HumRatio < 0.0) then
      error stop "Error: humidity ratio cannot be negative"
    end if

    VapPres = GetVapPresFromHumRatio(HumRatio, Pressure)
    RelHum  = GetRelHumFromVapPres(TDryBulb, VapPres)
  end function GetRelHumFromHumRatio