GetSatVapPres Function

public function GetSatVapPres(TDryBulb) result(SatVapPres)

Return saturation vapor pressure given dry-bulb temperature. Reference: ASHRAE Handbook - Fundamentals (2017) ch. 1 eqn 5

Arguments

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

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

Return Value real

Vapor pressure of saturated air in Psi [IP] or Pa [SI]


Calls

proc~~getsatvappres~~CallsGraph proc~getsatvappres 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~~getsatvappres~~CalledByGraph proc~getsatvappres GetSatVapPres proc~getsathumratio GetSatHumRatio proc~getsathumratio->proc~getsatvappres proc~getvappresfromtdewpoint GetVapPresFromTDewPoint proc~getvappresfromtdewpoint->proc~getsatvappres proc~gethumratiofromtdewpoint GetHumRatioFromTDewPoint proc~gethumratiofromtdewpoint->proc~getsatvappres proc~getrelhumfromvappres GetRelHumFromVapPres proc~getrelhumfromvappres->proc~getsatvappres proc~gettdewpointfromvappres GetTDewPointFromVapPres proc~gettdewpointfromvappres->proc~getsatvappres proc~getvappresfromrelhum GetVapPresFromRelHum proc~getvappresfromrelhum->proc~getsatvappres proc~getrelhumfromtdewpoint GetRelHumFromTDewPoint proc~getrelhumfromtdewpoint->proc~getsatvappres proc~getvaporpressuredeficit GetVaporPressureDeficit proc~getvaporpressuredeficit->proc~getsatvappres proc~getrelhumfromhumratio GetRelHumFromHumRatio proc~getvaporpressuredeficit->proc~getrelhumfromhumratio proc~gettdewpointfromrelhum GetTDewPointFromRelHum proc~gettdewpointfromrelhum->proc~gettdewpointfromvappres proc~gettdewpointfromrelhum->proc~getvappresfromrelhum proc~gethumratiofromrelhum GetHumRatioFromRelHum proc~gethumratiofromrelhum->proc~getvappresfromrelhum proc~gettdewpointfromhumratio GetTDewPointFromHumRatio proc~gettdewpointfromhumratio->proc~gettdewpointfromvappres proc~gettwetbulbfromtdewpoint GetTWetBulbFromTDewPoint proc~gettwetbulbfromtdewpoint->proc~gethumratiofromtdewpoint proc~gettwetbulbfromhumratio GetTWetBulbFromHumRatio proc~gettwetbulbfromtdewpoint->proc~gettwetbulbfromhumratio proc~calcminimaldxheating CalcMinimalDXHeating proc~calcminimaldxheating->proc~gethumratiofromtdewpoint proc~calcminimaldxheating->proc~getrelhumfromhumratio proc~psytsatfnhpb PsyTsatFnHPb proc~calcminimaldxheating->proc~psytsatfnhpb proc~calcminimaldxheating->proc~gettwetbulbfromhumratio proc~getrelhumfromhumratio->proc~getrelhumfromvappres proc~getsatairenthalpy GetSatAirEnthalpy proc~getsatairenthalpy->proc~getsathumratio proc~gethumratiofromtwetbulb GetHumRatioFromTWetBulb proc~gethumratiofromtwetbulb->proc~getsathumratio proc~getdegreeofsaturation GetDegreeOfSaturation proc~getdegreeofsaturation->proc~getsathumratio proc~calcpsychrometricsfromtdewpoint CalcPsychrometricsFromTDewPoint proc~calcpsychrometricsfromtdewpoint->proc~gethumratiofromtdewpoint proc~calcpsychrometricsfromtdewpoint->proc~getrelhumfromhumratio proc~calcpsychrometricsfromtdewpoint->proc~getdegreeofsaturation proc~calcpsychrometricsfromtdewpoint->proc~gettwetbulbfromhumratio proc~simminimaldxheating SimMinimalDXHeating proc~simminimaldxheating->proc~calcminimaldxheating proc~calcpsychrometricsfromrelhum CalcPsychrometricsFromRelHum proc~calcpsychrometricsfromrelhum->proc~gethumratiofromrelhum proc~calcpsychrometricsfromrelhum->proc~gettdewpointfromhumratio proc~calcpsychrometricsfromrelhum->proc~getdegreeofsaturation proc~calcpsychrometricsfromrelhum->proc~gettwetbulbfromhumratio proc~psytsatfnhpb->proc~getsatairenthalpy proc~gettwetbulbfromrelhum GetTWetBulbFromRelHum proc~gettwetbulbfromrelhum->proc~gethumratiofromrelhum proc~gettwetbulbfromrelhum->proc~gettwetbulbfromhumratio proc~calcpsychrometricsfromtwetbulb CalcPsychrometricsFromTWetBulb proc~calcpsychrometricsfromtwetbulb->proc~gettdewpointfromhumratio proc~calcpsychrometricsfromtwetbulb->proc~getrelhumfromhumratio proc~calcpsychrometricsfromtwetbulb->proc~gethumratiofromtwetbulb proc~calcpsychrometricsfromtwetbulb->proc~getdegreeofsaturation proc~getrelhumfromtwetbulb GetRelHumFromTWetBulb proc~getrelhumfromtwetbulb->proc~getrelhumfromhumratio proc~getrelhumfromtwetbulb->proc~gethumratiofromtwetbulb proc~gettdewpointfromtwetbulb GetTDewPointFromTWetBulb proc~gettdewpointfromtwetbulb->proc~gettdewpointfromhumratio proc~gettdewpointfromtwetbulb->proc~gethumratiofromtwetbulb proc~gettwetbulbfromhumratio->proc~gettdewpointfromhumratio proc~gettwetbulbfromhumratio->proc~gethumratiofromtwetbulb proc~calcminimaldxcooling CalcMinimalDXCooling proc~calcminimaldxcooling->proc~psytsatfnhpb proc~calcminimaldxcooling->proc~gettwetbulbfromhumratio proc~simminimaldxcooling SimMinimalDXCooling proc~simminimaldxcooling->proc~calcminimaldxcooling

Contents

Source Code


Source Code

  function GetSatVapPres(TDryBulb) result(SatVapPres)
    !+ Return saturation vapor pressure given dry-bulb temperature.
    !+ Reference:
    !+ ASHRAE Handbook - Fundamentals (2017) ch. 1  eqn 5

    real, intent(in)  ::  TDryBulb
      !+ Dry-bulb temperature in °F [IP] or °C [SI]
    real              ::  SatVapPres
      !+ Vapor pressure of saturated air in Psi [IP] or Pa [SI]
    real              ::  LnPws
      !+ Log of Vapor Pressure of saturated air (dimensionless)
    real              ::  T
      !+ Dry bulb temperature in R [IP] or K [SI]

    if (isIP()) then
      if (TDryBulb < -148.0 .or. TDryBulb > 392.0) then
        error stop "Error: dry bulb temperature must be in range [-148, 392]°F"
      end if

      T = GetTRankineFromTFahrenheit(TDryBulb)

      if (TDryBulb <= 32.) then
        LnPws = (-1.0214165E+04 / T - 4.8932428 - 5.3765794E-03 * T + 1.9202377E-07 * T**2    &
                + 3.5575832E-10 * T**3 - 9.0344688E-14 * T**4 + 4.1635019 * log(T))
      else
        LnPws = -1.0440397E+04 / T - 1.1294650E+01 - 2.7022355E-02* T + 1.2890360E-05 * T**2  &
                - 2.4780681E-09 * T**3 + 6.5459673 * log(T)
      end if

      else
        if (TDryBulb < -100.0 .or. TDryBulb > 200.0) then
          error stop "Error: dry bulb temperature must be in range [-100, 200]°C"
        end if

        T = GetTKelvinFromTCelsius(TDryBulb)

        if (TDryBulb <= 0) then
          LnPws = -5.6745359E+03 / T + 6.3925247 - 9.677843E-03 * T + 6.2215701E-07 * T**2    &
                  + 2.0747825E-09 * T**3 - 9.484024E-13 * T**4 + 4.1635019 * log(T)
        else
          LnPws = -5.8002206E+03 / T + 1.3914993 - 4.8640239E-02 * T + 4.1764768E-05 * T**2   &
                  - 1.4452093E-08 * T**3 + 6.5459673 * log(T)
        end if
      end if

    SatVapPres = exp(LnPws)
  end function GetSatVapPres