GetDegreeOfSaturation Function

public function GetDegreeOfSaturation(TDryBulb, HumRatio, Pressure) result(DegreeOfSaturation)

Return the degree of saturation (i.e humidity ratio of the air / humidity ratio of the air at saturation at the same temperature and pressure) given dry-bulb temperature, humidity ratio, and atmospheric pressure. Reference: ASHRAE Handbook - Fundamentals (2009) ch. 1 eqn 12 Notes: This definition is absent from the 2017 Handbook. Using 2009 version instead.

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

Degree of saturation in arbitrary unit


Calls

proc~~getdegreeofsaturation~~CallsGraph proc~getdegreeofsaturation GetDegreeOfSaturation proc~getsathumratio GetSatHumRatio proc~getdegreeofsaturation->proc~getsathumratio proc~getsatvappres GetSatVapPres proc~getsathumratio->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~~getdegreeofsaturation~~CalledByGraph proc~getdegreeofsaturation GetDegreeOfSaturation proc~calcpsychrometricsfromrelhum CalcPsychrometricsFromRelHum proc~calcpsychrometricsfromrelhum->proc~getdegreeofsaturation proc~calcpsychrometricsfromtwetbulb CalcPsychrometricsFromTWetBulb proc~calcpsychrometricsfromtwetbulb->proc~getdegreeofsaturation proc~calcpsychrometricsfromtdewpoint CalcPsychrometricsFromTDewPoint proc~calcpsychrometricsfromtdewpoint->proc~getdegreeofsaturation

Contents

Source Code


Source Code

  function GetDegreeOfSaturation(TDryBulb, HumRatio, Pressure) result(DegreeOfSaturation)
    !+ Return the degree of saturation (i.e humidity ratio of the air / humidity ratio of the air at saturation
    !+ at the same temperature and pressure) given dry-bulb temperature, humidity ratio, and atmospheric pressure.
    !+ Reference:
    !+ ASHRAE Handbook - Fundamentals (2009) ch. 1 eqn 12
    !+ Notes:
    !+ This definition is absent from the 2017 Handbook. Using 2009 version instead.

    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              ::  DegreeOfSaturation
      !+ Degree of saturation in arbitrary unit
    real              ::  BoundedHumRatio
      !+ Humidity ratio bounded to MIN_HUM_RATIO

    if (HumRatio < 0.0) then
      error stop "Error: humidity ratio is negative"
    end if
    BoundedHumRatio = max(HumRatio, MIN_HUM_RATIO)

    DegreeOfSaturation = BoundedHumRatio / GetSatHumRatio(TDryBulb, Pressure)
  end function GetDegreeOfSaturation