Chemical Engineering Department
University of Florida
ECH 4123
Prof.
Oscar
D. Crisalle
Phase and Chemical Equilibria
Class Project – Part B1
BASIC THERMODYNAMIC CALCULATIONS
USING THE PENGROBINSON EQUATION OF STATE
Student Name:_______________________________
Programming Assignment
1.0
Write a MATLAB Mfunction that calculates the volumes and compressibilityfactors
produced by the cubic form of the Generalized PengRobinson Equation of state
Z
3
+
αΖ
2
+
βΖ
+
γ
= 0
(1)
along with the associated specific volume
V
=
ΖΡΤ
/
Π
.
Physical units:
V
[
=]
μ
3
/
κμολ
,
Ζ
[=]διμ ενσιονλεσσ,
[=]
βαρ
,
Τ
[=]
ο
Χ
1.1
The Mfunction should have the name
PREOS_ZV
.
1.2
The syntax of the Mfunction should be as follows
[Z1, Z2, Z3, V1, V2, V3] = PREOS_ZV(P, T, PRpars)
where
a)
The
outputs
Z1
,
Z2
, and
Z3
[dimensionless] are the three compressibility factors
found as roots of the cubicform of the Generalized PengRobinson equation of
state (1),
b) The
outputs
and
V1
,
V2
, and
V3 [
m
3
/
kmol
]
are the three specific volumes
associated with the compressibility factors.
c)
The
input
P
[bar] is the pressure, and
T
[
°
C]
is the temperature.
© Oscar D. Crisalle 19942011
This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentECH 4123
Class Project Part B
1:
Thermodynamic Calculations Using the PR EOS
2
d) The
input
PRpars
is a vector that contains the criticalpoint pressure
P
c
,
temperature
T
c
, and specific volume
V
c
, as well as the acentric factor
ϖ
for the
substance being considered, in the following order:
PRpars(1) =
P
c
[bar]
PRpars(2) =
T
c
[
°
C]
PRpars(3) =
V
c
[
m
3
/
kmol
]
PRpars(4) =
ϖ
[dimensionless]
1.3
Remarks:
a)
The Appendix to this file contains an example MATLAB MFUNCTION that can
serve as guide for solving this part of the programming assignment.
The
example is for the case of a van der Waals equation of state, and it can be
readily modified (and extended, as necessary) for the case of the Generalized
PengRobinson equation of state.
b)
The outputs
Z1
,
Z2
, and
Z3
may
include complex numbers.
In an ensuing
project we will develop an algorithm that will discard the two complex roots,
and that will also eliminate two of the real roots in the case when all three roots
are real.
c)
Analogously, .outputs
V1
,
V2
, and
V3
may
include complex numbers.
d)
Note that the temperature input to the function should be in degrees Celsius,
therefore, it may be necessary to convert the temperature to degrees Kelvin
inside the function to ensure that the correct units are used in all the function
calculations.
1.4
Write a driver file with the name
PREOS_ZV_Driver
. You are asked to write a
MATLAB Mfile
(also known as an
Mscript
) that tests the results produced by the
PREOS_ZV Mfunction.
This Mfile should define inputs for a case where the values of Z1, Z2, Z3, V1, V2,
This is the end of the preview.
Sign up
to
access the rest of the document.
 Spring '07
 Zeigler
 Thermodynamics, Enthalpy, PR EOS, Project Part B1

Click to edit the document details