init
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
function [] = plotWellResponse(Times,Wellpara)
|
||||
% 输入
|
||||
wellNumber = 1; % 井号
|
||||
dataType = 'OPR'; % 类型,产气速度 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
|
||||
Reference in New Issue
Block a user