Reservoir Simulation
Dr. Amit Kumar
Solution of Simulator Equations
• Partial differential equations are replaced by an approximate system
of algebraic equations.
• A single equation is formed for single phase flow.
• A set of equations is formed for multi phase flow.
• The resultant system of equations are solved simultaneously using
iterative numerical methods.
• The solution gives the values of variable at the mesh points or grid
blocks.
Solution of Simulator Equations
• The difference between the true value and value calculated at each
grid depend on the accuracy of the equations approximating the
partial differential equations and the tolerance specified for the
iterative solution.
• Most commercial reservoir simulation softwares are based on finite
difference method.
• Finite difference method result in simple algebraic equations that
minimizes the computational time and storage required for getting to
solution.
Solution of Simulator Equations
• Finite Difference Method
• For a function u(x), Taylor expansion about point i can be written
Forward expansion
Backward expansion
Solution of Simulator Equations
• Finite Difference Method
• As the expansion is infinite series, they need to be truncated for
practical use.
• The accuracy of the approximation can be improved by reducing
the value of x.
• Smaller value of x means increase in the number of grids and
increase in the computational workload.
• Taking very small value can lead to unstable solutions.
• The function and its derivative should also be continuous.
Solution of Simulator Equations
• Finite Difference Method
• Forward difference
• Backward difference
• Central difference (mode accurate than forward and backward
difference)
Solution of Simulator Equations
• Finite Difference Method
• Adding the forward and backward Taylor series expansion gives
which also has second order accuracy.
• Similarly, time
discretization can be done
Solution of Simulator Equations
• Finite Difference Method
• Forward and Backward difference for time discretization are:
• Greater accuracy can be achieved by using the time derivative at
n+12
Solution of Simulator Equations
• Finite Difference Method
• Using forward time difference relation leads to explicit formulation
• Using backward time difference relation leads to implicit
formulation
• Using central time difference relation leads to Crank-Nicholson
formulation
• The PDEs in reservoir simulation are usually non-linear of the form
Solution of Simulator Equations
• Finite Difference Method
• These are written as
where
Solution of Simulator Equations
• Finite Difference approximations to reservoir model equations
• Single phase horizontal flow in 1D
• Hydraulic diffusivity can be defined as
• Diffusivity equation can be rewritten as
Solution of Simulator Equations
• Finite Difference approximations to reservoir model equations
Solution of Simulator Equations
• Finite Difference approximations to reservoir model equations
Solution of Simulator Equations
• Finite Difference approximations to reservoir model equations
• Discretization of Diffusivity Equation
• Time derivative can be written either by forward difference or
backward difference:
Solution of Simulator Equations
• Finite Difference approximations to reservoir model equations
• Spatial derivatives can also be written either by forward difference
or backward difference:
• Explicit Method
Solution of Simulator Equations
• Finite Difference approximations to reservoir model equations
• Explicit Method – All pressures at time level n is known and
pressure at time level n + 1 can be determined
• For points at boundary, boundary
conditions are taken.
• Two types of boundary conditions are
• Neumann conditions
• Dirichlet conditions
Solution of Simulator Equations
• Finite Difference approximations to reservoir model equations
•Neumann conditions – Based on flow rate at the boundary
For no flow boundary,
Using central difference method,
Solution of Simulator Equations
• Finite Difference approximations to reservoir model equations
• Neumann conditions
𝑝o𝑛 is pressure at an imaginary
point outside reservoir
Solution of Simulator Equations
• Finite Difference approximations to reservoir model equations
•Dirichlet conditions – Pressure specified at boundary
Pressure at point near boundary:
• Explicit method is simple and have lower
computational workload.
• Gives unstable result for high value of
time step
Solution of Simulator Equations
• Finite Difference approximations to reservoir model equations
• Question on explicit method
L = 10000 ft x = 1000 ft k = 200 mD µ = 1 cp
Φ = 0.2 c= 6.33E-6 psi-1
Solution of Simulator Equations
• Finite Difference approximations to reservoir model equations
• Question on explicit method
L = 10000 ft x = 1000 ft k = 200 mD µ = 1 cp
Φ = 0.2 c= 6.33E-6 psi-1
Submit Assignment with the calculations in excel with t as 0.2, 0.4,
0.6
Solution of Simulator Equations
• Finite Difference approximations to reservoir model equations
• Stability of Explicit Method
A numerical method is stable, if error reduces with increasing time
steps.
A numerical method will be unstable, if the error grows with time.
Unconditional stability is desirable for any numerical scheme.
• von Neumann Stability Analysis
For explicit method
Error can be denoted as e 𝑛+1
i
Solution of Simulator Equations
• Finite Difference approximations to reservoir model equations
• von Neumann Stability Analysis
𝑝i∗𝑛+1 is the real solution, 𝑝i𝑛+1is the solution be numerical method
The equation is linear, so the error also satisfies the equation
Error ei𝑛+1can be represented in Fourier series as
Solution of Simulator Equations
• Finite Difference approximations to reservoir model equations
•von Neumann Stability Analysis
Substituting
The difference equation can be written as:
Solution of Simulator Equations
• Finite Difference approximations to reservoir model equations
• von Neumann Stability Analysis
Solution of Simulator Equations
• Finite Difference approximations to reservoir model equations
•von Neumann Stability Analysis
For stability,
RHS inequality is always true
For LHS
Solution of Simulator Equations
• Finite Difference approximations to reservoir model equations
•von Neumann Stability Analysis
Stability condition can be written as:
For previous question, t < 0.5 days. To simulate for 20 years (7300
days), the calculations for at least 14600 time steps is required.
Solution of Simulator Equations
• Finite Difference approximations to reservoir model equations
• Implicit Method
Backward difference equation is written as
Applying von Neumann
stability to the
error e i𝑛+1
Solution of Simulator Equations
• Finite Difference approximations to reservoir model equations
•Stability of Implicit Method
Dividing by gives
Solution of Simulator Equations
• Finite Difference approximations to reservoir model equations
• Solution of Implicit Method
Taking
Implicit difference equation
can be written as:
Solution of Simulator Equations
• Finite Difference approximations to reservoir model equations
• Solution of Implicit Method
The equation forms a system of equations when applied for each grid
Solution of Simulator Equations
• Finite Difference approximations to reservoir model equations
• Solution of Implicit Method
The boundary points can be eliminated by applying boundary
conditions
Neumann condition can be applied to equation of block i =1
Dirichlet condition can be applied for block i = M
The equation for block M – 1 becomes
Solution of Simulator Equations
• Finite Difference approximations to reservoir model equations
• Solution of Implicit Method
The system of equations with the boundary conditions becomes
Solution of Simulator Equations
• Finite Difference approximations to reservoir model equations
• Solution of Implicit Method
The system of equations using matrix notation can be written as
Or as [A]{x} = {b}
Solution of Simulator Equations
• Finite Difference approximations to reservoir model equations
•Solving a tri-diagonal system of equations
For i = 1
For i = 2
Solution of Simulator Equations
• Finite Difference approximations to reservoir model equations
•Solving a tri-diagonal system of equations
For i = i
For i = M-2
For i = M-1
Solution of Simulator Equations
• Finite Difference approximations to reservoir model equations
• Solving a tri-diagonal system of equations
Two equations and two unknowns can be solved for 𝑝𝑛+1 𝑛+1
𝑀−1 and 𝑝 𝑀−2
These steps are called as Forward elimination, pivot and backward
substitution
• Question on implicit method
L = 10000 ft x = 2000 ft k = 200 mD µ = 1 cp
Φ = 0.2 c= 6.33E-6 psi-1