You are on page 1of 12

A REDUCED SINGLE-PHASE MODEL

FOR TRANSIENT WELLBORE-RESERVOIR FLOW DYNAMICS

STEINAR EVJE

Abstract. The purpose is to


• Demonstrate how to obtain a convection-diffusion-reaction equation relevant for wellbore
flow with one fluid (liquid);
• Describe a discretization of this model;
• Run some cases where we demonstrate fundamental behavior of the flow system when we
consider:
(i) different flow rates (increase or decrease in pressure profile);
(ii) interaction with reservoir (growth or reduction in pressure);
(iii) effect of compressibility;
(iv) demonstrate convergence to a stationary solution.
• Exercise: 4.1

1. A reduced single-fluid model relevant for wellbore flow


1.1. Introduction. A model for describing single-phase isentropic flow in a wellbore takes the
form
ρt + (ρu)x = ζ[Pr − P (ρ)], (1)
2
(ρu)t + (ρu )x + P (ρ)x = −κu − ρg,
where ρ, u, and P (ρ) are density, velocity, and pressure respectively, while ζ > 0 is the PI-index
characterizing the influx/efflux from/to reservoir. Pr represents reservoir pressure such that for
P > Pr there is flow of fluid from well to reservoir whereas for P < Pr fluid flows from reservoir
into wellbore. Moreover, κ > 0 is the damping coefficient characterizing the effect of wall friction
whereas g is the gravity constant.
It is known that usually when time t tends to infinity, the convection term in the momentum
equation (1)2 , i.e., (ρu)t + (ρu2 )x decays faster than the other terms.
This leads us to consider a reduced model obtained by ignoring (ρu)t +(ρu2 )x in the momentum
equation, which gives us the following model:
ρt + (ρu)x = ζ[Pr − P (ρ)]
(2)
P (ρ)x = −κu − gρ.
That is,
ρt + (ρu)x = ζ[Pr − P (ρ)]
g 1 (3)
− ρ − P (ρ)x = u.
κ κ
In other words
g 1
ρt + (− ρ2 )x = ( ρP (ρ)x )x + ζ[Pr − P (ρ)]. (4)
κ κ
This model can represent the long time behavior of the original model (1). It is also a good
approximation to the full model (1) if fluid velocity is sufficiently small.
As a simple pressure law we may use the linear relations
P P − p0
ρg = 2 , ρl = ρl,0 + , (5)
ag a2l

Date: February 27, 2015.


1
2 STEINAR EVJE

depending on whether the fluid is gas or liquid. Here ag and al refer to sound velocity, respectively,
in gas and liquid. In the following, let us consider flow of liquid. We ignore the ”l” index in ρ.
That is,
P (ρ) = a2l (ρ − ρl,0 ) + p0 . (6)
From (4) we see that the following model equation for liquid flow is then obtained
ρt + f (ρ)x = (d(ρ)P (ρ)x )x + B(ρ). (7)
where
g 1
f (ρ) = − ρ2 , d(ρ) = ρ, B(ρ) = ζ[Pr − P (ρ)]. (8)
κ κ
More generally, the equation is of the form
ρt + f (ρ)x = (a(ρ)ρx )x + B(ρ), a(ρ) = d(ρ)P 0 (ρ). (9)
This model is often denoted as a convection-diffusion-reaction model where convection (or ad-
vection) represents the transport effect associated with f (ρ)x , diffusion is transport related to
(a(ρ)ρx )x , and reaction refers to the source term g(ρ). Such models have a wide application area
including modeling of processes in fluid mechanics, biological processes, mathematical finance, etc.
In the following it is convenient to work with the model in the form (7) when we discuss a
discrete approximation.

Boundary conditions. We want to implement a situation where we have a specified flux at the
left end x = 0 in a domain of length L. This gives rise to the following boundary condition at the
left end:
[f (ρ) − d(ρ)P (ρ)x ] = qL (t). (10)

x=0

At the right boundary we assume that a known pressure p∗ = P (ρ∗ ) is specified.



P (ρ) = p∗ (t). (11)

x=L

This corresponds to a situation where we have a specified influx of liquid at the bottom of the
wellbore while it is open to the atmosphere at the top. By increasing the top pressure p∗ we can
simulate that we gradually close the wellbore at the top.

Initial data. We must also specify the state (u0 , ρ0 ) = (u, ρ)(x, t = 0) at time zero. A natural
choice is to assume that the system is stagnant at initial time. That is
u0 (x) = 0, (12)
and from (3) we see that ρ0 is given as the solution of
g 1
− ρ0 − P (ρ0 )x = 0.
κ κ
Hence, we must solve the ODE equation
g 1
− = 0 ρ0x , ρ0 (L) = ρ∗ = ρ(p∗ ).
a2l ρ
The solution of this ODE can be found as
g
ln(ρ∗ ) − ln(ρ0 ) = − (L − x)
a2l
This gives the solution
g 
ρ0 (x) = ρ∗ exp 2 (L − x) . (13)
al
TWO-FLUID 3

1.2. A discrete approximation - numerical scheme. We may divide the spatial domain [0, L]
into N cells. A discrete scheme for (7) is given by

ρn+1
j − ρnj 1  n n
 1  
+ Fj+1/2 − Fj−1/2 = [dPx ]nj+1/2 − [dPx ]nj−1/2 + Bjn , (14)
∆t ∆x ∆x
where Fj+1/2 ≈ f (ρ)|xj+1/2 , [dPx ]j+1/2 ≈ d(ρ)P (ρ)x |xj+1/2 , and Bj ≈ B(ρ)|xj . Some natural
choices are

Fj+1/2 = f (ρj+1 ) (”upwind-based” flux) (15)


Pj+1 − Pj P (ρj+1 ) − P (ρj ) d(ρj ) + d(ρj+1 )
[dPx ]j+1/2 = dj+1/2 = dj+1/2 , dj+1/2 = (16)
∆x ∆x 2
Bj = B(ρj ). (17)
Remark 1.1. See Exercise 4.1 for construction of a stable scheme based on an ”up-wind”-type of
technique when fluid velocity is negative.
Interior grid cells: j = 2, . . . , N . The interior part of the domain [0, L] is represented by the
cells corresponding to j = 2, . . . , N − 1. For these cells we employ the discrete approximation (14)
combined with the discrete approximation of fluxes and source term as specified in (15)-(17). This
gives rise to the following scheme
∆t
ρn+1
j = ρnj − λ(Fj+1/2
n n
− Fj−1/2 ) + λ([dPx ]nj+1/2 − [dPx ]nj−1/2 ) + ∆tBjn , λ= . (18)
∆x
Left boundary: Cell j = 1. Concerning the implementation of the boundary condition at left
end
[f (ρ) − d(ρ)P (ρ)x ] = qL (t),

x=0
we see that
d(ρ)P (ρ)x = f (ρ)|x=0 − qL (t) ≈ F1/2 − qL (t).

x=0
From this we obtain the the following discrete approximation of the flux [dPx ]1/2

[dPx ]1/2 ≈ d(ρ)P (ρ)x ≈ F1/2 − qL (t), (19)

x=0
whereas the convective flux F1/2 at inlet is given by
F1/2 = f (ρ1 ). (20)
We employ this in the scheme (18) corresponding to cell j = 1 and find that it now takes the form:
    ∆t
ρn+1
1 = ρn1 − λ F1+1/2
n n
− F1/2 + λ [dPx ]n1+1/2 − [F1/2
n
− qL (tn )] + ∆tB1n , λ= . (21)
∆x
n
Note that the convective flux term F1/2 will disappear and is not explicitly used. The scheme then
takes the form
  ∆t
ρn+1
1 = ρn1 − λF1+1/2
n
+ λ [dPx ]n1+1/2 + qL (tn )] + ∆tB1n , λ= . (22)
∆x
Right boundary: Cell j = N . Concerning the implementation of the boundary condition at
right end
P (ρ) = p∗ .

x=L
The right boundary cell corresponding to j = N :
    ∆t
ρn+1
N = ρ n
N − λ F n
N +1/2 − F n
N −1/2 + λ [dPx ] n
N +1/2 − [dPx ] n n
N −1/2 + BN , . (23)
λ=
∆x
The discretization of the right boundary fluxes are then carried out as follows: The diffusive flux
is approximated as
p∗ − PN p∗ − P (ρN ) d(ρN ) + d(ρ∗ )
[dPx ]N +1/2 ≈ dN +1/2 = dN +1/2 , dN +1/2 = (24)
∆x/2 ∆x/2 2
4 STEINAR EVJE

whereas for the convective flux we use


FN +1/2 = FN −1/2 . (25)
In other words, it is assumed that there is no change of the density caused by the gravity in the
last cell. The flux is completely dictated by the pressure gradient which should be a reasonable
approximation for the cell closest to the top of the wellbore.
Initial data. We choose the initial density {ρ0j }N
j=1 according to (13).

Calculation of the fluid velocity u. Clearly, having solved for ρ that obey (7), we can calculate
the fluid velocity from the second equation of (3). In particular, the discrete scheme for calculating
{unj }N n N
j=1 after having obtained {ρj }j=1 from (18), (21), and (23), can be defined as
g 1
unj = − ρnj − [Px ]nj , j = 1, . . . , N (26)
κ κ
where  1


 ∆x [p2 − p1 ], j=1;



 1 h Pj +Pj+1 i
P +P
[Px ]j = ∆x 2 − j−12 j , j=2,. . . ,N-1; (27)



 h i
 1 p∗ − 1 (pN −1 + pN ) , j=N.


∆x 2

2. Some examples
We have implemented the scheme in matlab. Now we want to use it to gain some insight into
different mechanisms that control the flow process. In particularly, we are interested in gaining
insight into:
• How will the pressure distribution along the wellbore be a result of the gravity force
and the friction force?
• What is the role played by the injection rate qL (t)?
• What is the role played by the compressibility a12 in (5)? High al makes the fluid more
l
incompressible whereas low al makes it more compressible.
• What is the effect on pressure and fluid velocity profiles along the wellbore when in-
teraction between reservoir and wellbore is included in some part of the wellbore?
TWO-FLUID 5

2.1. Specification of parameters. We set


L = 200 m.
Data related to density model:
p0 = 105 Pa, ρl,0 = 1000 kg/m3 , al = 1000 m/s.
Data related to friction term:
κ = 4 · 104 kg/m2 s.
Discretization data:
L
N = 50, ∆x = = 4.
N
Influx at left boundary:
qL (t) = 200 kg/m3 s.
Stability condition for ρt = (a(ρ)ρx )x , see (9) for the definition of a(ρ):
∆t 1
max a(ρ) ≤ . (28)
∆x2 2
As an estimate we have
a2 106
max a(ρ) ∼ max(ρ0 ) l ∼ = 25 max(ρ0 ) ∼ 25000.
κ 4 · 104
Stability condition for ρt + f (ρ)x = 0:
∆t
max |f 0 (ρ)| ≤ 1. (29)
∆x
As an estimate
g 20 1
|f 0 (ρ)| ∼ 2 max ρ0 ∼ 1000 ∼ .
κ 4 · 104 2
Clearly, the stability condition (28) dictates ∆t and gives the following estimate on ∆t:
1 1 16
∆t ≤ ∆x2 ∼ ≈ 3.2 · 10−4 .
2 25000 50000
2.2. Variation in inflow rate. We want to calculate the solution during the time period [0, T ].
• How will the pressure profile be sensitive to changes in the flow rate qL (t) at the bottom?
We set T = 25 s and vary the injection rate as given below. We have used number of time
∆t
N T ime = 2 · 105 which corresponds to max a(ρ) ∆x 2 ≈ 0.2. The sound of speed is here

al = 1000. The different rates we choose are


qL = 0;
qL = 100;
qL = 200;
qL = −200.
Results are shown in Fig. 1. Main observations are:
– The pressure and velocity profiles will converge (approach) to a stationary solution.
– Higher injection rate gives a corresponding increase in the pressure gradient.
Question: What is the force which is sensitive to the fluid rate?

• Check what happens when we change compressibility of liquid flow: aL = 500, aL = 200,
aL = 100. See Fig. 2. When the sound of speed becomes lower, information will propagate
at a lower speed and thereby the pressure profile and velocity profiles becomes different
because it will take a longer time to reach the stationary solution. In fact, solutions do
not reach the stationary solution within the given time T = 25 s.

• What is the role of the gravity term, the convection term?


Essentially, it determines the slope of the pressure profile due to gravity forces. Then, this
profile is modified due to the pressure gradient caused by frictional forces.
6 STEINAR EVJE

3
Density (kg/m ) Pressure (bar) Fluid Velocity (m/s)
1004 40 0.5

0.4
1003.5 35
0.3
1003 30
0.2
1002.5 25
0.1

1002 20 0

p
ρ

u
−0.1
1001.5 15
−0.2
1001 10
−0.3
1000.5 5
−0.4

1000 0 −0.5
0 50 100 150 200 0 50 100 150 200 0 50 100 150 200
x (m) x (m) x (m)
3
Density (kg/m ) Pressure (bar) Fluid Velocity (m/s)
1004 40 0.5

0.4
1003.5 35
0.3
1003 30
0.2
1002.5 25
0.1

1002 20 0
p
ρ

u
−0.1
1001.5 15
−0.2
1001 10
−0.3
1000.5 5
−0.4

1000 0 −0.5
0 50 100 150 200 0 50 100 150 200 0 50 100 150 200
x (m) x (m) x (m)

Density (kg/m3) Pressure (bar) Fluid Velocity (m/s)


1004 40 0.5

0.4
1003.5 35
0.3
1003 30
0.2
1002.5 25
0.1

1002 20 0
p
ρ

−0.1
1001.5 15
−0.2
1001 10
−0.3
1000.5 5
−0.4

1000 0 −0.5
0 50 100 150 200 0 50 100 150 200 0 50 100 150 200
x (m) x (m) x (m)

Figure 1. The purpose is to study how the pressure profile is sensitive for the
injection rate qL . Top: qL = 100. Middle: qL = 200. Bottom: qL = −200.

2.3. Inclusion of well-reservoir flow. We consider an example where the well-reservoir inter-
action term is given as
ρt + (ρu)x = ζ(x) min{0, [Pr − P (ρ)]} (30)
TWO-FLUID 7

3
Density (kg/m ) Pressure (bar) Fluid Velocity (m/s)
1015 40 0.5

0.4
35
0.3
30
0.2
1010
25
0.1

20 0

p
ρ

u
−0.1
15
1005
−0.2
10
−0.3
5
−0.4

1000 0 −0.5
0 50 100 150 200 0 50 100 150 200 0 50 100 150 200
x (m) x (m) x (m)
3
Density (kg/m ) Pressure (bar) Fluid Velocity (m/s)
1090 40 0.5

1080 0.4
35

1070 0.3
30
0.2
1060
25
0.1
1050
20 0
p
ρ

u
1040
−0.1
15
1030
−0.2
10
1020 −0.3
1010 5
−0.4

1000 0 −0.5
0 50 100 150 200 0 50 100 150 200 0 50 100 150 200
x (m) x (m) x (m)

Density (kg/m3) Pressure (bar) Fluid Velocity (m/s)


1300 40 0.5

0.4
35
1250
0.3
30
0.2
1200
25
0.1

1150 20 0
p
ρ

−0.1
15
1100
−0.2
10
−0.3
1050
5
−0.4

1000 0 −0.5
0 50 100 150 200 0 50 100 150 200 0 50 100 150 200
x (m) x (m) x (m)

Figure 2. The purpose is to study the effect of compressibility. We set qL = 200


and compute solutions from time zero to T = 25 for different choices of al . Top:
al = 500. Middle: al = 200. Bottom: al = 100.
8 STEINAR EVJE

with 
1, if 25 ≤ x ≤ 50;
ζ(x) = k · I25≤x≤50 (x), I25≤x≤50 = (31)
0, otherwise.
This means that we do not allow fluid to flow from reservoir into the wellbore, only that fluid can
flow from wellbore into reservoir if the well pressure P (ρ) gets higher than the critical pressure Pr
(loss of fluid in wellbore) in the open hole section which lies in the interval [25, 50]. Moreover, we
set Pr = 32 bar and k = 0.1 as default.
• How to get influx of fluid from reservoir? We consider the case where we have injection of
liquid at a rate qL = 400 leading to increase in pressure. At some point pressure gets high
enough to lead to loss of fluid to the formation as dictated by the mass balance equation
(30). Again we consider the case with T = 25 s and al = 1000. We consider different
choices of the parameter k in (31) which characterizes the strength of the well-reservoir
interaction. Results are shown in Fig. 3.

• Explain what happens with pressure profile and fluid velocity when influx of fluid from
reservoir takes place. Why two different slopes in pressure profile and a jump in the fluid
velocity?

• What is the effect of changing the rate coefficient ζ (its strength by k) associated with the
well-reservoir interaction?

2.4. A stationary solution. We want to find the stationary solution of (9). This corresponds
to solving the following ODE equation:
f (ρ)x = (a(ρ)ρx )x ,
(32)
[f (ρ) − a(ρ)ρx ] = qL (t), P (ρ) = p∗ (t).

x=0 x=L
That is,
f (ρ) − a(ρ)ρx = C (constant),
(33)
[f (ρ) − a(ρ)ρx ] = qL (t), P (ρ) = p∗ (t).

x=0 x=L
Clearly, the steady state behavior is then determined by the following ODE

f (ρ) − a(ρ)ρx = qL (t), ρ = ρ∗ (t). (34)

x=L
Hence,
−gρ2 − ρa2l ρx = κqL (t), ρ = ρ∗ (t).

x=L
or
dρ κqL + gρ2 a + bρ2
=− = − , a = κqL /a2l , b = g/a2l .
dx ρa2l ρ
ρ
dρ = −dx.
a + bρ2
Hence, we get
ρ∗ L
ρ
Z Z
dρ = − dx = −(L − x), ρ(L) = ρ∗ .
ρ a + bρ2 x
The solution is
ln(a + b(ρ∗ )2 ) ln(a + bρ2 )
− = −(L − x), x ∈ [0, L].
2b 2b
Thus,
ln(a + bρ2 ) = ln(a + b(ρ∗ )2 ) + 2b(L − x), x ∈ [0, L].
That is,
[a + bρ2 ] = [a + b(ρ∗ )2 ]e2b(L−x) , x ∈ [0, L].
TWO-FLUID 9

3
Density (kg/m ) Pressure (bar) Fluid Velocity (m/s)
1004 40 0.5

0.4
1003.5 35
0.3
1003 30
0.2
1002.5 25
0.1

1002 20 0

p
ρ

u
−0.1
1001.5 15
−0.2
1001 10
−0.3
1000.5 5
−0.4

1000 0 −0.5
0 50 100 150 200 0 50 100 150 200 0 50 100 150 200
x (m) x (m) x (m)
3
Density (kg/m ) Pressure (bar) Fluid Velocity (m/s)
1004 40 0.5

0.4
1003.5 35
0.3
1003 30
0.2
1002.5 25
0.1

1002 20 0
p
ρ

u
−0.1
1001.5 15
−0.2
1001 10
−0.3
1000.5 5
−0.4

1000 0 −0.5
0 50 100 150 200 0 50 100 150 200 0 50 100 150 200
x (m) x (m) x (m)

Density (kg/m3) Pressure (bar) Fluid Velocity (m/s)


1004.5 40 0.5

1004 0.4
35

1003.5 0.3
30
0.2
1003
25
0.1
1002.5
20 0
p
ρ

1002
−0.1
15
1001.5
−0.2
10
1001 −0.3
1000.5 5
−0.4

1000 0 −0.5
0 50 100 150 200 0 50 100 150 200 0 50 100 150 200
x (m) x (m) x (m)

Figure 3. Injection rate is qL = 400 and al = 1000. The purpose is to consider


different choices of k characterizing the strength of the well-reservoir interaction
as given by (31). For all cases we use Pr = 32 bar. Left: k = 0.001. Middle:
k = 0.1 (strong interaction). Bottom: k = 0.00001 (weak interaction).
10 STEINAR EVJE

This gives

[a + b(ρ∗ )2 ]e2b(L−x) − a h a i a a κqL


ρ2 = = + (ρ∗ )2 e2b(L−x) − , =
b b b b g
or
r
[a + b(ρ∗ )2 ]e2b(L−x) − a
ρ= . (35)
b
From this we can also calculate the stationary velocity profile u from the equation

g 1 g a2 g a2 1
u = − ρ − P (ρ)x = − ρ − l ρx = − ρ + l [a + b(ρ∗ )2 )]e2b(L−x) , (36)
κ κ κ κ κ κ ρ

where
1
ρx = − [a + b(ρ∗ )2 )]e2b(L−x) .
ρ

2.5. Convergence to a stationary flow state. We consider the same scheme as employed
before and calculate solutions with qL = 200 and N T ime = 2 · 105 . We consider different choices
of compressibility represented by al = 1000, al = 200, al = 100, and al = 50. Results are shown
in Fig. 4.
• Demonstrate that the transient model will converge to a stationary solution. Lower al
means that it takes a longer time to reach the stationary solution.

• Check the more interesting stationary solutions that appear when we set al = 50 and
T = 2500. We then get stationary solutions that are not straight lines. Explain the fluid
velocity profile which is increasing. What is the physical explanation of this?
Higher pressure at the bottom implies that the fluid is more compressed, and rate be-
comes lower. As pressure decreases towards the upper part of wellbore, the fluid takes
more space. Hence, fluid velocity must increase in this part of the wellbore.

• In Fig. 5 we have calculated the stationary solution as given by (35) and (36) and compared
with the numerical solution for the case with al = 50. We have used a grid of 100 cells.
There is a fine match between exact and numerical solution.
TWO-FLUID 11

Density (kg/m3) Pressure (bar) Fluid Velocity (m/s)


1004 40 0.5
final time final time final time
initial initial 0.4 initial
1003.5 35
0.3
1003 30
0.2
1002.5 25
0.1

1002 20 0

p
ρ

u
−0.1
1001.5 15
−0.2
1001 10
−0.3
1000.5 5
−0.4

1000 0 −0.5
0 50 100 150 200 0 50 100 150 200 0 50 100 150 200
x (m) x (m) x (m)
3
Density (kg/m ) Pressure (bar) Fluid Velocity (m/s)
1090 40 0.5
final time final time final time
1080 initial initial 0.4 initial
35
0.3
1070
30
0.2
1060
25
0.1
1050
20 0

p
ρ

u
1040
−0.1
15
1030
−0.2
10
1020
−0.3
1010 5
−0.4

1000 0 −0.5
0 50 100 150 200 0 50 100 150 200 0 50 100 150 200
x (m) x (m) x (m)
3
Density (kg/m ) Pressure (bar) Fluid Velocity (m/s)
1400 40 0.5
final time final time final time
initial initial 0.4 initial
1350 35
0.3
1300 30
0.2
1250 25
0.1

1200 20 0
p
ρ

u
−0.1
1150 15
−0.2
1100 10
−0.3
1050 5
−0.4

1000 0 −0.5
0 50 100 150 200 0 50 100 150 200 0 50 100 150 200
x (m) x (m) x (m)

Density (kg/m3) Pressure (bar) Fluid Velocity (m/s)


2800 45 0.5
final time final time final time
2600 initial 40 initial 0.4 initial
0.3
2400 35
0.2
2200 30
0.1
2000 25
0
p
ρ

1800 20
−0.1
1600 15
−0.2
1400 10
−0.3
1200 5 −0.4

1000 0 −0.5
0 50 100 150 200 0 50 100 150 200 0 50 100 150 200
x (m) x (m) x (m)

Figure 4. Top: qL = 200 and al = 1000 and T = 25 s. Middle:qL = 200 and


al = 200 and T = 250 s. Middle: qL = 200 and al = 100 and T = 2500 s. Bottom:
qL = 200 and al = 50 and T = 2500 s.
12 STEINAR EVJE

3
Density (kg/m ) Fluid Velocity (m/s)
2800 0.5
analytical analytical
2600 numerical 0.4 numerical

0.3
2400
0.2
2200
0.1
2000
0
ρ

u
1800
−0.1
1600
−0.2

1400
−0.3

1200 −0.4

1000 −0.5
0 50 100 150 200 0 50 100 150 200
x (m) x (m)

Figure 5. Example with qL = 200 and al = 50 and T = 2500 sec. Comparison


of numerical and analytical stationary solution on a grid with 100 cells.

3. Exercises
Exercise 4.1. Consider the linear transport equation
ut − ux = 0, x ∈ (0, 1),
u(0, t) = u(1, t) = 0,
u(x, t = 0) = u0 (x).
a) Follow the approach used in ”3a-Project-Transport1” and formulate a discrete scheme
based on an ”up-wind” formulation. Take into account that the flow now is from right
towards left.

b) Demonstrate that we can obtain an estimate of the form


M
X M
X
|unj | ≤ |u0j |.
j=1 j=1
∆t
What is the condition on ∆x we must use in order to achieve this estimate?

You might also like