A Regression Technique With Dynamic-Parameter Selection For Phase Behavior Matching
A Regression Technique With Dynamic-Parameter Selection For Phase Behavior Matching
A Regression Technique With Dynamic-Parameter Selection For Phase Behavior Matching
SPE 16343
This paper was prepared for presentation at the SPE California Regional Meeting held in Ventura, California, April 8-10, 1987.
This paper was selected for presentation by an SPE Program Committee following review of information contained in an abstract submitted by the
author(s). Contents of the paper, as presented, have not been reviewed by the Society of Petroleum Engineers and are subject to correction by the
author(s). The material, as presented, does not necessarily reflect any position of the Society of Petroleum Engineers, ItS officers, or members. Papers
presented at SPE meetings are subject to publication review by Editorial Committees of the Society of Petroleum Engineers. Permission to copy IS
restricted to an abstract of not more than 300 words. Illustrations may not be copied. The abstract should contain conspicuous acknowledgment of
where and by whom the paper is presented. Write Publications Manager, SPE, P.O. Box 833836, Richardson, TX 75083-3836, Telex, 730989 SPEDAL.
207
A Regression Technique With
2 Dynamic-Parameter Selection for Phase-Behavior Matching
x. lfuen the equation of state is adjusted to match If the jacobian J is to be calculated by finite
a set of experimental data Y differences, the perturbation in the independent
variables x must be such that it is not masked by the
convergence accuracy €i or the truncation and round-
off errors associated with the computation. It has
Yi been found that a perturbation of 1% in the
independent variables is adequate to compute J by
numerical differentiation.
with R(x) = [e1(x), e 2 (x), ••• ,e nm (x)]T
Choice of Regression Parameters
and Y = [Yi' Y2"",Ynm]T
Given a global set of regression parameters,
where R(x) are the equation-of-state results and y
the experimental data points. In this case the xj,j=1, ••• ,np, the method selects an active subset of
nonlinear least-squares problem consists of nr parameters with which regression will be
performed. The global set of regression parameters
adjusting x so that the EOS results match the
experimental measurements. is supplied by the user and includes all or some of
the following:
The problem (1) may be solved by various
methods for nonlinear parameter estimation (Bard, Pci critical pressure of component i
1974), and for nonlinear optimization (Himmelblau, Tci critical temperature of component i
1972; Schittkowski, 1981). The general purpose vci cri tical vol ume of component i which
optimization methods however do not take advantage affects the interaction coefficients
of the special structure of the nonlinear least between hydrocarbons (see Equation 2)
squares optimization problem (1). Several accent ric factor of component i
strategies are available to exploit this structure. volume translation of component i (see
Coats and Smart (1986) used a modified linear Equation 3)
programming least squares algorithm to solve (1). interaction coefficient between components
i and j
Watson and Lee (1986) use a modification of the
Lenenberg-Marquardt algorithm (see More, 1978) to power for computing interaction coeffici-
solve a nonlinear least-squares problem. ents between hydrocarbons (see Equation 2)
In this report a modification of the adaptive The interaction coefficients between hydro-
least-squares algorithm of Dennis et al ( 1981) is carbons are estimated from the following equation
used. The algorithm departs from the method of
Dennis et al in using some other nonlinear optimiza- (Li, et aI, ':8[': v ;. voj ~j A
tion concepts on step-direction and step-size
selection due to Chen and Stadtherr ( 1981 ) • The d =ij
oi (2)
regression method is described in detail in Appendix 1/3 1/3
A. V ci + v cj _
APPLICATION OF THE REGRESSION METHOD TO ROS TUNING The volume translation technique of Peneloux et
al (1982) is used to correct the molar volume as
Outline follows
208
SPE 16343 Rajeev Agarwal, Yau-Kun Li & Long Nghiem 3
is dropped from the regression set and the next Gas Condensate System (Third SPE Comparative Solution
variable on the original sorted list is added on. Project)
Indeed, since all IX j are scaled betweep z;eros and
unity, if I(Iflax j, is less than all i ri:, it is The composition of the reservoir fluid used in
likely that Xj has to go beyond its bounds to the third SPE comparative solution project (Kenyon
further reduce rio Therefore, it is logical that Xj and Behie, 1983) is given in Table 4. The fluid
should be dropped from the active parameter set. contains a large percentage of methane. The seven
Another condition where x j is dropped is when it component model fluid characterization is given in
tries to go out of bounds for more than two Table 5.
successive iterations.
The experimental data to be matched is the lean
At convergence, if the total number of gas swelling experiment which consists of a satura-
regressed variables (including those which have been tion pressure-composition data set and a swelling
dropped) is less than five, then new variables are factor-composition data set.
added to the active regression set and the original
ctive regression variables with the smallest For this example several different cases were
jdflax j I are removed from the active set such that run to illustrate the pitfalls in EOS tuning, to
nr is preserved. stress that caution must be used when selecting the
potential regression parameters, and finally to show
The flowchart of the parameter selection the importance of choosing the upper and lower bounds
procedure is given in Figure 1. of the regression parameters. The following cases
were run:
EXAMPLES
Case 1 The cri tical pressures and temperatures of
Light-Oil System all the hydrocarbon components except C6 were
treated as potential regression parameters, with
The composition of alight reservoir fluid is the lower and upper bounds being 0.7 and 1.3
given in Table 1. This fluid is modeled by seven times the initial values, respectively.
hypothetical components shown in Table 2. The
experimental data to be matched is the pressure- Case 2 The cri tical pressures and temperatures of
composition diagram when C02 is the injection fluid. all components except those of C6 were treated
as regression parameters. Also the upper and
The possible 29 regression parameters for this lower bounds were much narrower than in Case 1
system are: to ensure that, after regression, Pc and Tc
would follow the trend of decreasing Pc with
Acentric factors, Wi increasing carbon number and increasing Tc wi th
Critical pressures, Pci increasing carbon number.
Critical temperatures, Tci
C02-hydrocarbon interaction coefficients, Case 3 The critical properties of only the two
dC02-i, and heaviest fractions were chosen as regression
Power for hydrocarbon-hydrocarbon interaction parameters, again with restrictions on the upper
coefficients, A (see equation 2) and lower bounds to maintain the monotonic
increase and decrease in Tc and Pc wi th carbon
where the subscript i refers to all the hydrocarbon number.
components of the fluid.
/ For all the above cases the interaction
The properties of the original fluid and the coefficient between the first component and the
regressed fluid are shown in Table 3. Figure 2 second through seventh component were also part of
shows the experimental pressure-composition data as the potential regression parameter set.
well as the calculated values obtained by using the
tuned and untuned EOS. It can be seen that the fit The properties of the original flui.d model,
obtained by regression is excellent. along with those determined by Cases 1, 2 and 3 are
shown in Table 6.
Table 3 also shows the five variables that were
chosen by the regression routine. The properties The experimental data and the regression results
chosen are the Tc of the two lightest hydrocarbons, for the saturation pressure-composition data are
the Pc and Tc of the next-to-heaviest hydrocarbon. plotted in Figure 3, and those for swellinp; factor-
(Component 6) , and the interaction coefficient composition data in Figure 4.
between C02 and the heaviest hydrocarbon fraction.
Case 1 gives the best fit, followed by Case 2
At first glance, the choice of Pc and Tc of and then Case 3. It should be noted however that for
Component 6 seems surprizing as one would expect the Case 1, the critical pressures Tc have lost the
properties of the heaviest fraction to have more property of monotonic increase with increasing carbon
impact on the residuals. However, examination of number.
Table 2 shows that the composition of Component 6 is
much larger than that of the heaviest component Case 2 on the other hand maintains the desirable
(Component 7) (12.01 mol% versus 5.57 mol%) and trend of decreasing Pc and increasing Tc • However,
therefore have probably a bigger impact. This the fit is not as good as Case 1. It should also be
example demonstrates that the five variables noted that in Case 1 the EOS is tuned by changing a
selected by the program among the 29 candidates are few parameters by large amounts. Whereas, in Case 2,
very adequate to fit the experimental data.
209
A Regression Technique With
4 Dynamic-Parameter Selection for Phase-Behavior Matching
210
SPE 16343 Rajeev Agarwal, Yau-Kun Li & Long Nghiem 5
211
A Regression Technique With
6 Dynamic-Parameter Selection for Phase-Behavior Matching SPE 16343
212
SPE 1£"~43
TABLE 4 - Gas-Condensate Composition TABLE 5 - Hodel Fluid ~or Gas Condensate in Table 4
Component
Number Component
213
SPE16343
45.000 - - - - , INITIAL MODEL
A
LOAD THE INITIAL VALUES OF THE np REGRESSION PARAMETERS 40,000
0
~
CALCULATE 8f18xJ J= 1,2, ,n p AND SORT w
Xj IN THE DESCENDING ORDER OF MAGNITUDE OF afl dX
J ""
:::>
</) 35,000
~ , I
CHOOSE_T~:~nr xJ's FROM THE SO~~_ SET
""
~~/
"-
.---- z
Q 30,000
!;:(
c,,;;x ................
'S
"":::> __ x o .... 9........
!;:(
af/8xj(r, FOR All i ,.....,...x ....
</)
25,000
x .... v ....
~JRm," 1
0
eJ',fr
'J' :0R TWO ITERATIONS
NO
Xj: XJmox J 20,000
0 '0 40 60 80 '00
YES
MOLE 'l', CO,
HAS
NO
CONVERGENCE BEEN
ACHIEVED? '0
YES
HAVE WE
REGRESSED ON AT LEAST FIVE
YES
STOP
o EXPERIMENTAL DATA
CASE 1
CASE 2
- - - - CASE 3
Fig. 1-Flow chart for selecting the active regression parameters. o
z
3
3
</)
2,0
Fig. 4-Gas condensate·injected fluid; swelling factor diagram injected fluid composition
(moIDAl): 94.68%, Ct. 5.27% C2 , 0.05°/(1 C3 •
4500
C
~
c. 26 a EXPERIMENTAL POINTS
4300
w INITIAL MODEL
ex
:::> FINAL MODEL
if>
~
go: 4100
Z
Q
>-- 3900 ~
.... .,.,.---- ..... ,
<t
ex 22 /
:::> w
>-- ::;; / \
<t / \
</)
3700 3 / \
0
> // \
>-- 20 / \
3500
2
:::>
/// \
0 / 0 \
/ \
""0 /
/ \
\
3300 ..j---...,...----,------.,.-----,~--,._--.,._--.,
'0 20 30 '0 50 60 70
0
'5
18 / \
14..j----....,------,-----r------,-----,
500 1000 1500 2000 2500 3000
PRESSURE (psig)
214