📄 basicdata.m
字号:
%Initial and Boundary conditions and Sources
pr=4000;
%%%%%%%%%%%%%%%change this if something is wrong
%%%%%%%%%%%%%%%pwf=2000;
%swi(1)=1;
%pwi(nr)=pwf;
%Matrix Prepare
%dt=input('input the time step: dt=');
%dt=0.001;
nr=6;
h=20;
L=1000;
w=1000;
%ag=pi/10; %angle of the reservoir
ag=0; %angle of the reservoir
A=h*w;
%disp('the area of the interface is: A=');
%disp(A);
k=100;
phir=0.2;
phi1=10*10^(-6);
cf=phi1;
uw=1.0;
rw=1.03;
bwr=1;
bw1=3*10^(-6);
pwr=4000;
bwi1=3*10^(-6);
bwim11=3*10^(-6);
un=0.8;
rn=0.8;
bnr=1.05;
bn1=10*10^(-6);
bni1=10*10^(-6);
pnr=4000;
bnim11=10*10^(-6);
bnip11=10*10^(-6);
aa=100;
bb=0.5;
erop=10;
eros=0.005;
eroff=0.0001;
for ii=1:(2*nr)
if mod(ii,2)~=0
ero(ii)=erop;
else
ero(ii)=eros;
end
erof(ii)=eroff;
end
phir=0.2;
pr=4000;
%length per unit lx, vb, kw,Z
hh=L/(nr-1);
for ii=1:nr
if ii==1|ii==nr
lx(ii)=L./(nr-1)./2;
vb(ii)=A.*lx(ii);
%kw(ii)=k*A/(uw*lx(ii));
%kn(ii)=k*A/(un*lx(ii));
else
lx(ii)=L./(nr-1);
vb(ii)=A.*lx(ii);
%kw(ii)=k*A/(uw*lx(ii));
%kn(ii)=k*A/(un*lx(ii));
end
zi(ii)=(ii-1)*hh*sin(ag);
kw(ii)=0.001127*k*A/(uw*hh);
kn(ii)=0.001127*k*A/(un*hh);
end
%qw=input('input the water injection rate: qw=');
qw=712.37756;
%qw=0;
%qn=input('input the oil injection rate: qn=');
qn=0;
%qn=712.37756;
for ii=1:nr
if ii==1
zim1(ii)=0;
qwi(ii)=qw;
qni(ii)=qn;
else
zim1(ii)=zi(ii-1);
qwi(ii)=0;
qni(ii)=-qw;
end
if ii==nr
%zim1(ii)=0;
%qwi(ii)=qw;
%qni(ii)=-qn;
qni(ii)=0;
end
if ii<nr
zip1(ii)=zi(ii+1);
else
zip1(nr)=zi(nr);
end
end
%new time step
%swi=
%pwi=
%phi=
%last time step
%Pwi+1, Pwi-1
%initial values
for ii=1:nr
swi(ii)=0;
pwi(ii)=pr;
phi(ii)=phir.*exp(cf.*(pwi(ii)-pr));
end
swit=swi;
pwit=pwi;
phit=phi;
itr=1;
%$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -