Académique Documents
Professionnel Documents
Culture Documents
ndata
i=1
P
exp
P
calc
P
exp
(1)
Finally, the last section represents the experimental and
calculated results in a plot to provide visual information about
the progress of the correlation.
Executed as a standalone program, the program shown in
Fig. S3 calculates equilibriumpressures using the value of the
interactionparameter specied by the user as aninput param-
eter, andreturns the objective functionpresentedinEq. (1) as a
quantitative estimation of the difference between experimen-
tal and calculated results. The programcan be combined with
one of the built-in Matlab or Octave minimization functions,
in order to nd the value of the interaction parameter which
minimizes the objective function, for example, with the com-
mand fminsearch(corr met hex PCSAFT.m, 0). A value of 0.023
is obtained as the optimal interaction coefcient, which is in
good agreement with the value of 0.021 obtained by Gross and
Sadowski (2001) using a larger experimental database. Fig. 3
shows a comparisonbetweenthe experimental andcalculated
equilibrium pressures using the PC-SAFT equation with the
correlated interaction coefcient.
4. Application in equation of state
seminars at the university of Valladolid
In our university, the seminars of application of equations of
state are a part of a course about highpressure technology and
supercritical uids. This course is offered as an elective sub-
ject to MSc students of Chemical Engineering, and it is usually
taken by about 1015 students every year. Usually these stu-
e118 education for chemical engineers 6 ( 2 0 1 1 ) e114e121
Fig. 3 Comparison between experimental (circles, Lin
et al., 1977) and calculated (lines) equilibriumpressures of
the methanehexane systemat T=273.16K. The PC-SAFT
equation of state with a correlated interaction coefcient of
0.023 has been used for the calculations.
dents have basic notions of Matlab programming and phase
equilibrium algorithms from their previous applied thermo-
dynamic courses.
The rst part of this course deals with the physical proper-
ties of uids at high pressure, particularly supercritical uids,
including thermodynamic and phase equilibrium properties.
Seminars complements the expositive lectures. They consist
of a two and a half hour session at the classroom, used to
teach how to use the programs by solving several exercises,
several additional application exercises to which students are
expected to dedicate approximately 4h of personal work, and
an additional session of 1h for correction of the exercises.
Since seminars are integrated in a course about supercritical
uids, most application examples presented in this section
are related to this topic. However, the programs can of course
be used to solve equivalent examples without supercritical
uids, as this section only intends to illustrate one possible
application of the programs.
The rst exercise proposed is the calculation of a bub-
ble point of CO
2
ethanol mixtures using the standard
PengRobinson equation of state, setting the interaction coef-
cients equal to zero. This is done using the le CO
2
EtOH.m
in supporting material. This exercise is used to explain the
general structure of the programs (denition of components,
mixture, equation of state and calculations, as described in
Section 3). Moreover, a brief explanation of the bubble point
algorithmis presented (Fig. 2), with a particular emphasis on
the implementation of the algorithm (function BubblePoint.m
of the IdealEOS class).
The second exercise consists of the correlation of the
binary interaction parameter of CO
2
ethanol mixtures to
experimental phase equilibrium data taken from Chiehming
et al. (1998), again using the PengRobinson equation of
state (le corr CO
2
EtOH PR.m in supporting material). This
serves to introduce students to the general correlation proce-
dures as well as the available Matlab optimization functions.
After running the correlation, as personal work students
are requested to build a program in order to calculate P-xy
diagrams of CO
2
ethanol mixtures using the interaction coef-
cients obtained with the correlation (possible solution: le
CO
2
EtOH Pxy.m, described in Section 3).
The next session is connected to the presentation of the
common modications of cubic equations of state in expos-
itive lectures: use of additional constants, modication of
alpha functions as well as mixing rules. As an example
of G
E
mixing rules, the application of the PengRobinson
equation of state with WongSandler mixing rules to the
calculation of vapourliquid equilibrium of waterethanol
system is shown (program H
2
O EtOH PRWS.m in supporting
material). In particular, it is shown that PengRobinson with
WongSandler mixing rules is able to predict the azeotrope
of this system, as well as the evolution of the position of
the azeotrope when pressure is increased. As personal work,
students are requested to build a program to calculate P-
xy diagrams of CO
2
H
2
O mixtures with the PengRobinson
WongSandler equation. Students are provided with all the
parameters required to apply the equation to this system,
taken from Martin et al. (2007). A possible solution is shown
in le CO
2
H
2
O PRWS.m in supporting material.
The next seminar exercise deals again with the CO
2
H
2
O
system, in this case using the PC-SAFT equation of state
(le CO
2
H
2
O PCSAFT.m in supporting material). The novel
aspect introduced with this exercise is the use of associ-
ation schemes with PC-SAFT. In this exercise, a simple 2B
association scheme according to the classication of Huang
and Radosz (1990) is used for water. This means that water
molecules are considered to have two association sites (A
and B), allowing associations between different sites (AB)
but not between equivalent sites (AA or BB). Although ana-
lytical solutions are available for different SAFT association
schemes, the programs use a general matrix denitionof asso-
ciation schemes which is less computationally efcient but, in
authors opinion, has more educational value. The matrix can
be easily constructed assigning non-zero association param-
eters to allowed associations, and zero to the remaining ones.
Examples of such matrixes for 2B and 4C association schemes
(the 4C scheme consisting of four association sites, allowing
associations AC, AD, BCand BD) are showninFig. 4. Again,
the required parameters are taken fromthe literature (Martin
et al., 2009).
The last seminar is dedicated to the calculation of solid
solubility in gases, which is particularly important for super-
critical uid extractions. The solid phase fugacity calculation
according to the method described by Shariati and Peters
(2002) is rst presentedtostudents. The example studiedis the
correlation of the solubility of mandelic acid in supercritical
carbon dioxide with the PengRobinson equation of state (le
mandelic ESG.min supporting material), using available exper-
imental data (Cheng et al., 2002). In addition to the calculation
of the fugacity of a solid phase, another feature of this exer-
cise is the need to estimate the critical properties of mandelic
acid, which of course cannot be determined experimentally.
The group contributionmethod of Jobak as described by Poling
et al. (2001) is taught to students for this purpose, using the
Excel sheet Critical Properties.xls provided as supplementary
material. This serves as a general introduction to group con-
tribution methods, which may differ in their purpose and the
groups dened, but share the same methodology for obtaining
the group decomposition of molecules.
In this exercise, only binary interaction coefcients are
used to correlate the gas solubility of mandelic acid in CO
2
. As
personal work, students are requested to correlate the data
again, using the enthalpy of fusion of mandelic acid as well
as the interaction coefcients treated as correlated parame-
ters. With the additional parameter, a much better correlation
education for chemical engineers 6 ( 2 0 1 1 ) e114e121 e119
Fig. 4 PC-SAFT association matrixes corresponding to an association scheme 2B (left) and 4C (right).
with a lower deviation between experimental data and model
results is obtained, but the correlated enthalpy of fusion is
negative. This exercise serves to illustrate that care must be
taken in order to ensure that the parameters obtained by cor-
relation make physical sense.
Finally, as personal work, students must correlate the
solubility of caffeine in CO
2
with the PengRobinson equa-
tion of state. Experimental data are provided to the students
(Johannsen and Brunner, 1994). Again, students must esti-
mate the critical properties of caffeine by group contribution,
build a programand run the correlation (possible solution: le
caffeine ESG.m in supporting material). Students are asked to
correlate the experimental data at a temperature of T=313K,
and then to test the extrapolation capabilities of the equation
at other temperatures (T=333K and T=353K).
5. Learning outcomes
As previously discussed, the seminar is taught to students
with a previous basic knowledge of Matlab programming.
Students also have previous knowledge of applied thermo-
dynamics, including the basic features of cubic equations of
state, as well as of the calculation of phase equilibriumprop-
erties by phiphi and gammaphi methods. Moreover, prior to
the seminar, the fundamentals of the equations of state used
in the seminar are presented in a theoretical lecture.
The mainobjective of this course is tocomplement this the-
oretical lecture withapplicationexercises, inorder toteachthe
application of the equations of state in practical applications.
With this general objective, the specic learning outcomes
sought with the seminar are:
(1) Teach students to differentiate between the equations of
state presented, in terms of their accuracy and applicabil-
ity to different situations, and the amount of experimental
information and parameters required to apply them. For
this, students are asked to reproduce the behaviour of a
certain system (e.g., CO
2
+H
2
O) with different equations
of state, in order to directly compare the performance of
the different equations and the parameters required to
apply them. Exercises with systems with a strongly non-
ideal behaviour are also presented (e.g., H
2
O+ethanol,
CO
2
+ethanol). With these exercises students have the
opportunity to observe that simple equations fail to rep-
resent the behaviour of such systems and more advanced
equations are thus required to describe them.
(2) Obtain the parameters required for application of the
equations of state. In the seminar, two basic method-
ologies are presented: group contribution methods, and
correlationof parameters by minimizationof the deviation
with respect to experimental data.
(3) Study the implementation of calculation algorithms in a
computer program. Inparticular, inthe seminar the bubble
point algorithmis presented, comparing the blockdiagram
taught in theoretical lectures with the implementation of
this algorithm in the programs, but any other algorithm
implemented in the programs can be presented to stu-
dents in a similar way.
(4) In addition to the previous general learning outcomes,
specic outcomes canbe includeddepending onthe orien-
tationof the course. For example, inthe seminar presented
in this work a strong emphasis is made in the calcula-
tion of solidgas equilibrium. This type of equilibrium is
very important for supercritical uid applications, since
it governs one of the main industrial applications of this
technology, the supercritical extraction, but is probably
less relevant than other types of thermodynamic prop-
erties for a general applied thermodynamic course. As
previously described, the programs have been designed
with a modular structure, in order to make it easier for
teachers toaddspecic functionalities as requiredfor their
courses.
(5) Making use of the modular structure of the programs, stu-
dents can also study with more detail the calculation of
thermodynamic properties with equations of state, mak-
ing their own implementations of other equations of state
or calculation algorithms. Such learning outcome is out-
side the scope of the seminar presented in this work due
to the lack of time, but it can be included as a part of a
longer student work or research project.
6. Users feedback
Students opinions about the software package and the
equation of state seminar have been collected through an
anonymous online survey. Questions in this survey have been
designed to evaluate both the extent to which the learning
outcomes have been achieved, as well as the suitability of the
exercises and the computer programs used in the seminar for
this purpose.
Table 2 presents the results obtained. The survey has been
completed by 29 students between years 2008 and 2010, cor-
responding to approximately 60% of the total number of
students of the seminar along these years. In addition to the
questions presented in Table 2, students suggestions have
been collected both through the survey and through informal
conversations.
As shown in Table 2, the perception of the seminar by stu-
dents is in general positive. In particular, according to the
results of the survey students consider that the seminar has
contributed to teach them the practical application of equa-
tions of state for phase equilibrium calculations and how to
obtain the parameters of the equations by correlation and
group contribution. The function of the seminar as a comple-
e120 education for chemical engineers 6 ( 2 0 1 1 ) e114e121
Table 2 Results of the students opinion survey,
questions ranked from1 (strongly disagree) to 5
(strongly agree).
Question Average mark
1. The seminar teaches how to calculate phase
equilibriumand thermodynamic properties
with equations of state
3.5
2. The seminar is useful for learning the
characteristics of several equations of state
(applicability, parameters required, etc.)
3.0
3. The seminar gives information for selecting
appropriate equations of state for specic
applications
2.9
4. The programs are easy to use 3.3
5. The proposed exercises are illustrative and
easy to understand
3.7
6. After completing the seminar, I amable to
modify the programs in order to perform
similar calculations as those proposed in the
seminar
3.2
7. After completing the seminar, I amable to
calculate the parameters required by
equations of state (by correlation, group
contribution, etc.)
3.5
8. After completing the seminar, I can
understand the algorithms used in the
programs
3.2
9. After completing the seminar, I can
understand the code of the programs
3.0
10. The seminar contributes to make the
theoretical part of the course easier to
understand
3.6
ment of the theoretical part of the course is also favourably
evaluated. With respect to the questions addressing the han-
dling of the programs, the evaluation of the simplicity and
clarity of the examples (question 4), the ability to modify these
programs for other applications (question 6), the understand-
ing of the algorithms (question 8) and the understanding of
program code (question 9) obtain decreasing evaluations in
this order, which is reasonable considering that each of these
questions address aspects of increasing complexity. Questions
regarding the selection of equations of state for specic appli-
cations (questions 2 and 3) obtain a lower evaluation. Many
students suggestions have stressed the importance of hav-
ing a detailed documentation of the programs as well as a
large database of example programs, aspects that have been
improved over the years resulting in the documentation and
the example programs provided as supplementary material.
Students have also contributed valuable suggestions for appli-
cation exercises, as for example the study of the correlation
and description of phase behaviour of a certain system with
several equations of state, in order to observe the differences
in the required input data and accuracy of each equation, or
the application of correlated parameters for extrapolation.
The results of the survey showin general a good agreement
with the objectives of the seminar. As described in Section 4,
a particular emphasis is made in the learning of the applica-
tion of equations of state for phase equilibrium calculations
as well as parameter correlation, which are the aspects best
evaluated by students. On the other hand, the specic focus
on supercritical uid systems is a drawback for teaching how
to select appropriate equations of state for other applications.
The experiences obtained by authors in these seminars can
serve as an indication of the exibility of the programs and
the possibilities for adapting themin order to teach different
skills depending on the requirements of the course.
7. Conclusions and outlook
Applied thermodynamics courses should reect the progress
in this eld. Among other aspects, they should serve to
teach students how to work with relatively recent, but well-
established thermodynamic models like group contribution
equations of state, SAFT equations, etc. A course with appli-
cation exercises limited to simple models and basic cubic
equations of state may not prepare students to work with
these new tools, which are included in several commercial
process simulators and are able to fulll some important
demands of the industry. The lack of educational resources
for proposing and solving application exercises with these
equations may be one of the biggest obstacles to include this
content in courses.
Authors experiences with the software package presented
in this work have generally been positive. Some obvious
advantages are the inclusion of interactivity with more varied
application exercises, which is always appreciated by stu-
dents, and the addition of updated contents in the courses,
particularly in a subject such as thermodynamics, which is
sometimes wrongly perceived as stagnated. Additionally,
the software tools presented in this work are open-source
programs. The entire code of the programs is available for
students to browse and to modify. This allows for different
levels of learning: fromstudents who only need to learn about
the models from a users point of view, to students who will
be interested in investing more time modifying the programs
and adding new functions, for instance as part of a research
project. The programs are exible and can be adapted to teach
different skills: application of the equations of state for phase
equilibrium calculations, parameter correlation, selection of
equations for specic applications, implementation of algo-
rithms, etc. The programs can be run using the commercial
software MATLAB as well as its free, open-source alternative
Octave.
With respect to instructors, the structure of the programs,
based on an object-oriented methodology, intends to promote
the reusability of the code andthe possibilities for sharing new
functions. It is possible to implement a new equation of state
deriving it froman already programmed equation of state and
reusing the parts of the code which are equivalent in both
equations. Just programming the calculation of the fugacity
andcompressibility coefcients of the newequationwill make
it possible to use every calculation algorithm included in the
package with a new equation of state. Conversely, it is pos-
sible to program a new function, such as an improved phase
equilibriumalgorithmor an additional thermodynamic prop-
erty calculation, and simply adding this function to the base
equation of state class will make it available for every already
programmed equation of state as well as for any other equa-
tion which may be programmed in the future.
In addition to the stable version of the package
provided as supplementary material of this article,
authors maintain and distribute an updated version
of the programs through the following web page:
http://www.iq.uva.es/hpp/en/download/download.html.
Every suggestion and contribution will be highly appreci-
ated.
education for chemical engineers 6 ( 2 0 1 1 ) e114e121 e121
Acknowledgements
. Martn thanks the Spanish Ministry of Science and Innova-
tion for a Ramn y Cajal research fellowship. Partially nanced
by the Spanish Ministry of Science and Innovation through
project CTQ2010-15475.
Appendix A. Supplementary data
Supplementary data associated with this article can be found,
in the online version, at doi:10.1016/j.ece.2011.08.003.
References
Bermejo, M.D., Mndez, D., Martn, A., 2010. Application of a
group-contribution equation of state for the thermodynamic
modeling of gas +ionic liquid mixtures. Ind. Eng. Chem. Res.
49, 49664973.
Binous, H., 2008. Applications of the PengRobinson equation of
state using mathematica. Chem. Eng. Educ. 42, 4751.
Boston, J.F., Mathias, P.M., 1980. Phase equilibria in a
third-generation process simulator. In: 2nd International
Conference on Phase Equilibria and Fluid Properties in the
Chemical Industry, Berlin, Germany.
Castier, M., Amer, M., 2011. XSEOS: an evolving tool for teaching
chemical engineering thermodynamics. Educ. Chem. Eng. 6,
e62e70.
Chapman, W.G., Gubbins, K.E., Jackson, G., Radosz, M., 1990. New
reference equation of state for associating liquids. Ind. Eng.
Chem. Res. 29, 17091721.
Chiehming, C.J., Kou-Lung, C., Chang-Yih, D., 1998. A new
apparatus for the determination of P-x-y diagrams and
Henrys constants in high pressure alcohols with critical
carbon dioxide. J. Supercrit. Fluids 12, 223237.
Cheng, K.W., Tang, M., Chen, Y.P., 2002. Solubilities of benzoin,
propyl 4-hydroxybenzoate and mandelic acid in supercritical
carbon dioxide. Fluid Phase Equilib. 201, 7996.
Elliott, J.R., Lira, C.T., 1999. Introductory Chemical Engineering
Thermodynamics. Prentice-Hall, Upper Saddle River, New
Jersey.
Fornari, T., 2007. Revision and summary of the group
contribution equation of state parameter table: application to
edible oil constituents. Fluid Phase Equilib. 262, 187209.
Goodwin, A., Sengers, J., Peters, C.J., 2010. Applied
Thermodynamics of Fluids. RSC Publishing, Cambridge.
Gross, J., Sadowski, G., 2001. Perturbed-chain SAFT: an equation
of state based on a perturbation theory for chain molecules.
Ind. Eng. Chem. Res. 40, 12441260.
Gupta, A.K., Bishnoi, P.R., Kalogerakis, N., 1991. A method for the
simultaneous phase equilibria and stability calculations for
multiphase reacting and non-reacting systems. Fluid Phase
Equilib. 63, 6589.
Hendriks, E., Kontogeorgis, G.M., Dohrn, R., de Hemptinne, J.C.,
Economou, I.G., Zilnik, L.F., Vesovic, V., 2010. Industrial
requirements for thermodynamics and transport properties.
Ind. Eng. Chem. Res 49, 1113111141.
Holderbaum, T., Gmehling, J., 1991. PSRK: a group contribution
equation of state based on UNIFAC. Fluid Phase Equilib. 70,
251265.
Huang, S.H., Radosz, M., 1990. Equation of state for small, large,
polydisperse and associating molecules. Ind. Eng. Chem. Res.
29, 22842294.
Johannsen, M., Brunner, G., 1994. Solubilities of the xanthines
caffeine, theophylline and theobromine in supercritical
carbon dioxide. Fluid Phase Equilib. 94, 215226.
Lin, Y.N., Chen, R.J.J., Chappelear, P.S., Kobayashi, R., 1977. Vapor
liquid equilibriumof the methane-n-hexane systemat low
temperature. J. Chem. Eng. Data 22, 402408.
Martin, A., Bouchard, A., Hoand, G.W., Witkamp, G.J., Cocero,
M.J., 2007. Mathematical modeling of the mass transfer from
aqueous solutions in a supercritical uid during particle
formation. J. Supercrit. Fluids 41, 126137.
Martin, A., Pham, H.M., Kilzer, A., Kareth, S., Weidner, E., 2009.
Phase equilibria of carbon dioxide+poly ethylene
glycol +water mixtures at high pressure: measurements and
modelling. Fluid Phase Equilib. 286, 162169.
Patel, N.C., Teja, A.S., 1982. A new cubic equation of state for
uids and uid mixtures. Chem. Eng. Sci. 37, 463473.
Peng, D.Y., Robinson, D.B., 1976. A new two-constant equation of
state. Ind. Eng. Chem. Fundam. 15, 5964.
Pereda, S., Brignole, E.A., Bottini, S.B., 2009. Advances in phase
equilibriumengineering of supercritical reactors. J. Supercrit.
Fluids 47, 336343.
Pfohl, O., Petkov, S., Brunner, G., 1998. Usage of PE A Programto
Calculate Phase Equilibria. Herbert Utz Verlag, Mnchen.
Poling, B.E., Prausnitz, J.M., OConnell, J.P., 2001. The Properties of
Gases and Liquids, 5th ed. McGraw-Hill, New York.
Register, A.H., 2007. A Guide to MATLAB Object-Oriented
Programming. Chapman&Hall/CRC, Boca Raton, FL.
Sandler, S.I., 2006. Chemical, Biochemical and Engineering
Thermodynamics, 4th ed. Wiley, New York.
Shariati, A., Peters, C.J., 2002. Measurements and modeling of the
phase behavior of ternary systems of interest for the GAS
process. I. The systemcarbon dioxide+1-propanol +salicylic
acid. J. Supercrit. Fluids 23, 195208.
Skjold-Jorgensen, S., 1984. Gas-solubility calculations. II.
Application of a new group-contribution equation of state.
Fluid Phase Equilib. 16, 317351.
Smith, J.M., van Ness, H.C., Abbott, M.M., 2005. Introduction to
Chemical Engineering Thermodynamics, 7th ed. McGraw-Hill,
New York.
Soave, G., 1972. Equilibriumconstants froma modied
RedlichKwong equation of state. Chem. Eng. Sci. 27,
11971203.
Song, Y., Lambert, S.M., Prausnitz, J.M., 1994. A perturbed
hard-sphere-chain equation of state for normal uids and
polymers. Ind. Eng. Chem. Res. 33, 10471057.
Stryjek, R., Vera, J.H., 1986. PRSV: an improved PengRobinson
equation of state for pure compounds and mixtures. Can. J.
Chem. Eng. 64, 323333.
Valderrama, J.O., 1990. A generalized PatelTeja equation of state
for polar and nonpolar uids and their mixtures. J. Chem. Eng.
Jpn. 23, 8791.
Valderrama, J.O., 2003. The state of the cubic equations of state.
Ind. Eng. Chem. Res. 42, 16031618.
Walas, S.M., 1985. Phase Equilibria in Chemical Engineering.
Butterword-Heinemann, Newton, MA.
Wei, Y.S., Sadus, R.J., 2000. Equations of state for the calculation
of uid-phase equilibria. AIChE J. 46, 169196.
Wong, S.S.H., Sandler, S.I., 1992. A Theoretically correct mixing
rule for cubic equations of state. AIChE J. 38, 671680.