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
@@ -0,0 +1,343 @@
function [ r, Times, OutputRs, Wellpara, trun ] = data_standard( )
tic;
%%
% 1--2014, Monifar 2--2018, steady, Rao 3--2018, transient, Rao
% 4-- PEDFM, Tene, Jiang, Younis
modelflag=1;
%
%%
% dx=[10*ones(1,100) ];nx=size(dx,2);
% dy=[10*ones(1,50) ];ny=size(dy,2);
% dz=[10*ones(1,4)];nz=size(dz,2);
% dx=[10*ones(1,50) ];nx=size(dx,2);
% dy=[10*ones(1,30) ];ny=size(dy,2);
% dz=[10*ones(1,3)];nz=size(dz,2);
dx=[10*ones(1,100) ];nx=size(dx,2);
dy=[10*ones(1,50) ];ny=size(dy,2);
dz=[10*ones(1,1)];nz=size(dz,2);
%%
% 12
input_style=2;
if input_style==1
% ======================================================== %
%
%5
%
%
f=[
0,1200,0;10,-20,0;0,0,10;0,60,0;0,3,0;
0,1200,0;10,20,0;0,0,10;0,15,0;0,3,0;
150,1500,0;20,-10,0;0,0,10;0,20,0;0,3,0;
550,1300,0;10,10,0;0,0,10;0,10,0;0,3,0;
650,1400,0;10,-20,0;0,0,10;0,55,0;0,3,0;
605,705,0;10,0,0;0,0,10;-20,20,0;0,3,0;
% 385,485,2;5,0,0;0,0,1;-6,12,0;0,24,0;
% 385,365,2;5,0,0;0,0,1;-12,20,0;0,24,0;
% 385,245,2;5,0,0;0,0,1;-10,20,0;0,24,0;
% 385,925,2;5,0,0;0,0,1;-9,18,0;0,20,0;
% 385,805,2;5,0,0;0,0,1;-8,14,0;0,20,0;
% 385,685,2;5,0,0;0,0,1;-12,20,0;0,24,0;
% 385,565,2;5,0,0;0,0,1;-10,20,0;0,22,0;
% 385,445,2;5,0,0;0,0,1;-6,12,0;0,24,0;
% 955,1305,5;5,0,0;0,0,1;-5,4,0;0,15,0;
% 955,1225,5;5,0,0;0,0,1;-7,5,0;0,15,0;
% 955,1145,5;5,0,0;0,0,1;-9,6,0;0,15,0;
% 955,1065,5;5,0,0;0,0,1;-7,6,0;0,15,0;
% 955,985,5;5,0,0;0,0,1;-6,4,0;0,15,0;
% 955,755,5;5,0,0;0,0,1;-5,4,0;0,15,0;
% 955,675,5;5,0,0;0,0,1;-8,6,0;0,15,0;
% 955,595,5;5,0,0;0,0,1;-8,6,0;0,15,0;
% 955,515,5;5,0,0;0,0,1;-10,7,0;0,15,0;
% 955,435,5;5,0,0;0,0,1;-7,6,0;0,15,0;
% 955,355,5;5,0,0;0,0,1;-9,6,0;0,15,0;
% 1635,1245,5;5,0,0;0,0,1;-10,2,0;0,20,0;
% 1635,1165,5;5,0,0;0,0,1;-16,3,0;0,20,0;
% 1635,1085,5;5,0,0;0,0,1;-15,3,0;0,20,0;
% 1635,1005,5;5,0,0;0,0,1;-12,2,0;0,20,0;
% 1635,925,5;5,0,0;0,0,1;-10,2,0;0,20,0;
% 1635,695,5;5,0,0;0,0,1;-10,2,0;0,20,0;
% 1635,615,5;5,0,0;0,0,1;-12,2,0;0,20,0;
];
%
% fellip=[320,210,10;10,2,0;0,0,2;0,0,8;0,0,5;
% 280,300,10;10,2,0;0,0,2;0,0,10;0,0,4;];
% 300,205,10;10,0,0;0,0,2;0,0,10;0,0,5];
fellip=[];
else
% ======================================================== %
%
% 123456127
input_content={
[255,255,5],90,90,0,200,10,1;
[305,255,5],90,90,0,200,10,1;
[355,255,5],90,90,0,200,10,1;
[405,255,5],90,90,0,200,10,1;
[455,255,5],90,90,0,200,10,1;
[505,255,5],90,90,0,200,10,1;
[555,255,5],90,90,0,200,10,1;
[605,255,5],90,90,0,200,10,1;
[655,255,5],90,90,0,200,10,1;
[705,255,5],90,90,0,200,10,1;
[755,255,5],90,90,0,200,10,1;
};
[f,fellip]=sort_fracture(input_content);
end
% ======================================================== %
m=size(f,1);
n=size(fellip,1);
nf=(m+n)/5;%
%%
% =========================================================== %
% kx = 0.1*1e-3 * ones(nx*ny*nz, 1);%x方向矩阵
% ky =0.1*1e-3 * ones(nx*ny*nz, 1);%y方向
% kz = 0.1*1e-3 * ones(nx*ny*nz, 1);%y方向
pori = 0.3 * ones(nx*ny*nz, 1);%
prpor = 16;%
cpor = 1.07e-4;%
NTG= 1 * ones(nx*ny*nz, 1);
% SRV区域定义
base_x=23:78; nx_SRV=length(base_x);
base_y=15:36; ny_SRV=length(base_y);
base_z=1:1;nz_SRV=length(base_z);
SRV=[];
for k=1:nz_SRV
for j=1:ny_SRV
for i=1:nx_SRV
SRV=[SRV;(base_z(k)-1)*nx*ny+(base_y(j)-1)*nx+base_x(i)];
end
end
end
% SRV渗透率赋值
kx = 0.1*1e-3 * ones(nx*ny*nz, 1);%x方向矩阵
ky =0.1*1e-3 * ones(nx*ny*nz, 1);%y方向
kz = 0.1*1e-3 * ones(nx*ny*nz, 1);%y方向
% SRV渗透率赋值
kx(SRV)=2*1e-3 * ones(length(SRV), 1);
ky(SRV)=2*1e-3 * ones(length(SRV), 1);
kz(SRV)=2*1e-3 * ones(length(SRV), 1);
% load ('NTG.mat');
% NTG=sort_input(NTG,nx,ny,nz);
% =========================================================== %
Kf = 20000*1e-3*ones(1,nf);%
% Kf = [0*1e-3*ones(1,5) 10000*1e-3*ones(1,1);];%
Wf =1e-2*ones(1,nf);%
Porf = 0.30*ones(1,nf);%
prporf = 20;%
cporf = 1.07e-4;%
Rpt = 2;%flag
cf = 1;
ca = 1;
% co = 3.02e-3;
%%
% ======================================================== %
Dosi=820; %Dosi是地面标况下测得的油相密度/
Dwsi=1000; %Dwsi是地面标况下测得的水相密度
% ===================================================== %
pb = 20.0;%
Bopb = 1.0;%pb对应的原油体积系数
co = 3.02e-3;%
prw = 20.0;%
Bwi = 1.00001;%
cw = 5e-4;%
prg = 25.0;%
% ======================================================== %
visopb = 2;%pb对应的原有粘度
cvo = 0;%
vwi =0.6;%
cvw = 0;%
% ==================线====================================== %
% ======================================================== %
RPOW=[
0 0 0.8 0
0.15 0 0.8 0
0.45 0.04 0.4 0
0.5212 0.08 0.227 0
0.5425 0.103 0.184 0
0.5638 0.125 0.156 0
0.5851 0.145 0.125 0
0.6064 0.174 0.094 0
0.6276 0.207 0.063 0
0.6489 0.247 0.046 0
0.6701 0.292 0.031 0
0.6914 0.335 0.021 0
0.7127 0.378 0.011 0
0.76 0.475 0.005 0
0.85 0.552 0 0
1 0.552 0 0
];
SW=RPOW(:,1);KRW=RPOW(:,2);KRO=RPOW(:,3);PCOW=RPOW(:,4);
% ======================================================== %
% 线
if Rpt ~= 1%
PRF=[
0 0 0.8 0
0.15 0 0.8 0
0.85 0.6 0 0
1 0.6 0 0
];
SWF = PRF(:,1);KRWF = PRF(:,2);KROF = PRF(:,3);PCOWF=PRF(:,4);
end
% ======================================================== %
ifpcow = 0;%00
%%
r = GridProp(modelflag, nx, ny, nz, dx, dy, dz, kx, ky, kz, f, fellip, Kf, Wf, pori, prpor, cpor, Porf, prporf, cporf, cf, ca,co, NTG);
%%
os = OperatorRS(r.N, r.nex, r.nc);
%%
f = fluidPVT(Bopb, pb, co, Bwi, prw, cw, vwi, cvw, visopb, cvo, SW, KRO, KRW, PCOW, ifpcow, SWF, KROF, KRWF, PCOWF, r.rpt,Dosi,Dwsi);
%% Initial Condition Section
% ======================================================== %
%
P = [20 * ones(r.nmc, 1); 20 * ones(r.nfc, 1)];
% plow=25; % P =plow-1e-6*800*9.8*r.z;
Sw = [0.15 * ones(r.nmc, 1); 0.15 * ones(r.nfc, 1)];
state0 = initialRS(P, Sw);
%% schedule
%
% Wellcpara: welltype(1) nperf(2) index(3) rw(4) protype(5) value(6)
% constraints(7) skin(8) welltype2(9)
% welltype = 1 prod, welltype = 2 inj
% protype = 1 const flowrate, protype = 2 const pwf
% welltype2=1 welltype2=2 沿x方向welltype2=3 沿y方向 welltype2=4
%
%
%eclipse一致的方式
%px,py,pz确定x方向y方向的网格编号z反方向上的网格编号
well1={
% 2, 3, [10 20 1;10 20 2;10 20 3], 0.178/2, 2, 35 , 35, 0, 1;
% 2, 3, [67 20 1;67 20 2;67 20 3], 0.178/2, 2, 35 , 35, 0, 1;
% 2, 3, [130 20 1;130 20 2;130 20 3], 0.178/2, 2, 35 , 35, 0, 1;
% 2, 3, [196 20 1;196 20 2;196 20 3], 0.178/2, 2, 35 , 35, 0, 1;
% 2, 3, [10 148 1;10 148 2;10 148 3], 0.178/2, 2, 35 , 35, 0, 1;
% 2, 3, [67 148 1;67 148 2;67 148 3], 0.178/2, 2, 35 , 35, 0, 1;
% 2, 3, [130 148 1;130 148 2;130 148 3], 0.178/2, 2, 35 , 35, 0, 1;
% 2, 3, [196 148 1;196 148 2;196 148 3], 0.178/2, 2, 35 , 35, 0, 1;
};
%
n1=size(well1,1);
for i=1:n1
perf=well1{i,3};
nperf=well1{i,2};
perf(:,3)=(r.nz+1)*ones(nperf,1)-perf(:,3);
A=repmat([0 1 1],nperf,1);
B=(perf-A)*[1;r.nx;r.nx*r.ny];
B=B'; %
well1{i,3}=B;
end
% %
welloc1=[
[255,255,5];
[305,255,5];
[355,255,5];
[405,255,5];
[455,255,5];
[505,255,5];
[555,255,5];
[605,255,5];
[655,255,5];
[705,255,5];
[755,255,5];
% [205,255,15];
% [405,255,21];
% [605,255,21];
% [805,255,31];
% 385,805,15;
% 385,685,15;
% 385,565,15;
% 385,445,15;
];
% welloc2=[955,1305,15;
% 955,1225,15;
% 955,1145,15;
% 955,1065,15;
% 955,985,15;
% 955,755,15;
% 955,675,15;
% 955,595,15;
% 955,515,15;
% 955,435,15;
% 955,355,15;];
% welloc3=[1635,1245,15;
% 1635,1165,15;
% 1635,1085,15;
% 1635,1005,15;
% 1635,925,15;
% 1635,695,15;
% 1635,615,15;
% ];
perfnum1 = findWelloc(r, welloc1);%Wellc0之中
% perfnum2 = findWelloc(r, welloc2);
% perfnum3 = findWelloc(r, welloc3);
well2={
1, length(perfnum1), perfnum1, 0.178/2, 2,10, 10, 0,4;
% 1, length(perfnum2), perfnum2, 0.178/2, 2,8, 8, 0,4;
% 1, length(perfnum3), perfnum3, 0.178/2, 2,8, 8, 0,4;
};
% well2={};
% well2={1, length(perfnum), perfnum, 0.1, 2,10, 10, 0,4;
% };
% 2, 1, [ 5030 ], 0.3/0.318, 1,0.05, 30, 0,4
%
nwell1=size(well1,1);
nwell2=size(well2,1);
nwell=nwell1+nwell2;
Wellc0=cell(nwell,9);
if nwell1==0
Wellc0=well2;
elseif nwell2==0
Wellc0=well1;
else
for i=1:nwell1
for j=1:9
Wellc0{i,j}=well1{i,j};
end
end
for i=1:nwell2
for j=1:9
Wellc0{i+nwell1,j}=well2{i,j};
end
end
end
yitap = 5; % 50-500psi
yitas = 0.04; % 0.05-0.5
omega = 0.5; % 0-1
Nmax = 50;
epsave = 1e-6;
epsmax = 1e-6;
dtmin = 0.001;
dtmax =20;
tend = 500;
nwel = size(Wellc0, 1);
WelChg = zeros(nwel, 1);%
Wellc = calcTrans(r, Wellc0);
w.yitap = yitap;
w.yitas = yitas;
w.omega = omega;
w.Nmax = Nmax;
w.epsave = epsave;
w.epsmax = epsmax;
w.epsave = epsave;
w.epsmax = epsmax;
w.dtmin = dtmin;
w.dtmax = dtmax;
w.tend = tend;
w.WelChg = WelChg;
w.Wellc = Wellc;
%%
if modelflag==1 || modelflag==4
[Times, OutputRs, Wellpara, trun] = mainRS_MB_2014(r, f, os, w, state0);
else
[Times, OutputRs, Wellpara, trun] = mainRS_MB_modified(r, f, os, w, state0);
end
% [Times, OutputRs, Wellpara, trun] = mainRS_MB_modified(r, f, os, w, state0);
run_time=toc;
trun.run_time=run_time;
end
+144
View File
@@ -0,0 +1,144 @@
function plotDis(i, r,OutputRs, type)
%便
figure('color','w')
[ downgrid, frontgrid ,leftgrid, rightgrid, backgrid, upgrid ] = preplot_dis( r );
coordinate=r.coordinates;
nodes=r.nodes;
% nmc = size(nodes,1);%
% % nel = size(nodes,2);%
% order=[1,2,4,3,1,5,6,8,7,3,4,8,6,2,1];%fill函数作图
% nel=size(order,2);
if type == 1
v = OutputRs{i}.p;
elseif type == 2
v = 1-OutputRs{i}.sw;%
elseif type == 3
v = OutputRs{i}.sg;%
else
v = OutputRs{i}.sw;%
end
%
order=[1,2,4,3,1];
nel=size(order,2);
nmc=size(downgrid,2);
dis = zeros(nel, nmc);
x = zeros(nel, nmc);
y = zeros(nel, nmc);
z = zeros(nel, nmc);
for i = 1 : nmc
for j = 1 : nel
x(j, i) = coordinate(nodes(downgrid(i),order(j)), 1);
y(j, i) = coordinate(nodes(downgrid(i),order(j)), 2);
z(j, i) = coordinate(nodes(downgrid(i),order(j)), 3)-max(coordinate(:,3))-2000;
dis(j, i) = v(downgrid(i));
end
end
fill3(x,y,z,dis,'edgeColor','interp');
hold on
%
order=[1,5,7,3,1];
nel=size(order,2);
nmc=size(leftgrid,2);
dis = zeros(nel, nmc);
x = zeros(nel, nmc);
y = zeros(nel, nmc);
z = zeros(nel, nmc);
for i = 1 : nmc
for j = 1 : nel
x(j, i) = coordinate(nodes(leftgrid(i),order(j)), 1);
y(j, i) = coordinate(nodes(leftgrid(i),order(j)), 2);
z(j, i) = coordinate(nodes(leftgrid(i),order(j)), 3)-max(coordinate(:,3))-2000;
dis(j, i) = v(leftgrid(i));
end
end
fill3(x,y,z,dis,'edgeColor','interp');
%
order=[2,4,8,6,2];
nel=size(order,2);
nmc=size(rightgrid,2);
dis = zeros(nel, nmc);
x = zeros(nel, nmc);
y = zeros(nel, nmc);
z = zeros(nel, nmc);
for i = 1 : nmc
for j = 1 : nel
x(j, i) = coordinate(nodes(rightgrid(i),order(j)), 1);
y(j, i) = coordinate(nodes(rightgrid(i),order(j)), 2);
z(j, i) = coordinate(nodes(rightgrid(i),order(j)), 3)-max(coordinate(:,3))-2000;
dis(j, i) = v(rightgrid(i));
end
end
fill3(x,y,z,dis,'edgeColor','interp');
%
order=[1,2,6,5,1];
nel=size(order,2);
nmc=size(frontgrid,2);
dis = zeros(nel, nmc);
x = zeros(nel, nmc);
y = zeros(nel, nmc);
z = zeros(nel, nmc);
for i = 1 : nmc
for j = 1 : nel
x(j, i) = coordinate(nodes(frontgrid(i),order(j)), 1);
y(j, i) = coordinate(nodes(frontgrid(i),order(j)), 2);
z(j, i) = coordinate(nodes(frontgrid(i),order(j)), 3)-max(coordinate(:,3))-2000;
dis(j, i) = v(frontgrid(i));
end
end
fill3(x,y,z,dis,'edgeColor','interp');
%
order=[3,4,8,7,3];
nel=size(order,2);
nmc=size(backgrid,2);
dis = zeros(nel, nmc);
x = zeros(nel, nmc);
y = zeros(nel, nmc);
z = zeros(nel, nmc);
for i = 1 : nmc
for j = 1 : nel
x(j, i) = coordinate(nodes(backgrid(i),order(j)), 1);
y(j, i) = coordinate(nodes(backgrid(i),order(j)), 2);
z(j, i) = coordinate(nodes(backgrid(i),order(j)), 3)-max(coordinate(:,3))-2000;
dis(j, i) = v(backgrid(i));
end
end
fill3(x,y,z,dis,'edgeColor','interp');
%
order=[5,6,8,7,5];
nel=size(order,2);
nmc=size(upgrid,2);
dis = zeros(nel, nmc);
x = zeros(nel, nmc);
y = zeros(nel, nmc);
z = zeros(nel, nmc);
for i = 1 : nmc
for j = 1 : nel
x(j, i) = coordinate(nodes(upgrid(i),order(j)), 1);
y(j, i) = coordinate(nodes(upgrid(i),order(j)), 2);
z(j, i) = coordinate(nodes(upgrid(i),order(j)), 3)-max(coordinate(:,3))-2000;
dis(j, i) = v(upgrid(i));
end
end
fill3(x,y,z,dis,'edgeColor','interp');
set(gca,'FontName','Times New Roman','FontSize',10,'FontWeight','bold');
xlabel('x, m');
ylabel('y, m');
zlabel('z, m');
view(3);
%
% plotframe( r );
alpha(1)
% caxis([0.2,0.8]);
caxis([10,13]);
% caxis([12,22]);
colormap jet
colorbar
% zlim([-2020,-2000]);
% axis equal
axis tight
@@ -0,0 +1,46 @@
function plotDis_3D_to_2D(i, r, OutputRs, type)
coordinate=r.coordinates;
nodes=r.nodes;
nmc = size(nodes,1);
% nel = size(nodes,2);
nel = 4;
if type == 1
% v = r.kx;
v = OutputRs{i}.p;
else
v = 1-OutputRs{i}.sw;%º¬Æø±¥ºÍÈ
end
dis = zeros(nel, nmc);
x = zeros(nel, nmc);
y = zeros(nel, nmc);
for i = 1 :nmc
for j = 1 :nel
x(j, i) = coordinate(nodes(i,j), 1);
y(j, i) = coordinate(nodes(i,j), 2);
if j == 3
x(j, i) = coordinate(nodes(i,4), 1);
y(j, i) = coordinate(nodes(i,4), 2);
end
if j == 4
x(j, i) = coordinate(nodes(i,3), 1);
y(j, i) = coordinate(nodes(i,3), 2);
end
dis(j, i) = v(i);
end
end
% fill(x,y,dis,'EdgeAlpha',1);
figure('color','w');
fill(x,y,dis,'EdgeColor','interp');
xlabel('x, m','FontSize',14);
ylabel('y, m','FontSize',14);
ax = gca;
ax.FontSize = 14;
axis equal;
axis tight
% xlim([0,60]);
% ylim([0,60]);
% clim([10,15]);
colorbar
colormap jet
% fill(x,y,dis);
% axis off
@@ -0,0 +1,129 @@
function plotDis_ECLIPSE( r,ECLIPSE_data)
%便
[ downgrid, frontgrid ,leftgrid, rightgrid, backgrid, upgrid ] = preplot_dis( r );
coordinate=r.coordinates;
nodes=r.nodes;
% nmc = size(nodes,1);%
% % nel = size(nodes,2);%
% order=[1,2,4,3,1,5,6,8,7,3,4,8,6,2,1];%fill函数作图
% nel=size(order,2);
v =reshape( ECLIPSE_data',[],1);%
%
order=[1,2,4,3,1];
nel=size(order,2);
nmc=size(downgrid,2);
dis = zeros(nel, nmc);
x = zeros(nel, nmc);
y = zeros(nel, nmc);
z = zeros(nel, nmc);
for i = 1 : nmc
for j = 1 : nel
x(j, i) = coordinate(nodes(downgrid(i),order(j)), 1);
y(j, i) = coordinate(nodes(downgrid(i),order(j)), 2);
z(j, i) = coordinate(nodes(downgrid(i),order(j)), 3);
dis(j, i) = v(downgrid(i));
end
end
fill3(x,y,z,dis,'edgeColor','interp');
hold on
%
order=[1,5,7,3,1];
nel=size(order,2);
nmc=size(leftgrid,2);
dis = zeros(nel, nmc);
x = zeros(nel, nmc);
y = zeros(nel, nmc);
z = zeros(nel, nmc);
for i = 1 : nmc
for j = 1 : nel
x(j, i) = coordinate(nodes(leftgrid(i),order(j)), 1);
y(j, i) = coordinate(nodes(leftgrid(i),order(j)), 2);
z(j, i) = coordinate(nodes(leftgrid(i),order(j)), 3);
dis(j, i) = v(leftgrid(i));
end
end
fill3(x,y,z,dis,'edgeColor','interp');
%
order=[2,4,8,6,2];
nel=size(order,2);
nmc=size(rightgrid,2);
dis = zeros(nel, nmc);
x = zeros(nel, nmc);
y = zeros(nel, nmc);
z = zeros(nel, nmc);
for i = 1 : nmc
for j = 1 : nel
x(j, i) = coordinate(nodes(rightgrid(i),order(j)), 1);
y(j, i) = coordinate(nodes(rightgrid(i),order(j)), 2);
z(j, i) = coordinate(nodes(rightgrid(i),order(j)), 3);
dis(j, i) = v(rightgrid(i));
end
end
fill3(x,y,z,dis,'edgeColor','interp');
%
order=[1,2,6,5,1];
nel=size(order,2);
nmc=size(frontgrid,2);
dis = zeros(nel, nmc);
x = zeros(nel, nmc);
y = zeros(nel, nmc);
z = zeros(nel, nmc);
for i = 1 : nmc
for j = 1 : nel
x(j, i) = coordinate(nodes(frontgrid(i),order(j)), 1);
y(j, i) = coordinate(nodes(frontgrid(i),order(j)), 2);
z(j, i) = coordinate(nodes(frontgrid(i),order(j)), 3);
dis(j, i) = v(frontgrid(i));
end
end
fill3(x,y,z,dis,'edgeColor','interp');
%
order=[3,4,8,7,3];
nel=size(order,2);
nmc=size(backgrid,2);
dis = zeros(nel, nmc);
x = zeros(nel, nmc);
y = zeros(nel, nmc);
z = zeros(nel, nmc);
for i = 1 : nmc
for j = 1 : nel
x(j, i) = coordinate(nodes(backgrid(i),order(j)), 1);
y(j, i) = coordinate(nodes(backgrid(i),order(j)), 2);
z(j, i) = coordinate(nodes(backgrid(i),order(j)), 3);
dis(j, i) = v(backgrid(i));
end
end
fill3(x,y,z,dis,'edgeColor','interp');
%
order=[5,6,8,7,5];
nel=size(order,2);
nmc=size(upgrid,2);
dis = zeros(nel, nmc);
x = zeros(nel, nmc);
y = zeros(nel, nmc);
z = zeros(nel, nmc);
for i = 1 : nmc
for j = 1 : nel
x(j, i) = coordinate(nodes(upgrid(i),order(j)), 1);
y(j, i) = coordinate(nodes(upgrid(i),order(j)), 2);
z(j, i) = coordinate(nodes(upgrid(i),order(j)), 3);
dis(j, i) = v(upgrid(i));
end
end
fill3(x,y,z,dis,'edgeColor','interp');
%
% plotframe( r );
% axis equal
axis tight
@@ -0,0 +1,147 @@
function plotDislayer(i, k ,r,OutputRs, type)
%i:时间点,k是从上至下数的层位,type: 1是压力场
figure('color','w')
[ downgrid, frontgrid ,leftgrid, rightgrid, backgrid, upgrid ] = preplot_dislayer( r,k );
coordinate=r.coordinates;
nodes=r.nodes;
nx=r.nx;
ny=r.ny;
nz=r.nz;
% order=[1,2,4,3,1,5,6,8,7,3,4,8,6,2,1];%用以fill函数作图
% % nmc = size(nodes,1);%基质网格数量
% nmc = nx*ny;
% % nel = size(nodes,2);%每个基质网格所包含的点数量
% nel=size(order,2);
if type == 1
v = OutputRs{i}.p;
% v = log(r.kx);
elseif type == 2
% v = 1-OutputRs{i}.sw -OutputRs{i}.sg;%含油饱和度
v = 1-OutputRs{i}.sw;%含油饱和度
elseif type == 3
v = OutputRs{i}.sg;%含油饱和度
else
v = OutputRs{i}.sw;%含油饱和度
end
% 底面
order=[1,2,4,3,1];
nel=size(order,2);
nmc=size(downgrid,2);
dis = zeros(nel, nmc);
x = zeros(nel, nmc);
y = zeros(nel, nmc);
z = zeros(nel, nmc);
for i = 1 : nmc
for j = 1 : nel
x(j, i) = coordinate(nodes(downgrid(i),order(j)), 1);
y(j, i) = coordinate(nodes(downgrid(i),order(j)), 2);
z(j, i) = coordinate(nodes(downgrid(i),order(j)), 3);
dis(j, i) = v(downgrid(i));
end
end
fill3(x,y,z,dis,'edgeColor','interp');
hold on
%左面
order=[1,5,7,3,1];
nel=size(order,2);
nmc=size(leftgrid,2);
dis = zeros(nel, nmc);
x = zeros(nel, nmc);
y = zeros(nel, nmc);
z = zeros(nel, nmc);
for i = 1 : nmc
for j = 1 : nel
x(j, i) = coordinate(nodes(leftgrid(i),order(j)), 1);
y(j, i) = coordinate(nodes(leftgrid(i),order(j)), 2);
z(j, i) = coordinate(nodes(leftgrid(i),order(j)), 3);
dis(j, i) = v(leftgrid(i));
end
end
fill3(x,y,z,dis,'edgeColor','interp');
%右面
order=[2,4,8,6,2];
nel=size(order,2);
nmc=size(rightgrid,2);
dis = zeros(nel, nmc);
x = zeros(nel, nmc);
y = zeros(nel, nmc);
z = zeros(nel, nmc);
for i = 1 : nmc
for j = 1 : nel
x(j, i) = coordinate(nodes(rightgrid(i),order(j)), 1);
y(j, i) = coordinate(nodes(rightgrid(i),order(j)), 2);
z(j, i) = coordinate(nodes(rightgrid(i),order(j)), 3);
dis(j, i) = v(rightgrid(i));
end
end
fill3(x,y,z,dis,'edgeColor','interp');
%前面
order=[1,2,6,5,1];
nel=size(order,2);
nmc=size(frontgrid,2);
dis = zeros(nel, nmc);
x = zeros(nel, nmc);
y = zeros(nel, nmc);
z = zeros(nel, nmc);
for i = 1 : nmc
for j = 1 : nel
x(j, i) = coordinate(nodes(frontgrid(i),order(j)), 1);
y(j, i) = coordinate(nodes(frontgrid(i),order(j)), 2);
z(j, i) = coordinate(nodes(frontgrid(i),order(j)), 3);
dis(j, i) = v(frontgrid(i));
end
end
fill3(x,y,z,dis,'edgeColor','interp');
%后面
order=[3,4,8,7,3];
nel=size(order,2);
nmc=size(backgrid,2);
dis = zeros(nel, nmc);
x = zeros(nel, nmc);
y = zeros(nel, nmc);
z = zeros(nel, nmc);
for i = 1 : nmc
for j = 1 : nel
x(j, i) = coordinate(nodes(backgrid(i),order(j)), 1);
y(j, i) = coordinate(nodes(backgrid(i),order(j)), 2);
z(j, i) = coordinate(nodes(backgrid(i),order(j)), 3);
dis(j, i) = v(backgrid(i));
end
end
fill3(x,y,z,dis,'edgeColor','interp');
%上面
order=[5,6,8,7,5];
nel=size(order,2);
nmc=size(upgrid,2);
dis = zeros(nel, nmc);
x = zeros(nel, nmc);
y = zeros(nel, nmc);
z = zeros(nel, nmc);
for i = 1 : nmc
for j = 1 : nel
x(j, i) = coordinate(nodes(upgrid(i),order(j)), 1);
y(j, i) = coordinate(nodes(upgrid(i),order(j)), 2);
z(j, i) = coordinate(nodes(upgrid(i),order(j)), 3);
dis(j, i) = v(upgrid(i));
end
end
fill3(x,y,z,dis,'edgeColor','interp');
set(gca,'FontName','Times New Roman','FontSize',10,'FontWeight','bold');
xlabel('x, m');
ylabel('y, m');
zlabel('z, m');
view(2);
% fill(x,y,dis);
axis equal
% axis off
axis tight
colormap jet
% caxis([12,22]);
colorbar
caxis([0.2,0.8]);
@@ -0,0 +1,153 @@
function plotDislayer(i, k ,r,OutputRs, type)
%i:k是从上至下数的层位type: 1
figure('color','w')
[ downgrid, frontgrid ,leftgrid, rightgrid, backgrid, upgrid ] = preplot_dislayer( r,k );
coordinate=r.coordinates;
nodes=r.nodes;
nx=r.nx;
ny=r.ny;
nz=r.nz;
% order=[1,2,4,3,1,5,6,8,7,3,4,8,6,2,1];%fill函数作图
% % nmc = size(nodes,1);%
% nmc = nx*ny;
% % nel = size(nodes,2);%
% nel=size(order,2);
if type == 1
v = OutputRs{i}.p;
% v = log(r.kx);
elseif type == 2
% v = 1-OutputRs{i}.sw -OutputRs{i}.sg;%
v = 1-OutputRs{i}.sw;%
elseif type == 3
v = OutputRs{i}.sg;%
else
v = OutputRs{i}.sw;%
end
%
order=[1,2,4,3,1];
nel=size(order,2);
nmc=size(downgrid,2);
dis = zeros(nel, nmc);
x = zeros(nel, nmc);
y = zeros(nel, nmc);
z = zeros(nel, nmc);
for i = 1 : nmc
for j = 1 : nel
x(j, i) = coordinate(nodes(downgrid(i),order(j)), 1);
y(j, i) = coordinate(nodes(downgrid(i),order(j)), 2);
z(j, i) = coordinate(nodes(downgrid(i),order(j)), 3);
dis(j, i) = v(downgrid(i));
end
end
fill3(x,y,z,dis,'edgeColor','interp');
hold on
%
order=[1,5,7,3,1];
nel=size(order,2);
nmc=size(leftgrid,2);
dis = zeros(nel, nmc);
x = zeros(nel, nmc);
y = zeros(nel, nmc);
z = zeros(nel, nmc);
for i = 1 : nmc
for j = 1 : nel
x(j, i) = coordinate(nodes(leftgrid(i),order(j)), 1);
y(j, i) = coordinate(nodes(leftgrid(i),order(j)), 2);
z(j, i) = coordinate(nodes(leftgrid(i),order(j)), 3);
dis(j, i) = v(leftgrid(i));
end
end
fill3(x,y,z,dis,'edgeColor','interp');
%
order=[2,4,8,6,2];
nel=size(order,2);
nmc=size(rightgrid,2);
dis = zeros(nel, nmc);
x = zeros(nel, nmc);
y = zeros(nel, nmc);
z = zeros(nel, nmc);
for i = 1 : nmc
for j = 1 : nel
x(j, i) = coordinate(nodes(rightgrid(i),order(j)), 1);
y(j, i) = coordinate(nodes(rightgrid(i),order(j)), 2);
z(j, i) = coordinate(nodes(rightgrid(i),order(j)), 3);
dis(j, i) = v(rightgrid(i));
end
end
fill3(x,y,z,dis,'edgeColor','interp');
%
order=[1,2,6,5,1];
nel=size(order,2);
nmc=size(frontgrid,2);
dis = zeros(nel, nmc);
x = zeros(nel, nmc);
y = zeros(nel, nmc);
z = zeros(nel, nmc);
for i = 1 : nmc
for j = 1 : nel
x(j, i) = coordinate(nodes(frontgrid(i),order(j)), 1);
y(j, i) = coordinate(nodes(frontgrid(i),order(j)), 2);
z(j, i) = coordinate(nodes(frontgrid(i),order(j)), 3);
dis(j, i) = v(frontgrid(i));
end
end
fill3(x,y,z,dis,'edgeColor','interp');
%
order=[3,4,8,7,3];
nel=size(order,2);
nmc=size(backgrid,2);
dis = zeros(nel, nmc);
x = zeros(nel, nmc);
y = zeros(nel, nmc);
z = zeros(nel, nmc);
for i = 1 : nmc
for j = 1 : nel
x(j, i) = coordinate(nodes(backgrid(i),order(j)), 1);
y(j, i) = coordinate(nodes(backgrid(i),order(j)), 2);
z(j, i) = coordinate(nodes(backgrid(i),order(j)), 3);
dis(j, i) = v(backgrid(i));
end
end
fill3(x,y,z,dis,'edgeColor','interp');
%
order=[5,6,8,7,5];
nel=size(order,2);
nmc=size(upgrid,2);
dis = zeros(nel, nmc);
x = zeros(nel, nmc);
y = zeros(nel, nmc);
z = zeros(nel, nmc);
for i = 1 : nmc
for j = 1 : nel
x(j, i) = coordinate(nodes(upgrid(i),order(j)), 1);
y(j, i) = coordinate(nodes(upgrid(i),order(j)), 2);
z(j, i) = coordinate(nodes(upgrid(i),order(j)), 3);
dis(j, i) = v(upgrid(i));
end
end
fill3(x,y,z,dis,'edgeColor','interp');
set(gca,'FontName','Times New Roman','FontSize',10,'FontWeight','bold');
xlabel('x, m');
ylabel('y, m');
zlabel('z, m');
view(2);
% fill(x,y,dis);
axis equal
% axis off
axis tight
colormap jet
if type ==1
caxis([5,22]);
else
caxis([0.2,0.8]);
end
% caxis([12,22]);
% caxis([10,13]);
colorbar
% caxis([0.2,0.8]);
@@ -0,0 +1,131 @@
function plotDislayer_ECLIPSE( k ,r,ECLIPSE_data)
%i:k是从上至下数的层位type: 1
[ downgrid, frontgrid ,leftgrid, rightgrid, backgrid, upgrid ] = preplot_dislayer( r,k );
coordinate=r.coordinates;
nodes=r.nodes;
nx=r.nx;
ny=r.ny;
nz=r.nz;
% order=[1,2,4,3,1,5,6,8,7,3,4,8,6,2,1];%fill函数作图
% % nmc = size(nodes,1);%
% nmc = nx*ny;
% % nel = size(nodes,2);%
% nel=size(order,2);
v =reshape( ECLIPSE_data',[],1);%
%
order=[1,2,4,3,1];
nel=size(order,2);
nmc=size(downgrid,2);
dis = zeros(nel, nmc);
x = zeros(nel, nmc);
y = zeros(nel, nmc);
z = zeros(nel, nmc);
for i = 1 : nmc
for j = 1 : nel
x(j, i) = coordinate(nodes(downgrid(i),order(j)), 1);
y(j, i) = coordinate(nodes(downgrid(i),order(j)), 2);
z(j, i) = coordinate(nodes(downgrid(i),order(j)), 3);
dis(j, i) = v(downgrid(i));
end
end
fill3(x,y,z,dis,'edgeColor','interp');
hold on
%
order=[1,5,7,3,1];
nel=size(order,2);
nmc=size(leftgrid,2);
dis = zeros(nel, nmc);
x = zeros(nel, nmc);
y = zeros(nel, nmc);
z = zeros(nel, nmc);
for i = 1 : nmc
for j = 1 : nel
x(j, i) = coordinate(nodes(leftgrid(i),order(j)), 1);
y(j, i) = coordinate(nodes(leftgrid(i),order(j)), 2);
z(j, i) = coordinate(nodes(leftgrid(i),order(j)), 3);
dis(j, i) = v(leftgrid(i));
end
end
fill3(x,y,z,dis,'edgeColor','interp');
%
order=[2,4,8,6,2];
nel=size(order,2);
nmc=size(rightgrid,2);
dis = zeros(nel, nmc);
x = zeros(nel, nmc);
y = zeros(nel, nmc);
z = zeros(nel, nmc);
for i = 1 : nmc
for j = 1 : nel
x(j, i) = coordinate(nodes(rightgrid(i),order(j)), 1);
y(j, i) = coordinate(nodes(rightgrid(i),order(j)), 2);
z(j, i) = coordinate(nodes(rightgrid(i),order(j)), 3);
dis(j, i) = v(rightgrid(i));
end
end
fill3(x,y,z,dis,'edgeColor','interp');
%
order=[1,2,6,5,1];
nel=size(order,2);
nmc=size(frontgrid,2);
dis = zeros(nel, nmc);
x = zeros(nel, nmc);
y = zeros(nel, nmc);
z = zeros(nel, nmc);
for i = 1 : nmc
for j = 1 : nel
x(j, i) = coordinate(nodes(frontgrid(i),order(j)), 1);
y(j, i) = coordinate(nodes(frontgrid(i),order(j)), 2);
z(j, i) = coordinate(nodes(frontgrid(i),order(j)), 3);
dis(j, i) = v(frontgrid(i));
end
end
fill3(x,y,z,dis,'edgeColor','interp');
%
order=[3,4,8,7,3];
nel=size(order,2);
nmc=size(backgrid,2);
dis = zeros(nel, nmc);
x = zeros(nel, nmc);
y = zeros(nel, nmc);
z = zeros(nel, nmc);
for i = 1 : nmc
for j = 1 : nel
x(j, i) = coordinate(nodes(backgrid(i),order(j)), 1);
y(j, i) = coordinate(nodes(backgrid(i),order(j)), 2);
z(j, i) = coordinate(nodes(backgrid(i),order(j)), 3);
dis(j, i) = v(backgrid(i));
end
end
fill3(x,y,z,dis,'edgeColor','interp');
%
order=[5,6,8,7,5];
nel=size(order,2);
nmc=size(upgrid,2);
dis = zeros(nel, nmc);
x = zeros(nel, nmc);
y = zeros(nel, nmc);
z = zeros(nel, nmc);
for i = 1 : nmc
for j = 1 : nel
x(j, i) = coordinate(nodes(upgrid(i),order(j)), 1);
y(j, i) = coordinate(nodes(upgrid(i),order(j)), 2);
z(j, i) = coordinate(nodes(upgrid(i),order(j)), 3);
dis(j, i) = v(upgrid(i));
end
end
fill3(x,y,z,dis,'edgeColor','interp');
set(gca,'FontName','Times New Roman','FontSize',10,'FontWeight','bold');
xlabel('X, m');
ylabel('Y, m');
zlabel('Z, m');
view(2);
% fill(x,y,dis);
axis equal
% axis off
axis tight
@@ -0,0 +1,48 @@
function plot_layer(i, k, r, OutputRs, type)
coordinate=r.coordinates;
nodes=r.nodes;
nz=r.nz;
nx=r.nx
nmc = size(nodes,1);
% nel = size(nodes,2);
nel = 4;
if type == 1
% v = r.kx;
v = OutputRs{i}.p;
else
v = 1-OutputRs{i}.sw;%含气饱和度
end
dis = zeros(nel, nmc);
x = zeros(nel, nmc);
y = zeros(nel, nmc);
for i = 1 :nmc
for j = 1 :nel
x(j, i) = coordinate(nodes(i,j), 1);
y(j, i) = coordinate(nodes(i,j), 2);
if j == 3
x(j, i) = coordinate(nodes(i,4), 1);
y(j, i) = coordinate(nodes(i,4), 2);
end
if j == 4
x(j, i) = coordinate(nodes(i,3), 1);
y(j, i) = coordinate(nodes(i,3), 2);
end
dis(j, i) = v(i);
end
end
% fill(x,y,dis,'EdgeAlpha',1);
figure('color','w');
fill(x,y,dis,'EdgeColor','interp');
xlabel('x, m','FontSize',14);
ylabel('y, m','FontSize',14);
ax = gca;
ax.FontSize = 14;
axis equal;
axis tight
% xlim([0,60]);
% ylim([0,60]);
% clim([10,15]);
colorbar
colormap jet
% fill(x,y,dis);
% axis off
@@ -0,0 +1,49 @@
function plot_layer(i, k, r, OutputRs, type)
coordinate=r.coordinates;
nodes=r.nodes;
nz=r.nz;
nx=r.nx;
ny=r.ny;
nmc = size(nodes,1);
% nel = size(nodes,2);
nel = 4;
if type == 1
% v = r.kx;
v = OutputRs{i}.p;
else
v = 1-OutputRs{i}.sw;%º¬Æø±¥ºÍÈ
end
dis = zeros(nel, nmc);
x = zeros(nel, nmc);
y = zeros(nel, nmc);
for i = 1 :nmc
for j = 1 :nel
x(j, i) = coordinate(nodes(i,j), 1);
y(j, i) = coordinate(nodes(i,j), 2);
if j == 3
x(j, i) = coordinate(nodes(i,4), 1);
y(j, i) = coordinate(nodes(i,4), 2);
end
if j == 4
x(j, i) = coordinate(nodes(i,3), 1);
y(j, i) = coordinate(nodes(i,3), 2);
end
dis(j, i) = v(i+(nz-k)*nx*ny);
end
end
% fill(x,y,dis,'EdgeAlpha',1);
figure('color','w');
fill(x,y,dis,'EdgeColor','interp');
xlabel('x, m','FontSize',14);
ylabel('y, m','FontSize',14);
ax = gca;
ax.FontSize = 14;
axis equal;
axis tight
% xlim([0,60]);
% ylim([0,60]);
% clim([10,15]);
colorbar
colormap jet
% fill(x,y,dis);
% axis off
@@ -0,0 +1,44 @@
function [ ] = plot_reservoir_3D(dx,dy,dz,nx,ny,nz )
%UNTITLED
%
%figure
% x-y平面
for i=1:(nz+1)
% if i ==nz+1
face=[0,0,(i-1)*dz;nx*dx,0,(i-1)*dz;nx*dx,ny*dy,(i-1)*dz;0,ny*dy,(i-1)*dz];
% fill3(face(:,1),face(:,2),face(:,3),[0.5,0.5,0.5]);
fill3(face(:,1),face(:,2),face(:,3),'w');
% end
hold on
end
% [0.5,0.5,0.5]
% x-z平面
for i=1:(ny+1)
% if i == 1
face=[0,(i-1)*dy,0;nx*dx,(i-1)*dy,0;nx*dx,(i-1)*dy,nz*dz;0,(i-1)*dy,nz*dz];
% fill3(face(:,1),face(:,2),face(:,3),[0.5,0.5,0.5]);
fill3(face(:,1),face(:,2),face(:,3),'w');
% end
hold on
end
% y-z平面
for i=1:(nx+1)
% if i == 1
face=[(i-1)*dx,0,0;(i-1)*dx,ny*dy,0;(i-1)*dx,ny*dy,nz*dz;(i-1)*dx,0,nz*dz;];
% fill3(face(:,1),face(:,2),face(:,3),[0.5,0.5,0.5]);
fill3(face(:,1),face(:,2),face(:,3),'w');
% end
hold on
end
xlabel('x,m');
ylabel('y,m');
zlabel('z,m');
alpha(1);
hold on;
view(3)
end
+37
View File
@@ -0,0 +1,37 @@
function [ ] = plotcp( Times,Times2,Wellpara,Wellpara2 )
%PLOTCP
%
t = Times;
n=size(Times,1);
% para = cell2mat(Wellpara);
nw=1;%
% n = length(para);
bhp = zeros(n,1);
for i = 1 : n
% bhp(i) = para(i).bhp(2);
bhp(i) = Wellpara{i}{1,nw}.qo;
% bhp(i) = Wellpara{i}{1,nw}.qw;
% bhp(i) = Wellpara{i}{1,nw}.pwf;
end
plot(t,bhp,'r*-');
hold on
t = Times2;
n=size(Times2,1);
% para = cell2mat(Wellpara);
nw=1;%
% n = length(para);
bhp = zeros(n,1);
for i = 1 : n
% bhp(i) = para(i).bhp(2);
% bhp(i) = Wellpara2{i}{1,nw}.qo;
bhp(i) = Wellpara2(i);
% bhp(i) = Wellpara{i}{1,nw}.qw;
% bhp(i) = Wellpara{i}{1,nw}.pwf;
end
plot(t,bhp,'bo-');
hold off
end
+37
View File
@@ -0,0 +1,37 @@
function [ ] = plotframe( r )
%PLOTFRAME
%
xe=1000;ye=500;ze=10;
network3D(xe,ye,ze,1,1,1 );
% f1=[335,445,0;
% 335,445,10;
% 335,555,10;
% 335,555,0;
% 335,455,0;];
% plot3(f1(:,1),f1(:,2),f1(:,3));
%
% f2=[445,445,0;
% 445,445,10;
% 445,555,10;
% 445,555,0
% 445,445,0;];
% plot3(f2(:,1),f2(:,2),f2(:,3));
%
% f3=[555,445,0;
% 555,445,10;
% 555,550,10;
% 555,550,0
% 555,445,0;];
% plot3(f3(:,1),f3(:,2),f3(:,3));
%
% f4=[665,445,0;
% 665,445,10;
% 665,555,10;
% 665,555,0
% 665,445,0;];
% plot3(f4(:,1),f4(:,2),f4(:,3));
% hold off
end
+63
View File
@@ -0,0 +1,63 @@
%PLOTGRAPH
%
% set(gca,'FontName','Times New Roman','FontSize',10,'FontWeight','bold');
subplot(1,2,1)
plotDislayer_new(15, 1 ,r,OutputRs, 1);
% caxis([10,30]);
title('Layer 1 in the 50th day','FontName','Times New Roman','FontSize',10,'FontWeight','bold');
set(gca,'FontName','Times New Roman','FontSize',10,'FontWeight','bold');
axis equal
axis tight
% set(gca,'ztick',[0 30])
% set(gca,'zticklabel',{'0' '30'})
% xlabel('Layer 1 in the 50th day');
% subplot(2,2,2)
% plotDislayer_new(15, 2 ,r,OutputRs, 1);
% caxis([10,20]);
% title('Layer 2 in the 50th day','FontName','Times New Roman','FontSize',10,'FontWeight','bold');
% set(gca,'FontName','Times New Roman','FontSize',10,'FontWeight','bold');
% axis equal
% axis tight
% set(gca,'ztick',[0 30])
% set(gca,'zticklabel',{'0' '30'})
% xlabel('Layer 2 in the 50th day');
% subplot(2,2,3)
% plotDislayer_new(15, 3 ,r,OutputRs, 1);
% caxis([10,20]);
% title('Layer 3 in the 50th day','FontName','Times New Roman','FontSize',10,'FontWeight','bold');
% set(gca,'FontName','Times New Roman','FontSize',10,'FontWeight','bold');
% axis equal
% axis tight
% set(gca,'ztick',[0 30])
% set(gca,'zticklabel',{'0' '30'})
% xlabel('Layer 3 in the 50th day');
subplot(1,2,2)
plotDis_new(15 ,r,OutputRs, 1);
% caxis([10,30]);
% xlabel('3D reservoir in the 50th day');
title('3D reservoir in the 50th day','FontName','Times New Roman','FontSize',10,'FontWeight','bold');
set(gca,'FontName','Times New Roman','FontSize',10,'FontWeight','bold');
axis equal
axis tight
% set(gca,'ztick',[0 30])
% set(gca,'zticklabel',{'0' '30'})
% colorbar('SouthOutside');
colorbar('position',[0.93 0.3 0.03 0.4]);
% subplot(1,2,1)
% plotDislayer_new(9, 1 ,r,OutputRs, 1);
% subplot(1,2,2)
% plotDislayer_new(9, 2 ,r,OutputRs, 1);
% subplot(2,4,5)
% plotDislayer_new(31, 1 ,r,OutputRs, 1);
% subplot(2,4,6)
% plotDislayer_new(31, 2 ,r,OutputRs, 1);
% subplot(2,4,7)
% plotDislayer_new(31, 3 ,r,OutputRs, 1);
% subplot(2,4,8)
% plotDis_new(31 ,r,OutputRs, 1);
+19
View File
@@ -0,0 +1,19 @@
t = Times;
n=size(Times,1);
% para = cell2mat(Wellpara);
nw= 1;%Ñ¡¾®ºÅ
% n = length(para);
bhp = zeros(n,1);
for i = 1 : n
% bhp(i) = para(i).bhp(2);
% bhp(i) = Wellpara{i}{1,nw}.pwf;
bhp(i) = Wellpara{i}{1,nw}.qo;
% bhp(i) = Wellpara{i}{1,nw}.pwf;
% bhp(i) = Wellpara{i}{1,nw}.qw/(Wellpara{i}{1,nw}.qw+Wellpara{i}{1,nw}.qo);
end
plot(t,bhp,'b^-')
hold off
% ylim([0,200]);
xlabel('time, day');
% ylabel('water cut');
ylabel('oil production rate, m^3/d');
@@ -0,0 +1,130 @@
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');
+64
View File
@@ -0,0 +1,64 @@
% network3D(2060,1580,10,1,1,3 );
%REFINE
%
% % % well=cell(4,1);
% % % load('perforation1.mat');welloc1 = [perforation1, 7.5*ones(size(perforation1,1),1)];
% % % load('perforation2.mat');welloc2 = [perforation2, 7.5*ones(size(perforation2,1),1)];
% % % load('perforation3.mat');welloc3 = [perforation3, 7.5*ones(size(perforation3,1),1)];
% % % load('perforation4.mat');welloc4 = [perforation4, 7.5*ones(size(perforation4,1),1)];
% % % well{1,1} = welloc1;
% % % well{2,1} = welloc2;
% % % well{3,1} = welloc3;
% % % well{4,1} = welloc4;
% % %
% % % for i=1:4
% % % line(well{i,1}(:,1)',well{i,1}(:,2)',well{i,1}(:,3)','color','k','LineWidth',2);
% % % hold on
% % % end
% load('injectionWellsCoord.mat')
% injectionWellsCoord = [45,45;
% 655,45;
% 45,625;
% 655,625;];
% for i=1:size(injectionWellsCoord,1)
% line(injectionWellsCoord(i,1)*ones(2,1),injectionWellsCoord(i,2)*ones(2,1),[0;20],'color','k','LineWidth',2);
% hold on
% text(injectionWellsCoord(i,1),injectionWellsCoord(i,2),20,'','FontSize',12,'FontWeight','bold');
% hold on
% end
% wellbore
% wellbore = [250+100,100+100,46;
% 550+100,100+1700,46];
% % wellbore = [50,352,10;
% % 950,352,10;];
% plot3(wellbore(:,1),wellbore(:,2),wellbore(:,3),'color','k','LineWidth',2.5);
% wellbore = [450,520,10;
% 450,1420,10;];
% % wellbore = [50,352,10;
% % 950,352,10;];
% plot3(wellbore(:,1),wellbore(:,2),wellbore(:,3),'color','k','LineWidth',2.5);
hold on
% wellbore = [1175,370,10;
% 1175,1170,10;];
% % wellbore = [50,352,10;
% % 950,352,10;];
% plot3(wellbore(:,1),wellbore(:,2),wellbore(:,3),'color','k','LineWidth',2.5);
% text(wellbore(1,1),wellbore(1,2),10,'','FontSize',12,'FontWeight','bold');
hold on
% hwell=cell(1,1);
% hwell{1,1}=[385,1300,15;
% 385,400,15;];
% hwell{2,1}=[955,1330,15;
% 955,330,15;];
% hwell{3,1}=[1635,1275,15;
% 1635,580,15;];
% for i=1:3
% line(hwell{i,1}(:,1)',hwell{i,1}(:,2)',hwell{i,1}(:,3)','color','k');
% hold on
% end