Professional Documents
Culture Documents
EQUATION-OF-STATE
by
A THESIS
IN
PETROLEUM ENGINEERING
MASTER OF SCIENCE
IN
PETROLEUM ENGINEERING
Approved
Lloyd Heinze
Chairperson of the Committee
Shameem Siddiqui
Accepted
John Borrelli
Dean of the Graduate School
December, 2006
ACKNOWLEDGEMENTS
I extend my profound gratitude to Dr. Akanni Lawal for inspiring me into phase behavior
and into this research. Special thanks to Dr. Lloyd Heinze, the chair of my Masters committee
I would like to acknowledge the African Development Bank for awarding me the 2005-
ii
TABLE OF CONTENTS
ACKNOWLEDGEMENTS ii
ABSTRACT v
LIST OF TABLES vi
LIST OF ABBREVIATIONS x
CHAPTER
1 INTRODUCTION
4.1 Computing Isothermal Oil Compressibility from Reservoir Fluid Study Report 56
iii
Equation of State 66
5.1 Conclusions 77
5.2 Recommendations 78
REFERENCES 79
APPENDIX
K. VITA 162
iv
ABSTRACT
knowledge of the volumetric behavior of hydrocarbon mixtures, both liquid and gaseous.
extension of fluid properties from values at the bubble point pressure to higher pressures of
interest and in material balance calculations38, 35. Coefficient of Isothermal oil compressibility is a
Coefficients of isothermal oil compressibility are usually obtained from reservoir fluid
analysis. Reservoir fluid analysis is an expensive and time consuming operation that is not always
available when the volumetric properties of reservoir fluids are needed. For this reason
correlations have been developed and are being developed for predicting fluid properties
This project developed a mathematical model for predicting the coefficient of isothermal
oil compressibility based on Peng-Robinson Equation of State (PR EOS). A computer program
was developed to predict the coefficient of isothermal compressibility using the developed model.
The predicted coefficient of isothermal oil compressibility closely matches the experimentally
v
LIST OF TABLES
4.1 Predicted Molar Volume for Oil Well No. 4, Good Oil Company, Samson,
Texas, Bubble Point = 2619.7 psia 57
4.2 Predicted molar volume for Jehlicka 1A, Wilshire Oil Co. of Texas, Beaver,
Oklahoma. Bubble Point = 2666.7 psia 60
4.3 Predicted molar volume for Jacques Unit #5603, Rough Ride Field, A.C.T.
Operating Company, Fisher County, Texas. Bubble Point = 1689.7 psia 63
4.4 Predicted Coefficient of Isothermal Oil Compressibility for Oil Well No. 4,
Good Oil Company. Samson, Texas. Bubble Point = 2619.7 psia 66
F.2 Molar Volume Determination from Pressure-Volume Relations for Oil Well
No. 4 99
F.5 Molar Volume Determination from Pressure-Volume Relations for Jehlicka 1A 102
vi
H.1 The AAPD for the Predicted Molar Volume for Oil Well No. 4, Good Oil
Company. Samson, Texas 108
H.2 The AAPD for the Predicted Coefficient of Isothermal Oil Compressibility
For Oil Well No. 4, Good Oil Company. Samson, Texas. 109
H.3 The AAPD for the Predicted Molar Volume for Jacques Unit #5603, Rough
Ride Field, A.C.T. Operating Company, Fisher County, Texas. 110
H.4 The AAPD for the Predicted Coefficient of Isothermal Oil Compressibility
for Jacques Unit #5603, Rough Ride Field, A.C.T. Operating Company,
Fisher County, Texas (Using 11 Components). 111
H.5 The AAPD for the Predicted Molar Volume for Jehlicka 1A, Wilshire Oil
Co. of Texas, Beaver, Oklahoma. 112
H.6 The AAPD for the Predicted Coefficient of Isothermal Oil Compressibility
for Jehlicka 1A, Wilshire Oil Co. of Texas, Beaver, Oklahoma. 113
H.7 The AAPD for the Predicted Coefficient of Isothermal Oil Compressibility
for Jacques Unit #5603, Rough Ride Field, A.C.T. Operating Company,
Fisher County, Texas (Using 11 Components). 114
vii
LIST OF FIGURES
3.1 Volumetric Behavior of Pure Compounds by Van der Waal Cubic EOS 37
4.1 Predicted Molar Volume for Oil Well No- 4, Good Oil Company. Samson,
Texas (Model Based on PR EOS). 58
4.2 Predicted Molar Volume for Oil Well No- 4, Good Oil Company. Samson,
Texas (Model Based on MPR EOS). 59
4.3 Predicted Molar Volume for Jehlicka 1A, Wilshire Oil Co. of Texas, Beaver,
Oklahoma. (Model Based on PR EOS). 61
viii
4.4 Predicted Molar Volume for Jehlicka 1A, Wilshire Oil Co. of Texas, Beaver,
Oklahoma. (Model Based on MPR EOS). 62
4.5 Predicted Molar Volume for Jacques Unit #5603, Rough Ride Field, Fisher
County, Texas. (Model Based on PR EOS). 64
4.6 Predicted Molar Volume for Jacques Unit #5603, Rough Ride Field, Fisher
County, Texas. (Model Based on MPR EOS). 65
4.7 Predicted Coefficient of Isothermal Oil Compressibility for Oil Well No. 4,
Good Oil Company. Samson, Texas. (Model Based on PR EOS) 67
4.8 Predicted Coefficient of Isothermal Oil Compressibility for Oil Well No. 4,
Oil Company. Samson, Texas. (Model Based on MPR EOS). 68
ix
LIST OF ABBREVIATIONS
Symbol Definition
Greek Letter
x
ij Binary Interaction Parameter
Specific Gravity
Density
Acentric Factor
[x (a a ) ]
0.5
i Fugacity Parameter i = j i j
j
= [x x (a a ) ]
0.5
Fugacity Parameter i j i j
i j
Dimensionless Parameter
Subscript
c Critical Property
g Gas
o Oil
r Reduced
i Component i
xi
CHAPTER I
INTRODUCTION
1.1.Background Information
of fluid volume per unit change in pressure at constant reservoir temperature1. The
coefficient of isothermal oil compressibility, co, is usually determined from the pressure-
volume measurements of reservoir fluids. These data are usually obtained from reservoir
compressibility for reservoir fluids for a finite change in pressure and volume is to use
V1 V2
co = (1.1)
V1 (p 2 p1 )
Normally, an increase in fluid pressure (p2 > p1) causes the fluid volume to
decrease (V1 > V2). Hence the negative sign, to make the value of the isothermal
compressibility positive.
Isothermal compressibility is usually recorded for gas, oil, water and rock. In
order to have the number on the same basis, compressibility is recorded in 10-6 for
phase gases and liquids undergoing small pressure changes. This assumption has a
1
definite limitation when the compressibility varies during small pressure changes. It is
further limited over large pressure changes by confusion over whether the denominator
1 V
co = (1.2)
V p T
from the slope of a pressure versus specific volume curve, or from the differentiation of
To construct a curve of pressure versus specific volume, the pressure and volume
data required are acquired from laboratory studies on reservoir samples collected from
the bottom of the wellbore and from the surface. Such experimental data are not always
available because of one or more of the following reasons: (i) reservoir samples collected
are not reliable. (ii) samples have not been taken because of cost savings. (iii) PVT
analyses are not available when data are needed. (iv) obtaining an accurate PVT behavior
of each reservoir fluid encountered will be costly and time-consuming. In such cases
2
when the experimental data are not available, PVT properties such as the isothermal oil
There has been a lot of work in the last 50 years on the derivation of PVT
reliability only in a well-defined range of reservoir fluid characteristics. This is due to the
fact that each correlation has been developed based on fluid samples from a restricted
geographical area, with similar fluid compositions and API gravity16. Some correlations
the pressure to the volume and temperature. Equation of state (EOS) is used to describe
the volumetric behavior, the vapor/liquid equilibra (VLE) and thermal properties of pure
The equation of state has to be expressed in the form of the defining equation for
the particular reservoir properties it is describing. For the isothermal compressibility, the
compressibility involves the derivatives of the volumetric data, the possible deviation in
these quantities is much greater than is encountered with the volumetric data only.
3
Accordingly, if the derived quantities are to be obtained from an equation for volume, it
Since the introduction of the equation of state by Van der Waals, many equation
of state (EOS) having the form of Van der Waals equation have been proposed. Two of
the most common and popularly accepted EOS is the Redlich-Kwong (RK EOS) and
Peng Robinson (PR EOS) EOS. The Redlich-Kwong equation has been the most popular
basis for developing new EOSs. Several modifications of the Redlich-Kwong equation
have found acceptance, with Soaves modification (SRK EOS) being the simplest and the
most widely used. Another trend has been to propose generalized three-, four-, and five
constant cubic equations that can be simplified into the PR EOS, RK EOS and other
familiar forms44, pp 47
. The Lawal-Lake-Siberberg (LLS EOS) EOS is a four parameter
EOS, which can be reduced to both the PR EOS and the RK EOS. The equation of state
used in this study to generate the isothermal compressibility for reservoir fluids are the
engineering applications for the isothermal compressibility include well testing analysis
and metering18.
Solutions of pressure buildup and drawdown problems contain a parameter called the
4
total system isothermal compressibility. Calculations of the total system isothermal
reservoir fluids as well as the compressibility of the formation. The total system
c t = c oSo + c w S w + c g Sg + c f (1.3)
c t A
t eia = (t DA )eia (1.4)
0.0002637k
5
ct = Total Compressibility, psi-1
k = Permeability, md
= Porosity, fraction
= Viscosity, cp
o Better and more reliable estimates of the static reservoir pressure for reserves
estimate and rate performance estimates.
in identifying the type of reservoir fluid. Reservoir fluids are generally classified into
three groups:
o Incompressible fluids These are fluids whose volume does not change with
pressure i.e. the values of the coefficient of isothermal compressibility for these
fluids are constant. Incompressible fluid does not exist; however, this behavior
may be assumed in some cases to simplify the derivation and the final form of
flow equations.
6
Incompressible
Volume / Coefficient of
Isothermal Compressibility
Slightly Compressible
Compressible
Pressure
Isothermal oil compressibility is also used in the material balance equation for
undersaturated oil reservoirs, i.e. reservoirs that the initial reservoir pressure is greater
than the bubble point pressure. This material balance equation can be used to estimate
the initial reserve and predict future production. The material balance equation for
NB oi c e (p i p ) = N p B o We + B w Wp
(1.5)
So c o + S w c w + c f
ce =
B oi (p i p ) (1.6)
7
p = Reservoir Pressure, psi
The isothermal compressibility is used also for the extension of fluid properties
from correlations starting at the bubble point pressure to pressures above the bubble
point pressure. This application is used for black oil reservoir simulation38. The
factor and oil density at higher pressures from their calculated values at bubble point.
B o = B ob e (co (p b p )) (1.7)
o = ob e (co (p p b )) (1.8)
containing dissolved gas components from a reservoir to a gas-oil separation plant and
the pipeline transportation of degassed liquids such as crude oils and refined products.
8
Experimental data for the isothermal compressibility of such mixtures are seldom
available11.
The scope of this project is to develop a mathematical model based on two cubic
equations of states (PR EOS and Modified PR EOS) that can predict the isothermal oil
compressibility with a good degree of accuracy at pressures below and above the
bubble point.
model that be used to predict the coefficient of isothermal compressibility for reservoir
fluids. This equation will allow the coefficient of isothermal compressibility to vary
9
CHAPTER II
compressibility is required for oil, gas, water and the formation. These coefficients are
compressibility for oil, gas and water is defined as the fractional change in volume per
Fluid compressibility varies with pressure and temperature and the knowledge of
isothermal compressibility for reservoir liquids tends to be pressure sensitive but not
nearly so much as the reservoir gas41. Therefore the gas phase compressibility is neither
The isothermal gas compressibility is the change in volume per unit volume for a
unit change in pressure at constant temperature2 p. 106. This is expressed as29 p. 170,
1 V
cg =
V p T
(2.1)
10
1 v
c g =
v p T
(2.2)
1 Vm
cg =
Vm p T (2.3)
The typical relationship of the isothermal gas compressibility with reservoir pressure is
Isothermal Gas
Compressibility, psi-1
Reservoir Pressure
Figure 2.1 Typical Shape of the Isothermal Gas Compressibility of gas as a function
of pressure at constant reservoir temperature29 p. 170.
11
The partial derivative is used in equation 2.1, 2.2 and 2.3 rather than the ordinary
derivative because the volume varies only with the pressure while the temperature is
held constant.
Equation of state for ideal gas is usually combined with the equation for the
isothermal gas compressibility to increase its usefulness. The ideal gas equation is
given as:
pV = nRT (2.4)
In terms of volume,
nRT
V=
p (2.5)
V nRT
= 2
p T p
(2.6)
Therefore the isothermal gas compressibility equation for ideal gases can be expressed
as;
1 nRT
c g = 2
V p (2.7)
12
p nRT 1
cg = 2 =
nRT p p (2.8)
where
T = Temperature, oR
p = Pressure, psi
Equation 2.8 shows that the isothermal gas compressibility for ideal gas is
inversely proportional to pressure. Though the ideal gas equation does not adequately
describe the behavior of gases at the temperatures and pressures normally encountered
in reservoir engineering, equation 2.8 can be used to estimate the order of magnitude of
calculations. The real gas equation can be used to model the isothermal gas
compressibility for real gases. The gas deviation factor or the compressibility factor (z)
pV = znRT (2.9)
13
This real gas equation can be expressed in terms of volume, to yield;
z
V = nRT
p (2.10)
V 1 z z
= nRT 2
p T p p T p (2.11)
p 1 z z
c g = nRT
2
znRT p p T p
(2.12)
1 1 z
cg =
p z p T
(2.13)
z
The partial derivative can be determined from the slope of z-factor plotted
p T
against pressure at constant temperature. It can be observed from Figure 2.2 that at low
pressures, the z-factor decreases as pressure increases, causing the slope to be negative
thus making the cg larger than the case of an ideal gas. At high pressures, the z-factor
increases with increasing pressure, therefore the slope of the z-factor chart will be
positive; thus the values of cg will be smaller than the case of an ideal gas.
14
Figure 2.2: Standing and Katz compressibility factors chart. Courtesy of the Gas
Processors Suppliers Association. Published in the GPSA Engineering Data Book,
Tenth Edition, 1987.2 p. 92
15
For an ideal gas, z-factor is a constant with a value of 1.0. Therefore the value of
the partial derivative of z-factor with respect to pressure at constant temperature equal
The law of corresponding state states that all pure gases have the same z-factor at
the same values of reduced pressure and reduced temperature. The reduced property of
a substance is the value of that property divided by the critical property for the
substance.
The law of corresponding states can be used to express the isothermal gas
compressibility equation in reduced form. The chain rule is used to express the partial
z p z
= Pr (2.14)
p T p p Pr
p = p pc p pr
(2.15)
expressed as;
p pr 1
=
p p pc (2.16)
16
z 1 z
=
p T p pc p pr
(2.17)
Substituting equation 2.17 and equation 2.15 into equation 2.13 gives;
1 1 z
cg =
p pc p pr zp pc p pr
Tpr
(2.18)
as;
1 1 z
c pr = c g p pc =
p pr z p pr
Tpr
(2.19)
Where
Trube41 (1957) presented graphs (Figures 2.3 and 2.4) from which the isothermal
compressibility of natural gases may be obtained. The graphs give the isothermal
pressure.
17
Figure 2.3: Variation of reduced compressibility with reduced pressures for various
fixed values of reduced temperature for natural gases. (For cr between 1.0 and 0.1)
Trube41 (1957).
Figure 2.4: Variation of reduced compressibility with reduced pressures for various
fixed values of reduced temperature for natural gases. (For cr between 0.1 and 0.01)
Trube41 (1957)
18
2.1.2 The Coefficient of Isothermal Oil Compressibility29 p. 231
determined from a laboratory reservoir fluid study. At pressures above the bubble point,
compressibility of a gas. At pressures below the bubble point, there is the presence of
free gas in the reservoir; therefore an additional term must be added to account for the
1 V
co =
V p T
(2.20)
where
The isothermal oil compressibility at pressures above the bubble point is virtually
constant except at pressures near the bubble point. The typical relationship of co with
19
Isothermal Oil Compressibility, Co psi-1
pb
Reservoir Pressure
Figure 2.5: Typical shape of the isothermal oil compressibility as a function of reservoir
pressure at constant temperature at pressures above the bubblepoint29 p. 232.
ln V
c o =
p T (2.21)
Formation volume factor, Bo can be substituted directly into equation 2.20 as;
1 B o
co =
Bo p T (2.22)
p Bo
dB o
c o dp =
Bo
pb Bob
(2.23)
B o = B ob e [c o (p b p )] (2.24)
20
Equation 2.24 is used to calculate the formation volume factor at pressures above
The isothermal oil compressibility can also be written in terms of density. The
1 v
c o =
v p T
(2.25)
1
v=
o (2.26)
Chain rule can be used to obtain the partial derivative of the specific volume with
v v o
=
p T o p T (2.27)
v 1
= 2
o o (2.28)
Substituting equations 2.28, 2.27 and 2.26 into equation 2.25 gives;
1 1 o
c o = 2
1 o o p T (2.29)
Thus,
1 o
co =
o p T (2.30)
21
Assuming constant co at pressures above the bubble point, equation 2.30 can be
o = ob e [c o (p p b )] (2.31)
Equation 2.31 can be used to calculate the density of oil at pressures above the
bubble point. The density at the bubble point is the starting point.
When reservoir pressure is below the bubble point pressure, there is the presence
of free gas in the reservoir. These types of reservoir are called saturated oil reservoirs.
The total change in volume as pressure is changed must account for the effect of the
solution gas.
The fractional change in volume per unit pressure change at constant temperature
is expressed as:
1 V 1 B o
co = =
V p T Bo p T (2.32)
The oil formation volume factor (Bo) contains the effect of the solution gas (Rs)
on the change in liquid phase volume35. The effect of the change in the solution gas on
the liquid volume as pressure is reduced below the bubble point must be added to
equation 2.32.
B g R s
B o p T (2.33)
22
Thus the isothermal oil compressibility at pressures below the bubble point
1 B o Bg R s
co = +
Bo p T Bo p T (2.34)
1 B o R
co = B g s
Bo p T p T (2.35)
where
Equation 2.35 is consistent with the equation for calculating the isothermal
compressibility at pressures above the bubble point; because at pressures above the
bubble point pressure the gas solubility is constant and the derivative of Rs with
pressure is zero.
reservoir pressure shows a discontinuity at the bubble point pressure (Figure 2.6). This
23
Coefficient of Isothermal Oil Compressibility, psi-1
Pb
Laboratory PVT analysis is used to acquire data that are used in the estimation of
the isothermal compressibility from the equations given above. Values of the fluid
properties including the isothermal compressibility are often required when laboratory
PVT data are not available. Thus, there are a number of developed correlations for the
As shown in figures 2.3, 2.4 and 2.7, Trube42 (1957) presented a correlation for
estimating the pseudo reduced compressibility cr, for natural gases and undersaturated
crude oils. The pseudo reduced compressibility was correlated with the pseudo reduced
temperature and pressure, ppr and Tpr. Trubes graphical correlation can be used to
24
estimate the isothermal compressibility at any pseudo reduced temperature and
pressure. The relationship between the pseudo reduced isothermal compressibility and
c r = c o p pc (2.36)
where
25
2.2.2 Vasquez-Beggs Correlation43
Vasquez and Beggs43 (1980) developed a correlation for the isothermal oil
compressibility with the gas solubility Rs, reservoir temperature T, APIo gravity, gas
specific gravity g and reservoir pressure p. They proposed the following expression:
Vasquez and Beggs proposed that the value of the gas specific gravity g obtained
at the separator pressure of 100 psig be used for the above equation. This reference
pressure was chosen because it represents the average reservoir field separator pressure.
They also proposed the relationship for adjustment of the gas gravity g to the reference
p sep
gs = g 1 + 5.912(10 5 )( API )(Tsep 460)Log
114.7 (2.38)
where
This correlation is also represented in a graphical form (Figure 2.8). This is the
best available correlation considering both accuracy and ease of use. The results are
26
Figure 2.8: Coefficients of isothermal compressibility of undersaturated black
oils29p. 327
27
2.2.3 McCain et al Correlation for Isothermal Oil Compressibility at Pressures above
the Bubble Point
isothermal oil compressibility at pressures below the bubble point. The correlation is
expressed as:
The results are accurate to within 10% at pressures above 500 psia. Below 500
psia, the accuracy is within 20%. If the bubble point pressure is known, the accuracy of
28
Figure 2.9 Coefficient of Isothermal Compressibility of Saturated Black Oil.
McCain30 (1988)
29
2.2.4 Ahmeds Correlation
expression for the isothermal oil compressibility using the gas solubility Rs as the only
1
co = e (a 3 p ) (2.41)
a1 + a 2R s
where
a1 = 24841.0822
a2 = 14.07428745
a3 = -0.00018473
The average absolute error of this expression is given as 3.9 percent when tested
against the experimental data used in developing the equation. The isothermal oil
g 0.5
1.175
a + a R + 1.25(T 460)
s
1 2
o
co = e (a 3 p ) (2.42)
a 4 O + a 5R s g
where
a1 = 1.026638
a2 = 0.0001553
30
a3 = -0.0001847272
a4 = 62400
a5 = 13.6
This correlation only applies for isothermal oil compressibility at pressures above
De Ghetto et al15 (1994) evaluated the reliability of some PVT correlations and
came up with some modified correlations which they reported as being more accurate.
They characterized the fluid samples used in their studies as extra-heavy oils
(oAPI 10), heavy oils (10 < oAPI 22.3), medium oils (22.3 < oAPI 31.1) and light
oils (oAPI > 31.1). They reported that the errors on the correlations were decreased by
about five percentage points. The most significant improvements for the entire sample
of the oils were from 24.5% to 19.8%. The modified correlations were given as:
31
Medium oils: Modified Vasquez-Beggs correlation
(
c o = 10 6.1646 B o
1.8789
0.3646
API T )
0.1966 p
1 b
p
8.98 3.9392 1.349
(
10 Bo T )
(2.46)
Where
p sp 4
gcorr = g p sp 1 + 0.5912 API Tsp Log 10
114.7 (2.47)
T = Reservoir temperature, oF
Dinodruk and Christman16 (2001) proposed a set of PVT correlations for the Gulf
of Mexico. The proposed oil compressibility correlation predicts the oil compressibility
values with an average relative error of -0.85% and average absolute relative error of
6.21%. The proposed isothermal oil compressibility is for undersaturated oil reservoirs.
(c o )bp (
= 4.487462368 + 0.005197040A + 0.000012580A 2 10 6 ) (2.48)
32
where
1.759732076
R s0.980922372 0.02100307 7
g
0.338486128
+ 20.0000635 8(T 60 )0.300001059
0.87681362 2R s
0
A= 2
1.713572145
2.749114986 + (T 60 ) 2R s
9.999932841
g
(2.49)
Spivey et al.38 (2005) proposed a set of correlations for estimating the isothermal
oil compressibility for three applications in reservoir engineering. The applications and
the values of the isothermal oil compressibility will be used to extend the values
of some fluid properties from the bubble point pressure of the oil to higher
pressures.
6
z = zn
n =1 (2.51)
33
Table 2.1 Coefficients for the co correlation Equation. 2.52
The value of the isothermal oil compressibility at initial pressure, cofb, can be
(p p b )c ofb p (p i p b )c ofb p i
c ofi =
p pi (2.53)
p
0.608 + 0.1822ln
pb
c o = c ofb + (p p b )c ofb (0.475 + 0.096z )
p (2.54)
34
CHAPTER III
p, volume V and Temperature T. The simplest form of an equation of state (EOS) is the
RT
p=
V (3.1)
The ideal gas equation is only used at pressures close to the atmospheric pressure
The behavior of most real gases cannot be predicted by the ideal gas equation;
therefore a correction factor, called the compressibility factor or the gas deviation factor
zRT
p=
V (3.2)
35
3.1.2 Van der Waals (VDW) EOS
In developing the ideal gas equation of state, the following assumptions were
made;
o There are no attractive and repulsive forces between the molecules of the gas or
between the molecules of the gas and the walls of the container.
In 1873, Van der Waal improved the ideal gas equation by attempting to eliminate
the first two assumptions of the ideal gas equation. Van der Wall introduced the
a
parameter and b to account for the intermolecular attractive and repulsive forces
V2
respectively.
RT a
p= 2
Vb V (3.3)
The Van der Waal EOS written in terms of volume or the compressibility factor
RT 2 a ab
V 3 b + V + V =0
p p p (3.4)
z 3 (1 + B)z 2 + Az AB = 0 (3.5)
aP
A=
(RT )2 (3.6)
36
bp
B=
RT (3.7)
The typical volumetric behavior of Van der Waal EOS is shown in the Figure 3.1.
T=Tc T2
T2 > T1
T1 Single Phase
Pressure
P1
Two Phase
Region
V3 V2 V1
Volume
Fig. 3.1: Volumetric Behavior of Pure Compounds by Van der Waal Cubic EOS13 pp 133.
The Van der Waal cubic EOS may give three real roots for volume V, or the
compressibility factor z, at pressure P1, as shown in Figure 3.1. The highest value, V1 or
z1, corresponds to the volume or the compressibility factor of the vapor, while the
The middle root within the two phase region, V2 or z2, is of no physical significance.
37
It can also be observed from Figure 3.1 that at the critical point C, the critical
p
=0
V Tc
(3.8)
2p
2 = 0
V Tc (3.9)
Applying this condition at the critical point, the constant a and b of the Van
27 R 2 Tc2
a=
64 p c
(3.10)
1 RT
b = c
8 pc (3.11)
Peng and Robinson proposed a slightly different form of EOS to predict liquid
densities and other volumetric properties of the fluid at the vicinity of the critical
region. Peng and Robinson proposed a slightly different attractive term compared to the
VDW EOS.
38
RT a
p=
V b V(V + b ) + b(V b ) (3.12)
RT a 2bRT RTb 2 ab
V 3 b V 2 + 3b 2 V + b 3 + = 0
p p p p p
(3.13)
( ) ( )
z 3 (1 B)z 2 + A 3B 2 2B z AB B 2 B 3 = 0 (3.14)
R 2 Tc2
a = a
pc (3.15)
where a = 0.45724
RTc
b = b
pc (3.16)
where b = 0.07780
[ (
= 1 + m 1 - Tr0.5 )]
2
(3.17)
The value of m was later expanded by Robinson et al. for heavier components
39
3.1.4 Lawal-Lake-Silberberg (LLS) EOS
The LLS EOS is a four parameter cubic EOS defined by Lawal et al.25. The term
and were introduced to account for the shape of the components on the attractive
RT a
P= 2
V b V + V b 2 (3.20)
(RTc )2
a = a k
pc (3.21)
a = (1 + ( w 1)z c )
3
where (3.22)
[ (
k = 1 + m 1 Tr0.5 )]
2
(3.23)
RTc
b = b
and pc (3.25)
b = zc w (3.26)
0.361
w =
where 1 + 0.274 (3.27)
1 + z c ( w 3)
=
zc w (3.28)
z c2 ( w 1) + 2 2w z c + w (1 3z c )
3
i =
z c 2w (3.29)
40
The LLS EOS can be written in terms of molar volume as,
RT a RT 3 RTT2 ab
V
3
+ b V 2 + b 2 b V + b + = 0
p p p p p
(3.30)
[ ] [ ( )]
z 3 + z 2 [B( 1) 1] z B 2 ( + ) + B A AB B 2 B 3 = 0 (3.31)
shown in equation 3.15 and equation 3.16. To account for the effect of each component
cubic EOS is replaced with the parameters a and b in the LLS EOS to create a
Modified PR EOS.
rules to calculate the constant terms of the EOS (a, b, , ) that will represent the multi-
component system. The mixture parameters used in the study are defined as,
a m = x i x j (a i a j ) ij
n n
0.5
i j
(3.32)
3
n 1
b m = x i b i 3
i (3.33)
41
m = x i x j ( i j ) ij
n n
0.5
i j
(3.34)
m = x i x j ( i j ) ij
n n
0.5
i j
(3.35)
ij
The binary interaction parameter is generally determined by minimizing the
should therefore be considered as a fitting parameter and not a rigorous physical term13.
The interaction parameters between hydrocarbon systems with little difference in size
are generally considered to be unity, but values of the binary interaction parameters for
interaction parameter is taken as unity, because the reservoir fluids used in the study
Tci Tcj
0.5 <
0.5
where, Pci Pcj
42
3.2 Characterization of Heavy Petroleum Fractions
To determine the properties of the heptane-plus (C7+), which account for the
proposed by Lawal-Tododo-Heinze40.
The correlation expressed the critical pressure (Pc), critical temperature (Tc),
acentric factor (), boiling point (Tb) and critical z-factor (zc) as a function of the
Tc ( R ) = 66.3775M
o 0.12286
S 0.47926
g Tb0.41286 C 0.35734
(3.38)
Tb ( R ) = 108.7017M
o 0.4225
S 0.4268
g
(3.40)
0.293
zc =
1 + 0.375 (3.41)
3.8501
C=
1.54057 0.02494 M (3.42)
43
method to develop an equation for predicting the molar volume and the coefficient of
The approach in this research is to develop a mathematical model that can predict
fractional change in oil volume per unit change in pressure at constant temperature. At
pressures above the bubble point pressure, the reservoir fluid is undersaturated. At point
A C
Temperature
Figure 3.2: Reservoir Oil at Pressure above the Bubble Point Pressure
44
The coefficient of isothermal compressibility at this point is given as stated in
equation 2.20,
1 V
co =
V p T
(2.20)
The approach to this research is to express the EOS in the volume form (which is
cubic) to determine the molar volume of the reservoir oil at any given pressure. This
1
will enable us to determine part of equation 2.20. If the cubic EOS in terms of
V
volume gives three real roots, as explained in section 3.1.2 and Figure 3.1, the smallest
V
The second step is to differentiate the EOS to obtain the term of
p T
equation 2.20. That is we differentiate the EOS in terms of volume with respect to
1 V
pressure at constant temperature. The two terms and are then
V p T
bubble point.
RT a
p=
V b V(V + b ) + b(V b ) (3.12)
45
RT a 2bRT RTb 2 ab
V 3 b V 2 + 3b 2 V + b 3 + = 0
p p p p p
(3.13)
A computer algorithm was written to solve for the volume of the undersaturated
oil using equation 3.13. The procedure for calculating the volume is stated below.
o Read in the temperature T (oR), pressure p (psia) and the universal gas constant
R (psia cu ft/lb mole/oR).
o Determine the roots equation 3.13. If there are three real roots, the smallest root
corresponds to the root of the multi-component oil system.
The differential of the volume with respect to pressure at constant temperature for
V
=
( 2
(
V b ) V 2 + 2bV b 2 )
2
2
(
p T 2a (V + b )(V b ) RT V 2 + 2bV b 2 )
2
(3.43)
There are no unknowns in equation 3.43. The volume has already been
determined from equation 3.13. The universal gas constant R and the reservoir
temperature T are known. The PR EOS parameters a and b can be calculated using
Therefore the PR EOS based mathematical model for predicting the coefficient of
isothermal compressibility at pressures above the bubble point can be written as,
1
co =
2
(
(V b ) V 2 + 2bV b 2 )
2
(
V 2a (V + b )(V b )2 RT V 2 + 2bV b 2 )
2
(3.44)
46
3.3.1.2 Modified Peng-Robinson (PR) EOS based Isothermal Compressibility Equation
In order to modify the PR EOS, the constant parameters in the PR EOS, that is the
parameters a and b are calculated using the LLS EOS definition for the parameters
a and b. The definitions for these constant parameters are given in equations 3.21,
At pressures below the bubble point curve (point B on Figure 3.3), there are free
gases in the reservoir fluids and the system is described as a saturated system.
Temperature
Figure 3.3: Reservoir Oil at Pressure below the Bubble Point Pressure
For saturated system the total volume of the system is the sum of the volume of
the gas and the volume of the liquid. Therefore the total system isothermal
47
At pressures below the bubble point pressure the volume of liquid decreases with
reduction in pressure, contrary to the behavior at pressures above the bubble. Therefore
the coefficient for isothermal oil compressibility at pressure below the bubble point
1 B o B g R s
co = + (3.45)
Bo p T B o p T
Equation 3.45 was used to analyze the experimental differential liberation data to
point pressure.
At pressures below the bubble point pressure there is a distinct gas phase in the
Oil
48
To determine the volume of the gas and the volume of the liquid at pressures
below the bubble point, flash calculations were conducted to simulate the flash
laboratory cell. The pressure and temperature of the cell is set at the initial condition of
the reservoir. The pressure in the laboratory cell is reduced in increments and the
volume of the cell is measured. The measured volume is then plotted against pressure.
The bubble point pressure is the pressure at which the slope of the graph changes. The
volume at the bubble point pressure is the saturation volume Vsat. Flash calculations
were used to determine the amount (in moles) and the composition of hydrocarbon
by the fugacities of the components in each of the phases. The fugacity of a component
in one phase with respect to the fugacity of the component in another is a measure of
the potential for the transfer of the component from one phase to the other. The
component moves from the phase with the lower fugacity to the phase with the higher
fugacity. When the fugacities of the component in the two phases are equal, there is no
net transfer of the component between the two phases. The condition for
thermodynamic equilibrium is achieved when there is zero net transfer between the two
phases2 pp 305.
The procedure for calculating the equilibrium amount (in moles) and the
equilibrium composition of the vapor and liquid phase at temperatures below the
49
bubble point is stated below. The procedure is also referred to a two phase flash
calculations.
o Calculate the initial equilibrium ratio values (K-values) using Wilson45 (1968)
correlation.
Tci
p 5.37 (1+ i ) 1 T
K i = ci e
(3.46)
p
o Calculate Nvmin (minimum number of moles of the vapor phase) and Nvmax
(maximum number of moles of the vapor phase). Nvmin should be less than zero,
while Nvmax should be greater than one.
1
N vmin =
1 K imax (3.47)
1
N vmax =
1 K imin (3.48)
f (n v )
N nv +1 = N nv
f ' (n v ) (3.49)
z i (K i 1)
f (n v ) =
i n v (K i 1) + 1 (3.50)
z i (K i 1)2
f ' (n v ) = 2
[n v (K i 1) + 1]
i
(3.51)
Where zi is the mole fraction component i in the original mixture and n, is the
iteration counter. If f(nv) is equal to zero use bisection method to evaluate Nv.
50
o Calculate the mole fraction of component i in the liquid phase xi
zi
xi =
1 + n v (K i 1) (3.52)
o Calculate the mole fraction of the component in the vapor phase yi.
ziK i
yi =
1 + n v (K i 1) (3.53)
o Calculate the compressibility factor (z-factor) of the vapor and the liquid phase
using the compressibility factor form of the PR EOS. Using equation 3.14
( ) ( )
z (1 B)z 2 + A 3B 2 2B z AB B 2 B 3 = 0
3
(3.14)
The mole fraction of the vapor is used in the calculation of the z-factor of the
vapor. If three real roots are obtained from equation 3.14, the largest root
corresponds to the root of the vapor. The mole fraction of the liquid is used in the
calculation of the z-factor of the liquid. It three real roots are obtained for the z-
factor of the liquid; the smallest real root corresponds to the root of the liquid.
o The component fugacities of the liquid fLi and the vapor phase fVi are
calculated from the EOS.
2 i Bi z L + 2.414B
ln
f Li B i L
=
xip B
( ) (
z 1 ln z B
L
) A
2.82843B
ln L
B z 0.414B
(3.54)
2 i Bi z v + 2.414B
ln
f vi Bi v
=
yi p B
( ) ( )
z 1 ln z v B
A
2.82843B
ln v
B z 0.414B
(3.55)
The parameters of the PR EOS are calculated using the appropriate mole
fractions.
51
2
n
f Li
i =1 f Vi
1 <
(3.56)
o If the convergence criteria is satisfied, the mole fraction of the liquid xi, the
mole fraction of the vapor yi, the total number in the vapor phase Nv and the
z-factor for both the liquid and vapor are returned as the equilibrium properties
the multi-component system.
o If the convergence criterion is not satisfied, the equilibrium ratios (K-values) are
updated.
(n )
( n +1) ( n ) f Li
Ki = K i (n )
f Vi (3.57)
where the superscripts (n) and (n+1) indicate the iteration level.
o Check for convergence into a trivial solution (Ki is tending towards 1) using,
(ln K )
2
i < 10 4
i =1 (3.58)
o When the convergence criterion is satisfied, the volumes of the liquid and gas
phases can then be calculated from the expressions
(1 N v )z L RT
VL =
p (3.59)
Vg =
(N v )z v RT
p (3.60)
VT = VL + Vg
(3.61)
52
3.3.2.2 Coefficient of Isothermal Gas compressibility below Bubble Point Pressure
1 1 z
cg =
p z p T
(2.13)
bp
(2a 3pb ) +
2 1
(6zpb 2
) (RT
2pb 2 za +
zb
)
(2 z )
z
=
(RT ) 3
(RT ) 2
p T p
( )
a 3pb 2 +
2bp
(RT )
(z 1) + z(3z 2)
(RT ) 2
(3.62)
Equation 2.13 can thus be used to calculate the coefficient of isothermal gas
compressibility, since the pressure p is known and the z-factor z has already been
calculated.
53
3.3.2.3 Coefficient of Isothermal Oil compressibility below Bubble Point Pressure
Below the bubble point the coefficient of isothermal oil compressibility can be
calculated using,
1 V
co =
V p T
(1.2)
Experimental data shows that at pressures below the bubble point pressure, the
volume of the liquid decreases as the pressure decreases. This behavior is also noticed
in the result of the flash calculations. It was therefore suggested that there is no need for
the negative sign, because the purpose of the negative sign is to make the isothermal
compressibility positive. The observation is not used in this report because it has not
Using the actual volume of liquid calculated form the flash calculations, the liquid
part of the coefficient of isothermal compressibility at pressures below the bubble point
z L RT
V=
p (3.64)
1
c o =
2
(
(V b ) V 2 + 2bV b 2 )2
(
V 2a (V + b )(V b )2 RT V 2 + 2bV b 2 )
2
(3.43)
The constant parameters of the PR EOS are calculated using the mole fraction of
54
3.3.2.4 Total Coefficient of Isothermal Compressibility below the Bubble Point
Pressure
The total coefficient of isothermal compressibility below the bubble point will be
the combination of the coefficient of isothermal gas compressibility below the bubble
point pressure and the coefficient of the isothermal oil compressibility below the bubble
point pressure.
This combination is achieved by using the volume fraction of the gas to multiple
the isothermal compressibility of the gas and the volume fraction of the oil to multiply
Vg VL
co = cg + (3.66)
(V
L + Vg ) (VL + Vg ) c L
55
CHAPTER IV
4.1 Computing Isothermal Oil Compressibility from Reservoir Fluid Study Report
laboratory. They are usually obtained from reservoir fluid study data. The constant
behavior of the reservoir fluid at pressures above the bubble point pressure.
The relative volume data from the constant composition expansion is used to
calculate the coefficient of isothermal oil compressibility at pressures above the bubble
point.
At pressures below the bubble point pressure, the reservoir behavior is simulated
by the differential liberation experiment. The solution gas-oil ratio RsD, the relative oil
volume BoD and the gas formation volume factor from the differential vaporization
The predicted molar volumes from the Peng-Robinson cubic EOS and the
modified Peng-Robinson cubic EOS are reported in Table 4.1, 4.2 and 4.3. A good
degree of accuracy are observed between the experimental molar volumes and the
predicted molar volumes as shown in Figures 4.1, 4.2 4.3 4.4 4.5 and 4.6
56
Table 4.1: Predicted molar volume for Oil Well No. 4, Good Oil Company. Samson,
Texas. Bubble Point = 2619.7 psia 29 pp 259-269
Volume (ft3/lb mole)
Pressure(psia) Exptal PR EOS MPR EOS
5014.7 2.2058 2.2047 2.2672
4514.7 2.2204 2.2201 2.2816
4014.7 2.2360 2.2371 2.2974
3514.7 2.2531 2.2559 2.3148
3014.7 2.2721 2.2770 2.3341
2914.7 2.2760 2.2815 2.3382
2814.7 2.2801 2.2861 2.3424
2714.7 2.2845 2.2909 2.3468
2634.7 2.2884 2.2948 2.3503
2619.7 2.2934 2.2033 2.6633
2605.7 2.2978 2.2083 2.6655
2530.7 2.3236 2.2427 2.6804
2415.7 2.3685 2.2897 2.7081
2267.7 2.4360 2.3597 2.7531
2104.7 2.5264 2.4519 2.8157
1911.7 2.6621 2.5878 2.9152
1712.7 2.8435 2.7688 3.0547
1491.7 3.1163 3.0482 3.2799
1306.7 3.4353 3.3596 3.5454
1054.7 4.0738 3.9944 4.1111
844.7 4.9482 4.8609 4.9103
654.7 6.2960 6.1895 6.1702
486.7 8.5187 8.3257 8.2369
57
Molar Volume Prediction for Oil Well No-4,Good Oil Company, Samson,TX. Pb =2619.7 psia
9.0
8.0
7.0
6.0
Molar Volume (ft3/lbmol)
5.0
Exptal
Model Based on PR EOS
4.0
3.0
2.0
1.0
0.0
0 1000 2000 3000 4000 5000 6000
Pressure (psia)
Figure 4.1: Predicted Molar Volume for Oil Well No- 4, Good Oil Company. Samson,
Texas (Model Based on PR EOS).
58
Molar Volume Predictionfor Oil Well No-4,Good Oil Company, Samson,TX. Pb =2619.7 psia
9.0
8.0
7.0
6.0
Molar volume (ft3/lbmol)
5.0
Exptal
Model Based on MPR EOS
4.0
3.0
2.0
1.0
0.0
0 1000 2000 3000 4000 5000 6000
Pressure (psia)
Figure 4.2: Predicted Molar Volume for Oil Well No- 4, Good Oil Company. Samson,
Texas (Model Based on MPR EOS).
59
Table 4.2: Predicted molar volume for Jehlicka 1A, Wilshire Oil Co. of Texas, Beaver,
Oklahoma. Bubble Point = 2666.7 psia 37
Volume (ft3/lb mole)
Pressure
(psia) Exptal PR EOS MPR EOS
5014.7 2.2110 2.2956 2.2779
4514.7 2.2226 2.3087 2.2892
4014.7 2.2351 2.3229 2.3015
3514.7 2.2487 2.3386 2.3149
3014.7 2.2633 2.3560 2.3296
2914.7 2.2662 2.3596 2.3327
2814.7 2.2694 2.3634 2.3359
2714.7 2.2726 2.3673 2.3391
2677.7 2.2737 2.3688 2.3403
2653.7 2.2794 2.2131 2.5787
2591.7 2.2949 2.2308 2.5899
2507.7 2.3181 2.2569 2.6056
2365.7 2.3645 2.3070 2.6378
2192.7 2.4575 2.3949 2.6874
2012.7 2.5282 2.4780 2.7570
1811.7 2.6644 2.6147 2.8618
1604.7 2.8558 2.8039 3.0107
1392.7 3.1289 3.0740 3.2342
1193.7 3.4998 3.4411 3.5483
949.7 4.2155 4.1399 4.1746
760.7 5.1473 5.0465 5.0142
591.7 6.5507 6.4199 6.3198
435.7 8.8958 8.7522 8.5807
60
Molar Volume Prediction for Jehlicka 1A, Wilshire Oil Co. of Texas, Beaver, Oklahoma. (MPR
EOS) Bubble Point = 2666.7 psia.
10.0
9.0
8.0
7.0
Molar Volume (ft3/lbmol)
6.0
Exptal
5.0
Model Based on PR EOS
4.0
3.0
2.0
1.0
0.0
0 1000 2000 3000 4000 5000 6000
Pressure (psia)
Figure 4.3: Predicted Molar Volume for Jehlicka 1A, Wilshire Oil Co. of Texas,
Beaver, Oklahoma. (Model Based on PR EOS).
61
Molar Volume Prediction for Jehlicka 1A, Wilshire Oil Co. of Texas, Beaver, Oklahoma. (MPR
EOS) Bubble Point = 2666.7 psia.
10.0
9.0
8.0
7.0
Molar Volume (ft3/lbmol)
6.0
Exptal
5.0
Model Based on MPR EOS
4.0
3.0
2.0
1.0
0.0
0 1000 2000 3000 4000 5000 6000
Pressure (psia)
Figure 4.4: Predicted Molar Volume for Jehlicka 1A, Wilshire Oil Co. of Texas,
Beaver, Oklahoma. (Model Based on MPR EOS).
62
Table 4.3: Predicted molar volume for Jacques Unit #5603, Rough Ride Field, A.C.T.
Operating Company, Fisher County, Texas. Bubble Point = 1689.7 psia 36
Volume (ft3/lb mole)
Pressure (psia) Exptal PR EOS MPR EOS
5014.7 2.2175 2.2330 2.3248
4514.7 2.2269 2.2426 2.3345
4014.7 2.2368 2.2528 2.3451
3514.7 2.2474 2.2640 2.3565
3014.7 2.2586 2.2761 2.3689
2514.7 2.2707 2.2893 2.3824
2014.7 2.2838 2.3039 2.3974
1914.7 2.2866 2.3070 2.4006
1814.7 2.2893 2.3102 2.4038
1714.7 2.2921 2.3134 2.4071
1689.7 2.2928 2.3142 2.4079
1680.7 2.2969 2.1812 2.4891
1670.7 2.3015 2.1860 2.4929
1660.7 2.3063 2.1909 2.4968
1650.7 2.3111 2.1959 2.5008
1627.7 2.3223 2.2076 2.5106
1541.7 2.3693 2.2565 2.5506
1402.7 2.4636 2.3549 2.6325
1244.7 2.6080 2.5060 2.7595
1064.7 2.8460 2.7572 2.9765
900.7 3.1745 3.0966 3.2800
747.7 3.6485 3.5832 3.7261
631.7 4.1962 4.1440 4.2506
501.7 5.1681 5.1419 5.2026
390.7 6.5871 6.6222 6.6328
287.7 8.9929 9.1869 9.1431
63
Molar Volume Prediction for Jacques Unit #5603, Rough Ride Field, A.C.T. Operating
Company, Fisher County, Texas. Bubble Point = 1689.7 psia
10.0
9.0
8.0
7.0
Molar Volume (ft3/lbmol)
6.0
Exptal
5.0
Model based on PR EOS
4.0
3.0
2.0
1.0
0.0
0 1000 2000 3000 4000 5000 6000
Pressure (psia)
Figure 4.5: Predicted Molar Volume for Jacques Unit #5603, Rough Ride Field, Fisher
County, Texas. (Model Based on PR EOS).
64
Molar Volume Prediction for Jacques Unit #5603, Rough Ride Field, A.C.T. Operating
Company, Fisher County, Texas. Bubble Point = 1689.7 psia
10.0
9.0
8.0
7.0
Molar Volume (ft3/lbmol)
6.0
Exptal
5.0
Model Based on MPR EOS
4.0
3.0
2.0
1.0
0.0
0 1000 2000 3000 4000 5000 6000
Presssure (psia)
Figure 4.6: Predicted Molar Volume for Jacques Unit #5603, Rough Ride Field, Fisher
County, Texas.(Model based on MPR EOS).
65
4.3 Predicted Coefficient of Isothermal Oil Compressibility from Cubic Equation of
State
Table 4.4: Predicted Coefficient of Isothermal Oil Compressibility for Oil Well No. 4,
Good Oil Company. Samson, Texas. Bubble Point = 2619.7 psia 29 pp 259 - 269
Isothermal Compressibility (psia-1)
Pressure(psia) Exptal PR EOS MPR EOS
5014.7 1.33E-05 1.21E-05
4514.7 1.32E-05 1.45E-05 1.32E-05
4014.7 1.40E-05 1.59E-05 1.44E-05
3514.7 1.53E-05 1.76E-05 1.58E-05
3014.7 1.68E-05 1.96E-05 1.75E-05
2914.7 1.71E-05 2.01E-05 1.79E-05
2814.7 1.81E-05 2.05E-05 1.83E-05
2714.7 1.91E-05 2.10E-05 1.87E-05
2634.7 2.13E-05 2.14E-05 1.90E-05
2364.7 1.55E-04 2.35E-04 2.06E-04
2114.7 1.83E-04 2.74E-04 2.44E-04
1864.7 2.09E-04 3.26E-04 2.95E-04
1614.7 2.53E-04 3.96E-04 3.65E-04
1364.7 3.15E-04 4.95E-04 4.65E-04
1114.7 4.17E-04 6.44E-04 6.16E-04
864.7 5.76E-04 8.84E-04 8.63E-04
614.7 8.87E-04 1.33E-03 1.32E-03
364.7 1.83E-03 2.42E-03 2.44E-03
173.7 5.20E-03 5.42E-03 5.47E-03
66
Coefficient of Isothermal Oil Compressibility for Oil Well No-4,Good Oil Company,
Samson,TX. Pb =2619.7 psia
0.006
0.005
0.004
Co (1/psi)
Exptal
0.003
Model Based on PR EOS
0.002
0.001
0.000
0 500 1000 1500 2000 2500 3000 3500 4000 4500 5000
Pressure (psia)
Figure 4.7: Predicted Coefficient of Isothermal Oil Compressibility for Oil Well No. 4,
Good Oil Company. Samson, Texas. (Model Based on PR EOS).
67
Coefficient of Isothermal Oil Compressibility for Oil Well No-4,Good Oil Company,
Samson,TX. Pb =2619.7 psia
0.006
0.005
0.004
Co (1/psia)
Exptal MPR
0.003
Model Based on MPR EOS
0.002
0.001
0.000
0 500 1000 1500 2000 2500 3000 3500 4000 4500 5000
Pressure (psia)
Figure 4.8: Predicted Coefficient of Isothermal Oil Compressibility for Oil Well No. 4,
Good Oil Company. Samson, Texas. (Model Based on MPR EOS).
68
Table 4.5: Predicted Coefficient of Isothermal Oil Compressibility for Jehlicka 1A,
Wilshire Oil Co. of Texas, Beaver, Oklahoma. Bubble Point = 2666.7 psia. 37
Isothermal Compressibility (psia-1)
Pressure
(psia) Exptal PR EOS MPR EOS
5014.7 1.09E-05 9.56E-06
4514.7 1.05E-05 1.18E-05 1.03E-05
4014.7 1.12E-05 1.29E-05 1.11E-05
3514.7 1.22E-05 1.41E-05 1.21E-05
3014.7 1.29E-05 1.55E-05 1.32E-05
2914.7 1.31E-05 1.59E-05 1.35E-05
2814.7 1.40E-05 1.62E-05 1.37E-05
2714.7 1.40E-05 1.65E-05 1.40E-05
2677.7 1.35E-05 1.67E-05 1.41E-05
2414.7 1.34E-04 2.12E-04 1.88E-04
1914.7 1.89E-04 2.96E-04 2.69E-04
1664.7 2.27E-04 3.60E-04 3.33E-04
1414.7 3.07E-04 4.50E-04 4.23E-04
1164.7 4.09E-04 5.82E-04 5.58E-04
914.7 5.57E-04 7.95E-04 7.76E-04
664.7 8.69E-04 1.18E-03 1.17E-03
414.7 1.61E-03 2.05E-03 2.07E-03
197.7 4.58E-03 4.66E-03 4.72E-03
69
Coefficient of isothermal Oil Compressibility for Jehlicka 1A, Wilshire Oil Co. of Texas,
Beaver, Oklahoma. (PR EOS) Bubble Point = 2666.7 psia.
5.00E-03
4.50E-03
4.00E-03
3.50E-03
3.00E-03
Co (1/psia)
Exptal
2.50E-03
Model Based on PR EOS
2.00E-03
1.50E-03
1.00E-03
5.00E-04
0.00E+00
0 500 1000 1500 2000 2500 3000 3500 4000 4500 5000
Pressure (psia)
Figure 4.9: Predicted Coefficient of Isothermal Oil Compressibility for Jehlicka 1A,
Wilshire Oil Co. of Texas, Beaver, Oklahoma. (Model Based on PR EOS).
70
Coefficient of Isothermal Oil Compressibility for Jehlicka 1A, Wilshire Oil Co. of Texas,
Beaver, Oklahoma. (MPR EOS) Bubble Point = 2666.7 psia.
0.005
0.005
0.004
0.004
0.003
Co (1/psia)
Exptal
0.003
Model Based on MPR EOS
0.002
0.002
0.001
0.001
0.000
0 500 1000 1500 2000 2500 3000 3500 4000 4500 5000
Pressure (psia)
Figure 4.10: Predicted Coefficient of Isothermal Oil Compressibility for Jehlicka 1A,
Wilshire Oil Co. of Texas, Beaver, Oklahoma. (Model Based on MPR EOS).
71
Table 4.6: Predicted Coefficient of Isothermal Oil Compressibility for Jacques Unit
#5603, Rough Ride Field, A.C.T. Operating Company, Fisher County, Texas. Bubble
Point = 1689.7 psia 36
Isothermal Compressibility (psia-1)
Pressure
(psia) Exptal PR EOS MPR EOS
5014.7 8.24E-06 8.10E-06
4514.7 8.46E-06 8.83E-06 8.68E-06
4014.7 8.83E-06 9.49E-06 9.34E-06
3514.7 9.41E-06 1.03E-05 1.01E-05
3014.7 9.97E-06 1.11E-05 1.09E-05
2514.7 1.07E-05 1.21E-05 1.19E-05
2014.7 1.15E-05 1.33E-05 1.31E-05
1914.7 1.20E-05 1.36E-05 1.34E-05
1814.7 1.20E-05 1.38E-05 1.36E-05
1714.7 1.20E-05 1.41E-05 1.39E-05
1689.7 1.20E-05 1.42E-05 1.40E-05
1514.7 2.39E-04 4.32E-04 4.00E-04
1364.7 2.72E-04 4.98E-04 4.65E-04
1214.7 3.32E-04 5.82E-04 5.49E-04
1064.7 3.99E-04 6.91E-04 6.58E-04
914.7 4.98E-04 8.38E-04 8.08E-04
614.7 9.05E-04 1.36E-03 1.34E-03
464.7 1.38E-03 1.88E-03 1.87E-03
314.7 2.48E-03 2.91E-03 2.91E-03
174.7 5.98E-03 5.47E-03 5.50E-03
72
Coefficient of Isothermal Oil compressibility for Jacques Unit #5603, Rough Ride Field, A.C.T.
Operating Company, Fisher County, Texas. Bubble Point = 1689.7 psia
0.007
0.006
0.005
0.004
Co (1/psia)
Exptal
Model Based on PR EOS
0.003
0.002
0.001
0.000
0.0 500.0 1000.0 1500.0 2000.0 2500.0 3000.0 3500.0 4000.0 4500.0 5000.0
Pressure (psia)
Figure 4.11: Predicted Coefficient of Isothermal Oil Compressibility for Jacques Unit
#5603, Rough Ride Field, A.C.T. Operating Company, Fisher County, Texas. (Model
Based on PR EOS).
73
Coefficient of Isothermal Oil Compressibility for Jacques Unit #5603, Rough Ride Field, A.C.T.
Operating Company, Fisher County, Texas. Bubble Point = 1689.7 psia
0.007
0.006
0.005
0.004
Co (1/psia)
Exptal
Model Based on MPR EOS
0.003
0.002
0.001
0.000
0.0 500.0 1000.0 1500.0 2000.0 2500.0 3000.0 3500.0 4000.0 4500.0 5000.0
Pressure (psia)
Figure 4.12: Predicted Coefficient of Isothermal Oil Compressibility for Jacques Unit
#5603, Rough Ride Field, A.C.T. Operating Company, Fisher County, Texas. (Model
Based on MPR EOS).
The reservoir fluid used in this project can be classified as black oil because their API
The developed model based on the PR EOS and the Modified PR EOS predicted
the coefficient of isothermal oil compressibility above the bubble point with a near
perfect match. At pressures below the bubble point the developed model also gave a good
74
The average absolute percent deviation (AAPD) as shown in Appendix H, for the
developed model based on the MPR EOS was smaller than the model based on the PR
EOS. The AAPD for the predicted models above the bubble point was smaller than the
AAPD for the total system. The smallest AAPD (of 1.9% deviation) above the bubble
point pressure was obtained by the model based on the MPR EOS for the Jehlicka 1A
well of Wilshire Oil Co. of Texas. The largest AAPD (of 12.39% deviation) above the
bubble point pressure was obtained by the model based on the PR EOS for the Jacques
The smallest AAPD (of 19.10% deviation) for the predicted coefficient of
isothermal oil compressibility for the whole system (i.e. at pressures above and below the
bubble point pressure) was obtained from the model based on the MPR EOS for the
Jehlicka 1A well of Wilshire Oil Co. of Texas. The largest AAPD (of 32.44% deviation)
for the predicted coefficient of isothermal oil compressibility for the whole system (i.e. at
pressures above and below the bubble point pressure) was obtained from the model based
on the PR EOS for the Jacques Unit #5603 of the A.C.T Operating Company.
The suggested reason for the larger deviation in the predicted result for the
Jacques Unit #5603 of the A.C.T Operating Company is because the reservoir fluid
composition used was a recombination of the well stream production. The error acquired
This study used the components given in the fluid study report and lumped
together the heptane-plus (C7+). In order to quantify the effect of using more components,
the developed model was run using 24 components for the Jacques Unit #5603 of the
75
A.C.T Operating Company. The AAPD above the bubble point pressure was 2.84%
deviation above the bubble point pressure and 22.30% deviation for the total system for
the model based on the MPR EOS. This was smaller than the 10.66% deviation above the
bubble point pressure and 28.75% deviation for the total system for the model based on
MPR EOS when the C7+ was lumped together. For the model based on the PR EOS, the
AAPD increased from 12.39% to 49.92% deviation at pressures above the bubble point
and from 32.44% to 48.05% deviation for the total system at pressures above and below
The increase in the error in the model based on the PR EOS could be due to the
correlation used to calculate the critical parameter of the Eicosanes-plus (C20+). The
effect of this correlation was believed to be minimized in the model based on the MPR
EOS because the constant parameter a which is dependent of the components critical
parameter.
compressibility using 11 components of the Jacques Unit #5603 of the A.C.T. Operating
Company was 9,791. When the same reservoir fluid data was used to predict the
isothermal oil compressibility using the 24 components, the number of iterations recorded
was 24,961. This shows a 155 % increase in the number of iterations. This increase in the
number of iterations will translate into a higher computing cost when calculating the
76
CHAPTER V
5.1 Conclusions
2. The mathematical model was extended to pressures below the bubble point, using the
bubble point.
isothermal oil compressibility from the developed EOS based mathematical model
6. The predicted molar volume from the two phase calculation was reported and
77
7. A computer algorithm (using FORTRAN) was developed to compute the coefficient
5.2 Recommendations
1. Research is very active in the area of two phase calculation to determine the
equilibrium quantity and composition of liquid and vapor in the two phase region. A
more robust two phase flash algorithm is recommended to increase the accuracy of
the constant parameters of the Peng-Robinson EOS (i.e. a and b) and the binary
recommended that the developed mathematical model be coupled with the simulation
suggested that the accuracy of equation 3.45 be validated. The reason for this
validation is the slope change observed in the graph of the formation volume factor
and the pressure, at pressures above and below the bubble point pressure.
5. The developed model can also be extended to gas fields to predict the coefficient of
78
REFERENCES
3. Ahmed, T., A Practical Equation of State, paper SPE 18532, SPE Reservoir
Engineering, pp 137, February (1991).
4. Ahmed. T., Compositional Modeling of Tyler and Mission Canyon Formation Oils
with Co2 and Lean Gases, final report submitted to Montanans on a New Track
Science (MONTS) (Montana National Science Foundation Gran Program), 1985-
1988.
11. Brelvi, S. W., Correlations developed for compressibility, Oil & Gas Journal, pp
60, January 29 (2001).
12. Cameron, A., The Isothermal and Adiabatic Compressibility of Oil, Journal of the
Institute of Petroleum, Vol. 31, No. 263, November (1945).
79
13. Danesh, A., PVT and Phase Behavior of Petroleum Reservoir Fluids., Elsevier
Science, 2nd Edition, (2001).
15. De Ghetto, G., Paone, F. and Villa, M., Reliability Analysis on PVT Correlations,
paper SPE 28904 presented at the 1994 European Petroleum Conference, London,
U.K, October 25-27.
16. Dindoruk, B. and Christman, P. G., PVT Properties and Viscosity Correlations for
Gulf of Mexico Oils, SPEREE, pp 427-437, December, (2004).
17. Downer, L. and Gardiner, E. S., The Compressibility of Crude Oils, Journal of the
Institute of Petroleum, Vol. 58, No. 559, January (1972).
18. Firoozabadi, A. and Huanquan, P., Two-Phase Isentropic Compressibility and Two-
Phase Sonic Velocity for Multi component-Hydrocarbon Mixtures, paper SPE 38844
presented at the 1997 Annual Technical Conference and Exhibition, San Antonio,
Texas, October 5-8.
19. Firoozabadi, A. and Kashchiev, D., Pressure and Volume Evolution During Gas
Phase Formation in Solution Gas Drive Process, paper SPE 26286, SPE Journal, pp
219, September (1996).
20. Firoozabadi, A., Reservoir-Fluid Phase Behavior and Volumetric Prediction with
Equations of State, JPT, 397, (April, 1988).
23. Hawkins, M. F., Material Balance in Expansion Type Reservoirs above Bubble
Point, paper SPE 499-G, Petroleum Transactions, AIME ,204, pp 267 (1955).
24. Lawal, A. S., Revival of the van der Waals Classical Theory via Silberberg
Constant, paper SPE 22712 presented at the 1991 Annual Technical Conference and
Exhibition, Dallas, Texas, October 6-9.
80
25. Lawal, A. S., Van der Laan, E. T., and Thambynayagam, R. K. M., Four-Parameter
Modification of the Lawal-Lake-Silberberg Equation of State for Calculating Gas-
Condensate Phase Equilibria, paper SPE 14269 presented at the 1985 Annual
Technical Conference and Exhibition, Las Vegas, Nevada, September 22-25.
27. Martin, J. C., Simplified Equations of Flow in Gas Drive Reservoirs and the
Theoretical Foundation of Multiphase Buildup Analyses, paper SPE 1235-G,
Petroleum Transactions, Vol. 216, 321 (1959).
29. McCain, W. D., Jr., The Properties of Petroleum Fluids., PennWell Books, 2nd
Edition, (1990).
30. McCain, W. D., Rollins, J. B. and Villena Lanzi, A. J., The Coefficient of Isothermal
Compressibility of Black Oils at Pressures Below the Bubble Point, SPE Formation
Evaluation, pp 659, September (1988).
31. Nghiem, L. X. and Li, Y. K., Approximate Flash Calculations for Equation-of-State
Compositional Models, SPE Reservoir Engineering, pp 107, February (1990).
32. Peng, D. Y. and Robinson, D. B.,A New Two-Constant Equation of State, Ind. Eng.
Chem. Fundamentals, 15, 59 (1976).
34. Rachford, H. H., Jr. and Rice, J. D., Procedure for Use of Electronic Digital
Computers in Calculating Flash vaporization Hydrocarbon Equilibrium, Petroleum
Transactions, AIME, Vol. 195, 327, (1952).
35. Ramey, H. J., Rapid Methods for Estimating Reservoir Compressibilites, paper
SPE 772, JPT, 447, April (1964).
36. Reservoir Fluid Study on Jacques Unit #5603, Rough Ride Field, Core Laboratories,
Inc. Report (Aug 1999).
81
37. Reservoir Fluid Study on Jehlicka 1A Well, Core Laboratories, Inc. Report (May
1984).
38. Spivey, J. P., Valko, P. P. and McCain, W. D., Applications of the Coefficient of the
Isothermal Compressibility to Various Reservoir Situations with New Correlation for
Each Situation, paper SPE 96415 presented at the 2005 Annual Technical
Conference and Exhibition, Dallas, Texas, October 9-12.
39. Standing, M. B., Volumetric and Phase Behavior of Oil Field Hydrocarbon Systems. ,
Society of Petroleum Engineers of AIME, Dallas, Texas (1977).
41. Trube, A. S., Compressibility of Natural Gases, paper SPE-697-G, Technical Note,
398, pp 69, January (1957).
43. Vasquez, M. and Beggs, H. D., Correlations for Fluid Physical Property Prediction,
JPT, pp. 968-970, June (1980).
44. Whitson, C. H. and Brule, M. R., Phase Behavior., Monograph Series, SPE,
Richardson, Texas (2000).
45. Wilson, G., A Modified Redlich-Kwong EOS, Application to General Physical Data
Calculations, paper 15C, presented at the Annual AIChE National Meeting held in
Cleveland, Ohio, May 4-7 (1968).
46. Yale, D. P., Nabor, G. W. and Russell, J. A., Application of Variable Formation
Compressibility for Improved Reservoir Analysis, paper SPE 26647 presented at the
1993 Annual Technical Conference and Exhibition, Houston, Texas, October 3-6.
82
APPENDIX A
EQUATION
RT a
P=
V b V(V + b) + b(V b) (A.1)
a(V b)
P(V b) = RT
V(V + b) + b(V b) (A.2)
Simplifying,
a(V b)
P(V b) = RT
V + 2Vb b 2
2
(A.3)
Expanding,
Dividing by RT,
P a
(V 3 + bV 2 3Vb 2 + b 3 ) = (V 2 + 2Vb b 2 ) (V b)
RT RT (A.6)
83
ZRT
V=
But P (Real gas equation), hence (A.6) becomes,
(A.7)
Multiplying by P2 gives,
P3 aPbP
Z 3 (RT) 2 + bZ 2 (RT)P 3P 2 b 2 Z + b 3 Z 2 (RT) 2 2bZ(RT)P + P 2 b 2 + aZP =0
RT RT
(A.9)
bP Pb Pb P3 Pb Pb Pb aP aP bP
Z3 + Z 2 3Z + b3 3
Z 2 2Z + +Z 2
=0
RT RT RT (RT) RT RT RT (RT) (RT) 2 RT
(A.10)
bP aP
B= A= 2 2
But RT and R T , therefore,
84
A.2 Derivation of PR EOS Molar Volume Equation
RT a
P=
V b V(V + b ) + b(v b) (A.15)
a (V b )
P(V b ) = RT
V(V + b ) + b(v b) (A.16)
Simplifying,
( ) ( )
P V 3 + 2V 2 b Vb 2 bV 2 2Vb 2 + b 3 = RT V 2 + 2Vb b 2 a (v b ) (A.18)
( ) ( )
P V 3 + V 2 b 3Vb 2 + b 3 RT V 2 + 2Vb b 2 + a (v b ) = 0 (A.19)
RT 2 a RT 3 RT 2 aP
V3 + b V + 3b 2b
2
V + b + b =0
P P P P b (A.20)
85
APPENDIX B
COMPRESSIBILITY EQUATION
1 V
c=
V p T
(B.1)
RT a
p=
V b V(V + b ) + b(V b ) (B.2)
p RT 2a (V + b )
= +
V T (V b )
2
(
V + 2bV b 2
2
)
2
(B.3)
p
=
2
(
2a (V + b )(V b ) RT V 2 + 2bV b 2 )
2
V T (
(V b )2 V 2 + 2bV b 2 2) (B.4)
V
=
( 2
(
V b ) V 2 + 2bV b 2 )
2
2
(
p T 2a (V + b )(V b ) RT V 2 + 2bV b 2 )
2
(B.5)
expressed as,
86
1
co =
2
(
(V b ) V 2 + 2bV b 2 )2
(
V 2a (V + b )(V b )2 RT V 2 + 2bV b 2 )
2
(B.6)
The molar volume V in equation B.6 is determined from the cubic molar volume
equation of the PR EOS. The cubic molar volume equation of the PR EOS is expressed
as,
RT a RT RTb 2 ap
V 3 b V 2 + 3b 2 2b V + b 3 + = 0
p p p p b
(B.7)
87
APPENDIX C
bP aP
B= A= 2 2
where RT and R T
bp 2 ap bp ap bp bp 2 bp 3
2
bp
Z 3 1 Z + 3 2 Z
RT RT RT = 0
(RT ) (RT )
2 2
RT RT RT
(C.2)
1 1 z
cg =
p z p T
(C.3)
z z bp z z 2 b ap z za
3z 2z + 2z
2
+ + + 2
p T p T RT p T RT (RT ) p T (RT )
2
88
Simplifying equation C.4 gives,
z 2 bp ap 3(bp )2 2bp
3z 2z + 2z + =
p RT (RT )2 (RT )2 RT
(C.6)
Therefore the PR EOS based equation for the isothermal gas compressibility is
expressed as,
89
APPENDIX D
vapor and liquid below the bubble point pressure. Flash calculation is a simulation of
nv (y i)
n (z i)
nL (x i)
where,
90
Considering the mole balance,
n = nL + nV (D.1)
zi n = xi nL + yi nV (D.2)
x i =1
(D.3)
y i =1
(D.4)
z i =1
(D.5)
nL + nV = 1 (D.6)
zi = xi nL + yi nV (D.7)
yi
Ki =
xi (D.8)
z =x n +x K n
i i L i i V (D.9)
zi
xi =
nL + KinV (D.10)
91
ziKi
yi =
nL + KinV (D.11)
zi
x = n
i
+ nVKi
=1
i i L (D.12)
ziKi
y = n
i =1
i i L + nVKi (D.13)
But x i =1
and y i =1
Hence, y x
i i =0
ziKi zi
n =0
i L + nVKi i nL + nVKi
(D.14)
z i (K i 1)
n =0
i L + nVKi (D.15)
nL = 1 - nV (D.16)
z i (K i 1)
n (K =0
i V i 1) + 1 (D.17)
92
In order to determine the moles and the compositions of the vapor and liquid
phases in the reservoir at temperatures below the bubble point pressure, equation D.17
is solved numerically to obtain nV. The calculated mole fraction of the vapor phase can
then be used to calculate the mole fraction of the individual component in the vapor and
In this study equation D.15 is solved using the Newton Raphsons method. The
(n v )
(n V )n +1 = (n V )n f
f' (n v ) (D.18)
where n and n+1 indicates the iterative steps and the functions are defined as,
z i (K i 1)
f (n V ) =
i n V (K i 1) + 1 (D.19)
z i (K i 1)2
f' (n V ) = 2
[n V (K i 1) + 1]
i
(D.20)
93
APPENDIX E
At pressures below the bubble point pressure the hydrocarbon mixture is in the
two phase region (Figure E.1), containing hydrocarbon liquid and vapor. Each of these
Gas Vg; cg
Oil
Vt Vt
co co
Oil VL; cL
P > Pb P < Pb
From figure E.1, the total volume of the system can be represented by,
Vt = VL + Vg
(E.1)
94
Vt V Vg
= L +
p T p T p T (E.2)
1 Vt
ct =
Vt p T (E.3)
1 VL
cL =
VL p T (E.4)
1 Vg
cg =
Vg p T (E.5)
The proposed method for adding the coefficient of isothermal oil compressibility
Vg VL
ct = cg + cL
Vt Vt (E.6)
1 Vt V 1 VL Vg 1 Vg
= L +
Vt p T Vt VL p T Vt Vg p T (E.7)
V
Substituting for t in equation E.7, using equation E.2 gives,
p T
1 VL Vg VL 1 VL Vg 1 Vg
+ = +
Vt p T p T Vt VL p T Vt Vg p T (E.8)
Simplifying,
95
1 VL 1 Vg 1 VL 1 Vg
+ = +
Vt p T Vt p T Vt p T Vt p T (E.9)
96
APPENDIX F
laboratory. It is calculated from the experimental data reported in the reservoir fluid
study report.
Volume Relations at pressures above the bubble point pressure. The expressions used to
calculate the coefficient of isothermal oil compressibility at pressures above the bubble
Vt
Vb 2
ln
V
t
Vb 1
co = (F.1)
p1 p 2
V
where t are Pressure-Volume Relations data at different pressures of interest.
Vb
At pressures below the bubble point pressure, the coefficient of isothermal oil
1 B o Bg R s
co = +
Bo p T Bo p T (F.2)
97
Equation F.2 is further simplified by McCain 29 p. 290, to give
1 R SD B
co = B g OD
B oD p T p T (F.3)
The subscript D shows that the data are from the differential vaporization
experiment.
The experimental molar volume and isothermal oil compressibility are determined
98
F.1 Reservoir Fluid Study Field Report 129 pp 259-269
99
Table F.2: Molar Volume Determination from Pressure-Volume Relations for Oil Well No. 4
Vt *ft3/lbmol)
Pressure (1) Rel Vol (2) Vsat * Rel = App Mol
(psig) (Vt/Vo) Vol ( ft3/lb) Wt * (2) co(psi-1)
5000 0.9639 0.0235 2.2058
4500 0.9703 0.0237 2.2204 1.32E-05
4000 0.9771 0.0239 2.2360 1.40E-05
3500 0.9846 0.0240 2.2531 1.53E-05
3000 0.9929 0.0242 2.2721 1.68E-05
2900 0.9946 0.0243 2.2760 1.71E-05
2800 0.9964 0.0243 2.2801 1.81E-05
2700 0.9983 0.0244 2.2845 1.91E-05
2620 1.0000 0.0244 2.2884 2.13E-05
2605 1.0022 0.0245 2.2934
2591 1.0041 0.0245 2.2978
2516 1.0154 0.0248 2.3236
2401 1.0350 0.0253 2.3685
2253 1.0645 0.0260 2.4360
2090 1.1040 0.0269 2.5264
1897 1.1633 0.0284 2.6621
1698 1.2426 0.0303 2.8435
1477 1.3618 0.0332 3.1163
1292 1.5012 0.0366 3.4353
1040 1.7802 0.0435 4.0738
830 2.1623 0.0528 4.9482
640 2.7513 0.0672 6.2960
472 3.7226 0.0909 8.5187
100
Table F.3: Differential Vaporization data for Oil Well No. 4
Pressure Bg (res cu Bg(res
(psig) Rsd BoD ft/ bbl) dRsd/dp dBod/dRsd bbl/scf) co(p<pb)
2620 854 1.6000
2350 763 1.5540 0.0069 0.3370 0.0005 0.0012 1.55E-04
2100 684 1.5150 0.0077 0.3160 0.0005 0.0014 1.83E-04
1850 612 1.4790 0.0088 0.2880 0.0005 0.0016 2.09E-04
1600 544 1.4450 0.0103 0.2720 0.0005 0.0018 2.53E-04
1350 479 1.4120 0.0125 0.2600 0.0005 0.0022 3.15E-04
1100 416 1.3820 0.0155 0.2520 0.0005 0.0028 4.17E-04
850 354 1.3510 0.0204 0.2480 0.0005 0.0036 5.76E-04
600 292 1.3200 0.0293 0.2480 0.0005 0.0052 8.87E-04
350 223 1.2830 0.0507 0.2760 0.0005 0.0090 1.83E-03
159 157 1.2440 0.1083 0.3455 0.0006 0.0193 5.20E-03
101
F.2 Reservoir Fluid Study Report 2 37
102
Table F.5: Molar Volume Determination from Pressure-Volume Relations for Jehlicka 1A
Vsat *
Pressure RelVol Rel Vt (ft3 /
(psig) (Vt/Vo) Vol lb mol) co(psi-1)
5000 0.9724 0.0231 2.2110
4500 0.9775 0.0233 2.2226 1.05E-05
4000 0.9830 0.0234 2.2351 1.12E-05
3500 0.9890 0.0235 2.2487 1.22E-05
3000 0.9954 0.0237 2.2633 1.29E-05
2900 0.9967 0.0237 2.2662 1.31E-05
2800 0.9981 0.0238 2.2694 1.40E-05
2700 0.9995 0.0238 2.2726 1.40E-05
2663 1.0000 0.0238 2.2737 1.35E-05
2639 1.0025 0.0239 2.2794
2577 1.0093 0.0240 2.2949
2493 1.0195 0.0243 2.3181
2351 1.0399 0.0247 2.3645
2178 1.0808 0.0257 2.4575
1998 1.1119 0.0265 2.5282
1797 1.1718 0.0279 2.6644
1590 1.2560 0.0299 2.8558
1378 1.3761 0.0328 3.1289
1179 1.5392 0.0366 3.4998
935 1.8540 0.0441 4.2155
746 2.2638 0.0539 5.1473
577 2.8810 0.0686 6.5507
421 3.9124 0.0931 8.8958
103
Table F.6: Differential Vaporization data for Jehlicka 1A
Pressure Bg (res cu Bg(res
(PSIG) Rsd BoD ft/ bbl) dRsd/dp dBod/dRsd bbl/scf) co(1/psia)
2663 928 1.5150
2400 840 1.4750 0.0059 0.3346 0.0005 0.0010 1.34E-04
2150 765 1.4410 0.0065 0.3000 0.0005 0.0012 1.48E-04
1900 690 1.4080 0.0075 0.3000 0.0004 0.0013 1.89E-04
1650 619 1.3760 0.0087 0.2840 0.0005 0.0015 2.27E-04
1400 547 1.3450 0.0105 0.2880 0.0004 0.0019 3.07E-04
1150 476 1.3150 0.0130 0.2840 0.0004 0.0023 4.09E-04
900 407 1.2850 0.0170 0.2760 0.0004 0.0030 5.57E-04
650 336 1.2530 0.0241 0.2840 0.0005 0.0043 8.69E-04
400 262 1.2180 0.0398 0.2960 0.0005 0.0071 1.61E-03
183 183 1.1760 0.0861 0.3641 0.0005 0.0153 4.58E-03
104
F.3 Reservoir Fluid Study Report 3 36
105
Table F.8: Molar Volume Determination from Pressure-Volume Relations for Jacques Unit #5603
Pressure Rel Vol Vsat * Vt(ft3/lb
(psig) (Vt/Vo) Rel Vol mole) co(psi-1)
5000 0.9672 0.0218 2.2175
4500 0.9713 0.0219 2.2269 8.46E-06
4000 0.9756 0.0220 2.2368 8.83E-06
3500 0.9802 0.0221 2.2474 9.41E-06
3000 0.9851 0.0222 2.2586 9.97E-06
2500 0.9904 0.0224 2.2707 1.07E-05
2000 0.9961 0.0225 2.2838 1.15E-05
1900 0.9973 0.0225 2.2866 1.20E-05
1800 0.9985 0.0226 2.2893 1.20E-05
1700 0.9997 0.0226 2.2921 1.20E-05
1675 1.0000 0.0226 2.2928 1.20E-05
1666 1.0018 0.0226 2.2969
1656 1.0038 0.0227 2.3015
1646 1.0059 0.0227 2.3063
1636 1.0080 0.0228 2.3111
1613 1.0129 0.0229 2.3223
1527 1.0334 0.0233 2.3693
1388 1.0745 0.0243 2.4636
1230 1.1375 0.0257 2.6080
1050 1.2413 0.0280 2.8460
886 1.3846 0.0313 3.1745
733 1.5913 0.0359 3.6485
617 1.8302 0.0413 4.1962
487 2.2541 0.0509 5.1681
376 2.8730 0.0649 6.5871
273 3.9223 0.0886 8.9929
106
Table F.9: Differential Vaporization data for Jacques Unit #5603
Bg (res
Pressure cu ft/ Bg(res
(psig) Rsd BoD bbl) dRsd/dp dBod/dRsd bbl/scf) co(p<pb)
1675 691 1.3980
1500 646 1.3800 0.0095 0.2571 0.0004 0.0017 2.39E-04
1350 608 1.3640 0.0106 0.2533 0.0004 0.0019 2.72E-04
1200 569 1.3480 0.0120 0.2600 0.0004 0.0021 3.32E-04
1050 530 1.3320 0.0138 0.2600 0.0004 0.0025 3.99E-04
900 490 1.3150 0.0162 0.2667 0.0004 0.0029 4.98E-04
750 448 1.2980 0.0195 0.2800 0.0004 0.0035 6.63E-04
600 404 1.2790 0.0246 0.2933 0.0004 0.0044 9.05E-04
450 356 1.2580 0.0330 0.3200 0.0004 0.0059 1.38E-03
300 301 1.2320 0.0495 0.3667 0.0005 0.0088 2.48E-03
160 237 1.2000 0.0909 0.4571 0.0005 0.0162 5.98E-03
107
APPENDIX G
The critical properties used in calculating the constant parameters of the Peng-
Robinson EOS are given in Table G.1. 44 pp 162, 13 pp 354
108
APPENDIX H
The relative errors of the predicted molar volumes and the isothermal oil compressibility
are given in the Tables below.
Table H.1: The AAPD for the Predicted Molar Volume for Oil Well No. 4, Good Oil
Company. Samson, Texas.
Volume (ft3/lb mole) ERROR
AAPD AAPD
Pressure(psia) Exptal PR EOS MPR EOS PR EOS MPR EOS
5014.7 2.2058 2.2047 2.2672 0.05 2.79
4514.7 2.2204 2.2201 2.2816 0.01 2.76
4014.7 2.2360 2.2371 2.2974 0.05 2.75
3514.7 2.2531 2.2559 2.3148 0.12 2.73
3014.7 2.2721 2.2770 2.3341 0.21 2.73
2914.7 2.2760 2.2815 2.3382 0.24 2.73
2814.7 2.2801 2.2861 2.3424 0.26 2.73
2714.7 2.2845 2.2909 2.3468 0.28 2.73
2634.7 2.2884 2.2948 2.3503 0.28 2.71
2619.7 2.2934 2.2033 2.6633 3.93 16.13
2605.7 2.2978 2.2083 2.6655 3.89 16.00
2530.7 2.3236 2.2427 2.6804 3.48 15.35
2415.7 2.3685 2.2897 2.7081 3.33 14.34
2267.7 2.4360 2.3597 2.7531 3.13 13.02
2104.7 2.5264 2.4519 2.8157 2.95 11.45
1911.7 2.6621 2.5878 2.9152 2.79 9.51
1712.7 2.8435 2.7688 3.0547 2.63 7.42
1491.7 3.1163 3.0482 3.2799 2.19 5.25
1306.7 3.4353 3.3596 3.5454 2.21 3.21
1054.7 4.0738 3.9944 4.1111 1.95 0.92
844.7 4.9482 4.8609 4.9103 1.76 0.77
654.7 6.2960 6.1895 6.1702 1.69 2.00
486.7 8.5187 8.3257 8.2369 2.27 3.31
Avg = 1.73 6.23
109
Table H.2: The AAPD for the Predicted Coefficient of Isothermal Oil Compressibility for Oil Well No. 4, Good Oil Company.
Samson, Texas.
Isothermal Compressibility (psia-1) ERROR
AAPD AAPD
PR MPR
Pressure(psia) Exptal PR EOS MPR EOS EOS EOS
5014.7 1.33E-05 1.21E-05
4514.7 1.32E-05 1.45E-05 1.32E-05 9.86 0.42
4014.7 1.40E-05 1.59E-05 1.44E-05 14.12 2.95
3514.7 1.53E-05 1.76E-05 1.58E-05 15.09 3.32
3014.7 1.68E-05 1.96E-05 1.75E-05 16.74 4.18
2914.7 1.71E-05 2.01E-05 1.79E-05 17.20 4.46
2814.7 1.81E-05 2.05E-05 1.83E-05 13.49 0.99
2714.7 1.91E-05 2.10E-05 1.87E-05 10.23 2.00
2634.7 2.13E-05 2.14E-05 1.90E-05 0.67 10.62
2364.7 1.55E-04 2.35E-04 2.06E-04 51.36 32.74
2114.7 1.83E-04 2.74E-04 2.44E-04 49.50 33.11
1864.7 2.09E-04 3.26E-04 2.95E-04 56.44 41.59
1614.7 2.53E-04 3.96E-04 3.65E-04 57.00 44.63
1364.7 3.15E-04 4.95E-04 4.65E-04 57.34 47.75
1114.7 4.17E-04 6.44E-04 6.16E-04 54.26 47.63
864.7 5.76E-04 8.84E-04 8.63E-04 53.61 49.84
614.7 8.87E-04 1.33E-03 1.32E-03 50.41 49.26
364.7 1.83E-03 2.42E-03 2.44E-03 32.84 33.52
173.7 5.20E-03 5.42E-03 5.47E-03 4.37 5.20
Avg = 31.36 23.01
110
Table H.3: The AAPD for the Predicted Molar Volume for Jacques Unit #5603, Rough Ride Field, A.C.T. Operating
Company, Fisher County, Texas.
Volume (ft3/lb mole) ERROR
Pressure (psia) Exptal PR EOS MPR EOS AAPD PR EOS AAPD MPR EOS
5014.7 2.2175 2.2330 2.3248 0.70 4.83
4514.7 2.2269 2.2426 2.3345 0.70 4.83
4014.7 2.2368 2.2528 2.3451 0.72 4.84
3514.7 2.2474 2.2640 2.3565 0.74 4.86
3014.7 2.2586 2.2761 2.3689 0.78 4.88
2514.7 2.2707 2.2893 2.3824 0.82 4.92
2014.7 2.2838 2.3039 2.3974 0.88 4.97
1914.7 2.2866 2.3070 2.4006 0.89 4.99
1814.7 2.2893 2.3102 2.4038 0.91 5.00
1714.7 2.2921 2.3134 2.4071 0.93 5.02
1689.7 2.2928 2.3142 2.4079 0.94 5.02
1680.7 2.2969 2.1812 2.4891 5.04 8.37
1670.7 2.3015 2.1860 2.4929 5.02 8.32
1660.7 2.3063 2.1909 2.4968 5.00 8.26
1650.7 2.3111 2.1959 2.5008 4.99 8.21
1627.7 2.3223 2.2076 2.5106 4.94 8.11
1541.7 2.3693 2.2565 2.5506 4.76 7.65
1402.7 2.4636 2.3549 2.6325 4.41 6.86
1244.7 2.6080 2.5060 2.7595 3.91 5.81
1064.7 2.8460 2.7572 2.9765 3.12 4.59
900.7 3.1745 3.0966 3.2800 2.45 3.32
747.7 3.6485 3.5832 3.7261 1.79 2.13
631.7 4.1962 4.1440 4.2506 1.24 1.30
501.7 5.1681 5.1419 5.2026 0.51 0.67
390.7 6.5871 6.6222 6.6328 0.53 0.69
287.7 8.9929 9.1869 9.1431 2.16 1.67
Avg = 2.26 5.00
111
Table H.4: The AAPD for the Predicted Coefficient of Isothermal Oil Compressibility for Jacques Unit #5603, Rough Ride
Field, A.C.T. Operating Company, Fisher County, Texas (Using 11 components).
Isothermal Compressibility (psia-1) ERROR
AAPD PR AAPD
Pressure (psia) Exptal PR EOS MPR EOS EOS MPR EOS
5014.7 8.24E-06 8.10E-06
4514.7 8.46E-06 8.83E-06 8.68E-06 4.36 2.61
4014.7 8.83E-06 9.49E-06 9.34E-06 7.43 5.66
3514.7 9.41E-06 1.03E-05 1.01E-05 8.95 7.14
3014.7 9.97E-06 1.11E-05 1.09E-05 11.40 9.70
2514.7 1.07E-05 1.21E-05 1.19E-05 12.94 11.17
2014.7 1.15E-05 1.33E-05 1.31E-05 15.79 14.05
1914.7 1.20E-05 1.36E-05 1.34E-05 12.54 10.88
1814.7 1.20E-05 1.38E-05 1.36E-05 14.92 13.26
1714.7 1.20E-05 1.41E-05 1.39E-05 17.39 15.73
1689.7 1.20E-05 1.42E-05 1.40E-05 18.15 16.40
1514.7 2.39E-04 4.32E-04 4.00E-04 80.37 67.07
1364.7 2.72E-04 4.98E-04 4.65E-04 83.21 71.19
1214.7 3.32E-04 5.82E-04 5.49E-04 75.18 65.26
1064.7 3.99E-04 6.91E-04 6.58E-04 73.29 65.20
914.7 4.98E-04 8.38E-04 8.08E-04 68.34 62.22
614.7 9.05E-04 1.36E-03 1.34E-03 50.23 47.89
464.7 1.38E-03 1.88E-03 1.87E-03 36.18 35.36
314.7 2.48E-03 2.91E-03 2.91E-03 17.29 17.46
174.7 5.98E-03 5.47E-03 5.50E-03 8.45 7.95
Avg = 32.44 28.75
112
Table H.5: The AAPD for the Predicted Molar Volume for Jehlicka 1A, Wilshire Oil Co. of Texas, Beaver, Oklahoma.
Volume (ft3/lb mole) ERROR
Pressure (psia) Exptal PR EOS MPR EOS AAPD PR EOS AAPD MPR EOS
5014.7 2.2110 2.2956 2.2779 3.83 3.03
4514.7 2.2226 2.3087 2.2892 3.87 3.00
4014.7 2.2351 2.3229 2.3015 3.93 2.97
3514.7 2.2487 2.3386 2.3149 4.00 2.94
3014.7 2.2633 2.3560 2.3296 4.09 2.93
2914.7 2.2662 2.3596 2.3327 4.12 2.93
2814.7 2.2694 2.3634 2.3359 4.14 2.93
2714.7 2.2726 2.3673 2.3391 4.17 2.93
2677.7 2.2737 2.3688 2.3403 4.18 2.93
2653.7 2.2794 2.2131 2.5787 2.91 13.13
2591.7 2.2949 2.2308 2.5899 2.79 12.86
2507.7 2.3181 2.2569 2.6056 2.64 12.40
2365.7 2.3645 2.3070 2.6378 2.43 11.56
2192.7 2.4575 2.3949 2.6874 2.55 9.36
2012.7 2.5282 2.4780 2.7570 1.99 9.05
1811.7 2.6644 2.6147 2.8618 1.86 7.41
1604.7 2.8558 2.8039 3.0107 1.82 5.42
1392.7 3.1289 3.0740 3.2342 1.75 3.37
1193.7 3.4998 3.4411 3.5483 1.67 1.39
949.7 4.2155 4.1399 4.1746 1.79 0.97
760.7 5.1473 5.0465 5.0142 1.96 2.59
591.7 6.5507 6.4199 6.3198 2.00 3.52
435.7 8.8958 8.7522 8.5807 1.61 3.54
Avg = 2.87 5.35
113
Table H.6: The AAPD for the Predicted Coefficient of Isothermal Oil Compressibility for Jehlicka 1A, Wilshire Oil Co. of
Texas, Beaver, Oklahoma.
Isothermal Compressibility (psia-1) ERROR
114
Table H.7: The AAPD for the Predicted Coefficient of Isothermal Oil Compressibility for Jacques Unit #5603, Rough Ride
Field, A.C.T. Operating Company, Fisher County, Texas (Using 24 components).
Pressure AAPD MPR
(psia) Exptal PR EOS MPR EOS AAPD PR EOS EOS
5014.7 9.93E-06 7.33E-06
4514.7 8.46016E-06 1.08E-05 7.84E-06 27.78 7.31
4014.7 8.83457E-06 1.18E-05 8.42E-06 33.79 4.67
3514.7 9.40793E-06 1.30E-05 9.08E-06 38.29 3.49
3014.7 9.97305E-06 1.44E-05 9.83E-06 44.69 1.41
2514.7 1.07315E-05 1.61E-05 1.07E-05 50.40 0.29
2014.7 1.14775E-05 1.82E-05 1.17E-05 58.92 2.03
1914.7 1.20397E-05 1.87E-05 1.19E-05 55.49 0.83
1814.7 1.20253E-05 1.92E-05 1.22E-05 59.83 1.20
1714.7 1.20108E-05 1.97E-05 1.24E-05 64.35 3.24
1689.7 1.20018E-05 1.99E-05 1.25E-05 65.64 3.90
1514.7 2.39E-04 4.05E-04 3.81E-04 69.10 59.23
1364.7 2.72E-04 4.65E-04 4.44E-04 71.12 63.45
1214.7 3.32E-04 5.42E-04 5.25E-04 63.19 58.14
1064.7 3.99E-04 6.43E-04 6.32E-04 61.23 58.50
914.7 4.98E-04 7.80E-04 7.77E-04 56.64 56.11
614.7 9.05E-04 1.27E-03 1.30E-03 40.71 43.51
464.7 1.38E-03 1.78E-03 1.82E-03 28.54 32.04
314.7 2.48E-03 2.78E-03 2.86E-03 12.01 15.34
174.7 5.98E-03 5.31E-03 5.44E-03 11.21 8.98
Avg = 48.05 22.30
115
APPENDIX I
model.
The input data required to run the program are listed below;
2. Number of pressure steps required; including pressures below and above the
bubble point.
4. The list of the component properties in this order; critical temperature (oR),
weight, critical compressibility factor and the specific gravity. It should be noted
that the specific gravity values of the component are not required in the
calculations except for the plus fraction where it is used to calculate the critical
parameters. Therefore the specific gravity values inputted into the program are
zeros except for the plus fraction. The critical parameters of the plus fraction are
11
19
5014.7
4514.7
4014.7
3514.7
3014.7
2914.7
2814.7
2714.7
2677.7
2414.7
1914.7
1664.7
1414.7
1164.7
914.7
664.7
414.7
197.7
114.7
622
2677.7
117
The program was originally designed for four different EOS (Soave-Redlich-
Kwong (S.R.K.) EOS, Modified SRK EOS, Peng-Robinson (P.R.) EOS and Modified PR
EOS). Due to the problem of convergence in the fugacities and the observed error in the
SRK EOS and modified SRK EOS, the predicted values of these two EOS were not
reported. It was observed that the SRK EOS and the Modified SRK EOS gave good
The program reads in the pressure and check if the pressure is above or below the
bubble point pressure. If the pressure is above the bubble point pressure, the molar
volume is calculated and the partial derivative of the molar volume with respect to
If the pressure is below the bubble point pressure, the two phase flash calculation
algorithm is called and the isothermal compressibility of the liquid and gas phases are
time for some desired pressures. The two pressures at which this lack of convergence was
observed are at the input pressure 764.7 psia for the reservoir fluid sample from A.C.T
The output of the program is formatted to give the calculated molar volumes and
the calculated coefficient of isothermal oil compressibility above the bubble point
pressure. At pressures below the bubble point pressure, the molar volume and the
118
coefficient of isothermal oil compressibility of both the liquid and the vapor phases are
reported.
119
APPENDIX J
Implicit None
R=10.7315
Mtype = 0
g =1.0
open(UNIT=5,FILE='INPUT10.txt',STATUS='old')
open(UNIT=6,FILE='OUTPUT10.txt',STATUS='unknown')
Do i=1,NPSTEPS
Read(5,*) PS(i) !Reading Pressures
end do
120
Do i=1,NCOMP
Read(5,*) Tci(i),Pci(i),M_F(i),A_Fi(i),M_W(i),Zci(i),S_G(i)
end do
Do i=1,NCOMP
if (Pci(i).EQ.0) Then
Ci = 3.8501/(1.54057-(0.02494*(M_W(i)**0.5)))
B_PtC7 = 108.7017*(M_W(i)**0.4225)*(S_G(i)**0.4268)
A_Fi(i) = 4.5494E-9*(M_W(i)**0.02445)*(S_G(i)**(-2.08511))
& * (B_PtC7**2.903798)*(Ci**(-1.54424))
Zci(i)=0.293/(1+(0.375*A_Fi(i)))
Tci(i)=66.3775*(M_W(i)**0.12286)*(S_G(i)**0.47926)
& *(B_PtC7**0.41286)*(Ci**(-0.35734))
Pci(i) =31839*(M_W(i)**(-0.93426))*(S_G(i)**(1.64074))
& * (B_PtC7**0.49447) * (Ci**(-2.39909))
end if
end do
Do II=1,NPSTEPS
If (PS(II).GE.PB) Then
PR = PS(II)
CALL Comp_EOS(PR,V_SRK,V_MSRK,V_PR,V_MPR,CO_SRK,CO_MSRK
& ,CO_PR,CO_MPR)
Write(6,20)PR,V_SRK,V_MSRK,V_PR,V_MPR,CO_SRK,CO_MSRK,CO_PR,CO_MPR
20 Format(1x,F7.2,1x,F10.6,1x,F10.6,1x,F10.6,1x,F10.6,2x,E20.4,2x
& ,E20.4,2x,E20.4,2x,E20.4)
Else
If (g.EQ.1.0) Then
g=2.0
Write(6,40)"PR","V_SRKL","V_SRKG","VTSRK","V_MSRKL","V_MSRKG"
& ,"VTMSRK","V_PRL","V_PRG","VTPR","V_MPRL","V_MPRG","VTMPR"
& ,"CO_SRKL","CO_SRKG","CT_SRK","CO_MSRKL","CO_MSRKG","CT_MSRK"
& ,"CO_PRL","CO_PRG","CT_PR","CO_MPRL","CO_MPRG","CT_MPR"
121
40 Format (A8,2x,A7,2x,A7,2x,A7,2x,A7,2x,A7,2x,A7,2x,A7,2x,A7,2x,A7
&,2x,A7,2x,A7,2x,A7,2x,A10,2x,A10,2x,A10,2x,A10,2x,A10,2x,A10,2x
&,A10,2x,A10,2x,A10,2x,A10,2x,A10,2x,A10)
end if
PR = PS(II)
CALL Flash(PR,V_SRKL,V_SRKG,VTSRK,V_MSRKL,V_MSRKG,VTMSRK
& ,V_PRL,V_PRG,VTPR,V_MPRL,V_MPRG,VTMPR,CO_SRKL,CO_SRKG,CT_SRK
& ,CO_MSRKL,CO_MSRKG,CT_MSRK,CO_PRL,CO_PRG,CT_PR,CO_MPRL,CO_MPRG
& ,CT_MPR)
Write(6,30)PR,V_SRKL,V_SRKG,VTSRK,V_MSRKL,V_MSRKG,VTMSRK
& ,V_PRL,V_PRG,VTPR,V_MPRL,V_MPRG,VTMPR,CO_SRKL,CO_SRKG,CT_SRK
& ,CO_MSRKL,CO_MSRKG,CT_MSRK,CO_PRL,CO_PRG,CT_PR,CO_MPRL,CO_MPRG
& ,CT_MPR
30 Format(F10.2,2x,F10.6,2x,F10.6,2x,F10.6,2x,F10.6,2x,F10.6,2x
& ,F10.6,2x,F10.6,2x,F10.6,2x,F10.6,2x,F10.6,2x,F10.6,2x,F10.6,2x
& ,E20.6,2x,E20.6,2x,E20.6,2x,E20.6,2x,E20.6,2x,E20.6,2x,E20.6,2x
& ,E20.6,2x,E20.6,2x,E20.6,2x,E20.6,2x,E20.6)
end if
end do
contains
Subroutine Comp_EOS(PR,V_SRK,V_MSRK,V_PR,V_MPR,CO_SRK,CO_MSRK
& ,CO_PR,CO_MPR)
REAL, INTENT(IN) :: PR
OWi(i) = 0.361/(1+(0.274*A_Fi(i)))
TRi(i)=T/Tci(i)
PRi(i)=PR/Pci(i)
OBi(i)=Zci(i)*OWi(i)
OAi(i)=(1+(OWi(i)-1)*Zci(i))**3
TF_LLS(i)=(1+mi_LLS(i)*(1-TRi(i)**0.5))**2
122
TF_SRK(i)=(1+(mi_SRK(i))*(1- TRi(i)**0.5))**2
TF_PR(i)=(1+(mi_PR(i))*(1- TRi(i)**0.5))**2
ai_LLS(i) = (TF_LLS(i)*OAi(i)*(R*Tci(i))**2)/Pci(i)
bi_LLS(i) = ((OBi(i)*R*Tci(i))/Pci(i))
ai_SRK(i)= (0.42748*TF_SRK(i)*(R*Tci(i))**2)/pci(i)
bi_SRK(i) = (0.08664*R*Tci(i))/pci(i)
ai_PR(i) = 0.45724*TF_PR(i)*(R*Tci(i))**2/pci(i)
bi_PR(i) = 0.07780*R*Tci(i)/pci(i)
ai_MPR(i) = ai_LLS(i)
bi_MPR(i) = bi_LLS(i)
ai_MSRK(i) = ai_LLS(i)
bi_MSRK(i)= bi_LLS(i)
END DO
am_LLS = 0
am_SRK = 0
am_Pr = 0
bmi_LLS = 0
bmi_SRK = 0
bmi_PR = 0
DO i=1,NCOMP
DO j=1,NCOMP
IF ( (Tci(i)/Pci(i)**0.5) < (Tci(j)/Pci(j)**0.5) ) THEN
kij = ((Tci(i)/Pci(i)**0.5) / (Tci(j)/Pci(j)**0.5) )**0.5
ELSE
kij = ((Tci(j)/Pci(j)**0.5) / (Tci(i)/Pci(i)**0.5) )**0.5
END IF
kij =1
ami_LLS=M_F(i)*M_F(j)*(ai_LLS(i)*ai_LLS(j))**0.5*kij
ami_SRK=M_F(i)*M_F(j)*(ai_SRK(i)*ai_SRK(j))**0.5*kij
ami_PR =M_F(i)*M_F(j)*(ai_PR(i)*ai_PR(j))**0.5*kij
123
bmi_LLS = bmi_LLS + ( M_F(i)*bi_LLS(i) )
bmi_SRK = bmi_SRK + ( M_F(i)*bi_SRK(i) )
bmi_PR = bmi_PR + ( M_F(i)*bi_PR(i) )
END Do
bm_LLS = bmi_LLS
bm_SRK = bmi_SRK
bm_PR = bmi_PR
bm_MPR = bm_LLS
bm_MSRK=bm_LLS
!****************************************************************!
A_PR= 1
A_MPR=1
A_SRK = 1
A_MSRK=1
A_PR= 1
A_MPR=1
B_PR=bm_PR-R*T/PR
C_PR=(am_PR/PR)-3*bm_PR**2-2*bm_PR*R*T/PR
D_PR=bm_PR**3+(bm_PR**2)*R*T/PR-am_PR*bm_PR/PR
B_MPR=bm_MPR-R*T/PR
C_MPR=(am_MPR/PR)-3*bm_MPR**2-2*bm_MPR*R*T/PR
D_MPR=bm_MPR**3+(bm_MPR**2)*R*T/PR-am_MPR*bm_MPR/PR
B_SRK=-1*R*T/PR
C_SRK=am_SRK/PR-bm_SRK**2-R*T*bm_SRK/PR
D_SRK=-1*am_SRK*bm_SRK/PR
B_MSRK=-1*R*T/PR
C_MSRK=am_MSRK/PR-bm_MSRK**2-R*T*bm_MSRK/PR
D_MSRK=-1*am_MSRK*bm_MSRK/PR
Coeff(1)=A_PR
Coeff(2)=B_PR
Coeff(3)=C_PR
Coeff(4)=D_PR
124
Call Cubic_Solver(Mtype,Coeff,RT)
If (RT(3).EQ.0.0) then
RT(3)=RT(1)
endif
If (RT(2).EQ.0.0) then
RT(2)=RT(1)
endif
If (RT(1).EQ.0.0) then
Write(6,*)"Error All roots are zeros"
endif
If (RT(1).LE.RT(2)) Then
V_PR = RT(1)
else
V_PR=RT(2)
endif
If (V_PR.LE.RT(3)) Then
V_PR = V_PR
else
V_PR=RT(3)
endif
Call Cubic_Solver(Mtype,Coeff,RT)
If (RT(3).EQ.0.0) then
RT(3)=RT(1)
end if
If (RT(2).EQ.0.0) then
RT(2)=RT(1)
end if
If (RT(1).EQ.0.0) then
Write(6,*)"Error All roots are zeros"
endif
If (RT(1).LE.RT(2)) Then
V_MPR = RT(1)
else
V_MPR=RT(2)
endif
If (V_MPR.LE.RT(3)) Then
V_MPR = V_MPR
else
V_MPR=RT(3)
endif
Coeff(1)=A_SRK
Coeff(2)=B_SRK
Coeff(3)=C_SRK
Coeff(4)=D_SRK
Call Cubic_Solver(Mtype,Coeff,RT)
125
If (RT(3).EQ.0.0) then
RT(3)=RT(1)
end if
If (RT(2).EQ.0.0) then
RT(2)=RT(1)
end if
If (RT(1).EQ.0.0) then
Write(6,*)"Error All roots are zeros"
endif
If (RT(1).LE.RT(2)) Then
V_SRK = RT(1)
else
V_SRK=RT(2)
endif
If (V_SRK.LE.RT(3)) Then
V_SRK = V_SRK
else
V_SRK=RT(3)
endif
Call Cubic_Solver(Mtype,Coeff,RT)
If (RT(3).EQ.0.0) then
RT(3)=RT(1)
end if
If (RT(2).EQ.0.0) then
RT(2)=RT(1)
end if
If (RT(1).EQ.0.0) then
Write(6,*)"Error All roots are zeros"
endif
If (RT(1).LE.RT(2)) Then
V_MSRK = RT(1)
else
V_MSRK=RT(2)
endif
If (V_MSRK.LE.RT(3)) Then
V_MSRK = V_MPR
else
V_MSRK=RT(3)
endif
!*********************************************************************
NSRK1=(V_SRK-bm_SRK)**2
NSRK2=(V_SRK**2+V_SRK*bm_SRK)**2
DSRK1=am_SRK*(2*V_SRK+bm_SRK)*(V_SRK-bm_SRK)**2
DSRK2=R*T*(V_SRK**2+bm_SRK*V_SRK)**2
DVPT_SRK=NSRK1*NSRK2/(DSRK1-DSRK2)
NMSRK1=(V_MSRK-bm_MSRK)**2
NMSRK2=(V_MSRK**2+V_MSRK*bm_MSRK)**2
126
DMSRK1=am_MSRK*(2*V_MSRK+bm_MSRK)*(V_MSRK-bm_MSRK)**2
DMSRK2=R*T*(V_MSRK**2+bm_MSRK*V_MSRK)**2
DVPT_MSRK=NMSRK1*NMSRK2/(DMSRK1-DMSRK2)
NPR1=(V_PR-bm_PR)**2
NPR2=(V_PR**2+2*bm_PR*V_PR-bm_PR**2)**2
DPR1=2*am_PR*(V_PR+bm_PR)*(V_PR-bm_PR)**2
DPR2=R*T*(V_PR**2+2*bm_PR*V_PR-bm_PR**2)**2
DVPT_PR=NPR1*NPR2/(DPR1-DPR2)
NMPR1=(V_MPR-bm_MPR)**2
NMPR2=(V_MPR**2+2*bm_MPR*V_MPR-bm_MPR**2)**2
DMPR1=2*am_MPR*(V_MPR+bm_MPR)*(V_MPR-bm_MPR)**2
DMPR2=R*T*(V_MPR**2+2*bm_MPR*V_MPR-bm_MPR**2)**2
DVPT_MPR=NMPR1*NMPR2/(DMPR1-DMPR2)
CO_SRK=-1*DVPT_SRK/V_SRK
CO_PR=-1*DVPT_PR/V_PR
CO_MSRK=-1*DVPT_MSRK/V_MSRK
CO_MPR=-1*DVPT_MPR/V_MPR
Subroutine Flash(PR,V_SRKL,V_SRKG,VTSRK,V_MSRKL,V_MSRKG,VTMSRK
& ,V_PRL,V_PRG,VTPR,V_MPRL,V_MPRG,VTMPR,CO_SRKL,CO_SRKG,CT_SRK
& ,CO_MSRKL,CO_MSRKG,CT_MSRK,CO_PRL,CO_PRG,CT_PR,CO_MPRL,CO_MPRG
& ,CT_MPR)
Implicit None
Real :: Zi(99),Ki(99),Kimin,Kimax,NVmin,NVmax,NV,FNV,FPNV
Real :: Ai(99),Bi(99),SAi,SBi,TOL,maxx,minn,Liqxi(99),Vapyi(99)
Real :: ZLPR,ZGPR,ZLSRK,ZGSRK,ZLMPR,ZGMPR,ZLMSRK,ZGMSRK
Real :: FLPR(99),FGPR(99),FLMPR(99),FGMPR(99),FLSRK(99),FGSRK(99)
Real ::FLMSRK(99),FGMSRK(99),SFPR,SFSRK,SFMPR,SFMSRK,CHECK,Counter
Real :: LiPR(99),ViPR(99),LiSRK(99),ViSRK(99),LiMPR(99),ViMPR(99)
Real :: LiMSRK(99),ViMSRK(99),ORIGXI(99),ORIGYI(99)
Real :: BAPR,BBPR,BBSRK,BASRK,BAMPR,BBMPR,BAMSRK
Real :: BBMSRK,NV1,NVPR,NVMPR
127
TOL=0.001
Zi = M_F
Kimin=50
Kimax=0
SAi = 0
SBi = 0
FNV = 0
FPNV = 0
SFPR=0
SFSRK=0
SFMSRK=0
SFMPR=0
CHECK=0
Counter = 0
Do i=1,NCOMP
Ki(i)=Pci(i)*exp(5.371*(1+A_Fi(i))*(1-(Tci(i)/T)))/PR
Ai(i)= Zi(i)*(Ki(i)-1)
Bi(i)=Zi(i)*(Ki(i)-1)/Ki(i)
SAi=SAi + Ai(i)
SBi=SBI + Bi(i)
end do
Do j=2,NCOMP
If (Ki(j-1).LT.Ki(j)) Then
minn=Ki(j-1)
maxx=Ki(j)
else
minn=Ki(j)
maxx=Ki(j-1)
end if
If (Kimin.LT.minn) then
Kimin=Kimin
else
Kimin=minn
endif
If (Kimax.GT.maxx) then
Kimax=Kimax
else
Kimax=maxx
endif
end do
NVmin=1/(1-Kimax)
NVmax=1/(1-Kimin)
If (NVmin.GT.0.0) then
Write(6,*) "NVmin is > 0.0-May converge at trivial Soln"
endif
128
If (NVmax.LT.1.0) then
Write(6,*) "NVmax is < 1.0-May converge at trivial Soln"
endif
! NV = SAi/(SAi-SBi)
NV=0.5
!Write(6,*) " NVmin = ", NVmin, "NVmax = " , NVmax
100 Do i=1,NCOMP
FNV= FNV + Zi(i)*(Ki(i)-1)/(NV*(Ki(i)-1)+1)
FPNV = FPNV + (1)*Zi(i)*(Ki(i)-1)**2/((NV*(Ki(i)-1)+1)**2)
enddo
NV1= NV - (FNV/(-1)*FPNV)
If (ABS(NV1-NV).GT.TOL) then
NV= NV1
Counter = Counter + 1
If (Counter .GT. 80000000) then
Write(6,*) " Newton Raphson Called 80 million times"
Stop
endif
FNV=0
FPNV = 0
Goto 100
endif
!***** Bisection Method *************************************
Do i=1,NCOMP
Liqxi(i)= Zi(i)/(1+NV*(Ki(i)-1))
Vapyi(i)= Zi(i)*Ki(i)/(1+NV*(Ki(i)-1))
Enddo
ORIGXI = Liqxi
ORIGYI = Vapyi
129
!**********Checking Fugacity Constraint for PR EOS**************
Call Zfactor_FugacPR(PR,Liqxi,Vapyi,NV,ZLPR,ZGPR,FLPR,FGPR,BAPR
&,BBPR)
Do j=1,NCOMP
SFPR = SFPR + (((FLPR(j)/FGPR(j))-1)**2)
end do
LiPR = Liqxi
ViPR = Vapyi
Do i=1, NCOMP
CHECK = CHECK + (Alog(Ki(i)))**2
end do
If (CHECK.LT.0.0001) Then
Write(6,*) " Trivial Solution is Detected"
end if
CHECK =0.0
Do j = 2, NCOMP
If (Ki(j-1).LT.Ki(j)) Then
minn=Ki(j-1)
maxx=Ki(j)
else
minn=Ki(j)
maxx=Ki(j-1)
end if
If (Kimin.LT.minn) then
Kimin=Kimin
else
Kimin=minn
endif
If (Kimax.GT.maxx) then
Kimax=Kimax
else
Kimax=maxx
130
endif
end do
NVmin=1/(1-Kimax)
NVmax=1/(1-Kimin)
If (NVmin.GT.0.0) then
Write(6,*) "NVmin is > 0.0-May converge at trivial Soln"
endif
If (NVmax.LT.1.0) then
Write(6,*) "NVmax is < 1.0-May converge at trivial Soln"
endif
! NV = SAi/(SAi-SBi)
FNV = 0
FPNV = 0
1000 Do i=1,NCOMP
FNV= FNV + Zi(i)*(Ki(i)-1)/(NV*(Ki(i)-1)+1)
FPNV = FPNV + (1)*Zi(i)*((Ki(i)-1)**2)/((NV*(Ki(i)-1)+1)**2)
enddo
!write (6,*) " FNV =" , FNV , "FPNV = ", FPNV, "NV = " , NV
NV1= NV - (FNV/((-1)*FPNV))
If (ABS(ABS(NV1)-ABS(NV)).GT.TOL) then
NV = NV1
Counter = Counter + 1
If (Counter .GT. 40000) then
!Write(6,*) " Newton Raphson Called 40,000 times"
endif
FNV=0
131
FPNV = 0
Goto 1000
continue
Endif
Do i=1,NCOMP
Liqxi(i)= Zi(i)/(1+NV*(Ki(i)-1))
Vapyi(i)= Zi(i)*Ki(i)/(1+NV*(Ki(i)-1))
Enddo
Call Zfactor_FugacPR(PR,Liqxi,Vapyi,NV,ZLPR,ZGPR,FLPR,FGPR,BAPR
&,BBPR)
Do i=1,NCOMP
SFPR = SFPR + ((FLPR(i)/FGPR(i))-1)**2
end do
!write (6,*) " SFPR = ", SFPR
LiPR = Liqxi
ViPR = Vapyi
Goto 111
End if
!write (6,*) "Liqxi = " , Liqxi
!write (6,*) "Vapyi = " , Vapyi
!write (6,*) " ki = ", Ki
!write (6,*) " NV = " , NV
!write (6,*) " SFPR = ", SFPR
!write (6,*) " Counter = " , counter
!write (6,*) "ZGPR = ", ZGPR ,"ZLPR = " , ZLPR
!STOP
Liqxi = ORIGXI
Vapyi = ORIGYI
NVPR = NV
Do i=1,NCOMP
SFPR = SFPR + ((FLMPR(i)/FGMPR(i))-1)**2
end do
132
LiMPR = Liqxi
ViMPR = Vapyi
!**********Checking Fugacity Constraint for PR EOS**************
222 If (SFMPR.GT. TOL) Then
SFMPR = 0.0
Do i=1, NCOMP
Ki(i) = Ki(i)*FLMPR(i)/FGMPR(i)
Ai(i)= Zi(i)*(Ki(i)-1)
Bi(i)=Zi(i)*(Ki(i)-1)/Ki(i)
SAi=SAi + Ai(i)
SBi=SBI + Bi(i)
end do
Do i=1, NCOMP
CHECK = CHECK + (Alog(Ki(i)))**2
end do
If (CHECK.LT.0.0001) Then
Write(6,*) " Trivial Solution is Detected"
end if
CHECK =0.0
Do j = 2, NCOMP
If (Ki(j-1).LT.Ki(j)) Then
minn=Ki(j-1)
maxx=Ki(j)
else
minn=Ki(j)
maxx=Ki(j-1)
end if
If (Kimin.LT.minn) then
Kimin=Kimin
else
Kimin=minn
endif
If (Kimax.GT.maxx) then
Kimax=Kimax
else
Kimax=maxx
endif
end do
NVmin=1/(1-Kimax)
NVmax=1/(1-Kimin)
If (NVmin.GT.0.0) then
Write(6,*) "NVmin is > 0.0-May converge at trivial Soln"
endif
If (NVmax.LT.1.0) then
Write(6,*) "NVmax is < 1.0-May converge at trivial Soln"
endif
! NV = SAi/(SAi-SBi)
133
!***** Bisection Method *************************************
2000 Do i=1,NCOMP
FNV= FNV + Zi(i)*(Ki(i)-1)/(NV*(Ki(i)-1)+1)
FPNV = FPNV + Zi(i)*(Ki(i)-1)**2/((NV*(Ki(i)-1)+1)**2)
end do
NV1= NV - (FNV/((-1)*FPNV))
If (ABS(NV1-NV).GT.TOL) then
NV= NV1
FNV=0
FPNV = 0
Counter = Counter + 1
If (Counter .GT. 800000000) then
Write(6,*) " Newton Raphson Called 80,000 times"
Stop
endif
Goto 2000
Endif
Do i=1,NCOMP
Liqxi(i)= Zi(i)/(1+NV*(Ki(i)-1))
Vapyi(i)= Zi(i)*Ki(i)/(1+NV*(Ki(i)-1))
Enddo
Call Zfactor_FugacMPR(PR,Liqxi,Vapyi,NV,ZLMPR,ZGMPR,FLMPR,FGMPR
& ,BAMPR,BBMPR)
Do i=1,NCOMP
SFMPR = SFMPR + ((FLMPR(i)/FGMPR(i))-1)**2
end do
LiMPR = Liqxi
ViMPR = Vapyi
Goto 222
134
Endif
Liqxi = ORIGXI
Vapyi = ORIGYI
NVMPR = NV
Do i=1,NCOMP
SFSRK = SFSRK + ((FLSRK(i)/FGSRK(i))-1)**2
end do
LiSRK = Liqxi
ViSRK = Vapyi
SFSRK = 0.0
Do i=1, NCOMP
CHECK = CHECK + (Alog(Ki(i)))**2
end do
If (CHECK.LT.0.0001) Then
Write(6,*) " Trivial Solution is Detected"
end if
CHECK =0.0
Do j = 2, NCOMP
If (Ki(j-1).LT.Ki(j)) Then
minn=Ki(j-1)
maxx=Ki(j)
else
minn=Ki(j)
maxx=Ki(j-1)
end if
If (Kimin.LT.minn) then
Kimin=Kimin
else
Kimin=minn
endif
If (Kimax.GT.maxx) then
Kimax=Kimax
else
Kimax=maxx
endif
end do
135
NVmin=1/(1-Kimax)
NVmax=1/(1-Kimin)
If (NVmin.GT.0.0) then
Write(6,*) "NVmin is > 0.0-May converge at trivial Soln"
endif
If (NVmax.LT.1.0) then
Write(6,*) "NVmax is < 1.0-May converge at trivial Soln"
endif
! NV = SAi/(SAi-SBi)
3000 Do i=1,NCOMP
FNV= FNV + Zi(i)*(Ki(i)-1)/((NV*(Ki(i)-1)+1))
FPNV = FPNV + (1)*Zi(i)*(Ki(i)-1)**2/((NV*(Ki(i)-1)+1)**2)
enddo
NV1= NV - (FNV/((-1)*FPNV))
If (ABS(NV1-NV).GT.TOL) then
NV= NV1
FNV=0
FPNV = 0
Counter = Counter + 1
If (Counter .GT. 80000000) then
Write(6,*) " Newton Raphson Called 80,000 times"
Stop
endif
Goto 3000
Counter = Counter + 1
If (Counter .GT. 80000000) then
Write(6,*) " Newton Raphson Called 80,000 times"
Stop
endif
Endif
Do i=1,NCOMP
Liqxi(i)= Zi(i)/(1+NV*(Ki(i)-1))
Vapyi(i)= Zi(i)*Ki(i)/(1+NV*(Ki(i)-1))
Enddo
Call Zfactor_FugacSRK(PR,Liqxi,Vapyi,NV,ZLSRK,ZGSRK,FLSRK,FGSRK
& ,BBSRK,BASRK)
136
Do i=1,NCOMP
SFSRK = SFSRK + ((FLSRK(i)/FGSRK(i))-1)**2
end do
LiSRK = Liqxi
ViSRK = Vapyi
Goto 333
End if
Liqxi = ORIGXI
Vapyi = ORIGYI
!******************MSRK EOS***********************************************
Call Zfactor_FugacMSRK(PR,Liqxi,Vapyi,NV,ZLMSRK,ZGMSRK,FLMSRK
& ,FGMSRK,BAMSRK,BBMSRK)
Do i=1,NCOMP
SFMSRK = SFMSRK + ((FLMSRK(i)/FGMSRK(i))-1)**2
end do
LiMSRK = Liqxi
ViMSRK = Vapyi
SFMSRK = 0.0
!**********Checking Fugacity Constraint for PR EOS**************
444 If (SFMSRK.GT. TOL) Then
SFMSRK = 0.0
Do i=1, NCOMP
Ki(i) = Ki(i)*FLMSRK(i)/FGMSRK(i)
Ai(i)= Zi(i)*(Ki(i)-1)
Bi(i)=Zi(i)*(Ki(i)-1)/Ki(i)
SAi=SAi + Ai(i)
SBi=SBI + Bi(i)
end do
Do i=1, NCOMP
CHECK = CHECK + (Alog(Ki(i)))**2
end do
If (CHECK.LT.0.0001) Then
Write(6,*) " Trivial Solution is Detected"
end if
CHECK =0.0
Do j = 2, NCOMP
If (Ki(j-1).LT.Ki(j)) Then
minn=Ki(j-1)
maxx=Ki(j)
else
minn=Ki(j)
maxx=Ki(j-1)
end if
If (Kimin.LT.minn) then
Kimin=Kimin
else
Kimin=minn
137
endif
If (Kimax.GT.maxx) then
Kimax=Kimax
else
Kimax=maxx
endif
end do
NVmin=1/(1-Kimax)
NVmax=1/(1-Kimin)
If (NVmin.GT.0.0) then
Write(6,*) "NVmin is > 0.0-May converge at trivial Soln"
endif
If (NVmax.LT.1.0) then
Write(6,*) "NVmax is < 1.0-May converge at trivial Soln"
endif
! NV = SAi/(SAi-SBi)
4000 Do i=1,NCOMP
FNV= FNV + Zi(i)*(Ki(i)-1)/((NV*(Ki(i)-1)+1))
FPNV = FPNV + (1)*Zi(i)*(Ki(i)-1)**2/((NV*(Ki(i)-1)+1)**2)
enddo
NV1= NV - (FNV/((-1)*FPNV))
If (ABS(NV1-NV).GT.TOL) then
NV= NV1
FNV=0
FPNV = 0
Counter = Counter + 1
If (Counter .GT. 80000000) then
Write(6,*) " Newton Raphson Called 80000,000 times"
Stop
endif
Goto 4000
Counter = Counter + 1
If (Counter .GT. 80000000) then
Write(6,*) " Newton Raphson Called 80000,000 times"
Stop
endif
Endif
138
Do i=1,NCOMP
Liqxi(i)= Zi(i)/(1+NV*(Ki(i)-1))
Vapyi(i)= Zi(i)*Ki(i)/(1+NV*(Ki(i)-1))
Enddo
Call Zfactor_FugacMSRK(PR,Liqxi,Vapyi,NV,ZLMSRK,ZGMSRK,FLMSRK
& ,FGMSRK,BAMSRK,BBMSRK)
Do i=1,NCOMP
SFMSRK = SFMSRK + ((FLMSRK(i)/FGMSRK(i))-1)**2
end do
LiMSRK = Liqxi
ViMSRK = Vapyi
goto 444
End if
Call CompValue(PR,LiPR,ViPR,NVPR,NVMPR,LiSRK,ViSRK,LiMPR,ViMPR
&,LiMSRK,ViMSRK,ZLPR,ZGPR,ZLSRK,ZGSRK,ZLMPR,ZGMPR,ZLMSRK,ZGMSRK
&,V_PRL,V_PRG,V_SRKL,V_SRKG,V_MPRL,V_MPRG,V_MSRKL,V_MSRKG,CO_PRL
&,CO_PRG,CT_PR,CO_SRKL,CO_SRKG,CT_SRK,CO_MPRL,CO_MPRG,CT_MPR
&,CO_MSRKL,CO_MSRKG,CT_MSRK,VTPR,VTSRK,VTMPR,VTMSRK)
End Subroutine Flash
!**************************Subroutine CompValue******************************
Subroutine CompValue(PR,LiPR,ViPR,NVPR,NVMPR,LiSRK,ViSRK,LiMPR
&,ViMPR,LiMSRK,ViMSRK,ZLPR,ZGPR,ZLSRK,ZGSRK,ZLMPR,ZGMPR,ZLMSRK
&,ZGMSRK,V_PRL,V_PRG,V_SRKL,V_SRKG,V_MPRL,V_MPRG,V_MSRKL,V_MSRKG
&,CO_PRL,CO_PRG,CT_PR,CO_SRKL,CO_SRKG,CT_SRK,CO_MPRL,CO_MPRG,CT_MPR
&,CO_MSRKL,CO_MSRKG,CT_MSRK,VTPR,VTSRK,VTMPR,VTMSRK)
Implicit None
Real :: am_PR,bm_PR,am_SRK,bm_SRK,am_MPR,bm_MPR,am_MSRK,bm_MSRK
REAL :: NMPR1,NMPR2,DMPR1,DMPR2,DVPT_MPR
Real :: NPR1,NPR2,DPR1,DPR2,DVPT_PR,NSRK1,NSRK2,DSRK1,DSRK2
Real :: DVPT_SRK,NMSRK1,NMSRK2,DMSRK1,DMSRK2,DVPT_MSRK
Real :: BAPR,BBPR,BBSRK,BASRK,BAMPR,BBMPR,BAMSRK
Real :: BBMSRK,BiPR(99),AiPR(99),BiMPR(99),AiMPR(99)
Real :: AiMSRK(99),BiMSRK(99),BiSRK(99),AiSRK(99)
Real :: YAIJPR,YAIJSRK,YAIJMPR,YAIJMSRK
Real :: NGG,NGG1,NGG2,NGG3,NGG4,DGG,DGG1,DGG2,DGG3,DZP
139
!****Using PR EOS Liquid***********************************************
Call ParaMix(PR,LiPR,BAPR,BBPR,BBSRK,BASRK,BAMPR,BBMPR,BAMSRK,
& BBMSRK,AiPR,BiPR,AiMPR,BiMPR,AiMSRK,BiMSRK,AiSRK,BiSRK,YAIJPR
& ,YAIJSRK,YAIJMPR,YAIJMSRK)
V_PRL = ZLPR*R*T/PR
V_PRG = ZGPR*R*T/PR
am_PR = (BAPR*(R*T)**2)/PR
bm_PR = (BBPR*R*T)/PR
NPR1=(V_PRL-bm_PR)**2
NPR2=(V_PRL**2+2*bm_PR*V_PRL-bm_PR**2)**2
DPR1=2*am_PR*(V_PRL+bm_PR)*(V_PRL-bm_PR)**2
DPR2=R*T*(V_PRL**2+2*bm_PR*V_PRL-bm_PR**2)**2
DVPT_PR=NPR1*NPR2/(DPR1-DPR2)
CO_PRL=-1*DVPT_PR/V_PRL
V_PRG = ZGPR*R*T/PR
am_PR = (BAPR*(R*T)**2)/PR
bm_PR = (BBPR*R*T)/PR
!***************************************************************************
NGG1= (6*ZGPR*PR*bm_PR**2)/((R*T)**2) + ZGPR*2*bm_PR/(R*T)
NGG2=(2*am_PR*bm_PR*PR)/((R*T)**3)-(2*PR*bm_PR**2)/((R*T)**2)
NGG3= (bm_PR*ZGPR**2)/(R*T) + (ZGPR*am_PR)/((R*T)**2)
NGG4= 3*(bm_PR**3)*(PR**2)/(R*T)**3
DZP = NGG/DGG
!***************************************************************************
140
! NPR1=(V_PRG-bm_PR)**2
! NPR2=(V_PRG**2+2*bm_PR*V_PRG-bm_PR**2)**2
! DPR1=2*am_PR*(V_PRG+bm_PR)*(V_PRG-bm_PR)**2
! DPR2=R*T*(V_PRG**2+2*bm_PR*V_PRG-bm_PR**2)**2
! DVPT_PR=NPR1*NPR2/(DPR1-DPR2)
! CO_PRG=-1*DVPT_PR/V_PRG
V_PRL=(1-NVPR)*V_PRL
V_PRG= NVPR*V_PRG
VTPR = V_PRL + V_PRG
!*******Using MPR EOS for Liquid Properties*************************
Call ParaMix(PR,LiMPR,BAPR,BBPR,BBSRK,BASRK,BAMPR,BBMPR,BAMSRK,
& BBMSRK,AiPR,BiPR,AiMPR,BiMPR,AiMSRK,BiMSRK,AiSRK,BiSRK,YAIJPR
& ,YAIJSRK,YAIJMPR,YAIJMSRK)
V_MPRL = ZLMPR*R*T/PR
am_MPR = (BAMPR*(R*T)**2)/PR
bm_MPR = (BBMPR*R*T)/PR
NMPR1=(V_MPRL-bm_MPR)**2
NMPR2=(V_MPRL**2+2*bm_MPR*V_MPRL-bm_MPR**2)**2
DMPR1=2*am_MPR*(V_MPRL+bm_MPR)*(V_MPRL-bm_MPR)**2
DMPR2=R*T*(V_MPRL**2+2*bm_MPR*V_MPRL-bm_MPR**2)**2
DVPT_MPR=NMPR1*NMPR2/(DMPR1-DMPR2)
CO_MPRL=-1*DVPT_MPR/V_MPRL
V_MPRG = ZGMPR*R*T/PR
am_MPR = (BAMPR*(R*T)**2)/PR
bm_MPR = (BBMPR*R*T)/PR
!***************************************************************************
NGG1= (6*ZGMPR*PR*bm_MPR**2)/((R*T)**2) + ZGMPR*2*bm_MPR/(R*T)
NGG2=2*am_MPR*bm_MPR*PR/((R*T)**3)-(2*PR*bm_MPR**2)/((R*T)**2)
NGG3= (bm_MPR*ZGMPR**2)/(R*T) + (ZGMPR*am_MPR)/((R*T)**2)
NGG4= 3*(bm_MPR**3)*(PR**2)/(R*T)**3
141
DZP = NGG/DGG
!***************************************************************************
! NMPR1=(V_MPRG-bm_MPR)**2
! NMPR2=(V_MPRG**2+2*bm_MPR*V_MPRG-bm_MPR**2)**2
! DMPR1=2*am_MPR*(V_MPRG+bm_MPR)*(V_MPRG-bm_MPR)**2
! DMPR2=R*T*(V_MPRG**2+2*bm_MPR*V_MPRG-bm_MPR**2)**2
! DVPT_MPR=NMPR1*NMPR2/(DMPR1-DMPR2)
! CO_MPRG=-1*DVPT_MPR/V_MPRG
V_MPRL=(1-NVMPR)*V_MPRL
V_MPRG= NVMPR*V_MPRG
VTMPR = V_MPRL + V_MPRG
V_SRKL = ZLSRK*R*T/PR
am_SRK = (BASRK*(R*T)**2)/PR
bm_SRK = (BBSRK*R*T)/PR
NSRK1=(V_SRKL-bm_SRK)**2
NSRK2=(V_SRKL**2+V_SRKL*bm_SRK)**2
DSRK1=am_SRK*(2*V_SRKL+bm_SRK)*(V_SRKL-bm_SRK)**2
DSRK2=R*T*(V_SRKL**2+bm_SRK*V_SRKL)**2
DVPT_SRK=NSRK1*NSRK2/(DSRK1-DSRK2)
CO_SRKL=-1*DVPT_SRK/V_SRKL
Call ParaMix(PR,ViSRK,BAPR,BBPR,BBSRK,BASRK,BAMPR,BBMPR,BAMSRK,
& BBMSRK,AiPR,BiPR,AiMPR,BiMPR,AiMSRK,BiMSRK,AiSRK,BiSRK,YAIJPR
& ,YAIJSRK,YAIJMPR,YAIJMSRK)
V_SRKG = ZGSRK*R*T/PR
am_SRK = (BASRK*(R*T)**2)/PR
142
bm_SRK = (BBSRK*R*T)/PR
NSRK1=(V_SRKG-bm_SRK)**2
NSRK2=(V_SRKG**2+V_SRKG*bm_SRK)**2
DSRK1=am_SRK*(2*V_SRKG+bm_SRK)*(V_SRKG-bm_SRK)**2
DSRK2=R*T*(V_SRKG**2+bm_SRK*V_SRKG)**2
DVPT_SRK=NSRK1*NSRK2/(DSRK1-DSRK2)
CO_SRKG=-1*DVPT_SRK/V_SRKG
V_MSRKL = ZLMSRK*R*T/PR
am_MSRK = (BAMSRK*(R*T)**2)/PR
bm_MSRK = (BBMSRK*R*T)/PR
NMSRK1=(V_MSRKL-bm_MSRK)**2
NMSRK2=(V_MSRKL**2+V_MSRKL*bm_MSRK)**2
DMSRK1=am_MSRK*(2*V_MSRKL+bm_MSRK)*(V_MSRKL-bm_MSRK)**2
DMSRK2=R*T*(V_MSRKL**2+bm_MSRK*V_MSRKL)**2
DVPT_MSRK=NMSRK1*NMSRK2/(DMSRK1-DMSRK2)
CO_MSRKL=-1*DVPT_MSRK/V_MSRKL
Call ParaMix(PR,ViMSRK,BAPR,BBPR,BBSRK,BASRK,BAMPR,BBMPR,BAMSRK,
& BBMSRK,AiPR,BiPR,AiMPR,BiMPR,AiMSRK,BiMSRK,AiSRK,BiSRK,YAIJPR
& ,YAIJSRK,YAIJMPR,YAIJMSRK)
V_MSRKG = ZGMSRK*R*T/PR
am_MSRK = (BAMSRK*(R*T)**2)/PR
bm_MSRK = (BBMSRK*R*T)/PR
NMSRK1=(V_MSRKG-bm_MSRK)**2
NMSRK2=(V_MSRKG**2+V_MSRKG*bm_MSRK)**2
DMSRK1=am_MSRK*(2*V_MSRKG+bm_MSRK)*(V_MSRKG-bm_MSRK)**2
DMSRK2=R*T*(V_MSRKG**2+bm_MSRK*V_MSRKG)**2
DVPT_MSRK=NMSRK1*NMSRK2/(DMSRK1-DMSRK2)
CO_MSRKG=-1*DVPT_MSRK/V_MSRKG
143
VTMSRK = V_MSRKL + V_MSRKG
CT_MSRK = (V_MSRKG/VTMSRK)*CO_MSRKG + (V_MSRKL/VTMSRK)*CO_MSRKL
End Subroutine CompValue
Subroutine bisect(A,B,MF,Ki,C)
Implicit None
DNV=0.0
CONV=0.001
KMAX = 40000
K=1
AA=B
BB=A
C = (AA+BB)/2
Do i=1,NCOMP
DNV=DNV + MF(i)*(Ki(i)-1)/(C*(Ki(i)-1)+1)
end do
C = (AA+BB)/2
DNV = 0
Do i=1,NCOMP
DNV=DNV + MF(i)*(Ki(i)-1)/(C*(Ki(i)-1)+1)
end do
goto 2345
endif
end if
C=C
144
End Subroutine bisect
Subroutine Zfactor_FugacPR(PR,Li,Vi,NV,ZLPR,ZGPR,FLPR,FGPR
&,BAPR,BBPR)
Implicit None
Real :: ZGMSRK,FLMPR(99),FGMPR(99),ZLSRK,ZGSRK,ZLMPR,ZGMPR,ZLMSRK
Real :: FLMSRK(99),FGMSRK(99),FLSRK(99),FGSRK(99)
Real :: BBSRK,BASRK,BAMPR,BBMPR,BAMSRK
Real :: BBMSRK,BiPR(99),AiPR(99),BiMPR(99),AiMPR(99)
Real :: AiMSRK(99),BiMSRK(99),BiSRK(99),AiSRK(99)
Real :: YAIJPR,YAIJSRK,YAIJMPR,YAIJMSRK
Real :: JPR,JMPR,JSRK,JMSRK,JPR1,JPR2,JPR3
Real :: SYAIJPR,SYAIJSRK,SYAIJMSRK,SYAIJMPR,Mtype
YAIJPR = 0
YAIJSRK = 0
YAIJMPR = 0
YAIJMSRK = 0
Mtype =0
Call ParaMix(PR,Li,BAPR,BBPR,BBSRK,BASRK,BAMPR,BBMPR,BAMSRK,
& BBMSRK,AiPR,BiPR,AiMPR,BiMPR,AiMSRK,BiMSRK,AiSRK,BiSRK,YAIJPR
& ,YAIJSRK,YAIJMPR,YAIJMSRK)
Coeff(1)=1
Coeff(2)= -1*(1-BBPR)
Coeff(3)= BAPR -3*BBPR**2-2*BBPR
Coeff(4)= -1*(BAPR*BBPR-BBPR**2-BBPR**3)
Call Cubic_Solver(Mtype,Coeff,RT)
145
If (RT(3).EQ.0.0) then
RT(3)=RT(1)
end if
If (RT(2).EQ.0.0) then
RT(2)=RT(1)
end if
If (RT(1).EQ.0.0) then
Write(6,*)"Error All roots are zeros"
endif
If (RT(1).LE.RT(2)) Then
ZLPR = RT(1)
else
ZLPR=RT(2)
endif
If (ZLPR.LE.RT(3)) Then
ZLPR = ZLPR
else
ZLPR =RT(3)
endif
!******Liquid Fugacity************************************************
Do i = 1,NCOMP
YAIJPR = 0
YAIJSRK = 0
YAIJMPR = 0
YAIJMSRK = 0
Do j = 1, NCOMP
Kij = 1
YAIJPR = YAIJPR + Li(j)*(AiPR(j)*AiPR(i))**0.5*kij
YAIJSRK = YAIJSRK + Li(j)*(AiSRK(j)*AiSRK(i))**0.5*kij
YAIJMPR = YAIJMPR + Li(j)*(AiMPR(j)*AiMPR(i))**0.5*kij
YAIJMSRK = YAIJMSRK + Li(j)*(AiMSRK(j)*AiMSRK(i))**0.5*kij
End do
FLPR(i)= Li(i)*PR*exp(JPR)
end do
146
!********Mol * Z factor*******************
!ZLPR = ZLPR * (1-NV)
!**********Vapor Z Factor********************************************
Call ParaMix(PR,Vi,BAPR,BBPR,BBSRK,BASRK,BAMPR,BBMPR,BAMSRK,
& BBMSRK,AiPR,BiPR,AiMPR,BiMPR,AiMSRK,BiMSRK,AiSRK,BiSRK,YAIJPR
& ,YAIJSRK,YAIJMPR,YAIJMSRK)
Coeff(1)=1
Coeff(2)= -1*(1-BBPR)
Coeff(3)= BAPR -3*BBPR**2-2*BBPR
Coeff(4)= -1*(BAPR*BBPR-BBPR**2-BBPR**3)
If (NV.LT.0) Then
Mtype = 1.0
end if
Call Cubic_Solver(Mtype,Coeff,RT)
If (RT(3).GT.0.0) then
RT(3)=RT(1)
end if
If (RT(2).EQ.0.0) then
RT(2)=RT(1)
end if
If (RT(1).EQ.0.0) then
Write(6,*)"Error All roots are zeros"
endif
If (RT(1).GT.RT(2)) Then
ZGPR = RT(1)
else
ZGPR=RT(2)
endif
If (ZGPR.GT.RT(3)) Then
ZGPR = ZGPR
else
ZGPR = RT(3)
endif
!write (6,*) "ZGPR = ", ZGPR, "NV = ", NV
!write(6,*) " BBPR =", BBPR
!******Vapor Fugacity************************************************
Do i = 1,NCOMP
YAIJPR = 0
147
YAIJSRK = 0
YAIJMPR = 0
YAIJMSRK = 0
Do j = 1, NCOMP
Kij = 1
YAIJPR = YAIJPR + Vi(j)*(AiPR(j)*AiPR(i))**0.5*kij
YAIJSRK = YAIJSRK + Vi(j)*(AiSRK(j)*AiSRK(i))**0.5*kij
YAIJMPR = YAIJMPR + Vi(j)*(AiMPR(j)*AiMPR(i))**0.5*kij
YAIJMSRK = YAIJMSRK + Vi(j)*(AiMSRK(j)*AiMSRK(i))**0.5*kij
End do
FGPR(i)= Vi(i)*PR*exp(JPR)
!************Imaginary Root********************
!If (NV .LT.0) then
!If (RT(1).GT.RT(2)) Then
!ZGPR = RT(2)
!else
!ZGPR=RT(1)
! endif
!end if
!***************************************************
!********Mol * Z factor*******************
!ZGPR = ZGPR * NV
Subroutine Zfactor_FugacMPR(PR,Li,Vi,NV,ZLMPR,ZGMPR,FLMPR,FGMPR
&,BAMPR,BBMPR)
Implicit None
148
Real :: BAPR,BBPR,BBSRK,BASRK,BAMSRK,BBMSRK
Real :: BiPR(99),AiPR(99),BiMPR(99),AiMPR(99)
Real :: AiMSRK(99),BiMSRK(99),BiSRK(99),AiSRK(99)
Real :: YAIJPR,YAIJSRK,YAIJMPR,YAIJMSRK
Real :: JPR,JMPR,JSRK,JMSRK,Mtype
Mtype =0
Call ParaMix(PR,Li,BAPR,BBPR,BBSRK,BASRK,BAMPR,BBMPR,BAMSRK,
& BBMSRK,AiPR,BiPR,AiMPR,BiMPR,AiMSRK,BiMSRK,AiSRK,BiSRK,YAIJPR
& ,YAIJSRK,YAIJMPR,YAIJMSRK)
Coeff(1)=1
Coeff(2)= -1*(1-BBMPR)
Coeff(3)= BAMPR -3*BBMPR**2-2*BBMPR
Coeff(4)= -1*(BAMPR*BBMPR-BBMPR**2-BBMPR**3)
Call Cubic_Solver(Mtype,Coeff,RT)
If (RT(3).EQ.0.0) then
RT(3)=RT(1)
end if
If (RT(2).EQ.0.0) then
RT(2)=RT(1)
end if
If (RT(1).EQ.0.0) then
Write(6,*)"Error All roots are zeros"
endif
If (RT(1).LE.RT(2)) Then
ZLMPR = RT(1)
else
ZLMPR=RT(2)
endif
If (ZLMPR.LE.RT(3)) Then
ZLMPR = ZLMPR
else
ZLMPR =RT(3)
endif
YAIJPR = 0
YAIJSRK = 0
YAIJMPR = 0
YAIJMSRK = 0
Do j = 1, NCOMP
Kij = 1
YAIJPR = YAIJPR + Li(j)*(AiPR(j)*AiPR(i))**0.5*kij
YAIJSRK = YAIJSRK + Li(j)*(AiSRK(j)*AiSRK(i))**0.5*kij
YAIJMPR = YAIJMPR + Li(j)*(AiMPR(j)*AiMPR(i))**0.5*kij
YAIJMSRK = YAIJMSRK + Li(j)*(AiMSRK(j)*AiMSRK(i))**0.5*kij
149
End do
JMPR=(BiMPR(i)*(ZLMPR-1)/BBMPR)-Alog(ZLMPR-BBMPR)+(BAMPR/(2.828427
& *BBMPR))*((BiMPR(i)/BBMPR)-2*YAIJMPR/BAMPR)*Alog((ZLMPR+2.414214
& *BBMPR)/(ZLMPR-0.414214*BBMPR))
FLMPR(i)= Li(i)*PR*exp(JMPR)
end do
!ZLMPR = ZLMPR*(1-NV)
Call ParaMix(PR,Vi,BAPR,BBPR,BBSRK,BASRK,BAMPR,BBMPR,BAMSRK,
& BBMSRK,AiPR,BiPR,AiMPR,BiMPR,AiMSRK,BiMSRK,AiSRK,BiSRK,YAIJPR
& ,YAIJSRK,YAIJMPR,YAIJMSRK)
Coeff(1)=1
Coeff(2)= -1*(1-BBMPR)
Coeff(3)= BAMPR -3*BBMPR**2-2*BBMPR
Coeff(4)= -1*(BAMPR*BBMPR-BBMPR**2-BBMPR**3)
If (NV.LT.0) Then
Mtype = 1.0
end if
Call Cubic_Solver(Mtype,Coeff,RT)
If (RT(3).EQ.0.0) then
RT(3)=RT(1)
end if
If (RT(2).EQ.0.0) then
RT(2)=RT(1)
end if
If (RT(1).EQ.0.0) then
Write(6,*)"Error All roots are zeros"
endif
If (RT(1).GT.RT(2)) Then
ZGMPR = RT(1)
else
ZGMPR=RT(2)
endif
If (ZGMPR.GT.RT(3)) Then
ZGMPR = ZGMPR
else
ZGMPR =RT(3)
endif
YAIJPR = 0
YAIJSRK = 0
YAIJMPR = 0
YAIJMSRK = 0
150
Do j = 1, NCOMP
Kij = 1
YAIJPR = YAIJPR + Vi(j)*(AiPR(j)*AiPR(i))**0.5*kij
YAIJSRK = YAIJSRK + Vi(j)*(AiSRK(j)*AiSRK(i))**0.5*kij
YAIJMPR = YAIJMPR + Vi(j)*(AiMPR(j)*AiMPR(i))**0.5*kij
YAIJMSRK = YAIJMSRK + Vi(j)*(AiMSRK(j)*AiMSRK(i))**0.5*kij
End do
JMPR=(BiMPR(i)*(ZGMPR-1)/BBMPR)-Alog(ZGMPR-BBMPR)+(BAMPR/(2.828427
& *BBMPR))*((BiMPR(i)/BBMPR)-2*YAIJMPR/BAMPR)*Alog((ZGMPR+2.414214
& *BBMPR)/(ZGMPR-0.414214*BBMPR))
FGMPR(i)= Vi(i)*PR*exp(JMPR)
end do
!************Imaginary Root********************
!If (NV .LT.0) then
!If (RT(1).GT.RT(2)) Then
! ZGMPR = RT(2)
! else
! ZGMPR=RT(1)
! endif
!end if
!***************************************************
!ZGMPR = ZGMPR*NV
Subroutine Zfactor_FugacSRK(PR,Li,Vi,NV,ZLSRK,ZGSRK,FLSRK,FGSRK
&,BBSRK,BASRK)
Implicit None
Real :: BAPR,BBPR,BAMPR,BBMPR,BAMSRK,BBMSRK
Real :: BiPR(99),AiPR(99),BiMPR(99),AiMPR(99)
Real :: AiMSRK(99),BiMSRK(99),BiSRK(99),AiSRK(99)
Real :: YAIJPR,YAIJSRK,YAIJMPR,YAIJMSRK
Real :: JPR,JMPR,JSRK,JMSRK,Mtype
Mtype =0
Call ParaMix(PR,Li,BAPR,BBPR,BBSRK,BASRK,BAMPR,BBMPR,BAMSRK,
& BBMSRK,AiPR,BiPR,AiMPR,BiMPR,AiMSRK,BiMSRK,AiSRK,BiSRK,YAIJPR
151
& ,YAIJSRK,YAIJMPR,YAIJMSRK)
Coeff(1)=1
Coeff(2)= -1
Coeff(3)= BASRK - BBSRK - BBSRK**2
Coeff(4)= -1*BASRK*BBSRK
Call Cubic_Solver(Mtype,Coeff,RT)
If (RT(3).LE.0.01) then
RT(3)=RT(1)
end if
If (RT(2).LE.0.01) then
RT(2)=RT(1)
end if
If (RT(1).EQ.0.0) then
Write(6,*)"Error All roots are zeros"
endif
If (RT(1).LE.RT(2)) Then
ZLSRK = RT(1)
else
ZLSRK=RT(2)
endif
If (ZLSRK.LE.RT(3)) Then
ZLSRK = ZLSRK
else
ZLSRK =RT(3)
endif
YAIJPR = 0
YAIJSRK = 0
YAIJMPR = 0
YAIJMSRK = 0
Do j = 1, NCOMP
Kij = 1
YAIJPR = YAIJPR + Li(j)*(AiPR(j)*AiPR(i))**0.5*kij
YAIJSRK = YAIJSRK + Li(j)*(AiSRK(j)*AiSRK(i))**0.5*kij
YAIJMPR = YAIJMPR + Li(j)*(AiMPR(j)*AiMPR(i))**0.5*kij
YAIJMSRK = YAIJMSRK + Li(j)*(AiMSRK(j)*AiMSRK(i))**0.5*kij
End do
JSRK=(BiSRK(i)*(ZLSRK-1)/BBSRK)-Alog(ZLSRK-BBSRK)+(BASRK/BBSRK)*
& ((BiSRK(i)/BBSRK)-2*YAIJSRK/BASRK)*Alog(1+(BBSRK/ZLSRK))
FLSRK(i) = Li(i)*PR*EXP(JSRK)
end do
ZLSRK = ZLSRK*(1-NV)
Call ParaMix(PR,Vi,BAPR,BBPR,BBSRK,BASRK,BAMPR,BBMPR,BAMSRK,
& BBMSRK,AiPR,BiPR,AiMPR,BiMPR,AiMSRK,BiMSRK,AiSRK,BiSRK,YAIJPR
152
& ,YAIJSRK,YAIJMPR,YAIJMSRK)
Coeff(1)=1
Coeff(2)= -1
Coeff(3)= BASRK - BBSRK - BBSRK**2
Coeff(4)= -1*BASRK*BBSRK
If (NV.LT.0) Then
Mtype = 1.0
end if
Call Cubic_Solver(Mtype,Coeff,RT)
If (RT(3).EQ.0.0) then
RT(3)=RT(1)
end if
If (RT(2).EQ.0.0) then
RT(2)=RT(1)
end if
If (RT(1).EQ.0.0) then
Write(6,*)"Error All roots are zeros"
endif
If (RT(1).GT.RT(2)) Then
ZGSRK = RT(1)
else
ZGSRK=RT(2)
endif
If (ZGSRK.GT.RT(3)) Then
ZGSRK = ZGSRK
else
ZGSRK =RT(3)
endif
YAIJPR = 0
YAIJSRK = 0
YAIJMPR = 0
YAIJMSRK = 0
Do j = 1, NCOMP
Kij = 1
YAIJPR = YAIJPR + Vi(j)*(AiPR(j)*AiPR(i))**0.5*kij
YAIJSRK = YAIJSRK + Vi(j)*(AiSRK(j)*AiSRK(i))**0.5*kij
YAIJMPR = YAIJMPR + Vi(j)*(AiMPR(j)*AiMPR(i))**0.5*kij
YAIJMSRK = YAIJMSRK + Vi(j)*(AiMSRK(j)*AiMSRK(i))**0.5*kij
End do
JSRK=(BiSRK(i)*(ZGSRK-1)/BBSRK)-Alog(ZGSRK-BBSRK)+(BASRK/BBSRK)*
& ((BiSRK(i)/BBSRK)-2*YAIJSRK/BASRK)*Alog(1+(BBSRK/ZGSRK))
FGSRK(i) = Vi(i)*PR*EXP(JSRK)
153
end do
!************Imaginary Root********************
!If (NV .LT.0) then
!If (RT(1).GT.RT(2)) Then
!ZGSRK = RT(2)
! else
!ZGSRK =RT(1)
!endif
!end if
ZGSRK = ZGSRK*NV
!***************************************************
End Subroutine Zfactor_FugacSRK
Subroutine Zfactor_FugacMSRK(PR,Li,Vi,NV,ZLMSRK,ZGMSRK,FLMSRK
& ,FGMSRK,BAMSRK,BBMSRK)
Implicit None
Real :: BAPR,BBPR,BBSRK,BASRK,BAMPR,BBMPR
Real :: BiPR(99),AiPR(99),BiMPR(99),AiMPR(99)
Real :: AiMSRK(99),BiMSRK(99),BiSRK(99),AiSRK(99)
Real :: YAIJPR,YAIJSRK,YAIJMPR,YAIJMSRK
Real :: JPR,JMPR,JSRK,JMSRK
Mtype =0
Call ParaMix(PR,Li,BAPR,BBPR,BBSRK,BASRK,BAMPR,BBMPR,BAMSRK,
& BBMSRK,AiPR,BiPR,AiMPR,BiMPR,AiMSRK,BiMSRK,AiSRK,BiSRK,YAIJPR
& ,YAIJSRK,YAIJMPR,YAIJMSRK)
Coeff(1)=1
Coeff(2)= -1
Coeff(3)= BAMSRK - BBMSRK - BBMSRK**2
Coeff(4)= -1*BAMSRK*BBMSRK
Call Cubic_Solver(Mtype,Coeff,RT)
If (RT(3).LE.0.01) then
RT(3)=RT(1)
end if
If (RT(2).LE.0.01) then
RT(2)=RT(1)
154
end if
If (RT(1).EQ.0.0) then
Write(6,*)"Error All roots are zeros"
endif
If (RT(1).LE.RT(2)) Then
ZLMSRK = RT(1)
else
ZLMSRK=RT(2)
endif
If (ZLMSRK.LE.RT(3)) Then
ZLMSRK = ZLMSRK
else
ZLMSRK =RT(3)
endif
YAIJPR = 0
YAIJSRK = 0
YAIJMPR = 0
YAIJMSRK = 0
Do j = 1, NCOMP
Kij = 1
YAIJPR = YAIJPR + Li(j)*(AiPR(j)*AiPR(i))**0.5*kij
YAIJSRK = YAIJSRK + Li(j)*(AiSRK(j)*AiSRK(i))**0.5*kij
YAIJMPR = YAIJMPR + Li(j)*(AiMPR(j)*AiMPR(i))**0.5*kij
YAIJMSRK = YAIJMSRK + Li(j)*(AiMSRK(j)*AiMSRK(i))**0.5*kij
End do
JMSRK=(BiMSRK(i)*(ZLMSRK-1)/BBMSRK)-Alog(ZLMSRK-BBMSRK)+(BAMSRK
& /BBMSRK)*((BiMSRK(i)/BBMSRK)-2*YAIJMSRK/BAMSRK)*Alog(1+(BBMSRK
& /ZLMSRK))
FLMSRK(i) = Li(i)*PR*EXP(JMSRK)
end do
ZLMSRK = ZLMSRK*(1-NV)
Call ParaMix(PR,Vi,BAPR,BBPR,BBSRK,BASRK,BAMPR,BBMPR,BAMSRK,
& BBMSRK,AiPR,BiPR,AiMPR,BiMPR,AiMSRK,BiMSRK,AiSRK,BiSRK,YAIJPR
& ,YAIJSRK,YAIJMPR,YAIJMSRK)
Coeff(1)=1
Coeff(2)= -1
Coeff(3)= BAMSRK - BBMSRK - BBMSRK**2
Coeff(4)= -1*BAMSRK*BBMSRK
If (NV.LT.0) Then
Mtype = 1.0
end if
155
Call Cubic_Solver(Mtype,Coeff,RT)
If (RT(3).EQ.0.0) then
RT(3)=RT(1)
end if
If (RT(2).EQ.0.0) then
RT(2)=RT(1)
end if
If (RT(1).EQ.0.0) then
Write(6,*)"Error All roots are zeros"
endif
If (RT(1).GT.RT(2)) Then
ZLMSRK = RT(1)
else
ZLMSRK=RT(2)
endif
If (ZGMSRK.GT.RT(3)) Then
ZGMSRK = ZGMSRK
else
ZGMSRK =RT(3)
endif
YAIJPR = 0
YAIJSRK = 0
YAIJMPR = 0
YAIJMSRK = 0
Do j = 1, NCOMP
Kij = 1
YAIJPR = YAIJPR + Vi(j)*(AiPR(j)*AiPR(i))**0.5*kij
YAIJSRK = YAIJSRK + Vi(j)*(AiSRK(j)*AiSRK(i))**0.5*kij
YAIJMPR = YAIJMPR + Vi(j)*(AiMPR(j)*AiMPR(i))**0.5*kij
YAIJMSRK = YAIJMSRK + Vi(j)*(AiMSRK(j)*AiMSRK(i))**0.5*kij
End do
JMSRK=(BiMSRK(i)*(ZGMSRK-1)/BBMSRK)-Alog(ZGMSRK-BBMSRK)+(BAMSRK
& /BBMSRK)*((BiMSRK(i)/BBMSRK)-2*YAIJMSRK/BAMSRK)*Alog(1+(BBMSRK
& /ZGMSRK))
FGMSRK(i) = Vi(i)*PR*EXP(JMSRK)
end do
!************Imaginary Root********************
!If (NV .LT.0) then
!If (RT(1).GT.RT(2)) Then
!ZGMSRK = RT(2)
! else
!ZGMSRK =RT(1)
!endif
156
!end if
ZGMSRK = ZGMSRK*NV
!***************************************************
Subroutine ParaMix(PR,Ji,BAPR,BBPR,BBSRK,BASRK,BAMPR,BBMPR,BAMSRK,
& BBMSRK,AiPR,BiPR,AiMPR,BiMPR,AiMSRK,BiMSRK,AiSRK,BiSRK,YAIJPR
& ,YAIJSRK,YAIJMPR,YAIJMSRK)
Real :: SYAIJPR(99,99),SYAIJSRK(99,99),SYAIJMPR(99,99)
Real :: SYAIJMSRK(99,99),LLi(99)
am_LLS = 0
am_SRK = 0
am_Pr = 0
bmi_LLS = 0
bmi_SRK = 0
bmi_PR = 0
YAIJPR = 0
YAIJSRK = 0
YAIJMPR = 0
YAIJMSRK = 0
LLi = Ji
!****************************************************************************!
Do i=1,NCOMP
OWi(i) = 0.361/(1+(0.274*A_Fi(i)))
TRi(i)=T/Tci(i)
PRi(i)=PR/Pci(i)
OBi(i)=Zci(i)*OWi(i)
OAi(i)=(1+(OWi(i)-1)*Zci(i))**3
TF_LLS(i)=(1+mi_LLS(i)*(1-TRi(i)**0.5))**2
157
mi_SRK(i) = 0.480 + 1.574*A_Fi(i) - 0.176*A_Fi(i)**2
TF_SRK(i)=(1+(mi_SRK(i))*(1- TRi(i)**0.5))**2
TF_PR(i)=(1+(mi_PR(i))*(1- TRi(i)**0.5))**2
ai_LLS(i) = (TF_LLS(i)*OAi(i)*(R*Tci(i))**2)/Pci(i)
bi_LLS(i) = ((OBi(i)*R*Tci(i))/Pci(i))
ai_SRK(i)= (0.42748*TF_SRK(i)*(R*Tci(i))**2)/pci(i)
bi_SRK(i) = (0.08664*R*Tci(i))/pci(i)
ai_PR(i) = 0.45724*TF_PR(i)*(R*Tci(i))**2/pci(i)
bi_PR(i) = 0.07780*R*Tci(i)/pci(i)
ai_MPR(i) = ai_LLS(i)
bi_MPR(i) = bi_LLS(i)
ai_MSRK(i) = ai_LLS(i)
bi_MSRK(i)= bi_LLS(i)
END DO
!****************************************************************************!
DO i=1,NCOMP
AiPR(i)= ai_PR(i)*PR/(R*T)**2
BiPR(i)= bi_PR(i)*PR/ (R*T)
AiSRK(i)= ai_SRK(i)*PR/(R*T)**2
BiSRK(i)= bi_SRK(i)*PR/ (R*T)
AiMPR(i)= ai_MPR(i)*PR/(R*T)**2
BiMPR(i)= bi_MPR(i)*PR/ (R*T)
AiMSRK(i)= ai_MSRK(i)*PR/(R*T)**2
BiMSRK(i)= bi_MSRK(i)*PR/ (R*T)
DO j=1,NCOMP
IF ( (Tci(i)/Pci(i)**0.5) < (Tci(j)/Pci(j)**0.5) ) THEN
kij = ((Tci(i)/Pci(i)**0.5)/(Tci(j)/Pci(j)**0.5))**0.5
ELSE
kij = ((Tci(j)/Pci(j)**0.5)/(Tci(i)/Pci(i)**0.5) )**0.5
END IF
kij=1
ami_LLS=LLi(i)*LLi(j)*(ai_LLS(i)*ai_LLS(j))**0.5*kij
ami_SRK=LLi(i)*LLi(j)*(ai_SRK(i)*ai_SRK(j))**0.5*kij
158
ami_PR =LLi(i)*LLi(j)*(ai_PR(i)*ai_PR(j))**0.5*kij
am_LLS = am_LLS + ami_LLS
am_SRK = am_SRK + ami_SRK
END DO
END Do
do i= 1, NCOMP
Do j = 1, NCOMP
Kij = 1
SYAIJPR (i,j) = YAIJPR + LLi(j)*(AiPR(j)*AiPR(i))**0.5*kij
SYAIJSRK(i,j) = YAIJSRK + LLi(j)*(AiSRK(j)*AiSRK(i))**0.5*kij
SYAIJMPR(i,j) = YAIJMPR + LLi(j)*(AiMPR(j)*AiMPR(i))**0.5*kij
SYAIJMSRK(i,j) = YAIJMSRK + LLi(j)*(AiMSRK(j)*AiMSRK(i))**0.5*kij
End do
end do
bm_LLS = bmi_LLS
bm_SRK = bmi_SRK
bm_PR = bmi_PR
bm_MPR = bm_LLS
bm_MSRK=bm_LLS
BAPR=am_PR*PR/(R*T)**2
BBPR=bm_PR*PR/(R*T)
BASRK=am_SRK*PR/(R*T)**2
BBSRK=bm_SRK*PR/(R*T)
BAMPR=am_MPR*PR/(R*T)**2
BBMPR=bm_MPR*PR/(R*T)
BAMSRK=am_MSRK*PR/(R*T)**2
BBMSRK=bm_MSRK*PR/(R*T)
159
!**************Subroutine Cubic Solver******************************
SUBROUTINE Cubic_Solver(Mtype,Coeff,X)
IMPLICIT NONE
!REAL :: X1,X2,X3
REAL :: F,G,H,I,J,K,L,M,N,P,RI
REAL :: K1,K2,K3,K4
Real :: A,B,C,D
REAL :: U_D , T, S
X(1)=0.0
X(2)=0.0
X(3)=0.0
A= Coeff(1)
B = Coeff(2)
C = Coeff(3)
D = Coeff(4)
F = (( 3*C/A) - (B*B)/(A*A) ) /3
H = ((G*G)/4) + ((F**3)/27)
K1=F-G
K2=H-G
K3=ABS(K2-K1)
K4=0.0000001
IF (abs(K3).LT.K4) THEN
END IF
IF (H.LE.0) THEN
I = ((G*G)/4 - H )**0.5
J = I**0.3333
L = -1 * J
160
M = COS (K/3)
P = B/(3*A) * ( -1)
X(2) = L * ( M + N ) + P
X(3) = L * (M -N ) + P
ENDIF
IF (H .GT.0) THEN
RI = ((-1*G)/2) + H**0.5
S = RI**(0.33333)
T = ((-1*G)/2) - H**0.5
If (T.LE.0) Then
T = -1*T
U_D =T**0.33333
U_D = -1 * U_D
Else
U_D =T**0.33333
End If
end if
!**************************************************
! X1 - Real Root
!Imaginary roots
! -1* (S + U_D)/2 - ( B/(3*A)),"+i",(S-U_D)*3**0.5/2
! -1* (S + U_D)/2- ( B/(3*A) ), "- i",(S-U_D)*3**0.5/2
END IF
!***************End of Program******************************
161
APPENDIX K
VITA
secondary school, Ikenne, Ogun State Nigeria where he graduated with distinctions in
with a first class and was awarded the best graduating student in the faculty of
second during the Texas Tech SPE Student paper contest and went ahead to present the
same paper at the 2006 SPE Gulf Coast Student paper contest at Texas A&M, College
Station, Texas. He also presented a Poster at the Graduate School Poster Competition.
out reservoir simulation and well testing analysis using ECLIPSE Software and Weltest
200.
162
PERMISSION TO COPY
degree at Texas Tech University or Texas Tech University Health Sciences Center, I
agree that the Library and my major department shall make it freely available for research
purposes. Permission to copy this thesis for scholarly purposes may be granted by the
publication of this thesis for financial gain shall not be allowed without my further
written permission and that any user may be liable for copyright infringement.
_______________________________________________ _________________
Student Signature Date