MATLAB代写-W6157
时间:2021-03-08
W6157
Reservoir Engineering II
MATLAB Exercises - WS 2020/21
Prof. L. Ganzer, B. Jenei, M. Wirth
Institute of Subsurface Energy Systems
Reservoir Engineering II - MATLAB Exercises
Contents
1 Exercise 1 - Skin Factor 2
2 Exercise 2 - Fluid Pressure Regimes 3
3 Exercise 3 - Material Balance Gas 4
4 Exercise 4 - Material Balance Oil 5
5 Exercise 5 - Decline Curve Analysis 7
6 Exercise 6 - Buckley Leverett Calculation 9
1
Reservoir Engineering II - MATLAB Exercises
1 Exercise 1 - Skin Factor
For a well with a diameter of 6 inch (0.5 ft), it is known that the damaged region around the well
is 12 inches (1 ft) deep. Information about the damaged zone shows that its permeability is half of
the undamaged zone, i.e. ks = 0.5 ∗ k.
a) Calculate the skin factor for the damaged zone using the following equation:
S =
(
k
ks
− 1
)
∗ ln
(
rs
rw
)
(1)
b) Calculate the effective wellbore radius using the following equation:
rweff = rw ∗ e(−S) (2)
c) For another set of wells (one vertical well and one horizontal well) the following data is
available:
– Height: h = 25 ft
– Length Horizontal Well: L = 1000 ft
– Oil Formation Volume Factor: Bo = 1.06
bbl
STB
– Permeability: kv = kh = 10mD
– Viscosity of Oil: µo = 0.8cP
– Oil Flow Rate: qo = 1000
STB
d
– Skin Factor: 1
– Wellbore Radius: rw = 0.25ft
– Reservoir Radius: re = 1500ft
Calculate the additional pressure drop due to skin for the vertical and the horizontal well
using the following equations:
∆pSv =
141.2qoµoBo
kh
S (3)
∆pSh =
141.2qoµoBo
kL
S (4)
d) The productivity index of a well is defined as PI = q∆p . Calculate the productivity index for
the vertical and the horizontal well, the following equations should help:
qv =
0.007078kh∆p
µoBo
(
ln rerw + S
) (5)
qh =
0.007078kh∆p
µoBo
(
ln 4reL +
h
LS + 0.34
) (6)
Additional Exercises:
• Use the information of the well in a) and b). Change the ratio between the damaged and
undamaged formation permeability and investigate what happens to the skin factor and the
effective wellbore radius for different ratios.
• Use the information of the wells in c). Investigate the influence of the skin factor on the
pressure drop for each well.
2
Reservoir Engineering II - MATLAB Exercises
2 Exercise 2 - Fluid Pressure Regimes
For a hydrocarbon reservoir the following structural data is known:
• Top of the structure: 5000 ft
• Gas-Oil-Contact: 5200 ft
• Water-Oil-Contact: 5500 ft
Additionally, the following pressure gradients for water, oil and gas are known:

(
dp
dz
)
w
= 0.45psift

(
dp
dz
)
o
= 0.35psift

(
dp
dz
)
g
= 0.08psift
Please first calculate the normal hydrostatic pressure at the top of the reservoir, afterwards proceed
to calculate the real hydrostatic pressure including gas and oil. What is the difference between
both calculated pressures at the top of the reservoir? Plot your results in a MATLAB figure and
indicate all important information in the figure.
3
Reservoir Engineering II - MATLAB Exercises
3 Exercise 3 - Material Balance Gas
The material balance for a closed gas reservoir in its simplest form can be formulated as follows:
nr = ni − np (7)
• nr - mole content of gas currently in the reservoir
• ni - initial mole content of gas in the reservoir
• np - produced mole content of gas from the reservoir
Using the real gas law the material balance can be rearranged to:(
pV
zRT
)
r
=
(
pV
zRT
)
i

(
pV
zRT
)
p
(8)
this can be simplified to: (p
z
)
r
=
(p
z
)
i

(p
z
)
i
∗ Gp
G
(9)
• Gp - volume of gas produced
• G - original volume of gas in place
In the case that
(
p
z
)
r
= 0 it follows that Gp = G. This corresponds to the original gas in place.
Exercise
For a gas reservoir the following production data was recorded:
Date Pressure [MPa] Z-Factor Cum. Gas Production [Mio m³]
07.06.75 47.71 1.143 0
20.09.75 46.89 1.135 48.35
23.09.76 45.11 1.117 384.12
25.08.78 42.49 1.092 1065.75
07.09.79 40.87 1.078 1421.37
18.07.80 40.23 1.072 1818.19
28.07.80 38.92 1.065 1818.19
12.06.81 36.74 1.047 2221.69
19.07.82 33.56 1.021 2968.95
10.11.83 30.14 0.999 3801.28
11.12.84 27.72 0.985 4424.49
08.11.85 25.58 0.975 5007.85
01.09.87 22.38 0.958 6088.5
07.08.89 20.10 0.954 6931.17
05.06.90 19.05 0.954 7260.81
23.07.91 17.99 0.952 7661.31
25.11.92 17.01 0.951 8068.43
Using the data from the table calculate the GIIP of the reservoir. First, do it for the production
period until 80, then for the production period until 85 and finally for the complete production
history. How do the values for the GIIP change for the different sets of data? If we assume an
abandonment at p/z = 5, what would be the final cumulative gas production and the final recovery
factor? Visualize the production data and the results in MATLAB.
4
Reservoir Engineering II - MATLAB Exercises
4 Exercise 4 - Material Balance Oil
For undersaturated oil reservoirs without water drive the material balance can be derived from the
definition of the compressibility and the formation volume factor.
B =
Vreservoir
Vstandard
(10)
c = − 1
V
dV
dp
(11)
With the definition of the original oil filled reservoir volume, N ∗ Boi, and of the change in oil
volume based on reservoir conditions, Np ∗Bo, we arrive at the following expression:
co ∗ ∆p = −∆V
V
=
Np ∗Bo
N ∗Boi (12)
Now we can use the following compressibility description to arive at the final form of the material
balance equation for this case:
co =
1
Boi
Bo −Boi
∆p
(13)
N(Bo −Boi) = Np ∗Bo (14)
Exercise
The following production data for an undersaturated oil reservoir is known:
Time [Days] Cum. Production [m³] Pressure [bar]
0 0 300.7
1 10 300.68
4 40 300.62
13 130 300.44
40 400 299.91
121 1210 298.32
365 3650 293.52
375 3650 293.52
405 3950 292.93
495 4850 291.15
730 7200 286.49
1095 10850 279.22
1460 14500 271.91
1825 18150 264.54
2190 21800 257.13
2555 25440 249.66
2920 29100 242.15
3280 32750 234.58
3650 36400 226.97
5
Reservoir Engineering II - MATLAB Exercises
Additionally, the following fluid and reservoir properties are known:
Specific Gravity Oil γoil [−] 0.8
Specific Gravity Gas γgas [−] 0.6
Temperature T [◦C] 60
Initial GOR Rsi [m
3/m3] 300
Initial Reservoir Pressure Pi [bar] 300
Bubble Point Pressure Pbp [bar] 40
Compressibility Oil coil [bar
−1] 2 ∗ 10−4
PVT measurements have shown that at initial pressure the GOR is 300 m³/m³. It is assumed
that the Rs is a linear function of pressure below the bubble point. For the calculation of the oil
formation volume factor two different equations have to be used, one above the bubble point and
one below the bubble point (Standing correlation):
P > Pbp : Boil = Boil,bp ∗ ecoil(Pbp−P ) (15)
P <= Pbp : Boil = 0.972 + 0.000147
(
5.61Rs

γgas
γoil
+ 1.25(1.8T + 32)
)1.175
(16)
a) Calculate Boil and Rs for a pressure range from 0 to the initial reservoir pressure. Visualize
your results in MATLAB.
b) Determine the original oil in place using the material balance equation provided above and
the production data. You can determine the OOIP either by fitting a curve automatically or
manually changing the value of the OOIP. Visualize your results in MATLAB.
Hint: Rearrange the material balance equation to the following form and plot the production data
in a 1 − (Boil,iBoil ) vs. Np plot:
Np = N
(
1 − Boil,i
Boil
)
(17)
6
Reservoir Engineering II - MATLAB Exercises
5 Exercise 5 - Decline Curve Analysis
Decline Curve Analysis (DCA) is a technique to predict the future performance of a well or reservoir
and to estimate the recoverable reserves. To do the prediction a curve is fit to past prodcution data
and subsequently extrapolated. The basic assumption is that the controlling factors of the trend in
production data will also continue to controll it in the future. Therefore, it should be noted that
DCA can only be applied when the production data is long enough to observe a trend and the
operating and reservoir conditions (e.g. new wells, water injection) remain unchanged. There are
three main types of curves that are commonly used for DCA:
• Exponential Decline: the decline rate D is a constant
D =
dlnq
dt
= −
dq
dt
q
= const (18)
• Hyperbolic Decline: decline rate D is proportional to a fractional power b of the production
rate
D = −
dq
dt
q
= Kqb (19)
• Harmonic Decline: the decline rate D is proportional to the production rate
D = −
dq
dt
q
= Kq (20)
Exercise
The following production data is available from the production of an oil reservoir:
Time [Months] Wells on production Oil rate [m³/day]
0 42 210
3 42 198
6 42 187
9 42 177
12 42 167
15 42 157
18 42 149
21 42 141
24 42 133
27 42 125
30 42 118
33 42 112
36 42 106
39 42 100
42 42 94
45 42 89
48 50 150
51 50 136
54 50 124
57 50 113
60 50 103
7
Reservoir Engineering II - MATLAB Exercises
a) Fit a decline curve to the production data until month 45. Do this for each of the three types
of decline curves. With witch one of the decline types does the data match best? Vizualize
your results.
b) Fit a decline curve to the production data from month 48 onwards. Do this for each of the
three types of decline curves. With witch one of the decline types does the data match best?
Vizualize your results.
c) Assuming the abondonment rate for 42 wells is 42 [m3/day] and 50 [m3/day] for 50 wells.
How long would the reservoir be able to produce and what would be the cumulative oil
recovery? You can solve this graphically or by calculating it using the fitted functions.
Hints:
• Production rate for exponential decline (b = 0):
qt = qi ∗ e−D∗t (21)
• Production rate for hyperbolic decline (0 <= b <= 1):
qt = qi(1 + b ∗Di ∗ t)− 1b (22)
• Production rate for harmonic decline (b = 1):
qt =
qi
1 +Di ∗ t (23)
• To shorten the code you have to write for each of the decline curves you can use one of the
conditional statements or loops.
8
Reservoir Engineering II - MATLAB Exercises
6 Exercise 6 - Buckley Leverett Calculation
Buckley, Leverett and Welge developed a model which describes the simultaneous flow of two
immiscible fluids in porous media. The fractional flow of water is described by the fractional flow
equation, which can be found in literature:
fw =
µo
kro
µw
krw
+ µokro
+
kA
qt
∂Pc
∂x
µw
krw
+ µokrw

kA
wt
g∆p
µw
krw
+ µokrw
(24)
The first term in the equation represents the impact of the mobility ratio (viscous forces), the
second term the influence of the capillary forces and the third term the gravitational forces on
the flow of water, thus providing a decription of the microscopic displacement efficiency. For the
purposes of this exercise, the influence of the capillary forces and the gravitational forces will be
neglected leading to the following equation:
fw =
krw
µw
krw
µw
+ kroµo
(25)
Additionally to the Buckley-Leverett model, the Corey-Brooks correlation for the calculation of
the relative permeabilities will be used in this exercise. The correlations for a water-oil system are
given below:
krw = krw,0 ∗
(
Sw − Swc
1 − Swc − Sor
)nw
(26)
kro = kro,0 ∗
(
So − Sor
1 − Sor − Swc
)no
(27)
For a more practical implementation these correlations can be split into two parts:
Sw,CB =
Sw − Swc
1 − Swc − Sor (28)
krw = krw,0 ∗ (Sw,CB)nw (29)
kro = kro,0 ∗ (1 − Sw,CB)no (30)
Later on the derivatives of some of these functions will be needed:
dSw,CB =
1
1 − Swc − Sor (31)
dkrw = krw,0 ∗ nw ∗ (dSw,CB ∗ Sw,CB)nw−1 (32)
dkro = kro,0 ∗ no ∗ (−dSw,CB ∗ (1 − Sw,CB))no−1 (33)
dfw =
(
dkrw
µw
kro
µo
− krwµw dkroµo
krw
µw
+ kroµo
)2
(34)
For the calculation of the front or shock water saturation you should use the following equation as
a basis: (
dfw
dSw
)
=
fw(Sw,0) − fw(Sw,shock)
Sw,0 − Sw,shock (35)
9
Reservoir Engineering II - MATLAB Exercises
This equation gives the slope of the fractional flow curve. To find the shock water saturation the
equation has to be resolved to 0. It is an alternative approach to the graphical method shown in
the lecture. The rearranged equation for resolving to 0 is:
0 = dfw(Sw,shock)
fw(Sw,0) − fw(Sw,shock)
Sw,0 − Sw,shock (36)
Additional to the fractional flow curves and the shock water saturation it is also possible to calculate
the advancement speed of the front with the frontal advance equation:
dxfront
dt
=
qt
A ∗ Φ ∗
dfw
dSw
(37)
When solving this equation it is also possible to determine the position of the front at a certain
time.
10
Reservoir Engineering II - MATLAB Exercises
Exercise
The following data should be used for the calculations in this exercise:
µw 1 cP
µo 10 cP
krw,0 1
kro,0 1
nw 4
no 2
Swc 0.2
Sor 0.1
qt 1
A 100
Φ 0.3
a) With the data provided above calculate the relative permeabilities of oil and water, using
the Corey-Brooks correlation, for a range between the connate water and the residual oil
saturation. Plot the results in a graph.
b) Using the relative permeabilities calculated previously, calculate the fractional flow curve
between the connate water and the residual oil saturation and show the results in a different
graph.
c) Using the calculations of the previous parts and the equations given previously calculate the
shock water saturation.
d) Solve the frontal advance equation for the shock water saturation to get the advancement
speed of the front. Show the results for every water saturation and for the shock water
saturation in a graph.
11














































































































































































































































































































































































































































































































学霸联盟


essay、essay代写