You are on page 1of 18

AC 2007-802: MATHCAD FUNCTIONS FOR THE THERMODYNAMIC

PROPERTIES OF MOIST AIR, AMMONIA, PROPANE, AND R-22


Stephen McClain, University of Alabama-Birmingham
Stephen T. McClain is an Assistant Professor at the University of Alabama at Birmingham. He
received his B.S. in mechanical engineering from The University of Memphis in 1995, and he
received his M.S. (1997) and Ph.D. (2002) degrees in mechanical engineering from Mississippi
State University. Dr. McClain has taught classes in thermodynamics, fluid mechanics, thermal
systems design, convection heat transfer, internal combustion engines, and experimental design
and uncertainty analysis.
Christopher Smitherman, University of Alabama-Birmingham
Christopher B. Smitherman is an undergraduate honors student in mechanical engineering at the
University of Alabama at Birmingham. Mr. Smitherman plans to finish his B.S. degree in
December 2007 and plans to pursue an MBA after graduation. He is a member of the American
Society of Mechanical Engineers, Tau Beta Pi, and Pi Tau Sigma.
American Society for Engineering Education, 2007
MathCAD Functions for the Thermodynamics Properties of
Moist Air, Ammonia, Propane, and R-22

Abstract

MathCAD functions were constructed to evaluate the thermodynamic properties of moist air,
ammonia, propane, and Refrigerant 22. The functions were constructed to ease the need for
time-consuming interpolation using tabularized thermodynamic data while reinforcing the
functional representation of traditional thermodynamic property tables. Three examples are
provided to demonstrate the use of the functions in an undergraduate applied thermodynamics
course. The examples include the analysis of an evaporative cooling system, the analysis of a
cascade, reversed-Rankine cycle refrigeration system, and the design of a propane based heat
pump system. The examples are presented in their entirety in appendices to demonstrate the
report-quality worksheets possible using MathCAD. The efforts described are an extension of
earlier efforts to develop a complete set thermodynamic property functions needed to teach an
undergraduate applied thermodynamics course. While the function development was directed at
the applied thermodynamics course, which is commonly taught early in the undergraduate
mechanical engineering curriculum, the functions are excellent tools for upper-level electives
such as HVAC, internal combustion engines, thermal systems design, and turbomachinery.

Introduction

Learning with a combination of a textbook and a software package is a contemporary
engineering-thermodynamics pedagogy. Many software tools are available for evaluating
thermodynamic properties of engineering fluids. Many of these software tools are proprietary
packages sold by textbook publishers, such as Interactive Thermodynamics: IT [1]. In fact,
finding a thermodynamics text that does not come with a software package is difficult. Some
textbooks are now built around using a software or web-based internet package [2]. While many
educational software packages are available for evaluating thermodynamic properties, evidence
that shows that practicing engineers continue to use these thermodynamic-property software
packages after entering the workforce is not readily available.

MathCAD, MatLab, and Engineering Equation Solver (EES) are all powerful computational and
analytical packages [3,4,5]. Many schools teach and require the use of a computational tool such
as MathCAD, MatLab, or EES [6]. From informal conversations with engineers who learned to
use one of these computational tools, many of them continue to use these tools after graduation.
Developing extensions or toolkits for software that the students will use after graduation seems
more appropriate than developing complete software packages that will only be used by students
in an educational environment. Because of the need for thermodynamic property functions for
the widely used computational tools, functions were generated to evaluate the thermodynamic
properties of water, R-134a, air, and twelve species of the CHON system in MathCAD.
Equilibrium functions for eight independent reactions involving species of the CHON system are
also included. The function set created provides the minimum number of thermodynamic
functions required to teach a two-course sequence in undergraduate engineering
thermodynamics.

Each computational analysis package has strengths and weaknesses when compared to the
others. EES also has the thermodynamic functions discussed here (and functions for many other
fluids). While EES is not a traditional structured programming language, the appearance of EES
programs is similar to the appearance of C or FORTRAN programs, and some users find the unit
conversion procedures awkward in EES.

Recent efforts to implement thermodynamic property functions in spreadsheet programs such as
MS Excel have also been published [7,8]. These efforts were initiated because MS Excel is
inexpensive when included with a standard Microsoft Office installation. Property functions for
MS Excel would certainly be useful for corporate engineers after graduation. However, the
educational benefits of using MS Excel are arguable. The cellular nature of spreadsheets limits
functionality and readability of engineering calculations, the syntax required is just as
complicated and difficult to read as C or FORTRAN, and MS Excel provides only limited
automatic unit conversions.

As the case with all thermodynamic property evaluation software, the intent was 1) to take some
of the effort and distraction away from working problems requiring extensive interpolation in the
tables and 2) to allow the students to analyze more complicated problems. MathCAD was
chosen for this project because of its mathematical report appearance, because of its ability to
perform calculations with automatic unit handling and conversion, and because of its wide use in
the Department of Mechanical Engineering at the University of Alabama at Birmingham.

While developed for a two-course sequence in undergraduate thermodynamics, the MathCAD
function sets are useful for many other engineering courses. The functions presented in this
paper and the thermodynamic functions presented in previous works have been found to be very
useful in courses such as internal combustion engines, propulsion, combustion, compressible
flow, and heating ventilating and air conditioning [9, 10, 11, 12].

Referencing the Function Sets in MathCAD

The functions are contained in four MathCAD worksheets. Table 1 presents the files and the
information contained in each file. To use the functions in a new MathCAD worksheet, the
information in the property worksheets does not have to be copied into the new worksheet. The
function worksheet may be referenced by using the <Insert, Reference> command, and
identifying the file required. When this is done correctly, a statement similar to


Reference:C:\ThermoII\SteamProps.mcd


will appear in the worksheet. All functions generated in referenced file will then be available for
use in the new worksheet.

All of the functions generated are available to the educational public on the condition that if the
functions are used for instruction, the instructor agrees to have his students complete a survey
form at the end of the course. The function sets may be obtained by emailing the author at
smcclain@uab.edu. Please include the subject line MathCAD: Thermo Function Set Request
in your email. The reader should note that all functions presented in this paper are for
educational use only, and that the user assumes all responsibility for calculations performed
using the functions if used for an industrial application.

Table 1. Property Function Files
File Information Contained
R22Props.mcd Thermodynamic properties of R-22
AmmoniaProps.mcd Thermodynamic properties of Ammonia
PropaneProps.mcd Thermodynamic properties of Propane
SteamProps.mcd Thermodynamic properties of water and moist air


Phase Change Substances

A consistent naming scheme was chosen for the phase change fluids. The function calls for R-
22, ammonia, and propane begin with the variable to be determined, followed by an underscore,
followed by the independent property(s), followed by a fluid identifier (R22, NH3, or C3H8),
followed finally by the values of the independent property(s) in parenthesis. Figure 1 presents
the format of function calls for the phase change substances. The functions require that all
independent properties be entered with the appropriate absolute units.

c) (b, a_bc
XX








Figure 1. Scheme for Naming Property Functions

The functions were constructed to reflect and reinforce how property information is provided in
traditional property tables. Functions are provided for the saturation pressure based on
temperature and for the saturation temperature based on pressure. Saturated liquid and saturated
vapor functions are provided for specific volume (v), specific internal energy (u), specific
enthalpy (h), and specific entropy (s) based on either temperature or pressure. Functions for v, u,
h, and s of saturated mixtures are also provided as functions of quality and either temperature or
pressure. Functions that return quality are provided. Functions that return temperature or
enthalpy as functions of pressure and entropy, often required in the analyses of Rankine and
reversed-Rankine cycles, are provided. Finally, a function that determines temperature based on
pressure and enthalpy, often used when analyzing reversed-Rankine cycles, is provided. Table 2
presents a summary of the functions provided for the phase-change substances. The following
sections describe the source of the equation of state and any corrections or adaptations that were
made to the property formulations.



Returned
Variable
Underscore
Argument 1
Name
Argument 2
Name
Fluid
Argument 2
Argument 1
Table 2. Functions for the Phase Change Substances
Function or
Constant
Description
Tsat_P
XX
(P) Returns the saturation temperature as a function of pressure
Psat_T
XX
(T) Returns the saturation pressure as a functions of temperature
zf_T
XX
(T) Returns the z property (v, u, h, or s) for saturated liquid as a function of temperature
zf_P
XX
(P) Returns the z property (v, u, h, or s) for saturated liquid as a function of pressure
zg_T
XX
(T) Returns the z property (v, u, h, or s) for saturated vapor as a function of temperature
zg_P
XX
(P) Returns the z property (v, u, h, or s) for saturated vapor as a function of pressure
z_Tx
XX
(T,x)
Returns the z property (v, u, h, or s) for a saturated mixture as a function of
temperature and quality
z_Px
XX
(P,x)
Returns the z property (v, u, h, or s) for a saturated mixture as a function of pressure
and quality
z_TP
XX
(T,P)
Returns the z property (v, u, h, or s) for either a compressed liquid or a superheated
vapor as a function of temperature and pressure
x_Tz
XX
(T,z)
Returns the quality of a saturated mixture as a function of the temperature and the z
property (v, u, h, or s)
x_Pz
XX
(T,z)
Returns the quality of a saturated mixture as a function of the temperature and the z
property (v, u, h, or s)
T_Ps
XX
(P,s) Returns the temperature as a function of pressure and entropy
h_Ps
XX
(P,s) Returns the enthalpy as a function of pressure and entropy
T_Ph
XX
(P,h) Returns the temperature as a function of pressure and enthalpy


R-22

The equation of state used in the formulation of the R-22 function set is that proposed by
Wagner, Marx, and Pru| |13|. The R-22 formulation is based on the dimensionless Helmholtz
free energy and covers the entire fluid region from 116 K to 550 K at pressures up to 200 MPa.

The R-22 function set was only tested at maximum pressures and temperatures of 2.4 MPa and
450 K, respectively, as these are the high extreme values found for R-22 in most
thermodynamics textbooks. The range of validity of the R-22 function set is slightly smaller
than that identified by Wagner et al. Problems evaluating properties as functions of pressure and
entropy were identified around the critical point.

Ammonia

The equation of state used in the formulation of the ammonia function set is that proposed by
Haar and Gallagher [14]. It is also based on the dimensionless Helmholtz free energy and covers
temperatures from 195 K to 750 K and pressures from dilute gas to 500 MPa.

The ammonia function set was also tested at lower maximum pressures and temperatures, 2 MPa
and 550 K, respectively, as these are the high extreme values for ammonia found in most
thermodynamics textbooks. As with the R-22 function set, significant deviations from the
experimentally measured ammonia property values were identified near the critical point.

The functions for ammonia were adapted because of inconsistencies found in the auxiliary
equations for the saturated vapor and liquid densities. Despite many hours of effort, the source
of the problems could not be identified, hence new auxiliary equations for the saturated vapor
and liquid densities were developed. Demonstrating MathCADs powerful analysis tools, the
new auxiliary equations were developed using MathCADs linfit function. The linfit
function generates the best-fit coefficients of a linear combination of functions [15]. Equation
(1) presents the auxiliary equation for the saturated vapor density, and equation (2) presents the
auxiliary equation for the saturated liquid density.


(
(
(
(

|
|

\
|
+ =

=
2
1
9
1
2
1
0
exp
i
i
i
c
g
Cg Cg u u

(1)


(
(
(
(

|
|

\
|
+ =

=
2
1
9
1
2
1
0
exp
i
i
i
c
f
Cf Cf u u

(2)
Where

c
T
T
=1 u (3)

The constants for Eqs. (1) and (2) are listed in Table 3. Figures 2 and 3 present a comparison of
the developed auxiliary equations to the values reported by Haar and Gallagher [14].

Table 3. Constants for the Ammonia Auxiliary Equations
Constant Equation (1) Constant Equation (2)
Cg
0
1.49423985997742 Cf
0
1.26229794683888
Cg
1
11.5348327868205 Cf
1
0.2942327870764
Cg
2
171.453114991705 Cf
2
31.2736018575536
Cg
3
-1.34712691210935E+3 Cf
3
-480.651583063728
Cg
4
1.09383974999497E+4 Cf
4
3.82312159369239E+3
Cg
5
-5.06303055361903E+4 Cf
5
-1.80222499821142E+4
Cg
6
1.48581146651944E+5 Cf
6
5.20379044624135E+4
Cg
7
-2.60029819302634E+5 Cf
7
-9.04024162719172E+4
Cg
8
2.51215980424554E+5 Cf
8
8.68081267630708E+4
Cg
9
-9.98576487272334E+4 Cf
9
-3.54164892213865E+4


Propane

The equation of state used in the formulation of the propane Mathcad function set is that
proposed by Miyamoto and Watanabe [16]. It is also based on the dimensionless Helmholtz free
energy and covers temperatures from 85.48 K (triple point) to 623 K, and pressures to 103 MPa.

200 250 300 350 400
0
0.1
0.2
0.3
Reported Data
Best Fit, Eq. (1)
Temperature (K)
S
a
t
u
r
a
t
e
d

V
a
p
o
r

D
e
n
s
i
t
y

(
k
g
/
m
3
)
200 250 300 350 400
0.2
0.4
0.6
Reported Data
Best Fit, Eq. (2)
Temperature (K)
S
a
t
u
r
a
t
e
d

L
i
q
u
i
d

D
e
n
s
i
t
y

(
k
g
/
m
3
)

Figure 2. The Ammonia Saturated Densities and Auxiliary Functions

200 220 240 260 280 300 320 340 360 380 400
0.5
0
0.5
Saturated Vapor
Saturated Liquid
Temperature (K)
P
e
r
c
e
n
t
a
g
e

E
r
r
o
r

Figure 3. The Percentage Error Associated with the Auxiliary Functions for Saturated Densities

The propane Mathcad function set was tested to maximum pressures and temperatures of 4.0
MPa and 473 K, as these are common maximum values for propane found in thermodynamic
property tables of typical thermodynamic textbooks [17, 18, 19]. As with R-22 and ammonia,
the propane functions significant errors around the critical point. The propane function set also
exhibited substantial and unexplained errors in the compressed liquid region. To circumvent the
errors in the compressed liquid region, users are encouraged to approximate specific volume,
internal energy, and entropy as the saturated liquid specific volume, internal energy, and entropy
at the given temperature. Enthalpy can be evaluated similarly, but requires accounting for the
difference in pressure from the saturation pressure. Equations (4) through (7) present the
compressed liquid approximations suggested for the propane function set.

) ( ) , (
.
T v P T v
f
liquid
comp
~ (4)

) ( ) , (
.
T u P T u
f
liquid
comp
~ (5)

) ( ) , (
.
T s P T s
f
liquid
comp
~ (6)

( ) ( ) ( ) ( ) T P P T v T h P T h
sat f f
liquid
comp
+ ~ ) , (
.
(7)

Moist Air

Functions were developed for the properties of moist air above the triple-point temperature of
water. The function equations are those presented in any undergraduate thermodynamics
textbook [17, 18, 19]. However, the function results for enthalpy will differ from the ASHRAE
psychrometric charts when using English/USCS units [20]. This difference is caused by the
omission of the reference temperature in the enthalpy expressions used in the ASHRAE
formulations. While the absolute values of enthalpy will not agree, differences (deltas) in
enthalpy will be the same when evaluated using either the functions or the psychrometric charts.

Table 4 presents the twenty functions available for the thermodynamic properties of moist air.
Because of the many parameters associated with moist air (T, P, P
v
, e
s
, e, |, , h
ma
, T
dp
, T
wb
,
v
ma
), a comprehensive set of functions for each parameter was not developed. The functions
created are functions that are most commonly required for engineering processes such as moist
air heating, cooling, and mixing.

While the set of thermodynamic functions for moist air is not comprehensive, the available
functions enable users to create new functions as needed by nesting the distributed functions.
For example, to create a function to evaluate the specific volume as a function of the
temperature, enthalpy, and pressure, the user could nest the function e_Th
ma
into the v_TeP
ma

function. The Mathcad construction would appear as:

v_ThP
ma
T h , P , ( ) v_TeP
ma
T e_Th
ma
T h , ( ) , P , ( ) :=


The user ability to nest available functions is a very powerful feature of Mathcad.

Examples

Three example problems are provided demonstrating the use of the function sets in the analysis
of thermodynamic processes. The examples provided include 1) the analysis of a R-22 and
ammonia cascaded refrigeration cycle, 2) the analysis of a propane based heat pump cycle, and
3) the analysis of an evaporative air cooling device. The complete example solutions are
presented in the appendices.

R-22 and Ammonia Cascaded Refrigeration Cycle

Appendix A presents the analysis of a cascaded ammonia and R-22 refrigeration cycle with
ammonia operating in the topping cycle. The parameters of the cascade cycle provided are the
cold reservoir temperature, the ambient temperature, the ammonia mass flow rate and evaporator
pressure, and the R-22 condenser pressure. The mass flow rate of R-22, the rate of heat transfer
Table 4. Functions for the Properties of Moist Air
Function Description
e_PvP
ma
(Pv,P) Returns humidity ratio as a function of vapor pressure and pressure
e_Te
ma
(T, h)
Returns humidity ratio as a function of temperature and enthalpy per unit mass of dry
air
e_TTwbP
ma
(T,Twb,P)
Returns humidity ratio as a function of temperature (dry bulb), wet bulb temperature,
and pressure
e_T|P
ma
(T,|,P) Returns humidity ratio as a function of temperature, relative humidity, and pressure
e_TdpP
ma
(Tdp,P) Returns humidity ratio as a function of the dew point temperature and the pressure
es_TP
ma
(T,P) Returns saturation humidity ratio as a function of temperature and pressure
Pv_eP
ma
(e,P) Returns vapor pressure as a function of humidity ratio and pressure
Pv_T|
ma
(T, |) Returns vapor pressure as a function of temperature and relative humidity
_TPvP
ma
(T,Pv,P)
Returns degree of saturation as a function of temperature, vapor pressure, and
pressure
|_TPv
ma
(T,Pv) Returns relative humidity as a function of temperature and vapor pressure
|_TeP
ma
(T, e,P) Returns relative humidity as a function of temperature, humidity ratio, and pressure
h_Te
ma
(T, e)
Returns enthalpy per unit mass of dry air as a function of temperature and humidity
ratio
h_TTwbP
ma
(T,Twb,P)
Returns enthalpy per unit mass of dry air as a function of temperature (dry bulb), wet
bulb temperature, and pressure
h_T|P
ma
(T,|,P)
Returns enthalpy per unit mass of dry air as a function of temperature, relative
humidity, and pressure
h_TTdpP
ma
(T,Tdp,P)
Returns the enthalpy per unit mass of dry air as a function of the temperature, the dew
point temperature, and the pressure
T_eh
ma
(e,h)
Returns temperature as a function of humidity ratio and the enthalpy per unit mass of
dry air
Tdp_Pv
ma
(Pv) Returns dew point temperature as a function of the vapor pressure
Tdp_eP
ma
(e,P) Returns dew point temperature as a function of the humidity ratio and the pressure
v_TeP
ma
(T,e,P)
Returns the specific volume per unit mass of dry air as a function of the temperature,
the humidity ratio, and the pressure
v_T|P
ma
(T, |,P)
Returns the specific volume per unit mass of dry air as a function of the temperature,
the relative humidity, and the pressure


from the R-22 to the ammonia, the total power of the compressors, and the system COP
R
are
required results. The most significant aspect of this example solution is the use of multiple
property function sets in the same worksheet. To obtain the required answers, the ammonia and
R-22 functions must be used concurrently.

Propane Heat Pump Cycle

In Appendix B, a heat pump using propane as the working fluid is analyzed. In the problem
statement, the evaporator temperature and the condenser pressure are specified. The required
results are the mass flow rate of propane required to provide a set heating load, the pressure of
the evaporator, the compressor exit temperature of the propane, the total power required by the
compressor, and the COP
H
of the heat pump. Appendix B demonstrates the usefulness of the
propane functions.

Evaporative Air Cooling

An example analysis of air through an evaporative cooler system is presented in Appendix C. In
the example, moist air enters a device at a steady rate. Cold liquid water is injected into moist
air. The process cools the moist-air stream while increasing the relative humidity. The
usefulness of the moist air functions is demonstrated in determining the temperature and relative
humidity of the air exiting the device.

Discussion and Conclusions

As part of a continued effort to develop thermodynamic property function sets for use with
Mathcad in applied thermodynamics courses, functions were developed to evaluate the properties
of ammonia, propane, R-22, and moist air. The development of the function sets for use with
Mathcad and differences in the function results compared to common textbook tables and charts
were discussed. Examples demonstrating the use of the function sets related to applied
thermodynamic problems were also provided.

The educational effectiveness of the current function sets has not been directly evaluated.
However, the results of student surveys assessing the ease of use of Mathcad, the thermodynamic
evaluation capabilities of Mathcad, and the overall student response to Mathcad employing the
previously developed property function sets are presented in Ref. [12]. The primary results of
the assessment were that 1) the functions enabled complex thermodynamic analyses that could
not be performed by hand calculations, 2) the use of the functions eased the time an effort
required to complete assignments, and 3) the students required very little preparation time for
using Mathcad. The addition of function sets for moist air, R-22, ammonia, and propane was an
effort to build on the strengths of the Mathcad function sets identified in previous publications
and assessments.

Acknowledgements

The authors Dr. Bharat K. Soni and the Department of Mechanical Engineering at the University of Alabama at
Birmingham for their support of these teaching activities. Dr. McClain would also like to thank his students for
their enthusiasm, dedication (or perseverance in some cases), and professionalism.

References

[1] Interactive Thermodynamics: IT, packaged with M. J. Moran and H. N. Shapiro, Fundamentals of
Engineering Thermodynamics, New York: Wiley and Sons, Fifth Edition, 2004.
[2] Schmidt, P. S., O. A. Ezekoye, J. R. Howell, and D. K. Baker, Thermodynamics: An integrated Learning
System, New York: Wiley and Sons, 2006.
[3] MathCAD, http://www.mathcad.com/, 2005.
[4] MATLAB 7.0.1: The Language of Technical Computing MatLab, http://www.mathworks.com/products/
matlab/, 2005.
[5] EES: Engineering Equation Solver, http://www.fchart.com/ees/ees.shtml, 2004.
[6] Hodge, B. K. and W. G. Steele, Computational Paradigms in Undergraduate Mechanical Engineering
Education, Presented at the 2001 ASEE Annual Conference and Exposition, Albuquerque, NM, June 2001.
ASEE2001-0147
[7] Caretto, L., McDaniel, D., and Mincer, T., Spreadsheet Calculations of Thermodynamic Properties,
Presented at the 2005 ASEE Annual Conference and Exposition, Portland, OR, June 12-15, 2005,
ASEE2005-0297.
[8] Maixner, M. R., Excel Analysis of Combined Cycle Power Plant, Presented at the 2005 ASEE Annual
Conference and Exposition, Portland, OR, June 12-15, 2005, ASEE2005-1222.
[9] Sexton, M. R. and Sexton, W. R., Aircraft Engine Simulation Project for Undergraduate Propulsion Course,
Proceedings of the ASME Turbo Expo 2006: Power for Land, Sea and Air, May 8-11, 2006, Barcelona,
Spain, GT2006-90139.
[10] McClain, S. T., The Use of MathCAD Functions for Thermochemical Analysis of the CHON System in an
Internal Combustion Engines Course, Presented at the 2004 ASEE Annual Conference and Exposition, Salt
Lake City, UT, June 20-23, 2004. ASEE2004-0731
[11] McClain, S. T., MathCAD Functions for Thermodynamic Analysis of Ideal Gases, Presented at the 2005
ASEE Annual Conference and Exposition, Portland, OR, June 12-15, 2005, ASEE2005-1291.
[12] McClain, S. T., A MathCAD Function Set for Solving Thermodynamics Problems, Presented at the 2006
ASEE Annual Conference and Exposition, Chicago, IL, June June 18-21, 2006, ASEE2006-0044.
[13] Wagner, W., Marx, V., Pru|, A., A New Equation of State for Chlorodifluoromethane (R22) Covering the
Entire Fluid Region from 116 K to 550 K at Pressures up to 200 MPa , International Journal of
Refrigeration, 1993, Vol. 16, No. 6, 373-389.
[14] Haar, L. and Gallagher, J.S, Thermodynamic Properties of Ammonia, Journal of Physical Chemistry, 1978,
Vol. 7, No. 3, 635-792.
[15] Linear combinations of functions, MathCAD Help file, MathCAD Version 13.0.
[16] Miyamoto, H. and Watanabe, K., A Thermodynamic Property Model for Fluid-Phase Propane,
International Journal of Thermophysics, 2000, Vol. 21, No. 5, 1045-1072.
[17] M. J. Moran and H. N. Shapiro, Fundamentals of Engineering Thermodynamics, New York: John Wiley &
Sons Inc., 5th ed. 2004.
[18] engel, Y. A. and Boles, M. A., Thermodynamics: An Engineering Approach, Boston: McGraw-Hill Inc., 5th
ed., 2006.
[19] Russell, L. D. and G. A. Adebiyi, Classical Thermodynamics, Fort Worth, TX: Saunders College Publishing,
1993.
[20] American Society of Heating, Refrigerating and Air-conditioning Engineers, ASHRAE Handbook --
Fundamentals, 1997.
Appendix A - Cascaded Refrigeration Cycle Example

With the important temperatures and pressures specified, the cycle analysis follows. The
ammonia cycle is analyzed first. The ammonia is assumed to be a saturated vapor at the exit of
the heat exchanger (state 1).
P
evap_R22
49.073kPa = P
evap_R22
Psat_T
R22
T
evap_R22
( )
:=
P
cond_NH3
1.344 10
3
kPa = P
cond_NH3
Psat_T
NH3
T
cmin_NH3
( )
:=
The condenser pressure and evaporator pressure for the ammonia and R22, respectively, are then
set as the saturation pressures at the minimum condenser and evaporator temperatures,
respectively.
T
evap_R22
273 K
K
55 =
T
evap_R22
218K = T
evap_R22
T
L
AT :=
T
cmin_NH3
273 K
K
35 =
T
cmin_NH3
308K = T
cmin_NH3
T
H
AT + :=
The minimum condenser temperature and evaporator
temperature for the ammonia and R22, respectively, are
then evaluated using a reasonable temperature difference to
achieve the required heat transfer.
AT 10 K := mdot
NH3
0.2
kg
s
:=
P
H_R22
200 kPa := P
L_NH3
100 kPa :=
T
L
273 45 ( ) K := T
H
273 25 + ( ) K :=
kPa 10
3
Pa :=
Solution: Required engineering units are defined. The design
parameters from the problem statement are entered to begin
the solution.
Sketches: A system schematic
is presented below.
Problem Statement: An ideal cascade refrigeration cycle is used to maintain a cold reservoir
temperature of -45 C. The ambient temperature is 25 C. Ammonia and R22 are used in the
topping and bottoming cycles, respectively. The ammonia exits the heat exchanger at a pressure
of 100 kPa. The R22 exits the heat exchanger at a pressure of 200 kPa. The mass flow rate of
the ammonia is 0.2 kg/s. Assuming the heat exchanger is adiabatic and the compressors are
isentropic, answer the following questions.
1. What is the mass flow rate of the R22?
2. What is the rate of heat transfer from the R22 to the ammonia?
3. What is the total work required by the compressors?
4. What is the COP of the system?
Reference:C:\ThermoII\R22Props.mcd
Reference:C:\ThermoII\AmmoniaProps.mcd

T-High
T-Low
Q-Low
Q-High
Ammonia
R-22
evaporator
condenser
W-in
W-in
Heat Exchanger
1
2 3
4
1
2 3
4
Appendix A - Cascaded Refrigeration Cycle Example (continued)
h
2_R22
258.425
kJ
kg
= h
2_R22
h_Ps
R22
P
H_R22
s
1_R22
,
( )
:=
T
max_R22
273 K
K
2.808 =
T
max_R22
275.808K = T
max_R22
T_Ps
R22
P
H_R22
s
1_R22
,
( )
:=
The compressor is assumed to be isentropic. The temperature at state 2 (the maximum cycle
temperature) and the enthalpy at state 2 may be determined since the pressure is known and the
entropy at state 2 equals the entropy at state 1.
s
1_R22
1.04
kJ
kg K
= s
1_R22
sg_P
R22
P
evap_R22
( )
:=
h
1_R22
226.15
kJ
kg
= h
1_R22
hg_P
R22
P
evap_R22
( )
:=
The R22 cycle is analyzed next. The R22 is assumed to b a saturated vapor at the exit of the
evaporator (state 1).
h
4_NH3
346.449
kJ
kg
= h
4_NH3
h
3_NH3
:=
Since the trap produces no work and is assumed to be adiabatic, the enthalpy at state 4 equals
the enthalpy at state 3.
h
3_NH3
346.449
kJ
kg
= h
3_NH3
hf_T
NH3
T
cmin_NH3
( )
:=
The maximum cycle temperature for the ammonia is 159.7 C. For an ideal Rankine cycle, state 3
is assumed to be a saturated liquid at the condenser temperature. Thus the enthalpy at state 3 is:
h
2_NH3
1.803 10
3

kJ
kg
= h
2_NH3
h_Ps
NH3
P
cond_NH3
s
1_NH3
,
( )
:=
T
max_NH3
273 K
K
159.732 =
T
max_NH3
432.732K = T
max_NH3
T_Ps
NH3
P
cond_NH3
s
1_NH3
,
( )
:=
The compressor is assumed to be isentropic. The temperature at state 2 (the maximum cycle
temperature) and the enthalpy at state 2 may be determined since the pressure is known and the
entropy at state 2 equals the entropy at state 1.
s
1_NH3
5.84
kJ
kg K
= s
1_NH3
sg_P
NH3
P
L_NH3
( )
:=
h
1_NH3
1.399 10
3

kJ
kg
= h
1_NH3
hg_P
NH3
P
L_NH3
( )
:=

Appendix A - Cascaded Refrigeration Cycle Example (continued)
The example successfully demonstrates the use of multiple property files in one Mathcad
worksheet.
COP
R
1.674 = COP
R
mdot
R22
h
1_R22
h
4_R22

( )

W
total_comp
:=
The coefficient of performance, COP
C
, is the rate of heat absorption across the R22 evaporator
divided by the work of the compressors.
W
total_comp
108.941kW = W
total_comp
W
R22_comp
W
NH3_comp
+ :=
W
R22_comp
28.082kW = W
R22_comp
mdot
R22
h
2_R22
h
1_R22

( )
:=
W
NH3_comp
80.86kW = W
NH3_comp
mdot
NH3
h
2_NH3
h
1_NH3

( )
:=
The total work required by the compressors is determined by multiplying the mass flow rates and
the enthalpy changes for each compressor, and adding the results.
Q
R22_to_NH3
210.498kW = Q
R22_to_NH3
mdot
R22
h
2_R22
h
3_R22

( )
:=
The rate of heat transfer from the R22 to the ammonia is determined below.
mdot
R22
0.87
kg
s
= mdot
R22
mdot
NH3
h
1_NH3
h
4_NH3

( )

h
2_R22
h
3_R22

:=
With all of the states evaluated, the cycle analysis proceeds quickly. The mass flow rate is
determined by performing a thermodynamic analysis on the heat exchanger.
h
4_R22
16.493
kJ
kg
= h
4_R22
h
3_R22
:=
Since the trap produces no work and is assumed to be adiabatic, the enthalpy at state 4 equals
the enthalpy at state 3.
h
3_R22
16.493
kJ
kg
= h
3_R22
hf_T
R22
T
he_R22
( )
:=
T
he_R22
247.967K = T
he_R22
Tsat_P
R22
P
H_R22
( )
:=
The maximum cycle temperature for the R22 is 2.8 C. For an ideal Rankine cycle, state 3 is
assumed to be a saturated liquid at the condenser temperature, or in this case, at the exit of the
heat exchanger. This temperature is determined by finding the saturation temperature associated
with the pressure of the R22 through the heat exchanger. Thus the enthalpy at state 3 is:
Appendix B Propane Heat Pump Cycle

Since the compressor's operation is described as reversible with negligible heat transfer, the
compression is isentropic, and the entropy at state 2 is equal to the entropy at state 1. Using
this and the given pressure at state 2, the enthalpy and temperature are determined.
s
1
0.419
BTU
lb R
= h
1
197.832
BTU
lb
= P
1
51.236psi =
s
1
sg_T
C3H8
T
1
( )
:= h
1
hg_T
C3H8
T
1
( )
:= P
1
Psat_T
C3H8
T
1
( )
:=
The solution begins by analyzing each state in the cycle. At state 1, the pressure, enthalpy and
entropy based on the assumption that the propane is a saturated vapor exiting the evaporator. The
pressure at state 1 sets the pressure of the evaporator.
Elec
cost
0.10
1
kW hr
:= C3H8
cost
1.95
1
gal
:= C3H8
HV
91000
BTU
gal
:=

C3H8
31.7
lb
ft
3
:= Qdot
H
100000
BTU
hr
:= P
2
180 psi := T
1
460 15 + ( ) R :=
Solution: The known values are defined below.
Sketches: A system schematic and T-s diagram are shown below.
Problem Statement: A novel concept for a heat pump system is required using propane as the
working fluid. In the event of a power outage, the propane could be routed through a burner to
provide the heating load. The heat pump would operate where the average outside temperature is
25 degrees F. It is desired to maintain an hot reservoir temperature of 72 degrees F. The propane
would leave the evaporator as a saturated vapor at 15 degrees F and be compressed to 160 psia.
It would then be condensed to a saturated liquid through the condenser. Assuming the
compressor operation is reversible with negligible heat transfer, answer the following questions.
1. What is the required mass flow rate to provide a heating load of 100,000 Btu/h?
2. What is the pressure of the evaporator?
3. What is the temperature of the propane leaving the compressor?
3. What is the total work required by the compressor?
4. What is the COP of the system?
Bonus: Assuming the heating value of propane is 91,000 Btu/gal. Also assume the price of
propane and electricity is $1.95/gal and $0.10/kWh, respectively. Compare the price of providing
a heating load of 100,000 Btu/h using the heat pump system to the price of burning the propane
directly.
Reference:C:\ThermoII\PropaneProps.mcd

Appendix B Propane Heat Pump Cycle (continued)
Based on the stated costs of propane and electricity, the cost of burning the propane for heat is
nearly four times as expensive as operating the heat pump.
W
comp
Elec
cost
0.527
1
hr
=
To determine the cost of the compressor work in the heat pump, the compressor work is multiplied
by the cost per kWh of electricity.
C3H8
cost
C3H8
HV
Qdot
H
2.143
1
hr
=
To determine the cost of burning propane to meet the heating load, the heating value is divided by
the unit cost to get $/Btu. This is then multiplied by the heating load for the cost in dollars per
hour.
COP
HP
5.563 = COP
HP
Qdot
H
W
comp
:=
The coefficient of performance (COP) of the heat pump is determined as the rate of heat delivery to
the high temperature space divided by the power of the compressor.
W
comp
5.268kW = W
comp
mdot
min
h
2
h
1

( )
:=
Using the calculated mass flow rate, the work required by the compressor is determined.
mdot
min
0.197
lb
s
= mdot
min
Qdot
H

h
3
h
2

:=
To determine the required mass flow rate to achieve a 100,000 Btu/h heating load, the heating load
is divided by the change in enthalpy from state 2 to 3.
h
4
h
3
:=
The enthalpy at state 4 is approximately the same as that at state 3.
T
3
556.143R = h
3
82.368
BTU
lb
=
T
3
Tsat_P
C3H8
P
3
( )
:= h
3
hf_P
C3H8
P
3
( )
:=
P
3
P
2
:=
The pressure at the exit of the condenser, state 3, is the same as that at the exit of the
compressor. The propane is assumed to leave the condenser as a saturated liquid at the
compressor exit pressure. The enthalpy and exit temperature are then determined.
T
2
566.221R = h
2
223.134
BTU
lb
=
T
2
T_Ps
C3H8
P
2
s
2
,
( )
:= h
2
h_Ps
C3H8
P
2
s
2
,
( )
:=
s
2
s
1
:=

Appendix C Humidification of Moist Air
m
a
e
1
m
w
+ m
a
e
2
or
in
m
w
out
m
w
Performing the mass balance on the water vapor:
m
a1
m
a2
m
a
or
in
m
a
out
m
a
With all of the important inlet properties known, the system may be analyzed using conservation of
species and conservation of energy. Since there is only one inlet and one exit for the moist air, the
mass balance on the water reduces to
h
w
55.233
kJ
kg
= h
w
h_TP
H2O
T
w
atm ,
( )
:=
The water properties are then evaluated:
h
1
36.358
BTU
lb
= h
1
h_Te
ma
T
1
e
1
,
( )
:=
e
1
0.017 = e
1
e_T|P
ma
T
1
|
1
, atm ,
( )
:=
m
a
0.911
lb
s
= m
a
Vdot
1
v
1
:= v
1
14.63
ft
3
lb
= v
1
v_T|P
ma
T
1
|
1
, atm ,
( )
:=
The properties of the moist air at the inlet and the properties of the liquid water are determined using the
referenced property functions. Beginning with the inlet air properties:
m
w
15
lb
hr
:= T
w
55 460 + ( ) R :=
Vdot
1
800
ft
3
min
:= |
1
35% := T
1
105 460 + ( ) R :=
Solution: To begin the solution, the known quantities from the problem statement are entered.
Evaporative
Cooler
800 CFM of Air
105 F
35% rh
Q = 0
W = 0
T = ?
rh = ?
liquid water
15 lbm/hr
55 F
1 2
3
Sketch: A schematic of the evaporative cooler is provided below.
Problem Statement: Air at 105 F and a relative humidity of 35% enters an evaporative cooler at a rate of
800 cfm. Liquid water at 55 F is injected into the air at a rate of 15 lbm/hr. Heat transfer ftrom the
cooler to the surroundings is negligible. What are temeprature and relative humidity of the air exiting the
evaporative cooler?
Reference:C:\ThermoII\SteamProps.mcd

Appendix C Humidification of Moist Air (continued)
Summary: 15 lbm of liquid water at 55 F are injected into 800 cfm of air at 105 F and a relative humidity
of 35%. Moist air leaves the device at 86.7 F with a relative humidity of 77.1%.
|
2
77.117% = |
2
|_TeP
ma
T
2
e
2
, atm ,
( )
:=
T
2
460 R
R
86.747 = T
2
546.747R = T
2
T_eH
ma
e
2
h
2
,
( )
:=
The referenced functions are used to determine the exiting temperature and relative humidity.
h
2
36.869
BTU
lb
= h
2
h
1
e
2
h
w
+ :=
Solving for the enthalpy of the moist air exiting the cooler yeilds:
0 m
a
h
2
m
w
h
w
+ m
a
h
1

Since heat transfer is negligible and the cooler has no moving parts, the steady flow energy equation
reduces to:
Q W
out
mh

in
mh

The steady flow energy equation is then:


e
2
0.022 = e
2
e
1
m
w
m
a
+ :=
Solving for the exiting humidity ratio yields: