dLnPws_ Function

public function dLnPws_(TDryBulb) result(dLnPws)

Helper function returning the derivative of the natural log of the saturation vapor pressure as a function of 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

Derivative of natural log of vapor pressure of saturated air in Psi [IP] or Pa [SI]


Calls

proc~~dlnpws_~~CallsGraph proc~dlnpws_ dLnPws_ proc~isip isIP proc~dlnpws_->proc~isip proc~gettrankinefromtfahrenheit GetTRankineFromTFahrenheit proc~dlnpws_->proc~gettrankinefromtfahrenheit proc~gettkelvinfromtcelsius GetTKelvinFromTCelsius proc~dlnpws_->proc~gettkelvinfromtcelsius

Called by

proc~~dlnpws_~~CalledByGraph proc~dlnpws_ dLnPws_ proc~gettdewpointfromvappres GetTDewPointFromVapPres proc~gettdewpointfromvappres->proc~dlnpws_ proc~gettdewpointfromhumratio GetTDewPointFromHumRatio proc~gettdewpointfromhumratio->proc~gettdewpointfromvappres proc~gettdewpointfromrelhum GetTDewPointFromRelHum proc~gettdewpointfromrelhum->proc~gettdewpointfromvappres proc~calcpsychrometricsfromrelhum CalcPsychrometricsFromRelHum proc~calcpsychrometricsfromrelhum->proc~gettdewpointfromhumratio proc~gettwetbulbfromhumratio GetTWetBulbFromHumRatio proc~calcpsychrometricsfromrelhum->proc~gettwetbulbfromhumratio proc~gettwetbulbfromhumratio->proc~gettdewpointfromhumratio proc~calcpsychrometricsfromtwetbulb CalcPsychrometricsFromTWetBulb proc~calcpsychrometricsfromtwetbulb->proc~gettdewpointfromhumratio proc~gettdewpointfromtwetbulb GetTDewPointFromTWetBulb proc~gettdewpointfromtwetbulb->proc~gettdewpointfromhumratio proc~gettwetbulbfromtdewpoint GetTWetBulbFromTDewPoint proc~gettwetbulbfromtdewpoint->proc~gettwetbulbfromhumratio proc~calcminimaldxheating CalcMinimalDXHeating proc~calcminimaldxheating->proc~gettwetbulbfromhumratio proc~calcminimaldxcooling CalcMinimalDXCooling proc~calcminimaldxcooling->proc~gettwetbulbfromhumratio proc~gettwetbulbfromrelhum GetTWetBulbFromRelHum proc~gettwetbulbfromrelhum->proc~gettwetbulbfromhumratio proc~calcpsychrometricsfromtdewpoint CalcPsychrometricsFromTDewPoint proc~calcpsychrometricsfromtdewpoint->proc~gettwetbulbfromhumratio proc~simminimaldxheating SimMinimalDXHeating proc~simminimaldxheating->proc~calcminimaldxheating proc~simminimaldxcooling SimMinimalDXCooling proc~simminimaldxcooling->proc~calcminimaldxcooling

Contents

Source Code


Source Code

  function dLnPws_(TDryBulb) result(dLnPws)
    !+ Helper function returning the derivative of the natural log of the saturation vapor pressure
    !+ as a function of 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              ::  dLnPws
      !+ Derivative of natural log of vapor pressure of saturated air in Psi [IP] or Pa [SI]
    real              ::  T
      !+ Dry bulb temperature in R [IP] or K [SI]

    if (isIP()) then

      T = GetTRankineFromTFahrenheit(TDryBulb)

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

    else

      T = GetTKelvinFromTCelsius(TDryBulb)

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