Skip to content

Modeling two-phase flow and transport in porous media using MATLAB.

Notifications You must be signed in to change notification settings

tstran155/MATLAB_modeling_two_phase_flow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 

Repository files navigation

MATLAB modeling two phase flow in porous media

In this project, I formulate an IMPES (Implicit Pressure, Explicit Saturation) method to simulate two-phase fluid displacement experiments in porous media. Consider an experimental setup consisting of a pump, a core sample and a pressure valve. The core is initially saturated with oil and connate water. The pump is connected to the inlet of the core sample and starts injecting pure water into the core with a constant rate (measured at Standard Condition). At the outlet a pressure valve is connected to the core that maintains a constant outlet pressure during the experiment.

Assumptions:

· The core is horizontal and gravity forces are neglected.

· The core is homogenous and isotropic.

· Capillary pressure is neglected.

· At the beginning of the experiment the entire core is pressurized to an initial pressure.

· Fluids are slightly compressible.

· The rock fluid properties are given.

Here are the data input for the model and some key results.

Data input deck

  1. Relative permeabilities and capillary pressure:

PC_ow = 0 [bar]

krw = krwo (Se)nw

kro = kroo (1 - Se)no

Se = (Sw - Swc) / (1 - Swc - Sor)

nw = 3, no = 2, krwo = 0.7, kroo = 0.8, Swc = 0.2, Sor = 0.1

  1. Fluid Densities and viscosities:

· Fluids are slightly compressible with constant compressibility:

ρw_ref = 998 [kg/m3], ρo_ref = 800 [kg/m3]

cw = 10-10 [1/Pa], co = 10-8 [1/Pa], pref = 100 [bar]

· Fluids have constant viscosity:

mu_o = mu_w= 10-3 [Pa.s]

  1. Rock properties:

· Rock is homogenous, isotropic and incompressible:

k = 1 [Darcy], Φ = 0.2, cr = 0 [1/Pa]

  1. Injection and production mode and initial condition:

· Constant injection at the inlet (standard condition):

qw_inj = 12 [mL/min]

qo_inj = 0 [mL/min]

· Production with constant pressure at the outlet:

Ppro = 100 [bar]

· Initial condition:

So_ini = 1 - Swc, Pini = 100 [bar]

Modeling output and sensitivities of the mobility ratio and time step

The mobility ratio is defined as M = (krw.mu_o)/(kro.mu_w). Increasing the mobility ratio is equivalent to decreasing the ratio of viscosities (mu_w/mu_o). The results suggest that increasing the mobility ratio: reduces the time to water break through and lowers the efficiency of production (by increasing the time to produce all viable oil). However, increasing the mobility ratio does reduce the injection pressure necessary to support a constant injection rate.

1. mu_o = mu_w

testAnimated_muy_o=muy_w_stable2

Output_mu_w=mu_o_stable

2. mu_o = 10mu_w

testAnimated_muy_o=10muy_w_stable2

Output_10mu_w=mu_o_stable

3. Unstable solution with mu_o = mu_w

Although I used an implicit method (IMPES) to solve for pressure, stability is not guaranteed due to the embedded assumption of constant saturation over a timestep. Reducing the grid size and time step both tend to increase the accuracy of results, as long as stability requirements are met. However, reducing the time step or grid size increase the time to run the simulations. In this sensityvity, I increased the timestep size from Nt = 400 (stable solutions in previous subsections) to Nt = 100 to illustrate how computational overhead affect the solution stability.

testAnimated_muy_o=muy_w

Output_mu_w=mu_o_unstable

About

Modeling two-phase flow and transport in porous media using MATLAB.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages