- •Basics of Reservoir Simulation
- •with the
- •Eclipse Reservoir Simulator
- •Lecture Notes
- •Øystein Pettersen
- •Introduction
- •Prerequisites
- •1. Overview – minimum required data input
- •1.1 The grid
- •1.2 Petrophysics
- •1.3 Fluid properties
- •1.4 Soil properties
- •1.5 Equilibration
- •1.6 Well specification
- •1.7 Dynamics
- •1.8 Output
- •1.9 Simple Eclipse data file contents
- •A. Syntax
- •B. Data file (“BASIC data input example”)
- •A note on units
- •2. The RUNSPEC section
- •Grid dimension – keyword DIMENS
- •Phases
- •Unit system
- •Start date
- •Unified / Non-unified files (chapter 11)
- •Data checking only
- •Table dimensions
- •EQLDIMS
- •NSTACK (chapters 17-18)
- •Aquifer specifications – AQUDIMS (chapter 14)
- •Grid options (chapter 13)
- •Rock compressibility options (chapter 6)
- •Local Grid Refinement (chapter 15)
- •3. Structured grids (Corner point grids) (GRID section)
- •The Corner Point Grid
- •Defining a corner point grid in Eclipse
- •Moderately complex grids – FILL
- •4. Petrophysics (GRID section)
- •Average permeability
- •Transmissibility
- •Inactive cells
- •5. Fluid properties (PROPS section)
- •Tables in Eclipse
- •Relative permeability and Capillary Pressure
- •Two-phase curves (water – oil)
- •Three-phase relative permeabilities
- •PVT data
- •Water
- •Dead Oil
- •Live Oil
- •6. Soil compressibility (PROPS section)
- •7. Initialisation (SOLUTION section)
- •Datum depth
- •Contacts
- •Equilibrium – discussion – advanced issues
- •8. Time dependent input data (SCHEDULE section)
- •8.1 Well definitions and control
- •Well Specification (WELSPECS keyword)
- •Well Completions (COMPDAT keyword)
- •Production / Injection data (Keywords WCONPROD / WCONINJE)
- •Economic well constraints (keywords WECON, WECONINJ)
- •Other often used Well control keywords
- •8.2 Time stepping
- •Order of actions
- •8.3 Convergence Control I (keyword TUNING)
- •9. Regions
- •10. Simplified input and modification of Eclipse arrays
- •EQUALS
- •ADD, MULTIPLY
- •COPY
- •COPYBOX
- •11. Eclipse output, formats and files
- •File names
- •Textual output
- •The RPTXXX keywords
- •Time dependent vectors – SUMMARY data
- •Restart data and restart files
- •12. Restarting a simulation
- •The SKIPREST keyword
- •13. Fault modelling – Non-neighbour connections
- •The 7-point stencil
- •The fault layout – non-neighbour connections
- •Fault transmissibility multipliers
- •Defining a fault manually – the ADDZCORN keyword
- •14. Aquifer Modelling (GRID section)
- •Aquifer definition
- •Aquifer connection to reservoir
- •15. Local Grid Refinement
- •15.2 LGR on an irregular volume – Amalgamation
- •15.3 Wells on local grids – Horizontal wells
- •15.4 Horizontal wells and friction
- •16. Numerical Solution of the Flow Equations
- •The IMPES method
- •Solution of Non-linear Equations – the Newton-Raphson method
- •17. Iteration methods for linear systems
- •Direct, simple approach
- •The Gauss-Seidel method
- •Accelerators – the point SOR method
- •Conjugate Gradients – ORTHOMIN
- •Preconditioning
- •Preconditioning and Orthomin
- •Determining a preconditioner – Nested Factorisation
- •18. Convergence Control II – TUNING parameters
- •TUNING keyword summarized
- •19. Non-neighbour Connections and System Structure
- •A. GRF files in GRAF
- •A simple straightforward GRF file
- •Advanced GRF file
- •B. Some Considerations Regarding Grid Consistency
- •Grids planned for use in rock mechanics simulations
- •Embedding
- •Non-vertical coordinate lines
- •Honouring material properties of non-reservoir rock.
Preconditioning and Orthomin
If A has been preconditioned, the equations in the ORTHOMIN description are changed by replacing A with AB-1 and x with Bx. Then Equations (60) – (66) become,
Bxk +1 = Bxk +ωk qk xk +1 = xk +ωk B−1qk |
(68) |
|||||
rk +1 = rk −ωk AB−1qk |
(69) |
|||||
ωk = |
|
rk AB−1qk |
|
(70) |
||
(AB−1qk ) (AB−1qk ) |
||||||
|
|
|||||
αik = − |
(AB−1rk +1) (AB−1qi ) |
|
(71) |
|||
(AB−1qi ) (AB−1qi ) |
||||||
|
|
|
Note that q always appears as B-1q. We can therefore redefine the q-vector to B-1q, whereby the Equations (68) – (71) become almost identical to their origins.
The pseudo-algorithm for orthomin with preconditioning is then,
Set initial vector x0. Define r0 = b – Ax0 and q0 = B-1r0. Set iteration counter k = 0.
while(not converged or k > max permitted number of iterations) {
ω |
k |
= |
rk Aqk |
|
Aqk Aqk |
||
|
|
|
xk +1 = xk +ωk qk
rk +1 = rk −ωk Aqk
for(i = 0,...,k) {
αk = −(AB−1rk+1) (Aqi )
i(Aqi ) (Aqi )
}
k
qk +1 = B−1rk +1 + ∑αik qi i =0
}
(We have omitted the non-essential required modification if only a limited number of q-vectors can be stored.)
The question of how to determine a good or optimal preconditioner B is still open. Eclipse does this by a technique called Nested Factorisation, which is the last element of the Eclipse linear solver procedure.
Determining a preconditioner – Nested Factorisation
Recall the structure for the 7-point stencil scheme, which was a 7-diagonal matrix. We rewrite the example of Figure 30 with a slightly different notation,
97
D |
U1 |
|
|
U2 |
|
|
|
|
|
|
|
U3 |
|
|
|
|
|
|
|
|
|
|
|
L1 |
D |
U1 |
|
|
U2 |
|
|
|
|
|
|
|
U3 |
U3 |
|
|
|
|
|
|
|
|
|
|
L1 |
D |
U1 |
|
|
U2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
L1 |
D |
|
|
|
U2 |
|
|
|
|
|
|
|
U3 |
|
|
|
|
|
|
|
|
L2 |
|
|
|
D |
U1 |
|
|
U2 |
|
|
|
|
|
|
|
U3 |
|
|
|
|
|
|
|
|
L2 |
|
|
L1 |
D |
U1 |
|
|
U2 |
|
|
|
|
|
|
|
U3 |
|
|
|
|
|
|
|
|
L2 |
|
|
L1 |
D |
U1 |
|
|
U2 |
|
|
|
|
|
|
|
U3 |
|
|
|
|
|
|
|
|
L2 |
|
|
L1 |
D |
|
|
|
U2 |
|
|
|
|
|
|
|
U3 |
|
|
|
|
|
|
|
|
L2 |
|
|
|
D |
U1 |
|
|
|
|
|
|
|
|
|
|
U3 |
|
|
|
|
|
|
|
|
L2 |
|
|
L1 |
D |
U1 |
|
|
|
|
|
|
|
|
|
|
U3 |
|
|
|
|
|
|
|
|
L2 |
|
|
L1 |
D |
U1 |
|
|
|
|
|
|
|
|
|
|
U3 |
|
|
|
|
|
|
|
|
L2 |
|
|
L1 |
D |
|
|
|
|
|
|
|
|
|
|
|
U3 |
L3 |
|
|
|
|
|
|
|
|
|
|
|
D |
U1 |
U1 |
|
U2 |
|
|
|
|
|
|
|
|
L3 |
|
|
|
|
|
|
|
|
|
|
L1 |
D |
|
|
U2 |
|
|
|
|
|
|
|
|
|
L3 |
|
|
|
|
|
|
|
|
|
|
L1 |
D |
U1 |
|
|
U2 |
|
|
|
|
|
|
|
|
L3 |
|
|
|
|
|
|
|
|
|
|
L1 |
D |
|
|
|
U2 |
|
|
|
|
|
|
|
|
L3 |
|
|
|
|
|
|
|
L2 |
|
|
|
D |
U1 |
|
|
U2 |
|
|
|
|
|
|
|
|
L3 |
|
|
|
|
|
|
|
L2 |
L2 |
|
L1 |
D |
U1 |
|
|
U2 |
|
|
|
|
|
|
|
|
L3 |
|
|
|
|
|
|
|
|
|
L1 |
D |
U1 |
|
|
U2 |
|
|
|
|
|
|
|
|
|
L3 |
|
|
|
|
|
|
|
L2 |
|
|
L1 |
D |
|
|
|
U2 |
|
|
|
|
|
|
|
|
L3 |
|
|
|
|
|
|
|
L2 |
|
|
|
D |
U1 |
|
|
|
|
|
|
|
|
|
|
|
L3 |
|
|
|
|
|
|
|
L2 |
|
|
L1 |
D |
U1 |
|
|
|
|
|
|
|
|
|
|
|
L3 |
|
|
|
|
|
|
|
L2 |
|
|
L1 |
D |
U1 |
|
|
|
|
|
|
|
|
|
|
|
L3 |
|
|
|
|
|
|
|
L2 |
|
|
L1 |
D |
Figure 32. Labelling the seven diagonals in a 7-diagonal matrix
The nonzero entries in the matrix have been labelled D for the main diagonal, and L1, L2, L3 for the lower diagonals, U1, U2, U3 for the upper diagonals. The way the matrix was set up, the D, L1, and U1 correspond to communication between the centre cell (i, j, k) and the neighbours in the x-direction (i±1, j, k). This is a result of the natural ordering, and as noted earlier, the structure of the matrix is a result of the ordering used.
In the natural, or “book” ordering, by Eclipse terminology, the x-direction would be denoted as “direction 1”, the y-direction as “direction 2”, and the z-direction as “direction 3”. I.e. “direction 1” is the one where the index changes fastest, “direction 2” is used for the second fastest, and “direction 3” for the slowest.
All permutations of “direction 1” – “direction 2” – “direction 3” will give the 7-diagonal matrix structure seen in Figure 32, but the communication direction will be different between the D, L1-3, and U1-3. E.g., if the z-direction is chosen as “direction 1”, L1, D, and U1 will correspond to communication between (i, j, k) and (i, j, k±1).
So irrespective of the ordering scheme, the coefficient matrix will be (using D for the matrix comprised of all the D-elements etc.),
A = D + L1 + U1 + L2 + U2 + L3 + U3
(Reminder: All the “elements” in Figure 32 are actually 2x2 matrices for two-phase flow, 3x3 for three-phase.)
Without proof we state that in general the most efficient ordering scheme with respect to solving the system is such that “direction 1” is the direction of highest average transmissibility, “direction 2” next highest, and “direction 3” lowest transmissibility.
This criterion for setting the ordering scheme is used as default by Eclipse, which means that in most simulations, “direction 1” will be the z-direction (z-permeability is normally lowest, but the average cell thicknesses are typically much smaller than X,Y lengths.)
Users can change the ordering by the SOLVDIRS keyword. (Generally not recommended.)
98