Skip to content

Commit ade0fb4

Browse files
committed
bugs fixed in derivatives
1 parent 064c1c3 commit ade0fb4

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

examples/imbibition_IMPES.jl

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ Ny = 50 # number of cells in y direction
1212
W = 0.02 # [m] length of the domain in x direction
1313
H = 0.07 # [m] length of the domain in y direction
1414
# m = createMesh1D(Nx, W)
15-
m = createMeshCylindrical2D(Nx, Ny, W, H) # creates a 2D mesh
15+
m = createMesh2D(Nx, Ny, W, H) # creates a 2D mesh
1616
## define the physical parametrs
1717
# all the Corey-type relperm parametrs are defined for the oil-wet and water-wet
1818
# cases
19-
k0 = 0.005e-12 # [m^2] average reservoir permeability
19+
k0 = 0.01e-12 # [m^2] average reservoir permeability
2020
phi0 = 0.45 # average porosity
2121
mu_oil = 2e-3 # [Pa.s] oil viscosity
2222
mu_water = 1e-3 # [Pa.s] water viscosity
@@ -117,7 +117,7 @@ rec_fact=zeros(1)
117117
t_day=zeros(1)
118118
t = 0.0
119119
dt0=dt
120-
dsw_alwd= 0.01
120+
dsw_alwd= 0.001
121121
dp_alwd= 100.0 # Pa
122122
while (t<t_end)
123123
# for i=1:5
@@ -149,7 +149,7 @@ while (t<t_end)
149149
uw=-labdaw.*pgrad
150150
Mbcsw, RHSbcsw = boundaryConditionTerm(BCs)
151151
RHS_sw=-divergenceTerm(uw)
152-
sw_new=solveExplicitPDE(sw_old, dt/phi0, RHS_sw, BCs)
152+
sw_new=solveExplicitPDE(sw_old, dt, RHS_sw, BCs, phi)
153153

154154
error_p = maximum(abs((internalCells(p_new)-internalCells(p))./internalCells(p_new)))
155155
error_sw = maximum(abs(internalCells(sw_new)-internalCells(sw)))
@@ -177,11 +177,11 @@ while (t<t_end)
177177
rec_fact=push!(rec_fact, (oil_init-domainInt(1-sw))/oil_init)
178178
t_day=push!(t_day, t)
179179
# print(t)
180-
# GR.imshow(sw.value[2:end-1,2:end-1])
181-
#visualizeCells(1-sw)
182-
GR.plot(t_day/3600/24, rec_fact)
183-
#xlabel('time [day]')
184-
#ylabel('recovery factor')
185-
#title([num2str(t/3600/24) ' day']) drawnow
180+
GR.imshow(sw.value[2:end-1,2:end-1])
181+
# visualizeCells(1-sw)
182+
# GR.plot(t_day/3600/24, rec_fact)
183+
# xlabel('time [day]')
184+
# ylabel('recovery factor')
185+
# title([num2str(t/3600/24) ' day']) drawnow
186186
end
187187
end # imb_impes

0 commit comments

Comments
 (0)