Matrices in Petroleum Engineering Using Tridiagonal Matrices to Model Reservoirs Juan F. Peña Oct. 10, 2003 Juan Pena Abstract: Linear algebra is used in engineering to solve problems that involve multiple complex equations. In the petroleum industry, engineers must model reservoirs to find the conditions needed to maximize recovery of hydrocarbons. Reservoir simulation involves many complex partial differential equations, which are solved using a computer program that models the reservoir being studied. To the petroleum engineer it is great that the computer program does all the simulating for him as long as all the correct parameters are put into the program. We will look at how reservoir simulators use linear algebra to model reservoirs. A hydrocarbon reservoir is a porous media through which hydrocarbons flow to a well or many wells. It is simple to measure a pipe’s flow capacity as a function of pressure; however, porous media flow is different because there are no certain paths through which the fluid will travel. Reservoir models look at fluid flow through the reservoirs by determining how saturations and pressures change as functions of time. Nonlinear partial differential equations make up the fluid flow equations and since they are not linear they have to be transformed into linear forms using the Taylor’s series. The Taylor’s series makes the derivatives finite differences, which are changes in x and changes in t. Since the reservoir model is divided into blocks or cells, there is an equation for each cell. In a model with N cells, we get N equations with N unknowns, which is a lot of equations and unknowns to be solved by hand. The equations can be written in a matrix form called a tridiagonal matrix, which has three diagonal elements and zeros in all the off-diagonal elements. Cell 1 2 3 N a1Po – b1P1+c1P2 =d1 a2P1 – b2P2+c2P3 =d2 a3P2 – b3P3+c3P4 =d3 anPn-1 – bnPn+CnPn+1 =dn Juan Pena AP=d [ a1 \ \ ] [ ] [ ] [ \ b1 \ ] *[p1] = [d1] [ \ \ c1 ] [ ] [ ] Then by using the Thomas algorithm, a modified form of Gaussian elimination, we solve the equations for the unknown pressures P. Once the pressures are known the results are given as functions of time. The idea behind reservoir modeling is to examine how a reservoir will do at some future time. The engineer identifies which cells contain wells, whether they are producers or injector. By running the simulator, the engineer gets a table of results, which includes saturations, pressures, and amount of fluids left by the time they are occurring. This allows an engineer to determine when in the future is a good time to stop producing. Modeling is very important to the petroleum engineer because there is no other way of determining how a reservoir will perform under certain conditions. Since reservoirs last long times, it is impossible to wait to see what a reservoir will do, so the engineers just model the reservoirs and can determine many important conditions. Some of the conditions to a reservoir are: where to place the wells, how many wells to have, what spacing between wells, at what rates the wells should be produced, and how long the wells should be produced. Modeling simply makes a petroleum engineers job easier, and without linear algebra, modeling would be very difficult to perform. References: Crichlow, Henry B. Modern Reservoir Engineering-A Simulation Approach. Prentice Hall. New Jersey 1977 Fanchi, John R. Principles of Applied Reservoir Simulation. Gulf Publishing Co. Houston, TX. 1997 Juan Pena