Files
2026-03-13 11:24:41 +08:00

130 lines
3.6 KiB
Matlab

n=size(Times,1);
t = Times;
% para = cell2mat(Wellpara);
total_oil=sum(r.V.*r.pori)*0.85/1.056;
total_water=sum(r.V.*r.pori)*0.15/1.056;
nw=1;%选井号
% n = length(para);
Qo = zeros(n,1);
Qw = zeros(n,1);
% Qg = zeros(n,1);
water_content = zeros(n,1);
Pwf = zeros(n,1);
accumu_quan_oil = 0;
% 累计采出量
accumu_oil = zeros(n,1);
% 采出程度
proportion_oil = zeros(n,1);
% 平均地层压力
average_pressure = zeros(n,1);
for i = 1 : n
Qo(i) = Wellpara{i}{1,nw}.qo;
Qw(i) = Wellpara{i}{1,nw}.qw;
water_content(i) = Qw(i)/(Qo(i)+Qw(i));
Pwf(i) = Wellpara{i}{1,nw}.pwf;
if i==1
one_time_oil=Times(i)*Qo(i);
one_time_water=Times(i)*Qw(i);
accumu_oil(i)=one_time_oil;
accumu_water(i)=one_time_water;
else
one_time_oil=(Times(i)-Times(i-1))*Qo(i);
accumu_oil(i)=accumu_oil(i-1)+one_time_oil;
one_time_water=(Times(i)-Times(i-1))*Qw(i);
accumu_water(i)=accumu_water(i-1)+one_time_water;
end
proportion_oil(i)=accumu_oil(i)/total_oil;
proportion_water(i)=accumu_water(i)/total_water;
average_pressure(i)=mean(OutputRs{i,1}.p(1:r.nmc));
end
%% 绘制前处理
t=t/1;
%% 绘制日产油量和累积产油量
% color('w');
figure('color','w')
% figure(1)
[AX,H1,H2]=plotyy(t,Qo,t,accumu_oil);
% [AX,H1,H2] = plotyy(24,0,0,0,'plot');
set(AX(1),'XColor','k','YColor','b');
set(AX(2),'XColor','k','YColor','r');
set(get(AX(1),'Ylabel'),'String','日产油量/m^3')
set(get(AX(2),'Ylabel'),'String','累积产油量/m^3')
set(H1,'LineStyle','-');
set(H1,'Marker','o');set(H1,'MarkerSize',4);
set(H1,'color','b');
set(H2,'LineStyle','-');
set(H2,'Marker','^');set(H2,'MarkerSize',4);
set(H2,'color','r');
legend([H1,H2],{'日产油量';'累积产油量'},'Location','Best');
set(AX(1),'ylim',[0 500])
% set(AX(2),'ylim',[0 600])
% set(AX(1),'ytick',50:50:250)
% set(AX(2),'ytick',0:100:600)
% set(AX,'xlim',[0 30])
% set(AX,'xtick',0:5:30)
% grid on
xlabel('生产时间/年')
% title('日产油量和累积产油量');
%% 绘制日产水量和累积产水量
% color('w');
figure('color','w')
% figure(1)
[AX,H1,H2]=plotyy(t,Qw,t,accumu_water);
% [AX,H1,H2] = plotyy(24,0,0,0,'plot');
set(AX(1),'XColor','k','YColor','b');
set(AX(2),'XColor','k','YColor','r');
set(get(AX(1),'Ylabel'),'String','日产水量/m^3')
set(get(AX(2),'Ylabel'),'String','累积产水量/m^3')
set(H1,'LineStyle','-');
set(H1,'Marker','o');set(H1,'MarkerSize',4);
set(H1,'color','b');
set(H2,'LineStyle','-');
set(H2,'Marker','^');set(H2,'MarkerSize',4);
set(H2,'color','r');
legend([H1,H2],{'日产水量';'累积产水量'},'Location','Best');
% set(AX(1),'ylim',[50 250])
% set(AX(2),'ylim',[0 600])
% set(AX(1),'ytick',50:50:250)
% set(AX(2),'ytick',0:100:600)
% set(AX,'xlim',[0 30])
% set(AX,'xtick',0:5:30)
% grid on
xlabel('生产时间/年')
% title('日产水量和累积产水量');
%% 绘制平均地层压力和采出程度
% color('w');
figure('color','w')
% figure(1)
[AX,H1,H2]=plotyy(t,average_pressure,t,proportion_oil*100);
% [AX,H1,H2] = plotyy(24,0,0,0,'plot');
set(AX(1),'XColor','k','YColor','b');
set(AX(2),'XColor','k','YColor','r');
set(get(AX(1),'Ylabel'),'String','平均地层压力/MPa')
set(get(AX(2),'Ylabel'),'String','采出程度/%')
set(H1,'LineStyle','-');
set(H1,'Marker','o');set(H1,'MarkerSize',4);
set(H1,'color','b');
set(H2,'LineStyle','-');
set(H2,'Marker','^');set(H2,'MarkerSize',4);
set(H2,'color','r');
legend([H1,H2],{'平均地层压力';'采出程度'},'Location','Best');
% set(AX(1),'ylim',[50 250])
% set(AX(2),'ylim',[0 600])
% set(AX(1),'ytick',50:50:250)
% set(AX(2),'ytick',0:100:600)
% set(AX,'xlim',[0 30])
% set(AX,'xtick',0:5:30)
% grid on
xlabel('生产时间/天')
% title('日产油量和累积产油量');
%% 绘制含水率
figure('color','w')
plot(t,water_content);
set(get(gca,'Xlabel'),'String','生产时间/天')
xlabel('生产时间/天')
ylabel('含水率')
% hold on
% plot(ECLIPSE(:,1),ECLIPSE(:,2),'B');