Date post: | 17-Dec-2015 |
Category: |
Documents |
Upload: | emre-cengiz |
View: | 2 times |
Download: | 0 times |
PET 504 E Adv. Well Test Analysis Final Project 23.05.2015 505132501 EMRE CENGZ
Sayfa 1 / 18
Eq. 1 in the question booklet inverted using Stehfest Algorithm and compared with the time domain
solution and it shows pretty good match. All these calculations can be found in both matlab codes
and excel calculations. Excel sheet and matlab codes provided as attachment.
Delta pressure and pressure derivative calculations are done by using the pressure solution
hereafter, compared with Ecrin test design solution.
Figure 1:Calculated pressure and pressure derivative compared with test design data from ecrin. It shows pretty good match for early and middle time. As the model does not have WBS and skin there is no 1 slope and hump appared in the log log graph.
0
1
2
3
4
5
6
7
8
9
0,E+00 2,E+06 4,E+06 6,E+06 8,E+06 1,E+07 1,E+07
pD
tD
PDFWS (RD=1)
PDFWS (RD=2)
PDFWS (RD=5)
PDFWS (RD=10)
PDFWS (RD=20)
Inversion (RD=1)
Inversion (RD=2)
Inversion (RD=5)
Inversion (RD=10)
Inversion (RD=20)
1
10
100
1000
1,00E-03 1,00E-02 1,00E-01 1,00E+00 1,00E+01
dp
&d
p',
psi
time,hr
Ecrin DP
Ecrin DP'
Calc DP
Calc DP'
Sayfa 2 / 18
There are 6 different flow period in during the test and during 2 of them the well is shut in.
Therefore, the pressure change in the reservoir is calculated and compared with simulated synthetic
data with ecrin.
Figure 2: Calculated pressure history during the test compared with simulated data with ecrin. Plots validate each other for the all flow periods. There is tiny contention in the final flow period. It has been tried several times to fix this error. However, MatLAB wins.
In the second step, WBS and Skin added to pressure model and compared with ecrin data then log
log derivative response are compared. First shut in period is calculated and evaluated in this
example.
Figure 3: Good match is observed with ecrin dp and calculated dp. Also, Caclulated ecrin delta pressure derivative and calculated pressure derivative shows good match. As the model defines wellbore storage:0.015 bbl/psi and 2.5 skin factor, there is hump and 1 slope is observer in the early time behaviour of the pressure derivative data.
4200
4250
4300
4350
4400
4450
4500
4550
0 20 40 60 80 100
Pre
ssu
re, p
si
time, hr
Ecrin
Calc
0,1
1
10
100
1000
1,00E-03 1,00E-02 1,00E-01 1,00E+00 1,00E+01
Ecrin Dp
Ecrin Dp'
Calc DP
Calc DP'
Sayfa 3 / 18
Regarding the the pressure behaviour due to production, and shut in periods, simulated data from
ecrin and calculated data shows a good match during all flow periods except the latest one.
Calculated pressure derivative analysis of the reservoir system with 0.015 bbl/psi WBS and 2.5 skin
and a fault located at 200 ft shows good match with the ecrin simulated data. The unconformity at
the late time region of the pressure derivative as a cause of miscalculated pressure data after 5
hours.
For the last part of the problem a single sealing fault is located at the 200 ft away from the well.
Fairly good pressure match is observed with ecrin pressure history.
4150
4200
4250
4300
4350
4400
4450
4500
4550
0 20 40 60 80 100 120
Ecrin
Calc
0,1
1
10
100
1000
1,00E-03 1,00E-02 1,00E-01 1,00E+00 1,00E+01
DP
an
d D
p'
time, hr
Ecrin DP
Ecrin DP'
Calc. DP
Calc. DP'
Sayfa 4 / 18
As we can see pressure history has a good work, however, like previous pressure histories last build
up data is problematic. Ecrin solution and calculated solution match at the end however during build
up period there is a small gap between them.
Variable Rate Analysis 2
Production rate is given as a function q(t)=500-180ln(t). It was not possible to input this function into
the Ecrin. Instead, we calculated rates for each one hour period. After 17 hours rate function
indicates, well start injection. Thus, interesting and complicated results are revealed.
4150
4200
4250
4300
4350
4400
4450
4500
4550
0 20 40 60 80 100 120
Pre
ssu
re, p
si
time, hr
Ecrin
Calc
-400
-300
-200
-100
0
100
200
300
400
500
600
0 20 40 60 80 100 120Flo
w r
ate
, STB
/d
time, hr
q(t)=500-180ln(t)
Sayfa 5 / 18
Constant Rate Analysis
NOWBS NO SKIN
Constant Rate Analysis
This part of the study is intended to analyse the pressure drop and model validation of a system
which produce 500 STB/d constant rate during 100 hours. Three model has been validated in this
part. The calculations fort he graph can be found in the MatLab code and results can be found in the
excel file. Model verification includes
1. A well with No WBS and No Skin
2. A well with C:0.015 bbl/psi WBS and S=2,5
3. A well with C:0.015 bbl/psi WBS, S=2,5 and A fault located 200ft away from the well.
Figure 4: Production rate is 500STB/D during 100 hours test for all 3 cases.
4200
4300
4400
4500
4600
4700
0 50 100
Pre
ssu
re, p
si
time, hr
q=500-180ln(t) for NO WBS and No Skin
EcrinPressureHistory
Calc.PressureHistory
350
400
450
500
550
0 20 40 60 80 100
flo
w r
ate
, STB
/d
time, hr
4200
4300
4400
4500
4600
4700
4800
0 50 100
Pre
ssu
re, p
si
time, hr
q(t)=500-180ln(t) for 0.015 WBS +2,5 Skin
EcrinPressureHistory
Calc.PressureHistory
4200
4300
4400
4500
4600
4700
4800
0 20 40 60 80 100 120
Pre
ssu
re, P
si
time,hr
WBS+2,5Skin, A fault 200ft away
Ecrin Pressure History
Calc.Pressure History
Sayfa 6 / 18
1
10
100
1.000
1,00E-03 1,00E-02 1,00E-01 1,00E+00 1,00E+01 1,00E+02
Pre
ssu
re, p
si
time, hr
Ecrin pD
Ecrin pD'
Calc. pD
Calc. pD'
1. A well with NO WBS and NO Skin
4250
4300
4350
4400
4450
4500
4550
0 20 40 60 80 100 120
Pre
ssu
re,p
si
time, hr
Figure 5: Ecrin pD and pD' shows a good match with the calculated pD and pD'.
Figure 6: Pressure history is some how problematic for all cases especially in the late time region.
Sayfa 7 / 18
2. A well with C:0.015bbl/psi, and S=2,5
1
10
100
1000
1,00E-03 1,00E-02 1,00E-01 1,00E+00 1,00E+01 1,00E+02
Pre
ssu
re, p
si
time, hr
Ecrin dP
Ecrin dP'
Calc. dP
Calc. dP'
4150
4200
4250
4300
4350
4400
4450
4500
4550
0 20 40 60 80 100 120
Pre
ssu
re, p
si
time, hr
Sayfa 8 / 18
3.WBS=0.015, S=2,5 a fault located at 200 ft away.
1
10
100
1000
1,00E-03 1,00E-02 1,00E-01 1,00E+00 1,00E+01 1,00E+02
Pre
ssu
re, p
si
time,hr
Ecrin dP
Ecrin dP'
Calc. dP
Calc dP''
4150
4200
4250
4300
4350
4400
4450
4500
4550
0 20 40 60 80 100 120
Pre
ssu
re, p
si
time, hr
Sayfa 9 / 18
APPENDIX
Excel files and MatLAB codes will be provided by mail. Also, MatLab code can be found as follows.
Code used in Excel File to get inverted PD from laplace domain by using stehfest.
Function fact(n As Double) As Double
fact = 1
For t = 1 To n
fact = fact * t
Next t
End Function
Function v(i As Double, n As Double) As Double
Dim g As Double
Dim k As Double
Dim h As Double
Dim start1 As Integer
Dim finish As Integer
g = 0
k = 0
h = 0
If i > (n / 2) Then
finish = (n / 2)
Else
finish = i
End If
If ((i + 1) Mod 2) = 0 Then
start1 = (i + 1) / 2
Else
start1 = (i / 2)
End If
h = (-1) ^ ((n / 2) + i)
For k = start1 To finish
up = 0
down = 0
up = (k ^ (n / 2)) * fact(2 * k)
Sayfa 10 / 18
down = fact((n / 2) - k) * fact(k) * fact(k - 1) * fact(i - k) * fact((2 * k) - i)
g = g + (up / down)
Next k
v = h * g
End Function
Matlab Script
%% Inputs Pi=4500;
Bo=1.2; h=50;
rw=0.3;
ct=0.00001; viscosity=2.3; porosity=0.18; k=150; qs=500;
skin=2.5; wbs=0.015; cd=5.615*wbs/(2*pi*porosity*ct*h*rw^2);
t=[logspace(-
3,1,100),mylog(10.001,15,100),mylog(15.001,25,1000),mylog(25.001,40,100),my
log(40.001,50,100),mylog(50.001,100,100)]; t=t'; tt=numel(t); a=[1 100 200 1200 1300 1400 1500]; td=(0.000264*k*t)/(porosity*ct*viscosity*rw^2); %dimensionless time rd=[1 2 5 10 20 50 100]; rr=numel(rd); %dimensionless radius pdfws=zeros(tt,rr); pdsth=zeros(tt,rr); pdsths=zeros(tt,rr); dp1=zeros(tt,rr); dp2=zeros(tt,rr); dp3=zeros(tt,rr); dp12=zeros(tt,rr);
dp22=zeros(tt,rr);
q=zeros(tt,1); q(1:a(2))=500; q((a(2)+1):a(3))=300; q((a(3)+1):a(4))=0; q((a(4)+1):a(5))=200; q((a(5)+1):a(6))=600; q((a(6)+1):a(7))=0;
q2=2583.3-180*log(td);
% q1, q2 and qs are flowrate functions % dp1: pressure difference with no wellbore storage & skin in q1 function % dp2: pressure difference with wellbore storage & skin in q1 function % dp3: pressure difference with wellbore storage & skin & 200ft fault in q1
function % dp501: pressure difference with no wellbore storage & skin in 500 stb/day % dp502: pressure difference with wellbore storage & skin in 500 stb/day % dp503: pressure difference with wellbore storage & skin & 200ft fault in
500 stb/day % pdsth: dimensionless pressure function with no wellbore storage & skin % pdsths: dimensionless pressure function with wellbore storage & skin % pdfws: dimensionless pressure function of finite wellbore solution in
time domain with no wellbore storage and skin
Sayfa 11 / 18
% dp12: pressure difference with no wellbore storage & skin in q2 function % dp22: pressure difference with wellbore storage & skin in q2 function
%% Calculation for i=1:rr for j=1:tt if j>=1 && j=a(2)+1 && j=a(3)+1 && j
Sayfa 12 / 18
(Stehfest((td(j)-td(a(2))),(4000/3),8)*(q(a(3))-
q(a(2))))+(pdsths(j,i)*(q(j)-q(a(3))))+(Stehfest((td(j)-
td(a(3))),(4000/3),8)*(q(j)-q(a(3)))));
dp12(j,i)=((141.2*Bo*viscosity)/(k*h))*((Stehfest(td(j),rd(i),8)*q2(a(2)))+
(Stehfest((td(j)-td(a(2))),rd(i),8)*(q2(a(3))-
q2(a(2))))+(pdsth(j,i)*(q2(j)-q2(a(3)))));
dp22(j,i)=((141.2*Bo*viscosity)/(k*h))*((Stehfest2(td(j),rd(i),8)*q2(a(2)))
+(Stehfest2((td(j)-td(a(2))),rd(i),8)*(q2(a(3))-
q2(a(2))))+(pdsths(j,i)*(q2(j)-q2(a(3)))));
dp3f(j,i)=((141.2*Bo*viscosity)/(k*h))*((Stehfest2(td(j),rd(i),8)*q2(a(2)))
+(Stehfest(td(j),(4000/3),8)*q2(a(2)))+(Stehfest2((td(j)-
td(a(2))),rd(i),8)*(q2(a(3))-q2(a(2))))+... (Stehfest((td(j)-td(a(2))),(4000/3),8)*(q2(a(3))-
q2(a(2))))+(pdsths(j,i)*(q2(j)-q2(a(3))))+(Stehfest((td(j)-
td(a(3))),(4000/3),8)*(q2(j)-q2(a(3))))); else if j>=a(4)+1 && j
Sayfa 13 / 18
else if j>=a(5)+1 && j=a(6)+1 && j
Sayfa 14 / 18
dp12(j,i)=((141.2*Bo*viscosity)/(k*h))*((Stehfest(td(j),rd(i),8)*q2(a(2)))+
(Stehfest((td(j)-td(a(2))),rd(i),8)*(q2(a(3))-q2(a(2))))+(Stehfest((td(j)-
td(a(3))),rd(i),8)*(q2(a(4))-q2(a(3))))+... (Stehfest((td(j)-
td(a(4))),rd(i),8)*(q2(a(5))-q2(a(4))))+(Stehfest((td(j)-
td(a(5))),rd(i),8)*(q2(a(6))-q2(a(5))))+(pdsth(j,i)*(q2(j)-q2(a(5)))));
dp22(j,i)=((141.2*Bo*viscosity)/(k*h))*((Stehfest2(td(j),rd(i),8)*q2(a(2)))
+(Stehfest2((td(j)-td(a(2))),rd(i),8)*(q2(a(3))-
q2(a(2))))+(Stehfest2((td(j)-td(a(3))),rd(i),8)*(q2(a(4))-q2(a(3))))+... (Stehfest2((td(j)-
td(a(4))),rd(i),8)*(q2(a(5))-q2(a(4))))+(Stehfest2((td(j)-
td(a(5))),rd(i),8)*(q2(a(6))-q2(a(5))))+(pdsths(j,i)*(q2(j)-q2(a(5)))));
dp3f(j,i)=((141.2*Bo*viscosity)/(k*h))*((Stehfest2(td(j),rd(i),8)*q2(a(2)))
+(Stehfest(td(j),(4000/3),8)*q2(a(2)))+(Stehfest2((td(j)-
td(a(2))),rd(i),8)*(q2(a(3))-q2(a(2))))+... (Stehfest((td(j)-
td(a(2))),(4000/3),8)*(q2(a(3))-q2(a(2))))+(Stehfest2((td(j)-
td(a(3))),rd(i),8)*(q2(a(4))-q2(a(3))))+(Stehfest((td(j)-
td(a(3))),(4000/3),8)*(q2(a(4))-q2(a(3))))+... (Stehfest2((td(j)-
td(a(4))),rd(i),8)*(q2(a(5))-q2(a(4))))+(Stehfest((td(j)-
td(a(4))),(4000/3),8)*(q2(a(5))-q2(a(4))))+(Stehfest2((td(j)-
td(a(5))),rd(i),8)*(q2(a(6))-q2(a(5))))+... (Stehfest((td(j)-
td(a(5))),(4000/3),8)*(q2(a(6))-q2(a(5))))+(pdsths(j,i)*(q2(j)-
q2(a(6))))+(Stehfest((td(j)-td(a(6))),(4000/3),8)*(q2(j)-q2(a(6)))));
dp1(j,i)=((141.2*Bo*viscosity)/(k*h))*((Stehfest(td(j),rd(i),8)*q(a(5)))+(S
tehfest((td(j)-td(a(6))),rd(i),8)*-q(a(5))));
dp2(j,i)=((141.2*Bo*viscosity)/(k*h))*((Stehfest2(td(j),rd(i),8)*q(a(5)))+(
Stehfest2((td(j)-td(a(6))),rd(i),8)*-q(a(5))));
dp3(j,i)=((141.2*Bo*viscosity)/(k*h))*((Stehfest2(td(j),rd(i),8)*q(a(5)))+(
Stehfest(td(j),(4000/3),8)*q(a(5)))+(Stehfest2((td(j)-td(a(6))),rd(i),8)*-
q(a(5)))+... (Stehfest((td(j)-
td(a(6))),(4000/3),8)*-q(a(5)))); end end end end end end end end
for i=1:rr for j=1:tt
dp501(j,i)=((141.2*Bo*viscosity)/(k*h))*(Stehfest(td(j),rd(i),8)*qs);
dp502(j,i)=((141.2*Bo*viscosity)/(k*h))*(Stehfest2(td(j),rd(i),8)*qs);
dp503(j,i)=((141.2*Bo*viscosity)/(k*h))*(Stehfest2(td(j),rd(i),8)*qs+Stehfe
st(td(j),(4000/3),8)*qs); end end
Sayfa 15 / 18
dp1=Pi-dp1; dp2=Pi-dp2; dp3=Pi-dp3; dp12=Pi-dp12; dp22=Pi-dp22; dp3f=Pi-
dp3f; dp501=Pi-dp501; dp502=Pi-dp502; dp503=Pi-dp503;
%% Plots f1=plot(t,dp1(:,1)); f2=plot(t,dp2(:,1)); f3=plot(t,dp3(:,1)); f4=plot(t,dp501(:,1)); f5=plot(t,dp502(:,1)); f6=plot(t,dp503(:,1)); f7=plot(t,dp12(:,1)); f8=plot(t,dp22(:,1)); f9=plot(t,dp3f(:,1));
% DP501, DP502 & DP503 are delta pressures for 2nd buildup section for
functions dp501, dp502 & dp503 % DDP501, DDP502 & DDP503 are differential delta pressures for 2nd buildup
section for functions dp501, dp502 & dp503 % DP1, DP2 & DP3 are delta pressures for 2nd buildup section for functions
dp1, dp2 & dp3 % DDP1, DDP2 & DDP3 are differential delta pressures for 2nd buildup
section for functions dp1, dp2 & dp3 % DP31 & DP32 are delta pressures for 1st buildup section for functions dp1
& dp2 % DDP31 & DDP32 are differential delta pressures for 1st buildup section
for functions dp1 & dp2
%% Delta Pressure and Pressure Derivative for Drawdown of 500 stb/day
constant production for u=1:tt DP501(u)=Pi-dp501(u); DP502(u)=Pi-dp502(u); DP503(u)=Pi-dp503(u); dt(u)=t(u); end
for u=2:tt-1 DDP501(u-1)=(DP501(u+1)-DP501(u-1))/(log(t(u+1)/t(u-1))); DDP502(u-1)=(DP502(u+1)-DP502(u-1))/(log(t(u+1)/t(u-1))); DDP503(u-1)=(DP503(u+1)-DP503(u-1))/(log(t(u+1)/t(u-1))); end
%% Delta Pressure and Pressure Derivative for Buildup#1 and Buildup#2 m=0; for i=a(6):a(7) m=m+1; DP1(m)=dp1(i)-dp1(a(6)); DP2(m)=dp2(i)-dp2(a(6)); DP3(m)=dp3(i)-dp3(a(6)); dte(m)=t(i)-t(a(6)); end
for m=2:(a(7)-a(6)) DDP1(m-1)=(DP1(m+1)-DP1(m-1))/(log(dte(m+1)/dte(m-1))); DDP2(m-1)=(DP2(m+1)-DP2(m-1))/(log(dte(m+1)/dte(m-1))); DDP3(m-1)=(DP3(m+1)-DP3(m-1))/(log(dte(m+1)/dte(m-1))); end
ss=0;
Sayfa 16 / 18
for i=a(3):a(4) ss=ss+1; DP31(ss)=dp1(i)-dp1(a(3)); DP32(ss)=dp2(i)-dp2(a(3)); DP33(ss)=dp3(i)-dp3(a(3)); dte3(ss)=t(i)-t(a(3)); end
for ss=2:(a(4)-a(3)) DDP31(ss-1)=(DP31(ss+1)-DP31(ss-1))/(log(dte3(ss+1)/dte3(ss-1))); DDP32(ss-1)=(DP32(ss+1)-DP32(ss-1))/(log(dte3(ss+1)/dte3(ss-1))); DDP33(ss-1)=(DP33(ss+1)-DP33(ss-1))/(log(dte3(ss+1)/dte3(ss-1))); end
dte(1)=[]; dte(end)=[]; dte3(1)=[]; dte3(end)=[]; DP1(1)=[]; DP1(end)=[];
DP2(1)=[]; DP2(end)=[]; DP3(1)=[]; DP3(end)=[]; DP31(1)=[]; DP31(end)=[]; DP32(1)=[]; DP32(end)=[]; DP33(1)=[]; DP33(end)=[]; DP501(1)=[];
DP501(end)=[]; DP502(1)=[]; DP502(end)=[]; DP503(1)=[]; DP503(end)=[];
dt(1)=[]; dt(end)=[];
figure=loglog(dte,DP1,dte,DDP1); figure=loglog(dte,DP2,dte,DDP2); figure=loglog(dte,DP3,dte,DDP3); figure=loglog(dte3,DP31,dte3,DDP31); figure=loglog(dte3,DP32,dte3,DDP32); figure=loglog(dte3,DP33,dte3,DDP33); figure=loglog(dt,DP501,dt,DDP501); figure=loglog(dt,DP502,dt,DDP502); figure=loglog(dt,DP503,dt,DDP503);
% Comparison of PDSTH (Stehfest Inversion Algorithm) and PDFWS (Finite
wellbore solution in time domain) % for i=1:rr % for j=1:tt % pdfws(j,i)=(2/pi)*integral(@(u)
(((bessely(0,rd(i)*u).*besselj(1,u)-
besselj(0,rd(i)*u).*bessely(1,u))/(besselj(1,u).^2+bessely(1,u).^2))*((1-
exp(-td(j)*u.^2))/u.^2)),0,10^3,'ArrayValued',true); % pdsth(j,i)=Stehfest(td(j),rd(i),8); % end % end
Stehfest2 Function.
function [InverseLT]=Stehfest2(t,rd,L) a=L/2; b=a+1; fh=@pdlss;
for n=1:L z=0.0; for k=floor((n+1)/2):min(n,a) z=z+((k^a)*factorial(2*k))/ ... (factorial(a-k)*factorial(k)*factorial(k-1)* ... factorial(n-k)*factorial(2*k-n)); end v(n)=(-1)^(n+a)*z; end
Sayfa 17 / 18
sum=0.0; ln2ot=log(2.0)/t;
for n=1:L p=n*ln2ot; sum=sum+v(n)*fh(p,rd); end
InverseLT=sum*ln2ot;
Stehfest Function function [InverseLT]=Stehfest(t,rd,L) a=L/2; b=a+1; fh=@pdls;
for n=1:L z=0.0; for k=floor((n+1)/2):min(n,a) z=z+((k^a)*factorial(2*k))/ ... (factorial(a-k)*factorial(k)*factorial(k-1)* ... factorial(n-k)*factorial(2*k-n)); end v(n)=(-1)^(n+a)*z; end
sum=0.0; ln2ot=log(2.0)/t;
for n=1:L p=n*ln2ot; sum=sum+v(n)*fh(p,rd); end
InverseLT=sum*ln2ot;
pdls function
function f=pdls(s,rd) f=(besselk(0,rd*sqrt(s))/((s^1.5)*besselk(1,sqrt(s))));
end
pdlss function
function f=pdlss(s,rd) skin=2.5; cd=1654.9; %
f=1/(s*(s*cd+(1/(skin+(besselk(0,rd*sqrt(s))/(sqrt(s)*besselk(1,sqrt(s)))))
))); f=(1/s)*((skin+s*(besselk(0,rd*sqrt(s))/((s^1.5)*besselk(1,sqrt(s)))))/(1+s
*cd*(skin+s*(besselk(0,rd*sqrt(s))/((s^1.5)*besselk(1,sqrt(s)))))));
end
Sayfa 18 / 18
mylog function
function y = mylog(d1, d2, n)
if nargin == 2 n = 50; end
if d2 == pi || d2 == single(pi) d2 = log10(d2); end
y = 10.^ linspace(log10(d1), log10(d2), n);
end