Two parallel noncomunicating zones in a reservoir

I'm injecting the seawater into a reservoir via a long horizontal well. The injectivity is better in some areas. I assign a larger injection rate to the 1D model for that zone, and a lower injection rate to the rest of the well, which is modelled again with a 1D model.


In [1]:
include("../FractionalFlow/FractionalFlow.jl")
using PyPlot, Dierckx, SetPyPlot
FF = FractionalFlow
setrcparam()


┌ Info: Recompiling stale cache file /home/ali/.julia/compiled/v1.1/SetPyPlot/Rkvls.ji for SetPyPlot [d6c70c59-9b85-50b1-926c-19fb5cf24e7d]
└ @ Base loading.jl:1184
┌ Warning: Package SetPyPlot does not have PyPlot in its dependencies:
│ - If you have SetPyPlot checked out for development and have
│   added PyPlot as a dependency but haven't updated your primary
│   environment's manifest file, try `Pkg.resolve()`.
│ - Otherwise you may need to report an issue with SetPyPlot
└ Loading PyPlot into SetPyPlot from project dependency, future warnings for SetPyPlot are suppressed.

In [2]:
krw0_ww = 0.271636
krw0_ow = 0.226423
kro0_ww = 0.640774
kro0_ow = 0.53222
nw_ww = 3.74488
# nw_ow= 3.81109
# no_ww = 1.93454
nw_ow= 3.0
no_ww = 2.0
no_ow= 2.0844
sor_ww=0.333829
sor_ow=0.40325
sor_mw=0.1
swc_ww=0.212
swc_ow=0.212

u_inj_fast = 0.3e-5
u_inj_slow = 1.0e-5 
pv_inj_fast = 2.0
pv_inj_slow = u_inj_slow/u_inj_fast*pv_inj_fast
A_fast = 0.2 # normalized to a total injection area of 1.0
A_slow = 1-A_fast # normalized to a total injection area of 1.0
eq_const = 0.3


Out[2]:
0.3

In [22]:
pv_inj_slow


Out[22]:
6.666666666666667

In [3]:
fluids_hs = FF.oil_water_fluids(mu_water=1.1e-3, mu_oil=2e-3)
fluids_ls = FF.oil_water_fluids(mu_water=1e-3, mu_oil=2e-3)
rel_perms_hs = FF.oil_water_rel_perms(krw0=krw0_ow, kro0=kro0_ow, 
        swc=swc_ow, sor=sor_ow, nw=nw_ow, no = no_ow)
rel_perms_ls = FF.oil_water_rel_perms(krw0=krw0_ww, kro0=kro0_ww, 
        swc=swc_ww, sor=sor_ww, nw=nw_ww, no = no_ww)
# rel_perms_hs = FF.oil_water_rel_perms(krw0=0.4, kro0=0.9, 
#         swc=0.15, sor=0.4, nw=2.0, no = 2.0)
# rel_perms_ls = FF.oil_water_rel_perms(krw0=0.35, kro0=0.95, 
#         swc=0.15, sor=0.35, nw=2.0, no = 2.0)
core_flood_fast = FF.core_flooding(u_inj=u_inj_fast, pv_inject=pv_inj_fast, p_back=1e5, sw_init=0.2, sw_inj=1.0, rel_perms=rel_perms_hs)
core_flood_slow = FF.core_flooding(u_inj=u_inj_slow, pv_inject=pv_inj_slow, p_back=1e5, sw_init=0.2, sw_inj=1.0, rel_perms=rel_perms_hs)

core_props = FF.core_properties()
ls_res_fast = FF.single_ion_adsorption_water_flood(core_props, fluids_ls, fluids_hs, rel_perms_hs, 
        rel_perms_ls, core_flood_fast, eq_const)
ls_res_slow = FF.single_ion_adsorption_water_flood(core_props, fluids_ls, fluids_hs, rel_perms_hs, 
        rel_perms_ls, core_flood_slow, eq_const)

FF.visualize(ls_res_fast)
FF.visualize(ls_res_slow)


┌ Info: difficulty finding the shock front saturation range!
└ @ Main.FractionalFlow /home/ali/projects/peteng/analytical/FractionalFlow/FractionalFlow.jl:401
┌ Info: difficulty finding the shock front saturation range!
└ @ Main.FractionalFlow /home/ali/projects/peteng/analytical/FractionalFlow/FractionalFlow.jl:401
┌ Info: difficulty finding the shock front saturation range!
└ @ Main.FractionalFlow /home/ali/projects/peteng/analytical/FractionalFlow/FractionalFlow.jl:401
┌ Info: difficulty finding the shock front saturation range!
└ @ Main.FractionalFlow /home/ali/projects/peteng/analytical/FractionalFlow/FractionalFlow.jl:401
Out[3]:
PyObject <matplotlib.legend.Legend object at 0x7f9161fd3dd8>

In [4]:
plot(ls_res_fast.water_cut_time[:,1], ls_res_fast.water_cut_time[:,2], 
    ls_res_slow.water_cut_time[:,1], ls_res_slow.water_cut_time[:,2])
legend(["Late breakthrough", "Early breakthrough"])
xlabel("")


Out[4]:
PyObject Text(0.5, 13.333333333333332, '')

The above figure shows the water cut in each zone. I need to add them together based on the total flow rate in each zone and plot the final value versus time. I need to know the total injection rate, the total surface area of each zone, and the water cut versus time. Then I calculate the new water cut versus time by calculating the total flow of oil and normalizing it.


In [6]:
t_fast = ls_res_fast.water_cut_time[:,1]
WC_fast = ls_res_fast.water_cut_time[:,2]
t_slow = ls_res_slow.water_cut_time[:,1]
WC_slow = ls_res_slow.water_cut_time[:,2]
WC_f =  Spline1D(t_fast, WC_fast, k=1, bc="nearest")
WC_s =  Spline1D(t_slow, WC_slow, k=1, bc="nearest")


Out[6]:
Spline1D(knots=[0.0,168.83 … 29739.5,30000.0] (150 elements), k=1, extrapolation="nearest", residual=0.0)

In [7]:
t = range(0, 25000, length=25000)
WC = (u_inj_fast*A_fast.*WC_f(t)+u_inj_slow*A_slow.*WC_s(t))./(u_inj_fast*A_fast+u_inj_slow*A_slow)


Out[7]:
25000-element Array{Float64,1}:
 0.0               
 0.0               
 0.0               
 0.0               
 0.0               
 0.0               
 0.0               
 0.0               
 0.0               
 0.0               
 0.0               
 0.0               
 0.0               
 ⋮                 
 0.9983087868308875
 0.9983089063084976
 0.9983090257861073
 0.9983091452637176
 0.9983092647413275
 0.9983093842189374
 0.9983095036965474
 0.9983096231741572
 0.9983097426517673
 0.9983098621293772
 0.9983099816069871
 0.9983101010845971

In [19]:
total_pv = pv_inj_fast*A_fast+pv_inj_slow*(1-A_fast)



plot(ls_res_fast.water_cut_time[:,1]./t_fast[end].*total_pv, ls_res_slow.water_cut_time[:,2],
#     ls_res_fast.water_cut_time[:,1]./t_fast[end].*total_pv, ls_res_fast.water_cut_time[:,2], 
    ls_res_slow.water_cut_time[:,1]./t_fast[end].*total_pv, ls_res_slow.water_cut_time[:,2])

plot(t./t_fast[end].*total_pv, WC, linewidth = 2, "--")

legend(["Late breakthrough", "Early breakthrough", "Overall"])

xlabel("Injected PV [-]")
ylabel("Water cut [-]")

savefig("results/water_cut_lowsal_zones.png")



In [13]:
t_fast[end], t_slow[end], total_pv


Out[13]:
(29999.999999999996, 29999.999999999996, 5.733333333333334)

In [18]:
ls_res_fast.water_cut_time[:,1][end], ls_res_slow.water_cut_time[:,1][end]


Out[18]:
(29999.999999999996, 29999.999999999996)