Sei sulla pagina 1di 48

Fundamentals of Numerical Reservoir

Simulation

By

Dr. Pushpa Sharma


DIFFERENTIAL EQUATIONS FOR FLOW IN RESERVOIRS

• By reservoir simulation, we mean the process of inferring the


behavior of a real reservoir from the performance of a model
of that reservoir.
• The model may be physical, such as a scaled laboratory model,
or mathematical.
• For our purposes, a mathematical model of a physical system
is a set of partial DEs, together with an appropriate set of
boundary conditions, which we believe adequately describes
the significant physical processes taking place in that system.
DIFFERENTIAL EQUATIONS FOR FLOW IN RESERVOIRS

• The processes occurring in petroleum reservoirs are basically


fluid flow and mass transfer.
• Up to three immiscible phases (water, oil, and gas) flow
simultaneously, while mass transfer may take place between
the phases (chiefly between the gas and oil phases).
• Gravity, capillary, and viscous forces all play a role in the fluid
flow process.
• The model equations must account for all these forces, and
should also take into account an arbitrary reservoir
description with respect to heterogeneity and geometry.
DIFFERENTIAL EQUATIONS FOR FLOW IN RESERVOIRS…

• The differential equations (DE) are obtained by combining


Darcy’s law for each phase with a simple differential material
balance for each phase.
• We shall first derive the simple DE that describes single-phase
flow, and then proceed stepwise to derive the set of
simultaneous DE that describes the most complicated case of
multidimensional, multi component, three-phase flow.
• To use DEs for predicting the behavior of a reservoir, it is
necessary to solve them subject to the appropriate boundary
conditions.
DIFFERENTIAL EQUATIONS FOR FLOW IN RESERVOIRS…

• Only for the simplest cases involving homogeneous reservoirs


and very regular boundaries (such as a circular boundary
about a single well) can solutions be obtained by the classical
methods of mathematical physics.
• Numerical methods carried out on high-speed computers are
extremely general in their applicability and have proved to be
highly successful for obtaining solutions to very complex
reservoir situations.
• A numerical model of a reservoir, then, is a computer program
that uses numerical methods to obtain an approximate
solution to the mathematical model.
SINGLE-PHASE FLOW
• Darcy’s law
• For single-phase flow it states that in a horizontal system the
volumetric flow rate, Q, through a sample of porous material
of length L and a cross-sectional area A, is given by :

• where ∆p is the applied pressure drop across the sample, μ is


the viscosity of the fluid, and K is the absolute permeability of
the medium. For flow in only one direction (say, parallel to the
x-axis), we can write Darcy’s law in the following differential
form:

• where u = Q/A is a superficial flow velocity, and ∂p/∂x is the


pressure gradient in the x-direction. Note the negative sign in
eq. (1-2), which indicates that the pressure declines in the
direction of flow.
SINGLE-PHASE FLOW…
• The differential form of Darcy’s law may be
generalized to three dimensions as follows :

• where vx, vy, and vz, are the x -, y -, and z-components


of a velocity vector, v, oriented in some arbitrary
direction in 3-D space. Equations (1-3) do not take
gravity into account, however, and must be modified
to include gravity terms.
SINGLE-PHASE FLOW…
• Taking the depth, D, to be an arbitrary function of the
coordinates, (x, y, z), rather than identifying any one of
the coordinates (frequently z) with the depth. Then the
differential form of Darcy's law becomes:

• where p is the density of the fluid and g is the


acceleration due to gravity.
1-D Single-phase, Compressible Flow
• In deriving a DE for flow in 1-D, consider the cross-
sectional area for flow, A, as well as the depth, D, are
functions of the single space variable, x.
• Include term for injection of fluid by using a variable,
q, equal to the mass rate of injection per unit volume
of reservoir. (A negative q implies production.)
• Finally, the density ρ of the fluid changes with time.
(The porosity of the medium, φ may also change
with time.)
Fig. 1. Differential elements of volume. A
A. For one-dimensional flow.
B. For two dimensional flow.
C. For 3-D flow.

B C
1-D single-phase, compressible flow
• Consider a mass balance about the small box shown
in Fig.1A The box has length ∆x; the left face has area
A(x), the right face has area A(x+∆x). The rate at
which fluid mass enters the box at the left face is
given by:

• The rate at which fluid


• leaves at the right face is:
1-D single-phase, compressible flow…
• The volume of the box is A∆x. Here Ā indicates
the average value of A between x and x+∆x.
Then the rate at which fluid mass is injected
into the box is:

• The mass contained in the box is .


Then the rate of accumulation
1-D Single-phase, Compressible Flow…
• Since mass must be conserved, we have:
– [rate in] - [rate out] + [rate injected]
= [rate of accumulation] (1-5)
• Thus :

• Dividing by ∆x gives:
1-D Single-phase, Compressible Flow…
• Taking the limit as ∆x → 0 (and noting that a
derivative is defined by a limit):

• and etc., we obtain:


2-D Single-phase, Compressible Flow
• In 2-D flow, allow for the variation of the thickness of the
reservoir, H=H(x,y). Consider now a mass balance about the
small box in Fig.1B
• The box has length ∆x and width ∆y. The center of the box is
located at x'=x+(1/2)∆x and y‘=y+(1/2)∆y. The left face has
area H(x,y’)∆y.
• Hence the rate at which fluid mass enters the box at the left
face is given by:

• Similarly, fluid mass leaves the box at the right face at the
rate:
2-D REV
2-D Single-phase, Compressible Flow…
• Fluid enters the front face at the rate:

• and leaves the rear face at the rate:

• As the volume of the box is the rate


at which fluid mass is injected into the box is:

• and the rate of accumulation of mass in the box is:


2-D Single-phase, Compressible Flow…
• Substituting in (1.5)

• By rearranging, dividing by ∆x∆y, and taking the


limits as ∆x → 0 and ∆y →0, we obtain:
3-D, Single-phase, Compressible Flow
• Consider now a mass balance about the small box in
Fig.1c with length ∆x, width ∆y, and height ∆z.
• The center of the box is located at x’=x+(1/2)∆x,
y’=y+(1/2)∆y, and z’=z+(1/2)∆z. The area of the left
face is ∆y∆z; hence the rate at which fluid mass
enters the box at the left face is:
3-D, Single-phase, Compressible Flow
• Fluid leaves the right face at the rate:

• Fluid enters the front face at the rate:

• and leaves the rear face at the rate:

• Fluid enters the bottom face at the rate:


3-D REV
3-D, Single-phase, Compressible Flow…
• and leaves the top face at the rate:

• The volume of the box is thus


the rate of injection of mass into the box is:

• and the rate of accumulation of mass in the


box is:
3-D, Single-phase, Compressible Flow…
• By substituting these rates into eq. (1-5), dividing by
∆x ∆y ∆z, and taking the limits as ∆x→ 0, ∆y → 0, and
∆z → 0, we obtain:
Differential Operators
• Let ux, uy, and uz, be the x-,y -,and z-components of a
vector u. The divergence of this vector, written .u,
is a differential operator on u such that:
Differential Operators…
• Another useful differential operator is the gradient, which is a
vector formed from the derivatives of a scalar function.
• If u is a scalar function, the gradient, written u is a vector
whose x-, y- and z- components are ∂u/∂x, ∂u/∂y and ∂u/∂z.
Similarly, ∂D/∂x, ∂D/∂y, and ∂D/∂z are the components of D.
• We can now write Darcy’s law (eqs. (1-4)) in the compact
form:
Differential Operators…
• A combination of operators is . (fu), where f and u are both
scalar functions.
• Since f∂u/∂x, f∂ul∂y and f∂u/∂z are the x-, y-, and z-
components of the vector (fu),

• A special case of this combination is the divergence of the


gradient of a function, i.e., (u). This is called the Laplacian
of u, and is abbreviated as 2u. By setting f  1 in eq. (1-11) we
obtain:
General Equation For Single-phase Flow
• It is convenient to use the same DE for flow with any
number of dimensions. This we can do by arbitrarily
defining a “geometric factor” function, α, as follows:
– one dimension: α(x,y,z) = A(x) (1-13a)
– two dimensions: α(x,y,z) = H(x,y) (1-13b)
– three dimensions: α(x,y,z) = 1 (1-13c)
• Then eqs. (1-6), (1-7), and (1-8) can each be written
as:
General Equation For Single-phase Flow
• We recognize that in 2-D flow vz is assumed to be
zero, while in 1-D flow both vy and vz are assumed to
be zero.
• In this way we complete the correspondence
between eq. (1-14) and eqs. (1-6) and (1-7).
General equation for single-phase flow…
• As α and ρ are scalar functions, then (αρvx), (αρvy)
and (αρvz) are the x-, y-, and z-components of the
vector (αρv). Using the definition of divergence, eq.
(1-14) can be written in a very compact form:

• Finally, by substituting eq. (1-10) into (1-15), one


general equation for single-phase flow is obtained:
General equation for single-phase flow…
• In addition to specifying boundary conditions, it is
necessary also to specify porosity and an EOS for the
fluid; that is, relationships between porosity, density
and pressure:
– Ø = Ø(p), ρ = ρ(P)
• When this is done we have, in theory, all the
information necessary to solve the problem.
Boundary conditions
• In reservoir simulation, a frequent boundary condition is that
the reservoir lies within some closed curve C across which
there is no flow, and fluid injection and production take place
at wells which can be represented by point sources and sinks.
• Strictly, we should represent the no-flow boundary condition
by requiring that the normal component of the vector G at the
curve C be zero.
• This is relatively difficult to do numerically for an arbitrary
curve.
• However, usually there is little interest in an accurate solution
in the neighborhood of the curved boundary; rather, our
interest lies mostly within the interior of the reservoir.
Boundary conditions…
Boundary conditions…
• For this reason, it is adequate to represent the
curved boundary in the crude way shown in Fig. 2.
The reservoir is embedded in a rectangle (or
rectangular parallelepiped), and the functions K and
φ are set to zero outside the curve C.
Boundary conditions
• As stated above, a well is equivalent to a point source or sink.
Numerically, we cannot represent a true point source or sink,
wherein q is zero everywhere except at the wells, and infinite
at the location of the wells. Again we resort to an
approximation.
• Let Q be the desired mass rate of injection at a well. Let V be
the volume of a small box centered at the well. Within the
box, we take: q = Q/V, and outside the box, we set q to zero.
• We divide the computing region into a grid with spacing ∆x
(for 1-D), ∆x and ∆y (for 2-D), and ∆x, ∆y and ∆z (for 3-D) and
choose V=A∆x (for 1-D), V=H∆x∆y (for 2-D) or V=∆x∆y∆z (for
3-D).
Boundary conditions…
• There are occasions, when part or all of the
boundary of the reservoir to be straight. In such a
case, a no-flow boundary condition is easy to
represent by specifying that the normal component
of v be zero.
• Flow across a boundary can be represented by
specifying the value of the normal component of v;
an easy, alternative stratagem is to continue to
require no flow across the boundary and to place
fictitious wells at grid points on or near the
boundary.
Boundary conditions…
• Injection at such a fictitious well represents flow into
the region across the boundary, while production
would represent flow out of the region.
• Finally, it is desired to include among possible
boundary conditions the specification of pressure,
rather than rate, either at curved or straight
boundaries or at wells (i.e., at points within the
interior).
Special cases of single-phase flow
• It is of interest to examine several simplifications of eq.
(1-16) – simplifications that lead to classical equations of
mathematical physics.
• While these simple equations are not directly candidates
for numerical solution by reservoir simulators, they will
serve as excellent prototypes for explaining the
numerical methods used in the simulators.
• The initial simplification is to assume that gravitational
effects are negligible and that the flow region is free of
sources and sinks. With D = 0, and q = 0, eq. (1-16) can
be written:

• Several different cases arise, depending on the choice of


the equation of state for the fluid.
Ideal liquid of constant compressibility
• The compressibility of a fluid, c, is defined, for
isothermal conditions, by:

• For an ideal liquid, that is, one with constant


compressibility (as well as constant viscosity),
integration yields:

• where ρo is the density at the reference pressure, po.


• This EOS applies to most liquids, unless they contain
large quantities of dissolved gas. From eq. (1-18):
Ideal liquid of constant compressibility…
• and eq. (1-17) becomes:

• If, in addition, the porous medium and the reservoir


are homogeneous, then α, K and ø are uniform, and
we obtain:

• This is exactly of the same form as the Fourier


equation of heat conduction given below.
Liquids of slight compressibility
• For liquids of slight compressibility, the same equation as (1-
20) is obtained in terms of pressure:

• When analytical techniques, such as Laplace transforms, are


used for the solution of the heat conduction equation to
simulate reservoir performance, eq. (1-21) is most frequently
used, rather than (1-20). In doing so, it is important to
recognize the significance of the assumption that
compressibility is small. To demonstrate the nature of this
assumption, we rewrite eq. (1-18) as dρ = cρ dp and obtain
• and
Liquids of slight compressibility…
Flow of an Ideal Gas
• In the case of flow of an ideal gas through porous media,
we can again ignore gravitational effects. The equation of
state is:

• where M is molecular weight, R the gas constant, and T is


the absolute temperature. Substitution of eq. (1-26) into
(1-17) gives:

• If α, ø, μ, K and p are again considered constant, this


simplifies to:

• While eq. (1-27) is nonlinear, it is quite similar to (1-21).


Incompressible flow
• An important category of single-phase flow problems
is that of incompressible flow. With ρ and ø constant,
eq. (1-16) becomes:

• It is convenient to define a potential, Φ, as:

• Then eq. (1-28) becomes:


Incompressible flow…
• For the case of a homogeneous reservoir (constant α
and K ) as well as constant viscosity, this simplifies to
Poisson’s equation:

• and, in the region where there are no fluid sources or


sinks, to Laplace’s equation:
– 2 Φ = 0
• For sufficiently regular boundary conditions, the
results of potential theory (which involve solution of
Laplace’s equation) can then be applied to some
simple reservoir simulation problems.
TYPES OF SECOND-ORDER DIFFERENTIAL EQUATIONS
• There are basically three types of second-order DEs,
parabolic, elliptic, and hyperbolic. We need to be able to
distinguish among these types, since the numerical
methods for their solution need to be considered
separately. The variable, u, is a generalized dependent
variable.
• Parabolic equations
• The prototype parabolic equation is the Fourier equation
of diffusion or heat conduction,

• (1-29)
• which arises in the theory of diffusion, conduction of
heat, and in electrical conduction (in purely resistive
material). Here, k is the diffusivity or the thermal (or
electrical) conductivity.
TYPES OF SECOND-ORDER DIFFERENTIAL EQUATIONS…
• Elliptic equations
• Laplace’s equation, 2u = 0, and
• Poisson’s equation, 2u = f (x, y, z),
• are the simplest of the elliptic equations. They arise in
electrostatic and magnetic field theory and in
hydrodynamics of incompressible fluids.
• Hyperbolic equations
• The prototype hyperbolic equation is the wave equation,
• (1-30)

• which arises in acoustics and electrodynamics.


• Here, u is the velocity of propagation of the acoustic or
electromagnetic disturbance.
TYPES OF SECOND-ORDER DIFFERENTIAL EQUATIONS…
• Classification of equations
• If we restrict ourselves to two independent variables (either x
and y, or x and t ), then these equations may be written in the
following general form:

• (1-31)

• This equation may then be classified into the three types as


follows:
1. A * B > 0. Elliptic
2. A . B = 0. Parabolic
3. A - B < 0. Hyperbolic
• There is an obvious analogy with the familiar algebraic
equation :
– Ax2 + B y2 = y
• which is an equation for an ellipse when AB > 0, for a
parabola when B = 0, and for a hyperbola when AB < 0.
First-order hyperbolic equations
• In 1-D, the second-order hyperbolic eq. (1-30) is:

• which can be “factored” into two first-order parts.

• The second factor is equivalent to the first-order convection equation :

• (1-32)

• Eq. (1-32) is important in the theory of multiphase flow through porous


media. On the other hand, second-order hyperbolic problems will be of
little interest. Consequently, the discussion of numerical methods for the
solution of hyperbolic problems will be focused entirely on first-order
problems.

Potrebbero piacerti anche