PNG 506 · Elements of Reservoir Simulation
Our notes
3 min readThe linear system
An implicit step for single-phase flow gives one equation per block: A pⁿ⁺¹ = b, where A is sparse (tridiagonal in 1D, pentadiagonal in 2D, heptadiagonal in 3D) and b holds old pressures, well and boundary terms.
Direct solution: the Thomas algorithm (1D)
For a tridiagonal system aᵢpᵢ₋₁ + bᵢpᵢ + cᵢpᵢ₊₁ = dᵢ: one forward sweep to eliminate the lower diagonal, then back substitution. Work is proportional to n.
Worked example. Three blocks at 3,000 psi; block 0 (left boundary) held at 2,000 psi; no flow at the right; implicit step with r = 1.
Equations:
- Block 1: 3p₁ − p₂ = 3,000 + 2,000 = 5,000.
- Block 2: −p₁ + 3p₂ − p₃ = 3,000.
- Block 3 (no flow, so p₄ = p₃): −p₂ + 2p₃ = 3,000.
Forward sweep: c₁′ = −1/3, d₁′ = 5,000/3 = 1,666.67. Row 2: divisor 3 − 1/3 = 8/3; c₂′ = −3/8; d₂′ = (3,000 + 1,666.67) × 3/8 = 1,750. Row 3: divisor 2 − 3/8 = 13/8; d₃′ = (3,000 + 1,750) × 8/13 = 2,923.08.
Back substitution: p₃ = 2,923 psi, p₂ = 1,750 + (3/8)(2,923.08) = 2,846 psi, p₁ = 1,666.67 + (1/3)(2,846.15) = 2,615 psi.
Check block 1: 3 × 2,615.38 − 2,846.15 = 5,000 ✓; block 3: −2,846.15 + 2 × 2,923.08 = 3,000 ✓.
Note the implicit scheme with r = 1 is stable (compare the explicit failure at r = 2).
Direct solvers for 2D and 3D
Gaussian elimination with band storage; fill-in makes them expensive for large 3D models. Used for small problems or as part of preconditioners.
Iterative solvers
- Jacobi and Gauss-Seidel: update each block from its neighbours repeatedly; simple but slow.
- SOR (successive over-relaxation): Gauss-Seidel with an over-relaxation factor ω (1 < ω < 2) to speed convergence.
- Krylov methods (conjugate gradient for symmetric matrices; ORTHOMIN, GMRES, BiCGSTAB for non-symmetric) with preconditioning (incomplete LU factorisation, CPR, algebraic multigrid). These are what modern simulators use.
Iterate until the residual is below a tolerance.
Nonlinear equations: Newton-Raphson
Multiphase and gas problems are nonlinear: residual R(x) = 0, with x the unknowns of all blocks.
- Guess x (old time-step values).
- Build the Jacobian J = ∂R/∂x.
- Solve J δx = −R (a linear system).
- Update x ← x + δx; repeat until R and δx are small.
Usually converges in 3 to 6 iterations; if not, the time step is cut and retried.
Coupling strategies
| Method | Idea | Pros | Cons |
|---|---|---|---|
| IMPES | pressure implicit, saturations explicit | small system, fast per step | stability limit on Δt; poor for coning, high flow rates |
| Sequential | pressure implicit, then saturation implicit | more stable than IMPES | splitting errors |
| Fully implicit | all unknowns implicit together (Newton) | very stable, large steps | big Jacobian, costly per step |
| Adaptive implicit (AIM) | implicit only in blocks that need it (near wells, fronts) | balance | complex |
Black-oil field models usually run fully implicit or AIM.
Time-step control
Steps grow when changes are small and are cut when Newton fails or changes exceed targets (pressure, saturation, R_s). Report steps match the production schedule (monthly or at well events).
Material balance check
After each step, the change in fluid in place must equal net production plus injection plus influx; a large error warns of non-convergence.
Exams usually ask: set up the implicit equations for a small 1D grid and solve them by the Thomas algorithm; compare direct and iterative solvers; describe Newton-Raphson for the nonlinear equations; compare IMPES and fully implicit; time-step control.
Common mistake: forgetting the boundary contribution in the right-hand side. A constant-pressure boundary adds r × p_boundary (or T × p_boundary) to the first block's equation; a no-flow boundary changes the diagonal instead.
Written by the UniHive team in our own words. Spotted a mistake? Tell us on WhatsApp.
Read
-
Newton's method
(opens en.wikipedia.org in a new tab)
Wikipedia, Newton's method, CC BY-SA 4.0 · licence
-
Lie, An Introduction to Reservoir Simulation (MRST): Solvers for incompressible immiscible flow
Open-access chapter: the page has a free PDF. Fuller and more mathematical than our notes, with MATLAB examples. Page about 0.7 MB.
(opens cambridge.org in a new tab)
Lie, An Introduction to Reservoir Simulation Using MATLAB/GNU Octave (Cambridge University Press), Lie, An Introduction to Reservoir Simulation (MRST): Solvers for incompressible immiscible flow, CC BY-NC-ND 4.0 · licence
Watch
-
Best pick Implicit Method for single-phase flow equations
21 min · ≈ 95 MB · about ₦53
(opens youtube.com in a new tab)
-
IMPES - Discrete Pressure Equation
14 min · ≈ 63 MB · about ₦35
(opens youtube.com in a new tab)
-
IMPES - Discreet Saturation Equation
9 min · ≈ 41 MB · about ₦23
(opens youtube.com in a new tab)
-
Implicit Transmissabilty Form
14 min · ≈ 63 MB · about ₦35
(opens youtube.com in a new tab)
-
Natural Ordering | Lecture 63 | Numerical Methods for Engineers
9 min · ≈ 41 MB · about ₦23
(opens youtube.com in a new tab)
-
Coding a Newton-Raphson nonlinear solver in Python
40 min · ≈ 180 MB · about ₦101
(opens youtube.com in a new tab)
We link to free material and never copy it. Every link was opened by our team before it went up; video data is a rough guide at 360p.