You are on page 1of 8

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/236851445

MS Excel Spreadsheet Add-in for Thermodynamic Properties and Process


Simulation of R152a

Article · April 2013

CITATIONS READS

13 5,386

2 authors:

Chika Oko Ogheneruona Diemuodeke


University of Port Harcourt University of Port Harcourt
34 PUBLICATIONS   440 CITATIONS    56 PUBLICATIONS   580 CITATIONS   

SEE PROFILE SEE PROFILE

Some of the authors of this publication are also working on these related projects:

Waste-to-Energy Potential of Port Harcourt City View project

Analysis of Subsea Energy Supply Systems for Improved Maintenance Using ANFIS and TOPSIS View project

All content following this page was uploaded by Ogheneruona Diemuodeke on 22 April 2014.

The user has requested enhancement of the downloaded file.


ISSN 1923-8460[PRINT]
Energy Science and Technology ISSN 1923-8479[ONLINE]
Vol. 5, No. 2, 2013, pp. 63-69 www.cscanada.net
DOI:10.3968/j.est.1923847920130502.756 www.cscanada.org

MS Excel Spreadsheet Add-in for Thermodynamic Properties and Process


Simulation of R152a

Oko, C.O.C.[a], *; Diemuodeke, E.O.[a, b]

[a]
Mechanical Engineering Department, Faculty of Engineering,
University of Port Harcourt, Rivers State, Nigeria. Oko, C.O.C., Diemuodeke, E.O. (2013). MS Excel Spreadsheet Add-
[b]
Process Systems and Energy Group, Department of Offshore, Process in for Thermodynamic Properties and Process Simulation of R152a.
and Energy Engineering, Cranfield University, Cranfield, UK. Energy Science and Technology, 5(2), XX. Available from: http://www.
* Corresponding author. cscanada.net/index.php/est/article/view/j.est.1923847920130502.756.
DOI: http://dx.doi.org/10.3968/j.est.1923847920130502.756.
Received 09 January 2013; accepted 22 April 2013

Abstract
Microsoft Excel add-in has been developed for the
INTRODUCTION
thermodynamic properties of refrigerant DiflouroEthane Thermodynamic properties of refrigerants are important
(R152a) an alternative refrigerant to R134a, which has no in refrigerating process analysis and system design. The
Ozone Depletion Potential. Thermodynamic properties’ property data are usually determined semi-empirically
equations for R152a were formulated from a popular and are either tabulated or provided as charts of
equation of state. The equations were transformed into a properties. But, the use of property tables frequently
computer program in Microsoft Excel-Visual Basic for requires interpolation between the tabulated data, which
Application in Integrated Development Environment is time consuming and reading the property charts is also
as an Excel add-in. The add-in is able to compute the strenuous, time consuming and always prone to errors.
thermodynamic properties of R152a refrigerant - specific However, the extensive use of computing facilities in
volume, internal energy, enthalpy, and entropy in the wet, contemporary engineering practice limits the use of
subcooled and superheated-vapor regions. The calculated property charts (Dromey, 1985). The trend is towards
values are accurate compared to the standard reference the development of computer packages that are capable
properties tables for refrigerants. Computed properties’ of automatic generation of the values of the desired
data can easily be used in the Excel spreadsheet for properties, and thus, facilitating their use in engineering
process analysis, simulation and design of R152a analysis. The use of thermodynamics properties computer
refrigerating plants. The solution scheme and computer packages can improve the curiosity of engineering
language adopted in this work are easy to apply and use students in the understanding of the properties tables and
as opposed to the available sophisticated and expensive charts (Tan and Chua, 2003).
computer software packages; and the MS Excel add-in Beckman and Klein (1996) developed a commercial
presented in this paper would be useful to both practicing software package, which is not affordable by majority of
engineers and engineering students in the area. An the developing natures, called the Engineering Equation
application was illustrated by solving a typical problem in Solver (EES) that has the capability of analyzing
R152a refrigerating process analysis. thermodynamic and transport properties of many fluids
Key words: Excel add-in; Excel-VBA; used in engineering. EES incorporates the programming
Thermodynamic Properties; R152a; Refrigeration. structure of C and FORTRAN with a built-in solver,
graphical capabilities and many mathematical functions.
Refprop is also a FORTRAN-based commercial software
that allows a user to look up thermodynamic properties
for most refrigerants currently in use. In addition to pure

63 Copyright © Canadian Research & Development Center of Sciences and Cultures


MS Excel Spreadsheet Add-in for Thermodynamic
Properties and Process Simulation of R152a

refrigerant properties, Refprop (computer software) uses instead of the Internet applets, would be of greater use
either the Carnahan-Startind-DeSantis (CSD) hard sphere in regions where there is limited or unreliable Internet
or the Modified Benedict-Webb- Rubin (MBWR) equation access. Zhang and Muehlbauer (2012) developed MS
of state to calculate the properties of refrigerant mixtures. Excel tool, with embedded macros of Visual Basic
The Visual Basic for Applications (VBA) is a macro Application, for simulation of residential heat pump. The
language available in Microsoft Office applications and Zhan and Muehlbauer (2012) Excel tool cannot compute
in other non-Microsoft software (e.g. Arc Info). Excel is thermodynamic properties; moreover, is not installable as
a powerful spreadsheet in Microsoft Office. Even though an add-in.
it was developed primarily for business applications, its Therefore, this paper presents a user-friendly
ease of use and wide distribution make it a very powerful committee-type Excel add-in for the thermodynamic
tool for scientists and engineers (Deane, 2005). Excel properties of R152a, ThermoProp_R152a, which provides
and Visual Basic developed separately, and were only the facility for their direct use in process analysis using the
linked by Microsoft once it started to use VBA as the Excel spreadsheet. The choice of R152a is because it is an
macro language for its Office products. VBA follows alternative to R134a; both refrigerants, R134a and R152a,
the syntax of Visual Basic (VB), and an Integrated are replacements for the formerly popular R12, which has
Development Environment (IDE) is available in the been phased out for having Ozone Depletion Potential
different applications that offer VB. Excel-VBA contains (ODP) (Ghodbane, 1999; Arora, 2000; Oko, 2012).
a lot of pre-programmed elements like forms and controls The computer language adopted in this work is easy to
(buttons, text boxes, list boxes, etc.). Many mathematical install, use and modify as opposed to the sophisticated
and non-mathematical functions are accessible through and expensive computer software packages used by most
the spreadsheet and which are not available in Visual researchers in the area (Beckman and Klein, 1996).
Basic (Dean et al, 2005). Excel provides graphics, which
are relatively easy to manipulate compared with graphics
within Visual Basic. Main disadvantage of Excel-VBA is 1 GOVERNING EQUATIONS
that, one cannot create a stand-alone program with it. That The changes in the specific internal energy (u), specific
is, the user needs to have Excel in his or her computer to enthalpy (h) and specific entropy (s) at constant
be able to use Excel-VBA programs. However, the Excel temperature in the vapour phase are, respectively,
add-ins are computer programs (tools) written within the ଶ
߲ܲ
Excel environment that extends the functionality of the ሺ‫ݑ‬ଶ െ ‫ݑ‬ଵ ሻ ் ൌ න ൤ܶ ൬ ൰ െ ܲ൨ ݀‫ ݒ‬ (1)
basic product (Liengme, 2000). These tools make difficult ଵ ߲ܶ ௩

tasks easier, automate repetitive operations, and add new ߲ܲ
features. Add-ins can increase productivity by focusing ሺ‫ݏ‬ଶ െ ‫ݏ‬ଵ ሻ ் ൌ න ൬ ൰ ݀‫ ݒ‬ (2)
ଵ ߲ܶ ௩
on a single task or function. Most Microsoft Excel add-
ins can be divided into two broad categories: add-ins that and ሺ݄ଶ െ ݄ଵ ሻ ் ൌ ሺ‫ݑ‬ଶ െ ‫ݑ‬ଵ ሻ ൅ ሺܲଶ ‫ݒ‬ଶ െ ܲଵ ‫ݒ‬ଵ ሻ (3)
work with Microsoft Excel (committee), and add-ins that The specific latent heat is given by the Clapeyron
take over the complete workspace (dictators). equation as
Most of the computer software packages for the ݀ܲ௦
൫݄௙௚ ൯ ൌ ൬ ൰ ܶ൫‫ݒ‬௚ െ ‫ݒ‬௙ ൯ (4)
determination of thermodynamic properties and simulation ݀ܶ௦
of refrigeration processes require subscription, which are Where v, P, and T are the specific volume (m3kg-1),
generally expensive for the developing countries. One the absolute pressure (kPa) and the absolute temperature,
way to make some of these computer tools available to respectively; the indices s, f, g, and fg denote saturation,
the developing countries is through the Internet. With the liquid saturation, vapour saturation and latent conditions,
rapid evolution of Internet, there are now several websites respectively.
that provide online computation of thermodynamic The saturation vapour correlation for R152a is given
properties for pure substances. There is a good agreement as (Arora, 2000)
between the results generated by the free online Internet �� ��
applets and those generated by the commercial desktop ln � � � ��7.��5���� � ��� � � �.������� � ��� ��.� �
�� ��
application software (Tan and Chua, 2003). However,
a report has shown that about 13.5% only of African 2.57557�� � ��� ��.� �
population has Internet access (Internet World Stats, (5)
2012), therefore, Internet applets for thermodynamic ்ೞ
Where ܶ௥௦ ൌ , , the index c refers to the critical state
properties may not be available to the majority of African ்೎
students. Since Microsoft Office is readily available in andis reduced saturation temperature
most computers it suffices, therefore, to say that Microsoft The Soave Redlich-Kwong equation of state (Kamei et
embedded software for thermodynamic properties, al, 1990) is used for the analysis of R152a:

Copyright © Canadian Research & Development Center of Sciences and Cultures 64


Oko, C.O.C.; Diemuodeke, E.O. (2013).
Energy Science and Technology, 5( 2),63-69

ܴܶ ‫ܣ‬௖ ሾͳ ൅ ݉ሺͳ െ ܶ௥଴Ǥହ ሻሿଶ The values of the molecular mass, the critical pressure
ܲൌ െ (6) and critical temperature for R152a are, respectively,
‫ݒ‬െܾ ‫ݒ‬ሺ‫ ݒ‬൅ ܾሻ —
M =66.051[kg/kmol]; P c=4760[kPa] and Tc=113.3[ oC]
where A c=0.42748R 2T c2/P c, kPam 6kg;b=0.08664RTc (Arora, 2000).
/P c, m 3 kg -1 ;m=0.48508+1.55171ω _ 0.15613ω 2 ;ω=_ The acentric factor (ω) for the analysis of R152a
— — ——
logPsr_1 at Tr =0.7; Tr=T/Tc ;Prs=Ps/Pc ;R=R/M;R=8.3142 properties used here is ω=0.265142; the reference state
-1 -1 —
is the universal gas constant, kJkmol K ; M is the properties (RSP) used in this work are: P o= 4.0[kPa];
molecular mass, kgkmol-1; Tr is the reduced temperature, To = 273.15[K]; ho = 512.9060[ kJ/kg]; and so = 2.6652[kJ/
dimensionless; ω is acentric factor, dimensionless; is kgK].
reduced saturation pressure; and R is the gas constant,
kJkg-1K-1.
The saturation liquid density ( ρf ) and the zero- 2 COMPUTATIONAL ALGORITHM
pressure isobaric specific heat capacity (cpo) for R152a are
The thermodynamic property analysis is carried out in the
given, respectively, as (Arora, 2000)
following steps:
ߩ௙
ൌ ͳ ൅ ͳǤͺ͸͹ͷ͸ሺͳ െ ܶ௥௦ ሻ଴Ǥଷଶ଺ ൅ ሺͳ െ ܶ௥௦ ሻ଴Ǥ଼ଷ଺ (7) Start
ߩ௖ 1. Input data
��� � 0�1�1�1 � ������ � 10�� � � ��0���� � (i) obtain the phase of R152a (wet, saturated vapour,
and (8) saturated liquid , subcooled liquid or superheated vapour);
10�� � � ��1�11� � 10��� � �
where ρf and ρc are in kgm-3; and cpo is in kJkg-1K-1 (ii) specify the desired (unknown) property (specific
With the knowledge of two thermodynamic properties enthalpy , specific entropy, specific volume, temperature,
one can find the quality (α) of the refrigerant at the given pressure , specific internal energy, or quality);
state in the wet region, saturated mixture: (iii) obtain the value(s) of any one (for saturated
߮ െ ߮௙ states) or two (for other states) known properties;
ߙൌ 2. Compute the desired unknown property;
߮௙௚ (9)
3. Output the desired data (property name and
where φ,φ and φ =φ _φ are some thermodynamic
f fg g f numerical value);
properties in the wet region, corresponding saturated 4. Use the output for process analysis, if desired;
liquid property and the corresponding latent property of 5. Generate table of properties, if desired;
evaporation, respectively; and . Stop.
The formulations for the specific enthalpy (h), specific
entropy (s) and specific internal energy (u) are obtained
for R152a in the vapour phase by integrating the equation
of state, equation (6), and applying equations (1), (2) and 3 SOFTWARE IMPLEMENTATION
(3), respectively, as follows: The software was developed in Microsoft Excel Visual
� �� �
� � �� � �� � �� � �� ��� �� � ����� � ������ ln Basic for Application (Excel-VBA) as an Excel add-
� � ���
in, called ThermoProp_R152a, using all the relevant
(10) correlations for the thermodynamic property analysis
� �� ������ �� �� �� ���/����� of R152a, given in section 1, the Governing Equations,
� � �� � �� ��� � � ln � �� ���� ln
� � �� � � �� /� and following the computational Algorithm presented
(11) in section 2. Some of the procedures are iterative with
and an error bound of 0.01% (Kreyszig, 2005). The user

� � �� � �� � �� ��� �� �
��
����� � ������ ln

(12) interface in the software was designed using the control
� � ��� toolbox of Excel-VBA IDE. The interface retrieves
Where G(T)=0.808334T _1.707408(TTc) ; c
-1 -1/2
and supplies information on any of the thermodynamic
ܴܶ properties. A command button control on the form is used
I(T)=1.899074 _ 0.899074(TTc-1) 2; ‫ ݒ‬௜ௗ ൌ ; the
ܲ଴ to run a macro that implements a particular function.
index “0” refers to the reference state property; and the After initiating the computation, by clicking on the
superscript “id” refers to the ideal state property. start drop menu, results are transferred to a pre-selected
The specific latent heat hfg is obtained by integrating cell in an active worksheet of the Microsoft Excel. The
equation (5) and then substituting the result into equation thermodynamic analysis is initiated by entering formulas
(4) to get into cells and referencing the addresses of cells that
ଶȀଷ ଶȀହ hold numerical values that are relevant to a particular
ܶ௖ ܶ௖ ܶ௖
݄௙௚ ൌ ܶܲ௦ ቆ͹ǤͶ͸ͷͺͺ െ ͳǤʹ͸͵ͳʹ ହȀଷ ൅ ͳǤͲ͵Ͳʹʹͺ ଻Ȁହ ቇ ൫‫ݒ‬௚ െ ‫ݒ‬௙ ൯ analysis. The worksheet automatically does the numerical
ܶ௦ଶ ܶ௦ ܶ௦
computation using the formulas entered into the cells.
(13)
3.1 Using ThermoProp_R152a

65 Copyright © Canadian Research & Development Center of Sciences and Cultures


MS Excel Spreadsheet Add-in for Thermodynamic
Properties and Process Simulation of R152a

After a successful installation of the software as an on the menu bar and then click on the Start button of the
Excel Add-in, click on the ThermoProp_R152a menu

ThermoProp_R152a menu as shown in figure 1.

Figure 1
Excel Worksheet Showing the Start Drop Menu other cases). Key in the numerical values of the known
By clicking on the start button of the ThermoProp_ properties into the text boxes in the frame captioned Input
R152a menu, the window shown in figure 2 appears. the known. The computational process commences by
Select the analysis type (Saturated Liquid, Saturated clicking on the command button captioned Read. Results
Vapour, Liquid + Vapour, Superheated Vapour or are shown in the output frame below the input the known
SubCooled liquid) by clicking on relevant command frame. Numerical results may also be transferred to the
button. Select the unknown property from the combo worksheet by clicking on the command button captioned
box captioned unknown property. In the combo box transfer. The process continues for another state point by
captioned function of select one known property (for an clicking on the Cont.R152a drop menu shown in figure 1.
unknown saturated property) or two known properties (for

Figure 2
Final Computation Step with Result

3.2 Applications of ThermoProp-R152a


the mass flow rate of the refrigerant is 3.2 kgs-1 and
As an excel add-in, ThermoProp-R152a is designed to
temperature of refrigerant leaving the regenerator is
aid students as well as practising refrigerating system
15 oC, determine the coefficient of performance (COP),
engineers in their design, analysis and/or performance
capacity of the plant, power consumption of plant and
analysis work with R152a by automatically providing the
heat transfer rate in the condenser.
needed R152a property data. For example, consider the
following analysis problem: Solution
1. Input Data
A refrigerator with R152a operates at temperatures Condenser temperature, T k = 35 o C; Evaporator
of 35 oC and -15 oC for the condenser and evaporator temperature, Te = - 15 o C; Regenerator vapour exit
respectively. If a regenerator is installed in the system, temperature, Tre = 15 oC; Mass flow rate, mf = 3.2 kgs-1;

Copyright © Canadian Research & Development Center of Sciences and Cultures 66


Oko, C.O.C.; Diemuodeke, E.O. (2013).
Energy Science and Technology, 5( 2),63-69

2. Sketches and Diagram 4. Analysis


3. Assumption The solution obtained with ThermoProp_R152a is
Isentropic compression, (s1a = s2); zero heat loss in presented in Figure 4.
regenerator.

Figure 3
Vapour Compression System and Vapour Compression Cycle

Figure 4
Analysis Results with ThermoProp_R152a

67 Copyright © Canadian Research & Development Center of Sciences and Cultures


MS Excel Spreadsheet Add-in for Thermodynamic
Properties and Process Simulation of R152a

provided by Arora (2000) in the temperature range from -


4. RESULTS AND DISCUSSION
40 oC to 60 oC. The maximum deviation of 4.5 % occurs
Figure 4 shows results obtained with the ThermoProp_ in the value of the saturated vapour specific volume
R152a, with its application with refrigerating system (vg). This may be due to the approximate nature of the
that uses refrigerant R152a. Figure 5 shows the relative correlations used here or may be associated with the
percentage deviation (RPD) of the various R152a difficulty in measuring the specific volume of vapour, but
properties generated by ThermoProp_R152a from those are within the acceptance range for most applications.

Figure 5
RPD of ThermoProp_R152a Data from Data Presented by Arora (2000)

language adopted in this work are easy to apply and use


CONCLUSION as opposed to the sophisticated and expensive computer
Most computer software packages for the determination of software used by most researchers in the area. The
thermodynamic properties and simulation of refrigeration accuracy of its output is good enough for engineering
processes require subscriptions, which are generally practice and, therefore, strongly recommended it as a
expensive for people from the developing countries, teaching tool, which would be useful in regions where
especially the African countries. Internet applets seem there is limited internet access. Similar add-in for
to be veritable tools for thermodynamic properties of psychrometric and drying processes has been developed
refrigerants. However, report has shown that absolute (Oko and Diemuodeke, 2010), which has been proven by
majority of African population has no Internet access, Huayamave (2010) to be very useful.
which makes the available Internet applets not useful to
African students. Microsoft Office is available in nearly
all the computers used by African students, therefore, REFERENCES
Microsoft embedded software for thermodynamic Arora, C. P. (2000). Refrigeration and Air Conditioning. Tata
properties, instead of Internet applets, would be useful McGraw-Hill, New Delhi.
in regions where there is a limited Internet access. The Beckman, W and Klein, S. (1996). Engineering Equation Solver
present work presents computer software, ThermoProp_ (EES) User manual. McGraw Hill, New York.
R152a, developed in Microsoft Excel Visual Basic for Dromey, R. G. (1982). How to Solve It by Computer. Prentice
Application (Excel-VBA) as Excel add-in. The add-in is Hall International, New York.
able to compute the thermodynamic properties of R152a Deane A. (2005). Developing Mathematics Creativity with
refrigerant - specific volume, internal energy, enthalpy, Spreadsheets. Journal of the Korea Society of Mathematical
and entropy in the states of saturated, compressed liquid, Education, Research in Mathematical Education, 9(3),
and superheated vapour. Also, the add-in is provided in an 187–201.
easily accessible Microsoft Excel environment to facilitate Deane A., Erich N., & Robert S. S. (2005). Mathematical
the thermal design, analysis and performance evaluation Modeling and Visualization with Microsoft Excel, KAIST.
efforts of students as well as practising refrigerating Retrieved from http://www.mathnet.or.kr/kaist2005/article/
system engineers. Of course, the add-in is a veritable arganbright.pdf, 21/06/2006.
tool for the effective teaching of mechanical engineering Ghodbane, M. (1999). An Investigation of R152a and
students how to design and simulate vapour compression Hydrocarbon Refrigerants in Mobile Air Conditioning.
refrigeration systems. The solution scheme and computer SAE Technical Paper Series, No. 1999-01-0874.

Copyright © Canadian Research & Development Center of Sciences and Cultures 68


Oko, C.O.C.; Diemuodeke, E.O. (2013).
Energy Science and Technology, 5( 2),63-69

Huayamave, V. A. (2010). Designing of Energy Efficient Indoor Oko, C. O. C. & Diemuodeke, E. O. (2010). Analysis of Air-
Environments Using a Localized Radial Basis Function conditioning and Drying Processes Using Spreadsheet
Meshless Method. M.Eng thesis, University of Central Add-in for Psychrometric Data. Journal of Engineering
Florida, Florida. Science and Technology, 3(1), 7–13.
Internet World Stats (2012). Internet Users, Population and Oko, C. O. C. (2012). Engineering Thermodynamics: An
Facebook Statistics for Africa 2012. Retrieved from Algorithmic Approach, (2nd ed). University of Port
http://www.internetworldstats.com/stats1.htm#africa, Harcourt Press, Port Harcourt.
31/01/2013.
Kamei, A., Piao, C. C., Sato, H. and Watanabe, K. (1990). Tan, F. L. & Chua, P. S. K. (2003). Java Applet on Computation
Thermodynamic Charts and Cycle Performance of HCF- of Thermodynamic Properties of Steam and R134a
134a and HCF-152a, ASHRAE Trans, 96(1), 141-149. refrigerant. Computer Applications in Engineering
Kreyszig, E. (2005). Advanced Engineering Mathematics, 8th Education, 11(4), 211 – 225.
ed. John Willy & Sons Inc, New York. Zhang, M. and Muehlbauer, J. (2012). Life Cycle Climate
Liengme, V. B. (2000) A Guide to Microsoft Excel For Scientist Performance Model for Residential Heat Pump Systems.
and Engineers. Butterworth Heinemann, Woburn. International Refrigeration and Air Conditioning
Conference, July 16-19, Purdue, USA.

69 Copyright © Canadian Research & Development Center of Sciences and Cultures

View publication stats

You might also like