This commit is contained in:
xinxiao
2026-03-13 11:24:41 +08:00
commit 04e2bb29c7
238 changed files with 29102 additions and 0 deletions
+55
View File
@@ -0,0 +1,55 @@
function [] = plotWellResponse(Times,Wellpara)
%
wellNumber = 1; %
dataType = 'dPWF'; % GPR OPR, WPR BHP dPWF
%
t = Times;
n= size(Times,1);
% para = cell2mat(Wellpara);
nw = wellNumber;%
% n = length(para);
data = zeros(n,1);
if strcmp(dataType, 'GPR')
for i = 1 : n
data(i) = Wellpara{i}{1,nw}.qg;
figureYlegend = 'Gas production rate, m^3/d';
end
plot(t,data,'k^-');hold off; xlabel('Time, day');ylabel(figureYlegend);
end
if strcmp(dataType, 'OPR')
for i = 1 : n
data(i) = Wellpara{i}{1,nw}.qo;
figureYlegend = 'Oil production rate, m^3/d';
end
plot(t,data,'k^-');hold off; xlabel('Time, day');ylabel(figureYlegend);
end
if strcmp(dataType, 'WPR')
for i = 1 : n
data(i) = Wellpara{i}{1,nw}.qw;
figureYlegend = 'Water production rate, m^3/d';
end
plot(t,data,'k^-');hold off; xlabel('Time, day');ylabel(figureYlegend);
end
if strcmp(dataType, 'BHP')
for i = 1 : n
data(i) = Wellpara{i}{1,nw}.pwf;
figureYlegend = 'BHP, MPa';
end
plot(t,data,'k^-');hold off; xlabel('Time, day');ylabel(figureYlegend);
end
if strcmp(dataType, 'dPWF') % dpwf/dlnt = t*dpwf/dt
for i = 1 : n
if i == 1
data(i) = (Wellpara{i+1}{1,nw}.pwf-Wellpara{i}{1,nw}.pwf)/(log(t(i+1))-log(t(i)));
elseif i == n
data(i) = (Wellpara{i}{1,nw}.pwf-Wellpara{i-1}{1,nw}.pwf)/(log(t(i))-log(t(i-1)));
else
data(i) = (Wellpara{i+1}{1,nw}.pwf-Wellpara{i-1}{1,nw}.pwf)/(log(t(i+1))-log(t(i-1)));
end
figureYlegend = 'Pressure derivative, MPa';
end
plot(t,data,'k^-');hold off; xlabel('Time, day');ylabel(figureYlegend);
set(gca, 'XScale', 'log');
set(gca, 'YScale', 'log');
end
end