0% found this document useful (0 votes)
80 views6 pages

3a Project Transport

The document describes a numerical study of a linear transport equation modeling water flooding in a 1D reservoir. It presents: 1) The linear transport PDE and its analytical solution, modeling water injection at one end of an initially oil-filled reservoir. 2) A finite difference discretization of the PDE using an upwind or central scheme. 3) An investigation of the stability properties of the upwind scheme, noting explicit schemes require restrictive time steps to maintain stability.

Uploaded by

Nefeli Matsouka
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
80 views6 pages

3a Project Transport

The document describes a numerical study of a linear transport equation modeling water flooding in a 1D reservoir. It presents: 1) The linear transport PDE and its analytical solution, modeling water injection at one end of an initially oil-filled reservoir. 2) A finite difference discretization of the PDE using an upwind or central scheme. 3) An investigation of the stability properties of the upwind scheme, noting explicit schemes require restrictive time steps to maintain stability.

Uploaded by

Nefeli Matsouka
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

A LINEAR TWO-PHASE TRANSPORT EQUATION

STEINAR EVJE

Abstract. The purpose is to carry out a numerical study of the linear transport equation
ut + ux = 0. This model can be considered as a special case of the Buckley-Leverett equation
ut + f (u)x = 0 for water flooding of a 1D horizontal reservoir. Water is injected at one end
(x = 0) in a reservoir initially filled with oil and production takes place at the opposite end
(x = 1). We specify initial and boundary conditions and give a precise statement of the model
problem we want to solve. Then we propose a discrete version of this problem and consider a
matlab implementation of it. Finally, we explore stability conditions of the numerical scheme.

1. A linear transport equation


A special case of the Buckley-Leverett model for water flooding is the equation
ut + ux = 0, x ∈ (0, 1),

u(x, t = 0) = u0 (x) = 0, (1)

u(x = 0, t) = 1, t ≥ 0.

Physical interpretation of u:
• Let u be the water saturation sw , where so = 1 − u: sw + so = 1.
• Reservoir x ∈ (0, 1] is initially filled with oil: u0 (x) = 0.
• Water is injected at left end x = 0: u(x = 0, t) = 1.
Oil is produced at the opposite end (x = 1).
• Oil and water properties are identical. More precisely, relatively permeability curves are
given as krw (u) = u and kro (u) = 1 − u. Water and oil viscosities are identical. This
implies that f (u) = u.
It can be shown that the analytical (exact) solution of the model problem (1) is given by

1, 0 ≤ x ≤ t;
u(x, t) = (2)
0, t < x.

1.1. A discrete approximation. Consider a discretization of the spatial domain [0, 1] into M
cells. This gives rise to grid points {xj }M j=1 where xj is located in the center of the cell Ij =
[xj−1/2 , xj+1/2 ]. The length of each cell is ∆x = xj+1/2 − xj . All cells are of equal length.
We also consider a discretization of the time interval [0, T ] into N steps (of the same length)
represented by times {tn }N n=1 where the length of each time step is ∆t = t
n+1
− tn .
A discrete version of the problem (1) with an explicit discretization in time then takes the
following form:
un+1
j − unj 1  n 
+ [u]j+1/2 − [u]nj−1/2 , j = 1, . . . , M, (3)
∆t ∆x
where [u]nj+1/2 ≈ u(xj+1/2 , t) for t ∈ [tn , tn+1 ].

How to define [u]nj+1/2 ?

Date: February 27, 2015.


1
2 STEINAR EVJE

Choice 1 (upwind).
[u]nj+1/2 = unj , j = 1, . . . , M − 1. (4)
The idea behind this choice is to use the information that the fluid flows from left to right. Hence,
it is natural to approximate u|j+1/2 with uj . For the first cell we use the boundary condition
u|x=0 = 1 and define
[u]n1/2 = 1, (5)
whereas for the last cell we employ
[u]nM+1/2 = unM . (6)
This gives the following scheme:
un+1
1 = un1 − λ(un1 − 1), j=1
un+1
j = unj − λ(unj − unj−1 ), j = 2, . . . , M − 1 (7)
un+1
M = unM − λ(unM − unM−1 ), j = M,
∆t
where λ = ∆x .

Choice 2 (central based).


unj + unj+1
[u]nj+1/2 = , j = 1, . . . , M − 1. (8)
2
For this choice we just define u|j+1/2 by taking an average of the two neighbor cell values uj and
uj+1 . No information about flow direction is used.
For the first and last cell we employ the same choices of [u]n1/2 and [u]nM+1/2 as defined by (5) and
(6).
This gives the following scheme:
un+1
1 = un1 − λ(0.5[un1 + un2 ] − 1), j=1
λ
un+1
j = unj − (unj+1 − unj−1 ), j = 2, . . . , M − 1 (9)
2
un+1
M = unM − λ(unM − 0.5[unM−1 + unM ]), j = M,
∆t
where λ = ∆x .

Comment. The first step in many numerical solution procedures will be replacement of differ-
ential equations by difference equations as described above. Difference equations are algebraic
equations where differential operators are replaced by algebraic approximations. Difference equa-
tions may exhibit stability problems. It means that the solution become increasingly erroneous,
it starts to wiggle and tends to increase beyond physical bounds as computations proceed. Ex-
plicit difference equations are typical examples of equations where stability is a problem. For such
methods restrictions on time step length are required to ensure stability. In the next section we
will investigate this in detail for the discrete scheme that was proposed above.

1.2. Some investigations of the stability properties of the numerical scheme. It is known
that the discrete scheme given in (7), which is explicit with respect to the time discretization, must
obey a stability condition of the form
∆t
λ= ≤ K.
∆x
How to determine the constant K?
In the following we want to carry out some numerical experiments by using the matlab file
”Case1A.m” which represents an implementation of the scheme (7).
3

1 1
numerical approximation numerical approximation
0.9 exact solution 0.9 exact solution

0.8 0.8

0.7 0.7

0.6 0.6

U(X)

U(X)
0.5 0.5

0.4 0.4

0.3 0.3

0.2 0.2

0.1 0.1

0 0
0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1
X X

1 6
numerical approximation numerical approximation
0.9 exact solution 5 exact solution

0.8 4

0.7 3

0.6 2
U(X)

U(X)
0.5 1

0.4 0

0.3 −1

0.2 −2

0.1 −3

0 −4
0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1
X X

1 3
numerical approximation numerical approximation
0.9 exact solution exact solution
2.5
0.8

0.7
2
0.6
U(X)

U(X)

0.5 1.5

0.4
1
0.3

0.2
0.5
0.1

0 0
0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1
X X

Figure 1. M = 20 cells. Top left: λ = 0.25. Top right: λ = 0.5. Middle left:
λ = 0.83. Middle right: λ = 1.25. Bottom left: λ = 0.91. Bottom right: λ = 1.11

Investigations. Consider M = 20 cells, that is, ∆x = 0.05. Let final time be T = 0.5. Let
N time be the number of timesteps, i.e., ∆t = T /N time.
• N time = 40, which implies that ∆t = 0.0125 ⇒ λ = 0.25: stable
• N time = 20, which implies that ∆t = 0.025 ⇒ λ = 0.5: stable
• N time = 12, which implies that ∆t = 0.04175 ⇒ λ = 0.83: stable
• N time = 8, which implies that ∆t = 0.0625 ⇒ λ = 1.25: unstable
• N time = 11, which implies that ∆t = 0.0455 ⇒ λ = 0.91: stable
• N time = 9, which implies that ∆t = 0.0556 ⇒ λ = 1.11: unstable
We refer to Fig. 1 for plots showing the numerical solutions produced by the scheme for the
different choices of λ. Apparently, λ = 1 seems to be an upper limit for λ. Finally, in order to test
∆t
whether 1 is an upper bound for λ = ∆x , we consider a fine grid with M = 200 cells and carry
out the following test:.
• N time = 99, which implies that λ = 1.01011: unstable
• N time = 100, which implies that λ = 1.0: stable and perfect match with exact
solution
We refer to Fig. 2 for corresponding plots that demonstrate stability and instability.

Conclusion. Based on the numerical experiments it seems that the stability condition is:
∆t
λ= ≤ 1. (10)
∆x
4 STEINAR EVJE

1 3
numerical approximation numerical approximation
0.9 exact solution exact solution
2.5
0.8

0.7
2
0.6

U(X)

U(X)
0.5 1.5

0.4
1
0.3

0.2
0.5
0.1

0 0
0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1
X X

Figure 2. M = 200 cells. Left: λ = 1.0. Right: λ = 1.01011.

12
x 10
1 2.5
numerical approximation numerical approximation
0.9 exact solution 2 exact solution

0.8 1.5

0.7 1

0.6 0.5
U(X)

U(X)
0.5 0

0.4 −0.5

0.3 −1

0.2 −1.5

0.1 −2

0 −2.5
0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1
X X

Figure 3. M = 200 cells and λ = 0.9. Left: upwind-based scheme (7). Right:
central-based scheme (9).

In the next section we shall derive this condition by means of mathematical analysis.

Lack of stability of the scheme (9). We also want to test the scheme (9). For that purpose
we consider the grid with M = 200 cells and N T ime = 110. This implies that ∆x = 0.005,
∆t = 0.0045 and λ = 0.9. We calculate the solution by using, respectively, the scheme (7) and
(9). Results are shown in Fig. 3. Results indicate that the central-based discretization does not
allow us to calculate the solution.

1.3. Stability properties. Consider the model


ut + ux = 0, x ∈ (0, 1)
u(0, t) = u(1, t) = 0, (11)
u(x, t = 0) = u0 (x),

similar to the model problem studied above except that boundary conditions are different. We do
not need to specify any specific initial data u0 (x). The questions we are interested in are:
• Can we extract any information about the qualitative behavior of the solution u that
satisfies (11)?
• For example, will u(·, t) remain bounded in some sense, or can u(·, t) introduce oscillations
that are physically correct (such oscillations were observed if λ was set large)?
5

In order to give a partial answer to that, consider the following manipulation: We integrate in
space over [0, 1]
Z 1 Z 1
ut dx + ux dx = 0.
0 0

Using the boundary conditions we get


1 1
d
Z Z
u dx = − ux dx = −u(1, t) + u(0, t) = 0.
dt 0 0

We finally integrate in time over [0, t] and get


Z 1 Z 1 Z 1
u(·, t) dx = u(·, 0) dx = u0 (·) dx.
0 0 0

More generally, it can be shown that


Z 1 Z 1
|u(·, t)| dx ≤ |u0 (·)| dx. (12)
0 0

Conclusion: The quantity |u| integrated in space over [0,1] will never exceeds the initial quantity
|u0 | integrated in space over [0,1]. This gives some kind of control on the behavior of the true
solution u(x, t) at any time t > 0. It is controlled by the initial state u0 (x) in an integrated sense
(in L1 -norm).

Question: Is this property true also for the numerical scheme? And if so, under what con-
ditions? Recall from the numerical experiments above that if λ becomes too large, then strong
”overshoots” are introduced, see Fig. 1 (bottom left), and the estimate (12) cannot hold for the
numerical solution.

1.4. Stability of a numerical scheme. Based on the numerical investigations studied above we
suggest the following scheme for (11):

∆t
un+1
j = unj − λ(unj − unj−1 ), j = 1, . . . , M, λ= ,
∆x (13)
u0 = uM+1 = 0.

The interior part of the domain is represented by the grid points {xj }M
j=1 , the first x0 and last
xM+1 store the value 0 at the boundaries.
Let us try to mimic the calculations leading to estimate (12) by using the scheme (13). The
scheme can be written in the form

un+1
j = unj (1 − λ) + λunj−1 .

Next, we take the absolute value on both sides and estimate as follows:

|un+1
j | = |unj (1 − λ) + λunj−1 | ≤ |unj (1 − λ)| + |λunj−1 |
(14)
= (1 − λ)|unj | + λ|unj−1 |

Here we first have used the triangle inequality |a + b| ≤ |a| + |b|. Then we have assumed that

0≤λ≤1 (15)
6 STEINAR EVJE

in order to ensure that (1 − λ) ≥ 0 and λ ≥ 0. Now we sum over all cells from 1 to M (similar to
integration) in (14)
M
X M
X M
X
|un+1
j | ≤ (1 − λ) |unj | + λ |unj−1 |
j=1 j=1 j=1
M
X M−1
X
= (1 − λ) |unj | + λ |unj | (shift of index in last sum)
j=1 j=0
M
X M
X
≤ (1 − λ) |unj | +λ |unj | (add |unM | in the last sum)
j=1 j=1
M
X
= |unj |.
j=1

Hence, the conclusion is that


M
X M
X M
X
|un+1
j | ≤ |unj | ≤ ... ≤ |u0j |,
j=1 j=1 j=1

under the condition (15). In other words, we have shown by analysis that the numerical scheme
∆t
is stable in the sense of (12) if the stability condition λ = ∆x ≤ 1 is satisfied.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy