# © 2006, American Society of Heating, Refrigerating and Air-Conditioning Engineers, Inc. (www.ashrae.org).

Published in ASHRAE Journal, (Vol. 48, January 2006). For personal use only. Additional distribution in either paper or digital form is not permitted without ASHRAE’s permission.

By Steve Kavanaugh, Ph.D., Fellow ASHRAE, Barbara Hattemer McCrary and Keith A. Woodbury

M

any engineers use spreadsheet programs for calculations and graphing because of the variety of relatively easy-to-

Review of Psychrometric Equations
Humidity Ratio

use embedded features. One such feature is the Microsoft® Visual Basic® Macro for use in Excel®. This tool permits BASIC computer programming codes to be used to perform computations that are cumbersome with conventional spreadsheet equations.
This article describes a series of macros that use psychrometric equations1 to compute moist air properties (humidity ratio, dew point, enthalpy, speciﬁc volume, speciﬁc heat, relative humidity) by entering the dry-bulb temperature, wet-bulb temperature (RH), and local elevation. The resulting spreadsheet is essentially an electronic psychrometric chart with the
28 ASHRAE Journal

added beneﬁt of being appropriate for any elevation—not just sea level. The macros also can be extended to spreadsheet programs that compute the properties when two airstreams are mixed, an airstream passes through a cooling coil, a heat recovery unit, or a heating coil. Engineers can cut and paste the necessary macros from existing public domain programs or develop their own versions.
ashrae.org

Psychrometric charts and equations are convenient methods of dealing with the thermodynamic properties of mixtures of water vapor and air. Obviously, an important parameter is the mass of these two components. The humidity ratio (W) W W) is used to express the mass of water vapor per unit mass of dry air and corresponds to the near right vertical axis of the psychrometric chart. Current practice is to use the units of mass of water to mass
About the Authors Steve Kavanaugh, Ph.D., is a professor of mechanical engineering at the University of Alabama in Tuscaloosa, Ala. Barbara Hattemer McCrary is an engineer with Johnson, Spellman and Associates in Norcross, Ga., and a former grants-in-aid recipient at the University of Alabama. Keith A. Woodbury is an associate professor of mechanical engineering at the University of Alabama.

January 2006

of air (lbw /lba or gw /kga). Some documents continue the use kg of grains per pound mass of air, where 7,000 grains = 1 pound (0.45 kg) mass. W= Mw lbw grains lbw  7,000 × Ma lba lbw lba

pw = 0.62198 p – p w

(4)

(

)

(1) The maximum amount of water vapor that can be mixed with air increases with temperature. RH is the mole fraction (or percent) of water vapor present in the air relative to the mole fraction of air that is completely saturated with moisture at a given temperature. This ratio is also the partial pressure of the water vapor (pw) relative to the partial pressure of water vapor ( when the air is saturated (pws). ( xw pw RH = = xws at ta pws at ta (2) In lieu of steam tables to provide the value of pws as a function of temperature, Equation 3 is suggested for temperatures between 492°R (32°F or 0°C) and 852°R (392°F or 200°C).1 C8 pws = Exp t + C9 + C10t + C11t2 + C12t3 + C13 ln t

The atmospheric pressure can be corrected for non-sea level elevations (Z, in feet above sea level) as shown in the 2001 Z Z, ASHRAE Handbook—Fundamentals:1 (5) In addition to the easily measured air dry-bulb temperature (ta), a second indicator is necessary to determine moist air t properties. Options include the dew-point temperature (td), wet-bulb temperature (twb), or RH. t The dew-point temperature can be determined by measuring the temperature of a surface when moisture begins to condense. The dew-point temperature also corresponds to the saturation temperature or the temperature when RH is 100%. A correlation for dew-point temperature (td  °F) from 32°F to 200°F (0°C t to 93°C) as a function of the partial pressure of water vapor (pw (  psia) is (2001 ASHRAE Handbook—Fundamentals):1 td = 100.45 + 33.193(ln pw) + 2.319(ln pw)2 + 0.17074 (ln pw)3 + 1.2063(pw)0.1984 1.2063( (6) The air wet-bulb temperature is determined by placing a thermometer bulb that is covered with a completely wetted wick in an airstream. The evaporation rate and corresponding cooling effect noted by the depression of the wet bulb relative to the dry-bulb temperatures provides an indication of the moisture level in the air. When relative humidity is used as the second indicator, the value of pw can be determined using Equation 2 with the value of pws determined from Equation 3. When the dew-point temperature is the second indicator, pw is the saturation pressure at this dew-point temperature (pws at td), which is also found ( using Equation 3. In either case, pw is used in Equation 4 to determine the humidity ratio (W ). If the wet-bulb temperature (twb) is the second indicator, the humidity ratio is found from t 2001 ASHRAE Handbook—Fundamentals: W p(psia) = 14.696 (1 – 6.8753 × 10–6 Z)5.2559 ( (psia

(

)

(3)

where

pws  psia t  °R C8 = –1.0440397× 104 C9 = –1.129465× 10 C10 = –2.7022355 × 10–2 C11 = 1.2890360 × 10–5 C12 = –2.4780681 × 10–9 C13 = 6.5459673

The partial pressure of water vapor for unsaturated air (pw) ( can be found by combining Equations 2 and 3 if the relative humidity is known. Equation 4 is used to compute the humidity ratio (W) from the local atmospheric pressure (p) and pw using W) W) (p the relationships of molecular weight (MW), mole fractions (x), (MW), MW (x), and the partial pressures of water and air, M MWw × xw 18.01528 × xw 0.62198 pw W= w = = = Ma MWa × xa 28.9645 × xa pa
January 2006

( )=
lbw lba

(1,093 – 0.556twb ) Ws at twb t 1,093 + 0.444t – twb t
ASHRAE Journal

– 0.24(t – twb) t (7)
29

Ws in Equation 7 is determined by inserting the saturation pressure of water vapor at the wet-bulb temperature (twb) into t Equation 4. The value in Equation 7 is the thermodynamic wet-bulb temperature (also called the temperature of adiabatic saturation). For moist air, the wet-bulb temperature measured by the proper use of a psychrometer closely approximates the thermodynamic wet-bulb temperature.
Equations for Moist Air Properties

The thermodynamic properties of moist air can be determined from the dry bulb temperature and humidity ratio. These include the enthalpy, speciﬁc volume (or its inverse, density) and speciﬁc heat. In the United States, the current convention is to set base values at 0°F (–18°C) and compute the values at other temperatures. At 0°F (–18°C), hw=1,061 Btu/lb (2468 kJ/kg) and ha= 0 Btu/lb (0 kJ/kg). The speciﬁc heat of air is 0.24 Btu/lb·°F [1 kJ/(kg · K)] and water vapor is 0.444 Btu/lb·°F [1.9 kJ/(kg · K)]. For moist air at dry bulb temperature (ta) and t humidity ratio (W), W W), h(Btu/lba) = 0.24t + W t (1,061 + 0.444t) ( (8) The speciﬁc heat of moist air is: cp (Btu/lba – °F) = 0.24 + 0.444W ( The speciﬁc volume of moist air is: ft3  = 0.37059t + 459.67[1 + 1.6078W t lb (9)

function name followed by a set of parenthesis containing the dry-bulb temperature, wet-bulb temperature, and elevation. For example, if a cell contains “=HumRat (80,67,0)”, the displayed value should be 0.0112, which is the humidity ratio in lbw /lba for air with a dry bulb of 80°F (27°C) and a wet bulb of 67°F (19°C) at sea level. Once the humidity ratio is known, enthalpy, speciﬁc heat, and speciﬁc volume can also be calculated using Equations 8, 9, and 10. Since these equations are relatively simple, the values can be computed with a formula in a spreadsheet cell.
Function HumRat (db, wb, ElevInFt) Convert the wet bulb in °F to Rankine RT = wb + 459.67 Find the atmospheric pressure in psia from Equation 5 AtmPress = 14.696 × (1 – 0.0000068753 × ElevInFt)5.2559 Use Equation 3 to ﬁnd the saturation pressure at wet-bulb temperature c8 = –10,440.397 c9 = –11.29465 c10 = –0.027022355 c11 = 0.00001289036 c12 = –0.000000002478068 c13 = 6.5459673 pws = Exp

(c8/RT + c9 + c10 × RT + c11 × RT2 + c12 × RT3 + c13 × Log(RT))
Use Equation 4 to ﬁnd the saturated humidity ratio at the wet bulb-temperature wsat = (pws × 0.62198) / (AtmPress – pws) Use Equation 7 to ﬁnd the humidity ratio HumRat = ((1,093 – 0.556 × wb) × wsat - 0.24 × (db – wb)) /

( )

] / p(psia) (10)

(1,093 + 0.444 × db – wb)

End Function

Psychrometric Equations in Spreadsheet Macro Format

Previous articles in ASHRAE Journal have alluded to the use wet-bulb temperature and elevation. of spreadsheet macros for computing piping pressure drops2 and solving for friction factors in air ducts.3 These articles emphasized another spreadsheet tool (Goal Seek) that was used to iteratively solve the implicit Colebrook equation for friction factor ( f ). This additional tool is unnecessary since the computation of moist air properties is straightforward once the macro for humidity ratio is developed. Figure 1 is an example macro for computing humidity ratio from the dry-bulb temperature (ta), wet bulb (twb), and elevation t t (feet above sea level). The macro is stored in an Excel module in the form of a function called HumRat. The function is used just like any other Excel function by clicking on a cell in the main spreadsheet and inserting an “=” sign and the Figure 2: Dew-point spreadsheet. Visual Basic Editor is accessed from a drop-down menu.
30 ASHRAE Journal ashrae.org

Figure 1: Macro for humidity ratio from dry-bulb temperature,

January 2006

For enthalpy (Btu/lb): = 0.24 × 80 + HumRat (80,67,0) × (1,061 + 0.444 × 80) (11) For speciﬁc heat (Btu/lb – °F): = 0.24 + 0.444 × HumRat (80,67,0) (12) Note that Equation 10 requires the value of atmospheric pressure. This value was found inside the function HumRat, but it is not available since only one value can be passed from a function to the Excel spreadsheet. Therefore, atmospheric pressure must be calculated with Equation 5 in another macro or spreadsheet cell. However, the value of atmospheric pressure rather than elevation must be passed to the macro if it is calculated in a cell.

Equation 6 is used to demonstrate the steps required to develop a macro to compute dew-point temperature when the vapor pressure is known. Although this value could also be found with an equation in a spreadsheet cell, it serves as a simple example. Figure 2 shows how the main spreadsheet might look. The value for saturated vapor pressure is entered in Cell B1 and an equation in Cell B2 calls the macro function TDP to compute the dew-point temperature for the value in Cell B1. Then develop the macro: • Select “Tools” on the main toolbar; • Select “Macros” on the ﬁrst drop-down box; and • Select “Visual Basic Editor” in the second drop down box (Figure 2). ( This will bring up a screen as shown in Figure 3 that has a work box on the left side with the heading “Project-VBA Project.” • Select “This Workbook”; • Select “Insert” on the top toolbar; • Select “Module” on the drop-down box; • Type the code (Equation 6) shown in Figure 4 in the empty box that appears in the right portion of the screen; • When the entry is completed, select “File” on the main toolbar; • Save the spreadsheet (Note: You must save the spreadsheet after any changes are made to the macro or the edited macro will not function correctly in the spreadsheet); and • Select “File” again, and then “Close and Return to Microsoft Excel.”
Extending Psychrometric Spreadsheets to Mixed Air Processes

Figure 3: Screenshot of inserting module in Visual Basic program.
Function TDP(pw) C1 C2 C3 C C4 C5 Alpha =100.45 = 33.193 = 2.319 = 0.17074 = 1.2063 = Log(pw)

Equation 6—Also Equation 37, Chp. 6, 2001 ASHRAE Handbook—Fundamentals TDP = C1 + C2 × Alpha + C3 × (Alpha2) + 0.17074 × (Alpha3) + 1.2063 × pw0.1984 End Function

Figure 4: Macro for dew-point temperature for vapor pressure.

These spreadsheets are essentially an electronic psychrometric chart and can be combined with the equations for moist air processes that appear in the 2001 ASHRAE Handbook— Fundamentals. Consider Equation 13, which computes the total capacity of a cooling coil (neglecting the small amount of energy in the condensate) as shown in Figure 5. Known values are typically the airﬂow rate (Q), the elevation, and the entering
January 2006

Figure 5: Air coil: total cooling.4 ASHRAE Journal 31

air dry-bulb and wet-bulb temperatures. The function HumRat is used to ﬁnd the humidity ratio for the entering air (Point 1) and Equations 8 and 10 are used to compute the enthalpy (h1) and speciﬁc volume ( 1). For case where the outlet air dry-bulb ( and wet-bulb temperatures are known, HumRat is used to ﬁnd the leaving air humidity ratio and Equation 8 is used to ﬁnd the leaving air enthalpy (h2 ).

extended to solving and analyzing HVAC moist air process problems.
Note

(13)
Summary

Equations are available in the psychrometrics chapter of the 2001 ASHRAE Handbook—Fundamentals to determine moist air properties if the dry-bulb temperature, local pressure, and the humidity ratio are known. The pressure can be computed from elevations above sea level. The humidity ratio can be determined from the dry-bulb temperature and one of three other indicators: wet-bulb temperature, relative humidity or dew-point temperature. Visual Basic macros can be used to handle the somewhat cumbersome equations for determining humidity ratio. When completed, these macros can be combined with equations for moist air properties to develop an electronic psychrometric chart. The usefulness of this tool can be further

An objective of this article is to demonstrate the ease of adding functions to spreadsheet programs. The examples are applicable when the dry-bulb, wet-bulb, and dew-point temperatures are above the freezing point of water. The ASHRAE publication Understanding Psychrometrics5 includes additional below freezing equations. Also, the public domain spreadsheet program PsychProcess.xls is available at www.geokiss.com/ software/PsychProcess05.xls. It contains additional macros and moist air programs.
References
1. 2001 ASHRAE Handbook—Fundamentals, Chapter 6, Psychrometrics. 2. Lester, T.G. 2002. “Calculating pressure drops in piping systems.” ASHRAE Journal 44(9):41–43. 3. Lester, T.G. 2003. “Solving for friction factor.” ASHRAE Journal 45(7):41–44. 4. Kavanaugh, S.P. 2006. HVAC Simpliﬁed. Atlanta: ASHRAE, forthcoming. 5. Gatley, D.P. 2005. Understanding Psychrometrics. Atlanta: ASHRAE.