Thesis_Anna_Kvashchuk_2015.pdf

Thesis_Anna_Kvashchuk_2015.pdf
A robust implicit scheme for
two-phase flow in porous media
Anna Kvashchuk
Thesis for the degree of Master of Science
in Applied and Computational Mathematics
Department of Mathematics
University of Bergen
Norway
November 2015
Acknowledgments
First of all I would like to express my deep gratitude to my supervisor Florin Adrian
Radu for his help, inspiration and positivity about the project. It was a great pleasure
to work under his wise guidance.
I also would like to thank my husband Sergey Alyaev who challenged me a lot
regarding this work. This thesis would not be so tough and at the same time, satisfying
without him. I am grateful to him for his support, patience and numerous hints and
advices.
I would like to thank the Department of Mathematics and NUPUS group for the
valuable, fascinating and just lovely trip to the USA where we visited great universities
and meet awesome people. I also want to thank Alexander Vasiliev for establishing the
agreement with Saratov State University that gave me an opportunity to study at the
University of Bergen.
I am thankful to all my dear friends who helped me going through it. I thank
Georgy Ivanov and Anastasia Lisenkova for their help with improving my English
language grammar, Anna Varsina and Alexey Tochin for useful conversations during
the breaks and moral support. I am also deeply grateful to my family whose love and
support I felt despite the long distance.
Anna Kvashchuk
November, 2015
Abstract
In this thesis we present a new implicit scheme for the numerical simulation of twophase flow in porous media. Linear finite elements are considered for the spatial discretization. The scheme is based on the iterative IMPES approach and treats the
capillary pressure term implicitly to ensure stability. Under assumption of smoothness
of the capillary pressure and the phase mobility curves, we were able to prove convergence theorem for the scheme. Two dimensional numerical simulations furthermore
verify the convergence.
To illustrate the potential of the new scheme we compare its computational efficiency to our implementation of two other common approaches to the problem: IMPES
and the fully implicit formulation solved by Newton’s method. The advantage of our
scheme over IMPES is improved stability for larger time-step. At the same time, it is
cheaper in terms of computational costs and memory requirements compared to the
Newton method.
Contents
1 Introduction
9
2 Mathematical Model
2.1
2.2
2.3
2.4
13
Mass Conservation . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
13
2.1.1
Physical Properties of Porous Media . . . . . . . . . . . . . . .
14
2.1.2
Mass Conservation Equation for Single-Phase Flow . . . . . . .
14
2.1.3
Mass Conservation Equation for Two-Phase Flow . . . . . . . .
16
Darcy’s Law . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
16
2.2.1
Darcy’s Law for the Hydraulic Head . . . . . . . . . . . . . . .
17
2.2.2
Darcy’s Law for Single-Phase Flow . . . . . . . . . . . . . . . .
18
2.2.3
Darcy’s Law for Two-Phase Flow . . . . . . . . . . . . . . . . .
18
Governing Equations and Common Simplifications of the Two-Phase
Flow Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
18
Two-Phase Flow Model in Averaged Pressure Formulation . . . . . . .
20
3 Numerical Modeling
3.1
23
The Finite Element Method . . . . . . . . . . . . . . . . . . . . . . . .
23
3.1.1
Discretization in Space . . . . . . . . . . . . . . . . . . . . . . .
24
3.1.2
Variational Formulation of the Model Problem
. . . . . . . . .
24
3.2
The IMPES method . . . . . . . . . . . . . . . . . . . . . . . . . . . .
26
3.3
Fully Implicit Scheme . . . . . . . . . . . . . . . . . . . . . . . . . . . .
29
3.3.1
Newton’s Method . . . . . . . . . . . . . . . . . . . . . . . . . .
31
3.3.2
The New Implicit Scheme . . . . . . . . . . . . . . . . . . . . .
33
3.3.3
Proof of Convergence of the New Implicit Iteration Scheme . . .
33
4 Numerical Results
4.1
39
Verification of Convergence . . . . . . . . . . . . . . . . . . . . . . . . .
39
4.1.1
Test case 1 (λn = λw = 1, pc = 0) . . . . . . . . . . . . . . . . .
40
4.1.2
Test case 2 (λn = λw = 1, pc = 1) . . . . . . . . . . . . . . . . .
3
1
Test case 3 (λn = , λw = , pc = 1 − Sw2 ) . . . . . . . . . . . .
4
4
42
4.1.3
43
4.1.4
4.2
Test case 4 (λn , λw from van Genuchten parametrization, pc =
1 − Sw2 ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.1.5 Test case 5 (λn , λw , pc from van Genuchten parametrization) . .
Comparison of the stabilized iterative approach with IMPES and Newton’s scheme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.2.1 Robustness . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.2.2 CPU time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.2.3 Condition Number . . . . . . . . . . . . . . . . . . . . . . . . .
46
48
50
50
51
52
5 Conclusion
55
Appendices
A
Van Genuchten Parametrization . . . . . . . . . . . . . . . . . . . . . .
57
57
Bibliography
59
Chapter 1
Introduction
Multiphase flow in porous media is a problem that appears in many fields of knowledge
and has numerous applications. Whether you study enhanced oil recovery, CO2 storage, groundwater flows or nuclear waste management you have to deal with multiphase
systems. That is why industries are interested in efficient methods for modeling multiphase flow. The numerical methods come into focus as in most cases the analytical
solution cannot be obtained without making significant simplifications that may lead
to an unphysical behavior of the model.
From the mathematical point of view, multiphase flow in porous media can be
represented as a system of coupled nonlinear partial differential equations (PDEs). The
nonlinearity of the system makes development and implementation of robust numerical
schemes a challenging task. Moreover, this kind of problems usually are formulated for
a big and complex structured domain which also brings difficulties.
One way to deal with the complex domain geometry is to use the Finite Elements
Method (FEM) [5] for space discretization. FEM is a commonly used powerful technique for solving systems of PDEs in complex domains as it naturally can be extended
to flexible discretizations. Another advantage of FEM is a relatively easy handling of
boundary conditions and a solid theoretical base that gives it high reliability. Therefore,
in this thesis we are using FEM as a basis for the considered numerical schemes.
The numerical approaches that help to handle nonlinearities in a multiphase flow
system have been developed and improved over the last decades [3, 7]. In this thesis we
study two of the most frequently used classes of numerical schemes for time integration
of the two-phase flow model. The most popular one is called the IMplicit Pressure
Explicit Saturation method, or IMPES [2, 16, 9]. The main feature of this method is
elimination of nonlinearities by taking advantage of the form of the equations. However,
the explicit treatment of the saturation equation results in the restrictions on the timestep [10, 11] which makes the scheme relatively slow. The alternative to IMPES is
the fully implicit scheme [13, 22, 14, 23] which does not have any restrictions on the
time step. The system arising from applying the fully implicit scheme is nonlinear
10
Introduction
and one needs an efficient algorithm for solving it. A common approach is Newton’s
method [18, 21] which has quadratic convergence. This comes at a price of a costly
computation of derivatives at each iteration. Additionally, the mentioned convergence
properties demand that the initial guess is sufficiently close to the true solution which,
in its turn, may imply additional requirements on the step size.
In this thesis we present a new implicit scheme specially tailored for the two-phase
flow model and compare it with the two approaches mentioned above. We base it on
the iterative IMPES approach which is a straightforward way to make a solver for the
implicit scheme. However, our early numerical studies showed that using the naive
iterative IMPES without stabilization as a solver does not bring any improvements
over using IMPES as a semi-explicit scheme. The difficulties arise from nonlinear
coefficients, especially the capillary pressure term. In order to approximate the gradient
of the capillary pressure function which appears in the saturation equation we use a
linear expression involving the saturation at the current and the previous iterations.
This made the scheme stable and more efficient compared with the standard IMPES.
In [20] the authors independently developed a similar approximation for the capillary
pressure function for the two-phase flow model written for the pressure potentials and
also rigorously proved the convergence. In contrast with our approach, they use the
cell-centered finite difference method for the space discretization. Another approach
is presented in [28], where the authors developed a new linearization scheme for the
nonlinear system arising after the finite volume discretization of the two-phase flow
model.
The new scheme developed in this thesis preserves efficiency in treatment of nonlinearities and implementation simplicity of IMPES while relaxing the time step condition
common for explicit methods. At the same time, it does not involve computation of
derivatives, which brings it advantages over Newton’s method. What is more, the
linear systems to be solved at each iteration step for the new scheme are much better conditioned compared with the one resulting for Newton’s method. The rigorous
convergence proof for the proposed scheme is also presented.
The rest of the thesis is organized as follows. In Chapter 2 we provide an overview
of the equations that govern the two-phase flow and derive the mathematical model
for the averaged pressure formulation. Chapter 3 is devoted to an overview of numerical methods for the introduced model. We give a short overview of the Finite
Elements Method, derive the weak form of the problem and discuss different types of
time discretization, both explicit and implicit. The new implicit scheme is presented
in Section 3.3.2 and its convergence is rigorously proven in Section 3.3.3. In Chapter
4 we illustrate the convergence of the new method with several numerical simulations.
The comparison of the new scheme with IMPES and Newton’s iteration for implicit
scheme is demonstrated in Section 4.2. The conclusion and final remarks are made
11
in Chapter 5.
12
Introduction
Chapter 2
Mathematical Model
In order to derive a good mathematical model one should study in depth the physics
behind the modelled process. Porous media has been a subject of research for a quite
a long time now and main constitutive relations were developed in many works [3, 26,
7]. In this chapter we present derivations inspired by the book [26] and follow their
notation.
The aim of this chapter is to construct a mathematical model of two-phase flow. In
this thesis we work with the averaged pressure formulation of the two-phase flow model
and develop various numerical methods for it. This valuable formulation is widely used
in practice.
We start with the fundamental equations that govern single-phase flow in porous
media and basic physical properties of the flow and porous media itself. Then we
introduce a general mathematical model for two-phase flow, from which after some
algebraic manipulations and a change of the primary variables we obtain the averaged
pressure formulation.
2.1
Mass Conservation
The principle of mass conservation is a basic concept in many fields, including fluid
dynamics. This statement is crucial for deriving a mathematical model that describes
fluid flow in porous media. The idea is to consider an arbitrary domain Ω with a
boundary Γ (see Fig. 2.1) and observe how mass changes inside this volume over time.
The change of mass in a particular region is equal to the amount of mass that goes in
or out of Ω trough the boundary Γ, plus any mass added or subtracted with possible
sink or source term. However, in order to write this principal in mathematical equation
we first need to introduce various physical quantities that would be used in our model.
14
Mathematical Model
r
n
Ω
Γ
Figure 2.1: Example of an arbitrary domain Ω.
2.1.1
Physical Properties of Porous Media
A porous medium is a common name for a large group of materials and domains.
Groundwater aquifers, oil reservoirs, human skin and wood, are examples of porous
media. A common property of all these materials is a special structure where part of
the domain is covered by a solid skeleton, also refereed to as the matrix, and the rest
consists of pores filled with fluids. When space is filled with one or several fluids, we
call it single-phase or multi-phase flow respectively. The fluids can be gases or liquids,
or both. In this thesis we consider porous media filled with oil and water.
A porous medium has a complex geometry and cannot be described point-wise
because each single point in space may contain only solid or only fluid. That is why in
this work we use the common approach where instead of a single point we consider the
Representative Elementary Volume (REV). The REV is the smallest possible volume
which contains a representative amount of void and solid such that we can define the
mean (macro) properties with it. The size of the REV should be restricted so that
properties of the medium are still local. Figure (2.2) shows one way of choosing the
size of REV by examining the void fraction. If the size of REV is too small there will
be random oscillations in the void fraction function, however with growth of REV’s size
an equilibrium is reached which means that the best size of REV (V1 on the Figure
2.2) is found.
The volume of voids in REV divided by its total volume is called porosity. Porosity
can be a function of time or space.
2.1.2
Mass Conservation Equation for Single-Phase Flow
We can now derive the equation of mass conservation for an arbitrary domain Ω (Figure
2.1).
The change of the mass in the domain can only be caused by the mass flux through
the boundaries and by mass sources or sinks within the domain. In mathematical terms
2.1 Mass Conservation
15
Void Fraction
1
n
0
0
V1
Volume
Figure 2.2: Schematic representation of the relationship between the void fraction and
the REV volume (modified after [3]).
we can write this statement as:
Z
Z
Z
∂
f · nds + rdV,
ηdV = −
∂t Ω
Ω
∂Ω
(2.1)
where η is mass per volume, f represents the mass flux vector, n - the outer normal
vector and r is any source or sink term within the volume. The units of r are mass per
volume per time.
If there are no sources or sinks (r = 0), or if r represents the external forces, then
m is locally preserved and we call equation (2.1) a conservation law. Otherwise, if
r includes internal changes (like chemical reactions) then it is called mass balance or
transport equation.
In the case of single-phase flow, the following relations hold:
η = ρφ,
f = ρu,
r = F,
(2.2)
where ρ is the density of the fluid, φ is the porosity, u is the volumetric flux vector and
F represents the source or sink of mass term. The volumetric flux is a volumetric flow
rate per area, its dimension is [LT −1 ]. The volumetric flux represents the fluid volume
going through a column in a unit time.
For all time-invariant domains Ω the Leibniz integral rule and the Gauss theorem
yield
Z
∂φρ
+ 5 · ρu − F dV = 0.
(2.3)
∂t
Ω
Under the conditions of sufficient smoothness of the functions in (2.3) one can
16
Mathematical Model
obtain the differential form of the mass conservation equation:
∂φρ
+ 5 · ρu = F.
∂t
(2.4)
If the fluid density depends on time, pressure, temperature etc. the fluid is called
compressible. Otherwise, it is called incompressible. In this thesis we assume that the
fluids we work with are incompressible. Therefore we rewrite the equation (2.4) as
follows:
F
∂φ
+5·u= .
(2.5)
∂t
ρ
2.1.3
Mass Conservation Equation for Two-Phase Flow
In order to derive two-phase flow extension of the mass conservation equation we first
have to introduce new quantities.
The modeling reservoir contains two fluids: oil and water, which brings us to the
fluid property called the fluid phase saturation, Sα . It is a dimensionless quantity
defined as the fraction of pore space occupied by fluid α in REV. It is clear that
0 ≤ Sα ≤ 1, and the sum of all fluid saturations in multi-phase flow will be equal to 1,
P
α Sα = 1.
We will also use the common assumption that our fluids are immiscible (there is
no mass exchange between the fluids) which is usually the case for oil and water.
In that case, the equation (2.4) should hold for each fluid phase α:
∂ρα φSα
+ 5 · ρα uα = Fα .
∂t
(2.6)
Here ρα is the density and uα is the volumetric flux of the fluid α. Note that the
flux of each fluid is different. In the next section we present the equations for the fluxes
uα .
In the case of incompressible flow and solid (porosity φ does not change with time)
we can write the equation above as follows,
φ
Fα
∂Sα
+ 5 · uα =
.
∂t
ρα
(2.7)
Having considered mass conservation equations let us take a look at how the flux
can be approximated.
2.2
Darcy’s Law
Darcy’s law is a fundamental constitutive equation that describes the fluid flow through
porous media. It was experimentally derived by the French engineer Henric Darcy in
2.2 Darcy’s Law
17
the middle of the 19th century, and to this day it forms the basis of the mathematical
modeling of flow in porous media. Darcy’s law has many extensions. In this section
we present the original formulation for the hydraulic head, as well as two extensions Darcy’s law for single-phase and two-phase flow models.
2.2.1
Darcy’s Law for the Hydraulic Head
To formulate Darcy’s law we first have to introduce some quantities. One important
quantity that we have already mentioned is a hydraulic head h, its dimension is length,
or [L]. It shows the direction of the flow: ground water flows from regions with higher
hydraulic conductivity to regions with lower values of h. The hydraulic head represents
the total energy of the water. In this thesis we consider laminar flow meaning that
the velocity of the flow is sufficiently small and we can neglect the kinetic energy.
This means that the total energy, which in general is the sum of kinetic and potential
energy, is represented only by the potential energy. The potential energy itself is a
sum of pressure potential and gravitational potential inside the aquifer which can be
expressed as follows:
mρh = pV + mgz.
(2.8)
As a consequence, we obtain a useful expression for the hydraulic head in terms of
the pressure:
p
+ z.
(2.9)
h=
ρg
The second quantity is hydraulic conductivity κ. In general case, the hydraulic
conductivity is a tensor with dimension [LT −1 ]. It is a function of both the porous
medium and the fluid, and it indicates how easily the fluid flows through the material.
It can be expressed as
kρg
κ=
,
(2.10)
µ
where µ is viscosity, ρ fluid density, g gravitational acceleration and k is a very important property of the porous medium called intrinsic permeability, or just permeability. It measures the ability of fluid to flow through porous media. It has dimension [L2 ], however, the derived units called Darcy or milliDarcy are usually used,
(1Darcy ∼ 10−12 m2 ). In general case permeability is a space dependent tensorial quantitiy. In certain cases there can be simplifications.
Darcy’s law presents a relation between all these quantities. In the differential form
it says:
u = −κ 5 h,
(2.11)
where u is the volumetric flow rate, κ is the hydraulic conductivity and h is the
hydraulic head.
18
Mathematical Model
2.2.2
Darcy’s Law for Single-Phase Flow
In our work we use the pressure formulation of Darcy’s law which can be easily obtained
from (2.11) using the expression for the hydraulic conductivity (2.10) and the hydraulic
head (2.9):
k
k
u = − (5p + ρg 5 z) = − (5p − ρg),
(2.12)
µ
µ
where g = −gez = (0, 0, −g)T is the gravitational acceleration vector.
2.2.3
Darcy’s Law for Two-Phase Flow
Darcy’s law in the form (2.12) is used to model single-phase flow when all the pores
are filled with one fluid and the whole pore space in available for this fluid to flow. To
model two-phase flow we need to deal with a system where part of the pores is already
occupied with one fluid, which obstructs the flow of the second fluid. This implies lower
permeability for both fluids. That is why we need to introduce the relative permeability,
kr,α = kr,α (Sα ), which is different for each phase α. In the general case it is anisotropic.
There exists various models based on experimental data that parameterize the relative
permeability. It is most commonly approximated as a scalar nonlinear function of the
saturation. In this thesis we used van Genuchten parametrization, see Appendix A,
(5).
We can now formulate Darcy’s law for the multi-phase flow as an extension of
equation (2.12) as follows:
uα = −
kr,α k
(5pα − ρα g).
µα
(2.13)
We will now introduce a new function, called the phase mobility, λα , which is defined
kr,α
as the ratio of the relative permeability function to the phase viscosity, λα =
. With
µα
this definition Darcy’s law may be written as follows:
uα = −λα k(5pα − ρα g).
(2.14)
Later on we will refer to the equation (2.14) as Darcy’s law for two-phase flow.
2.3
Governing Equations and Common Simplifications of the Two-Phase Flow Model
The two main equations on which our model is based are Darcy’s law for two-phase flow
and the mass conservation equations for each fluid phase. We have already introduced
both of them, so we can write the mass conservation law (2.4) and Darcy’s law for
2.3 Governing Equations and Common Simplifications of the Two-Phase
Flow Model
19
two-phase flow (2.14) for each phase:
uw = −λw k(5pw − ρw g),
un = −λn k(5pn − ρn g),
∂Sw
Fw
φ
+ 5 · uw =
,
∂t
ρw
∂Sn
Fn
φ
+ 5 · un =
.
∂t
ρn
(2.15)
To derive this system of equation we made a simplifying assumption of: we assumed
incompressibility of fluids and solid matrix (φ, ρw , ρn are constants). Also, as before,
we assumed immiscible and non-diffusive fluids.
Let us mention that even under the assumptions above, system (2.15) is not closed.
For example, in 2D case we have six equations with eight unknowns (uiw , uin , pw , pn ,
Sw , Sn ). After adding the equation for the sum of two saturations Sw + Sn = 1 we still
miss one equation.
To close the system we have to investigate carefully the relation between pressures pn
and pw . Note that the pressure on each side of the fluid-fluid interface may be different
because of the inter-facial tension between the two phases. The fluid acts differently
in contact with the solid part of the reservoir. Figure (2.3) shows the differences in
the contact angle of water and oil with the surface. The fluid that is preferentially
attracted by the solid is called the wetting fluid. The contact angle of such fluid with
the solid is less then 90°, θ < 90°. The other fluid is referred to as the non-wetting
fluid. In this thesis we model the reservoir that contains oil and water, and water in
this situation is a wetting fluid, while oil is non-wetting.
Oil
Water
θ
θ
Water
Oil
Watter
Solid
Solid
Figure 2.3: The contact angle between the wetting fluid (water) and a solid (a), and
between the non-wetting fluid (oil) and a solid.
We define the difference between the phase pressures as the capillary pressure:
pc = pn − pw .
(2.16)
Generally, the function pc is chosen based on laboratory experiments. As laboratory
measurements can be taken only when an equilibrium is reached, it is usually parameterized as an algebraic function of the phase saturation, pc = pc (Sw ) [3]. Including the
20
Mathematical Model
capillary pressure makes the model more realistic, even though the parametrization of
the capillary function is a complicated problem itself and requires deep studying. There
are several types of parametrization, for example the van Genuchten parametrization,
see Appendix 5.
After adding appropriate boundary and initial conditions we get a closed system of
equations that describe two-phase flow:
uw = −λw k(5pw − ρw g),
un = −λn k(5pn − ρn g),
∂Sw
Fw
+ 5 · uw =
,
φ
∂t
ρw
∂Sn
Fn
φ
+ 5 · un =
,
∂t
ρn
(2.17)
Sw + Sn = 1,
pn − pw = pc (Sw ),
Sw0 = Sw (x, t0 ),
p|∂Ω = pΓ .
Sw |∂Ω = SwΓ ,
2.4
p0 = p(x, t0 ),
Two-Phase Flow Model in Averaged Pressure
Formulation
There are different ways to rewrite the system (2.17). In this thesis we work with the
averaged pressure formulation which is a commonly used practical reformulation of the
equations (2.17), where the averaged pressure and the saturation of the wetting fluid
phase are used as the primary variables.
We consider a new function called the averaged pressure, which we define as
p=
pn + p w
.
2
(2.18)
In order to express pn and pw in terms of the averaged pressure and the capillary
pressure we can use (2.16) and (2.18):
1
pw = p − pc ,
2
1
pn = p + pc .
2
(2.19)
Summing up two mass conservation equations from the system (2.15) results in
following equation:
φ
∂(Sw + Sn )
Fw Fn
+ 5 · (uw + un ) =
+
.
∂t
ρw
ρn
(2.20)
2.4 Two-Phase Flow Model in Averaged Pressure Formulation
21
Since the sum of the saturations is equal to one, Sw + Sn = 1, the first term in the
equation above is zero.
Substituting (2.19) into (2.15) and summing up the first two equations of the fluxes,
we get the following expression for the total flux uΣ = uw + un
1
1
uΣ = uw + un = −λw k 5 (p − pc − ρw g) − λn k 5 (p + pc − ρn g)
2
2
λn − λw
= −k(λw + λn ) 5 p − k
5 pc + (λw ρw + λn ρn )k 5 g.
2
(2.21)
Let us now introduce the total mobility function, λΣ :
λΣ = λw + λn .
(2.22)
Combining equations (2.22), (2.21) and (2.20) and neglecting the gravity term (as
we will model these equations in a 2D domain), we get a new equation which we will
later refer to as the pressure equation:
− 5 · k(λΣ 5 p +
X Fα
λn − λw
5 pc ) =
2
ρ
α=n,w α
(2.23)
In this work we use a common approach to identify unknown parameter functions
as functions of Sw . Therefore in our model we combine the pressure equation with the
mass conservation equation for the water phase and later on refer to it as saturation
equation:
1 Fw
∂Sw
− 5 · λw k 5 (p − pc ) =
.
(2.24)
φ
∂t
2
ρw
To ensure that the solution of our final system of equations is unique and that the
problem is well-posed, we add initial conditions, appropriate boundary conditions and
a parametrization for the functions λn , λw and pc .
Finally, the two-phase flow model in the averaged pressure formulation takes the
form:
X Fα
λn − λw
− 5 · k(λΣ 5 p +
5 pc ) =
,
2
ρ
α=n,w α
φ
∂Sw
1 Fw
− 5 · λw k 5 (p − pc ) =
,
∂t
2
ρw
Sw0 = Sw (x, t0 ),
Sw |∂Ω = SwΓ ,
p0 = p(x, t0 ),
p|∂Ω = pΓ .
(2.25)
22
Mathematical Model
Chapter 3
Numerical Modeling
The system (2.25) derived in the previous chapter cannot be solved analytically for
general cases. Moreover, nonlinearities make numerical simulation extra challenging.
In this chapter we present the numerical schemes we use to solve the system (2.25).
First, we give a short overview of the finite element method. Second, we examine when
implicit and explicit methods can be applied, whether we can combine them, and
how one can treat nonlinearities in implicit solutions. We briefly present the standard
approaches (IMPES (Section 3.2) and Newton’s method (Section 3.3.1)) and propose
a new implicit scheme (see Section 3.3.2). In Section 3.3.3 we prove rigorously that the
new scheme is global convergent. Only a relatively mild constraint on the time step
size is required.
3.1
The Finite Element Method
The finite element method (FEM) is a powerful and commonly used technique for
finding numerical solutions of partial differential equations. While it is difficult to
give a specific date when FEM was invented, it is clear that this method was derived
from the finite differences method in the 1950’s [30]. As a computational method it
originated in the engineering literature and the name of the finite element method
appeared first in [8].
The finite element method has a solid theoretical foundation based on Sobolev space
theory which brings it several advantages. The theoretical base gives it reliability,
makes it easier to work with general boundary conditions, complex domain geometry,
variable material properties, etc. In many cases exact error estimates for finite element
solutions can be obtained [5].
First we discuss the space discretization, examine the model problem and then show
how we applied the FEM technique to our model problem.
24
Numerical Modeling
3.1.1
Discretization in Space
Oil reservoirs are 3D structures with highly complex geometry. However, most permeable formations have a horizontal extent that is much greater then the vertical extent.
As a consequence, the flow is mostly horizontal and it is usually the case that the
number of dimensions can be reduced to two.
In this thesis we solve the system (2.25) in a 2D domain. The domain is divided into
a finite number of small sub-domains, also called elements. One can choose different
types of elements. In this thesis we work with triangles. We cover Ω with a set
Th = T1 , ..., Tm of non-overlapping triangles Ti , such that Ω = ∪T = T1 ∪ T2 ∪ ... ∪ Tm
T ∈Th
and no vertex of one triangle lies on the edge of another triangle. This process is
called triangulation. Figure (3.1) presents an example of triangulation of a domain
with complex structure.
1
0.8
0.6
0.4
0.2
0
−0.2
−0.4
−0.6
−0.8
−1
−1.5
−1
−0.5
0
0.5
1
1.5
Figure 3.1: Example of a triangular mesh on a complex structured domain.
3.1.2
Variational Formulation of the Model Problem
Let us start by considering a model problem where we solve an elliptic PDE with
zero boundary conditions. This model problem corresponds to the pressure equation
(2.23) in a simpler form (as if we have no capillary pressure). We derive a variational
formulation of this problem and provide guidance on applying the finite element method
to solving this problem numerically. For the case of the variational formulation we
search for a weak solution. This solution and its derivative should be square integrable
[5]. The space of such functions is called H 1 .
3.1 The Finite Element Method
25
Model problem. Find u ∈ H 1 such that
− 5 · (a 5 u(x)) = f (x),
∀x ∈ Ω,
u(x)|∂Ω = 0,
(3.1)
(3.2)
where Ω is a bounded open domain in R2 with a boundary ∂Ω, a is a given weight
function (a symmetric positive definite matrix), and f (x) is also a known function.
In order to derive the variational formulation we multiply both sides of (3.1) by a
test function υ(x) ∈ H 1 and integrate them over the whole domain Ω. From now on,
we write a, u, f, υ instead of a(x), u(x), f (x), υ(x) for conciseness:
Z
Z
5 · (a 5 u) υ dx =
−
f υ dx.
Ω
Ω
Integrating by parts and using the zero boundary condition (3.2) we arrive at
Z
Z
a 5 u · 5υ dx =
f υ dx.
Ω
Ω
This is the variational formulation of the model problem.
R
It is easy to see that Ω a 5 u · 5υ dx is a bilinear form. Let us introduce a new
notation for it
Z
a(u, υ) ≡
a 5 u · 5υ dx,
(3.3)
Ω
and a linear functional
Z
l(υ) ≡ hf, υiL2 ≡
f υ dx,
(3.4)
Ω
where h. , . iL2 is the L2 -inner product.
Now we can construct the finite element method (FEM) for (3.1)-(3.2).
At the first step of FEM we define a finite-dimensional space Vh ∈ H 1 of piecewise
linear continuous functions Vh = {υ : υ is continuous on Ω, linear on each Ti , υ = 0
on Γ}. The basis functions φj ∈ Vh , j = 1, . . . , M then are defined for each node
Ni , i = 1, . . . , M of Th , excluding nodes on the boundary:
(
φj (Ni ) =
1 if i = j,
0 if i 6= j,
i, i = 1, . . . , M.
Any function v ∈ Vh now has a representation through these basis functions
v(x) =
M
X
αi φi (x),
αi = v(Ni ), for x ∈ Ω ∪ Γ.
i=1
We can now formulate the finite element method as follows.
26
Numerical Modeling
FEM Formulation. Find uh ∈ Vh such that
a(uh , υh ) = l(υh ) υh ∈ Vh .
(3.5)
The unknown function is represented as a combination of basis functions:
uh (x) =
M
X
αi φi (x),
αi = uh (Ni ).
(3.6)
i=1
Then we substitute this representation into (3.5), use the basis function φi as the test
function υh and get:
M
X
αj a(φj , φi ) = l(φi ),
i = 1, . . . , M.
(3.7)
j=1
This can be written as a system of linear equations
Aξ = b,
(3.8)
where ξ = (α1 , . . . , αM )T , b = (l(φ1 ), . . . , l(φM ))T and the matrix
A=
X Z
K∈Th
a 5 φi · 5φj dx
(3.9)
K
is called the weighted stiffness matrix. To calculate this matrix we only need to compute
the gradient of the linear basis functions that are non-zero on the triangle. Each basis
function is equal to one in one node of the triangular K and zero in two others. There
are numerous books dedicated to the finite element method, where one can find a
detailed description of the matrix assembling, see e.g. [5].
By solving the system (3.8) we can easily find the unknown function uh . There
are various works where the existence and uniqueness solution is proven, for example
[18]. Here we will only mention that the Lax-Milgram theorem provides the list of
requirements that must be satisfied for existence and uniqueness of the solution and
the book [18] contains a prove that our model problem satisfies this theorem conditions.
3.2
The IMPES method
Note that the equation (2.24) depends on time and space. It means that we need not
only space discretization, but also discretization in time.
We begin with the most common solution procedure the IMplicit Pressure Explicit
Saturation method (IMPES)[26]. As it says in the name of the scheme, we solve the
3.2 The IMPES method
27
saturation equation explicitly. In other words, we use the standard finite-differences
approximation for the time derivative
S n+1 − Swn
∂Sw
= w
,
∂t
∆t
(3.10)
where ∆t = tn+1 − tn and 0 = t0 ≤ t1 ≤ · · · ≤ tN = T . The initial information is
available from the initial conditions.
All other coefficients depending on Sw are computed using the value of the saturation found at the previous time step. This scheme is a well-known fixed step solver
called the forward or the explicit Euler method. Now we can write the finite element
approximation of the equations (2.25) in terms of solving it with the IMPES method.
n+1
Find pn+1
∈ Vh ∀υh ∈ Vh such that
h , Sh
− h5 ·
λΣ (Shn )
5
pn+1
h
λn (Shn ) − λw (Shn )
n
5 pc (Sh ) , υh i = hFpr , υh i,
+
2
Shn+1 − Shn
1
n
n
n+1
hφ
− 5 · λw (Sh ) 5 (p
− pc (Sh )) , υh i = hFsat , υh i,
∆t
2
(3.11)
(3.12)
Fw
Fα
and Fsat =
.
ρα
ρw
First of all, we need to write the variational formulation for our system (2.25) in
the same way as we did for the model problem.
where Fpr =
P
α=n,w
We again multiply the equations in the system by the test function, integrate them
over the domain Ω and apply the divergence theorem. Hence, for the pressure equation
we obtain
Z Z
λn (Shn ) − λw (Shn )
n+1
n
n
5 pc (Sh ) · 5υh dx =
Fpr υh dx.
λΣ (Sh ) 5 ph +
2
Ω
Ω
Let us denote λdif = λn − λw , then
Z
Ω
λΣ (Shn )
5
pn+1
h
Z
· 5υh dx =
Z
Fpr υh dx −
Ω
Ω
λdif (Shn )
5 pc (Shn ) · 5υh .
2
(3.13)
The same procedure should be applied to the saturation equation. Note that the
test function for the saturation equation may belong to a different space than the
test function for the pressure equation. And what is more important, the saturation
function itself may not belong to the same class as the pressure function.
Nevertheless, we used the same approximation for the saturation equation:
28
Numerical Modeling
S n+1 − Shn
φ h
υh dx +
∆t
Ω
Z
Z Z
1
n+1
n
n
λw (Sh ) 5 (ph − pc (Sh )) · 5υh dx =
Fsat υh dx,
2
Ω
Ω
Z
Z
Z
φ
φ
n+1
n
· 5υh dx
S υh dx −
S υh dx + λw (Shn ) 5 pn+1
h
∆t Ω h
∆t Ω h
Ω
Z
Z
1
n
n
Fsat υh dx,
λw (Sh ) 5 Pc (Sh ) · 5υh dx =
−
Ω
Ω 2
φ
∆t
Z
+
Ω
Z
φ
dx =
∆t
Z
Z
dx − λw (Shn ) 5 pn+1
· 5υh dx
h
Ω
Ω
Ω
Z
1
n
n
λw (Sh ) 5 Pc (Sh ) · 5υh dx + Fsat υh dx.
2
Ω
Shn+1 υh
Shn υh
(3.14)
Let us represent the unknown functions as combinations of the basis functions:
pn+1
h (x)
=
M
X
ξi φi (x),
ξi = pn+1
h (xi ),
(3.15)
ηi φi (x),
ηi = Shn+1 (xi ).
(3.16)
i=1
Shn+1 (x)
=
M
X
i=1
We use the corresponding basis function φi as the test function υh .
The phase mobility and the capillary pressure functions are approximated by their
average values on each triangle.
In the numerical implementation we work with the equations (3.13)-(3.14) elementwise. It means that all the values are first calculated over each triangle and then
combined together to get a linear system similar to the one we obtained for the model
problem.
Let us write the equations (3.13)-(3.14) for each element K ∈ Th :
Z
ξi λ0Σ
Z
5 φi · 5φj dx =
ηin+1 φi φj
Fpr φi dx −
K
K
Z
Z
Z
dx = φ
(3.17)
Z
dx − ∆t
λ0w xii λ0Σ 5 φi · 5φj dx
K Z
K
K
Z
1 0
Fsat φi dx.
+ ∆t
λw pc,i 5 φi · 5φj + ∆t
K 2
K
φ
ηin φi φj
K
λ0dif
pc,i 5 φi · 5φj ,
2
(3.18)
In spite of the complicated form, the equations above represent a system of linear
3.3 Fully Implicit Scheme
29
equations. The last step in obtaining the system is to compute the stiffness matrix
A=
X Z
K∈Th
and the matrix
B=
5φi 5 φj dx
(3.19)
K
X Z
K∈Th
φi φj dx.
(3.20)
K
We already know how to deal with the stiffness matrix (3.9) from the model problem,
and in order to calculate the matrix B we use the following formula [12]:
ZZ
N1i N2j N3k dA =
A
i!j!k!(2A)
.
(i + j + k + 2)!
(3.21)
The boundary conditions (BCs) are another important aspect. There are several
types of boundary conditions and of their combinations. In this thesis we consider two
types of BCs, Dirichlet’s:
u(x) = uD (x) on Γ,
(3.22)
∂u
on Γ. We implemented both types of boundary conditions, however,
and Neumann’s
∂n
this is not the main part of our research, so we just mention that we used well known
techniques for treating boundary conditions, see e.g. [18].
3.3
Fully Implicit Scheme
We work with the two-phase flow model (2.25) that consists of two coupled nonlinear
partial differential equations. The nonlinearity causes numerical difficulties for solving
them.
One common approach to solve the system (2.25), IMPES, was already presented in
the previous section. This type of time discretization provides a good tool for finding
the numerical solution of the system as it eliminates nonlinearities in the equations.
However, an explicit solving of the saturation equation causes stability problems and
imposes restrictions on the size of the time-step.
Another approach is the fully implicit scheme. In this scheme the equations are
coupled and simultaneously solved at each time step; all the terms are treated implicitly,
including the capillary pressure. An advantage of this method is the unconditional
stability, but it cannot help in dealing with nonlinearities.
The nonlinear fully discrete variational formulation of our system (2.25) at the time
tn is written as follows.
30
Numerical Modeling
n+1
Find pn+1
∈ Vh such that the following equations are satisfied ∀υh ∈ Vh :
h , Sh
λn (Shn+1 ) − λw (Shn+1 )
n+1
n+1
n+1
5 pc (Sh ) , υh i = hFpr , υh i,
− h5 · λΣ (Sh ) 5 ph +
2
(3.23)
1
Shn+1 − Shn
− 5 · λw (Shn+1 ) 5 (pn+1 − pc (Shn+1 )) , υh i = hFsat , υh i.
(3.24)
hφ
∆t
2
As υh ∈ Vh it means that υh is equal to zero on a boundary of the domain, which
means that after applying the divergence theorem the equations above become:
λn (Shn+1 ) − λw (Shn+1 )
n+1
n+1
n+1
h λΣ (Sh ) 5 ph +
5 pc (Sh ) , 5υh i = hFpr , υh i, (3.25)
2
Shn+1 − Shn
1
n+1
n+1
n+1
hφ
, υh i + h λw (Sh ) 5 (ph − pc (Sh )) , 5υh i = hFsat , υh i.
∆t
2
(3.26)
The equations (3.25)-(3.26) are still coupled nonlinear equations and in order to
solve them numerically one should think about a method that is suitable for solving
such equations. One of the possibilities is Newton method (see Section 3.3.1) where
the pressure and the saturation equations are coupled and solved as one at each iteration. The benefit of this method is the stability and the second order of convergence.
However, in terms of the computational cost and the memory requirements it is an
expensive method because it requires Jacobian matrix computation at each iteration.
Another concern is how close the initial guess is to the true solution, which results in
the restrictions on the time-step.
Thus, it is natural to come up with an IMPES-based solver that would maintain
cheap computational costs of IMPES while relaxing its stability constraints. Such
improved versions of the classical IMPES scheme were presented in several works,
see [19, 20, 25, 6]. One of them is the iterative IMPES where equations are split
and solved at each iteration using the IMPES method. This approach has a serious
disadvantage. Decoupling the pressure and the saturation equations implies an explicit
treatment of the capillary pressure which results in additional restrictions on the time
step. The authors of [20] developed a new iterative IMPES scheme where they use a
linear approximation of the capillary pressure function at the current iteration. The
authors proved that such scheme applied to two-phase incompressible flow written for
the pressure potentials is stable. For the spacial discretization they used the cellcentered finite difference method.
We also gain an understanding of implicit treatment of the capillary pressure function as with explicit solving we cannot guarantee the convergence of the method. That
is why we developed a new implicit scheme that is based on the iterative IMPES scheme
but handles the capillary pressure implicitly. A detailed explanation of the new implicit
3.3 Fully Implicit Scheme
31
scheme is provided in Section 3.3.2 and Section 3.3.3 presents a rigorous proof of its
convergence.
3.3.1
Newton’s Method
Newton’s method (also called the Newton–Raphson method) is one of the most common
and powerful techniques to find a numerical approximation for the roots (or zeros) for
systems of nonlinear equations. The method has the second order of convergence, see
[29].
We want to apply Newton’s method for finding the numerical solution of the discretized nonlinear system resulting from (3.25)-(3.26) and compare its performance
with IMPES and our new implicit scheme.
First, we introduce Newton’s method for multiple variables. Assume we are looking
for the solution of the system
K(u) = f .
(3.27)
For this system we define the residual as
r(u) = K(u) − f .
(3.28)
In other words, we are solving the equation r(u) = 0. In order to obtain the classical
Newton’s method for this equation we follow derivation from [29]. Let ξ be a zero of
the function r which is differentiable in the neighbourhood N (ξ). Then the Taylor
expansion of r about u0 ∈ N (ξ) is
r(ξ) = 0 = r(u0 +(ξ−u0 )) = r(u0 )+Dr(u0 )(ξ−u0 )+D2 r(u0 )
(ξ − u0 )2
+. . . (3.29)
2!
If we neglect terms with the second order derivative and higher, we get an estimation
for the root of the equation (3.28):
ξ ≈ u0 − J −1 r(u0 )r(u0 ),
(3.30)
where J is the Jacobian matrix of the residual and can be computed as:


∂r 1 (u) ∂r 1 (u)
∂r 1 (u)
...
 ∂u1
∂u2
∂un 


 ∂r 2 (u) ∂r 2 (u)
∂r 2 (u) 


...
∂r i
 ∂u

0
∂u
∂u
Jr(u ) =
=
.
1
2
n 
∂uj  .
.. 
...
 ..

. 

 ∂r n (u) ∂r n (u)
∂r n (u) 
...
∂u1
∂u2
∂un u=u0
(3.31)
32
Numerical Modeling
The approximation ξ should be close to the unknown root, however, it still needs
corrections. This brings us to the iteration process:
un+1 = un − J −1 r(un )r(un ).
(3.32)
The equation (3.32) is the Newton iteration formula.
In order to apply Newton’s method to the problem (3.25)-(3.26) we first need to
write it in the matrix form (3.27). As we want to solve the system (3.25)-(3.26) with
the help of the FEM, we need to derive FEM formulation similarly as we get it for
IMPES in section (3.2). The matrix form of the problem (3.25)-(3.26) then can be
written as:

  n+1

n+1
"
#
p
λ
(S
)
dif
n+1
h
A   n+1
0

hFpr , υh i
 λΣ (Sh )A
=
2
,
×

 Sh

n
∆t
n+1
n+1
hF
,
υ
i
+
φBS
sat
h
h
∆tλw (Sh )A φB − λw (Sh )A
pc (Shn+1 )
2
(3.33)
where A and B are the same as is (3.19)-(3.20).
Thus, in our case K, u and f from (3.32) are written as follows:

λdif (Shn+1 )
A 
0

2
K=
,
∆t
∆tλw (Shn+1 )A φB − λw (Shn+1 )A
2

 n+1
p
 n+1

,
u=
S
h


n+1
pc (Sh )
"
#
hFpr , υh i
f=
.
hFsat , υh i + φBShn

λΣ (Shn+1 )A
(3.34)
(3.35)
(3.36)
To compute the Jacobian matrix J(un ) we first write the system (3.33) for each
triangle K. When computing the derivatives we exploit the sparsity of the system.
It means that we compute the derivative on each triangle separately and then add
the computed values to the proper positions in the final Jacobian matrix. We use the
following approximation for the derivatives:
∂r i1
 ∂pj

J =
 ∂r i
2
∂pj


∂r i1
∂Swj 

,
∂r i 
2
∂Swj
(3.37)
3.3 Fully Implicit Scheme
∂r il
r il (p + εej , Sw ) − r il (p, Sw )
,
=
ε
∂pj
33
∀i, j, l
(3.38)
where ej is a vector with zeros in all components except of j’s which is equal to one ej =
(0, 0, . . . , 1, 0, . . . 0)T . The length of this vector is six which corresponds to the number
of unknowns on each triangle (three unknown pressure values and three saturation
values). This approximation looks like the standard finite-difference approximation for
the derivatives, however it represents a discrete functional derivative with respect to
model variables. The stopping criteria for the Newton iteration process is ||un+1 −
un ||L2 ≤ δ.
Later in this thesis we will refer to the Newton’s implementation of the implicit
method as simply Newton’s method.
3.3.2
The New Implicit Scheme
In the averaged pressure formulation of the two-phase flow model (2.25) the capillary
pressure appears under the gradient, but it still depends on the unknown Shn+1,i+1 . We
approximate it as follows:
5 pc (Shn+1,i+1 ) ∼ p0c (Shn+1,i ) 5 Shn+1,i+1 .
(3.39)
Assume that we know the discrete solution at the fixed time tn . Then in order to
find a solution at the next time step we start the iteration process. The iterations start
with the solution at the previous time step, i.e. Shn+1,0 = Shn .
Then the new iteration scheme to solve (2.25) reads as follows.
, Shn+1,i+1 such that
Let Shn and Shn+1,i be given. Find pn+1,i+1
h
!
n+1,i
n+1,i
λ
(S
)
−
λ
(S
)
n
w
h
h
h λΣ (Shn+1,i ) 5 pn+1,i+1
+
5 pc (Shn+1,i ) , 5υh i = hFpr , υh i,
h
2
(3.40)
1
Shn+1,i+1 − Shn
hφ
, υh i + h λw (Shn+1,i ) 5 (pn+1,i+1
− pc (Shn+1,i+1 )) , 5υh i = hFsat , υh i.
h
∆t
2
(3.41)
− pn+1,i+1
)|| ≤ ε.
The stopping criterion is ||(Shn+1,i − Shn+1,i+1 )|| ≤ ε, ||(pn+1,i
h
h
3.3.3
Proof of Convergence of the New Implicit Iteration Scheme
In this section we present the convergence proof that was inspired by [24, 27]
In order to prove that the scheme above converges, we need to make the following
assumptions.
dpc (Sw )
0
(A1) The functions λw , λn , λΣ = λw + λn , λdif = λw − λn , pn+1
h , pc , p c =
dSw
and 5pc are Lipschitz continuous in the domain Ω (which also means that all of them
34
Numerical Modeling
are bounded in this domain).
(A2) pc is a decreasing function, and, as a consequence, p0c ≤ 0.
From now on we will use the following notation:
= pn+1
ei+1
− pn+1,i+1
,
p
h
h
= Shn+1 − Shn+1,i+1 .
ei+1
s
(3.42)
Theorem 3.3.1. Under the assumptions (A1)-(A2) the scheme (3.40)-(3.41) converges linearly when the time step satisfies (3.51).
Proof. Subtracting (3.40) from (3.25), and (3.41) from (3.26) we get
hλΣ (Shn+1 )
−
5
pn+1
h
−
λΣ (Shn+1,i )
5
pn+1,i+1
, 5υh i
h
λn (Shn+1 ) − λw (Shn+1 )
5 pc (Shn+1 )
+
2
λn (Shn+1,i ) − λw (Shn+1,i )
5 pc (Shn+1,i ), 5υh = 0,
2
φ i+1
hes , υh i + h λw (Shn+1 ) 5 pn+1
− λw (Shn+1,i ) 5 phn+1,i+1 , 5υh i
h
∆t
1
+ hλw (Shn+1,i ) 5 pc (Shn+1,i+1 ) − λw (Shn+1 ) 5 pc (Shn+1 ), 5υh i = 0.
2
We can rewrite the first equation as
hλΣ (Shn+1 ) 5 pn+1
∓ λΣ (Shn+1,i ) 5 pn+1
− λΣ (Shn+1,i ) 5 pn+1,i+1
, 5υh i
h
h
h
λn (Shn+1 ) − λw (Shn+1 )
λn (Shn+1,i ) − λw (Shn+1,i )
n+1
5 pc (Sh ) ∓
5 pc (Shn+1 )
+
2
2
n+1,i
n+1,i
λn (Sh ) − λw (Sh )
−
5 pc (Shn+1,i ), 5υh = 0,
2
which is further equivalent to
n+1,i
) 5 ei+1
h(λΣ (Shn+1 ) − λΣ (Shn+1,i )) 5 pn+1
p , 5υh i
h , 5υh i + hλΣ (Sh
!
λn (Shn+1 ) − λw (Shn+1 ) λn (Shn+1,i ) − λw (Shn+1,i )
+
−
5 pc (Shn+1 ), 5υh
2
2
λn (Shn+1,i ) − λw (Shn+1,i )
+
5 (pc (Shn+1 ) − pc (Shn+1,i )), 5υh = 0.
2
Let us test the equation above with υh = ei+1
p .
n+1,i
2
i+1
) − λΣ (Shn+1 )) 5 pn+1
λ0Σ || 5 ei+1
p || ≤ h(λΣ (Sh
h , 5ep i
λn (Shn+1,i ) − λn (Shn+1 )
λw (Shn+1,i ) − λw (Shn+1 )
n+1
i+1
+
5 pc (Sh ), 5ep
+
5 pc (Shn+1 ), 5ei+1
p
2
2
λn (Shn+1,i ) − λw (Shn+1,i )
+
5 (pc (Shn+1,i ) − pc (Shn+1 )), 5ei+1
.
p
2
3.3 Fully Implicit Scheme
35
As the functions λw , λn , λΣ , λdif , pn+1
h , 5pc are Lipschitz continuous by (A1) we can
use the Lipschitz inequality for them. From Lipschitz continuity it follows that these
functions are also bounded in the domain Ω which means that we can replace them
with the largest value of each function in the domain.
1
i
i+1
2
i
i+1
λ0Σ || 5 ei+1
p || ≤ LλΣ Mp ||es |||| 5 ep || + Lλn Mpc ||es |||| 5 ep ||
2
1
1 0
i
i+1
+ Lλw Mpc ||eis |||| 5 ei+1
p || + λdif Lpc ||es |||| 5 ep ||.
2
2
After additional algebraic manipulations, we can get the following estimation for the
error of the pressure function:
|| 5
ei+1
p ||
≤
λ0dif Lpc
LλΣ Mp Lλn + Lλw
+
Mpc +
λ0Σ
2λ0Σ
2λ0Σ
||eis ||.
(3.43)
Let us return to the second equation.
n+1
φhei+1
) 5 (pn+1
− pn+1,i+1
), 5υh i
s , υh i + ∆thλw (Sh
h
h
+ ∆th(λw (Shn+1 ) − λw (Shn+1,i )) 5 pn+1
h , 5υh i
∆t
hλw (Shn+1,i ) 5 pc (Shn+1,i+1 ) − λw (Shn+1 ) 5 pc (Shn+1 ), 5υh i = 0.
+
2
(3.44)
(3.45)
(3.46)
We have to compute the gradient of the capillary pressure function, which depends on
the unknown Shn+1,i+1 . To do it, we use the following approximation
5pc (Shn+1,i+1 ) ∼ p0c (Shn+1,i ) 5 Shn+1,i+1 .
By substituting this approximation in (3.44) we obtain:
n+1
n+1
φhei+1
) 5 ei+1
) − λw (Shn+1,i )) 5 pn+1
s , υh i + ∆thλw (Sh
p , 5υh i + ∆th(λw (Sh
h , 5υh i
∆t
hλw (Shn+1,i )p0c (Shn+1,i ) 5 (Shn+1 − Shn+1,i+1 ), 5υh i
−
2
∆t
h(λw (Shn+1,i )p0c (Shn+1,i ) − λw (Shn+1 )p0c (Shn+1 )) 5 Shn+1 , 5υh i = 0.
+
2
Let us test the equation above with υh = en+1
. At this point we also use the
s
assumption (A2). As the function p0c is negative, its smallest value is also negative and
we denote it as min(p0c ) = −Mp0c , where Mp0c ≥ 0.
∆t
2
Mλw Mp0c || 5 ei+1
s ||
2
i+1
i
i+1
≤ ∆tMλw || 5 ei+1
p |||| 5 es || + ∆tLλw Mp ||es |||| 5 es ||
∆t
+
(Mp0c Lλw + Mλw Lp0c )MS ||eis |||| 5 ei+1
s ||.
2
2
φ||ei+1
s || +
36
Numerical Modeling
Using the knowledge about the gradient of the pressure function error (3.43) we can
estimate the error for the saturation function.
L M
∆t
Lλ + Lλ
λΣ
p
i+1 2
+
Mλw Mp0c || 5 es || ≤ ∆tMλw
+ n 0 w Mpc
0
2
λΣ
2λΣ
0
λdif Lpc
1
+
+ Lλw Mp + (Mp0c Lλw + Mλw Lp0c )MS ||eis |||| 5 ei+1
s ||.
0
2λΣ
2
2
φ||ei+1
s ||
Let us say that
λ0dif Lpc
LλΣ Mp Lλn + Lλw
+
M
+
pc
λ0Σ
2λ0Σ
2λ0Σ
1
+ Lλw Mp + (Mp0c Lλw + Mλw Lp0c )MS ,
2
C(∆t) = ∆tMλw
(3.47)
(3.48)
where C(∆t) ≥ 0.
Further we use Young’s inequality
ab ≤
a2 εb2
+
2ε
2
for all ε > 0
(3.49)
and Poincaré inequality
||u||L2 (Ω) ≤ C|| 5 u||L2 (Ω) .
(3.50)
The last holds for any u ∈ H01 (Ω). Using the inequalities we finally get the following
estimate:
C(∆t)
∆t
C(∆t)ε i 2
i+1 2
2
φ||es || +
Mλw Mp0c −
|| 5 ei+1
||es || ,
s || ≤
2
2ε
2
∆t
C(∆t)
C(∆t)ε i 2
2
φ + CΩ
Mλw Mp0c −
||ei+1
||es || ,
s || ≤
2
2ε
2
which further implies
2
||ei+1
s || ≤
C(∆t)ε
||eis ||2 .
∆t
C(∆t)
2 φ + CΩ
Mλw Mp0c −
2
2ε
This proves that our scheme (3.40)-(3.41) linearly converges under the following
mild restriction on the time step:
2 φ + CΩ
C(∆t)ε
≤ 1.
∆t
C(∆t)
Mλw Mp0c −
2
2ε
(3.51)
3.3 Fully Implicit Scheme
37
To verify the applicability of the scheme to realistic scenarios we test and compare
it with the other schemes in the next Chapter.
38
Numerical Modeling
Chapter 4
Numerical Results
In this chapter we present a verification of convergence of the new implicit scheme
developed in Section 3.3.2. We look at a few numerical tests with different levels of
complexity and study the convergence rate of the iterative process. We also compare
the new scheme with IMPES and Newton’s implementation of the implicit method
(referred to as Newton’s method for conciseness). In Section 4.2 we highlight the
advantages of the new scheme by comparing it with IMPES and Newton’s scheme in
terms of the CPU time and stability with respect to time-step.
4.1
Verification of Convergence
In this section we demonstrate the convergence of the new iterative scheme applied to
the model problem developed in Chapter 2:
λn − λw
5 pc ) = Fpr ,
2
∂Sw
1 φ
− 5 · λw k 5 (p − pc ) = Fsat ,
∂t
2
0
0
Sw = Sw (x, t0 ), p = p(x, t0 ),
− 5 · k(λΣ 5 p +
Sw |∂Ω = SwΓ ,
(4.1)
p|∂Ω = pΓ .
In all the following test cases we choose the right-hand side functions such that the
analytical solution of the system above in the domain Ω = (0 ≤ x1 ≤ 1, 0 ≤ x2 ≤ 1) is
defined as follows:
p(x, t) = tx1 (1 − x1 )x2 (1 − x2 ),
(4.2)
S(x, t) =
1
+ tx1 (1 − x1 )x2 (1 − x2 ).
2
All computations are done on the time interval t ∈ [0.0, 1.0].
(4.3)
40
4.1.1
Numerical Results
Test case 1 (λn = λw = 1, pc = 0)
In this test case we consider the system (4.1) where λn = λw = φ = ρ = 1 and there is
no capillary pressure pc = 0. Thus, we get the following simplified system:
− 5 · (2 5 p) = Fpr ,
∂S
− 5 · (5p) = Fsat ,
∂t
P0 = 0, p∂Ω = 0,
1
1
S0 = , S∂Ω = .
2
2
(4.4)
Let us choose the right-hand side functions such that the analytical solution of the
system (4.4) is provided by the formulas (4.2)-(4.3). For the analytical solution we
present the following relations:
4p = −2t(x1 − x21 + x2 − x22 ),
∂S
= (x1 − x21 )(x2 − x22 ).
∂t
Then the right-hand side functions can be easily computed as:
Fpr = −24p,
∂S
Fsat =
− 4p.
∂t
(4.5)
(4.6)
(4.7)
In Figure 4.1 we present the numerical solution, the true solution and the error
(the difference between the solutions at each point) for the pressure function at time
Tf inal = 1.0, h = 0.05 after 20 time steps with dt = 0.05. Figure 4.2 presents the same
plots for the saturation function.
Figure 4.1: Test case 1. Numerical solution, true solution and error for the pressure
function at time Tf inal = 1.0, h = 0.05, dt = 0.05 .
To verify the correctness of the implementation we look at the convergence rates
with respect to time and space discretization. Table 4.1 presents the results of our
implicit scheme applied to the system (4.4) at different mesh and time-step sizes.
The computations are performed on the time interval t ∈ [0.0, 1.0], each consequent
computation is done on the refined by the factor of two mesh and with twice smaller
4.1 Verification of Convergence
41
Figure 4.2: Test case 1. Numerical solution, true solution and error for the saturation
function at time Tf inal = 1.0, h = 0.05, dt = 0.05 .
1
2
3
4
5
h
dt
Pressure Error
0.1
0.1
1.3026e-04
0.05
0.05
2.9646e-05
2.5e-02 2.5e-02
7.4590e-06
1.25e-02 1.25e-02
1.8976e-06
6.25e-03 6.25e-03
4.7244e-07
Saturation Error
0.0036
7.6252e-04
1.9600e-04
5.4108e-05
1.5277e-05
p
Eip /Ei+1
s
Eis /Ei+1
4.3939
3.9746
3.9308
4.0166
4.7737
3.8903
3.6224
3.5418
Table 4.1: Test case 1. L2 -norm errors of pressure and saturation functions for different
time steps and mesh sizes, Tf inal = 1.0.
time-step. The errors from Table 4.1 are visualized in Figure 4.3.
−2
Logarithm of the discrete L2−norm of the error
10
Pressure
Satuartion
quadratic
−3
10
−4
10
−5
10
−6
10
−7
10
−8
10
1
10
2
10
Logarithm of the inverse mesh size log(1/h)
Figure 4.3: Test case 1. Discrete error L2 -norm for the solution of pressure (blue) and
saturation (green) equations for different space and time steps. Both space and time
steps are refined with the factor of two each time.
We used the finite element discretization in space and backward Euler in time.
Then the expected order of the error is O(dt + h2 ) for the saturation equation and
O(h2 ) for the pressure [5, 17]. From Table 4.1 we see that the error of the pressure
equation became four times smaller as h decreased twice. This perfectly agrees with
theory. For the saturation equation we see that with a decrease in dt and h the error
also became nearly four times smaller. However, we also see a downward trend in the
42
1
2
3
4
5
Numerical Results
h
dt
Pressure Error
0.1
0.1
1.1842e-04
0.05
0.05
2.6503e-05
2.5e-02 2.5e-02
6.6447e-06
1.25e-02 1.25e-02
1.7059e-06
6.25e-03 6.25e-03
4.1680e-07
Saturation Error
2.9392e-04
1.2223e-04
6.3125e-05
3.3779e-05
1.6321e-05
p
Eip /Ei+1
s
Eis /Ei+1
4.4682
3.9886
3.8952
4.0928
2.4047
1.9363
1.8687
2.0697
Table 4.2: Test case 2. L2 -norm errors of the pressure and the saturation functions for
different time steps and mesh sizes, Tf inal = 1.0.
last column in Table 4.1. Thus, we can expect the order O(dt + h2 ) as dt, h → 0.
4.1.2
Test case 2 (λn = λw = 1, pc = 1)
In this test case we consider the system (4.1) with λn = λw = φ = ρ = 1. However
this time we have a constant capillary pressure pc = 1. Thus, we get the following
simplified system:
− 5 · (2 5 p) = Fpr ,
1
∂S
− 5 · 5(p − pc ) = Fsat ,
∂t
2
(4.8)
P0 = 0, p∂Ω = 0,
1
1
S0 = , S∂Ω = .
2
2
As before, we choose the right-hand side functions such that the analytical solution
of the system above in the domain Ω is still the same (4.2) - (4.3). Then the right-hand
side functions can be easily computed:
Fpr = −24p,
∂S
Fsat =
− 4p.
∂t
(4.9)
Let us look at how the error changes at different time and space steps, like we
did in the previous test case. Table 4.2 shows that the error decreasing ratio for the
saturation equation differs from the previous test case and it tends to the value of two.
This indicates that the error is dominated by the Euler approximation for the time
derivative. In Figure 4.4 the errors from Table 4.2 are plotted, so that it is easier to
see that in this test case we have convergence of order two for the pressure equation
and only first order convergence for the saturation equation.
4.1 Verification of Convergence
43
−3
Logarithm of the discrete L2−norm of teh error
10
Pressure
Saturation
quadratic
linear
−4
10
−5
10
−6
10
−7
10
1
10
2
10
Logarithm of the inverse mesh size log(1/h)
Figure 4.4: Test case 2. Discrete error L2 -norm for the solution of the pressure (blue)
and the saturation (green) equations for different space and time steps. Both space
and time steps are decreased twice for every next simulation.
4.1.3
3
1
Test case 3 (λn = , λw = , pc = 1 − Sw2 )
4
4
1
In this test case we simplify the system (4.1) in sense of parameters λn = , λw =
4
3
, φ = ρ = 1. However, this time we include the capillary pressure as smooth Lipschitz
4
continuous function of the saturation pc = 1 − Sw2 . Then our new system looks like:
1
5 pc ) = Fpr ,
4
∂S
3
1
− 5 · ( 5 (p − pc )) = Fsat ,
∂t
4
2
P0 = 0, p∂Ω = 0,
1
1
S0 = , S∂Ω = .
2
2
− 5 · (5p +
(4.10)
We want the analytical solution of the system to maintain the same form (4.2)-(4.3).
Let us first compute the Laplacian of the capillary pressure function:
4pc = 2t(x2 − x22 + x1 − x21 ) − 2t2 ((x2 − x22 )2 (1 − 6x1 + 6x21 ) + (x1 − x21 )2 (1 − 6x2 + 6x22 )).
(4.11)
Then the right-hand side functions should be chosen as:
1
3
∂S 3
Fpr = −4p + 4pc , Fsat =
− 4p + 4pc ,
4
∂t
4
8
where 4p and
∂S
are as in the test case 1 (4.5)-(4.6).
∂t
(4.12)
44
1
2
3
4
5
Numerical Results
h
dt
Pressure Error
0.1
0.1
2.2958e-04
0.05
0.05
4.9383e-05
2.5e-02 2.5e-02
1.2223e-05
1.25e-02 1.25e-02
3.0972e-06
6.25e-03 6.25e-03
7.6654e-07
Saturation Error
0.0012
2.6342e-04
6.5993e-05
1.6763e-05
4.1586e-06
p
Eip /Ei+1
s
Eis /Ei+1
4.6491
4.0401
3.9465
4.0405
4.4626
3.9917
3.9367
4.0309
Table 4.3: Test case 3. L2 -norm errors of pressure and saturation functions for different
time steps and mesh sizes, Tf inal = 1.0.
As before, we examine the convergence of the scheme by comparing the errors for
different discretizations. The results are presented in Table (4.3) and Figure (4.5).
−2
Logarithm of the discrete L2−norm of the error
10
Pressure
Saturation
quadratic
−3
10
−4
10
−5
10
−6
10
−7
10
−8
10
1
10
2
10
Logarithm of the inverse mesh size log(1/h)
Figure 4.5: Test case 3. Discrete error L2 -norm for the solution of the pressure (blue)
and the saturation (green) equations for different space and time steps. Both space
and time steps are decreased twice for every next simulation.
In this test case we also examine the errors at each iteration of the scheme. In
Section 3.3.3 we proved that our scheme converges at least linearly and here we want
to study the real error change and analyze whether it agrees with the theoretical proof.
We did not consider the errors in the previous test cases as due to the parameterization choice the scheme converged too quickly and we were not able to catch the real
behaviour of the error.
Figures 4.6 and 4.7 show the difference between numerical solutions at each iteration
||pi+1 − pi ||L2 and ||S i+1 − S i ||L2 during one time step. The stopping criteria for the
iteration is ||pi+1 −pi ||L2 ≤ ε and ||S i+1 −S i ||L2 ≤ ε, where ε = 10−9 , therefore, the lines
does not go down further than the level of 10−9 . Figures 4.8 - 4.9 presents the error of
the numerical solution at each iteration with the analytical solution, ||pi+1 −pan ||L2 and
||S i+1 −S an ||L2 . First of all, we see that for this test case the scheme shows convergence
faster than linear. Second, in Figures 4.8 - 4.9 the error first goes down quickly and
4.1 Verification of Convergence
45
then stabilizes at some level. This level shows how big numerical error we have for
this particular mesh and time-step. With the change of mesh and time-step size this
numerical error becomes smaller, which also agrees with the numbers in Table 4.3.
Figure 4.6: The difference between numerical solutions at each iteration of
one time-step ||pi+1 − pi ||L2 for various
mesh and time-step sizes.
Figure 4.7: The difference between numerical solutions at each iteration of
one time-step ||S i+1 − S i ||L2 for various
mesh and time-step sizes.
dt = 0.1; h = 0.1
−2
10
dt = 0.1; h = 0.1
−2
dt = 0.05; h = 0.05
dt = 2.5e−02; h = 2.5e−02
dt = 0.05; h = 0.05
10
dt = 1.25e−02; h = 1.25e−02
dt = 6.25e−03; h = 6.25e−03
2
log( || pi+1 − pan ||L )
−4
10
linear
−6
10
2
dt = 1.25e−02; h = 1.25e−02
log( || Si+1 − San ||L )
dt = 2.5e−02; h = 2.5e−02
dt = 6.25e−03; h = 6.25e−03
−4
10
linear
−6
10
−8
10
−8
10
0
0
1
10
10
log(1/h)
Figure 4.8: The difference between numerical and analytical solutions at each
iteration of one time-step ||pi+1 −pan ||L2
for various mesh and time-step sizes.
1
10
10
log(1/h)
Figure 4.9: The difference between
numerical and analytical solutions at
each iteration of one time-step ||S i+1 −
S an ||L2 for various mesh and time-step
sizes.
Let us also take a look at the number of iterations that the new implicit scheme
requires at each time step. Figure (4.10) presents this number at different mesh sizes
with fixed time step. The plots indicate that the number of iterations does not depend
on the mesh size at all and changes with the size of time step only. However, the
parametrization used here is relatively simple and in the next test case we will look at
46
Numerical Results
the number of iterations again.
20
18
16
15
15
15
15
15
15
13
13
13
13
13
13
11
11
11
11
11
11
9
9
9
9
9
9
7
7
7
7
7
7
Number of iterations
14
12
10
8
6
dt = 0.1
dt = 0.05
4
dt = 2.5e−2
dt = 1.25e−2
2
dt = 6.25e−3
0
10
15
20
25
30
35
1/h
40
45
50
55
60
Figure 4.10: Numbers of iterations for several mesh and step sizes.
4.1.4
Test case 4 (λn , λw from van Genuchten parametrization,
pc = 1 − Sw2 )
Now we use van Genuchten parametrization, described in detailed in the appendix A, 5,
kr,n
kr,w
for the phase mobility functions λn =
, λw =
, while the capillary pressure stays
µn
µw
the same: pc = 1−Sw2 . The values of other parameters are k = 1, φ = 1, µn = 1, µw = 1.
Then our new system is written as follows:
λdif
5 pc ) = Fpr ,
2
∂S
1
− 5 · (λw 5 (p − pc )) = Fsat ,
∂t
2
p0 = 0, p∂Ω = 0,
1
1
S0 = , S∂Ω = ,
2
2
λΣ = λn + λw ,
− 5 · (λΣ 5 p +
(4.13)
λdif = λn − λw .
We choose Fpr and Fsat such that the analytical solution (4.2)-(4.3) stays the same:
1
1
5 λdif · 5pc − λdif 4pc ,
2
2
1
∂S
1
=
− 5λw · 5p − λw 4p + 5 λw · 5pc + λw 4pc ,
∂t
2
2
Fpr = − 5 λΣ · 5p − λΣ 4p −
Fsat
(4.14)
4.1 Verification of Convergence
1
2
3
4
5
h
dt
Pressure Error
0.1
0.1
9.9101e-05
0.05
0.05
2.2000e-05
2.5e-02 2.5e-02
5.5877e-06
1.25e-02 1.25e-02
1.4325e-06
6.25e-03 6.25e-03
3.5866e-07
47
Saturation Error
1.5739e-04
3.8927e-05
9.9906e-06
2.5480e-06
6.3823e-07
p
Eip /Ei+1
s
Eis /Ei+1
4.5046
3.9372
3.9007
3.9940
4.0433
3.8964
3.9210
3.9923
Table 4.4: Test case 4. L2 -norm errors of pressure and saturation functions for different
time steps and mesh sizes, Tf inal = 1.0.
where 4p,
∂S
and 5pc are the same as before. The gradients are computed as:
∂t
!
t(1 − 2x1 )(x2 − x22 )
5p=
,
(4.15)
t(1 − 2x2 )(x1 − x21 )
5 pc =
− 2t(1 − 2x1 )(x2 − x22 )S
− 2t(1 − 2x2 )(x1 − x21 )S
!
,
(4.16)
√
∂λn
1 − S2
= (tx1 x2 (1 − x2 ) − tx2 (1 − x1 )(1 − x2 ))( √
+ 2S 1 − S),
∂x1
2 1−S
(4.17)
√
∂λn
1 − S2
= (tx1 x2 (1 − x1 ) − tx1 (1 − x1 )(1 − x2 ))( √
+ 2S 1 − S),
∂x2
2 1−S
√
√
∂λw
2S 3/2 (1 − 1 − S 2 ) (1 − 1 − S 2 )2 )
√
√
+
),
= (tx2 (1 − x1 )(1 − x2 ) − tx1 x2 (1 − x2 ))(
∂x1
1 − S2
2 S
√
√
∂λw
2S 3/2 (1 − 1 − S 2 ) (1 − 1 − S 2 )2 )
√
√
= (tx1 (1 − x1 )(1 − x2 ) − tx1 x2 (1 − x1 ))(
+
),
∂x2
1 − S2
2 S
T
T
∂λn ∂λn
∂λw ∂λw
5 λn =
,
, 5λw =
,
.
∂x1 ∂x2
∂x1 ∂x2
(4.18)
Table (4.4) shows how the error changes with the refinement of the mesh by the
factor of two and a simultaneous decrease in the time step. As in the previous test
case, we observe the second order of convergence. Figure 4.11 presents the errors from
Table 4.4.
Let us look at the number of iterations for this test case and compare it with
what we get in the test case 4.1.3. Here, the phase mobility function is not constant
anymore and becomes a function of the water saturation. For this test case we see that
the number of iterations vary a little with the change of space step, but these changes
are relatively small and the number tends to stabilize at some level. Thus, we can say
that the new scheme shows independence of the mesh size in terms of needed number
of iterations.
48
Numerical Results
−3
Logarithm of the discrete L2−norm of teh error
10
Pressure
Saturation
quadratic
−4
10
−5
10
−6
10
−7
10
−8
10
−9
10
1
2
10
10
Logarithm of the inverse mesh size log(1/h)
Figure 4.11: Test case 4. Discrete error L2 -norm for the solution of the pressure (blue)
and the saturation (green) equations for different space and time steps. Both space
and time steps are decreased twice for every next simulation.
4.1.5
Test case 5 (λn , λw , pc from van Genuchten parametrization)
In this test case we use van Genuchten parametrization not only for the phase mobility
functions but also for the capillary pressure, see Appendix 5. The values of other
parameters are k = 1, φ = 1, µn = 1, µw = 1. The system of equations is the same
as in the previous test case. We also want the analytical solution (4.2-4.3) to stay the
same. The formulas for the right-hand side functions Fpr and Fsat are the same as in
the previous test case (4.14), however, the gradient and the Laplacian of the capillary
pressure function are different.

−2(t(1 − x1 )(1 − x2 )x2 − tx1 (1 − x2 )x2 )
p


s3 1/s2 − 1


5 pc = 
,
 −2(t(1 − x1 )x1 (1 − x2 ) − t(1 − x1 )x1 x2 ) 
p
s3 1/s2 − 1

(4.19)
6(t(1 − x1 )(1 − x2 )x2 − tx1 (1 − x2 )x2 )2 2(t(1 − x1 )(1 − x2 )x2 − tx1 (1 − x2 )x2 )2
p
−
s6 (1/s2 − 1)3/2
s4 1/s2 − 1
4t(1 − x2 )x2
6(t(1 − x1 )x1 (1 − x2 ) − t(1 − x1 )x1 x2 )2
p
+ p
+
s3 1/s2 − 1
s4 1/s2 − 1
2(t(1 − x1 )x1 (1 − x2 ) − t(1 − x1 )x1 x2 )2
4t(1 − x1 )x1
p
+
−
.
s6 (1/s2 − 1)3/2
s3 1/s2 − 1
(4.20)
4pc =
We compute the errors on different time and space steps and examine the error
4.1 Verification of Convergence
49
100
96
dt = 0.1
90
94
93
89
dt = 0.05
85
81
dt = 2.5e−2
80
77
77
dt = 1.25e−2
Number of iterations
70
69
dt = 6.25e−3
65
60
59
54
52
49
50
46
45
40
38
34
30
31
28
27
27
22
20
19
17
16
15
10
10
10
7
0
10
15
20
25
30
35
1/h
40
45
50
55
60
Figure 4.12: Numbers of iterations for several mesh and step sizes when van Genuchten
parametrization for λn and λw is used.
1
2
3
4
h
dt
Pressure Error
0.1
0.1
1.2577e-04
0.05
0.05
3.7186e-05
2.5e-02 2.5e-02
1.0848e-05
1.25e-02 1.25e-02
2.7961e-06
Saturation Error
9.3802e-05
2.2608e-05
5.9607e-06
1.5611e-06
p
Eip /Ei+1
s
Eis /Ei+1
3.3823
3.4280
3.8796
4.1491
3.7928
3.8183
Table 4.5: Test case 5. L2 -norm errors of pressure and saturation functions for different
time steps and mesh sizes, Tf inal = 1.0.
change. The results are presented in Table (4.5) and in Figure (4.13)
Let us look at the difference between numerical solutions at each iteration ||pi+1 −
pi ||L2 and ||S i+1 − S i ||L2 . As in the test case 3, the stopping criterion for the iteration
is ||pi+1 − pi ||L2 ≤ ε and ||S i+1 − S i ||L2 ≤ ε, where ε = 10−9 , that is why the lines does
not go down further then the level of 10−9 . The corresponding errors are presented in
Figures 4.14 and 4.15. Figures 4.16 - 4.17 show the difference between the numerical
solution and the analytical solution at each iteration, ||pi+1 −pan ||L2 and ||S i+1 −S an ||L2 .
As for the test case 4.1.3, we observe convergence which is faster than linear. The error
does not decrease beyond some level which corresponds to mismatch between analytical
and numerical solutions for the particular discretization. All the errors are computed
for just one time-step which is different for each line and on meshes with different levels
of refinement.
50
Numerical Results
−3
Logarithm of the discrete L2−norm of teh error
10
Pressure
Saturation
quadratic
−4
10
−5
10
−6
10
−7
10
1
2
10
10
Logarithm of the inverse mesh size log(1/h)
Figure 4.13: Test case 5. Discrete error L2 -norm for the solution of the pressure (blue)
and the saturation (green) equations for different space and time steps. Both space
and time steps are decreased twice for every next simulation.
4.2
Comparison of the stabilized iterative approach
with IMPES and Newton’s scheme
In Chapter 3 we presented a new stabilized iterative implementation of the fully implicit
scheme for two-phase flow in porous media. In the previous section we studied different
test cases to prove its convergence. In this section we compare the new scheme with
our implementation of IMPES and Newtons’s solver for the fully implicit scheme.
4.2.1
Robustness
First of all, we look at the improvement of the size of time-step compared with IMPES.
In the IMPES scheme the saturation equation is solved explicitly. While it simplifies
implementation and reduces the computational time, it results in the condition on
a time step which is common to all explicit schemes. This problem was studied in
several works, for example the authors of [10] examined the stability of IMPES and
derived a criterion on the time-step for multidimensional three-phase flow. It is clear
that IMPES provides accurate and stable solutions only if the time step is relatively
small. Therefore we introduced an implicit scheme which to certain degree maintains
the simplicity of IMPES, while having better convergence properties. In Table 4.6 we
see the improvement in a time step of the new iteration scheme comparing to IMPES
for the mesh size h = 0.1. We also included Newton’s scheme here. Table 4.7 present
the same comparison but for the mesh size h = 0.05. The different mesh size does not
influence the two implicit schemes, but requires a smaller time step for IMPES.
4.2 Comparison of the stabilized iterative approach with IMPES and
Newton’s scheme
0
−2
10
−4
10
||Si+1 − Si ||L
2
−4
10
i
i+1
dt = 0.1; h = 0.1
dt = 0.05; h = 0.05
dt = 2.5e−2; h = 2.5e−2
dt = 1.25e−2; h = 1.25e−2
dt = 6.25e−3; h = 6.25e−3
−6
10
2
−2
− p ||L
10
dt = 0.1; h = 0.1
dt = 0.05; h = 0.05
dt = 2.5e−2; h = 2.5e−2
dt = 1.25e−2; h = 1.25e−2
dt = 6.25e−3; h = 6.25e−3
10
||p
51
−6
10
−8
10
−8
10
−10
−10
10
10
0
1
10
10
log(1/h)
2
10
Figure 4.14: The difference between
numerical solutions at each iteration of
one time-step ||pi+1 − pi ||L2 for various
mesh and time-step sizes.
Numerical method
IMPES
Implicit Scheme
Newton’s Scheme
0
10
1
10
log(1/h)
2
10
Figure 4.15: The difference between
numerical solutions at each iteration of
one time-step ||S i+1 − S i ||L2 for various
mesh and time-step sizes.
dt = 0.2 dt = 0.1 dt = 1e-2 dt = 1e-3 dt = 1e-4 dt = 1e-5
No
No
No
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Table 4.6: Comparison of IMPES and the implicit scheme in terms of convergence with
different time steps, Tf inal = 1.0, h = 0.1.
4.2.2
CPU time
Let us now compare the schemes in terms of the required CPU time. In Figure 4.18 the
CPU times of the schemes are presented. All computations are done in Matlab with
the processor Intel(R) Core(TM)2 Duo E6850 @ 3.00GHz. The numerical solution,
the true solution and the error for the last space discretization h = 0.02 for the new
scheme are presented in Figures 4.19 - 4.20. The time step for IMPES was chosen so
that the scheme converges for the smallest mesh size. While it is not optimal for all
the simulations, an optimal choice of the step size is a complicated problem in itself
[10, 11] and was not in the scope of the thesis.
Numerical method
IMPES
Implicit Scheme
Newton’s Scheme
dt = 0.2 dt = 0.1 dt = 1e-2 dt = 1e-3 dt = 1e-4 dt = 1e-5
No
No
No
No
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Table 4.7: Comparison of IMPES and the implicit scheme in terms of convergence with
different time steps, Tf inal = 1.0, h = 0.05.
52
Numerical Results
−3
−1
10
10
dt = 0.1; h = 0.1
dt = 0.05; h = 0.05
10
dt = 0.1; h = 0.1
dt = 0.05; h = 0.05
dt = 2.5e−2; h = 2.5e−2
dt = 1.25e−2; h = 1.25e−2
dt = 6.25e−3; h = 6.25e−3
linear
−2
10
−4
dt = 2.5e−2; h = 2.5e−2
dt = 1.25e−2; h = 1.25e−2
−3
−6
10
||p
2
||Si+1 − San ||L
2
||L
an
linear
i+1
−p
10
dt = 6.25e−3; h = 6.25e−3
−5
10
−4
10
−5
10
−7
10
−6
10
−8
−7
10
10
−8
−9
10
10
0
10
1
10
log(1/h)
2
10
Figure 4.16: The difference between
numerical and analytical solutions at
each iteration of one time-step ||pi+1 −
pan ||L2 for various mesh and time-step
sizes.
0
10
1
10
log(1/h)
Figure 4.17: The difference between
numerical and analytical solutions at
each iteration of one time-step ||S i+1 −
S an ||L2 for various mesh and time-step
sizes.
It is not surprising that with the implicit scheme we get an improvement in the CPU
time. Despite the fact that the implicit scheme needs to complete a few iterations at
each time step, the improvement in the size of the time step made it more efficient
compare to the IMPES scheme. Even more interesting is the fact that we have a
smaller computational time even comparing with Newton’s method that needs fewer
iteration due to the second order of convergence. In order to understand why we have
better time performance of the new scheme comparing with Newton’s iteration scheme
we devote next section to examination of the condition number.
4.2.3
2
10
Condition Number
In terms of computational complexity, an important indicator is the condition number
of the matrices of the corresponding linear systems at each iteration of the method. As
we use finite elements for the space discretization in all schemes, it results in solving
a similar system of linear equations at each iteration. An important characteristic
of numerical schemes for linear systems is the condition number of the left-hand side
matrices. In case of Newton’s scheme we calculate the condition number of the Jacobian
matrix. The condition number estimates for both schemes were computed using the
MATLAB function condest() and are presented in Figure (4.21). The numbers for
the implicit scheme are averaged over all iterations. In Newton’s method we have
one matrix for the whole implicit system and in new implicit scheme two (one for the
pressure and one for the saturation equations). Therefore we plotted the same numbers
for Newton’s method and compared them with the numbers for the pressure and the
saturation matrices separately.
4.2 Comparison of the stabilized iterative approach with IMPES and
Newton’s scheme
53
4
5
x 10
47546
IMPES
Newton
4
CPU time (s)
Implicit Scheme
3
23680
2
11041
1
4217
0
5
956
12 81
10
15
20
25
30
1/h
2368
1567
318
797 148
346 56
35
615
40
45
50
55
Figure 4.18: CPU time of the implicit scheme, IMPES and Newton’s scheme for several
mesh sizes, dtimplicit = 0.1, dtN ewton = 0.1, dtIM P ES = 10−4 , Tf inal = 1.0, parameterization as in Section 4.1.3.
Numerical Pressure
True Pressure
0.1
−5
x 10
0.1
Error
2
1
0.05
0.05
0
−1
0
0
0.5
1
0
0
0.5
1
−2
0
0.5
1
Figure 4.19: The numerical solution, the true solution and the error for the pressure
equation at time Tf inal = 1.0, h = 0.02, dt = 0.1 .
Figure (4.21) shows that the condition number for Newton’s method is much higher
then the condition number of our implicit scheme. This can explain why Newton’s
method is slower then the new iterative scheme. In spite of the fact that Newton’s
method needs fewer iterations to complete one time step, each iteration takes more
time because the Jacobian matrix is relatively massive and it takes quite a long time
to compute it. Also, as the condition number of the Jacobian matrix is relatively large,
it takes more time for the linear solver to reach the needed accuracy for each iteration.
54
Numerical Results
Numerical Saturation
True Satuartion
0.6
Error
−5
x 10
0.6
2
1
0.55
0.55
0
−1
0.5
0
0.5
1
0.5
0
0.5
1
−2
0
0.5
1
x 10
Implicit Scheme
Newton
63092
5
47205
29520
16637
1857
105
0
10
7359
435
20
977
1753
2796
30
40
50
1/h
3810
60
Saturation
4
1
Pressure
4
10
Condition Number w.r.t. |.|
Condition Number w.r.t. |.|1
Figure 4.20: The numerical solution, the true solution and the error for the saturation
equation at time Tf inal = 1.0, h = 0.02, dt = 0.1 .
10
x 10
Implicit Scheme
Newton
63092
5
47205
29520
16637
1857
53
0
10
7359
218
20
878
484
30
40
1/h
Figure 4.21: Condition number for several mesh sizes.
1329
50
1903
60
Chapter 5
Conclusion
In this thesis we presented a new implicit iterative scheme for the two-phase flow model
in the averaged pressure formulation. Its main feature is the implicit treatment of the
capillary pressure function which makes the scheme stable. This is accomplished by the
linear approximation for the capillary pressure gradient which involves the saturation
function on both current and previous iterations. Under these assumptions we proved
the convergence theorem.
Our numerical experiments contain comparison of the new scheme with the two
most often used methods for the two-phase flow problem: IMPES and the fully implicit scheme with Newton’s method as a tool for solving the arising nonlinear system.
IMPES and the new scheme share the idea of exploiting the structure of the equation.
However, the standard IMPES scheme converges only with relatively small time-steps.
The new scheme has only a mild condition on the time step size and for the mesh
size h = 0.05 shows convergence with a three order of magnitude greater time step.
Therefore we saw a huge improvement in the CPU time of the new scheme compared
with IMPES.
We also compared the new scheme with the fully implicit scheme that uses Newton’s method to deal with nonlinearities. Newton’s method is widely used for solving
nonlinear systems of equations because it can handle general problems and has the second order of convergence. However, comparing with our new scheme it still used more
CPU time even though it needed a fewer number of iterations at each time step. This
can be explained by the necessity of computing the Jacobian matrix at each iteration,
as well as the worse condition number of the resulting Jacobian matrices.
All this makes our new scheme an attractive alternative to the existing methods.
Nevertheless, the scheme’s advantages comes from its limitations: it uses the specific
structure of the problem. While the scheme cannot be used for more complex systems,
the methodologies described in this thesis can be applied to extend the scheme to
other applications, such that compressible fluid flow and three-phase flow models, other
types of problem formulations or for the models where the hysteresis is included in the
56
capillary pressure function.
Conclusion
Appendices
A
Van Genuchten Parametrization
In this thesis we use the van Genuchten parametrization [32] for the dependence of the
relative permeability and capillary pressure functions on the fluid saturation:
√
kr,n (S) = 1 − S[1 − S 1/m ]2m ,
√
kr,w = S[1 − (1 − S 1/m )m ]2 ,
(5.1)
where m = 1 − 1/n and n, pe are the van Genuchten parameters equal to n = 2, pe =
2M P a. Curves for the van Genuchten relative permeabilities are presented in Figure
5.1 and for the capillary pressure in Figure 5.2
In most cases, this type of parametrization is enough to capture the real processes
well enough [1]. However, it is important to mention that the relation between the
capillary pressure and the wetting fluid saturation is not unique in general. The experimental data suggests that capillary pressure curve shows history-dependent behaviour
[15], [31], [4]. One way to improve the capillary pressure parametrization is to include
time-dependence in the capillary pressure function pc = pc (Sw , ∂t Sw ).
Nevertheless, in this thesis we consider algebraic relation for the van Genuchten
parametrization as the capillary pressure function and the relative permeabilities functions.
200
0.8
kr,n
180
k
160
r,w
Capillary pressure
Relative Permeability
1
0.6
0.4
0.2
140
120
100
80
60
40
20
0
0
0.2
0.4
0.6
Wetting Fluid Saturation
0.8
1
0
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
Wetting Fluid Saturation
Figure 5.1: An example of the static Figure 5.2:
An example of the
van Genuchten relative permeabilities static van Genuchten capillary pressure
curves.
curve.
58
Conclusion
Bibliography
[1] B. Amaziane, M. Jurak, and A. Žgaljić Keko. Modeling and numerical simulations
of immiscible compressible two-phase flow in porous media by the concept of global
pressure. Transp. Porous Media, 84(1):133–152, 2010.
[2] U. M. Ascher, S. J. Ruuth, and B. Wetton. Implicit-explicit methods for timedependent PDE’s. 32(3), 1993.
[3] J. Bear. Dynamics of Fluids in Porous Media. Courier Corporation, 1988.
[4] a. Y. Beliav and S. M. Hassanizadeh. A theoretical model of hysteresis and dynamic effects in the capillary relation for two-phase flow in porous media. Transport
in Porous Media, 43(3):487–510, 2001.
[5] Z. Chen. Finite element methods and their applications. Springer Science &
Business Media, 2005.
[6] Z. Chen, G. Huan, and B. Li. An improved IMPES method for two-phase flow in
porous media. Transport in Porous Media, 54(3):361–376, 2004.
[7] Z. Chen, G. Huan, and Y. Ma. Computational methods for multiphase flows in
porous media, volume 2. Siam, 2006.
[8] R. Clough. The Finite Element Method in Plane Stress Analysis. American Society
of Civil Engineers, 1960.
[9] K. Coats. A Note on IMPES and Some IMPES-Based Simulation Models. SPE
Journal, 5(3):14–17, 2000.
[10] K. H. Coats. IMPES stability: The stable step, 2001.
[11] K. H. Coats. IMPES Stability: The CFL Limit. SPE Journal, 8(3):291–297, 2003.
[12] J. J. Connor and C. A. Brebbia. Finite element techniques for fluid flow. Newnes,
1976.
60
BIBLIOGRAPHY
[13] C. Frepoli, J. H. Mahaffy, and K. Ohkawa. Notes on the implementation of a
fully-implicit numerical scheme for a two-phase three-field flow model. Nuclear
Engineering and Design, 225:191–217, 2003.
[14] B. Ganis, K. Kumar, G. Pencheva, M. F. Wheeler, and I. Yotov. A Multiscale
Mortar Method and Two-Stage Preconditioner for Multiphase Flow Using a Global
Jacobian Approach. SPE Large Scale Computing and Big Data Challenges in
Reservoir Simulation Conference and Exhibition, 2014.
[15] S. M. Hassanizadeh, M. a. Celia, and H. K. Dahle. Dynamic Effect in the Capillary
Pressure–Saturation Relationship and its Impacts on Unsaturated Flow. Vadose
Zone Journal, 1(1):38, 2002.
[16] W. Hundsdorfer and S. J. Ruuth. IMEX extensions of linear multistep methods
with general monotonicity and boundedness properties. Journal of Computational
Physics, 225(2007):2016–2042, 2007.
[17] A. Iserles. A first course in the numerical analysis of differential equations. Number 44. Cambridge University Press, 2009.
[18] P. Knabner and L. Angermann. Numerical methods for elliptic and parabolic
partial differential equations. 2003.
[19] J. Kou and S. Sun. A new treatment of capillarity to improve the stability of
IMPES two-phase flow formulation. Computers and Fluids, 39(10):1923–1931,
2010.
[20] J. Kou and S. Sun. On iterative IMPES formulation for two phase flow with
capillarity in heterogeneous porous media. International Journal of Numerical
Analysis and Modeling, series B, 1(1):20–40, 2010.
[21] B. H. Kueper and E. Frind. Two-Phase Flow in Heterogeneous Porous Media 1.
Model Development. Water Resources Research, 27(6):1049–1057, 1991.
[22] S. Lacroix, J. Wheeler, and M. Wheeler. Flow in Porous Media Fully Implicitly.
25(3):905–926, 2003.
[23] T. Lee, M. Leok, and N. H. McClamroch. Geometric numerical integration for
complex dynamics of tethered spacecraft. Proceedings of the 2011 American Control Conference, (July 2006):1885–1891, 2011.
[24] F. List and F. A. Radu. A study on iterative methods for solving Richards‘
equation. Computational Geosciences, (arXiv:1507.07837), 2015.
BIBLIOGRAPHY
61
[25] B. Lu and M. F. Wheeler. Iterative coupling reservoir simulation on high performance computers. Petroleum Science, 6(1):43–50, 2009.
[26] J. M. Nordbotten and M. A. Celia. Geological storage of CO2: modeling approaches
for large-scale simulation. John Wiley & Sons, 2011.
[27] I. S. Pop, F. Radu, and P. Knabner. Mixed finite elements for the Richards’
equation: Linearization procedure. Journal of Computational and Applied Mathematics, 168(1-2):365–373, 2004.
[28] F. A. Radu, J. M. Nordbotten, I. S. Pop, and K. Kumar. A robust linearization
scheme for finite volume based discretizations for simulation of two-phase flow in
porous media. Journal of Computational and Applied Mathematics, 289:134–141,
2015.
[29] J. Stoer and R. Bulirsch. Introduction to numerical analysis, 1993.
[30] V. Thomée. From finite differences to finite elements. Journal of Computational
and Applied Mathematics, 128(1-2):1–54, 2001.
[31] C. J. van Duijn, X. Cao, and I. S. Pop. Two-Phase Flow in Porous Media: Dynamic
Capillarity and Heterogeneous Media. Transport in Porous Media, 2015.
[32] M. T. van Genuchten. A Closed-form Equation for Predicting the Hydraulic Conductivity of Unsaturated Soils1, 1980.
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertisement