Files
3D_EDFM_SIM-X/plotWellResponse.asv
T
2026-03-13 11:24:41 +08:00

55 lines
1.2 KiB
Plaintext

function [] = plotWellResponse(Times,Wellpara)
% 输入
wellNumber = 1; % 井号
dataType = 'GPR'; % 类型,产气速度 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
end
if strcmp(dataType, 'OPR')
for i = 1 : n
data(i) = Wellpara{i}{1,nw}.qo;
figureYlegend = 'Oil production rate, m^3/d';
end
end
if strcmp(dataType, 'WPR')
for i = 1 : n
data(i) = Wellpara{i}{1,nw}.qw;
figureYlegend = 'Water production rate, m^3/d';
end
end
if strcmp(dataType, 'BHP')
for i = 1 : n
data(i) = Wellpara{i}{1,nw}.pwf;
figureYlegend = 'BHP, MPa';
end
end
if strcmp(dataType, 'dPWF') % dpwf/dlnt = t*dpwf/dt
for i = 1 : n
if i == 1
data(i) = Wellpara{i}{1,nw}.pwf;
elseif i == n
data(i) = Wellpara{i}{1,nw}.pwf;
else
data(i) = Wellpara{i}{1,nw}.pwf;
end
figureYlegend = 'Pressure derivative, MPa';
end
end
plot(t,data,'k^-')
hold off
% ylim([0,200]);
xlabel('Time, day');
% ylabel('water cut');
ylabel('Gas production rate, m^3/d');
end