GetRelHumFromVapPres Function

public function GetRelHumFromVapPres(TDryBulb, VapPres) result(RelHum)

Return relative humidity given dry-bulb temperature and vapor pressure. References: ASHRAE Handbook - Fundamentals (2017) ch. 1 eqn 12, 22

Arguments

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

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

real, intent(in) :: VapPres

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

Return Value real

Relative humidity in range [0, 1]


Calls

proc~~getrelhumfromvappres~~CallsGraph proc~getrelhumfromvappres 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~~getrelhumfromvappres~~CalledByGraph proc~getrelhumfromvappres GetRelHumFromVapPres proc~getrelhumfromhumratio GetRelHumFromHumRatio proc~getrelhumfromhumratio->proc~getrelhumfromvappres 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 GetRelHumFromVapPres(TDryBulb, VapPres) result(RelHum)
    !+ Return relative humidity given dry-bulb temperature and vapor pressure.
    !+ References:
    !+ ASHRAE Handbook - Fundamentals (2017) ch. 1 eqn 12, 22

    real, intent(in)  ::  TDryBulb
      !+ Dry-bulb temperature in °F [IP] or °C [SI]
    real, intent(in)  ::  VapPres
      !+ Partial pressure of water vapor in moist air in Psi [IP] or Pa [SI]
    real              ::  RelHum
      !+ Relative humidity in range [0, 1]

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

    RelHum = VapPres / GetSatVapPres(TDryBulb)
  end function GetRelHumFromVapPres