Utility function to calculate humidity ratio, wet-bulb temperature, dew-point temperature, vapour pressure, moist air enthalpy, moist air volume, and degree of saturation of air given dry-bulb temperature, relative humidity and pressure.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in) | :: | TDryBulb | Dry-bulb temperature in °F [IP] or °C [SI] |
||
real, | intent(in) | :: | RelHum | Relative humidity in range [0, 1] |
||
real, | intent(in) | :: | Pressure | Atmospheric pressure in Psi [IP] or Pa [SI] |
||
real, | intent(out) | :: | HumRatio | Humidity ratio in lb_H₂O lb_Air⁻¹ [IP] or kg_H₂O kg_Air⁻¹ [SI] |
||
real, | intent(out) | :: | TWetBulb | Wet-bulb temperature in °F [IP] or °C [SI] |
||
real, | intent(out) | :: | TDewPoint | Dew-point temperature in °F [IP] or °C [SI] |
||
real, | intent(out) | :: | VapPres | Partial pressure of water vapor in moist air in Psi [IP] or Pa [SI] |
||
real, | intent(out) | :: | MoistAirEnthalpy | Moist air enthalpy in Btu lb⁻¹ [IP] or J kg⁻¹ [SI] |
||
real, | intent(out) | :: | MoistAirVolume | Specific volume of moist air in ft³ lb⁻¹ [IP] or in m³ kg⁻¹ [SI] |
||
real, | intent(out) | :: | DegreeOfSaturation | Degree of saturation [unitless] |
subroutine CalcPsychrometricsFromRelHum(TDryBulb, &
RelHum, &
Pressure, &
HumRatio, &
TWetBulb, &
TDewPoint, &
VapPres, &
MoistAirEnthalpy, &
MoistAirVolume, &
DegreeOfSaturation)
!+ Utility function to calculate humidity ratio, wet-bulb temperature, dew-point temperature,
!+ vapour pressure, moist air enthalpy, moist air volume, and degree of saturation of air given
!+ dry-bulb temperature, relative humidity and pressure.
real, intent(in) :: TDryBulb
!+ Dry-bulb temperature in °F [IP] or °C [SI]
real, intent(in) :: RelHum
!+ Relative humidity in range [0, 1]
real, intent(in) :: Pressure
!+ Atmospheric pressure in Psi [IP] or Pa [SI]
real, intent(out) :: HumRatio
!+ Humidity ratio in lb_H₂O lb_Air⁻¹ [IP] or kg_H₂O kg_Air⁻¹ [SI]
real, intent(out) :: TWetBulb
!+ Wet-bulb temperature in °F [IP] or °C [SI]
real, intent(out) :: TDewPoint
!+ Dew-point temperature in °F [IP] or °C [SI]
real, intent(out) :: VapPres
!+ Partial pressure of water vapor in moist air in Psi [IP] or Pa [SI]
real, intent(out) :: MoistAirEnthalpy
!+ Moist air enthalpy in Btu lb⁻¹ [IP] or J kg⁻¹ [SI]
real, intent(out) :: MoistAirVolume
!+ Specific volume of moist air in ft³ lb⁻¹ [IP] or in m³ kg⁻¹ [SI]
real, intent(out) :: DegreeOfSaturation
!+ Degree of saturation [unitless]
HumRatio = GetHumRatioFromRelHum(TDryBulb, RelHum, Pressure)
TWetBulb = GetTWetBulbFromHumRatio(TDryBulb, HumRatio, Pressure)
TDewPoint = GetTDewPointFromHumRatio(TDryBulb, HumRatio, Pressure)
VapPres = GetVapPresFromHumRatio(HumRatio, Pressure)
MoistAirEnthalpy = GetMoistAirEnthalpy(TDryBulb, HumRatio)
MoistAirVolume = GetMoistAirVolume(TDryBulb, HumRatio, Pressure)
DegreeOfSaturation = GetDegreeOfSaturation(TDryBulb, HumRatio, Pressure)
end subroutine CalcPsychrometricsFromRelHum