Reservoir Simulation: DR Wan Rosli Wan Sulaiman
Reservoir Simulation: DR Wan Rosli Wan Sulaiman
"analytical" => the equations of the model solved using "well known"
equations or functions (x2, sin x, ex etc).
(dN/dt) = α. N
α - constant
Q. What is N as a function of time N(t) if we start with a bacterial
colony of size No ?
N(t) = N0 .e α .t
Solve same problem by Numerical model.
They are the simplest equations we can have, which involve transient
fluid flow inside the reservoir.
Linear flow
The linear, one dimensional, horizontal, one phase, partial differential flow
equation for a liquid, assuming constant permeability, viscosity and
compressibility is:
Transient vs. steady state flow
The equation above includes time dependency through the right hand side term.
Thus, it can describe transient, or time dependent flow. If the flow reaches a
state where it is no longer time dependent, we denote the flow as steady
state.
It may be seen from the solution that as time becomes large, the exponential
term approaches zero, and the solution becomes:
This is, of course, the solution to the steady state equation above.
Radial flow (Well test equation)
In this case the flow area is proportional to r2, as shown in the following
figure:
The one-dimensional (radial) flow equation in this coordinate system becomes
For an infinite reservoir with P(r →∞) = Pi and well rate q from a well in the
center (at r=rw) the analytical solutions
For most real reservoir fluid flow problems, such simplifications are not
valid. Hence, we need to solve the equations numerically.
Discretization
In the following we will, as a simple example, solve the linear flow equation
above numerically by using standard finite difference approximations for the
two derivative terms and .
Then, the pressure in each block can be solved for numerically for each time
step. For our simple one dimensional, horizontal porous slab, we thus define
the following grid block system with N grid blocks, each of length Δx.
This is called a block-centered grid, and the grid blocks are assigned
indices, i , referring to the mid-point of each block, representing the average
property of the block.
Taylor series approximations
or, by employing the grid index system, and using superscript to indicate time
level:
This is called a central approximation of the second derivative. Here, the rest
of the terms from the Taylor series expansion are collectively denoted
O(Δx2) , thus denoting that they are in order of, or proportional in size to Δx2 .
This error term, sometimes called discretization error, which in this case is of
second order, is neglected in the numerical solution.
The smaller the grid blocks used, the smaller will be the error involved. Any
time level could be used in the expansions above. Thus, we may for instance
write the following approximations at time levels t + Δt and t + Δt/2 :
Approximation of the time derivative
First, we will use the approximations above at time level t and substitute them
into the linear flow equation.
For convenience, the error terms are dropped in the equation above, and the
equality sign is replaced by an approximation sign.
The driving force for flow arises from the BC's. Basically, we have two types of
BC's, the pressure condition (Dirichlet condition), and the flow rate condition
(Neumann condition).
Pressure BC
Applied to the simple linear system described above, we may have the
following two BC's:
The reason we here use indices i = ½ and N + ½ is that the BC's are applied to
the ends of the first and the last blocks, respectively.
Thus, the BC's cannot directly be substituted into the difference equation.
However, Taylor series may again be used to derive special formulas for the end
blocks. For block 1 we may write:
By combination of the two expressions, we obtain the following approximation of
the second derivative in block 1:
Alternatively, we would specify the flow rate, Q , into or out of an end face of
the system in question, for instance into the left end of the system above.
Making use of the fact that the flow rate may be expressed by Darcy's law, as
follows:
We will again apply Taylor series expansion to block 1, but this time we will
let the derivative of the pressure be the function:
Subtracting the second expression from the first and solving for the second
derivative, we obtain the following approximation for grid block 1:
Now we replace the derivative at the end face by the expression given by the
boundary condition:
so that the final formula for the second derivative in block 1 for this boundary
condition becomes:
Similarly, a constant rate at the right hand side, QR , would result in the
following expression:
The initial condition (initial pressures) for our horizontal system may be
specified as:
Having derived the difference equation above, and specified the grid system,
the BC's and the IC, we can solve for pressures.
We will discuss these cases below, starting with the explicit formulation. For
convenience, error terms are not included below.
Explicit formulation
This is exactly the case we derived above. By approximation of all the terms
at time t , we obtain a set of difference equation that can be solved explicitly
for average pressures in the grid blocks (i=1,...,N) for each time step, as
follows (below we give the expressions for the case of constant pressure
BC's; if rate conditions are used, the expressions should be modified
accordingly):
Implicit formulation
In this case, all time levels in the approximations are changed to t + Δt , except
for in the time derivative approximation, which now will be of the backward type.
Now we have a set of N equations with N unknowns, which must be solved
simultaneously.
where
and
This linear set of equations may be solved for average block pressures using for
instance the Gaussian elimination method.
Crank-Nicholson formulation
Since the pressures are defined at time levels t and t + Δt , and not at t + Δt/2,
we cannot solve this equation as it is.
Therefore, we rewrite the left side as the average of explicit and implicit
formulations: