Page 1


Basic Applied Reservoir Simulation


SPE Textbook Series The Textbook Series of the Society of Petroleum Engineers was established in 1972 by action of the SPE Board of Directors. The Series is intended to ensure availability of high-quality textbooks for use in undergraduate courses in areas clearly identified as being within the petroleum engineering field. The work is directed by the Society’s Books Committee, one of the more than 40 Society-wide standing committees. Members of the Books Committee provide technical evaluation of the book. Below is a listing of those who have been most closely involved in the final preparation of this book.

Book Editors Allan Spivak, Duke Engineering & Services Co., Los Angeles John E. Killough, Landmark Graphics Corp., Houston

Books Committee (2001) Hans Juvkam-Wold, Texas A&M U., College Station, Texas, Chairman J. Ben Bloys, Texaco Upstream Technology, Houston Anil Chopra, PetroTel Inc., Plano, Texas Rafael Guzman, BP Exploration Colombia Ltd., Bogota, Colombia William C. Miller, Consultant, Houston Susan Peterson, J Murtha & Assocs., Houston Cem Sarica, The Pennsylvania State U., University Park, Pennsylvania Arlie M. Skov, Arlie M. Skov Inc., Santa Barbara, California Sally Thomas, Conoco Inc., Houston


Basic Applied Reservoir Simulation Turgay Ertekin George E. Trimble Chair Professor of Petroleum and Natural Gas Engineering The Pennsylvania State U.

Jamal H. Abou-Kassem Professor of Petroleum Engineering United Arab Emirates U.

Gregory R. King Petroleum Engineering Adviser Chevron Overseas Petroleum Inc.

Henry L. Doherty Memorial Fund of AIME Society of Petroleum Engineers Richardson, Texas USA


Š Copyright 2001 Society of Petroleum Engineers All rights reserved. No portion of this book may be reproduced in any form or by any means, including electronic storage and retrieval systems, except by explicit, prior written permission of the publisher except for brief passages excerpted for review and critical purposes. Manufactured in the United States of America.

ISBN 978-1-55563-089-8 ISBN 978-1-61399-151-0 (Digital)

Society of Petroleum Engineers 222 Palisades Creek Drive Richardson, TX 75080-2040 USA http://store.spe.org/ books@spe.org 1.972.952.9393


Dedication This book is dedicated to our mentors and friends, C. Drew Stahl and S.M. Farouq Ali.


Introduction High-speed computers have now been part of our lives, in so many different ways, for almost half a century. The electronic explosion that we have been witnessing over the past two decades has transformed reservoir simulation from a somewhat esoteric approach to a practical toolbox of immense importance. With the use of the tools from this toolbox, today’s engineering community has an opportunity to better understand not only the intricacies of fluid-flow dynamics in increasingly complex reservoirs, but also the characteristics of fluid-flow dynamics in wellbores, flow patterns developing within the immediate vicinity of perforations, the interaction of vertical, slanted, horizontal, and multilateral wells and the reservoir, and the complexities of reservoir characterization. These areas represent only a small portion of a list that includes some challenging issues playing critical roles in the optimum development of hydrocarbon reservoirs, and in the optimized implementation of capital-intensive projects that can be investigated with numerical simulation. The conduct of a reservoir-simulation study should not simply imply making a few computer runs and writing a report based on the computer-generated results. In our view, the conduct of a simulation study covers much more. First, the simulation engineer must set the objectives for the study. Envisaging a judicious set of objectives will assist the simulation engineer in selecting an adequate approach that is in parity with the scope of the study as well as with the characteristics of the reservoir and its fluids. The third step of the process involves the preparation of the input data. The time invested in looking for good-quality data represents time well spent; an internally consistent set of data will save a great deal of time later. The fourth step of the simulation study involves careful planning of computer runs. It is again the simulation engineer’s responsibility to ensure that each run conducted does not represent a “shot in the dark.” The final step of a simulation study involves the analysis of results and report preparation. An experienced simulation engineer will not subscribe immediately to the results presented within the output files. To avoid becoming a hostage to computer-generated results, it is necessary to ask questions and ponder the implications of those results. Therefore, it is very important to remember that every simulation study carries the signature of the simulation engineer, but not the computing device and the computer code used in the study.


I guess the take-home lesson from it all is that the most important thing for the success of an exhaustive simulation study is not the hardware or software... It’s the individuals from different disciplines that you work with. If the people are compatible and can get along, then it will be a successful simulation study.*

Preface This text is written for senior undergraduate students and first-year graduate students studying petroleum engineering. The text evolved from the courses that we presented in university settings. The examples and exercises presented are from the examinations and homework sets that we prepared over the course of several years. The contents of this book can be taught in three successive courses. In our own teaching experience, we were able to cover various singlephase reservoir simulation topics and applications, included mainly in Chaps. 1 through 8, during a one-semester undergraduate senior-level course. We have followed a similar coverage, in greater depth, in the first graduate-level course. The second graduate-level course dwells mainly on multiphase-flow-simulation problems, as covered in Chap. 9. A third course, which deals mainly with the practical application of reservoir simulation (as covered in Chap. 10), can be given as either an undergraduate senior-level course or as a graduate course to practicing engineers. Chap. 1 provides an overview of numerical reservoir simulation. In Chap. 2, we present a brief review of some fundamental reservoir engineering concepts as well as reservoir rock and fluid properties that comprise the building blocks of a reservoir simulator. Chap. 3 is written to serve as a refresher in mathematics and presents an introductory treatment of finite-difference calculus as it forms the backbone of reservoir simulation. In this chapter, we also hope to establish a bridge between mathematical reasoning and jargon and reservoir-engineering concepts. In Chap. 4, rectangular and cylindrical coordinate systems are introduced and various forms of the single-phase flow equations are developed. In Chap. 5, protocols used in obtaining the finite-difference analogs of linear-flow equations are discussed. Chap. 6 introduces various well models and their coupling to the reservoir-flow equations. Some direct and iterative algorithmic protocols, used in solving linear-difference equations presented in their increased rigor, are discussed in Chap. 7. In Chap. 8, transmissibility groups are defined and coefficient matrices for incompressible, slightly compressible, and compressible flow problems are formed. After solving the system of equations, incremental and cumulative material-balance checks are introduced as internal checks that monitor the accuracy level of the solutions generated. Chap. 9, in its entirety, is devoted to multiphase flow and its simulation. In this chapter, procedures and algorithms introduced in the first eight chapters are generalized so that they become applicable to multiphase-flow problems. In Chap. 10, our intent is to bring the practical aspects of reservoir simulation to the forefront. Topics such as data analysis, model construction, history matching, and forecasting are discussed. Finally, Chap. 11 ties the reservoir simulation equations back to classical reservoir engineering approaches and shows that the latter are simply the subsets of the former. The book concludes with three appendices. Appendix A provides a thorough treatment of interpolation techniques that are often used in reservoir simulation for data handling. Appendix B shows the similarities between the single-phase and multiphase flow problems at the level of the coefficient matrices generated by the finite-difference representation. Appendix C presents a brief overview of the architectures of scalar, vector, and parallel processors. Our discussion of the topical material in each chapter typically concludes with a section identified as “Chapter Project.” Starting with Chap. 1, these sections provide a large field-scale example. In this way, we are able to construct a field example throughout the book. As the reader progresses through the chapters of the book, the chapter projects will provide an opportunity to apply some of the salient topics discussed in each chapter in a more realistic setting. Furthermore, the discussions and results provided through this “marching” example can be used as benchmark solutions if the reader is engaged in reservoir simulator development.

* Adapted from astronaut Shannon Lucid’s statement upon her return to earth after 6 months aboard Russia’s Mir space station. Her original statement reads, “I guess the take-home lesson from it all is that the most important thing for the success of a longduration space flight is not the hardware... It’s the people you fly with. If the people are compatible and can get along, then it will be a great flight.”


Throughout the book, numerous examples that have been specifically designed to be solved by hand calculations are dispersed. With these examples, our goal is to create an opportunity for the reader to better and more effectively understand some of the fine details of reservoir simulation. The additional exercises are designed to redrill basics and improve the reader’s understanding as well as to test their innovation for more difficult problems. When we started this book, we neither wanted to produce a handbook on reservoir simulation, nor did we envisage how to write a user’s manual that comes together with a simulation package. Our goal was to create a textbook that would help in breaking the ice between neophyte simulation students (or engineers) and the mathematical nature of reservoir simulation. In our simulation courses, we always draw an analogy between developing a reservoir model and raising a child. The time and effort expended during the development phase of a simulator would determine our expectations for the simulator. We hope that the readership of this book will acquire basic understanding of the mechanics involved in developing and applying reservoir simulators. In our classrooms, we have always thought that students who go through the rigor of developing a reservoir simulator, even a simple one, would develop a much better appreciation for the strengths and weaknesses of the tool. Thus, even if they are confronted with the request of only implementation of a predeveloped simulation package (not its modification), they will be able to demonstrate that they are much more informed and confident users. In this book the reader will find that our approach is to proceed through the various stages of model development so that solutions to the problems in increasingly more complicated domains can be sought. In this way, we create opportunities for the treatment and discussion of more sophisticated procedures and algorithms. Over the years, for pedagogical reasons, we have found the modeling “from the bottom up” approach to be effective in a classroom environment. We hope that the readers of this book will agree with our philosophy. We would like to close this preface with. a quotation from Calculus Made Easy by Silvanus P. Thompson:** Considering how many fools can calculate, it is surprising that it should be taught either a difficult or a tedious task for any other fool to learn how to master the same tricks. Some calculus tricks are quite easy. Some are enormously difficult. The fools who write the textbooks of advanced mathematics—and they are most clever fools— seldom take the trouble to show you how easy the calculations are. On the contrary, they seem to desire to impress you with their tremendous cleverness by going about it in the most difficult way. Being myself a remarkably stupid fellow, I have had to unteach myself the difficulties, and now beg to present to my fellow fools the parts that are not hard. Master these thoroughly, and the rest will follow. What one fool can do, another can. Turgay Ertekin Jamal H. Abou-Kassem Gregory R. King

**Thompson, S.P. and Martin Gardner, M.: Calculus Made Easy, St. Martin’s Press, New York City (1998) 38. The original edition of Calculus Made Easy was written by Silvanus P. Thompson and published in 1910, with subsequent editions in 1914 and 1946.


Acknowledgments We have enjoyed the pleasure of teaching the material covered in this text to students at The Pennsylvania State U. and the United Arab Emirates U. for more than two decades. We gratefully acknowledge their patience, suggestions, and comments, all of which have been instrumental in bringing this book to reality. During the writing of this book, we have benefited from the kind assistance of many colleagues and friends. First, we would like to thank Peggy L. Conrad and Timothy E. Kohler for their most skillful typing and for designing the page layouts of the original draft of the manuscript from our almost illegible writings. We are also grateful to Connie DiAndreth and Mohammed Safargar for their assistance in typing several sections of the manuscript at various stages of revision. Special thanks are due to Nor Azlan Nordin, who drew most of the artwork. We are indebted to Y. Serdar Dogulu, who helped us structure the Chapter Project sections of the book during the summer of 1995. We express our gratitude to our colleagues S. Tanju Obut, Kemal Anbarci, and Adwait Chawathe for their multitude of suggestions and critiques. We are indebted to Gabriel Falade for his review of the first six chapters of the book. We are also indebted to our SPE Books Committee editors Allan Spivak and John E. Killough for their critical review of the manuscript. We extend our acknowledgments to James R. Gilman for his suggestions as the symbols editor. Bringing this book to reality took almost a decade, during which we have worked with several SPE editors. We value the fine work and cooperation of Flora Cohen, Carla Atwal, Nikki Blair, and Amanda Stites throughout the publication process. Finally, but most deeply, we thank all of our “teachers,� from whom we have learned all that we know, and our family members, who walked with us through the tortuous paths of writing a book. Without their constant encouragement, support, and most importantly their tolerance, the journey never would have ended.


Contents

1. Introduction 1.1. Introduction 1.2. The Need for Reservoir Simulation 1.3. Traditional Modeling Approaches 1.4. Reservoir-Simulation Approach 1.5. Concluding Remarks 1.6. Chapter Project

1 1 1 1 5 8 8

2. Basic Reservoir-Engineering Concepts and Reservoir-Fluid and -Rock Properties 2.1 Introduction 2.2 Basic Reservoir-Engineering Concepts 2.3 Reservoir-Rock and -Fluid Properties 2.4 Law of Mass Conservation 2.5 Basic Single-Phase-Flow Equation 2.6 Chapter Project

11 11 11 14 27 29 30

3. Basic Mathematical Concepts 3.1 Introduction 3.2 Basic Differential Calculus 3.3 Basic Differential Equations 3.4 Finite-Difference Calculus 3.5 Basic Linear Algebra

38 38 38 44 46 50

4. Formulation of Basic Equations for Single-Phase Flow 4.1 Introduction 4.2 Continuity Equation in Various Flow Geometries 4.3 Derivation of Generalized Flow Equations 4.4 Different Forms of Flow Equations 4.5 Initial and Boundary Conditions 4.6 Chapter Project

57 57 57 57 65 69 70

5. Finite-Difference Approximation to Linear-Flow Equations 5.1 Introduction 5.2 Construction and Properties of Finite-Difference Grids 5.3 Finite-Difference Approximation of the Spatial Derivative 5.4 Finite-Difference Approximation of the Time Derivative 5.5 Implementation of Initial and Boundary Conditions 5.6 Explicit and Implicit Finite-Difference Formulations 5.7 Chapter Project

75 75 75 81 83 84 88 100

6. Well Representation 6.1 Introduction 6.2 Treatment of Source/Sink Terms 6.3 Single-Well Simulation 6.4 Use of Hybrid Grids in the Wellblocks 6.5 Coupling Reservoir and Wellbore-Hydraulics Models 6.6 Chapter Project

105 105 105 119 120 121 124


7. Solution of Linear Difference Equations 7.1 Introduction 7.2 Difference Equations in Matrix Form 7.3 Solution Methods 7.4 Chapter Project

128 128 128 134 170

8. Numerical Solution of Single-Phase-Flow Equations 8.1 Introduction 8.2 Single-Phase Incompressible-Flow Problem 8.3 Single-Phase Slightly-Compressible-Flow Problem 8.4 Single-Phase Compressible-Flow Problem 8.5 Analysis of the Material-Balance Calculation Used in Reservoir Simulation 8.6 Chapter Project

179 179 179 188 192 198 202

9. Multiphase-Flow Simulation in Petroleum Reservoirs 9.1 Introduction 9.2 Mass-Conservation Equations in a Multiphase-Flow System 9.3 Flow Equations in Multiphase Flow 9.4 Flow Models for Basic Flow Systems 9.5 Finite-Difference Approximation of the Flow Equations 9.6 Methods of Solving Multiphase Difference Equations 9.7 Treatment of Problems Specific to Multiphase Flow 9.8 Chapter Project

218 218 218 220 222 225 258 287 297

10. Practical Aspects of Reservoir Simulation 10.1 Introduction 10.2 Study Objectives 10.3 Data Analysis 10.4 Model Construction 10.5 History Matching 10.6 Reservoir Performance Predictions 10.7 Final Advice 10.8 Chapter Project

308 308 309 310 332 350 355 358 360

11. Relationships Between Numerical Reservoir Simulation and Classical Reservoir Engineering Approaches 11.1 Introduction 11.2 Relationship Between Numerical Reservoir Simulation and the Classical Material-Balance Approach 11.3 Relationship Between Numerical Reservoir Simulation and Analytical Methods 11.4 Relationship Between Numerical Reservoir Simulation and Decline-Curve Analysis 11.5 Summary

368 368 368 371 373 378

Appendix A Interpolation Techniques for Data Handling in Reservoir Simulation Table Interpolation Data Handling With Curve Fitting

381 381 385

Appendix B Solution Techniques Applied to Multiphase-Flow Equations Thomas’ Algorithm Applied to Block Diagonal Matrices SOR Procedure Applied to Multiphase-Flow Problems Block ADIP Block SIP

389 389 390 390 390

Appendix C Computer Architecture Scalar-Processing Computers Vector-Processing Computers Parallel-Processing Computers RISC

391 392 392 393 394


Chapter 1

Introduction 1.1 Introduction

Reservoir simulation combines physics, mathematics, reservoir en­ gineering, and computer programming to develop a tool for predict­ ing hydrocarbon-reservoir performance under various operating conditions. This book is limited to the basics of this subject and is aimed at developing understanding of and insight into the mechan­ ics of this powerful tool. Chap. I presents a review of the prediction techniques available to petroleum engineers, with an emphasis on practical limitations. To develop appreciation for the role of reser­ voir simulation in optimizing the development and production of hydrocarbon resources, the chapter also presents an overview of res­ ervoir simulation and its applications in hydrocarbon recovery. 1.2 The Need for Reservoir Simulation

The need for reservoir simulation stems from the requirement for petroleum engineers to obtain accurate performance predictions for a hydrocarbon reservoir under different operating conditions. This need arises from the fact that in a hydrocarbon-recovery project (which may involve a capital investment of hundreds of millions of dollars), the risk associated with the selected development plan must be assessed and minimized. Factors contributing to this risk in­ clude the complexity of the reservoir because of heterogeneous and anisotropic rock properties; regional variations of fluid properties and relative permeability characteristics; the complexity of the hy­ drocarbon-recovery mechanisms; and the applicability of other pre­ dictive methods with limitations that may make them inappropriate. The first three factors are beyond the engineer's control; they are taken into consideration in reservoir simulation through the general­ ity of input data built into reservoir-simulation models and the avail­ ability of simulators for various enhanced-oil-recovery techniques. The fourth factor can be controlled through proper use of sound en­ gineering practices and judicious use of reservoir simulation. 1.3 Traditional Modeling Approaches

Traditional methods of forecasting reservoir performance generally can be divided into three categories: analogical methods, exper­ imental methods, and mathematical methods. Analogical methods use properties of mature reservoirs that are either geographically or petrophysically similar to the target reservoir to attempt to predict reservoir performance of a target zone or reservoir. Experimental methods measure physical properties (such as rates, pressures, or saturations) in laboratory models and scale these results to the entire hydrocarbon accumulation. Finally, mathematical methods use INTRODUCTION

equations to predict reservoir performance. The remaining sections of this chapter provide more detailed discussions of these methods.

1.3.1 Analogical Methods. Before drilling, when limited or no data

are available, the only method reservoir engineers can use to per­ form economic analysis is that of analogy. In this method, reservoirs in the same geologic basin or province or reservoirs with similar pe­ trophysical properties are used to predict the performance of the tar­ get reservoir. This method can be used to estimate recovery factors, initial production rates, decline rates, well spacing, and recovery mechanisms. The analogical method can yield reliable results when two similar reservoirs are compared and similar development strate­ gies are used. The method suffers, however, if different develop­ ment strategies are considered. In addition, "what-if' sensitivities cannot be investigated. One form of analogy, the staged field trial, provides the most reli­ able predictions for secondary- and tertiary-recovery operations. In this method, representative well patterns in a field that is a candidate for secondary or tertiary recovery are converted to the new process and the production performance is monitored. The results of the field trial, which may take I or 2 years to obtain, are applied to the remaining well patterns, and field performance can be predicted. Managements are generally confident with decisions made on the basis of results of a staged field test.

1.3.2 Experimental Methods. Experimental methods, both analog

and physical, play a key role in understanding petroleum reservoirs. While analog models are seldom used today, physical models in the form of corefloods, sandpacks, and slim tubes are run often. Analog Models. Analog models are rarely used in modem reser­ voir studies, but two points about them are worthy of discussion. Firs� from a historical point of view, analog models were important in early studies, particularly in incorporating sweep efficiencies into waterflood calculations. Second, the difference between resistance­ capacitance (RC) networks and potentiometric models illustrates the difference between discrete and continuous models . Analog models u s e similarities between the phenomenon of fluid flow through porous media and other physical phenomena (such as those Table 1.1 shows) to simulate reservoir performance. Analog models based on the governing equations listed in the table are built to represent the reservoir, and the appropriate quantities (those rep­ resenting pressure and flow rate) are measured. These quantities can be translated through the governing equations into their porous-me­ dium analogs. Three analog methods-RC networks, potentiomet­ ric models, and the Hele-Shaw1 models-are discussed next.


TABLE 1 .1 -PHVSICAL PHENOMENA ANALOGOUS TO FLUID FLOW THROUGH POROUS MEDIA Fluid Flow Through Phenomenon Governing equation

Properties

Porous Media Darcy's law' f3ck A tip q=f.1- tiL

Electricity Flow Through

Fluid Flow Through Parallel Plates

Circuitry

Heat Flow by Conduction

Hagen-Poiseuille law w2A tip q = 12acf.1 tiL

Ohm's law,

Fourier's law, KAtiT Q= tiL

1= (1/R)tiE

Volumetric rate, q

Volumetric rate,

Current, I

Heat flow rate, Q

Transmissibility, f3ckA

Hydraulic conductance, w2A 12acf.1tiL

Electrical conductance,

Thermal conductance, KA tiL

Hydraulic conductivity,

Electrical conductivity,"

Thermal conductivity,

1/r

K

Voltage, E

Temperatu re, T

f.1tiL

Fluid mobility, f3ck

Ii

Pressure, p

q

1/R

� 12acf.1

Pressure, p

·Horizontal flow.

••

R =

fliL A

r,

I,

'I

t

e,

Fig. 1 .1 -Electric-circuit analog for a simple hydrocarbon reser· voir/aquifer system.3 (C1 through C s=capacitors; R =resistor; A =ampmeter; and V=voltmeter.)

RC networks use the analogy between fluid flow through porous media and electrical flow to model reservoir performance. Bruce2 in­ troduced this method to the petroleum industry to simulate the un­ steady-state performance of undersaturated oil reservoirs under wa­ terdrive. Fig 1.1 shows the RC network for this problem. In these models, capacitance is used to model fluid storage at a point in space, while resistance is used to model the transmissibilities between points. Capacitor discharge represents the unsteady-state behavior of the reservoir in accordance with the properties listed in Table 1.1. As a final note on RC networks, although these circuits simulate un­ steady-state behavior (and, therefore, may represent reservoirs under­ going primary depletion), they are discrete models. That is, the capac­ itors represent the storage at discrete points in the reservoir. A continuous form of the electrical analog is the potentiometer. A potentiometer is a scaled model of a reservoir or well pattern constructed with a continuous electrical conducting material. Volt­ ages are applied at well sites and voltage measurements can be made at any point within the model . This is in contrast to the RC circuit, where measurements can be made at only discrete points in the res­ ervoir. A second difference between RC networks and potentiome­ ters is that potentiometers can simulate only steady-state flow. Most early studies on sweep efficiencies of waterflood patterns were con­ ducted on models like that depicted in Fig. 1.2. In general, electrical analog models must be custom built for indi­ vidual reservoirs, making them very difficult to adapt to other reser­ voirs. The discrete RC-network models also suffer from inadvertent malfunction of electrical components (capacitors, meters, resistors) and the huge space they usually occupy (several rooms). Aside from these deficiencies, these analogs are limited to modeling single­ phase flow in porous media or, at best, two-phase flow with a unit mobility ratio. The Hele-Shaw I model is an analog model that allows for nonunit mobility ratios. Hele-Shaw models use the analogy between fluid flow through porous media and fluid flow between parallel plates to simulate the behavior of regular pattern elements in secondary- and tertiary-recovery operations. These models are constructed with two transparent plates spaced at a uniform distance from each other. The gap between the plates is filled with the fluid to be displaced, while the displacing fluid is introduced at the injection wellsites. The sweep efficiencies of the reservoir patterns are then determined visually. 2

W,

GC?

e,

.�� I'

-

'I

r,

e,

e. p

W,

M

-! 1111 B

,+

J

Rheostat

K

l.r--x..-.

Fig. 1.2-Electrical circuit for determining the potential distribu­ tions i n 20 flow systems. 4 (B=battery; r1 and r2=resistors; G =galvanometer; e1 through e4= potential drops; M =poten­ tiometer; w1 and w2=electrodes representing the injectors and producers ; P=exploring electrode; and K=key.)

Physical Models. As opposed to analog models, physical models are used to make direct measurements of flow properties in porous media. Two types of physical models are in use in the petroleum in­ dustry. The first does not account for the flow geometry occurring in the reservoir. Coreflood experiments fall into this category. These ex­ periments, generally run on linear cores, are probably the most com­ mon physical models used in the oil industry today. They are run on virtually every oil and gas field to determine reservoir properties, such as porosity and permeability, and to establish mechanisms of oil recovery. One detrimental feature of these models is that the experi­ ments are conducted at a scale that is not representative of actual res­ ervoir scale. Consequently, the results of these experiments must be scaled up to more representative scales. Other physical models that fall into this category include slim tubes and sandpacks. The second type of physical model uses geometrical-, mechanical-, and thermal-similarity concepts. That is, the areal geometry, thick­ ness, porosity, and permeability of the model and the fluid properties are scaled so that the shape and dimensions of the model (as well as the ratios of active forces in the model) are the same as those in the reservoir. The performance of this type of scaled model reflects that of the reservoir. One example is Sobocinski and Cornelius's 5 single­ well coning model (Fig. 1.3). This type of model can determine criti­ cal coning rates, water-breakthrough times, and post-breakthrough water cuts. Note, however, that, in reservoir-engineering problems, it is generally impossible to scale all physical characteristics of the res­ ervoir, so the use of truly scaled models is very limited. Adequately BASIC APPLIED RESERVOIR SIMULATION


SAND·PACKED PLEXIGLAS MODEL

"-------1-BRINE

TOP THREE YALYU ALONG WI!LUORf opeN, AU. 01lllftl CLOIIO

OIL·SUPPLY LINE

STAnc WATERIOIL CONTACT WATER·SUPPL.Y LINE

Fig. 1 .3-A laboratory water-coning model.s

scaled models, in which only the most important characteristics are considered in the scaling process, are used instead. 1.3.3 Mathematical Methods. Mathematical models are probably the methods used most commonly by modem petroleum engineers. These models include material-balance, decline-curve, statistical, and analytical (well-test) methods. Hand calculations or graphical procedures are generally sufficient when these methods are used; however, with the proliferation of personal computers, many soft­ ware packages that perform these tasks are available. The following sections focus on the theoretical bases and practical limitations of each of these methods, and Chap. 11 demonstrates the relationship between these models and numerical reservoir simulation.

Material-Balance Equations. The classic material-balance equa­ tion, or tank model, is a mathematical representation of reservoir or drainage volume. This model's basic principle is the conservation of mass: that the amount of material (gas, oil, or water) remaining in the reservoir after a production interval is equal to the amount of material originally in the reservoir minus the amount of material removed from the reservoir (because of production), plus the amount of materi­ al added to the reservoir (because of injection and encroachment). The material-balance method is simply an inventory of all fluids en­ tering, leaving, and remaining in the reservoir. The literature has pres­ ented many fonns of the material-balance equation, all of which can be derived from a single, generalized fonn. Table 1.2 shows common forms of the generalized material-bal­ ance equation, illustrating that the material-balance equation con­ tains much of the physics (in the form of drive mechanisms) that governs production from petroleum reservoirs. The reliability of material-balance analysis, however, depends on the accuracy of available data and the degree to which the underlying assumptions are met. The material-balance equation does not take into consider­ ation spatial variations of rock and fluid properties, hydrodynamics of fluid flow in the porous media, fluid segregation, geometrical configuration of the reservoir, location of wells, or rate of produc­ tion of various fluids. It also assumes that the pressure/volume/tem­ perature (PVT) data used in the material-balance equation are ob­ tained with the same gas-liberation process (flash vs. differential) that is active in the reservoir. The material-balance equation is also sensitive to inaccuracies in measured reservoir pressure; the model breaks down when no appreciable decline occurs in reservoir pres­ sure, as in pressure-maintenance operations. Decline-Curve Analysis. One of three mathematical fonns--ex­ ponential, hyperbolic, and harmonic decline 7,8-<:an often describe the rate of oil-production decline. The general form of the decline­ curve equation is

TABLE 1 .2-MATERIAL-BALANCE EQUATIONS FOR SPECIFIC APPLICATIONS. 6 Material-Balance Equation

Reservoir Type

Unknowns

Oil reservoi r with gas cap Active waterdrive

,

N m

No active waterdrive (We = 0)

I nitially undersaturated oil reservoir (m=O); active waterdrive

[J

Above bubblepoint

-

Below bubblepoint N

]

t1PRCO) - e;o�p t 1 - Sw;) N = ""- --,;-t1P� CO + cR - Sw,{co - Cw) 1 NM B/ + BJ Rp - Rs;)j- (We - W ) p ""'''" N 1

=

+

W

--------

--''----'-

Initially undersaturated oil reservoir (m= 0); no active waterdrive (We = 0)

[

-;::;-

-'---­

B/- Bo;

]

Wp ( ( + t1PRCO) + Bo 1 - Sw;) ; ----''-N = =-t1P� CO + CR - Sw,{co - Cw) 1 N� Bt + BJ Rp - Rs;) ] + Wp � ---''--

Above bubblepoint

Np 1

N=

Gas reservoir; active waterdrive

Gas reservoir; no active waterdrive (

INTRODUCTION

We = 0)

-=--;:;--

-

B t - Bo;

- (We

N

-...,.­

--,----

Below bubblepoint

­

-

N

)

GpBg - Wp ; G = --'----=-;:-'--;:;--"'-'­ Bg - Bg; GpBg + Wp G = _-;:..:e., _,..-,Bg - Bg;

G

3


TABLE 1 .3-FORMS OF DECLINE-CURVE EQUATION.7,8 Decline Type Basic characteristic

Hyperbolic Decline

Harmonic Decline

Decline proportional to a fractional power

Decline proportional to production

(b) of the production rate, 0 < b< 1

rate, b= 1

Exponential Decline Decline constant,

b= 0

dq/dt o = J<,qo = -q-

0=

f

q

f qj

Ddt =

°

-Ot = Rate/time relationship

I

f

dq q

Np

I

°

10ge�

f

°

qdt =

Np =

I

f

qje-Dtdt

0

qj -q e-D1 0

Substitute from rate/time equation, qje-D1 = q,

o K = -.!. qb OJ dt= /j qj

Rate-cumulative

D =Kq b = - (dq/d t)/q ,

Np

-

qj -q 0

-

q

o K = -.!. q;

fq qj

I

dq

b+1

f

°

,

-(1 b) q = qj(1 +bO;t) / Np =

I

f

qdt =

°

N, = (b_q; ID;

[

I

f f , (1 +bD;t) ; - 1

°

{

q, 1 + boj

(1/b) dt

'

]

(1 +bO;t) = (%), b

to find

Np = (1

. . . . . . . . . . . . . . . . . . . . . . . . . . . ( 1. 1)

Np

=

I

f

°

q

Oj qj dt =

f

-

qj Ojt 1 1 q; = q-Cf;

q

Substitute from rate/time equation,

where b = 0 for exponential decline, 0 < b < 1 for hyperbolic de­ cline, b= 1 for harmonic decline, and K= DJqf. In decline-curve analysis, historical production data are matched to the appropriate rate/time equation resulting from Eq. 1.1 (see Table 1.3). Once a decline model has been selected, historical data are matched by selecting decline parameters, D; and b, that minimize the error (usually the least-squares error) between the data and the rate/ time equation. Extrapolating the historical data into the future by use of the matched equation allows predictions to be made. Other com­ mon extrapolation techniques that do not fit Eq. 1.1 include the loga­ rithm of water/oil ratio vs. cumulative oil production and x plots. 9 The principal assumption of any extrapolation technique is that all processes occurring in the past will continue in the future. There­ fore, it is a very powerful technique for reservoir-performance pre­ diction when operational practices are not expected to change in the future. If operational practices will change, decline-curve analysis cannot be used. Consequently, decline-curve analysis cannot be used for "what-if' analyses. Statistical Approach. The statistical approach uses empirical cor­ relations that are statistically derived by use of the past performance of numerous reservoirs to predict the future performance of others. This approach, therefore, can be considered a formal extension of the analogical method (Sec. 1. 3. 1). A correlation is derived with data from mature reservoirs located in the same region (e.g., Texas or California), with the same lithology (e.g., sandstone or carbonate), and operating under the same driving mechanism (e.g., waterdrive or solution-gas drive). For example, Guthrie and Greenberger lO pres­ ented an oil-recovery-factor correlation as a function of permeability, porosity, formation thickness, oil viscosity, and initial water satura­ tion for sandstone reservoirs that were producing (wholly or partially) 4

'

for initial conditions,

__

to find

relationship

o = Kq1 = _ dq/dt q

dq/dt q

bO.t , = -b_ q:-b q , qb

q = qje-D1 =

-

for initial conditions,

K=O I

Kqb =

=

dq q2

qj(1 + Ojt) -1

qdt =

I

f

(

r 1dt

qj 1 + O;t

0

Substitute from rate/time equation,

(1 + Ojt)

q

j = q'

to find

q? 1-b_ q 1-b) - b)Oj(qj under waterdrive conditions. Table 1.4 lists several examples of em­ pirical correlations based on statistical analysis. For an empirical correlation to be used with confidence, reservoir properties must be within the limits of the regression database used to develop such a correlation. Statistical correlations may give a rea­ sonably accurate estimate for a reservoir as a whole, but the same correlations may produce unrealistic estimates when applied to a particular lease or portion of a reservoir because of fluid migration within the reservoir. Forecasting errors with these techniques can often be as high as 20 to 50%. In addition, these correlations can be used only to estimate the ultimate recovery and not to develop a rate/ time relationship. Analytical Methods. Analytical methods are based on the exact solutions of theoretically derived models. Pressure-transient analysis and Buckley-Leverett analysis I 6 are examples of analytical models. The derivation of these models preserves the physical description of the processes occurring in the reservoir but often results in very com­ plex equations that, in general, cannot be solved with current mathe­ matical procedures. To solve these equations analytically, simplifying assumptions must be applied to reduce the complexity of the model. Consequently, analytical methods represent exact solutions to simpli­ fied problems. The simplifying assumptions used in pressure-tran­ sient analysis include horizontal reservoir, uniform thickness, single­ phase flow, small pressure gradients, and laminar flow conditions, while the simplifying assumptions used in Buckley-Leverett analysis include incompressible linear flow, negligible capillary and gravity effects, and voidage-balanced production. Although these assumptions must be applied for mathematical solutions, the physics of the problem is preserved, so analytical methods are often used to determine how various parameters affect reservoir performance. Furthermore, these methods provide much of the important data required by simulation studies. BASIC APPLIED RESERVOIR SIMULATION


_

Np - 3244

[

4259

=

rp 1 -

[

Np

=

3244

Solution-gas-drive reservoi rs; 1 1 convert by dividing by the oil-in-place term,

[ ( BObSW;) ] .

k

]

��

rp 1 -

II ��

All equations are valid for production below the bubblepoint pressure.

7758 rp 1 100

All equations are valid for production from initial conditions.

[ ( BObSW;) ] .

Solution-gas-drive reservoirs; 1 2 convert by dividing by the oil-in-place term,

/J ��

rp 1 -

N; to Ro by

[ ( Bo;SW;) ] .

Waterdrive reservoirs; 1 1 convert dividing by the oil-in-place term,

rp 1

rp 1 -

N; to Ro

7758 rp 1 100

rp 1 -

or R = 41.815

o

Comments

[ ] [ ] [ ] [ ( BObSW;) ]0. 312 ( 110b)0.0816(Sw;)0. 46 3(PPab)02. 4 9

or R = 54.898

o

]

Empirical Relationship

1 1611 ( SW;) ' (;-;-)0.09 79(Sw;)0.3 722(-PPb)0.1 741 B a 0.1611 ( SW;) (...ls....)0.09 79 (Sw;)0. 3 722(PPb)0.1 741 B a 1.0422 ( SW;) (k!Jw;)0.077(SW r01 903(PPb)-02. 159 I Bo; 1101 a 0.0422 ( ; Sw;) ( )0.077(Swr01 903(�:) -0.2159 �;; 0; 1 . 312 ( Sw;) (...ls....)0.0816(SWI.)0. 46 3(PPb)0.2 4 9 B a

or Ro = 41.815

N'p

TABLE 1 .4-STATISTICAL RELATIONSHIPS IN HYDROCARBON R ECOVERY

7758 rp 1 100

N; to Ro

-

All equations are valid for production below the bubblepoint pressu re.

k

Ro = 11.4 +27.2 log 1 0(1000k) +25.6 Sw;-13.610g 1 0{fto) -153.8 rp -0.035h

Waterdrive and sandstone reservoi rs. 10

N� =

Gas-condensate reservoi rs; 1 3 units of are STB/RB hydrocarbon pore volume (HCPV).

-

0.061743 +

and Gp=

-

�.55 + 0.00012184T + 0.0010114(OAPI)

1

pI

2229.4 + 148.43

+ 0.26356

( 1��)02.

';30 + 21.831(OAPI)

+ 124

Ps

0.30222997 0.03170817 EABT = 0 54602036 + + - 0 . 00509693M eM M .

Eco

2

=

0.33 - 0.035

+ 1.3

X

10

-9 �

Nc

-

4.5

+ 4.3

x

x

10-511

+ 1.6

x

1O-4pt

10-2k - 0.013So; - 0.69Vco

All equations are valid for production to an abandonment pressure of 500 psia.

Waterflood areal sweep efficiency at breakthrough for a five-spot pattern. Waterflood areal sweep efficiency after breakthrough for a five-spot pattern. 1 4 CO 2 flood efficiency of C0 2 cyclic­ stimulation process. 15

2

1.4 Reservoi r-Si mulation Approach

The use of reservoir simulation as a predictive tool is becoming stan­ dard in the petroleum industry. Its widespread acceptance can be at­ tributed to advances in computing facilities (particularly the speed of computation and the increase in computer memory/storage); ad­ vances in numerical techniques for solving partial-differential equa­ tions (PDE's); the generality built into reservoir simulators, which makes them useful in modeling field cases; advances in reservoir­ characterization techniques; and the development of increasingly complicated oil-recovery techniques that would otherwise be im­ possible to analyze. A set of algebraic mathematical equations de­ veloped from a set of PDE's with appropriate initial and boundary conditions approximates reservoir behavior in the reservoir-simula­ tion approach. These equations incorporate the most important physical processes taking place in the reservoir system, including, among other things, the flow of fluids partitioned into as many as three phases (oil, water, and gas), and mass transfer between the var­ ious phases. The effects of viscous, capillary, and gravity forces on fluid flow are taken into consideration by use of a generalized form of Darcy's law. The advantages of this approach lie in the fact that the least number of simplifying assumptions is used for reservoir heterogeneity, mass transfer between phases, and the forces/mecha­ nisms responsible for flow. In addition, spatial variations of rock INTRODUCTION

N;

properties, fluid properties, and relative permeability characteris­ tics can be represented accurately in a reservoir simulator. 1.4.1 Numerical Models. Numerical models use high-speed com­ puters to solve the mathematical equations describing the physical behavior of the processes in a reservoir to obtain a numerical solu­ tion to the reservoir behavior of the field. Fig. 1.4 depicts the major steps involved in development of a reservoir simulator. In this fig­ ure, the formulation process outlines the basic assumptions inherent to the simulator, states these assumptions in precise mathematical terms, and applies them to a control volume in a heterogeneous res­

ervoir. The result of the formulation process is a set of coupled, non­ linear PDE's that describes fluid flow through porous media. The equations derived during the formulation process, if solved analytically (exactly), would give the pressure, saturation, and pro­ duction rates as continuous functions of time and location. Because of the nonlinear nature of the equations, analytical techniques can­ not be used and solutions must be obtained with numerical (approxi­ mate) methods. In contrast to analytical solutions, numerical solu­ tions give the values of pressure and saturation only at discrete points in the reservoir. Discretization is the process of converting the PDE's into algebraic equations. In general, analytical methods pro­ vide exact solutions to simplified problems, while numerical meth. ods yield approximate solutions to exact problems. 5


FORMULATION (CHAPS. 2 THROUGH 4)

WELL REPRESENTATION (CHAPS. 6 AND 9)

DISCRETIZATION (CHAPS. 5 AND 9)

NONLINEAR ALGEBRAIC EQUATIONS

NONLINEAR POE'S

MULTIPHASE FORMULATION (CHAPS. 2 AND 9)

SOLUTION (CHAPS. 7 AND

LINEAR ALGEBRAIC EQUATIONS

VALIDATION AND APPLICATION (CHAP. 10)

9)

PRESSURE, SATURATION DISTRIBUTIONS, AND WELL RATES

NUMERICAL RESERVOIR· SIMULATION PROCESS

LINEARIZATION (CHAPS. 8 AND 9)

Fig. 1.4-Major steps used to develop reservoir simulators. (Redrawn from Ref. 17.)

Several numerical methods can be used to discretize the fluid­ flow equations; however, the most common approach in the oil in­ dustry is the finite-difference method. The discretization process re­ sults in a system of nonlinear algebraic equations. These equations cannot, in general, be solved with algebraic techniques and must be linearized (put in the form of linear equations) before solutions can be obtained. Once the simulator equations have been linearized, one of several linear-equation-solving techniques can be used to solve them. These techniques fall into two categories: direct methods and iterative methods. In direct methods, an exact solution is obtained (subject to machine round-off error) after a fixed number of mathe­ matical operations. The direct methods discussed in this book are all forms of Gaussian elimination. In iterative methods an initial esti­ mate of the solution is improved successively until it is reasonably close to the exact solution. The number of mathematical operations required to reach this approximate solution is not fixed but depends on the initial estimate, the definition of what is reasonably close (tol­ erance), and the properties of the system of equations. The iterative­ solution methods discussed in this book include Jacoby 's method. the Gauss-Seidel method, successive-over-relaxation methods, the alternating-direction implicit procedure, the strongly implicit pro­ cedure, and the conjugate gradient method.

1.4.2 Reservoir-Simulator C lassification. Reservoir simulators can be classified in several ways. The most common criteria for classifying reservoir simulators are the type of reservoir and reser­ voir fluids to be simulated and the recovery processes occurring in the subject reservoir. Reservoir simulators can also be classified ac­ cording to the coordinate system used in the model, the number of dimensions in space, and the number of phases. Classifications based on reservoir and fluid type may include gas-, black-oil-, and compositional-reservoir simulators. Classifications based on recovery processes include simulators categorized into con­ ventional-recovery, chemical-flood, thermal-recovery, and miscible­ displacement simulators. In this book, conventional-recovery simula­ tors and black-oil simulators are synonomous. Fig. 1.5 shows groupings of specific recovery methods under any of these categories. Reservoir simulators based on reservoir and fluid descriptions fall into two categories: black-oil and compositional simulators. Black·oil simulators are used in situations where recovery pro­ cesses are insensitive to compositional changes in the reservoir t1uids. In black-oil simulators, mass transfer is assumed to be strictly pressure dependent. In these simulators, the fluid properties Bo, Bg, and Rs govern PVT behavior. Compositional simulators are used when recovery processes are sensitive to compositional changes. These situations include prima-

HYDROCARBON-RECOVERY METHODS

I

PRIMARY RECOVERY

SECONDARY RECOVER Y

I

Solution-Gas Drive

Gas-Cap Expansion

I

I

Waterflooding

TERTIARY RECOVERY

Che m ical

I

I

I

Gravity

Rock Expansion

Waterdrive

Drain a ge

Pressure Maintenance

I

I Thermal

Polymer Flooding

Rever.e Welling Agent

Steam

InJecllon

• Surfactant Flooding

• Hot-Water Injection

• Carbonated Waterfl ood

In-Situ Combustion W e l l bore Healing

Mi sc ible

J

Vaporlzing·Gas Drive Enrlched·Gas Drive Alcohol Flooding

C02 Flooding Miscible Hydrocarbon Flooding

Fig. 1.5-Hydrocarbon-recovery methods.

6

BASIC APPLIED RESERVOIR SIMULATION


Perforation

Fig. 1 .6-Metamorphosis of flow geometries.

ry depletion of volatile-oil and gas-condensate reservoirs, as well as pressure-maintenance operations in these reservoirs. Also, multi­ ple-contact-miscible processes are generally modeled with com­ positional simulators. In compositional simulators, a cubic equa­ tion of state governs the PVT behavior. When classifying reservoir simulators by recovery processes, pri­ mary-oil-recovery mechanisms, such as solution-gas drive, gas-cap expansion, gravity drainage, and waterdrive, can all be modeled with a conventional or black-oil simulator. In addition, secondary­ recovery mechanisms, such as water or gas injection (where mass­ transfer effects are negligible), can also be modeled with a black-oil simulator. Chemical-flooding processes, such as polymer or surfac­ tant floods, require a chemical-flooding simulator. These simulators differ from black-oil simulators in that additional conservation equations are used to track the individual chemical species used in the flood. Thermal-recovery processes, such as steamfloods and in­ situ-combustion processes, require thermal-recovery simulators for reservoir forecasts. These simulators use an energy-balance equa­ tion in addition to the mass-balance equations. Generally, thermal­ recovery simulators use a compositional approach. A recent devel­ opment in reservoir simulation has been the multipurpose reservoir simulator. These simulators generally are developed with the most flexible assumptions and algorithms, so they are capable of model­ ing all the recovery mechanisms discussed earlier. Reservoir simulators and their applications can also be classified by their geometry and dimensionality. For example, three-dimen­ sional (3D) simulation models in rectangular coordinates (x,y, z) can be used for full-field applications. Also, two-dimensional (20) models in rectangular coordinates can be used for areal (x,y) ap­ plications or for cross-sectional (x, z) applications. Two-dimension­ al models in cylindrical coordinates (r, z) can be used for single-well

Fig. 1 .7-Th ree-d imensional g r i d b l ock arrangement for a n anti c l i ne.

INTRODUCTION

coning applications. Finally, one-dimensional models can be used for applications involving laboratory corefloods. Although the geometry and dimensionality of simulation models and their traditional applications are listed earlier, no single flow ge­ ometry can adequately describe fluid flow in a hydrocarbon reser­ voir. Fig. 1.6 shows the changes in flow geometry as oil is produced. Away from the well, fluid flow is nearly linear and rectangular flow is prevalent. As fluids move near a wellbore, the flow geometry dis­ torts to cylindrical flow, so cylindrical coordinates are appropriate. Finally, as the fluids move near individual perforations, spherical flow dominates and spherical coordinates are appropriate. There­ fore, whenever a single coordinate system is used, the results will always be approximate. The use of geometry and dimensionality to classify simulators is not as common as it once was. This is because as the power of com­ puters increased in the late 1 960's and early 1 970's, most numerical­ simulation programs added the capability for 3D problems. Today, all commercial simulators have this capability. 1.4.3 Reservoir-Simulation Application. Reservoir simulation is generally performed in several steps. I. Set the study objectives. The first step of any successful simu­ lation study is to set clear, achievable objectives. These objectives must be compatible with available data and production history. Ob­ jectives are used to set goals, define basic strategy, identify available resources, and determine what is to be learned from the study. 2. Acquire and validate all reservoir data. Once the study objec­ tives have been defined, reservoir and production data are gathered. Only the data required to meet the objectives of the study should be incorporated into the simulation model. Incorporating additional de­ tail that does not add to understanding the objectives leads to overkill. 3. Construct the reservoir model. After the data have been gath­ ered and validated, the simulation model is built. In this step the res­ ervoir is divided into gridblocks, as in Figs. 1.7 and 1.8. Formation properties, such as porosity, directional permeabilities, and net-pay thickness, are assigned to these grid cells. The different grid cells can have different reservoir properties; however, reservoir proper­ ties are assumed to be homogeneous within a grid cell. Because dif-

Fig. 1 .8-Three-dimensional gridblock arrangement for a blan­ ket sand with varying thickness.

7


I ...

RESERVOIR-PERFORMANCE ANALYSIS

I

I

I

RESERVOIR MODELING

DATABASE

,'

t----

FLUID DATA

I

SC ALED

EXPERIMENTAL MODELS

DETERMINE RESERVOIR MECHANISMS

I

ANALOG MATERIAL B ALANCE

--

DECLINE CURVES

MATHEMATICAL MODELS

DETERMINE PRODUCTION SCHEMES

......

I

ROCK DATA

PRODUCTION HISTO RY

PRODUCTION PROFILES

I

STATISTICAL ANALYTICAL

ESTIMATE RECOVERABLE R ESE RVES

I

APPLY OPTIMIZATION TECHNIQUES

� ....

EXAMINE THE APPLICABILITY OF SECONDARY- AND TERTIARYRECOVERY TECHNIQUES

PREDICT RATE OF RECOVERY

Fig. 1 .9-lnteraction of methods used to predict reservoir performance.

ferent cells can have different properties, areal and vertical trends in data can be incorporated into the model. At this stage of the study, all data must be properly scaled for the simulation grid. 4. History match the reservoir model. Once the simulation model has been built it must be tuned, or history matched, with available production data because much of the data in a typical simulation model is not known for certain but is the result of engineers' and geologists' interpretations. Although these interpretations are gen­ erally the best representation of available data, they are still subjec­ tive and may require modifications. 5 . Run prediction cases. The final step in the simulation process is the prediction phase, in which various production schemes are evaluated and sensitivity analyses of various production and reser­ voir parameters are performed. The main objective of any simulation study is to gain knowledge of the subject reservoir. In most simulation studies, most of the knowledge is gained during the data-gathering, history-matching, and prediction phases. During the data-gathering and history-match­ ing phases, all relevant reservoir data are collected, validated, and synthesized into a coherent field model. This process will inevitably yield information about the reservoir that was unknown before the study. During the prediction phase, questions concerning the subject reservoir can be addressed and most of the study objectives are met. 1.5 Concluding Remarks

Although reservoir simulation is the most comprehensive method of forecasting reservoir performance, it does not replace the classic reservoir-engineering approach. In fact, a properly conducted simu­ lation study will always use results from several classic methods to obtain input to the simulator. Fig. 1.9 summarizes the intricate inter­ action of various methods used to predict reservoir performance. For example, during the reservoir-characterization phase of a simu­ lation study, pressure-buildup analysis is the preferred method of obtaining formation permeabilities; and during the history-match­ ing phase, material-balance methods can be used to obtain informa­ tion about water encroachment and aquifer size. After reviewing the study objectives, it may even be determined that a simulation study is not warranted because of time. cost. man8

power, or machine constraints. The simplest and least-expensive method for meeting the study objectives should always be used. The detailed data required by the reservoir simulator are often unavail­ able or are uneconomical to obtain. Finally, analog, experimental, and analytical methods are the only methods available to validate a numerical simulator. Without these, we could not confidently use the results generated by a simulation study. 1.6 Chapter Project

Using computer modeling to simulate hydrocarbon-reservoir behav­ ior is an arduous task. This book introduces a variety of topics, includ­ ing techniques for developing reservoir simulators and procedures for conducting reservoir-simulation studies. Through the book, it will be­ come evident that simulator-development engineers and reservoir en­ gineers conducting modeling studies should possess diverse engi­ neering experience with an understanding of transport phenomena, fluid-flow dynamics in porous media, physics, and advanced mathe­ matics. Furthermore, engineers must be conversant with computers. To facilitate understanding of presented topics, key chapters will conclude with "Chapter Project" sections that present a large-scale field example. Depending on chapter contents, new data and rele­ vant analyses will be provided, and the project in each chapter will highlight the principles discussed. In this way, a field example will be constructed throughout the book. The goal of this large-scale ex­ ample is two-fold. First, it will provide a platform from which some of the more salient topics can be reiterated and reinforced. Second, as the results of the analyses (with some intermediate observations) are presented, important information that can be used for bench­ marking is provided. In this way, it will be possible for development engineers to test their software using the data presented in this proj­ ect to check the validity of their simulators. Fig. 1.10 presents the isopach and structural maps for the project field, which will be referred to as the A-I reservoir. This reservoir is not a completely hypothetical field. The isopach and the structural maps in Fig. 1.10 are for the Plum Bush Creek field, located in Washington County, Colorado. Some reservoir and fluid data are al­ tered to make the example more compatible with the contents of this book. The isopach and structural maps of the Plum Bush Creek field BASIC APPLIED RESERVOIR SIMULATION


B-2

B-1

/

/

!

-9,280

B-4

B-3 A-I RESERVOIR

STRUCTURE AND ISOPACH MAPS

LEGEND Structural Contours - Isopach Contours Scale. ft _

01

i 500

• Well Location

1,000 :

2,000

Fig. 1.1O-Structural and isopach maps of the A-1 reservoir.

are obtained from Ref. 18. The information on the A-I reservoir that is available at this stage describes it as a gently west-dipping sand­ stone reservoir of Cretaceous age. The reservoir rock is a channel sand and the trapping mechanism for the field is a permeability pinchout updip on a slight structural nose. Exercises 1. 1

What are the different ways a reservoir can be modeled?

1.2 What are the differences between a mathematical, a numerical, and a computer model?

.

1.3

Match the following. Physical model Conceptual model Geological model Mathematical model Computer model Analog model Numerical model Statistical model

Simulator Partial-differential equations Material-balance equations Laboratory sandpacks Potentiometric model Depositional model Empirical-correlation equations Finite-difference equations

1.4 Put the following in sequential order to summarize the basic

steps of a simulation study. Preparing the data Constructing the geological model Defining the study objectives History matching INTRODUCTION

Analyzing the results Reporting Predicting performance equation q = 2nfichkt;.pl/llogArelrw) represents the steady­ state radial flow of a fluid in a cylindrical porous medium. What are the analog representations describing the heat and current flows in similar cylindrical systems? Identify the analogous terms and/or groups. 1.5 The

1.6 Comment about the accuracy of the statement 'The material­ balance equation is considered to be a zero-dimensional model be­ cause time dependency is not incorporated into it." Nomenclature

A=

b=

Bg =

Bgi = Bo =

Bob

=

Boi

=

Br = Co =

cross-sectional area normal to flow, L2 , ft2 [m2] constant in decline-curve equation gas formation volume factor (FVF), O1L3 , RElsef [m3/std m3 ] gas FVF at initial conditions, L3/L3 , RB/scf [m3 /std m 3 ] oil FVF, L 3/1) , RB/STB [m3/std m 3 ] oil FVF at bubblepoint conditions, L 3/L3 , RB/STB [m3/std m 3] oil FVF at initial conditions, L3/L3 , RB/STB [m3/std m 3 ] total (two-phase) FVF, O1L3, RBISTB [m3/std m3] oil compressibility, Lt2/m, psi - I [kPa -I]

9


cw = D= D; = e - Dt = E= EA =

Eco = 2

reservoir rock compressibility, Lt2/m, psi - I [kPa - l ] water compressibility, Lt2/m, psi - I [kPa - I ] decline-rate constant, day - I initial decline rate, day - 1 exponential decline coefficient, dimensionless voltage, V areal sweep efficiency after waterflood breakthrough, dimensionless areal sweep efficiency at waterflood breakthrough, dimensionless efficiency of C02 cyclic-stimulation process

D..E = voltage difference, V G = original gas in place, 0, scf [std m 3 ] Gp = cumulative gas production, L 3 , scf [std m 3 ] G; = cumulative gas production per unit HCPV,

L31L3 , scfIRB HCPV [std m 3/m3 HCPV]

h = thickness (general and individual bed), L, ft [m] I = electrical current, q/t, A

k= K=

D..L =

m=

Nc = N=

Np =

N; = p= Pa = Pb = Ps = Pt = D..p = D..PR =

q= q=

%; = qi =

qO =

Q=

r=

r=

re =

rw = R=

Ro = Rp =

Rp i = Rs = Rs i = So i = Sw i = t= T= D.. T = VC0 = 2 w= w,, = "1 = "1BT =

10

permeability, L2 , darcy [u m2 ] constant in generalized decline curve segment length, L, ft [m] gas-cap/oil-zone ratio, fraction capillary number, dimensionless initial oil in place, 0, STB [std m 3 ] cumulative oil production, L3 , STB [sid m3] cumulative oil production per unit volume of reservoir, L 31L3 , STB/acre-ft [std m 3/(ha ' m)] pressure, mlLt2 , psia [kPa] abandonment pressure, mlLt2 , psia [kPa] bubblepoint pressure, mlLt 2 , psia [kPa] saturation pressure, mlLt2 , psia [kPa] tubinghead pressure, mlLt2 , psia [kPa] pressure difference, mlLt2 , psi [kPa] change in reservoir pressure, mlLt2 , psi [kPa] production rate or flow rate, O ft, BID [m3/d] production rate or flow rate in hyperbolic decline relationship in Table 1 .3, L3/t, BID [m3/d] initial oil production rate, L3/t, STBID [std m 3/d] initial production rate or flow rate in hyperbolic decline relationship in Table 1 .3, L 3ft, BID [m3/d] initial production rate, Oft, BID [m3/d] rate of heat transfer, rnIt3T, Btulhr [kW] distance in the radial d i rec ti on i n c yli ndri c al coordinate system, L, ft [m] electrical resistivity in Table 1 . I , mL4/tq 2 , Q . m radius of external boundary, L, ft [m] well radius, L, ft [m] electrical resistance, mL3/tq2 , Q oil-recovery factor, % cumulative produced gas/oil ratio, L 3/L3 , scf/STB [std m3/std m3 ] producing gas/oil ratio at initial conditions, L31L3 , scf/STB [std m3/std m 3 ] solution-gas/oil ratio, L3 /L3 , scf/STB [std m 3/std m 3 ] in iti al soluti on-gas/oil ratio, 01L3 , scf/STB [std m3/std m 3 ] initial oil saturation, fraction initial water saturation, fraction time, t, days absolute temperature, T, OR [K] temperature difference, T, OR [K] volume of C02 injected per cycle per foot of

sand, O/(cycIe-L) , MMscf/cycIe-ft [std m3/(cycIe.m)]

width, L, ft [m] cumulative volume of water influx, L3 , RB [m3 ] cumulative volume of water injected, L3 , RB [m3 ] volume of water injected at breakthrough, 0, RB [m3 ]

Wp = cumulative volume of produced water, 0, RB [m3 ] x = distance in the x direction in the Cartesian y= z

ac

= =

Pc = D.. = '" = "'0 = "'ob = "'oi = "'wi = If> =

coordinate system, L, ft [m] distance in the y direction in the Cartesian coordinate system, L, ft [m] distance in the z direction in the Cartesian coordinate system, L, ft [m] volume conversion factor whose numerical value is given in Table 2. 1 transmissibility conversion factor whose numerical value is given in Table 2. 1 difference operator viscosity, mILt, cp [Pa ' s] oil vi scosity, mILt, cp [Pa ' s] oil viscosity at bubblepoint pressure, mILt, cp [Pa ' s] oil viscosity at initial pressure, mILt, cp [Pa ' s] initial water viscosity, mILt, cp [Pa ' s] porosity, fraction

References

I . Hele-Shaw, H . S . : "Experiments on the Nature of the Surface Resistance

in Pipes and on Ships," Trans. , Inst. of Naval Architects ( 1 897) 39, 1 45 . 2 . Bruce. W.A.:"An Electrical Device for Analyzing Oil-Reservoir Be­ havior," Trans . • AIME ( 1 943) 157, 1 1 2. 3 . Craft. B.e. and Hawkins. M.E: Applied Petroleum Reservoir Engineer­ ing. Prentice-Hall Inc . , Englewood Cliffs, New Jersey ( 1 959) 236. 4. Muskat, M.: Flow of Homogeneous Fluids, McGraw-Hili Book Co. Inc . , New York City ( 1 937) (reprinted by IntI. Human Resources Devel­ opment Corp. in 1 9 82) 575. 5 . Sobocinski, D.P. and Cornelius, A J . : "A Correlation for Predicting Wa­ ter Coning Time," JPT (May 1 965) 594; Trans. , AIME, 234. 6. Garb, EA.: "Oil and Gas Reserves Classification, Estimation, and Eval­ uation," JPT (March 1985) 373. 7 . Arps, J.J. : "Analysis of Dec1ine Curves," Trans., AIME ( 1 945) 160, 228. 8 . Arps, J.J. and Smith, A.E. : "Practical Use of Bottom-hole Pressure Build-up Curves," Drill. & Prod. Prac. ( 1 949) 1 55 . 9. Ershaghi, l. and Omoregie, 0.: " A Method for Extrapolation o f C u t vs. Recovery Curves," JPT (February 1 978) 203 . 10. Guthrie, R.K. and Greenberger, M . K . : ''The Use of Multiple Correla­ tion Analyses for Interpreting Petroleum-Engineering Data," Drill. & Prod. Prac. ( 1 955) 1 35 . I I . Arps, J.J. e t al. : "Statistical Analysis o f Crude O i l Recovery and Recov­ ery Efficiency," Bulletin, D 1 4, American Petroleum Inst., Washington, D.C. (October 1 967). 12. "Statistical Analysis of Crude Oil Recovery and Recovery Efficien­ cy,"American Petroleum Inst., Dallas (April 1 984). 13. Jacoby, R.H., Koeller, R.C., and Berry, V.J. Jr.: "Effect of Composition and Temperature on Phase Behavior and Depletion Performance of Rich Gas-Condensate Systems," JPT (July 1 959) 58; Trans., AIME, 2 16. 1 4. Craig, EE Jr., Geffen, T.M . , and Morse, R.A.: "Oil Recovery Perfor­ mance of Pattern Gas or Water Injection Operations from Model Tests," JPT (January 1 955) 7 ; Trans., AIME, 204. 1 5 . Patton, J.T. , Coats, K.H., and Spence, K . : "Carbon Dioxide Well Stimu­ lation: Part I -A Parametric Study," JPT (August 1 982) 1 798. 1 6. Buckley, S . E. and Leverett, M . e . : "Mechanism of FIuid Displacement in Sands," Trans., AIME ( 1 942) 1 46, 1 07 . 1 7. Odeh, A . S . : "An Overview o f Mathematical Modeling o f the Behavior of Hydrocarbon Reservoirs," Soc. ofIndustrial and Applied Mathemat­ ics Review (July 1 982) 24, No. 3 , 263 . 1 8. Oil and Gas Fields of ColoradolNebraska & Adjacent Areas, M.e. Crouch III (ed.), Rocky Mountain Assn. of Geologists. Denver, Colora­ do ( 1 982) 2, 390.

51 Metric Conversion Factors

acre x 4.046 873 bbl x 1 .589 873 ft X 3 .048 * ft2 x 9.290 304* ft3 x 2.83 1 685 psi x 6. 894 757

E - OI E - Ol E - Ol E - 02 E - 02 E + OO

= ha = m3 =m = m2 = m3 = kPa

·Conversion factor is exact.

BASIC APPLIED RESERVOIR SIMULATION


C h a pte r 2

Ba s i c Rese rvo i r-E n g i n ee ri n g Co n ce pts a n d Rese rvo i r-Fl u i d a n d -Rock Pro p e rties 2.1 I ntrod uction

Mathematical modeling of a given system requires understanding of the behavior of the different elements that make up the system under study. In reservoir simulation, this system comprises the reservoir rock and the various fluids (oil, water, and gas) flowing through it. Reservoir-rock properties of interest include those related to the ca­ pacity of the rock to transmit and store fluids in its pores. The depen­ dence of fluid properties on primary simulation unknowns (pressure and saturation) is required in black-oil simulation. A thorough under­ standing of the pressure dependence of fluid densities, viscosities, formation volume factors (FVF's), solution-gaslliquid ratios, and the saturation dependence of relative permeability and capillary pressure is very helpful for both model developers and users. Thi s chapter discusses rock properties, fluid properties, fluid/rock interactions, basic reservoir-engineering concepts (such as fluid po­ tential, steady- and unsteady-state phenomena, rock heterogeneity and rock anisotropy), and basic reservoir-engineering laws (such as Darcy's law and the law of mass conservation).

Understanding basic reservoir-engineering concepts for modeling flow problems in porous media is very important. This section includes dis­ cussions of fluid-flow potential, Darcy's law, and steady- and unsteady­ state phenomena. Capillary pressure and relative permeability and the law of mass conservation are presented in context of their applications to single- and multi phase fluid flow in porous media.

2.2.1 Fluid Potential. In earth sciences other than petroleum engi­ neering (for example, geology or hydrology), fluid potential at a point i s defined as the work required by a frictionless process to trans­ port a unit mass of fluid from a state of atmospheric pressure and zero elevation (absolute datum) to the point in question. Defined thi s way, fluid potential expressed mathematically as the fluid head (hf) for an i ncompressible fluid is

= ; + D,

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (2. 1 )

D i s positive i n the vertical upward direction and I' = ycpg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

where

.

.

.

.

.

.

=

yhf = p + I'D .

.

<I>

=

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (2.3)

p

+

I'D.

. . . . .

....

.

.

.

.

. .

.

.

.

.

<1>, ..

.

..... . . ... . ..

.

. .

.

. . .

.

.

.

.

.

. .

(2.4)

In reservoir engineering, an arbitrary and convenient datum (other than the absolute datum) is used as a reference for all reservoir pres­ sures. This arbitrary datum can be sea level or the middle, top, or base of the reservoir. The level of this new datum is not important because flow rate depends on potential gradient (see Sec. 2.2.2) rather than ab­ solute potentials. To demonstrate thi s point, calculate the potential difference between Points A and B in Fig. 2.1. By use of the absolute datum as a reference level, the potentials at Points A and B are given by applying Eq. 2.4 as

and then

=

PA

+

yDA

. .

<1>8 = P 8 + yD8 ,

.

. . . . . .

.

.

. . . . . .

.

.

.

.

.

. .

.

. . . .

.

. .

.

.

. . .

.

.

.

(2 .5)

. . . . (2.6)

<l>A - <1>8 = ( PA - P 8) + y (DA - D 8)'

(2.7)

From Fig. 2 . 1 ,

(D8 - DA) = (ZA - Z8)'

(2.8)

Substituting Eq. 2.8 i nto Eq. 2.7 yields

<l>A - <1>8 = ( PA - P 8 ) - y (ZA - Z8)'

.

Using the new datum as a reference level,

<l>A - <1>0 = ( PA - po) - yZA and

. .

<1>8 - <1>0 = ( P8 - pO) - yZ8,

<1>0 = pO + yDO and pO = pressure at the new datum.

where

(2.2)

I'

The term (yly) has pressure units and i s frequently referred to as the datum pressure . In reservoir simulation and petroleum engineering, this term i s referred to as fluid potential, so

<l>A

2.2 Basic Reservoi r-Engi neeri ng Concepts

hf

i s the fluid density in terms of pressure per distance (usually called fluid gravity). In Eq. 2.2, Ye gravity conversion factor (Table 2.1 gives unit definitions). Multiplying both sides of Eq. 2 . 1 by gives

.

.

B A S I C RESERVOIR-ENGINEERING CONCEPTS A N D RESERVOIR-FLUID AND -ROCK PROPERTIES

.

.

.

.

. .

.

.

.

.. . .. .

. .

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

. . . .

.

.

. .

.

.

(2.9)

(2. 1 0)

.

.

.

.

.

.

.

.

.

. . (2. 1 1 )

.

.

.

.

.

(2. 1 2)

11


TABLE 2.1 -U N ITS FOR VARIAB LES IN DARCY'S LAW· B

System of Units Variable

Customary

ac

5 . 6 1 4583

Pc

Metric

1 . 1 27

86. 4 x l O - 6

O . 2 1 584 x l O - 3

10-3

RB/D

m 3/d

A

ft2

m2

u

RB/(D-ft2 )

m 3/(d ' m2 )

k

darcy

,u m 2

k,

fraction

fraction

,u

cp

Pa · s

psi/ft

kPaim

fllft

m/m

Yc q

"\iZ

Y

psilft

kPaim

p

Ibm/ft3

kg/m 3

g

ftlsec2

m/s2

A - <l>B = ( PA - PB) - y (ZA - ZB)' . . . . . . . . . . . .

<l>

(2. 1 3)

=

( p - pO )

- yZ,

. . . . . . . . . . . . . . . . . . . . . (2. 1 4)

where and = pressure and elevation, respectively, at the arbitrary point. The potential gradient, obtained by differentiating Eq. 2. 1 4, is

Z

- yVZ,

. . . . . . . . . . . . . . . . . . . . . . . . . . . . (2. 1 5 )

where Z is positive i n the downward vertical direction. Although Eq. 2. 1 5 derived for incompressible fluids assumes that the fluid density used to define the hydrostatic gradient, y, is constant, it is applicable to compressible fluids as well . To derive an expression for the gradient of flow potential of a sl ightly compressible or com­ pressible fluid, write an energy-conservation equation for the me­ chanical energy to translate a unit mass from some reference level to an arbitrary level. In doing so, consider the total work done on the fluid that is composed of collection work, potential energy gained (or lost), compression work, and rejection work. Such a treatment yields the definition of Hubbert's I potential, <l>h , which is valid for both compressible and incompressible fluids, <l>h =

P

J y��) - Z

p

O

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . (2. 1 6)

[f ]

The potential gradient can then be obtained from Eq. 2. 1 6 as �

V<I>h

=

V

P dep

p

O

y p) - Z

=

I

y VP - VZ.

. . . . . . . . . . . (2. 1 7)

Then the potential gradient defined in Eq. 2. 1 5 is (2. 1 8) 12

U 'tl

A rbitrary new datum

A

SL

V

Eqs. 2.9 and 2. 1 3 are identical. This implies that the potential dif­ ference between two points does not depend on the datum depth used in the computations. The potential at any arbitrary point with the new datum can be ex­ pressed as

V<I> = Vp

( ZA -

o

o

P

ZA

=

DA

Subtracting Eq. 2. 1 1 from Eq. 2. 1 0, both <1> 0 and p drop out, re­ sulting in

<1> 0

0

Z

'Extracted from Table 4 . 1

-

D

( DB - DA l

Absolute datum

Fig. 2.1 -Absolute datum and arbitra ry datum.

"\ip

<I>

D B ZB

V

which simply indicates that <I> is related to <I>h through y. In a sim­ ulation study, a constant-density assumption may not be applied to certain fluids, such as an oil phase with solution gas or a gas phase. To remove the nonlinearity introduced by the pressure-dependent density term, the y term in Eq. 2. 1 5 is updated as the new pressure val­ ues become available at a given timestep (or if necessary at a given iteration level) to recalculate the fluid density. Furthermore, during the initialization step, y is continuously updated at new depth levels as the hydrostatic pressure is calculated. Alternatively, the hydrostatic fluid gradient, y, in Eq. 2. 1 5 is calcu­ lated with the average fluid density in the elevation interval tlZ. In other words, Eq. 2. 1 5 is applicable for both incompressible and com­ pressible fluids. While y is constant for an incompressible fluid, it is an average that takes into consideration the variation ofy with pres­ sure over the eleva.ti on interval tlZ for a compressible fluid. In Eq. 2. 1 5 , the operator is defined by Eq. 3.99. For multiphase flow, the potential gradient for each phase (0, W, and g) is

V

V<I>t = VP t - YtVZ, . . . . . . . . . . . . . . . . . . . . . . . . . . .

where 1=0,

w,

Yt = y,P t g;

(2. 1 9)

or g;

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (2.20)

and Z is positive in the vertical downward direction. Note that, if the coordinate system used in the computation is chosen to be positive in the vertical upward direction, the minus sign in Eq. 2. 1 9 must be changed to a plus sign. 2.2.2 Darcy's Law. Darcy's law is an empirical relationship between fluid flow rate through a porous medium and potential gradient. 2 For single-phase, one-dimensional ( I D) flow, this law can be expressed in a differential form as

lx =

U,

=

- f3, � :' . . . . . . . . . . . . . . . . . . . . . . . . .

(2.2 1 )

where f3c = unit conversion factor for the transmissibility coefficient, k = absolute rock permeability in the direction of flow, Jt = fluid viscos­ ity, <I> = fluid potential, and u =fluid flow rate per unit cross-sectional area perpendicular to the flow direction (superficial velocity). For three­ dimensional (3D) flow the differential form of Darcy's law is � u

=

� u

=

- f3c Jik V<I>.

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (2.22)

With the definition for potential gradient (Eq. 2. 1 5), the velocity vec­ tor Ii becomes

- f3' Jik ( Vp - yVZ) . �

. . . . . . . . . . . . . . . . . . . . . . (2.23)

When using this form of Darcy's law, engineers should be aware of some implicit assumptions and limitations. 3 ,4 BASIC APPLIED RESERVOIR SIMULATION


We l l 1

We l l 2

---

....

---

- 2 , 000 ft -

3 , 570 - 3 , 600 2, 000/cos 1 0°

7,800 ft

- 0 .0 1 48 psi/ft,

7 , 800 - 8 , 1 52 . 6

..

2 , 000/cos 1 0°

8,1 52.6 ft

. . . . . . . . . (2.27)

0.1736 ft/ft

. . . . . . (2.28)

Substituting i nto Eq. 2.26 yields u = -

1 .12

�.; 0 . 1 [ - 0.0 1 48 - (0.2776)( - 0 . 1 7 3 6)]

or u = - 0.0063 RB/(D-ft2) . B ecause u is negative, the direction of fluid flow is i n the direction opposite to the direction of increasing s . Therefore, oil flows from Point 2 to Point 1 and the magnitude of the Darcy velocity is 0.0063 RB/(D-ft2) or 0.0353 ftID.

Fig. 2.2-Cross section of reservoir described in Example 2.1 .

1 . The fluid is homogeneous, single-phase, and Newtonian.

2. There is no chemical reaction between the fluid and the porous

medium. 3. Laminar-flow conditions prevail. 4. Permeability i s a property of the porous medium that is independent of pressure, temperature, and the flowing fluid. 5. There is no slippage effect (Klinkenberg5 phenomenon). 6. There is no electrokinetic effect. For multi phase flow the extended form of Darcy's law for each phase can be expressed as "1 =

_ p(. �;/V<l>I'

. . . . . . . . . .

..................

(2.24)

where l = o, w, or g . Combining with Eq. 2 . 1 9 gives

2.2.3 Steady- and Unsteady-State Flow. Steady- and unsteady-state

(2.25) where l = 0 , w, or g and krf , Pb Pf , and y! = relative permeability, vis­ cosity, pressure, and fluid gravity for Phase t, respectively. Darcy's law can be considered an empirical law2 or an analytical expression derived from the Navier and Stokes equation. ] In either case, Darcy's law is a cornerstone to reservoir simulation.

Example 2. 1 An oil formation dips with a 10° angle. Its permeabil ­ ity is 100 m d and its thickness is 40 ft. Its o i l density and viscosity are 40 Ibmlft3 and 0.6 cp, respectively. Two observation wells are drilled at Points l and 2. The two points are separated horizontally by 2,000 ft; Fig. 2.2 shows where they fal l on the formation. The bottom ofOb­ servation Wel l l i s 8, 1 52.6 ft below sea level, and that of Well 2 is 7 ,800 ft below sea level. The bottomhole pressure of Weil l is 3,600 psia, and that of Wel l 2 is 3,570 psia. Determine the fluid velocity be­ tween the two observation points. Solution. The positive direction i s from Point 1 to Point 2. Fluid ve­ locity for single-phase flow i s _

u = -

(

P<) ik Vp

For I D flow in the u =

- Pc

� (:

-

)

direction, this equation becomes

-

1'

�;)

flow are basic concepts required by both practicing engineers and stu­ dents. For example, the unsteady-state nature of a waterflood is the reason that oil production from a reservoir does not respond immedi­ ately to changes in water injection. Fluid compressibility, q, and the manner in which fluid density, p, responds to pressure are the main factors responsible for this behavior. For an incompressible fluid (see Types of Reservoir Fluids in Sec. 2 . 3 .2), pressure response i s felt instantly with equal intensity at any point in the reservoir, provided that the reservoir rock is incompress­ ible. Mathematically stated, p

when q

f(P ) =

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (2.29)

0 or p is constant for all p and

p

iJ iii I s = 0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (2.30a) and

p

.

iJ iii Is = O. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (2.30b)

In terms of fluid velocity, (2.31)

(2.23)

- l'VZ . s

It is important to recognize that Eq. 2.23 in this example gives the apparent, or Darcy, velocity. Because of the tortuosity of the flow paths (a result of the conspicuous nature of the pore structure), the ac­ tual fluid velocity will vary from point to point within the rock and result in an average velocity. In other words, the actual fluid velocity is a local microscopic velocity as defined at the microscopic scale. The average velocity, a property at the core scale, can be found by di­ viding the apparent velocity by the porosity of the rock. The average velocity becomes equal to the actual velocity if the porous medium is assumed to consist of a bundle of uniform capillary tubes (homoge­ neous porosity distribution). In reservoir engineering, the apparent fluid velocity is used to calculate the volume offluid passing through a section of a porous medium. On the other hand, it is essential to use the average velocity to consider the movement of particles and/or fluid interfaces. Because actual velocities are difficult to measure, they are rarely used i n reservoir-engineering calculations.

.

.

.....................

(2.26)

Correlating the field units indicated in Fig. 2.2 with the information in Table 2 . 1 ,Pc = 1 . 1 27 , k = 0. 100 darcy,,u = 0.60 cp, p = 40 Ibmlft3, g = 32.174 ft/s2, l'c = 0.21584 X 10 - 3, l' = Yc pg or 0.2776 psi/ft [ (0.21584 x 10 - 3)(40)(3 2 . 17) ] ,

Flow problems involving incompressible fluids and porous media have solutions that are independent of time (because all derivatives with respect to time are zero) and dependent on space only. Such flow i s called steady-state flow because all properties are steady, or constant, with time. For slightly compressible and compressible fluids, the pressure shock (or at least part of it) will be absorbed initially by fluid compres­ sion until the fluids can no longer compress. The remainder of the en­ ergy will then be transmitted to the next point in space, and so on. The energy stored in the compressed fluid will be released later and trans­ mitted from one point to the next. In time, the pressure shock (or at least part of it) will be felt at any observation point. That is to say that

BASIC RESERVOIR-ENGINEERING CONCEPTS AND RESERVOIR-FLUID AND ·ROCK PROPERTIES

13


there is transient, or time-dependent, behavior occurring in the porous medium. In this case, we have p

= f(p) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (2.32)

when CJ > 0 and op

at Is op

;t!

and at ls

0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (2.33a) ;t!

(2.33b)

O.

In terms of fluid velocity, (2.34) Flow problems involving compressible or slightly compressible fluids have solutions that are dependent on both space and time. For these problems, the solution at any given time is obtained by advanc­ ing the solution from to = 0 to t1 to + I1t and then from tl to t2 = tl + I1t, and so on, until the final time is reached. The process of advancing the solution in time can either be continuous, as in pres­ sure-transient analysis, or discrete, as in numerical reservoir simula­ tion. Such flow is called transient or unsteady-state flow. =

2.3 Reservoi r-Rock

and

Example 2.2 Prove that the effective compressibility of an oil­ filled (single-phase) reservoir is given by

Ce

co rp + cR ( 1 - rp). . . . . . . . . . . . . . . . . . . . . . . . . (2.36)

=

Solution. The bulk volume of a reservoir equals the sum of the PV and rock-solids volume; that is,

Vb

Vp

=

or Vb

+

Vs

Vo + Vs '

=

2.3.1 Rock Properties. This section introduces basic reservoir-rock

properties, such as porosity and permeability. which are assumed to be independent of fluid content, provided that the rock and fluid are nonreactive. The concepts of rock heterogeneity and anisotropy are also introduced. Porosity and the Concept of Heterogeneity. The pore spaces of reservoir rock contain the fluids in petroleum reservoirs. Some of these pore spaces are isolated, while others are interconnected. Thera­ tio of the pore space in a rock sample to the total volume of the rock sample is called porosity. Two primary types of porosity can be en­ countered in a real reservoir rock: total porosity and effective poros­ ity. Total porosity includes both isolated and interconnected pore spaces. while effective porosity includes only interconnected pores. Because only interconnected pores produce tluids, we are concerned mainly with effecti ve porosity; therefore. in the remainder of this text, the term porosity is used to mean only effective porosity. Porosity in this sense is a measure of the capacity of the reservoir rock to store producible tluids in its pores. Variation ofpore volume (PV) with pore pressure can be accounted for by the pressure dependence of porosity. Porosity is dependent on pressure because of rock compressibility, which is usually assumed to be constant (generally about 10 - 6 to 10 - 7 psi - 1 ). Rock porosity at any pressure can be expressed as

. . . . . . . . . . . . . . . . . . . . . . . . . . . (2.37a)

·

.

.

.

.

. . . . . . . . . . . . . . . . . . . . . . . . (2.37b) .

.

because the oil fills the PV. Differentiating the relationship in Eq. 2.37b with respect to reservoir pressure yields dVb d Vo dVs = + ctp ctp dp '

(2.38)

From the definition of compressibility, C

- VI ddpV '

=

comes

��

=

(2.39)

- cV,

dV"

-Fluid Properties

The properties of reservoir rock, the physical properties of the fluids [such as pressure/volume/temperature (PVT) behavior]. and rock! fluid-interaction properties (such as capillary pressures and relative permeabilities) strongly influence multiphase flow in porous media. The following sections give some of the basics of these properties.

·

so ctp = - cb Vb

. . . . . . . . . . . . . . . . . . . . . . . . . . . . (2.40)

·

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . (2.41)

·

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . (2.42)

for bulk volume; dVo

dp -

_

Co V

0

for oil; and

�s

=

-

CRY, . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (2.43)

for rock solids. Substituting Eqs. 2.4 1 through 2.43 into Eq. 2.38 re­ sults in . . . . . . . . . . . . . . . . . . . . (2.44) and solving for Cb gives Vo Vs cb = co V + CR V' b b

. . . . . . . . . . . . . . . . . . . . . . . . . (2.45)

With Eq. 2.37b to substitute for \1" Eq. 2.45 can be simplified further to give

=

co rp + cR ( 1 - rp) ,

. . . . . . . . . . . . . . . . . . . . . . (2.46) .

which is . . . . . . . . . . . . . . . . . . (2.36)

(2.35)

Note that in Eq. 2.46, for a single phase, the volume Va is identical to the effective pv.

where pO reference pressure at which the porosity is rpo. The refer­ ence pressure is usually atmospheric pressure or initial reservoir pres­ sure. Eq. 2.35 reveals that porosity increases as the pressure of the fluids contained in the pore space increases. Furthermore. porosity decreases in relation to reference porosity when pore pressure de­ creases. as with pressure decline during primary production. A reservoir-rock property (such as porosity) often varies in space from one point to another or from one region to another. If a property is constant and independent of location, the reservoir rock is called homogeneous. If, however, a property varies with location, it is called heterogeneous. In reality, homogeneous reservoirs are rare, so the concept of homogeneity is generally used forideal porous media. Ide­ alization is used to simplify otherwise intractable problems to obtain analytical solutions.

Permeability and the Concept ofAnisotropy. Permeability is the capacity of a porous medium to transmit fluids through its intercon­ nected pores. This capacity is called absolute permeability or simply permeability if the medium is 100% saturated with a single liquid phase. For a gas phase, permeability is a function of pressure because of the Klinkenberg5 effect. For gases. absolute permeability is mea­ sured at infinite pressure, where the Klinkenberg effect vanishes. If two or more phases are saturating the porous medium, the reservoir capacity to transmit any phase is called the effective permeability to that phase. Relative Permeability in Sec. 2.3.3 discusses effective and relative permeabilities. Permeability varies from one point to another and, even at the same point, may depend on the flow direction. In many practical problems, it is sufficient to assume that permeability can be represented by three

=

14

BASIC APPLIED RESERVOIR SIMULATION


Substituting for Pc and kx results in

L

f My [1. 000/(980 L

q

q

o

X =O

P = Pw

Fig. 2.3-0ne-d imensional reservoir described in Example 2.3.

values (kx , ky, and kz) in three principal directions (x, y, and z) . It is often possible to assume that kH = kx = ky in the horizontal plane be­ cause in many depositional environments directional trends are not apparent. In addition, the vertical permeability, kv , is often different from the horizontal permeability, kH , because even very thin shale stringers significantly affect vertical permeability. In general, vertical permeability is lower than horizontal permeability. If kx = ky = kz , the porous medium is called isotropic; however, it is called anisotropic if the permeability shows a directional bias. Some parameters used in reservoir simulation exhibit directional dependency. A reservoir exhibits an isotropic property distribution if that property has the same value regardless of the direction in which it is measured. On the other hand. if the value varies with direction. the reservoir is anisotropic with respect to that property. Only those properties that are not volume-based can exhibit directional depen­ dency. Porosity. for example. is volume-based by definition; it uses all three dimensions. so it has zero degrees of freedom in terms of directional variation. Permeability, by contrast. has only the dimen­ sion of area, leaving one direction in which it can vary. Therefore. all possible permutations of isotropic and anisotropic and homogeneous and heterogeneous systems can exist for multidimensional cases. Homogeneity and heterogeneity and isotropy and anisotropy are each related to a single property. so these terms should always be used in reference to a specific property. For example. a reservoir can dis­ play homogeneous distribution with respect to porosity but heteroge­ neous distribution with respect to thickness. Example 2.3 Consider the following ID horizontal porous me­ dium in which steady-state flow of oil i s taking place in the positive x direction. Let the permeability of the system vary according to

1. 000/(980 + 0.04x)

kx =

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

(2.47)

L,p

where x is in feet and k is in darcies. At x = O.P = Pw. and at x = = PL. I fth e viscosity o f oil i s /-lo and the dimensions o f the porous medium, h . Lly. and (Fig. 2.3). are i n feet. obtain an expression that describes the average permeability of the porous medium. Solution. To find the average permeability of the porous medium in the x direction. kx must be integrated according to Darcy's law. Choose an element ofthe reservoir with a cross-sectional area perpen­ dicular to flow of = ht:J.y. a length of dx, and permeability of at Point x along the x direction . For I D horizontal flow. Darcy ' s law written for a differential ele­ ment reduces to

L

Ax

kx

kx Ax dp

q = - Pc -v,;-

dx·

. . . . . . . . . . . . . . . . . . . . . . . . . . . (2.48)

(0. L).

Separating the variables and integrating over the length of the po­ rous medium. results in

L

PL

f k�;x f dx

o

=

- Pcdp.

. . . . . . . . . . . . . . . . . . . . . . (2.49)

Pw

The terms q . /-lo . Ax = hLly. and pc are independent of x a n d c a n b e taken outside of the integrals . giving

%�; f t

f

PL

L

o

dx

q/-l °

= - Pc

Pw

dp.

..

.

.

.

.

.

.

.............

.

0

(2.5 )

My

or q/-l o

+

0.04x) j =

f 9801, 000 L

1 .127

+ O.04x dx =

o

f

- 1 . 1 27

r

dp

. . . .

(2 . 5 1 )

Pw dp.

. . . . . . . . . (2.52)

Pw

Integrating gives

1 . 1 27p PLI

-

1

= - 1 27 ( PL - P w) . .

It follows that

Z�; [0.980L

+

. . . . . (2.53)

Pw

. . . . . . . . . . . . . . . . . . . . . . . (2.54)

2(1O - S)L2 ] =

- 1 . 1 2 7 ( PL - Pw) ,

. . . (2.55)

resulting in

q = 1 . 1 27

[ 0.980 �(I0 - 5)L] �Ll: (

Pw

+

Z PL ) .

. . . . (2.56)

With average properties. Darcy ' s law for the system can be written

- MY PW - PL . . . . . . . . . . . . . . . . . . . . . (2.57) q = 1 . 1 27 k To L

(

)

Comparison ofEqs. 2.56 and 2.57 gives the average permeability for the porous medium.

-

k =

1, 000 980 + 0.02L"

....

.

.

...... .. .

.

.

.

.

.

.

.

....

.

(2.58)

2.3.2 Fluid Properties. Fluid properties of interest in reservoir mod­ eling include fluid compressibilities and gas-compressibility factors, solution-gas/liquid ratios, fluid densities, fluid FVF ' s, and fluid vis­ cosities. The dependence of oil. water, and gas properties on pressure at reservoir temperature will be discussed to gain insight into the role they play in reservoir modeling. In general, oil, water. and gas can be produced simultaneously from hydrocarbon reservoirs. These fluids coexist in equilibrium at reservoir pressure and temperature. The produced gas is composed of solution gas and free gas. Most of the solution gas comes from the gas dissolved in oil, and the remainder comes from the gas dissolved in water. Therefore. considering that oil and water are immiscible, the properties of the oil phase at reservoir conditions are strongly affected by the gas in solution. Likewise, the properties of water are affected (though to a much lesser extent) by the gas dissolved in water. It is also generally assumed that, for black-oil systems, neither oil nor water vaporizes in gas in any significant quantity. The presence of oil and water in black-oil systems does not af­ fect the properties of the gas phase at reservoir conditions. Types ofReservoir Fluids. Oil. gas. and water are the fluids pro­ duced from petroleum reservoirs. These fluids can be classified as in­ compressible, slightly compressible, or compressible, depending on how they behave when subjected to external pressure. An incom­ pressible fluid, as the name implies, has zero compressibility; there­ fore, it has constant density regardless of pressure. This type of fluid is an idealization for gas-free (or dead) oil and water. A slightl y com­ pressible fluid has a small but constant compressibility that usually 5 to ranges from 6 psi 1 . The dashed line in Fig. 2.4 shows that the density of a slightly compressible fluid varies linearly with pressure. U nderreservoirconditions. dead oil. undersaturated oil, and

10-

10 -

BASIC RESERVOIR-ENGINEERING CONCEPTS AND RESERVOIR-FLUID AND -ROCK PROPERTIES

-

15


Trube6 presented a graphical correlation forreduced compressibility, Cr, of gas as a function of pseudoreduced pressure, Ppr, and pseudore­ duced temperature, Tp r. based on Eq. 2.63, using the Brown et al. 7 z­ factorchart for natural gas. This correlation is useful for hand calcula­ tions, but it is not suited to computer usage. On the basis of manipulation of Eq. 2.63, Mattar et al. 8 reported the expression for

I ncompressible fluid Slightly compressible fluid Oil and its solution gas

Compressible fluid

Cr,

- - -- - - - - - - -- - - - - -- - - - - -

- - - - - - - - - - - - - - - - - - - - - - _.,

Pressu re Fig. 2.4-Density behavior of various types of flui ds as a function of pressure.

water behave as slightly compressible fluids. A compressible t1uid has a higher compressibility than a slightly compressible fluid, usual­ ly approximately 10 - 3 to \0 - 4 psi - 1 .The density of a compressible fluid increases as pressure increases but tends to level off at high pres­ sures. At reservoir pressures and temperatures, gas is a good example of a compressible fluid. In multiphase flow in petroleum reservoirs, water is treated either as incompressible or slightly compressible and natural gas is treated as compressible. Oil and its solution gas are treated as slightly com­ pressible when reservoir pressure is higher than the oil bubblepoint pressure and as compressible when reservoir pressure falls below bubblepoint pressure. Because ofthe pressure dependence of density, single-phase flow problems involving incompressible fluids lead to steady-state solutions, while those involving slightly compressible and compressible fluids lead to unsteady-state solutions. Fluid Compressibility and Gas-Compressibility Factor. Fluid compressibility is defined as the relative volumetric change of a given mass to pressure change at constant temperature. Mathematically, compressibility can be expressed as I av - V ap l T '

C, =

l ap , Pi ap I T '

=

(2.60)

As discussed previously, f1uids can be classified as incompressible I (q = O psi - ), slightly compressible ( 1 0 - 6 psi - I < CJ < 10 5 psi - I ), or compressible (q > 10 - 4 psi - I). For gas, Eq. 2.60 may be written in another form with the real-gas law,

-

pg

=

pM

zR T ' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (2.61)

Substituting Eq. 2.6 1 into Eq. 2.60 (C[ = cg when p cg

=

I

p

- 1 aazp I T ' z

=

pg) yields

.

. . . . . . . . . . . . . . . . . . . . . . . . . . . (2.62)

Example 2.4 provides the mathematical detail required to go from Eq. 2.59 to Eq. 2.62. Eq. 2.62 can also be expressed in a reduced form as Cr

where 16

1

= p pr Cr =

1 az T , � -I - -z uP,>r pr c� ppc

0.270

Ppr - z 2 Tp r

.

.

. . . . . . . . . . . . . . . . . . . . . . (2.63)

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (2.64)

[

( az/ap r)I Tp r

I

]

+ (p ,/z)( az/aP r)ITp r '

. . . . . . . (2.65)

where an analytical expression for (fJz/ (lp ,,)I Tp r was derived from the Dranchuk et al. 9 z-factor equation for natural gas. Abou-Kassem et al. 1 0 pointed out that the reduced compressibility for natural gas can be obtained from the definition of compressibility (Eq. 2.60) and that Cr can be obtained by taking the inverse of the product ( Pr)(fJPprl(l Pr)1 Tp r where both pr and (apl'''/ ap r)I Tpr are embedded in the calculation of z factors by use of equations of state (EOS's). The z, or gas-compressibility, factor is the empirical factor that ac­ counts for the deviation of a real gas from ideal-gas behavior. Fig. 2.5 shows the Standing and Katz I I z-factorchart for natural gases. At any given �m the z factor is a function of Ppr' The reduced (or pseudore­ duced) properties are (2.66) and TI'''

=

T Tpc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (2.67)

For natural gas, Ppc and Tpc are the pseudocritical pressure and tempera­ ture calculated as the molal average of the critical properties of the gas components. Dranchuk and Abou-Kasseml 2 reported correlations for Ppc and Tpc of natural gases as functions of gas gravity that are useful when gas composition is not available. For sour natural gas, these pseudocriticals must be modified as suggested by Wichert and Aziz. I 3 Several methods are available to generate the Standing and Katz z ­ factor chart with computers. 1 4 The more powerful methods use EOS's, such as those based on the Benedict-Webb-Rubin 1 5 (BWR) EOS. The BWR EOS's may be written in a reduced form as Ppr

=

t [ T,P" + Cop � + C2P� + C3P� + C4P � ( 1 + Csp n . . . . . . . . . . . . . . . . . . . . . . . . (2.68)

(2.59)

where 1 = 0, w, or g. With the definition of fluid density, P = mlV, an equivalent expression for fluid compressibility is c,

1

Cr =

where the coefficients Co, C2 through C5 are defined for both the Dran­ chuk et al.9 and Dranchuk and Abou-Kasseml 6 equations in Table 2.2. (Table 2.3 lists the values of coefficients A through A 8 and A I through I A I I for both equations.) This gas-compressibility factor can be obtained from the reduced form of the real-gas law (Eq. 2.61) as z

=

P pr -

0.270 T . P r pr

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . (2.69)

For a given �". andpp n the reduced density P , that satisfies Eq. 2.68 is first found by use of the Newton-Raphson iteration. At conver­ gence both Pr and (appr/ ap,.)1 Tr are calculated . Furthermore, z and Cr can be calculated with Eq. 2.69 and the reduced form ofEq. 2.60, re­ spectively. FORTRAN computer programs that calculate both z and Cr with the Dranchuket al. 9 and Dranchuk and Abou-Kassem 1 6 z-factor equations can be found in the literature. ]() Example 2.4. Derive the equation for reduced compressibility of a real gas, Eq. 2.63, from the basic definition of compressibility. Also find the compressibility of an ideal gas. Solution. The definition of compressibility is

c,

=

l aV - v ap l T '

(2.59) BASIC APPLIED RESERVOIR SIMULATION


1. 1

1.0

3

U"

"

...,.

1.05 1.0 1. 2 )�9�

;,.5 #+."

. 'J

';;

Y4 -l.t- � �

- ;"

� .I! :Z: 1.7

.

,

� .=i . . F

:c iii

0.6 1+ .. !+He. E t-n-r 0

��V':::' -z: 'T

:1�

�' 4'=:

-'\

.\ "

:1 'Gl

: ·I !

III QI

0

J

�S

0.7 I-t-�

-

t.1

$;1-<.

O.B

111

pressure

orln Pressure

0.9 .

.... .. 0 ... u

POA"rl"'A,

I' �

. .�

" I. j,

?

-'-, 0. 5 r

'-frr

0

h:--'-I7i0.4

,

0. 3 0.25 1.1

.

1.2

t-t.

$'�; �

. --'-

��q, ....

ti\J� ���

l r.I-! i .�t\".

.1

�.

. ':0:; ' • . ",f

.I- .

� o ·

na

1 1 10 Pseudo reduced pressure

9

7

13

12

14

15

Fig. 2.5-Standing and Katz z-factor chart for natural gas (from Ref. 1 1 ).

Dividing and multiplying the right side ofEq. gas that occupies volume V at pressure re sults in

2.59 by the mass of the

p and absolute temperature T

In Eq.

2.7 I ,

Pg = mlV is gas density at p and T. Gas density is g i ven

by the real -gas law,

(2.6 1 ) Eq.

2.6 1

can be used to obtain

=

=

� :' IT

.

...

. .

..

. .

........

. . .

. . . . . . . . . . . . (2.70)

...

.

M

RT

(z

-

(a pglap) 1 T .

p(az/ ap)IT

)

Z2

or, for 1 = g,

cg

=

I apg lT' p Pg a

.

. .

. . .

...

. .

..

. . .

. . .

...

. . . . .

(2.7 1 )

BASIC RESERVOIR-ENGINEERING CONC EPTS AND RES ERVOIR-FLUID AND -ROCK PROPERTIES

(2.72) 17


TABLE 2.2-DEFINITION OF COEFFICIENTS OF EQ. 2.68 FOR THE DRANCH U K et sl.9 AND DRANCH U K AND ABOU-KASSEM 1 6 EQUATIONS Dranchu k et al. Equation

Dranchuk and Abou-Kassem Equation

A3 A2 T, A l + T, + ry

A2 As A3 A4 T, A l + T, + ry + ry + ry

(

Coefficient

Co

)

(

( i)

� C3

(

As A7 T, A 6 + T, + ry

T, A 4 +

- As( A s )

( ��)

- A9 A7 +

C4

A7

AlO

Cs

As

Al l

ry

q

TABLE 2.3-VALUES OF COEFFICIENTS A l THROUGH A l l F O R T H E DRANCHUK e t sl.9 AND DRANCHU K A N D ABOU-KASSEM 1 6 EQUATIONS

Coefficient Al A3

As

0

Dranchuk et al.

Dranchuk and Abou-Kassem

Equation

Equation 0.3265

0 . 3 1 506237

A2

- 1 .0467099

- 1 .070

- 0 .57832729

- 0. 5339

0 . 5353077 1

0 . 0 1 569

- 0 . 6 1 232032

- 0.05 1 65

As

0 . 1 04888 1 3

0.5475

A7

0 . 6 8 1 5700 1

- 0 .7361

As

0. 68446549

0 . 1 844

Ag

0 . 1 056

Al O

0.6 1 34

Al l

0 . 72 1 0

a: 0

I I I I I I I I I I I I I I I I I I

CO

C 0 ;; ::l

'0

en P

i

:

Pressu re (2.73)

iJz I -I --Cg = -PpcPpr - z Ppc iJPpr ITpr or cg Ppc = I - ZI iJz ITpr' iJPpr Ppr

(2.74)

. . . . . . . . . . . . . . . . . . . . (2.75) •

From Eq. 2.64, (2.64)

I iJz

comes C r = - - z " - ITpr ' Ppr

(2.63)

uPpr

which is the desired definition for Cr. For an ideal gas (gas at low pressures), z =

O.

I and (2.76)

Substituting these into Eq. 2.63 gives

18

:;

CJ I

From the definition of pseudoreduced pressure, ppr = p/ppc and P = ppc pp r may be substituted into Eq. 2.73 to obtain

C r = -L Ppr

(2.77)

b;

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (2.78)

or cg =

Undersaturated 011 Region

Fig. 2.6-Solution-gasloil ratio.

I I iJz cg = p - Z iJp IT '

iJz iJppr ITpr =

Saturated Oil Region

en

Substituting Eq. 2.72 into Eq. 2.7 1 and simplifying gives

I

)

)

therefore, the compressibility of an ideal gas is equal to the reciprocal of the pressure. Solution-Gas/Liquid Ratio. At reservoir temperature and pressure, the thermodynamic equilibrium of a gas/liquid system is achieved by the transfer of mass between the two phases. In a black -oil system, this mass transfer can be described by the solution-gas/liquid ratio. The solution­ gas/liquid ratio is the volume ofgas (at standard conditions) that must dis­ solve into a unit volume of liquid (at standard conditions) for the liquid and gas system to reach equilibrium at reservoir temperature and pres­ sure. Equilibrium in this context means that the liquid is saturated with gas. In black-oil reservoirs there are two solution-gaslliquid ratios: solu­ tion-gas/oilratio and solution-gas/water ratio. The solution-gaslwaterra­ tio can, for all practical purposes, be assumed to be zero; therefore, this section is devoted to the solution-gasloil ratio. Fig. 2.6 shows the pressure dependence of the solution-gas/oil ra­ tio, Rs , for a constant-bubblepoint-pressure reservoir at reservoirtem­ perature. This is primary depletion, when the reservoir is initially un­ dersaturated and the pressure decreases everywhere during the producing life ofthe reservoir. As pressure decreases from initial pres­ sure, Pi , no gas evolves from solution and Rs remains constant until the pressure reaches the bubblepoint pressure,Pb . The reservoir is un­ dersaturated when its pressure is greater than the Pb (Pb � Pi). At P = Pb, the first gas bubble evolves from solution. As the pressure drops below P b , gas evol ves from solution and a free-gas phase devel­ ops. In this pressure region (P � Pb), the reservoir is called saturated; both the oil and gas phases coexist in thermodynamic equilibrium.

<p

BASIC APPLIED RESERVOIR SIMULATION


o

:; a:

-

B, "

F ," ,. ,

"

G .

A

E

o

Us

-

m

-

CJ I C o .. ::l

15

en

Pressure

Pressure

Fig. 2.7-Production and injection operations leading to variable bubblepoint pressures In thick reservoirs. (Redrawn from Ref. 1 7.)

Several practical instances exist when treatment of a black oil as a constant-bubblepoint fluid is not real istic. I? One example is a reser­ voir with a large oil column where, because of gravity effects, the bub­ blepoint pressure of oil varies with depth. Another example is an un­ dersaturated reservoir undergoing gas i njection, where different regions of the reservoir may have different bubblepoint pressures be­ cause of the different levels of available gas. Primary depletion fol­ lowed by a pressure-maintenance scheme that uses water (or gas) in­ jection may also result in different bubblepoints in different parts of the reservoir. Consider an undersaturated reservoir, represented by Point A in Fig. 2.7. During primary depletion, the pressure declines below the original bubblepoint pressure (Point B) to Point C. Because of gas percolation (vertical gas migration), the bottom portion of the reservoir will have less free gas available to it than the upper portion.

If water i s injected at Point C, the reservoir pressure increases and gas goes into solution, giving new bubblepoints (Points D and F, respec­ tively) for the lower and upper portions of the reservoir. Further re­ pressurization may lead to the conditions indicated by Points E and G for the lower and upper portions of reservoir. In contrast, if gas i s injected a t Point C, abundant g a s i s available t o many parts of the res­ ervoir, resulting in areas of the reservoir with bubblepoint pressures falling on the dashed l i ne in Fig. 2 . 7 . The variable-bubblepoint for­ mulation can be used in all black-oi l situations and, consequently, is the most common formulation i n commercial reservoir simulators. FVR A fixed mass of a reservoir fluid occupies a different volume at different reservoi r pressures. FVF's are used to convert volumes at reservoi r pressure and temperature to their equivalent volumes at standard conditions. These factors take into consideration volume changes caused by fluid compressibility for the water and gas phases and those caused by fluid compressibility and mass transfer of solu­ tion gas for the oil phase. The phase FVF i s the ratio of the volume that the phase occupies at reservoir pressure and temperature to that at standard conditions,

B = .Y. Vsc '

(2.79)

For a single phase (water, gas, or dead oil) Eq. 2.79 may be written i n terms of densities.

B I = PPiscI '

(2.80)

where 1 = 0, w, or g. For slightly compressible fluids, such as water

and gas-free (dead) oil, Eq. 2.60 can be integrated and the effect of

Fig. 2 .8-Water and gas-free o i l

FVF's.

temperature can be incorporated. The resulting ratio in Eq . 2 . 80 may be approximated by

BI = B;/[

I +

c

AP -

- c T/ ( T - Tsc) ] ,

.

pO)] = 1 / [ 1 CI(P - PscJ +

.

.

C

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

(2.8 1 )

where I = o or w, and where Tl = coefficient of thermal expansion of the fluid. Fig. 2.8 shows this relationship. For pressures greater than the bubblepoint pressure, the FVF of an undersaturated oil can be ob­ tained with Eq. 2.59 in the vicinity of the bubblepoint pressure and approximating the deri vative by first-order Taylor series expansion (see Example 3 . 1 7) . The resulting expression i s

Bo = Bob [ - Co(p - P b)]. . . . . . . . . . . . . . . ( 2 . 8 2 ) where P Pb. Comparing Eqs. 2 . 8 1 and 2.82 indicates a disparity of the i sothermal definition of FVE Eq. 2.82 is developed assuming a I

.

.

.

.

.

.

.

>

linear relationship above bubblepoint pressure, while Eq. 2 . 8 1 repre­ sents a nonl inear relationship for i sothermal condi tions. Both approx­ i mations have similar degree of accuracy. For the gas phase, the real-gas law expressed by Eq 2 . 6 1 can be ap­ plied at reservoir conditions and at standard conditions, and com­ bined with Eq . 2.80 to give the expression for Bg , .

Bg = aP('gPscg = aPsct·T

!iC

Tp -. z

.

. .

.

.

. . . .

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

(2.83)

shows the gas-phase FVF for a typical gas . Eqs. 2 . 8 1 and 2 . 8 3 (and Figs. 2 . 8 and 2.9), respecti vely, express the water and gas FVF' s for three-phase-flow problems. The oil FVF for a crude oil must be treated differently because of the mass transfer be­ tween the gas and oil phases (Fig. 2.10). The oil FVF increases as pressure decreases in the undersaturated region as a result of > the expansion of the oil and its solution gas. As pressure decreases in the saturated region < the oil phase shrinks because of gas evolution, causing a decrease in the oil FVE In this region, the shrink­ age of the oil phase i s a result of gas evolution dominating oil expan­ sion because of pressure drop. For a variable-bubblepoint formulation, the oil FVF follows the saturated curve (solid line) in Fig. 2.11 when the oil pressure i s below its bubblepoint pressure . For pressures greater than the bubblepoint pressure, the FVF follows the undersaturated curve (dashed line), which begins at the bubblepoint pressure. Thi s bubblepoint presst:re i s not static but may vary from location to location or throughout ti me in the same location in the reservoir.

Fig. 2.9

( p Pb ) ,

BASIC RESERVOIR-ENGINEERING CONCEPTS AND RESERVOIR-FLUID AND -ROCK PROPERTIES

( p Pb )

19


Bob

P ressu re

Pressu re

Fig. 2.9-Gas-phase FVF.

Fig. 2.1 G-Oil FVF for constant-bubblepoint-pressure oil. (because �c = I). The units of

Example 2.5. Derive the expression for gas FVF (Eq. 2.83).

Solution. The FVF of any gas or liquid is defined by Eq. 2.79, so

V lp ,T -= V ; B = -V I Psc, Tsc Vsc or, for a gas where the units of

(2.84)

Bg

are RB/scf, ( 2.8 5)

or, multiplying and dividing by the mass of the fluid,

Bg

are RB/scf.

Fluid Density. The pressure dependence of density of black-oil­ reservoir fluids is shown in Fig. 2.4. For single-phase flow, the densi­ ty of water, gas, and gas-free oil can be obtained from Eq. 2.80, so

PI

=

P sc �l ,

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (2.9 1 )

where I = 0 , w, or g . I f BI i s estimated with Eq. 2 . 8 1 for water and gas­ free oil, then the density of these two liquid phases can be ex­ pressed as PI

=

where Pg

]

[

T PIS" 1 + c/ ( p - Pse) - cT/ ( - TsJ , . . . . . . . . . (2.92 )

1 = 0 or w. The real-gas law gives the density of gas. =

pM

(2.6 1 )

zRT

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (2. 86)

where m = mass of gas occupying Vg or Vg sc . Gas density at p and T and at psc and 'Fsc can be obtained by applying the real-gas law at two

conditions,

P gsc

M

P se RT sc

=

and Pg

Zsc

=

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (2.87)

pM z RT '

11 1 't "1 "1

'I I'

(2.6 1 )

Substituting these two equations into Eq. 2.86 results in (2.88)

or

Bg =

or B g 20

%spc TTsc zZsc' (0

PsI' T Z -. =p T ac sc

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . (2.89)

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (2.90)

1 1 ,I I,

Pbl l

1 1 1 1 1 I

Pb2 1

,

1

Pb3

1 1 1

P ressu re Fig. 2.1 1 -Oil FVF for variable-bubblepoint-pressure oil. BASIC APPLIED RESERVOIR SIMULATION


Eq. 2 . 9 1 gives the water-phase density for multiphase flow in oil res­

ervoirs by use of the appropriate FVF or with Eq. 2.92. Eq. 2.6 1 gives the gas-phase density. If ideal mixing of oil and solution gas is as­ sumed, then the oil-phase density (stock-tank oil plus the solution gas

dissolved in it) is estimated by

P o = (P ose + cLP gse Rs) /Boo

. . . . . . . . . . . . . . . . . . . .

(2.93)

P o = P Ob[ 1 + co (p - Pb)] ' . . . . . . . . . . . . . . . . . . . . . (2.94) where P Pb and P ob is estimated with Eq. 2.93 at the bubblepoint­ pressure conditions, Co = compressibility of stock-tank oil and its solution gas at pb , Bo = input from PVT-data analysis when p ;§! Pb , >

=a

and Uc

volumetric conversion factor defined in Table 2. 1 .

Example 2.6. Derive an expression for the density of slightly com­

pressible fluids at reservoir pressure and temperature (Eq. 2.92). Then use the resulting expression to derive Eq. 2.8 1 for the FVE

Solution. From the definition of fluid compressibility,

CI = Pi api ap I T, 1=0

PI = p ;[ 1 + cl (p - pO )]

P; P T Pise PIIPse.Tse· Pe P I P IIPsc' T ' temperature change from T to Ts o n p i b y considering the fluid-ex­ e pansion coefficient

=

c T/

1 a VI 1 api VI a T lpo = - Pi a T lpo ,

CI

(Tse , T)

api a T = - Pi'

. . . . . . . . . . . . . . . . . . . . . . . . . . . . (2. 1 04a)

(2.60) . . . . . . . . . . . . . . . . . . . . .

api . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (2.95a)

= Pi

JpO pOJ b/' =

. . . . . . . . . . . . . . . . . . . . . . . . .

(2.95b)

and

P ; = Pisc exp[ - cT/ ( T - T.e)],

where I = 0 or w. Again, the exponential term in Eq. 2 . 1 04c may be approximated by the first two terms of Taylor 's series expansion (because en is small) to give

P ; = P l lp•e .T PISC [ 1 - C TI (T - Tsc)] ,

CI (p - pO) = 10ge �;) .

. . . . . . . . . . . . . . . . . . . . . . . (2.95c)

Taking the exponential of both sides ofEq. 2.95c and rearranging yields

PI = P t exp[cA p - pO )] ,

. . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . .

B,

_

(2.97)

1=0 or w. With the defmition of

�I = Bl [ 0

I

or

]

pO ) ,

exp c i (p - pO)

]

B[ given in Eq. 2.80,

. . . . . . . . . . . . . . . . . . . . . . . (2.98a)

B I = B ;/ exp[ cl ( P - pO) ] ,

. . . . . . . . . . . . . . . . . . .

(2.98b)

(where 1= o or w), which is one of the forms for the FVF for a sJightly compressible fluid. The exponential term, exp[q(p - pO)], can be expanded with Tay­

lor 's series expansion (see Example 3 . 1 5) about pO as

[

exp cl (p - pO

)] = 1 + ci (p - pO) + i! cf (p

_

pO)

2

+

. . .

. . . . . . . . . . . . . . . . . . . .

(2.99)

Considering only the first two terms of this expansion,

[

exp c l (p - pO (where

)]

=

1

+

1 = 0 or w) because q

cl ( p

_

pO),

is small ( 1 0 - 5 to 1 0 - 6 psi-I).

(2. 1 05)

where 1 = 0 or w. Combining Eqs. 2. 1 0 1 and 2. 1 05 gives

PI = PISC[ 1 + cl (p - Pse)][ 1 - cT/ (T - Tse)]

(2.96)

where 1=0 or w. Eq. 2.96 is one of the forms of the desired ex­ pression. To obtain an expression for divide Eq . 2.96 by = so that

Pise PII Pse.Tse P; Pi.f!.l...se = PI.c exp[ cI ( p

(2. 1 04b)

. . . . . . . . . . . . . . . (2. 1 04c)

=

where

(2. 1 03)

1= 0

or w for slightly compressible fluids and q = constant

ap

. . . . . . . . . . . . . . .

or w and crt = both constant in the temperature range and is small. Integrating Eq. 2. 1 03 by separation of variables yields

where

voir temperature by separation of variables as

and

(2. 1 0 1 )

where 1=0 or w. The last step in this example involves expressing = IIP0. in terms 0f = 0 First, let pO = s , then = then include the effect of

over the pressure range ofinterest. Eq. 2.60 can be integrated at reser­

c l ap

. . . . . . . . . . . . . . . . . . . . . .

(2. 1 02)

c T/

1

where

Substituting Eq. 2. 1 00 into Eqs . 2.96 and 2.98b, one obtains other forms of the sought expression,

(2. 1 00)

- CICTI (P - Psc)(T - Tsc)] .

. . . . . . . . . . . . . . . . . .

(2. 1 06)

The last term in Eq. 2. 1 06 is small because of the product of q and crt . so for engineering purposes it can be neglected; therefore,

PI = Plse[ 1 + CI ( P - Pse) - cT/ (T - Tse)] ,

. . . . . . . .

(2.92)

. . . . . . . . . .

(2.8 1 )

where 1 = 0 or w. Eq. 2.92 can be arranged to give

BI = PiPIse = where

[ + CI (P - P.e) -

1/ 1

cT/ ( T

- Tse)],

1 = 0 or w.

Fluid l-Bcosity. Fluid viscosity is a measure of the ease with which the fluid flows as a result of an applied pressure gradient. For a dilute (gas­ eous) fluid, the molecules far apart and offer low resistance to flow

are

are

as a consquence of their random motions. In contrast, a dense fluid offers high resistance to flow because the fluid molecules close to each other and their random motions retard flow. Fluid viscosity is a function of both pressure and temperature; however, we only interested in the pressure dependence of viscosity in isothermal reservoirs. One can analyze the variation of water and gas viscosities with pressure by considering the effect ofpressure on their densities. Water

BASIC RESERVOIR-ENGINEERING CONCEPTS AND RESERVOIR-FLUID AND -ROCK PROPERTIES

are

21


Saturated 011 Region

Undersaturated 011 Region

Water, gas-free 011

� fI) o u fI)

0-

-

>

(5

Gas

Pressure

Pressure Fig. 2.1 2-Viscosityofslightlycompressiblefluidsand gas. i s slightly compressible; therefore, as pressure increases, water vis­ cosity increases slightly or remains almost constant (see Fig. 2.12) . Gas is a compressible fluid, and its viscosity is low at low pressures. Gas viscosity increases as pressure i ncreases but tends to level off at high pressures (Fig. 2. 1 2) because gas under high pressure begins to behave as if it i s a liquid. The pressure/vi scosity relationship for gas-free (dead) oil is analo­ gous to that of water, whereas that of the oil phase in a gas/oil system must account for mass transfer

(Fig. 2.13).

Fig.

2. 1 3

shows the vis­

cosity behavior, which can be explained by considering the effect of pressure on oil-phase density and solution-gas/oil ratio on oil-phase dilution. In the undersaturated oil region (p > Pb ) , oil dilution remains unchanged because Rs i s constant (Fig. 2 .6), and only the oil-compo­

nent density decreases as pressure decreases from Pi to Pb . As a result,

the oil-phase viscosity i n this region decreases as pressure decreases . I n the saturated o i l region (p

� Pb ) , both oil-phase dilution and density

change in response to pressure changes . As pressure decreases, gas evolves from the oil phase, leaving it less diluted by gas. On the other hand, the oil component and the associated solution gas expand as pressure drops. The effect of gas l iberation on vi scosity dominates the effect of oil expansion; therefore, the oil phase becomes more viscous

Fig. 2.1 3-Viscosity of constant-bubblepoint-pressure oil. fluid saturation, St , is unity. For two-phase flow of oil and water, the oil

saturation, So , is the fraction of void space occupied by the oil phase, and

the water saturation, s.", is the remaining fraction that is occupied by the water phase. These two saturations are interdependent; that is,

So + S IV = 1.

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (2. 1 08)

The water saturation at which water becomes immobile is called the irre­ ducible water saturation, Siw. During water displacement, the oil satura­

tion at which oil becomes immobile is called the residual oil saturation (ROS) to water, Sony' The value s.,' max =

1

-

SOM is the maximum water

saturation that can be achieved during water displacement.

For two-phase flow of oil and gas there are similar definitions for

So ; gas saturation, Sg ; critical gas saturation, Sgc ; and ROS to gas, Sorg . In general , the ROS in an oil/gas system, Sorg , is not equal to the ROS in oil/water system, SOM ' Again, So + Sg = 1.

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (2. 1 09)

In two-phase systems, the wetting phase adheres to the pore walls and occupies the fine pores. The nonwetting phase occupies the cen­ ter of the pores.

as the reservoir pressure drops . For variable-bubblepoint formulations, the oil-phase viscosity fol­ lows the solid line in Fig. 2.14 as long as the oil is saturated with gas. Once the oil becomes undersaturated, the oil-phase viscosity follows one of the dashed lines, depending on its corresponding bubblepoint pressure. Mathematically,

. . . . . . . . . . . . . . . . . . (2. 1 07) for P

> Pb ,

where .uob = oil viscosity at Pb and C,u = fractional change

of viscosity per unit change of pressure . The value of C,u in Eq. may either be constant ( i . e . , the dashed lines in Fig.

2. 1 07 2. 1 4 are parallel)

or a function of the solution-gas/oil ratio. The behavior of vi scosity is related to that of density because densi­ ty is a measure of the mean free path of liquid and gas molecules and,

°in

o u fI)

:;

0-

o

consequently, a measure of random molecular motions and interac­ tions that affect viscosity.

2.3.3 Fluid/Rock Properties. This section presents basic definitions of

Pb3 1

fluid saturations encountered in multiphase flow and introduces the con­ cepts of capillary pressure and relative permeability, as well as the most widely used relative permeability models in reservoir simulation.

Fluid Saturation.

Fluid saturation of a particular fluid is the fraction

of the pore space that is occupied by that fluid. For single-phase flow,

22

Pressu re Fig. 2.1 4-Viscosity of variable-bubblepoint-pressure oil.

B ASIC APPLIED RESERVOIR SIMULATION


and dividing through by Vb and using Eq. 2.1 12 gives cb = cp r/> + cR (1 - r/» . . . . . . . . . . . . . . . . . . . . . . . . (2. 1 16) This is the effective compressibility ofpores saturated with liquid (oil and water) and is also the effective compressibility of the system; that is, cpe = CLI! = cp r/> + cR (1 - r/» . . . . . . . . . . . . . . . . . . (2. 1 17) We now have . . . . . . . . . . . . . . . . . . . . . . . . . . . . (2.1 18a) So = �po, . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (2. 1 1 8b) and S w = �pw. (2. 1 1 8c) Differentiating Eq. 2. 1 1 8a with respect to pressure gives dVp dVo dVw dP = dP + ctp. . . . . . . . . . . . . . . . . . . . . . . . . . . (2.1 19) Using the definition of compressibility gives dVp = - cpVp, . . . . . . . . . . . . . . . . . . . . . . . . . . . . (2.1 14b) dp •

Imbibition

O �------���� o

S iw

Wate r Satu ratio n Fig. 2.1 5-Capillary pressure i n oiliwater system (water wet).

.

.

.

.

.

. . . . . . . . . . . . . . . . . . . . . . . . . . . . (2. 120a) For three-phase flow of oil, water, and gas, the sum of oil and water saturations is frequently referred to as liquid saturation, SL . The three saturations are related through the constraint equation dVIV (2. 120b) So + Sw + Sg = 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . (2. 1 10) and dp = - cwVw• In three-phase systems, the wetting phase adheres to the walls of the Combining Eqs. 2. 1 19, 2.1 14b, and 2. 120 results in solid rock and fills the fine pores, the nonwetting phase occupies the Vo + cw V Vw centeroflarge pores, and the remaining phase fills the space left unoc­ cp = co V p p cupied by the other two phases. (2. 121) Example 2. 7. For a two-phase oil/water system, show that the ef­ Substituting Eq. 2.121 into Eq. 2.1 17 yields fective liquid compressibility is given by . . . . . . . . . . . . (2. 1 1 1) CLI! = r/> ( co So + CW S IV ) + cR (1 - r/» , . . . . . . . . . . . . (2. 1 1 1) and how the effective oil compressibility in a single-phase oil reser­ which is the desired relationship, and voir can be derived from Eq. 2. 1 1 1 . (2. 122) Solution. The bulk volume is the PV plus the rock-solids volume, can be derived from Eq. 2. 1 1 1 . Vb = Vp + V,. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (2.37a) For two-phase oil and water, So + S w = 1 , and for single-phase oil, S w = 0 and So = 1. In this case, Eq. 2. 1 1 1 reduces to We also have CLI! = Coe = r/>[co (1) + co/a)] + cR (1 - r/» r/> = Vp Vb' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (2. 1 12) (2. 123) As the pore pressure varies, both Vp and Vs vary so that dVb = dVp + dV, . . . . . . . . . . . . . . . . . . . . . . . . . . . (2.1 13) Capillary Pressure. Capillary pressure exists whenever pores (cap­ dp- dP dp ' illaries) are saturated with two or more phases. In a two-phase system, Using the definition of compressibility, we have capillary pressure is, by definition, the pressure of the nonwetting phase minus the pressure of the wetting phase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (2. 1 14a) . . . . . . . . . . . . . . . . . . . . . (2.124) Pea w = P o - P w = f(S w ) for a water-wet system, and . . . . . . . . . . . . . . . . . . . . . . . . . . . . (2. 1 14b) . . . . . . . . . . . . . . . . . . . . . (2. 125) for a two-phase oil and gas system. 14c) 1 (2. . . . . . . . . . . . . Capillary pressure is a function of saturation and saturation history and dV, C R Y = - CR (Vb - Vp). = dp (that is, drainage or imbibition) for a given reservoir rock and fluids at a constant temperature and composition. I S Fig. 2.15 shows the Substituting these three relationships into Eq. 2. 113 yields functional dependence of Pcow on water saturation and saturation his­ - cbVb = - cpVp - CR(Vb - Vp), . . . . . . . . . . . . . . (2.1 15) tory. The wetting-phase saturation at which the wetting phase (typi•

'

BASIC RESERVOIR-ENGINEERING CONCEPTS AND RESERVOIR-FLUID AND ·ROCK PROPERTIES

23


conditions, the capillary pressure data are used to evaluate initial ver­ tical saturation distribution in a reservoir. Qualitatively, the capillary pressure curves indicate the degree of rock wettability, the nature of the pore-size distribution (uniform or nonuniform, large or small pores), and the connate-water saturation. Relative Permeability. Originally, Darcy's law was derived for single-phase flow where the permeability of the porous medium to the fluid is the absolute permeability of the medium. When two or more fluids flow simultaneously through the porous medium, Darcy ' s law can be modified to calculate the flow rate of each phase. The necessary modifications include the use of effective phase permeability (instead of absolute permeability), phase potential (which includes the effects of phase density and capillary pressure), and phase viscosity. With these modifications, the flow rates of oil and water in a two-phase flow system can be written as

o CI o.U

I mbibition

o �__----------------..�--.. 1 - Sorg 1 o Gas Saturation Fig. 2.1 6-Capillary pressure In oil/gas system (oil wet).

cally water) can no longer be displaced by an applied pressure gradi­ ent during drainage is Siw ' The nonwetting-phase saturation at which the nonwetting phase (typically oil) can no longer be displaced by an applied pressure gradient during imbibition is SOIW' Siw and SOIW are congruent to the endpoint saturations of the two-phase oiVwaterrela­ tive permeability curves. Fig. 2.16 shows the dependence of Pcgo on gas saturation and satura­ tion history. In this case, oil is always the wetting phase and gas is always the nonwetting phase. Here, the irreducible wetting-phase saturation is Sorg and the irreducible nonwetting-phase saturation is Sgc . Again, the endpoint saturations of capillary pressure curve are congruent with the endpoint saturations of the gaS/oil relative permeability curves. For a three-phase oil, water, and gas system, Pcow and Pcgo are functions of both Sw and Sg ' respectively; however, Leverett and Lewis l 9 found some justification for using Pcow and Pcgo derived from two-phase systems in three-phase flow problems. In practice, obtaining a high degree of accuracy when evaluating the change in saturation with depth is often impossible. Under these

1

krocw

and

Water Satu ration Fig. 2.1 7-Relative permeabllitles for an oiliwater system (im­ bibition curves).

. . . . . . . . . . . . . . . . . . . . . . (2. 1 26)

dx

= -

,

. . . . . . . . . . . . . . . . . . . . (2. 1 27)

where the effective permeabilities, kox and kwx, are saturation dependent. The effective permeability to oil, for example, can be expressed as

kox kx(�:) kx krow, k kwx kx krw. qox c kx Ax kIlroow dello qwx P kx Ax Ilkrww dellw =

=

. . . . . . . . . . . . . . . . . . . . . . (2. 1 28)

where kx = absolute permeability of the porous medium in the x­ direction and row = relative permeability to oil. Similarly, for the wa­ ter phase, =

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (2. 1 29)

Substituting Eqs. 2. 1 28 and 2. 1 29 into Eqs. 2. 1 26 and 2. 1 27 results in _

=

P

= -

an d

dx

c

dx ·

. . . . . . . . . . . . . . . . . . . . (2. 1 30)

. . . . . . . . . . . . . . . . . . (2. 1 3 1 )

Similarly, the flow rates of oil and gas i n a two-phase flow system can be expressed

qox

=

1

I I

o �__�..________�____� o 1 - Sorw 1

24

kox Ax dello kwx Ax dell; qwx Pc� - Pt· -;:;;;-

q ox =

o

1

_

Pc

kxAx kIlorog dello dx

. . . . . . . . . . . . . . . . . . . . (2. 1 32)

1 - Sorg

o Gas Satu ration

Fig. 2.1 8-Relative permeabllities for an Oil/gas system (drain· age curves). BASIC APPLIED RESERVOIR SIMULATION


1

k rocw

1

� :is

liquid Satu ration

1

(

S

S iw + or

) 0

CD CI)

:0

E ..

CD CI)

E ..

CD D. CD >

CI) > ;: CD

;:as

"i a:

"i a:

0

0

S iw

Water Satu ration

Swmax

1

o

Sgma x

Sgc

1

Gas Saturation

Fig. 2.1 9-Oiliwater relative permeability.

Fig. 2.20-0il/gas relative permeability.

and qgx = - p kx ,

A

dellg

krg x # g dX'

. . . . . . . . . . . . . . . . . . . (2. 133) Figs. 2.17 and 2.18 show the relative permeabilities k,olV and krw as functions of Sw for an oil/water system and krog and k,g as functions of Sg for an oil/gas system, respectively. Note that the relative perme­ ability of a phase falls between zero and one when the base permeabil­ ity is the absolute permeability, and that the individual sums of krow and k",. at any S.V (and krog and krg at any Sg) are always less than or equal to one. This latter effect is caused by the interfacial tension be­ tween the two resident fluids. In summary, for multiphase flow in porous media, the flow rates of the various phases are given by k #k""11' delldx... ' . . . . . . . . . . . . . . . . . . . . (2. 134) qll'x = R - Pc

x

A

X

. . . . . . . . . . . . . . . . . . . . (2. 135) . . . . . . . . . . . . . . . . . . . (2. 136) where kru., krg , and kro relative permeabilities to water, gas, and oil in a three-phase system, respectively. (Note thatkro in Eq. 2.136 is the three-phase relative permeability. This quantity is dependent on Sw, Sg , krow' and krog , and is discussed in detail in Sec. 2.3.5, Three-Phase Relative Permeability Models.) 2.3.4 1\vo-Phase Relative Permeability Models. Two-phase relative permeability data generally obtained from laboratory measurements on suitable cores. In some cases these data may be missing, and reason­ able approximations necessary. These approximations called models when they available in an algebraic form. This section pres­ ents two models that often used in reservoir simulation. Corey 's20Two-Phase Model. Corey's two-phase model is applica­ ble for the drainage process in consolidated rocks. The normalized wetting-phase saturation is defined as (2. 137) Swn = SIII' - S.S ill' ' where Sw and S;w = saturation and irreducible saturation of the wet­ ting phase, respectively. The relative permeability of the wetting phase is approximated by . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (2. 138) =

are

are

-

IW

are

are

are

while the relative permeability of the nonwetting phase is approxi­ mated by krnw = (1 - S Wli( 1 - S�" J . . . . . . . . . . . . . . . . . . (2. 139) Naar and Henderson 's21 Two-Phase Model. The Naar-Hender­ son model is statistically derived for oil/water systems for the imbibi­ tion process. Both oil and water relative permeabilities are approxi­ mated as functions of Swn . S = SIII' - SiSilll"l' (2.140) The water-phase relative permeability is (2. 141) while the oil-phase relative permeability is approximated by 3/2 [ kroll' - (1 - 2S wn ) 2 - (1 - 2S wlI ) 1 /2 ] . . . . " (2. 142) Examination of Eq. 2. 142 reveals that krolV = 0 for all values of Swn � 0. 5 . 2.3.5 Three-Phase Relative Permeability Models. The functional dependence of three-phase relative permeabilities can be approxi­ mated by22.23 km· = f(SII') , . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (2.143) krg = � Sg ) , . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (2. 144) and kro = � SII' , Sg ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (2. 145) The assumptions in Eqs. 2. 143 through 2. 145 are that water is the wetting phase, gas is the nonwetting phase, and oil is the intermediate wetting phase in a three-phase system. Therefore, krw = f(S.v) repre­ sents the relative permeability of the wetting phase (obtained from measured two-phase data or a two-phase relative permeability mod­ el), and krg = f(Sg) represents the relative permeability of the nonwet­ ting phase (also obtained from two-phase data or model). In practice, the form of the function f(Sw, Sg) in Eq. 2. 145 is rarely known. It is possible, however, to estimate kro with two sets of two­ phase relative permeability data (oil/water system and oil/gas system in the presence ofirreducible water). The function krow = f(S",) in Fig. 2.19 can be thought of as the relative permeability of the nonwetting phase (oil and gas), while the function krog = f(Sg) in Fig. 2.20 can be 11'11

-

_

BASIC RESERVOIR-ENGINEERING CONCEPTS AND RESERVOIR-FLUID AND -ROCK PROPERTIES

25


thought of as that of the wetting phase (oil and water). With this ideal­ ization, the point on the saturation axis in Fig. 2. 19 where krow = 0 de­ notes the maximum water saturation rather than ROS because a fur­ therdecrease in oil saturation below S o rw = 1 - Swmax is possible by increasing the gas saturation. Experimental evidence shows, howev­ er, that ROS in a three-phase system never reaches zero. The following sections present the three most commonly used models to predict three-phase relative permeabilities. Naar, Henderson, and Wygal 's21,24 Three-Phase Model. The rel­ ative permeabilities of individual reservoir phases are expressed as krw

( � -;iW ) 4, w

=

.

.

. . . . . . . . . . . . . . . . . . . . . (2. 146) .

'

S� ( 1 - Sg + 2S w - 3 Siw)

kro =

and krg

.

- Iw

( l - S ,w )

4

S�(2 - S g - 2 S ,w )

=

(1

-

Si...)

4

'

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

(2. 147)

.

.

.

.

.

.

.

.

.

.

(2. 148)

Because this model does not incorporate SOl' or Sgc , the following cut0ffs must be imposed on the model predictions (Egs. 2. 147 and 2. 148):

l'

krg

(2. 150)

0

for Sg � Sgc .

Stone 's 25 Three-Phase Model l.

Stone's first three-phase model uses two sets of two-phase relative permeability data (Figs. 2. 19 and 2.20) and the knowledge of SOl' in a three-phase system to approxi­ mate f(.S"" Sg ) in Eg. 2. 145. 1 7 In other words, this model is only con­ cerned with the prediction ofthe relative permeability to the oil phase. Normalized saturations are defined as S WIl

=

S Oil

=

S", - S i... 1 - S . - S or '

+ krn.) (krog /krocw + krg) -

(k,'W + krg ),

. . . . . . . . . . . . . . . . . . . (2. 158)

where kro � 0, krow and krw are obtained at .5;". by use oftwo-phase oil/wa­ ter relative permeability data (Fig. 2. 19), and krog and krg are obtained at Sg by use of two-phase oil/gas relative permeability data in the presence of irreducible water (Fig. 2.20). Again, Eq. 2. 157 gives krocw. Both Stone's Models 1 and 2 reduce to the two-phase oil and water relative permeability data at Sg = 0 and to the two-phase oil and gas relative permeability data at Sw = Siw ' Example 2.S. Show that Stone's Model l reduces to the two-phase relative permeability data at Sg = 0 and Sw = Siw . Solution. At S = 0, S n = 0, and kro = krocw , Eq. 2. 153 with g g g Sgn = 0 gives

SOil + Swn

or S Oil

=

1

(2. 159)

1 - S wn.

=

(2. 160)

Combining Eqs. 2. 155 and 2. 160 gives (2. 16 1)

So - Sor

for all values of s",. Substituting Sgn = 0 and krog = krocw into Eq. 2. 156 yields 13 = krocw/krocw = 1 = 1 . g 1 1 -0

(2. 162)

Substituting Eqs. 2. 16 1 and 2. 162 into Eq. 2. 154 results in kro k rocw

=

Son

( l )

kro' krocw O ) , on

..... ....... ... .

.

.

.

(2. 1 63)

which simplifies to (2. 164) for all values of .5;".. At Sw = Siw ,

. . . . . . . . . . . . . . . . . . . . . . . (2. 152)

1 - S wn - S on.

. . . . . . . . . (2. 153)

Then,

S wn

=

0

and krow

=

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (2. 165a) krocw .

(2. 1 65b)

Eq. 2. 153 and Swn = 0 gives (2. 166) Combining Egs. 2. 155 and 2. 165 yields

kro -kroCl\.-'

=

S 13 13g 011

W

(2. 154)

'

w here 13 w - krow/ krocw 1 - Swn ' =

k og/k cw ; - ;gn ,

.

. . . . . . . . . . . . . . . . . . . . . . . . (2. 155)

13 = krocwlkrocw w 1 -0

1.

(2. 167)

Combining Egs. 2 . 156 and 2. 166 yields

. . . . . . . . . . . . . . . . . . . . . . . . . . . (2. 156)

krow = f(Sw) is obtained from two-phase oil/water data (Fig. 2. 19), kro = f ( S ) is obtained from two-phase oil/gas data in the presence of g g

irreducible water (Fig. 2.20), and

. . . . . . . . . . . . . . . (2. 157) In other words, krocw is the oil-phase relative permeability at Si lV' Stone 's26 Three-Phase Model2. Stone's second model is a proba­ bility model based on channel flow considerations,l7 Like Stone's first model, the second model approximates f(Sw, Sg ) in Eq. 2. 145 us­ ing two sets of two-phase relative permeability data (Figs. 2. 19 and 26

(krow/krocw

=

. . . . . . . . . . . . . . . . . . . . . . . (2. 15 1)

IW

1 - S ,w· - Sor ' where So � SO l' ; and

f3g

kro kroew

(2. 149)

for So � SO and =

2.20) but does not require the knowledge of SOl' in a three-phase sys­ tem. The model equation is

. . . . . . . . . . . . . . . . . . . . . . . . . . . . (2. 168) for all values of Sg Substituting Egs. 2. 167 and 2. 168 into Eq. 2. 154 results in .

kro krocw

=

S on ( l )

(

)

krog/krocw , Son

(2. 169)

which simplifies to give kru = krog for all values of Sg . Eg. 2. 164 states that Model l predicts relative permeability to oil in a two-phase oil/water system when Sg = O. Also, Eg. 2. 169 states that Model l predicts relative permeability to oil in a two-phase oil/ gas system in presence of irreducible water (when Sw = Siw). ThereBASIC APPLIED RESERVOIR SIMULATION


fore, Stone ' s Model 1 reduces to the original two-phase relative permeability data.

q m>O for injection

WELL

Example 2.9. Show that Stone ' s Model 2 reduces to two-phase relative permeability data under the same conditions as Example 2.8. Solution.

Predict at Sg = 0 using Eq. 2. 1 5 8 . A t Sg = 0, = 0 and g = cw , regardless o f the values o f Sw ; substituting these into Eq. 2. 1 5 8 yields

krokrg

kro kro

. . . . . . . . . . . . . . . . . . . (2. 1 70) therefore, it follows that

kkrorewo (krow/krocw knl ) l - krw +

=

'

kro krow kro kkrorcwo ( krocw/krocw )(krog/krocw krg)

= for all values o f Sw' That is to say, the relative permeability to oil predicted by Stone 's Model 2 at Sg = 0 is for oil in a two-phase oil and water system. Predict at Sw = Siw using Eq. 2. 1 58 . A t Sw = Siw, krw = 0 and krow = krocw , regardless o f the values o fSg . Substituting these into Eq' 2. 1 5 8 yields

+ 0

=

IN

I I

--.: :I

I

:

I

I I

:

, ... L _ ....... ....

., I I ,"

Ax x - 2'

:

I

,"

, .II '

FLOW

OUT

Ax x+T

� Ax

Fig. 2.21 -Control volume for 1 D flow In rectangularcoordinates.

for the component under consideration. The following sections dis­ cuss this process in detail.

( )

(2. 1 7 1 ) or

FLOW

q m<O for production

+

(

- 0 +

2.4.1 Mass Conservation for Single-Phase Flow in One Dimen­ sion. Fig. 2.21 shows the finite-control volume with a cross-sectional area Ax perpendicular to the direction of flow, length llx in the direc­ tion of flow, and volume Vb . Pointx represents the center of the control volume. The fluid enters the control volume across its surface at x - Axl2 and leaves across its surface at x + Axl2 at the mass rates of Wx Ix - &/2 and Wx Ix + &12, re­ spectively. The fluid also enters the control volume through a well at a mass rate of q",. Therefore, the material balance in this case can be written as

(2. 1 75)

krg).

Again, this can be simplified to

kkrorcow

=

(2. 1 76)

( l + O)(krog/krocw + krg ) - krg

where

wx lx -&:/2

Wx lx + &:/2

=

=

(mxAx )lx - AX/2 '

(mxAx)lx+ &:/2 '

. . . . . . . . . . . . . . . . (2. 1 77a) . . . . . . . . . . . . . . . . . . (2. 1 77b)

(2. 1 73)

. . . . . . . . . . . . . . (2. 1 77c)

= for all values of Sg and Sw = Siw . In other words, Stone's Model 2 predicts values for kro equal to those for oil in an oil, gas, and irreducible water system.

The terms mx, 171v, and qm = x component of the mass flux vector (mass flow per unit time per unit area), mass of fluid contained in a unit volume of reservoir, and mass production rate through the well (mass per unit time), respectively. Substituting Eq. 2. 1 77 into Eq. 2. 1 76 and rearranging terms yields

or

kro krog

2.4 Law of Mass Conservation

The law of conservation of mass is a material-balance equation writ­ ten for a component in a control volume of the system to be modeled. In petroleum reservoirs, the control volume is made up of a porous medium containing one, two, or three fluid phases. This section con­ cerns single-phase fluid. The porous medium is treated as a continu­ um whose physical properties at any point are those of a representa­ tive element of the medium. The control volume, whose shape depends on the coordinate system used in the model, is chosen and a material balance for the component is written over it. The material­ balance equation for any component, c, in the system may be ex­ pressed as . . . . . . . . . . . . . . . . . . (2. 1 74) where mj = "mass in" = the mass of the component entering the con­ trol volume from other parts of reservoir; 1110 = "mass out" = the mass of the component leaving the control volume to other parts of reser­ voir; ms = "sink/source" = the mass of the component leaving or en­ tering the control volume externally (through wells); and 1110 = "mass accumulated" = the mass of excess material stored in ordepleted from the control volume over a time interval. Allowing the finite dimen­ sions of the control volume and the time interval to approach zero and taking the limits in Eq. 2. 1 74 result in a mass-conservation equation

[

- (mxAx) lx + &:/2 - (mxAx)l x _ &:/2

]At +

q mAt

(2. 1 78) Dividing both sides of Eq. 2. 1 78 by At and multiplying and dividing the first term on the left side of the equation by llx, where llx ¢ 0, yields

. . . . . . . . . . . . . . . . . . . . . (2 .. 1 79) As Ax and At approach zero (that is, Ax.... and At .... the limits of the terms between the brackets in Eq. 2. 1 79 become partial deriva­ tives (see The Partial Derivative in Sec. 3.2.2 of Chap. 3) and the re­ sulting equation becomes the desired expression for mass conserva­ tion in rectangular coordinates.

O

t

- x (mxAx)llx

=

Vbtr(mV) - qm'

O) ,

.............

(2. 1 80)

Eq. 2. 1 80 appears in the literature in different forms. For example, if

Ax is independent of x, then Vb = Ax A x and this equation reduces to

BASIC RESERVOIR-ENGINEERING CONCEPTS AND RESERVOIR-FLUID AND -ROCK PROPERTIES

27


a

. = ata (m ) ,. Vb ' qm

- ax (m <)

For single-phase flow, m"

(2. 1 8 1 )

= ¢ p ; therefore

( . ) = (A. ) Vb' at .yp

a - ax m <

q ",

a

(2. 1 82)

mx = a {'p u p

Also, the mass flux can be expressed as the product ofthe fluid density and velocity, that is

a (� ) - ax lf' u x

qm = a1 ata ( ¢p ) - a"Vb' c

. . . . . . . . . . . . . . . (2. 1 83)

2.4.2 Mass Conservation for Single-Phase Flow in Multidimen­ sions. The steps involved in the derivation of the mass-conservation

equation for single-phase flow in three dimensions in a rectangular coordinate system are similar to those carried out in Sec. 2.4. 1 for 1 D flow. Differences appear only in the definitions of mi and 1110 and in

the limiting process, specifically,

and m a

= [ (mxAx)lx HX/2 + (myA,.)lyHy/2 + (m,A z )lz &:/2 ]At. +

Ax

Ay

Az

................. "

(2. 1 85)

At

The limits are .... O, .... O, .... O, and .... O. The mass-conservation equation for 3D rectangular flow (similar to Eq. 2. 1 80) becomes

- :x (mxAx)Ax - :y (m A ) Ay - :z ( lh zA ) Az

= Vb ata (m v) - qrn'

z

y

y

.

.

(2. 1 86)

The number of terms on the left side of Eq. 2. 1 86 depends on the di­ mensionality of the flow problem. For ID flow, there is only one term ; for 2D flow, there are two terms; and for 3D flow, there are three terms. The right side of Eq. 2. 1 86 does not depend on the dimension­ ality of the flow problem. In Eq. 2. 1 86 it is also possible to express mass flux, iii , as the prod­ uct of fluid density and Darcy's velocity, fluid concentration or mass per unit volume of reservoir, m", as the product of fluid density and porosity, and mass flow rate, qm , as the product of fluid density and volumetric flow rate. (2. 1 87)

(2. 1 84)

B -2

B- 1

/

/

/

-9,280

B-3 A - I RESERVOIR STRUCTURE AND ISOPACH MAPS

B-4 LEGENDS

___

Structural Contours

- Isopach Contours

(Thicknesses shown in feet) o

:

500

• Well Location

Scale, ft

i

1 ,000

2,000

Fig. 2.22-Structural and isopach maps for the A·1 reservoir. 28

BASIC APPLIED RESERVOIR SIMULATION


f "

9.250

(2. 1 88)

9 275 .

(2. 1 89)

9 3 00 .

m"

o 9.325

=

(2. 1 9 0 )

P ¢>'

(2. 1 9 1 )

Substituting Eqs. 2. 1 87 through 2. 1 9 1 into Eq. 2. 1 86 and dividing the resulting equation by a CP S( and using the definition of BI = PIscf PI (where / 0, W, or g) yields another form of the mass­ conservation equation.

9.350 9.375 �

=

(a) 9.250

C. "

9.275 9,300

=

o 9.325

���(�)

-

where / = 0, w , or g.

9.350

2.5

(b) Fig. 2.23-Structural cross sections for the A-1 reservoir: (a) west-east and (b) southwest-northeast.

q /sc '

.

.

.

.

.

.

. . . .

.

. .

.

.

.

.

.

.

...

(2. 1 92)

Basic Single-Phase-Flow Equation

The flow equation for single-phase flow can be obtained by combin­ ing the appropriate form of Darcy's law and the mass-conservation equation. Fluid density is usually expressed in the implicit form of the FVF as a function of pressure.

B-1

B-2

B-3

B-4

A - I RESERVOIR

ISOPOROSITY MAP

Scale,

(Porosities shown in percentages) o

500

:

ft

1 ,000

2,000

Fig. 2.24-Porosity distribution for the A-1 reservoir. BASIC RESERVOIR-ENGINEERING CONCEPTS AND RESERVOIR-FLUID AND -ROCK PROPERTIES

29


B -4

B-3 A-I RESERVOIR ISOPERMEABILITY MAP (Permeabilities shown in md)

i

500

Scale, ft

i

1 ,000

2,000

Fig. 2.25-Permeability distribution for the A-1 reservoir (reported permeabilltles are along the

southwest-northeast direction).

Combining Darcy's law for single-phase flow, Eq. 2.23, and the mass-conservation equation, Eq. 2. 1 92, yields the flow equation for single-phase flow.

. . . . . . . . . . . . . . . . . . . (2. 1 93) where 1 = 0, W , or g. Chap. 4 provides the details of this development in various coordinate systems. Eq. 2. 1 93 is the fundamental equation used in reservoir simulation. In developing Eq. 2 . 1 93 , no assump­ tions regarding the fluid type (incompressible, slightly compressible, or compressible) were made. Therefore, this equation is valid for the single-phase flow of oil, water, or gas. 2.6 Chapter Project

Following is more detailed information about the geology and rock and fluid properties of the A- I reservoir introduced in Sec. 1 .6 of Chap. 1 . 30

2.6.1 Reservoir Description. The geometry of the A- I reservoir rock is that of a channel sand. As Fig. 2.22 shows, the A- I sand has a gently west-dipping slope. The maximum elevation difference within the struc­ ture is approximately 60 ft, which translates to a drop of approximately 1 ft every 1 00 ft. The thickest section of the reservoir is encountered in the B-3 quarter and is approximately 40 to 50 ft thick. The average net­ pay thickness is 20 ft. Fig. 2.23 gives two structural cross sections that are studied along the longitudinal axis (southwest-northeast cross sec­ tion) and along the west-east axis (west-east cross section). The formation compressibility is determined to be approximately 3.0 x 10 - 6 psi - I . Initial saturation distributions at 9,290-ft refer­ ence depth are estimated to be So; = 50%, Sgi = 8%, and Sw; = 42%. At the reference depth of 9,290 ft, initial formation pressure is meas­ ured to be 4,800 psia. 2.6.2 Porosity and Permeability. The A- I formation consists of poorly- to well-sorted Cretaceous Dakota1 sands. The reservoir sands exhibit excellent reservoir quality, with an average effective porosity of 22%, and a permeability range of 250 to 300 md. Figs. 2.24 and 2.25 show the porosity and permeability distributions derived from core analysis and well-test data. The permeability distribution in Fig. 2.25 represents the permeability values along the longitudinal axis of the structure (southwest-northeast direction) . The permeability val­ ues along the direction orthogonal to the longitudinal axis (southeastBASIC APPLIED RESERVOIR SIMULATION


2.2 Fig. 2.30 shows a water formation dipping with a 15° angle. Points A, B, and C fall on the dip and are separated as shown in the figure. The water density at reservoir conditions is 60 Ibmlft3 . The pressure at Point B is 2,000 psia and water is under hydrodynamic equilibrium at the time of discovery. What are the pressures at Points A and C?

TABLE 2.4-GAS COMPOSITION OF THE A-1 RESERVOIR

Component

M

mol%

To �

(psia)

Pc

N2 CO 2

1 .10

28.0 1 3

227.29

493 . 0

5 . 60

44 . 0 1 0

547.57

1 07 1 . 0

H2 S

9.20

34. 076

672.37

1 306.0

CH4

74. 1 0

1 6 . 042

343.06

667.8

1 . 90

30.070

549.78

707.8

1 . 70

44. 097

665.70

6 1 6.3

i- C4H 1 O

5 . 20

58. 1 24

734.67

529 . 1

n-C4H 1 0

1 .20

58 . 1 24

765 . 34

550.7

C2H 6 C3H 8

2.3 In Exercise 2.2, the water viscosity at reservoir conditions is 0.95 cp and the permeability of the formation is 300 md. What is the rate of water flow between Points A and C, if the formation width along the strike is 950 ft and the pressures at Points A and C are maintained at 1 ,500 and 1 ,300 psi a, respectively?

northwest direction) are reported to be approximately 80% of the for­ mer. Therefore, the main flow directions are parallel to the southwest­ northeast and southeast-northwest directions. 2.6.3 Fluid Properties. The A- I reservoir has been produced by pri­ mary production. The formation produces approximately 50° API gravity oil with no significant sulfur content. The compressibility of gas-free oil is 5 x 1 0 - 6 psi - I . The produced water contains primari­ ly NaCl. Other dissolved cations besides Na+ are K+, Ca++, and Mg++. The heavy metals such as Ba++, Li+, Fe++, and St++ are found in trace amounts. Besides the Cl- anion, other anions found in the analysis are S04" - , HCO} , CO} - , NO} - , B - , r , and S - - . The compressibility of water is detelmined to be 3.0 x 10 - 6 psi - I . Table 2.4 gives the composition of the associated gas, and Table 2.5 pro­ vides a comprehensive description of the fluid PVT data to be used during the simulation study. Fig. 2.26 shows the entries of Table 2.5, together with some other properties. 2.6.4 Relative Permeability. Table 2.6 gives two-phase relative per­ meability data sets, and Fig. 2.27 shows these experimentally deri ved oil/water and oil/gas relative permeabilities. Oil relati ve permeability characteristics are generated with Stone ' s Three-Phase Model 2 (see Stone ' s Three-Phase Model 2 in Sec. 2.3.5) from the two sets of two­ phase data presented in Table 2.6. Fig. 2.28 gives the oil isoperms as they appear on a ternary relative permeability diagram. 2.6.5 Capillary Pressure. Table 2.7 and Fig. 2.29 provide the capil­

lary pressure data sets for the A - I reservoir in tabular and graphical forms, respectively.

Exercises

2.1 In Fig. 2. 1 the arbitrary new datum is above the absolute datum. Show that Eqs. 2. 1 3 and 2. 14 hold true if the arbitrary new datum falls below the absolute datum.

2.4 A reservoir-rock sample has a porosity of 0. 1 8 measured at 14.7 psia. The rock compressibility is 0.77 x 10 - 5 psi - I . What would the rock porosity be at 2,000 and at 3,000 psia? Plot the relationship be­ tween 4> and P in a pressure range of 1 4.7 to 5,000 psia. 2.5 Obtain a flow-rate expression for the equivalent oflinearflow that takes place between Points I and 2 in Fig. 2.31. Note that the two blocks have different dimensions and permeabilities and that flow rates at Points 1 and 2 are equal but that P I > P2 .

2.6 Use the Dranchuk and Abou- Kassem 1 6 z- factor correlation (dis­ cussed in Fluid Compressibility and Gas-Compressibility Factor in Sec. 2.3.2) to plot z and Cr vs. ppr in the pseudoreduced-pressure range of 1 to 10 for Tpr 1 . 1 and 1 .5.

=

2.7 Table 2.8 lists the properties o f gas and saturated oil at reservoir temperature. Calculate oil- and gas-phase properties (B. p" and p) at the following reservoir conditions, when 49.098 Ibmlft3 , M = 22.94 (gas molecular weight), Co 23.2 X 10-6 psi- I , cf-l 46 X 1 0-6 psi- I , Pse 14.7 psia, and Tse 520°R. 1 . P = 3,014.7 psi a and Rs = 930 scf/STB. 2. psia and Rs = 800 scf/STB.

=

p = 3,O I 4 . 7

P ose = = =

=

2.8 With the information in Exercise 2.7, calculate the oil- and gas­ phase properties for the following reservoir conditions. Use linear in­ terpolation for pressure entries not listed in the table of properties. I. P = 4,5 14.7 psi a and Rs = 1 ,444 scf/STB. 2. 4,5 14.7 psi a and Rs 1 ,000 scf/STB .

P=

=

O ;§; ;§;

2.9 Plot krow vs. Sw in the range Sw 1 with Eqs. 2. 1 39 and 2. 142, when Siw 0. 1 5. Examine the plots and provide comments on the prediction of krow by Corey ' s 20 and Naar and Henderson's 2 1 two­ phase models.

=

2.10 The two sets of two-phase relative permeability data given in Table 2.9 are reported by Coats et al. 27 If, at a certain instant in time, phase saturations in a three-phase flow system are Sw 0.320, Sg 0.250, and So = 0.430, calculate the relative permeability for the three phases using Stone ' s Three-Phase Models 1 and 2.

=

=

TABLE 2.S-FLUID P V T DATA A S INPUT TO T H E SIMULATOR FVF

Density

Viscosity Solution-Gasl

Pressure

Water

Oil

Gas

Water

Oil

Gas

(psia)

( R Blbbl)

(R B/STB)

(R B/scl)

(lbm/ft3)

(lbm/ft3)

(lbmlft3)

1 .02527

1 .204 1 3

0.001 8

1 .0 1 92 1

1 .26054

0.00 1 05

1 ,500

2,000

2,500

1 .02224

1 .232 1 0

0.001 33

62.2280

62.41 27

62.5968

49.0 1 1 3

48.5879

48. 1 774

5.8267

8.0573

1 0.2279

Water

.J9L 0.5200

Oil

Gas

Oil Ratio

.J9L

(cp)

(scI/STB)

z lactor

292.75

0.84274

1 .7356

0.5200

1 .5562

0.5200

443.75

0.800 1 7

1 . 1 024

0.0222

61 9.00

0.82 1 80

1 .29208

0.00088

62.78 1 9

47.6939

1 2 .2084

0.5200

1 .251 6

4,000

1 .01 024

1 .371 93

0.00069

63. 1 531

46.5899

1 5.431 3

0.5200

0.9647

5,000

1 .00506

1 .46387

0.00060

63. 5225

45. 1 925

1 7.7994

0.5200

0.9200

6,000

0.99856

1 .4383 1

0.00055

63.8928

4,500 5,500

1 .0073 1

1 .001 70

1 .32933 1 .42596

1 .44983

0.00077

0.00064

0.00057

62.9680 63.3374

63. 7077

47. 1 788 45.5756

45.44 1 3

45.7426

1 3.9421 1 6.7051

1 8.7475

1 9. 5772

0.5200 0.5200 0.5200 0.5200

0.81 258

0.Q1 85

1 .0 1 621

1 .0 1 32 1

368.00

1 .40 1 5

3,000

3.500

0.01 50

0.0 1 67

0.91 80

0.9243 0. 9372

BASIC RESERVOIR-ENGINEERING CONCEPTS AND RESERVOIR-FLUID AND -ROCK PROPERTIES

0.0204 0.0241

0.0260 0.0278

0.0296

0.03 1 3

522.71

724.92

81 8.60 923. 1 2

965.28 966.32

0.80443 0.84856

0.881 84 0.91 958

0.96039 1 .00329

31


Water FVF

.

III co 1 . 05

III 1 .40

a:

a: u:

a: u:

Cii «i �

1 .00

a:

a:

� I/)

lii

o

*

Oil Densi

;E �

.

Q)

o

61

(5

Wate r Viscos ity

0. (,)

.... Q)

;E

� 15

46

;!.

'iii c:

44

I/) I'll

42

0. (,)

§ 0. 02 I/) I'll

(.!}

1 .0 0 , 8 �����:'-."":"'��� 1 ,000 2,000 3,000 4,000 5,000 6,000 P ressu re , psia

Factor Gas-Com 1 .2 �;"";;"';';�";';"';";;';';;';"��;;o

Solution-Gas/O i l Ratio

I'll

(.!}

C

o

5

(5 (f)

o.oo �-'!"-��"'!"'""���� 1 ,000 2,000 3,000 4,000 5,000 6,000 Pressu re , psia

'iii

0.

;:: 0,0008

1/). 1 000

a:

,..-...,.;G;;;a;;;s;.,V�is;;;;c.;;.os;;;i;J..,_...,

;E

:>

13

0.04

lil 1 ,2 :>

1 ,000 2,000 3,000 4,000 5,000 6,000 Press u re , psia

o

5 �� �� � �� �� 1 ,000 2,000 3,000 4,000 5,000 6,000 P ress u re , ps i a

'iii

(5

10

(.!}

1 ,4

0,40 ����__����.

o

0.45

(f) 1 200

C')

1 .6

'iii

5 0.50

48

Oil Viscosit

0. (,)

(,)

1 , 8 ,...-... .., ;;;';';' .. '';';';;;';;';;;;;.1. ;'; -...-. . ..

0.60 ,...-""' . ........ ... .. -.-..Jr-.....

'�

--

40 ��������� 1 ,000 2,000 3,000 4,000 5,000 6,000 P ressure, psi a

60 ��������� 1 ,000 2,000 3,000 4,000 5,000 6,000 P ressure, ps i a

;E 0.55

(.!}

50 �������

62

0,00 1 0

I/) I'll

1 ,00 ��������:""!. 1 ,000 2,000 3,000 4,000 5,000 6,000 P ressure, ps i a

C')�

:9. 63

u:

1 .10

Water Dens'

E

a:

1 .20

65 ����--�--�� 64

13

iii 0.001 5

0 . 90��������� 1 ,000 2,000 3,000 4,000 5,000 6,000 P ressure, ps i a

C') �

...---1 .. .. .... .. ........ .. 0.0020 ,..--.--'

� III 1 , 30 (5

0.95

Gas FVF

Oil FVF

--'"'I .. . ....1 .50 r---......-....-

--..-..., . -.. ... .. .... .... . 1 1 0 ,...--....

.�

.... o

800

;g

t3

I/) I/)

� 1 .0

600

N

0.

E

0,0006 0.0004

o

400

() 0.0002

200 ���������� 1 ,000 2,000 3,000 4,000 5,000 6,000 P ressure , ps i a

O,OOOO �"",!",: ���� �4,000 5,000 6,000 �� 1 ,000 2,000 3,000 P ress u re , ps i a

Fig. 2.26-Variation of several reservoir-fluid properties with pressure for the A-1 reservoir.

2.11 Assuming the two-phase relative penneability data sets in Exercise

2. 10 are not given, what would the phase relative penneabilities predicted by the Naar, Henderson, and Wygal21 ,24 model be if Sor = O,07? 2.12 Consider a 3D, thick reservoir in the shape of a perfect rectangu· larprism. If this reservoir is positioned parallel (along its lateral direc· 32

tions) to the datum plane, would it be possible to replace the potential gradients with the pressure gradients? Show analysis. 2.13 Is

aBg/ap = 0 for an ideal gas? Justify your answer,

2.14 Is compressibility of a real gas always less than that of an ideal gas at a constant temperature but different pressures? Show analysis. BASIC APPLIED RESERVOIR SIMULATION


OillWater Relative Permeability

TABLE 2.6-TWO-PHASE R ELATIVE PERMEABILITY DATA 1 .2

FOR THE A-1 R ESERVOIR Oil/Water

� 0. 1 8

� � 0 . 00000

1 .00000

0.21

0. 00000

0 . 92692

0.24

0. 00002

0.27 0.30

Gas/Oil

� 0.00

� � 0 .00000

1 .00000

0 . 04

0.01 1 03

0. 70778

0 .85441

0 . 08

0.029 1 2

0. 55844

0.000 1 4

0. 79288

0. 1 2

0 . 05 1 38

0.44540

0.00045

0.71 31 2

0. 1 6

0.07687

0. 35562

0.33

0.001 1 1

0 . 64526

0.20

0 . 1 0506

0.28302

0.36

0. 00232

0 . 57980

0 . 24

0 . 1 3561

0.22392

0.39

0 .00430

0 . 5 1 709

0.28

0 . 1 6827

0 . 1 7574

0.42

0 .00733

0.45744

0 . 32

0.20286

0 . 1 3656

0 . 45

0. 0 1 1 75

0.401 1 0

0 . 36

0.23923

0 . 1 0485

0.48

0 . 0 1 791

0 . 34831

0 . 40

0.27725

0. 07938

0.51

0 .02623

0.29924

0.44

0 . 3 1 683

0.059 1 2

0 . 54

0.037 1 4

0.25403

0.48

0. 35788

0.043 1 9

0.57

0.051 1 6

0 . 2 1 278

0 . 52

0.40031

0 .03084

0.60

0. 06882

0 . 1 7552

0.56

0.44408

0.02 1 43

0.63

0. 09069

0 . 1 4228

0 . 60

0.489 1 1

0 . 0 1 442

0.66

0. 1 1 741

0. 1 1 30 1

0 . 64

0. 53536

0. 00933

0.69

0 . 1 4963

0.08763

0 . 68

0. 58279

0.00574

0.72

0 . 1 8807

0.06603

0 . 72

0.631 34

0. 00332

0.75

0.23347

0.04803

0.78

0.28664

0.03344

0.81

0 . 34842

0.02 1 99

0 . 84

0 . 4 1 968

0.01 340

0.87

0.501 35

0. 00733

0 . 90

0. 59439

0.00340

2.15 In a two-phase relative permeability data set the summation of relative permeabilities goes through a minimum value. If a third phase is introduced into the system, how will the magnitude of this mini­ mum value change? Explain. 2.16 Table 2.10 shows two-phase relative permeability data to be used in three-phase relative permeability characteristics. I. On the ternary diagram, indicate the region in which possible saturation combinations can be encountered at any time during the life of the reservoir with the two-phase relative permeability charac­ teristics from the table. 2. Using Stone's Three-Phase Models 1 and 2, calculate the kro , krw, and krg values when So = 27%, Sw = 50%, and Sg = 23%.

1 .0

� :is ra Q)

§

Q) a.. Q)

.i:: n; Qi a:

0.8 0.6

krow 0.4 0.2 0.0 0.0

0.2

0.4

1 .0

Sw

Gas/Oil Relative Permeability

1 .0

0.2

0.2

0 .4

Sg

0.6

0.8

1 .0

Fig. 2.27-Two-phase relative permeability characteristics for the A-1 reservoir.

BI = Bf = Bo =

FVF of Phase /, L3/L3 , reservoir volume/volume at standard conditions FVF of Phase I at reference conditions, L3/L3 , reservoir volume/volume at standard pressure and reservoir temperature oil FVF, L3/L3 , RB/STB [m3/std m3 ] So

100

2.17 Comment on the accuracy of the statement "A hydrocarbon res­ ervoir that initially exhibits isotropic and homogeneous permeability characteristics will have anisotropic and heterogeneous permeability distribution as the reservoir is depleted, if permeability is a function of pressure." 2.18 Is it possible to use the capillary pressure relationships Peow (Sw) = P o - PlY and Pc.g o (Sg) = P g - P o for oil-wet reservoirs? Explain. 2.19 Derive Eq. 2.82 for the oil FVF above the bubb1epoint pressure. Nomenclature

A = cross-sectional area normal to flow, L2 , ft2 [m 2 ] A I - I I = constants of BWR EOS Ax = cross-sectional area normal to the x direction, L2 ,

Bg =

ft2 [m2 ] gas FVF, L3/ 0 , RB/scf [m3/std m 3 ]

Fig. 2.28-0iI isoperms as generated by the Stone's Three­ Phase Model 2.

BASIC RESERVOIR-ENGINEERING CONCEPTS AND RESERVOIR-FLUID AND -ROCK PROPERTIES

33


DA = elevation of Point A with respect to absolute datum, L, ft [m] DB = elevation of Point B with respect to absolute datum, L, ft [m] D O = elevation of datum with respect to absolute datum, L, ft [m] f= function g = acceleration of gravity, Llt2 , ftlsec 2 [m/s 2 ] h = thickness of porous medium, L, ft [m] hJ = fluid head, L, ft [m] k = permeability, L2 , darcy [u m2 ] kH = horizontal permeability, L2 , darcy [u m 2 ] kox = effective permeability to oil phase in the x direction. L2 , darcy [um 2 ] kr = relative permeability, fraction k/"/ = relative permeability to Phase I, dimensionless krg = relative permeability to gas, dimensionless kro = relative permeability to oil, dimensionless krnw = relative permeability to nonwetting phase, dimensionless krocw = relative permeability to oil at irreducible water saturation, dimensionless krog = relative permeability to oil in oil/gas system, dimensionless krow = relative permeabil ity to oil in oil/water system, dimensionless km = relative permeability to wetting phase, dimensionless kv = vertical permeability, L2 , darcy [u m2 ] �\'x = effective permeability to water phase in the x direction, L2 , darcy [um 2 ] kx = permeability in the direction of the x axis, L2 , darcy [u m 2 ] k = average permeability, L2 , darcy [u m 2 ] L = distance, displacement, L, ft [m] Ina = mass accumulated, or mass of excess material stored in or depleted from the control volume over a time interval, m, Ibm [kg] In; = mass in, or mass of component entering the control volume from other parts of the reservoir, m, Ibm [kg]

TABLE 2.7-CAPILLARY PRESSURE DATA

Pcow

� 0.20 0.25 0 . 30 0.40 0 . 50

8.00 4 . 30 3 . 00 1 . 78 1 .2 1

0 . 60 0 . 70 0 . 80 0 . 90

0 . 79 0.43 0. 1 0 0 . 00

Pcgo

1 -S g 0.21 0.26 0.31 0.41 0.51

4 . 76 2 . 94 2 . 22 1 . 49 1 . 04

0 . 66 0 . 76 0.96

0.51 0.27 0.01

Bob = oil FYF at bubblepoint conditions, L3/L3 , RB/STB [m3/std m3 ]

Bw = water FYF, L31L3 ,

C= Ce = q= cg = q= CLe =

Co =

Coe

=

Cp = cpe =

C/" = CTI =

RB/B

[m3/std m3 ]

component effective compressibility, Lt2/m, psi - , [kPa - ' ] fluid compressibility, Lt2/m, psi - , [kPa - ' ] gas compressibility, Lt 2/m, psi - , [kPa - ' ] compressibility of phase I, Lt2/m, psi - , [kPa - ' ] liquid effective compressibility, Lt2/m, psi - , [kPa - ' ] oil compressibility, Lt2/m, psi - , [kPa - ' ] oil effective compressibil ity, Lt 2/m, psi - , [kPa - ' ] pore compressibility, Lt 2/m, psi - 1 [kPa - 1 ] pore effective compressibility, Lt2/m, psi - 1 [kPa - 1 ] reservoir-rock compressibility, Lt2/m, psi - 1 [kPa - 1 ] reduced compressibility, dimensionless thermal expansion coefficient of Phase I, 0F - I

roC - I ]

water compressibility, Lt 2/m, psi - 1 [kPa - 1 ] porosity compressibility, Lt2/m, psi - 1 [kPa - 1 ] relative rate of change of oil viscosity with pressure above bubblepoint Co to C5 = coefficients in Eq. 2.68, defined in Table 2.2 D = elevation with respect to absolute datum being positive upward, L, ft [m]

10

Oi llWater Capil lary Pressu re

10

8

'w a.

Gas/Oil Cap i l lary P ressu re

8

Q) ....

� 6 C/)

a..

'5.

4

ctI

()

2

0.2

0.4

Sw

0.6

0.8

2

1 .0

0.2

0.4

0.6

1 - Sg

0.8

1 .0

Fig. 2.29-Capillary pressu re relations. 34

BASIC APPLIED RESERVOIR SIMULATION


pO = Pcgo = Pcow = q= qgx =

-

Fig. 2.3O-Cross section of reservoir described in Exercise 2.2.

R= Rs =

fIlo = mass out, or mass of component leaving the ms =

M= p= PA = Pb = PB = Pc = Pg = Pi = P' = PL = po = Ppc = Ppr = Pr = Psc = Pw = pw =

control volume to other parts of the reservoir, m, Ibm [kg) sink/source, or mass of component leaving or entering the control volume externally (through wells), m, Ibm [kg) mass per unit volume of porous medium, mlL3, Ibmlft3 [kg/m3) mass per unit volume of porous media at Time t, mlL3 , Ibmlft3 [kg/m3) mass per unit volume of porous medium at Time t + tJ.t, mlL3, Ibmlft3 [kg/m3] x component of mass flux vector, ml1L2, Ibml(D-ft2) [kg/(d ' m2») y component of mass flux vector, mltL2, Ibml(D-ft2) [kg/(d ' m2») Z component of mass flux vector, ml1L2, Ibml(D-ft2) [kg/(d ' m2») gas molecular weight, m, Ibmllbm mol [kglkg mol] pressure, mlLt2, psia [kPa] pressure at Point A , m/Lt2, psia [kPa) bubblepoint pressure, mlLt2, psia [kPa) pressure at Point B, mlLt2, psia [kPa) critical pressure, mlLt2, psia [kPa) gas pressure, mlLt2, psi a [kPa] initial pressure, mlLt2, psia [kPa] pressure of Phase I, mlLt2, psia [kPa] pressure at x = L , mlLt2, psi a [kPa) oil pressure, mlLt2, psia [kPa] pseudocritical pressure, mlLt2, psi [kPa) pseudoreduced pressure, dimensionless reduced pressure, dimensionless standard-condition pressure, mlLt2, psi a [kPa) water pressure, mlLt2, psia [kPa) pressure at x = O, mlLt2, psia [kPa]

tJ.s = Sg = Sgc = Sg i =

Sgmax = Sgn = Siw = s, = So = So i = Son = Sor = Sorg = Sorw = s.v = SWi = S wmax = Swn = s= tJ.t = T= Te =

Tpc = �)f = T, = T,c = t= tn = tn + 1 = u= u, = Ux =

reference pressure, mlLt2, psia [kPa] gas/oil capillary pressure, m/Lt2, psi [kPa] oil/water capillary pressure, mlLt2, psi [kPa] production rate or flow rate, L31t. BID [m3/d] gas flow rate along the x direction. L3/t, RBID [m3/d] production rate of Phase 1 at standard conditions, Oft, sefID or STBID [std m3/d) oil flow rate along the x direction, L3/t, RBID [m3/d] mass production rate, mit, IbmID [kg/d) water flow rate along the x direction, L3/t, RBID [m3/d] universal gas constant solution-gas/oil ratio, L3/L3, scf/STB [std m3/std m3] difference between Points and 2, L, ft [m) gas saturation, fraction critical gas saturation, fraction initial gas saturation, fraction maximum gas saturation, fraction normalized gas saturation, fraction irreducible water saturation, fraction saturation of Phase /, fraction oil saturation, fraction initial oil saturation, fraction normalized oil saturation, fraction ROS, fraction ROS in gas/oil system, fraction ROS in oil/water system, fraction water saturation, fraction initial water saturation, fraction maximum water saturation, fraction normalized water saturation, fraction distance, L, ft [m] time step (tJ.t = t n + 1 t n) , t, days absolute temperature, T, OR [K] critical temperature, T, OR [K] pseudocritical temperature, T, OR [K] pseudoreduced temperature, dimensionless reduced temperature, dimensionless standard condition temperature, T, OR [K] time, t, days old time, t, days current or new time, t, days volumetric velocity, LIt, RB/(D-ft2) [m3/(d ' m2)] volumetric velocity of Phase /, LIt, RB/(D-ft2) [m3/(d ' m2») volumetric velocity component in the x direction, LIt, RB/(D-ft2) [m3/(d " m2)]

I

_

(a) - - - -

- - - - -

k1 - - - -

4 2

q

q

\ --L A L -

pproximate boundary

Actual boundary

Fig. 2.31 -(a) Actual and approximate reservoir boundaries and (b) detailed discretized reser­ voir between Points 1 and 2 in Exercise 2.5. BASIC RESERVOIR-ENGINEERING CONCEPTS AND RES ERVOIR-FLUID AND -ROCK PROPERTIES

35


TABLE 2.B-SATURATED-OIL AND -GAS PROPERTIES

Rs

80

BY COATS et al.27

Gas

Oil

p

TABLE 2.9-TWO-PHASE R ELATIVE PERMEABILITY DATA

110

Bg

I1g

OillWater Data

(RB/STB)

(ep)

(RB/set)

1 .0

1 .062

1 .040

1 .6667

1 4. 7

0.0080

5 1 4.7

1 80 . 0

1 .207

0.91 0

0 . 00627

0.01 1 2

1 ,01 4.7

371 . 0

1 .295

0. 830

0 .00320

2,014.7

636 . 0

1 .435

0 . 695

0 . 00 1 6 1

(psia)

3,01 4.7

(set/STB)

1 .565

930 . 0

0 .594

0.001 08

� �

Oil/Gas Data

0 . 9990

0.1 01

0 . 0026

0 . 5 1 69

0 . 0 1 02

0. 8000

0 . 1 50

0.01 21

0 .3373

0. 01 68

0 . 7241

0 . 1 95

0 . 0 1 95

0 . 29 1 9

0 . 0228

0 . 357

0 . 0275

0 . 6206

0 .250

0.0285

0 . 2255

0.0424

0 . 5040

0.281

0 .0372

0 . 2 1 00

0 . 337

0.0500

0 . 1 764 0 . 1 433

0. 1 30

0 . 0000

1 . 0000

0.1 91

0.0051

0.01 40

0.250

0 . 0 1 89

0 . 294

0 . 000

0 .0000

1 .0000

4,01 4.7

1 ,270. 0

1 .695

0.51 0

0 . 0008 1

0 . 0268

0. 4 1 4

5,01 4.7

1 ,6 1 8 . 0

1 .827

0.449

0 . 00065

0 . 0309

0.490

0 . 0665

0.31 7

0 . 557

0 . 0970

0 . 3029

0 . 386

0.0654

0 . 630

0. 1 1 48

0 . 1 555

0.431

0 . 0761

0 . 1 1 72

0 . 673

0 . 1 259

0 . 0956

0 .485

0 . 0855

0 . 0883

0. 71 9

0. 1 38 1

0 . 0576

0 . 567

0 . 1 022

0 . 0461

0 . 789

0 . 1 636

0 . 0000

0 . 605

0 . 1 1 20

0 . 0294

0 . 800

0 . 1 700

0. 0000

uy = volumetric velocity component in the y direction, Ut, RB/(D-ft2 ) [m3/(d ' m2 )]

Uz = volumetric velocity component in the z direction, Ut, RB/(D-ft2 ) [m3/(d ' m2)] � = superficial velocity of Phase I, Ut, RB/(D-ft2) [m3/(d ' m 2 )] V= volume, L3, ft3 [m3] Vb = bulk volume, control volume, or gridblock bulk volume, L3, ft3 [m3] Vg = gas volume, L3, ft3 [m3] Vgsc = gas volume at standard conditions, L3, scf [std m3] Va = oil volume, L3, ft3 [m3] Vp = PV, L3, ft3 [m3] Vs = rock-solids volume, L3, ft3 [m3] Vsc = volume at standard conditions, L3, STB [std m3] for liquids, scf [std m3] for gases Vw = water volume, L3, ft3 [m3 ] Wx = mass flow rate component in the x direction, mit, IbmJD [kg/d] x = distance in the x direction in Cartesian coordinate system, L, ft [m] �x = difference along x direction (fu = Xi + 1 - Xi ), L, ft [m] �y = difference along y direction (�y = Yj + 1 - Yj), L, ft [m] z = gas-compressibility factor z = pM/ pRT, dimensionless Zc = critical gas-compressibility factor, �c = gas-compressibility factor at standard conditions, dimensionless Z = elevation with respect to datum (positive downward), L, ft [m] ZA = elevation of Point A with respect to datum, L, ft [m]

ZB = elevation of Point B with respect to datum, L, ft [m] ac = volume conversion factor whose numerical value is given in Table

2. 1

2.1

Pc = transmissibility conversion factor whose numerical value is given in Table

6.r = difference operator in the time domain

y = gravity defined by Eq. 2.20, mlL2t2 , psi/ft [kPalm] = gravity conversion factor whose numerical value c Y is given in Table 2. 1 Yl gravity of Phase I, mJL2t2, psi/ft [kPalm] fl = viscosity, mILt, cp [Pa ' s] fll = viscosity of Phase I, mILt, cp [Pa ' s] flo = oil-phase viscosity, mILt, cp [Pa · s] flab = oil-phase viscosity at bubblepoint pressure, mILt, cp [Pa ' s] p = density, mlL3, Ibmlft3 [kg/m3] Pg = gas-phase density, mlL3, Ibmlft3 [kglm3] Pgsc = gas-phase density at standard conditions, mlL3, Ibmlft3 [kglm3] PI = density of Phase I, mJL3, Ibmlft3 [kg/m3] Plsc = density of Phase I at standard conditions, mlL3, Ibmlft3 [kg/m3] pf = density of Phase 1 at reference conditions, mlL3, Ibmlft3 [kg/m3] Po = oil-phase density, mlL3, Ibmlft3 [kg/m3] Pob = oil-phase density at bubblepoint pressure conditions, mlL3 , Ibmlft3 [kg/m3] =

0.270

TABLE 2.1 0-TWO-PHASE R ELATIVE PERMEABILITY DATA Water/Oil Data

36

I<rw

Oil/Gas Data

k,ow

0. 1 5

0 . 000

1 .000

0.20

0 . 0000 1 1 97

0.830

k,g

k,og

0 . 08

0 . 000

1 . 000

0.1 3

0. 00066885

0.61 3 0 . 292

0.25

0 . 000 1 1 97

0.677

0.23

0 . 0 1 070

0 . 30

0 .0009698

0 . 54 1

0.33

0 .03849

0 . 1 34

0.40

0 . 007483

0.321

0.43

0.08926

0 .05646

0 . 50

0 . 02874

0 . 1 69

0.53

0 . 1 67

0 .02047

0 . 60

0 .07855

0.07500

0.63

0 .276

0 . 005933 0 . 00 1 1 82

0 . 70

0 . 1 75

0.02555

0 . 73

0.41 9

0 . 80

0 . 34 1

0. 005409

0.83

0 . 600

0 . 000 1 1 32

0 . 88

0 . 563

0 . 00

0.88

1 .000

0 . 000

BASIC APPLIED RESERVOIR SIMULATION


Posc = oil-phase density at standard conditions, mlL3 , Pr = Psc =

¢= ¢o =

<I> = <l>A = <l>B = <1>0 =

<l>g = <l>h = <1>/ = <1>0 = <l>w

=

Ibm/ft3 [kglm3 ] reduced density, dimensionless density at standard conditions, mlL3 , Ibm/ft3 [kglm 3 ] porosity, fraction porosity at pO, fraction potential, mlLt2 , psia [kPa] potential at Point A, mlLt2 , psia [kPa] potential at Point B, mlLt2 , psia [kPa] potential at datum with respect to absolute datum, mlLt2 , psia [kPa] gas-phase potential, mlLt2 , psia [kPa] Hubbert ' s potential, L, ft [m] potential of Phase I, mlLt2 , psia [kPa] oil-phase potential, mlLt2 , psia [kPa] water-phase potential, mlLt2 , psia [kPa]

Subscripts g = gas phase 0 = oil phase w = water phase

References

1. Hubbert, M.K. : "Darcy's Law and the Field Equations of the flow of Underground fluids," Trans., AIME ( 1 956) 207, 222. 2. Darcy, H.: "Les Fontaines Publiques de la Ville de Dijon," Dalmount, Paris ( 1 856), reprinted in Hubbert, M.K.: The Theory of Ground-Water Motion and Related Papers, Hofner Publishing, New York City ( 1 969).

3. Scheidegger, A.E.: Physics ofFlow Through Porous Media, third edi­ tion, U. of Toronto Press, Toronto, Canada ( 1 974). 4. Collins, R.E.: Flow ofFluids Through Porous Materials, Van Nostrand Reinhold, New York City ( 1 96 1 ). 5. Klinkenberg, L.J . : ''The Permeability of Porous Media to Liquids and Gases," Drill. & Prod. Prac. ( 1 94 1 ) 200. 6. Trube, A.S.: "Compressibility of Natural Gases," Trans., AIME ( 1 957) 210, 355. 7. Brown, G.G. et al. : "Natural Gasoline and the Volatile Hydrocarbons," NGAA ( 1 948) 38. 8 . Mattar, L., Brar, G.S., and Aziz, K . : "Compressibility of Natural Gases," J. Cdn. Pet. Tech. (April 1 975) 14, No. 4, 77.

9. Dranchuk, P.M., Purvis, R.A., and Robinson, D . B . : "ComputerCalcula­ tions of Natural Gas Compressibility Factors Using the Standing and Katz Correlations," Inst. Petrol. Tech. Series, No. 1P74-008 ( 1 974) 1 . 10. Abou-Kassem, J.H., Mattar, L., and Dranchuk, P.M . : "Computer Cal­ culations of Compressibility of Natural Gas," J. Cdn. Pet. Tech. (May 1 990) 29, No. 5, 105. 1 1 . Standing, M.B. and Katz, D.L.: "Density of Natural Gases," Trans. , AIME ( 1 942) 146, 1 40.

12. Dranchuk, P.M. and Abou-Kassem, J.H.: "Computer Calculation of Heat Capacity of Natural Gases Over a Wide Range of Pressure and Temperature," Canadian J. Chemical Engineers (April 1 992) 70, No. 2, 350. 1 3 . Wichert, E. and Aziz, K.: "Compressibility Factor of Sour Natural Gases," Canadian J. Chemical Engineers (April 1 97 1 ) 49, No. 2, 267. 14. Cox, J.C.: "What You Should Know About Gas Compressibility Fac­ tors," World Oil (April 1988) 206, No. 4, 69. 1 5 . Benedict, M., Webb, G.B ., and Rubin, L.C . : "An Empirical Equation for Thermodynamic Properties of Light Hydrocarbons and Their Mix­ tures", Chemical Engineering Progress (August 1 95 1 ) 47, No. 8, 4 1 9 . 1 6. Dranchuk, P.M. and Abou-Kassem, J.H. : "Calculation o f Z Factors for Natural Gases Using Equations of State," J. Cdn. Pet. Tech. (March 1 975) 14, No. 3 , 34. 17. Aziz, K. and Settari, A.: Petroleum Reservoir Simulation, Applied Sci­ ence Publishers Ltd., London ( 1 979). 18. Poston, S.w. et al. : ''The Effect of Temperature on Irreducible Water Saturation and Relative Permeability of Unconsolidated Sands," SPEJ (June 1 970) 1 7 1 ; Trans. , AIME ( 1 970) 249. 19. Leverett, M.C. and Lewis, W.B . : "Steady flow of GaslOil/Water Mix­ tures Through Unconsolidated Sands," Trans., AIME ( 1 94 1 ) 142, 1 07 . 20. Corey, A.T. : ''The Interrelation Between Gas and O i l Relative Permea­ bilities," Producers Monthly ( 1 954) 19, 38. 21. Naar, J. and Henderson, J.H.: "An Imbibition Model-Its Application to flow Behavior and the Prediction of Oil Recovery," SPEJ (June 1 96 1 ) 6 1 . 22. Corey, A.T. e t al. : ''Three-Phase Relative Permeability," Trans., AIME ( 1 956) 207, 349. 23. Snell, R.W. : "Three-Phase Relative Permeability in Unconsolidated Sand," J. lnst. Petroleum (March 1 962) 84, 80. 24. Naar, J., and Wygal, R.J.: "Three-Phase Imbibition Relative Permeabil­ ity," SPEJ (December 1 % 1 ) 254. 25. Stone, H.L.: "Probability Model for Estimating Three-Phase Relative Permeability," JPT (February 1 970) 2 1 4 ; Trans., AIME ( 1 970) 249. 26. Stone, H.L. : "Estimation of Three-Phase Relative Permeability and Re­ sidual Oil Data," J. Cdn. Pet. Tech. (April 1 973) 12, No. 4, 53. 27. Coats, K.H. et al. : ''Three-Dimensional Simulation of Steamflooding," SPEJ (December 1 974) 573; Trans., AIME ( 1 974) 257.

51 Metric Conversion Factors

° API

bbl cp ft ft2 ft3 Ibm md psi psi - 1 OR

141 .5/( 1 3 1 .5 + ° API) = glcm3 x 1 .589 873 E - O l = m3 x 1 .0* E - 03 = Pa ' s E- Ol = m x 3.048* x 9.290 304* E - 02 = m2 x 2.83 1 685 E - 02 = m3 x 4.535 924 E - O l = kg x 9.869 233 E - 04 = p, m2 x 6.894 757 E + 00 = kPa x 1 .450 377 E - O l = kPa - 1 =K x 5/9

·Conversion factor is exact.

BASIC RESERVOIR-ENGINEERING CONCEPTS AND RESERVOIR-FLUID AND -ROCK PROPERTIES

37


C h a pter 3

Bas i c M athematica l Concepts 3. 1 I ntroduction

Mathematical models, such as finite-difference simulators, are built on fundamental physical and mathematical principles. Chap. 2 dis­ cussed the physical principles involved in reservoir simulation, in­ cluding the law of conservation of mass. Darcy's law for fluid flow through porous media. pressure/volume/temperature (PVT) behav­ ior of reservoir fluids, and properties of reservoir rock. The mathe­ matical principles required to develop numerical reservoir simula­ tors include basic differcntial calculus, differential-equation theory, numerical analysis, finite-difference calculus, and linear algebra. Differential calculus, which dates back to the time of Newton and Leibnitz, relates the derivative (or tangent slope) of a continuous function to the function itself. This branch of mathematics has many important applications in such diverse fields as engineering, physi­ cal sciences, biology. economics, and applied mathematics. Differential equations involve both known and unknown func­ tions, along with the derivatives of the unknown functions. They have applications in many of the same areas as differential calculus. Examples of differential equations used in petroleum engineering are the pipe-flow equation (Euler's equation), Muskat'sl method for solution-gas-drive reservoirs, the well-test equation (diffusivity equation), and the equations used in reservoir simulation. Numerical-analysis methods provide computational techniques (algorithms) for the approximate solutions of exact mathematical problems. Numerical-analysis techniques, or numerical methods, are used to put complex mathematical problems on digital comput­ ers and to obtain approximate solutions to otherwise unsolvable problems. One branch of numerical analysis. finite-difference cal­ culus, is used to approximate functional relationships and their de­ rivatives at a series of discrete (discontinuous) points. Such points can be measured in laboratory experiments or field observations, or they can be generated in the numerical solution of differential equa­ tions. Finite-difference calculus is related to differential calculus through the Taylor series expansion. Linear algebra deals with the solution of systems of linear equa­ tions. One source of linear-equation problems in reservoir engineer­ ing is the approximation of continuous differential equations by fi­ nite-difference equations. 3.2 Basic Differentia l Calculus

Although a complete review of differential calculus is beyond the scope of this book, differential calculus forms the mathematical basis 38

for describing recovery processes observed in hydrocarbon reser­ voirs. Because practicing simulation engineers rarely directly apply differential calculus teehniques, this text does not discuss the theory of differential calculus. It considers only the methods used directly to derive. simplify, and expand reservoir-simulation equations. 3.2.1 Derivatives and Differentiation. First Derivative.

In many engineering applications. knowledge of a function's value is insuffi­ cient to solve a given problem. Additional information, such as the rate at which the function changes, is often required before a solu­ tion can be obtained. This is apparent in Darcy's law for the steady­ state flow of gas to a wellbore, q X5C

_ -

- 2 n{3c khr dp "' g Bg dr

............

.

.

......

. .

. . (3. 1 )

Substituting the definition of Bg given in Eq. 2 . 8 3 results in qgsc

_

-

-

2 n Q c{3c k hr T,c p dp II TPsc Z dr' r- g

. . . . . . . . . . . . . . . . (3.2)

In this example, the pressure, p, is a function of the spatial variable, r. The gas flow rate, qgsc . cannot be determined from the knowledge of pressure alone. The derivative, dp/dr, must also be known. To obtain the formal definition of the derivative of a continuous function f(x), let f(x) be a continuous function of x. Then

[

df = lim �x dx LI.t-O

+

]

�x ) - f(X) ' �x

·

. . . . . . . . . . . . . (3.3) .

.

.

where lim = the limiting value inside the brackets as � approaches zero. Example 3 . 1 illustrates this process. Example 3. 1. Solution.

Determine the derivative of f(x) = x2 using Eq. 3.3.

[

df = lim �x dx 1\.,-0 df = lim or dx ill-O .

[(X

+ +

�x) �x

-

f(X)

]

.

2 �X ) - X 2 . �x

]

·

. . . . . . . . . . . . . . . . (3.3)

·

.

. . . . . . . . . . . . . . . (3 .4)

B ASIC APPLIED RESERVOIR SIMULATION


TABLE 3.1 -COMMON FUNCTIONS AND TH EIR DERIVATIVES (abridged from Ref. 2) Comments 1

(d/dx)A = O

2

(d/dx)x= 1

3

(d/dx)Ax= A

4

(dldx) ( u + v� w) = (duAlx) + (dv/dx) � (d w/dx)

5

(d/dx) uv= u(d v/dx) + v(d u/dx)

A = constant A = constant

P roduct rule

6

(d/dx) uvw = uv(dw/dx) + uw(d vAlx) + vw(d u/dx)

7 8

(d/dx) ( u/v) = [ v(d u/dx) � u(d v/dx) ]/ V! = ( 1 /v)(duAlx) � ( u/ V!)(dv/d x) (d/dx) un = nun- 1 (d uldx)

9

(d/dx) !ii =

[

(

1/ 2

ru

)}

d U/dX)

12 13

(dldx) unvn = ( un- 1 ) ( vn- 1 )[nv(d u/dx) + nu(d vAlx)]

14

(d/dx)[(U1 li2U3 "

11

u = u(x) u = u(x)

(dldx) ( 1 /u) = ( � 1 /u2)(du/dx) (dldx)(1 /un) = ( � nJUn + 1 )(du/dx) (d/dx) ( un/vn) = ( un- 1 /vn + 1 )[nv(du/dx) � nu(d v/dx)]

10

P roduct rule Quotient rule

. vm )] = [( U1 U2 U3 " . Un )/( V1 V2 V3 . . . vm ) ]

. Un )/( V1 V2 V3 "

U = u(x) u = u(x) U = u(x) , V = v(x) u = u(x) , V = v(x) Combined product and quotient rules

x [ ( 1 / U1 ) (du1 /dx) + ( 1 /U )(du /dx) + ( 1 /U3)(duydx) + . . . ( 1 /u )(du /dx) n n 2 2 - ( 1 / V1 )(dv1 /dx) � ( 1 /V2 ) ( d v2/dx) - ( 1 / V3)(dvydx) � . . . ( 1 /vm )(dvm/dx)]

15

(d/dx) [f( u)] = (df/du)(du/dx)

16

(d2/dx2)[ f( u)] = (df/du) ( d2 u1dx2) + (d2f/d u2)[ (du/dx)2]

17

(d u/dx) = 1 /(dx/du)

18

(d/dx)109A U = (loQA e)( 1 /u)(duldx)

Chain rule

(dx/du) ;,, 0 A ;" 1

19

(d/dx)(10ge U) = ( 1 /u)(du/dx)

20

(d/dx)Au= AU(10geA)(duldx)

21

(d/dx)eu= eU(du/dx)

22

(d/dx) uv= vuv- 1 (du/dx) + (I0ge u) uV(d v/dx)

A = constant u= u(x) U = u(x) , V = v(x)

23

(d/dx)(sin u) = (cos u)(du/dx)

u = u(x)

24

(d/dx)(cos u) = � (sin u) (d uldx)

u = u(x)

25

(d/dx) (tan u) = (sec2 u)(duldx)

u = u(x)

26

(dldx)(cot u) = - (csc2 u)(d u/dx)

u = u(x)

27

(d/dx) (sec u) = (sec u)(tan u)(d uldx)

u = u(x)

28

(d/dx) (csc u) = - (csc u)(cot u)(duldx)

u = u(x)

29

(d/dx) (arc sin u) =

30

(d/dx) (arc cos u) =

31

(d/dx)(arc tan u) = [ 1 /( 1 + u2)](d uldx)

32

(dldx)(arc cot u) = [ � 1 /( 1 + u2)] (du/dx)

33

(d/dx) (arc sec u) =

34

(d/dx) (arc csc u) =

( (

)

1 / � (d U/dX) �

1/j

)

� u2 (du/dx)

� 1 / u if -

O � arc cos u � :n: - ;7t/2 � arc tan u � ;7t/2

[ ( � )} [ ( j 1) ] 1/ u

- ;7t/2 � a rc sin u � ;7t/2

o � arc tan U � ;7t

d U/dx) (du/dx)

o � arc sec u � ;7t/2 , � ;7t � arc sec u< � ;7t/2

O � arc csc u � ;7t/2 , - ;7t � arc csc u � - ;7t/2

35

(d/dx)(sinh u) = (cosh u) (du/dx)

u = u(x)

36

(d/dx)(cosh u) = (sinh u) (duldx)

u = u(x)

37

(d/dx) (tanh u) = (sech2 u)(du/dx)

u = u(x)

38

(d/dx)(coth u) = (csch2 u)(du/dx)

u = u(x)

39

(d/dx) (sech u) = - [(sech u)(tanh u)(du/dx)]

u = u(x)

40

(d/dx) (csch u) = - [(csch u)(coth u)(du/dx)]

u = u(x)

B ASIC MATHEMATICAL CONCEPTS

39


Expanding the numerator yields

Solution.

Let f(r) = r(dp/dr). Then Eq. 3 . 1 3 becomes

1

. . . . . . . (3.5)

df (3. 14) r dr = 0 . Now, let g(r) = r and h(r) = dp/dr. Then dgldr = 1 and dh/dr = d2p/cJTl. From the product rule,

�� = g(r) : + h(r) :;.

simplifying this expression gives . . . . . . . . . . . . . . . . . (3.6)

lim (2x + Ax) . or df = &-0 dx

. . . . . . . . . . . . . . . . . . . . . . . . . (3.7)

As Ax approaches zero, the second term in the parentheses becomes zero and . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (3.8) Calculus textbooks give the standard formula for the first derivative of functions of the form f(x) = xn as (3.9) Table 3.1 lists several common functions with their first deriva­ tives. Although calculating derivatives of simple functions is be­ yond the scope of this book, this table is provided to aid in the given examples and exercises. Elementary differential-calculus texts pro­ vide more comprehensive tables. Table 3. 1 gives several important rules of differentiation, such as the product (multiplication) rule and quotient (division) rule. The following sections discuss these rules in more detail. Product Rule. The product rule gives the derivative of a function composed of the product of two simple functions. Let (3. 10) f(x) = g(x)h(x),

then,

df = g(x) dh dx dx

+

h(x)

dg dx '

. . . . . . . . . . . . . . . . . . . . (3. 1 1 )

Example 3.2. Use the product rule to calculate the derivative of f(x) = x2 sin (x), with respect to x. Solution. Let f(x) ......... . . . . . . . (3 . 1 0) g(x )h(x),

.. ....... . ...

=

g(x) = x2, and h(x) = sin(x). From Table 3 . 1 , dg/dx = 2x and dh/ dx = cos(x). Then, from the product rule, df = g(x) dh dx dx

+

or :� = x2 cos(x) Example 3.3.

( )

dg h(x) dx +

2x sin(x).

. . . . . . . . . . . . . . . . . . . . . . . (3. 1 1) . . . . . . . . . . . . . . . . . . . (3. 12)

The Laplace equation,

} :r r : = 0, . . . . . . . . . . . . . . . . . . . . . . . . . . . . (3. 1 3) describes the steady-state-pressure distribution in the vicinity of a wellbore caused by the withdrawal of an incompressible fluid from a homogeneous reservoir. Use the product rule to expand the left side of this equation. 40

. . . . . . . . . . . . . . . . . . . . . . . (3. 15)

Substituting the definitions of g(r) and h(r) and their derivatives gives df = r d 2p + 1 dp (3. 1 6) dr dr2 dr· Finally, substituting into Eq. 3 . 1 4 yields

( :?z 1 :) = 0

} r

+

. . . . . . . . . . . . . . . . . . . . . . . . (3. 17)

d 2p 1 dp +r dr = 0, . . . . . . . . . . . . . . . . . . . . . . . . . . . . (3. 1 8) dr2 where d2p/dr2 = second derivative of pressure with respect to radius. Higher-order derivatives discussed later. or

are

Quotient Rule. The quotient rule gives the derivative of a func­ tion composed of a simple function divided by another simple function. Let

f(x) = g(x) / h(x),

(3. 19)

h(x)(dg /dx) - g(x)(dh /dx) then, df = . dx [h(x)] 2

. . . . . . . . . . . . (3.20)

Example 3.4. Use the quotient rule to calculate the derivative of f(x) = sin(x)/x2 for x > 0 with respect to x. Solution. Let f(x) = g(x)lh(x), . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (3. 19) g(x) = sin(x), and h(x) = x2. From Table 3 . 1 , dgldx = cos(x) and dh/ dx = 2x. Then, from the quotient rule,

df = h(x) ( dg / dx) - g(x) (dh / dx) dx [h(x)] 2

. . . . . . . . . . . . . . . (3.20)

and substituting the definitions of g(x) and h(x) and their derivatives yields df x2 cos(x) - 2x sin(x) (3.2 1 a) dx X4 •

=

2 sin(x) or df = x cos(x) . x3 dx

. . . . . . . . . . . . . . . . . . . . (3.21b)

Example 3.5. Use the quotient rule to obtain an expression for the compressibility of a real gas. Solution. The definition of isothermal compressibility is cg

= - V1 dV dp 1 r.

(3.22)

Substituting the real-gas law, pV = znRT, results in cg

eA.(�)

= - Z dp P '

(3.23)

. . . . . . . . . . . . . . . . . . . . . . . . . . . (3.24) BASIC APPLIED RESERVOIR SIMULATION


Let f(p) = zip. Then cg

=

_

1 df

Solution.

Let

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (3.25)

f dp·

Also, let g(p) = z and h(p) = p. Then dg/dp = dzldp and dh/dp = 1 . From the quotient rule, Eq. 3 .20, df = p( dz/ dp ) - z dp p2

. . . . . . . . . . . . . . . . . . (3.34) where f(p) = p//Agz. Then dTgx Ax kx Tsc df dp = {J a c � x PsJ dp ' C

(3.26) . . . . . . . . . . (3.27)

In this example, dz/dp must be determined from laboratory data (table look-up of experimentally derived z factors) or through differ­ entiating z-factor correlations. Gas compressibility is a required property in pressure-transient analysis of gas well s.

Let

n

,\p

)

g l (P) h - 1( p )h ip ) ' _

df = L dp /1g Z p

Combined Form of the Product and Quotient Rules.

g l (x)gix)g 3 (x) . . . gn(x) f(x) = (x)h (x)h ) h1 lt . . . h m(x) ' 2

_

(dh 1 /dx) h 1 (x)

_

(dh 2 /dx ) hix )

. . . . . . . . . . . . . . . (3.28)

( dh 3 /dx) h 3 (x)

_

_

. . .

_

( dh m /dx) . h m (x)

Example 3.6. Use the combined product and quotient rules to cal­ culate the derivative of f(x) = x2 sin(x)/e2x with respect to x. Solution. Let

(3.30) where g\ (x) = x2, g2(X) = sin(x), and h\(x) = e2x. From Table 3 . 1 , dg\/dx = 2x, dg2/dx = cos(x), and dh\/dx = 2e2x. Then, from the combined product and quotient rules, Eq. 3.29.

[

d f = x2 sin(x) 2X dx elt x2

+

cos(x) sin(x)

_

]

_

[

Example 3. 7.

dium to gas is

+

]

cot(x ) - 2 .

__

df = 1 dp /1 g Z

The single-phase transmissibility of a porous me­

_

L df1 g

/1i z dp

where {Jc, ae, Ax, kx• /lx. T,e ' Pse, and T are constant and where /Ag ' P, and z are functions of pressure. In reservoir simulation. transmissibility is a measure ofthe capacity of a fluid to flow through the reservoir rock. One method of solving reservoir-simulation equations for gas (com­ pressible flow) is the generalized Newton-Raphson method, which is discussed in Chap. 5. The generalized Newton-Raphson method re­ quires the derivative of transmissibility with respect to pressure. Use the combined product rule and quotient rule to obtain this derivative.

_

(dZ/dP) Z

)

. . . 7 • • • • • • • • • • (3 3 )

_

� dz /1 g Z 2 dp ·

(3.38)

(3 . 39) Chain Rule. The chain rule gives the derivative of a function com­ posed of a complex form of two simple functions. Let

f(x ) = g[h(x)],

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (3.40)

dg dh then df = dx dh dx·

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . (3.4 1 )

Example 3.S.

Calculate the derivative of f(x) = siner) . Use Eq. 3.40, where g(h) = sin(h) and hex) = x2. From Table 3 . 1 , dg/dh = cos(h) and dh/dx = 2x. Then, from the chain rule, Solution.

df dg dh dx = dh dx '

or

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (3.4 1 )

�: = cos(x2 ) 2x,

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . (3.42a)

�: = 2x cos (x2) .

. . . . . . . . . . . . . . . . . . . . . . . . . . . (3.42b)

Example 3.9. The oil stored in an undersaturated reservoir at Siw expressed in field units is

. . . . . . . . . . . . . . . . . . . . (3.33)

BASIC MATHEMATICAL CONCEPTS

( df1 g/ dp ) /A g

Then, the derivative of gas transmissibility becomes

. . . . . . . . . . . . (3 . 3 1 )

. . . . . . . . . . . . . . . (3.32)

(3.36)

or, after simplification,

After simplifying.

df x2 sin(x) 2 dx - � x

_

]

. . . . . . . . . . . . . . . . . . . (3.29)

2 e lx ' e lx

........................"

g] (p) = p, h l (P) = /1g , and h2 (P) = Z. Then dgJ/dp = 1 , dh ]ldp = df1gldp, and dh2/dp = dzldp. Then, from the combined product and quotient rules, Eq. 3.29,

(1

A combina­ tion of the product and quotient rules gives the derivative of a func­ tion composed of the product of several simple functions divided by several other simple functions. Let

. . . . . . . . . . . . . . . . . . . . (3.35)

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (3.43)

or

N

=

(1 -

Siw ) 1/> Vb

a c Bo

.

. . . . . . . . . . . . . . . . . . . . . . . . . . (3.44)

Assuming that both the reservoir rock and irreducible water are in­ compressible, at what rate will the reservoir pressure decline if oil is removed at a constant rate of %sc ? 41


Solution. First, recall that by definition, oil-production rate equals the rate of removal of oil from the reservoir; that is,

(3.45) Eq. 3.45 implies that the production rate is negative as the amount of oil in the reservoir decreases. Expressing dNldt with the chain rule, dN dN dp = dp d( dt

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (3.46)

Differentiating Eq. 3.44 with respect to p and observing that reser­ voir rock and irreducible water are incompressible yields

Similarly, derivatives of an order greater than two can be obtained by applying the formula

( )

dnf _ d dn - I f dxn - dx dxn - I

. . . . . . . . . . . . . . . . . . . . . . . . . . (3.56)

Example 3. 10. Find the second derivative of f(x) = sin(x). Solution. Let f(x) = sin(x) . From Table 3. 1 , df/dx = cos(x) and

()

d2f df = � dx dx dx2 Also from Table

= � [cos(x)] . dx

3. 1 , d2f/dx2 =

-

(3.57)

sin(x).

(3.47) Let f(P) = I IBo or f(p ) = B;; I . Then, df I dB o = - B � dP dp

(3.48)

(note the implicit use of the chain rule in this step) ; therefore,

(I

-

Sin,)1/> Vb ..l. dB o a,.

Substituting into Eq. dN dt

(I

-

. . . . . . . . . . . . . . . . (3.49)

B � dp '

3.46 gives

S in,)1/> Vb ..l. dB o dp a"

Substituting into Eq.

B � dp dt '

.

.

.

.

I +

c�; _ Pb) '

.

.

.

.

.

.

.

.

which, upon differentiation (with Rule

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

(2.81)

10 in Table 3. 1 ), gives

. . . . . . . . . . . . . . . . . . . (3.53) (note that Bob is constant). Substituting Eqs. 3.52 results in

2.81 and 3.53 into Eq.

. . . . . . . . . . . . . . . . . . . . . . . . (3.54) which describes the rate of pressure decline in a volumetric, under­ saturated oil reservoir.

Higher-Order Derivatives. Higher-order derivatives of a func­ tion are defined as derivatives of the function 's lower-order deriva­ tives. For example, the second derivative of a function f(x) is the de­ rivative of the first derivative. That is, d2f d = dx2 dx 42

( )

df . dx

]

f( X ,y + fly) - f(X.y) af = . lim ay 6,\'-0 fly

. . . . . . . . . . . . (3.59)

. . . . . . . . . . . . . (3.5 1 )

. . . . . . . . . . . . . . ( 3 5 2)

.

. . . . . . . . . . . . . . (3.58)

These definitions state that the partial derivative of a function of more than one variable with respect to one of the variables can be obtained by fixing all other variables constant and differentiating with respect to the variable of interest. All rules of differentiation discussed earlier are valid for partial differentiation. Examples 3. 1 1 through 3 . 1 3 illustrate this principle.

Above the bubblepoint pressure, the oil-phase formation volume factor (FVF) can be approximated by Bo =

[

]

and

and solving for dpldt yields .

[

af = lim f( X + Lll , y ) - f(X ,Y) ax Lll 6x-0

. . . . . . . . . . . . . (3.50)

3.45 gives

dp dt

3.2.2 Partial Differentiation. Partial Derivative. All the discus­ sion on differentiation so far has been directed toward the functions of one variable. For functions of more than one variable [for exam­ ple, f(x,y)]. the concept of partial differentiation must be discussed. The following is the formal definition of the partial derivative of a function of two variables. Let f(x,y) be a continuous function of the variables x and y. Then

. . . . . . . . . . . . . . . . . . . . . . . . . . . . (3.55)

Example 3.11. Find the partial derivatives of f(x,y) = x2y4 with re­ spect to x and y. Solution. Holding y constant and differentiating with respect to x leads to a flax = 2xy4. Holding x constant and differentiating with re­ spect to y leads to aflay = 4x2y3. Example 3. 12. Use the chain rule to find the partial derivatives of f(x,y) = sin(x2y4) with respect to x and y. Solution. Let f(x,y) :: g[h(x,y)) , where g[h] :: sin(h) and h(x,y) :: xli. From Example 3 .1 1 , ah/ ax = 2xy4 and ah/ay = 4x2y3 . The chain rule for functions of two variables is af _ dg ah ax - dh ax and

(3.60)

dg ah af = ay dh ay'

From Table 3 . 1 , dg/dh

(3.6 1 ) =

cos(h); therefore, ( 3 62) .

. . . . . . . . . . . . . . . . . . . . . . . (3.63) Example 3.13. Find the partial derivatives of oil in place with re­ spect to pressure and saturation for reservoirs undergoing simulta­ neous pressure and saturation changes. (Remember that Si w and So were assumed constant in Example 3.9.) In this example, let So vary with respect to time. BASIC APPLIED RESERVOIR SIMULATION


Solution.

The remainder term

In Eq. ample

3.43 the only saturation-dependent function is So . From Ex­ 3.9,

iJN 1 dBo = iJp � B� dj)'

So</> Vb

. . . . . . . . . . . . . . . . . . . . . . (3.64)

</>Vb

. . . . . . . . . . . . . . . . . . . . . . . . . (3.65)

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (3.66)

1

RN+ I =

(N + l ) !

(x - x o)

N N+ I d + lf dx. d xN + l

. . . . . . . (3.72)

When the remainder term is included in the expansion, the Taylor se­ ries is an exact representation of f(x). If the expansion is carried out for a finite number of terms and the remainder is ignored, then the Taylor series expansion is only an approximation of f(x). That is, N '\' (x - xo) n d"f f(x) "'" f(xu ) + L n! dxn' =

Note that Bo is a function of pressure only ; therefore, its derivative is an ordinary derivative, not a partial derivative. Taking the partial derivative of N (as expressed by Eq. 3.43) with respect to So yields iJN ..J!... (S ) = iJSo a ,. B o dSo 0

f

x

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (3.43)

n

. . . . . . . . . . . . . . . (3.73)

1

O?

Example 3. 15. What is the exact Taylor series expansion of f(x) = eX about the point Xo = Solution. Let f(x) = eX and Xo = O. From Table 3. 1 , df/dx = eX. It can be shown recursively that all the higher-order derivatives of f(x) = eX are

(3.74) Total Derivative. The chain rule can also give the total derivative of a complicated function of two or more simple functions of a single variable. Let f[g(t),h(t)] be a continuous function of the sim­ ple functions get) and h(t), then of dh of dg df = + og dt dt oh dt '

where n =

eX

)

ON dSo oN dP . + op dt oSo dt

. . . . . . . . . . . . . . . . . . . (3.68)

Substituting the results of Example 3.68, yields

Eq.

3.13, Eqs. 3.64 and 3.66, into

. . . . . . . . . . . . . . (3.69)

3.2.3 Taylor Series Expansion. One of the most useful tools in nu­

merical analysis is the Taylor series expansion, which provides a means for converting most well-behaved functions into simple polynomials. This method is based on the fundamental theorem of calculus coupled with simple integration by parts and has the form 0

I!

Evaluating e X at xo

xo) e Xo

+

xo) Xo 2! e

(x -

3.70 yields +

. . .

2 (x - x u) df (x - xo) d 2 f + . . . + 2! I ! dx d x2

. . . . . . . . . . . . . . . . . (3.70) where f(x) has N+ I continuous derivatives evaluated at x = Xo . Eq. 3.70 can be written in a more compact form as

f

(x - x u) n dnf R f(x) = f(xo) + L n ! d xn + N + I ' n=1

BASIC MATHEMATICAL CONCEPTS

= 0, eXo = eO = 1. Substituting into Eq. 3.75 gives

eX

=

I

X x2 x3 xN R + IT + 2! + 3 ! + . . . + N! + N+ I

eX

=

1

+

. . . . (3.76a)

N

I �n . + RN + I '

n= 1

where RN+ l is defined by Eq.

(3.76b) 3.72.

Example 3. 1 6. Find the fourth-term (N = 3) and sixth-term (N = 5) approximations of e (the base of the natural logarithm). This is identical to approximating eX for x = 1 . Solution. From Example 3. 1 5, the fourth-term approximation of e X becomes

eX - 1 _

) + " 11(x) = & l'(x

(x -

+

2

. . . . . . . . . . . . . . . . . . . (3.75)

or

(

e Xo

. Substituting into Eq.

(3.67)

Example 3. 14. Find the expression for the production rate from an oil reservoir undergoing simultaneous saturation and pressure changes. Solution. Because saturation and pressure are both functions of time, Eq. 3.67 applies as

=

=

1 ,2,3, . . .

+

X

IT

+

x2

2!

+

x3

3!

+ R4 •

. . . . . . . . . . . . . . . . . (3.77)

Ignoring the remainder term and setting x= 1 gives e e1 "'" 1 + I I I + 1 /2 + 1 /6• or e ""' 2.66667. The sixth-term approximation of e is =

. . . . . . . . (3.78) Ignoring the remainder term and setting x = 1 gives e = e 1 "'" 1 + I I I + 1 /2 + 1 /6 + 1 /24 + 1 / 1 2 0 , or e "", 2.7 1 667. The value of e (to 10 decimal places) is 2.7 1 828 1 8284.

Example 3. 1 7. Find the second-term approximation to the deriva­ tive of an arbitrary function, f(x). Solution. From Eq. 3.70, f(x) = f(x u ) +

(x - xo) df + R2· dx

-I !-

( 3. 7 9)

Ignoring the remainder term and solving for dfldx yields f(x) - f(xo) df . "'" (x - xo ) dx

( 3.8 0)

. . . . . . . . (3.7 1 ) 43


3.3 Basic Differential Equations

Differential equations are equations that relate an unknown function to the derivatives of the function and, possibly, to a known function. The simplest example of a differential equation is dp = dt

�p, t),

(3.8 1 )

where pet) = the unknown function and f(p, t) = the known function. Examples of equations of this type used in the petroleum industry include the pipe-flow equation and Muskal's l method for solution­ gas-drive reservoirs. The pipe-flow equation, which is used to model the flow of fluids through a length of pipe or tubing, is derived by performing an ener­ gy balance through a control volume of the pipe. For a horizontal pipe (ignoring acceleration effects), the energy balance has the form dp

=

dt

!",P v2 2Dgc '

2

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (3 . 8 )

A second, more complicated example of a differential equation of the type shown in Eq. 3.8 1 is Muskat's equation for solution-gas­ drive reservoirs. Muskat derived the following equation to predict future reservoir performance of solution-gas-drive reservoirs (see Sec . 1 1 .2.2 of Chap. 1 1):

(3.83) where So (p) = the unknown function and the right side of the equation is the known function. The right side includes the derivatives dRsldp, dBoldp, and dBgldp, which are assumed to be known from PVT anal­ yses. Other examples of differential equations used in the petroleum industry, but not of the form shown in Eq. 3.8 1 , include the following. I . The steady-state-pressure-distribution equation (the Laplace equation).

2 + r dr = O.

d2p dr

2.

dp

I

.

.

. . . . . . . . . . . . . . . . . . . . . ... . .

(3. 1 8)

The weJl-test equation (the diffusivity equation) .

1 Cl r

or

( ClP ) r

or

</>tl c,

Clp

(3.84)

= {3,a, ai' k

3. The equations used in reservoir simulation, including

=

al fut L'

( )

</> S o . B 0

( 1:�) 2 1� (1�r (1�f +

f = 0

+

and

. .

f =

O.

. . . . . . . . . . . . . . . . . . . . . (3.86)

. . . . . . . . . . . . . . . . . . (3.87)

Ordinary- and Partial-Differential Equations (PDE's). Ordinary­ differential equations contain only ordinary derivatives. Eqs. 3.82, 3.83, and 3.18 are all ordinary-differential equations. PDE's contain partial derivatives of the dependent variable with respect to the inde­ pendent variables. By definition, therefore, PDE's contain more than one independent variable. Eqs. 3.84 and 3.85 are examples of PDE's with independent variables r and t and x, y, and t, respectively. Linear and Nonlinear Differential Equations. Linear differen­ tial equations contain linear differential operators. The formal defi­ nition of a linear operator, L, is L(x + y ) = L(x) + L(y) .

. . . . . . . . . . . . . . . . . . . . . (3.88)

For the equations we will be working with in reservoir simulation, a less formal definition of a linear differential equation is a differen­ tial equation in which all the coefficients are either constant or func­ tions of only the independent variables. Nonlinear differential equa­ tions do not satisfy Eq. 3.88. With this definition, Eq. 3.84 is linear (assuming that </> , ,u , Ct, and k are all constant), while Eq. 3.85 is non­ linear. Linearization is the process of transforming a nonlinear equa­ tion into the form of a linear equation.

3.3.2 Solution of Differential Equations. The solution of a differen­ tial equation is a function that does not contain any derivatives with respect to the independent variables, that satisfies any specified conditions, and that satisfies the relationship defined by the differen­ tial equation. Example 3. 1 8 illustrates this best.

Example 3. 18. The rate of pressure decline in an aquifer under pseudosteady-state conditions may be modeled by the ordinary-dif­ ferential equation

. . . . . . . . . . . . (3.89) . . . . . . . . . . . . . . . . . . . . . . . . . . . (3.85)

3.3. 1 Basic Definitions. Dependent and Independent Variables. Two types of variables, dependent and independent, appear in all differential equations. The unknown functions in the differential equation are the dependent variables of the equation . The deriva­ tives in the differential equations are always taken with respect to the independent variables. In Eq. 3 . 82, p is the dependent variable and I is the independent variable. The term is assumed to be a known function of p and I. In Eq. 3.85, Po and So are the de­ pendent variables and x, y, and t are the independent variables. The other terms in Eq. 3.85 (kro , kx, ky, tlo , Bo , qosc , </>, and Vb) are param­ eters and known functions of the equation. Order and Degree of a Differential Equation. The order of a differential equation is defined as the order of the highest-order de­ rivative that appears in the equation . Eqs. 3.82 and 3.83 are both first-order differential equations because only the first derivative

!",P v 2/2 Dg,

44

appears in these equations. Eqs. 3. 1 8, 3.84, and 3.85 are all second­ order differential equations because they contain the second deriv­ ative of the dependent variables. (Perform the chain rule on the left sides ofEqs. 3.84 and 3.85, as i n Example 3.3, to obtain the second derivative explicitly). The degree of a differential equation is the power of the equation's highest-order derivative. All the previously discussed differential equations are first-degree equations. The degree of a differential equation must be a whole number, not a fraction. Examples of se­ cond-degree equations include

are

where the subscript aq = aquifer, the subscript R = reservoir, K(lq = aquifer constant, and aJl pressures corrected to a common da­ tum. Determine an equation that defines pressure as a function of time for pseudosteady-state aquifers. For this example, assume an instanta­ neous pressure drop in the reservoir (i.e., PR is a constant and pR <Pelq )' Solution. Eq. 3.89 can be rewritten as

dPaq

dt + C·P aq = C.PR' where

C' =

a , Kaq caq</>lIq Vaq'

(3.90)

.

. . . . . . . . . . . . . . . . . . . . . . . . (3.9 1 )

In Eq. 3 .90, P(lq = the dependent variable, t = the independent vari­ able, C' = a parameter, and PR = a known function that is constant (in this example). For an instantaneous drop in reservoir pressure, the general solution to this equation is P ai t) = PR +

C 1e - C't,

2

. . . . . . . . . . . . . . . . . . . . . . . (3 .9 )

BASIC APPLIED RESERVOIR SIMULATION


where C I = an arbitrary constant (with the units of pressure). This solution can be verified easily by taking the derivative of Eq. 3.92 and substituting both the derivative and Eq. 3 .92 into Eq. 3 .90. Note that in this example, Eq. 3 .92 represents a family of solu­ tions. This is because the constant C I can be chosen arbitrarily and the original differential equation will be satisfied. Each value of C I provides a particular solution to the differential equation. To determine the solution that governs the pressure decline for the aquifer of interest, an additional piece of information is required: the initial value of the aquifer pressure, which is used to determine the appropriate value of C I . At t = 0, Paq from Eq. 3 .92 must equal the initial reservoir pressure, Pi ; therefore,

assumed that a no-flow boundary exists at some distance away from the reservoir. Mathematically, this can be stated as

ap o an

ap g an

ap w = 0' . . . . . . . . . . . . . . . . . . . . . . . (3.96) an where the variable n = direction normal (perpendicular) to the reser­ =

=

voir boundary. It is obvious that if all gradients across a reservoir boundary are equal to zero, then that boundary is a no-flow bound­ ary. Boundary conditions that specify a derivative on a boundary are referred to as Neumann-type boundary conditions. For interior boundaries, either well rates or bottomhole pressures can be specified. If a rate is specified for the well, Darcy's law can be used to generate a Neumann-type boundary condition,

(3.93) or C 1 = Pi - PR .

(3.94)

Substituting into Eq. 3 .92 yields _

+

( Pi

- PR ) e

- C'(

. . . . . . . . . . . . . . . . . . . . . (3.97) If the pressure is specified for the wellbore, then a Dirichlet-type boundary condition is obtained.

. . . . . . . . . . . . . . . . . (3.95)

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (3.98)

which is a solution to the equation presented by Eq. 3 .90 because it is a function that does not contain any derivative and because it satis­ fies the initial condition and the differential equation (Eq. 3.90).

Well behavior can be specified in many ways. These include specify­ ing the top hole pressures, maximum well rates subject to various constraints, pump and surface facility capacities, and so on. Sophisti­ cated well-management routines, which may take several thousand lines of FORTRAN computer code, are generally incorporated into com­ mercial reservoir simulators to convert the complex well specifica­ tions into the simple form of either Eq. 3 .97 or Eq. 3.98. Sec. 4.5 in Chap. 4 discusses detailed treatment of initial and boundary condi­ tions in reservoir simulation. Chap. 6 discusses the basics of convert­ ing well specifications to the form of Eq. 3.97 or 3.98.

Paq ( t) - PR

,

3.3.3. Initial and Boundary Conditions. Although the details of obtaining analytical solutions to differential equations are beyond the scope of this book, the basic idea is to integrate the derivative in the equation to obtain an explicit expression for PlI q in Example 3 . 1 8 . The constant C I in the general solution (Eq. 3 .92 in Example 3 . 1 8) is related to the integration constant discussed in most elemen­ tary textbooks on integral calculus. Second-order ordinary-differ­ ential equations require two such integrations, so they yield two in­ tegration constants. Consequently, two additional pieces of information are required to specify the constants and obtain a unique solution to the differential equation. In general, each derivative in the equation requires one integration constant and, in tum, one addi­ tional piece of information. The additional information required to obtain a unique solution to a given differential equation are the initial and/or boundary conditions of the problem. These conditions are so called because they can only be known either initially or on the boundaries. For example, to deter­ mine the solution of the diffusivity equation (Eq. 3.84) uniquely, one initial condition (because of the first derivative with respect to time) and two boundary conditions (because of the second-order derivative with respect to radius) are required. In well-test applications, the boundary conditions at the wellbore (either a constant-pressure or -rate well) and at the external radius (infinite-acting reservoir or no­ flow or constant-pressure outer boundary) are specified. For reservoir-simulation problems, the requ ire d initial conditions are initial reservoir pressure and saturation distributions. In most sim­ ulation studies, the initial conditions are obtained by assuming initial capillary/gravity equilibrium. In this mode of initialization, the pres­ sure distribution is obtained by specifying the pressure at a given da­ tum depth and using the fluid pressure gradients to determine pressur­ es at all other depths. The initial saturation distributions are then obtained with fluid contacts and capillary pressure relationships. Oth­ er valid initial conditions may include watered-out (or gassed-out) conditions before an enhanced-oil-recovery project or dynamic initial conditions (such as those required for a tilted oiUwater contact). The boundary conditions used in reservoir simulators can be quite complex because the differential equations solved by reservoir sim­ ulators require that all boundaries be specified. This includes both exterior boundaries (reservoir limits) and interior boundaries (pro­ duction and injection wells). For exterior boundaries, it is generally BASIC MATHEMATICAL CONCEPTS

�3.4 Vector Differential Operators. The vector differential operator,

V,

is a compact form for expressing differential operations. It has com­ ponents similar to vectors (which are discussed later); but, like all oper­ ators, it is used to operate on external functions. The gradient operator (which operates on a scalar function of the variables x, y, and z) is

Vs

=

��T + �p ��k. +

. . . . . . . . . . . . . . . . . . . . . (3 .99)

The gradient operator obeys the distributive law but not the commu­ tative or associative laws. That is,

Vh but or

+

S2)

VS 1

=

VS 2

+

(3 . 1 00)

Vs '" sV,

(3. 1 0 1 )

)

(VS 1 S 2 '" V(S IS2 ) .

(3. 1 02)

The divergence operator, sometimes referred to as the dot product, operates on a vector, v = (V I , V , V3 ), which is a function of the vari­ 2 ables x, y, and z. This operator is defined as

V.v

=

� ax

aV 2 ay

+

av) az .

+

(3. 1 03)

The divergence operator follows the same laws as the gradient operator. The Laplacian operator operates on a scalar function of the vari­ ables x, y, and z, and is obtained by taking the divergence of the gra­ dient of the scalar function, s . That is,

( ) = axa2s2

V. Vs

+

a2s ay 2

+

a2s . az2

(3. 1 04)

The collection of differential operators operating on the fun�ion s on the left side of Eq. 3 . 1 04 is called the Laplacian operator, or

V2,

�2

V

=

a2 ax2

+

a2 ay 2

+

a2 · az2

. . . . . . . . . . . . . . . . . . . . . . (3. 1 05)

Again, like the gradient and divergence operators, the Laplacian op­ erator follows the distributive property. 45


TABLE 3.2-TABULATED VALUES OF sin(x) AND cos(x) AT DISCRETE VALUES OF x

Node

f(x)

Xj - 2

XI - 1

Fig. 3.1 -Discrete points used in finite-difference approximations. With this notation, Eqs. 3 . 1 8, 3.84, and 3 . 85 can be rewritten, re­ spectively, in the compact forms

�2

V ,p

and

=

0 (0°)

0.0000

1 .0000

2

.n/1 2 ( 1 5°)

0 .2588

0. 9654

3

.n16 (30°)

0 .5000

0.8660

4

.n14 (45°)

0.7071

0.7071

5

.n/3 (60°)

0.8660

0.5000

6

51r/1 2 (75°)

0. 9654

0.2588

7

.n/2 (90°)

1 .0000

0.0000

8

7.n/1 2 ( 1 05°)

0 . 9659

- 0.2588

9

2.n/3 ( 1 20°)

0 .8660

- 0. 5000

10

3.n/4 ( 1 35°)

0 . 7071

- 0.7071

11

51r16 ( 1 50°)

0 .5000

- 0.8600

12

1 1 .n/1 2 ( 1 65°)

0 . 2588

- 0.9659

13

.n ( 1 80°)

0 . 0000

- 1 .0000

Forward-Difference Operator. The forward-difference operator,

A, operating on a function, f(Xi),

. . . . . . . . . . . . . . . . . . . . . . . . . . . (3 . 1 07)

In Eq. 3 . 1 09, Xi and Xi+ l = the discrete points and f(Xi ) and f(Xi+ l ) = the functional values at these discrete points. Similarly, the second-order forward-difference operator is defined as

+

--v;;- =

1

iJ "'S

iii

Eo .

A 2f(x; ) = A[M(x; )]

. . (3. 1 08)

= A[f(x; + I ) - f(x; )]

Note that the operators described in this section have been assigned the subscripts r in Eqs. 3 . 1 06 and 3 . 1 07 andx,y in Eq. 3 . 1 08 to identify the radial and rectangular coordinate systems, respectively.

= M(xi + I ) - M(x; ) = [f(x; d - f(x; + I )] - [ f(x ; + I ) - f (x; ) ] = f(x; d - 2f(x; + I )

3.4 Finite-Difference Calculus

The differential calculus discussed in the previous sections is ap­ propriate for continuous functions only; however, in petroleum reser­ voir applications, a situation often arises where functional values are known only at discrete points. For example, these discrete points can occur during field measurements where such values as pressures and production rates are measured at fixed time intervals. The values of the measured properties are known only at the instant when they are measured. Fig. 3.1 illustrates such a series of discrete points. For discrete points, mathematical techniques are also available to approximate values of functions and their derivatives at points where they are not known. Finite-difference calculus is such a technique. Fi­ nite-difference calculus is the branch of mathematics that uses basic arithmetic operations (addition, subtraction, multiplication, and divi­ sion) to approximate derivatives, differential equations, and other analytical operations performed on continuous functions.

3.4.1 Finite-Difference Operators. The basis of finite-difference calculus is a group of operators that acts on discrete points. An oper­ ator is a sequence of mathematical operations performed in a fixed order that acts on any number of the discrete points and results in a final number. The operators used in finite-difference calculus in­ clude the forward-difference operator, A; the backward-difference operator, V; the central-difference operator, c); the shift (translation) operator, E; and the average operator, A . Although the finite-difference operators described i n this section appear to be very simple, they are the mathematical basis of one of the more powerful predictive tools available to simulation engineers. 46

is defined as

. . . . . . . . . . . . . . . . . . . . (3 . 1 09)

V�x.y· (pck/-lo,Bo o x.yPo ) qosc a c ( o) V

g(X;) = cos(X;)

(3. 1 06)

0,

k

f(X;) = sin(x;)

X;

+

f(x; ).

. . . . . . . . . . . . (3. 1 1 0)

In general, the kth-order forward-difference operator is defined as

. . . . . . . . . . . . . . (3 . 1 1 1 )

where

[]

[�]

= the binomial coefficient defined as

k k! j = j ! (k - j ) !

'

. . . . . . . . . . . . . . . . . . . . . . . . . . . (3. 1 1 2)

Example 3. 19. With the series of values listed in Table 3.2 give the forward difference of sin(xi) at x = nI4. Note that the values in this table were generated by the formulas f(Xi ) = sin(xi) and g(Xi ) = COS(Xi) · Solution. For x = nI4, i = 4. Then from Table 3. 2 ,

M (x; ) = f(xi + I ) - f(x; ) = f(xs ) - f(x4)

= f(n/3 ) - f(n/4 ) =

0. 8660 - 0.707 1

= 0. 1 589. BASIC APPLIED RESERVOIR SIMULATION


Adding g(Xj)f(Xi - 1 ) to and subtracting g(xi)f(Xi - 1 ) from the right side of Eq. 3.120 yields Solution. V [ g ( X; )f ( x; ) ] = [ g(x; }f(x; ) - g( x; )f (x; _ I}] Ll[g (x; }f( x; }] = g (x; + I }f(xi + I} - g (x; }f( x; }. . . . . . . . (3.1 1 3) - [ g(x;_ df (x; I ) - g ( x; )f (x; _ I ) ] ' . . . (3.121) Adding g(Xj)f(xj I ) to and subtracting g(Xj )f(xj I ) from the right side which can be rearranged to give of Eq. 3.l13 gives Ll[g (x; }f( x; }] = [g(x i + l}f(x;+ I } - g (x; }f(xi + I}] - [g(x; }f(x; ) - g (x; )f(x;+ I ) ] ' . . . . . . . . . . . . . . . . (3.1 14) Central-Difference Operator. The central-difference operator, 6, which can be rearranged to give operating on f(xj) is defined as M ( x; ) = f(x; H \) - f(x; _ y,). . . . . . . . . . . . . . . . . . . (3.123) An alternative definition of the central-difference operator is Example 3.21. With the values in Table 3.2, use Eq. 3. 1 15 to M (x; ) = f(x;+ I ) - f (X i_ I)' . . . . . . . . . . . . . . . . . . . (3.124) give the forward difference of [sin(xj)cos(Xj)] at x = n14. Similarly, the second-order central-difference operator is defined as Solution. For x = n14, i = 4. Then from Table 3.2, sin(xj) = 0.7071, 6 2�X ; ) = 6 [6� x; ) ] sin(xj + I ) = 0.8660, cos(Xj) = 0.7071, and cos(Xj + 1 ) = 0.5. From Example 3.20, = O[f(x;+Y2) - f(x;_ )] = M (x;+ y,) - M (Xi _ Y,) Then Ll[ sin(xj )cos(Xj)] = cos(Xj )Llsin(xj) + sin(xi )LlCOS(Xi) = [ f(xi+ I} - fix; }] - [ f(x; ) - f(Xi_ I ) ] . . . . . . . . . . . . . . . . . . . . (3.l 16) (3.125) = 0.5(0.8660 -0.7071) + 0.7071 Shift (Translation) Operator. The shift (translation) operator, E, operating on f(Xi) is defined as (0.5 - 0.7071) E[ f(x; ) ] = f(xi + I ) · . . . . . . . . . . . . . . . . . . . . . . . . . . (3. 126) = - 0.06699. Similarly, the inverse of the shift operator, E - l , operating on f(Xi) is defined as Backward-Difference Operator. The backward-difference oper­ (3.l27) ator, V, operating on f(Xi) is defined as Vf(x; ) = f (x; ) - f(x; _ I )' . . . . . . . . . . . . . . . . . . . . . (3.1 17) In general, the kth-order shift operator is defined by (3.128) Similarly, the second-order backward-difference operator is de­ fined as and the kth inverse of the shift operator is defined as V 2f(x; ) = V [ Vf{x; }] (3.129) = V[f{x; ) - f{x; _ I ) ] Example 3.24. Show the relationship between the shift and for­ = Vf{x; ) - Vf(x; _ I ) ward-difference operators. Solution. From the definition of the forward-difference operator, = [f (x; } - f(x; _ I}] - [ f (x;_ I) - f(x; _ 2)] = f ix; ) - 2f(x; _ d + f{x; _ J . . . . . . . . . . . . (3. 1 18) M {x; ) = f{xi+ l) - fix; ) . . . . . . . . . . . . . . . . . . . . . (3.109) the definition of the shift operator given by Eq. 3.126, Eq. In general, the kth-order backward-difference operator is defined as With 3.109 can be written as k� j k ) M( x; ) = E[f(x; }] - f(x; ) V k f (x;) _- ( - 1) f=o( - 1) j f (x; - k +j , . . . . . . . . . (3.1 19) (3. 130) = (E - Of {x; ); therefore, fl = E - 1 . where the binomial coefficient is defined by Eq. 3.l 12. Example 3.20.

Find an expression for Ll[g(xj)f(xj)].

+

+

_

y,

+1

x

[] U]

Example 3.25. Show the relationship between the shift and back­ operators. With the series of values listed in Table 3.2, give ward-difference Solution. From the definition of the backward-difference operator, the backward difference of sin(xj) at x = n14. Solution. For x =nI4, i = 4, and with Eq. 3.1 17, Vf(xj) = 0.7071 Vf{x; ) = fix; ) - f{x; _ I )' . . . . . . . . . . . . . . . . . . . . . (3.1 17) 0.5 = 0.2071. With the definition of the inverse shift operator given by Eq. 3.127, Eq. 3.1 17 can be rewritten as Example 3.23. Find an expression for V[g(xi)f(Xi)]. Solution. V f{x; } = f{x; ) - E - I f{x; } (3.131) = ( 1 - E - I )f {x; ) ; Example 3.22.

BASIC MATHEMATICAL CONCEPTS

47


therefore,

V = 1 - £- 1.

2. The associative law for sums.

Example 3.26. Show the relationship between the shift and cen­

tral-difference operators.

Solution. From the definition of the central-difference operator,

. . . . . . . , . . . . . . . . . . (3. 1 23)

O [ f (Xi )] = f (Xi + V, ) - f (Xi _ V') '

With the definition of the kth shift expressed by E q . 3 . 1 28, E q . 3 . 1 23 can be rewritten as

= E'h - £ - 'h.

Examples

3.24

V) + L'i.

(0 +

(3. 143)

3. The commutative law for product s . (3. 1 44)

Vo = oV. 4. The associative law for products . V(M) = (VO)A.

(3. 145)

5. The distributive l aw.

. . . . . . . . . . . . . . . . . . (3. 1 32) therefore, 0

o + (V + M =

through

V(o + L'i) = Vo + VA. 6. The law of exponents.

. . . . . . . . . . . . . . . . . . . . . (3. 1 46) (3. 1 47)

where the superscripts indicate the number of applications of O.

3.26 highlight

a few identities between

the different operators that will generate identical results when oper­ ating on a given function .

Average Operator, The average operator, A, operating on

defined as

f(Xi) is

. . . . . . . . . . . . . . . . . (3. 1 33)

3.4.2

Relationship Between Derivative and Finite-Difference

Operators. Approximations to the First Derivative. Forward-Dif­

ference Approximation. The finite-difference operators for discrete points are related to the derivative operators of continuous functions

through the Taylor series expansion. Evaluating the Taylor series expansion (Eq. 3.70) at x = Xi+ 1 and letting Xo = Xi yields h f (xi + d = f ( Xi 1 + l!

df dx

+

h2 d2f

21

dx 2

+

h3 d3f

31

dx3

+

Example 3.27. Show the relationship between the central -differ­

(3. 148)

ence and average operators.

Solution. From the definition of the average operator, A [ f ( x,. )]

=

, + f (x i _ y, ) 2 '

f (x i + y )

where h

. . . . . . . . . . . . . . . . . (3. 1 34)

= Xi + 1 - Xi

(3. 149)

and the deri vatives are evaluated at Xi . If N =

1

in Eq.

3 . 1 48, then (3. 1 50)

Rearranging yields

. . . . . . . . . . . . . . . . (3. 1 35)

2 A[ f ( x; 1] = f (Xi + '!' ) + f(x; _ ",) .

Substituting the definition of the shift operator (Eqs.

3 . 1 29) into Eq. 3. 1 35 yields 2 A[ f (Xi )] = £ V, [ f ( Xi )] + £- 'h[ f ( x ; )]

3 . 1 28

and

Solving E q .

3 . 1 50 for t h e first derivative, df/dx, gives

d f = f (x; + I ) - f (Xi ) h

dx

I

(3. 1 5 1 )

R h 2'

Truncating the series after the second term yields

. . . . . . . . . . . . . . . . . (3. 1 36) which reduces to

df

dx

= f (xi + I l - f (x ; )

(3. 1 52)

h

where the truncation error i s

(3. 1 37) Squaring both sides of Eq.

A2

3 . 1 37 gives

= V4( £ + 2 + £ - 1 ) ,

(3. 1 38)

which is one possible solution to this example. Adding I to and sub­ tracting I from the right side gives

A2 Eq.

= \14(£ - 2 + £ - 1 ) + 1 .

(3. 140)

A2

=

02 +

4

3.26,

the final result is

1'

(3. 1 4 1 )

which is a second, equally valid, solution to this example.

Miscellaneous Properties of Finite-Difference Operators. The finite-difference operators discussed in the previous sections of this chapter obey the following fundamental l aws of algebra.

I . The commutative l aw for sums.

V + L'i = A + V. 48

h d2f

21

I

R d x 2 + h 3'

. . . . . . . . . . . . . . . . . . . . . . . . (3. 1 53)

Substituting the forward-difference operator (Eq. 3 . 1 52 results i n

3. 1 39 can be written as

With the result of Example

=

. . . . . . . . . . . . . . . . . . (3. 1 39)

. . . . . . . . . . . . . . . . . . . . . . . . . . (3. 142)

M (Xi ) df dx = -hEq.

3 . 1 54

3 . 1 09) into Eq.

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (3. 1 54)

represents the forward-difference approximation to the

first derivative. Fig. 3.2 illustrates the relationship between the first derivative and its forward-difference approximation.

The forward-difference approximation to the first derivative is called a first-order approximation because the truncation error is a function of hI (i.e., a second-order approximation would be a func­ tion of h2, and so forth) . The truncation error i s defined in Eq.

3. 1 53

because the term R31h contains terms of higher orders of h ( i . e . , h2,

h3, and so forth). If h approaches zero, all terms in et would decrease;

however, the higher-order terms would decrease more rapidly. Con-

BASIC APPLIED RESERVOIR SIMULATION


df dx

f(x)

,,

f(x)

" af(XI)

h -

f(Xi + 1 )

-

I-

h

XI - 1

�Ixi

h

�I

I..

XI - 1

xi + 1

X

Fig. 3.2-First derivative and its forward-difference approximation.

sequently, most of the error is incorporated into the lowest-order term. In the case of Eq. 3.153, this is in the hI term. Example 3.28. With the series of values listed in Table 3.2, give the forward-difference approximation of the first derivative of sin(x) at x = n/4. Solution. Recall the definition of the forward-difference approxi­ mation given as

M (X i ) df = h- · dx

(3. 154)

From Example 3 . 1 9, M(x;) = 0. 1 589 and h = x;+1 - Xi = n/3 - n/4 = nIl2.

(3. 1 55)

Substituting into Eq. 3.154 yields dfldx=0.1589/(n /12) = 0.6070. The value of the first derivative (to four decimal places) is 0.7071 . Backward-Difference Approximation. Expanding f(Xi - 1 ) about Xi (that is, X = Xi - l and Xo = Xi in Eq. 3.70) yields h df h 2 d 2f - h3 d3f f (Xi - l ) = f (X i ) - If dx + 2 ! dx 2 3 ! dx3 +

. . . . . . . . . . . . . (3. 156) Note that, in Eq. 3 . 1 56, all even terms in the expansion are positive and all odd terms are negative. This is because in our terminology h is always positive (h = X; - Xi - 1 ). Also note that all the derivatives on the right side of the equation are evaluated at Xi. Following the same procedure as for the forward-difference approximation yields

h

I

.. ..

h

..

I

x

Fig. 3.3-Flrst derivative and its backward-dlfference approxi­ mation.

Solution. Recall the definition of the backward-difference approximation,

Vf(x i ) df = h- . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (3. 1 57) dx From Example 3.22 , Vf(Xi) = 0.207 1 and h =X; - Xi - 1 = n/4 - nI6 = n/12. Substituting into Eq. 3 . 1 57 gives dfldx = 0.207 11(nIl2) = 0.79 1 1 . This is comparable with the exact value of the first deriva­ tive [cos(n/4)] of 0.707 1 . Central-Difference Approximation. As discussed earlier, both the forward-difference and backward-difference approximations are first-order approximations to the first derivative. A higher-order approximation (for example, second-order) would be preferable be­ cause as the spacing size, h, is reduced the truncation error would approach zero more rapidly. In other words, fewer measured or dis­ crete points would give the same accuracy. The central-difference approximation is a higher-order approxi­ mation that is obtained by subtracting Eq. 3 . 1 56 from Eq. 3.148. If the spacings, h, in these equations are equal, then 2h df + 2h3 d3f Rs . . . . . (3. 1 58) f (X i+ l ) - f (Xi - l ) = IT dx 3f dx3 + · Note that, because of the alternating signs in the expansion series in Eq. 3.156, all even terms in Eq. 3.158 cancel. Solving for the first derivative in Eq. 3.158 results in

df f {X i+ d - f {Xi - l ) ' 2h dx = and the truncation error becomes

(3. 159)

. . . . . . . . . . . . . . . . . . (3. 160)

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (3. 157)

Note that the truncation error defined by Eq. 3.160 is second order. Substituting the definition of the central-difference operator (Eq. 3.124) into Eq. 3.160 yields

Eq. 3 . 1 57 is the backward-difference approximation to the first de­ rivative. Fig. 3.3 illustrates the relationship between the first deriva­ tive and its backward-difference approximation. This approxima­ tion is also a first-order approximation.

df M(xj ) . . . . . . . . (3. 161) dx = 2h' . . . . . . . . . . . . . . . . . . . . . . . which is the central-difference approximation to the first derivative. Fig. 3.4 illustrates the relationship between the first derivative and its central-difference approximation.

Example 3.29. With the series of values listed in Table 3.2, give the backward-difference approximation of the first derivative of sin(x) at X = n/4.

Example 3.30. With the series of values listed in Table 3.2, give the central-difference approximation of the first derivative of sin(x) at x = n/4.

Vf(Xj ) df = h-· dx

BASIC MATHEMATICAL CONCEPTS

49


f(x)

df dx '

" lif(xl)

2i1

I-

.. I

h

XI - 1

(0,0)

x Fig. 3.4-First derivative and its central-difference approximation.

Solution. Recall the definition of the central-difference approxi­

mation, df dx

=

M ( Xi ) ----z;;-.

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (3. 1 6 1 )

From Table 3 . 2 for i = 4 , f(xj + I ) = 0. 8660, f(xj - I ) = 0.5, and h = xj + l - xj = .71'll 2. Substituting into Eq. 3 . 1 6 1 gives df/dx (0.8660 - 0.5)/(2 [n/ 1 2]) 0.6990. This compares very favor­ ably with the exact value of the derivative [cos(nI4)] of 0.707 1 . =

=

Approximation to the Second Derivative. The central-differ­ ence approximation is used almost exclusively to approximate the second derivative in reservoir transport equations because of its higher-order accuracy. This approximation can be obtained by add­ ing Eqs. 3 . 1 48 and 3 . 1 56, giving f (x i + l }

+ f (x i _ l )

= 2f ( x i }

2h2 d2f dx2

+ 2f

2h4 d4f dx4

+ 4!

+ R6

Fig. 3.S-Graphical representation of a vector.

The arithmetical operations of addition, subtraction, multiplica­ tion, and division all apply to scalar quantities. The identities de­ fined by the commutative, associative, and distributive laws also all apply to the appropriate scalar operators.

3.5.2 Vector Notation and Operations. A vector, Ii , is a set of sca­ lar quantities arranged in a definite order; that is,

Ii = ( V I ' V2' v3' V4' . . . ' VI) '

where V I , V2, V 3 , V4, . . . , VI are the elements of the vector. The value of the subscript I is often referred to as the vector dimension. A vec­ tor has the properties of both magnitude and direction. For a vector with two elements, . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (3. 1 66) the magnitude of the vector is defined as the length of the line segment from the origin (0,0) to the point (v J , V2) in the V I -V2 plane; that is,

. . . . . . . . . . . . . . . . . . . (3. 1 62) Because of the alternating signs in the expansion series in Eq. 3 . 1 56, all odd terms in Eq. 3 . 1 62 cancel. Solving for the second derivative with Eq. 3 . 1 62 results in d2f dx2

=

f (xi + I ) - 2f ( x ; ) h2

+ f (xi _ l }

(3. 1 63)

. . . . . . . . . . . . . . . . . . . . . (3 . 1 65)

. . . . . . . . . . . . . . . . . . . . . . . . (3. 1 67) The direction of the vector is defined as the direction from the origin to the point ( Vb V2 ) in the V I -V2 plane; i.e., tan (J = V2/vI . Fig. 3.5 il­ lustrates these definitions. For higher-dimension vectors, Eq. 3 . 1 67 can be generalized as

and the truncation error becomes (3. 1 68)

. . . . . . . . . . . . . . . . (3. 1 64) Eq. 3 . 1 63 is the central-difference approximation to the second de­ rivative and is a second-order approximation. 3.5 Basic Linear Algebra

Linear algebra is the branch of mathematics that deals with vectors, matrices, and the solution of linear equations. Writing the character­ istic linearized finite-difference equation at every unknown node generates a system of linear algebraic equations. This section pro­ vides a review of the basic linear algebra that is relevant to solving systems of linear equations.

3.5.1 Scalar Notation and Operations. A scalar quantity, s, is a quantity that has a magnitude; in other words, a scalar quantity is simply a number. Examples of scalar quantities include 1, 1/3, n, - e 3 , and sin(3n/2). The scalar quantities most often encountered in reservoir engineering include pressure, temperature, porosity, gas! oil ratio, waterloil ratio, and production rates, among others. 50

Example 3.31. Give the magnitude and direction of Ii = (3,4).

Solution. With Eq. 3 . 1 67, IV! = /3 2 + 4 2 = .fi5 = 5 and tan

8 = (4 - 0)/(3 - 0) = 4/3 ; and 8 = tan - I ( 4/3 ) or 8 = 53°7 '48 " .

Equality of Two Vectors. Two vectors, It and Ii , with the same dimension are equal if, and only if, all of the corresponding elements are equal. Let (3. 1 69) (3 . 1 70) Then It = Ii implies that Ui = Vi '

(3. 1 7 1 )

where i = 1 , 2, 3, 4, . . . , I. BASIC APPLIED RESERVOIR SIMULATION


10

w = (4, S) -

(1 , 2) ... /

v

,

,

,

,,

,,

"

...

,

,

"

8

I , I I I I I "

6

"

4 1----,.. 2

(3, 4)

2

(0,0) Fig. 3.6-Graphical representation of addition of two vectors.

Addition of Two Vectors. Addition of two vectors, Ii and v , with the same dimension is performed by adding the corresponding ele­ ments of the vectors. Let

(3. 1 69) (3 . 1 70) (3 . 1 72)

Then tV

= Ii + v

implies that

W i = U i + Vi '

( 3 . 1 73)

where i = 1, 2, 3 , 4, , . . , I. Vector addition follows the commutative, associative, and dis­ tributive laws for addition. What is the sum of Ii = (3,4) and 17 = ( I , 2) ? Solution. With Eq. 3 . 1 73, tV = (Wj ,W2) where Wj = U j + v ] , and W2 = U2 + V2; therefore, tV = (3 + 1 , 4 + 2) = (4, 6) . Fig. 3.6 Example 3.32.

shows the addition of the two vectors used in this example. Note that the dashed lines in Fig. 3.6 are parallel to the corresponding solid lines. Multiplication of a Scalar and a Vector.

Multiplication of a vec­ tor, v, by a scalar, s , is obtained by mUltiplying all the elements of the vector by the scalar. Let s = a scalar value and ( 3 . 1 70) ( 3 . 1 74)

Multiplication of a scalar and a vector follows the commutative, associative, and distributive laws for multiplication. Example 3.33. What is the effect of multiplying a vector by a sca­ lar on the magnitude and direction of the vector? Solution. To illustrate this effect, use s = 2 and 17 = (3,4). From Eq. 3 . 1 74, 2 17 = (6,8). Substituting these data into the definition of mag­ nitude for a two-dimensional vector (Eq. 3. 1 67) yields 12v I =

j(6) 2 + (8) 2 = j(2) 2(3) 2 + (2) 2(4) 2 = 2 j(3) 2 + (4) 2 = 21171 ; tan

() = 8/6 = 4/3. In other words, the magnitude of the vector 2 v is twice the magnitude of 17. Fig. 3.7 shows this schematically. The figure also BASIC MATHEMATICAL CONCEPTS

4

6

8

10

Fig. 3.7-Graphical representation of multiplication of a scalar quantity and a vector.

illustrates the effect on the direction of the vector; that is, there is no effect on the direction of a vector if it is multiplied by a scalar quantity. Examples of vector quantities in reservoir engineering include the flow velocities of gas, oil, and water in hydrocarbon reservoirs because these properties include both magnitude and direction. Although this may seem like a somewhat trivial example, these velocities govern practical matters as diverse as lease-line migration, aquifer influx, selection of infill-well iocations, and optimized secondary and tertiary recovery and production/injection well realignment. Scalllr Multiplication of Two Vectors. Scalar multiplication of two vectors, Ii and v with the same dimension, is obtained by mUltiplying the corresponding elements of the two vectors and summing the prod­ ucts. The final product of a scalar multiplication of two vectors is a scalar. The operation of multiplication is slightly more complicated than the other operations discussed in this section because it involves two steps. Let (3 . 1 69) ( 3 . 1 70)

To find s = Ii · v, first transpose the original vector, Ii, from a col­

umn

vector to a row vector, U T, so that

( 3 . 1 75)

Second, multiply the elements across Ii T with the corresponding elements down V. That is, VI v2 S

V3

= [U I , U 2 , U3, U4, . . . , U/] v4

=

1

I U i · Vj.

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ( 3 . 1 76)

i= 1

Scalar multiplication of two vectors follows commutative, associa­ tive, and distributive laws for products. Example 3. 34.

Find the product of scalar multiplication of

Ii = (3,4) and v = ( 1 ,2).

51


Solution.

3.176, s = 3 x l + 4 x 2 = 11.

With Eq.

and

3.5.3 Matrix Notation and Operations. An I x J matrix is a rectan­ gular array of scalar elements containing I rows (horizontal lines ) and J colunms (vertical lines), as in

a l.1 a2 , 1 a 3,) a 4,)

[A] =

a l ,2 a2 ,2 a 3,2 a 4, 2

a l ,4 a2,4 a 3,4 a 4,4

au a2 ,3 a 3,3 a 4.3

a),} a 2, J a 3, } a 4. }

... ... ... ...

,

.

.

.

.

(3.177)

([A] + [B)) + [C] = [A] + ([B] + [e» . . . . . . . . . . . (3.183)

[A] and [B] where [A] = [ 41 25 63 ] and [B] = [ 70 28 93 ] . Solution. With Eq. 3.181, 1+7 2+8 3+9 [C] = 4 + 0 5 + 2 6 + 3 = [ 48 107 129 ] .

Example 3.36. Find the sum of

]

[

[A], multiplied by a scalar, s, is another matrix whose elements are obtained by mUltiplying each element of [A] by the scalar value. Let be a scalar value and [A] and [B] be I x J matrices. Then [A] [B], [B] = s[A] if [A] [B] [A] = [B] (3.184) b ij = saij , (3.178) where i = I , 2, 3, 4, . . . , I; and j = I , 2, 3, 4, . . . , J. a ij = b ij , The laws where i = I , 2, 3, 4, . . , I; and j = 1, 2, 3, 4, . . . , J. Identity Matrix. The identity matrix, [1], is a square matrix (I = 1) (3.185) c ([A] + [B]) = c[A] + c[B] , that contains the value 1 on the main diagonal and zeros everywhere else. That is, (c+ d)[A] = c[A] + d[A] , . . . . . . . . . . . . . . . . . . . . . . (3.186) 1 0 0 0 ... 0 and (cd)[A] = c(d[A)) . . . . . . . . . . . . . . . . . . . . . . . . . . (3.187) 0 1 0 0 ... 0 0 0 1 0 ... 0 . . . . . . . . . . . . . . . . . . . . . . (3.179) apply to the multiplication of scalars and matrices . [1] = 0 0 0 1 ... 0 Multiplication of a Matrix and a Vector. The product of post­ multiplying an I x J matrix, [A], by a J-column vector, X, is an I-col­ 0 0 0 0 ... 1 umn vector, V. The elements of v are obtained by multiplying the

where all the aij elements are scalars. Equality of Two Matrices. Two matrices with the same dimen­ sions, and are equal if, and only if, all corresponding ele­ ments are equal. Let and be two I x J matrices. Then if .

.

.

.

.

.

.

.

.

.

.

.

.

Multiplication ofa Scalar and a Matrix. The product of a matrix, s

.

.

Transpose of a Matrix. The transpose of a matrix is a matrix in

[A]

which the rows and colunms have been transposed; therefore, the trans­ pose of an I x J matrix is a J X I matrix. The transpose of defined in Eq. is

3.177

[A]T =

aJ•J a 1 .2 a 1 .3 a J .4

a2. ) a2 • 2 a2. 3 a2.4

.. ...

a 4. 1 a 4.2 a 4.3 a 4.4 . . .

a 3, l a 3 .2 a 3•3 a 3,4

.

.

a J ,} a2 ,J a 3,J a 4 .}

Solution.

[AI '

With Eq.

[A]x

x=

=

(3.188)

}

where

i

I a ij Xj '

j= )

= 1, 2, 3, 4, . .

.

, I.

Example 3.3 7. Find the product of post-multiplying matrix

by x, where

[A]

[A] = [ 41 25 36 ] and = Solution. With Eq. 3.188,

[A]T where

Example 3.35. Find

[A] = [ 41 52 63 ] .

. . . . . . . . . . . (3.180)

a l,J

..

[A] =

Vi =

a l, 1 a l.2 a l.3 a l.4

...

elements across a row of the matrix by the corresponding elements down the column vector and summing the products. Let an I x J matrix, a J-column vector, and v an 1column vector. Then = v if

_

x

3.180,

v

0n

[AI < [ l ; �1 �

[�]

1 . 1+2.2+3.3 - [4 · 1 + 5 · 2 + 6 · 3 ]

_

Addition of Two Matrices. The addition of two matrices, [A] and [B], with the same dimensions is performed by adding the corre­ sponding elements of the matrices. Let [A], [B], and [C] be three I x J matrices. Then [C] = [A] + [B] if (3.181) Multiplication of Two Matrices. The product of two matrices, cij = a ij + b ij ' [A] and [B], is a third matrix, [C]. The definition of matrix multi­ where i = I , 2, 3, 4, . . , I; and j = I , 2, 3, 4, . . . , J. plication requires stringent specifications on the matrices [A] and Commutative and associative laws for addition apply to matrices. [B]. Let [A] be an IA x JA matrix and [B] be an IB JB matrix. Then [A] + [B] = [B] + [A] . . . . . . . . . . . . . . . . . . . . . . . . (3.182) the multiplication, [A][B] (in that order), is allowed if, and only if, •

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

x

52

BASIC APPLIED RESERVOIR SIMULATION


JA = lB · In this case, it is said that [AJ is post-multiplied by [BJ or [BJ is premultiplied by

[AJ.

Th i s multiplication o f the two matrices results in a n IA

x

JB ma­

[C], whose elements, cij , are obtained by multiplying the ele­ [AJ by the elements down a column, j, of matrix [BJ. That is, trix,

Solution. Let

[I] =

[ ] 1 0 0 0 1 0 0 0 1

ments along a row, i, of matrix

c ij =

fB

I a j/Pki'

(3. 189)

k= 1

where i =

1, 2, 3, 4, . . . , IA and j = 1, 2, 3, 4, . . . , JB .

[A] =

[ ] 1 2 3 4 5 6

Solution.

and [B] =

1 2

=

. . . . . . . . . . . . . . . . . . . . . . (3. 195b)

]

Example

=

Example

[� :] [ [

trix results in the original matrix. This applies for both pre- and post­ Matrix multiplication can be simplified into one of the operations

1 2 3 4 5 6

already discussed in this chapter for the following special cases.

]

If IA = JA = IB = JB =

1, the multiplication of the two matrices i s

identical to the multiplication of two scalars.

]

[ ]

If IA = JB =

1 . the multiplication of the two matrices is identical

to the scalar multiplication of two vectors. If JB =

1.

the multiplication of two matrices is identical to the

post-multiplication of a matrix by a column vector.

Inverse ofa Matrix. The inverse. [A] - 1 . of a matrix. [A]. if it ex­

ists. is defmed as the matrix that. when pre- or post-multiplied by

[A]. gives the identity matrix. That is. [A] [Ar 1 = [Ar I [AJ = [ I J.

. . . . . . . . . . . . . . . . . . (3. 1 96)

Several methods can be used to obtain the inverse of a matrix. in­

12 1 5 26 33 . 40 5 1

cluding Gaussian elimination and Crout reduction. These methods are important to the direct solution of systems of linear equations and

3.38 illustrates that matrix multiplication is not commu­

tative. That is, in general,

IA][B] ¢ [B][A};

illustrates one important property of the identity

multiplication.

1 . 1 +2·4 1 ·2+2·5 1 ·3+2.6 3 · 1 +4·4 3 · 2+4· 5 3 ·3+4·6 5 · 1 +6·4 5 · 2+6· 5 5 · 3+6·6

9 19 29

3.39

matrix: the multiplication of an arbitrary matrix by the identity ma­

_ 22 28 - 49 64

=

]

+ 0 + 0 A I,2 + 0 + 0 A I,3 + 0 + 0 0 + A 2,I + 0 0 + A 2,2 + 0 0 + A 2,3 + 0 o + 0 + A3 ,I 0 + 0 + A3 ,2 0 + 0 + A3,3

1 2

[ [ ]

[BUA] =

[

A I'I

_ 1 . 1 +2.3+3 .5 1 ·2+2 .4+3 .6 - 4· 1 +5 ·3+6·5 4·2+5 ·4+6·6

and

A I ' I A l,2 A I'3 A 2,I A 2,2 A 2,3 A 3, I A 3 ,2 A 3 ,3

1 0O 0 1 0 o 0 1

3. 1 89,

1 2 3 4 5 6

1 2

]

[ ][

[A][B] and [B][A] if

[ ] [� :]

With Eq.

IA][B] =

Then,

[� :] .

Example 3.38. Find the products

. . . . . . . . . . . . . . . . . . . . (3. 195a)

. . . . . . . . . . . . . . . . . . . . . . . . . . (3. 1 90)

are

discussed in detail in Chap.

7.

3.5.4 Matrix Representation of Algebraic Equations. A n unknowns has the form

of n linear equations in

a l,lxl

+

a l,2x2

+

a l ,3 x3

+ . . . +

al,Nxn

=

system

dl

(3. 1 97)

however, the following laws do apply to matrix multiplication.

[A]([B] + [C]) = [A][B] + [A][C).

(3. 191)

([A] + [B])[C] = [AUc] + [B][C] .

(3. 1 92)

c [A][B] = (c [A]) [B] = [A](c[B]).

(3. 1 93)

[A]([B][C])

(3. 194)

=

([A][B])[C].

(3. 1 98) (3. 1 99) so though

n.

(3.200) Example 3.39. Show that the post-multiplication of an arbitrary I x J matrix, trix,

[A], by the identity matrix [ I ] results in the original ma­

[A]. In this example, use 1 = J = 3.

BASIC MATHEMATICAL CONCEPTS

This system of equations can be replaced by a single matrix equation.

[A] x =

d.

(3.201 ) 53


X = [x;3 and

d=

. . (3.202)

:;� ,

[A]

where

a " a 1 .2 a 1,3 a ' " a2. I a2.2 a2.3 a2.n a 3. ' a 3.2 a 3.3 J [a a n a ;,., .2 l ,3

:. nl�'

. . . . .. .. . .

dl

.

(3.204)

[Ar ' ( [A] X)

=

. . . . . . . . . . . . . . . . . . . . . (3.20S)

[Ar 'd .

Use of Eq. 3 . 1 94 yields

. . . . . . . . . . . . . . . . . . . . . . (3.206)

( [Ar ' [A]) ; = [Ar 'd,

and, from the definition of the inverse of a matrix (Eq. 3 . 1 96),

(3.207)

[Ar ' d.

. . . . . . .

3.202

3.208

. . . . . . . . . . . . . . . . . . . . . . . . (3.208)

In other words, Eq. states that, if the inverse of the coefficient matrix in Eq. exists and can be found, the solution of the sys­ tem of e.9 uations, ;, can be obtained by premultiplying the known vector, d , by the inverse of the coefficient matrix, [A] I . Exercises

3.1 Show that (a/ax)[a(p)(ap/ax)] can be transformed to a;P/ax2 us­ ing the transformation p

f a(p)dp.

Hint: Use the chain rule in conjunction with the Leibnitz rule. 3.2 Use the product rule to expand the expression x

k, (x)]/ [,u (p) B (p)] [ap(x)/ax] } .

(a/ax) { [AxCx)

P P l

3.3 Show that the density of a liquid can be expressed as a function of pressure as = o [ + c(p - Po )], where P o = reference density at reference pressure Po and reservoir temperature and c = compressibil­ ity of the liquid (very small). Hint: Use the Taylor series expansion. 3.4 Derive an expression for aBg lapg for a real gas .

0,

3.5 Identify the following equations as linear or nonlinear PDE's. 1. (a/ax)[c(ap/ax)] = where c is a constant. (a/ax)[c(x)(ap/ax)] = where c is a function of x. (alax)(c(p)(ap/ax)] = where c is a function of p.

2. 3.

54

O.

3.8 Demonstrate the equivalence of the following operations. 1 . I1E = EI1.

2. l1bx= bX(b6.x- I). 3. D = ( I /I1x) sinh- I (Ao) , where D = a/ax. 4. ( E - 2)( E - I ) [f(x) ] = - I1x where f(x) = ( 2 )>'6.x + x) . 2 ,

S . I1 _ V = 0 . 6. I1V = 02. V = E - I I1 . I1V = VI1. 9. Ao = + V). E = ,0 +

�(11 /2

7. 8. 10.

jl + 0 2 /4)

2

.

3.9 Although less common, finite differences can be used to repre­ sent integrals. If the operator J is defined as

3.201

1jJ =

O.

0

This representation can be verified easily by the post-multiplication of the coefficient mltrix, [A], by the unknown vector, ;, to obtain the known vector, d . The importance of the inverse of a matrix i n the solution of linear equations now becomes apparent. Multiplying Eq. by [Ar 1 (if it exists) gives

or ; =

j'k;

3.7 Use x = ln r and y = e to transform ( I /r)(aJar)[r(ap/ar)] + ( I /r2)[(a2p)/(ae2)] = to (a2p/ax2) + (a2p/ay2) =

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (3.203)

d, d2 d3

3.6 Consider a differential equation in the form kxCa2p/ax2) + ky(a2p/ay2) = 0. Use the transformations X = x/ !kx and Y = y/ to transform the given differential equation into Laplace's equation, (a2p/aX2) + (a2p/a y2) =

0, 0,

Xo + h

.![f(xo)] = prove that

.![ f (xo )] -

_

3.10 Solve

f

f(t)dt,

[11 - (112/2) + (113/3) - (114/4) + Xo

hM(xo)

[03 O4 ][X2, ] [ 6 ]

a22 0 0 0 G 33 0 0 0 a44

.

.

J .

. . 1 6 usmg the matnx mverslOn method.

=

x

. . .

0 0 0

3.11 What is the inverse of a diagonal matrix of the form

[al ] o

o

o

?

I,SOO

120°F,

3.12 Calculate the coefficient of isothermal compressibility, cg in psi I for a real gas at psia and given that z= where p is in psia and T is in OR.

(S77. l IT) - O.OOOISp,

6

3.13 Function f(x) = 3x2 + x - S is given. I . Calculate the value of df/dx at x = 1 using the forward-, back­ ward-, and central-difference approximations with I1x = Compare the results with the exact value of df/dx at x = Calculate the value of d2f/dx2 at x = using the central-differ­ ence approximation. Use I1x = to compare the result against the exact value of d2f/dx2 at x = 1 .

2.

1

1

I. 2.

2

I.

I.

3.14 Consider the function f(x) = x3 - 4x2 + 6. Calculate the value of df/dx at x = using backward-, forward-, and central-difference approximations (let I1x = Calculate the value o f d2f/dx2 a t x = using central-difference approximation (again, let I1x = I ) . 3. Among the four approximations you calculated in Parts 1 and 2, which contain no error? Why?

I).

2

O.

x

3.15 Use the transformations X = ( /kx)V. x and Y = (k /ky ) V.y on the PDE of the form kx(a2p/ax2) + ky(a p/ay2) = What important ob­ servation can be made on the basis of this transformation?

0,

3.16 The differential equation (a2p/ax2) + (a2p/ay2) + (a2p/az2) + c = where c is a constant, is known as the Poisson's equation. Im­ plement the transformation 1jJ(x,y,z) = (x ,y, z ) + (C/2)x2 on the de­ pendent variable p. What is the resulting PDE?

p

Nomenclature

a(p) = function of p BASIC APPLIED RESERVOIR SIMULATION


lex = permeability in the direction of the x axis, L2,

aij = the (iJ) element of [A] aik = the (i, k) element of [A] aNN = the (N,N) element of [A]

A= A=

Ax =

[A] = [A]T = [A] - 1 =

b= bij = bkj = B=

Bg = Bo = Bob = [B) =

c= caq = Cij = cg = Co = C= [C] = d= d" =

d=

D= e=

eC t = et = e"= eX = eXO = eO = E=

£k = E- k= £ 1= £ 'h. = E - 'h. = f= 1m = g= 8c = g(x) = g,, (x) = h= h= h(x) = hm(-2 = i = I= IA = IB = Ie = [I] = =

1

j = JA = JB = k= krg = k,o =

average operator in difference calculus constant in Table 3 . 1 cross-sectional area normal to x direction, L2, ft2 [m2] coefficient matrix in a matrix equation transpose of [A] inverse of [A] constant the (ij) element of [B) the (kj) element of [B) FVF, O/L3 , reservoir volume/volume at standard conditions gas FVF, O/L3 , scf/STB [m3/std m 3 ] oil FVF, L3/L3 , RB/STB [m3/std m 3 ] oil FVF at bubblepoint pressure, L3 /L3 , RB/STB [m3 /std m 3 ] matrix constant aquifer compressibility, Lt2/m, psi-1 [kPa-1 ] the (ij) element o f [C ] gas compressibility, Lt2/m, psi- I [kPa- l ] oil compressibility, Lt2/m, psi- I [kPa- l ] constant matrix constant last entry of the Column Vector d right-side vector in a matrix equation pipe diameter, L, ft [m] exponential function exponential function of C't truncation error exponential function of u exponential function of x exponential function of Xo exponential function of zero = 1 shift (or translation) operator in difference calculus the kth order shift operator the kth inverse of the shift operator inverse shift operator in difference calculus half-shift operator inverse half-shift operator function Moody ' s friction factor acceleration of gravity, Ut2, ftlsec2 [m/s2] units conversion factor in Newton's law function of x nth function of x increment in difference calculus, h = Xi + Xi 1 function function of x mth function of x unit vector in the x direction dimension of a vector number of rows of [A] number of rows of [B) number of rows of [C] identity matrix dummy index -

unit vector in the y direction number of columns of [A] number of columns of [B) permeability, L2, darcy [um2] relative permeability to gas, dimensionless relative permeability to oil, dimensionless

BASIC MATHEMATICAL CONCEPTS

Icy = k =

Kaq =

I= L( ) = n=

N= P= Paq = Pb = Pg = Pi =

Po = PR = Psc =

Pw = PKj= Po = qgsc =

qosc = qsc =

r=

rw = R=

RN + 1 = Rs =

s= = S = 2 Siw = So = t= T= tc = u= Ui = UI = it = SI

�T U =

darcy [u m2] permeability in the direction of the y axis, L2, darcy [u m2] unit vector in the z direction aquifer constant, L2/mt, RB/(D-psi) [m 3/(d ' kPa)] distance, L, ft [m] linear operator in differential calculus number of moles; direction normal to reservoir boundary initial oil in place, 0, STB [std m 3 ] pressure, mlLt2, psia [kPa] aquifer pressure, mlLt2, psia [kPa] bubblepoint pressure, mlLt2, psia [kPa] gas pressure, mlLt2, psi a [kPa] initial pressure, mlLt2, psia [kPa] oil pressure, mlLt2, psia [kPa] reservoir pressure, mlLt2, psia [kPa] standard condition pressure, mlLt2, psia [kPa] water pressure, mlLt2, psia [kPa] flowing well bottomhole pressure, m/Lt2, psia [kPa] reference pressure, mlLt2, psia [kPa] gas production rate at standard conditions, Oft, sefID [std m 3/d] oil production rate at standard conditiuns, Oft, STBID [std m3 /d] well flow rate at standard conditions, L 3/t, volume at standard conditions/time radial distance in both cylindrical and spherical coordinate systems, L, ft [m] well radius, L, ft [m] universal gas constant, psi-ft3/(lbm mol-OR) [kPa ' m 3 /(kg mol , K)] the remainder after considering N + I terms in Taylor series expansion of f(x) solution-gas/oil ratio, O/L3 , sef/STB [std m 3/std m 3 ] scalar first scalar second scalar irreducible water saturation, fraction oil saturation, fraction time, t, days absolute temperature, T, OR [K] standard condition temperature, T, OR [K] volumetric velocity, Ut, RB/(D-ft2) [m3 /(d ' m2)] ith element of It Ith element of it vector

transpose of it = ith element of V VI = Ith element of v v = vector V = volume, L3 , ft3 [m3 ] Vaq = volume of aquifer, L3 , ft3 [m3 ] Vb = reservoir bulk volume, 0, ft3 [m3 ] Wi = ith element of W WI = Ith element of w w = vector x = distance in the x direction in the Cartesian coordinate system, L, ft [m] ; independent variable Xi = ith element of x Xj = jth element of x Xn = nth element of x Xo = variable where the function and all of its derivatives are known x = vector Ax = increment in Variable x Vi

55


x= y=

Y= z= ac

=

Pc = 11 =

V=

c5 = (J =

I" = I"g = 1"0 =

56

nonnalized x distance in the y direction in the Cartesian coordinate system, L, ft [m] ; independent variable nonnalized y gas compressibility factor (z = pM/ pR T) , dimensionless volume conversion factor whose numerical value is given in Table 2. 1 transmissibility conversion factor whose numerical value is given in Table 2. 1 forward difference operator backward difference operator central difference operator angle in the (J direction in both cylindrical and spherical coordinate systems, rad [rad] viscosity, mILt, cp [Pa · s] gas viscosity, mILt, cp [Pa · s] oil viscosity, mILt, cp [Pa · s]

p = density, mlL3 , Ibrnlft3 [kg/m3 ] Tgx = gas-phase transmissibility in the x-direction, scf/(D-psi) [std m 3/(d · kPa)] porosity, fraction aquifer porosity, fraction defined function

References 1 . Muskat, M . : ''The Production Histories of Oil Producing Gas-Drive

Reservoirs," J. Applied Physics ( 1 945) 16, 147. 2. CRC Standard Math Tables, 26th edition, CRC Press, Boca Raton, Flor­ ida ( 1 977).

51 Metric Conversion Factors

C F + 459.67)/ 1 . 8 of =K E + 00 = kPa psi x 6. 894 757 psi - 1 x 1 .450 377 E - O l = kPa - 1 OR x 5/9 =K

BASIC APPLIED RESERVOIR SIMULATION


C h a pter 4

Fo rm u lati o n of Bas i c Eq u ations fo r Si n g l e-Ph ase Flow 4. 1 I ntroducti on

This chapter presents the basic equations that describe the transport of a single-phase fluid through a porous medium. These mathematical equations describe the physical processes of interest in the reservoir and are in the form of partial-differential equations (PDE's) that con­ sider the dynamic relationships between the fluid, the porous me­ dium, and the flow conditions present in the system. In this chapter, we derive a mathematical model that describes the most important as­ pects of single-phase-fluid flow. The model equations are expressed in different coordinate systems and are developed for the most com­ prehensive case. Later in the chapter, we reduce the comprehensive, general, differential equation to several special cases that are simple subsets of the original model. Fig. 4.1 highlights the formulation step in the development of a reservoir simulator. 4.2 Continuity Equation in Various Flow Geometries

The continuity equation (differential mass-conservation equation) can be developed by writing a mass-balance equation over a control volume (stationary volume element) through which the fluid is flowing. The shape of the volume element depends on the coordi­ nate system used to describe the flow problem. The coordinate sys­ tem should conform as closely as possible to the flow geometry de­ fined by the equipotential lines and streamlines that are, in tum, defined by the shape of the physical boundaries and distribution of reservoir properties. Figs. 4.2 through 4.4 show three flow geome­ tries commonly used in reservoir modeling. Note that, for homoge­ neous rock properties, streamlines are defined by the physical boundaries of the volume element in each coordinate system. It should be noted that rectangular, cylindrical, and spherical flow geometries represent relatively simple, well-defined flow patterns. The rectangular coordinate system represents rectilinear flow sys­ tems, while both the cylindrical and spherical coordinate systems represent curvilinear flow systems. In these two curvilinear sys­ tems, the flow elements are relatively simple patterns formed from well-defined orthogonal geometric elements, such as cylinders and spheres. When equipotential lines and streamlines are nonuniform­ Iy and asymmetrically distorted by the irregularly defined physical boundaries or heterogeneous reservoir properties, a generalized curvilinear coordinate system may be more convenient. Fig. 4.5, where a well is located at a distance from an infinite line source (x axis), presents this situation. Any quadrilateral element enclosed within a pair of neighboring equipotential lines and a pair of neighFORMULATION OF BASIC EQUATIONS FOR SINGLE-PHASE FLOW

boring streamlines will define a proper, orthogonal volume element in curvilinear coordinates. Sec. 4.3 shows that it is necessary to define a representative elemen­ tal volume to be able to write a mass-balance equation. The continuum approach must be used to define the properties of the elementary vol­ ume and the fluid flowing through it. This approach simply treats the porous medium as a continuum concerning rock and fluid properties (such as porosity, permeability, fluid viscosity, and fluid density) as­ signed to the control volume. These properties describe the overall be­ havior of the porous medium and the fluid contained in it. Fig. 4.6 shows the application of the continuum principle to define the porosity of the representative elementary volume. Applying the continuum approach results in the macroscopic defi­ nition of the control volume. The representative elemental volume at­ tempts to summarize the system's macroscopic behavior by taking into consideration the net average of the microscopic effects. To express the flow of fluids through porous media mathematical­ ly, it is necessary to use the following three fundamental laws or rules. l. The principle of conservation of mass (Eq. 2 . 1 74), which states that the total mass of fluid entering a volume element in the reservoir must equal the net increase in the mass of the fluid in the element plus the total mass of fluid leaving the element. 2. An equation of state (EOS) (Eq. 2.9 1 ) that describes the density of a fluid as a function of temperature and pressure. 3. The constitutive equation (Eq. 2.23), which describes the rate of fluid movement into or out of the representative elementary volume. 4.3 Derivation of General ized Flow Equations

4.3.1 Flow Equation in Rectangular Coordinates. The continuity

equation is a mathematical expression of material balance. It can be developed by considering the flow of mass through a control vol­ ume, as discussed in Sec. 2.4. 1 for the simple case of one-dimen­ sional (I D) flow. Because this section is concerned with developing the flow equation in rectangular coordinates, the control volume (shown in Fig. 4.7), is a rectangular prism with dimensions A x, Ay, and Az, with its sides parallel to the principal directions of the rect­ angular coordinate system and its center at (x, y, z). For this rectan­ gular prism, one can write a mass-balance equation for a single fluid flowing in the x, y, and z directions. At the x - Ax!2 face of the rect­ angular prism, the fluid flow rate and density are (Jx - /!xI2 and Px - M/2, respectively. Similarly, at the y - Ay/2 and z - A z/2 faces of the rectangular prism, the fluid flow rates and densities are 57


FORMU LATION

NONLINEAR PARTIAL· DIFFERENTIAL EQUATIONS

NONLINEAR ALGEBRAIC EQUATIONS

LINEAR ALGEBRAIC EQUATIONS

PRESSURE. SATURATION DISTRIBUTIONS. AND WELL RATES

N U M E RICAL RESERVOIR· SIMULATION PROCESS

MULTIPHASE FORMULATION

Fig. 4.1 -Formulation step in development of a reservoir simulator (redrawn from Ref. 1 ).

qy - 6.yl2. Py - 6.y12 and qz -6.zI2. pz - 6.zI2 . respectively. Likewise . at the x + t::. x/2. y + t::.y/2. and z + t::. z/2 faces of the control volume. the flow rates and densities can be expressed as qx 6.x I2 . Px 6.xl2; qy 6.yI2. Py 6.y/2; and qz 6.zI2, pz 6.zI2 · +

+

+

+

+

+

For the control volume shown in Fig. 4.7, one can write a mass-balance equation in the form of Eq. 2 . 1 74. (4. 1 )

Obviously, multiplication o f the flow rate, q , and density, P , gives the amount of mass entering (or leaving) the control volume per unit time because

[ q (�3)

][p(�)] [W(!f)].

...................

=

Fig. 4.7 shows a crosshatched arrow indicating that an additional amount of fluid may be injected into (or produced from) the control volume at a mass rate of qm (rnIt). In this book, we use a positive sign for injection and a negative sign for production. In other words, we consistently use a positive sign to indicate the fluid entering the con­ trol volume and a negative sign to indicate the fluid leaving the con­ trol volume.

z

/ z z�

-' [1 (a)

(4.2)

�.

1 � T -..

1!- AX =¥ : w�

z

(b)

z

(e) Fig. 4.2-Rectangular flow geometry and volume element details; (a) 1 0 flow, x direction only; (b) 20 flow, x and y directlons only; and (c) 3D flow, x, y, and z directions. 58

B ASIC APPLIED RESERVOIR SIMULATION


(a) z

(b)

(e)

Fig. 4.3-Cylindrical flow geometry and volume element details; (a) 1 0 flow, r di rection only; (b) 20 flow, r and (J directions only; and (c) 3D flow, r, (J, and z d i rections.

With these definitions, we can write a mass-balance equation over a finite period of time, I1 t,

[ (W) ' _ fu/Zl1t + (w)Y _ �Y/2I1t + (w)' _ �'/2I1t]

Substituting Eq. 4.5 into Eq. 4.4 gives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (4.6a)

W I'

Because mass flux, ;;; has the dimensions mlL2 t, the mass flow rate, w , can be defined as ,

=

mxl1yl1 z

=

mx A x,

Wy =

myl1 xl1 z

=

my An

Wx

.

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (4.5a)

and

mz

acp u p =

acp u z•

.

. . . . . . . . . . . . . . . . . . . . . . . . . . . . (4.6b)

=

.

can be substituted into Eq. 4.3 to give

- [ (P U, A X)l + fu/2 - (p U , A xt_ fu/2 + (p u \' A Y ) Y+ �Y/2

. . . . . . . . . . . . . . . . . . . . (4.4b)

The definition of mass flux can be stated in terms of density and vol­ umetric velocity as

=

.

. . . . . . . . . . . . . . . . . . . . . . . (4.4a)

. . . . . . . . . . . . . . . . . . . . . (4.4c)

my

w,

a,p u ,.A",

acp u ,A,. . . . . . . . . . . . . . . . . . . . . . . . . . . . . (4.6c) In Eg. 4.6, Ax , Ay, and Az = areas perpendicular to flow along the x, y, and z directions, respectively. The new definitions, wx , wy , and wz , and

. . . . . . . . . (4.3)

=

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

( ¢ l1 xl1yl1 zp )tHt - ( ¢ l1xl1yl1 zp )t . . . . . . . (4.7) I1 t Dividing Eq. 4.7 through by I1 xl1yl1 z and noting that Vb = I1 xl1yl1z =

1

ac

is the bulk volume o f the control element gives

(4.5b) •

(4.5c)

FORMULATION OF BASIC EQUATIONS FOR SINGLE-PHASE FLOW

59


(a)

(b)

e

r

(c)

Fig. 4.4-Spherical flow geometry and volume element detailS; (a) 1 0 flow, r direction only; (b) 20 flow, r and 8 directions only; and (c) 3D flow, r, 8, and e directions.

=

I (¢p ),+t;., ( ¢p ) , fl. t

Qc

-

. . . . . . . . . . . . . . . . . . . (4.8)

Now take the simultaneous limits over time and space; that is, look at an instant of time as the control volume shrinks to the infinitesimal.

x

Fig. 4.5-Equipotential lines, <1>, and streamlines, '1', describing the flow i nto a well from an i nfinite line source at a u niform poten· tial (after Ref. 2). 60

BASIC APPLIED RESERVOIR SIMULATION


POROSITY

In Eq.

I

++-+

DOMAIN

DOMAIN

OF MICROSCOPIC I E FFECT

OF

CONTINUUM

I

HETEROGENEOUS

/'" 1-- --

I I

MEDI U M

�--�--------��---

HOMOGENEOUS

I

MEDIUM

f

we can recognize the definition of the first-order partial

t,

respectively).

af as

.

=

1!�0

( + �s / 2 )

f s

(

- f s -

�s

�s / 2 )

' s = x,y,z,

. . . . . . . . . . . . . . . . . . . . (4. 1 0)

ELEMENTARY VOLUME

and for time,

� °O -------------VO -L U ME-+ �----------

(x,y,z + t.z)

z, and

For the spatial variables,

REPRES ENTATIVE

I I I

(a)

4.9,

deri vative with re spect to the space and time coordinates (x, y,

(x,y + liy,z + liz)

af

at

=

lim

:'1-0

f (t

Therefore, Eq.

(x lix,y,z liz)

+ �t) - f ( t )

�t

4.9

. . . . . . . . . . . . . . . . . . . . (4. 1 1 )

can be written as

+

+

z

), r t y z L\

(x + lix,y,z

(b)

,/

I )Jx.:Y�-----

(4. 1 2 ) Multiplying Eq.

:

,,/ liY' ----� �MI-/-------

+

(p u r)Y + :'Y/2 - (p u r)\' _ :'V/2 �y

�} [

a c Vb

=

_

=

(PU , ), + :'l/2 - (PUl) , - :'C/2 �z

( CPP ) 1 + At - ( cpp :'.<-0 ac� t 6.\'-0 :';:-0 :'1-0 lim

\].

EXTERNAL SOU RCE/SINK TERM

:

:

Vb , gives

- x ( p u , A \)� - y ( PU r A r ) �y - z ( p u , A , )�Z

,,,/

Fig. 4.6-(a) Assignment of porosity with representative elemen­ tary volume and (b) elementary volume (redrawn from Ref. 3).

_

4. 1 2 b y the bulk volume,

]

Vb a ( ac at cpp ) .

�:

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . (4. 1 3 )

Although some authors prefer t o keep the PDE a s given in Eq.

4. 1 2

and introduce the bulk volume at the level of finite-difference

equations, we will retain the form given in Eq. 4. 1 3 in this book. The only difference between Eqs .

4. 1 2 and 4. 1 3 is that Eq. 4. 1 2 is written 4. 1 3 , on the other hand,

per unit bulk volume of the reservoir. Eq.

provides a basis for including the cross-sectional areas perpendicu­

lar to the flow direction i n the harmonic averaging of the transmissi­ bility terms as discussed in S ec . In E q .

. . . . . . . . . (4.9)

+

4. 1 3,

8.2.2.

we deliberatel y carried the area terms inside the pa­

rentheses. Although this is a mathematical approximation, it makes it possible to accommodate changes in formation thickness in the x,

y, and z directions. This equation is a common form of the continuity equation or the mass-con servation equation in three dimensions.

( AI

AI)

fly 1--, 1+-, 1+1 2 2

( Ax

AI)

47 1:+-. 7+-, 1-1 1 1

Fig. 4.7-Control volume in rectangular coordinates. FORMULATION OF BASIC EQUATIONS FOR S INGLE-PHASE FLOW

61


Example 4. 1. Show that Eq. 4. 1 3 is dimensionally consistent. Solution. The dimensions of the differential terms on the left side are

. . . . . (4.2 1 ) the dimensions of the qm term are

�:

(L3)L3 T) (T)' L3L3/L3 ( L3 ) =

-+

(4. 1 5 )

Table 4.1 presents the units o f all variables and functions appearing in flow equations.

(4. 1 6)

Example 4.2. Write Eq. 4.20 in customary units. Solution. Using Table 4. 1 , enter the values off3c and ac and the val­ ue of Yc in the definition of potential. Then Eq. 4.20 in field units is

and the dimensions of the right side are Vb O ac at ( ¢p )

I

T

-+

( )

m

= m

T '

a

ox

Therefore, Eq. 4. 1 3 is dimensionally consistent. Now incorporate the remaining two fundamental laws, the EOS, and the constitutive equation into the continuity equation. Remem­ ber that an EOS relates the density of a fluid to pressure and tempera­ ture. A simple way to express this relationship is through the fluid formation volume factor (FVF), expressed by Eq. 2.80.

B = Psc

(4. 1 7)

p'

In Eq. 4. 1 7 , B = FVF, which is the volume at reservoir condi­ tions divided by the volume at standard conditions . Accordingly, Psc and p = densities of the fluid at standard and reservoir condi­ tions, respectively. Because Eq. 4. 1 3 is written to describe fluid flow in porous me­ dia, the velocity terms can be expressed with Darcy ' s law, Eq. 2.22, which relates the superficial velocity of the fluid to the potential gra­ dient at the inflow and outflow faces of the control volume.

Ux = - f3 c uy =

-

and u, =

� ��, k

0<1> f3c'jiy ay' -

13

k, 0<1>

c 'ji ai'

. . . . . . . . . . . . . . . . . . . . . . . . . . . (4. 1 Sa) . . . . . . . . . . . . . . . . . . . . . . . . . . (4. I Sb) . . . . . . . . . . . . . . . . . . . . . . . . . . (4. 1 Sc)

where velocities are expressed in RBID-ft2 [m3/(d ' m2 )]. Before substituting Eqs. 4. 1 7 and 4. 1 S into Eq. 4. 1 3 , we will ex­ press the qm term as a volumetric rate rather than a mass rate. This is done to conform with industry standard measurement practices that measure and express produced fluids in volumetric units rather than mass flow rates. That is,

(

1 . l 27A x kx a <l»

/-lB

a

ilx + ox oy

(

1 . l 27A y ky 0 <1»

/-lB

y oy D.

.Q.(t)

l... 1 . I 27A , k, O <l» =� /-lB OZ Llz + qsc 5.6 1 5 0t B ·

+ oz

(

. . . . . . . . . . . . . . . . . . . . . . 4.22

In

this equation, kx, ky, and kz are in darcies, Vb is in cubic feet, and all the other terms are as they appear in Table 4. 1 under customary units.

4.3.2 Flow Equation in Cylindrical Coordinates. The continuity equation in cylindrical coordinates can be obtained by considering a cylindrical element whose center is ( r,(} ,Z) as shown in Fig. 4.8. The flow equation as expressed in cylindrical coordinates is used exclu­ sively for single-well simulation problems. In these cases, a well is located at the center of a cylindrical drainage volume so that the well­ bore and the outer boundaries of the drainage volume are concentric. Note that the external source/sink term that is included as qm in the rectangular coordinates is often avoided in cylindrical coordinates be­ cause the well is at the center of the drainage area and the wellbore specifications and external conditions are incorporated in the form of boundary conditions as is done in classic well-test analysis. We again write the mass-balance equation as expressed in Eq. 4. 1 without an external source/sink term. To simplify the appearance of the equation, write the left side for each direction over a short period of time, D. t. Flow Term for the r Direction.

. . . . . . (4.23) The areas perpendicular to flow along the r direction can be written (4.24)

. . . . . . . . . . . . . . . (4. 1 9a) . . . . . . . . . . . . . . . . . . . . . . . . . . . . (4. l 9b) Now substitute Eqs. 4. 1 7 , 4. I S, and 4. 1 9b into Eq. 4. 1 3 to obtain

l... ox

(c 13

A xkx O <l» ilx + l... oy /-lB ox

(

13

C

(4.25)

Then, mass flow rates along the r direction become

A y ky O <l» /-lB oy D.Y

(4.26) (4.27) . . . . . (4.20)

Eq. 4.20 is the most general form of the single-phase-flow equation. In this form, Eq. 4.20 makes no assumptions regarding the fluid type (incompressible, slightly compressible, compressible) or pressure dependency of the rock and fluid properties. In arriving at Eq. 4.20, porosity is assumed to be a function of pressure and qsc = flow rate at standard conditions . If Eq. 4.20 is written in terms of pressure rather than potential (as­ suming horizontal flow and ignoring the gravitational forces in the

z direction; that is, V<I> = Vp), it takes the form 62

and A r + �r 2 = ( rD.(}D.Z )r + l>.r 2 · / /

Combining Eqs. 4.23 through 4.27 gives

(m j

[

]

) = a c ( rpU r D.(}D.Z L �r 2 - ( rp ur D.(}D. z tHr 2 M / /

- mO r

(4.2S) Flow Term for the () Direction.

]

(m j - mo)o = (w)O_ �O/2D. t - (W ) O + M/2D. t .

[

. . . . . (4.29)

Again, define the areas perpendicular to flow along the () direction as . . . . . . . . . . . . . . . . . . (4.30) BASIC APPLIED RESERVOIR SIMULATION


TABLE 4.1 -VARIABLES USED IN FLOW EQUATIONS AND DARCY'S LAW System of Units Symbol

Quantity

x, y,

Length

Customary Unit

Metric Unit

Conversion Factor*

It

m

0 .3048

ft2

m2

0. 09290304

,u m 2

0 .9869233

Z, r

Area

A

Permeability

k

darcy

Phase viscosity

,u

cp

Pa · s

0.001

RS/set**

m 3/std m 3**

5.551 931 4

RS/STS**

m 3/std m 3

1 .0

scf/STS

std m 3/std m 3

0. 1 801 1 75

Bg Bo, Bw Rs

Gas FVF Liquid FVF Solution-gas/oil ratio

et>, p Vet> , Vp

psi a

kPa

6 .894757

psi/ft

kPalm

22.62059

psi/It

kPalm

22. 62059

set/D

std m 3/d

0. 02863640

Clsc, Close, Clwsc U, q/A

STS/D

std m 3/d

0 . 1 589873

RS/(D-It2 )

m 3/(d · m 2)

1 . 71 0371 7

ft3

m3

0.02831 685

Phase density

P

Ibm/ft3

kg/m 3

1 6 .01 846

G ravitational acceleration

g

32. 1 74 ftls2

9.8066352 m/s2

0 .3048

c

psi- 1

kPa- 1

0 . 1 450377

Pressure Pressure gradient

y

Phase gravity

Clsc, qgsc

Gas flow rate Liquid flow rate Volumetric velocity

Vb

Gridblock bulk volume

Compressibility Absolute temperatu re

T

oR

K

0. 55555556

Relative permeability

k,

fraction

fraction

1 .0

fraction

1 .0

Porosity

4>

fraction

Phase satu ration

S

fraction

fraction

1 .0

Z

dimensionless

dimensionless

1 .0

day

day

1 .0

0, 0

rad

rad

1 .0

1 . 1 27

86.4x 1 0 - 6

0 . 2 1 584x 1 0-3

10-3

Compressibility factor Time Angle Transmissibility conversion factor

Pc Yc

G ravity conversion factor

ac

Volume conversion factor

5 . 6 1 4583

'Multiply customary unit by conversion factor to obtain metric unit. "STB and scf are measured at 60°F and 1 4. 696 psia; std m3 is measured at 1 5°C and 1 00 kPa.

Eq. 4.29 can be written as

where the bulk volume of the element is defined as (see Example 4.3)

]

(rni - rno)o = Q(' PuoL\rL\ z )O_<lO/2 - (puoL\rL\ z )O + <lO/2 L\ t. (4.3 1 ) Flow Term for the z Direction.

(rni - rno) z = [ (W ) Z _ Ilz/2L\t - (W\+1lz/2L\t] .

. . . . . . (4.32)

This time the area perpendicular to flow along the z direction is writ­ ten as (see Example 4.3) (4.33)

Eq. 4.33 can be used to redefine Eq. 4.32 as

(rni - rna) , = Q l.[ (p u JL\rL\O ) Z _ Ilz/2 - (p uz rL\rL\O ) Z+ M/2 ] L\t .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . (4.36)

Now, bring all the rnj ance statement,

-

11lo

and I1lo terms together into a mass-bal­

[

- (rp u r L\OL\z lr + <lr/2 - (rpu,L\OL\z lr_<lr/2 + (puoL\ rL\ z )O +M/2 - (p u o L\ rL\ z )O_ <lO/2 + (p u z rL\ rL\O) z + M/2

]

- (puz rL\ rL\8) Z _ M/2 L\t

=

d /L\ rML\ z

(4.37)

Dividing Eq. 4.37 by rL\ rL\8L\ zL\ t yields

. . . . . . . . . . . . . . . . . . . . (4.34) Mass-Accumulation Term.

(4.35) FORMULATION OF BASIC EQUATIONS FOR SINGLE-PHASE FLOW

63


z

4

5

(r+4r, &t-�' I+� ) ( r-lr, 6-ir, I-;r ) 1

1

4r

A6

1

41

6 7 8

Fig. 4.8-Control volume in cylindrical coordinates.

. . . . . . . . . . . . . . . . . . . . . . . . (4.4 l b)

. . . . . . . . . . . . . . . . . . . . . . . . . . (4.4 l c) Substituting these expressions of velocity into Eq. 4.40 and setting P = PselB gives At this stage of the development, take the simultaneous limits as 6.r, 6.(J, 6.z, and 6.t approach zero. In other words,

1

r

a ( rf3 c kr ar a<l»

ar

=

Jl B

(L fr(�)'

a(

a<l»

ko + ';:21 a8 f3 cJlB a8

a(

k:

a<l»

+ az f3 c JlB az

.............................

(4.42 )

Table 4. 1 gives the units for k" k() , kz , Jl , B, <1>, <P , r, 8, z, and t, and the values of ae , f3c , and Ye . Example 4.3 I . Find the expressions

[

( <PP }/+dl - ( <PP }/ = lim -.L 6.( M_O a C

dO-O d:-O d/-O

]

that define the areas perpendicular to the flow along the r, 8, and z directions of the control volume of Fig. 4.8. Also, obtain an expression that defines the bulk volume. 2. Obtain the expression that defines the 8 component of the ve­ locity term in radial-cylindrical coordinates. Solution.

.

.

. . . . . . . . . . . . . . (4.39)

I . Consider the plan view of the two concentric cylinders with a height of 6.z, as shown in Fig. 4.9. The crosshatched section in Fig. 4.9 represents the top view of the control volume of Fig. 4.8. To calculate the area of the inner boundary, Ar &/2, it is necessary to calculate the inner surface area at radius r - l1rI2, which is 2n(r - I1r12)6.z. Because the control volume ex­ poses only 6.812n fraction of this area, Ar &12 at radius r - l1rl2 is

-

After taking the limits and applying the definition of a partial deriva­ tive, Eq. 4.39 reduces to

_

Ar - M2 = 2 n(r - 6.rI2)6. Z (4.40) Eq. 4.40 is the continuity equation for three-dimensional (3D) ra­ dial-cylindrical coordinates without an external source/sink term. Darcy ' s law gives the superficial-velocity components in radial­ cylindrical coordinates (for the 8 component see Example 4.3) as

ur = 64

- f3c� aa�'

. . . . . . . . . . . . . . . . . . . . . . . . . . . (4.4 l a)

M

. . . . . . . . . . . . . . . . . . (4.43)

2n

or Ar - M2 = (r - 6.rI2)6.zI18.

(4.44)

Similarly, Ar + &12 at radius r + 6.rl2 will be

Ar + &/2 = (r + 6.rI2)6.z6.8.

(4.45)

To find the area perpendicular to the z direction, consider the ring­ shaped area,

n( r

+

2

2

I1r/2 ) - n ( r - I1r/2 } = 2 nrl1r.

. . . . . . . . (4.46)

BASIC APPLIED RESERVOIR SIMULATION


... . .. - - - ..

,

,

,

;

,

.. ..

"

� �

'''+++HHfr-''

I I

, , ,

I , I , \

I I I

, , , , ,

,

,,--

...

,

..

..

..

( r.e)

, ,

�e '

2"

,

, - - _ .... "

,

, ,

• I I

,

I , • ,

d

.. "

Ar

"2

"

Fig. 4 . 1 0-41 component of the velocity.

.. .. ... .. _ - - _ .. ..

Fig. 4.9-Plan view of two concentric cyli nders.

mal expansion is significant, the constant is something other than Again, only f:.812Jr fraction of this ring-shaped element appears in our control volume, so

unity. Furthermore, for an ideal incompressible fluid, viscosity is also constant. Accordingly, Eq. 4.20 can be rewritten as

(4.47)

or Az

-

&/2 = rf:.rf:.8.

(4.48)

. . . . . . . . . . . .

Because the area along the z direction does not change,

Az + &/2 = rf:.rf:.8.

(4.49)

The area perpendicular to the e direction is a rectangle and is simply

A e - MJ/

2

=

A e + MJ/

2

=

. . . . . . . . . . . . . . . . . . .

f:.rf:.z.

(4. 5 0)

We can use a similar strategy to calculate the bulk volume of the control element. The total volume between the two concentric cylinders is

n r

(

+

1 ) 2 f:. z

M 2

- n r

(

-

1 ) 2f:. z =

M 2

2 nrf:.rf:. z .

The control volume represents f:.8/2n fraction o f the above volume; therefore,

or

�!

2nrf:.rf:. ::.

Vb =

rf:.rMf:. z.

It is clear that the solution of E q . 4.55 is independent of time. The

time dependency of Eq. 4.20 is removed when B is treated as

constant for incompressible fluids (also porous medium is assumed to be incompressible). This indicates that Eq. 4.55 represents a stcady-state-flow problem as long as the boundary conditions are independent of time. Eq. 4.55 also implics that a pressure surface (isobaric map) over the reservoir develops instantaneously and re­ mains intact as long as the boundary conditions are not changed with time. Furthermore, Eq. 4.55 does not contain any porosity term be­ cause the reservoir rock is also treated as incompressible. This i m­

(4.5 1 )

Vb =

(4. 5 5 )

plies that incompressible-fluid flow does not allow for accumula­ tion or depletion. In other words, whatever crosses the physical boundaries into the reservoir must displace an equivalent volume from the reservoir.

If the gravity terms are neglected, the po �ntial g@d ent CEq . 2 . 1 5 ) . . . . . . . . . . .

. .

. . . . . . . . . . . .

.

. . . . . . . . . . . . . . . . . . . . . . . . . . .

(4.S2a)

becomes equivalent to pressure gradient

Vel>

will have pressure as the dependent varia Ie.

=

Vp ) and Eq. 4.55

(4.5 2b)

2. Fig. 4.10 shows that U(J i s tangential to the control volume

along Arc d-c, I, which passes through the center of the control vol­ ume. From Darc y ' s law, (4.53)

. . . . . . . . . . . . . For an anisotropic

(4.56)

( kx :;1!: ky :;1!: kz) but homogeneous (kx, ky. and k:. are

uniform) medium, Eq. 4 . 5 6 becomes

where 1 = rd8, or

a 2p +

kX a

-

. . . . . . . . . . . . . . . . . . . . . . . . .

(4.54)

x2

a 2p +

k \, � dy

a �p + fJ. qsc

kc a

-

Z2

P c Vb =

Note that, to arrive at Eg . 4.57,

Vb =

o.

. . . . . . . . . . .

(4.57)

A , f:..x

Furthermore, if the medium i s isotropic

= A , f:.y = A, f:.z. (kx = ky = Is: = k) as well

as homogeneous , we obtain

4.4 Different Forms of Flow Equations

a 2p + a 2p + a 2p +

The previous sections of this chapter developed the flow equations

ax2

for a homogeneous (single-phase) fluid without specifying whether the fluid was incompressible, s lightly compressible, or compress­ ibl e . The following sections modify the general flow equation ac­ cording to the dependency of the fluid density on pressure. We con­ tinue to consider only single-phase flow.

4.4.1 Incompressible-Fluid-Flow Equation. If the fluid i s incom­

pressible, the density i s constant; in other words, B is constant. If thermal effects going up the wellbore are negligible, B = 1 ; if ther-

FORMULATION OF BASIC EQUATIONS FOR S INGLE-PHASE FLOW

ay2

az2

jAqsc P c kVb = 0'

. . . . . . . . . . . . . . . .

and if no well i s within the domain of interest

a 2p -

ax2

+

a 2p -

Ciy2

+

a 2p -

az2

=

0.

(q�c = 0),

(4. 5 8 )

we obtain

. . . . . . . . . . . . . . . . . . . . . . .

(4.59)

Eg. 4.59 describes the pressure distribution p = p(x, y, z) in the flow field of an incompressible fluid in a homogeneous and isotropic me­ dium where there is no external source/sink term (well). Eq. 4.59 is called the Laplace equation. One interesting observation from Eq.

65


4.59 is that it does not contain any penneability term. This implies that

p

the distribution of is governed by the geometrical configuration of the reservoir and the imposed boundary conditions. The effect of is not reflected on the pressure distribution, but only on flow rate.

k

Example 4.4.

Show that Eq.

4.58

is dimensionally consistent. and

Solution. While the differential tenns

a2p/ax2 have the dimensions ( m/ t2 ) ( m ) = (i}) t2 '

a2p/ax2, a2p/ay2,

. . . . . . . . . . . . . . . . . . . . . . . (4.70)

L

(4.60)

L3

the dimensions of the IlQs,//3 c kVb tenn are

( m i Lt ) ( L 3 / t ) � (L3)

_

-

(m) Pt

2

Although this development assumes an incompressible porous me­ dium, Chap. 8 allows for the change of porosity with pressure. The flow equation for a slightly compressible fluid then becomes

. . . . . . . . . . . . . . . . . . . . . . (4.6 1 ) '

Because Eqs. 4 .60 and 4 . 6 1 have the same dimensions, Eq. 4.58 is dimensionally consistent. Example 4.5. The following PDE describes a specific fluid-flow problem in a porous medium. After examining the given mathemati­ cal fonnulation, describe the flow problem to the fullest extent.

a2p = C ax2 ,

Returning to the general fonn of the flow equation, Eq. 4.20, sub­ stituting for B on the right side with Eq. 4.69, and assuming incom­ pressible porous medium, yields

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (4.62)

where C > O. Solution. Obviously, C represents a I D flow problem. We can start with the most comprehensive form of the incompress­ ible flow equation, Eq. 4.55, in one dimension and try to reduce it to the fonn of Eq. 4.62. In one-dimension, Eq. 4.55 is (assuming = )

a2p/ax2

ap Again, ignoring the depth gradients (V<I> Vp ) yields , ap) a ( c Ayky ap) y J-lB ax dy p axa (p c Axk IlB ay A a ( A z kz a<I»

+ iJ z + q sc z /3 c IlB iii A

Vb ¢c

= a o iii' cB =

-

!I

_

_

Ax + -

!I

. . . . . . . (4.72)

=

V<I> Vp �

(4.7 1 )

At this point, one can either keep the B tenns on the left side, as shown in Eq. 4.72, or make further modification by substituting Eq. 4.69 on the left side and treating J-l as a constant. Eq. 4.72 then becomes

(4.63)

therefore, flow is through a horizontal medium. If the system is ho­ mogeneous, we have

/3cAxkx a2p ax2 A x J-l = 2 s or � � : q c = xiJ p c kxVb Il s a2p = - -w h· h ' ax2 /3ckxq Vb'c q"

+

0,

+

IC

0

..

. . .

..

. . .

.....

..

...

(4.64)

. . . . . . . . . . . . . . . . . . . . . . . . . . (4.65)

(4 . 73)

IS -

(4.66)

Expanding the derivatives on the left side gives

Comparing Eqs. 4.62 and 4.66 indicates that (4.67)

where C > O. Because the entriesJ-l , and Vb in Eq. 4.67 are all pos­ itive entries, the flow-rate entry, qsc , must be a negative entry (im­ plying production) for the equation to hold. After this analysis one can describe the flow problem as I D incompressible-fluid flow in a horizontal, homogeneous, porous medium that has a production well producing at a rate of

kx,

q sc

=

c /3 c ,

Vb

STBID [std m 3/d] .

.

. . . . . . . . . . . . . (4.68)

+ [1

+ c (p -

P )] dya (/3cA,ky dayP)Ay f3cAy kyc ( dayP) 2Ay o

+

. . . . . . . . . . . . . . . . . . . . (4.74)

In many cases, it can be safely assumed that [ 1 + c (p - pO)] 1 for slightly compressible fluids because c is very small. Consequently, ""

4.4.2

Slightly-Compressible-Fluid-Flow Equation. For slightly­ compressible liquid flow, assume that fluid compressibility is small and remains constant within the pressure range of interest. There­ fore, the FVF can be approximated as in Eq. 2.8 1 ,

(4.69)

where c = fluid compressibility. 66

BASIC APPLIED RESERVOIR SIMULATION


On the left and right sides of the equality sign, substitute for

B- ]

�x=�y=�z, kx = ky = kx Ax = = Az' 2 (up ) 2 (UP) 2 ] Ulp [(UP) uu2p x2 ay2 az2 -ax ay az ' The previous assumption becomes more explicit if

Ay

, and

,j2p

- + - +

resulting in

+

C

-

+

I

= p ara { rf3 kr [1

+ c(

- p ° )]lBo to obtain

e ll Bo [1 + c (p -

r

° )]

t t, { [ I + c(p -p °)]lBO } .

=

-

p apar } . . . . . . . . . . . . . . . . . (4.82)

.

Invoke the approximation that ,u is constant for a slightly compress­ ible liquid; carry the differentiations on both sides of the equation;

.

·

.........

.

. .

. . .

. . . (4.76)

The validity of thi s assumption becomes obvious when one recalls that compressibility, c, i s a very small number for slightly compress­

and treat [1

ible liquids and that pressure gradients are also relatively small (hence their squares become even smaller) . Obviously, this i s true only if

aplas

<

I psi/ft [kPalm] for

s =x,y,z.

Referring to Eq.

p

4.74, assuming that [ 1 + c(p - O) ]

=

1, and ne­

2 ap) ( r -ara ( r-ap) ar ar ¢flC -apat' = P� . . ...... e a ,. k - p ) :==

1 + c (p - p ° ) ] -

+ c -

. . . . . . . . .

This condition may be

violated in areas of high velocities around wellbores. glecting the square of pressure-gradient terms yields

kr as a constant.

[ I + c (p

c

Eq. 4.77

.

....

. . .

.....

. .

. . . . (4.77)

O ]

c,

+

+

up = P c kVb P caek at '

BO/Aq".

+

¢/Ac

. . . . . . . . . (4.78)

. . . . . . . . . (4.83)

( apar ) 2 r ar ( r apar ) <€

(4.84)

l l..

and realizing that

. . . . . . . . . . . . . . . . . . . . . . . (4.85)

represents the flow of a single-phase, slightly compressible

a 2p a 2p a2p ax2 oy2 az2

.

1

. . . . . . . . . . . . . . . . . . (4.86)

liquid in a heterogeneous and anisotropic formation. For a homoge­ neous and isotropic formation, this equation can be simplified to obtain

.

Again, recalling that

for a small compressibility,

·

.

This equation forms the basis of the classic pressure-transient-analy­ sis theory. In writing this equation we assumed that fluid properties are constant, flow is horizontal, pore compressibility is zero, pressure gradients are small, and gravitational effects are negligible.

FUI1hermore, if there is no external source/sink (well) in the system, Eq.

4.78 becomes

Example 4. 7. Rewrite the slightl y-compre ssible-flow equation in

a2p a2p a2p = f3e ,. ap ax2 ay2 az2 a k +

¢/Ac

+

. . . . . . . . . . . . . . . . . (4.79)

iii '

4.79 i s also known as the diffusivity equation . It should be real­ 4.79 are not diffusional flow but l aminar Darcy flow. Eq. 4.79 i s called the diffu­ Eq.

ID rectangular coordinates for situations when the pore volume va­ rie s with pressure .

Solution. When porosity becomes a function o f pre s sure, i t s vari­

ation with time needs to be considered in the flow equations; there­

¢ 4. 3 (Vb1ac)(aJat)(¢ p ), ¢ p = !Jlat. x a axa (f3 A,k, axp ) qsc = a c a ( ) = 4.87 iiax ( uapx ) Msc a

ized, however, that the flow dynamics described in Eq.

fore, we cannot bring the

sivity equation because of the mathematical analogy to diffusional

side of Eq .

flow. With the same analogy, the coefficient

¢ ) (j3c ac k), ;lc /

(

that ap­

pears on the right side is often referred to as the inverse of the hy­ draulic diffusivity constant. A quick check on the dimensionality of this group reveals that the ({Jc ac k)/(¢;IC) group has the same dimen­ sions as the diffusivity constant, as

(f3(.a c k ) ¢/Ac

-+

[ (L/L3/U(L)(L2/") ) ] = (L2/t) (m

t

)

t

.

D(U ). t

m

·

tor,

1 , PscfB but do not remove

. . . . . . . . . . . . . . . . . . (4.80)

proceed by substituting for

to the front of the differential opera­

The net effect of this on the slightly-compressible-flow

equation (when written only in the

C

-+

term out of the time derivative on the

right side of the equation. Starting with the original form of the right

fl B

Substituting for

�x

( 1 IB)

Vb

+

direction) i s

¢

7ft Ii .

[ I + c (p - p ° )]lBo and making the neces­

sary manipulations on the left side, Eq. R

pAr kx

fu + B

°

fl Vb ° - � 7ft { ¢ [ 1 + c (P - p )] } .

In contrast to the incompressible-fluid flow equation, the slightly­

4.79 yields a pres sure surface that i s a func­

tion of the independent variables

x, y,

Z,

and

t.

Example 4.6. Write the flow equation in 1 D

(r

can be written as

_

(4.88)

compressible-tlow equation describes a time-dependent problem so that the solution of Eq.

. . . . . . . . . . (4.87)

Now, we can concentrate on the right side.

direction) radial­

cylindrical coordinates for a sl ightly-compressible liquid in an in­

r (kr =

compressible, homogeneous , porous medium

Solution. Start by writing Eq. suming that V<I> . I

r

4.42 in the

= Vp ara ( rPe/ABkr apar ) = ac¢ a (I)

7ft Ii .

. . . . . . . . (4.89)

constant).

direction only and as­ With Eq.

. . . . . . . . . . . . . . . . (4. 8 1 )

FORMULATION OF BASIC EQUATIONS FOR SINGLE-PHASE FLOW

4.89, use the chain rule to write (4.90) 67


With Eq. 2.35 for pressure-dependent porosity, (4.9 1 ) yields

�:

Assuming that porosity is independent of pressure and substituting for the gas-phase FVF (as expressed by Eq. 2.83),

c1Z ' g aPcsTscp

B = = CR¢o ;

o

¢

(4.92)

op

therefore, iii - CR¢ o . . . . . . . . . . . . . . . . . . . . . . . (4.93) ot ' The right side of Eq. 4.88 can now be expressed as _

�b fr{¢ [l + c( p - p O )] }

/J

o n the right side o f Eq. 4. 1 00 yields the final fonn o f the compress­ ible flow equation.

.£.

( Ax kx )

OP c A ox P /J g B g ox X

=

. . . . . . (4.94) Because both C and CR are small tenns, their product will yield a much smaller tenn whose contribution to the summation within the brackets will be negligible, (CCR 0). Therefore, the final fonn of the slightly compressible flow equation in 1D rectangular coordinates is =

. . . . . . . (4.95) where Ct = total compressibility of the liquid and the fonnation, C, = C + CR¢o

/¢ .

. . . . . . . . . . . . . . . . . . . . . . . . . . . (4.96)

In numerical reservoir simulation, the treatment of the accumulation (time-derivative) tenn is critical for a mass-conservative fonnula­ tion. Sec. 8.5 discusses the appropriate procedures to handle the ex­ pansion of the accumulation tenn, resulting in a material conserva­ tive fonnulation.

(4. 1 0 1 )

Vb¢Tssc T c .2.. (!!.) ot Z

P

+

'

.£.

( /JgAykByg ) OP

c oy P

oy

AY

. . . . . . . . . . . . . . . . . . . . . . . . . (4. 1 02)

with the units as reported in Table 4. 1 . Eq. 4. 1 02 is a nonlinear PDE and can only be solved numerically. The nonlinearity arises from the strong dependency of/Jg , Bg , and Z (compressibility factor) on pres­ sure, the dependent variable. Example 4.8. Linearization of Eq. 4. 1 02 is possible in several ways. One option is to assume ideal-gas behavior. Simply substitute for Bg in Eq. 4. 1 02, set Z = I , and treat /J as a constant. Can you rec­ ognize the resulting equation? Solution. To simplify the development, consider only I D flow and substitute Bg = Psc 1Zlac I'scP with Eq. 4. 1 0 1 into Eq. 4. 1 02.

.£.

ox

( Ax kx cT ) p

,.

II

{'"'g

a

".

p

P sc 1Z

=

Vb¢Tsc .2.. (!!.)

=

Vb¢ .2.. (!!.)

P sc T ot

OP

ox

A x + q gsc

. . . . . . . . . . . . . . . . . . . . . . . . . (4. 1 03)

Z

4.4.3 C ompressible-Fluid-Flow Equation. For gas flow it is impos­ sible to assume constant compressibility and viscosity. Therefore, the real-gas law is used as an EOS to express the variation of the density of gas with pressure. Starting with Eq. 4. 1 3, substitute for the velocity tenns and use Eq. 2. 1 9 1 for qmg and Eq. 2.83 for Bg , (4.97) and

(4.98)

pg pgsc/Bg a c• =

to obtain

a c ot Z ·

. . . . . . . . . . . . . . . . . . . . . . . . . . . (4. 1 04)

For an ideal gas (Z = 1 and /Jg is constant), Eq. 4. 1 04 simplifies to

(

o

P o " vX /3c Axkxp" vX

g sc-T )A x qgsc -a c Ts /J P

+

c

(4. 1 05)

=

�bc f(¢Pgsgc ) .

. . . . . . . . . . . . . . . . . . . . . . . . . (4.99)

vt a c B

Eq. 4.99 assumed that V<I> = Vp. Dividing the entire equation by (}gsc1ac yields

( /JAgxBkxg )

op aA o p -- X OX OX c

+

( /JgAykyBg )

op ay 0 p c -- A oy oy

2 Vb /J g ¢ ac

68

(4. 1 06)

For a homogeneous porous medium with no well,

0 2p 2 OX 2

_ -

¢/Jg

1 op 2

P e ac k p at·

(4. 1 07)

Again for an ideal gas, cg = ip (see Example 2.4); then

o 2p 2 ax 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . (4. 1 00)

1 op 2 2p at·

=

¢/3/JcagCgc k

op 2

at'

l

. . . . . . . . . . . . . . . . . . . . . . . . . (4. 1 08)

which is the 1D fonn of the diffusivity equation in the pressure­ squared fonn. This fonn of the compressible-flow equation has ap­ plications in low-pressure gas reservoirs (usually up to 500 psia) BASIC APPLIED RESERVOIR SIMULATION


= Pe

Externl'

Boundary

k

,

= =

k (x,y) � (x,y)

Find p = p(x,y)

Fig. 4.1 1 -Two-dimensional flow domain with a well. where real-gas behavior c a n be approximated effectively by the ideal-gas equation.

Fig. 4.1 2-Steady-state Dirichlet problem. i s known as t h e Dirichlet problem. Fig. 4.12 shows a typical Dirich­

4.5 Initial and Boundary Conditions

let problem.

Sec. 3 . 3 . 3 briefly presented initial and boundary conditions with the discussion of basic differential equations. In this section, we deal with this topic in more detail, with specific application to fluid-flow problems. The equations we have studied represent specific physi­ cal problems. For example, Eq. 4.59 represents a large class of physical phenomena known as steady-state phenomena. Withi n the scope of this book, Eq. 4.59 represents the flow of a single-phase, incompressible liquid through an incompressible, 3D porous me­ dium that has homogeneous and i sotropic properties. For the sake o f discussion, recall that

a2 ax2 ay2 az2 .

a zp a zp p -+-+- = 0

. . . . . . . . . . . . . . . . . . . . . . .

(4.59)

4.5.2 Pressure Gradient Specified on the Boundary-Neumann Pl"Oblem. By specifying a pres sure gradient normal to the boundary, the flux (or velocity) normal to the boundary i s prescribed. There­ fore, a constant-flow-rate specification at the well bore is equivalent to specifying the pressure gradient at the sandface. This statement can be understood better i f one considers Darcy's law written at the sandface of a well, q

=

- 2 :rrf3c rw kh dp l r = rw• f.l dr

ular solution from the infinite set of solutions, additional conditions ation. These conditions are c alled boundary conditions. The prob­ lem of finding the solution to Eq. 4.59 that satisfies the imposed boundary conditions is called a boundary-value problem.

. . . . . . . . . . . . . . . . . . . . . (4. ] 1 0)

a ax2 ay2 azl f3cack at '

In Eq. 4. 1 1 0, f.l ,

rw,

k,

and h are problem specific and, by specifying

a constant flow rate (fixing the value of q), one simply specifies the

value of

(dp/dr) l r = rw ' Note that q is

the sandface rate in

Eq. 4. 1 1 0.

Again, the specification of the pressure gradient along an external

boundary results in the specification of the flux normal to the boundary.

If the problem i s similar to the diffusivity equation,

a zp azp a2p ¢w p - + - + - = -- ­

(4. 1 09)

Eq. 4. 1 09 can be rearranged to solve for the pressure gradient as

Eq. 4.59 has an infinite number of solutions. To choose one partic­ must be specified at the boundaries of the domain under consider­

..................•

A special case often encountered in reservoir engineering is the no-flow

(4.79)

which describes a time-dependent (unsteady-state flow) phenome­

boundary where the flux vanishes everywhere on the boundary. Ob­ viously, if flow across the boundary does not exist, this implies that the pressure gradient across the boundary is also zero. A volumetric reser­ voir with completely sealed outer boundaries is equivalent to a zero

non , the boundary conditions must be satisfied for all times t � O. In

pressure gradient across its outer boundaries.

every point of the domain at the particular instant of time when the

with a pressure-gradient specification acros s its boundaries is

the case of Eq. 4.79, the initial conditions must also be satisfied at physical process begins, t = O. The problem of finding the solution of Eq. 4.79 that satisfies the specified boundary conditions and ini­

tial conditions i s called an initial-boundary-value problem. Consider the two-dimensional

4.11

(2D)

flow domain shown in Fig.

for a well located in the central portion of the field. The flow

domain described by Eq. 4.79 is the area between the limits of the reservoir and the well bore. Therefore, we can group the boundaries under two general names: external, which are the physical bound­ arie s of the flow domain, and internal, which are the wellbores. Any specification of boundary conditions for the PDE' s developed i n this chapter should provide a description of the geometric shape of the boundary and the locations of the wellbores. We now review the var­

The problem of solving for the pressure distribution in a domain

known as the Neumann problem. Fig. mann problem schematically.

4.5.3 Pressure Gradient and Pressure Specifications on the Bound­

(leaking) boundary. Under these conditions, the Dirichlet-type bound­

ary condition is prescribed over a part of the boundary and the Neu­ mann condition is prescribed over the remainder of the boundary. An oil reservoir that is partially exposed to a strong aquifer is a typical ex­ ample of the mixed-boundary-condition specification (Fig.

Pressure Specified on the Boundary-Dirichlet Problem.

a well producing (or inj ecting) at a constant sandface pressure. On the other hand, at the external boundaries, such a specification im­

4.14).

NO FLOW

lems in porous media.

At the internal boundaries, or well bores, this specification implies

shows a typical Neu­

ary. Sometimes both the potential and its first derivative are prescribed on different segments of the boundary. Such a condition is possible when we are dealing with a porous medium that has a seruipervious

ious boundary conditions that are encountered in fluid-flow prob­

4.5.1

4.13

NO FLOW

k = k (x ,y) • = • (x ,y)

Find p = p(x,y,t)

NO FLOW

plies that the pre ssure on the boundary remains constant. This type of boundary condition occurs in reservoirs that are constantly charged by strong water influx so that the pressure at the interface between the hydrocarbon reservoir and the supporting aquifer re­ mains constant. In the theory of PDE's, the problem of finding a solution for a domain with a pressure specification on its boundaries

FORMULATION OF BASIC EQUATIONS FOR SINGLE-PHASE FLOW

NO FLOW

Fig. 4.1 3-Unsteady-state Neumann problem. 69


NO FLOW

X=D

Fig. 4.1 5-0ne-di menslonal steady-state flow problem.

NO FLOW

and at x = L, q = CL , implying that

ap = - CL f.l " a) X = L P e Ak NO FLOW

Fig. 4.1 4-Mixed-boundary-condition specification.

In time-dependent problems (unsteady-state flow), the boundary conditions must be specified for all t � O . For these problems, the boundary conditions can also become a function of time. For example, a well that was put on production at a constant rate, shut in for a period of time, and finally put on production at another rate illustrates a situa­ tion where the imposed boundary conditions are a function of time. To complete the mathematical description of the problem, we must specify the initial condition for the time-dependent variables. This is accomplished by specifying the pressures at each point at the initial time. Generally, initial pressures are specified at a specific datum depth and the existing hydrostatic gradients are used to initialize the problem at other depths. Secs. 9.7. 1 and 9.7.2 present detailed discus­ sions of initial and boundary conditions in multiphase flow. The nature and magnitude of the boundary and initial conditions are governed by the physical problem at hand. PDE with proper boundary and initial conditions will define a well-posed problem if the solution exists and is unique. If the mathematical problem and its solution satisfy these requirements, then we have a properly for­ mulated problem and we can proceed with a numerical solution . Ob­ viously, some rigorous tests may be necessary to verify that the solu­ tion generated fulfills these necessary conditions. However, because these tests are beyond the scope of this book, we implicitly assume that we are always dealing with a well-posed problem.

A

Example 4.9. Consider Fig. 4.15, which shows I D, single-phase, steady-state flow taking place in homogeneous, porous medium. Which of the following boundary conditions are appropriate? I . P = po at x = O; P = PL at x = L 2. q = Co at x = 0; q = CL at x = L 3. q = Co at x = O; P = Po at x = O 4. q = Co at x = O; P = PL at x = L Soilltion. To analyze this problem, it is necessary to realize that the pressure distribution P = p(x) is a linear function of x . This can be verified easily by integrating a2plax2 = ° twice. The first integration yields

ap ax = m l ,

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (4. 1 1 1 )

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . (4. 1 1 2) where m 1 and m2 = two integration constants to be determined from the two boundary conditions. 1. t x = 0, P = PO , implying that Po = m2; at x = L, P = PL, imply­ ing that pL = m I L + m2; and 111 \ = (PL - po)lL. Then, the formal solu­ tion is

A

_

P -

(PL - P o)x L

+

P o·

. . . . . . . . . . . . . . . . . . . . . . . . (4. 1 1 3)

Eq. 4. 1 1 3 provides a unique solution to the problem; therefore, the conditions given in Part 1 are well posed. 2. x = 0, q = Co , implying that

At

- Co f.l ; P e Ak 70

. . . ...... .... .. .

Because the variation of pressure with position is a linear function of x, (ap/ax)lx = o must equal (ap/aX)I X = L' If CO ;l! CL , this require­ ment is violated. In other words, this specification will either be in­ consistent or redundant. If it is inconsistent, it is obvious that the problem is ill posed. Further analysis of the redundant case also shows that this problem is ill posed. Thi s is because in the redundant case, we basically have only one piece of information: C = Co = CL , which implies that

ap ap = ax lx= o ax lx = L ap

_

.

.

.

.

. . . . (4. 1 1 4)

. . . . . . . . . . . . . . . . . . . . . . . . . . . . (4. 1 1 6a)

- Cf.l

and ) ' = o ' a Pe Ak

. . . . . . . . . . . . . . . . . . . . . . . . . . . (4. 1 1 6b)

or, from Eq. 4. 1 1 1 , that 111 1 = - Cf.llpcAk. Now, because we have used all our information on the boundaries, we do not have any available information to evaluate m2 in Eq. 4. 1 1 2. The best we can do is P =

- Cf.l X + m2' P e Ak

. . . . . . . . . . . . . . . . . . . . . . . . . (4. 1 1 7) .

which is non unique because every value of the constant m2 will re­ sult in a different solution to the problem. Because uniqueness is a property of a well-posed problem, the conditions given in Part 2 will always be ill posed. 3. At x = 0, q = Co , implying that

ap f.l ax 'x = o = - Co pcAk ;

. . . . . . . . . . . . . . . . . . . . . . . . (4. 1 1 8)

from Eq . 4. 1 1 1 , m l = - CQUlpcAk; and at x = O, p = Po, implying that m2 = Po (from Eq. 4. 1 1 2). Then, the formal solution is f.l P = - CO P Ak x ,

+

Po ·

. . . . . . . . . . . . . . . . . . . . . . (4. 1 1 9)

Here again, the problem is well posed. 4. At x = 0, q = Co , implying that (from Eq. 4. 1 1 1 ), ml = - COf.l1pcAk ; and at x = L, P = PL , implying that (from Eq. 4. 1 1 2)

P L = - Co

f.l L + m2 peAk -

or m2 = PL + Co

and the second integration yields

. . . . . . . . . . . . . . . . . . . . . . . . (4. 1 1 5)

. . . . . . . . . . . . . . . . . . . . . (4. 1 20)

f.l L P e Ak .

(4. 1 2 1 )

Then, the formal solution is

f.l L P = - Co f.l x + PL + Co --

p cAk

p e Ak

. . . . . . . . . . . (4. 1 22)

Here again, the problem is well posed.

4.6 Chapter Project

A-I

Initially, we consider the reservoir to be a single-phase reservoir and study the single-phase-flow problem for incompressible, slight­ ly compressible, and compressible fluids. Chap. 9 discusses multiBASIC APPLIED RESERVOIR SIMULATION


B-2

B-1

<

4.6.1 Incompressible-Fluid-Flow Formulation for the A-I Res­

ervoir. The 2D incompressible single-phase-fluid-flow equation for the A- I reservoir can be obtained directly from Eq. 4.55 by drop­ ping the z-direction term. This yields

+

. . . . . . . . . . . . . . . . . . . (4. 1 23) Because Ax, kx, Ay, and ky are kept within the differential operators

a/ox and 0/0)', we can accommodate the heterogeneous nature of the

system. Furthermore, the existing anisotropy of the system is main­ tained by assigning directional subscripts x and y to the area and per­ meability terms. 4.6.2 SlightIy-Incompressible-Fluid-Flow Formulation for the

A-I Reservoir. This time, we start with the general form of the slightly-compressible-fluid equation as given by Eq. 4.7 1 . Again, dropping the z-direction term to describe the flow problem in a 2D (x and y directions only) flow domain yields B-3

B-4

l... ox

(

A. t k t /-lB

O<l»

ox

Ax

+

Fig. 4.1 6-A-1 reservoir and positioning of the axes of the coor­ dinate system with respect to geographical directions.

phase-flow problems. As Chap. 5 shows, a 2D rectangul ar grid model is used to describe the A- I reservoir. The rectangular coordinate system is set in such a manner that the x and y directions of the coordinate system coincide with the main flow directions. Recall from Chap. 2 that the main flow directions are identified as southwest-northeast and southeast-northwest. Accord­ ingly, the axes of the rectangular coordinate system are placed parallel to the southwest-northeast and southeast-northwest directions, re­ spectively (Fig. 4.16). In this way, the four-component permeability tensor in a 2D space is approximated with a permeability vector with two entries, kx and ky . The two directions with the largest and smallest permeability values are identified as the x and y directions, respective­ ly (refer to Sec. 2.6.2, where the southeast-northwest directional per­ meability is reported as the 80% of the southwest-northeast direction­ al permeability).

(r +

ill: 2 '

e + t'.B2 ' e + �2e )

0-direction flow component

(

l... oy

A. y ky /-lB

O<l»

oy

�y

+

qsc

Pc

. . . . . . . . . . . . . . . . . . . . . . . . . . . (4. 1 24)

4.6.3 Compressible Fluid Flow Formulation for the A-I Reser­ voir. For this case, the starting equation is Eq. 4. 1 02, which, when written in two dimensions, gives

=

;::,�; fr(�).

.

. . . . . . . . . . . . . . . . . . . . . . . . (4. 1 25)

V<I> Vp.

Eq. 4. 1 25 ignores the hydrostatic head ofJhe gas�column because the density of gas is low. This results in Note that the nonlinearity of the PDE is retained by treating /-lg , Bg , and Z as func­ tions of the dependent variable =

p.

r-direction flow component

z

EXTERNAL SOURCE/SINK wr,e,e

y

x

6-direction flow component

(r

-

�.e - �e . e - �2e ) Fig. 4.1 7-Control volume in spherical coordinates.

FORMULATION OF BASIC EQUATIONS FOR SINGLE-PHASE FLOW

71


z

II n-h/ 3

,, -11/2

- To / 4 n2 11 / 6

n· SII/ 6 ,,-.

I{

n- " · /6 . 711/ 4

if.

...

no!1I / f L ..

Fig. 4 . 1 8-Elllptlc-cylindrical coordinates.

Exercises

-----.. . x L

Develop the single-phase-flow equation in 3D spherical coordi­ nates. To develop the mass balance, use the elementary volume shown in Fig. 4.17. (Spherical-flow geometry is encountered around the perforations as well as around wells that are partially penetrating a thick formation.) 4.1

the 3D Laplace equation in the elliptic-cylindrical coordinates (�, 'YJ, z) shown in Fig. 4.18. (The elliptic-cylindrical coordinate system is practical for analyzing fluid-flow dynamics in porous media with a vertical fracture plane along the well. Further­ more, in distinctly anisotropic formations, equipotential lines are developed as confocal ellipses rather than concentric circles.) Func­ tional relationships between the rectangular and elliptical coordi­ nate systems are x = It cosh � cos 'YJ, Y = It sinh � sin 'YJ, and z = z, where � � O, O � 'YJ � 2n, and - 00 < z < + 00 .

b

h

4.2 Develop

4.3 Derive Eq. 4.40 from Eq. 4. 1 2 using coordinate transformation.

x=O

x=L

P = Pw

P = PL

Fig. 4.1 9-0ne-d l menslonal reservoir in Exercise 4.6.

the fluid-flow problem in the homogeneous system, what is the per­ meability of the system along the x direction? 4.9 Consider the equation

Note that x = rcos O, y = rsin O, and z = z.

4.4

Derive Eq. 4. 1 2 from Eq. 4.40 using coordinate transformation.

Vb 2.. (!t)

1 =_ P ea c k ", a t

4.5 Give a complete mathematical description of the unsteady-state

radial flow converging to a fully penetrating well with radius rw pro­ ducing at a constant rate qsc for the following. 1 . An infinitely large homogeneous reservoir. 2. A finite reservoir with constant pressure at the outer boundary. 3. A finite reservoir with no flow at the outer boundary.

4.6 Consider the following 1 D, horizontal, porous medium in which

steady-state flow of oil is taking place in the positive x direction. Note that there is no well in the system (Fig. 4.19). The permeability of the system varies according to the expression lex = ( 1 ,000) + (980 + O.04x), where x is in feet and kx is in darcies. It is also known that at x = 0, p = Pw, and, at x = L, p = PL (pressures are in psia). If the viscosity of oil is.uo cp and the dimensions ofthe porous medium are h, b, and L, give a complete mathematical statement for the problem and obtain an expression that describes the pressure gradient at any point in the porous medium. 4.7 The PDE iPplail = 400 describes a specific fluid-flow problem

in porous media with the boundary conditions p (x = 0) = 200 psia and p (x = 1 (0) = 1 00 psia. After examining the given mathematical formulation, describe the flow problem to the fullest extent. Given Ax = Ay = 1 00 ft2, L\x = 200 ft, ay = 1 00 ft, ky = 1 00 md, and.u = 1 cp, and the PDE (a 2plax2) + Y2 ( a 2play2) = O that describes

4.8 72

B8 .

Show that this PDE represents real-gas flow in a I D porous system without wells if the permeability pressure dependence is described by the Klinkenberg equation, k(P) = k ( 1 + alp) , where k 00 and a are constants. 00

4.10 After examining the PDE (alax)[Iex(aplax)] + a 2play2 = - I and Fig. 4.20, describe the flow problem quantitatively and qualitatively to

the fullest extent.

A fluid-flow problem in a porous medium is expressed by the PDE (alax) [ 1 . l 27Axkx(aplax)] - 0.0433(alax)( 1 . l 27Axlex) = 0. If properties of the flowing fluid are .u = I cp, B = I RB/STB, and p = 62.4 Ibrnlft3, describe the physical characteristics of the reser­ voir qualitatively and quantitatively.

4.11

4.12 The differential equation ( 1 /r)(ala r)[,pck,.(acl>/a r)] = 0 de­ scribes I D, single-phase, incompressible flow in a circular, homo­ geneous reservoir. l . For the boundary conditions shown in Fig. 4.21, obtain an ex­ pression that gives the potential distribution as a function of radius. 2. Using the solution to Part I, determine the flow rate into the well. 3. What is the flow rate across the outer boundary of the system? B ASIC APPLIED RESERVOIR SIMULATION


Hint: Substitute the definition of Bg into Eq. 4. 1 02 before applying the above transformation.

4.15 Does iJ 2p/iJx2 = a represent any fluid-flow problem in porous media? If it does, provide a full description of the problem. x

4.16 Give the simplest form of the PDE that governs the flow of an incompressible fluid in a 2D homogeneous but anisotropic forma­ tion with no depth gradients. Assume that no well is in the reservoir. 4.17 The surface properties, such as surface tension, interfacial ten­ sion, and specific surface area, play important roles on fluid-flow dynamics in porous media. Explain why these properties do not ap­ pear in the fluid-flow equations.

Fig. 4.20-Two-dimensional reservoir in Exercise 4.1 0.

r

=

r

e

4> = 4>

e

4.18 Show that - (iJ/iJx) ( pux ) = P!jJ(C + CR )(iJp/iJt) represents the ID form of the continuity equation for single-phase flow where po­ rosity is treated as a function of pressure. In this equation, C and CR represent the fluid and pore compressibilities, respectively. Nomenclature

a = constant

A = cross-sectional area normal to flow, L2 , ft2 [m2 ]

=

Fig. 4.21 -Reservoir in Exercise 4. 1 2.

Boundary

40

Ar = cross-sectional area normal to r direction, L2 , ft2 [m2 ] Ax = cross-sectional area normal to x direction, L2 , ft2 [m2 ] Ay = cross-sectional area normal to y direction, L2 , ft2 [m2 ] Az = cross-sectional area normal to z direction, L2 , ft2 [m 2] Ao cro s s s ect i on al area normal to () direction, L2 , ft2 [m2 ] b = width, L, ft [m] B = FVF, L31L3 , reservoir volume/volume at standard conditions Bg = gas FVF, O1L3 , RB/scf [m3/std m 3 ] Bo = oil FVF, L31L3 , RB/STB [m3/std m3 ] Bw = water FVF, O/L3 , RB/B [m3/std m3 ] BO = FVF at reference pressure and reservoir temperature,

Fig. 4.22-Discretized 1 0 reservoir in Exercise 4.1 3.

4.13 Consider the incompressible-fluid-flow problem in the 1 D po­ rous body shown in Fig. 4.22 (viscosity of the fluid is 2.0 cp). I . If the well in Block 2 is produced at a steady flow rate of 450 STB/D and this rate creates a pressure distribution of P I = 2,400 psia, P 2 = 800 psia, and P 3 = 800 psia, what is the penneability of this linear, homogeneous system? 2. What kind of boundary condition would you assign to the ex­ treme left end of the system? Quantify your answer. 3. If all the length dimensions of the Blocks I , 2, and 3 are doubled, what would the flow rate into the well be if the same pres­

OIL3 RB/STB [m3/std m3]

= = CR = C

cg

C= CL ,CO = D= g= h= k= kr = kx =

sure di stribution i s assigned to the new system?

4. Assume that the viscosity of the fluid of Part 1 is 4 cp and the wellblock pressure is maintained at 800 psia. What would the well flow rate and the pressures in Blocks I and 3 be if the extreme ends of the system represent no-flow boundaries?

4.14 Linearize the compressible-flow equation, Eq. 4. 1 02, by use of the transformation

m =

p

f:

z dP.

o

FORMULATION OF BASIC EQUATIONS FOR SINGLE-PHASE FLOW

-

kz =

1<0 = LJ = L= m=

compressibility, Lt2/m, psi - 1 [kPa - I ] gas compressibility, Lt2/m, psi - I [kPa - I ] reservoir rock compressibility, Lt2/m, psi - 1 [kPa- l ] constant constants in Example 4.9 diffusivity, L2/t, ft2/D [m2/d] acceleration of gravity, L/t2 , ft/s2 [rnls2 ] thickness, L, ft [m] permeability, L2 , darcy [u m2 ] permeability in the r direction, L2 , darcy [u m2 ] permeability in the direction of the x axis, L2 , darcy [u m2 ] permeability in the direction of the y axis, L2 , darcy [u m2 ] permeability in the direction of the z axis, L2 , darcy [u m2 ] gas permeability at infinite pressure, L2 , darcy [u m2 ] {:I-direction permeability, L2 , darcy [um 2 ] total fracture length (Exercise 4.2), L, ft [m] distance, displacement, L, ft [m] mass per unit volume of porous medium, mlL3 , Ibrnlft3 [kg/m3 ] mass accumulated, or mass of excess material stored in or depleted from the control volume over a time interval , m, Ibm [kg] 73


mj = mass in, or mass of component entering the control volume from other parts of the reservoir, m, Ibm [kg] 1110 = mass out, or mass of component leaving the control volume to other parts of the reservoir, m, Ibm [kg] ms = sink/source, or mass of component leaving or entering the control volume externally (through wells), m, Ibm [kg] mass flux vector, mlL2t, Ibml(D-ft2 )[kg/(d ' m2 )] x component of mass flux vector, mlL2 t, Ibml(D-ft2 ) [kg/(d ' m2 )] y component of mass flux vector, mlL2t, Ibml(D-ft2 ) [kg/(d ' m2 )] ni z = z component of mass flux vector, mlL2t, Ibml(D-ft2 ) [kg/(d · m 2 )] p = pressure, mlLt2 , psia [kPa] 2 Pe = pressure at external reservoir boundaries, mlLt , psia [kPa] 2 Po = reference pressure, mlLt , psi a [kPa] 2 pressure at x = O, mlLt , psia [kPa] Pw = flowing well bottomhole pressure, mlLt2 , = Pwf psia [kPa] p O = reference pressure, mlLt2 , psia [kPa] Vp = pressure gradient vector, mlL2 t2 , psi/ft [kPalm] 3 3 q = production or flow rate, L /t, RBID [m /d] 3 3 qg = gas production rate, L /t, RBID [m /d] 3 qgsc = gas production rate at standard conditions, L /t, 3 sefID [std m /d] qm = mass production rate, mit, IbmID [kg/d] qmg = mass production rate of gas, mit, IbmID [kg/d] 3 qosc = oil production rate at standard conditions, L /t, STBID [std m 3/d] production rate at standard conditions, L3/t, STBID [std m 3/d] water flow rate at standard conditions, L3/t, BID [std m 3/d] r = distance in radial direction in both cylindrical and spherical coordinate systems, L, ft [m] radius of external boundary, L, ft [m] well radius, L, ft [m] solution-gas/oil ratio, L3/0 , sef/STB [std m3/std m 3 ] 6.r = difference along r direction (6.r = r; + 1 - rj), L, ft [m] s = saturation, fraction t = time, t, days 6.t = time interval ( 6. t = tn + 1 - t n) , t, days T = absolute temperature, T, OR [K] Tsc = standard condition temperature, T, OR [K] Ur = superficial velocity component in r direction, LIt, RB/(D-ft2 ) [m3/(d ' m2 )] superficial velocity component in x direction, LIt, RB/(D-ft2 ) [m3 /(d ' m2 )] Uy = superficial velocity component in y direction, LIt, RB/(D-ft2 ) [m3/(d ' m2 )] superficial velocity component in z direction, = Uz LIt, RB/(D-ft2 ) [m3/(d ' m2 )] U(J = superficial velocity component in 8 direction, LIt, RB/(D-ft2 ) [m3/(d ' m2)] bulk volume, control volume, or gridblock bulk volume, L3 , ft3 [m3 ] W = mass flow rate vector, mit, IbmID [kg/d] Wr = mass flow rate component in r direction, mit, IbmID [kg/d] Wx = mass flow rate component in x direction, mit, IbmID [kg/d] Wy = mass flow rate component in y direction, mit, IbmID [kg/d] 74

Wz = mass flow rate component in z direction, mit, IbmID [kg/d] x = distance in x direction in the Cartesian coordinate system, L, ft [m] 6.x = control volume dimension along the x direction (6.x = Xi+ � - Xi_�) , L, ft [m] y = distance in y direction in the Cartesian coordinate system, L, ft [m] 6.y = control volume dimension along y direction ( 6.y = Yj+� - yj- �) L, ft [m] ' z = distance in z direction in the Cartesian coordinate system, L, ft [m] Z = gas-compressibility factor (Z = pM/eRn , dimensionless 6.z = control volume dimension along z direction ( 6.z = Zk+ � - Zk �) L, ft [m] - ' volume conversion factor whose numerical value is given in Table 4. 1 transmissibility conversion factor whose numerical value is given in Table 4. 1 y = gravity defined by Eg. 2.2, mlL2 t2 , psi/ft [kPalm] gravity conversion factor whose numerical value is given in Table 4. 1 6. = difference, difference operator rJ = the rJ coordinate in the elliptic-cylindrical coordinate system 8 = angle in 8 direction in both cylindrical and spherical coordinate systems, rad [rad] 8 = the 8 coordinate in the spherical coordinate system /-l = viscosity, mILt, cp [Pa ' s] /-lg = gas viscosity, mILt, cp [Pa ' s] 3 3 3 Pg = gas-phase density, mlL , Ibmlft [kg/m ) gas-phase density at standard conditions, mlL3 , Pgsc = Ibmlft3 [kg/m3 ) 3 3 Psc = density at standard conditions, mlL , Ibmlft [kg/m 3 ] 4> = porosity, fraction 4> = potential, mlLt2 , psia [kPa) 4>e = potential at external radius, mlLt2 , psia [kPa) 1>w = potential at weB radius, mlLt2 , psia [kPa] V4> = potential gradient vector, mlL2 t 2 , psi/ft [kPalm] 'P = streamline function � = the � coordinate in the elliptic-cylindrical coordinate system V = gradient operator Superscripts ° = reference --- = vector References

I . Odeh, A . S . : "An Overview of Mathematical Modeling of the Behavior of Hydrocarbon Reservoirs," Soc. ofIndustrial and Applied Mathemat­ ics Review ( 1 982) 24, No. 3 , 263 . 2. Muskat, M . : The Flow of Homogeneolls Fluids Th rollgh Porolls Media, IntI . Human Resources Development Corp., Boston, Massachusetts ( 1 982) 470.

3. Bear, J.: Dynamics of Fluids in Porolls Media, Dover Publications Inc . , N e w York City ( 1 988) 1 96.

51 Metric Conversion Factors

1 .0* 3.048* X 9.290 304* md X 9.869 233 psi X 6.894 757 cp ft ft2

X X

E - 03 = Pa ' s E - OI = m E - 02 = m2 E - 04 = /-l m2 E + OO = kPa

·Conversion factor is exact.

BASIC APPLIED RESERVOIR SIMULATION


Chapter 5

F i n ite-D iffe re n ce Ap p roxi m ati o n to Li nea r-Fl ow Eq u ati o n s 5. 1 Introduction

following sections discuss the discretization process and the

Chap. 4 derived the equations for single-phase flow through porous

introduced by the use of finite-difference approximations.

in space and first order in time. In general, these equations cannot

5.2 Construction and Properties of

media-partial-differential equations (PDE's) that are second order be solved analytically (exactly) because of their nonlinear nature.

Numerical (approximate) techniques must be used to solve the flow

Finite-Difference Grids

equations. The most popular numerical method currently in use in

Two types of finite-difference grids

The finite-difference method is implemented by superimposing a finite-difference grid over the reservoir to be modeled. The chosen

blocks with known dimensions

the oil industry is the finite-difference method.

grid system is then used to approximate the spatial derivatives in the continuous equations. These approximations are obtained by trun­ cating the Taylor series expansion of the unknown variables (usual­ ly pressure for single-phase-flow problems and pressure and satura­

tion for two-phase-flow problems) in the equations, as discussed in Sec. 3.4.2. A similar procedure is used in the time domain. Two types of grid systems are generally used in reservoir simula­ tion: block centered (body centered) and point distributed (mesh centered). Although these grid systems are discussed in terms of rectangular (Cartesian) coordinates, they are equally applicable in any coordinate system--cylindrical, spherical, or elliptical. Sec . 5.2 discusses these grid systems. Implementation of finite-difference approximations result in al­ gebraic equations called finite-difference equations. It should be emphasized that the solutions of the finite-difference equations can be obtained only at the discrete points defined by the grid system. In other words, pressures calculated from a reservoir simulator are known only at gridpoints within the reservoir. This is in contrast to the solutions of the continuous equations, which can be obtained at

errors

are

used in reservoir simulation:

block centered and point distributed. In a block-centered grid, grid­ are

superimposed over the reservoir.

For a rectangular coordinate system, the gridpoints are defined as the centers of these gridblocks. In a point-distributed grid, gridpoints

distributed over the reservoir before block boundaries

are

are

defined.

For a rectangular grid, a block boundary is placed halfway between two adjacent pressure points. Historically, reservoir simulators have used block-centered finite differences because the volume associated with each representative point is clearly defined. The purpose of the grid system is to partition the reservoir into blocks to which representative rock properties can be assigned. Therefore, the grid cells should be small enough to describe the het­

erogeneous nature of the reservoir and to allow the averaged grid­ cell properties to represent the flow behavior in the reservoir ade­

quately. This, however, may not always be achieved because the

effort required for a simulation study is directly related to the num­ ber of grid cells used in the study.

There are two methods of handling the boundary conditions as

discussed in Secs.

5.2. 1 and 5.2.2. The first method, with no discrete

points on the boundary, is most appropriate for no-flow boundary

all points in the reservoir.

conditions. The second method, with points on the boundary, is

into finite-difference equations. Fig. 5.1 shows the discretization step in the development of a finite-difference simulator.

pressure, is specified on the boundary.

Discretization is the process of converting continuous equations

most applicable to situations where a dependent variable, such as

Chap.

4 derived the transport equations describing unsteady-state

tered and point-distributed grid systems. Discussion of these sys­

respect to space and a first derivative of pressure with respect to

tems considers flow in only one direction (the x direction). For flow

flow; these equations contain a second derivative of pressure with

time. The second derivative in the flow equation is generally approximated by the central-difference approximation because of the higher-order nature of the approximation. The first derivative is generally approximated by the backward-difference approxima­ tion. These choices are dictated by the stability of the final system of equations. Stability is a property that describes the capacity of a small error to propagate and grow with subsequent calculations. The

The following sections discuss the construction of block-cen­

in more than one direction, the principles discussed in this chapter can be extended easily to multiple dimensions.

5.2.1 Block-Centered Grid Systems. For flow in the x direction, a

block-centered grid system can be constructed as in Fig. 5.2. In this

figure, a grid system consisting of fix gridblocks is superimposed over the reservoir. These gridblocks have predetermined dimen-

FINITE-DIFFERENCE APPROXIMATION TO LINEAR-FLOW EQUATIONS

75


DISCRETIZATION

NONLINEAR ALGEBRAIC EQUATIONS

NONLINEAR POE'S

PRESSURE, SATURATION DISTRIBUTIONS, AND WELL RATES

LINEAR ALGEBRAI EQUATIONS

NUM ERICAL RESE RVOIR· SIMU LATION PROC ESS

Fig. 5.1 -0iscretization step in the development of a reservoir simulator (redrawn from Ref. 1 ). "-,

�"'�

"-,

I�I : I

"��

��

�""'"'

t!I:�1: � t� h---L.I :' .--..l.

_.

L 1 -�' ---1

Fig. 5.2-0ne-dimensional, block-centered, finite-difference grid. Note that gridpoints are in the center of the grid blocks.

sions of /)" Xi that are not necessarily equal. These gridblocks must satisfy the relationship �

I /)"Xi

=

;= 1

Lx ·

.

...........

. .

. . . . . . . . . . . . . . . . . . (5. 1 )

In other words, the gridblocks must span the entire length, 4, of the reservoir in the direction of interest. This includes both the hydro­ carbon-bearing rock and any associated aquifer. Once the gridblocks are defined, the points where pressures are calculated are placed in the interior of the blocks. For rectangular grid systems, the grid points are placed at the center of the blocks (hence the name block centered), while the pressure points are slightly offset from the center for cylindrical grid systems. The boundaries of the ith gridblock are designated Xi y, and Xi + y" whereas the block center is designated Xi . These gridblock proper­ ties are related through the relationships

Fig. 5.3-Typical 20, nonuniform, rectangular block-centered fi­ nite-difference grid. Note that pressure points are in the centers of the gridblocks.

If the gridblock were extended farther, the block would contain nonreservoir rock. Similarly, the right boundary of the last gridblock is placed on top of the gridpoint of the block; that is,

_

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (5 .5)

. . . . . . . (5 .2a)

The block dimensions can then be calculated from the block boundaries as

. . . . . . . . . . . . . . . . . . . (5.2b) Fig. 5.2 illustrates the terms Xi , Xi - V"� Xi + y" /)" Xi , /)"Xi - I, and /)" Xi + \ .

. . . . . . . . . . . . . . . . . . . . . . . . . . (5.6)

Xi

and

=

/)"Xi

(

xi - '1,

=

+

xi + '1,

) /2

xi + '1, - x i - 'I, '

. . . .

..

......

. . .

....

. .

. . .

Note that, i n a block-centered grid system, the gridpoints of the first and last gridblocks lie in the interior of the reservoir. Fig. 5.3 illus­ trates a nonuniform, block-centered grid system in two dimensions. 5.2.2 Point-Distributed Grid Systems. For flow in the X direction, a point-distributed grid system can be constructed as in Fig. 5.4.

Gridpoints are placed on the boundary of the reservoir and within its interior. Note that, by placing gridpoints on the boundaries of the reservoir, a point-distributed grid will, by definition, span the entire length of the reservoir in the direction of interest. For rectangular grids, the block boundaries are placed halfway between two adjacent gridpoints; that is, . . . . . . . . . . . . . . . . . . . . . . . . . (5.3) In a point-distributed grid, the left boundary of the first gridblock is, by definition, placed on top of the gridpoint of the block; that is,

5.5 illustrates a point-distributed grid system in two dimensions. In both block-centered and point-distributed grid systems, the block dimensions can vary for each gridblock. Either grid system can be used in reservoir simulation. Use of point-distributed grid systems has several advantages when implementing certain boundary condi­ tions. In addition, point-distributed grid systems have numerical adantages when nonuniform spacing is used. In particular, a point­ distributed-grid results in a consistent finite-difference operator on a nonuniform grid, while a block-centered grid does not. 2 For a definiFig.

y 5 __

---

��------._-

----

y4 e-----�------�.-----�._----• Ys

(5.4)

y2 e-----�--��--�._--.

Fig. 5.4-0ne-dimensional, point-distributed, finite-difference grid. Note that gridpoints are offset from the gridblock centers and that gridblock boundaries lie midway between gridpoi nts. 76

Fig. 5.5-Typical 20, nonuniform, rectangular, point-distributed, finite-difference grid. Shaded areas reflect cell volumes associated with gridpoints. Note that the pressure points are off­ set from cell volume centers.

BASIC APPLIED RESERVOIR SIMULATION


o

o

o (a)

� D

Inactive block

o

Active block

o

Fig . 5.6-Block-centered grid over a hydrocarbon reservoir;

owe = oiliwater contact.

tion of consistency, see Consistency and Consistency Analysis in Sec.

5 .6.3.

Although these advantages exist for point-distributed

grid systems, historically the block-centered grid system has been the most commonly used grid system in petroleum reservoir simula­ tion. This is because the block-centered grid system adheres more closely to the material-balance concept used in reservoir engineer­ ing. Also, for reservoirs bounded with no-flow boundaries, the block-centered grid offers easy implementation of external bound­ ary conditions (see Sec. 5.5.2).

5.2.3 Areal Grid Geometries. Although the previous sections em­ phasized rectangular geometry. several grid systems are commonly used in reservoir simulation when the objectives of the simulation study require the gridblocks to approximate closely, or match exactly, the geometry of the problem to be modeled. The use of the specialized geometries requires use of the corresponding form of the differential equation and its finite-difference analog in the simulation study. Rectangular Coordinate Geometry. Rectangular coordinate ge­ ometry has many applications and is the most commonly used grid geometry in reservoir simulation. A rectangular grid can be used to answer questions regarding the full-field performance of a reser­ voir, the performance of individual well patterns, and the perfor­ mance of interwell cross sections. Full-field simulations are performed to determine the behavior of the entire subject reservoir. These simulations generally use a rect­ angular grid because rectangular grid systems

are

flexible enough

to be fitted over any reservoir geometry. The grid spacing for full­ field simulations can be nonuniform. Generally, a refined grid

o (b) Fig. 5.7-1\'010 rectangular grid systems for modeli ng an inverted five-spot pattern: (a) parallel grid and (b) diagonal grid. blocks outside the reservoir boundaries must be inactivated. All commercial simulation software has the facility to inactivate unnec­ essary gridblocks. Rectangular grid systems

are

also used to model pattern elements

in pattern flood. When modeling a well pattern with reservoir simula­ tion, symmetry is generally used to reduce the number of gridblocks required to model the displacement adequately. For example, to mod­

el an interior five-spot pattern, symmetry can be used to reduce the

(small grid spacing) is used in areas of interest, such as hydrocar­

model to one-eighth of the pattern. Typically, uniform grid spacing is

bon-bearing regions, while a less refined grid is used in less impor­ tant areas, such as aquifers.

volumes, transmissibilities, and injection and production rates must

Fig. 5.6 shows an areal view of a grid system of an example full­

field simulation and illustrates the use of inactive gridblocks. To al­ low the grid system to fit properly over the subject reservoir, grid-

used for pattern studies. When a block-centered grid is used, the pore be adjusted to account for the volume of the grid outside the pattern.3

Fig. 5.7 shows two grid systems that can be used when modeling

an inverted five-spot pattern. In a parallel grid, the grid lines are par-

FINITE-DIFFERENCE APPROXIMATION TO LINEAR-FLOW EQUATIONS

77


I

z

o

��1-4----" ,. -J

-----

-- ---

w

.

Fig. 5.9-Cylindrical grid system in the vicinity of Fig. 5.8-lYpical rectangular grid system used In a cross-sec­ tional study; 0 = oil and W = water.

allel and are perpendicular to the line drawn from the producer to the injector. In a diagonal grid, on the other hand, the grid lines are diag­ onal to the line drawn through the producer/injector pair. Rectangular grid systems are also used in cross-sectional simula­ tion studies, which are performed to determine the interwell behav­ ior of several wells along a given cross section. The objectives of a cross-sectional study may include determining the effect of shales on gravity override/underride i n displacement processes, determin­ ing the effect of detailed reservoir geology on well performance, and aiding i n the scaleup of core properties to reservoir scale (see discus­ sion o n dynamic interblock pseudofunctions in Sec. 1 004.3). Fig. 5.8 shows a typical cross-sectional grid. Cylindrical Grid Geometries. Cylindrical grid geometries are used for single-well simulation studies. The obj ectives of single­ well simulation include predicting the performance of individual wells, determining the effects of completion/production strategies on gas and water coning. and optimizing perforation intervals . Fig. 5.9 illustrates a cylindrical grid in the presence of a single wel l . While t h e gridblock sizes are relatively arbitrary for rectangular grid systems, the construction of a cylindrical grid system follows thi s particular set of rules. 1 . The pressure points are spaced logarithmically away from the wellbore;

ri + 1

= a lg r i '

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

r; + 'h

=

ri + 1 - ri ( ) ri + t!r;

log e

,

Example 5. 1. Show that the grid spacing defined by Eq. 5.7 will result i n a constant pressure drop across all gridblocks for incom­ pressible, steady-state flow toward a production well. Solution. For incompressible flow. Darcy's law for a horizontal, radial system is

(5.8)

where i = 1 , 2 , . . . . n r - 1 . 3. The block boundaries for volumetric calculations are defined by the formula

f

f

ri + 1

Pi + 1 - 2 npc kh

I dr =

qJl

r

r;

dp .

. . . . . . . . . . . . . . . . . . (5. 1 1)

Pi

Performing all integrations results i n

. . . . . . . . . . . . (5. 1 2) where i = 1 , 2 , . . . , n r - 1 . We now need to determine which ra­ dii, q, r2 , r3 . . . rnr will result in uniform pressure drops across all ' grid cells. Define the constant pressure drop as

Ap

= Pi + I

where i = Iog e

, . . . , nr

1,2

( ri+ri l )

. . . . . . . . . . . . . . . . . . . . . . . . . . . (5. 1 3) - 1 . Substituting into Eq. 5 . 1 2 results in

- p; ,

- 2 np c kh

=

. . . . . . . . . . . . . . . . . . (5. 14)

AP ,

qp,

where i = 1 , 2 , . . . , n r - 1 . Because the right side of Eq. 5.14 is constant for incompressible flow, it can be rewritten (remember q is negative for production) as Iog e

( r; + I ) "'Ti

where i =

r

;+ 1 "'Ti or

78

(5. 1 0)

Separating variables and integrating results i n

. . . . . . . . . . . . . . . . . . . . . . . . . (5.9) These three rules are applicable to both block-centered and point­ distributed grid systems. Eq. 5 .7 is used to keep pressure drops across all gridblocks approximately equal (remember that the pres­ sure distribution around a wellbore i s logarithmic). Eq. 5.8 i s used to ensure that the flux from one gridblock to the next gridblock cal­ culated by the finite-difference (discrete) equations i s equal to that calculated by the continuous form of Darcy's law2. Finally, Eq. 5.9 i s used to ensure that the volume of the discrete gridblocks is equal to the volume of the continuous gridblocks. Rules 1 and 2 are derived from steady-state theory.

- 2 np ckhr dp dr' P,

=

q

(5.7)

where i = 1 , 2 , . . . , n r - 1 . 2. The block boundaries for interblock flow calculations are de­ fined by the formula

a wel l bore.

r; + 1

"'Ti

=

=

1,2 e

a'

a

,

(5. 15)

Ig ,

, . . . , nr -

1. Taking the exponent of Eq. 5.15 yields

Ig

= a lg

(5. 1 6) .

'

.

.

.

.

'

where a lg = e a ig and i = 5 . 1 7 results i n Eq. 5.7.

.

1,2 ,....

nr

- 1.

(5. 1 7)

Rearranging Eq.

(5.7) where i =

1,2 ,...,

nr

-

1.

Example 5.2. Show that the block boundaries defined by Eq. 5.8 ensure that the flux across the grid boundaries is identical for the continuous and discrete forms of Darcy's law. BASIC APPLIED RESERVOIR SIMULATION


Solution.

Again, start with the radial form of Darcy ' s law,

Equating Eqs. 5.26 and 5.8 yields (5.30)

. . . . . . . . . . . . . . . . . . . . . . . . . (5. 1 8) As in the previous example, Eq. 5 . 1 8 can be converted to the contin­ uous form, Eq. 5.12.

and. similarly, . . . . . . . . . . . . . . . . . (5.3 1 )

. . . . . . . . . . . . (5. 1 2) We can also take the central difference approximation of Eq. 5. 1 8 about the point r r i + 'Ii, as

From Eq. 5.7. we can substitute for 'I in Eq. 5.30 and rnr + I in Eq. 5.3 1.

=

(a/g - 1 )ro loge(alg)

. . . . . . . . . . . . . . . . (5. 1 9)

ri + 1 - ri ri +v,

or

- 21t/3ckh (p . + , 1 qf.l

=

_

.j

p, .

(a/g - l )r.r . . . . . . . . . . . . . . (5.33) loge(alg)

. . . . . . . . . . . . (5.20)

Equating Eq. 5.12 and Eq. 5.20 results in

. . . . . . . . . . . . . . . . (5.32)

Dividing Eq. 5.33 by Eq. 5.32 results in (5.21 )

or, finally,

(5.34) Substituting Eq. 5.29b yields

re nr rw a Ig

. . . . . . . . . . . . . . . . . . . . . . . . . . (5.8) We can now use Eqs. 5.7 and 5.8 to develop specific grid systems for block-centered and point-distributed grid systems. For block-centered grids,

and

( re ) l /nr rw

=

a/g rl

=

(5.35)

=

or alg

=

( r ) I/nr r: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (5.22)

We now need to derive an expression for the radius of the first grid cell. r1. From Eq. 5.7, we can substitute for r into Eq. 5.30.

r l (1 - l/alg) . . . . . . . . . . . . . . (5.36) loge(alg)

(5.22)

rw loge(a/g) . 1 - ( l/a/g )

(5.23) . . . . . . . . . . . . . . . . . . . . . . . . . . . (5.23)

For point-distributed grids,

( re )I/( nr - l ) alg - rw _

(5.24)

Example 5.4. Derive Eqs. 5.24 and 5.25 for point-distributed grid

systems.

(5.25) After defining r1, Eq. 5.7 can be used to calculate all other pressure points. Eq. 5.8 can then be used to generate the interblock bound­ aries for transmissibility and flux calculations. Finally, Eq. 5.9 can be used to generate the interblock boundaries for volumetric cal­ culations, such as material-balance checks.

Solution.

For point-distributed grid systems. by definition. (5.25) (5.37)

and rnr reo From Eq. 5.7. =

r2 algr l• . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (5.38) =

Example 5.3.

systems.

Solution.

ro + v, and rnr + v,

=

Derive Eqs. 5.22 and 5.23 for block-centered grid

For block-centered grid systems, by definition. rw . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (5.26) reo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (5.27)

=

Define an imaginary gridpoint, roo that is outside the grid system and inside the wellbore. That is. r0 < rw Also, define a second imagi­ nary gridpoint, rn + I . that is outside the grid system and beyond the external radius. That is, rnr + I > re · From Eq. 5.7.

or recursively. rnr

=

=

algro • . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (5.28)

or recursively.

rnr a;;ro. =

. . . . . . . . . . . . . . . . . . . . . (5.29b)

. . . . . . . . . . . . . . . . . . . (5.39b)

Substituting Eq. 5.25 and Eq. 5.37 into Eq. 5.39b results in (5.40)

rl

a;g' - I r l .

or alg

( re ) I/(nr - 1 ) . - rw

_

. . . . . . . . . . . . . . . . . . . . . . . . . . . (5.24)

Corner-Point Geometry. Corner-point geometry uses polygons for grid cells, and gridblocks are defined by specifying the corners of polygons. Gridblock properties. such as grid centers. thicknesses. and transmissibilities. are then determined from the gridblock corners. Fig. 5.10 shows a typical corner-point grid.

FINITE-DIFFERENCE APPROXIMATION TO LINEAR-FLOW EQUATIONS

79


Reservoir 2

Fig. 5.1 0-Typical corner-poi nt-geometry grid over a hydrocar­ bon reservoir.

Comer-point geometry can be used for all full-field applications; however, its principal use is for highly faulted reservoirs. For these reservoirs, the edges of the polygons can be placed on the faults. The description of the faults is generally better with comer-point geome­ try than the description obtained from rectangular grid systems. One detrimental feature with the use of comer-point geometry is that the resulting grid system is nonorthogonal. The use of a nonorthogonal grid system with a standard seven-point finite-difference grid may re­ sult in significant errors because of the exclusion of the cross-deriva­ tive terms. This problem may be alleviated to some extent by use of higher-order finite-difference approximations, which include a full tensor representation of the permeability. Local Grid Refinement and Hybrid Grids. Locally refined grid systems use a secondary (or fine) grid system embedded in the pri­ mary (or coarse) grid system. Fig. 5.11 illustrates the objective of using the fine grid: to place a more refined grid in areas of interest in the hydrocarbon reservoir while maintaining a minimum number of active cells in the model. Fig. 5 . l l a shows two hydrocarbon reservoirs in communication through a common aquifer. Fig. 5 . 1 1 b shows a conventional grid system, while Fig. 5 . 1 1 c shows a locally refined grid over the same reservoir. Because both the fine and coarse grids are rectangular, the techniques discussed earlier in this section under Rectangular Coor­ dinate Geometry are appropriate. Special techniques are required to describe the transmissibilities and fluxes at the common boundary where the two grid systems meet. When the fine grid uses a different geometry than the coarse grid, the resulting grid is hybrid. 4 Hybrid grid systems are generally used to provide better definition of the near-wellbore areas in full-field simulations. Fig. 5.12 shows vertical and horizontal wells in a hy­ brid grid. Sec. 6.4 discusses details of the use of hybrid grids. Construction of the radial portion of the hybrid grid implements the same rules are applied to the pure radial grid.

5.2.4 Vertical Grid Geometry. In the previous discussions of areal grid geometries (with the exception of the rectangular cross-sectional grid) the vertical grid or layering system was not mentioned. Three types of layering systems can be used with the areal grids discussed in the previous sections5 : stratigraphic, proportional, and tank type. 80

(b)

Reservoir 1

Reservoir 2

Reservoi r 1

(c)

Fig. 5.1 1 -lIIustration of the use of locally refined g rids. Note the reduction in number of grid cells in the areas that are not of interest. (a) Reservoi rs to be modeled, (b) conventional rectan­ gular grid, and (c) locally refined grid.

o w

Fig. 5.1 2-Hybrid grid system for i mproving the coupling of well bores to the reservoir model ; 0 oil and W water. =

=

BASIC APPLIED RESERVOIR SIMULATION


w

w

W (b)

Fig. 5.1 3-Stratigraphic layering in reservoir simulation. (a) Reser­ voir to be modeled. Note the thickening of the top layer from west to east and the thinning of the bottom layer from west to east. (b) Stratigraphic grid system of reservoir under study. Note the vary­ ing proportions of the grid thicknesses from west to east. Stratigraphic layering, as the name implies and as Fig. 5.13 illus­ trates, follows the stratigraphy or natural geological layering of the reservoir. Stratigraphic layering is used to incorporate geological in­ formation into the reservoir model in a manner that is consistent with the stratigraphy of the reservoir under study. This is the most commonly used grid system in full-field reservoir simulation. Proportional layering, as the name implies and as Fig. 5.14 illus­ trates, keeps the ratios of the layer thicknesses constant between two mapped surfaces. Proportional layering is used to add definition (additional layers) to a single mapped layer. Tank-type layering, illustrated in Fig. 5.15, uses a horizontal grid­ block system, even in the presence of dip or structural features. Tank-type layering has limited use in full-field simulation, but may be used in single-well radial modeling or conceptual modeling.

E

(a)

E

(b)

Fig. 5.1 4-Proportional layering in reservoi r simulation: (a) top layer from reservoir in Fig. 5.1 3 and (b) use of proportional grid to add definition to a mapped geological layer. Note the identical proportions of the grid thickness from west to east.

.2... ax

(13c

A.k. ap

lI I B I ax r-

) X + qlsc �

=

Vb ¢ CI ap

c

a BO

I

at'

. . . . . . . . . (5.4 1 )

where Subscript I refers to Phase I (0 or w). Remember that Eq. 5.4 1 ignores the depth gradient and assumes incompressible porous media. Chap. 8 removes these assumptions from the solution of the flow equation. 5.3.1 Approximation on a Uniform Grid in One Dimension. Fig. 5.16 shows the ID, block-centered grid used to discretize Eq. 5 .4 1 .

5.3 Finite-Difference Approximation of the Spatial Derivative

The flow equations in porous media contain continuous derivatives with respect to the space and time variables. Chap. 3 discussed tech­ niques to approximate derivatives with finite differences. The basic principle behind these techniques was to replace the partial deriva­ tives in the flow equations with algebraic approximations. This chapter focuses on the Taylor series method for finite differ­ ences to approximate the fluid-flow equations. These approxima­ tions are obtained by Taylor series expansion of the dependent vari­ able in the vicinity of the gridpoints. When the approximations are applied to a single-flow equation, the PDE is replaced by a system of algebraic equations. Discretization is the process of converting the continuous PDE to a system of algebraic equations. Other equal­ ly applicable methods of discretization include the integral method for finite differences, the finite-element method, and the finite­ boundary method (or boundary integral equation method). The equation for single-phase, slightly compressible flow through porous media was derived in Chap. 4 as Eq. 4.72. For one­ dimensional ( l D) flow, this equation has the form

(b) Fig. 5.1 5-Tank-type layering in reservoir simulation: (a) reser­ voir to be modeled and (b) tank-type grid system. Note that shaded areas represent inactive grid cells.

FINITE-DIFFERENCE APPROXIMATION TO LINEAR-FLOW EQUATIONS

81


Fig. 5.1 6-Uniform grid used for discretization of a hydrocarbon reservoir.

Although a block-centered grid illustrates the discretization of Eq. 5 .4 1 , the procedure is identical for a point-distributed grid. This sec­ tion illustrates the discretization process on a nonuniform grid. The resulting equation is then simplified to obtain the approximation for a uniform grid. Chap. 3 defines the central-difference approximation to the first derivative as

-

( fJI I ) f3 c

A r k r aP B ax i - 1(,

].

Fig. 5.1 7-Nonuniform grid used for discretization of a hydro­ carbon reservoir. Note refined grid in the areas of i nterest.

. . . . . . . . . . . . . . . . . . (5 .49) The transmissibility of a porous medium is considered to be a property of the porous medium, the fluid flowing through the me­ dium (Subscript I ) , the direction of flow (Subscript x) , and the posi­ tion in space (Subscripts i + V2 and i V2). For a uniform block-centered grid, the spacings between the grid­ points (or block centers) are the same and are equal to the block dimen­ sion fu. That is,

-

�X i - 'I' = �X i + I(, = �X i = �x. . . . . . . . . . . . . . . . . . . . . . . . (5 .42)

Although the equality in Eq. 5 .42 is approximate, the subsequent equations use an equal sign so the development is consistent with the computational procedures. Using Eq. 5 .42 to approximate the spatial derivative at Gridpoint i and substituting the result into the left side of Eq. 5 . 4 1 results in

. . . . . . . . . . . . . . . . (5 .50)

-

Eq. 5.46 and Eq. 5047 show that, to solve for Pi, the pressures Pi + I and Pi I must be known. Consequently, Eq. 5047 must be written for each gridblock in the reservoir model. This results in a system of equa­ tions that approximates Eq. 5.4 1 . Sec. 5.6 discusses this in more detail. The (i ± Y2) subscripts in the group {f3c [(Axkx)/(fJIBlfu)] j i ± 2 and in the transmissibilities, Tlx i ± w indicate that these properties are eva­ luated at the block boundaries. Because these properties are specified only at the gridblock centers, the transmissibilities must be obtained by averaging the properties of adjacent gridblocks. Secs. 8.2.2 and 8.3 . 1 discuss this. For the time being, assume that Ax, kx, and � x are constants and are the same for all gridblocks.

5.3.2 Approximation on a Nonuniform Grid in One Dimension. . . . . . . . . . . . . . . (5 .43)

/

Now. use of central differences to approximate (apjaxL I(, and

( ap axL 'I, yields

(��) ( )

P i + 1 - Pi Xi + 1 Xi

i+ 'I,

ap ax i - 'h

and

Pi - Pi - I X i Xi - I

P i + 1 - Pi � X i + 'I'

. . . . . . . . . . . . . (5 .44)

Pi - Pi- I �X i - 'I'

The procedure for discretizing the flow equation on a nonuniform grid is identical to the procedure used on a uniform grid. In fact, Eq. 5 .46 was derived for a nonuniform grid. Fig. 5.17 shows the grid system used in the discretization. Eq. 5 .46 is valid for both block­ centered and point-distributed grid systems. For a block-centered grid system, � Xi + y, and �Xi Y, are defined as (see Fig. 5 .2) _

X �X i + I(, = � i + 1

f3 c

( I )

)

� Xi

. . . . . . . . . . . . . . . . . . . . . . . (5.5 I a) (5.5 l b)

(5.45) and, in the backward direction,

Substituting Eqs. 5 .44 and 5 .45 into Eq. 5 .43 results in

(

+

2

A k, A r kx ) (Pi - Pi - I (PH I - Pi ) - f3c r II l B �X II B �X r J r J i + 1/2 i - 1/1 . . . . . . . . . . . . . . . . . . . . (5 .46)

�X i _ 1(, =

�X i + �X i _ 1 2

or �X i - I(, = X i - X i _ I .

. . . . . . . . . . . . . . . . . . . . . . . (5.52a) . . . . . . . . . . . . . . . . . . . . . . . . (5 .52b)

For a point-distributed grid system, �Xi + y, and �Xi fined as (see Fig. 5 04)

_

y,

are de­ (5.53)

and, similarly, in the backward direction, (5.54) =

(Vb</JCI) a c B;

.

I

api . at

. . . . . . . . . . . . . . . . . . . . . . . . . . . . (5 .47)

The coefficients Tlr . and T lr . are referred to as the transmissi+ bilities of the porou s riie dium and' are defined by

5.3.3 Approximation in Multiple Dimensions. Previous sections discussed the discretization process for a single dimension. We can apply these same techniques to multidimensional problems. Apply­ ing the central-difference approximation to Eq. 4.72 results in

. . . . . . . . . . . . . . . . . . . . (5.48) 82

BASIC APPLIED RESERVOIR SIMULATION


- (pc A/ ��/ X) i- 'hj,k(Pij,k - Pi- Ij,k) ) ( + (Pc A y ky ) I I ij+ Yz,k Pij+ l ,k - Pij,k - (Pc AI ykIA, ) ij- Y2,k(Pij,k - Pij- I,k)

used because of stability problems (see Example 5 . 1 8 ) and difficul­ ties in applying the initial conditions.2 The backward-difference approximation generally is used in reservoir simulation because its use does not restrict the size of the timestep for a stable solution.

#

.

# B /1y

# B

5.4.1 Backward-Difference Approximation to the Flow Equa­

t

tion. Chap.

3 (Eq. 3 . 1 57) defined the backward-difference approxi­ 1 mation to the first deri vati ve at the base time level n + .

y

. . . . . . . . . . . . . . . . . . . . . , . . (5.60) With the notation

pn

=

p ( rn) ,

(5.6 1 ) (5.62)

Eq. 5 .60 written for Gridpoint j with an equal sign rather than an approximation sign becomes

iJp . iJt

----.!.

. . . . . . . . . . . . . . . (5.55) where

=

pn + 1 l

-

M

p "I

Substituting into Eq.

1 = 0 or w . In terms of transmissibilities,

(5.63) 5.46 at time level t n + 1

(pcr'Axl Ikx ) i +'h(Pi+n +1I Pi"+ ) (p AxI Ikx ) i-%(Pin + 1 - Pin-+Il ) /J

_

B /1 x

results in

I

c # B /1 x

. . . . . . . . . . . . . . . (5.56) The definition of the transmissibilities in Eq. , T lxi± 'hj,k = G i±V2j,k (# IB ) I 1 i± Y2J,k

T /Yij± 'h,k = G ij± V2,k (# IB ) I I and

T/zij,k ± >/2 G

=

ij± V2,k

Gij,k ±V2(# IIB I )

.

,

iJ.k± V2

.

.

.

.

.

.

.

.

.

.

where the terms represent the constant parts of the transmissibilities. Table 6.7 gives the definition of these terms. This finite-difference approximation in multidimensional, radiall cylindrical flow geometry can be written in a form similar to Eq. 5.56. The only differences between the rectangular and cylindrical for­ mulations are the definitions of in Eqs. 5 .57 through 5.59. Table 6,6 lists the definitions of for radial/cylindrical flow geometry.

G

G

5.4 Finite-Difference Approxi mation

of the Ti me Derivative

The discretization of the time derivative in Eqs. 5.46 and 5.47 is han­ dled in the same manner as the spatial derivative. Three possible approximations can be used for the time derivative: backward dif­ ference, forward difference, and central difference. Both the backward- and forward-difference approximations are first-order approximations, while the central-difference approxima­ tion is a second-order approximation. Although the central-difference approximation is a higher-order approximation, it generally is not

(���'1(P7 + 1 - p7 ) ,

TIxi+ 'h(p ni++11 Pin + l ) T1\ _ Y1(Pin + 1 _

, (5.57)

. . . . . . . . . . . . . (5.59)

=

or, in terms of the transmissibilities Tlx

5 .56 can be written as

. . . . . . . . . . . . . . . (5.58)

,

+ q lsci

_

+

(5.64)

Tlx _ y, , Pni-+Il )

v, and

_

. . . . . . . . . . . . (5.65) Note that the pressures used in the spatial derivatives on the left side 1 of the flow equation are assigned the base time level tn+ . In other + words, these equations are written at time level fn 1 . Eqs. 5.64 and 5 .65 are known as the backward-difference approximations to the flow equation because the time difference on the right side looks backward with reference to the base time level, f n + I . In these equations, all pres­ sures assigned to the time level fn+ 1 are the unknowns. Later, this chapter discusses the procedure for advancing the simulation in time. Eqs. 5.48 and 5.49 define the transmissibility terms in Eq. 5.65. Because of the pressure dependence of the Bl and #l terms, time lev­ els must also be assigned to transmissibilities . That is, at what pres­ sure , p n + 1 orpn, should we evaluate BI and #l ? If we choose to eval­ uate the transmissibility at pn + 1 , the coefficients of the equations are functions of the unknowns, resulting in a nonlinear algebraic equation that requires additional modification before it can be solved with a suitable linear-equation solver. Linearization (dis­ cussed in Chap. 8) is the technique used to convert nonlinear alge­ braic equations to linear algebraic equations. These nonlinear prob­ lems arise in the single-phase flow (slightly compressible and compressible flow) and in multiphase flow. If we evaluate the transmissibility at p n, we can evaluate the coef­ ficients of the equations explicitly with the known pressures. For the time being, we will use the explicit treatment of the coefficients and defer the discussion of linearization until Sec. 8.4. 1 . Eq. 5.65 can now be written as

FINITE-DIFFERENCE APPROXIMATION TO LINEAR-FLOW EQUATIONS

83


or, in terms of the transmissibility, . . . . . . . . . . . . . . . . . . (5.66)

_

n) Tnlx _ ,(P ni

Pi

_

i V

_

n )

Pi - l

. . . . . . . . . (5.7 2 )

5.4.2 Forward-Difference Approximation to the Flow Equation. Similarly, if the base time level is assumed to be ( n, then the forward­ difference approximation to the first derivative (see Eq. 3 . 1 54) becomes . . . . . . . . . . . . . . . . . . . . . . . . . . . . (5 .67) Although Eqs. 5 .63 and 5 .67 are identical, the base time levels in the two approximations are different. This will become clearer later in this discussion. Substituting Eq. 5 .67 into Eq. 5 .46 written at time level (n results in

The central-difference approximation, sometimes referred to as Richardson' s7 approximation, is a higher-order (second-order) approximation because it is derived by truncating the Taylor series expansion after the second term. This approximation, therefore, contains additional information not contained in either the forward­ or backward-difference approximations (both of which were trun­ cated after the first term). Although it is a higher-order approxima­ tion, it is rarely used in reservoir simulation because it is always un­ stable (see Example 5 . 1 8) and because it is difficult to apply the initial conditions. 2 5 . 5 Implementation of I nitial a n d Boundary Conditions

. . . . . . . . . . . . . (5.68) or, in terms of the transmissibilities,

. . . . . . . . . . . . (5.69) Eqs. 5 .68 and 5 .69 are known as the forward-difference approxi­ mations to the flow equation because the time difference on the right side looks forward with reference to tn. The difference between the backward- and forward-difference approximations (Eqs. 5 .66 and 5.69, respectively) is now clear. In these equations, the pressures on the left side of the equations are evaluated at the old time level, n, for the forward-difference approximation and the new time level, n + I , for the backward-difference approximation.

5.4.3 Central-Difference Approximation to the Flow Equation. If the base time level is assumed to be (n and the central difference­ approximation defined by Eq. 3 . 1 6 1 is used, iJP i

at

=

P7 + 1 - P7 - 1

2l1 t

Substituting Eq. 5 .70 into Eq. 5 .46 at tn yields

(5 .70)

In earlier sections of this chapter, three finite-difference approxima­ tions suitable for reservoir simulation were derived: the backward-, forward-, and central-difference approximations . These approxi­ mations were made to the single-phase, PDE governing fluid flow through porous media. Chap. 3 discussed solutions to general differential equations. These solutions were found to be families of functions that satisfy the original differential equation. To obtain the desired engineering solution to the problem at hand, the differential equation must be subjected to appropriate initial and boundary conditions. Initial and boundary conditions are used to determine which function solves the given problem uniquely. While an entire family of solutions hon­ ors the differential equation, only one unique solution honors the differential equation, the initial conditions, and the boundary condi­ tions simultaneously. Therefore, to obtain a unique solution to the reservoir-simulation problem, initial and boundary conditions must also be approximated by finite-difference methods and be incorpo­ rated into the reservoir simulator. Sec. 4.5 discusses the initial and boundary conditions for the single-phase-flow equations that are relevant to common reservoir-engineering problems.

5.5.1 Implementing Initial Conditions. We restrict this discus­ sion to single-phase-flow problems. The objective of reservoir sim­ ulation is to predict pressure distribution and production rates throughout time. This is accomplished by use of the finite-differ­ ence equations to advance the simulation from a known time level (the time at which all dependent variables are known, n) to an un­ known time level (the time at which dependent variables are to be predicted, n + I ) . I n the finite-difference equations, the term pn represents the pres­ sure values of the gridpoints at the known time level. The stepwise procedure for advancing the simulation in time begins by assigning known pressure values to the n time level in the finite-difference equations. The equations can then be solved for the unknown pres­ sures, P n + 1. Once determined, the values of P n + 1 are used as the known pressures for the next timestep. To start this procedure, the known pressures used in the equations for the first timestep are the pressures at the initial conditions. For single-phase problems, initial pressures in the reservoir can be determined by the local pressure gradient. The pressures as­ signed to the grid cells are initially calculated with Eq. 2. 1 4 and set­ ting <1> 0 = 0 for all grid cells, giving

<I> -

p nI,j.' k = p

O

+

y,( ZiJ'k - ZO ) .

(5 .73)

In Eq. 5.73, p o = pressure at the datum depth ZO and 4.j.k = depth of the Cell (ij,k) at which pressure is p 7 · k ' Note from Eq. 2.20 that

p;,

the term y, contains the phase density, which is pressure depend­ ent for slightly compressible and compressible fluids. Therefore, the application of Eq. 5 .73 may require iteration. Chap. 9 presents a complete treatment of initial conditions in multiphase problems.

84

BASIC APPLIED RESERVOIR SIMULATION


and for Gridblock 4,

TnLx +V2(pn+ 1 pn4 + l ) 4 _

5

_

TnLx _ (pn + 1 pn + l ) 3 4 V, 4 _

Fig. 5.1 8-Porous medium and block-centered finite-difference grid with specified-pressure-gradient boundaries.

5.5.2 Implementing Boundary Conditions. The boundaries in a

petroleum reservoir can be extremely complicated. consisting of the external and internal boundaries that delineate the reservoir system. The external boundaries must include the limits of both the hydro­ carbon-bearing reservoir and any associated aquifers. Most com­ mercial reservoir simulators assume that the reservoir/aquifer sys­ tem i s bounded by a no-flow boundary at some distance from the hydrocarbon-bearing rock. Internally, petroleum reservoirs may contain several types of boundaries, including wellbores, nonreser­ voir rock, and sealing faults. External Boundaries. The external boundaries of all reservoirs consist of the limits of the hydrocarbon-bearing zone and any associated aquifer. Two important types of boundaries are generally considered in reservoir simulation: specified pressure gradient (which include no-flow boundaries) and specified pressure. The im­ plementation of boundary conditions depends on the type of bound­ ary encountered in the field and the grid system (block centered or point distributed) used in the discretization. Specified-Pressure-Gradient Boundaries. The equation

dp dX

(5.74)

= C

is used for a specified pressure gradient at the external boundary of the field. It is valid for all specified-pres sure-gradient boundaries and can be used to model a no-flow boundary by setting C = O. In general. C can be a function of time. For this discussion, however, consider C to be constant. Because Eq. 5 .74 encompasses no-flow type boundaries, this is the most commonly used condition for ex­ ternal boundaries in reservoir simulation. Eq. 5 .74 must be discre­ tized before it can be incorporated into the finite-difference reser­ voir simulator. This discretization is dependent on the grid system (block centered or point distributed) used by the simulator. Fig. 5.18 shows a 1 D, block-centered grid system over a porous medium. In this figure, the boundaries lie on the edges of the first and last grid cells (as well as the edges along the length of the medium). Writing the finite-difference equation (in this case the backward-dif­ ference approximation) for each cell in this grid, yields a system of four equations in six unknowns. This represents an ill-posed system of equations because there are more unknowns to be solved for than there are equations. The system of finite-difference equations that represents 1D flow for the grid system depicted in Fig. 5. 1 8 is, for Gridblock 1 ,

TnLx l + ';'(pn2 + 1 pnI + l ) _

+

(

q /sc i _

for Gridblock

_

Vb¢ C / acB;/";,. t

_

y,

_

) ( n+1

2,

TnLx2 + (pn3 + 1 pn2 + l )

TnLx I _ V2(pnI + 1 pn + l )

_

I

PI

n) .

TnLx2 _ ( pn+ 2 1 pnI + l ) Y,

ts

;

_

. . . . . . . . . . . (5.7 6)

TLxn 3 + y,(pn4 + 1 pn3 + l ) Tn/X3-V2 (pn3 + 1 pn2 + l ) _

_

+ I ).

( p3 + I

dp

I

P - Po ax - X I - X o _

C

=

. . . . . . . . . . . . . . . . . . . . . . . . . . . (5.79a)

I

or Po = P I - C(X - x o ) ·

. . . . . . . . . . . . . . . . . . . . . . (5.79b)

Similarly, the central-difference approximation can be used in Eq. 5 .74 for the boundary on the right side (X = X4 + Yz) in Fig . 5 . 1 8 t o obtain . . . . . . . . . . . . . . . . . . . . . . . (5.80) These two additional equations are used to complete the system of equations in the reservoir simulator for the ID reservoir shown in Fig. 5 . 1 8. For a no-flow boundary (C = 0), Eqs. 5 .79b and 5 . 80 indicate that, for a block-centered grid, the pressures of the grid cells just outside the reservoir are equal to the pressures of the boundary grid cells just inside the reservoir. If we substitute the pressures for a no-flow boundary (PO = P l and p4 = P5 ) into Eqs. 5 .75 and 5 .78, the terms containing the boundary pressures go to zero. That is,

TnLx 1 + ( P2n + 1 Y,

_

(

n + I ) + Q /sc

- PI

Vb¢ C t acB ;A t

) ( nI + 1

for Eq. 5.75, and

I

P

I

n)

- PI

. . . . . . . . . . . . . . . . . . (5.8 1 )

. . . . . . . . . . . . . . . . . . (5.82) for Eq. 5 .78. Because zero transmissibility on the boundary would also cause this term to vanish, an alternative approach to modeling no-flow boundaries in a block-centered grid is to assign a zero value to boundary transmissibilities. That is, for no-flow boundaries in a block-centered grid, (5.83) and

_

2

for Gridblock 3 ,

The reason that there are more unknowns than equations is that the finite-difference equations for the gridblocks on the boundaries contain pressures outside the reservoir and p� We can use Eq. 5 .74 to complete the system of equations. The central-difference approximation of Eq. 5.74, written at the left boundary (x = Xl - y,) in Fig. 5 . 1 8, is

. . . . . . . . . . . (5.75)

- PI '

+ Q c2 - ( a B /";,. t ) ( P n+ 2 1 - P2n) '. c Vb¢ c/

0

. . . . . . . . . . . (5.78)

T nLx4 +

v,

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (5.84)

= O.

Example 5.5. For the block-centered grid system shown in Fig . 5 . 1 8, show that the u s e of Eq. 5 .79a with C = 0 is equivalent t o u s e of Eq. 5.83 for implementing a no-flow boundary i n Eq. 5 .7 5 . Solution. Using a value o f C = O in Eq. 5 .79a results in P o = Substituting this pressure into Eq. 5.75 results in

PI'

_

. . . . . . . . . . . (5.77)

FINITE-DIFFERENCE APPROXIMATION TO LINEAR-FLOW EQUATIONS

=

( a ) (pnI + 1 Vb ¢ C t BOa t c I

I

_

pnI )

'

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

(5.85a) 85


� Lin. of symmetry because of no flow boundary

I

Fig. 5.1 9-Porous medium a nd point-clistributed finite-differ­ ence grid with specified-pressure-gradlent boundaries.

TIxn l + v,( pn2 + 1 _ pnI + l ) + q Isc l

or

1-112

. . . . . . . . . . . . . . . . . . (5 . 85b) Similarly, substituting Eq. 5 . 8 3 into Eq. 5 .75 results in Eq. 5 . 85b.

Tnlxl + Y,( pn2 + 1 _ pn + l ) + O( pnI + l _ pn + l ) + q Isc l 0

I

( aVb¢CI ) B I0l1 1 ( pnI + 1

pnI )

. . .

I or TnIx v, ( pn2 + l _ pnI + I ) + q Isc l+ l _

C

(

.

. . .

.

.

. . . . .

.

.

.

(5.8 6 )

or

Po

=

)

=

P2 - Po X 2 - Xo

=

C

. . . . . . . . . . . . . . . . . . (5 . 85b)

. . . . . . . . . . . . . . . . . . . . . . . . . . (5 . 87 a )

P2 - C(X2 - xo)·

Example 5.6. For the point-distributed grid system in Fig. 5 . 1 9, show that the use of Eq. 5 . 8 9 is equivalent to the use of Eq. 5 .9 1 for implementing a no-flow boundary in Eq. 5 . 7 5 . Solution. Eq. 5 .75, written for the complete Gridblock I , which is enclosed between boundaries I Y2 and I V2, is the following (see Fig. 20):

. . . . . . . . . . . . . . . . . . . . . . (5.87b)

I

)

l CI ( + p ) = ( aVb¢ B o c l l1 t P7 - 7

where

qsc

=

I

2 q sc1 '

. .

-

x4)·

.

(C =

.

.

.

.

.

.

.

.

.

.

.

.

.

Po

=

P2

and

Tlx + 5

= 0 Y2

= 0

.

.

.

. .

.

.

.

.

.

. . .

.

.

(5.93a)

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

Substituting Eqs. 5 . 93b through e into Eq. 5 .93a results in

TilIx l + ,/,( pn2 + 1 _ pn + l ) I

_

Tixn l + v,( pnI + 1

_

pn2 + l ) + 2q SC I

. . . . . . . . . . . . . . . . . (5.94a)

=

2

(:��t) I (P7 + 1 - p7)·

or after dividing through by

. . . . . . . . . . . . . . . (5.94b) .

2, the equation for actual Gridblock I is

(5 .89)

We can also use the transmissibility terms to model no-flow boundaries. For a point-distributed grid system, we need to assign a zero value to boundary transmissibilities 1 - Y2

.

(5.93c) Vb = 2Vb l , T Ix 1 _ y, = T lx l + ,/, ' . . . . . . (5.93d) and Po = P2' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (5 .93e)

(5 .90)

Tlx

.

(5.88)

For a no-flow boundary 0), Eqs. 5 . 87b and 5.88 indicate that, for a point-distributed grid, the pressures of the grid cells just out­ side the reservoir equal the pressures of the grid cells located one grid cell away from the boundary cells. Again, an alternative ap­ proach to modeling no-flow boundaries is to adjust values of trans­ missibility of appropriate terms in the finite-difference equations and to use the actual bulk volume of boundary blocks. Eqs. 5 . 87b and 5.88 become For no-flow boundaries

(C= O),

0

. . . . . . . . . . . . . . . . . . . . . . . . . . . (5 .93b)

Similarly, for the right boundary (at x = xs) of the grid system shown in Fig. 5 . 1 9,

Po = P4 + C(X6

+

Tnlx l + Y,( pn2 + l _ pnI + l ) _ Tnlx I _ V,( pn + 1 _ pn + l ) + qsc

Fig. 5.19 shows a I D, point-distributed grid system over the same reservoir discussed earlier. Note that, in the point-distributed grid sys­ tem, the gridpoints lie on the boundaries of the reservoir. For a point­ distributed grid, we can use the central-difference approximation for both boundaries. Applying the central-difference approximation to Eq. 5 .74 at the left boundary (at x = xI) in Fig. 5 . 1 9 results in

ap ax

Fig. 5.20-Handling of a no-flow boundary with a point-distrib­ uted flnite-clifference grid (Example 5.6).

-

_- aVb¢CI ( PIn + 1 - PnI ). B0l11 I I C

.

1+112

(5.9 1 ) (5 .92)

. . . . . . . . . . . . . . . . . . (5 .94c)

Eq. 5.94c also can be obtained from Eq. 5 .75 by setting

T� 1 - % = 0 and using the actual bulk volume, Vb I, and production rate, q sc l ' of Gridblock I (enclosed between Xl and XI IIz). Tnlx l + v,( pn2 + 1 pnI + l ) O( pn1 + l _ pn + l ) + qSC I +

_

_

0

and use the actual bulk volume and actual production (injection) rate for the boundary blocks. Example 5 . 6 provides the details of the de­ velopment of Eq. 5 .9 1 . 86

BASIC APPLIED RESERVOIR SIMULATION


p=C

p= C

Fig. 5.21 -Porous medium and block-centered, finite-difference grid with specified-pressure boundaries.

Fig. 5.22-Porous medium and point-distributed, finite-differ­ ence grid with specified-pressure boundaries.

which, after simplification, is identical to Eq. 5.94c. Specified-Pressure Boundaries. For a specified pressure at the ex­ ternal boundary, P I = C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (5.96) is valid. Boundaries of this type are encountered in the presence of strong aquifers. Again, the value of C can be a function of time, but for the present discussion it will be assumed constant. Fig. 5.21 shows a block-centered grid system in the presence of a specified-pressure boundary. Several methods can be used to approx­ imate a specified-pressure boundary for a block-centered grid system. The simplest approach is to assign the specified boundary pressure to the grid cells on the boundary. The advantage of this method is that we do not have to solve any equation for grid cells on the boundary. There is one disadvantage with this treatment: for block-centered grids, the pressure point for boundary cells is not actually on the boundary but is A x12 away from the boundary. This problem can be somewhat alleviated by reducing the grid size along the boundary. A second approach that can be used for block-centered grids is to extrapolate the boundary pressure, C, from the two closest pressure points to the reservoir boundary. One such approximation, written for the left boundary in Fig. 5.2 1 , is

( 1 + Q )P I - Q p 2 = C, . . . . . . . . . . . . . . . . . . . . . . (5.97a) where Q = fu d (/!!.X 2 + fu I ) ' For the special case of uniform grid spacing, ful = fu2 , and Eq. 5.97a becomes 3 1 ZPI - ZP 2

Example 5. 7.

Derive Eq. 5.97 for a block--centered grid system. Solution. For a block-centered grid system, the slope of the pressure with respect to distance, x, (the pressure gradient) is (see Fig. 5.2 1 ) - PI m = P2 . . . . . . . . . . . . . . . . . (5.98) dx2 + dxl 2 2 Extrapolating the pressure from P I to the left boundary of the reser­ voir results in PI -

m

( �I )

( )

(5.99a)

2( P - P I ) fu 1 P I - fu 2 + ful 2 . . . . . . . . . . . . . . . . . (5.99b) 2 Note that the negative sign in Eq. 5.99a is the result of the fact that we are extrapolating pressure in the negative x direction. If we were extrapolating in the positive x direction (right boundary in Fig. 5.2 1 ), then we would use a positive sign. Setting Q = ful/(fu2 + ful), results in C = PI - Q ( P 2 - PI ) =

or C = ( 1 + Q ) P I - Q p 2, which is Eq. 5.97a. For the special case of a uniform gird, fu fu l = fu2 Consequently, =

rw

l

_ Ax _ Fig. 5.23-Flnlte-dlfference grid block containing a wel l bore.

_ fu Q - fu + fu = 12' Substituting into Eq. 5.97a results in C

(5.97b)

= C,

Eq. 5.97 is the common form of the extrapolation approach that ap­ pears in the petroleum literature.2

C =

0�

I

Ay

- ZPI - ZP1 2'

_

3

which is Eq. 5.97b. Although this approach is more rigorous, it has the disadvantage that additional equations must be solved along with the finite-differ­ ence equations. This directly corresponds to more central-proces­ sing-unit time for a simulation run. The implementation of specified-pressure boundaries for a point­ distributed grid is relatively simple; Fig. 5.22 shows an example. Because the pressure point of the point-distributed grid lies on the boundary, the specified pressure can be applied by assigning it as the pressure of the boundary cell. No extrapolations are required for specified-pressure boundaries on a point-distributed grid. Internal Boundaries. Internal boundaries in a hydrocarbon reser­ voir include wells, nonreservoir rock, and sealing faults. Each of these boundaries requires a different implementation method. Wells. With the exception of single-well simulations in cylindri­ cal coordinates, the dimensions of a simulation gridblock are gener­ ally much larger than the dimensions of the wellbore. For these cases, it can be assumed that the well has relatively little volume and behaves like a line source in the gridblock. For full-field models in rectangular coordinates, therefore, the boundary conditions can be approximated by a line-source/sink term. The sourc�sink terms are applied through the q /se . terms in the finite-difference equations. Fig. 5.23 shows a wellbOre in a large rectangular grid system. Expressions for the source/sink term can be obtained by use of the steady-state well theory. The flow into a wellbore can be estimated from a well model, such as . . . . (5. 100)

FINITE-DIFFERENCE APPROXIMATION TO LINEAR-FLOW EQUATIONS

87


:

:

:

:

:

-

- - ... -

:

--i - -+ - - i- - --+-- -+ - --+ - --�....� �-;-t'---:--r- ! : : : : ! �."-i-.-+-""-r-1--t-T--r---r- i---- T- , _.L--I-"';"'-�� "'.�'-�'� L L � -- --�-----L ..

____

:

I

__

t

__

I

-

-

,

:I

:

..

!

I

, ,

,

....---�.--L-..,

, ,

-

, ,

,

� :-

_ I_,

-

'

� - -' - .. - '' , --,r - ., , I -1--:, - ,

, ' j , _ _ 1- - -

_ _

-

-

:

_

,

n

TIXj ± V:" k = O ·,1, Fig. 5.25-Cross section showing a seal ing fa ult.

Fig. 5.24-Cross section showing vertical flow barriers.

where, for anisotropic reservoirs in rectangular grid cells, Peace­ man6 showed that the equivalent radius of a well block, req, is

req

= 0.28

[(

) ( l ( kJkx) + (kx/kr) , \

l

kJkx �.\ + kx/ k ;c ,

2 (dy)

;c

]

Yo

. . . . (5 . 1 0 1 )

([

qsc � -1 5 0 STBID

1 ,000

75

It

• 4

• 5

__�______L-____�____-L____�

I-

and the horizontal permeability i s

• 3

• 2

• 1

1 ,000 II

-I

(5. 1 02) Chaps. 6 and 9 discuss the details of well treatment in reservoir sim­ ulation for single-phase and multiphase flow, respectively. Nonreservoir Rock. The presence of nonreservoir rock in a petro­ leum reservoir may have a significant impact on reservoir perfor­ mance. The performance most significantly affected by nonreservoir rock includes the volumetrics of the in-place hydrocarbons, gas- and water-coning behavior in the presence of shales, and gravity over-/un­ derride during displacement processes in the presence of shales. In addition, the effective vertical permeability of a gridblock also de­ pends on the amount and continuity of any shales it contains. Shale stringers of negligible volume that act as flow barriers can be modeled effectively by assigning zero values of vertical trans­ missibility to the layers bounded by the shale. The section on exter­ nal boundaries discussed this approach to modeling no-flow bound­ aries. If the shales are more massive, it may be necessary to alter the net-/gross-thickness ratio or adjust cell tops to allow for vertical

Fig. 5.26-Porous medi um and block-centered grid system for Example 5.B.

The forward-difference approxima­ tion to the flow equation results in an explicit calculation procedure for the new-time-level pressures (designated n + I in the finite-dif­ ference equations). Solving the forward-difference equation (Eq. 5 .69) for the unknown quantity, pi + 1, yields the expression

5.6. 1 Explicit Formulation.

. . . . . . . . . . . . . . . . . . .

gaps between flow units. Most commercial simulators have the ca­

pability to alter these grid properties. Fi g. 5.24 shows a cross-sec­ tional view of a finite-difference grid in the presence of vertical flow barriers. Sealing Faults. Faults are common geologic features in petro­ leum reservoirs; often, they are sealing faults that act as barriers to flow. We have already seen how zero values of transmissibility can be used to model no-flow boundaries. This method can also be ap­ plied to sealing faults. Fig. 5.25 shows a cross-sectional view of a finite-difference grid in the presence of a sealing fault. 5.6 Explicit and I mplicit

Finite-Difference Formulations

The problem to be solved in reservoir modeling is to advance the simulation from the initial conditions to future times. This is accom­ plished by stepping through the simulation with discrete time inter­ vals called timesteps. Earlier, this chapter derived two finite-difference approximations: the forward- and the backward-difference equations (Eqs. 5.69 and 5 .66, respectively). Although they have similar forms, there is a fun­ damental difference between the two formulations. Because of the time levels assigned to the pressures on the left sides of the equations, the forward-difference equation results in an explicit calculation for the new-time-Ievel pressures while the backward-difference equation results in an implicit calculation for the new-time-level pressures. This difference is the subject of this section. 88

(5. 1 03 )

All terms on the right side of Eq. 5 . 1 03 are known because all pressures appearing on this side are at the known (old) time level, n. In this equation, the pressures at the new-time level can be ob­ tained explicitly by use of these known pressures. The following ex­ amples show the explicit calculation procedure. Example 5.S. For the I D, block-centered grid shown in Fig. 5.26, determine the pressure distribution during the first year of produc­ tion. The initial reservoir pressure is 6,000 psia. The rock and fluid properties for this problem are At- = 1 ,000 ft, dy = 1 ,000 ft, & = 75 ft, BI = 1 RB/STB, CJ = 3.5 x 1 0 - 6 psi - 1 , kx = 1 5 md, q, = 0. 1 8,,u1 = 1 0 cp, and B; = 1 RB/STB. Use time step sizes of dt = 1 0, 1 5 , and 30 days. Assume B[ acts as a constant within the pressure range of interest. [This example is also presented as an exercise (Exercise 5 . 1 2) where this assumption is not used.]

Soilltion. 1 . For dt = 1 0 days.

Because this problem uses customary units, we refer to Table 4. 1 to calculate the fluid and block properties as At- = 1 ,000 ft, Ax = dydz = ( 1 ,000 ft)(75 ft) = 75,000 ft2 , Vb = At-f1ydz = ( J ,000 ft)( l ,OOO ft)(75 ft) = 75 x 1 06 ft3 , kx = 0.0 1 5 darcy, ,ul = 1 0 cp, B, = 1 RB/STB and B; = 1 RB/STB , CJ = 3.5 X 1 0--6 psi - 1 , Qlsc4 = - 1 50 STBID, q, = 0. 1 8, and dt = 1 0 days. Therefore, BASIC APPLIED RESERVOIR SIMULATION


(ac B;l'1t/Vbl/>CJ= [(5.615)(1)(10)]/[(75 x 106)(0.18)(3.5 x 10-6)] =1.18836; and, for unifonn gridblocks,

= 6, 000 For Gridblock

+ (0.1507)(6,0 00)

. . . . . . . . . . . . . . . ... . . . . . . (5.104) {[(1.127)(75,000)(0.015)]/[(10)(1)(1,ooo)]} = 0.1268. We now n = 0; p7 =6,000 psia for Gridblocks j= I, 2 ,..., 5. For Gridblock I, Timestep I,

= 5,973.14

=

p:;+1 =p:;- (178.254) +(0.1507)p; - (0.3013)p4 +(0.1507)P3

= 5,821.75 - 178.254

p7 + 1.18836 [0.1268 p� - 0.126840 p� + (O) Po]

6,000

For Gridblock

p�+l

=

= 5,697.21 psia. p�+1

I,

p� + (0.1507)p) - (0.3013)p� + (0.1507)p7

= 6,000

+ (0.1507)(6,000)

For Gridblock

P3+1

until the end of the simulation. Table 5.1 shows the results of this explicit simulation.

psia.

3, Timestep

2. For I'1t=15 days,

I,

= P3 + (0.1507)p�+1 - (0.3013)P3 + (0.1507)p� = 6,000 + (0.1507)(6,000) - (0.3013)(6,000)

(75

+ (0.1507)(6,000) and

= 6,000 psia. For Gridblock

p�+ 1

4, Timestep 1,

= 6,000 - (178.2540)

p�+l P3+ 1

5, Timestep 1,

= P� + (0)P6 - (0.1507)p� + (0.1507)p1 = 6,000 - (0.1507)(6,000) + (0.1507)(6,000) = 6,000 psia. This is the end of the first timestep. Now, set p? = p7+ , where i=l, 2 ,... , 5. That is to say, pl=6,000 psia, p1=6,000 psia, p� =6,000 psia, p! =5,821.75 psia, and p� =6,000 psia at t=10 p�+ 1

1

days. We now proceed to the next timestep.

pr

1

=

For Gridblock

p�+ 1

(5.615)(1)(15) 106)(0.18)(3.5 x 10-6)

) =( ;-112

/3C

Axkx A

-

fl/ B/ l..l. X

2,

)

i 1f2 +

= 1.78254

= 0.1268.

= p� + (0.2260)p� - (0.2260)p7 + (O)p�. 2,

= P2 + (0.2260)P3 - (0.4520)P2 + (0.2260)p7. 3,

= P3 + (0.2260)P4 - (0.4520)p)

+ (0.2260)P2.

For Gridblock 4,

P4+1

= P4 + (1.78254)( -

150) + (0.2260)ps

- (0.4520)P4 + (0.2260)P3 . For Gridblock

p�+l

5,

= p� + (O)p� - (0.2260)p� + (0.2260)p:;.

Table 5.2 shows the results of this explicit simulation.

3. For !:!..t=30 days,

t) (acB;!:!.. = Vb¢Ct

p7 + (0.1507)p� - (0.1507)p7 + (O)pZ

= 6,000 = 6,000

A

For Gridblock

psia.

For Gridblock I, Timestep

Axk, -

fl/ B /l..l. X

For Gridblock

+ (0.1507)(6,000)

- (0.3013)(6,000) + (0.1507)(6,000) For Gridblock

R /Jc

p�+ 1

+ (0.1507)p; - (0.3013)p� + (0.1507)P3

5,821.75

(

x

For Gridblock I,

= p� + (1.18836)( - 150)

=

= p� + (O)p� - (O.l507)p; + (0.1507)p4 = 6,000 - (0.1507)(6,000) + (0.1507)(5,821.75) = 5,973.14 psia.

This is the end of the second timestep. This procedure is repeated

- (0.3013)(6,000) + (0.1507)(6,000)

= 6,000

5, Timestep 2,

For Gridblock

psia.

2, Timestep

+ (0.1507)(6,000)

- (0.3013)(5,821.75) + (0.1507)(6,000)

= p� + (0.1507)p� - (0.1507)p7 + (O)Po = 6,000 + (0.1507)(6,000) - (0.1507)(6,000) =

psia.

4, Timestep 2,

For Gridblock

apply the initial conditions at

p�+l

3, Timestep 2,

= P3 + (0.1507)p4 - (0.3013)p3 + (0.1507)p� = 6,000 + (0.1507)(5821.75) - (0.3013)(6,000)

P3+1

or

psia.

+ (0.1507)(6,000) - (0.1507)(6,000)

i

3.56508

psia.

2, Timestep 2,

= p� + (0.1507)p3 - (0.3013)p� + (0.1507)p7 = 6,000 + (0.1507)(6,000) - (0.3013)(6,000)

For Gridblock I,

+ (0.1507)(6,000) FINITE-DIFFERENCE APP ROXIMATION TO LINEAR-FLOW EQUATIONS

p7+ 1

= p7 + (0.4520)P2 - (0.4520)p7 + (O)pZ· 89


TABLE 5.1-EXPLICIT-SIMULATION-STUDY RESULTS OF THE PROBLEM IN FIG. 5.26

Time (days)

0.0 1 0.0 20.0 30.0 40.0 50.0 60.0 70.0 80.0 90.0 1 00.0 1 1 0.0 1 20.0 1 30.0 1 40.0 1 50.0 160.0 170.0 180.0 1 90.0 200.0 21 0.0 220.0 230.0 240.0 250.0 260. 0 270.0 280.0 290.0 300.0 31 0.0 320.0 330.0 340.0 350.0 360.0

(.it = 10 days)

THE PROBLEM IN FIG. 5.26

Pressure (psia) Block

--

--

Block 2

--

--

Block 4

--

6,000.00 6,000.00 6,000.00 6,000.00 5,999.39 5,997.59 5,994.23 5,989.09 5,982.12 5,973.35 5,962.83 5,950.69 5,937.01 5,921 .92 5,905.51 5,887.89 5,869.14 5,849.34 5,828.57 5,806.89 5,784.38 5,761 .07 5,737.03 5,712.30 5,686.93 5,660.96 5,634.42 5,607.34 5,579.77 5,551.72 5,523.24 5,494.34 5,465.05 5,435.39 5,405.38 5,375.05 5,344.41

6,000.00 6,000.00 6,000.00 5,995.95 5,987.47 5,975.25 5,960.14 5,942.84 5,923.87 5,903.58 5,882.21 5,859.93 5,836.84 5,81 3.03 5,788.54 5,763.43 5,737.73 5,711.49 5,684.71 5,657.44 5,629.70 5,601.52 5,572.92 5,543.91 5,51 4.53 5,484.80 5,454.72 5,424.33 5,393.64 5,362.67 5,331.42 5,299.93 5,268.19 5,236.24 5,204.07 5,1 71 .70 5,139.1 4

6,000.00 6,000.00 5,973. 1 4 5,935.61 5,894.46 5,852.61 5,8 1 1 .23 5,770.66 5,730.95 5,692.00 5,653.70 5,61 5.94 5,578.61 5,541 .62 5,504.91 5,468.43 5,432.11 5,395.94 5,359.87 5,323.89 5,287.98 5,252.12 5,216.30 5,1 80.52 5,1 44.77 5,1 09.04 5,073.32 5,037.62 5,001.93 4,966.25 4,930.57 4,894.90 4,859.23 4,823.57 4,787.91 4,752.25 4,71 6.60

6,000.00 5,821 .75 5,697.21 5,602. 1 0 5,523.74 5,455.31 5,393.06 5,334.88 5,279.52 5,226.23 5,1 74.55 5,1 24.1 8 5,074.91 5,026.59 4,979.1 1 4,932.40 4,886.38 4,841 .01 4,796.22 4,751.99 4,708.26 4,665.02 4,622.22 4,579.84 4,537.85 4,496.24 4,454.97 4,414.03 4,373.39 4,333.05 4,292.97 4,253.15 4,21 3.58 4,174.22 4,1 35.09 4,096. 1 5 4,057.40

6,000.00 6,000.00 5,973.14 5,931 .57 5,88 1 .93 5,827.96 5,771.81 5,71 4.75 5,657.51 5,600.56 5,544.16 5,488.47 5,433.59 5,379.54 5,326.36 5,274.04 5,222.57 5,1 7 1 .92 5,122.06 5,072.96 5,024.60 4,976.94 4,929.94 4,883.58 4,837.81 4,792.62 4,747.96 4,703.82 4,660. 1 6 4,616.95 4,574.17 4,531.81 4,489.82 4,448.20 4,406.92 4,365.96 4,325.31

For Gridblock

1

Block

3

Block 5

2,

pi+ 1 = pi + (0.4520)pj - (0.9040)pi + (0.4520)p7. For Gridblock

pj+ 1 = P3 For Gridblock

3, +

(0.4520)p� - (0.9040)pj + (0.4520)pi.

4,

p�+ l = P4 + (3.5608)( - 150) - (0.9040)P4 For Gridblock

p;+l = p; 90

5,

+

+

(0.4520)p;

TABLE 5.2-EXPLICIT-5IMULATION-STUDY RESULTS OF

Time (days)

0.0 15.0 30.0 45.0 60.0 75.0 90.0 1 05.0 120.0 135.0 150.0 165.0 180.0 195.0 21 0.0 225.0 240.0 255.0 270.0 285.0 300.0 315.0 330.0 345.0 360.0

(.it= 15 days)

Pressure (psia) Block

1

Block 2

Block

--

--

6,000.00 6,000.00 6,000.00 6,000.00 5,996.91 5,989.45 5,977.48 5,961 .34 5,941.48 5,918.33 5,892.28 5,863.67 5,832.77 5,799.83 5,765.05 5,728.60 5,690.66 5,651 .35 5,61 0.81 5,569.13 5,526.44 5,482.80 5,438.31 5,393.05 5,347.07

6,000.00 6,000.00 6,000.00 5,986.34 5,963.89 5,936.49 5,906.06 5,873.44 5,839.05 5,803.08 5,765.68 5,726.96 5,687.01 5,645.93 5,603.80 5,560.71 5,51 6.74 5,471 .95 5,426.42 5,380.21 5,333.37 5,285.96 5,238.03 5,189.62 5,140.78

Block

3

6,000.00 6,000.00 5,939.57 5,873.34 5,809.64 5,748.87 5,690.33 5,633.36 5,577.48 5,522.35 5,467.74 5,413.48 5,359.47 5,305.62 5,251.89 5,198.24 5,144.65 5,091 .09 5,037.55 4,984.04 4,930.54 4,877.04 4,823.55 4,770.07 4,716.58

+ (O)p� - (0.4520)p; + (0.4520)P4.

Block 5

--

6,000.00 6,000.00 5,939.57 5,859.68 5,773.53 5,686.06 5,599.31 5,51 4.16 5,430.96 5,349.83 5,270.76 5,1 93.69 5,11 8.50 5,045.09 4,973.33 4,903.10 4,834.29 4,766.78 4,700.46 4,635.25 4,571 .04 4,507.75 4,445.30 4,383.63 4,322.66

TABLE 5.3-EXPLICIT-SIMULATION-STUDY RESULTS OF THE PROBLEM IN FIG. 5.26

Time (days)

0.0 30.0 60.0 90.0 1 20.0 1 50.0 1 80.0 21 0.0 240.0 270.0 300.0 330.0 360.0

(.it = 30 days)

Pressure (psia) Block

1

6,000.00 6,000.00 6,000.00 6,000.00 5,950.61 5,909.33 5,843.62 5,778.68 5,701 .28 5,622.02 5,535.89 5,447.49 5,355.04

Block 2

6,000.00 6,000.00 6,000.00 5,890.74 5,859.28 5,763.95 5,699.95 5,607.44 5,525.93 5,431 .47 5,340.30 5,242.96 5,146.14

Block

3

6,000.00 6,000.00 5,758.28 5,711.88 5,557.04 5,476.98 5,351 .62 5,255.87 5,1 41 .61 5,039.23 4,929.35 4,824.25 4,7 1 6 .11

Block 4

Block 5

6,000.00 5,465.24 5,413.91 5,190.47 5,077.69 4,91 2.67 4,791.45 4,651.52 4,530.79 4,403.89 4,285.87 4,166.31 4,051 .1 2

6,000.00 6,000.00 5,758.28 5,602.62 5,416.33 5,263.26 5,104.79 4,963.16 4,822.29 4,690.53 4,560.97 4,436.62 4,314.44

Table 5.3 shows the results of this explicit simulation. This example illustrates several points discussed throughout this chapter. The first point is that the no-flow boundaries

(0.4520)pj.

4

6,000.00 5,732.62 5,586. 1 0 5,478.49 5,386.50 5,302.22 5,222.53 5,146.03 5,071 .99 4,999.98 4,929.72 4,861 .01 4,793.68 4,727.58 4,662.60 4,598.63 4,535.57 4,473.36 4,4 1 1 .90 4,35 1 . 1 4 4,291 .00 4,231 .45 4,172.42 4,113.87 4,055.76

can

be modeled

by assigning zero transmissibilities at the edges of the porous medium. . The second IS that the pressures calculated at identical times are dif­

ferent, depending on the timestep size used in the calculation This is

indicative of the approximate nature of the fInite-differen e tech­ nique. There is no reason why these approximations should give the BASIC APPLIED RESERVOIR SIMULATION


if

qsc= -150 STBI

D

TABLE 5.4-EXPLICIT-SIMULATION-STUDY RESULTS OF THE PROBLEM IN FIG. 5.27 (M= 15 days)

1'OOO

75 ft

Pressure (psia)

=

• 3

"I

• 4

Time (days)

• 5

�______L-____�____�____-¥

__

p

• 2

6,000 psla

1,000 ft

dp dx

=0

Fig. 5.27-Porous medium and block-centered grid system for Example 5.9. same results for different timestep sizes. Because the approximation is first order, the smaller timestep sizes generally give more precise results when compared with the solution of the original PDE. A final point illustrated by this example is that the pressure tran­ sient created by fluid withdrawal from the well in Gridblock

4 can

move only one cell per timestep. This is a property of the explicit methods only. For a timestep size of 10 days, it takes the pressure transient 40 days to reach the left boundary, while for a timestep size of

30

days it takes the pressure transient

120

days to reach the

boundary. That is, four timesteps are always needed for the pressure transient to reach the left boundary in this example.

Example 5.9. For the ID, block-centered grid shown in Fig. 5.27, determine the pressure distribution during the first year of produc­ tion. This problem is identical to Example

5.8, except

that the no­

flow boundary on the left side of the reservoir is replaced by a constant-pressure boundary. Use the same rock and fluid properties as in Example 5.8. Although this is a block-centered grid system, as­ sume that the pressure in Gridblock 1 is equal to the boundary pres­ sure. Use a timestep of 15 days.

Solution. As in Example 5.8, acB;l1t/VbrjJc/ = 1.78254 PcAxkx/fJ/B/l1x = 0.1268 for all blocks. For Gridblock 1, Timestep 1, p� +I = 6, 000 psia. For Gridblock 2, Timestep 1,

pi+1 = pz

+ 1.78254 [0.1268 p� - (0.1268 + 0.1268) pi

and

0.0 1 5.0 30.0 45.0 60.0 75.0 90.0 1 05.0 1 20.0 1 35.0 1 50.0 1 65.0 1 80.0 1 95.0 21 0.0 225.0 240.0 255.0 270.0 285.0 300.0 31 5.0 330.0 345.0 360.0

+ (0.2260)p� - (0.4520)P2 + (0.2260)p�

= 6,000 + (0.2260)(6,000) - (0.4520)(6,000) + (0.2260)(6,000)

p;+1

6,000.00 6,000.00 6,000.00 6,000.00 6,000.00 6,000.00 6,000.00 6,000.00 6,000.00 6,000.00 6,000.00 6,000.00 6,000.00 6,000.00 6,000.00 6,000.00 6,000.00 6,000.00 6,000.00 6,000.00 6,000.00 6,000.00 6,000.00 6,000.00 6,000.00

6,000.00 6,000.00 6,000.00 5,986.34 5,963.89 5,937. 1 9 5,908.82 5,880.09 5,851 .59 5,823.61 5,796.27 5,769.63 5,743.68 5,71 8.43 5,693.86 5,669.96 5,646.70 5,624.09 5,602.08 5,580.68 5,559.86 5,539.61 5,51 9.91 5,500.75 5,482 . 1 0

6,000.00 6,000.00 5,939.57 5,873.34 5,809.64 5,748.87 5,690.49 5,634.07 5,579.38 5,526.27 5,474.64 5,424.45 5,375.63 5,328 . 1 4 5,281 .96 5,237.03 5 , 1 93.33 5,1 50.82 5,1 09.46 5,069.24 5,030 . 1 1 4,992.05 4,955.03 4,91 9.01 4,883.98

6,000.00 5,732.62 5,586. 1 0 5,478.49 5,386.50 5,302.22 5,222.53 5,1 46.07 5,072 . 1 7 5,000.51 4,930.91 4,863.26 4,797.47 4,733.49 4,671 .26 4,61 0.73 4,551 .85 4,494.58 4,438.86 4,384.67 4,331 .95 4,280.67 4,230.79 4,1 82.27 4,1 35.07

6,000.00 6,000.00 5,939.57 5,859.68 5,773.53 5,686.06 5,599.31 5,51 4. 1 6 5,430.97 5,349.88 5,270.92 5 , 1 94.08 5, 1 1 9.31 5,046.57 4,975.82 4,906.99 4,840.03 4,774.90 4,71 1 .55 4,649.92 4,589.97 4,531 .66 4,474.93 4,419.76 4,366.08

5, Timestep

= 6,000 - (0.2260)(6,000)

p7 = p7+1 , where i = 1, 2 ,... , 5, and proceed to the second timestep. For Gridblock 1, Timestep 2, p'j +1 = 6,000 psia.

This is the end of the first timestep. Now, set

pi+1 = pi

2, Timestep 2,

+ (0.2260)p; - (0.4520)pi + (0.2260)p'j

+ (0.2260)(6,000) - (0.4520)(6,000)

= 6,000

= 6, 000 psia.

+ (0.2260)(6,000)

+ (0.2260)(6,000) - (0.4520)(6,000)

For Gridblock

p;+l = p;

= 6, 000 psia.

4, Timestep 1,

= 6,000 - 267.381

- (0.4520)(6,000)

+ (0.2260)(6,000)

+ (0.2260)(6,000)

3, Timestep 2,

+ (0.2260)P4 - (0.4520)p; + (0.2260)pi

= 6,000

+ (0.2260)(5,732.62) - (0.4520)(6,000)

+ (0.2260)(6,000)

+ (1.78254)( - 150) + (0.2260)p; + (0.2260)p�

+ (0.2260)(6,000)

= 6, 000 psia.

3, Timestep 1,

- (0.4520)P4

I,

+ (0)P6 - (0.2260)p; + (0.2260)P4

= 6,000

p�+l = p�

Block 5

--

= p; + (0.2260)p� - (0.4520)p; + (0.2260)P2

For Gridblock

Block 4

--

For Gridblock

+ (0.2260)(6,000)

Block 3

--

p;+1 = p;

= 6, 000 psia. For Gridblock

Block 2

--

For Gridblock

+ 0.1268p� 1 = P2

Block 1

--

= 5,939.57 psia. For Gridblock 4, Timestep

P4+1 = P4 - 267.381

= 5,732.62 psia. FINITE-DIFFERENCE APPROXIMATION TO LINEAR-FLOW EQUATIONS

2,

+ (0.2260)p; - (0.4520)P4 + (0.2260)p;

= 6,000 - 267.381

+ (0.2260)(6,000)

91


1'OOOfr 75

It

• 1

For Gridblock 2, Timestep 1,

p�+1 = p� + • 2

• 3

• 4

• 5

• 6

• 7

• 8

=

H

p

=

6,000 psla

500

dp =0 dx

It

Fig. 5.28-Porous medium and block-centered grid system for Example 5.10.

- (0.4520)(5,732.62)

+

(0.2260)(6,000)

+

(O)p� - (0.2260)p�

= 6,000 - (0.2260)(6,000)

+

(0.2260)p� (0.2260)(5,732.62)

= 5,939.57 psia.

The method of implementing the specified boundary pressure in Example 5.9 is the least rigorous method available for block-cen­ tered grid systems. This is because the pressure on the boundary is shifted from the gridblock edge to the block center (i.e., tu/2 away from the reservoir boundary). Although this method is the least ac­ curate method of implementing boundaries with specified pressure, it is the most practical method of implementation; consequently, it is the most common method of implementing boundaries with spe­ cified pressure in reservoir simulators. One method to improve the description of a constant-pressure boundary is to use a more refined grid in the vicinity of the pressure­ specified boundaries. In general, this method can improve the accu­ racy of modeling boundaries with specified pressure in block-cen­ tered grids. For the explicit solution techniques, however, this may lead to stability problems. Example 5.10 illustrates this.

Example 5.10. Example 5.9 used a grid spacing of fu:=1,000 ft. Because the grid system was block centered, the specified pressure was shifted 500 ft toward the interior of the reservoir. By halving the grid spacing, this shift is reduced to 250 ft. Use the explicit forward­ difference equation to simulate the problem illustrated in Fig. 5.28 with a timestep size of at=15 days. Note that this problem is identi­ cal to the problem shown in Fig. 5.27. Solution. All gridblocks are equal; therefore, Ax.=1,000 x 75= 75,000 ft2; Vb.=500X75 x 1,000=37.5X106 ft3 ;

(0.9040)P3 - (1.808)P2 +

+

(0.9040)p'j

(0.9040)(6,000) - (1.808)(6,000)

(0.9040)(6,000)

+

(0.9040)p� - (1.808)P3

= 6,000

+

+

(0.9040)P2

(0.9040)(6,000) - (1.808)(6,000)

(0.9040)(6,000)

= 6,000 psia. For Gridblock 4, Timestep 1,

p�+1 = p� =

This is the end of the second timestep. This procedure is continued until the end of the simulation. Table 5.4 shows the results of this simulation. In this example, the difference between the two types of boundary conditions is illustrated clearly. At 360 days, the pressure in the grid­ block containing the well is approximately 80 psi greater in the case of pressure-specified boundary compared with the case of the no­ flow boundary. This is because the pressure specified for the bound­ ary provides pressure support to the gridblock containing the well.

+

6,000

pr 1 = P3

+ +

0.25358) p�

For Gridblock 3, Timestep I,

For Gridblock 5, Timestep 2, +

+

= 6,000 psia.

= 5,586.10 psia. p�+1 = p�

3.56508[0.25358 p� - (0.25358

0.25358P'i ]

= P2

• 9

+

+

+

(0.9040)p� - (1.808)p�

6,000

+

+

(0.9040)P3

(0.9040)(6,000) - (1.808)(6,000)

(0.9040)(6,000)

= 6,000 psia. For Gridblock 5, Timestep 1,

p�+1 = p�

+

(0.9040)p� - (1.808)p�

= 6,000 +

+

+

(0.9040)p�

(0.9040)(6,000) - (1.808)(6,000)

(0.9040)(6,000)

= 6,000 psia. For Gridblock 6, Timestep 1,

pr 1

=

=

+

p�

+

(0.9040)p,) - (1.808)p�

6,000

+

+

(0.9040)pS

(0.9040)(6,000) - (1.808)(6,000)

(0.9040)(6,000)

= 6,000 psia. For Gridblock 7, Timestep 1,

p,)+1 = p') +

+

(3.56508)( - 75)

(0.9040)p� - (1.808)p,)

+

(0.9040)p�

= 6,000 - 267.381

+

- (1.808)(6,000)

(0.9040)(6,000)

=

+

(0.9040)(6,000)

5,732.62 psia.

For Gridblock 8, Timestep 1,

p�+1 = p�

+

(3.56508)( - 75)

- (1.808)pS

,

(5.615)(1)(15) = 3.56508; (37.5 X 106)(0.18)(3.5 X 10-6)

=

+

+

(0.9040)p�

(0.9040)p,)

6,000 - 267.381

- (1.808)(6,000)

+

+

(0.9040)(6,000)

(0.9040)(6,000)

= 5,732.62 psia. For Gridblock 9, Timestep 1,

p:j+l (75,000)(0.015) = 0.25358. (10)(1)(500) For Gridblock 1, Timestep 1, p'j+l 6,000 psia. = (1.127)

=

92

=

P9

+

(0.9040)Plo - (1.808)P9

= 6,000 +

+

+

(0.9040)p�

(0.9040)(6,000) - (1.808)(6,000)

(0.9040)(6,000)

= 6,000 psia. BASIC APPLIED RESERVOIR SIMULATION


TABLE 5.5-EXPLICIT·SIMULATION·STUDY RESULTS OF THE PROBLEM IN FIG. 5.28 (M= 1 5 days) Time

(days) 0.0

Pressure (psia)

Block 1

15.0

6,000.00

45.0

6,000.00

30.0 60.0

75.0 90.0

105.0

Block 2

6,000.00

6,000.00

6,000.00

6,000.00

6,000.00

6,000.00

6,000.00

6,000.00

6,000.00

5,838.56

4,295.66

6,000.00

150.0

6,000.00

-6,970.62

6,000.00

-80,542.95

6,000.00

195.0

6,000.00

180.0 210.0

6,000.00

225.0

6,000.00

255.0

6,000.00

240.0

270.0 285.0 300.0 315.0 330.0

345.0 360.0

6,000.00

-275.15

-4,165.22

39,675.33

-59,631.96

31,657.41

169,612.37

5,148.36

5,148.36

-758.72

-11,363.42

94,645.40

-90,149.06

5,706.95

235,990.59

6,000.00

6,000.00

5,620.36

5,394.02

5,876.14

5,714.70

4,670.53

6,010.48

8,171.78

5,787.90

3,026.10

6,631.28

24,072.48

1,386.04

19,668.09

-2,323.97

85,824.44

-44,018.56

4,649.32

131,824.68

486,551.96

6,000.00

6,000.00

5,758.28

4,028.07

-28,266.00

Block 10

5,706.95

5,620.36

8,286.27

45,599.66

537,877.05

6,249.19

12,906.43

20,616.29

-30,696.70

5,485.98

4,289.06

2,539.11

9,652.88

5,485.98

7,123.60

8,260.04

4,886.88

5,930.40

5,394.02

Block 9

6,000.00

5,732.62

6,113.64

5,181.77

6,000.00

5,732.62

5,758.28

6,262.36

5,802.46

Block 8

6,000.00

6,000.00

5,821.42

Block 7

6,000.00

6,000.00

6,000.00

6,381.47

Block 6

6,000.00

5,781.48

5,781.48

6,070.61

5,444.13

5,916.10

6,825.81

4,799.15

5,178.88

8,781.94

3,372.14

20,947.85

8,210.15

1,366.40

634.18

-49,565.21

8,262.68

13,538.36

171,193.17

856,091.84

6,000.00

5,930.40

-48,918.84

206,008.62

6,000.00

7,553.26

12,963.88

-42,979.02

182,109.54

6,000.00 6,000.00 6,000.00 6,000.00

6,000.00

6,000.00 6,000.00

For Gridblock 10, Timestep I,

p�ril

6,000.00

6,000.00

10,679.42

223,837.34

Block 5

Block 4

6,000.00

4,539.54

6,475.30

6,000.00

165.0

6,000.00

6,000.00

6,000.00

6,000.00

6,000.00

6,000.00

120.0

135.0

Block 3

6,000.00

= p�o

+

(O)P�I - (0.9040)p�o

= 6,000 - (0.9040)(6,000) = 6, 000 psia.

+

+

an implicit calculation procedure for the new-time-Ievel pressures. Rearranging Eq. 5.66 yields

(0.9040)P9

(0.9040)(6,000)

This is the end of the first timestep. This procedure is continued un­ til the end of the simulation. Table 5.5 shows the results of this ex­ plicit simulation. The erratic behavior shown in Table 5.5 is caused by the condi­ tionally stable nature of the explicit forward-difference formulation. The forward-difference equation is conditionally stable because un­ der certain conditions errors in the solution tend to go to zero during the subsequent timestep calculations, while under other conditions these same errors propagate uncontrollably during subsequent time­ step calculations. This is a serious limitation of the forward-differ­ ence formulation. Examples

5.8

and

5.9

presented appropriate conditions for a

stable solution, while Example

5.10

violated the conditions for a

Tnlxi pin+1 +y' +1

x p;,i

To summarize, the implementation of the explicit formulation technique involves pressures at the old-time-Ievel only. At this time level, these quantities are known and can be used in an explicit cal­ culation procedure to advance the simulation in time.

Fig. 5.29

shows the explicit calculation procedure schematically.

5.6.2 Implicit Formulation. The backward-difference approxima­ tion to the slightly compressible flow equation (Eq. 5.66) results in

] [( vbrpc/) +�, (::;i,);:1 acB;a t i

l,

+

TnIxi v, +

+

Tnlxi-V, Pin+1

+

+

. . . . . . .

T"lxi-V,

(5. lOS)

where the quantities p7: p7+ I , and p7� II are all unknowns. Unlike the explicit formulation, Eq. 5.105 cannot be solved explicitly for pi + I because both p7: and pi� are also unknown. Consequently, we must solve Eq. 5.105 written for all gridblocks and unknowns si­ multaneously. Examples 5.11 through 5.13 illustrate this procedure.

l

l

Example 5. 11. Solve the problem described in Example 5.8 using

at =

the implicit backward-difference formulation. Use a timestep size 15 days. of

stable solution. Stability and Stability Analysis in Sec. 5.6.3 discuss

stability analysis and conditions.

_

TIME LEVEL

n.l

TIME LEVEL

n

I

11\

1-1

I

1.1

Fig. 5.29-Schematlc representation of contribution of grldblocks and their time levels in the explicit equation for Gridblock I.

FINITE-DIFFERENCE APPROXIMATION TO LINEAR-FLOW EQUATIONS

93


=

=

At 15 days, we calculated the following quantities (Vtf/Jct/acB;At)j 0.56100 and

Solution. For in Example

5.8.

= [PCC�;/�X) ] n =

+ (O)p�+I

where

{Pd (Axkx

=

- [0

)/(uIBIAx)] } \I,

=

For Gridblock

2, Timestep 1,

(O.1268)p3+1 - (0.56100

+ 0.1268Pi+I

=

3,

+ (0.56100)(6, 000)]

- [0

Timestep I,

(0.1268)p�+1 - (0.56100

+ (0.1268)pz+I

=

- [0

4, Timestep

I,

(0.1268)p�+1 - (0.56100

+ (0.1268)prl

=

5,

+ (0.1268)P4+I

- [ - 150

where

+ (0.56100)(6, 000)]

+ (0.1268)p�+1

Pc(Axk.JIII

- [0

BI A x) 5+

(O)p�+1 - (0.6878)p�+1

'h.

=

=

- 3, 215.98.

+ (0.56100)(6, 000)], 0 for no-flow boundary condition, or

+ (0.1268)P4+1

=

r"

94

_

!::

p;j+1 p�+1

3, 365.98 3, 365.98 3, 365.98 . 3, 215.98 3, 365.98

7 discusses the solution of linear matrix equations . For the

=

system of equations. The solution that uses a direct technique gives

=

=

pi+1 =5,999.08 psia, PZ+I =5,995.02 psia, p�+1 p�+I 5,805.44 psi a, and p�+I 5,964.13 psia.

5,968.94 psia,

Although direct solution techniques will not be discussed until Chap.

7,

the solution in the previous paragraph can be verified easily

by substituting these values into the original equat ions. This is the end of the first timestep. T he values of

p? can now be updated with

Note that, in this problem, updating the pressures does not affect the coefficients on the left side of the equation, but only those on the right side. This is because we assumed that

III and BI were constant.

If these properties were pressure dependent, we would update the coefficients at this point. T herefore, for Gridblock 1, Timestep

(0.1268)pZ+1 - (0.6878)pi+1 or

(0.1268)pz+1 - (0.6878)pi+1

For Gridblock

2, Timestep 2,

(0.1268)p�+1 - (0.8146)pz+I

or

=

- [0

3, Timestep 2,

(O.1268)p;j+1 - (O.8146)p]+1

or

=

- [0

4, Timestep 2,

(0.1268)p�+1 - (0.8146)P4+1 - 3, 365.98. or

=

- [0

+ 0.56100(5, 999.08)]

- 3, 365.47.

+ (0.1268)pi+1

+ (O.1268)pi+1

- [( - 150)

+ (0.1268)pz+1 + (0.1268)p�+1

+ (0.56100)(5, 805.44)]

(0.1268)p�+I - (0.8146)P4+1

TABLE 5.S-SYSTEM OF EQUATIONS IN EXAMPLE 5.1 1

.

O.6878Pr+1 + O.1 268p;+1 + O.1 268Pr+1 - O.81 46p;+1 + O.1 268p;+1 + O.1 268p;+1 - O.81 46Pa"+1 + O.1 268p,r+1 + O.1 268Pa"+1 - O.81 46p,r+1 + O.1 268p;+1 + O.1 268p,r+1 - O.6878p;+1

=

=

- 3, 363.19.

+ (O.1268)pz+1

+ (0.56100)(5, 968.94)]

(0.1268)p;j+I - (0.8146)p)+1

For Gridblock

= =

2,

+ (0.56100)(5, 995.02)]

(0.1268)p�+I- (0.8146)pz+1

For Gridblock

Table 5.6 shows the system of equations to be solved for the first timestep.

0 0 0.1268 0.6878

P

P2 p�+1

time being, any linear algebraic technique can be used to solve this

+ 0.1268 + 0.1268)p;j+1

+ 0 + 0.1268)p�+1

=

- 3, 365.98.

+ (0.1268)pz+1 = - 3, 365.98.

Timestep I,

(O)p�+1 - (0.56100

=

+ (0.56100)(6, 000)]

(0.1268)p;+I - (0.8146)P4+1

For Gridblock

+ (0.1268)pi+1

[= - ]

o

the known values.

+ 0.1268 + 0.1268)p;+1

(0.1268)p;j+1 - (0.8l46)p�+1

For Gridblock

- 3, 365.98.

+ 0.1268 + O.1268)P2+1

(0.1268)p�+I - (0.8l46)pz+1

For Gridblock

=

]

systems of equations can be represented

0.6878 + 0.1268 0 o o 0.1268 - 0.8146 + 0.1268 o + 0.1268 - 0.8146 + 0.1268 0 o + 0.1268 - 0.8146 + 0 o + 0.1268 -

Chap.

0 for no-flow boundary condition, or

+ Op�+I

3.5.4 showed how

-

+ (0.56100)(6, 000)],

(0.1268)pz+I - (0.6878)pi+I

or

. . . . . . . . . . (5.106)

0.1268.

+ 0.1268 + O)pi+1

(0.1268)pZ+1 - (0.56100

or

+

;+1,1 Gridblock 1, Timestep 1,

For

or

[-

Sec.

by a matrix equation. T he matrix equation for this problem is

+ (0.1268)prl

[-- ]

=

- 3, 348.56.

=

- 3, 106.83.

3,365.98 - 3, 365.98 3,365.98 - 3,21 5.98 - 3, 365.98

BASIC APPLIED RESERVOIR SIMULATION


TABLE 5.7-IMPLICIT-SIMULATION-STUDY RESULTS OF THE PROBLEM IN FIG. 5.26

TABLE 5.�MPLICIT-SIMULATION-STUDY RESULTS OF

(M = 15 days)

THE PROBLEM IN FIG. 5.27

Pressure (psia) Time (days) 0.0 15.0 30.0 45.0 60.0 75.0 90.0 105.0 1 20.0 135.0 150.0 165.0 180.0 195.0 210.0 225.0 240.0 255.0 270.0 285.0 300.0 315.0 330.0 345.0 360.0

Block 1 --

Block 2 --

6,000.00 5,999.08 5,996.29 5,990.91 5,982.51 5,970.92 5,956.12 5,938.22 5,917.38 5,893.81 5,867.72 5,839.31 5,808.79 5,n6.34 5,742.13 5,706.32 5,669.06 5,630.45 5,590.63 5,549.70 5,507.75 5,464.86 5,421.13 5,376.60 5,331.36

For Gridblock

6,000.00 5,995.02 5,983.93 5,967.09 5,945.36 5,919.63 5,890.64 5,859.01 5,825.19 5,789.52 5,752.26 5,713.62 5,673.74 5,632.76 5,590.78 5,547.88 5,504.15 5,459.65 5,414.44 5,368.58 5,322.12 5,275.11 5,227.59 5,179.60 5,131.18

Block

Block 4 --

Block 5

Time (days)

6,000.00 5,805.44 5,655.35 5,532.88 5,427.95 5,334.42 5,248.58 5,168.07 5,091.45 5,017.75 4,946.35 4,876.82 4,808.85 4,742.22 4,676.n 4,612.35 4,548.85 4,486.19 4,424.29 4,363.08 4,302.50 4,242.49 4,183.00 4,124.00 4,065.45

6,000.00 5,964.13 5,907.21 5,838.21 5,762.58 5,683.65 5,603.45 5,523.19 5,443.60 5,365.10 5,287.91 5,212.13 5,137.79 5,064.87 4,993.32 4,923.09 4,854.11 4,786.28 4,719.55 4,653.84 4,589.07 4,525.18 4,462.11 4,399.78 4,338.15

0.0 15.0 30.0 45.0 60.0 75.0 90.0 105.0 120.0 135.0 150.0 165.0 180.0 195.0 210.0 225.0 240.0 255.0 270.0 285.0 300.0 315.0 330.0 345.0 360.0

3

6,000.00 5,968.94 5,922.46 5,868.n 5,812.08 5,754.47 5,696.92 5,639.84 5,583.33 5,527.39 5,471.95 5,416.94 5,362.26 5,307.86 5,253.66 5,199.64 5,145.74 5,091.94 5,038.22 4,984.56 4,930.94 4,8n.35 4,823.79 4,nO.25 4,716.73

(0.6878)p;+1 - (0.1268)p4+1 = - 3,345.86.

+ ' =5,983.93 psia,

Solving the system of updated equations results in the following pressure

pi

and

--

Block 1

--

Block 2

--

Block 3

--

Block 4

--

6,000.00 6,000.00 6,000.00 6,000.00 6,000.00 6,000.00 6,000.00 6,000.00 6,000.00 6,000.00 6,000.00 6,000.00 6,000.00 6,000.00 6,000.00 6,000.00 6,000.00 6,000.00 6,000.00 6,000.00 6,000.00 6,000.00 6,000.00 6,000.00 6,000.00

6,000.00 5,995.17 5,984.62 5,969.05 5,949.59 5,927.37 5,903.34 5,878.25 5,852.62 5,826.86 5,801.21 5,n5.86 5,750.92 5,726.48 5,702.57 5,679.21 5,656.43 5,634.22 5,61 2.57 5,591.49 5,570.95 5,550.95 5,531.48 5,51 2.53 5,494.07

6,000.00 5,968.97 5,922.59 5,869.1 8 5,813.05 5,756.42 5,700.38 5,645.46 5,591.87 5,539.69 5,488.93 5,439.55 5,391 .52 5,344.79 5,299.33 5,255.10 5,212.05 5,170.1 5 5,129.37 5,089.67 5,051 .04 5,01 3.43 4,976.81 4,941. 1 8 4,906.48

6,000.00 5,805.44 5,655.37 5,532.97 5,428.1 6 5,334.90 5,249.48 5,1 69.65 5,094.00 5,02 1 .65 4,952.02 4,884.76 4,81 9.60 4,756.37 4,694.95 4,635.25 4,5n. 1 8 4,520.69 4,465.72 4,41 2.23 4,360.16 4,309.48 4,260.1 5 4,2 1 2.1 3 4,1 65.39

6,000.00 5,964 . 1 3 5,907.22 5,838.23 5,762.63 5,683.78 5,603.72 5,523.71 5,444.49 5,366.55 5,290.1 3 5,21 5.41 5,1 42.44 5,071 .27 5,001 .90 4,934.31 4,868.48 4,804.37 4,741 .94 4,681 .1 6 4,621 .99 4,564.38 4,508.30 4,453.70 4,400.55

Block 5

5, Timestep 2,

- (0.6878)p;+1 - (0.1268)P4+1 = - [0 + (0.56100)(5,964.13)] or

(M = 1 5 days)

Pressure (psia)

distribution

p;+l =5,907.21

30: p7+1 =5,996.29 psia, P3+1 =5,922.46 psia, P4+1 =5,655.35 psia, at

Day

psia. This is the end of the second timestep.

This procedure continues until the end of the simulation; Table 5.7 shows the results.

Example 5.12. Solve the problem described in Example 5.9 using of

Solution. For the first timestep for Gridblock 1, p7 1 =6,<XX>. For all

I1t=15 days.

other gridblocks for the first timestep, both the left and right sides of the

Example 5.U. The rearranged because pi +1 is + +(0.1268)p3 +1 =3,365.98 known: (0.1268)(6,000) - (0.8146)pi or - (0.8146)pi+1+ 0.1268P3+1 = - 4,126.78. The matrix finite-difference equations

are

identical to those in

difference equation for Gridblock 2

can

[-

be

1

equation for the first timestep is

o 0.8146 + 0.1268 + 0.1268 - 0.8146 + 0.1268 o + 0.1268 - 0.8146 + + 0.1268 0 o

Example 5.11 illustrates that the amount of computation required for the implicit solution procedure is much greater than that for the

[-= ]

explicit solution procedure. This is because at each timestep, a sys­ tem of equations must be solved for the unknowns of the problem. In general, most of the computational time used in implicit simula­ tions is in the solution of the linear equations.

0 0 0.1268 0.6878

1[

Pi+1 + P3 1 + P4n l

+ p; l

]

4,126.78 - 3,365.98 - 3,215.98 . - 3,365.98

This example also illustrates that the pressure transient can move more than one block per timestep. Here, it has moved to the left boundary during the first timestep. Also, the results from the implic­ it backward-difference formulation and the explicit forward-differ­

+

the implicit backward-difference formulation. Use a timestep size

Finally, the no-flow boundary can be implemented by assigning

The solution to this system of equations is pi +1 =6,<XX> psia (fixed), +l pi+1 =5,995.17 psia, p� =5,968.97 psia, P4+1 =5,80 5.4 4 psia, + and p; =5,964.13 psia. This is the end of the first timestep. For all

a zero transmissibility to the boundaries. This is the same method

future timesteps, the left side of the finite-difference equations re­

used in earlier examples. Example 5.12 illustrates the implementa­

mains constant and only the right side changes. For the second time­

ence formulation will not give identical results even when the same timestep is used. Again, this is because of the approximate nature of the finite-difference approach.

tion of a specified-pressure boundary.

1

step, the matrix equation becomes

FINITE-DIFFERENCE APPROXIMATION TO LINEAR-FLOW EQUATIONS

9S


TABLE 5.9-MATRIX EQUATION IN EXAMPLE 5.1 3

f p; + pr1 pr1 l p ;+ pr1 pr1 l p ;+ pr1 n p10+1

-- 0.7877 + 0.2536 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0.2536 - 0.7877 + 0.2536 0 0 0 0 0 0 + 0.2536 - 0.7877 + 0.2536 0 0 0 0 0 0 + 0.2536 - 0.7877 + 0.2536 0 0 0 0 0 0 + 0.2536 - 0.7877 + 0.2536 0 0 0 0 0 0 + 0.2536 - 0.7877 + 0.2536 0 0 0 0 0 0 + 0.2536 - 0.7877 + 0.2536 0 0 0 0 0 0 + 0.2536 - 0.7877 + 0.2536 0 0 0 0 0 0 0 + 0.2536 - 0.5341

..

[- 00..81214686 -000...811221468686 -00..81214686 0.1268 ][ 0 0.1268 -0.6878 [---3,4,3, 311480246...058963]. +

+

+

+

o o

+

o

+

p�+l pn+1 P4! +I p�+1

o o

Truncation Error and Truncation-Error Analysis. As Secs. and

P3+1

p7+I = p�+1

The net result of this truncation error is the approximate nature of the solution. In other words, if a computer with the capacity to carry an infinite number of digits were used to obtain the solution to the finite­

psia (fixed),

psia, psia. This is the end of the second timestep.

Table

As a final example, we investigate the problem defined in Fig. which exhibited instability with the explicit formulation.

difference equations (that is, a solution with no round-off error), the solution would differ from the exact solution of the original PDE be­ cause of this truncation error. The problems we need to address are the magnitude of the truncation error and how can we increase the ac­ curacy of an approximation by decreasing the magnitude of this error. As mentioned previously, the deviation of the PDE from its corre­ sponding finite-difference approximation at a given point in space and at a gi yen instant in the time domain is called the local truncation error or local discretization error. 2 In other words, the truncation er­ ror,

5.10 5.1 1 5.12. 2 6,000

Example 5.13. Solve the problem described in Example

by

f

Lj ' can be expressed as

use of the implicit backward-difference formulation. Use a timestep size of

At = 15 6,000

days.

Solution. The matrix equation for the first time step can be written

following the procedure outlined in Examples cause

p7+I =

and

I ap D at

Be­

is removed from the system and the equation for Gridblock is mo­ dified by substituting for = psia and carrying the term involving to the right side. Table 5.9 shows the resulting ma­ trix equation, and Table 5.10 shows the results of this simulation.

p7+I

5.1 3

Example demonstrates that no stability problems are associated with the implicit formulation. This is because the implicit

p 7-1 - P7 + p7+1 (Ax)2

and its corresponding forward difference approximation

unstable behavior. Although this statement indicates that any grid­ block dimension and/or timestep size can be used with no stability

enLj

=

problems, the use of large timestep sizes and block dimensions may result in unrealistically coarse approximations. This becomes appar­ ent in the solution as a departure from the true physics of the problem. Because of the unconditionally stable nature of the implicit formula­ tion, the backward-difference formulation is the most commonly used formulation in petroleum reservoir simulation. As a summary,

Fig. 5.30 is a schematic diagram of the implicit

n + I time level is

formulation. The figure illustrates the need to solve a system of equations because more than one pressure at the required for the solution.

5.6.3 Truncation Error, Stability, and Consistency Analysis of Finite-Difference Schemes. To replace a continuous PDE with its finite-difference representation, certain aspects of the approxima­ tion have to be investigated carefully. In particular, it is important to estimate the magnitude of the error introduced when the approxi96

=_

Dj

pn+1 - pn I

I

I1t

The local truncation error at Discrete Point be defined by Eq. as

formulation is unconditionally stable. This property states that no conditions exist where the backward-difference formulation exhibits

(5.107) (5.108) 2 1 ........... (5.109) 5.107 [ 2 1 ] ( ) ........................ (5.11 0) 5.110 5.14 5.110,

Consider the diffusivity equation

psia at all times, the equation for Gridblock I

p7+I

5.3

discuss, the replacement of the spatial derivative and time de­

Truncation error is, therefore, a direct result of this approximation.

This procedure is continued until the end of the simulation. 5.8 shows the results of this example.

5.28,

5.4

rivative is achieved by use of a truncated Taylor series expansion.

-3, 345.86 = 5,9845,.69207.22 = 5,922.59 6,=005,60 55.37

p�+1 and p �+I =

.

.

mation is implemented, whether errors introduced at a certain stage in the computations grow uncontrollably to dominate the solution and, finally, whether the finite-difference approximation used is compatible with the original PDE. The next three sections present analysis procedures that can be used to address these questions.

l

=

The solution to this system of equations is psia, psia,

..

- 3, 204.59 - 1 , 682.99 - 1 , 682.99 - 1 , 682.99 - 1 , 682.99 - 1 , 607.99 - 1 , 607.99 - 1 , 682.99 -1 , 682.99

_

P?1-1 - p ? + pn,+1 (Axi I

a2 p ax2

i and Time Level n can

pn+1 - P? Dj At I

__

I

_ .1 ap n

D at

"

I

The local truncation error as described by Eq.

is not readily

quantifiable because the subtraction cannot be carried out when one group of terms is in an algebraic (discrete) form and the other group is in a continuous form. Example

illustrates the procedure used

to overcome this difficulty.

Example 5.14. Determine the local truncation error of the explicit

a2p/ax2 = (l1D)(apla t). Soluti on. To express the terms in the first bracket ofEq.

finite-difference approximation to

use

the Taylor series expansion to expand each entry in the finite-differ­ ence form at Point and Time Level

i

n.

BASIC APPLIED RESERVOIR SIMULATION


TABLE 5.1 O-IMPLICIT-SIMULATION-STUDY RESULTS OF THE PROBLEM IN FIG. 5.28 (�t=1 5 days)

Pressure (psia) Time (days) 0.0 1 5.0 30.0 45.0 60.0 75.0 90.0 1 05.0 1 20.0 1 35.0 1 50.0 1 65.0 1 80.0 1 95.0 2 1 0.0 225.0 240.0 255.0 270.0 285.0 300.0 31 5.0 330.0 345.0 360.0

-- -- -- -- -- -- -- -- -- --Block 1

6,000.00 6,000.00 6,000.00 6,000.00 6,000.00 6,000.00 6,000.00 6,000.00 6,000.00 6,000.00 6,000.00 6,000.00 6,000.00 6,000.00 6,000.00 6,000.00 6,000.00 6,000.00 6,000.00 6,000.00 6,000.00 6,000.00 6,000.00 6,000.00 6,000.00

Block 2

6,000.00 5,999.05 5,996.26 5,99 1 .31 5,984.33 5,975.71 5,965.87 5,955.20 5,944.01 5,932.55 5,920.97 5,909.39 5,897.90 5,886.54 5,875.36 5,864.37 5,853.59 5,843.03 5,832.69 5,822.58 5,81 2.69 5,803.03 5,793.58 5,784.35 5,775.34

Block 3

Block 4

6,000.00 5,997.04 5,989.44 5,977.1 4 5,960.95 5,941 .88 5,920.85 5,898.59 5,875.65 5,852.41 5,829. 1 2 5,805.97 5,783.08 5,760.52 5,738.34 5,71 6.58 5,695.26 5,674.38 5,653.95 5,633.97 5,61 4.44 5,595.36 5,576.72 5,558.50 5,540.71

6,000.00 5,991 .76 5,974.20 5,949.38 5,91 9.66 5,886.96 5,852.57 5,81 7.37 5,781 .91 5,746.55 5,71 1 .52 5,676.95 5,642.93 5,609.54 5,576.80 5,544.73 5,51 3.34 5,482.63 5,452.61 5,423.27 5,394.60 5,366.58 5,339.22 5,31 2.50 5,286.41

Block 5

Block 7

Block 6

6,000.00 5,937.90 5,863.1 0 5,788.68 5,71 7.53 5,649.82 5,585.08 5,522.80 5,462.61 5,404.22 5,347.43 5,292.11 5,238. 1 7 5,1 85.53 5, 1 34.1 6 5,084.00 5,035.03 4,987.21 4,940.53 4,894.95 4,850.45 4,807.01 4,764.60 4,723.20 4,682.79

6,000.00 5,977.35 5,939.56 5,894. 1 4 5,845.50 5,795.85 5,746.25 5,697.21 5,648.95 5,601 .59 5,555. 1 5 5,509.68 5,465. 1 7 5,421 .62 5,379.03 5,337.39 5,296.69 5,256.92 5,21 8.06 5 , 1 80. 1 0 5,1 43.03 5,1 06.82 5,071 .47 5,036.95 5,003.24

x)2 iJ2Pln + (L\x)3 iJ3Pln iJP (L\ n + + l Pi Pi+1 L\ n n xiJx i � iJx2 i "3! iJx3 i

Block 8

6,000.00 5,829.75 5,703.90 5,600.89 5,51 0.87 5,428.89 5,352.28 5,279.51 5,209.69 5,1 42.26 5,076.89 5,01 3.35 4,951 .50 4,891 .22 4,832.45 4,775. 1 2 4,71 9. 1 9 4,664.62 4,6 1 1 .36 4,559.38 4,508.65 4,459.1 4 4,41 0.82 4,363.66 4,31 7.64

+ -(L\4X1.)4 iJiJA.·4Pln . . . - 2Pin --::4 .

=

Block 9

6,000.00 5,829.06 5,701 .25 5,594.92 5,500.40 5,41 3.05 5,330.51 5,251 .50 5,1 75.30 5, 1 01 .49 5,029.81 4,960.07 4,892.1 7 4,826.01 4,761 .50 4,698.61 4,637.26 4,577.42 4,51 9.04 4,462.08 4,406.51 4,352.28 4,299.36 4,247.73 4,1 97.34

+

I

+

Block 1 0

6,000.00 5,935.04 5,853.00 5,767. 1 0 5,681 . 1 5 5,596.36 5,51 3.20 5,431 .85 5,352.38 5,274.84 5,1 99.20 5,1 25.43 5,053.51 4,983.37 4,91 4.98 4,848.28 4,783.24 4,71 9.80 4,657.91 4,597.55 4,538.66 4,481 .20 4,425. 1 5 4,370.45 4,31 7.08

6,000.00 5,969. 1 6 5,91 4.01 5,844.26 5,766.81 5,685.88 5,603.89 5,522.21 5,441 .58 5,362.41 5,284.92 5,209.20 5,1 35.27 5,063. 1 5 4,992.80 4,924.1 8 4,857.26 4,791 .99 4,728.33 4,666.24 4,605.66 4,546.57 4,488.92 4,432.67 4,377.79

iJPln. Pin + L\xa X I

................... (5. 1 11) ................... (5.112) 2 iJ2P n 3 iJ3P n l 2! iJt2 i 3! iJt3li .................. (5. 1 13) 5. 1 11 5. 1 3

Pin+1 - Pin + L\tiJiJPt lin + (L\t) _

Substituting the expansions in Eqs.

5. 1 10

+ (L\t)

through

into Eq.

_

( iJiJ2xP2lni

TIME LEVEL

_

n+1 •

n

.

yields TillE LEVEL

.

) ..... ............... (5. 1 1 4) - r-

n Dli �ut I i . .

.

.

1·1

.

.

1+1

. I

.

.

.

.

.

Fig. 5.3O-SChematlc representation of contribution of grld­ blocks and their time levels In the implicit equation for Gridblock I. FINITE-DIFFERENCE APPROXIMATION TO LINEAR-FLOW EQUATIONS

97


[

Combining Eqs.

which simplifies to

EL; =

[

l

l

(�X) 2 iJ4p (At) iJ 4p iJx4 - DT iJx4 = 0

(�X) 2 iJ4P n (�X) 4 iJ6 P n 12 iJx4; + 360 iJx6; +

. . . . . . . . . . . . . . . . . (5 .124) . . . . . . . . . (5 .115 ) Eq.

_

.

�t = (�x )2/( 6D)

. . . . . . . . . . . . . (5 .116)

It is conventional to express the principal part of the local truncation error in terms of the order of the error, 0, as

eL = O (�X) 2

[

In Example mean

that

] + O(�t) .

5 .14,

. . . . . . . . . . . . . . . . . . . . . . (5 .117)

�x

are

selected

so that the relation is satisfied, the finite-difference approximation has a local truncation error of + Naturally, the practicality of this observation depends on the magni­ tude of the diffusivity constant, If �tturns out to be very small for reasonable values of the computational work involved in­

�x,

O[(�x)4] O[(�t)2] .

D.

creases substantially and the dilemma of round-off error vs. trunca­ tion error arises again.

Stability and Stability Analysis. As the previous section dis­ cussed, the solution of the finite-difference (discrete) problem will not converge to the exact solution of the differential problem even

O[(�)2]

the notation

when

5 .124 is satisfied if At = (�x)2/(6D); that is, if, in the discretiza­

tion process, the timestep size and the grid dimension

The principal part of the local truncation error is, then,

l

. . . . . . . . . . . . . . . . .. (5 .123)

12

...J l]

(�X) 2 iJ4P n (At) iJ2P n 12 iJx4 ; 2D; iJt2 ;

5 .118 and 5 .122 by eliminating iJ2 pliJP yields

is

small

can be interpreted to enough,

the

term

if the grid dimensions are made small. The disparity in the two solu­ tions is mainly the effect of round-off error, which may differ from one computer to another depending on the number of digits they

[(�x)2112][(iJ 4 p)/ (iJx4 )] behaves essentially like a constant multi­ plied by (� x)2 . This implies that as �x decreases, the truncation er­ ror decreases (this same observation is true for �t, as well). A de­ crease in � and/or �t corresponds to a decrease in the mesh size and

carry during the computations and on the internal order of the com­ putations. The resulting round-off error may soon dominate the de­ sired solution and lead to incorrect results. A numerical scheme that cannot control the growth of this error generates an unstable solu­ tion. Example illustrates this .

the timestep size, resulting in an increased number of discrete points

There are several procedures for analyzing the stability o f a given fi­

or simply in an increased number of computational operations. Be­

5 .10

nite-difference approximation. After performing a stability analysis on

cause every arithmetical operation introduces additional error

a given finite-difference approximation, one can determine the stability

called round-off error, the increased number of operations in the

criteria of the proposed scheme (that is, whether the proposed scheme is unconditionally stable, conditionally stable, or unconditionally un­

computer will increase the round-off error proportionally. This is why one may not generally conclude that decreasing the mesh size always increases accuracy. Therefore, this tradeoff between trunca­ tion error and round-off error should be scrutinized carefully. Example

5 .15

introduces a thought process through which the

stable).

Stab ility A na yl s is by Four ier Ser ies Method. In this method, the ini­

tial error in the finite-difference approximation is represented by a fi­ nite Fourier series of the form

possibility of decreasing the truncation error of a finite-difference approximation is explored.

n

Example 5. 15. How would you decrease the magnitude of the

5 .14? Solution. Here, the goal is to seek a way to be able to set the princi­

truncation error of the approximation used in Example pal part of the local truncation error to zero, as

. . . . . . . . . . . . . . . . . . . . (5 .118) 5 .118 is achieved, the principal part of the lo­ cal truncation error will be O[(�x)4] + O[(At)2] . From the original

If the statement in Eq.

= r-I

where I and interval through which the function is de­ fined. In the Fourier series method, the notation u sed suggests that the solution can be decomposed into a product of space- and time­

I=

dependent terms. Accordingly, discrete values of a function (e.g.,

P;n,j = !::iI:ne l ( rlx+r2Y ) .

(5 .125 ) (5 .126)

differential equation we know that

::2 ( ) = i fr ( )

If we letf

. . . . . . . . . . . . . . . . . . . . . . . . . . . (5 .119)

f.

f

( )

=

iJ pliJt, then

( )

iJ2 iJ P 1 iJ iJ P iJx2 at = D at at . Or, substituting for

. . . . . . . . . . . . . . . . . . . . . . (5 .120)

iJ pliJton the left side ofEq. 5 .120 with Eq. 5 .108, . . . . . . . . . . . . . . . . . . . . . . . (5 .121)

. . . . . . . . . . . . . . . . . . . . . . . . . . . . (5 .122) 98

(5 . 127) p7: l, j -I = �n+l e1h(x+dxl+r2(Y-dY)],

,

(5 .128)

The Fourier series method states that a scheme is stable as long as

the amplification factor, "'max, is less than one, The amplification factor describes how an error grows with simulated time. The defini­ tion of the amplification factor is

"' max

which reduces to

p)

appearing in the finite-difference approximation should be ex­ pressed as products of space- and time-dependent terms. The fol­ lowing are examples .

=

t�;:/I)

max

'

(5 .129)

In other words, we want to find the conditions under which the error term at the new timestep,

�n+ 1, is

less than the error term at the old

BASIC APPLIED RESERVOIR SIMULATION


timestep, .;n. If the error at the new timestep is less, we know that it will not grow as we advance the finite-difference solution in time. The following three examples show application of the Fourier se­

ries method to analyze the stability of different finite-difference

where

fusi vity equation is

p 7 1 - 2P7 + P7- 1 +

approximations.

Example 5. 16. Investigate the stability of the backward finite-dif­

ference (implicit) approximation as applied to

(5 . 1 08) where

D = a positive constant.

Solution. The explicit finite-difference approximation to the dif­

(dX)2

Letting

=

+1 I P7 - p 7 D M

. . . . . . . . . . .

(5. 1 39)

. . . . . . . . . . .

(5. 1 40)

r = (Dd t)/(dx)2 yields

r( PHn I

n n n n+l - 2Pi + Pi - I ) - Pi - Pi ' _

Using the Fourier series notation, the above equation may be written

�gneIY l (X + 6.x ) - 2.;ne IY I" + g ne lY 1 (X - 6.xJ]

D = a positive constant.

Solution. The backward finite-difference approximation to the

given PDE is

p7:l

-

2P7 + 1 + p7!i

(5 . 14 1 )

+1 I p7 - p 7 D dt

(dX) 2

. . . . . . . .

(5 . 1 30)

Rearranging Eq. 5 . 1 30 gives

Dd t ( n + l p, + 1 (dX)2

__

Letting

_

2p n, + 1 + p n, -+Il )

=

p ,n + 1

JJ _

p n"

. . . . .

(5. 1 3 1 )

r = (Dd t)/(dx)2, noting that r i s always a positive quantity,

and using the Fourier series notation (Eqs. 5 . 1 25 through 5 . 1 28), Eq. 5 . 1 3 1 can be written

(5. 1 32) Dividing by

[

e ly 1 " and rearranging Eq.

.;n + l r( e IY I 6.< + e - IY I6.x) - 2r

-

1

5 . 1 32 gives

]

=

-

gn .

(5 . 1 33 )

(} = Y l dx, yields

- 2r -

( )

1

)

=

-

gn .

. . . . . . . . . . .

(5 . 1 34)

FI

The stability condition requires that l l - 2r( 1 - cos y ] dx)l ;;Z 1 . Now consider the following three situations. 1. Y J d X = O-+cos YJdx = 1 -+ 1 1 I ;;z 1 which is always true but pro­ vides no useful information. 2. Y l d x = nl2-+cos Y l dx = O-+ I l - 2r1 ;;z 1 . 3 . y]dx = n-cos Y l dx = - 1 - 1 l - 4r1 ;;Z 1 . If the last condition is satisfied, then the second condition is also satis­ fied. This imposes the requirement 1 1 - 4r1 ;;Z 1 for the stability, which gives either 4r � 0 or 4r ;;Z 2. More explicitly, 0 ;;Z 4r ;;Z 2, where

2 A t ::; 1 (dX) . . . . . . . . - 2 D il because dt is always positive.

1

- cos y 1 dx

)

::; - 1.

(dX) 2

-1 +1 I p 7 - p7 D 2d t

. . . . . . . . .

(5. 1 44)

Solution. Again, let r = (Dd t)/(dx)2. The Fourier series notation

leads to

(5. 1 45) Dividing both sides by .;n gives

Eq. 5 . 1 36 simplifies to

criterion is always satisfied regardless of the value of r, so the im­

2re 1yl 6.x - 4r + 2re - lyl 6.x

because !1 =

5 . 1 3 illustrates this .

Example 5. 1 7. Investigate the stability o f the forward finite-dif­

gn + 1

Tn

=

'; n '; n - I "

=

JJ

-

JJ

1

. . . . . . . . . . . (5 . 1 46a)

. . . . . . . . . . . .

.

. . . . . . .

(5. 146b)

Substituting Euler's identity yields the quadratic equation

JJ2 +

plicit finite-difference scheme is unconditionally stable. Example

r( 1

4

)

- cos y l d X JJ - 1 = O.

. . . . . . . . . . . .

(5 . 1 47)

Solving for the roots of Eq. 5 . 147 yields

ference (explicit) approximation as applied to

iJp

=

(5 . 1 36)

which is true for all values of Y l and dx. In other words, the stability

1

(5. 1 43)

Example 5. 18. Investigate the stability of the central finite-differ­

p 7 1 - 2P7 + P7- 1 +

(5. 1 38)

D at'

. . . . . . . . . . . . . . . . . . . . .

that the scheme is only conditionally stable.

max

r is always positive,

=

- cos y 1 dx) l max " (5. 1 42)

(5. 1 37)

iJ 2p ax2

r( 1

ity equation

For stability, any error will decrease with time. This implies that !1 max ;;Z 1 ; then,

Because

1

= 1 - 2 max

ence approximation (Richardson's 7 approximation) to the diffusiv­

Ign + I I

r( 1

FI

Therefore, the explicit finite-difference scheme is stable only if

. . . . . . . . . . . . . . . , (5. 1 35)

1 + 2

I.; n + l l

the requirement in Eq. 5 . 1 43 is satisfied. This leads to the conclusion

Now, rearranging in terms of the amplification factor gives !1 max =

rnax

( )

=

r = (DM)/(dx)2, leading to the stability condition

. . . .

Applying Euler' s identity, e ± If) = cos f) ± I sin () where, in this case,

- Ir sin Y l dx

Following a similar development a s i n Example 5 . 1 6 , th e amplifica­

tion factor can be determined as

(5 . 1 08)

FINITE-DIFFERENCE APPROXIMATION TO LINEAR-FLOW EQUATIONS

JJ I

= - 2

r( 1

- cos y 1 d X

) (5. 148)

99


. . . . . . (5 .15 4)

2 + j4r2 ( 1 - COSYIL\X) + I . max :a I ) .

. . . . . . . . . . . . . (5 .149)

For stability, one needs to use the larger root in absolute value (re­ member that ft

requires that

Because

1ft \ 1 > Ift

2 1, the stability condition

Let us investigate the following two cases. Case = where is a positive constant.

rL\x, r ( apat aax2p2 ) n + (2f} n e Li 1. L\ t

_

=

rL\x ap l n + r2(L\x) 2 a 2P l n (L\x) 2 at (L\x) 2 at2 i

I) 2

_

i

(5 .15 0) which can be written as

(5 .15 1)

(I

r2(L\x) 2 a 3P l n (L\X) 2 a 4P l n . . . . . . . . . . . . . (5 .15 5 ) 12 ax4 i ' 6 at3 i As mesh length, L\x, tends to zero, a n a2 n a a2 ) n e1 . = ( P - � + lim (2f} 1) .k aPt l + r2 ;l . a t ax , at 6x-0 L\x i +

. . . . . . . . . . . . . . . . . . . . (5 .15 2)

r is always a positive - cos? y l L\x) � o for all values of Y I L\X. Therefore,

This condition can never be satisfied because

the proposed scheme is unconditionally unstable.

_

i

. . . . . . . . . . . . . . . . . . . (5 . 15 6) Obviously when V2, the limit tends to infinity as tends to zero. On the other hand, when f} = V2, the value of e1 . in the limit ' when approaches zero is

L\x ap a 2p + r2 a 2p eL at ax2 at2

tions specified in Example

5 .10 satisfy the stability criteria as pre­

scribed by the Fourier series method, the solution is still unstable

5 .5 ). When boundary conditions affect stability, the ma­

trix method must be used. s In this method, equations are expressed

_

=

amples showed, the Fourier series method ignores the effect of the boundary conditions on stability. This is why, although the condi­

L\x

f} ¢

Sta bility Ana lysis by Ma trix Method. As the previous series of ex­

(see Table

_

i

which simplifies to

constant and

i

=

0.

. . . . . . . . . . . . . . . . (5 .15 7)

In this case, the finite-difference equation is not compatible with the diffusivity equation, but it is consistent with a hyperbolic PDE. There­ fore, when = the proposed scheme is inconsistent with the dif­

L\t rL\x, 2. L\t= r(L\ x)2 .

f}.

fusivity equation for any value of Case This time the truncation-error term is

in a matrix form and the eigenvalues of the resulting matrix are ex­ amined. For a stable solution method, it is necessary to show that the absolute value of the maximum eigenvalue (spectral radius) of the matrix is less than one . Because determination of the eigenvalues of a large matrix is an arduous task, the matrix method is rarely used. It is also interesting to note that in less complex cases, the amplifica­ tion factor of the Fourier series method is equal to the spectral radius of the matrix in the stability analysis by matrix method.

Consistency and Consistency Analysis. The consistency (or compatibility) of a finite-difference approximation with the differ­ ential equation is another important property that must be examined carefully. Sometimes it is possible to approximate a PDE with a fi­ nite-difference equation that passes the stability test while the solu­ tion offered by the finite-difference equation may converge to the solution of another differential equation as the mesh sizes approach zero. For a consistent scheme, it is expected that the finite-differ­ ence approximation becomes identical to the original PDE as the mesh sizes tend to zero.

Example 5. 19. Consider the following three-time-Ievel finite­ difference approximation to the diffusivity equation given by Eq.

5 . \ 08 with D 1. =

pn1

+1

_

2[f}p nI

+

(I

- (})p nI - I ] + p nI - J p ? + 1 - p ?- I 2L\t (L\ x) 2

. . . . . . . . . . . . . . . . . . . (5 . 15 3) where O :a f}:a I . Find the value o f f} that ensures the consistency of the finite-difference approximation with the diffusivity equation.

[

Solution. The application of truncation-error analysis (see Trunca­

tion Error and Truncation Error Analysis) leads to

( apat _ aax2p2 ) n. ,

1 00

+

(M) 2 6

a 3P l n ( L\x) 2 a 4P l n at3 i 12 ax4 i _

r2(L\x)4 a 3P l n (L\x) 2 a 4P l n 6 at3 i 12 ax4 i ' Again, as L\x--+ O , the truncation-error term is ap n ( ap a2p ) n en Li -at - ax2 . + (2f} - 1)2r-at 1 . +

_

=

-

i

,

If

f} ¢ 1/2, the difference

(5 .15 8)

. . . . . . . . . (5 .15 9)

scheme is inconsi stent with the original

PDE because

a� � ax2 = [1 + 2(2f} - l}r] at·

. . . . . . . . . . . . . . . . . . (5 .160)

If, however, = V2, the difference scheme is consistent with the orig­ inal PDE because the local truncation error goes to zero in the limit when mesh size tends to zero

f}

( apat

_

a 2p ) n ax2 .

=

0.

. . . . . . . . . . . . . . . . . . . . . . . . . . (5 .161)

,

Lax and Richtmeyer9 studied the relation between consistency and stability. The major result of their study is the Lax equivalence theorem, which states that, given a properly posed linear-initial-val­ ue problem and finite-difference approximation to it that satisfies the consistency condition, stability is a necessary and sufficient condition for convergence. The proof of this theorem is beyond the scope of this book.

5.7 Chapter Project

5 .2

In Sec. construction and properties of finite-difference grids as used in reservoir simulation were presented. Fig. 5.31 shows the two-dimensional nonuniform block-centered finite-dif-

(2D) ,

BASIC APPLIED RESERVOIR SIMULATION


B-2

B- 1

NE

B-3

B-4

LEGENDS

A-I RESERVOIR

_ --

FINITE-DIFFERENCE GRID

Block Boundaries Isopach Contours

l

• Well Location

Sc ale, ft

500

i

2,000

Fig. 5.31--Grldblock-centered grid layout for A-1 reservoir.

9,307 ft. Accordingly, depths to the centers of 0 ,2) and (9,5 ) can be calculated as 9,345 and 9,299 ft, re­

ference grid as overlaid on the A- I reservoir. Note that, as discussed

the depth to the base is

in Sec.

Gridblocks

rectangular coordinate system are parallel to the principal permea­ bility directions of the reservoir. 5.32 gives a three-dimensional view of the rectangular grid system. 5.33 presents the two cross sections obtained along west-east

spectively. Fig. shows absolute permeability values (along the x and y directions) and porosity values assigned to the gridblocks of the A- I reservoir. The y-direction permeabilities are assigned as of the x­ direction permeabilities, in agreement with the description in Sec. that discusses the anisotropic nature of the formation permeability.

4.6 and indicated in Fig. 4.16, the rectangular grid system is oriented in a manner that ensures that the x and y directions of the Fig.

2D

Fig.

and southwest-northeast directions. They can be compared with the cross sections presented in Fig. 5.34 shows the numbering of the gridblocks. The gridblocks bordered by four bold lines represent the blocks that are part of the A- I reservoir. All the remaining blocks are outside the A- I reser­

2.23.

Fig.

5.37

80%

2.6.2

60 active blocks used to Figs. 5.35 through 5.37 show reservoir

voir. In this way it is possible to locate the

represent the A- I reservoir.

properties assigned to the gridblocks. Note that, in Fig. and

Ay

5 .35 , A x values along each column of blocks

values along each row of blocks

are

kept uniform. This en­

sures the continuity of the major grid lines of the grid system; how­ ever, the

Ax and Ay

values are allowed to vary along the

x and y

directions, respectively (nonuniform grid spacing) . The depths to the structure top of the gridblocks as reported in Fig.

5.36 are considered as positive downward from sea level.

Also note that, by combining the information presented in the depth and thick­ ness arrays, one can easily fmd the depths to the base of the structure. For example, for Gridblock tion is

9,349 ft. Similarly,

(1,2), the depth to the base of the forma­ (9,5 ),

along the central axis of Gridblock

Fig. 5.32-Three-dImensional visualization of grid system pro­ posed for A-1 reservoir.

FINITE-DIFFERENCE APPROXIMATION TO LINEAR-FLOW EQUATIONS

101


9,250

E

9,275

� 9,300

t �

(a)

�x +

. ' I "-;,;;r;,��-:-·-��·;;" T-;.� I r( I I"(-.Ef(2,3 ) 4 )

(1,4

9,350

g

(b)

11

9,375

(2.$ (2.6)i (3,6) (3,5)

(4,5)

(5,4) (6,4)

\1,4)

(5,5) (6,5)

(7,5)

(4,6)

(6.6)

(5,6)

11,2)

(12,2)

11 ,3)

(8,4)

( 12.])

,4)

(10,4)

1 1 ,4)

(1,5)

(11,4)

,5)

(10,5) ( 10,6)

1 1,5)

(9,6)

(8,6)

\1,6)

(8,9) (9,9) \1,9) (2,9)1 (3,9) 1 (4,9) ! (5,9) (6,9) . ! __,L..-...L,_-L-_-'-_-'--'

1 1 ,6)

-.

(10,9)

._.....

(1 1,9)

(12,5) (11,6)

(11,7) (11,8) (12.9)

----1..-.1-..---J

5,3 � 5.3

2, Write the 2D, backward-diffe nce approximation in a format

I with pn + I , pn + 1' pn + , pn +� I ' and +I +1 1 pn�1 J on the left side, and qSC . . and pn on the right side).

suitable for an implicit calculation method (that is, write the equa­ tion in Part 2 of Exercise

Table 5.11 summarizes the A- I reservoir parameters as approxi­ mated by the grid system presented in this section (Figs,

5,32),

5,3 1

and

Exercises

5.1 Which grid systems (rectangular, cylindrical, spherical, corner­ point, hybrid) can be used for the following?

�x; +

)

iJP �x + l.. iJy iJx

y,

=

xj + I - x; = Y2(�x; + I + �x;) 5,2),

509.0 509.0 509.0 509.0 509.0 509.0 509.0 509.0 509.0

49 1 .0 49 .0

(p

Ay ky C 1""' IJ 1 B 1

1

491 .0 491 .0 49 1 .0 491.0 49 1 .0 49 1 .0 49 1 .0

x DIRECTION (ft)

596.0 596.0 596.0 596.0 596.0 596.0 596.0 596.0 596.0

526.0 526.0 526.0 526.0 526.0 526,0 526.0 526.0 526.0

561.0 561.0 56 1 . 0 56 1 .0 561.0 .56 1 .0 561.0 561.0 561.0

BLOCK DIMENSION IN Y DIRECTION 474.0 404.0 386.0 49 1 .0 404.0 3 16.0 3 1 6.0 421 .0 526.0

474.0 404.0 386.0 491 .0 404.0 3 1 6.0 3 16.0 421 .0 526.0

' t}

' .j

' t}

5.5 Use Fig. 5.38, where the reservoir has no-flow boundaries, � = I ,OOO ft, = 7 0 ft, �z = 50 ft, kx = 50 md, ¢ = O,27, ct = 1 ,6 X 1 0 - 6 psi - 1, #1 = 30 cp, psia, BI 1 RB/STB, and Br = I RB/STB. 1. Calculate a stable timestep size for the explicit formulation, 2, Perform the explicit calculations for several timesteps.

�y

5

Pi

5.6 Use the case in Exercise

=

4 500 ,

=

5.5.

I, Write the system o f equations for the first timestep o f the implicit

6 matrix equation.) Use

)

iJP �Y + qlsc = Vb¢ iJp a C BO iJ t' iJy

474.0

474.0

404.0 386.0 49 1 .0 404.0 3 16.0 316.0 42 1 .0 526.0 '

404.0 386.0 49 1 .0 404.0 316.0 3 1 6.0 42 1 .0 526.0

(ft)

474.0 404.0 386.0 49 1 .0 404.0 3 1 6.0 3 1 6.0 42 1 .0 526.0

9 1 2.0 9 1 2.0 9 1 2.0 9 1 2.0 9 1 2.0 912.0 9 1 2.0 9 1 2.0 9 12.0

474.0 404.0 386.0 49 1 .0 404.0 3 1 6.0 3 1 6.0 42 1 .0 526.0

807.0 807.0 807.0 807.0 807.0 807.0 807.0 807.0 807.0

474.0 404.0 386.0

491 .0 404.0 3 1 6.0 3 1 6.0 421 .0 526.0

blocks, Write the system of equations for the new grid system,

4.3. 3 3 Solve the

x

matrix equation for the new grid system.

5.7 Use Fig. 5.39 to answer the following,

CI 1

I , Write the forward-difference approximation to this equation, 2, Write the backward-difference approximation to this equation,

BLOCK DIMENSION IN

. ' t}

I ,)

5

5.3 A 2 D slightly compressible-fluid transport equation is given as

Axkx C 1""' IJ 1 B 1

.)

,

.

2, Lump the gridblocks to form three 2,000 x 7 0 x 50-ft grid­

for block-centered grids (refer to Fig, ,

.

the same timestep size as that of stable explicit timestep size.

Pattern simulation Cross-sectional simulation

5.2 Derive the identity

,

formulation, (Do not attempt to solve this 6 x

I , Single-well simulation

2, Full-field simulation

474.0 404.0 386.0 491 .0 404.0 316.0 3 1 6.0 42 1 .0 526.0

(\0,2)

( 10,3)

9,3

pn + I ) ,

9,375

439.0 439.0 439.0 439.0 439.0 439,0 439.0 439.0 439.0

(8,2)

(1,3)

I, Write the 2D, forward-difference approximation in a format suitable for an explicit calculation method (that is, solve the equa­ tion in Part I of Exercise for

9,350

�P

!

5.4 Use the results of Exercise 5 . 3 .

9,325

iJx

\1,2)

\1,3)

Fig. 5.34-Numberlng of gridblocks for A-1 reservoir.

NE

9,300

l..

1

\1

i. (l.9

Fig. 5.33-Structural cross sections of A-1 reservoir as approxi­ mated by proposed grid layout: (a) west-east cross section and (b) southwest-northeast cross section.

439.0 439.0 439.0 439.0 439.0 439.0 439.0 439.0 439.0

474.0 404.0 386.0 491.0 404.0 3 16.0 316.0 421 .0 526.0

877.0 877.0 877.0 877.0 877.0 877.0 877.0 877.0 877.0

544.0 544.0 544 .0 544.0 544.0

544 .0

544.0 544.0 544.0

474.0 474.0 404.0 404.0 386.0 386.0 491.0 491.0 404.0 404.0 3 1 6.0 3 1 6.0 316.0 3 16.0 42 1 .0 421.0 526.0 526.0

Fig. 5.35-Nonuniform gridblock dimensions along directions. 1 02

(5,3) (6,3)

. '-'-�;;,;;- 7t;:� �;;,--;

;:; j(91(9 (

10. Q!:?J l�:! 1..��+�:'lU�;�..L�:??.�(;;,; 6,7) �...;. \I;.; ·7)�...;. (·;.; ,7)-+(9..;.,7)� ( 7) (8,8) (9,') (IO,&) (1 1,1) (7,8) (1,& (2,.)! (3.&) ! (4,.) 1 (5.1) (6,1) !,-' -+-... --.I-;..;,.;."""..;...��.-.-.. '---1'-+---:(1 $

9,275

4,3,

(5,2) (6,2)

(4,3)

(2,4 (3,4) (4,4)

(1,$

9,250

g

(2,3 (3,3)

0 ,3

9,325

(4,2)

(2,2 (3,2)

0 ,2

y

1(9,2

x

772.0 772.0 772.0 772.0 772,0 772.0 772.0 772.0 772.0

474.0 404.0 386.0 491.0 404.0 3 1 6.0 3 1 6.0 421.0 526.0

and y

I . Write the PDE that governs the incompressible-fluid-flow problem described in Fig, and put it into its simplest form, 2. Give a finite-difference approximation of the PDE of Part I and put it into a characteristic form, Generate the system of equations that must be solved to detennine

5,39 1.

3.4.

the pressure distribution in the system, (Do not solve the equations,) Offer an educated guess for the expected flow rate from the well located in Gridlock

DEPTIIS TO

11!E S11(UCJlJRE TOP (tt)

9342.0 9345.0 934 1 .0 9327.0 9330.0 9336.0 9319.0 9316.0 9340.0 9326.0 9316.0 9342.0 9332.0 9323.0 ................. .....

934 7.0 9338.0 9322.0 9308.0 9305.0 93 1,5 .0

• • • • • • • • • • • • • • • • • • • • • • •••••••••••••••••••••••••••• ••••••••

...................... 9315.0 9299.0 9300.0 9313.0 9297 .0 9296.0 929&.0 9296.0 9292.0 9295 .0 9292 .0 9 289 .0 • • • • • • • • • • • • ••••••••••••• •••••••••••• 9294.0 9290.0 9286.0 ••• • • • • • • ••••••••••••••••••••••••••••••••••• 9289.0 928 1 .0 • • • • • • • • • • • ••••••••••••••••••••••••••••••••• 9290.0 9280.0 9333.0 9325 .0 9310.0 9298.0 �97.0

931 1 .0 9299.0 9295.0 9291.0 9289.0

9310.0 ........... .. 9297.0 9297.0 9305.0 9293.0 9292.0 9295.0 9288.0 ••••••••••••• 9287.0 ............ .

••••••••••••••••••••••••••••

9282.0 9278.0

••••••••••••••••••••• •••••••••••••••• •••••

BLOCK llDCKNESSES (tt) •••••

8.0 14.0 20.0 5.0

10.0 3S .0 44.0 34.0 1 2.0

12.0 30.0 36.0 35.0 12.0

S.O lS.0 30.0 40.0 40.0 10.0

••••••••••••••••• • • • • • • • • • • • •• • ••••••••

............. 4.0 S . O ••••••••• 16.0 12.0 14.0 15.0 1 1 .0 6.0 3.0 32.0 29.0 25.0 22.0 18.0 10.0 3.0 42.0 32.0 20.0 16.0 10.0 ........ . ••••••••••••••• 27.0 24.0 1 0.0 6.0 3.0 ......... • • • • • • • • •••••••••• ••••••• 4.0 10.0 6.0 ••••••••••••••••••• • • • • • • • ••••••••••••••••••••••• 8.0 7.0 3.0 ••••••••••••• •••••••••••••••••••••••• •••••• 4.0 S.O 2.0 • • • •••••••••• 6.0 22.0 34.0 44.0 19.0

Fig. 5.36--Oepths to structure top of grid blocks and individual grid block thicknesses assigned to the A-1 reservoir grid system. BASIC APPLIED RESERVOIR SIMULATION


PERMEABILITY IN x DIRECTION (md) •••••• 275.0 270.0 252 .0 ••••••••••••••••••••••••••• ••••••••••••••• •••••••• 261 .0 274.0 280.0 265.0 25 3 .0 ••••••••••••••••••• 259.0 270.0 ......... .. 265.0 280.0 289.0 278.0 271 .0 27 1 .0 270.0 269.0 270.0 279.0 283.0 275.0 258.0 27 1 .0 295.0 297.0 282.0 280.0 2 8 1 .0 276.0 290.0 293.0 279.0 270.0 253.0 259.0 275.0 285.0 290.0 280.0 289.0 277.0 290.0 280.0 ••••••••••• •••••••••• •••••••• 272.0 276.0 273.0 288.0 28 1 .0 274.0 268.0 .......... . ............. ............. ...... 26S . a 280.0 290.0 ....... ............. ... . ....... .............. .............. .... 270.0 280.0 270.0 •••••••••••••• •••• •••• •••••••••••••• •••••••••••••• ••••••• 260. 0 268.0 260.0 •••••••••••••• ••••

40 STBID 1 50 STBID

AZ

4X

PERMEABILITY IN Y DIRECTION (md) •••••• 220.0 2 1 6.0 20 1 .6 ••••••• ••••••••••••••••••••• ••••••••••••••••••••••• 2 1 3.6 2 1 9.2 224.0 2 1 2.0 202.4 •••••••••••••••••• 207.2 2 1 6.0 ......... .. . 2 1 2.0 224.0 23 1 .2 222.4 2 1 6.8 2 1 6.8 2 1 6.0 2 1 5.2 2 1 6.0 223. 2 226.4 220.0 206.4 2 1 6.8 236.0 237.6 225.6 224.0 224.8 220.8 232.0 234.4 223.2 2 1 6.0 202.4 207.2 220. 0 228.0 232.0 224.0 23 1 .2 22 1 .6 232.0 224.0 •••••••••••• •••••••••••• ••••••• 2 1 7.6 220.8 2 1 8.4 230.4 224.8 2 1 9.2 2 1 4.4 ........... . ............... ............... .. 2 1 2.0 224.0 232.0 ............... ......... . ............... ............... ......... 2 1 6.0 224. 0 2 1 6.0 ••••••••••••••• ••• .............. .............. .......... 208.0 2 1 4 .4 208.0 ...... ........... . POROSITY (fraction) •••••• 0. 1 92 0. 1 97 0. 202 ••••••••••••• ••••••••••••••••••••• •••• ••••••••••••• 0. 1 90 0. 1 95 0.200 0.204 0.207 . .................. 0.2 1 5 0.205 •••••••••••• 0. 1 90 0. 1 96 0.205 0.207 0.21 0 0.2 1 6 0.220 0.223 0.2 1 5 0.2\ 0 0.203 0.200 0. 1 85 0. 195 0.205 0.21 3 0.2 1 6 0. 221 0.225 0.226 0. 220 0.2 1 5 0.207 0.200 0. 1 83 0. 1 95 0.205 0.2 1 2 0.2 1 8 0.225 0.232 0.232 0.225 0.21 9 •••••••••••• •••••••••••• ••••••• 0.2 1 0 0.21 9 0.226 0.235 0. 230 0.220 0.2 1 6 •••••••••••• ••••••••••••••• ••••••••••••••• •• 0.22S O. 23S 0. 230 ••••••••••••••• ••••••••• •••••••••••••••• •••••••••••••••• ••••••• 0.232 0. 226 0.2 1 7 •••••••••••••••• •• ••••••••••••••• ••••••••••••••• ••••••••• . 0 229 0.220 0. 2 1 7 ••••••••••••••• •••

100 STBID

Fig. 5.38-Dlscretlzed reservoir In Exercise 5.5. won

! = 0 . 1 5 11f!

! =o --------�. X Well plr.meter. r. = O .14 tt

Flg. 5.37-A-1 reservoir-gridblock permeabllitles and porosities.

P."

1,l4O psis

Fluid

Typeel Block ProperUH end Dlmenalonl

properUal

� = 1 .4 < p ' p _ S 6 lbm/h B = I RB/STB

5.8 Determine the truncation eITor involved in the following

a 2p/ax2 = ( l1D)(ap/at) . P7 + 1 - p7 - 1 2 DA t

Fig. 5.39-Reservolr description in Exercise 5.7.

approximation of the differential equation

p 7+ I - (P7 + I + p7 I ) + P7 ( A X) 2 -

_

I

This three-time-Ievel approximation i s known as the DuFort-Fran­ kel l O approximation.

for B[ and recalculate the transmissibility terms, before entering the new tImestep calculatIons.

.

.

applied to the diffusivity equation in Exercise 5 . 8 using the Fourier

5.10 Use the Fourier stability-analysis procedure to investigate the stability of the following finite-difference scheme for the POE

a 2p/ax2 = ap/at .

nth coefficient of Fourier series determined from

Ax =

cross-sectional area normal to the x direction, L2 , ft2 [m2 ]

Ay = B[ =

initial and boundary conditions

cross-sectional area normal to the Gridblock i, L2 , ft2 [m2]

a2p/ax2 = ap/at is approximated by the equation + p 7- 1 - + p 7+ 1 _ P? = 3 P7 ; � P? 2 A (

) ( �:?-}

Investigate the stability o f the proposed scheme.

�;

5.12 Rework Example 5 . 8 for three timesteps using

At = 30 days C[� - !

+

pO ] /[ l and varying B[ according to the relationship B[ = where pO = 6,000 psia. Compare your results WIth those gIven In Table

5.3. Hint: After each timestep, use the expression given here

TABLE 5.1 1 -SUMMARY OF A-1 R ESERVOIR PARAMETERS CALCULATED FROM BLOCK PROPERTIES

Average" porosity,

%

Average permeability, md Total bulk volume, 1 06 ft3

Total pore volume, 1 06 res bbl

21 .4 279.6 263.5 1 0. 1

'Volumetric average.

FINITE-DIFFERENCE APPROXIMATION TO LINEAR-FLOW EQUATIONS

x direction for

cross-sectional area normal to the y direction, L2 , ft2 [m2 ] formation volume factor (FVF) of Phase t,

0/0,

reservoir volume/volume at standard

conditions

(

lx. u' '-n

An =

series analysis method.

��

,+Yz and T

Nomenclature

5.9 Investigate the stability of the DuFort-Frankel approximation as

5.11 The equation

T lx.

I, Lt2/m, psi - 1

CJ =

compressibility for Phase [!cPa - I ]

c=

constant diffusion coefficient, L2/t, ft2/O [m2/d] diffusion coefficient for Gridpoint i, L2/t, ft2/O [m2/d]

D=

D; = ea' /8 = G;J,k = fd = ijd = h=

exponential function of Q / /g constant part of the transmissibility differential form of a POE finite-difference form of a POE

1 = F1 k = permeability, L2 , darcy [u m2 ] kH = horizontal permeability, L2 , darcy [u m2 ] kx = permeability in the direction of the x axis, L2 ,

fry =

kz =

Lx =

thickness, L, ft [m]

darcy [u m2 ] 2 permeability in the direction of the y axis, L , 2 darcy [u m ]

permeability in the direction of the darcy [u m2 ]

z

axis, L2 ,

total length of the reservoir along the x direction, L, ft [m]

n, = number of gridblocks in the r direction

1 03


nx = o= P= pn= pO = pj = Pj,j, k = Pwj = P I through P5

=

number of gridblocks in the order of error

x

Jl max = maximum amplification factor in Fourier series

direction

5 .129),

pressure, mlLt2, psia [kPa]

pressure at old time level n, mlLt2, psia [kPa] reference pressure, mlLt2, psi a [kPa]

initial pressure, mlLt2, psia [kPa] pressure of Gridblock (ij,k), mlLt2, psia [kPa] flowing well bottomhole pressure, mlLt2, psi a [kPa]

pressure of Gridblocks I through

5 , mlLt2, psi a

[kPa]

I:l.p = pressure difference, mlLt2, psi [kPa]

q=

qlsc =

qlsc; = qsc = r=

production rate or flow rate, O lt, BID [m3/d]

production rate of Phase I at standard conditions, L3/t

production rate of Phase for Gridblock i, Olt

I at standard conditions

= req =

distance in radial direction in both cylindrical

equivalent radius of a well block, L, ft [m] coordinates, L, ft [m]

direction, L, ft [m] rw = well radius, L, ft [m] t = time, t, days t n = old time level, t, days

(I:l.t = tn+ l - t"), t, days bulk volume, 0, ft3 [m3 ]

Simulation," paper SPE 1 8305 presented at the 1 988 SPE Annual Tech­ nical Conference and Exhibition, Houston, 2-5 October. 6. Peaceman, D.W. : "Interpretation of Wellblock Pressures in Numerical Reservoir Simulation," SPEJ (June 1 983) 53 1 . 7 . Richardson, L.P.: "The Approximate Arithmetical Solution by Finite

Gridblock i bulk volume, L3, ft3 [m3 ] direction in the Cartesian

coordinate system, L, ft [m]

Xj = x coordinate of Gridpoint i, L, ft [m]

t':l.x =

t':l.xj =

Y=

difference along the L, ft [m]

x

x

direction

( t':l.x = Xj + I

-

Xj),

direction block dimension for Gridblock i, L, ft [m]

distance in the y direction in the Cartesian coordinate system, L,

ft

[m]

I:l.y = difference along the y direction ( I:l.y = Yj + 1 - Yj),

I:l.z =

4,j, k =

L, ft [m]

difference along the L, ft [m]

direction

(I:l.z = <k + I

-

volume conversion factor whose numerical

a lg = Pc =

transmissibility conversion factor whose

=

value is given in Table

4.1

logarithmic spacing constant, dimensionless

4.1

numerical value is given in Table mlL2t2, psilft [kPa/m]

I,

amplification factor in Fourier series method (Sec.

= JlI = Jl

with an Application to the Stresses in a Masonry Dam," Trans. , Royal

Soc. London Series A ( 1 91 0) 210, 307 . 8. Smith, G.D . : Numerical Solution ofPartial Differential Equations: Fi­ nite Difference Methods, Oxford Applied Mathematics and Computing Science Series, Oxford U. Press, Oxford ( 1 978). 9. Lax, P.O. and Richtmeyer, R.D . : "Survey of the Stability of Linear Fi­ nite Difference

Equations," Communications on Pure Applied Mathe­

matics ( 1 956) 9, 267 . 1 0. DuFort, E.C. and Frankel, S.P. : "Stability Conditions in the Numerical

Treatment of Parabolic Differential Equations," Math Tables, Natl. Re­ search Council, Washington, DC ( 1 953) 7, 1 3 5 .

81 Metric Conversion Factors

datum, L, ft [m]

ac =

Jl

<k),

Differences of Physical Problems Involving Differential Equations

elevation of Gridblock (i,j, k) with respect to

')'/ = gravity of Phase

1 04

z

of Hydrocarbon Reservoirs," SIAM Rev. (July 1 982), 24, No. 3, 263.

2. Aziz, K. and Settari, A.: Petroleum Reservoir Simulation, Applied Sci­

5. Saleri, N.G. and Toronyi, D.M.: "Engineering Control in Reservoir

timestep

x

1. Odeh, A.S.: "An Overview of Mathematical Modeling of the Behavior

ence Publishers Ltd., London ( 1 979). 3. Abou-Kassem, J.H., Ertekin, T. , and Lutchmansingh, P.M . : ''Three-Di­ mensional Modeling of One-Eighth of Confined Five- and Nine-Spot Patterns," J. Pet. Sci. Eng. ( 1 99 1 ) 5, 1 37 . 4. Pedrosa, O . A . and Aziz, K.: "Use o f Hybrid Grid in Reservoir Simula­ tion," SPERE (November 1 986) 6 1 1 ; Trans. , AIME, 282.

r", = distance to the outermost gridblock in the r

distance in the

0 = oil phase w = water phase References

radius of external boundary, L, ft [m]

rj = radius of Mesh Point (or Gridblock) i in radial

I:l.t = Vb = Vb = ; x=

Superscripts n = old time level n + 1 = current (or new) time level o = reference Subscripts

production rate at standard conditions, L3/t, STBID [m3/d] and spherical coordinate systems, L, ft [m]

re

method (Eq. dimensionless Eli = local truncation error for Gridblock i Tlx = transmissibility of Phase 1 in the x direction Tly = transmissibility of Phase 1 in the y direction Ttz = transmissibility of Phase 1 in the z direction ¢ = porosity, fraction <I> = potential, mlLt2, psia [kPa] Q = constant used in the extrapolation of block-centered pressures to boundary pressure, dimensionless

5 .6.3), dimensionless

viscosity, mILt, cp [Pa ' s] viscosity of Phase

I, mILt, cp [Pa ' s]

bbl cp ft ft2 ft3 Ibm md psi I psi-

x 1.5 89 873 x 1.0* x 3.048* x 9.290 304* x 2.831 685 x 4.5 35 924 x 9.869 233 x 6.894 75 7 x 1.45 0 377

E - Ol = m3 E - 03 = Pa . s E - Ol = m E - 02 = m2 E - 02 = m3 E - 01 kg E - 04 = Jl m2 E + 00 = kPa E - 01 = kPa- i =

'Conversion factor is exact.

BASIC APPLIED RESERVOIR SIMULATION


Chapter 6

We l l Re p rese ntat i o n 6. 1

Introduction

The ultimate goal of reservoir-simulation study is to forecast well flow rates and/or flowing bottomhole pressures accurately and to esti­ mate pressure and saturation distributions. Well treatment in reservoir simulators presents difficulties that require special consideration. In general, these difficulties can be divided into three categories. 1 . The block hosting the well completion i s usually large compared with the size of the well, so that the pressure of the block as computed by the reservoir simulator is a poor estimate of the flowing well pressure. 2. Coupling of the complex interaction between the reservoir and the wellbore is often problematic, particularly in the case of multi­ layered wells. 3. Allocating phase production rates in multiphase flow when single-phase or total production rate from the well is specified. Other problems arise when several wells are in a single gridblock and a well is not located at the center of the block. Treatment of an indi­ vidual well becomes even more complicated when considering instan­ taneous well-inflow performance, completion details, wellbore and surface-system hydraulics, and well stimulation. This chapter investi­ gates the treatment of source and sink terms, develops a fundamental equation for the production rate, and reviews some of the well models as they apply to single- and multilayer reservoirs. Fig. 6.1 shows the well-representation step in the development of a reservoir simulator. 6.2

Treatment of Source/Sink Terms

Wells are considered to be internal boundaries of the reservoir sys­ tem (see Fig. 4. 1 1 ). As such, a boundary condition must be specified at the well to develop a properly posed problem. This internal boundary condition can be in the form of flowing sandface pressure specification (Dirichlet-type boundary condition) or in the form of flow-rate specification (Neumann-type boundary condition). The next section shows that by specifying the bottomhole flow rate (flow rate at reservoir conditions), the pressure gradient at the sandface is specified and the Neumann-type boundary condition is imposed. Except for single-well simulations in radial coordinates, the well specifications cannot be implemented as boundary conditions but require the use of an additional source/sink term.

6.2.1 Review of Inflow-Performance Relationships (IPR's). As­ suming steady-state flow in the immediate vicinity of the wellbore, the radial form of Darcy's law is written as WELL REPRESENTATION

q

_

-

- 2:rc/3 c khrw #-

OP

or

I

r = rw

. . . . . . . . . . . . . . . . . . . . . (6. 1 a)

.

This book follows the sign convention of q < 0 for a production well; q 0 for no well in a gridblock, a shut-in well, or an abandoned well; and q > 0 for an inj ection well. In Eq. 6. 1 a, entries, such as rw, h, k, and #- , are problem-specific constants. Therefore, if the flow rate, q, is fixed at a specified value, qsP ' the pressure gradient at the wellbore is fixed. Rearranging Eq. 6 . l a gives =

- 2:rc/3c khrw qsP '

. . . . . . . . . . . . . . . . . . . (6. 1 b)

showing that a production-rate specification for a well implies fix­ ing the pressure gradient at the wellbore radius, rw. The gridblock containing a production or injection well is not dif­ ferent from other gridblocks in the model. To establish well perfor­ mance, however, it is necessary to know the average pressure in the gridblock, Pi,j,b the flowing sandface pressure, Pwj, and the produc­ tion rate, qsp . Because the wellblock has an additional unknown, flowing sandface pressure (if the production rate is specified) or the production rate (if flowing sandface pressure is specified), it is neces­ sary to develop an expression relating the gridblock unknowns to the additional unknown introduced by the wellbore. In other words, an equation must couple the specified wellbore condition to the grid­ block hosting the well. The basic assumption involves considering steady- or pseudosteady-state flow in the near-well region. For steady-state conditions, consider the radial flow of an incompressible fluid toward a vertical wellbore of radius rw in a horizontal formation with uniform thickness and permeability: . . . . . . . . . . . . . . . . . . . . . . . . (6.2) Separating variables and integrating between the wellbore radius,

rw, and an arbitrary radius, r (rw � r � re), results in

. . . . . . . . . . . . . . . . . . . (6.3)

which, on integration, gives the steady-state-pressure distribution (6.4) 1 05


WELL REPRESENTATION

NONLINEAR ALGEBRAIC EQUATIONS

NONLINEAR POE'S

PRESSURE, SATURATION DISTRI B UTIONS, AND WELL RATES

LINEAR ALGEBRAIC EQUATIONS

NUM ERICAL RESERVOIR­ SIMULATION PROCESS

Fig. 6.1 -Well-representation step in the development of a reservoir simulator (redrawn from Ref. 1 ).

At the external radius, re, where the pres ure is Pe, Eq.6.4 becomes if the skin factoShowr, (twhahitcEq.h r6e.pr10escanentbes neartran-swfoelrlmboredeindatomEq.age6.1or1 .................... (6.5a) rsatitmedulianttioon,thepefrofromraultiaotn,ion.and partial-penetration effects) is incorpo­ Ioge e ( which can be expres ed at standard conditions as Ipnclcauussieodn byof welimlpldamage ies thatorthearerewiducl ebed praensinucreredrasoedp pr e s u r e dr o skinivvale value iunediicnaditecsadatesmiamgeprionvedthe ................ (6.5b) cnecaousandir-ewdtieobylnsbsoratirmeoundulreagititoohnne.welwhiA posllbeoritaiev.negateBecaus Eq.nal-b6.oundar 5 proviydpresetsheuwelres.lThiprosducis tthioenfiinnatlefrmorsmofofwethlebIorPRe afonrdaenxtun­er­ tity, start with the definition of dimensieonliessa diprmesensurieodrnleosp, quan­ damargeesderwelvoirleprngioducne reidng,underhowesvteeard, ty-hestprateodcuconditiotnioranste.of a wel at ( . . . . . . . . . . . . . . . . .. ( 6 . 1 2 ) asdetnadvnedawelordpmel bcoreonndit proftievaosnsnurePooliss.usSuclueanlhyanexeprequastaieocdnycliinanndrtebericmaobtsl reofasieanrvevedoirfaorglseyorswietesmnerg,vttoihheer tBecducivetafiousonre.profSubsoducthetittsiuoigtn,inngcoEq.nveD asn6.texpri1o2niwenetsoehaveEq.d by6adaptEq..10b6.egi1d,2viewhessposthreeitdiivmeifenssonega­rprion­o­ volumetrical y averaged reservoir pres ure betwe n and re is les pres ure without skin (ideal pres ure drop) as (6.6) Now, the dimensionles total pres ure drop minus the dimensio(6nl.1e3s) pr e s u r e c a us e d by damage or s t i m ul a t i o n equal s t h e i d eal di m en­ s i o nl e s pr e s u r e dr o p: -( 2 I . .................. (6.14) 6Subs.4) itnittuotiEq.ng f6o.r6thyieesltdesady-state-pres ure distribution (given by Eq. which can be rewrit en as ( 6 . 1 5 ) ;: 10ge(:J ] ... (6.7) Substituting for from Eq. 6.1 2 into Eq. 6.1 5 gives ( . ..... ( 6 . 1 6 ) l o g e ( ) which, upon integration, gives [? IOge(;:) Y2( ] Finally, rear anging Eq. 6.1 6 gives � ( .................... ( 6 . 8 ) Y2 j ................. (6.11 ) For Eq.6.8 simplifies to ............. (6.9) cyltioForn-inrdraunstiecalstpeecrady-eisfiercsvatoiatitore,n, trmayhaedianalalbe, syiexprntiglcaele-spshasoelduteasiofl3n,o4fworincoansfitnaintte-,pclrooducsed,­ .............. (6.lOa) 1oge ( ) (6.17) which can be expres ed at standard conditions as 1 g whe r e (��) Y2[loge (tD) 0.8091 ............ (6.1 8a) 0 e .l 6 ( b) O ........... ( ) og e i f Eq. 6 . 1 0 di ff e r s fr o m Eq. 6 . 5 i n t h a t , i n Eq. 6 . 1 0 , t h e f a c t o r Y2 a p ­ pemodiarsfiinedthfeordeskniomin sinmapltoyr abyndobspiesrusvinegd tinhsattetahdeofskpine.fEq.acto6r., 10icsaandibe­ and loge (��) loge(0.472 ;:) ................. (6.18b) mensionles pres ure drop.This observation yields (see Example 6.1) if ( ................. (6.11) ........................... (6.19) - 2nf3 c kHh) e q= ( / P - Pv.f) r rw p

Example 6. 1.

'

s,

s

Solution .

s

- 2nf3c kHh p - Pwt) B;pqsc

A PD =

In

qsc

Ap

et al. 2 In

rw

Te

- re2

P=

_

rw2 ) p rdr TW

APD - 2nf3 c kHh p - Pwt)

rdr,

( r� � r�) {[pwt - 2n kHh TW

B;pqsc

P=

P v.f - 2nf3 c kH r� r�) _

-

r� - r� ) .

qsc =

re ;!> rw,

P

pB[loge(re/rw)

- Pwt

- 2nf3 c kHh ( / ) vl P - Pwt · re rw 72

+

s.

"

w

tD � l;4(re1rw)2,

s,

s

Y2

1

rD

_

=

_

+

_

r '

PiqD

[ PB I

_

- 2nf3 c kHh p - PwA

---

qsc =

re rw

-

+

=

tD>I;4(relrw )2;

- 2nf3 c kHh p - Pwt) qsc = p B[Ioge(re/rw) + s - Y2r

1 06

BASIC APPLIED RESERVOIR SIMULATION


qsc

qD

fducor ctioomprn); aensdible fluids, where is positive for negative (pro­ Eqs(trans. ient)thIrPoRughfor an undamaged represent thewelfinla. l form ofthe unsteady-state lcaorndiExami ge ttioimnsnesatprioenvaiofl. EqsFor. typicaandl reservoirreprvealopesrttpshieatesudos,, psatesudostueffiady-ctieesady­nttaltye prdrstaaotiducenacgotendiiornatdiioisunssstbecexiartseotdmeson. Undethceoornsr dtapsernteofudosbeca faetusewady-ehourstsatteo acofendiw tdaysions,afttheer loge ;:) () pe n e t r a t e a gr i d bl o c k . Fur t h e r m or e , i t i s de s i r a b l e ha v e at l e a s t one t o t w o e m pt y bl o c k s be t w e n wel l s t o mode l pr e s u r e i n t e r f e r e n c e Substituting Eqs. and into Eq. yields fthecattshaedleoqcuaattieolny.ofBlaowelck-lcienntaegirevdengrblidoscykstiesmapsprshooulximdabetelydeastighnee cdeesn­fo­ ttsehhreoulofmadjtchooerigrnblcioiddcelkinwi. esInthsmeothtehsmesehy-cienhntetpoierrseendctt;(atphtoiewelrneft-lodlroiesc,triatitbiisoutnecnsed. )esgrairdys,toashplwelowsacel l Again, incorporating the skin factor into Eq. gives preSomefer edtimloecsatplioanscinofg awell tlhseinwelbody-a n d me s h c e n t e r e d gr i d s . l s a t t h e c e n t e r of gr i d bl o c k s r e s u l t s itnioanagrl yidfesyasstibemle orwicthosat-leaffrgeectnumbe r of bl o c k s t h a t ar e not c o mput a ­ i v e t o s o l v e . Unde r t h e s e c o ndi t i o ns , t h e tshtaetefi,ntalhefroersmerofvoitrheprpseseudosure decteady-linesstaatteaIPcoR.nsDurtantinrgatepsaetudosall poiteadynts egrloncigidatnneieonstwr peorinrktfh,oeervmgreinnidgifbltihoteciskstnesu. dyThicesssha,oulrhowey dto plveatrco,eidessoonlsmeignyweltonehe lmosscoinnstoffoptide-crimaentumitoenr isnuraeficnaintebe, clobtoseadinreedsefrrvooimr.matIn tehriisalcas-bale,atncheeaverconsaigederraetsieornsvoi: r pres­ iitnitsheimoveposrasilbgrle itdodesdesigignnfoargra ipad rstyicstuelmar sthimatuleantsiuornesstuthdey.eSomexistentcime ofes onlproybloneem weis tloirneaprseinsglenet grmulidbltipolcekwe. Thel s mosin atgrpriadcblticoaclksowilutthioan tsointglhies l u mpe d s o ur c e / s i n k t e r m . Combi n i n g a l t h e wel l s i n t o a s i n gl e hypo­ t h e t i c a l wel l by us e of t h e pr i n c i p l e of s u pe r p os i t i o n gi v es t h i s l u or, after separating variables and integrating, tceormbim. Obvined welousllsyha, thvee asicmuilraarcpry oofducthitsiornepchreasreancttaetriiostnicisncarnedahisesstmpeoifritehsde. Mossepartactoemmely butrciinatlesrnimaull yatlourmps altohwe ovedataraflorweindil vciodntualribwelutilosnsto.be read Iinn raemorserveoicroengimpacneert foirnmg, asit is customary to write Eqs. and producsitniglone-ilnaytwerowedilmmodeensionsls de(Thithscartsibisse,edacitnsiointnhglisdiebooksrceusesr(evtshoiersvailnaglnyePooler-)p.haThelesne 5 anddAbou-by fourKasneseigmhborandinAzg iblz6omodecks (alss)in consider Pe a c e m a n , a we l b l o c k s u r o unde where the productivity index, Jw, is onenoteworof. Thitthhyes. earmodevanliPoolelstgeatlneeenmraptl ys tiosusdevelnotedusthoeepdsattoeraedadseyy-vanr,vsbutoitaPooltre-is-tfimilsolulewhinasequatttioornicwelaimadeol n,yl model thoshistiimodesngcatlhcle,utlwelhaetedl. ftIernormmotihnerEq.words, rtehperequiesenvtsaltheentraweldiulsblofEq.octkherabldioucisnk, . where Alwitlhoughbe usethdemoreproduclotosiveitlyyinindethxi,sJcwh,aipstestrir wictltyhdethfienmeedabyninEq.g obtaineidt frfroomm Eq.a wel modewhel.rOwe Owdepewendsl ongeowemeltriborc efagectoorme, whitrychanids deloctearlmreisneerd­ voistatreprcoondiperttiioenss. Theandfactfoorr psineuEq.dosteady-hasstatthee-flvaowluecsoofnditiofonsr.steady­ anIdFurn Eqstrheep.rmreoresen,atresntdmheemaverberathgeraetprprIweessreeuntprreessitehnnetasecthxirteecrnupermeab laalr drareaaiinldefiiatygevanredlaudiebyus E8'.1 thteme s, wel dis rectliocon.ateConsd itdheercinegnttheres offact that, mosgrtidreblsocervkos,irthgreivad sluyess­ ofties oftheand Iw thegriflodw-blocratkeseqfourastiimonsulamustiontpurpbe reolsaetes.dThito sthies proac opem­r­ plished by a wel model. simulation, it is a good practice to al ow no morIn numee tharniconeal rewelservloitor tD

kHt . acfJ c� crw

=

'f'1l

6. 17

. . . . . . . . . . . . . . . . . . . . . . . . . . . (6.20)

=

p

• • •

6.20

[ t t ss

>

@)

@

6. 1 8 6.20 (¢ll cr; ) /(4acfJ c kHl],

• •

@

• •

@

\ :1

...

(a)

(b)

Fig. 6.2-Well placement In (a) body-centered grid and (b) mesh­ centered grid.

10ge ��

qsc

qsc

=

=

=

loge ( 0.472 ;:)

(

=

- %.

6. 19 6.21 6. 17 - 2nfJ c kHh (P - Pwf) . [ Il B oge ( re/ rwl - 3/14 ] - 2nfJ c kHh (p - Pwf) Il B[loge ( re/rwl + s - %]'

(6.21)

to

(6.22)

Fig. 6.2

6.22

. . . . . . . . . . . . . . . . (6.23)

try

(6.24)

P

_

Pi

=

+

ac Bqsc t n r;h¢ c·

(6.25)

6. 1 1

6.23

(6.26)

Single-Layer WeU Models.

three

all

et a t}

The van Pool/en et a t. 2 Model.

. . . . . . . . . . . . . . . . . (6.27a)

(6.27b)

Ow

=

2nfJ c kHh loge ( re / rwl + s

6.27,

re .

p

%

6. 1 1

are

. . . . . . . . . . . . . . . . (6.28)

req, nr;q

=

AxAy,

F

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . (6.29)

6.26,

1.1+1

1/z

6.28

6.23, re

in

in

rectangular

in

rectangular

6.2.2 Well Models for Reservoir Simulation.

WELL REPRESENTATION

Fig. 6.3).

6. 1 1 ;

6. 1 1

re

=

radial

re, p,

.

F

et a l.

et a l.

in

1 + 1 .1

1·1 .1

1 .1-1

Fig. 6.3-Wellblock with four neighboring blocks i n the lateral plane.

1 07


kH

Agairinc, meforananipenneabi sotropiclprityodespertcireisb,ed byis Eq.appr6.o3xi3.mated by the geo­ which yields met g examplopmentes, byofustheeofequithevlaloegintc bldevelockorpedadiubys, Peacfoer­ ./,�l . . . . . . . . . . . . . . . . . . . . . . . . . . . .. (6.30) man,Theshfowol otwihendevel Eq. 6.30 f0.o5r642fla squaxr.e block reduces to (6.3 1) celsqualsriengrisiodtrcelopilscirneisseortvroiopirsc(rEeq.ser6.v3oi5)rs, (andEq. r6.ec3t6b)angul, reacrtagrngulid celarlgrs iind ForbloctkheprpteseunnreofEq.is the s6.am1 1e, vanas thPoole grliednblock prasessumedure. Eq.that6.th1e1welthenl­ anisotropic reservoirs (Eq. 6.34). becomes 2 Us i n g t h e f i n i t e d i f e r e n c e appr o xi m at i o n of t h e t w od i m ens i o nal ( 2 D) , s i n gl e p has e f l o w equat i o n as i m pl e ment e d . . . . . . . . . . . . . . .. (6.32) adurt ane yiineteldriionrgwelEq.lb6.lo3c6bk, fdevelor a homogeneous op an approxim, iasotetrcoapilccufllaotiwondomaiprocenl o g ( w e iweln whilblcohckvans. ForPoolalnenisotropicaswelsumelbldoicskotprroopipec rpenneabi ligetieosmeinttrhiec that is discreThetized2Dbyparsquartiale-dgriffiedrse. ntial equation (PDE) describing t i e s , t h e mean penneability s.h.oul. . d. .be. . us. .e.d. f.o.r. . . .Tha. . . t. i.s., . . . . . .. (6.33) single-phase incompres ible flow in a homogeneous and isotropic reservoir can be writ en with Eq. 4.58 as phasdius,e, fi(vae-t whispotPeacchpattehtman,eernstesady-husowedinstgatnumer tehpratesthiucearequiel isnotlvuhaletieorntenssewelrfvooirlbraliossciequalnkglrea­­ The finite-difference approximat. i.o.n. t.o. .Eq.. . .6.. 3. 9. .as. .im. .pl..ement(6.3e9)d to the wellblock pres ure, J.k), is given by a t Wel l b l o c k i s ( s e e Fi g . 6. 3 ) n [ ] {[ 0.28 ( ) 0 . . . . . . . . . . . . . . . .. (6. 0) . . . . . . . . . . . . . . . . . . .. ( 6 . 3 4) Forthe sptecheiaequil casvealofentisoweltropilbcorpene rnadieabius lbecity oinmesthe horizontal plane, Notgridewhethatr,ein ar iving at Eq. 6.Now,40, weregusroeupd thEq.e pr6.o4per0 asties of a square (6.35) ( ) [ ]. The exawhect vareluye of0.th5772e cons57tainstEulin Eq.er's6.co3ns5 itasn0.t1For403,thwhie spechciisalecqauasel of . (6.4 1 ) gridblocks ( ............... ), the equivalent we. ............. l block radius be(c6o.me36as) Ifthe wellblock and sur oundiqsncg. bl. ock. s............... a r e as s u med t o be l o c a t e d away f r o m t h e phys i c a l boundar i e s of t h e r e s e r v oi r and ot h er wel l s which, in0or2dinar. y res.e.r.voi. .r.-e. n. gi. .ne. . r.in. g. .pr. a. c. t.ic.e.,.is. a. p. pr. .o..xim(a6te.3d6b)by r(ionusaddimeditiounm)to,thiteiass rseuasmptonablionse tofo asa homogeneous and i s o t r o pi c pos u me t h at 6. 2) diNoteuPeacs, theeman'di(Effq.ere6.s3nwel6ceb)lamodenPedavacelnmiPoolsabasn'sleedendfionnittiho'senprofdeeeqfiminuistiiveoantlheofanttprwee(lsEbuq.locre6.kc3a1l)­. Combining Eqs. and 6.42 gives cequiulatvealdefntorraadwelius,lblocThek is defithe nsiatmeion asof thecflanowibenusg eprdetos ruerleataetthane ( welsurelb, ore priensthuereI,PR, to flow rate, through the gridblock pres­ P ) . . . . . . . . .. (6.43) can be ewr,Gitriedn­ 2 . ................ (6.37) wiTheth thseteprady-es sutraetse-offlowtherastuerexproundiesnigonbl(oEcq.ks6.[f3o2)r exampl or, more explicitly, fbloorck an1d,m an1d, Welas lblock and the distance between them 2 log e ( { 10g.[0.28{[(ky/kl [- 2 ................ (6.44) } ] Substituting Eq. into Eq. yields l o g ( 6 . 4 5) e 2 -loge(rw) } ). ....................... (6.38) (6.46) req =

�flY .

req ,

(flx = fly )

req =

eta t.

Example 6.2.

qsc =

- PC kH h (Pi.j k - P Wf) ,uB[ req/ r ) + s - Yzr n

eta l.2

Solution.

kH.

Pea cema ns' 5 Model for Nons quar e Wellb locks With A nis otropic Permeab ility. req

Pi

� (kv!kx) (flx) 2

req =

( ky/ kx)

(kx = Icy),

req = 0.14 (flx) 2 =

e - Y/4, square

+

(fly )2

( kx/kl(fly )2

+

y.

4

+

( kx/ ky)

(i,})

Pi.j- I

y.

+

4

+

Pi - I .j - 4Pi.j

Pc k H h

P i +l .j

,u qsc

+

Pi.j +1

+

= .

4

. . I.)

(flx)i. j = (flY);.j.

PC -kHh -

,u

to

1 flx = fly

+

iJ

(p . '-1 I.)

+

P I' +I .J

+

P'I - I .J. - 4pI,. }.

p I,. }' +1 )

= -

I, }

req = 0.198flx , req = . 11x req,

in

req . Pwj,

eta L 2

Pi.j, k o - nP C kH h (PiJ k - Pwt) , ,uB [ loge( req/ rw ) + s ]

qsc =

x

n

(flx)2 ]

PC kHh (PiJ,k +

req

ra­

Pi .j- I

=

Pi - I .j

=

Pi +l .j

=

(

P i.j +l ·

6.41

c

k h

(i + s =O

- P Wf) ]/ ,uB

.

I.)

( 4Pi +I .j - 4Pi,j) =

- q s i./ c

PCkH h (p i +I J - PiJ) ,u [ (flx / req) j 6.44

flx

4

(i,})

B= n

[ (kx!kl (fly )2 l / [ (ky/kl4 + (kx/kll

+s

1 08

qsc,

req

6.43

n

req = -

BASIC APPLIED RESERVOIR SIMULATION


whirch is

Definincgan be writ en as where is known as the aspect ratio, Eq. eq i IOge (�eq ) i,j IOge (�eq ) . ). we can rewrite Eq. in the form as a basis toThidevUsselexampl oepthaeprsooelcuusetdioeurns eprthtooeccseahdmeeurckePDEsthtreucvatualrsiedidintyinExampl ofExamplee Because However , t h e fi n i t e d i ff e r e n c e appr o xi m at i o n i s di ff e r e n t bec a us e og e (�e:) . a�}oge [ i,j (�e:) . . J here, In other words, which can be reduced to ( ) .( '+ 1 P _I ) loge (a;,j) or l o g e ( ) (::qsc ) . r e q . i,j i,j is thewifitnhitble-odcikf ediremnensce apprionsoximation as implanedmented at Wellblock Finally, Eq. can be solved for req. . Almetriscoaxes, notearthoaundt, thWelis timlbel,otchke fol owing equalities hold [with sym­ examinesthevalidity ofEq. by applying some numeri­ gecaaglnreeenrmatrteeiednstfabernodmtwcEq.eompan t6.wr3ion5.gfoAstrhmetulrheeastuliaoltsnsitncgiosluremnavasolofnauebtshlwiye good,ttahbtlheeseshowspecva,ilautlheyes PH l, j Pi-I,j for aspect ratios of up tore3.ducAlessot,onote that,infoExar grmidplceel s where and Pi,j+ I Pi,j-I ' bloNow,ck wrandite twthoesseutrrs ofoundisteady-ng blstoactke-sflasow equations betwe n Wel ­ twio tobth aniainsothtreoequipicUspervalemtehnteabie obswellietlybrvl(oatEcq.ikorns6.adi3ma4)usd. feoirnnonsExamplquarees welandlbloc6.k3s 2D, single-phasmedie, inucmomprcan ebes iwrbleit-fleonwasequation in an anisotropiThec, homogeneous and (P +I ) (P _I ) Now examine Eq. 6.60 in a plane where the transformations �f3�;:h 10ge(��) i j' . (t) , Eqssur .oundinandg blocks aargealioncasatseudmedin a ctehnattrWeal porl btlioocnkoftheandfieldit,safwoaury .............................. ( 6 . 6 2) froSubsm thteituphystingicEqsal boundar . anieds and otinhtoerEq.wells. gives are applied (se Exercise 3.15). From Eqs. 6.61 and 6.62 it fol ows that �� (tf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (6.47)

= 0.208Llx.

ai,j = (LlyILlx)i,j,

6.54

x

a j

Example 6.3.

Eq.

Solution.

6.2 6.35. 6.2.

(Llx)i,) � (LlY)i j.

Llx Ll Y .

+

', J

+

p ', J .

f'ckHh

-

2p . . + 'J

',J

. . . . . . . . . . (6.55)

= n.

't

6.55

(LlY);,j = ai,j (Llx)i,j ,

a ;)

a

+

. . . (6.56)

= n,

It'

t,)

(6.57)

' ,J

,

(LlY)i,j, (Llx)i,j '

(i,j)

Y

l

+a . IJ

Ll X

. . . . . . . . . . . . . . . . . . . . . . . . (6.48)

= 0

ai,j

_

-

na ;,j a2 + -

. . . . . . . . . . . . . . (6.58)

1

6.58

'.J

:

hi,j '

(6.59)

6.59

Table 6.1

(i,j ) ] :

req

(6.49)

=

(6.5 0)

=

(ij)

Llx = Lly (a = 1), Eq.

Eq.

6.59

req

6.46

6.2.

6.2

Example 6.4.

Solution.

. . . . . . . . . . . (6.5 1)

-

'.J

p. I .)

=

-

',J

p. .

= O.

(6.60)

u-v

I, }

. . . . . . . . (6.52)

=

6.5 1

a2p a2p kX ax2 + kY ay2

6.52

u

=

" x

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (6.61)

(i,j)

6.5 1

6.52

6.48

(6 . 6

=

TABLE 6.1-COMPARISON OF EQUIVALENT WELLBLOCK RADII GENERATED BY EQS. 6.35 AND 6.59

(!ctc ) i,j or (�:) . . IOge (�e:) . . +

h

'.J

t.l<j,j

= 0

+

', J

WELL REPRESENTATION

.

... ...

. . . . . . . (6 5 )

... . .. . . . . 3 .

(�;). 10ge(��) . = n. ', J

',J

(6.54)

(ft) � 400 400 400 400 400

t.Yi,i (ft)

---

400 800 1 ,200 1 ,600 2,000

-.!:L a"

2 3 4 5

* {eqI". .

* * 'eqI. . ,

83. 1 52 1 30.772 1 73.964 207.227 232.575

79.1 96 1 25.220 1 77.088 230.893 285.545

(ft)

(ft)

J

.

* {eqI". / * * {eqI.. . J

1 .050 1 .044 0.982 0.898 0.81 4

'As calculated from Eq . 6.59. "As calculated from Eq . 6.35.

109


avy - (-kk,.x) V.

and a

(6.64)

_

Because the major and minor axes o f the elliptical well are expected to be close to each other, define an average wellbore radius by taking the arithmetic average of the major and minor axes as (6.74) where the definitions of a and b are from Eq. 6.7 1 as

. . . . . . . . . . . . . . . . . . . . (6.65a)

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (6.75a)

. . . . . . . . . . . . . . . . . . . . . . . . . . (6.65b) and

b

=

rw

(�)

\I,

.

(6.75b)

Substituting Eq. 6.75 into Eq. 6.74 gives

V. � . . (t ) ( ) . [ ] V.

or

'IV

a2ay2p ( k,.) - a2av2p. �

=

(6.66b)

+

=

o.

(kx ) i,j(P + I ' - 2p . P _ I .) (k/ ) . .(p + I - 2p P _ I) u-v ( {3c h ) . .

Eqs. 6.67 and 6.68 indicate that, with the use of the transformation functions (Eqs. 6.6 1 and 6.62), we can study Eq. 6.60 in the plane where the,porous medium becomes isotropic in permeability with kH (kxky)" . It is necessary to study and compare the equations for the well both in the x-y and planes. In the x-y plane, pressure specification at the wellbore can be ex­ pressed as

at r�.

=

=

u-v

x

.

.

+

+

l y .

)

u v

r�

(�y"u2 (ty"v2. +

.

. . . . . . . . . . . . . . . . . . . . (6.70)

u-v

closer look at Eq. 6.70 reveals that the circular well in the x-y plane becomes an elliptical well in the plane, because

A

(6.7 1 )

represents an ellipse rather than a circle. This implies that the bound­ ary condition P Pwf is specified on an ellipse rather than a circle and the solution to Eq. 6.68 in the plane is not radial. The equipo­ tential contours in the u-v plane are, therefore, a family of confocal ellipses (not concentric circles), where the innermost ellipse is the well itself. However, because rw is much smaller than the size of the reservoir, we can still assume that the equipotential contours in the plane are essentially circular and that the pressure essentially satisfies the equation

u-v

=

u-v

P - PlY!

=

- q scJ.l.

\I,

2n{3 c (k, kv) h

( )

V log e rU rw '

. . . . . . . . . . . . . (6.72)

where rU 1' represents the radius at which pressure is P in the and can be expressed as

u-v

plane

(6.73) 110

t.]

J.l. q sc

=

'.]

+

.]

.+

t.]

O

'

'.]

t.]

.

(6.77)

With the change of variables, this transforms to

+

Substituting the new variables and into Eq. 6.69, this specifica­ tion can be written as P P,4 at =

.]

'.]

. . . . . . . . . . . . . . . . . . . . . . . . . . . . (6.69b) =

t

x :::" . /::" y

+

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (6.69a)

P"f

(2

/::,.y /::" x

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . (6.68)

=

. . . . . . . . . . . . . . . . . (6.76)

+

The finite-difference equation for the steady-state pressure in an anisotropic medium written at the wellblock is (see Eq. 6.48)

(6.67)

a2au2p a2av2p

P

Y2r

v,

Substituting Eqs. 6.65b and 6.66b into Eq. 6.60 yields

or

=

+

[ (kx kV)'h �u ] (p . + I - 2p (p�;) . .

uV

' . ].

. t.].

= o.

t. }

.+

t, }

P t,j - l)

. . . . . . . . . . . . . . . . . . . . . . . . . . (6.78)

Eqs. 6.60 and 6.68 and Eqs. 6.77 and 6.78 are differential and fi­ nite-difference representations, respectively, ofthe same problem in the x-y and planes. More importantly, we can now recognize that the differential and finite-difference representations (Eqs. 6�68 and 6.78, respectively) are essentially identical to the isotropic problem in Example 6.3. Therefore, in the plane,

u-v

and

qsc

=

u-v

' - 2n{3 c (kxq \(PiJ - P"f)

[

BJ.I. loge ( r��/'w)

l

(6.79)

'

. . . . . . . . . . . . (6.80)

which can be rearranged as (6.8 1 ) The corresponding equation in the x-y plane is

(PiJ - P"f)

=

- q scJ.l. B

\I,

2n {3c (kx kv) h

[ ( )] req loge rw

.

. . . . . . . . (6.82)

Dividing Eq. 6.8 1 by Eq' 6.82 gives BASIC APPLIED RESERVOIR SIMULATION


N

4. x · - -

LE

I I I I

IIx

/Ix_

3.

7

0

8,

.6.y_

s

1

-

2_

/Ix,

- - - - - -

8

r',l

1 <.

.6.)'+

V

- - -

2 (!:

6

4

x

lIy

I- -

--

AV

- - x

3

I!)4 /IX..

7 r7.1

"V. 0

2

Ax,

x

1!)3

6

o riJ 8J

i. Gridpoint

j. Well or its image

V

Distance from Gridpoint i to Well j

Distance from well to Ita Jth Image

Fig. 6.4-Wellblock 0 and its surrounding gridblocks in a block­ centered grid.

i. Grldpolnt

I!)

J. Well or its image

riJ

Distance from Grldpolnl i 10 Well J

81

Distance from well to ils jlh image

Fig. 6.S-Wellblock 0 and its su rrou nding grid blocks in a point­ distributed grid.

boundaries falls on the southern boundary of the block and the reser­ voir is north of this boundary (denoted by

xx

in Fig. 6.4), Gridblocks

1 , 5, and 6 do not exist. Similarly, if a reservoir boundary also falls

(6.83)

(6.84) Substituting the definitions of rw and

r�� yields

on the western boundary of the wellblock and the reservoir is east of this boundary (denoted by in Fig. 6.4), Gridblocks 4, 5, and 8

yy

also do not exist. The well in Gridblock 0 is labeled 1 , and

riJ is the

distance from Node i to Wellj. If the wellblock is an interior block,

no image wells exist. If a wellblock is a boundary block, however, one or more image wells will be present, depending on the number of reservoir boundaries of the reservoir that fall on the edges of the wellblock. The distance between Well I and its image well, Wellj, is referred to as aj . In Eq. 6 . 86,

n is the product over all existing well images and

n or, finally,

req

= 0.28

[ (kJkl(A4 (kv/q

y,

+ +

(kx/kl'(Ay) 2 ] (kx/ky) y,

y,

.

.

.

(6.34)

The Abou-Kassem and Aziz 6 Model. Abou-Kassem and Aziz de­

veloped another equivalent-wellblock-radius equation that is appli­

cable to wells located in off-center locations in a square or rectangu­

lar gridblock with aspect ratio in the range of liz to 2. In this formulation, which uses Eq. 6.37, the equivalent wellblock radius is defined as

1

is the product over all existing surrounding gridpoints. The factorJ = fraction of well flow from the wellblock (f= for an interior well, J= I/Z for a well on one boundary, andJ= Y4 for a well on two bound­ aries). Finally, the exponent

Ay/!:u

includes the summation over all existing surrounding gridpoints. Fig. 6.5 shows Gridblock 0 (wellblock) and its surrounding blocks in a point-distributed grid and provides the definitions of the entries of Eq. 6.86 for point-distributed grids. Table 6.2 summarizes the equations for the interface transmissibil­ ity factor, Ii, between a surrounding Gridblock i and the wellblock.

Example 6.5. Show that the equivalent-wellblock-radius formula of

Abou-Kassem and Aziz6 (Eq. 6.86) agrees closely with Peaceman's5 model (Eq. 6.36a) when

this is better understood by reviewing Figs. 6.4 and 6.5. The well­

block, Gridblock 0, is referred to as an interior block if all reservoir boundaries are outside the wellblock boundaries; otherwise, it is

L'1x L'1y =

and the well is located at the center

of a square block for a five-point finite-difference scheme (Fig. 6.6). Solution. From Table 6.2, for a five-point scheme, T] = T2 = T3 = T4

= 1 and Ts = T6 = T7 = Ts = O. Also, for a well located at the center

of block, f= 1 ,

a

boundary block. Flow into interior Gridblock 0 is only from Grid­

blocks 1 through 4 in five-point finite-difference formulations,

while all eight adjacent blocks in the

x-y

plane influence production

in nine-point finite-difference formulations. If one of the reservoir

WELL REPRESENTATION

. . . . .

(6. 86)

III


TABLE 6.3-ENTRIES FOR USE IN EQ. 6.87

TABLE 6.2-INTERFACE TRANSMISSIBILITY FACTORS BETWEEN A SURROUNDING GRIDBLOCK ; AND THE WELLBLOCK

7j Tl = 1 T2 = 1 T3 = 1 T4 = 1

1i,1

'1 , 1 = /lx '2, 1 = /lx '3, 1 = /lx '4, 1 = /lx

2 3 4

TABLE 6.4-ENTRIES CALCULATED FOR EXAMPLE 6.6

2 3 4 or

req

7j Tl = !lx//ly T2 = /ly/.6x T3 = /lxl/ly T4 = /ly//lx

1i,1 '1 , 1 = /ly '2, 1 = /lx '3, 1 = /ly '4, 1 = /lx

1

'eq

= 0.2079flx, which agrees closely with Eq. 6.36a, where = 0. 198flx.

Example 6.6. Show that Eqs. 6.86 and 6.35 give reasonably close values of 'eq for a rectangular interior wellblock with a well located at its center and where the aspect ratio, a, is between Yz and 2 (Fig. 6.7). Solution. Table 6.4 gives the entries calculated for this example. Also,

� L I Note that, for a uniform square grid, Ax= Il.y, the transmissibility factors simplify to Ts = T6 = T7 = Ts = O (lor the five·point difference scheme) and '/6 (for \he nine-point difference scheme); and T, = T2 = T3 = T4 = 1 (lor the live-point difference scheme) and 2/3 (for the nin&-point difference scheme).

It is possible to construct the entries in Table 6.3 to use in Eq. 6.86 (note that for an interior block there are no image wells) with I b = __ =

I Ti

Y4

+ fly + flx + fly To = flx fly flx fly flx = 2 I

or b =

(flXfly flxflY ) +

=

2

( flx) 2 + (fly) 2

flxfly

. . . . . . . . . . . . . . . . . . . . (6.88a)

flxfly . 2 ( flX) 2 + (fly) 2 ]

. . . . . . . . . . . . . . . . . . . . . . (6.88b)

[

Again, for a wellblock surrounded by four other reservoir blocks, f= 1 , no image wells exist, and the equivalent-wellblock-radius equation becomes (aj = riJ = 1 if Image Well j does not exist)

andf= 1 . Then, simplify the equivalent-wellblock-radius equation to

,�

[

"p i -

= exp ( -

[

= exp ( -

ZKJ

1)« : ) ]

2.7r)(flX)4

2.7r('flx

]

(6.89)

v,

. . . . . . . . . . . . . . . . . . . (6.87)

Expanding the product explicitly yields

(6.90)

v,

and substituting for the ri . l and b terms results in Il.xll.,V

Il.xll.,V

Ax

Ay

3 • Ax

J=1

@0

4.

Ay

Ay Ax

2.

A •

Ay

1.

Fig. 6.6-Square Gridblock 0 with well at the center and Its sur­ rounding grid blocks (Example 6.5). 1 12

Il.y

3

4 • Il.x

1=1

0

@ Il..

1 •

Il.y

2

Il.X

Il.y

Fig. 6.7-Rectangular wellblock (Gridblock 0) with a well at the center and its surrounding grldblocks (Example 6.6). BASIC APPLIED RESERVOIR SIMULATION


LAYER

or

Pwt1

2

Pwt2

3

Pwf3

4

Pwt4

5

1

Pwts

f=

• Pwt,\_ 1

=

{

Pwtnk

Fig. 6.S-Multilayer well bore configuration.

[exp( - 2nl ] 2( I :a2) x a(l;a2)

} �x,

. . . . . . . . . . (6.9 1 )

where = Assume that, for a given problem, �x = 400 ft and �y = 600 ft. Calculating req from Eq. 6.9 1 yields = 600/400 = 1 .5 and

a �y/�x.

req =

[[

_

. . . . . . . . . . . . . . . . . . . . . . . . . . . . (6.95)

The total flow rate for the well is the sum of the rates for all perfo­ rated intervals,

----..I'V--•

1 JWk - /AkBk Gwk '

a I /{ [ 1+ .5)2]1 ) x 1 .5 { I /[ I +( 1 .5)2]1 exp ( - 2n l ] ( . S 2 0

]

400

where k E ""w . In Eqs. 6.92 through 6.96, Subscript k = properties associated with Wellblock k and ""W = the set of blocks perforated by the well. The sub­ script k is used in Eqs. 6.92 through 6.96 because the geometric mean permeability in the lateral direction and the thickness of the wellblock may differ from one wellblock to another. Because the Pk values repre­ sent block pressures, they are also different in each wellblock. The use of subscript k with the s factor signifies that the skin value may also dif­ fer from one wellblock to another within the wellbore. This is especial­ ly true if different perforation densities and intervals exist within each individual simulation layer. Viscosity and formation volume factors (FVF' s)-and relative permeabilities for multiphase flow-also need to be calculated with the pressures of the individual wellblocks of dif­ ferent layers, Pk. The flowing sandface pressure, Pwf is different from e one wellblock to another, depending on the existing pressure drop with­ in the wellbore (often approximated with the hydrostatic gradient). Fi­ nally, Subscript k in the term reqk reflects the fact that different simula­ tion layers can have different equivalent wellblock radii, depending on different wellblock properties (see Eq. 6.34). As with all terms in the finite-difference equations, we must select a time level (n or n + 1) at which to evaluate production and injection rates. We can use several techniques to evaluate these terms, includ­ ing the explicit method, where q �ck (inflow-performance parameters are evaluated at Time Level n) ; the simple-iteration method, where q �c� (inflow-performance parameters are evaluated at Time Level n + 1 but at the previous iteration level v) ; the linearized-implicit method, where

I

= 1 06.30 ft. Applying these values to Peaceman ' s 5 well model, req

=

y,

+

0.14[ (�xl 2 (�y) 2 ] ,

(6.35)

which gives req = 0. 1 4( 1 60,000 + 360,OOO) ¥2 = 1 00.96 ft. Again, agreement between the req values obtained from the two models is remarkably close. Vertical, Multilayer Well Models. So far, we have not considered

the case of wells penetrating multiple layers (that is, a column ofver­ tical blocks) as shown in Fig. 6.8. For Wellblock k, where k E "" w, the flow-rate expression can be written as

+

1"(

)

iJ q sck n+1 " . iJPwfref P W!ref - p W!re! '

(6.97)

Nolen and Berry ' s7 semi-implicit method, where

v + I) qn � �q 1 " ( (v + I ) sn ) qSCk(n+1 Wk Wk SCk + �sWk sn+1 =

_

. . . . . . . . . . . . . . . (6.92)

or

q sck

= -

(

J

Jwk P k - P Wf

. . . . . . . . . . . . . . . . . . . . . (6.93) . . . . . . . . . . . . (6.94)

WELL REPRESENTATION

. . . . . . . . . . . . . (6.98) 113


and the fully-implicit method, where

(

(v + I ) n+ 1 V+ I) (v + l ) (I') iJ q II + 1 II + 1 "'" q " + 1 + � S q� � � M �

+

__8 I

(v)

iJ qsck " + I iJS k

__I

(v)

(

I

(1' + 1 ) S8,,k+ I

(

iJ qsck n + l (v ++ l)1 + p Onk iJPO k

_

_

(v) S8" k+ ]

)

(V» ,, + 1 p ok

)

_

(v) S"�+ 1

)

. . . . . . . . . . . . (6.99) The next two sections discuss applying these methods for multi­ layer wells. Explicit Treatment of Multilayer Wells. Pressure-Specified Wells.

For a pressure-specified well, where P »!re! = P H!Sp ' the wellbore pressure at the individual simulation layers can be determined by

Hk

P wh

=

PH!re! +

f

Hre!

Y wb dH

. . . . . . . . . . . . . . . . . . . . (6. 1 00a)

or, if an average well bore pressure gradient is assumed, (6. 1 00b) In Eq. 6. 1 00, P "fre! = flowing sand face pressure at a reference depth of Href in the wellbore. In this chapter we assume that Href is the depth of the topmost perforated layer and that P II!re! is the pres­ sure at this depth. Eq. 6. 1 00 assumes that frictional and inertial losses are negligible compared with the hydrostatic gradient. The hydrostatic gradient, 5'wb ' is defined by

5'wb = 5', = Ycg P;C ,

. . . . . . . . . . . . . . . . . . . . . . . . . . (6. l O l a)

for single-phase flow of Phase I (l = 0, w, or g), or

This algorithm can be improved as follows to allow for a variable pressure gradient between simulation layers. I . Set P "!I = PII!Sp ' 2. Use the previous algorithm to go from P ut] to P "h' 3. When pwfz converges, proceed in a similar manner from P "f2 to P llf3. 4. Continue with this procedure for all completed layers. For multiphase-flow problems, the definition of the wellbore pressure gradient, Eq. 6. 1 0 Ib, requires the production rates for all phases. In the explicit method, for inflow performance, these rates are evaluated at the old time level, n. Once all the wellbore pressur­ es, P H!k ' are determined, they can be used in Eg. 6.93 to calculate q sck for each simulation layer. These values of q sck can then be sub­ stituted into the finite-difference equations of the gridblocks con­ taining the well completions. Rate-Specified Wells. The term qse in the finite-difference equa­ tions represents a sink for production (negative sign) and a source for injection (positive sign). For a single-block well with a rate spec­ ification, the specified production or injection rate, qse = qspse , is placed in the finite-difference equation with the correct sign. In the case of multiblock well completions, this procedure becomes more complicated because a specified production or injection rate for the entire well must be allocated to each perforated gridblock. There are two methods for allocating the specified rates to the individual sim­ ulation layers: the potential method and the productivity-index (PI) -weighted method. Potential Method. In the potential method for allocating pro­ duced or injected fluids, Eqs. 6.93 and 6.96 are combined to obtain

(

)

ilV Pk - P II! k k ( ) q spsc> '" i L ll'm Pm - P"!m

. . . . . . . . . . . . . . . (6. 1 04)

m

where m, k E l/J The application of Eq. 6. 1 04 presents two diffi­ culties. First, the unknown wellbore pressures, P w}: ' appear in the equation. Second, the summation in the denominat�r of Eq. 6. 1 04 introduces additional gridblock unknowns into the finite-difference equations of the gridblocks hosting the well bore. In addition to the pressures of the neighboring gridblocks caused by interblock flow (Pi + I j, k ; Pi,j + ] ,k ; Pi,j,k + ] ; Pi,j,k ; Pi j,k - ] ; Pi,j - I ,k ; Pi - I ,j,k) , the pressures of the column of grid cells Pk > where k E l/J w, containing the well also appear in the finite-difference equations of wellblocks. Substituting Eq. 6. 1 00b into Eq. 6.96 and solving gives (also, see Example 6. 1 0) IV '

(6. 1 0 1 b) for three-phase flow, where Wgse = qgse - Rs qose . Note that, in Eq. 6. 1 0 I , the FVF appears in the definition of 5'wb ' For 5'wb to be an averaged value, the FVF must be evaluated at the average well bore pressure, PH! , That is, (6. 102) where 1 = 0, w, or g and . . . . . . . . . . . . . . . . . . . . . . . . (6. 1 03) where P IV') = wellbore pressure at the lowermost perforated layer. nk The following algorithm is used to estimate the average wellbore hydrostatic gradient. 1 . Assume PII! = P "!sp' 2. Evaluate B[ (l = 0, w, or g) at PH!, 3. Calculate 5'wb from Eq. 6. 1 0 1 . 4 . Calculate P H! through P H!" from Eq. 6. 1 00. 5. Recalculate �..! using Eq. 6� 103. 6. Check for convergence. Go to Step 2 if necessary. 1 14

(6. 105) where k E l/J".. In Eq. 6. 1 05, 5'wb is defined by Eg. 6. 1 0 I. If we substitute the spec­ ified production or injection rate, qspse , into Eq. 6. 1 05, then we can estimate the flowing well pressure at the reference depth P w! . The following algorithm is used to estimate the flowing wellbore!pres­ sures required for Eq. 6. 1 05 . I . Assume a value o f 5'wb (usually the converged value from the previous timestep). 2. Calculate P II!re! from Eg. 6. 1 05 using q'pse and the assumed value of 5'wb ' 3. Use PWjre/calculated in Step 2) and the assumed value of 5'wb to calculate tlie well bore pressures at all perforated gridblocks with Eq. 6. 1 oob. 4. Calculate the average wellbore pressure, PlY with Eq. 6. 1 03. !' 5 . Recalculate the average pressure gradient with Pw! from Step 4 and Eq. 6. l O l a or Eg. 6. 1 0 1 b in consideration of whether flow in well is single phase or multi phase, respectively. 6. Check for convergence. Go to Step 2 if necessary. For Step 5 in multi phase flow, Eq. 6. 10 I b requires the production rates for each flowing phase. For the explicit method of allocating BASIC APPLIED RESERVOIR SIMULATION


production, these rates are evaluated at the old time level (Time Lev­ el n). This algorithm can also be improved to allow for a variable 51wb between simulation layers. To implement such an algorithm for multiphase flow, the rates in Eq. 6 . 1 0 1 b are not the well rates but the summations of all upstream rates. This algorithm provides the wellbore pressure for the flowing well pressures at each perforated wellblock. This solves the first dif­ ficulty discussed with the application of Eg. 6. 1 03 : the addition of the sandface pressures, pwIk, into the finite-difference equations. The second difficulty (the addition of the gridblock pressures Pk , where k E 1/1 w) is more challenging to solve because the introduction of the additional unknowns alters the structure ofthe coefficient ma­ trix (discussed in Implicit Treatment of Multilayer Wells in the next section). To avoid this problem, these additional pressures are eva­ luated at the known time level (Time Level n ) . PI- Weighted Method. The PI-weighted method of allocating specified production/injection rates assumes that a constant draw­ down/buildup exists for all simulation layers. That is,

fl.p =

Pk - P wfe

(6. 1 06)

where k E 1/1 w . Substituting Eq. 6. 1 06 into Eq. 6 . 1 04 results in

. . . . . . . . . . . . . . . . . . . . . . (6. 1 07) m

time level, n + I , and the previous iteration level, v , with the Taylor series expansion

(v+ I) q li +1 SCk

=

+

(v) qsne+1

+

k

aq sc

k

__

a Sg

k

1

aq sc a Sw

(v) "+ I

(

k

I

(

(v +1 ) s n +1 Wk

(v+1 ) (v) sgn +1 _ sng +1

1 (

aq .c k __ + iJP W!ref

k

__

(v) n +l

(v) 1i +1

k

k

_

(v) S,,+1 Wk

) )

»Jref '

(v + I) (v) n + l _ pn +l p wf ref

)

. . . . . . . . . . (6. 1 09)

where k E 1/1w . Eq. 6. 1 09 assumes that Sw, Sg , andpo are the primary unknowns in the finite-difference formulation. If another set of un­ knowns is selected, Eq. 6. 1 09 must be written in terms of the new unknowns . Chap. 9 discusses the selection of unknowns for multi­ phase-flow simulation. In Eq. 6. 1 09, the partial derivatives with respect to the unknowns are obtained from the IPR, Eq. 6.93,

. . . . . . . . . . . . . . . . . . . . . . . . . (6. 1 08) where m, k E 1/1w' Although it appears that Eq. 6. 1 08 does not introduce additional unknowns into the finite-difference equation for grid cells containing wells, in reality, the summation in the de­ nominator of Eg. 6. 1 08 does contain the pressure-dependent terms Jl and B (and saturation-dependent relative permeabilities for multi­ phase flow). Consequently, the use of Eg. 6. 1 08 introduces some de­ pendency on pressures from nonneighboring gridblocks into the fi­ nite-difference equations. In the explicit method of calculating production/injection, all pressures and saturations are evaluated at the old time level, n . After solving for the gridblock pressures in the reservoir, Eq. 6.93 can be used to estimate the flowing sandface pressures, P wfk' at each simulation layer. Remember that the sandface pressures calculated in this manner for the PI-weighted method do not obey any pressure­ gradient equation, such as Eq. 6 . 1 00 (that is, they are not compatible with the pressure drop in the tubing), but simply satisfy the relation­ ship defined by Eq. 6. 1 06 . I n the previous discussion o n the explicit method, both for pres­ sure- and rate-specified wells, all the additional unknowns introduced into the finite-difference equations by the IPR's are evaluated at the old time level, n. For the simple-iteration method, these properties are evaluated at the new time level, n + 1 , lagged one iteration level, v, behind the desired solution. Implicit Treatment ofMultilayer Wells. In the explicit method of calculating production/injection, all parameters used in the inflow performance were evaluated at Time Level n, while in the simple-it­ eration method, these parameters were evaluated at Time Level n + 1 , one iteration behind the desired solution. In some cases, these methods lead to physically unrealistic oscillations because of the na­ ture of the evaluation of the unknowns. These oscillations occur when small changes in the inflow-performance parameters result in large changes in the resulting production/injection rate. This occurs, for example, at water or gas breakthrough during a secondary recov­ ery project. To improve the stability of the finite-difference formulation, we need to develop a method to evaluate the unknowns in the IPR at the new time level, n + 1 , and the current iteration level, v + 1 . This can be accomplished by expanding Eg. 6.93 about the current

. . . . . . . . . . . . . . . . . (6. 1 1 0)

m

WELL REPRESENTATION

. . . . . . . . . . . . . . . . . (6. 1 1 1 )

. . . . . . . . . . . . (6. 1 1 2)

. . . . . . . . . . . . . . . . . . . . . . . . (6. 1 1 3)

where k E 1/1w , and iJP wf / iJP wf iJ w P h -aP wfre!

k

=

ref

can be obtained from Eg. 6. 1 00, as

)

dywb P wIre!

1 + --- ( Hk - Hre.! ' iJ

. . . . . . . . . . . . . . . (6. 1 1 4)

where k E 1/1 w . For single-phase flow problems, all of the derivatives with re­ spect to the water and gas saturations are set equal to zero. This is also done for the pressure solution of the implicit-pressure/explicit­ saturation and sequential-solution methods for multiphase flow. Chap. 9 discusses these methods. For three-phase flow problems, Eq. 6. 1 09 introduces seven unn +1 , sn +1 ' sng�+1 , n + 1 , and nwJ,+1 ' These un+1 ' q gsc +1 , q nw.c knowns.. q nosc PO P f Wk k k k re knowns are at the new iteration level, v + t. To solve for these unknowns, we have only six equations: Eg. 6.93 written for the oil, water, and gas phases (three equations), and the oil-, water-, and gas-phase mass-balance equations. To solve the system of equations generated by the fully-implicit method, we must find a way to eliminate one of the unknowns. This is accom­ plished by implementing the well specifications. Pressu re-Specified Wells. For pressure-specified wells, the sand­ face pressure, Pwfref' at the end of Iteration v + 1 must equal the sandface pressure at the beginning of Iteration v. That is,

(v + I) (v) n +1 pli +1 _ P wf wf re.! ref _

P

»J.p'

.

.

.

.

.

.

.

.

.

.

.

. . . . . . . . . . . . (6 . 1 1 5 ) 115


[

(v+ I) "' n + 1 L q SCk k

(v) n+ 1 (v + 1) (v) aqsc s n+ 1 '" _k "' n + 1 Wk L q sCk + L a s w k k k

=

( O I

(v) 1 (v + 1 ) o qsc n + k __ s n+ 1 + gk S gk

Ruervolr Unknowns

X X X 0 X X 0 X X 0 X X 0 X X X

X

X

0

0

(v) sn + J gk

_

_

(v) sn + 1 wk

)

)

CIsc:z

0 0 0 �X 0 X 0 0 0 0 1 0 X 0 ! O 0 0 0 xio 0 X X 0 1 0 X X 0 xjo 0 0 X X ! O 0

0 0 0 X 0 X 0 0 X 0 0 X 0 X 0 0 0 X 0 X X X!O 0 X 0 0 0 0 0 0 O l X 0 0 0 0 0 X 0 0 010 X

- - - - - .. .. .. .. .. .. .. .. .. .. - . . .. . . .. - - - - .. - - - - .. .. ... -.. - - _

(

Well Unknowns

Pl .1.1 P2.1•1 Pl .2.1 PU.l P1 .1.2 P2. 1 .2 Pl.2.2 P2.2.2 QSCI

0

l

.. _---- - - - - . .. .. .. .. -: - - - - .. .. .. __... .. ... .. .

. . . . . . . (6. 1 1 7) where k E 1/J w ' For a rate- specified well, the production/injection rate at the end of Iteration v + I must equal the rate at the beginning of Iteration v. Therefore,

L q SCk "'

[

(v + I ) n+1

k '" L � aqsc

I

w'

Fig. 6.9-Three-dimensional reservoirlwel l bore system for a pressure-specified well and its corresponding finite-difference coefficient matrix.

k

k

q spsc ,

-

_

M

(

(v + l ) sn+1

_

(V» )

sn + 1

Substituting Eq. 6. 1 1 5 into Eq. 6. 1 09 yields

+

. . . . . . . . . . . . . . . . . (6. 1 1 8)

Substituting Eq. 6. 1 1 8 into Eq. 6. 1 1 7 results in

n+ J

__

(v) n+J

"'

_

where k E 1/J k

L q SCk

-

(v) n+1

(v + 1) n+ 1

+

]Wfr )

(v) n+ 1

OPWfJ ( Wfref - ef aq sC

k

p

p

[

M

o q sc n + l k __

=

I

0,

(

(v + 1 ) s n+J �

_

(v) sn + 1 �

)

. . . . . . . . . . . (6. 1 1 9)

where k E 1/Jw, or, after rearranging,

p

. . . . . . . . . . . . . (6. 1 1 6)

where k E 1/J Note that Eq. 6. 1 1 6 no longer contains the unknown, ':vt; at the new iteration level, v + 1 . Consequently, this treatment has eliminated this unknown from the equation set. Now consider how to evaluate the unknowns appearing in Eq. 6. 1 16. In previous methods, we were content to evaluate these unknowns at Time Level n (the explicit method) or Tune Level n + 1 , Iteration Level v (the simple-iteration method). The objective of the fully-implicit method is to improve the stability of the fInite-difference formulation.

Pf

=

p

(v) n+1

_

(v) oqsc n + l

k '" L as , "k k

__

I

»"

To preserve the stability of the fully-implicit method, evaluate the un­ knowns at Time Level n + 1 and Iteration Level v + I . To do this, in­ clude Eq. 6. 1 1 6 in the matrix equation. Fig. 6.9 shows this schematical­ ly for single-phase flow. In Fig. 6.9, X represents nonzero entries in the coefficient matrix. Chap. 7 presents a discussion of linear algebra, in­ cluding the construction of the coefficient matrix. Rate-Specified Wells. For rate-specifIed wells, we specify the rate for the entire well. Unfortunately, Eq. 6. 1 09 is written for each perforated wellblock. To develop the appropriate constraint equation for the entire wellbore, we sum Eq. 6. 1 09 over all the open perforations. That is, 1 16

wfref wfref (v + 1 ) n+1

M

(

(v + 1 ) oqsc n + l k n+1 __ + pOk op O k

I

_

(v) n+1 p Ok

( Wk

)]

(v + l ) s n+1

+

_

(v) sn + 1 Wk

)

I , L Op oqsc

k

M n+1

__

k

wfref

. . . . . . . . . . . . . . . . . . . (6. 1 20)

where kE 1/J w ' Note that Eq. 6. 1 20 allows the completion rates to vary from Iteration Level v to Iteration Level v + I, but constrains the total rate of the well to qspsc . Fig. 6.10 shows the coefficient ma­ trix generated by the fully-implicit method for a rate-specified well for single-phase-flow problem, In the fully-implicit method, the partial derivatives with respect to the unknowns are evaluated at Time Level n + I and Iteration Level v . In the linearized-implicit method, these derivatives are evaluated once, at Time Level n and held constant during subsequent iterations BASIC APPLIED RESERVOIR SIMULATION


�.

z

h o

Fig. 6.1 1 -5chematic of a horizontal well as depicted by Babu and Odeh 's9 model . Note that the wel l is not in the center of the wel l block and is parallel to the y direction.

P" " , P2,1 .1 P ' .2.1 P2.2 .1 P',I,2 P 2•1 •2 P 1 .2,2 P2.2.2 Pwfref

X X

X

0

0

0

0

X

X

X

0

X

X

0

X

0

0

0

X

0

X

0

0

X

0

0

0

X

X

0

0

0

X

0

X

X

X

0

0

0

X

X

X

0

X

X

0

0

X

X

X

0

X

0

X

0

X

X 0 X X 0 X X , O 0 O ! X

0

0

0

0

0

0

.. ... 0 X

- - - - - - - - - - - - - - - - -- - - ... ... __

X

0

0

_-

0

6.121, y . . . . . . . . . . . . . . .6.. 1. 2. 1. . . . . . . . . . . .. (6. 122)

y z

(note that, if the horizontal well is placed parallel to the direction, the and axes are interchanged). In Eq. in the numerator

k

becomes

k

(kx kz) . y,

Peaceman 10 cautions users of Eq. =

that successful imple­

mentation of this equation depends on the assumption that the grid spacing and permeability are uniform, the well is isolated (not lo­

cated near any other well), and the well i s not near any grid bounda­

ry. This last assumption can easily be violated in the simulation of l a horizontal well . According to Peaceman O the well-location re­ quirements are (conservatively) achieved by the following. An isolated well should be at a distance greater than ten times

0

_ - - -- - - - - - - - - - - - - - - - - - - - -

I---t-' c-----.�.I

1. (&,Az) 2. 3.

the max

"'I - - - - _ .

from any other well.

The well should be no closer than

vertical grid boundary.

The well should be no closer than

5& + 0.5 (Az/&) 5Az + 0.5 (&/Az)

from a from a

Fig, 6.1 O-Three-d imensional reservoir/wellbore system for a rate-specified wel l and its corresponding finite-difference coef­ ficient matrix.

horizontal grid boundary.

for Time Level n

the flow equation of a vertical well. Fig. 6. 11 shows the physical

+ 1.

(In this treatment, the linearized-implicit meth­

od is identical to the first iteration of the fully-implicit method.8) Fi­

nally, in Nolen and Berry's7 semi-implicit method, these derivatives are approximated by chord slopes.

Horizontal- Well Models. Recently, horizontal wells have been

receiving considerable attention in petroleum literature. Because of the larger contact area, horizontal wells may outperform vertical

wells in draining equivalent reservoir volumes. The increased pro­

ductivity is not the only reason to drill a horizontal wel l ; the ability to orient the horizontal well to intersect higher-permeability chan­ nels and minimizing coning problems are other objectives of hori­

zontal wells. Although the solution for the flow behavior of a hori­

Bahu and Odeh 's 9 Pseudosteady-State Productivity Model.

Babu and Odeh developed an equation for calculating the produc­

tivity of a horizontal well. This equation also has a form similar to

model on which Babu and Odeh's equation is based. The Babu and Odeh inflow-performance equation for a horizon­ tal well is

B 6. 12(3 + + y 6. 16.22123 Ay,ch &Az.

qsc

One logical approach to reduce the complexity of the solution is to use Peaceman 's5 vertical-well model by rotating the axes of the

A

yz

and

to

q"

6.38

y

[ loge A Eq.

/

Y' rw

)

10ge(CH)

s

- %j "

.... (6. 123)

i s written for a horizontal well placed parallel to gives the definition of permeability.

Other entries in Eq.

d

model to account for the horizontal well. In this modification, the

.u

Because Eq. the direction,

zontal well is complex for most routine applications. it can be simplified for reservoir-simulation purposes.9

=

k.

((66.. 11224)5)

are

=

=

=

axes are interchanged if the horizontal well is placed parallel

( n�") - 05 10', [ (*l �] L088. {#B [ (0.28{[ . . . . . . . . . . . . . . . . ... (6. 126) (x-z) 6. 126 6. 1 . + (ru/]/ [ + n) (,.) + ,] } . . . . . . . . . . . . . . . . . . . . . .. (6. 121) c 0.75h jf (6. 127) direction so that Eq.

is expressed as

- "'P ,k!l.y(p,,, - p.AI

(kz/k/'

log ,

(kJkl (kz/k/

- log,

WELL REPRESENTATION

- 10g, ,'0

(k,lk,) '(M'

where Xo and vertical

-

20 are the coordinates of the center of the well in the (Xo. Y \ . 20) and (Xo. Y2, 20)

plane [as shown in Fig.

represent the coordinates of the beginning and end of the well, respec­ tively]. The accuracy of Eq. increases when �

1 17


TABLE 6.S-FORMULAS TO CALCULATE FUNCTION F IN EQ. 6.1 32

Function F

Argument

4Ymi2dd 4Ymi2dd

2dL

+ L

+ L

4Ymi2dd 4Ymi2dd

L

-

+

1

>

L

-

1

[

+

_

]

+ 10g e

-

L

1

[

+

+

+ log e

- ( 4Ymi2dd ) 0. 1 45

1

>

[

2 L) L) L) d d d (4Ymi (4Ymi (4Ymi 5 - 2d 0. 1 4 2d - 0. 1 37 2d ( 2 4Ymi2dd L ) 0. 145 ( 2 4Ymi2dd L ) 0. 1 37 ( 2 4Ymi2dd +

_

+ 10g e

_

(4Ymi2dd ) - 0. 1 37 ( 4Ymi2dd L ) -

L

-

)]

2]

+ L

_

2

exiandstwhens.Thaatmiis,nimum distance betwe n the wel and the boundaries min Xo, c -Xo 0.75h j€. ................ (6.128) ................. ( 6 . 1 3 4) BeThecauseskih�c,n facEqstor,.6.i1n27Eq.and6.61.21238isgeanceormposal y itesathtiastfiiendcilnudespracbotticeh. whecroe,mponent = mi d poi n t c o or d i n a t e of t h e we l . Fi n al l y , t h e agai n , i s defi n ed by tthioen,mechIanin otcahlesrkworin, ds, and the skin resulting from partial penetra­ =the horizontal well ful y penetrates the wel block, = (6.1=29) = (f - 1 ) (6.�8c j€)(!f3 - �o �). ... (6.135) theCan se=1. (Forc/ the)comput0.7a5t(iod/n of ) two0c.a7s5e(sh/neJk.ed ), andcoinsf L<d,idered. culating the producCompation rraettehofe raehorsultiszofontEqsal wel.6.l1t2h1atafnudl6y.1penet23 inractaels­ (6.130) blth=oechos1k.cp,Astinsgu=blmeo1cRB/zkeandroSmecTB,whoshandanie cceantl =sekr0i.nc4o, iifnst.octidroespiwic pethrtmheeacbeintliteiresof, atnhde where = (f - 1 )[IOge(:J 0.2510ge(�) the1 . FuldirelcpetioAsnne(tsrauasmitFiiongng.oc6t.hc1au1trstshheaowslhorong),izmatohntekaelditwelhreefclotiilsoonorwi.ienn=gteasdspaumptraliwieolnsttho. 0Theandwell=cednt.Theer con,inci=desd andwith th=e center ofthe block.Xo = C/2 -10ge(sin1r�O) - 1.84] ............. (6.131) and23=..Zo=hI 2is. zero mechanical skin (sm = 0), so = = The r e and = 2d2 {F(2d) 0.5 [F(4 2dd ) floWhew-pernftohresmeaprncoepeequatrtiesioanre(Eimq.pl6e.ment123)ecd,anthbee BawrbitueanndasOdeh9 in­ = ........ (6.136) (F 4Ynu20dd- ) ] } .................... (6.1 32) where loge (CH) entry can be10sgime (plCH)ified with Xo = C/2 and = hl2 wheThere funct=iomin dpoiin Eq.nt c6o.or13d2indesatecofribteshethwele effl =ec0t.s5ofthe well ioca­ in Eq.6.126 as ttiioonn infthoredihorffeizroentntaalrplgumeane.nts. shows the evaluation offunc­ Case 2. (d/ ) 1.33(c/ ) (h/ ), and L<d, then,(6.133) -10g,( I) -051 '[ (�) j€] - 1.088 is as given by Eq.6.13 1. is calculated from ................... (6.137) (

)

!;;

are

s,

S

If

sp .

sp

sp

+

Sm '

O.

./kx

Sm ,

$p,

,fk;

!;;

L

to be

Pxy

Y2 - YI

+

d,

Example 6.7.

It

Pxyz

Ymid

Pxy

+

rw

B

Solution.

Y

L

Y2

Yl

sp

L

Y

O.

S

Pxy

Lh

I

&. k; x V

L

_

Ymid

L

Y mi +

+

L

qsc

,

ItB[ loge(A'h/rw) +

- %]'

sp

Y2 - Y l ,

+ Sm

O.

Zo

(Y I + Y2).

F

Table 6.5

F

Pxyz lIS

,fk;

>

./kx

Jk.

""

..

Py

BASIC APPLIED RESERVOIR SIMULATION


cothnt etofoPetthhaepecspreweli,mowhiaduclnwi5ctmehithviniittndiyhodacofastdoeitemhseulaswelnanottaipolprnilnelonaExaxiydemirts.maetpllefet27o6.re7­. odogACHl 6i�8 � - o.5 1og{ (f)�] - l.088. deNotororicerenettaihnsaegt=witthh1eteh9uspos.r5e96esipoftieSTBID. or. .e., .as..sume(6. 1t3h8)at Lecan=kyt cbe==c8a01l00c0uflmdta,teda=:n800d = 10anmd.d hWi=.40t.h. t.fht..e.sFure. .s.pth.eec.nni.f� Us i n g t h e da t a of Exa m pl e 6. 7 , c o mpa r e t h e pr o ­ 1 g., ( C H) 0 duc t i v i t i e s of a ver t i c a l wel l dr i l e d i n t h e c e n t e r of t h e bl o c k t o t h a t g., 1 0 g., ( C H)=( 6 . 2 8 / 1 2 ) ( 8 00/ 4 0) J 1 O /1 0 0-0. 5 1 0 of a hor i z o nt a l we l c o mpl e t e d i n t h e c e n t e r of t h e bl o c k . As s u me l i t i e s . be[(8Thec00/aus4ePI0) of=(1t0h/1e Ba)00b]-1aundan.0d=ch,88Ode= h3.k=0.93i1n0fl0-0.o31w-69p22daerfr-1.ocynnaa0n88=ndce =32,e1q.3ua00.t0io00Aln ffstoo2r,. i6.so3t6aropigicvespenneabi For a n i s o t r o pi c penneabi l i t y a n d s q uar e gr i d bl o c k , Eq. t h e wel l b l o c k r a di u s f o r a ver t i c a l wel l as = 0. 1 9 8 a horizontal wel can be calculated from Eq.The6.3PI7 asofPeaceman's5 vertical-well model can be extracted from ................... (6. 141) ( 6 . 1 3 9) Wilatetdh asthe data from Example 6.7, the PI of a vertical well is calcu­ Using the entries ca(l2c1lu)la(1te.ld2e7)ar(l8ie00)r yi(0e.l0d31s 6) = (l)(l)[loge(32, 000V,/004) + 1.300 ( I . I 2 ) ( 0 . ) ( 4 0 ) 21l 7 ( ) l ....c .. ..c _ = _/004.,.,-j _ _ _ _ _ _ _ .,. . .. -:) l ( 00) ) 8 ( ( g o 8) l 9 1 . 0 ( ] l [ ( e orNow, c=26.alcula9t07e thSTBIDp s i . e PI of Peaceman's5 equation (Eq. 6. 121) from orCompa=4.r7i4ngSTBIDp s i . t h i s PI val 6.holsy1st3ee9misandsapunderpr6.o1xi4cm0,oansweteildyercsaainxtiucoteion,mncwiesthltuehgrdeprtehatoehtduceatPIr ,tthfivalavonrituytthhesofeatrcaofeashorlecaruvverliaoiztoertnt/diwcaaielnllborwelbEqsorele­.. smultaCurntdaiprrleden-mectleyl,thfveoodrrtmultiocaaltcwelipoleuntl-sc,eweflorhorasfrisicuztmedoiontnalalthwelloast lehsse, itfnhrietcrhteeioiwelsnalnollboiornsdusee.sForatrrye + / ]1 [ /' / ] } ) neglzproontxiiagmliwelbalteelctsho,empathpre egrrseaduvrwiietydrthheadothpeingristaneglhvie tweyighelibbalorde aaenn. dFord usfriemulcdtioEq.naltip6.lelo-1cs0e0el stohormayapi­­ - 10g,(,.)+ ,] }. ...................... (6. 140) domiincorpnoratea.tiNghing weeml bore hydrdiasulciuscssinsetoverthaeliinnfldusow-trpyearpfoprnnaoacnhceescfaolr­ elss,ewervoisirtmshieplmsyulcasoapetsourmeof; however which=yi(e2ld1ls)( 1 . l27)(0.0316)(800) tchoreuclhaiztniiooqntnsuesalinweliasrbeyond tnohisprteexs,tibmuook.rpledrementoForp inamultthioenthoriofpletihz-coesen­le tiallasyerecteiodnverofttihcealwelwell.lWis artehapplthis iascasblumpte, prioon,vidaledl ththeatmeEq.thods6. 1f0o0rimuls re­­ t placed wi=th (I)O{ 10g,(0.28[[(lOO/IO)"(40)' (6. 142) + ( 1O/100 \800i ] [( 100/10 + ( 1O/100 ]) ) wheidrf othperealreosngervtoihe.rTldrehenagtwashdownsuofmptthieisohorsnigofniizfioneglntcaantligwellyibgrlel.eprateesr tuhrane drthoepprisesvaluride -loge 0.4] 31.053 STBID-psi. eeresnatrferogenerimngotahsaeilrmysulimusaulteiodanttioostnuanalsdytudifyozerestwihwelesthel tttSieyhsepesntglsexcandeof-ewprptelcoioloniblnsinemtmghulaprstaiaostiblnotcoonemputmsdistuf.diConduct e r model i n c o or d i n a t e s i s us e d. As t h e pr e vi o us c h apt e r s di s c us s , t h e us e of a n mode How doe s t h e PI of t h e hor i z o nt a l wel l i n Exa m pl e 6. 7 change if theForcenttheirsofcasthee, twelhe vall isuloecofateCHd atmus=t be0.7r5cecaandlculate=d as basblocekdshionnowstthhaeatassmodelcshuematmpt. iiocnofofanradial flmodelow in athnedltahteerdetal diairlescoftioansty.pilcaisl Consider Eq. 4042 writ en in the coordinates only: -10ge(sin�) -0.5 10g{ (8Jg) R£] - 1 .088 ( 6 . 1 4 3) or 10g.(CH) = 3.782. The PI for the new configuration is Thetnothe ecdenocnveovuntelrogpmeeernetdnanitntuofrerecatofasnigulnthgleaeflr-wocwoelorltodmodewainartdelst.hprTheeewesedinltffibs orscouemel.tThiy scthesmaclosenvefnrgeomrs­ geto nthteflfloowwreaslounglts tihnehigdiherercfltiuoindbevecloomecitiseprs aosgrthees aivreelaypesmrpaelnedir.cThiulasr = (l)(l)[lo(2g1le()3(2,1 . l0200V,7)(8/00)004)(0+.0313.7682) - , d

kx

k

)

J8 _ a

*

kz

ft,

Example 6.9.

A

kxkz Y'

A

J8 - 0

Solution.

%]

J8 - 0

(kz/k

%

J

(&)

2

( kx/k

&.

)

(

v

Jv

'

req

+ ( kz/k '

et al. II

Jp

+

PW/k

)

v,

/

)""

Pw/re/ ,

.

.

.

.

.

k E 1/Jw

)''''

6.3 Single-Well Simulation

r-8-z

Example 6.8.

Solution.

Zo

Xo

hI2.

r-8-z

6.12

r-8-z

Fig.

r-z

J8 - 0

WELL REPRESENTATION

%]

r

1 19


Fig. 6.1 2-Discretized radial-cylindrical-flow geometry and de­ tails of a typical block.

increase in fluid velocity in the near-wellbore vicinity necessitates the use of smaller timesteps to generate numerically stable results. In Fig. 6. 1 2, the locations of the mesh points, represented by the solid dots, are spaced logarithmically between the external radius and the well radius. Logarithmic spacing results in increased density of mesh points in the high-pressure-gradient region near the wellbore. Eq. 6. 1 43, written only in the r direction for a slightly compress­ ible fluid and incompressible porous medium, takes the form . . . . . . . . . . . . . . . (6. 1 44)

When discretizing Eq. 6. 1 44, the grid spacing and interblock bound­ aries (defined by the equations discussed in Sec. 5.2.3) are used. The solution of Eq. 6. 144 requires that an initial condition and two boundary conditions at r = rw and r = re be specified (in the case of Eq. 6. 1 43 two additional boundary conditions at the top and bottom surfaces of the formation also need to be specified). The initial condi­ tion is given as the pressure distribution at time zero. In the case of a newly drilled well in a previously undisturbed formation, the pres­ sure is based on hydrostatic equilibrium. The two boundary condi­ tions are imposed on the internal and external boundaries. At the well­ bore, the inner boundary of the reservoir, either a Dirichlet-type (constant pressure) or a Neumann-type (constant flow rate) boundary condition can be specified. In a similar manner, a Dirichlet-type or a Neumann-type condition can be imposed at the external boundary. In the case of pure Dirichlet-type problem, the first and last mesh points along the r direction are not included in the unknown list. After solv­ ing the pressure values for the internal grid nodes, we calculate the pressure gradient at r = rw and the flow rate by . . . . . . . . . . . . . . . . (6. 1 45) If the flow rate

is specified a t the wellbore. the pressure gradient at

r = rw is fixed by

- q sc B/l2 ;;r f3 c rw kH h '

o

w Fig. 6.1 3-Hybrid grid system for improving the coupling of well­ bores to the reservoir model ; 0 oil and W water. =

re

=

j�

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (6. 1 47a)

j�

. . . . . . . . . . . . . . . . . . . . . . . . . . . . (6. 1 47b)

j'�.x

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . (6. 1 47c)

t:..y

for a vertical well, re

=

=

t:.. t.z

.

for a horizontal well oriented parallel to the x direction, or re

=

t:..z ;;r

.

for a horizontal well oriented parallel to the y direction. The rectangular grid syslem is construcIed in the same general man­ ner as all rectangular grids. Nole, in Fig. 6. 13, that the rectangular grid was also locally refined in the direction parallel to the well. The reasons for this are discussed later. Finally, the time domain may also be refined to improve the stability of the solution of the radial-flow equations. The transmissibilities of the rectangular and cylindrical grid sec­ tions are identical to the transmissibilities of their pure grid (nonhy­ brid) counterparts with the exception of the odd-shaped cells that couple the cylindrical grid to the rectangular grid. Fig. 6.14 shows an example of this coupling cell in plan view. The transmissibilities for these coupling cells are given by T1m ± y,

( B��/)

= f3e G

m ± V2

,

. . . . . . . . . . . . . . . . . . . (6. 148)

where 1 = 0, w, or g. Pedrosa and Azizl 2 provide the expressions for the geometrical factor, G, for theoretical cylindrical grid along the radial, angUlar, and vertical directions. Also, in the reservoir section, rectangular blocks are used with a different set of geometrical factors. Tables

6.6 and 6.7 present definitions of geometrical factors for cylindrical

. . . . . . . . . . . . . . . . . . . . . . (6. 146)

The solution to single-well problems by use of Eq. 6. 1 44 assumes that the solution is axisymmetric. In a multilayer single-well prob­ lem, the rates are distributed between the layers according to the procedures described earlier in this chapter. The axisymmetric na­ ture of the solution, however, is still preserved.

and rectangular grids in three directions. Hybrid grids serve several purposes, including the following . I . Model wells in coning situations in a full-field study. 2. Incorporate gradients into the well performance model. (Note that IPR ' s, such as Eq. 6.37, do not consider the pressure gradient.)

6.4 Use of Hybrid Grids in the Wel lblocks

Pedrosa and Azizl 2 introduced the use of hybrid grids to improve the coupling of the wellbore to the reservoir. Hybrid grids insert a locally refined, cylindrical grid inside a full-field rectangular grid at the well locations. Fig. 6.13 shows two such grid systems, one for a vertical well and one for a horizontal well. The hybrid grid is constructed with the same logarithmic spacing for the cylindrical portion of the grid, which was discussed in Sec. 5.2.3. For the radial grid, an equivalent external radius is defined by the dimensions of the host rectangular cell. That is, 1 20

r

Fig. 6.1 4-Plan view of coupling cell in a hybrid grid system. BASIC APPLIED RESERVOIR SIMULATION


specified, they must be converted to flowing sandface pressures, PwJ, for inclusion in the IPR, Eq. 6.37. The procedure used to convert sur­ face pressures to sandface pressures is identical to the procedure pro­ duction engineers use to perform systems analysis.1 3 Fig. 6.15 shows a wellbore completed in a multiple-layer simulation model. Vertical, Multilayer Well Models in Sec. discusses the techniques used to prorate the production rate of the well to the individ­ ually completed layers. Because it is generally assumed that PwJ corre­ sponds to the first (topmost) completion, these techniques are used from the first perforation downward. The techniques discussed in Verti­ cal, Multilayer Well Models in Sec. assume that the friction loss is negligible compared with the hydrostatic head. This assumption is valid for most practical situations. Exceptions to this may include high­ velocity wells, such as gas wells, commingled wells where there is a significant distance between producing horizons, or highly deviated wells. In general, however, the assumption of negligible frictional losses is not applicable from the surface to the topmost completion be­ cause these distances can be on the order of thousands of feet. The pressure drop in a length of tubing is governed by an energy­ balance equation of the form

TABLE 6.6-FORMULAS TO CALCULATE THE GEOMETRICAL FACTOR G IN EQ. 6.1 48 FOR CYLINDRICAL GRIDS1 2 G

Direction Radial

7!- ( ) ';J.k

An g ular

log 8 r; + 1I/ '; +

� IOg � r; + l / r; + I-S ) '; + J.k 1

6.2.2

)

10g r;+ I-S/ r; _ I-S d zk

6.2.2

Vertical

TABLE 6.7-FORMULAS TO CALCULATE THE GEOMETRICAL FACTOR G IN EQ. 6.1 48 FOR RECTANGULAR GRIDS1 2 G

Direction x

( ( (

)

(

dl dp

-

)

X;+ I-S - X; / kx;J.k + X;+ l - Xi + I-S / kx;+ l J.k

Y

Z

) )

M; dZk

( (

)

total

where

Yj + 1-S - Yj / kY;J.k + Yj + l - Yj + I-S / kY;J+ l .k M; dYj

l

:I

)

Zk+ 1-S - Zk / kz;J.k + Zk+ l - Zk+ I-S / kz;J.k+ l

3. Add greater definition in the near-wellbore region (in the area of high velocities). Incorporate well specifications as boundary conditions instead of as sourceS/sinks. When hybrid grids are used to model wells in coning situations, it is always preferable to use local grid refinement in the direction parallel to the well (at least to the contacts of the coning phases) be­ cause coarse grid layers between the well perforations and the fluid contacts may lead to numerical dispersion, which could defeat the original purpose of using a hybrid grid.

4.

6.5 Coupling Reservoir and Wellbore-Hydraulics Models

To make realistic reservoir forecasts in reservoir simulation, it is often necessary to specify the pressure of surface equipment. For example, this may occur when several wells are producing into a common man­ ifold, flowline, or separator. When surface pressures, Pth or Psep, are

and

dP dl

dP dl

= -

I

I

.

=

��

__________

l�-----

.J::----

-------��--

Z1

Z2 Z3

g

. () P g sm

=

C

��;:,

acceleration

=

I

..

p v dv g c dl '

..... (6. 149) .................... (6. 150) .. .. .. .. .. .. .. .. .. .. .... (6. 151) ...................... (6. 152) ,

6.149 6. 152

Eqs. through assume that Direction 1 is positive in the downward direction. Also note that 6.1 = I!1z for true vertical wells only. For deviated or horizontal wells, 6.1 > 1!1z. In most practical petroleum-engineering applications, the accel­ eration term can be neglected. This term is important, for example, in transmission lines going over hills and mountains or through val­ leys. Even when this term is neglected, the solution of Eq. for multiphase problems is beyond the scope of this book. Brown. et al. 1 3 give an excellent discussion of the solution of this equation. Fig. 6.16 shows a partial solution for a typical multiphase-flow prob­ lem in a vertical production well. This solution is a family of curves which are dependent on the surface pressure, Pth ; the watercut,/w ; and the gaslliquid ratio, RgL, or, equivalently, the gas/oil ratio. In Fig. only the dependence on RgL is shown. In most simulation studies, the tubing performance curves are generated with stand-alone runs of a surface-facilities, or pipe-flow, simulator. These curves are then read into the reservoir simulation model in a tabular form.

6. 149 6.16,

I :J:-----

l

dP ++, dl friction dl acceleration dp

gravity

gravity

friction

dP dl

I

z

Pressure drop equal to hydrostatic head plus frictional losses (calculated with techniques discussed In Sec. 6.5)

Pressure drop assumed equal to hydrostatic head (calculated with techniques discussed in Sec. 6.2.2)

z.

Fig. 6.1 5-Wellbore schematic of a well penetrating a four-layer simulation model. WELL REPRESENTATION

12 1


I Fixed RgLo Pth, and fw I

I Fixed Pth and fw I

-q .c Fig. 6.1 6-Typical tubing performance relationships for a multi­ phase production well.

Pth,fw, and RgL . The IPR, Eq. 6.26, can be rearranged as Pw/ = P_ + qsc Jw ' . . . . . . . . . . . . . . . . . . . . . . . . . . . . (6. 1 53)

-q1C

Fig. 6.1 7-Tubing-performance relationship and IPR for a typical production well. The intersections of these two curves are the operating points of the well.

Fig. 6.17 shows a single tubing perfonnance curve for fixed val­

ues of

which is a straight-line relationship (plotted in Fig. 6. 1 7) between Pwj and qsc (quadratic, Vogel 1 4 -type relationships can also be used). Example 6.10. For a multilayer simulation model, what are physical and mathematical interpretations of the variables used in Eq. 6. 1 53? Solution. The production rate from the well equals the sum of the production rates from the individual layers. That is,

(6. 1 54)

kEl/J w . Substituting the IPR's for the individual layers gives qsc = - L Jwk (Pk - Pw/k ) , . . . . . . . . . . . . . . . . . . . (6.96) k where k E l/J w . The sandface pressures can be estimated with the

where

pressure at the reference depth (depth of the top completion) and an average wellstream gradient. . . . . . . . . . . . . . . (6. 1 00b) where k E completion,

l/J w , which neglects friction losses from the reference Hrej. Substituting into the IPR yields qsc = - � Jwk P k - [PHfre/ + Ywb(Hk - Hre/)] ,

where kE

{

}

. . . . . . . . . . . . . . . . . . . (6. 1 55)

l/J w

After further rearrangement,

L JWk[P k - YWb(Hk - Hre/)] + qsc

k

and kE

l/J w in Eqs. 6. 1 56 through 6. 1 5 8 . Note that (6. 1 59) Pk = Pk - Ywb(Hk - Hre/) , where P k is the datum corrected pressure ofPk at Depth Hrejderived from the average well stream gradient Ywb . Substituting Eq. 6. 1 59 into Eq. 6. 1 57 yields

L Jwk Pk +

qsc k pw/re/ = where k E l/J w. Finally, note that

L JW/Jk

k -; ;15 = _:.:. . . . . . . . . . . . . . . . . . . . . . . . . . . . . (6. 1 6 1 ) Jw.. _ where k E l/J w, i s the PI-weighted average value of Pk ' which upon substitution in Eq. 6. 1 60 gives qsc (6. 1 62) Pw/ref = P_ + Jw . Comparing Eq. 6. 1 62 with Eq. 6. 1 5 3 gives the following final re­ sults of this example. I. pressure at Reference Depth (topmost completion). 2. PI-weighted average value of the well block pressures (corrected to with the average well stream gradient, 3. sum over all PI's of the open completions (k E

P w/re/ = 15 = Hrej, Jw =

p W/re/ =

1 22

Hrej

Ywb) . l/J w).

Fig. 6. 1 7 plots both the tubing-perfonnance relationship and the IPR. Note that the slope of the IPR is the negative reciprocal of Because the well must obey both the tubing-perfonnance relationship and the IPR, the well must operate at the intersection of these two curves. Two operating points exist in Fig. 6. 1 7 . Further examination of these two points is required before the production rate and flowing pressure of the well can be established. Once established, these well conditions can be used to prorate production to the various simula­ tion layers with the techniques discussed in Vertical, Multilayer Well Models in Sec. 6.2.2. Our discussion begins with the operating point for the higher val­ ue of -qsc in Fig. 6. 1 7 marked "stable operating point." Consider a slight fluctuation in the production rate:

. . . . . (6. 1 05)

q /sc or

(6. 1 60)

Jw.

l/J w , or rearranging, (6. 156)

where k E

(6. 1 58)

. . . . (6. 1 57)

= qsc + e .

(6. 1 63)

If e is positive, the tubing exerts additional backpressure against the sandface (that is, for a positive e, the value of described by the

Pwj

BASIC APPLIED RESERVOIR SIMULATION


*

B-1

B-2

WELL NAME

<

"'

B-4 •

Fig. 6.1 8-Well locations and well blocks in A-1 reservoir.

tubing-performance curve is greater than the value of PwJ described by the inflow-performance curve). Consequently, the production rate drifts back to qsc . On the other hand, if e is negative, the well will be slightly underbalanced and the production rate will again drift back to qsc . Thus, the rate at the higher value of -qsc is referred to as a stable operating point. The arrows in Fig. 6. 1 7 refer to the direction in which production will drift with any fluctuation in qsc . Now investigate the operating point for the lower value of -qsc marked "unstable operating point" in Fig. 6. 1 7 . A positive fluctua­ tion in -qsc creates an underbalanced-pressure situation causing-qsc to increase (eventually terminating at the stable operating point). On the other hand, if e is negative, the tubing exerts a greater backpres­ sure and further chokes back the well. Eventually, the well loads up and ceases to flow. Therefore, there can be two mathematically feasible operating points for a given tubing/reservoir configuration. Because all wells, in prac­ tice, exhibit fluctuations in production, physical considerations dictate that the wells produce at the stable operating point. The algorithm for converting a specified surface pressure Pth , to a sandface pressure, PwJ, and well rate, qsc, can be summarized as follows. 1 . Assume values of %sc , qwsc , and qgsc . These are usually chosen to be the values at the old time level, In . 2. Calculate the total well productivity, Jw, as (6. 1 58) where k E 1/Jw. Calculate the wellblock pressures corrected to the datum depth of the reference completion, HreJ,

3.

YWb(Hk - Hre!), where k E 1/Jw , Pk

W- l

(7.7)

W-2

(9.3)

+

(6. 1 59)

(6. 1 O Ib) . . . . . . . . . . . . . . . . . . . . . . (6. 1 64) WELL REPRESENTATION

W-3

W-4

(4.4)

(3.2)

- O.25 h

IOIl �16 r' 912 1,

1511

� .•'=' C ,

386 h

43911

L�/ r------:

B-3

=

Dimensions

Location

r.

+

Pk

WELLBLOCK

40 It

r.

=0.25 tt

!I /tt1749111 "'s96fi

� H· lm 30ft

,. - O.25 fl

;

::.>

404 fi

491 h

W-5

(6.4)

- 491

'. · o.lS h

It

S6l lt

Fig. 6.1 9-Wellblock configurations for the five wells of the A-1 reservoir (note that vertical scale is magnified).

4. Calculate the PI-weighted average value of

Lk JwkP k j5 ....;,---: Jw where k E 1/Jw . =

__

Pk.

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . (6. 1 6 1 )

5 . Calculate the watercut,fw, and RgL at sandface conditions. from the assumed values of qosc . qwsc , and qgsc · (6. 1 65)

. . . . . . . . . . . . . . . . . . . . (6. 1 66) 6. Using the specified surface pressure, Pth , and the calculated values of fw and RgL , select the appropriate tubing-performance curve from the tables that were read for the well. (See Fig. 6. 1 6.) 7. Estimate the intersection(s) of the tubing-performance curve (Step 6) and the IPR defined by j5 and Jw. Define PwJ and -qsc from the stable operating point (the intersection point with the highest value of -qsc) in Fig. 6. 1 7 . 8. Use the techniques described i n Vertical Multilayer Well Mod­ els in Sec. 6.2.2 to prorate qsc to the individual wellblocks (k E 1/Jw). 9. Check the resulting values of %sc , qwsc, and qgsc . If they are sufficiently close to the starting values, the solution has converged. Otherwise, update qosc , qwsc , and qgsc and continue with Step 2. If a sandface pressure or rate is specified, this procedure can be reversed to calculate the resulting surface pressure. Finally, a similar procedure can be used for injection wells. 1 23


TABLE 6.8-WELLBLOCK PROPERTIES AND PI VALUES ax

ay

h

J!!L

J!!L

(3,2)

491

404

30

(6,4)

561

491

32

Well

Wellblock

W-1 W-2 W-3

(7,7) (9,3) (4,4)

W-4 W-5

912 439 596

.� values are calculated for !, = 1

316 386 491

cp,

B= 1

J!!L

10 15 40

RBiSTB.

kx (darcies)

(da ieS)

k (darcies)

0.280 0.270 0.297

0.224 0.2 1 6 0.238

0.250 0.242 0.266

0.280

0.224

0.280

0.224

(STBID-psi)

1 29.3 81 .4 1 07 . 1

2.833 4.438 1 2.432

0.250

88.2

9.054

0.250

1 03.8

9.396

5 = 0, and F= O with Peaceman's5 approach.

6.6 Chapter Project

Fig. 6.18 shows five wells completed in A- I reservoir. The grid sys­

tem is designed so that not more than one well is in a gridblock and wells occupy approximately central positions in their respective blocks. Furthermore, specific attention is given to ensure that no wellblocks are next to an existing wellblock. Fig. 6.19 provides the dimensions of the five wellblocks of A- I reservoir. Note that all wells are assumed to be open completions and to penetrate the formation fully. In other words, the entire for­ mation thickness of a wellblock is exposed to the well. Table 6.8 gives a detailed description of the wellblock properties and the PI's of the wells located in A- I reservoir. Exercises

6.1 Compare the flow rates generated by the model of van Poollen et al. 2 and Peaceman's5 model for the following data: � = !l.y = 600 ft; h = 40 ft; kx = ky = 1 00 md; Pwf = 350 psia; po = p = 1 ,600 psia; p, = 2 cp; B = 1 . 1 RBISTB; s = 0; rw = 0.25 ft.

* Jw

eft)

1 . Assuming incompressible fluid behavior, calculate the flowing sandface pressures at the midpoints of Layers 2 through 4 (use a fluid density of 53 Ibmlft3 ). 2. For the flowing sandface pressures calculated above, a numeri­ cal simulator calculates the wellblock pressures for Wellblocks 1 through 4 as 2,400, 2,443, 2,479, and 2,503 psia, respectively. First calculate the PI for each wellblock, then calculate the total flow rate out of the well. Use Peaceman's5 equivalent-wellblock-radius con­ cept. Assume that p, = 1 .3 cp, B = 1 .00 RB/STB, Sk = 0 for all well­ blocks, and rw = 0.27 ft.

6.7 Investigate the effects of well length, tion, Ud, on Eq. 6. 1 23 .

L,

and degree of penetra­

6.8 What are the effects o f well location and drainage volume on the productivity of a horizontal wellbore? Use the Babu and Odeh9 model in your investigation.

6.3 Compare and contrast the equivalent wellblock radii calculated with Eqs. 6.30 and 6.35 for different aspect ratios of !l.y/�.

6.9 Compare and contrast the PI's of Eqs. 6. 1 2 1 and 6. 1 23 for a giv­ en anisotropic porous medium. Under what conditions do these two equations generate similar values, and when do they deviate? Note that, to make a meaningful comparison, you must write both equa­ tions for the same orientation of the horizontal well. Furthermore, assume that the horizontal well fully penetrates the wellblock (set S = 0 for both equations).

6.4 Calculate the equivalent wellblock radius req with the Abou­

6.10 Consider single-phase, incompressible fluid flow taking place

6.2 Repeat Exercise 1 for � = !l.y = 200, 400, 800, 1 ,000, and 1 ,200 ft, and state your observations.

Kassem and Aziz6 model for a well in a corner block in a block -cen­ tered grid as shown in Fig. 6.20.

6.5 Calculate the equivalent wellblock radius req with the Abou­

Kassem and Aziz6 model for a well in a corner block in a point-dis­ tributed grid as shown in Fig. 6.2 1 . 6.6 Consider the multi block well completion shown in Fig. 6.22. At

the middle of the top layer, flowing sandface pressure is specified as 1 ,643 psia. to

• 'a

i I

o z I

Al

; c: ::I o III

3e

,;r� o

it 3 o

7.

:

� I

"�I-

..

�.�I

4X+

7.

z

2e

___

No-Flow Boundary

Fig. 6.2D-Well in a corner block in a block-centered grid. 1 24

6.11 Consider the body-centered grid representation of a I D reservoir as shown in Fig. 6.24. The reservoir has homogeneous property dis­ tribution and is 1 00% saturated with water (assume zero compressi­ bility). Gridblocks 1 and 4 are kept at 3 ,500 and 3 ,000 psia. respec­ tively, by strong edgewater drives. The well in Gridblock 2 (with rw = 0.5 ft) is produced at a flowing sandface pressure of Pwf = 2,000 �

III

it

in two identical one-dimensional ( l D), homogeneous reservoirs shown in Fig. 6.23. As indicated in the figure, the boundary condi­ tions imposed on both systems are identical. The only difference is the values of skin encountered at the wells. How would you compare the expected flow rates from these two wells? Explain.

-----

I-

...

(!), ,,, '

2 _ No-Flow Bou ndary

Fig. 6.21-Well i n a corner block i n a point-distributed grid. BASIC APPLIED RESERVOIR SIMULATION


....... k., � 200 mel,

ky, .

k •• =

k,. = 1 1 3 me1,

h2 =

k., " 80 m d,

ky , " 93

h� = 1 1 I I

k=1

k=2

kz3

k=4

Bo Bw

142

mel,

40

met , h , = 7 II

met,

a ll

Fig. 6.22-Multlblock wel l completion of Exercise 6.6.

I

--=- .. e.....e

-+

--- x

( b)

_____

.

_ .....Flow Boundary

=II

ap = �.1 paUli a.

_.+ •• . .. +2

••

.

e

+

e

I .. P

I

...--_...._-

pol.

· , .250

p.. =' .250 polo ......

Fig. 6.23-0ne-dimensional reservoirs of Exercise 6.1 0.

Fig. 6.24-0ne-dimensional reservoir of Exercise 6.1 1 .

psia. Calculate the pressure distribution i n the reservoir and the pro­ duction rate from the well. Also consider the gridblock properties 1 00 ft; Ax 800 ft; Ax 20,000 ft2; kx 36 md; tP 17%; - 2.0; and fluid properties c = O psi - I ; B = 1 .0 RB/STB; and .u 1 .0 cpo

h= s= =

=

=

=

=

6.12 Investigate the change in PI of a horizontal well as a function of

the formation thickness. Use Babu and Odeh's9 model in your analysis. Nomenclature

a = constant aj = distance from well to its jth image, L, ft [m] A = area defined by Eq. 6. 1 25, L2, ft2 [m2] = exponent in Eq. 6.86, = 1 / � Ti ,

b

(b

Bg B/

= =

)

dimensionless OJL3 , reservoir volume/volume at standard conditions gas FVF, L3JL3 , RB/scf [m3/std m3 ] FVF of Phase I , L3JL3 , reservoir volume/volume at standard conditions

B = FVF,

WELL REPRESENTATION

FVF,

g

8c

!. �.1 p'lnl

FVF,

F

.. (.)

= oil L3JL3 , RB/STB [m3/std m3 ] = water OJL3 , RBIB [m3/std m3 ] c = Ax = constant c 1= compressiblity of Phase I , Lt2/m, psi - I [kPa - I ] CH = function defined by Eq. 6. 1 26 d = !1y = constant D = inner diameter of tubing, L, ft [m] f= fraction of well flow associated with wellblock in Eq. 6. 86, dimensionless fm = Moody's friction factor (Eq. 6. 1 5 1 ) fw = water cut at sandface conditions, dimensionless = specific function defined in Table 6.5 = acceleration of gravity, Ut2, 32. 1 74 ftlsec2 [9.8066352 rnIs2] = units conversion factor in Newton's law Gw = well geometric factor h = thickness, L, ft [m] hi.j = thickness of Gridblock UJ), L, ft [m] � = thickness of Wellblock k, L, ft [m] depth to Wellblock k from datum, L, ft [m] Hrefk = depth of topmost completion, L, ft [m] H = Jw = well PI or injectivity index, L4t1m, STB/(D-psi) [std m3/(d ' kPa)] JWk = well productivity assigned to Wellblock k in well k= permeability, L2, darcy f,um2] kH = horizontal permeability, L2, darcy f,um2] kHk = horizontal permeability of Wellblock k, L2, darcy f,u m2] kr/ = relative permeability to Phase I, dimensionless kx = permeability in the direction of the x axis, Icy = permeability in the direction of the y axis, L2, darcy f,u m2]

L2, darcy f,u m2]

= permeability in the direction of the z axis, L2, darcy f,u m2] kX iJ.k = x-direction permeability for Gridblock (iJ,k), L2, darcy f,um2] kY iJ k = y-direction permeability for Gridblock (iJ, k), . L2, darcy f,u m2] kZ i k = z-direction permeability for Gridblock (iJ,k), J. L2, darcy f,u m2] kOiJ k = O-direction permeability for Gridblock UJ,k), L2, darcy f,u m2] 1 = length segment of tubing, L, ft [m] !11 = length interval, L, ft [m] L= well length, L, ft [m] = pressure, mlLt2, psia [kPa] kz

,

P

p = average reservoir pressure,

rnIU2,

psia [kPa] pressure difference, mlLt2, psi [kPa] !1PD dimensionless well pressure drop defined by Eq. 6. 1 2, dimensionless Pe external pressure, mlLt2, psi a [kPa] initial pressure, mlLt2, psia [kPa] Pi Pi.j.k pressure for Gridblock (iJ,k), mlLt2, psia [kPa] pressure for Wellblock k, mlLt2, psia [kPa] P k datum corrected pressure of Pk at the depth of the topmost formation, mlLt2, psi a [kPa] pressure for Wellblock k, mlLt2, psia [kPa] Psep separator pressure, mlLt2, psia [kPa] surface pressure, mlLt2, psia [kPa] Pth flowing well bottomhole pressure, mlLt2, psia [kPa] flowing well bottornhole pressure for Wellblock k, mlLt2, psia [kPa] = flowing well bottornhole pressure for the bottommost wellblock, mlLt2, psia [kPa] flowing well pressure at reference elevation, mlLt2, psia [kPa]

!1p = =

= = = Pk == p Ok = = = Pwf= P wfk = P wfnk P wfref =

1 25


sppseciiafie[kdPa]flowing bottomhole pres ure, mJLt2, ffuuncncttiioonn dedefifinneded byby Eq.Eg. ffuuncncttiioonn defidefinneded byby Eg.Eq. diprfremoducensgastiiooprnlnoerducsateftlorioownflrroaawtteerdeaattefis,tnaL3endda/tby,rBIDd Eq.condi[m3ti/odnsj , gasL3Ofpr/tt,,ossducecffIDIDtio[[nssttrddatm3m3e a//tdds]]tandard conditions, oilL3pr/to,ducSTBIDtion r[asttde am3t s/tda]ndard conditions, prOfoduct, tSTBID ion rate[sattdsm3tan/dad]rd conditions, peOfrturt,bSTBID ed produc[sttdiom3n r/adt]e at standard conditions, WelL3l/btl,oSTBID ck [flstodwm3ra/tde]at standard conditions, pro[sductd m3tio/nd]rate from Wellblock L3/t, STBID dd prweolducflotiwonrartaeteat standard conditions, ssppOfececiififit,eeSTBID wat[setdr flm3ow/dr]ate[sattdstm3andar/d] d conditions, L3/t, BID disctoaorncdeininatreasdiyastledim,reL,ctifotn[min]cylindrical rdradiaiunasgdee firandeidusby, L,Eg.ft [m] requiadiuvsalofentexwelternlblalobounda ruys,, L,L, ftft [[mm]] c k r a di equiL,vftal[emnt] wellblock radius for Wellblock eqiuin vthaleent welplalne,blockL, rftadi[mu]s of Gridblock equiL,vfalt [emnt] wellblock radius for Wel block disWeltancl je, beL,twfte[mn]neighboring Gridblock and welaverlargaediwelus, lL,raftdiu[ms,] ft [m] GLRRBIaRtB,sand[mf3a/cme 3condi] tions, L3/L3, sskkiinn ffaaccttoorr,fdiormWelensliblonloceks dimensionles parmechani tgas isaaltupercanalteiotsrn,kaitniforfnaaccstiktooinrn, fdiacmtoensr, diiomnlenses ionles gaswatesratsuartautriaotniofn,orfWelractlibolnock fraction twadiimmte,eensrts,aidaysotunlraetsiontimfoerdeWelfinlbedlobyck Eq.fraction timt,edaysto reach pseudosteady-state conditions, intGrerfidacbleotcrkansamnids weibillibtylofcokr (fldoewfinbeedtwine n trabyTansbmEq.leis ibiltydiofmenscouplionlinegs cell defined !!i cocL,roeorftspd[ondiimna]tengindithmeensioplnaofne, L,iftn t[hme] plane, !!i cocL,roorefstpd[ondiimnat] enigndithmeensioplnaofne,!!iL,y ifnt [tmhe] plane,

P W['P =

Pxyz = P�. = p .= .� Py = q= qo = qfgse =

6. 1 3 1 6. 1 32 6. 1 35 6. 1 34

=

Xw

qose =

Yw =

=

=

= = Zo =

k,

q,P = qspsc =

a=

Pc =

rw = rw = RgL =

L,

s= Sk = Sm = sp = Sg = Sg k = s.., = SWk = t= to = tpss =

k,

i

6.2),

=

6. 148

= u =

u

v

v

= =

Pise =

u

v

u-v

Ax

u-v

u-v

u-v

6. \ 0 1 ),

()

k,

I

Pose =

Pwse =

if> = t/Jw =

k,

6.20

4. 1

/-l = /-lk = P= Pgse =

k,

T; =

m ± Y2

e= Oj =

k,

i

y = 0.5772 1 57

fWb =

(i,j, k)

r jj =

4. 1

2.2,

y= Yc =

(i,j),

reqk =

(i,j),

y=

6.73

u-v

6. 1 1 ),

4. 1

ai,} =

r=

UV = req ij

/ Ax ) ,

(a =

ae =

qwsc =

rUV = ro = re = req = reqjj =

(i,j),

!!iYi,j =

(i,j)

q sck =

6. 1 1 ) ,

y=

Ymid =

q SCjj =

(i,j),

Xo =

qgse =

q 'se =

1 26

=

Ax = Axi,j =

6. 1 9

qse =

T,

x dicstoaorncdeininattehseyxstdiemre,cL,tioftn i[nmt]he Cartesian welwel cl oborlocdkingrateidipoin thnet,xL,difrte[cmtio] n with center at x-xdifcdoierorreecdntiicnoeantaleleoofnnggtthhtheofecentxGrdieirdreblofctoiotchkn,e L,horftizL,[omntf]ta[lmwel] l disicntoaortnchdeeix-ninaztteplhseayneystdie(m,FreicgL,t.iofnt i[nmt]L,he ftCar[mte]sian miL,dpoift,n[tmc]oordinate of wel in y direction, wewel cl oborlocdkingrateidipoin thnet,yL,difrte[cmtio] n with center at !!iy y-difdierreecnticoenalleonnggththofe yGrdiirdeblctoiockn, L, ftL,[mft] [m] z disctoaorncedininattehseyzstdiemre,cL,tioftn i[nmt]he Cartesian !!i!!ilkz ztdihcficoekorrnesednicnseaoftale oaofngblthotehckecentzfodirertrheofcte ktitohhn,elaL,horyeftriz, [oL,mnt]fatl[welm] l asvolipnuectmetherax-ctoizonverplansieon(!!iFfyiagc. tor whosdiL,meensfnumet [imonl] reiscal asWelvalpecutleblraiosticogikfvoenr thinediTabllmatenserealiodinlmesensions of tranumer nsmisicibalilvalityuconver sienonifnaTactobrlewhos2 2e e i s gi v flupsidi/grft a[kviPatylmde]fined by Eq. mJL t , Eulgraveirt'ys ccoonvernstantsio, n factor whose numerical value mulgristagiidiphaveennstei(nhydrETablq. oestatic mJweLl 2bort2,epsprilfets [ukrPale m] !!i pedierlteruemrcbteainontnc,eL,bloftck[mdi]mension of cylindrical vivissccososiittyy,imJn WelLt, clbplo[Pcka' s]mILt, cp[Pa·s] degasn-spithasy, mle densL3, Iibtymlaftt3sta[kng/damrd3]conditions, mJL3, deIInbbsmlmlfityfttof33 [[kkPhasg/g/mme33]] at standard conditions, mlL3, oilIb-pmlhasfte3 dens[kg/mity3]at standard conditions, mJL3, watmJerL-3p,hasIbmlfte de3n[skitg/y mat3s]tandard conditions, porset oofsitblyo, cfrkasctpeionnetrated by a well cololuddr tietinmertea(stoitorenpnew) timestep creufrereenntcieteration perturbed gasindephasx foreblock penetrated by well iinndedexx ffoorr bloiol,cwak penetter, orragasted by well waoil tphaser phase e

Superscripts

n = +1= ( v) = ( v + I) = o= n

Subscripts

g= k= I= m= 0= w=

(k E t/Jw)

(m E t/Jw )

BASIC APPLIED RESERVOIR SIMULATION


Reference. 1 . Odeh, A . S . : "An Overview of Mathematical Modeling of the Behavior of Hydrocarbon Reservoirs," Soc. ofIndustrial and Applied Mathemat­ ics Review (July 1 982) 24, No. 3 , 263.

2. van P oollen, H.K., Breitenback, E.A ., and Thurnau, D.H.: "Treatment of Individual Wells and Grids in Reservoir Modeling," SPEJ (December 1 968) 34 1 . 3 . Matthews, C.S. and Russell, D.G.: Pressure Buildup and Flow Tests in Wells, Monograph Series, SPE, Richardson, TX (1 %7) 1. 4. The Theory and Practice of the Testing of Gas Wells, third edition, manual, Energy Resources Conservation Board, Calgary ( 1 975). 5. Peaceman, D.W. : "Interpretation of Wel lblock Pressures in Numerical Reservoir Simulation With Nonsquare Gridblocks and Anisotropic Permeability," SPEJ (June 1 983) 53 1 .

6 . Abou-Kassem, J.H. and Aziz, K : "Analytical Well Models for Reser­ voir Simulation," SPEJ (August 1 985) 573. 7. Nolen, J.S. and Berry, D.W. : "Tests of the Stability and TIme-Step Sen­ sitivity of Semi-Implicit Reservoir Simulation Techniques," SPEJ (June 1 972) 253; Trans .• AIME, 253.

8. Aziz, K. and Settari, A . : Petroleum Reservoir Simulation, Applied Sci­ ence P ublishers Ltd. , London ( 1 979) 1 04- 1 05. 9. Babu, D . K . and Odeh, A .S . : "Productivity of a Horizontal Well," SPERE (November 1 989) 4 1 7 .

WELL REPRESENTATION

1 0. Peaceman, D.W.: "Representation of a Horizontal Well in Numerical Res­ ervoir Simulation," SPE Advanced Technology Series (April 1 993) 7. 1 1 . Nghiem, L., Collins, D.A . , and Sharma, R . : "Seventh SPE Comparative Solution Project: Modeling of Horizontal Wells in Reservoir Simula­ tion," paper SPE 2 1 22 1 presented at the 1 99 1 SPE Symposium on Res­ ervoir Simulation, A naheim, California, 1 7-20 February. 1 2 . Pedrosa, O.A. Jr. and A ziz, K . : "Use of a Hybrid Grid in Reservoir Sim­ ulation," SPERE (November 1 986) 6 1 1 ; Trans. , A IME ( 1 986) 281. 1 3 . Brown, K.E. et al: The Technology ofArtificial Lift Methods. PennWell Books, Tulsa, Oklahoma ( 1 977) 1 -2. 1 4. Vogel, J . V. : "Inflow Performance Relationships for Solution-Gas­ Drive Wells," JPT(January 1 968) 8 3 ; Trans. , AIME ( 1 968) 243.

51 Metric Conversion Factor.

bbi cp ft ft2 Ibm md psi psi - 1

x 1 .589 873 x 1 .0* x 3 .048* x 9.290 304* x 4.535 924 x 9.869 233 x 6.894 757 x 1 .450 377

E -01 E - 03 E - 01 E - 02 E - 01 E - 04 E + 00 E - 01

= m3 = Pa ' s =m = m2 = kg = ll m2 = kPa = kPa - 1

'Conversion factor is exact.

1 27


C h a pter 7

So l ut i o n of Li nea r D iffe re nce Eq u ati o n s

7. 1 I ntroduction

Thetmatral-hpseromolucesattiiocsnianlofg-teulcinihnnieart-qinuessteynsstpreivmseesesofntetepsedqiuatinn rtiehosenserprvioisevoneriosiusmofulcthahatepiotmosn.ersAltrecen­lstuhlet cuscappronssiodone-xiermtatdwiio-amonensofndiaotnalPDEhre (-IcdDainm) beensreswreiorivnatoielrn(2ianDpmaplainctdraitx3D)iofnsorcas,mand,. Fiesr.slta, tweer,diwes­ ilinneara setorofnonlalgebrinearaiccequatharacitoensr ofthatthemaysysbetemlinofeareqoruatnonlionsinieas rde. Theter­ miferneendtiabyl etqhuae natiotnsure(PofDE'thes)pr] andobletmhe[lnainteuarreorofnonlthe ifinneaitre-padirftiearle-dnicfe­ tion, Eq. 4.56, as applConsied tiodear1tDhehorinciozmprontaelsreibselerv-floiurid(V-f<Plow equaEvenniaptpre-dowhenxiifmeraetniaocnnonle appr(explinearoixicimtsyoratstieoimmnspl,oftihceesiqt uatetreeqaiouattmnseioinsnstobtofcaatnhinbeeedccofoernvefofimcritethentedsfit)o­. . . . . . . . . . . . . . . . .. ( 7 . 3 ) ltiinoearn prfoocremsshby.owsusethofe althgeebrlineaaicr-izsoatluiotniotnecsthenipqinuethsedirsecseusrvseoidr-insiChap. Suppos7.3eovewerwantthe ditoscirmeplteesmentystema fiinnite-dif ereFurncethapprermoroxiem, fatoriosnimto­ m ul a ­ Eq. pl i c i t y , as s u me t h at we ar e deal i n g wi t h a homogeneous s y s t e m Thi s c h apt e r deal s wi t h t h e s o l u t i o n of l i n ear s y s t e ms of e q uat i o ns wher e t h e pe r m e a bi l i t y di s t r i b ut i o n, t h i c k nes s , and wi d t h of t h e r e of the form .................................. (7. 1) ercovmproir areseibunilefsoyrsmtemthrandoughouta homogeneous . Because werearseervdealoir wiingthwiretshpaectn intso­­ wheand re vectosqruaofreunknown coefficivalentumaes.trNumeix, rousvecatlogrors iofthmsknowncan bevalusueesd, every property, Eq. 7.3 can be rewrit en .as. . . . . . . . . . . . . .. (7.4) ttmeoagsteohslodsvaenadagindidvseiadndvantesnytsifiteaemges tofhs.eliThiirnienashercerhqeaptuatnt advant ironsin,treoaaducgechswieasnthdsedidivessrtaiadnlvacoft nadvan­ttahgeesse. e ........................... (7.5) cWihaptth efrewareexbacespedtioonns,thmose cotntofentthofe etxhample preecsedainndg aclhgaptoriethrsms. in this orwhere Apprtfelumsid oofflxioewmqatuatininporigonsthoeusofconttmediheifnouousarmby fidinffiteer-ednifftiaelreenqcuates iyionseldtshatlindeeasrcsriybse­ FisygsAgait.e7.m2nconss, htoowsissitmsaofplwelisfiyxltunihinisfGrdiorismdcbluslyosscipokan,c5easprd,sobluducmeockint-hcgateantttheareeriadmtegrposofidebldogrckAtisd. t h e e x t r e m e l e ft of t h e s y s t e m, t h e pr e s u r e of Gr i d bl o c k 1 i s kept c o ns t a nt and, at t h e e x t r e m e r i g ht of t h e s y s t e m, t h e r e s e r v oi r i s c om­ .. . . . .. (7.2a) pleThetelycseenatlreadl-;dtihffaetriesn, caeno-apprfloowxiboundar y exi s t s . mation ofEq. 7.5 writ en for Grid­ block is ( ) ............ (7.6) ( 7 . 2 d) beknowwrit etnhefoprr tehseublreocinksGrwheidblreotchke Ipr, ietsisurexce isluunknown. ded f,rtohme Theunknowns refore, we are conc,erned with a sysctoeemffiofcientesq, uatioansndrelraigtihtng­ whiblBectheocscakehustprcofeaenweunknowns . I n addi t i o n, Gr i d bl o c k 5 ha s t w o unknowns sidBefe meorme webersde, dj.scribe the application of various algorithms to solve differences apprure oanxidmtatheioweln (El q.sandf7.6a) cfeorprGresidublreo.cWrks iting2 tthherofughinite6­ systems ofequations, we show step by step how the finite-difference generates the fol owing system of equations. 7.2.1 Difference Equations for ID Flow Problems. Incompress­

ible-Flow Equation.

=

8. Fig. 7.1

[A]x x

=

[A]

Vp ).

Fig. 7.2.

d,

d

=

=

=

iJ 2 q sc iJ x� + PcR"'k" Vb Vb Ax A x.

7.2 Difference Equations in Matrix Form

=

0,

=

qsc.

a llx l + a 1 2 x2 + a 13x3 + . . . + a l n x.

=

dl

i

Pi+ 1 - 2Pi + Pi - I + (A x) 2

n

(x}, X2, X3 . . . , xn);

n

X

n

n

aij;

",q c R k"sVb Pc

i

=

0,

n

i=

1 28

BASIC APPLIED RESERVOIR SIMULATION


NONLINEAR ALGEBRAIC EQUATIONS

NONLINEAR POE'S

PRESSURE, SATURATION DISTRIBUTIONS, AND WELL RATE

LINEAR ALGEBRAI EQUATIONS

NU MERICAL RESERVOIR­ SIMU LATION PROCESS

Fig. 7.1 -Algebraic solution in the reservoir simulation process (redrawn from Ref. 1 ).

- 2P 2 + P3 = - P I

.......................... ( 7 . 7 a ) for 0 . . . . . . . . . . . . . . . . . . . . . . . .. ( 7 . 7 b) for 0 .......................... ( 7 . 7 c) for f3ckxVb ................ (7 .7d) pres ible-flow equation that describes a time-dependent problem. faonrd 0 .............................. (7.7e) In this discBus;Ilsi,oqn,,sc we assume that B B'; then the resulting PDE is ( 7 . 9) fcoornditi6.on,NotanedtthhaattEq.Eq.7.7.77ediminplcleumdeesnttshtehienno-nerfl-booundaw outreyr-bcooundanditioryn where f3cork,Vb Thef3<P1l,cfian,ietkxe, -differen..ce ................ (ffolromw-ofrattehespseinckifitceartmio,n)qsc., whiThechliinseiamrpossysetedmonoftheqeuatsysiotensmcianntbehe wrspacit eenanfdorbaGrckidwablrodc-kdiffwiertehncceenapprtral-odxiifmappreatreinoconexiinapprmtatimiooenxiismtoatEq.ions7.i9n writ en in matrix form as B;Il , q,sc ) ( <P1l,a e, ) ( ) ( 0 0 0 00 f3c kxVb f3c c kx 10 1 1 I 0 .................... ( 7 . 1 0 ) unknowns a r e t h ep t e r m s a t Ti m e Lewheverle termI.orsColon ltIehncetEq.irnigght7.al1sl0idt,hetehofeunknowns on t h e l e f t s i d e a n d t h e 00 00 0 - 1 n f3ckx0 Vb known the equation yields ..................... ( 7 . 8 ) wrdiaEq.igonalt en7.a8lsotingrluucasttulriranete,ecsothmposthearte,swheeudltiofnngatchmaoeefffininicdiitieean-gonaldtimaf etrr,eianxncaeuppelweqayuatrschasioodinsaago­tarrie­ 1 (B;Il,q,sc ) ( <PIl,e, ) ing the syblstoecmk profelsinuearresefqouatrGrioinsd­ - f3ckxVb f3ca c kxAt rnalloepck,reassnednthaterldooughbyweEq.r6.coAft7.dia8egonalyir seoldlvs. iSoltnhgefvunknown or block pres ures, one of the wel ..................... ( 7 . 1 I ) sure for the well located Gridblock If the physics of the wheAgare in, wroriting Eq. 7. I I for every gridblock in the 1D reservoir problem dictates, we could also have started with the slightly-com- yields a tridiagonal coefficient matrix. shows the resulting Wellblock, Flow· Rate Specified

q..,

Constant-Pressure Block

i = 2,

P 2 - 2P 3 + P 4 =

P3 - 2P 4 + Ps = i = 3,

No-Flow Boundary

i = 4,

Fig. 7.2-0ne-dimensional discretization of a homogeneous reservoir.

,Uqs,(Ax) 2

i = 5,

a 2p ax2 +

Ps - P 6 =

i=

w.

0

2

0

- 2

- 2

P3 P4 Ps P6

(A X) 2

,Uqs« Ax) 2

+

2

models in Chap.

+

6 can be used to obtain the flowing sandface pres­

i

n+I (Ax) 2 P i + 1

P7 + I - P 7 j At '

=

i

P ni ' i

-

w.

l=0

in 5. Slightly-Compressible-Flow Equation.

+

w.

1=0

n

.

i

p7�i - 2P 7 + I + p7:i

- PI

-

at '

=

1=0

- 2

ap

=

Fig. 7.3

{ 2

�1lC ]

(6x i + ll.aJ<.6t

[ (�}2) 0

L6�)2 ] �c ] [ 2 2 + �.a.k,6t (6X)

L6�)2J

0

0

0

0

0

[ (6�}2 ) C ] [ 2 P.a.�,k,t\t (6xl

+

[ (6�}2 ) 0

0

p;

0

0

prl

L6�)2 { (6xl2 +

] �1lC

1l.aJ<,6t

[ (6�l]

) -

[ 1

0

0+1 P.

[ (6�)2)

Ps+

�IlC

]

(6xl + P.a.,k,6t

[ P.a.�C,k,6tJ . [ I ]

+1

0

1

0+1

P6

-

112 -

[ �c J [ ] - p.a.,k,6t P,

-

(6xl

Pt

- --p.a.k,6t P3

0

=

�c

[

0

]

- p.a.k,6t

[�'�BO]

Ps - p.Vbk, 0

[P.ct;,6t}:

-

Fig. 7.3-Linear system of equations resulting from the finite-difference approximation of Eq. 7.9, as applied to the 1 D reservoir in Fig. 7.2. SOLUTION OF LINEAR DIFFERENCE EQUATIONS

1 29


(if>f3Ilc a/Cc/(k�x�X)2 ) ( � + I �) (7 . 1 3 ) i where ( 1 . 1 27)((2100)(1)(4100)00)(0. 178) 0. 100 ((01..310)27)(1()5(5.61 5)1(00.-617)8)(4(00)10)2 0.021 saynsdteamlsooftheequatritdioiansgonaforlthstirsutcimtuere-dofeptehnedeconetfprfiocblienetmma(intrmaix etrxiplx ficoinn)tly. tIprinoetnshseimusbcaleseprtofbeobla tseiommlveundee-ddefpoerrncdemulonsntitdpripelroeablttieiommn,e,stthhteeeprese.nstForurliteisntgihnesythssletiegcmhtoeoflyffi-eccqoiuaem­n­t cacanteberistcicalfciunliatete-ddiffoerreeancche bleqouatckiionnthfoerstyhsitseprm.oTheblemretfaokrees, tthhee cfhoarmr­ amaberectraauisxsuedomeofnotdthteochlbeiannecgeaornsnafrtoatmunrtesoneaofndttihBlmeeorwasstiegpinatoasltuhPOEmee ned xt(oEt beq.eqc7.uaa9ul)sB;..eTheThianonlds iys p7�i -2.02IP7 +1 p7:i - O.lq/sc; - 0.02I 7 (7. 14) ethnatrtiaepspethaarticnhtahnegerigfhtor-seiadcehveticmtoerstbeepccaoumputse theartiiognhta-sriedethvee cpt7orenistrup­ies BeForforethwre fiitrisntgimthese tfiep,nitthe-ediinffietiraelnccoendieqtiuaontisotnsatefsothraetapch7 unknown 4, 0 00. ock, rwey croendicognitionsze (tihnenersyammend outtryerpr), eisneitniatlincotndihetipronsobl, reemse. rvTheoir ducdasurteetdevadaftluoterhstehaeberenegaiwnsnitiginmnegedsoftetopea(tThcheimoltiemdLeetsivmteeepls.teAsp I(c)T,oitmputmheemosLeatvitoernsleceanrvalet prcuoeen­ss­. blbounda tric with rpresepsecuatnrtedos,thwee cceann­ Thitionss obsdoneervonatitohne cisoeimffiportcienatntmabetrcixautsoesoitlvime plthiiesspathratticuanlayr scyosmputtem ofa­ ThetgeeromeofreftoGrrrye,i,darblnadtohblcekrotc4.hkaprnInsoopeotlvhriteniregsworfaorresdseysv,mmeen unknown ttehiqoauan.t ustAsioenswefanectsoehdrowiztoatlbeiaotnedoner,tethchisnionlisquewhyy oncs beseecvoaetmertahleofabet trhgaecintsiniovelnugftiooofrntthprheeoccslieamdsurulofeas­ tneshorlcoveughes afroyr 4.ttohe wriNotprteees uthrteheatofequa0.tht0eio21nsfiprs7etxfcolu0.ursi0v21blelyo(4ck,f0os,00)r sGro iidtbl84iosckonlasndyI prginoniblnegmofs whetherseimthuleactoioeffin. IcmieprntomavetmriexnitssftaoctBaorseidconlDiryeconct-Seol, uattiohne Albe­­ equa[(tB;ionsIl,�foxr)t/h(f3ce fiArxkxst ti)l este(-2,p are000)(0. 100) -200. The flow gorithms in Sec. 7.3. 1 discus es this in detail. 1 . 0 2I p �+1 p� + l - 84, ................. (7. 1 5a) r y , f o r I; steThiady-s srteastee,rvsoiinrglConshase-phastidheeerhomogeneous oithleflfoowl oiswitankignpr1g0oplperaerce.styervdioistrr,ibwheutiorensun­of whep�+re pl � + I2.02Ip3p+�I+1for noP3+1flow bounda 116 (7. 15b) hows trhyecuniondifotnnionsdimatenstheioex­ns for i = 2; if>of th3e0fi%niatned-dkxiffere1n7c8emd.blocks. The sbounda twereml seiendsn Gridarbleoscpkesc2ifaiendd a6sprno-oducfloewatbounda ry2,co0ndi00 tSTBIions Dand. Eathche fori=3;p�+ l 2.02IP3+1 p�+ l -84 ............ (7. 15c) a r a t e of grsyisdteblmocofk hasequatanioinsnitiwhosal speecsifoileudtipronesgiuvrees ofthe4,pr000es psurieadi. Obtstriabiutn itohne and 2 + 1 - 2.02Ip�+1 - 84, igen ntheerarteesethrveoisyrsattemtheofenedquaofti1o0nsda, ybuts. Usdoe nota timatesetmepptofto10sodayslve thtoe where p� + 1 3 + I for symmetry, for 4. (7. 15d) eaqteuatthieonsfi.nUsitee-dtihfeeirmenplceiciet,qbacuatikowarns. dAl-disfo,ernotencee sthchateme to1ge.0ncepr­, nalWhecoenffiwrcieitnet nmatin marix:trix fonn, these equations generate a tridiago­ - psi - and Bi 1 .0 RB/STB. Bl 1 .0 RB/Eq.STB,4.72 giv5es th1e0PDE 1 . 0 21 0 0 t h a t gove rn s fl o w i n t h i s I D s y s t e m . I -2. 0 21 l p r ',.-A1 xkxa1 axp ) �x qIsc -_ vabcif>cBO 1 ap . . . . . . . . .. (7. 1 2) aax (f3l� n 00 01 -2.2 021 2.I 021 pp�++ ll ]r' J whearpe B;llThilqslscequatif>io1ln ccanabep simplified (Se Eq. 4.78) as [ [ -84 ] 1 1 ................... (7.9) 116 . ax2 2 -84 whethe irme plicit bacandkcwaran bed-dexprif ereesnceed sicnhtemehe fin(siete-dEq.if e7.re1nc0)eafsorm with - 84 p7�i-2p7 + l + P7:i (B;ll l qlsc ) ( if>1l 1C1 )(P7 + 1 - 7 ) To this point, we have dealt with the simplified case ofhomogeneous f3ckxVb ; f3c a c kx ; �t revesleorvpeodirtprheofpeolrotiwies nagndbacocknswatanrdt -flduiffiderprenocpee ratpieprs.oIxin mSeact.io5.n4(.E1 ,q.we5.6de5)­ (�X)2 ( 7 . 1 0 ) t o t h e 1 0 , s l i g ht l y c o mpre s i b l e fl o w pr o bl e m . where Multiplying Eq. 7.10 by yields T1xi + y,(p7:i - p7 + l ) - Tlxi _,/,(p7 + 1 - p7�n (5.65) q/sci (a:��t) i(P7 + I - p7), No·Flow Boundary

No-Flow Boundary

=

P,

t

_

Pi '

· · · · · · · · · · · · · ·

/ = 0.

PRODUCTION WELLS

=

x

Fig. 7.4-Physical system studied in Example 7.1 .

X

III

CJ

+

=

=

P ·

=

n+

n)

P I = P 7, P2 = P6 ,

%c

Example 7. 1.

=

+

Fig. 7.4

= Solution.

CJ =

X

6

+

I,

1

=

f3 c kxVb

1 = 0,

=

= P

i=

III =

o

at '

_

=

P

'

(�) 2

+

1 30

=

f3 cac k, at '

+

/ = 0.

i=

=

1 = 0.

+

=

+

_

P3

=

=

+

_

=

=

rfi

=

=

P3 = P5.

=

BASIC APPLIED RESERVOIR SIMULATION


2D

Suppose we want to solve for the pressure distribution with Eq.

over the

7.22

reservoir surrounded by constant -pressure boundaries

as Fig. 7.5 shows. Again, for simplicity, set i1y = L1.x and let the res­

7.22 + + 0 . . . . . . . . . . . . . . . . . . . .. (7.23) 7.23 + 0, ............................. (7.24) 2D 7.24 + + + 0 (7.25) + + + 0 ....... (7.26) 12 7.25. 5, 2 4) ............ (7.27a) +(2,2), + ..... ..... ( 7 . 2 7b) + + (3,2), + + .............. ( 7 . 2 7c) (4,2), + . . . . . . . . . . . . .. ( 7 . 2 7d) (45,2), + + ( 7 27 ) .... (+ 2,3), + + 0 ........... (7,27f) (+ 3,3), + + 0 ., ........ (7.27g) (+ 4,3), + . ... ( 7 . 2 7h) (5,3), + .. ... . ... ( 7 . 2 7i ) (+ 2,4), . . . . .... ( 7 . 2 7j ) (+ 3,4), + ...... , ..... ( 7 . 2 7k) (+4,4), .. ... .. ( 7 . 2 71 ) (5,4).

ervoir have homogeneous and isotropic properties. Eq.

L

j., __-4__-41�__-""-.

i

simplified to

a 2p ax 2 X

fl,qsc

a 2p ay 2

where k = kx

f3cVbk

=

can be

'

= ky and Vb = AxL1.x = A\,i1y. Because there are no wells

in the reservoir, the last term on the left side of Eq.

can be

dropped, yielding Fig. 7.5-Representation of a 20 reservoir with a mesh-centered grid.

where 1 = 0 or w, which can be rearranged in the form

a lp ax l

a 2p ay l

=

which is known as Laplace's equation in

rectangular coordi­

nates. The finite-difference approximation of Eq.

Pi - I j - 2P iJ Pi+ lj -'---'c,.---"l (i1 X) -

-

PiJ + I

Pij- I - 2PiJ 2 (i1y)

-

is

=

or, more simply, . . . . . . . . . . . . . . . . . . . . (7 . 1 6a) where

1 = 0 or w,

The coefficients in Eq. 7 . 1 6b are

W, = T,x j _ Y/

E, = Tix i + Y/

discussed the transmissibilities

and 5 .49, respectively).

Writing Eq. EI

W4 C4 E4 Ws C5 E5 W6 C6 E6 W7 C7

C,

and E.

TIx

I + lj�-

for all the gridblocks in Fig.

W2 C2 E2 W3 C3 E3

Sec,

(7. 1 6b)

(7 . 1 7 ) (7 . 1 8 ) (7.20) 7.4 .. (7.21) (7 . 1 9)

5.48 5 7,16b 0 00 00 00 00 000 00 0 0 00 000 00 00 00 00 0 7.2,2 2D, 7,2. 1 . 4.56, C1

p7 + 1 p� + 1 p; + l

p� + 1 p� + 1 p� + 1 p; + l

Q1 Q2 Q3 Q4

Qs

and

T/x . (Eqs. I - V?

yields

.

Pi+ l j

because L1.x = i1y.

W.

ible-Flow Equation. The development of the finite-difference

2D

horizontal reservoirs follows a process similar to

flow equation, Eq.

Again, consider the

or

the interior

Pij + 1 =

- 4P2.l

incompressible­

(7,22)

and j =

through

through

for

The finite-difference equations for

P3 .2

P2.3 = - Ps - P w

for Node

P2.2 - 4P3.2

P4.2

P3.3 = - Ps

PS,2

P4.3 = - Ps

. . .

for Node

P3,2 - 4P4,2 for Node

P4.2 - 4PS.l

PS,3 =

-

Ps - PE

for Node

P2,2 - Pl,3

P3,3

P2,4 = - P w

.

. , . . , . . . .

.

e

for Node

P3,l

P2,3 - 4P3.3

P4.3

P3,4 =

P3,3 - 4P4,3

PS,3

P4,4 =

P4,3 - 4PS.3

PS.4 = - PE

for Node

P4,2

.

.

. . . . . . .

.

. .

for Node

P2.3 - 4P2,4 for Node

P3,3

P3,4 = - Pw - PN

Pl.4 - 4P3,4 + P4.4 = - PN

.

PS.4 = - PN

.

.

.

.

.

.

.

.

for Node

P4,3

for Node

SOLUTION OF LINEAR DIFFERENCE EQUATIONS

nodes in Fig.

the nodes with unknown pressures are

P 5 ,2

7.2.2 Difference Equations for 2D Flow Problems. Incompress ­

that outlined in Sec,

for each node of the grid (i =

for Node

Q6 Q7

discusses the naming convention for the coefficients

equations for

Pi- Ij - 4Pij

Now, the characteristic finite-difference equation can be written

. . . . . . . . . . . .

Chap.

PiJ- I

and

PS ,3

for Node

P3,4 - 4P4,4

P4.4 - 4PS,4 = - PE - PN

.

. . . .

.

131


TABLE 7.1 -MATRIX EQUATION REPRESENTING EQ. 7.27

r_

P2 ,2

4 1 1 0 0 0 0 0 0 0 0 01 1 -4 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 -4 1 1 0 0 0 0 0 0 1 -4 0 0 0 1 1 0 0 0 0 0 -4 1 0 0 0 1 1 -4 1 1 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 1 -4 1 1 1 0 0 0 0 0 1 -4 0 0 0 1 0 0 0 -4 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 -4 1 1 0 0 1 -4 1 0 0 0 0 0 0 1 1 - 4 0 0 0 0 0 0 0 0 0

r-

P3,2 P4,2

Ps - P w· - Ps

- Ps

PS,2

- Ps - PE

P2,3

- Pw

P3,3

P4 ,3

0 0

=

- PE

PS,3

- P w - PN

P2,4

- PN

P3,4

- PN

P4,4

.. .

- PE - PN

Ps,s

shashowsEq.a c7.Eq.o2e7ffi7.rcei2pe7rnetesxmaeprnttsersi1x2ewildinitearnhmataepeqruatnixtaifdioonsramgonali.nThe12 unknowns sstryusctetumreof. ; equations where. the coefficients in Eq. 7.29b are defined by (7.30) If cthaen usphyse thiecssliofghttlhye­ ( 7 . 3 1 ) prcoomprblemes diibcltea-tfelos wtimee-quatdependent be h avi o r , we the 2D(Pc(hAorxikzxontal) formiofonft(looPeAyky wdeesqcuatribeiofn,luid transport. Start with ) ) ( �� ) ] , . . .. .. .. .. .. ... (7.32) q,sc - . . . . . . . . . . . . . . . . . . . . . . .. (7.28) ((77..334)3) whe7.28reis or The backward-difference approximation to Eq. ( ) ( ) ............. (7.35) s h ows t h e ma t r i x e q uat i o n t h a t r e s u l t s whe n Eq. 7. 2 9b i s wr i t e n f o r e a c h gr i d bl o c k i n t h e s y s t e m. .......... (7.29a) caie2DWentsgrcinaidnEq.. nowFor7.t1hdi6ebsorcausniedsnt7.tha2eti9b.onamin shnowng coinvenshthowsnistifionagurtusyepie,dcthalfeogrrcoeffitihdeblcoeffiocciekntins­ fse,rtthoectihfeientndii,ter-edctirfeiofenserresnsctooeuttapprhh,ewesgroixidt,mceaseatl ito,itnasnetdlofnort(hceetnhft,leorrew)­. wheor re or sForepqeuatc3Dtiivoenaprlync;dootntblheearmiecoeffi n s t w o addi t i o nal c o effi c i e nt s : Ak,anredspecwhitiveclhy.reThefer t o t h e di r e c t i o ns a b ove a n d bel o w t h e gr i d bl o c ............. (7.29b) remainder ofthis book uses the coefficients and A in conjuncTable 7.1

S JJ. = T , j Yi - Yl '

Slightly-Compressible-Flow Equation.

.Q..

p , B,

aX

p , B,

+

c

1=0

£ 'J .. =

w.

n+ 1 /xi + V'J Pi + IJ

_

n+l PiJ

_

i - 1h.J '

ap llY ay

Vb¢C, ap = o at ' a B,

+

T

ap .Q.. ll X + ax �

w,I J. = T/x

n+ 1 T/x 'h PiJ i- J

_

T ,v 'h ' U+ T/x

+

Vb

'

a c B/ fi t

U

.

i + lhJ '

n+ l Pi - IJ

Fig. 7.6

Fig. 7.7

1= 0

n+ 1 SiJ PiJ -I +

w,

S, W, E,

.+ 1 + W n+ 1 + iJ Pi - IJ CiJ PiJ

N

C,

B,

n + 1 - Q iJ EiJ Pin++ I1J + NiJ PiJ +I '

E, N,

N

i ,j + 1 W

1 - 1 ,j

C

i ,j

E

i + 1 ,j

S

i

Fig. 7.6-Schematic representation of the matrix equation gen­ erated by the 20, slightly-compressible-flow equation. 1 32

i ,j - 1

Fig. 7 .7-Naming convention for the matrix coefficients, S, W, C, E, and N. BASIC APPLIED RESERVOIR SIMULATION


, ,.

11

12

1

7

8

1

2

1

<

,

4

21

22

'3

11

1 13

..

24

17

14

15

II

1

2

3

4

33

34

3.

31

28

3.

31

3'

2S

"

27

2.

/ '/' ./"/ 1 2/, /'/ 1/7/ 8 / 12 1 / / 2 / 3/ 4 / 8 ", 4 ,/ 2 4 2 3 4 / 2 '" 1 . 1 6 / 31 1 3 1 4 . 11 / 32 '" 2 8 ,/ 2S 2& 2 7 28 /

.

3

3

, 1

k=1

4

2•

k=2

k=3

Fig. 7.S-Representation of a 3D reservoir by use of a block-cen­ tered grid and block ordering in three layers.

tlyio,nthwie cthoethffiecposienittsive anadnd zrdiefreercttoiothnse,neregspatecivteively. aAcndcozrdidirneg­c­ tions, respectively. voiarerism, pltheemseynstteemd aintitchpre soacmeedurway.es diThescusprseesdeninceSecsofa.t7.hiFor2rd. 1di3Damndensr7.esi2eo.r2n­ freosluolwits inngadihescpustasdiioan.gonal coefficient matAgairinx, aconss demidonser ttrhaetedinicom­n the where or .............. , ...... , . . .. (7.38) pres ible flow equation but, this time, in thre dimensions. difSubserentciteutappring Eq.oxim7.at3i8oninrteosuEq.lt in7.37 and applying the backward­ (4.56) (7.39) Forbe saimhomoge plified ntoeoEq.us and4.58.isotropic porous medium, this equation can where (7.40) .. . . . . . . . . . . . .. (4.58) (7.4 1 ) Eq.char4.ac5t8erdeistsiccrifbineistest-edaifdy-ersetnactee falpoprw oinxiam3DatiorensetorvEq.oir 4.58 becomeThes (7.42) (7.36) NotWre tihtiantg Eq, 7.36 for ever(ybecgraidusbleock inL\thye 36-L\zb)l.ock reservoir in . .. (7.43) sFitrgu,ct7.ur8eyields a 36 36 coef icient matrixForwitshligahthelyp-tcaodmpriagonaes ­l ible flow, start with the 3D form of the continuity equation (7.44) (7.45) (7.46) ( 7 . 3 7) wheEq.re 7.37 iorncludes the potential, in the formulation. Note that prwe(seoeblalEq,esmso 2.coulf1o5r)tdhisehavedecasfme eofindclbydiupdedpingthreesepotrvoientrsi.aThel inpottheentIiDal grandadi2Dent x, y,

W, S,

x, y,

B

7.2.3 Difference Equations for 3D Flow Problems.

Fig. 7.9-Heptadiagonal coefficient matrix formed for a 3D reser­ voir whose blocks are numbered as in Fig. 7.S.

V<I>,

Incompressible-Flow Equation.

Vp - "I ,V Z ,

=

1= 0

w.

B IJ,k p nIJ.+k l- I + S 'J,k p nIJ+-II ,k +

i) 2p i) 2p i) 2p I1 fJ i)x 2 + i)x2 + i)y 2 + (j3ck Vb ) = sc

+1

W'J,' k' p n1 - 1 J.k

+ CIJ ,k P �'J,+k l

B iJ' k = T,z . . , IJ,k - Vl •

o.

(Fig. 7.8).

Pij,k - I + Pij - I .k + Pi - Ij,k - 6Pij,k + Pi + Ij,k + Pij+ I .k + Pij,k + I

(Llx)2IVb = I /Llx

(Fig. 7.9) .

Llx =

Cij,k = -

=

x

Slightly-Compressible-Flow Equation.

N'J,k = T,)'ij V2,k' +

/=0

w.

<1>,

Z Z + T, 'ij.k - y,"I, ij,k - v,( I J,k - I - I J,k)

SOLUTION OF LINEAR DIFFERENCE EQUATIONS

133


�">:'I'� "'�� � � "a �� 1 ,I ,k i'i' k . . W I J' k ' C

"'"

DIRECT SOLVER

SYSTEM OF EQ UATIONS

pn+1

I,j,k

=

Q I,j,k Fig. 7.1 1 -Direct method.

Sj ,j ,k

SOLUTION V E CTOR

� �

................................... (7.48a) and2. Eliminationjstage.1. 2 . . . .. ............... (7.48b) Set .......................... ..... (7.49a) for 1 .2 . . . (7.49b) faonrdj = 1 .0 . . .... .............................. (7.49c) ........ ( 7 . 4 7) n defie botnihngthe transtmheisgribaivilittyy-theermads taenrdmt.hnZ.e n tewasrm Set imayntIrnobeducEq.pre7.d.es4Beu7rce(iausdependent solution. shows t.hEq.e mat7.3ri9xmayequatreiqouinrfeoirte3Dratflioonw.for a final for . . . ...................... (7.50a) ..................... (7.50b) Prforeviosusimsuleacttiioonnsgrshidoweceldlshowresufilntitine-dainf erencecoeqeffiuatciioennst wrmaittriexn. Theequatreioan.reditwreoctgeandneritaelrametivteh.ods for solving the resulting matrix ebiqluatityitoonprsoolducvereinanreexacservoit srosluimtiulonatasifthoowsen.rAa fidithxreedecustnumbe seooflvearrhasdiofrcetochtmputelcinapa­eara­ tobtionsainifedthtehcrooughmputaedir wasrect ablproecestoscawir ly havean infironund-ite numbeof erroofrs.digits. asenvdermosal ott hpopuler diraerctdi-sroelcutt-isoGaonlututeiscohninianmeqeluestihmods. iThenatainoGadn ifusosonermiasnoftelheitmhbaseinolatidsiesoofnt vquatesiotwn.oThediarsetrisenysctustletstmatofagesthici.saIlsntyatghreeemifisoverasnt dsuppetafgeromr. ttrhtiheaenelgulriomwsai­r natprofmaotithcoreeinxdmat.urstIaenge.riintxhvoleunknowns e tesermcoindnedsbytage.substhteitubaticnkgsuknown bstitutiquanton stiatge.ies itnhteo un­the knowns ar e de n stage. t(haes fium­rst equattirnigangulthiatonathriisizsedicoeffidvimatdedcriibyexntequattihsenotcoeffiioen.qualcInientttoheofzeelrtohim)e. fitnhiratesntiounknown icsoendlimequatinateidonfriosmditvhiedseducbye tdhinegnewequatcoieofnsfi.cNextient oft.htehthefiemodirssteunknown findedun­se­ c o known tdurhe esucatenimddestihneg(froequatersualstyiissotusnseme. dAftoftoeelrequairmepinteiataotnseintg)h.etthhseeiscfooelndriwmaunknown irndatelioimniprnatforiocomen­ ee tleadstaunknown. ndrtehmaie lanstitnheg.equatbacks tilhys ecfoloamplrstthunknown Afitoernusofobslvttihitneugtriteohsneulslattiasntgegeqsiuatyssusteiomendhasexplto sonloiclvitye­ fGaorutsheiarnemelaiimniinnatg iunknowns smuccesschesmivatelyic.al y. il ustrates the o n al g or i t h tioMat1.n prInhoitecimaedlatiurziacetai.olny.sttahge.e fol owing describes the Gaus ian elimina­ For 1.2 . . . set I,j,

Fig. 7.1 O-Schematic representation of the matrix equation gen­ erated by the 3D, slightly-compressible-flow equation. y/ ij - V2,k( zIJ. . - I k

- Z'J, " k)

+ T ,_ �i YlJ,ky/j - YlJ,k z, - I J.' k

(

- Z'J,k)

+ TU ,_ ,' + 'V:2J,' ky/ ,' + 'V:lJ,' k( z1 + I J,' k

- ZIJ,k)

+ T /Y " " y/ " " (ZIJ' + l ,k 'J + Y2,k IJ + n.k

- ZIJ,k)

+ T /Y

jJ - !h.k

+ T/

y/ . ' k + " (ZIJ,k + " k+" 72 IJ. ;."2 Z 'J.

I

a �J ) = a jj

d(j i )

-

dUj - I ) (;=-i) a 1,1. .

.

n;

i=

a Ujj- I ) a (jji ) - U.- 1 a 1,1 ) _

i + l .i + 2

n;

k = i + l .i + 2

n;

a ��l =

- ZIJ,k) '

Oi.j. k)

Fig. 7.10

_

n.

=

7.3 Solution Methods

n

nXn

auxi + aUxl + . . . . . . . . . . + aIDxD = dl a2lX I + anXl + . . . . . . . . . . + algx. = d2 aJlxl + aJ 2x1 + . . . . . . . . . . + aJ.x D = dJ

7.3.1 Direct Methods. Fig. 7.11

Matrix Equation

Because all real computers have a finite word length, the solution

Gaussian Elimination.

,r

FORWARD ELIMINATION

X I + atlxz + afJxJ + . . . . . . . . . . + a f.x. = d f

xl + a:i'JxJ + . . . . .. . . . . + af.x. = d:i'

Upper Triangular Matrix Equation

X. _l + a:- l .a X.

=

d:-1

x . = d:

n

"

n

BACKSUBSTlTUTlON

x . = d:

X._l = d :_1 - a:'l,ux.

Solution Vector

Fig. 7.12

i=

134

n.

. . . . . . . . - ai,3x3

Xl

=

d1n - alnnXn

XI

=

dt - a �,x D - . . . . . . . . . . . . . . . . . - ai.JxJ - af.2x2

-

••••••ooa

Fig. 7.1 2-Steps of the Gaussian elimination.

BASIC APPLIED RESERVOIR SIMULATION


Original System of Equations -

a u XI +

lit zXz + a1 3x, +

1Iz,x3 +

a2l xI i8nX2 +

.. .

..

.. . ..

. . .. . .. 0 ..

. .. .

.

.. . .. . ..

" . _

. ..

. .. . .. . .. . ..

_ •. .. .

._

a,.. 3 X, +

. ..

. .. . .. . ..

aDI X I + I\, zX 2 +

..

. .. . _ . .. .

dl

-

+ alaX. =

. •• . .• •

. .. . ..

+ a2D x. = �

. ..

.

.. . ..

. .. .

_ . _ . .. . .. . . . . , . . ..

..

.

.

.

.

..

. .. .

..

..

. .. .

_

+ a,.. aX . = d"

r

.

-

ELIMINATION OF FIRST U N KNOWN FROM ALL EQUATIONS EXCEPT THE FI RST EQUATION

Resultant Set After the First Step

�X2 + �3X3 + .

.

dl + �X. d� .

.

-

X I + a12x2 + al3 x3 + . . . . . . . + al.x. =

.....

.

.. . . .. . . .

.••••••

=

. . . .. . . . ...

...............

. .. . . . . . . . . . . . . . . . . . . . . . . .

...

....

..

..

..

.......

. . . . . . . . .. . .. . . .. . .....

8,aX2 + a,,3 X3 + . . . . . . . + a..x. = d" •

-

..

I

r

-

ELIMINATION OF SECOND U N KNOWN FROM ALL EQUATIONS EXCE PT THE SECOND EQUATION

Resultant Set After the Second Step -

a,. ,x3 + . X2 + �,x3 + . a; 3X3 + . ..

XI +

. .. .. ... .

.

. .

.

..

a;,

.............

..

3X3 +

.

...

.

.

..

.

.

dl + a� Xn = d; + a:;' Xn d;

.

.

+

-

=

a;;nXn = c(.

..........

.

..

..

+ al.x. =

.... . .. . . . . . . ..

_

,

CONTI N U E WITH TH E SAME P ROCESS n TIMES UNTIL IT TER M I N ATES

Resultant Set ( = Solution Vector) After the nth Step -

XI = 5 1 ..

X2 = Sz X3 = 53 .

. .

.

x. = s. -

Fig. 7.1 3-Schematic representation of the progression of the Gauss-Jordan reduction.

. , n; andforj=3. Baci +k=sIu,O.ibs+2,titu..ti................................ ( 7 . 5 Oc) Set on stage. Soluatiuotnsion.inThethre maunknowns trix equa. tion represents the fol owing thre ( 7 . 5 1 ) e q Fori = n-I,n-2, . . ,I , set 4, .......................... ( 7 . 5 4a) + + . . . . . . . . . . . . . . . . . . . .. ((77..554b)4c) (7.52) andXI -X-2xI 2 +X22x+3X=3 1, 1. . . ........................ X. = Iacntthorisdpreroscheown.dure,Iint iaddis impetiorn,atiEqsve to. 7.pe4r9a,form7.4a9b,l opeandrat7.io5ns0ainththroeughex­ During thefirst elimination step, we divide Eq. .54a by 2 (the coef­ 7.50c are performed before i is incremented in Step 2. ficient of Xl) to obtain . . . . . . . . . . . . . . . . . . . . . .. (7.55) Gaus ian eliminatSoliovnemethtehod.fol owing system of equations with the and Eqs. 7.54b and 7.54c. a �:

2x 1

I

n '" d(nl iJ J. ' i - L a(nlx j=i+ 1

X2

+

X3

=

=

7

Example 7.2.

SOLUTION OF LINEAR DIFFERENCE EQUATIONS

1 35


sobtubtToarinaelctimEq.inat7.e5t5hefrofimrstEq.unknown. 7.54b anXld.addfromEq.Eqs7..57.5 5to4bEq.and7.57.4c54c.to for i = 1 .2 (7.49b) Xl + + = 2. . ...................... ( 7 . 5 5) faonrj=id +=1 .1.i +0 2. . ............................... (7.49c) ..................... ( 7 . 5 6a ) . . . . . . . . . . . . . . . . . . . . . .. ( 7 . 5 6b) Nowthis. fielrismt diinvatideethEq.e se7.co5nd6aunknown. by toX2obt. fraoimn Eq. 7.56b. To ac(h7i.e5v5)e Set ...................... ( 7 . 5 0a) for k= 1 .2 . . . nand k;z! i; ..................... (7.50b) 7) 5 . 7 ( . . . . . . . . . . . . . . . . . . . . . .. ( 7 . 5 6b) faonrdj =i +=1 .0.i +0.2 . .. ................................ (7.50c) Then. mul t i p l y Eq. 7. 5 7 by and s u bt r a c t i t f r o m Eq. 7. 5 6b. Thi s proXcles+ result+s in the f=ol2.owing set of equations. (7.55) 3. Solution. = ((77..557)8) ForXi =i = 1 . 2. . . set (7.60) Athethaligsorpoiithnm.t. weHahaveving ctorimplanguleteadriztheed ftohreworaridg-ienlalimisnyatsteiomn. stthaegeun­of Eqs. 7.54a throughUse7.th5e4c.Gaus ian-Jordan reduction method to solve tknowns arethees7.ame2. giasviinngthe Gaus ian elimi­ with theXlla.sXt 2e.qauatndioncwean befinsd.olsvuedc byes bacivelkys.ubstitution. Beginning nation methTheod prfierssetnwteodsitnepsExampl . . . . . . . . . . . . . . . . . .. (7(7.5.56a5)) = = = 1. . ....................... (7.59a) Xl + X ++ X == -2. 1. . . .. ..................... = = (1) = 1. . ..... (7.59b) ....................... ( 7 . 5 6b) and = H + ] . =. . 2. . . . . . . . . .+. .Vz. .(1. ). , =(7.51 .9c) tNowmuliplytiEq.elpliym7.Eq.in5at6a7e.5byt6ahe byseacondndaandunknown dd athdedrtheseurflertoisnumgltEqsequating e. 7.qiuato5n5tiaoonnEq.dto7.Eq.7.56b:55.7.mul5th6ben­. Thi s r e s u l t s i n Iernatthiiosnssi.mkepleepexampl e . we wer e abl e t o pe r f o r m t h e a r i t h me t i c a l op­ feosraer. ywetodipedrnotfoinremgntcthhoeeuntcoeffi edivrisainocynsierntoandund-s ineotxffhpreeerfsoormrths.eofIncoprfeffiraacctctiiioceensnt. i.stTheiwis nethrcea­­ XI + X + = = ............... ... ((77..6611ba)) aDurnding =the1 .final.................................. ( 7 . 6 1 c ) offideGanfpiuteeesrnnumbe odsiarnson. elThetirhmofeiovensatsizigrieoaniofnl fieprctfhantoeeccmatetdidofurgrititehxs.e. and.Obviirtomaund-ionyusosbeoflymec.eotrhmeappliosrsreconisrcuualcttthsiiaoeilnsn.sorProflouund­otitcohene­ known s t e p of t h e c a l c u l a t i o ns . el i m i n at e t h e t h i r d un­ f r o m Eqs . 7. 6 1 a a n d 7. 6 1 b . Thi s c a n be ac h i e ved s i m pl y durducees.rosuund-ch asofpievrotoirn.gThesandeitaerreatdiedscimusprseodvelamteernitn. ctahne bechauspteedr.to re­ mulequat=tiIpi.olynsin=gfr1oEq..manEqsdx7.61. c=7.by61.1a anandd 7.61b.arnedspseucbttirvaecltyin. Thig thserreessuullttsinbying Xl X 2 3 A modi fi c a t i o n of t h e Ga u s i a n el i m i ­ r i n g t h e numbe r of ope r a t i o ns pe r f o r m e d i n Exa m pl e s 7. 2 natusiniognthpre oitchedeurquate. iknown aesitGaush steps-Jtooredlaimn irneadteuctthieon.ithconsunknown. ists of amulndCompa 7. 3 s h ows t h a t h e Gaus s i a n e l i m i n at i o n a l g or i t h m re q ui r e s f e w e o n a t t h licationsy.athnde Gadivuissio-JnsortdhaannrethdeucGaustion sin-Jvolordvaens arebdoutuction2amullgo­r­ Xmei, ftrhoodmtyiheeprldsectehdeinsgoeluqtuaiontioansftears welellimasitnhaetisounc setepdisn. gaonesnd a.vThioidss rtiipthlim.tciaptRoughl bacalgorksiuthbsmtistuchtieomn.atical y. il ustrates the Gauss-Jordan reduction about n3io/ns3. and divisioThens. wheCroruteasrethdeucGatiouns aliagnoreliitmhminaftoiornsoinlvolvinvgeas matThe1 .hIenmiftatoialilciozawialtyino.gn destasge.cribe the Gauss-Jordan reduction procedure exciszyastteieoptmn.tofhisabastliintehasiacralequattlyhethaediovasansmn.teasogamees tofhteinotmGausesmodiresfiaernfyeleidnimgtotihnaseatriiognhtal-sgiordfeaictvehtom.cr­­ For. i== 1 .2 . . . set tfoicridurentimangttrhiexfiascttooberizaustieodnonpromulces t.ipConsle rigeqhtue-snidtelyvec. iftthoerss.atmehe tcroiaen­f­ ( 7 . 4 8a ) and2. Gaus=s-Jordajn =red1uc. 2ti.on.. . .. .. .. .. .. .. .. ... (7.48b) megulfoltaohrwiod.matngLetridicestschuse sciooaeffinndprcoievintdcaematns aberdeixstsocrreipdtofiaonndausndedi=lausjrter(aEqtuiq.iorne7.dof1. )Thetbehe writ en as=the produc. t.............................. of two triangular matrices. (7.62) Set ................................ (7.49a) whespecrteively.andFor the=caloseweofr tari3angul3 amarandtrixupper. Eq. 7.tr6ia2ncgulanar mawritritceens.arse­ n;

• . . . •

VzX2 Vzx3

• . . . •

a�i)

n;

1.1

- 5/2

3h

n;

a k(i � ,I

Y2X2 VzX3 X2 - % X3 % .

n.

d�n ) .

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

Example 7.3.

X3

Solution.

d( 3 ) 1 X3 a�3) 1 22// 3,3 / 5 X2 d� ) - a ��3 2 /5 - [ - % ] X I d�3 ) - :ix2 a �:�x3 - [ Vz( 1 )

Y2X2 Vz x3 - 5jz 2 % 3

]

1 /5

% X 3 9 /5 , - Vz 2 3/t o X3 X3

3/5

1/5 ,

.

3/10•

415

Gauss-Jordan Reduction.

n

n

Fig. 7.13

Crout Reduction.

3/

[L][U]

n.

d�O ) di a �J) a iJ

.

d(i i- I ) d(, i ) - a (. I'.- I ) _

l

136

1. 1

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

[L]

n.

[U]

[A]

[L][U]

[L]

[A] i

d

[A] .

[U]

x

be

BASIC APPLIED RESERVOIR SIMULATION


, . . . , n.

f o r ; = I Aft e r i . .. (7.63) valTheues. CrmoplutermenteducitniognEq.alg7.or7i0,thmsolbecve ofomesr thevererymacionmpaing ct aant dthuiijs poithe1n.ftoInilfiotweiwialinrzgeaortorioddn.ererFort.he ei q=ua1 ,ti2ons, and ssoetlutions of the unknowns in Because == and = we can write ( 7 . 6 4) Thetennne,dtihaeteorveigcitnoarl, problsuecmh tchaant be solved by first solving for an in­ tw2.o co=mput1 aftaicotnaorlizsatetiposn.. FiForrstj, =fo1r,i2�,j, perfonn the fol o(7wi.7n1g) = ( 7 . 6 5) ................................... ( 7 . 7 2a ) and then=solving for the unknown vector, from (7.66) for i = I (7.72b) Obvitwo troiusanlguly, byar mabretarikciensgweupetnhdeuporisgoilnvainl gcotweffio sceietsntofmalintearixr algebinrtao­ faonrdi = 2,=. ., j. Second, for i j, irceaelqizuae ttihoanst th(Eeqsso.lu7.ti6o5nsanofd 7.Eqs66). 7.in6s5teaanddof7.one.66 arHowe vheer,awesierabe­lso = ................................... (7.73a) e muc cmeaunstealofquethestitornianthgulat aner estdrsutcotuberesaofnsweredanids how Now,we canthseolfvuendafo­r forj = I; and the pranodduct ofwhen andis givfen.romToEq.an7.sw6er3, this question, we look at (7.73b) for3i. =Forj +wal ,rjd+2subs, titutioandn. Setforj?;2. = ( 7 . 7 4a ) ++ Then = (7.74b) f o r ; = 2, 3 , ( 7 . 6 7) 4. Ba c k s u bs t i t u t i o n. Set Eq. 7.6=7 implies that = (7.75a) ( 7 . 6 8a) == ................................ ............................... ((77..668b)8c) Then, = 1ii ( i ) ( 7 . 7 5b) == + ............................... ((77..668d)8e) forAga; = in-ln, it i,sn-2imper,a. t.i,1ve.that both ofthe computations of Step 2 are ((77..668g)8f) donezliemroit.sbeNowoffothreeapinsplucmmayretahseintiprgonsothceeadvarurelzueeetroofo,tjhth.eAlesassumomma,enotsysettietohmnsatofawhereeqsnuaetthteieoquppensualwetor = + solved in Example ( 7 . 6 8h) anThed se=t of equa+tions in Eq.+ 7.68 contains Unknowns lij and(7.68i) 7.54c. Use Crout's algorithm to solve Eqs. 7.54a through whiis gilveen.theAaijcleonsterieexsaamreinaaltioknown bec7.a6u8sereCoeffiveals cthieantt thMaeretraixre 12 The coef icient matrix has the fol owing entries. n ofEq. unknowns tionsr. Becaus e the numbe, we musr ofatvsapieclabiflye [ � - � �1] = [:: ::: ::: ] . . .......... (7.76) ethqruae tiunknowns ons ibuts leonls aytrhbniaitnnraetrheielqyuanumbe of unknowns Soexplicfiatrly, we. Wehanowve usemad ake3 stoo3messoylsgenervteemthteoalriielzmuatsaitoirnansdete. rtI.hfetprheocbloeeffim morciente NowStepep rfonn=the = f1,actaonrdizatio=n. Not1. e that = 3. matrix is+of order+ .Eq.. . 7.+68 can=be writ en with the general(7fo.6n9)n ForStje=1p 2.aForj= I and =i =V2(I, l) ==V22.. n di = 2: wheEq.re7.i6=9 hasI ,a. to. ,tanal ofnd jeq=uaItio, ns for the + unknowns ofthe ForForForjjj ==2=21 aaannnddd iii === 2:3:I: === V21.-2( - -1 -[(V20))(=l )] -V2.= e, it is easy).to se ForForjj =2= 3 aanndd i=3:i = I: == [1.1 /(- )][ 1 - ( - V2)(1 )] = thaAsta, nwhedid scnusesn=etdr3,ieeasthr(lebireyerr,aeirtvieissniitneninecgeetsqhuaearetyaiortlnsoierasaexansidgmn12plarunknowns bitrary values to Forj =3 and i = 2: = 2 - [(V2)(1)] = unknowns . Beca u s e t h e s e l e c t i o n i s a r b i t r a r y , s e t (7.70) Forj =3andi = 3: = 1 - V2)(1) + = I, [A] x

d

[L]([U] X)

[A] [L] [U],

. . . , n,

d.

Iii

[L][U]

y,

[L] y

. . . , n,

d

x,

[ u] x

y.

[U]

[L]

[A]

a;j -

uij

[A]

[L]

[L]

lij

[.

[U] .

;- 1

L I;kukj

k= 1

>

a il Ull

,I

[U]

. . . , n,

all a l2 a 13 a2 1 a 22 a 23

d l•

YI

Il l u 12 12 1 u I 2 131u 12

122u22 132u22

Y;

I l l U l l' 1 1 I u 12, I l l u l 3' 1 2 1U l l ,

.....................•.....•••••

1 2 1 u I2 1 2 1 U 13

1 22u22 , 122u23 '

••••••••••••••.••••••••.••••••••••• ;- 1 d; L lijYj • . • . • • • • • • • • • • • • • • • . • • • • j= 1 . . . , n.

Yn U nn •

XII

x;

•••••.•••••••••••••••••••••••••••• Y; -

j= ;+ 1

••••••••••••••••

UijXj

•.••..••••••••..•••••.•• •.••••..••••••••••••••.•

7.2.

a33

131U 13

133u33 .

13 2u23

••••••••••••••••

Example 7.4.

uij,

[A]

[A]

Solution.

a3 1 a3 2 a33

- 1

x

1 . /1 1

n,

1; l u lj

[L]

Ijju ij

1;2u2j

[U]

n2

a ij

. . . , n.

•.•••••••••••. n2 n

n

n

I;;

SOLUTION OF LINEAR DIFFERENCE EQUATIONS

[L][U]

1 , / 22

12 1 13 1 U 12 U 22 13 2 U 13 u2 3 U33

Ul l

n

133

- %.

%

[( -

3 . /2

( - % )( % )]

3 _ /5 •

12 = /5 •

1 37


tivAtely.thasis s[tage1we have0 es0tablished a[n2d 1 mat1ric]es. respec­ and fo=r i=2-,. . , n, . . . . . . . . . . . . . . . . . . . . . . . . . .. (7.83) = - 1 01] and = 00 0 (7.84) For i = n, Weproblcaenmeasbyilpry veemriulfytitphlyatinthge algbyorithm ahasnd worcomparkedifnogrtourhe reexsamplultinge (7.85) macompostrix wiititohnthise obtorigaiinnaledcfooerfficientht ematnerxitxs. tOnceps eintvolhe ve tahnedsolutdeion­ andfori = n-l , n-2, . .,3,2,1 , ofStEqsep. 3.7.6Sol5 avnedt7.he6f6.ol owing equation by forward substitution. Now apply Thomas' algorithm to solve a simple example.. (7.86) 0 ' algorithm to solve the fol owing sys[ � - �1] [�Y�3] [�]1 . . . . . . . . . . . . .. (7.77) tem4 of equatio=nsUs25.. e Thomas. ........................... ThiStsefpor4.waSolrdvseoltuhteiofnolbecowiomesng equat=i4.onYby2 =bac-1k.saunbsdtYit3u=tion. 2x1 2x3 = 1 5 . . . . . . . . . . . . . . . . . . . . . . .. ((77..887b)7a) = 1 2 . . ........................ ( 7 . 8 7c) + 2 The= 5.given. s. e.t.of. . equat. . . . .io. ns. . has. . . t.h.e. t.r.id.i.agonal. . . .. st(r7u.c8t7d)ure Theand bac=k1war. d solution of the system of equations is = 1 . = 1 . as r[4e2qui31re02d 0by Thomas' 25al15gorithm, ] = . . . . . . . . . . . . . . . . . . . .. ( 7 . 8 8) [ [ ] ] 3 1 1 1 2 ' As s h own e a r l i e r . whe n f i n i t e d i f e r e nc e 0 2 1 eisquatalwiaysons gearenewrratitede.nThealonggenaelrianle.starutcritduiraegonalof a tcriodeiffagonalicient smatystermix 1 . Forward Solution. 5 has the form = ............................ (7.79a) For i = 1, = % and gl = == .................... ( 7 . 7 9b) = = For i = 2, [ 2 ) ( % ) 1 .......= ............. ((77..779d)9c) and = 15 - (2) -5. -4 1 -(2)(%) twhehroughre and ci = coeffi= cients of.................... ( 7 . 7 ge) Grtheidriblghtocskidi e-ofI .tandhe eqGruatidiblonocfokr Gri1d, blrtheosecpkunknowns eci.tiThomas vely. Theof' aeGrlgleorimdiblethnomtckofiis­. Fori = 3,1 2 -(=3)1( -- 5(1)() - 4) = fIneress asnenceffei.ciThomas ent algor' ialthgmortiothsmolvise asyssptecemsialofapplequaticaitoionsn of(bandthisaltygpe.o­ and = 1 - (3)( -4) rthitehm)fulofn then Crmatoutrixr;edonlucytiothneprenotcreiedsurofe. It is not neancdesdianeryetdo tsotobere FOf l. = 4, = 5 - (2) = 1 . stoIrnedmatasrfioxurfosremp.aEq.rate7.vec79tocarsn. be writ en as ) ( 1 2 I3 2. Bac k war d Sol u t i o n. 0 For i = 4, X4 = 1. [ ; : · H � : l _ 0 For i=2. X2 = (-5) -(-4)(2) = 3. ( 7 . 8 0) For i = 1 , = 3 ) = 4. -%( Thomas' algorithm caForn bei =im1pl. emented as fol ows. Hence, the solution vector is . (7 . 8 1 ) = and gl = . (7.82) The ef icient nature of this method. when coupled with the ease of implementation and small storage requirements, makes Thomas' For i = 2. 3, n-l, [L]

Y2

[L]

- V2

[U]

Cj

bj

a j Wj _ 1

% .

_ 5/2

[U]

3/5

W I.

1 2/5

Backward Solution.

[U]

[L]

[L]

[A].

[U]

Xi = gi - wi xi + l . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Example 7.5.

3/5

- Y2

Yl

x I + 3x2

1 2/5.

+ x2 +

3x2 x3 + x4 x 3 + x4

Solution.

X2

X3

Xl

o o

Thomas ' Algorithm.

b ix i + C I X 2 d l d2 a zX l + b zX 2 + C zX 3 a 3x2 + b ]X3 + C 3X4 d3 a n - IXn- 2 + bl _ l xn_ 1 + CI _ IXn a '�I1 _ 1 + b,�n d,u bi . ai .

O xX I 2 x3 X4

25/4 ,

WI

W2

.

n I

d

-

.

.

.

g2

.

i+

( 25f4 )

1/ 1 3

w3

di

_ 27/1 3 '

g3

ai .

x

bl a2

CI b2

c2

a

bi. Ci .

X n- I b n - I C n - I Xn -n I an bl

g4

_

( 27/ 13 ) ( If )

n dl 1

d

Xl 25/4

Forward Solution. WI

CI bl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . dl

b'

I

................................

. . . •

138

BASIC APPLIED RESERVOIR SIMULATION


A1,I ,k

N 1,I,k

E IJ,k

C 1,I,k

S 1,I,k

W1,I, k

B 1,I,k

Fig. 7.1 4-Band structure of an I1x x IJv x 11z grid system with un­ knowns ordered In the I direction, } direction, and finally the k direction.

algorithm a procedure that is used extensively in solving systems of equations with a tridiagonal coefficient matrix. Improvements to Basic Direct-Solution Algorithms. The direct­ solution methods described so far represent the basic algorithms for these procedures. We can incorporate additional options into these algorithms to improve various features of the procedures. This sec­ tion discusses four techniques that are applicable to direct-s!llution methods: sparse-matrix, pivoting, mUltiple known vectors ( d ) , and iterated improvement. Sparse-Matrix Techniques. All the algorithms discussed, with the exception of Thomas' algorithm, assumed that most of the entries, aij ' in the coefficient matrix are nonzero. As we have seen, the coef­ ficient matrix generated by finite-difference approximations can be formulated as a banded matrix (tridiagonal, pentadiagonal, or hepta­ diagonal, depending on the dimensionality of the problem). These special matrices result in a structure composed of zero entries out­ side the outermost bands. In cases where the structure of the coeffi­ cient matrix is known a priori and contains many zero entries, sparse-matrix techniques can be used. Sparse-matrix techniques improve the efficiency of a given algo­ rithm (in terms of the number of arithmetic operations) by excluding operations on zero entries of the coefficient matrix. As we have seen, the goal of direct-solution techniques is to alter the coefficient matrix to a form that may be solved more easily with simple substitution methods (either backsubstitution or forward substitution followed by backsubstitution). The coefficient matrix was modified by use of ele­ mentary row and column operations to convert nonzero entries, aij ' to zero values. Because a sparse matrix already contains many zero entries, there is no need to operate on these entries. Probably the most popular sparse-matrix technique, and the one that is most applicable to numerical reservoir simulation, is the band-solution technique. Band-solution techniques take advantage of the banded structure of the coefficient matrix. The discussion of Thomas' algorithm demonstrated the efficiency of band-solution techniques. Sec. 7.2 shows how finite-difference approximations to the flow equation result in banded coefficient matrices. Fig. 7.14 shows the details of the band structure of an nx X ny X 7Iz grid system, in which the finite-difference equations are written in the i direction, fol­ lowed by the j and then the k directions. This figure illustrates that the finite-difference equations can be formulated in such a way that the resulting coefficient matrix con­ tains an envelope of non-zero entries with a band width of 2bw + 1 , SOLUTION OF LINEAR DIFFERENCE EQUATIONS

where bw = nx X ny for 3D flow problems; bw = nx (or ny ) for 2D flow problems, depending on the block-ordering scheme used (see Sec. 7.3.3); and bw = 1 for ID flow problems. With this bandwidth information, the Gaussian elimination pro­ cedure can be modified to the following. 1 . Initialization stage. For i = 1 , 2 , . . . , n, set

d o ) = di ,

.

.

.

.

.

jOO n = max( 1 , i - bw),

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

(7.48a)

. . . . . . . . . . . . . . . . . . . . . . . (7.89a)

jrnax = min(i + b w, n ),

. . . . . . . . . . . . . . . . . . . . . . (7.89b)

. • and a ij (0) ' + 1 , . . . , Jrnax . - a ij 1• - loon' loon

. . . . . . . (7.89c)

2. Elimination stage. For i = 1, 2 , . . . , n, set di(i) _

d( i - I ) I ' a (. i.- I )

. . , , , . . . . . . . . . . . . . . . . . . . . . . . . . . (7.49a)

1,1

jrnax = min(i + b w, n ), a ( i,- I ) - IJi I a (iji l a ( ,- ) 1,1

. • 1 = I,

. . . . . . . . . . . . . . . . . . . . . . (7.89b) • + 1

1

(i) = 1 . and a 1.1

,

0 0 '

. , Jrnax ·

. . . . . . . . . . (7.90a) (7.90b)

For k = i + I , i + 2

,o o . ,

jrnax set ,

cf. i ) = d( i - I ) - d( j )a ( i � 1 ) k k I k. 1

. . . . . . . . . . . . . . . . . . . . . (7.9 I a)

(7.9 l b) and a k( i. )1 =

O.

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (7.9 I c)

3. Backsubstitution stage. Set (7.5 1 ) For i = n - I , n - 2 ,

0 0 .

, 1 , set

jrnax = min(i + bw, n )

irnax (n )x , and xi = di(n ) - L � a ij ] j=i+ 1

(7.89b) 0

. . . . . . . . . . . . . . . . . . . . . (7.52)

Simple implementation of the band Gaussian elimination proce­ dure improves the efficiency of the algorithm by excluding opera­ tions on zero entries outside the band structure (envelope) of the co­ efficient matrix. An additional advantage of this band technique is the reduced storage requirement. This reduced storage requirement occurs because only those entries within the nonzero envelope need to be stored. Although the Gaussian elimination procedure was used to demonstrate this implementation of the band-solution technique, similar modifications can be made to the Gauss-Jordan and Crout reduction procedures. In summary, band-solution techniques im­ prove the efficiency of direct-solution procedures by reducing the number of arithmetic operations and storage required for a solution. Pivoting. Computations performed on computers with finite word lengths always generate round-off error in the arithmetic re­ sult. We want to formulate our direct-solution procedures to mini­ mize the accumulation of this round-off error. Pivoting is one meth­ od used to control round-off error in direct-solution techniques. Fig. 7.15 shows the structure of the coefficient matrix at the be­ ginning of the ith elimination step of the Gaussian elimination pro­ cedure. During the ith elimination step, all the matrix entries in Row i, a ( i,- I ) , and the right-side element, d� i - I ) , are divided by the ele­ me�1 a ( i - I ) . a � i,- I ) is referred to as the pivot point. For the right side, '.J

','

d(i i - I ) j d(I, ) - a (i I';- I ) ' . _

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (7.49a) 1 39


(1- 1 ) a1 .2

(1- 1 ) a LI

(1- 1 ) al ,l + 1

(1- 1 ) 82,1

(1-1 ) 82.1 + 1

a2, n

(1- 1 ) a3,1

(1- 1 ) Elj,I + 1 ·

(1-1 ) a3, n

(1- 1 ) al,1

(1- 1 ) 8i.1 + 1

P- 1 ) al, n

0

1

(1- 1 ) 82,3

0

0

1

0

0

0

0

0

0

0

0

(1-1 )

P- 1 ) a1 ,3

. .

0

(1- 1 ) (1- 1 ) a l+ 1 .1 al+ 1 .1 +·1

gl- l)

nl

. . .

Xl

(1- 1 )

� X3

d �i - 1 )

>G

(1-1 ) al + 1 . n

.

(1- 1 ) a nl + 1

a1, n

(1- 1 ) d1 + 1

>G + 1

(1-1 ) an n

Xn

Fig_ 7 _1 5-Structure of the coefficient matrix a t the beginning of the ith elimination step of the Gaussian elimination procedure_

Eq. 7 .49a assumes that a (i - I ) is nonzero. Because of the round­ ' off error in d� i - I ) , we actuai iy perform d(i) i -

_

[ dU - I ) + e ] I

a (i. .- I )

. . . . . . . . . . . . . . . . . . . . . . . . . . . (7.92a)

1.1

or di(i) -

_

d(i - I ) e i + ----U-::-O . a U. .- I ) a. . I.'

. . . . . . . . . . . . . . . . . . . . . . . (7.92b)

1.1

Note that a (i - I ) also contains round-off error; however, we con­ sider only the �:"or e in the element d� i - I ) because this directly prop­ . agates to d� ' ) . Comparing Eqs. 7.49a and 7.92b shows that, for a larger value of 1 a (i - I )1, a smaller value of round-off error propagates from cf. i - I ) to d(:i . Note that we are only interested in the absolute value of a (i - I ) b�cause we are not concerned with the sign of the error. In the pivoting technique, selected elements of the coefficient ma­ trix are searched to determine the maximum absolute value of the al­ lowable possible pivot points. Rows (or rows and columns) are then switched to place the maximum value in the pivot position. Two vari­ ations of the pivoting technique are possible: partial pivoting, where only row transfers are considered, and full pivoting, where row and column transfers are considered. For diagonally dominant matrices, such as those encountered in reservoir simulation, pivoting generally is not required for a stable numerical solution. Multiple Known Vectors. When several systems of equations with the same coefficient matrix but with different known vectors (right­ side vectors) are to be solved, the direct-solution procedures can be modified to solve for all sets of equations efficiently. In the Gaussian elimination and Gauss-Jordan procedures, we performed computa­ tions on the known vector J and the coefficient matrix [A], simulta­ neously. Consequently, improvements to these procedures for mul­ tiple known vectors can only be implemented if all right-side vectors are known a priori. In the Crout reduction procedure, we factored the coefficient matrix into upper and lower triangular ma­ trices. This process did not require previous knowledge of the known vectors. Therefore, the Crout reduction procedure can be used effectively for multiple known vectors when these vectors are not known a priori. Sec. 7.2.2 illustrates this in the discussion of up­ dating pressures from one timestep to the next for slightly-com­ pressible-flow problems. This is further illustrated in the fol1owing discussion of the iterated improvement. Iterated Improvement. The goal of the direct-solution procedure is to solve the system of equations

for the unknown vector, X . In reality, however, in the presence of round-off error, we have solved for a slightly perturbed vector, (x + e) . Although we do not know either x or e individual1y, we have enough information available to remove the error from our nu­ merical solution . Because our perturbed solution must be a solution to the problem at hand, we can post-multiply the coefficient matJ.ix [A] by (x + e) and compare the results with the known vector, d . That is,

[A](x +

E)

= [A]x + [A]e,

which is simply a matrix/vector multiplication and not the solution of a second system of equations. We can rearrange Eq. 7.93a as

[A]e = [A](x +

1 40

(7. 1 )

E) - [A]X.

(7.93b)

Substituting Eq. 7 . 1 into Eq. 7.93b results in

1.1

[A] x = J

. . . . . . . . . . . . . . . . . . . (7.93a)

[A]e = [A](x +

E) - J.

(7.94)

In Eq. 7.94, al1 the right-side elements are known, while the left side is unknown. Consequently, Eq. 7.94 represents a system of equations for e . Once solved, e can be subtracted from (x + e) to improve the estimate for X . Because the solution of Eq. 7.94 also contains round-off error, this procedure can be repeated several times before a final solution is obtained. When Crout factorization is used to solve Eq. 7. 1 , the imple­ mentation of the iterated-improvement procedure is very efficient. This is because we have factored [A] into [L] and [U] . Therefore, the implementation of the iterated-improvement procedure requires one matrix/vector multiplication and one vector subtraction fol­ lowed by the standard forward and backward substitutions. 7.3.2 Difference Equations for Reservoirs With Irregular

Boundaries. As the previous sections show, when there are no irregularities on the outer boundaries of the reservoir, the coefficient matrix always exhibits a wel1-defined structure in the form of a tri­ diagonal, pentadiagonal, or heptadiagonal matrix for I D, 2D, or 3D flow problems, respectively. Fig. 7.16 shows these structures. Note that the matrix equation in Fig. 7 . 1 6 is written in increasing orders of i ,j, and k in a nested manner, where i = innermost index,j = inter­ mediate index, and k = outermost index. Many solution methods require matrices with the structures shown in Fig. 7 . 1 6. If the subject reservoir has irregular boundaries, the structure of the coefficient matrix is not preserved and the solu­ tion techniques designed for a specific matrix structure, such as a band-solution technique, are not applicable. Therefore, it may be necessary to take some precautions to preserve the structure of the resulting coefficient matrix. To illustrate this problem, consider the 2D reservoir with irregular boundaries in Fig. 7.17. The overal1 grid BASIC APPLIED RESERVOIR SIMULATION


�H \'I'� � , k , I E1 � o � , . � � .. o;;'\. " SI,I.k B

�� O I H " � � �� E I J � � �

�w� E' � 0

' "I

W

0

o

(a)

W

S" I

C

'

0

".

o I. J.� O'

(b)

(e)

Fig. 7.1 6-Schematic representation of (a) trl-, (b) penta-, and (c) heptadiagonal coefficient matrices generated from reservoirs with regular boundaries •

...-_ -: __

-- - - - .,.. - - - - - , - - - - - - T I t I

I I I

I I

I

-----r-

I I I

-- -- , I I

"""'''''�---'''+'I�::-+ - - - - - t - - - - - � - - - - - - t - - - - -- •: :

I

:

1

I

:

in Fig. 7 . 1 7 has 42 blocks. However, as indicated in this figure. only 26 of these blocks are active. If finite-difference equations are writ­ ten for only these 26 blocks, then the coefficient matrix is 26 x 26. and it will have a form as in Fig. 7.18. A closer inspection of Fig. 7 . 1 8 reveals the existence of 1 1 (instead of five) diagonals that are obtained from regular 2D problems. Therefore, any solver that is de­ signed strictly for a pentadiagonal coefficient matrix cannot be used in this case. If the band structure of the coefficient matrix must be preserved because of constraints imposed by the linear equation solver, the problem must be handled in a slightly different manner to maintain the desired structure of the coefficient matrix. This can be achieved as follows. As in Fig. 7.19, all gridblocks (active and inactive) are numbered consecutively. Equations for the active blocks are written in the usual manner. For the inactive blocks it is necessary to write dummy equations, such as P 4 = \ 0 6 , P s = \ 06 , 6 6 P 33 = \ 0 , P 42 = \ 0 , and so on. We call these dummy equations because they can be written in equation form. For example, the equation for Gridblock 4 becomes

10

:Ii ::» z z o

15

::»

5 I.

I.

.1.1. 1.1.

5 .

UJ a:: w m

Fig. 7.1 7-T\No-dimensional representation of a reservoir with irregular boundaries. The 26 numbered blocks are the active blocks.

1

I. I.

UNKNOWN NUMBERS I-

1�

15

I

I

I.

I.

I.

I.

'W

1.1 1.1 I.

2�

�5

:�•. I.

20

I.

I.

I.

1.1 I. I.

.1. �

I.

!!jjj

25

-

Fig. 7.1 8-Coefficient matrix resulting from the discretization and node numbering scheme shown in Fig. 7.1 7. Filled squares are nonzero entries. r-::___

--

- - - -.- - - - - - , - - - - - -

--

- - - - r - - - - - .,

38 : 39 : 40 : 4 1 : 42 : I-::o�'-+---::-"""'+""-::-+ - - - - - + - - - - - � - - - - - - t - - - - - - : 3 2 ! 33 : 3 4 : 3 5 : F"":":��"";"�;;;;-'::"""+lIir-..,..-t - - - - - -:- - - - - - � - - - - - - : : : 26 : I

I

T

I

I

I

I

. . . . . . . . . . . . . . . (7.95) Because these dummy equations are not coupled to the other equa­ tions (no other unknowns appear in any of these equations), they do not affect the final solution but do help maintain the band structure for the problem. Note that preservation of the band structure of the coefficient matrix is achieved at the expense of inflating the coeffi­ cient matrix from 26 x 26 to 42 X 42. Therefore, in implementing this simple strategy, we must consider the enormous increase in the computational work and storage requirements involved. When im­ plementing dummy equations of this type, large values (much larger than the pressures expected for the active blocks) should be assigned to the inactive blocks to ensure that, when the arrays are printed, the format used for the expected pressures does not accommodate the numbers specified and print a string of asterisks (see Fig. 7.20). This results in printed maps with the same shape as the reservoir (compare Fig. 7 . 1 7 with Fig. 7.20). This method of treating irregular boundaries may not always be the optimal method for handling such cases. Other direct-solution methods that can be used to solve the matrix equation generated by irregular boundaries include sparse-matrix2 and variable-band­ width techniques. 3 SOLUTION OF LINEAR DIFFERENCE EQUATIONS

Fig. 7.1 9-Block ordering that includes active and inactive blocks for a 20 reservoir with Irregular boundaries. ••••

1 648

1 786 1 789

1 81 2 1 80 1

1 703

1 738

1 763 1 747

1 792 1 754

****

1 806 1 792

1 724 1 71 8

1 707

••••

••••

****

****

***.

••••

***•

****

*.**

•••*

••••

1 764 1 71 3

1 70 1

• •**

.* ••

1 709

1 700

1 690 1 690

1 642

1 673 1 672

• •• *

Fig. 7.20--P ossible printout of pressure array that results from use of dummy equations such as described by Eq. 7.95 for Inactive blocks. 141


..

"x

.

I. •• • •• I . • • •• I • ••• I · ··

-

I •

-

1

I I

I I I I

!lr-; - --1- ii; -·.!I111-.I • •

I . ,

_ _ _ _ Jl.L

I

I •• ••• I .·· 1

_ _ _

I

i=2

i=3

i=4

i =5

i=6

��L

.

. I. I ... •••

I

, I

I!l

_ _ _ _

- -

-

.

I. I .

_ _ _ _ _ .

•• I ••• I • •• • .1 - - - • ----- I -----• 1 - - -•· 'i . T r. I ••• I 1 • . I ••• I I . ••• I , • I • •• I I 1 .. ., , , I

i= 1

-

••

I

1

Fig. 7.21 -Natural ordering by rows and resulting coefficient matrix (after Ref. 6) .

I. I I 1 •• I . • •1 1 I . - � � � . . , •• . ' • • •1 . 1 -� • •• I •• • I . . , •••1 I •

11

- -

_ _

'II. .11+ .!I.!I� - - -

- - -

I

r

I

I

Ir

I ,I I, �.- I- - -l- - I .• , I - - -

- -

-

- - '

-

_ _

.

I I - - - l. -- !lL - !l�L i1I- !! !a- _ -I- - - . I , .. II • • 'I . . 'I ' • I I - - -

I +

I

I

- - -

--- ---

t1

I ,

r I

I

I

.

.1

- - -

I '

., r..- r.• . '••• I • . I • ••,

•• ••'

- - -

-

- - ·

-1!I ,� - - - � - -�:IiI.-·�I iiii •• •• I , . . , .• .• 1 I

,

,

,

,

Fig. 7.22-Natural ordering by columns and resulting coefficient matrix (after Ref. 6).

As stated earlier, the use of dummy equations for irregular bound­ aries increases the computational work required to solve the re­ sulting matrix equation. Although, at first glance, this may seem to degrade the efficiency of the matrix-equation solution, this is not al­ ways the case. This is because the solution of a matrix equation with a banded coefficient matrix lends itself to vector computations, while general sparse-matrix solutions may not. Because vector computations are faster than scalar co mputat i on s , all the computa­ tions (including the additional computations) required by the use of dummy equations may actually be performed faster than the fewer scalar computations required by sparse-matrix techniques. Conse­ quently, on a vector-processing computer, the use of dummy equa­ tions may be more optimal than sparse-matrix techniques. Appendix C discusses the differences between scalar- and vector­ processing computers. 7.3.3 Gridblock Ordering. As Secs. 7.2.2 and 7.2.3 show, the

structure of the coefficient matrix depends on the dimensions of the problem and the ordering of the gridblocks. Another general ob­ servation from the previous sections is that coefficient matrices ob­ tained for I D, 2D, and 3D problems have sparse structures. In other 1 42

words, most of the entries of the coefficient matrices are zeros. The objective of using different gridblock-ordering schemes is to reduce the computational work involved in solving a system of finite-dif­ ference equations. This section shows how the structure of the coef­ ficient matrix can change by use of different ordering schemes, and how this can reduce the computer time and storage requirements of a simulation run . Natural Ordering. Consider a 2D grid with four rows and six col­ umns. If a natural-ordering scheme by rows is implemented, the re­ sulting coefficient matrix has a pentadiagonal structure (Fig. 7.21). In the resulting coefficient matrix, all nonzero entries are located be­ tween the uppermost and lowermost diagonals. If we define the bandwidth as the maximum number of elements in any row of the matrix, the coefficient matrix obtained by use of natural ordering by rows has a bandwidth of 1 3 (or 2 x 6 + 1 ) . For natural ordering by rows, the bandwidth of a 2D problem is always 2nx + 1 , where nx represents the maximum number of blocks in any row. If we reorder the gridblocks by columns to take advantage of the fact that the maximum number of blocks in any column is smaller than the number of blocks in any row (in this example, nx > fly, where Ilx = 6 and ny = 4), the bandwidth of the resulting coefficient BASIC APPLIED RESERVOIR SIMULATION


Fig. 7.23-Natural ordering of an irregular grid by columns and resulting coefficient matrix (after Ref. 6).

.

.

.

.

.

•.

..

, .. ,. .. , .. . " ..

.• •: . • . . .. . . .. . . ·1. ·1

, , ,

•• : i-

ilili - - - - - - - � - - - - - - - - ��· .

, . .. ... . , . . . .. , . , . ·1.•• I.•• " . . . . . ,,

.

Fig. 7.24-0-4 ordering and resu lting coefficient matrix.

matrix is 2ny + I or 9. The ordering scheme and the resulting coeffi­ cient matrix in Fig. 7.22 require less computational work than those in Fig. 7 .2 1 . 1t is more efficient to solve problems with smaller band­ widths than problems with larger bandwidths because all computa­ tions are performed on the matrix entries within the bands. Conse­ quently, smaller bandwidths result in fewer computations. As Sec. 7.3.2 discusses, irregular boundaries alter the band struc­ ture of the coefficient matrix. Although the band structure is altered, the bandwidth calculation still holds. This results in a number of additional diagonals, depending on the degree of irregularity ap­ pearing in the coefficient matrix. As Fig. 7.23 shows, the maximum bandwidth of the coefficient matrix for the associated irregular grid is still nine because the maximum ny = 4. Note that, because of the appearance of extra diagonals (as shown in Fig. 7.23, where the co­ efficient matrix has seven diagonals instead of five), the coefficient matrix has a variable bandwidth. In summary, natural ordering (ei­ ther by rows or columns) always results in a banded matrix. D-4 Ordering. Natural ordering, either by rows or by columns, is not the only choice for ordering the grid unknowns. Other ordering techniques, such as D-4 ordering,4 can be used to improve the effi­ ciency of the direct-solution procedures. In D-4 ordering, gridblocks are ordered in the form of diagonals. Fig. 7.24 illustrates this ordering scheme. In this figure, the shaded gridblocks are the first points loaded into the coefficient matrix and the un shaded gridblocks are loaded afterward. This ordering scheme does not allow adjacent gridblocks (gridblocks that commuSOLUTION OF LINEAR DIFFERENCE EQUATIONS

... ,

.

.

.

.

.

•• •

.

.

.

nicate) to be loaded successively into the coefficient matrix. Fig. 7.24 also shows the resulting coefficient matrix for D-4 ordering. The structure of the coefficient matrix resulting from D-4 order­ ing can be partitioned into four submatrices (Fig. 7.24), consisting of two submatrices with only main diagonals and two submatrices with a general sparse structure. The benefit of the D-4-ordering technique is that the diagonal elements in the upper-left submatrix can be used to eliminate the elements in the lower-left submatrix in nl2 steps in the elimination process. Fig. 7.25 shows the structure of the coefficient matrix after nl2 elimination steps. The squares represent locations that originally contained nonzero entries, while the circles represent locations that originally contained zero entries but that contain nonzero entries generated during the elimination process (fill locations). The system of equations defined by the lower-right matrix after nl2 steps (see Fig. 7.25) is referred to as the reduced system of equations. At this stage, we can use either a direct or iterative solution technique to solve the reduced system of equations. This two-step procedure re­ sults in a fully triangulated matrix suitable for backsubstitution. Cyclic-2 (Red-Black) Ordering. In cyclic-2 ordering, gridblocks are ordered by going along a row or column and skipping every oth­ er gridblock. Again, the objective of cyclic-2 ordering is to prevent cells that are in communication from being loaded into the coeffi­ cient matrix consecutively. Fig. 7.26 shows cyclic-2 ordering and the resulting coefficient matrix. 1 43


.

.•

I•• I • •• : . .. •• I • •• I • . •• •• I • •• I • •• I I •• • •

:

. .�:

- - - - - - - - - - - - -- -

.

.

..

·· . 1

: ... . .

- - - - - - - - - - - - - - - -

I· · . . . . I· . · I •• • • • • • I •• • •• • • • : . . ... • • • •• • • ••• •• •• l • • • •• •• I I •• • • · .

.

!

: : 1;

Fig. 7.2S-Upper triangular matrix resulting from 0-4 ordering (after Ref. 6).

The structure of the coefficient matrix resulting from cycIic-2 or­ dering has a structure similar to that from D-4 ordering. The only difference is the locations of the nonzero elements in the upper-right and lower-left submatrices. The procedure for solving the matrix equation formulated with cyclic-2 ordering is identical to the proce­ dure used for D-4 ordering. D-2 Ordering. In D-2 ordering, gridblocks are loaded into the co­ efficient matrix along the diagonals of the grid system. Fig. 7.27 il­ lustrates this ordering technique. As this figure shows, gridblocks that are in communication are allowed to be loaded into the coeffi­ cient matrix consecutively. The objective of D-2 ordering is to re­ duce the envelope of the nonzero elements of the coefficient matrix compared with natural ordering. As previously discussed, fewer calculations are required for smaller envelopes of nonzero entries. 7.3.4 Iterative Methods. As discussed earlier, the accuracy of a

solution vector obtained through a direct process depends on the precision of the floating-point word of the computer used in the study. Round-off errors can accumulate and grow uncontrollably and may dominate the solution, especially in the case of large sets of linear equations . Iterative methods give the solution of the system of equations as the limit of a sequence of intermediate vectors that progressively

converge toward the exact solution. The process starts with an initial guess vector for the unknown vector and continues by successively improving on this guess until the final solution is obtained. For a convergent scheme, the error at the end of each iteration is reduced and the solution vector should approach the correct solution. To ter­ minate the process, a convergence criterion is set and iterations are stopped when this criterion is met. Fig. 7.28 shows the iterative process and the associated convergence path. As Fig. 7.28 shows, the convergence curve usually follows a monotonically decreasing path (in terms of absolute value) . One important task when an iterative equation solver is used is to establish convergence criteria for the given problem. A conver­ gence test checks the difference between the solutions obtained at two successive iteration levels. If the absolute value of the differ­ ence becomes insignificant, this indicates small refinements to the unknowns when the solution proceeds from one iteration level to the next. It is incorrect to assume that the exact solution is within the im­ mediate vicinity of the last iterate when the convergence criteria are met and the iteration process is terminated. Fig. 7.29 shows this graphically; two convergence paths are shown for a given problem. As illustrated, Iteration Scheme f converges faster than Scheme s. This figure also shows that, when similar convergence criteria are used for Schemes f and s, the iteration process for Scheme s termi­ nates at a point farther from the exact solution. This observation highlights the importance of selecting convergence criteria. Be­ cause the exact solution is not available during computations, the only comparison that can be made is on the improvement of the solu­ tion vector. The chosen convergence criteria are problem specific. Obviously, for the problem studied with Scheme s in Fig. 7 .29, finer convergence criteria are desirable. Fortunately, we can decide what constitutes suitable convergence criteria for a given problem. This decision is based on material-balance checks performed after the termination of the iteration process (Secs. 8.2.7, 8.3.3, and 8.4.2). If the convergence check is satisfied but poor material-balance checks are obtained, it is advisable to make the convergence criteria tighter and to continue with additional linear iterations. The remainder of this chapter introduces several simple iterative methods and studies various aspects of these procedures, such as convergence requirements, convergence speed, and storage needs. Jacobi Iteration. The Jacobi iteration is one of the earliest iterative methods. Although it is rarely used in reservoir simulation because of the relatively slow convergence rate of the process, the discussion of the procedure is of historical interest because the Jacobi iteration scheme is the basis for other, more powerful iterative techniques. Consider a system of equations of the form . . . . . . . . . . . . . . . . . . . . . (7.2a)

••

••

• • •• • • • '• I • • •• • I ••• • I • • •• • • • I • • • I I I I

. .. :

.. : . !

r• •• I ·• • • • • • I · . .. . I . • ••• • I • • • • I • I -.1. · . I • • •• • • • • •1 • . ·.I_ � . - - - - - - - - - - -

- - - - - - - - - - .

Fig. 7.26-Cyclic-2 ordering and resulting coefficient matrix (after Ref. 6). 1 44

BASIC APPLIED RESERVOIR SIMULATION


••• •• •• • • •• •• • • •• •• • •• • • • • • • •• •• •• • •• • • •• •• • • •• • • •• • • • •• • •• •

••

• •• •

•• •• • • • •• • •• • • • • • • ·· .

I

11

Fig. 7.27-0-2 ordering and resulting coefficient matrix (after Ref. 6).

X (U l ) = ..!.. d3 - a 31 x (k ) - a 3 _r (k ) - a 34X (k ) . . . - a 3,,x k ) , 3 1 4 £'" z a33

[

(7.2b)

]

. . . . . . . . . . . . . . . . . . . . (7.97c)

a3 1x I + a 32xZ + a 33x3 + a 34x4 + . . . + a 3,,x1l = d 3 ·

. . . . . . . . . . . . . . . . . . . . (7.2c) . . . . . . . . . . . . . . . . . . . (7.97d)

·

. . . .

..

. . . . . . . . . . . . . (7.2d)

where aii � O for i = 1 ,2 , . . . , n . The system defined by Eq. 7 . 2 can be rearranged to the following form by use of the equation for the ith gridblock (the first unknown from Eq. 7 .2a, the second unknown from Eq. 7.2b, and so on) to solve for the jth unknown ; i.e.,

(7 . 96a)

(7.96b)

�(

During the implementation of the Jacobi iteration at each step, the values of X l , x2 , . . . , xn at the old iteration level, (k), are updated with the values at the new iteration level, (k + This cyclic feedback op­ eration is repeated until the input and output of a cycle eventually agree within a specified tolerance and the iterations are terminated. Remember that, in the implementation of the convergence test, a solu­ tion vector is not considered converged unless every single compo­ nent of the unknown vector satisfies the convergence criterion. The algorithm for the Jacobi iteration is as follows. Calculate

I).

X {U I ) = ..L au ,

[

dI -

L a I)

]

X]{k )

. . . . . . . . . . . . . . . . . . (7.98)

j= 1 j .,t j

)

X3 = d - a3 1x 1 - a3 zX z - a34x4 . . . - a 3,,xIl , a 3 3 ·

. . . . . . . . . . . . .

..

. . . . (7 .96c)

(7.96d) An initial approximation to all the unknowns starts the iteration process. The left sides of Eqs. 7.96a through 7.96d are calculated at the new iteration level by use of the initial approximation on the right-side computations. If we denote the new iterat ion l � v� 1 with . the superscript (k + (throughout the text, a superscnpt wlthm a set of parentheses indicates the iteration level) and the old iteration lev­ el with the superscript (k), Eq. 7 .96 can be written as

I)

[

]

I d (k ) (k ) (k) (k) (k + I ) = x1 l - a l zX Z - a 1 3x 3 - a l 4x 4 . . . - a l ,,xn , all ·

I[

. . . . . . . . . . . . . . . . . . . (7.97a)

]

(k) (k I (k) (k) (k x2 + ) = - dz - a 2 lx 1 - aZ3x 3 - a 24x 4 ) . . . - a z,,xll ' a Z2

. . . . . . . . . . . . . . . . . . . (7.97b)

SOLUTION OF LINEAR DIFFERENCE EQUATIONS

ITERATIONS

Fig. 7.28-Schematic representation of an iterative process and a convergence path .

1 45


p � + 1 ) = Y2[p ;k ) + p�k )], and p�k+ I ) = Y2[p ik ) + 1 00 ] .

. . . . . . . . . . . . . . . . . . . . (7. l O lb) . . . . . . . . . . . . . . . . . . . (7. l O l c)

With an initial guess of 1 00 for all unknowns, the Jacobi iterative equations for the first iteration, (k = 0), predict

p i! ) = h[p iO) + 200 ] = Ih( l OO + 2(0) = I SO, p�!) = Y2[p ;0l + p�Ol ] = Y2( 1 00 + 1 00) = 1 00, and p�!) = Y2 [p iO) + 1 00 ] = h( l OO + 1 00) = 1 00.

x X

exact

This procedure is continued until the convergence criterion is satis­ fied. Table 7.2 presents the solution within the specified tolerance ob­ tained after 13 iterations. The exact solution to this system of equa­ tions iSP I 175,P2 = I SO, and 3 1 25 . This solution can be verified by substituting these values of P into the original set of equations.

I T E R ATIO N S

p=

=

Fig. 7.29-Fast (f) and slow (s) convergence paths.

for i

= I, 2 , . . . , n, and check for convergence with (7.99)

for i I, 2 , . . . , n, where e specified error tolerance (convergence criterion). If the convergence test indicated by Eq. 7 .99 is satisfied for each unknown, then the iterations are terminated. Otherwise the values of at Iteration Level (k + J) are assigned to the values at Iteration Level (k), and a new iteration is started.

=

=

Xi

Gauss-Seidel Iteration. The Gauss-Seidel iteration is a modifica­ tion of the Jacobi iteration that simply uses the latest information available on the right side. In other words, each unknown on the right side is replaced by its most recently calculated approximation. The Gauss-Seidel iterative equations corresponding to those de­ fined by Eq. 7.97 become

X(kI + I ) = -L a II [d I - a 1""_y(k)2 - a 1 3x(k3 ) - a 1 4X4(k) - ' . . - a l ""Yn(kJ ], . . . . . . . . . . . . . . . . . . . (7. l 02a)

x(k2 + I ) = -.L a 22 [d2 - a 2 1x(kI + I ) - a 23X3(k) - a 24X4(k) -

- 2p I + P 2 = - 200. P I - 2P 2 + P 3 = O. P 2 - 2P 3 =

- 1 00.

= 0.5.

. . . . . . . . . . . . . . . . . . . . . . (7 . I OOa)

. . . . . . . . . . . . . . . . . . . . . . . . (7. 1 00c)

. . . . . . . . . . . . . . . . . . . . . (7. l O l a)

- a 2,,xn(k)] ,

.

.

- a 4,,xn(k ) ]'

k+ 1

Pl

P2

P3

0

1 00 1 50 1 50 1 62.5 1 62.5 1 68.75 1 68.75 1 71 .88 1 71 .88 1 73.44 1 73.44 1 74.22 1 74.22 1 74.61

1 00 1 00 1 25 1 25 1 37.5 1 37.5 1 43.75 1 43.75 1 46.88 1 46.88 1 48.44 1 48.44 1 49.22 1 49.22

1 00 1 00 1 00 1 1 2.5 1 1 2.5 1 1 8.75 1 1 8.75 1 21 .88 1 2 1 .88 1 23.44 1 24.44 1 24.22 1 24.22 1 24.61

max l p(k+ l) p(1c) 1 "

_

50 25 1 2.5 1 2.5 6.25 6.25 3. 1 3 3.1 3 1 .56 1 .56 0.78 0.78 0.39

through

xn(k + I ) = -L a im [d , -a, 1x(kI + I ) - a r2(k + I L a n3X3(k + l ) ,,2-'

A comparison of the system of equations defined by Eqs. 7.97 and 7 . 1 02 indicates that, if unknown is being calculated, the un­ knowns Xj forj < i are evaluated at Iteration Level (k + I ) while the unknowns Xj for j i are evaluated at Iteration Level (k). Because the Gauss-Seidel iteration uses the most recent information, it generally converges in fewer iterations than the Jacobi iteration (ap­ proximately half as many). In the Jacobi iteration, values of the solution vector at the old iteration level need to be stored during the new-itera­ tion-level computations. In the Gauss-Seidel iteration, however, each entry of the solution vector at the preceding iteration level is used to cal­ culate all succeeding entries of the solution vector. In other words, the Jacobi iteration requires that the recent iterations be kept in storage while the Gauss-Seidel iteration does not. Consequently, the Gauss­ Seidel iteration is more efficient in terms of storage, as well as computer time. For the Gauss-Seidel iterative scheme to converge, the Jacobi it­ erative scheme must also converge for the same problem. This condi­ tion for convergence of the Gauss-Seidel scheme is necessary but not sufficient. The Gauss-Seidel iteration can be shown to converge if the coefficient matrix is strictly (row) diagonally dominant. [A] of Order n is strictly (row) diagonally dominant if

Xi

>

TABLE 7.2--.1ACOBI ITERATION FOR EXAMPLE 7.6

1 46

. . . . . . . . . . . . . . . . . . . (7. 1 02c)

p ;k+ l) = Y2[p �k) + 200 ] ,

2 3 4 5 6 7 8 9 10 11 12 13

x(k3 + I ) = -L a 33 [d3 -a 3 1x(kI + I ) - a 3""_y(k2 + I ) - a 34x4(k) -

. . . . . . . . . . . . . . . . . . . . . . . (7. 1 00b)

Solution. The Jacobi iterative equations are

'---

. . . . . . . . . . . . . . . . . . (7. 1 02b)

Example 7.6. Use the Jacobi iteration scheme to solve the follow­

ing system of equations. Use a convergence criterion of e

I

n l a iil >i] a ijl j=j", 1l

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (7. 1 03)

BASIC APPLIED RESERVOIR SIMULATION


for i = 1 ,2 , . . . , n. The algorithm for the Gauss-Seidel iteration is as follows. Calculate X(k + I ) I

=

1.. a j;

[

dI

-� a . x (H I ) - � L L

j= 1

tj }

j=i+ 1

a "X(k) I} )

1 90

]

1 80

1 70

(7. 1 04) for i = 1 ,2 , . . . , n, and check for convergence with

I.

1 60

(7.99) for i = 1 ,2 , . . . , n. Again, the convergence check needs to be satisfied for every unknown.

P

I

1 50

I

I

/

/

..

"

.-

I

1 40

Example 7.7. Use the Gauss-Seidel iterative scheme to solve the

system of equations of Example 7.6. Again, start with an initial guess of 1 00 for each unknown and use a convergence criterion of e = 0.5. Compare the performance of the Gauss-Seidel iteration with that of the Jacobi iteration. Solution. Gauss-Seidel iterative equations for the problem of Ex­ ample 7.6 are

P3 exact = 125

1 30

1 20

. . . . . . . . . . . . . . . . . . . . (7. 1 05a)

___

110

_

(7. 1 05b)

1 00

5

1

0

p\1 ) = V2[p�O) + 200 ]

and

=

V2( 1 00 + 200) = I S O,

p�1 ) = 1/2[p�1 ) + 1 00 ] = V2( l 25 + 1 00) =

1 1 2.5.

Successive Overreiaxation (SOR) Methods. In SOR methods,

X(k + 1 )

1

=

1

X(k)

{ [ 1-

-.l.. + a d II

TABLE 7.3-GAUSS-SEIDEL ITERATION FOR EXAMPLE 7.7

0 1 2 3 4 5 6 7

1 00 1 50 1 62.5 1 68.75 1 71 .88 1 73.44 1 74.22 1 74.61

1 00 1 25 1 37.5 1 43.75 1 46.88 1 48.44 1 49.22 1 49.61

P3

1 00 1 1 2.5 1 1 8.75 1 21 .88 1 23.44 1 24.22 1 24.61 1 24.81

max !p(k+ 1 ) p(lQ ! I

SOLUTION OF LINEAR DIFFERENCE EQUATIONS

_

I

8

X(k + I ) 2

=

x (k) 2

{ [

-.l.. + a d2 22

1 :-2

a X(k) - a _y(k) - a , r(k) 1 ""'3 II I

]},

·

·

X(H I ) = X(k) + 3 3

{ [ -.l.. a 33

d3

x (H It

I) =

X(k) 1J

. . . . . . . . . . . (7. 1 06b)

- a 3 1X(H + I ) - a -r(k) 3 ""' 3 4"'2 1 I ) - a 3-r(k ·

through

. . . . . . . . . . . . (7. 1 06a)

- a 2 1 x(k1 + I ) - a 2_:-r(k) - a x (k) 23 3 2

{ [

. . . . . . . . . . . . (7. 1 06c)

1+

-.l.. I) + a dIf - a II I X(k I ) - a nC'�r(H 2 nn _

I

-

50 1 2.5 6.25 3. 1 3 1 .56 0.78 0.39

9 10 1 1 12 13 14 15

l

- a l4x (k) - a l x (k) . . . ,, ll 4

the convergence rate is accelerated by modifying the values of the estimated unknowns with the objective of reducing the number of iterations required for a solution. The selection of an appropriate re-

P2

GAUSS-SEIDEL ITERATION CONVERGENCE PATH

Fig. 7.3G-Comparison of convergence rates of Jacobi and Gauss-Seidel iterative schemes.

l

rion of e = 0.5 obtained after seven iterations. It is clear from Tables 7.2 and 7.3 that the Gauss-Seidel iterative scheme converges approximately two times faster (in terms of the number of iterations) than the Jacobi iterative scheme for the same problem and tolerance. Fig. 7.30 shows the convergence paths fol­ lowed for each member of the solution vector for the Jacobi and Gauss-Seidel iterative schemes. The figure clearly indicates that Gauss-Seidel iteration converges faster than the Jacobi iteration for each element of the solution vector.

Pl

7

_

laxation factor used to accelerate the Gauss-Seidel iteration is studied in detail later. Point SOR (PSOR) Method. Here, we start with the Gauss-Seidel iterative equations by writing Eq. 7 . 1 02 in a slightly different way. Adding x k ) to the right side and subtracting x k ) from the right side of equations for i = 1 ,2 , . . . , n yields

Table 7.3 shows the solution that satisfies the convergence crite­

k+ 1

6

..

JACOBI ITERATION CONVERGENCE PATH

ITERATIONS

. . . . . . . . . . . . . . . . (7. 1 05c) For an initial guess of 1 00 for P l , P2 and P3, the Gauss-Seidel itera­ tive equations for the first iteration, (k = 0), predict

PI exact = 175

.-.-

X (k + I ) - a x (k) - a m, ll ll.n - I n

l}

. . . . . . . . . (7. 1 06d)

These equations can be interpreted as x k + I ) = x:k) + correc­ tions made by each convergent Gauss-Seidel iteration. We can observe that the correction term for the unknown Xj is noth­ ing but the residual of the equation for Gridblock i divided by ajj re­ sulting from application of the Gauss-Seidel iteration. Now, we must •

l

1 47


detennine whether we can improve on the Gauss-Seidel correction term by multiplying it with a constant relaxation factor. This concept forms the basis of the SOR iteration, which is defined as

(k (k (k [ X(k+ a I I ) = X(kI ) + !!L II d I - a I IX I ) - a I r.r2 ) - a 1 3X3 )

. . . . . . . . . . . . . . (7. 1 07a)

[ - a 2 1x(Ik+ I ) - a22x2(k) - a 23X3(k) x2(k+ I ) = X2(k) + !!L a 22 d2

TABLE 7.4-PSOR ITERATION FOR EXAMPLE 7.8

24x4(k ) - . - a 2,1"r(.k) ] ' . . . . . . . . . . . . (7. 1 07b) - a 3 x ( k+ 1 ) - a 3 . r (k+1 ) - a 33x ( k ) X3( k+ I ) = X(3k) + !!L a 33 [ d 3 c' 2 1 I 3 - a

and

II

x(k + I ) - a nC".r(2k+ I ) - a113x3lk+ 1 )

- a n1 I

and

In Eq. 7 . 1 07, W = acceleration parameter or relaxation factor that is a positive constant between I and 2. The specific value of w that maximizes the rate of convergence is known as the optimum accel­ eration parameter, WOpl ' which is problem specific. Estimation of Optimum Overrelaxation Parameter later in this section presents a simple technique to estimate its value. The challenge of finding a unique WOpl implies that any arbitrary value of W between 1 and 2 does not necessarily accelerate the convergence for each element of the unknown vector. If W = 1 , the iterative equations of Eq. 7 . 1 07 re­ duce to the form of the Gauss-Seidel iteration. The algorithm for the PSOR iteration is as follows. Calculate

[

� a ' X(k ) a x(k+ 1) - L X(k+ I ) = iQ. Gi; d' - j=� L j=i+ 1 1 Ij }

IJ }

]

- (w

- I )x (k ) I

(7. 1 08) for i = 1, 2 , . . . , n, and check for convergence with (7.99) for i = 1 , 2 , . . . , n. If the algorithm is implemented with wopl, it is pos­ sible to accelerate the convergence rate of the Gauss-Seidel iteration by a factor of approximately two. Example 7.S. Use the PSOR iteration scheme to solve the system of equations in Example 7 . 6. Again, start with an initial guess of 1 00 for each unknown and use an acceleration parameter of W = 1 . 1 7 1 5 (as w e show later in this section, this i s the optimum value of w). Check for convergence with a convergence criterion of e = 0.5. Solution. The PSOR iterative equations are

p ;k + I ) I [p �k) + 200 ] - (w - l )p ;k),

=

.

.

.

.

.

(7. 1 09a)

p�k+ I ) = I [p ik+ I ) + 1 00 ] - (w - l )p�k ) . (7 . 1 09c) With an initial guess of 1 00 for PI , P2 , and P3 and an acceleration parameter of W = 1 . 1 7 1 5, the PSOR iterative equations for the first and

iteration, (k = 0), predict 148

maxlp(k+ 1) pUC, I

P3

1 00 1 34.31 1 46.09 1 49. 1 1 1 49.80 1 49.96

,

1 00 1 20. 1 0 1 23.55 1 24.72 1 24.93 1 24.98

I

-

_

I

58.58 1 1 .78 5. 1 7 0.88 0.26

.

.

=

l . Ii 15 [ 1 00 + 200] - ( 1 . 1 7 1 5 - 1 )( 1 00) =

=

l . Ii 15 [ 1 58.58 + 1 00] - ( 1 . 1 7 1 5 - 1 )( 1 00) =

1 58.58,

1 34.3 1 ,

p�l ) = 1 . 1i 1 5 [p �l ) + 1 00 ] - ( 1 . 1 7 1 5 - l) p�O)

i

. . . . . . . . . . . . . . . . . . (7. 1 07d)

I

1 00 1 58.58 1 68.63 1 73.80 1 74.68 1 74.94

P2

xn(k+ I ) = X(k) + !!L a ml [ d It

P1

k+ 1 0 1 2 3 4 5

= l . I 1 5 [ 1 34.3 1 + 1 00] - ( 1 . 1 7 1 5 - 1 )( 1 00) = 1 20. 10. Note that the values for the entries of the solution vector at the end of the first iteration are much better than those obtained from the Gauss-Seidel iteration. Table 7.4 presents the solution that satisfies the convergence criterion of e = 0.5 obtained after five iterations. Line SOR (LSOR) Method. Implementation of the SOR technique to

a group of unknowns located on a line results in the LSOR method. In this method, unknowns located on the same line are solved and relaxed simultaneously. For this discussion, consider the 2D La­ place equation.

a 2p + a 2p = O. ax2 ay 2

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . (7.24)

The finite-difference approximation of Eq. 7.24, assuming Ax = 6.y, is given by Eq. 7.26,

PiJ- I + Pi- I j - 4PiJ + Pi + lj + Pij + 1

= O.

. . . . . . (7 .26)

Consider the 2D domain in Fig. 7.3 1 . When Eq. 7 .26 is written for each gridblock in the system. by use of natural ordering, a pentadia­ gonal coefficient matrix is formed. When the LSOR method is im­ plemented, the unknowns located in the same row (or column) are solved simultaneously. Fig. 7.3 1 shows the positions of unknown nodes at a given iteration level for two possible sweep directions. If the system is going to be swept along the y direction, as Fig. 7.3 1 a shows, all the nodes that share the same j SUbscript make the un­ knowns for Line j. The unknowns for the nodes located on the pre­ vious line (nodes with Subscriptj - I ) are calculated during the pre­ vious line computations, so their values are available at the current (new) iteration level. Nodes with Subscript j + I are located on the next line to be solved; therefore. their values are available at the old iteration level. On the other hand, if the system is to be swept along the direction (Fig. 7.3 I b), all the unknowns of Eq. 7.26 with Sub­ script i are treated as the unknowns of the current iteration level; those with Subscript i - I are available at the new iteration level; and those with Subscript i + I are available at the old iteration level. The following equations are written for the two lines in Fig. 7 .3 1 , j = 3 and i = 3. For a y-direction sweep, the LSOR equation for Line j = 3 is

x

p (k+1 ,3I ) 4p 1.3(k+ I ) + p (k++ 1 ,I3) = p i.2(k+ I ) p i.( k4) _

_

1 -

_

1

. . . . . . . . . . . . . . . . . . . . (7. 1 1 0) BASIC APPLIED RESERVOIR SIMULATION


y j= 5

0

j=4

j= 1

0

0

0

0

+

+

+

+

+

1=1

1-2

1=3

1 .. 4

1=5

1=6

(8) LEGEND

rsw•

0

+

y �

ep D i re ct l o n

- ..

x

Sweep D i rect i o n

j= 5

j =3

j=2

+ +

• (b>

Unknown nodes to be + calculated at the cu rrent iteration level

+

j= 1

Sweep d i rection a l o n g the y d i rect i o n

+

+

0 0

0 0

0

-

x

S wee p d i rection alo n g the x d i rect i o n

o at the old iteration

Unknown nodes still

Unknown nodes that are • already calculated at the current iteration level

level

Fig. 7.31 -Arrangement of lines for the LSOR method.

for i = 1 through 6. For an x-direction sweep, the LSOR equation for Line i = 3 is

(k+ II) 4p �(k+ I ) + p �(k++ II) = p �(k+ I ) p�(k ) P �_

_

_

pressure-convergence tolerance of 1 psi. All block properties are uniform, and Ax = Ay = 300 ft, h = 20 ft, kx = Icy = 200 md, and rp = 1 6%. The fluid viscosity is 1 cpo Solution. The equation describing 2D incompressible flow is

. . . . . . . . . . . . . . . . . . . . (7. 1 1 1 ) for j = 1 through 5. A characteristic finite-difference equation for Line j for a y-direc­ tion sweep is

(k+ I1 ) p IJ+ (k) I p I-� (k+I J 1 ) 4p IJ� (H I ) + p I�+(HI J l ) = p IJ_

_

·

_

. . . . . . . . . . . . . . . . . . . . (7.22) For a homogeneous reservoir and uniform block distribution, the equation reduces to Eq. 7.23, which can be written as

iJ 2p + iJ2p =

. . . . . . . . . . . . . . . . . (7. 1 1 2) .

iJx2

.

for i = 1 ,2 , . . . , nx . Eq. 7. 1 1 2 represents a tridiagonal system of equa­ tions. After this system is solved (generally with Thomas' algo­ rithm), the unknowns on Line j 1 are solved in a similar fashion. After solving the equations for each line and obtaining all values of ; for that line, the solution for that line is accelerated as

+

_

'

.

J

.

.

.

.

.

.

.

.

.

.

.

_

p,qsc

P cVb k ·

. . . . . . . . . . . . . . . . . . . . . . . (7. 1 1 5)

The finite-difference analog of the equation is

Pi + lj - 2P ij + Pi- I j + P ij + 1 - 2P ij + Pij- I - -

p Y+ I ) p '(J� + 1 ) p (k) + OJ [p IJ�(H I ) p '(kJ ) ] , (7. 1 1 3) where p : (H I ) the unaccelerated solution at Iteration Level (k + 1 ) . This solution is accelerated by use of Eq. 7. 1 1 3 . Therefore, p '(H I ) = the accelerated solution at Iteration Level (k + 1 ) . =

iJy 2

2

----'------':...-----=:.

(A X)

(Ay)

2

_

(Pp,qscVbck ) --

ij

'

. . . . . . . . . . . . . . . . . . . (7. 1 1 6a)

.

=

the corresponding equation to Eq. 7. 1 1 2 for Line i (if the system is swept along the x direction) is

Constant Pre.sur. Boundar".

�(k+I l ) = p I-(k+I Jl ) p (k)I+ I J. �(k+I 1 ) 4p � (H I ) + p IJ+ p IJ_

I

_

_

J

·.

.

.

. ... . .

.

.

.

.

.

. . . (7. 1 1 4) .

.

for j = 1 ,2 , . . . , ny • Eq. 7. 1 1 3 is also applied. The reason for the improvement of LSOR over PSOR is that more unknowns are evaluated at Iteration Level (k + 1 ) and, consequent­ ly, more information at the new iteration level is incorporated into the computations. Example 7.9. Solve the following steady-state fluid-flow prob­ lem to obtain the pressure distribution in the horizontal, 2D, homo­ geneous, isotropic reservoir in Fig. 7.32. The outer boundaries of the reservoir are kept at 2,800 psi a, and the production well is pro­ duced at a constant rate of 400 STBID. In the solution of the fi­ nite-difference equations, use the LSOR method with = 1 and a

OJ

SOLUTION OF LINEAR DIFFERENCE EQUATIONS

y

L. Fig. 7.32-Two-dimensional, isotropic, homogeneous reservoir of Example 7.9 (dashed lines represent block boundaries).

1 49


z

,L{ , i

Fig. 7.33-Node numbering for the implementation of LSOR method for Example 7.9.

which can be simplified further for ax = Ay (note that Vb = axAyh) as

P ij- I + P i- I j - 4P ij + P i + I j + P ij + I

=

-

c) (p,qs P hk ' ..

Fig. 7.33 shows the node-numbering system used in implementing the LSOR method . In the implementation of the LSOR procedure, write the line equations forj = 2 and j = 3 sweeping the system along the y direction. On Line j = 2, there are two unknown nodes, numbered 1 and 2 in Fig. 7.33. Similarly, on Line j = 3, there are two unknowns; they are numbered 3 and 4. The characteristic finite-difference equation for implementation of the LSOR method given by Eq. 7. 1 12 is _

_

_

_

(p,qPchksc ) " I.J

. . . . . . . . . . . . . . . . . . . . (7. 1 1 7) Now, we are ready to write the equations for the two lines that we identified. The equations for Line j = 2, Node 1, are 2, 800

- 4p ;IH I ) + p;(k+ l ) =

- 2, 800 - 2, 800 or

- 4p;IH I ) + p;IH I ) =

( 1 )( - 400) ( 1 . 1 27)(20)(0.200) - 8, 3 1 1 .3 .

solution is not going to be accelerated. Start the iterations with an initial guess of = = = = 2, 800 psia. The following are solutions of the line equations for first iteration (k = O). For Line j = 2,

p \O) P �O) P �O) P �O)

ij

. . . . . . . . . . . . . . . . . . . (7. 1 1 6b)

P I-�(k+IJ 1 ) 4p IJ�(H I ) + p I�+(HIJ I ) = P (H ij- II ) P Iij+k ) 1

Fig. 7.34-Three-dimensional reservoir divided i nto four vertical planes (slices).

. . . . . . (7. 1 1 8a)

. . . . . . . . . . . (7. 1 1 8b)

The equations for Line j = 2, Node 2, are

p ; (H I ) 4p ;IH I ) + 2, 800 = - 2, 800 - p �k ) . . . (7. 1 1 9a) . . . . . . . . . (7. 1 1 9b) or p ; ( k+ 1 ) - 4p;(H I ) = - 5, 600 p �k ) . _

- 4p ;( I ) + p ;( I ) = - 8, 3 1 1 .3 . . . . . . . . . . . . . . . . (7. I 22a) and p ; ( I ) - 4p ;( I ) = - 8, 400 . . . . . . . . . . . . . . . . . (7. 1 22b) I I for p; ( ) = 2, 776.4 psia and p;( ) = 2, 794 psia, because w = I , p \i ) = 2, 776.4 psia, and p �1 ) = 2, 794 psia. For Line j = 3,

- 4p ;( I ) + p;( I ) = - 5, 600 - 2, 794 . . . . . . . . . . (7 . 1 23a) and p ; ( I ) - 4p;( 1 ) = - 8, 400 . . . . . . . . . . . . . . . . . (7 . 1 23b) for p ;( I ) = 2, 798.4 psia and p :( I ) = 2, 799.6 psia, because w = I , p �1 ) = 2, 798.4 psia, and p�1 ) = 2, 799 . 6 psia Following are solutions of the line equations for the second itera­ tion (k = I ). For Line j = 2,

- 4p;(2) + p;(2) = - 8, 3 1 1 .3 . . . . . . . . . . . . . . . . (7. 1 24a) . . . . . . . . (7. 1 24b) and p; (2 ) - 4p;(2 ) = - 5, 600 - 2, 798.4 for p; (2 ) = 2, 776.2 psia and p;(2 ) = 2, 793 .7 psia, because w = 1 , p \2) = 2, 776.2 psia, and p �2) = 2, 793.7 psia. For Line j = 3,

- 4p;(2 ) + p;(2) =

_

The equations for Line j = 3, Node 3, are 2, 800

- 4p ;<k+ 1 ) + p;<H I ) = - p�H I ) - 2, 800 . . . . . . . . . . . . . . . . . . . (7. 1 20a)

or

- 4p ;(H I ) + p ;(H I ) =

- 5, 600

_

p �H I ).

. . . . (7. 1 20b)

The equations for Line j = 3, Node 4, are

p ;(H I ) 4p;<H I ) + 2, 800 = - 2, 800 - 2, 800 . . (7. 1 2 I a) or p ; (H I ) - 4p ;<H I ) = - 8, 400. . . . . . . . . . . . . . . (7. 1 2 I b) _

To implement the LSOR iterations, Eqs. 7. 1 1 8 and 7 . 1 1 9 for Line j = 2 and Eqs. 7 . 1 20 and 7. 1 2 1 for Linej = 3 must be solved simultaneously for each line. Because, at this stage, we have not discussed how to cal­ culate the acceleration parameter, set w = I for simplicity, implying that 1 50

- 5, 600 - 2, 793.7

. . . . . . . . . (7. 1 25a)

. . . . . . . . . . . . . . . . . (7 . 1 25b)

p ;(2) = 2, 798.3 psia and p ;(2 ) = 2, 799.6 psia, because w = 1 , p �2) = 2, 798.3 psia, and p �2) = 2, 799.6 psia. The improvement on

for

every node between Iteration Levels 1 and 2 is less than the specified convergence criterion (e = 1 psi); therefore, the iteration process is terminated after the second iteration.

Block SOR (BSOR) Method. The BSOR method, where unknowns located on more than one line are solved simultaneously, is an exten­ sion of the LSOR technique. Again, the objective for solving for more unknowns simultaneously is to incorporate as much information as possible at Iteration Level (k + 1 ) into the iteration process. One op­ tion in implementation of the BSOR method in 3D problems is to solve for all unknowns located on the same plane simultaneously. This version of BSOR is also known as plane or slice SOR. As BASIC APPLIED RESERVOIR SIMULATION


Fig. 7.34 shows, at a given iteration level, equations are solved for each slice (vertical plane) of the 3D reservoir. In writing the system of equations for a plane, unknowns located on the planes solved earli­ er are kept at the new iteration level, while unknowns located on the planes to be solved are evaluated at the old iteration level. Consider Laplace's 3D equation, iJ2p a 2p a 2p - + - + - = 0. ax2 ay 2 az2

(7. 1 26)

The seven-point finite-difference approximation to Eq. 7 . 1 26 (for Ax = �y = �) is obtained from Eg. 7.36,

Pij,k - I +P ij- I,k +Pi- Ij,k - 6P ij.k + P i+ Ij,k +P ij+ I,k + P ij.k + 1 =

prOR IjWJP J + lh[w 2p; - 4(w - 1 ) ] . . . . . . . . . (7. 1 33) O . When w = I, PSOR reduces to the Gauss-Seidel iteration and Eq.

. . . . . . . . . . . . . . . . . . . (7. 1 27)

If Eq. 7 . 1 27 is to be solved with the slice SOR method for the slices shown in Fig. 7 . 34, the characteristic slice equation (for Slice j ) becomes

p ij,*(kk+- II) + p i-*(kIj,+ 1k) _ 6p ij,*(kk+ I ) + p i+*(kIj,+ Ik) + p ij,*(kk++ I1) =

- P ��� ::k - P ��� I,k '

. . . . . . . . . . . . . . . . . . . . . . . (7. 1 28)

When Eq. 7 . 1 28 is written for every node located on Slicej, a penta­ diagonal coefficient matrix is generated. This matrix equation can be solved by use of one of the techniques discussed earlier in this chapter for each slice. After solving the equation for each slice, an overrelaxation parameter, W, is applied to the solution vector of that slice to accelerate convergence. An equation similar to Eq. 7 . 1 1 3 , with Subscripts (iJ,k) replacing Subscripts (iJ), is used for accelera­ tion. After each BSOR iteration is completed, a convergence check is made to see whether the preassigned convergence tolerance is sa­ tisfied. In the case of the 3D reservoir in Fig. 7.34, slice equations are solved four times during each BSOR iteration (for Slices j = I , j = 2, j = 3 , and j = 4). Obviously, if the slices were taken along the i and k directions, the number of slice equations to be solved at each iteration level would be three (for Slices i = 1 through 3) and five (for Planes k = I through 5), respectively. Estimation of Optimum Overrelaxation Parameter. One of the most crucial steps in implementing the SOR methods is the deter­ mination of the optimum acceleration parameter, wopt' It can be shown that all the systematic iterative methods discussed in this chapter converge if the absolute value of the spectral radius (maxi­ mum eigenvalue) of the iteration matrix associated with the iterative method is less than one. Consider a linear system of equations, such as [A] X = d,

(7. 1 )

where [A] = [D] - [L]

- [U] .

. . . . . . . . . . . . . . . . . . . . (7. 1 29)

In Eq. 7 . 1 29, [D] diagonal entries of [A] (all nondiagonal entries of [D] are zero), [U] = upper triangular elements of [A] (all diagonal and lower diagonal entries of [U] are zero), and [L] = lower triangu­ lar elements of [A] (all diagonal and upper diagonal entries of [L] are zero). The iteration matrix for the Jacobi iteration is

=

(7. 1 30) where [I] identity matrix. The iteration matrices for the Gauss-Seidel and PSOR iterative procedures are =

[Gb = ([D] - [L]) - I [U]

and

[GhaR = ([D] - w[L]) - I { w [U] - (w

(7. 1 3 1 )

- I )[D] } ,

(7. 1 32)

respectively. As discussed earlier, a sufficient condition for these systematic it­ erative procedures to converge is that the spectral radius (maximum SOLUTION OF LINEAR DIFFERENCE EQUATIONS

eigenvalue), P J' of [Gl is less than one in absolute value. It can also be shown that the rate of convergence for a given problem depends ' on the magnitude of the spectral radius. As the spectral radius be­ comes smaller, the rate of convergence increases. Indeed, - log lO P e gives an indication of the number of decimal digits by which the solution is improved by each convergent iteration. The spectral radii of the Jacobi, Gauss-Seidel, and SOR iteration matrices are related to each other. The relationship between the spectral radii of the SOR iteration matrix and the Jacobi iteration matrix is5 \/,

=

7 . 1 33 reduces to the relationship between the spectral radii of the Gauss-Seidel and Jacobi iteration matrices. 1h P es - P J'

(7. 1 34)

_

Because the logarithm of the spectral radius gives an indication of the rate of convergence, one can deduce from Eg. 7 . 1 34 that the Gauss-Seidel iteration converges two times faster than the Jacobi it­ eration simply because log lOP es = 2 log lOP J.

.

.

.

.

.

.

.

.

.

.

. . . (7. 1 35)

Close examination of Eg. 7 . 1 33 reveals that no value of w makes P SOR < 1 if \ P J \ > 1 . Therefore, the SOR iteration diverges if the Ja­ cobi iteration diverges. This is why the SOR iteration helps to accel­ erate only the convergence of an already convergent iteration, but cannot make a divergent scheme convergent. Ideally, we would like to find an optimum value for w that mini­ mizes the right side of Eq. 7 . 1 33 to yield a minimum P SOR It can be ' shown that a minimum value of P SOR is obtained when (7. 1 36) From Eq. 7 . 1 36, the value of the Wopt is W opt

-

2

(1 + j1

_

PJ

)

(7. 1 37)

or, substituting for P J by use of Eq. 7 . 1 34, w opt

-

2

(7. 1 38)

( + jJ - P es) ' 1

Calculation of the optimum acceleration parameter from Eqs. 7 . 1 37 and 7 . 1 38 is straightforward if either P J or P es is obtained from its respective iteration matrix. However, calculating eigenva­ lues for large systems is as arduous a task as solving the original sys­ tem of equations. In practice, the spectral radius of a given iteration matrix can be determined from a single test calculation with w = 1 by use of the decrease in the difference between successive approxi­ mations. The ratio of the maximum differences (improvements) of successive iterations satisfies

I \ _ 2 JdWi - P es - PJ d(k+ 1 )

(7. 1 39)

_

for sufficiently large values of k . Once the quotient ofEg. 7 . 1 39 con­ verges to a constant value, it is used as Pes in Eg. 7 . 1 38 to calculate Wopt, and iterations can be continued with the optimum acceleration parameter from that point on. As discussed earlier, Wopt lies between 1 and For a given prob­ lem, it is possible to obtain a solution to the system of equations sev­ eral times with different values of W (between 1 and 2). Because dif­ ferent W values result in different P SOR values, the number of iterations to obtain convergence also varies. Therefore, for purely academic purposes, it is possible to conduct a series of numerical ex­ ercises in which a set of linear equations is solved with W values be­ tween 1 and 2. Fig. 7.35 shows the qualitative nature of the relation­ ship between the number of iterations needed for convergence and the value ofw. The shape of the curve in Fig. 7.35, where the portion of the curve for values smaller than Wopt has a much steeper slope

2.

151


mum differences of successive iterations in Table 7.5. Table 7.5 shows that the spectral radius converges to 0.50 at the completion of the third and fourth iterations. Because Pes is determined to be 0.50, we can estimate WOpl from Eq. 7 . 1 38 as

W OPI

- - - - - - - - - - - - - - -

: I I

ID opt

l/

1 .0

( 1 + h - 0.50) 2

1 . 1715.

=

Continuing the solution process with the SOR procedure, we use 1 . 1 7 1 5 for the value of WOpl starting with the fifth iteration, as shown in Table 7.6. A comparison of Table 7.6 with Table 7.3 shows that the Gauss­ Seidel and PSOR iterations took the same number of iterations to con­ verge within the same tolerance. This is because of the relatively small number of iterations required for convergence for this specific example. This simply indicates that the relatively short convergence path experienced in this example masks the superiority of the PSOR iteration over the Gauss-Seidel iteration, especially considering that four of the seven iterations were used to calculate WOpl '

� I I I I I I

2.0

co

=

Fig. 7.3S-Relationship between number of iterations performed for convergence and value of w .

than that for values greater than WOpl ' is typical. This simply implies that a slightly overestimated value of WOpl is not as bad as a slightly underestimated value of WOpl '

Iterative Alternating-Direction Implicit Procedure (ADIP). The objective of the ADIP (sometimes referred to as operator splitting) is to separate the 3D finite-difference operator into three ID opera­ tors. Once separated, the I D operators can be solved with efficient, tridiagonal, linear matrix techniques (Thomas' algorithm). As Sec. 7.2.3 discusses, the finite-difference approximation to 3D reservoir flow problems results in an algebraic equation of the form

Example 7.10. Find the value of WOpl for the system of equations in Example 7.6. Solution. The system of equations introduced in Example 7.6 is

. . . . . . . . . . . . . . . . . . . . . . (7. 1 00a) - 2P I + P 2 = - 200, P I - 2P 2 + P 3 = 0, . . . . . . . . . . . . . . . . . . . . . . . (7. 1 00b) and P 2 - 2P 3

- 1 00.

=

. . . . . . . . . . . . . . . . . . . . . . . (7. 1 00c)

The PSOR iterative equations for this system (See Example 7.8) are

\

p k+ I)

=

P (2k + l )

=

r [p �k) + 200 ] - ( W OPI - 1 )p \k),

W

] (

[

W OPI ( + l p 2k ) + p 3( k ) _ w Opl 2

_

. . . . . (7. 1 40a)

)

I p 2( k ) '

(7. 1 4 1 ) where, for slightly-compressible-flow problems, the unknown at the new time level; the coefficients B, S, W. E, N, and A = transmissibilities in the appropriate flow directions; the coeffi­ cient C = summation of the transmissibilities plus contributions from the accumulation term; and the right side Q = summation of the gravity-head terms plus contributions from the accumulation term plus the source/sink term. Eq. 7 . 1 4 1 can be approximated by separating it into the directions of flow: x = pressures

(7. 1 42)

(7. 1 40b)

(7. 1 43) . . . . . . . . . . . . . . . . . . . (7. 1 40c) With an initial guess of 1 00 for the unknowns Ph P2, andp3 , start the iterations with wopl = 1 (Gauss-Seidel iteration) and check the maxi-

(7. 144)

TABLE 7.S-DETERMINATION OF SPECTRAL RADIUS FOR EXAMPLE 7.1 0

k+ 1 0

Woe.'

Pl

1 00 1 50 1 62.5 1 68.75 1 71 .88

2 3 4

P2

P3

1 00 1 25 1 37.5 1 43.75 1 46.88

1 00 1 1 2.5 1 1 8.75 1 21 .88 1 23.44

l

max p(k+ 1 ) I I

1 52

woe.'

1 .1715 1 .1715 1 . 1 71 5

Pl

1 73.71 1 74.55 1 74.90

P2

1 48.86 1 49.70 1 49.93

1

P3

1 24.60 1 24.89 1 24.98

1

0.25 0.50 0.50

l

max p(k+ 1 ) I

cft k+ 1 )

I ft./<)

50 1 2.5 6.25 3. 1 3

TABLE 7.6-CONTINUATION OF ITERATIONS FOR EXAMPLE 7.1 0 WITH Wopt

k+ 1 5 6 7

pI(l<)

_

I

_

1 .98 0.84 0.35

pI( /<)

I

BASIC APPLIED RESERVOIR SIMULATION


where, for the slightly-compressible-flow problem,

. . . . . . . . . . . . . . . . . . . (7. 1 52) . . . . . . . . . . . . . . . . . . . . . . . . . . . . (7. 145)

T /z . . " T Il" ' " , . IJ + n.k IJ. k + n where Ax + - T ' T Ixi + 'h.j.k Ixi + 'h.j.k

. . . . . . . . . . . . . . . (7. 1 53)

. . . . . . . . . . . . . . . . . . . (7. 1 54)

- B

(k) ij.k Xij.k -I

k) - S . (k ) (k ) ij.k X(ij - I.k NIJ.k XIJ + l .k A iJ.k x ij.k + I

'

(7. 146)

+

W'

''l:

T

Q ij.k - Q ij.k + ••

[

c·" ij.k -

J [ ( Vb</>C ) a . B 0tl.t

' I

+ ij.k

W (k) �TI �

]

. Xij.k -

B

ij.k Xij.k - 1

TIz · ' ""f2 + TIz · · k. I', + 1/3 IJ. + 'I:" ' J ,k -

ij.k

_

v,

+

+ T il'. ij + Yl,k +

T/ . .I

ij - '/,.k

+ Tix

i - V,j.k

w mlO· •

(7. 1 56) w max Once Wmin, wmax, and nk are determined, all the iteration parameters

+ TL l ri + V j.k

Tlz ;j,k + Y2 .

(7. 1 5 1 )

For 2 D problems, the factors 1/3 and 2/3 i n Eqs. 7 . 145 through 7 . 1 50 should be replaced by the factor of Yz and the appropriate directional equations should be removed from the equation set. In Eqs. 7 . 1 45 through 7 . 1 50, w( k) is an iteration parameter. Unlike the SOR methods, w( k) is not a constant, but varies from iteration to iteration. Empirical evidence indicates that the iterative ADIP tech­ nique exhibits the best convergence behavior when w( k) is cycled through nk values spaced geometrically between Wmin and Wmax · The value of Wmin can be determined by6 SOLUTION OF LINEAR DIFFERENCE EQUATIONS

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (7. 1 57)

. . . . (7. 148)

T Iz

n -I (0. 1 72) k

can be calculated from

. . . (7. 1 50) =

In Eqs. 7 . 1 53 through 7 . 1 55, the entire grid system is swept to de­ termine the minimum value defined by Eq. 7 . 1 52. In these equa­ tions, values of). = 0 and ). = 00 should be excluded from the search. The value of Wmax can be determined by6 Wmax = 1 for 3D and 2D areal problems (x-y), and Wmax = 2 for 2D cross-sectional problems

The optimum number of parameters to cycle through, 11k , can be estimated as the smallest integer that satisfies

. . . . . . . . . . . . . . . . . . . . . . . . . . . .(7. 149)

and �T I

. . . . . . . . . . . . . . . . . . (7. 1 55)

(x-z ).

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . (7. 147)

211 3

T lx l . T IY i+Vj k ij + 'h.k and A' z = + . T Iz T Iz ij.k + v, ij•k + 'h

for k= I, and

(

)

I W m x nk - I ( k - I ) , W ( k) = W � W mm

. . . . . . . . . . . . . . . . . . . (7. 1 58)

for k = 2, 3 , . . . , nk. The iterative ADIP technique can now be de­ scribed by the following algorithm. 1 . Estimate all iteration parameters with Eqs. 7 . 1 52 through 7. 158. 2. Make an initial estimate for all unknowns, X�O)k ' 3. Calculate C;j.k and Q;j.k with Eqs. 7. 145 and 7. [46, respectively. 4. Solve Eq. 7 . 1 42 for X;j.k with Thomas' algorithm (Sec. 7 .3 . 1 ) for every i-direction line i n the system. 5. Calculate C;j.k and Q;;k with Eqs. 7. 147 and 7. 148, respectively . 6. Solve Eq. 7 . 1 43 for X;;k with Thomas' algorithm for every j­ direction line in the system. 7. Calculate c;j.� and Q;j.� with Eqs. 7 . 1 49 and 7 . 1 50, respectively. 8. Solve Eq. 7. 144 for X ( k ; 1 ) with Thomas' algorithm for every k-direction line in the syst�� . 9. Check for convergence with Uk + I ) r'J.k

_

(k ) I X IJ.k

< E

(7.99)

for all i. j. k. 10. If the-system has converged, X('J,k +k I ) represents the final solution of [A]x = d ; otherwise, update the unknowns and go to Step 3. In the previous algorithm, if the number of iterations required for convergence is greater than the number of iteration parameters, 11k , then on Iteration Level (nk + I), W( 1 ) is used and the cycle is repeated for subsequent iterations. The iterative ADIP technique was popular for reservoir simula­ tion in the 1 960's and 1 970's. It is not used in most modern reservoir simulators because more powerful linear-solution techniques, such as conjugate-gradient-like (COL) techniques, have been developed. Approximate Factorization Techniques. The objective of ap­ proximate factorization techniques is to replace the original coeffi­ cient matrix, [A], with an approximate coefficient matrix, [A'], which is similar to the original coefficient matrix but is easier to fac­ tor into [V] and [U'] components. Approximate factorization tech153


Fig. 7.36-Typical coefficient matrix, [A), for a 3D simulation problem.

Fig. 7.37-Approximate lower triangular matrix, [L'), used in the approximate factorization technique.

niques, particularly the strongly impl ic i t procedure (SIP), have the capacity to solve matrix equations for practical simulation problems where heterogeneity is an important consideration and for cases where the SOR or ADIP technique fails to converge. Approximate factorization techniques are not commonly used in modem reservoir simulation because of the development of more powerful techniques. A discussion of approximate factorization is important for historical purposes; however, because they form the basis for several matrix preconditioning techniques. Reservoir simulation attempts to solve a matrix equation of the form

In our di scus sion on Crout reduction (Sec. 7.3 . 1 ). we described an intermediate vector used to expedite calculations. We can use a simi­ lar procedure for approximate factorization. Define ay(k + I ) so that

[A]x = J.

(7. 1 )

We can define the residual o f a n iterative procedure as (7. 1 59)

-(k+ I . . u.tX ), from one Iteration

Now de fime the Improvement · vector, level to the next. That is,

(7. 1 60) Substituting Eg. 7 . 1 60 into Eq. 7 . 1 results in

[A]ik+

J)

[

[A] ik)

=

+

oik+

J)]

J,

=

(7. 1 6 1 )

or rearranging and substituting Eq. 7 . 1 59 results in

[A]U.tx-(k+ l )

=

-r(k) .

(7. 1 62a)

For approximate factorization techniques, we substitute an approxi­ mate coefficient matrix, [A/], for the coefficient matrix, [A], in Eq. 7 . 1 62a to obtain

[A/)U.tx-(k+ l )

=

-r(k)

[

=

[L/] and [V/] components of [A/], -,:<k) . . . . . . . . . . . . . . . . . . . . . (7. 1 62c)

When going from Eg. 7 . 1 62b to Eg. 7 . 1 62c, we have replaced the approximation sign with an equal sign. 1 54

wh ere

=

-,:<k),

.t _(k + I ) [V/]uX

=

(7. 1 63)

-(k+ I u.ty ) .

. . . . . . . . . . . . . . . . . . . (7. 1 64)

The use of the intermediate vector, ay (k + I ), allows us to solve for a two-stage procedure: a forward-substitution process followed by a back-substitution process. In the forward-substitution process, Eq. 7 . 1 63 is solved for oy (k+ I ) by sweeping the finite-dif­ ference grid from Gridblock ( 1 , 1 , 1 ) with increasing i, j, and k in­ dices. In the back-substitution process, Eg. 7 . 1 64 is solved for ax (k+ I ) by sweeping the finite-difference grid from Gridblock (nx, ny , "z) with decreasing i, j, and k indices. We now need to define matrix [A/], which approximates the origi­ nal coefficient matrix, [AJ. To achieve this, consider the coefficient matrix in Fig. 7.36, which illustrates the heptadiagonal band struc­ ture discussed earlier in this chapter. To obtain the approximate co­ efficient matrix, [A/], we assign the same band structure found in the original coefficient matrix, [A] (Fig. 7 .36), to the lower diagonal matrix, [L/] (Fig. 7.37), and to the upper diagonal matrix, [V/] (Fig. 7.38). We can now generate [A/] by multiplying [L/] and [V/]. Fig. 7.39 shows the resulting matrix, [A/]. If we compare the original coefficient matrix, [A], in Fig. 7.36 with the approximate coefficient matrix, [A/], in Fig. 7.39, we see that the two matrices have similar structures (with identical band widths) but that [A/] has six additional bands: F' , G /, H' , l' , J/ and K' . The general equation that corresponds to coefficient matrix [A/] is

aX(k+ I ) in

B;j.k aX��.; �\

+

F;j.k aX �:��:k_ 1

+

G:j.k aX��! ::k- I

+

k+ 1 ) + Hij.ku w/ .tX(k+Jl ) ' .tX ( k+ l ) S/ij.k aX (ij_ l•k i+ Ij-'- I.k + ij.ku i_ I .k

+

CiJ'k / " ax("Jk+,k I )

.

or, after substituting the

[L/] [u/]oik+ I ) ]

. . . . . . . . . . . . . . . . . . . . . . . . (7. 1 62b)

[L/]aik+ I )

.tX'(k + I' ) + + E'iJ'ku . I I k + J.

.t (k+ l ) + + N'ij.k UX ij+ l.k

J/ij.ku.tX(ijk+_ Il .)k+ 1

(k+ I )I = + A ij. ' k axij.k+

(k ) ' rij.k

.t (, k+ I' ) 1"/J'k• uX - I J+ I .k .t (k+ 1 ) ' UX + Kij.k i_ Ij.k+ 1

. . . . . . . . . . . . . . . . . . . . (7. 1 65)

BASIC APPLIED RESERVOIR SIMULATION


S;J,k = Sij,k ' "'iJ.k = WiJ,,,, C;J,k = CiJ.", E!J,k = EiJ,k ' N;J.k = NiJ.", and A ;j.k = Aij.k'

(7. 1 67) (7. 1 68) (7, 1 69) (7. 170) (7. 1 7 1 ) (7. 1 72)

In Eqs. 7 . 1 66 through 7 . 1 72, the coefficients on the left sides are the entries of the approximate coefficient matrix, [A'], while those on the right sides are the entries of the original coefficient matrix, [A]. Combining Eqs. 7 . 1 66 through 7 . 1 72 with the relationships shown in the key in Fig. 7.39 results in the following definitions for the en­ tries of [L'] and [U']. (7. 173) (7. 1 74) (7. 1 75)

Fig. 7.38-Approximate upper triangular matrix, [U'], used in the approximate factorization technique.

J' , K' , I' , where Coefficients B', F', G ' , S', H ' , W' , and are defined in the key in Fig. 7.39. In Eq. 7 . 1 65, the ' ..t nonstandard terms F ' ..t H ' ..t J, and GK' ..t 1) are J ' It [' ..t a J ' ..t t resu of the six additional bands in Fig. 7.39. It is necessary to develop definitions for the entries of [L '] (b' , S ' , ' w , and in Fig. 7.37) and the entries of lU'] (e', n', and in Fig. 7.38) in terms of the entries of the original coefficient matrix, [A]. We are now in a position to discuss three methods for defining these required coefficients. Simple Coefficient Method. In the simple coefficient method, we compare Eq. 7 . 1 65 with Eq. 7.39 to obtain the following definitions for the coefficients in Eq. 7 . 1 65 .

C', E', N', A' 1 ) 1 ' iJIYx(,k+I 1' )- I ' iJ,(k+k uXI )(' k++ I l' )k _ 1 ' iJ,k ux(,(1k+' ++1k+ k I k+ ) ( ' ' X X X iJ,k u i- IJ + I,k' iJ,k u iJ- I,k + 1 ' iJ,k U i-IJ,k + 1 direc' a'

c'

(7. 1 66)

. . . . . . . . . . . . . . . . . . . (7. 1 76)

k eij,k = -Eij, c ij,,-k ,

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (7. 1 77)

k n iJ,k = NiJ, T' iJ,k

. . . . . . . , . . . . . . . . . . . . . . . . . . . , . . . (7. 178)

I

I

and

k a iJ,k = Aij, -,- , c iJ,k I

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . (7. 1 79)

e� _ l j,k , n ;j _ l ,k ' and a;J.k _ 1

In Eq. 7 . 1 76, the terms are removed from the equation when i, j, or k = I , (that is, when i - I = 0, j - 1 = 0, or k - 1 = 0), respectively. Mathematically,

eOJ,k = n ;,O,k = a ;J.o = O .

. . , . . , . . . . . . . . . . . . . . (7. 1 80)

The simple coefficient method tends to converge slowly because no effort has been made to minimize the effects of the nonstandard

B'j,i,k = b'j,i,k F'j,i,k = b'j,j,kS'j,j,k'l G\J,k

= b'l,j,kn';,I,k.1

S'j,j,k = S'jJ,k H'i,I,k = s 'i,i,kS'ij'l ,k W'j,i,k = w'iJ,k C'i,i,k

=

c 'i,l,k + w'I,i,kS'i-1 J,k ' · · ,k + s ' 1,I,kn I,J·1

+ b';,i,�'i,i,k'l

E'lJ,k = C'i,I,kS'ij,k

' ' I 'i ,i, k = w j,i,kn l'l ,j,k ' N' i,j,k n - c ' I,j,k I,j,k

J'.I ,j, k = s' I,j,ka' l,j·1 ,k

K'·I,j,k = w'I,j,ka'1· 1 ,j , k

A'i,i,k

=

C'ij,ka'IJ,k

Fig. 7 .39-Approximate coefficient matrix, [A '], obtained by multiplying the lower triangular ma­ trix, [L'], and the upper triangular matrix, [U']-I.e. the [L'][U'] product. The relationships in the key are obtained by matrix multiplication. SOLUTION OF LINEAR DIFFERENCE EQUATIONS

1 55


tenns in Eq. 7 . 1 65.5 The next two methods for selecting coefficients differ in the manner in which the effects of the nonstandard tenns are reduced. Dupont et a l. 7 Method. To some extent, we can reduce the effects of the nonstandard terms in the finite-difference equation if we as­ sume that the nonstandard unknowns are approximately equal to ( k + 1 ).7 That is, bXIJ ,J;' I) bx (i k++l j,k -I

=

bx(ijk ++ Il ,k) - 1

=

"'" bX (ijk -+ Il .k) + I

=

bx (i k++l j1 )- I ,k

=

I) OX i( H - I j,k + I

=

. . . . . . . . . . . , , . . . . . . (7. 1 82) In Eq. 7 . 1 82, w(k) is an iteration parameter associated with Itera­ tion Level (k), Note that, if we use Eq, 7 . 1 82 along with Eqs, 7 . 1 66 through 7 . 1 68 and 7 . 1 70 through 7 , 1 72, the effect of the nonstan­ dard tenns is reduced. That is, if we substitute the Dupont et a l. 7 co­ efficients into Eq. 7 . 1 65 , we obtain

[.< ( + IIj,k) - I _ bx(ij,kk + I ) ] iJ,k uXxH

F'

[.<

-"

_ U-"X (IJ."k +k l ) ] +

[-"

k+ l

. . . . . . . . . . . . . . . . . . . . (7. 1 86a)

. . . . . . . . . . . . . . . . . . . (7. I 86b) . . . . . . . . . . . . . . . . . . . (7. 1 86c)

Because we are sweeping the finite-difference grid with increas­ ing i,j, and k indices, the coefficients in Eq. 7. 1 85 are either zero [if the i, j, or k indices are equal to one (and, therefore i - I = 0, j - 1 = 0, or k - 1 = 0)] or are known at the time of computation. 3. Use Eqs. 7 . 1 77 through 7. 1 79 to calculate e:j.k' n;j.k , and a :j,k ' SIP. Stone's8 SIP attempts to minimize the effects of the nonstan­ dard tenns in Eq. 7. 1 65 by assuming that, for smooth distributions of the unknowns, the following relationships are valid . (Note that StoneS originally developed the SIP for 2D problems. The 3D for­ mulation presented in this book was developed by Weinstein et al.9) OX ,(k+'+I J1 ,)k _ 1 (k + I ) bx ij + I,k - 1 OX(i k++I JI )- l ,k

S iJ'"PX (" J - I •)k

]

e Oj,k = e ;.O.k = e ;j.o = 0,

and a Oj.k = a ;.O.k = a :j•o = 0.

ox ( k + 1 ) ij,k '

With this assumption, we can modify Eq. 7 . 1 69 to

+ G' ("k + 1 ) lJ"•k U X IJ + l .k - I

following method. l . Use Eqs. 7 . 173 through 7 . 1 75 to calculate b :j,b S ;j.k ' and W;j,k ' 2. Use Eq. 7 . 1 85 to calculate <j.k ' In Eq. 7 . 1 85 ,

I) bx i( H - Ij + I .k

(7 . 1 8 1 )

.<X(ij,kk + _I )l + B ij,liJ

Now, if we sweep the finite-difference grid in order of increasing i, j, and k indices, we can calculate the entries in [L ' ] and [U '] by the

I) OXiH i - I j + 1 .k

=

=

=

=

I ) + OX ( k + 1 ) - bX ( H I ) OX (1 H + 1 J,k IJ.k - 1 'J.k '

(7. 1 87)

) + bx ( k + 1 ) bx (ijk ++ 1l .k ij.k - I

ox ( k + I )' iJ.k

(7. 1 88)

_ OX(Ij,kH I )'

(7. 1 89)

I ) + ox ( H I ) - bx ( k + 1 ) OX (i H - I j.k ij + l .k iJ,k '

(7 1 90)

_

I ) + OX ( H I ) bX i( H + I J.k ij - I .k

I ) + W -" X ( k + 1 ) + H' uX ( k + l ) - u-"X (IJ, iJ' kU , l J.' k iJ' k ,H 'k I, + I J' - 1 ,k •

[

1-

]

I) and ox( H - I J.k + I

+ c ( k ) -" ( k + I ) + E -,, ( H I ) ij,I,1JX i + I j,k ij,k + w UX ij•k

[-"

+ ['iJ'•k UX(I' k_+I Jl' )+ l ,k

[-"

+ J' ( 1. _+ 1 .) ij.k UX ij I k+ 1 .< ( k + - U X IJ, " k

_

.< "k +k l ) ] + U X('J,

-" 'J.k

_ U.<X(ijk•k+ I )] + K' ij,k [.<UXi(k_+1 jl ,)k + 1

I)] + A iJ'•"" x(lJ,,k' +k +I )1 )\

_- rIJ," k' (I.)

ox ( H I ) + o x (� + I ) - OX( k + I ). - IJ.k 'J.k + 1 'J.k

.

.

.

(7 1 92) •

To implement the assumptions in Eqs. 7. 1 87 through 7. 1 92, the fol­ lowing definitions are used to relate the entries of the original coeffi­ cient matrix, [A], to those in the approximate coefficient matrix, [A'].

NiJ' I,1J X(" k + 1 )

'

=

(

)

B'ij,k - B ij,k - W ( k J FiJ,k + Gij,k ' ' '

. . . . . . . . , . . . . . . (7 . 1 94)

. . . . , . . , . . . . (7 . 1 83)

If the assumptions stated in Eq. 7 . 1 8 1 are valid, then the nonstan­ dard tenns in Eq. 7 , 1 83 vanish and Eq. 7 . 1 83 becomes similar in fonn to the original finite-difference equation, differing only with the inclusion of w(k).

. . . . . . . . . . . . . . (7 . 193)

(

)

W'J' k = W"l J.k - w ( k J r'J.k + K�lJ,' k ' ,

. . . . . . .

.

.

. . . . . (7 . 1 95 )

Setting Eq. 7 , 1 82 equal to the relationship for C;j.k in Fig. 7,39

results in

(7. 1 96) . . . . . . . . . . . . . . (7 . 1 97) . . . . . . . . . . . . , . . . . . . (7. 1 84) or substituting the definitions of F' , G ' , H' , 1', J' , and K ' from Fig, 7.39 results in

NiJ.k ' - NiJ.k - W ( -

(

)

k J G ' + I' iJ.k ij.k '

. . . . . . . . . . . . . . (7 . 1 98) . . . . . . . . . . . . . (7. 1 99)

To obtain the definitions of the entries in [L '] and [U'], equate Eqs . 7 . 1 93 through 7 . 1 99 to the relationships in the key in Fig. 7.39. This results in

(

)

+ n' + a' + (k ) . , - b 'ij,k e ij,k -I w ij,k - I ij,k - I 156

. . . (7, 1 85 )

. . . . . . . . . . . (7.200)

BASIC APPLIED RESERVOIR SIMULATION


. . . . . . . . . . . . (7.20 1 )

. . . . . . . . . . . (7.202)

C 'J" ,k -- C'J." k - W 'J.', 'k[ eI,' _ 1 J'k, + w (kl( nI'' _ 1 J.'k + aI''_ 1 J'k. ) ] , [n ,ij- I.k + W (kl( e ij- Sij,k ' I .k + aij' l,k )] ,

, I - bij,' k[aij,k-

,

e ij.k _

, nij,k

and

=

, aij,k

+

W (k l( e 'ij,k- I

+

' nij,kI )]'

[E"'J,k - W (kl(b 'J� ,,k e'J� ,,k- I + s 'IJ." k eIJ� ' - I k)] c

'

ij,k

[Nij,k - W (kl(bij,knij,k' " , - Ij,k) ] I + Wij,kni c

=

'

ij,k

. . . (7.204)

Cij,k

(7.205)

[�

t

. ( )t(

(nx) ( l + Ax) 2 n y

t

).

l +A y 2(n z) ( l + A z)

].

where Ax • Ay. and Az are defined by Eqs. 7 . 1 53 through 7 . 1 55 . With these definitions of A. the right side of Eq. 7.207 is identical to the right side of Eq. 7 . 1 52. The iteration parameters. w (k). are obtained by cycling between zero and W max geometrically. That is, 1

. . . . . . . . . . . . . . . . . . . (7.207)

- W (kl = ( l - wmax) nkk --II .

. . . . . . . . . . . . . . . . . (7.208)

for k = 1 .2 . . . . . nk. In Eq, 7.208. nk = number of iteration parameters. StoneS recom­ mends a minimum of four iteration parameters (rIk � 4). As with the iterative ADIP, if the number of iterations required for convergence is greater than nk o the cycle is repeated. The approximate factorization techniques can now be imple­ mented as follows. 1. Use Eqs. 7 .40 through 7 .46 to calculate the entries of the origi­ A ). and use Eq. 7.47 to nal coefficient matrix (B. s. W, C. calculate the the right side. Q. 2. Use Eqs. 7.207 and 7.208 to estimate all iteration parameters. 3. Make an initial estimate for all unknowns. X (O)k' 4. Use the iteration parameter calculated in Ste 2 and one of the procedures discussed in this section: the simple coefficient method. the Dupont et a l. 7 method. or the SIP to calculate the entries of and (b ' . s ' . w ' . c ' . e ' . n ' . and a ' ). 5 . Calculate the residual of the finite-difference equation (Eq. 7.39).

[A]

E. N.

r/

[U' ]

(k) rij,k

= Q IJ.k " _

k) - S " ,kX(k) - BIJ" ,kX(ij,kI IJ ij - l,k

kl Cij.k X (ij,k

[L' ]

k) ' - A ij,k X(ij,k+ I

SOLUTION OF LINEAR DIFFERENCE EQUATIONS

C;j,k

]}

]

. . . . . . . . . . , . . . . . . . . . . . . . (7.2 1 1 )

for i = 11x. 11x - I . . . . . 1 ; j = r;.. r;. - 1 . . . . . I ; and k = 11z, 11z - I . . . .. 1 .

8 . Update the unknowns with =

(k) + ax(k+,k I ) X'J,k IJ

.

,

,

.

.

.

.

(7 2 1 2) •

(7. 2 1 3) for all i,j.k. 1 0. If the system has cQnverged. X k J ) represents the final solu­ J tion of Eq. 7. 1 . = d ; otherwise go back to Step 4. It is also worth mentioning that changing the order of calculations in subsequent iterations can significantly improve the speed of con­ vergence.S With this approach. the order in which the iJ.k indices are increased (i first. j second. k third; j first. k second. i third; and all other permutations) in Step 6 and decreased in Step 7 is changed from one iteration to the next. This produces the net effect of bring­ ing other diagonal entries into the calculations and having no single set of nonstandard diagonals dominating the solution. Again. this technique is used to minimize the effects of nonstandard diagonals in the coefficient matrix, Conjugate-Gradient Method. Hestenes and Stiefell O first intro­ duced the method of conjugate gradients for solving systems of lin­ ear equations. The conjugate-gradient method is an iterative algo­ rithm for solving a system of n linear equations in n unknowns. The exact solution is obtained in n iterations (assuming no round-off error); however. an approximate solution is obtained in less than n iterations. The following are some of the attractive features of the conjugate-gradient method. 1 . Similar to the Gaussian elimination method. the conjugate-gra­ dient method provides the exact solution in n steps (if no round-off error occurs) for a system of n equations in n unknowns. Consequent1y. if n iterations are performed, the conjugate-gradient method can be used as a direct-solution procedure. In practice. fewer than n itera­ tions can be performed. This results in an approximate solution. 2. The conjugate-gradient method is simple to code and requires little storage memory. 3. The original coefficient matrix is unaltered during the com­ putations. The sparse matrix structure arising from the finite-differ­ ence approximation of the flow equations is preserved. The objective of the conjugate-gradient m�hod is to minimize = d . This function has a function that is related to Eq. 7 . 1 . the form l l

[AjX

�;

[A]x

!(1�" [Arlr).

. . . , . . . . , . . . . . . . . . . . . . . (7. 2 1 4a)

where r = the residual vector defined by Eq. 7 . 1 59, r Equivalently, Eq. 7.2 1 4a can be expressed asI I (7.209)

.

for all i J.k. 9. Check for convergence with

F(x) =

k IJ,kX (i -) Ij,k

w. ,

- Eij,kX(ik+) 1 j,k - Nij,k X(ijkl+ l,k

k+ J) + WIJ! ,,py(k+ I ) sIJ� ,,py(ijI,k i- Ij,k

I) k+ I ) dXIJ(k+,k I ) = dy(IJk+,k I ) - [ eIJ.� , k axt(k+ + 1 J,k + nIJ� ,,k dxIJ( + I,k

xIJ(k+,k J )

.

Again. these coefficients must be calculated in order of increasing i. j. and k indices. The maximum value for the iteration parameter in Eqs. 7.200 through 7.206, W max • can be calculated by

ij,k

+

for i = 1 ,2 , . . . , nx ; j = 1 .2 . . . . . n ; and k = 1 ,2 . . . . . 11z . !J 7 . Solve Eq. 7 . 1 64 for a�k+ l. Use a backsubstitution process by sweeping the finite-difference grid in the order of decreasing i.j. and k indices. That is.

k+ J) + a 'ij,kU.l'.X(ij,k+ I

. . . . . . . . . . . . . . . . . . . (7.206)

I - w max = min

=

{ rij,k(k) - [bIJ.� ,py(ij,k-k+ J)I

, Ij,k)] , I,k + ' [A ij,k - W (kl(S 'ij,kaijWij,kai,

ayCIJk+,k 1 )

(7.2 1 0)

, , , . . (7,203) ,

;k+ I )

6. Solve Eq. 7 . 1 63 for a . Use a forward-substitution process by sweeping the finite-difference grid in the order of increasing i.j. and k indices. That is.

F(X')

=

!(x . [A]x- 2d ' x + d ' [Ar I d).

=

d- [AjX . (7.214b) 157


To arrivei Et Eq. 1.2 1 4b from Eq. 7.214a, we use the identity ([A)x) . ( d ) = d · x, which is validonly for symmetric matrices con­ taining all real elements. Such matrices are called self-adjoint ma­ trices. 1 1 Eq. 7 .2 1 4b has two important properties that make it suitable for solving Eq. 7. 1 . The first property of F(x) is that the gradient vF(x) is the negative of the residual of the original system of equations. I I That is

[Ar

v F( -)

x

-

= -r

and vF( x)

=

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (7 .21 5a)

[A)x- d .

. . . . . . . . . . . . . . . . . . . . . . . (7.2 1 5b)

While the proof ofEq. 7.2 1 5 is cumbersome in matrix form, the con­ cept is easy to visualize by use of the scalar analogs to Eqs. 7. 2 1 4b 2dx and 7 .2 1 5b. The scalar analog ofEq. 7 .2 1 4b is f( ) = + d / ) and the scalar analog of Eq. 7 .2 1 5b is df/dx = d. Ref. 1 1 provides a rigorous proof of Eq. 7.2 1 5 . The second property of F(x) that makes it suitable for solving Eq. 7 . 1 is that the vector x t�t is the solution vector, x*, to the system of equations [A)x* = d results in a zero gradient. That is, vF(X * ) = O. This implies that F(X) is either at a minimum or maxi­ mum value when evaluated at the solution vector x*. For a symmet­ we can show that re­ ric, positive definite coefficient matrix sults in a minimum value of F( x) . 1 1 Therefore any search algorithm that identifies the vector x that minimizes Eq. 7.2 14 can be used to find the solution, x*, to Eq. 7 . 1 . In the conjugate-gradient method, a sequence of approximate . < lor k + I n IS generate d . In th'is solutIOn vectors inequality, n = the number of equations to be solved. This is accom­ plished with an initial estimate of x and

x %(ax2 ax -

2a

[A) ,

_( ) _( ) . . . . . . . . . . . . . . . . . . . . . . . (7.2 1 9b) P ] () after factoring the p k term in the numerator and applying the defi­ nition of the residual. We can show that a rk) is a minimizer of Eq. 7 . 2 1 7b for a positive definite matrix. I I For efficient implementation of the conjugate-gradient method, the definition of a rk) requires additional manipulation. Here, however, we discuss the direction vectors, p . In the conjugate-gradient method, the direction vector at the (k + I ) iteration level, p (k + is obtained with _(k + I) _(k + 1) + b(k + I )_(k) . . . . . . . . . . . . . . . . . . (7. 220) where b (k + I ) a scalar value. (If we let b (k + I ) in Eq. 7 .220 equal or

a rk)

i)k k [A. r jik (k) '

=

i l,

p

= r

p

=

zero, this discussion and the following algorithm result in the Steep­ est Decent Method.) The direction vectors, are also chosen to be mutually A-ortho­ gonal (or conjugate with respect to The definition of A-ortho­ gonality is

p,

[A) ).

(7.22 1 )

( for k �j . Post-multiplying Eq. 7.220 b y [A]ji k) results in p (k + I ) [A]ji (k) ik + I) [A]ji (k) + b(k + I)-p (k) . [A]ji (k) . =

. . . . . . . . . . . . . . . . . (7.222)

Applying the definition of A-orthogonality (Eq. 7.22 1 ) to Eq. 7.222 results in x-(I ),x_(2), . . . ,x_(k +I ) & ik + I) [A]ji(k) + b(k + I )p (k) . [A]ji (k). . . . . . . (7.223) <0) b (k + 1 x_(k + I) = x_(k) + a (k)_ (k), . . . . . . . . . . . . . . . . . . . . . (7 .2 1 6) Solving for _(k) +gives I) [Al;::(k) b (k + where a (k) a scalar variable and Ilk) a direction vector. The (k) . [A]ji(k) . . . . . . . . . . . . . . . . . . (7.224) p value of a (k) is selected to minimize F( x) along the path defined by Eq. 7.2 1 6. In other words, a rk) is selected to minimize While Eqs. 7 .2 1 9b and 7.224 can be used in their current forms, F(x(k) + a (k)p (k» . Substituting Eq. 7.2 1 6 into Eq. 7.2 14b gives a more efficient algorithm can be developed with additional alg� manipulation. Start with the definition of the residual , d (F X<k) + a(k)p(k» ) � {(X<k) + a(k)Ilk» ) . [A) (X<k) + a(k)Ilk» ) braic - [A]X evaluated at Iteration Level (k + 1 ) . ( + I) +1 ) (7.225) - 2d ' (X<k) + a (k)p (k» ) + d ' [Arid} . . . . . . . (7.2 1 7a) ik d- [A]X k .

.

=

o =

p

=

I)

=

=

_

r----",.-----=---=_ w -:cc•

=

=

=

Substituting Eq. 7.2 1 6 into Eq. 7.225 gives

After some algebraic manipulations and grouping of like terms, Eq.

. . . . . . . . . . . . . (7 .226a)

7 .2 1 7 a becomes

or =

+

HX<k) . [A)X<k) - 2d ' X<k) a (k) ( (k [A]X - 2Ilk) . d) 2P

)

·

d ' [Ari d + [ a ( k )] 2Ilk ) . [A) p ( k ) } .

+

. . . . . . . . . . . . . . . . (7. 2 1 7b) . . . ...,.0 amve at Eq . 7 . 2 17b , we use the I'dentities d . p = p . d ,

which is valid for all vectors, and

-p . [A]x

=

�k) �k)

[A]-P, which is val­

id for symmetric matrices only. To minimize Eq. 7.217, we take the de­ + rivative of with respect to and set the resulting expression to zero. That is

F(x(k) a (k)Ilk» a rk) (-p(k) . [A]X Ilk) . d) + a(k)Ilk) . [A) Ilk) dF/da (k) =

_

= o.

. . . . . . . . . . . . . . . . . (7. 2 1 8)

Solving for

ark) gives {p(k) . [A)X<k) p(k) . d} Ilk) . [A]ji (k)

. . . . . . . . . . . . . . . . . . (7.226b)

=

when the definition of r evaluated at Iteration Level (k) is applied. Premultiplying Eq. 7.226b by results in

p ( k) _(k) _(k + I ) _(k) _(k) - a (k)_(k) . [A1;:: (k)

p

' r

= p

' r

p

W

. . . . . . . . . . . (7.21 9a)

.

(7.227)

From Eq. 7.2 1 9b, we have

a (k)_(k) . [A1;::(k) _(k) _(k) p

W

= p

' r

.

. . . . . . . . . . . . . . . . (7.228)

Substituting Eq. 7.228 into Eq. 7.227 results in the relationship

_(k) . _(k + I) 0 . . . . . . . . . . . . . . . . . . . . . . . . . . (7.229) Eq. 7 .229 states that use of xtk + I) defined by Eq. 7 .2 1 6 results in a residual ,(k + I ) that is orthogonal to the previous direction vector, . I --o((0k)) . If(I )the procedure IS" Imtla . Ize ' d so th at _ (0) _(0), then , , 0 from Eq. 7.229. It(can be shown recursively that the resulting sequence of residuals , k) for k 1 ,2,3, . . . is mutually orthogonal. l 1 That is, ik) ;IJI 0 ( .230) P

p

r

=

.

.

.

p

=

=

_

158

ik + I) ik) - a (k) [A]ji (k)

=

= r

;§; n

7

for k �j.

BASIC APPLIED RESERVOIR SIMULATION


This is a property of the conjugate-gradient iteration; the direction vectors, are mutually A-orthogonal (in accordance with Eq. 7.22 1 ), while the residuals, r, are mutually orthogonal (in accor­ dance with Eq. 7.230). Eq. 7 .220 evaluated at Iteration Level (k) implies that

p,

p(k) = ;lk) + b(k)ik -l ) .

. . . . . . . . . . . . . . . . . . . . . (7.23 1 )

ik) gives _(k _(k) _(k) _(k p (k-I) · _(k ) r . P ) · r = r · r ) + b (k)-

Post-multiplying Eq. 7.23 1 by

_(k) · _(k r ) = _(k r ) · _(r k).

P

. . . . . . . (7.232)

. . . . . . . . . . . . . . . . . . . . . . (7.233)

Substituting Eq. 7.233 into Eq. 7.2 1 9b results in the final definition of ark) .

_(k _ a rk) = irk) .) [A. r (k)(k) · . . . . . . . . . . . . . . . . . . . . . . . . (7.234) ]p To obtain the final definition of b (H I), start with Eq. 7.226b. Solvl� (k) resuIts In· Ing lor [AJY [A]p(k) = [;lk) _ ;lk+I) ] /a (k) . . . . . . . . . . . . . . . . . . (7.235) (k Premultiplying Eq. 7.235 by p ) results in _(k) . [AJYl�(k) = _(k) . [_(k ) _(H 1) ] /a (k), . . . . . . . (7.236a) r -r _(k) . [AJYl�(k) = [ _(k) . _(r k) _(k) . _(H 1) ] /a (k), r p .

c

p

p

p

-p

(7.236b)

_(k) . [AJYl� (k) = p_(k) · _(k ) r / a (k) , or p

. . . . . . . . . . . . . . . (7.236c)

after substituting Eq. 7.229. Substituting Eq. 7.236c into the denomi­ nator of Eq. 7.224 gives

b(k+ I) =

_

(k)_(k + I) • [A]p (k) _(k) _(k) P . r

a_r ---,.,---::.-c=_

(7.237)

_

Now, substituting Eq. 7.233 into Eq. 7.237 results in

b(H I) =

_

(k)_(H I) • [Al� (k) _(k) _(k)

a_r JY ---"".--�".",--_ r . r

_

. . . . . . . . . . . . . . . (7.238)

We then man�ulate the numerator of Eq. 7.238. Premultiplying Eq. + 1) gives 7 .226b by

;l

(7.239) Applying the orthogonality relationship for residuals (Eq. 7.230) re­ sults in the identity ;l H I) . r(H I)

I)

= a(k)",(H . [A]p (k). . . . . . . . . . (7.240) Substituting Eq. 7.240 into the numerator of Eq. 7.238 gives the fi­ nal definition of b (H r ) I) . . . . . . . . . . . . . . . . . . . . . (7.24 1 ) r _(kI)) · _(H b(H I) = _(H _(k r .r I n this discussion, w e used the symmetric, positive definite struc­ ture ofthe coefficient matrix, [A] , in the development of many of the _

_(0) = - [A]x-(O) _(0) = _(0) . = k (k) gl ) = [A]p , _(k r )) ' r (k)) . _(k a (k) - _ _(k

.

(7.242) (7.234)

_

Substituting Eq. 7.229 into Eq. 7.232 results in the following identity. P

Algorithm I-Conjugate-Gradient MethodjobJ Symmetric Coeffi­ cient !vJ.atrices. Select an estimate of i ) (arbitrary). Set d r and p r . Perform the fo\lowmg computations sequentially for k 0, 1 ,2 , . . . , until convergence.

\).

equations. Therefore, implementation of this version of the conju­ gate-gradient method is valid for systems of equations with sym­ metric, positive definite coefficient matrices. The following algo­ rithms show the implementation of such systems. SOLUTION OF LINEAR DIFFERENCE EQUATIONS

. g

+

_(H 1 ) = x_(k) a (k)p_(k), . . . . . . . . . . . . . . . . . . . . . (7.2 1 6) _(k+ r 1) = _(k r ) - a (k)g_(k), (7.226b) _(H _ H ( r ) I), b(k+ I) = r _(k)I) . _(k (7.24 1 ) r .r _(k+ I) = _(k+ r I) + b(H I)_ (k) . . . . . . . . . . . . . . . (7.220) and In this algorithm, b (k) and a rk) = scalar quantities; X , r, p , and g = vector quantities; and [A] = original coefficient matrix. X

p

p

.

.

Note that there are several possibilities where convergence checks can be made in the conjugate-gradient algorithm. If a check is to be made on the maximum change in X , then, from Eq. 7.2 1 6,

Ix-(H I) - x_(k)1 = max Ia (k)_(k)1 = Ex, . . . . . . . . (7.243a) = the ab­ where max = the maximum element in the vector and solute value. Eq. 7.243a can be rearranged to H I) - ik) ] /a (k) 1 = max �(k) 1 IEx/a(k)l . max l [i max

p

<

I.I

(7.243b)

A convergence check can also be made on the residual with max

1-(k+t)1 = Er• r

<

. . . . . . . . . . . . . . . . . . . . . . . . . . . (7.244)

To this point, we have emphasized the mechanics of the conju­ gate-gradient method. The method has several theoretical and com­ putational features that are beyond the scope of this book but are im­ portant to mention. These include the following. 1 . Like other direct-solution methods (such as Gaussian elimina­ tion, Gauss-Jordan reduction, and Crout reduction) the conjugate­ gradient method yields the exact solution after a fixed number of calculations when no round-off error is present. It can be shown that the method converges to the exact solution in, at most, n iterations (in the absence of round-off error), where n t�w number of equa­ tions. In fact, for an arbitrary initial estimate, i the method con­ verges to the exact solution in, at most, ne iterations (in the absence of round-off error), where ne the number of distinct eigenvalues of the coefficient matrix and ne � n. 1 2 2. Unlike other direct-solution methods, reasonable approxima­ tions to the exact solution are achieved in fewer than n iterations. Therefore, the method can be used as an iterative-solution method. For reasonably low values of the condition number (approximately one), acceptable convergence is achieved in far fewer than n itera­ tions. The condition number is defined as the maximum/minimum eigenvalue ratio. 3. A condition number equal to one implies that the maximum eigenvalue equals the minimum eigenvalue and, therefore, must be equal to all intermediate eigenvalues (Le., one distinct eigenva­ lue). From Point I , this implies that the conjugate-gradient method will converge after one iteration for matrices with a condition number of one. 4. With proper matrix preconditioning (discussed later), the condi­ tion number of the preconditioned system of equations can be greatly reduced, thus improving the rate of convergence of the method. 5. The method does not contain any iteration parameters. 6. For sparse systems of equations, efficient coding can greatly reduce both computational effort and storage requirements. For ex­ ample, for the heptadiagonal coefficient matrices encountered in

= )

,

[A] =

159


reservoir simulation, a matrix/vector multiplication across one row of the matrix requires only seven multiplications and six additions regardless of the size of the matrix and vector. 7. The original coefficient matrix is unaltered during the com­ putational process. The following example from Hestenes and Stiefel lO is reworked with the algorithm notation used in this book. The objective of this example is to illustrate the use of the conjugate-gradient method as a direct-solution procedure.

Example 7.11. Use the conj ugate-gradient method to solve the

following system of equations.

Solution. Note that the coefficient matrix is symmetrical in struc­

H � - � �]

ture. The application of Algorithm

[AI

Md

d

[dO r �] - t j] [ - f1 �

1 is as follows. For this example,

[ - f1

I . Initial estimate. Begin with an initial estimate of

H)[- [ - ;] �] r�] [�:PI] [ _ :] [ - �] [ -:- ]

bm

0 + 4 + + 1 + 0 + 0 1 + 0

. �

6

I

(1)

0

1

+

6

3. Second iteration calculations

6

(k = 1).

Then,

2. First iteration calculations, (k = 0).

1 60

BASIC APPLIED RESERVOIR SIMULATION


TABLE 7.7-SYSTEM OF EQUATIONS FOR EXAMPLE 7.1 2

'" 1 00 2 1 0 0 1 2 0 0 o· � X1 2 80 3 1 1 0 0 x2 0 0 1 1 3 1 25 1 2 0 0 1 0 0 x3 1 1 60 2 2 0 0 2 1 x4 0 1 1 0 0 1 Xs 0 0 2 2 200 1 1 0 0 2 1 1 00 3 2 0 0 xe 2 1 0 0 1 3 80 2 1 0 x7 1 0 0 2 2 250 1 0 Xs 0 1 1 1 25 1 Xg 0 0 0 2 0 0 1 0 0 0 1 1 0 0 0 1 200 x1 0

=

206 88 13 1 75 606 15 1 73 258 382 407

-

[ = !] - '1 = i] m [�J m.m =( )[ �] . [ �] [P:3] 3 - [�] 2 [- i�] [- � ] �

[ = �] . [ �]

bm

=

bm �

H] - [- �]

0 +4 + 1 + � 0 +4 + 1 + 1

5. �

0 + 4 + 16 + 0 0 + 4 + 1 + 25

� 3·

=

_

h

4 0

+ /3

- 6 0

-

_

0 . 0

5 . Fourth iteration calculations (k = 3).

[!:](2) [ � � - � �][- i�] [ �].

4. Third iteration calculations (k = 2).

g3

=

- 1

0

1 2

g4

0

- 6

0 3

0

6

=

- 6

- 6

([: ] 3) [- ] [- �� [- ] ] X3

X4

=

��

- 6 6

+5

/6

-

6 0

=

�� .

- 11 6

SOLUTION OF LINEAR DIFFERENCE EQUATIONS

The iteration terminat.fi s because the residual vector, ; is the zero vector; therefore, x is the converged solution. Because no ,

161


round-off error is encountered in the computations, the exact solu­ tion is obtained in four iterations. Note that the solution of the third 3 iteration, ;< ) , can be considered to be reasonably close to the exact solution obtained at the fourth iteration, If a coarser tolerance had been used in this example, the procedure could have been termi­ nated after the third iteration. This example shows both the itera­ tive nature of the procedure and the direct-solution nature of the conjugate-gradient technique. Example 7 . 1 2 illustrates use of the conjugate-gradient method as an iterative-solution procedure.

; <4 ) .

Example 7.12. Use the conjugate-gradient method to solve the system of equations in Table 7.7. The objective is to demonstrate that the method can be used as an iterative-solution procedure. Use an initial estimate ofXi = 0 for all i. We present only the results of the iterations here instead of the entire calculation of this problem. The conjugate-gradient solution for this example is

0.0000 (0) 0.0000

0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000

�k)

X

-+

2.0023 0.93 8 1 0.006 1 1 .0 1 87 2.9732 0.0276 1 .8555 1 .03 1 3 3.1019 1 .9794

-+

(3 )

2.0227 0.9955 - 0.00 1 0 0.9830 3.0022 0.0040

(6)

-+

1 .9999 1 .0000 3.0000 2.0002

-+

1 62

1 .8628 0.8330

-+

0.022 1 1 .0846 3 . 1 009 0.050 1 1 .6387 0.7906 3 .0687 2.0623

(4 )

( 9)

-+

2.0000 1 .000 1 0.0000 1 .0000 3.0000 - 0.000 1 1 .9999 1 .0000 3.0000 2.0000

( 2.0000 1 0) 1 .0000 0.0000 1 .0000 3.0000 0.0000 2.0000 1 .0000 3.0000 2.0000

( 2)

2.0055 1 .000 1 - 0.0002 1 .0036 3.0000 0.0005 1 .9974 1 .000 1 2.997 1 1 .9994

1 .9826 0.999 1 2.9985 2.0024

2.0000 1 .0002 0.0000 1 .0000 2.9999 0.000 1

2.0000 1 .0000 0.0000 1 .0000 3.0000 0.0000 2.0000 1 .0000 3.0000 2.0000

1 . 1 277 0.48 1 7 0.07 1 2 0.9580 3.3 174 0.082 1 0.947 1 1 .4 1 24 2.09 1 2 2.2280

(I )

(7)

-+

2.0000 1 .0000 0.0000 1 .0000 3 .0000 0.0000 2.0000 1 .0000 3.0000 2.0000

This example illustrates both the direct- and iterative-solution characteristics of the conjugate-gradient method. If a tolerance of 0.000 1 is used between successive iterates to terminate the process, it stops after the seventh iteration . A serious shortcoming of the conjugate-gradient method is the re­ quirement for a symmetric, positive definite coefficient matrix. Symmetric problems are encountered in many reservoir simulation applications; however, an important exception occurs when the ful­ ly implicit (Newton-Raphson) method of linearization is used for problems where upstream weighting on one component of the trans­ missibility is used (for example, relative permeability). when this occurs, the resulting Jacobian matrix is not symmetric. For cases with non symmetric coefficient matrices, the following variation of the conjugate-gradient method can be used. Algorithm 2-Conjugate- Gradient Methodfor Nonsymmetric Coefficient Matrices. Select an estimate of ; (0) (arbitrary) . Set (0) d_ r x , p (0) = r , an d = p . P e rform th e following computations sequentially for k = 0, 1 ,2 , . . . , until con­ _

[A]-(O)

=

h-(O) -lO)

[A] �(O)

vergence.

t)

[A]P (k) ,

=

_

(k)

_

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

. . . . . . . . . . (7.242)

. . . . . . . . . . . . . . . . . . . . . . . . . . (7.245)

_ _

_

g

. g

_

_(H I ) = x_(k) + a (k)p_(k), _(r k I ) = r (k) - a (Og (k), _(H I ) = [A] 17(H I ) , h b(HI ) = h_(HI ) . h_(HI ) x

+

.

(k)

a rk) = ",h (k) '-,h,,--(k) , (5)

.

-

_

_

h

(k)

_

. h

(k)

. . . . . . . . . . . . . . . . . . . . . (7. 2 1 6) . . . . . . . . . . . . . . . . . . . . . (7.226b) (7.246) . . . . . . . . . . . . . . . . . . . . (7.247)

_(H I ) = h-(H I ) + b(H I )p_(k) . . . . . . . . . . . . . . . . (7.248) In this algorithm, [Af is the transpose of Matrix [A] ; that is, the elements ai.j of [A] become the elements aj, i in [Af. Example 7 . 1 3

and p

(8)

illustrates how the algorithm i s applied to solve a system of equa­ tions with a nonsymmetric coefficient matrix.

[� � �] [�:] [ �] [� � �] , H� n

Example 7.13. Use the conjugate-gradient method to solve the following nonsymmetric system of equations. -

1

0 - 3

=

x3

- 2

Solution. This example deals with a nonsymmetric coefficient matrix, so we use Algorithm 2. Note that, for this example,

-

[A] =

[Al' �

I

0 - 3

-

BASIC APPLIED RESERVOIR SIMULATION


1.

��1 ) . 3. �: 1 �� 1 1 [ ) [ ] ( 2 �] [ : ] [-�:2.�3���693]. � -3 -0. 3726 [ 1.1.53050263] · [ 1.1.35050263] a(1) [ -0.-0.3.470092779862] . [--0.0.3.407779092862] 14.55.3274666 02946. . 2.3693 2.3693 [XXIXl3 ] (l) [ -0.0.0.851091739498] 0.2946[ 1.1 .2729451 5] [0.1 .01489889] . -0.3726 0.6993 [ TT3l ] (l) [ 0.0.1.671071112921 ] -0.2946[- 0.2.3.403779693862] [ -0.0.0.028909600029] . 2. 0). [hh:] (2) [ - � � 1] [ 0.0.28029600] [ -0.0.47542691] . [ ;� ] (O) [�1 - 0� -3�] [ - �9] [ -29- :1]. h3 0 1 -3 -0.0909 0.4756 [ - �:0.�4�!�756] [-�:0.�4�!�756] ] b(2) � �� � ] � :���� ] !:���i 0.2262. a,m n- ] n]- 1 346 0.08W. [ -0.:7092� [ -0.7092 [ -29;1 , [ -29;1 ] 1.27512945 ] [PPP32l ](Z) [ - 0.0.47691] [ [�� ](l) [ �0 ] 0.0899[ - �]9 [ - �:0.�8��!]. 1. 542 0. 2 262 0.4756 -0.3726 091 [ 1. 0 522 ] ] ) -0. 0 630 ( [ l [ _ [�T}�] [ _ 2�] 0.0899 -29:1 0.�:�6071!��] . -0.3913 . Ihl ( ) [ _ 1 0 1] [0.7 192 ] [ 1.3263] 4. - � �] [ 2)�:. ��� ] [ �:���� ] [hh ] 1 2 -3 0.1.61071121 -0.1.75092050 . -3 - 0.3�91 3 -0. 1217 . [ -0.0.47542691] . [ -0.0.47542691] 7092] 4 iii' 0.:0374. a(Z 0.4756 [ 0.4756 �:��:� 0.7706. [0.�:����7092[ _ ] [[-0._�:���� : [ ) 1 2 2 5 5 1. 1. 1 1 1 ] �] ] ] 0. 2 653 0. 2 653 · � -0. 1 2 1 7 -0. 1 2 1 7 �� �� I X 8 8 [ [ 0. 1 [ ) ] l [ ( [ ] [��P3 ] -0.�:7�092���] 0.0374 �]9 -0.3726 . X3 0.1.069934899 ] 0.7706[ -0.0.1.003630522]913 [0.1.1.900997004008 ] . Initial estimate calculations. B egin with an arbitrary initial

Second iteration calculations

(k =

guess of

=

=

o

=

=

+

=

T2

First iteration calculations

=

=

=

(k =

=

g3

=

o

=

=

=

.

+

=

x}

=

=

=

=

+

=

=

Third iteration calculations

=

}

b'"

°

°

.

=

+

(k =

o

=

.

=

=

=

.

=

=

=

(3 )

=

SOLUTION OF LINEAR DIFFERENCE EQUATIONS

=

X2

=

+

=

=

1 63


[] [ ] [ ] [ ] (3 )

rI r2

0.8600 1 . 1 152 0.2653 = 0.2029 - 0.7706 = - 0.0909 - 0. 1 2 1 7

r3

0.0006 - 0.00 1 5 0.0029

Substituting Eq. 7.226b into Eq. 7.250b gives

. are c I ose to zero, vector x ( 3 ) represents the Because the r ( 3 ) entnes solution to the problem. Note that the exact solution to the problem is X I = 1 , X2 = 1 , and X3 = 1 . Other conjugate-gradient methods suitable for problems with nonsymmetric coefficient matrices include the Lanczos1 3 biortho­ gonal vector algorithm, I I the biconjugate-gradient method, I I . 1 2 . 14 and the biconjugate-gradient stabilized method. 1 2 . 14 Generalized Conjugate-Gradient-Like (CGL) Methods. The con­ jugate-gradient algorithm is not the most efficient algorithm in terms of computational effort for problems with non symmetric co­ efficient matrices because of the convergence rate of the algorithm. In Algorithm 2, we multiply the matrix [A) by its transpose [A) � Es­ sentially, we are using the matrix [A) T as a preconditioning matrix to create a symmetric matrix from the original nonsymmetric coeffi­ cient matrix (matrix preconditioning is discussed later). Unfortu­ nately, when we do this, we are working with the condition number squared of [A) rather than the condition number of [A). 1 4 . 1 5 Other generalized CGL algorithms are available for problems with non­ symmetric matrices that work directly on the original coefficient matrix. These methods use the condition number of the original co­ efficient matrix and consequently possess superior convergence properties. These CGL methods differ from the conjugate-gradient method by the definition of the objective function [ F(x)] to be mini­ mized and by the definition of the direction vectors. A popular class of generalized CGL algorithms used in reservoir simulation is re­ ferred to collectively as minimum-residual methods. Minimum-Residual Methods. The objective of minimum-residu­ al methods is to minimize the residual r as measured by the Euclide­ an norm, 11 ' 112 , 1 1 which is defined by

(

-

_ 1 /2 .

= r ' r)

(7 .249)

In actuality, we minimize the residual in the Euclidean norm squared; i.e.,

(1ITlb)

2

=

=

( _r (k + 1 ) . _r (k + I » ) ,

C r ' 7) .

. . . . . . . . . . . . . . . . . . . . . . . . . . . (7.250a)

[ ]

(7.25 I b)

I or F ; CH ) = ik) . i k) - 2a (k) i k) . [A]p (k)

{

+

(1ITlb)

2

=

( 7 · 7).

. . . . . . . . . . . . . . . . . . (7.226b) 1 64

. . . . . . . . . . . (7.25 I c)

As with the conjugate-gradient method, to minimize F(X), we take the derivative of Eq. 7.25 1 with respect to a(k) and set the resulting expression to zero, which results in

i k) . [A]p (k) [A)i k) . [A]p (k)

.: '-...:: ....".,. ' a (k) = ----,.."...:...

. . . . . . . . . . . . . . . . . . . . . (7.252)

In the Orthomin iteration, 1 6 the direction vector for Iteration Lev­ el (k + I) is determined from 7(H I ) and a linear combination of all previous direction vectors. . . . . . . . . . . . . . . . . . (7.253a) +

+

b ( I )- ( l ) + . . . + b (}1- (;1 kP kP I _ _ ( + + (k - ) + b (k ) k l (7.253b) . . . b k(k - I )P k P . The subscript k in the b k coefficients implies that the value of b f) that multiplies the direction vector p ( }) changes from one iteration to the next. In addition, the vectors [A)p must be mutually orthogo­ or

_ H 1 ) _ _( H 1 )

p(

- r

b (O)- (O) kP

nal; that is,

[A]p (k) . [A]p UI = 0

. . . . . . . . . . . . . . . . . . . . . . . . (7.254)

for k ¢ j. Premultiplying Eq. 7 .253b by [AJ and post-multiplying the resulting equation by [AJp (}) results in

[A]p ( k + l ) . [A]p UI = [AJi k + l )

. . . . . . . . . . . . . . . . . . . (7.250b)

Like Eq. 7.2 1 4a, Eq. 7.250b has two important properties that make it suitable for solving Eq. 7 . 1 . 1 5 The first property of F(x) is that squaring the 1 1 ' 1 1 2 ensures that F(x) is always nonnegative for vectors containing real-valued elements (i.e., no imaginary ele­ ments). The second property is that the vector x !!lat is the solution vector, x*, to the system of equations [A)x* = d results in a zero value of F(x) . This implies that F(x) is at a minimum [equal to F(x) = 0] when evaluated at x* . Again, any search algorithm that identifies the vector x that minimizes Eq. 7 .250b can be used to find the solution, x* , to Eq. 7. 1 . Note that, just as for the conjugate gradi­ ent method, we have come to a conclusion concerning the mini­ mization properties of F(x) without relying on the symmetry of the coefficient matrix [A). The only assumption used is that the residual is composed of real-valued elements. Orthomin Method. 1 6 The Orthomin method is one example of a minimum-residual method used in reservoir simulation. In the Ortho­ min iteration, we again generate a series of vectors for x ( l ) , x(2 ) , . . . , ; <H I ) for k + I � n starting from an initial estimate of ;<0) using Eq. 7.2 1 6. From Eq. 7.2 1 6 and the definition ofthe residual

J

t

[a (k) [A]P (k) . [A]P ( k > ,

Eq. 7.250a is the objective function, comparable with Eq. 7.214a in the conjugate-gradient method, that is minimized during the mini­ mum-residual iteration.

F( x) =

. . . . . . . . . . . . . . . . (7.25 I a)

_

_

I I_r II 2

[ ]

F x_ (k + I )

.

[A]p UI

+

b iO) [A]P (O) . [A]p UI

+

b il) [A]P ( 1 ) . [A]p UI

+ ... +

b ij) [A]p UI . [A]p UI

+ ... +

b ik- i ) [A]p (k - I ) . [A]p UI

+

b ik) [A]P (k) . [A]p UI .

(7.255)

Applying the orthogonality condition, Eq. 7.254, results in . . . (7.256) Finally, solving for

bf),

, (H I ) . [A]p UI b �1 = - [Arr . [AJp ( jI . [A]P (jI

. . . . . . . . . . . . . . . . . . (7.257)

The following algorithm shows implementation of the Orthomin iteration. Algorithm 3-The 0ahomin Method. Select an estimate of x (O) (arbitrary). Set 7(0) = d [A]X(O) and p (O) = ;<0) . Perform the following computations sequentially for k = 0, 1 ,2 , . . . , until convergence.

-

(7.242)

..

u

(k) = g_ (k) . g_ (k);

(7.258) BASIC APPLIED RESERVOIR SIMULATION


_(k) _(k) a (k) = r •(kg) ,. _(HI X ) = x_(k ) + a (k)p_(k) ; k _(H r ) a (k )g_( ) ; r I) _(k

(7.259)

c)

= and for j = 0, 1 , . . . , k,

{ [A]iH I) } c) ( j)

.

gU)

. . . . . . . . . . . . . . . . . . (7.260)

_(k+1 ) _ _r (k +1) + L � b{J)k P U), -

. . . . . . . . . . . . . . . . . (7.253a)

j=O

I n the Orthornin algorithm, 1 6 b?1, and are scalar quantities, g -;, r, , and are vector quantities, and is the original coeffi­ cient matrix. p Examples 7 . 1 4 and 7 . 1 5 illustrate application of the Orthomin al­ gorithm to solve systems of linear equations with a nonsymmetric coefficient matrix.

a (k ) ,

d (k ) [ A]

Example 7.14. Use the Orthomin method to solve the nonsym­ metric system of equations considered in Example 7 . 1 3 . Solution.

[A [ =

. . . . . . . . . . . . . . . . . . . . . (7.226b)

Then, p

= 1 = O.

. . . . . . . . . . . . . . . . . . . . . (7.2 1 6)

[�

At this point, it is obvious that the method has broken down be­ cause it continually results in solution vectors with only elements of zero. Therefore, we can never proceed beyond the initial estimate because of the initial estimate is used. Inspection of the procedure at this point shows that, for this particular coefficient matrix, any initial estimate that contains identical elements results in a value of (0 ) O. Therefore, reinitialize the process with a different initial = estimate :;<0 ) . 1 . Initialize the solution. First, try an initial estimate of :;<0 ) .

a

t,, f" p�

-

[n =[ �] [� - � !][ n [ H [=T [:T [ n =

_

-

-

_

=

-

=

2. First iteration calculations, k O. =

1 . Initialize the solution. First try an initial estimate of :;<0 ) , like in Example 7 . 1 3 .

,OO'

= =

p'''

[H

[ �] - [� - � - !][ n [ - n [::r [:T [-n =

-

=

2. First iteration calculations,

i�

6(0' =

k = O.

nT= [� � m �] nl -

n] r :]

-

-

=

= 6L

SOLUTION OF LINEAR DIFFERENCE EQUATIONS

1 65


[-0.2.62 ] . [-25 ] = - 6.8 45 4 = -0.8756. 1 ) ( [ -;<1) = ::]P3 = [ - �1.:�8 ] 0.8756 [ - �1 ] = [ -0.-0.0.659244267244] . = 1. 3. - � �] [ - �:��� ] - 3 -0.9244 _

Second iteration calculations, k

o

b(I1) -

-

-

[[�1 - 0� -3�] [ -0.�::1::�105 ]] . [ - �3.:���!2978 ]

-:-;�_;;_:_------

------

16.9431 [11..61058154] . [ - 2.1. 117511]78 = - 2.321 3 16.9431 3.2978 = -0.3 1 38. 2 ) ( P [ ] I -;<2) = PP23 = [ -0.0.1.981897] 843105 -0.3414 [ - 31]1 [ 0. 5 244] 4 837] [1. 566 0 267 0. 6 -0. -0.3 138 -0.9244 = 0.5210 . 4. = 2. - 21 0]1 [1.0.40566837 ] -3 0.5210 Third iteration calculations, k

6(1) = [ -2.3.1 .211797857811] . [ -2.3.1 .211978757811] = 16.9431. [ 2.1.40 ] . [ -2.1. 11577811] la I) = - 1.8 16.9431 3.2978 = -0.5 123. 2 ( X ] [ I 2i ) = XX23 ) = [-0.-0.0.286]-0.5 123 [ -0.-0.0.596244] 244267 [= - 0.0.1.092736216870 ] . ;<2) = [ ''23 ] = [ - 2.1.1.408] 0.5 123 [ -2.3.1.211579787811 ] 843105 . = [ -0.0.1.981 897] [[ �1 - �0 -3�] [ -0.�::1::�105 ]] . [ - �]4 b�O) = 45 [ 2.1.1 .631 058121543 ] . [ -245 ] = - 45 = -0.3414. '1

1 66

m

+

o

6(2) = [ -0.0.1 .406793271342 ] . [ -0.0.1.046271342793 ] = 2.4451. [ 0.1.98897] [ 0.1.46271] 843 . 342793 -0. 0 -0. 1 1 0 5 a(2) = 2.4451 = 1.3943. 3 ( X ] [ I 3i ) = XX23 ) = [ - 0.0.1.092687736210 ] 1.3943 [ 0.0.1.40521566837]0 [1. 0 000] 1. 0 = 1.0000000 . 3 ( I [' 3;< ) = ''23 ] ) = [ -0.0.1.981897] 843105 - 1.3943 [ -0.0.1.406271793342 ] 000000 . = [ 0.0.0.000000] +

Example 7.15. Use the Orthomin method to solve the symmetric

7.12.

system of equations considered in Example Use an initial esti­ mate of for all i. The Orthomin solution for this problem is

Xi = 0

BASIC APPLIED RESERVOIR SIMULATION


(I )

(0)

(2 )

unto tihlecOronvethomirgenncieteirsaactiohnieaved.Ift6er Wheniteratthioensre, stthaertprproocecdesureisisapcplalieedd 0.0.00000000 0.1.40569696 0.1.77951829 t theOncOrtehtomihe inte(rKa)tiiotnerhasatiobeenn. restarted, all theoretical analyses con­ 0.0.00000000 0.0.90086675 0.1.00267669 plottcieoihrncneraivecblnworgettbechoderssc,aoVeiussnvelceotosalrtrglsteotnhcteheieprnfiartooeperermaorrtatitiotehinsosogonal noficntohtnteheiaonltiecnruedyartwiieoinnnthttarihrneeesthnoeartaerctllouicyclengerrredinert.ap­erIecn­­ 0.0.00000000 0.3.01477965 0.3.01052955 0.0.00000000 0.1.83983396 0.1.58459642 stnecotarreetdscyclucareyetf,honotercloatnverrogale prlgprencoblevieemsoraust.eIVeofn prctthoaercsittiecrea,taiovalnTheuehowever rofest1a0rt cycl, it ies toft20endseins 0.0.00000000 2.1.91 834132 2.2.09675594 aindceOtlquuahdeetrethmifeonrgenerimosmum-tarlreizeseseidrdvualmioirn-metsimimum-ulhodsatrieosnusidpreualdoblin(OermsMR)ese. rvoimer tshiod,mul1a7titohne 8 1.0.99254828 0.2.09219293 2.0.90064998 gener 1 a l i z e d c o nj u gat e r e s i d ual ( O CR) me t h od, andt commonl others.y usTheed OMR me t h od i s t h e i t e r a t i v es o l u t i o n me t h od mos 0.1.00079230 -0.0.09007844 -0.1.00002025 timathnanreeslotyerhvhaleoir rfgestihnmeerulastlaoiztrieaodgneCOLbecandausmetappre ihtoodscxianmabeatndelpeiysralone-fosromtmorheidrdwieofrtohbustapprhet.woroxik­ 2.0.09850298 0.3.00049016 0.3.00008001 list of theoretical and computAsatidionasclufseeatduirnesItofemthse2ctohnjrouughgate4-ginratdhie­ the cromeofnveththregodsecnoceceffiarncaitbeeenoftgremathaetrtlciyxonjimuaprgavaotveleu-egdrcabyldoiserenetdtoaucone.ndinotgThehtheer 1.1 .08295147 0.1.99997771 1.1 .09001963 egecnontndiemertaitlohiznod,enumbe d COL 3.1.09872892 3.2.00010198 2.1 .99973995 cfiocndiienttioman numbe r i s t h e r a t i o of t h e ma x i m um e i g e n va l u e of t h e c o e f ­ tr i x t o t h e mi n i m um ei g enval u e. Ma t r i x pr e c o ndi t i o ni n g i s al fisyesdtrec.moTheeofffiobceiqejuanecttmatiiovnsetrofiixnmamora watreixytiprgthhtea­­t 2.1.00000002 2.1.00000001 2.1.00000000 onelccylou.ndisIntwayetrgeisotnnihteoenrrgaeelid,igstucehtnoeevacatholltunjeeercsutohgaofndiettoreht-eigoigmodirniannumbe 0.1 .00000000 0.1.00000000 0.1.00000000 areThealwreayasreustewdowicothmmonmatriprx preceodcndiioendinttiaotinniodningegng.nmeertahliodszed: COLleft prmeectohndiods­ 2.0.09001999 -0.3.00000001 0.3.00000000 tteiomninofg equatand riiognsht precondiqoniis nprg.emulIn letiftplpriedecbyondia tprioenicnog,ndithtieonisynsg­ preconditioned system of equations(7..261 a) 1.1.09000999 1.1.09000999 2.1.00000000 matrix, to form the ........................... 3.2.00000002 3.2.00000000 3.2.00000000 and . . . . . . . . . . . . . . . . . . . . . . . . . . .. ( 7 . 2 61 b ) Iinng,Eq.we7.261worb, king with pseudoreandsiduals, becauIsne,lfreftomprEq.econdi7.2t61ion­b, 2.1.00000000 2.1.00000000 r;which impli-es that .................. .. . . (7.262a) 0.1.00000000 0.1.00000000 r;In right preconditioning, the system of equations (7.262b)is 0.3.2.000000000000 0.2.3.000000000000 modified in the fol owing ma............. nner. ........... (7.263a) 3.2.1.000000000000 2.3.1.000000000000 or . ............................. ( 7 . 2 63b) Thi s e x a m pl e i l u s t r a t e s bot h t h e di r e c t a n d i t e r a t i v es o l u t i o n cusheadrabetcterwiseenticssofuccesthesOrivethiomiterantemets tohtod.ermIifnata teotlhereaprncoecofes0., 0it001stopsis ItinoniEq.ng,7.we263b, working with actandual residuals, beIncaruigshte, prfroecmondiEq.­ after the seventh iteration. 7.2r;63b20 ........................... (7.264a) veaddiThectotirosOrn,gthtomihbee nstiointrnereerdatfiooprrnusroeducequiintr-ecasltchualtaaltinl gvalthueescogW,ofefficiefoantnrsd alalll thIne r; .................... ( 7 . 2 64b) at eacrefohrIet,erasatiIotenraLeveltion Levelforuseinincrceaaslceus­, or r; ... ....... .. .... ( 7 . 2 64c ) lbotatinhgthtmusheessteotrcbeaogeffiepearcnfidoernttmhsee.dThenumbe byequatEq. i7.ons264cby creToaseredrducamate thiecaalmyount. of storagreofancdomputworkaitnivolonsvpeedrinitethraetiOronthino­­ Thiionls aysctprohnseoiperedquencenttyitofyematrofight"raixlprteercondiintg"hattthiiseo,niornigginasalinsydiscteatmedofBecaus tioning throughout the remaie ofntderhis proces ofisioftertaetniousnse,d. Thiof sthpre iotecerastioinn;­ profoItnperhirisgtsyhte,ctwepreion.cusondie ritgiohtninprg,econdi mivolnveitseperatrifoon,rmthineg"arefistxaedrt"number asttoIppiterantgl.OtnheLaprenvdoeces,(ojbe" 'foorleDcltolanverlzegtenchThee ree;satpranrdotrcpreessotacrcetasinn,gbethereprpoeacteesd t(i1o)natol ebeffoarctloosienveaprprt tohxianmiattthtiaoeknpreofsetcooindinveatnirodtni(2n)gtmaTheo tatrksieextlwesoiprscosomputepelecrttieeads­ _ k)

x(

.....

......

(3 )

[AJP

[AJP .

11 ;

�K�

(5)

(4 )

......

.....

K

19

Matrix Preconditioning.

......

to

(6)

......

(8)

(7)

......

......

[A]; = d

[P],

(9)

=

[P] d

[Ap] ;

=

�.

( 10)

[Ap]

are

.....

......

[P][A] ;

=

l4

=

[P] 7 .

=

[P][A]

dp

=

[P]d .

[Ap] ;,

.

.. .

[A];

=

d

[Ap]

=

[A][pr ' [p] x [Ap] Y

=

d.

are

<k )

( [A]7( k + l ) } .

j � k-

d (k)

k

b�).

j,

k

=

d - [Ap] )i,

=

d

=-

[A][P] - ,

Y

=

[P]X.

[A][Pr ' [p] x,

d - [A] x

=-

7,

..

.

.

[pr ' [P]

=

K,

;<0)

=

;<K),

p<

. .., . . 1· 0 ) = ;< = ;<K).

SOLUTION OF LINEAR DIFFERENCE EQUATIONS

_ 0)

x(

-

= x (K),

d

.

[I] ;

I (J()0

=

[A]

..

.

[1].

[P]

[A].

167


tgemiennsdseercatoal2nybebecoanflvicosimpructalwiiozemithdesteahcrbehoughtotwheetrwn, atohneedxtatwrgoodeo.mTheesprofneetcheodendifprotreiotchnioindisncgotmaimpronitrnoigx­ { } . . . . . . . . . . . . . . .. (7.268) matrixt,rix. 1 If the pranedcocndialctuiolanitinnggmatrix irsesquiet erqeuas nol toaddithe itdioenalntitycoma­m­ Then, puttheactoiondinaltioeffn onumbert. Unfroofrtuthnaetpreleyc, othndiis tcihooinecdesofystemdoeof esqnotuatioimnspr. Theove p (7.269) otorhigeirneaxltcreomeffie cociecnutrmas ifttrhixe. prInetchoindis catisoeni, ng matrix isasnedt eaqcuaondil totitohne If set . .an.............. K < < ) 0 ; ; d numbe r of one i s e n s u r e d . Unf o r t u na t e l y , th i s c h oi c e of doe s not . cofhaenqgeuatthioenscobemputcauasteional effomusrt retqsuitirledbetocsoomputlve theed.orNotigienaflrosymstethme meWetphodsnowarecanavai. Pdilraosblccusee fsdometWir c'tohhnsodsctormputucoftincgaottnsIhOinstsrumat. ctinrgix, we lWhii)m. Solitlourevmaedifnosyr­ cussionprtoectwondio metiotnihodsng afnredquentincomplly useteed-LinU-refsaecrtovoirizrastiimonul(alLtiUF)on: dior­ atdehcehfiprineivetiecodon,ndioftionedtchoaeffit, ifctiheentfimarsttrprixaonapedl rtchtyleu(srite.eesru.,altrionundg eigone.envaThilcuaenssrbeofe­ agonal tcsiuoolndinsts ittnhioaanit icnsogandipiprstioroexinlamnumbe ativteellyy esrtqrfuaaoirglhttthofeoone.prrwaecIromdndiplanetdmioneeisndtaatsidiyosnrteeofcmt rrofiegshtueqlprtuaofe­­ modimatrifixed ILisUFcons(MtrIIunLcdiUF)teadgonalbyprseecprtoindiencgottindihoeniditnioag.nigonalng, theleeprmentecosnditioequalning asulgbsortiittuhtmsing. the preconditioned system of equations into the solution ttcohoenstnhtersudiectatt.gonaloThezerworoel. eThimentk resqsuiisofrethdetosicmonspletAlrsut clprtofefc-doiindinagonalditiaogonalninelgementprmaetcroisxndiartoe­ the banddiasgonaltructuprreeorcosndipartsioitniy ofngtahte­ trary). Set. ellorm e owmgandSelecctosmputoalnveesatltoimnsa.!.seeqofuentla (yarablnoidr­ ttorrioainicgtiinnvgaleiwhencsotheffie scaD-ime,e4ntorrmatedgarerriidnxgl.eThisorofcycls makes iico-ns2 (ofredlbthelascyks)teormdeofrinequatg is usioensd k=0,1,2 , . ., until convergence. t o or d er t h e fi n i t e d i f e r e n c e equat (7.242) (asnedWheeaSec.genern di7.a3agl.onai3z)e.dl COLprecometndithioodninigs usiseusdetod sinoltvheethcoenjreuducgatee-dgsryadstieenmt .......................... (7.265) orwhialggeorchnitehisrmsaalliszoeda dipeCOLargfoonarmemlematdhbyodstriix,n,tvehiserctSoloinnsgvtreucstteeThapdsbyitnisste,httehineprgmaethcoetrndieixletmioenentds p , ..................... (7.216) dioftioenintngalmagoretqriuatihxm,l toth1For/e Solexwheavme plrsetee,pinsthiamreeplprthyeecbeoelndiecmotmeeionnetssdofcothnjeuprgaetceo-gndifroa­r­ ................... (7.226b) 1,2 or equivalently for 1 ,2 andSolrve (7.266) UsmetExamplehaodn ietno7.itsi1oa2llv.esUsettihmeediatUssyaegonalemmetoftherpriprcescondieycondifsotermaltitooflioninetiequatng toconiaiodnsjuinconsgathtee-isgdorerlaudietidoeintn.n .................... (7.267) matrix foForr thidis pragonaloblempriseconditioning, the preconditioning anThid ps al+gorithm is verified easpily by. repl............... ( 7 . 2 48) 8 a c i n g wi t h and not ­ 1 2 5 1 60 igrngadthieantthalegroresiutlhtm.ingIalt gisorimithporm itsantidentto inotcaletoththaet torheigprinealccoondinjutigatonede­ darcbotonhdjuctgathoenjeoru-ggatigrainedial-gerntaandidmeetnthtehmetodprehashcood.ndithThateiosneatmeids, stryheseqtecuimoreffisemofceiequatnetnts amasiotthnsreicmussetsaofn­t 8 be symmetric and positive definite. 250 Sel e c t a n 1 25 estimate of . el(oarmrbitrthaery"). owmg Set computatlons sequeanntdI.alsyolfvoer ,. ., until convergence. (7.242) The preconditioned-co2.1.nj00u054708gate-gra0.d1.i99en973968t solutionforthis problem is (7.258) 0.1.01064812 1..001143 (7.259) 2.91497460 2.9995 0. (7 . 2 1 6 ) 2.1 .01004652 0.1.99999988 anIdf solve . . . . . . . .. For. . . j. . . 0,. .1. ,... . (7.226b) 2.1.99750811 3.0013 -u)

_(H I )

[A]h

[P] - 1

[P] = [I]

[P]

[A] - 1

[Ap] [Ap] = [A][P] - 1

=

[A]

[I]

_(H I )

_(H I )

[P] = [A]

[P]

=

k

I

= h

K,

=

(j)

+ L b/ P

k '"

( .)-u)

j=O

(0) _( [P] O) = r +

15

. g

_

;to) = ;tK) k = 0,

=

[Pl.

[P))

Diagonal Preconditioning (or Diagonal Scaling or Point Jacob i Preconditioning).

[P]

P i. i

[A], a i, i '

Algorithm 4- Preconditioned Conjugate-Gradient Method for ;<0) Symmetric Coe cie'!!. Matrices. (0 ) = 7 (0 ) ) = d - [A]X (O) 7 [P]h -( - ) . 11 " P (0 = h O) p ..c . ,011 th " .

[P]

(t!

tk)

k = [A]p ( ) ,

(k ) (k ) ark ) = r . h , (k (k P ) . g ) _

_

_

X_(k+

1)

(k = x ) + a (k ) _

_

(H I )

_( k ) r

-(k )

_(H I )

+ b (k + I )_

(k)

[I]

.

(k )

. g

_

( k)

_

ark ) = r . g J (k) _

_(H I )

X

,

(k )

_

x (k)

_ (k _ = x (k) + a ( k )p ) ,

_(H I ) r

k+ I

1 68

(k )

(k (k ( = r ) - a k )g ) . _

<

K,

_

-(k + 1 ) (H I) = 7 [P]h

=

, k,

1 00

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

Algorithm 5-Preconditioned Orthomin(K) Method. ; (0 ) ;<0) = d - [A]X(O) _(0) (O) p ..c 11 . [Pl� ,0 = r JY k = 0, 1 ,2

g

=

[P]

. h

[P] =

(k ) =

rJpi.; , . . . , n.

hi

i=

i.

x; = 0

Solution.

[P]

.I'. u

h ; = rJa i. ;

, . . . , n,

-(H I )

. h

= h

_

P i. i

Pi. i,

Example 7. 16.

_(H I )

_(H I )

1)

i=

[P].

= r

b (k + I ) = r

- (k

[pr 1

(k )

_ _ (k = r (k) - a ( k)g ) o

(H 1 )

_

[P]h

_

[P] - 1 ,

[P].

are

_

o

o

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0.0000 (0) 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000

o 200

o 1 00

0

o

0

0

o

0

0

0

0

o 200

(2)

(I)

0 00

0.000 1

2.0020

BASIC APPLIED RESERVOIR SIMULATION


(5)

(3)

(8)

(6)

(5)

2.1 .00000000 2.1.00000000 (4) 2.1.00000000 2.1.00000000 2.1.00000000 (4) 2.1 .00000000 0.1.00000000 0.1.00000000 0.1.00000000 0.1.00000001 0.1 .00000000 0.1.00000000 0.3.2.000000000001 0.3.2.000000000000 0.3.2.000000000000 0.3.2.000000000001 0.2.3.000000000000 0.3.2.000000000000 3.2.1.000000000000 2.3.1.000000000000 3.2.1.000000000000 3.2.1.000000000000 2.3.1.000000000000 3.2.1.000000000000 2.1.00000000 2.1.00000000 2.1 .00000000 2.1.00000000 2.1.00000000 2.1.00000000 0.1.00000000 0.1.00000000 0.1.00000000 0.1.00000000 0.1.00000000 0.1.00000000 3.00000000 0.3.00000000 0.3.00000000 3.0.00000000 --... 0.3.00000000 0.3.00000000 0. 2.1.00000000 2.1 .00000000 2.1 .00000000 2.1.00000000 2.1 .00000000 2.1.00000000 3.2.00000000 2.3.00000000 2.3.00000000 2.3.00000000 2.3.00000000 3.2.00000000 2.1.00000000 2.1 .00000000 2.1.00000000 2.1.00000000 0.1 .00000000 0.1.00000000 0.1.00000000 0.1.00000000 3.00000000 0.3.00000000 3.0.00000000 0.3.00000000 0. 2.1.00000000 2.1.00000000 2.1 .00000000 2.1 .00000000 3.2.00000000 2.3.00000000 3.2.00000000 3.2.00000000 Thi s e x a m pl e i l u s t r a t e s t h e powe r of ma t r i x pr e c o ndi t i o ni n g. I f a t o l e r a n c e of 0. 0 00 1 i s us e d bet w een s u c e s i v e i t e r a t i o ns t o t e r m i ­ Thi s e x a m pl e i l u s t r a t e s t h e powe r of ma t r i x pr e c o ndi t i o ni n g. I f na t e t h e pr o ces s , i t s t o ps a ft e r t h e t h i r d i t e r a t i o n, i n c o nt r a s t o s e ven naiatetotrealettirhoaensnprceroeofcquie0.sr0,e00idt tsotomeipss useatfetdherebetshtaewmetehintrodsleuitrccesearnactiesoifn,voerinittheceroacnttoionjransustgattoottese-ergvenmrai­­ titieornatwiiotnsh rnoequimaretrdixtoprmeeceotndihetsioanimnegto(lEerxamplancefeor7.th1e5)Or. thomin solu­ dient solution with no matrix preconditioning (Example 7. 12). identical tothe approximatThee facItoLrUFizatprionecteocndihnitiqouenindigsprcusocseeddureaerliis­ eIusLr.eUFIdf asthpreaescipromndieplcoetindiocnioetniffiognicmeinegnthtprod.meoctehdodure(,Etqshe. 7.re1s7ul3titnhgroprughoce7.s 1 8is0)thies Us e t h e pr e c o ndi t i o ned Or t h omi n me t h od t o s o l v e e 7.12. Use tioninsgecmeondthIod,LUFadjprusetcsothndie ditiaognionang lprteorcmesdofureth, ethpre MIecoLndiUFtioprniencgondima­­ dithaegonalsymmetprThereiccosprendiystcteoimondiniofntigoequatninto gaimaidonsttriheconsxsoluiditseioirden.ednitincExampl 7.16. The preconditioned Orthomin solution foralthtiosthpraot bleExmamisple ctthraiexl esudmthtoeoffothrceeetlheemseunmprtsoofapectrhoretsyeoftlehmethceeonrtseascprondiospranelgcroorondiwwsstofiofoni[nAg)toma; tehqtirsuaixisl. The Dupont me t h od ( E qs . 7. 1 7 3 t h r o ugh 7. 1 7 5, 7. 1 7 7 0.0.00000000 2.1.00742116 (I) 0.1 .99967972 t h r o ugh 7. 1 7 9, and 7. 1 85) al s o r e s u l t s i n an MI L UF pr e c ondi t i o n­ ivalngiprd,othcedure ROWSUM e becauseof, ifththeematassruixmpt/veciotnsor mulstatetidpilnicEq.ation7.of1 81 are 0.0.00000000 0.1.01068116 0.1.00010123 i s equal t o t h e ROWSUM of Us e of t h e Dupont t l . met h ­ 6 od as a pr e condi t i o ner i s c a l e d DKR pr e c o ndi t i o ni n g. 1 , 2 Towl e r 0.0.00000000 2.0.91458865 0.2.09000994 2 and Ki l o ugh2 a l s o i n ves t i g at e d t h e us e of SI P as a ma t r i x pr e ­ condi t i o ni n g met h od. 0.0.00000000 2.1.01 078117 0.1.99997988 The a p pr o xi m a t e f a c t o r i n g t e c h ni q ues , a s de v e l o pe d e a r l i e r i n t h i s c h a p t e r , c o ns i d er e d onl y t h e or i g i n al band s t r u c t u r e of t h e c o e f fimaciternticemats woulrix.dIfhavewecornteafiancedtormanyed exacatdldiy,ttihoenarlesfiulltilnogcationsandothe­r 0.0.00000000 2.1 .99872842 2.3.00011019 than those as umed in Figs. 7.37 and 7.38. Because we as umed that (3)

(6)

(7)

(8)

-+

( 1 0)

( 9)

(1 0)

(9 )

-+

-+

-+

-+

(7)

I

ILUF Preconditioning.

Example 7.1 7.

A

Solution.

in

[P]

(0)

(2 )

[P]

[P]

ROWSUM

MILUF

et al. 7

[A]X .

e a 7

[P]X

_(k)

x

-+

-+

[A]

SOLUTION O F LINEAR DIFFERENCE EQUATIONS

[L)

[U]

1 69


[L']

[V'],

- ---· - --

ttuhreeaaspprtohxie moraitgeinmatal croiceeffis,ecientanmatd rix, wecontiganorinededthtehesaimmepacstrtuofc­ T T tfhoesree, thaddie retisounalltingfilprleoccoanditiotnsionionngthmete fahcodstorizaraetiocanlpredocthees I.LTheUF(rOe)­ thieocfial­­ lciaeneveldntth.matIef werixpetordefotremrprmaeinscyeombolndithetelioiicnemfiranscat,towheiroinzarstetieotphneaoftzwhietrhoecrorhefeieagrcisnhtalofilcoeffi tandion becmatorimesx prnonzecondiertoi,oweningcanmetdevelhodsopbasappred oonximmaatetrifxacstotrruizcatutiroens ic elnon­imi­ natczoerntoioanduriniisnipegngrthftoehrseme fiehidrgsthetoelderifimtelirnmlateivelnioensth.sForetefpilealxnoadcmattplhioesens,eiftlhosatcyambolbecome cprluededcondiintiotnihengapprmetohodximisatreeffearcetodrtiozaastioInLUF(procIe)san, dtthMIieonsLreUF(arsueltliin)n.g­ treersTheuapprlt iobnofxijaesmctteativericooofnnvertiontchgleuencdiornieggritnahalteeshic.oThigeffiherscifiiselntaclemathvelieved,sriixs,thoweo achwhiiveeverc,habetamayt the­ iwaterradt-ivsuebsmetittuhtodiondepends e,mthteo bechoisoclpereveofd,grathidideblrcehocoictkcor)e, egrxepeatnesrethofanaddionetarioenalnotcousmputed inatcioonalmmereffcoiratl. rGeesenrevroialr ysi,mfiull alteovelrs.s ofandsothluetiavaion metlablheodcpromput(oscesinglsoneeers. or.thIenmultshuemmatpripoleblryunknowns tproeIimcmoplplndieementmentt2ioneraat,tiiotohnneofIofiteLrappraUFtionoaxinpadmrMIaatmeLeUFftearctproreizcaoitnndiioEq.n.tioWhen7.ni1n8g2isususideuentdallayiscaiasl feaItnurgeneres. al, an equation solver should posses a few important notonceusbeed.foreThithesitalerloatwsionthpreomatcesricsetasrts andanbed kepttfoixbeedctohnsrotughructaledl mum1. Thestorsaoglevermesmhouloryd. be simple and easy to code, requiring mini­ ictoenjrautigaonste.-gWhenradienItLorUFgeornerMIalizLeUFd CGLprecmeondithtodsioni, tnhgeiSols usveedstienpsthine 2.3. TheThe ssoollvveerr sshhoulouldd bebe setaasbilley witratnhsrpeorsptaecbltetofrroomund-oneoffcoemputr orse. r sthtietMosuprtioetncomodesnditeptifrnoonelrodewesealrdgvoroibyrit-hasimsbacmulakarwarteiopendrpr-fsouorbsgrmteaidmtuswitiohatnhvseateafpon.rwoptarido-nsufb­or to another. epreCGLconditCGLteiochn­­ Thiateds fcrhoaptm tehredidiscffuesreenscseoequatlving itohnse s.yThestemstofruclitnuearre ofequatthe icoonseffigenercient­ nitianecqgCGLhues(nisiqmuesilsiilnatearrh, setuo-meceapprhquatasthodoOrioxintmushsomiateodlevfertnoa,.cwimitTheotrnhizimoptaditiifzoiemnertEq.ieezncechdeni7.matiq2nues1tr4hi.xes)Modern ma t r i x devel o ped depends on bot h t h e i r e gul a r nat u r e of t h e gr i d a n d ac c e l e r a ­ s y s t e m a n d t h e s e quent i a l manner i n whi c h gr i d bl o c k s a r e num­ tion haveunknowns the capaciintyfetwero sotlhvane s50ysteitmseratofions. equations in berstanedad radndorequatderinigosnschemesgeneraapplted.icThiablsesteoctthioenA-prIerseesntersvtoiwro, tposhensidiblse­ tleioadsn oftoPDE'systesmsbyofusaelgeofbrtahice equatfinitei-odnsif .eTherencenemeted thoTheodusedieventpowescreutrialzfaluy­l byplarysowstheinrewhisultcihngonlstryutchtueracestifvoer thegrcoeffiidblsochciowskesntinmastthatenridaA-cesrdI. roresdeerrvioingr edriixnifsethquence A-Ierbyeserrovw;oir gridblockssharowse orthdeerreedsuasltisnhgownco­ toflhineearequatpr-oeblquatioemnsi.ofonssoollviverngssbecysteomsmeswiobvith teonsustwheo hundrn weedsarofe ftahcoused awindsth aeffiinreFicnumber i e nt mat a possictofiioetnnthwheremacoeffitreixacizerisentomatelermentix(tarheeexireinadisrtes­ swhennumbe ysItteermstahrtieofvofcoeffie zmetequaterochentiodseiontrns,imaein.s.ThegenertBecaus irix har aapplsl,aeasronlpeicarusaytsieeononzdnstmorrbecuecrteuoowirmemae,dcseltormorintyxtaeloienesiomentnalgtvreaallcsaatrraigvgreeee catis leerftdegs.byble70rav4fink.oi0.lreTheThedblsoqnonzcuarskisz)ee.esofIr,toathaelnhdeesmentcoeffi aI)banded setruofcttuhreeirwietgulh aarmaxinatumreumof d t h of 25 1 2 2 . Becaus usbastoenrddeagiden ormeitenotrmaort)ivplye.aThemeys tnohsodstrroul,cettuihnresemoseofmetthiettehrcodsaoteivffireecmetqieuinrtheodsmaretl,rasitxoivt(elhweyheprltiothb­eler bandwi t h e boundar i e s , i t has a number of di a gonal s . Al t h ough t h e c o effi ­ c i e nt ma t r i x i s s p ar s e , t h e exi s t e nc e of a l a r g e numbe r of di a gonal s tlseitormuncoftiusroptteheofimapprtahleorcoodxieffiemrinatcgieeofntfanodemactotrriszixadoestfioornmnottsecthhaeniribassqeues. Oneis,ofwhernottheaeprbltoehceexcedbandurep­e. increases the level of difficulty involved in handlshowsintghethsitsanmatdarrdixor. ­ Diunknowns rect-soluftrioomn ttehcehmaniqtuerixs edepend onInthtehesyapplstemicaatitcioenliofmitnhaetidionreofct deerarbinlegfbyorcthoeluA-mnsI refoserrtvhoie A-rbeIcraeusesrevtoiher.baThindwis orddtehriofngthscehremeesultiisngprceof­­ q ua t i o n. cofesthaermaiythtoensstsootloruertaibotogne prhoftohtcheeesccoo.eUnlmputfficeiesenrtvidemartfiutnraielxsmeathnmedorup­thye effinatucrieentofmathetcrioxeffiis c1i7ent matrix2ofFi1)g. 7043 leads tTheo lesmorcompute compaation­ct rimesigushttheodsvecd, t,thoietristshizrneeoughout a l wor k . Al s o , not e t h a t i rr e g ul a r s t r u c t u r e s of t h e c o e ffi c i e n t ma t r i c e s perrectliprmoitconedurtheesnumbe r of equat i o ns t h a t c a n be s o l v e d by us e of di ­ i n Fi g s . 7. 4 1 a n d 7. 4 3 pr o hi b i t h e us e of c e r t a i n s o l v e r s t h a t de v e l ­ . On t h e ot h e r ha n d, i n t h e c a s e of i t e r a t i v e pr o c e ­ ope d f o r s y s t e m s wi t h a fi x e d numbe r of di a g ona l c o e ffi c i e n t ma t r i c e s durexpeesn,sreeducof inticorneaofsinthgethsteoramount age requiofrreemqeuinrteids oftcomputen acahtiieovednal worat thke. such as tridiagonal, pentadiagonal, or heptadiagonal. However wimetmh orsloyw, ,itftreoarrnasstmfivealer clmeacpabiomputthodslitieerbecssbetwiowtmeheennothtviehreprtumaealf-ienmr semoretdoralignyeearcaanpac-dsoviliutryttiuooranl discretized intsohows30 blao2Dcks.reservoir with regular boundaries that is technieqntue.whenAn ismeverporatal ntsyadvant ageequatof diiornsectwiprtohctehdure saems bece cooeffimes­ (1)1s. tUsandae trhdeorfodleorwiingngbyscrhemes appar s t e ms of cipleentmentmaitnrgixdibutrecdit sffoelvreernts troigththi-sscidaetevegorctyoofrs arpreobltoebemss,ofalvced.toriIznatiimon­ t(e3rn) D-ati2ng(ddiiaagonalgonal))ororddererininog,g.ws(4,)(c2tyo)csorltiacdndar-2erorthddeerorriednserg,erivanoingdrby(gr5)icdD-obllu4omnsc(kals­,: ofsimthuleactiooeffin durcieintngmathetrifixrisst donetimesonltepyconcompute atattihoensbe. Igninsniunbsgeofquentthe 2. On engineering paper, show the structure ofthe resulting coef­ timesteps, it is neces ary to conduct only the forward-and back- ficient matrix (mark nonzero entries) for each ordering scheme. i

i

MILFU(O)

3

2

I

9

18

17

18

19

28

:n

zz

28

29

30

31

32

33

34

39

..

41

42

43

44

46

47

..

49

51

51

53

54

55

56

4

5

,

7

11

12

13

14

15

16

Z3

24

:15

Z6

27

35

36

37

38

45

t·_- l--!---+--.f 52 I ! i �---. ---t,-_ · t-" +--+ I

I

[A],

[L']

W ( k)

- --

51

59

n

"

-

--

-

--

-_.

Fig. 7.4G-Standard ordering of active reservoir blocks of the A-1 reservoir by rows.

[V']

7.4 Chapter Project

1 00,000

1 00,000

7.3.5 Comparison of Direct and Iterative Solvers.

Standard Ordering by Rows. Fig. 7.40 60 Fig. 7.41

60

60 x 60

(=

x

+

Standard Ordering by Columns. Fig. 7.42

(=8x

+

(Fig. 7.43).

are

Exercises

7.1 Fig. 7.44

170

BASIC APPLIED RESERVOIR SIMULATION


30". 55

60

Fig. 7.41 -Coefficient matrix resulting from standard orderi ng of the active reservoir blocks of the A-1 reservoir by rows.

7.1 7.1 (1) (2) 53xx[[ 63xx22 4X34X3 1123.. 4x[ 4x2 5x3 13. 7. 1 .

(1) (2) 7. 1 . (1)(3) 7. 1 . 3.1.012149x[39x[ 2.1.0061l139xx22 -0.OA054x3 8 124x3 4,000 0.(811)24x[ OA054x2(3) 2.8 143x3 ' ' '' (4) ( 2 ) 6-4 -46 -4 0 00 X2 X3 -4 -4 6 00 0 -4 -46 -46 X4

7.2 Answer all questions in Exercise as if the reservoir in Exer­ cise has irregular boundaries as shown in Fig. 7.45. Number ac­ tive blocks only.

7.3 Use Jacobi 's algorithm and Gauss-Seidel's algorithm to solve the following system of equations. +

+

+

tained in Example

7.4 Use the conjugate-gradient method to solve the system of equa­ tions obtained in Example Start with an initial guess of psia.

..--

10

15

6

11

16

11

12

17

n

1

Ti

1

u

3

13

11

13

27

4

9

14

19

14

21

20

'19

15

.. .. ... . ..·t. .

t".1"'·-_·1 ·-TL_+ J .

. .. _. ..

.. _·

.

· ·

. _.

..·.

�· 1 .. .

_

. · _

..

Begin with an initial guess of

7.6 Use

the Gaussian elimination method,

T :

----·

+

+

+

Use

.-.

--- ,

-

+

+

· · ..

Fig. 7.42-Standard ordering of active reservoir blocks of the A-1 reservoir by columns. SOLUTION OF LINEAR DIFFERENCE EQUATIONS

=

=

=

the Gaussian elimination method,

psia for

Thomas' algo..

the Gauss-Jordan re­

the Crout reduction algorithm to solve

this system of equations. Compare the computational time require­ ments for the three algorithms.

7.8 Use

(I)

Jacobi's iteration,

PSOR method, and lowing system.

Gauss .. Seidel' s iteration,

(3)

conjugate .. gradient method to solve the fol ..

XI

�30�.....;;.;...+...;-I_.; .

psi.

the Crout reduction algorithm to solve the system of

duction algorithm, and

---.-·' ---··--

0.51,200 (2) 3.2.07350.778. 1.(3211) 3.

(3)

7.7 Consider the following three equations in three unknowns.

=

5

the Gauss-Seidel iteration, and

to solve the system of equations ob..

all unknowns and use a convergence tolerance of

Use an initial guess of zero for all unknowns. Comment on the results.

r-'-

WOpl

equations obtained in Example

=

+

Jacobi's iteration,

rithm, and

=

+

+

7.5 Use

the PSOR iteration with

Xs

o o

o o

171


5

5l

,., ,.

10

15

20

25

30

40

55

., ,.

III

eo

Fig. 7.43-Coefficient matrix resulting from standard ordering of the active reservoir blocks of the A-1 reservoi r by columns.

Consider the fol owing thre equations.

-epmhasine,mestetady-hod tsotObsastoeleflvreovfweotrofhtahtoie hprleienrestihuseraehorwedisil­­ zitnroibntthuteaConsilso,y2D,nstienidm.itserhoeApplttrhsoyepisstycienstm.glhyesetWrLSOR obtknown asweepin ttblhheeoisckstyesrtaeitmnivetpahequateraslyeslitoetinsm.otethtof(heAejIstequatdieurrameeticoitonionsLeveln.)alongatnhdejredimforeermctthbeieonrun­ttoo equatUsande usthioeensaGa.toStuleasrra-tnSwiceeidthofelaniteirnaittiivafolerguestceocnvehsniofqrgueentcoe scohlecvek.this system of ConsA proidducer ttihoen3D,welhomogeneous fi n i t e d i f e r e n c e body i n a t i s c o mpl e t e d a n d ke p t at a c o ns t a nt pr e s u r e . On t h e out e r s u r f a c e s of t h e s y s t e m, a uni f o r m Di r i c h l e t ­ sttieoady-ns bystyasctweoeepindiflowtinogofnsthwatsehownseyrstieninma porparaoluselmeditGeo tnhueemr­ tansypewboundar y c o ndi t i o n i s s p ec i fi e d. I g nor i n g gr a vi t a t i o nal e f e c t s , widiatertehtchtConstheioen.LSORasisExprdoercia2D,eetqesuadboundar er t h e f o l o wi n g ques t i o ns . What i s t h e t o t a l numbe r of unknowns ( p r e s u r e s ) ? e a c h l i n e equat i o ns i n a ma t r i x f o r m s o t h a t Thomas' algorithm is readily applicable. 7.9

+ 8x2 = - 1 . 2x , - 8x2 + 4x) =

7.11

Fig. 7.47.

- 8x,

4X2 - 8x)

=

1.

- I.

w = 1 .0

x iO) = x�O) = x jO) =

0.00 I

1 .0000

7.12 7.48.

(k

+ I)

Fig.

(3,3,3)

7.10

Fig. 7.46.

1.

D

6

5

Y

4

3 2

lL.

Active Block Inactive Bl ock

i

1

1

2

3

4

5

Fig. 7.44-Regular boundaries of reservoir of Exercise 7.1 . 172

i

i

Fig. 7.45-lrregular boundaries of reservoir of Exercise 7.2.

BASIC APPLIED RESERVOIR SIMULATION


NO-FLOW

N().FLOW BOUNDARIES

,, ,, ,, --:, 1--1'--­ ,, 3 , . .- L. , ,, "-

NO-FLOW BOUNDARY

_

...l .'""" .. ."":

PRESSUFE SPECFIEO

+

NO·FLOW BOUNDARY

Well

w�

I

L.

-0.1

BOUNDARY

(±)

+

+

+

.. --..

PRESSURE IS SPECIFIED • Ps p PRESSURE IS SPECIFIED • p. p

l

Pw

NO·FLOW

NO·PLOW BOUNDARIES

Fig. 7.46-Reservoir described in Exercise 7.1 0.

Note that:

4 X = 4Y

BOUNDARY

Fig. 7.47-Reservoir described in Exercise 7.1 1 .

equattequatrip2.leConsiiioonnsnsdexyouifdoernotr. inenagteidothnteoasssoysmmeluvggese fotrrtyteh,dewhatiprn ethseiusfirteghsure? Imien)ditnhicmatatumeyouthnumbe ewinodesl wrr(iofitne Solve approximatel0,y Laplace's 3D equation, given by imesnasciedhea-cnaedntc0ueberonedwhostgrheidre.eUsmaiedegenthiniesgGaoffauniucsest-. SlUseeindegtelhalifgorithm. (Hint:1Usonwietonehthea 3. tIfis theofmitnhiemsumyshowtenumber many unknowns woul d t h e s y s t e m have? f Whaunknowns of equat i o ns you need t o s o l v e f o r t h e m? I f t h e s a m e nonz e r boundar cmanysyifisteedmunknowns onare re0praendoessdentetd0hoebysNeumannusyrtfshateecmeno-shave?andfltoywpeifWhatalbounda l theisotrthhyyeeccrmioosndindiunrifmttaiicooumennssi,ofsnum­howspthe­e rulesPoiofisssysoommemen's gitequatrvyentofirouenncducitsioenthofe siandze ofSolthevpre tohbliseequatm.) ion apwherprox­e elyoutforrertdyhucecoctndiiaosnetaliwheognsorrariethem.the same1as00/th(os1 e ofExerciisfeth7.e1r4e.giUsone berthisofproequatblemioifns you need t?o consider to solve for the unknowns of tiandmheatCrbounda bodyonexctheeptlothwere lomwerostmplosatneplaanreekept0)at Obtain the steady-state temperature distribution in a square aarce5o.cnslIoftseaenntdtitrproe fseulsorwfuarcaeen, sdhowofthtehenodes many unknowns does t h e s y s t e m ha v e ? sbounda lab havirryiensg th0e1idis, mkeensp0,t aiotnsa tofeamruniepekeptrtaytuaraleitgzofneerdo10wit0°emtChpe. raantudre,awhixesl.eThethe Whasolvet fiosrththeemiunknowns nimum numbe r of e q ua t i o ns you mus t c o ns i d e r t o bounda of this problem if tewhiady-chstiasteobtteaminpeedrabyturtehdie isntrteibrsuteciotinoninofthtehr3De enc2.e SolRe-apprvsoeoltxivheme tpratheioobln,saemlmeetusiprnignogblceomnventusiniog0.nalt0h5.efihive-gherpoi-natc, fiunriatcey-dniifnee­r­ sfitnruitcetDeusrlaetebirnsm. Asinesuthmee shomogeneous stribu­­ point, finite-dif erence approximation, tmosion.tTheplanelowerm1os20)t plisakenept at O°0)Cisand. Alkeptlisthoaettroot1pi0h0°cerprCout,oapeenrdrtsytuhrdiefaupper tshoelUsvseterutchcoetnventuprreoarblieoemnalco.mplIsneven-seotelvlpyinoiignnsfitu,nfilaintteeit-d.ed-idfiffereernceneceeqappruatiooxinsm, atuscieoensthoftoe [�:� ���J.. LSOR ahmsc avaiel(ewrlaiatthblioopten. paimraummeatecr.eForleratitohne where 20 0, spaorlNotuatmioeent:aelDoofrg)oralinotnintdhemThoma equatuswie ttihhoesns'optrauhavelligemorsumofitPSOR ciotemparatirroeenstyourh. eTacobmputrulesauteltasyourtiwiontthriemtsheue,ltsste.oxTheraacgteasronelaquluiytitoriecnmalpresnootvilsu,dtaienoddn num­ihes re. instead,Solusveeththeeemquatotciohneck the valsiydmmetity ofryoury to ssoollvufeotirothtn.hise prplaonbleerm;e­ beAlrs3o.of,Compa giCompar oUsn sehownGause theisnciaonmputelimaitnioatwinaliothnttihamneedinrtedihqecuiaCrrteedodutbounda rforebotduchrtyialocngoorndialigthtorimsoinsth. msfor. 7.15

a 2 u + a 2u + a 2u = ax2 ay 2 az 2

kx = ky ;z! kz ,

4.

y=

u

= u(x,y,z) = � = dy = dz = O . l

x=

a 2u/ ax2 + a 2u/ay2 = p(x, y),

7.16

p(x, y)

kx = ky = kz

x y. p(x, y) =

+ x2

+ y2)

(z =

7.17

kx = ky = kz?

x= x=

y=

I.

7.13

x

y= I

y

� = dy =

Fig. 7.49,

(z =

(z =

+

=

IJ

6h2 [ u j + lj + l + 4Ujj + l + Uj - lj + l + 4Ui + lj

- u jj + 4u j _ 1j + Uj + I j- l + 4UjJ -l + Uj- l J - 1 ] + (h 4) h = � = dy.

7.14

u.

Fig. 7.50

iPu/ax2 + a2u /ay 2

= 0

T(x, y) =

., L EnT,.(x, y),

n= l

•-"'-j"'"""it--. (5,5,5) Ax

=

t;y = ,u =

10 tt

"./

z

(1 ,1 ,1 )

....�...��-4II--......

Fig. 7.48-Nodes used to describe reservoir in Exercise 7.12. SOLUTION O F LINEAR DIFFERENCE EQUATIONS

Fig. 7.49-Three-dimensional reservoir of Exercise 7.1 3. 173


y u =o

( 1 .2)

(1 . 2) u =o u=o

(2.1 ) Fig. 7.51 -Semi-infinite domain described in Exercise 7.20

u =o

ofturNottehseFiaesrneetmidhmaiatt-hi,eninfinsttanpoleiinady-teedarreasscgitoaooritnendidttheicnatmaattpeieesd.srs,ahtthadeduereanaloveinyrtiacaseltsofoludiitfisotchnreeitsteempoipenrats­ T(r, (J) -n60 tan [(r2 (r2 l)cos(Jsin-(J ] where Tix, y) sin(11Jly)[sinh(n.nx) -tanh(11Jl) cosh(11Jlx)] Use equal A(J6Osptaacni-nlg[a(rn2d(rvar2 l)c-iabll)soes(JArin (Jspac]ing by increasing Ar as youprocmoveedure,adewateyrmfrionme tthhee number physicalofboundar ies. Bywoula dtrineal-eadnid-nethreorr nodes you and - tanh� ) f 100sin(11Jly)dy. diwhirelcetiyouon tenso pluarceethaathypotthe apprhetoicxialmboundar yioant ias wicetrhtaiinn r distofance,the at e s o l u t gorithm to solve finite-dif­ .e the Gashapedus -SreiedgielonalABDE the 0,diObtmensai1ni,oytnshe 0,ofsteyuniady-t1y,staalantidegnedtzem0pewiarrtahetukex,repy,dit aastntrO°dibzCuta,ixwhioesn .ilnTheeathceusbeusurfrwifaaccethes exacferentAncseoequatliuntfiionn.iitoeUsnswedge11. Solis keveptthaet pr10o0°blCem. using the conventional seven-point, finite­ n/T\4. Thehas otoneherofsiidtes,sBDE,ides (AhasB)pamairt BDntai(noedfuniattalecngtonshta) ntinstuelmatpeeofdrawhianglturleee, dithfe esroelnuctieoapprn ofolixinematequation aionnsd thuseeLSORthe PSORalgoriathlgm,oriwithtmh with1 .0. In tFihendretmaihe tenminpeg parratut,rDE,e disitsrimaibutinotnaioverned aatsaeconst ofditasntcretetempoipernattsu. rIen,po­T2. (Let Lli=Ay=Az =0.orit1h.m) for plane successive overrelaxation. Test lar coordinates, the analytical solution is Devel o p a n al g the prowibltehm with1 .0. In1t.h0e. Isnotlhuetiosnolofu­ tlyouriinoen equatofalgploraiineothnsmequatofbyLSORrieosnsolvususineegLSOR PSOR wi t h 3Also. ,Compa r e your r e s u l t s wi t h t h e e x aacgtesroelquuitiorenmprenotvis,daendd num­here. sin 1[ r4 cos (J c o mpa r e t h e c o mput a t i o n t i m e, s t o r ber of iterations. Tabulate your rsesnu�lts. The analytical solution is T(x, y, z) 400 i i SIn sin(11x1Jl ) sin(11JlY), and f f sin(11x1Jl ) sin(11Jly)dxdy. where niantde c1Obtyftli,naderrienspthofece tslietvengtelady-yh. The1st0a0tefcyltt,ewiminpedethrraouttiusrskeeiddipetsandtartibO°utinCisoidnoneinrtaahdeholi sofulrofw1a0cfiefts­ acrotorNotem1dftpeien,atrtrahetatusrliteOshofgieft,3D.v1aen0n0°dassztCeady-. 0 fts,tawhite heatle theflsouwrfaequatce z ion10i0n fctyilsinkedrpitcaatl aT O. ionsth.optToismolumve fiacnciteel­­ dieUsrfaeteiequalorennpacerArequatamaetnediro.A(JnsChec, usspkeacttihhneegscPSORoinvern randgalencg(JorediitrhraemtcetwiofPSOR against hat of Gaus -Seidel. (0 .0)

Fig. 7.51

x

(2.0)

u=1

7.20

_

Fig. 7.50-Nodes used to describe the space domain of Exer­ cise 7.1 4.

_

= En

_

n

I

+

- I)

2r

+ 2r .

+

I

En =

nn

o

± 5%

7.18

x= z

=

x=

=

=

=

(Fig. 7.52)

7.21

w=

2.

W= WOpl '

WOpl '

W=

x

=

.m = l n = 1

dmn

.

i

- Yz( + 2r2

+ I)

2

y,

a mnz a mn

I I

(

a mn = n m 2

+ n 2)

y,

A

dmn =

o

0

7.19

=

=

o2T I + r or or2

=

+ o2T + ;:2I oo2T (J 2 OZ 2

=

o

=

INS ULATED

1

Fig. 7.52-Wedge-shaped region described in Exercise 7.21 .

1 74

BASIC APPLIED RESERVOIR SIMULATION


Constant Pressure

-$;

+

2

-$; � -$s

-$s

-$a

y =

1

+7

-$;

0

-$;8 '

,�

�1 �

� 0 u:

L,

-0 . 4 psi/ft

=

0 . 2 psi/ft

2

0 z

u: o z

N o Flow

-$;7 -$;8 -$;9 -$;0 -$;3 +'4 �5 �6 4g -$;0 �1 �2

Lx

-$; I +4 +5 +6 +7 +8 + +2 No Flow

No Flow

1

No Flow

____ No-Flow Boundary @! Constant-Pressure-Gradient Specification I[l t!1!l l!!lu!l!I ! 1 I 6 ••1I Fig. 7.54-Two-dimensional reservoir of Exercise 7.24.

Compare the accuracy of the numerical solution with the exact solu­ tion. Hint: the 2D, steady-state, heat flow equation in radial coordi­ nates is 1 a

r ar

( ) + ;=2

1 a 2T = o. aIJ2

aT ar

r

U se �qual Ar and AIJ spacings in the r and e directions, respectively. By tnal and error, find out the number of nodes you need to approxi­ mate the exact solution within ± 1 % . Use the PSOR algorithm with Wopt . Repeat with the Gauss-Seidel algorithm.

7.22 Show that the SIP coefficients defined by Eqs. 7 . 1 93 through 7 . 1 99 remove the effects ofthe nonstandard terms in Eq. 7 . 1 65 when the assumptions stated in Eqs. 7. 1 87 through 7 . 1 92 are valid and w (k) = 1 . 7.23 Consider Fig. 7.53, which represents a portion of a larger grid system with the two prescribed boundary conditions. Furthennore, consider that Ax = 800 ft, Ay = 200 ft, h 1 00 ft, and kx = ky = 36 md. Assume that you are dealing with an incompressible liquid so that B = 1 RB/STB and It = 1 cpo The final fonn of the finite-difference equation for Meshpoint 4 is =

Ap4

+

Bps

+

CP 7 = D.

Detennine the coefficients A , B, and C, and the right-side entry, D, for this system.

7.24 Consider the 2D, body-centered grid with the boundary condi­ tions shown in Fig. 7.54. Show all reflection nodes and the respec­ tive equations you need to write to solve this problem. 7.25 Construct the coefficient matrix, the unknown vector, and the right-side vector for the 2D, homogeneous, isotropic reser-

Fig. 7.55-Two-dimensional reservoir of Exercise 7.25.

voir in Fig. 7.55. (Assume that you are solving for all unknowns simultaneously. )

7.26 Consider the slightly compressible fluid flow through the 2D porous medium as shown in Fig. 7.56. The porous medium has ho­ mogeneous and isotropic property distribution, and all the external boundaries are no-flow boundaries. The well is produced at a constant flow rate of qsc STBID. Use the implicit finite-difference approximation and the LSOR procedure to solve for pressure distribution. While sweeping the system parallel to the x direction, use Thomas' algorithm to solve the line equations. 1 . Construct the coefficient matrix for Line j = 1 equations in the (k + 1 ) LSOR iteration level. 2. In completing one LSOR iteration over the entire reservoir, how many times does one need to call Thomas' algorithm? 3. Can the answer to Part 2 be six? Why? Justify your answer ex­ plicitly by constructing a coefficient matrix. 4. Write the algorithm equation you would use to solve the line equations by use of Jacobi's procedure but not Thomas' algorithm. 7.27 The coefficient matrix in Fig. 7.57A was constructed to solve for the pressure distribution for the single-phase fluid-flow problem in the system in Fig. 7.57B. Solve for the pressure values and place them into the grid. However, the numbering scheme used for this reservoir is not given. This should not cause a problem; it requires only 1 5 minutes of extra work. Determine the numbering of the grid­ blocks that generates the given coefficient matrix.

Nomenclature

ai.i =

�ij = aii

=

aij.k = ann =

=

-0 . 1

psi/ft

7

8

9

4

5

6

1

2

3

p

=

i - I unknown in the equation of the ith gridblock in Thomas' algorithm diagonal entries in a square matrix diagonal entry in a square matrix (i. j) element of [A] element that corresponds to Gridblock (i. j, k) in the uppermost diagonal of lU' ] in SIP iteration last diagonal entry in a square matrix

ai = coefficient of the

y

L,

-$-

1,000 psia

Fig. 7.53-Portion of reservoir of Exercise 7.23 SOLUTION OF LINEAR DIFFERENCE EQUATIONS

Fig. 7.56-Two-dimensional reservoir of Exercise 7.26.

175


II

Permeability Barrier

Fig. 7.57B-Reservoir described in Exercise 7.27. Fig. 7.57A-Coefficient matrix in Exercise 7.27

Q" = Ai,j,k =

scaF(lax)r vaatrtihabelkte htoitmierantiimonizofe ththeefunction vetraccnotsonjmruidegats fibieni-elgidtryaindicoeFieffintg.mecietnthodof 1 in the ma[stdtrm3ix not/(d a' kPa)tion, ]L4t/m, STB/(D-psi) croL2s ,-fste2c[tmio2nal] area normal to direction, croL2,s -ftse2c[tmio2nal] area normal to direction, croL2s ,-fste2c[tmio2nal] area normal to direction, veveccttoorr defidefinneedd iinn FiFigg.. capproieffintoocxiiemntatmaiontrtiox, butin aeasmaiterrixthequatan, ionto factor tcroaeffinspcosieentofof the i unknown in the equation of eletthhmentee liothwertgrhaimtdcblosoortcdieksapingonalondsThomatofo Grs' iadlblginorocSIikthPm(ii.teratioinn halcoeffif bacniedwint ofdththofe dia rmaecttiroixn vector of the conjuigatterea-tgiornsadient method betwe n the and tvecranotntsomartidefiison,ibniedli4tty/imnco,FieffiSTB/g. cie(Dnt-ofpsi) [std-m31 in/(dma' kPa)trix ] forremseartivooinrvolvoluumeme/favcoltourme(FVF)at stofandaa lridquid, FVFrceosndiefrovrtoiiaornslitqe,muiL3ped/phasLra3turee,atL3re/Lfe3,reRB/nceSprTBes [umre3/astnddm3] veveccttoorr defidefinneedd iinn FiFigg.. ccooefmprficeiesntibofilittyh,eLti 2/m,unknown psi -1 [kPain -1the] equation coof[mprkPathee-1siti]hbigrlitiydblofoackliqinuiThomas d phase', Ltalg2or/mi,thpsmi -1 7.38

Pi,j,k + x

Ay =

y z

A = A' = [A] = [A'] =

[A] T=

bi =

7.36

7.39

[A]

[L '][V'] [A]

j. k)

[L ']

p

k+ I

b' = Bi,j,k = B, =

8' =

B= = Ci = c

ct =

1 76

7.37

L

7.36

7.39

+I

Pi,j,k

[L']

elemaimentn dithaatgonalcor ofespondsintoSIGrP iidteblraotciokn(i. in ctvereancnttseomrr idefis ibnielidtyincoeffiFig. cient of in matrix vevenotccttooarrtdefideion,finnLeed4dt/iimnn ,FiFiSTB/gg.. (D-psi) [std m3/(d ' kPa)] rigThomas ht side of' alequatgorithiom,n fiothr Greleimdblenotcofk id tfhueelncntimtihoinnelatdeeimentofinnestdeofpindaExerftercitshee nth Gaussian thele ktimhineatleimoennstteofp dafter the ith Gaussian maxiitermatumion deviand athtieon of unknowns between the i t e r a t i o n d dirigahtgonal-sidemavectrtioxr in a matrix equation eleuppementr cthoaditacgoonar eslpofonds toinGrSIidPbliotecrkat(iio. n in veeascttor defined in Fig. tranotnsmatiison,ibiLli4tty/mco, efSTB/ficie(Dnt-pofsi) [std m3in/(dma' kPatrix)] fveuncctotirodefin definednediniFin gExe. rcise veveccttoorr defidefinneded iinn FiFigg.. ntaitnhhielnelteeementmentrmedofiofategdefivectonredatbykthEq.iteration in veJacccootonbijru'defisgatiteenr-edagtrioaidinn eFimantgt.rmeix tdefihodned by Eq. sudeccesfinseidvebyoverEq.relaxation iteration matrix tinhtiecrkmnesedis,aL,te vectft [mo]r at kth iteration in ccotonjrudefigaten-edgraindieFintg.method ve i dummy vector deinfidex,ned Rowin Figi., Gridblock i

<j.k =

k

C' =

7.37

C= Ci,j,k =

Pi,j,k

C= C' =

7.36

dmn =

7.18

dn (n ) =

_

dk (i) =

tJ{ k) =

k

k+ I

=

[D) =

[V']

e:j,k =

e' = E= Ei,j,k =

(} = [G1J = [GIs-OR =

h( k) =

h=

H' =

r= =

j. k)

7.38

Pi + I,j,k

E,, = E=

gi = gn = g ( k) =

.p

7.39

di =

E' = F' =

j. k)

7.17

7 .36 7.39

g

7.39

7.84

7.39

7 . 1 30

7 . 1 32

7.39 7.39

BASIC APPLIED RESERVOIR SIMULATION


dummy iinntteeggerer defideinfidex,nneeddColbyby uEq.Eq.mnj7.7.889b9a vecmtoeabir defliitnye,dL2,in daFigrc. y Lum2] per k peperrmmeeabiabilliittyy iinn tthhee didirreeccttiioon,n, L2L2,, dadarrccyy Lum2Lum2]] pervecmtoear debifilitnyedininthFie g.direction, L2, darcy [um2] i(tih,kdi) elagonalementelofement[L] inofCr[Lout] inreCrducouttiorneduction lloowerwerfactottrrriiizaaingulngulng aarr mamainttrrSIiixxPreitseurlatitniognfrom numbea martrofix equatequatiioonns or number of unknowns in numbeADIPr ofanditeSIraPtioitnerpaatiroansmeters used per cycle in rr ofof grgriiddblbloocckkss iinn didirreeccttiioonn numbe numbe numbe eleuppementrr ofdithaagrgonalt cidoblr oeofscpkondss in itnodiSIrGrePcitdiitoblenroactkio(ni. k) in venorctthor defined in Fig. 7.38 tranotnsmatiison,ibiLli4ttJymco, effiSTB/cie(Dnt-pofsi) [std m3in/(dma' kPatrix)] vecvecttoorr defidefinneded iinn FiFigg.. mlLt2, psia [tkhPa]rough through prprspeeecss iuufirreeed,unknowns 2 ry, mlLt2 sprpeecs iufireedofprprGreess iuudrrbleeovalactkeuaie,,stmlmlLtbounda exacpres tuvareluofe Grofidblock (iJ), LmlLtt2, ps2,iaps[ikaPa[kjPa] ssppececiififieedd prpreess uurree avat lnorue,thmlLtbounda2 ry boundarryy, ,mlmlLtLt22 sdasppecectumiififieecddorprpreeecssteuudrreepraaettswesuorutesthofbounda tinteorpmosmeditatpee rvecfortaotrioan,t ktmlhLitte2r,apstioianat[ikndePapt]h of prprcoeocducnojndiutgatiotinoenir-agntregadiofmatePhasntrimexethaodt standard conditions, floL3(ww/elrt,altSTBIiesofloclDiaqt[euisdtddinPham3Gr/sdied] blaotcsktandarL3d/t,conditions STBI[welDl [isstldom3cat/edd] in Gridblock (iJ,k)] prSTBIoductDion[strdatm3e a/tds]tandard conditions, L3/t, rriigghtht-ssiiddee defientrnyedfobyr GrEq.idblock i knownGridblriogchtk side ofk) tinhethfleomaw etrqiuax nottionatfioorn, Oft, srepsSTBIacidiualngDivecn[sttddiom3rrec/tdio] n, [m] elelomentwer dithaagonalt cor eofspondsitnoSIGrPiditbleroactikon(iJ,k) in vesoutctohr defined in Fig. tranotnsmatiison,ibiLli4ttJymco, effiSTB/cie(ntD-ofpsi) [std m3in /ma(d t.rkPaix )] veveccttoorr defidefinneded iinn FiFigg.. ttiemmespetreapture, T, °C t, days j= jmax = jmin = 7' =

Tn = u= uII.. = uij = ukj = Unn = [U] =

7.39

k=

x y z

x= ky = t, = K' = Iii = l;k = [L] = [L'] =

[U'J =

739

f

w J,k

[A']

n=

Vb = Wi =

w' = W= W; =

fIk =

x y z

nx =

11y = 1Iz =

n ;j. k =

PI

W= W' = x=

j.

[U']

fi' = N= N;,},k =

"fj,k =

Xexact = Xi = Xn = Ax = x= y=

Pi,} + l, k

N= N' = p= P3 = PB = PE = Pi = Pi ,exact = Pi,} = PN = Psp = Ps =

7.36 7.39

I

3

�y = y= z=

Pi

p jj,k = pw =

�z = Z= Z;,j,k =

ac =

Pi,j,k

mn = f3c =

jj( k) =

[P] =

q/sc =

1

qlsc j =

1

a

n= Yljj,k =

i),

e= () =

q lsc jj = %c qsc

M= Ax = .l.y = Az = Jl = Jl/ =

=

7 .47

Q= Q; = Qi,},k =

�r =

r=

S ;j,k =

?= S= Si,}, k = s= S' = �t = T=

(i, j,

r

(!GS =

(!J =

ft

[L']

Tb;

7.37

Pi,}- I,k

7.36 7.39

( � t = tn + I - t n),

SOLUTION OF LINEAR DIFFERENCE EQUATIONS

(!SOR = j ± V,j,k

=

= )'jj ± V,.k

Tl

T

izjj,k ± V,

-

1> =

function devarfiniaebld ein Exercise unknown ttihhtheedi((kiaJj)gonal) eelleemmentelenetmentofof ofiinnCrCrionoututCrrroeeutdducucrettidiooucnntion tuppehe r triangulelementar maoftrix reinsuCrltinogutfrreoducm tion uppeffaaccrttootrrriiizaziinnngulgg ar matin rSIixPreitseurlatitniognfrom elgreleeidmentmentblocktdefihvolatncuedomer bye,spL3Eq.onds, ft3t[omGr3] idblock (iJ,k) in veweslcottweror deficodinedagonalin Figof. in SIP iteration tranotnsmatiison,ibiLli4ttJymcoeffi, STB/cie(Dnt-pofsi) [stdim3n mat/(dr'ikPax )] tranotnsmatiison,ibiLli4ttyJmco, eSTB/fficie(Dnt-pofsi) [std m3in/(mad ' kPatrix)] veveccttoorr dedefifinneded byin FiFigg.. disctoaorncdeininattehseystdiem,recL,tiofnt i[nmCar] tesian entry or an unknown exacith eltesmentolutioofn funknown r o t c ve ven, cL,torft [m] lasotceknstrizyeofinunknown o i t c e r di blunknown disstyasnctem,e invecL, fdittor[rmec]tion in Cartesian coordinate iblmosmediucbsk stiiatzuteetiiosnonludefiditiorenncedvectiobyn,toL,rEq.of f[omrw] ard disstyasnctem,e inL, dir[emc]tion in Cartesian coordinate bleleovatck isoiznereinfer diedretcotidaon,tuftm[(mpos] itive i.j.k), L,icaflt [m] vatumeionconverofdcent), L,sioeftrnof[fmacGr]toirdwhosblocke(numer elvoledownwar ftruavalncnstmuioeinsisdeibgifiilvinteneydciionnnverTablExerseiocinsefa7.ct1o8r whose aavviittyy ofoficaPhaPhal valsseeueiimlns giGrLv2itend2bl, psionciklTaft(biJle,k), mlL2t2, grgrnumer tvaolpsreiraia/bfnclte[ekinPa()/mdi]rection in cylindrical coordinate sfpusacncysittnieogm,nidefnradidined[rreacd]bytioEq.n, rad ffuuncncttiioonn defidefinneedd byby Eq.Eq. vivissccososiittyy,ofmILtPhas, cpe [Pa' s] [Pa' s] ssspppeeeccctttrrraaalll rrraaadididiuuusss ofofof JGaSORacuosbiit-eSitreeairtdaioeltinointmaemaratrtitioxrinxmatrix PhasbeteweentransGrmidisbliobcilkit(yiJa,lko)ngantdhe direction PhasbetGriewdbleentoracnskGrmidisbliobcjilk,itk)(yija,lko)ngantdhe direction PhabetGrseiwdbleentroacnkGrsm(ii,disbliobciklitk)(yija,lko)ngantdhe direction porGrosiditbly,ofcrkac(tii.oj,n k 7.17

[U]

[U]

[U] [U]

(n,n)

[A]

[A1

7.83

[L']

7.37

Pi - I

Pi - l,j,k

7.36 7.39

x

x

x

x

y

y

z

ft

7.65

ft

z

4. 1

4. 1 [kPa/m]

I, 1

e

7.153 7. 1 54 7. 155

I,

mILt, cp

x

1

1

1

(i ± I.

y

j± I,

z

± I)

177


potential of Phase I, mlLt2 , psia [kPa] = kth iteration parameter in ADIP and SIP iterations W = overrelaxation parameter W max = maximum iteration parameter of an iterative procedure W min = minimum iteration parameter of an iterative procedure WOpl = optimum overrelaxation parameter

<1>/

aP)

Subscripts

=

1 = phase 0 = oil phase p = premultiplied by a preconditioning matrix [P] w water phase =

Superscripts (i) = Ith step in Gaussian elimination

(j) = iterations levels before the kth iteration old iteration old timestep n th step in Gaussian elimination current (or new) time step current iteration T= transpose of o reference * = intermediate value before acceleration in SOR or ADIP method

(k) = n= (n) = n+ I = (k + I) =

=

References 1. Odeh, A . S . : "An Overview of Mathematical Modeling of the Behavior of Hydrocarbon Reservoirs," SIAM Review (July 1 982) 263. 2. Rose, DJ. and Willoughby, R.A.: Sparse Matrices and Their Applica­ tions, Plenum Press, New York City ( 1 972).

3 . Abou-Kassem, 1.H. and Ertekin, T. : "An Efficient Algorithm for Re­ moval of Inactive B locks in Reservoir Simulation," 1. Cdn. Pet. Tech.

(February 1 992) 25.

7. Dupont, T., Kendal, R.P., and Rachford, H . H . Jr.: "An Approximate Factorization Procedure for Solving Self-Adjoint Elliptic Difference Equations," SIAM 1. Numerical Analysis ( 1 968) 5, 559.

8 . Stone, H.L.: "Iterative Solution of Implicit Approximations of Multidi­

mensional Partial Differential Equations," SIAM 1. Numerical Analysis ( 1 968) 5, 530.

9. Weinstein, H.G., Stone, H.L., and Kwan, T.V. : "Iterative Procedure for Solution of Parabolic and Elliptic Equations in Three Dimensions," Ind. Eng. Chem. Fund. ( 1 969) 8, 28 1 .

10. Hestenes, M.R. and Stiefel, E.: "Method of Conjugate Gradients for Solv­ ing Linear Systems," 1. Res. Natl. Bureau Standards ( 1 952) 49, 409.

1 1 . Axelsson, 0.: Iterative Solution Methods, Cambridge U. Press, Cam­ bridge, U.K. ( 1 996) 449-503.

1 2 . Kelley, C.T. : Iterative Methods for Linear and Nonlinear Equations, Frontiers in Mathematics Series, SIAM, Philadelphia, Pennsylvania ( 1 995) 1 1-3 1 . 1 3 . Lanczos, C . : "Solutions of Systems of Linear Equations b y Minimized Iterations," 1. Res. Natl. Bureau Standards (July 1 952) 49, No. I, 3 3 .

1 4 . Barrett, R . e t al. : Templates for the Solution ofLinear Systems: Building Blocksfor Iterative Methods, SIAM, Philadelphia, Pennsylvania ( 1 994).

1 5 . Press, W.H. et al. : Numerical Recipes: The A rt ofScientific Computing, Cambridge U. Press, Cambridge, U.K. ( 1 986) 70-7 3 . 1 6. Vinsome, P. K.W.: "Orthomin, a n Iterative Method for Solving Sparse Banded Sets of Simultaneous Linear Equations," paper SPE 5729 pre­ sented at the 1 976 SPE Symposium on Numerical Simulation of Reser­ voir Performance, Los Angeles, 1 9-20 February.

1 7 . Saad, Y. and Schultz, M.H.: "GMRES: A Generalized Minimum Resid­ ual Method for Solving Nonsymmetric Linear Systems," SIAM 1. Sci.

Stat. Compo (July 1 986) 7, No. 3 , 856.

1 8. Eisenstat, S.c., Elman, H.C., and Schultz, M.H.: "Variational Iterative Methods for Nonsymmetric Systems of Linear Equations," SIAM 1. Nu­

merical Analysis (April 1 983) 20, No. 2, 345.

1 9. Jae, K.C. and Young, D.M.: "Generalized Conjugate Gradient Accel­

eration of Nonsymmetric Iterative Methods," Linear Algebra & Its Ap­

plications (December 1 980) 34, 1 59.

20. Simon, H.D.: "Incomplete LU Preconditioners for Conjugate-Gradient­ Type Iterative Methods," paper SPE 1 3533 presented at the 1 985 SPE Symposium on Reservoir Simulation, Dallas, 1 0- 1 3 February. 2 1 . Behie, A . : "Comparison of Nested Factorization, Constrained Pressure

4. Price, H . S . and Coats, K.H.: "Direct Methods in Reservoir Simulation," Trans., AIME ( 1 974) 257, 295.

Residual, and Incomplete Factorization Preconditionings," paper SPE

Developments in Petroleum Science, Elsevier Scientific Publishing

22. Towler, B .F. and Killough, J .E.: "Comparison of Preconditioners for the

5 . Peaceman, D.W. : Fundamentals of Numerical Reservoir Simulation. Co., New York City ( 1 977) 6.

6. Aziz, K. and Settari, A . : Petroleum Reservoir Simulation, Applied Sciences Publishers Ltd., London ( 1 979).

178

1 5 3 5 1 presented at the 1 985 SPE Symposium on Reservoir Simulation, Dallas, 1 0- 1 3 February. Conjugate Gradient Method in Reservoir Simulation," paper SPE 1 0490 presented at the 1 982 SPE Symposium on Reservoir Simulation, New Orleans, 1 0- 1 3 February.

BASIC APPLIED RESERVOIR SIMULATION


Chapter 8

N u m e ri ca l So l uti o n of S i n g l e-Ph ase-Flow Eq u ations 8. 1 Introd uction In Chap.

4,

Eq.

we developed the partial-differential equation (PDE)

5,

4.20).

pressed as

In its most general form, this flow equation is ex­

governing single-phase flow in an anisotropic and heterogeneous

porous medium. In Chap.

the corresponding finite-difference

approximations to the PDE were developed. This chapter studies the

numerical solution of the single-phase-flow equations for incom­ pressible, slightly compressible, and compressible fluids.

Although the algebraic forms of the finite-difference approxima­

tion to the flow equations for incompressible, slightly compressible,

and compressible fluids are similar, the solution methods required to

achieve a numerical solution differ. This is because the accumulation

term and transmissibility terms differ in the magnitude of response caused by changes in pressure. For incompressible-flow problems,

the accumulation term is removed from the flow equations and steady-state conditions prevail. In contrast, for slightly-compressible­

and compressible-flow problems, the accumulation of fluid changes

where I

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . (8. 1 )

or g.

Eg . 8. 1 can be simplified to describe single-phase, incompressible­ = 0 , w,

fluid flow in a heterogeneous and anisotropic formation by use of

with pressure and unsteady-state conditions prevail.

the following observations.

tions are defined in Sec.

plies that,ul and BI are constants (Bf

5.3 5.48 5.49).

The transmissibility terms,

TLxi ± v, in

(Eqs.

the finite-difference equa­

and

Two difficulties

arise in the calculation of the transmissibility terms in the flow equa­

tions. The first difficulty is that the transmissibilities are evaluated at the boundaries of the grid cells, while the rock properties, kH and and the pressure-dependent fluid properties, ,ul and BI , are known only at the cell centers. This is also true for multiphase-flow prob­ lems where the relative permeabilities are required at the gridblock

h,

boundaries but the saturations and, consequently, the relative per­ meabilities are known only in the interior of the cell.

The second difficulty with the evaluation of the transmissibility

terms for the finite-difference equations is the dependence of the

The density of an incompressible fluid is constant, which im­ =

1

for isothermal conditions).

The porous medium is incompressible, which implies that ifJ is constant. These assumptions indicate that the right side of Eq. 8 . 1 contains only constant terms; therefore, (iJ / iJt)(ifJ /B/) = O. Setting the par­ tial derivative with respect to time equal to zero implies that steady­ •

state conditions exist. Consequently, for incompressible-flow prob­

lems, the pressure distribution will be constant with time. Although

a few further simplifications on the left side of Eg.

8.1

are possible,

these simplifications will not be implemented at this stage. The re­ sulting equation is

transmissibilities on pressure for single-phase-flow problems (and

on pressure and saturation for multiphase-flow problems). The de­

pendence of the transmissibilities on the unknowns results in a sys­

7

tem of nonlinear algebraic equations. The equation solvers dis­ cussed in Chap.

are appropriate only for linear equations ;

therefore, the nonlinear equations must b e linearized before they

can be solved. Fig. 8.1 shows the linearization step in the reservoir­ simulation process.

8.2 Single-Phase Incom pressible-Flow Problem

[R

iJ Azkz iJP + iJz P c E iJz ,u / /

( -

az)]

Yl iJz

A z + q /sc

=

O.

.. ... (8.2)

For a horizontal reservoir with negligible fluid gravity, this equation

can be written as

The single-phase-flow equation is derived by use of a mass-balance equation combined with an equation of state and Darcy's law (see

NUMERICAL SOLUTION OF SINGLE-PHASE-FLOW EQUATIONS

1 79


PRESSURE. SATURATION DISTRIBUnONS. AND WELL RATES

LINEAR ALGEBRAIC EQUAnONS

NONLINEAR ALGEBRAIC EQUATIONS

NONLINEAR PARnAL· DIFFERENnAL EQUAnON

NU MERICAL RESERVOIR· SIMULAnON PROCESS

LINEARIZATION

Fig. 8.1 -The linearization step in reservoir simulation (redrawn from Ref. 1 ).

}

I- . I

8.2.2 Calculation of Transmissibilities for the Incompressible­ Flow Equation. 8.2

I+ . I

tahneotxhander. SiymdiirleacrltyAsio, nsotFihcgear.nprvaorspeyhowsrastieones, tashesmovesigrgnedidblftoorcotkmhdieonegrmensidgrbliioodnscblkosaclmakongtoy diistfinegr,idependi nmay thahevseysdintgefmone.reFortnhtefdeeoxrgamrmeapltioofen, thetthheiecfirkvonesegeneigrseidst,blypeoandcrkmsaniesahbownsiolittrioeipysn, Fiaenxgd·. porthe oy·sidtiieresc. tIinonadperditimon,eabithelitx-y.dTheirectitorannspemrims eiabbiliiltiytytmayermsdiafreercafrlcoum· laarteedknownat the onlgridyblatocthkeboundar iteesr,sbut. Egsth.e8.ro5ctkhandroughfluid prshoowperttihees c e l c e n t e c h ni q ues avai l a bl e t o es t i m at e pr o per t y a v e r a g e s bet w een t w o a d ­ j a c e nt gr i d bl o c k s . L . . ............. ( . ) aza (a #A,zkzB, aazp ) �z ..... (.) Table 4. 1 gives the units of the variables in Eqs. and sapprolutoioxinmpratoiocn.esBecis atuoseAsrethpldieascacepusprEq.soexidminaChap.tiowintofh ietasthcefihnfiparirtset·tidsatielfpdeeirnreinvthcaee· tweiveciannEq.write thiseafinnailtoegous-dif etoretnhcaet giapprvenoxionmthateiolenfttosiEq.de ofEq.as ( #A,kxB �x ) P; + Ij.k - Pij.k where These averages are equal when " i + 'i2j.k tfeorrTheminscompr . tO/rans#e,mBs i,si)brilebep-ilfriletuiseiedsnt·flisnotwhEq.eprfolublidehavemspro;perthterwtieoefsoditrhesatt,itnhsctetaquesygrconsoupstiontaofofnt aver a gi n g i s appl i c a bl e onl y t o (Axkxl�x), which represents gr i d r e l a t e d pr o per t i e s . ) ( #A"k" " B y ij + 'i,.k Pij + I ,k - Pij,k tjhaceWheeharnt mgrn oniiadvecceraalvgsei.rnaFolgge(Aliosxkxwiusnelgd�x)bectheabetdeuswfie neenseitriioantlwfofloowahardocjamccueonirnts betcgraiwvdeeenblraogcaikndsg­, gi v en by Eq. (wsAxk. .,/�X)i + 'i2j can be calculated for a block·cen­ ( #A\. k�y ) Pij.k - Pij -I .k t e r e d gr i d as f o l o ,,Y 1 .1 +1 •

4XI_1 , 1

I. I+

I . I-

1-1 . 1

!

<1x,

i

1.1

<1Y \ I<'

<1Y\I.�

·1

6.

<1YI, ..

4�

<11 \ 1"

;-

i

AXI+1 ,!

1.1-1

Y

..

8.2

-

1 +1 . 1

.1

8.8

x

Arithmetic Averaging.

x

Fig. 8.2-Labeling of grid blocks in x-y plane.

=

a..:.. _ 1

+ a..:,2 + a-,:3::-+

__

+ an

_ _ _

__

n

_ _

.

85

Weighted Averaging.

+

+ q ,sc

Pc

= 0,

. . . . . . . . . . . . . (8.3) 8. 1 , 8.2,

8.3.

8.2.1 Finite-Difference Approximation of the Incompressible­

5,

Fluid-Flow Equation.

8.3

8.3

Pc

Geometric Averaging.

5 .46,

Pc

-

Pc B

. . . . . . . . . . . . (8.8)

)

(

)

(

)

ij -'i2.k

;= 1

Harmonic Averaging.

. . . an ·

+

86

. . . . . . . . . . . . . . . . . . . . . . . . (8.7)

8.3

(

..

H

;;i

G

;;i

A.

a I = a2 = a3 =

8.4

8.8,

It fol ows from Eq. that 8.8

.............. (8.9a) =

. Theand cdioeffrecitciioensnt)sarL8ecth(Aextrk,an/#sm,Bis,�x)]i±'i dandJ.bsimanidlaarrley rienquithreedy 2,,j,TIx;±V' i b i l i t i e s asut bsthecrgripitds)bl. ock boundarshowsiesth(aesgrinididblcaotcekddibymtenshe ions and gridkblock labeling in the x·y plane. O.

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (8.4)

z

Fig. 8.2

2D

1 80

i ± V2, j ± V2,

± V2

.................... (8.9b) BASIC APPLIED RESERVOIR SIMULATION


. . . . . . . . . . . . . . . . . (8. 1 5)

...� q

q

The factor Y2 in Eqs .

8 . 1 3 and 8. 14,

which multiplies �X I and �X2

'

arises because, for block-centered grid systems , flow from adjacent gridblocks occurs from cell center to cell center. (For point·distrib­ uted grid systems, this development will be slightly different. See Example 9. 1 5 for these grid systems.) Solving for the pressure drops and substituting into Eq.

q ll.l l �P = Pc

Fig. a.3-Use of the harmonic average between two adjacent grldblocks.

Solving for

H=

( ) �X

A x kx

avg

8. 1 2 =

results in

q l(�xI /2)/-t 1

+

Pc A x\ kx\

q l(�x2 /2)/-t1 Pc A xix2

(8. 1 6)

H,

(A��x)

IJ

J

AXij kXj,j �X ± l ' + A Xi± lj kX l �x · i± j

i ± V,J

t

. . . . . . . . . . . . . . . . . . . . . (8.9c) Finally, the entire transmissibility term ff3 c(A x kx l/-t I B /�X)] i ± V',j can

be written as

which is the definition of the harmonic average .

8.2.3 Implementation of Matrix Notation for the Incompress­ ible-Flow Equation. If we denote the transmissibilities in Eq. as

Tlxi+ v,j,k ' Tlxi- V,j,b Tll'ij+ V,,k, Tll'ij- Y,.x, TIZij,k+ \o\,

and

T1zij.x- y"

8 .4 the

equation can be written as

x

_1_ .

/-t I B I

. . . . . . . . . . . . . . . . . . . . . (8. 1 0)

It should be emphasized that the term

(I l/-t I B I ) is excluded from the

averaging process because it is constant under the assumption of in­

compressible flow. For the slightly-compressible- and compress­ ible-flow cases, it must be included in the averaging process. Simi­

+ q lsc ij,k = O.

larly, transmissibility terms in the y direction can be written as

(

Pc

A )' kY

" I B /�Y r-

)

ij ± Yl

= Pc x

. .

2 A l''J Al'"'J ± \ ky ij k).ij±

\ A ).iJ kYij �y . ' ± l + A Yij± 1 kY ij± l �y . .

_1_.

/-t I B I

IJ

IJ

Eq.

8. 1 8

.

. . . . . . . . . . . . . . . . . . . . . . . . . . . . (8. 1 8)

can be rearranged as

. . . . . . . . . . . . . . . . . . . . . . (8. 1 1 )

The choice of harmonic average for serial flow is obtained through Darcy's law as shown in Example

8. 1 .

Example 8. 1. Obtain the expression for transmissibility for linear

meabilities shown in Fig. 8.3. Note that pressures PI and

P2

+ TI ij + Vz.k + T IZiJ,k + V2 Y

) PIJ" .k

flow between two adjacent gridblocks with the dimensions and per­ sured at the gridblock centers.

are mea­

(8. 1 9)

Solution. Because we are dealing with steady-state incompress­ ible flow, neither fluid depletion nor accumulation occurs within the

2 I . The linear

gridblocks. Therefore, the amount of fluid entering Gridblock must be equal to the amount of fluid leaving Gridblock form of Darcy's law is

With the matrix notation discussed in Sec.

7.2, Eq. 8 . 1 9 can be writ·

ten as

q l = P cCA x kx �pI/-t I L). This expression can­

not be used easily in this problem because the values of Ax and kx

change along the flow direction. The value of pressure at the inter­ face of these two gridblocks is

PI

+ ,/, .

(8.20)

. . . (8. 1 2) where

Now, we can write

. . . . . . . . . . . . . . . . . . (8. 1 3)

. . . . . . . . . . . . . . . . . . (8. 14) NUMERICAL SOLUTION OF SINGLE-PHASE· FLOW EQUATIONS

IJ.k = TIzi,j.x- v, =

B· ·

s· ·

IJ,k = TIYij- V,.k =

( --) .k ( ) Pc

Pc

A z kz

/-t I B I� z

' i J - 'h

A il' -/-t l B I �y iJ - Ih.k

. . . . . . . . . . . (8.2 1 )

. . . . . . . . . . . (8.22) 181


o p oy

lL.x

t----.

W',I,k ..----

o p ox

E ' , I, k

=

0

0

J =4

J

J =2

I =1

z

=

1=2

1=1

1=3

1=4

Fig. 8.5-lmplementation of Neumann-type boundary condition. Fig. 8.4-Matrix coefficients.

Theity inmawrtriitxinnotg Eq.ation8.de20fifnoerdmulby Eqstidim. 8.en2s1iothnarolughsyst8.em30s offanderisnfhalexni­­ bi l rayncdondidirtieocnstio. nsFor), ewexamseplt e, to eaxnprd es Eq.co8.effi20­ (p ) , , . . . . . . . .. (8.23) dlinintwgono-diflmoensw bounda i o ns T cinietnhtes eqdiuarelctotiozn.eroThusand,drthoep2Dthefsourmbscofripthte equatbecausioentbeherceomeis nos flow ( ) .......... (8.24) Tix .................... ( 8 . 3 1 ) Si m i l a r l y , Eq. 8. 3 1 c a n be r e d uc e d t o 1 D f o r m di r e c t i o n) by s e t i n g ( ) c o e ffi c i e n t s t o z e r o a n d dr o ppi n g s u bs c r i p t j , whi c h yi e l d s a n d . . . . . . . . .. (8.25) T P 2) 3 . 8 ( ................ Whe n we as s i g n z e r o c o effi c i e nt s t o r e d uc e t h e di m ens i o nal i t y of a ( ) f l o w pr o bl e m , we as s i g n nofl o w boundar i e s i n t h e di r e c t i o ns whe r e . . . . . . . . . .. (8.26) floAsw doesdiscunots edocincuChar. p. Eq. 8.20 has seven unknowns and, when T P wrhepittaedniafgoonar thleceonetffiirecigrenitdmasytsrtiexm(Fwiig.th7.na16tc)ur.aEqsl or.d8.er3in1 g,anged 8.ne3r2ahatesvea (8.27) finavle(aFnigd.t7hr.1e6b)unknowns and tridi,argeonaspelct(iFviegly. ,7.aln6dawi) cloegeffinceireanttemapentrtaicdeisa.go­ andAsQ shows, the matrix coefficients describe the inter(a8c.t2io8)n ona Dithriechextlete-rntyapel boundar boundariyescoofndithteiosnys(tceom,nstgrantidprpoiesntusrleo)ciastespdeconifitehIdef iyestearrme snotareunknowns. Therthey eafroercea,raifetdertothteheprroigperht stirdaensof­ of3Dthfleowcegentroamel grtriyd.blBecockaus(i,je,k) awindth itasresicxosnsurrtaonundits fonrgincgroimprdbloecskisbilne boundar mi s i b i l i t c a l c u l a t e d, acteristictfiynpeiteboundar -dif erenycceoequatnditioinon.(constant rate) is speci­ flbioliw,tienos orprmaestruirxecoeffior timceielntevse.lConsneedesqtueo bentlya,sEq.igne8.d20toisthaelitnraearnsmeqisuai­­ fthieeIdfcachaarNeumannitehseofboundathe rersyercvooindir, mattionriinxtnothe cahtiaorn­ tflioonwaprndoblnoemfu. rther linearization is required for the incompres ible­ faaccteilriitsatrtioecssftihtnheietiemext-dplifeernementraelnboundar a t i o n of ce equation. The 2D problem in il­ Ien byt is Eqsimpor. 8.ta2n7t atondnot8.e2t8haart ethvale defiid nfoitriogrnsidofblocks caonntd aininasg rgiatve­­ lusItnrathteiss exampl t h i s . eenstyesrtorem.leaveThetupperhe systaenmd laceftroboundar s the loiw­es scpoecntaifiineidngweprless aunrde-sfpoercgrifiieddblwelocksls,with noiswelunknown; ls. For grthiderblefoocrkes, eofr athned rsiygshttemboundaaree,no-flruiefisdloofcanwthboundar tluhaetseeddefiiternaittiivoelnsy.ofAn alteandrnative apwiprol acahp,plwhiy onlchydoesif not riesqeva­uire sysEq.tem.8.For3 1 githveesgrthideblchoacrkascltoecriastteicdfioninesit.e-diffthereencceoequatefficiioentnfcoarnthbeis 6.defite9r3,iantiiiotnin,otonsiEq.softo8.su1bs8 ftaointrudttheethe infleonw-tryp.erThiforsmreasnucletsrienlatthieonsfohliopwi, Eq.ng is8.me3tplequal1,icitlmusytoifztthealerotsr.oaWhensbemsniestthiequalbeilityc,tooTeffizercoieintnisEq.issestee8.tqequal2ua7.l tThiotzoesrzioesrashao iinnndlEx­Eq.ed ample 0Thus. ,. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. (8.33) ) ( (8.29) cfoartejd on1 tjhroughwil beSimzielraorl;yt,htahteis, coefficient for the gridblocks lo­ ( 8 . 3 0) 0 ( 8 . 3 ) For layered systems, calculation of is described in Chap, 6. for 1 through =

WI· J·,k

=

E'I J ,k

NI·J,· k

=

-

y

k

Bi,j.k

A;,j.k

z

Ax kx

---

A l' k l' , c# B �y 1 1 ij + Y,.k A' k '

-c# B �z I

I

iJ,k + Vl

(x

Ni.j

Si.j

-'-

=

lz;j.k+ Y,

(x

Pc # B � X 1 1 i + Y' j,k

=

IY;j+ V,.k

· = A I·J,k

iJ' k

=

; + V,j.k

=

A x kx (. -' # 1 B 1� x i - y,j.k

=

Ix;_ y,j,k

WiPi - 1 + CiPi

+ EiPi + l

=

Qi

'

'

7,

8.2.4 Handling Boundary Conditions With Matrix Notation.

q lsc 'J.k .. .

Fig. 8.4

B/

#1

C;,j.k

c;'j.k

Ci.j.k

Cij,k

=

-

B ij,k

Q;,j.k

qlsc;j.k

Fig. 8.S

Q;.j.k

qlsc;j,k

W

qls" ;j,k Qi,j.k .

+ S ij,k + Wij,k + Eij•k + Nij,k + A ij,k + JW;j,k

=

=

Ni•4

p W!;j,k

182

i=

=

=4

W

Ix;_ y,j '

5.5.

W1j

i= I,

W

4.

4.

N

4

BASIC APPLIED RESERVOIR SIMULATION


For Gridblock (1,1), L .( 8 . 4 1 ) For Gridblock (2, 1), . .. ( 8 . 4 2) For Gridblock (3, 1), . . .. ( 8 . 4 3) For Gridblock (4, 1), ( 8 . 44 ) For Gr i d bl o c k ( 1 , 2 ) , For t h e l o wer and r i g ht boundar i e s , we us e t h e r e fl e c t i o n gr i d ­ blocks as discussed in Sec. 5.5.2. For example, (8.35) For Gridblock (2,2), ( 8 . 4 5) toro Gridblock (1, 1). SimGrilairdlbly,ock (1 ,0) is a reflection block adjacent (8.36) . . . . . . . . . . . . . . . . . .. ( 8 . 4 6) joracTheent tfionGritei-ddblifoecrken(c4e,4Gre)q.iuadbltioocnkfo(5r,Gr4) iidsbla orecflke(c1t,i1o)ncgranidbeblowrckitaedn­ For Gridblock (3,2), as . .. (8.37) For Gridblock (4,2), . . . . . . . . . . . . . . . . . .. (8.47) . ... ( 8 . 4 8) For Gr i d bl o c k ( 1 , 3 ) , . . . . . . . . . . . . . . . . . .. ( 8 . 3 8) It fol ows that .............. ... (8.49) . . . . . . . . . . . . . . . . . .. ( 8 . 3 9) For Gr i d bl o c k ( 2 , 3 ) , .. (8.50) tSiaimneildaralsy, the finite-difference equation for Gridblock (4,4) is ob­ For Gridblock (3,3), . . . . . . . . . . . . . . . . . .. (8.40) ( 8 . 5 1 ) For Gr i d bl o c k ( 4 , 3 ) , I n t h i s s e c t i o n, we pr e s e n t s o l u t i o n t e c h ni q ues f o r tlheme .fiAsnitdie-sdciffusesreednceearequatlier, thioensfinfitoer-dthiffeeirnecnocmpre apeprsoixiblme-afltoiown ofprothb­e shows Eqs. 8.41 through 8.52 in 12 unknowns ............ . 2) 5 . 8 ( i n ma t r i x f o rm. tion rersuofltsapiprn oaascyhsetsemforofthelinsoealurtieoqnuaof­ diffTheerenecxeteequatrnal-biooundans thrroyughcondithetiboundar o ns a r e i n t r o duc e d i n t o t h e fi n i t e ­ tisniyocsnsotempr.mChas eofsp.liib7nlearedi-flscoeuswquaseetqsiouaansnumbe y b l o c k equat i o ns . For ex­ . r Gridblnotockhaves (1,1),co(2effi,1)­, flow prroiebls ecmloseads campl(3ie,nt1),se,abecnthdea(usfi4n,eIi}t-ea-dno-Eqsiffefl.roe8.wn4cec1oequattndihrotughioionnsi8.sf4os4-<10 stohownConsflowiindander aa prhoresTheizuorentsgrayls,atedi2D,menthasisnptcechormpriefieedxetsonernibtlahele-bounda p ec i fi e d a l o ng t h e l o wer f o ur t h bounda r y . boundar y of t h e s y s t e m. For t h e s a me r e as o n, Eqs . 8. 4 4, 8. 4 8, Furproducthertmioorn rea, tae welof l is located in Gridblock (3,3) with a specified c8.ie5nt2 fso, arnGrd Eqsidblo. 8.ck4s9(4th,r1o),ugh(4,28.),5a2nfdo(r4Gr,3)iddoblonotcksha(1v,3e)a,n(y2,3)c, o(3ea,ffi3n)d­, re distributgriiodnblwiocthki.nAsthedissycsutesme,dweprneeveiodustolywr, tihtee andimpos(4e,3d)ondothnote lehaftboundar v e c o effi c i e nt s . The c o ndi t i o n Eq.boundaTo8.fi3nr1dyftcohorendieprveetrisoynsuunknown y of t h e s y s t e m i s i m pl e ment e d whe n t h e i m pos e d on t h e s y s t e m t a k e n i n t o c o ns i d e r a ­ fi n i t e d i f e r e n c e equat i o ns f o r Gr i d bl o c k s ( 1 , 1 ) , ( 1 , 2 ) , and tloiocnatwheed onn tthheecbounda haracterriiestsicofeqthuaetisoynstiesmwr. Becit enausfoer tthheosree gridbl12oun­cks t(hIe,3)-coEqseffi.c8.ie4nt1s, ar8.4e5,combiandn8.ed49-awithrtehewrictoeeffin. Icnietnthessaenequatd nonzioensro, knowns o consriydecroanditiontibyon sure distirnibtutheiosn.ystem, 12 equations required to solve forthe pres­ cernetatrieesdabyppethaerwelon lthineGrrigidhtblosicdke.(3The,3) isinttaekenrnali-nbtounda op aIy

1=1

1=2

=

0

1 =3

1= 2

1 =1

1=3 Op oy

=

0

( Cl,l

Op oX

=

0

1=4

Fig. 8.6-lWo-dimensional incompressible-flow problem.

Wl,l ) PI,1

+

+

E l , l P2.1

NI,IPI.2 = gpbxWI.l flx.

+

o.

W2 •I PI,1

+

C2 ,IP2,I

+

E2 ,IP3,I

+

N2 ,I P2 ,2 =

W3,I P 2,1

+

C3,IP3,I

+

E3,IP4. 1

+

N3,I P3,2 = O.

W4•IP3,1

+

C4,I P4,l

+

N4• 1 P4,2 = O.

.

.

.

.

.

.

PI.I - PI.O = gpby fly

PI oO= P l o l - gpbyfly. PS,4 - P4.4 = gpbx flx

·

P5,4 = P4.4 + gpbxilx.

Sl,lP I,O

+

C l,lPl,l

+

El,l P2,1

+

·

NI•IPI.2 = Q I.I

S4.2 P4.1

+

W4•2 P3.2

+

C4•2 P4,2

+

N4,2 P4.3 = O.

·

·

.

.

·

·

8.2.5 Solution of the Finite-Difference Equations for Incom­

pressible Flow.

S4.3 P4.2

+

W4,3 P3.3

+

C4,3 P4,3 = O.

Fig. 8.7

S

Fig. 8.6.

E

qspsc .

ap/ax = gpbx

N

are

are

are

NUMERICAL SOLUTION OF SINGLE-PHASE-FLOW EQUATIONS

W

C

1 83


(1,1) ( 1 , 1 ) C1 ,I + W" , (2,1 )

W2 , l

(3,1 )

(2,1 )

(3,1 )

E" ,

( 1 ,3)

( 2, 3 )

(3,3)

(4,3)

N z"

Cz "

EZ , I

W3 "

C3 "

E3"

W4 "

C4 "

N 3, '

E" z

Wz , z

Cz , z

Ez , z

W3 , z

C3 , z

E3 , z

W4 ,2

C 4, 2

53,z

(3,2)

(4,2)

54,2

0

(4 ,3)

0

C , , 3+ W, , 3

E, , 3

WZ,3

C2 , 3

EZ

W3,3

C3,3

0

-

0

0

P4 , Z P',3

9pbxW , ,3d

0

P Z, 3

,3

P3,3

Ea ,3

-qspsc

0

P., 3

C. , 3

W4 , 3

54 ,3

9pbxW, ,2dX

P3 , 2 N4 ,2

5 3, 3

(3,3)

0

Pz,z N 3, 2

S Z, 3

( 2 ,3 )

Pz"

P" z N 2 ,2

5, ,3

( 1 ,3)

9pbXW" , ,u

P4, 1 N' ,2

C " z+ W' , z 5z , 2

P, , '

P3 " N4"

5" z

(2,2)

(4,2)

N" ,

(4,1 ) ( 1 ,2)

(3,2)

(2,2)

(1 ,2)

(4,1 )

Fig. 8.7-Matrix representation of the 20 incompressible-flow problem in Fig. 8.6.

or, in matrix notation, (8.55)

h=50 It

(8.56)

dx=2 00 It

is constant for the entire grid system; therefore, tdientrirxeecequatrtinorg tihtioeenrsapstecihvowneifmeieditnflhodsoFiwgr.diatseconusnowstehdecrianignhtChabesidps.oelofEq.veThid wis tprh oonecThees ofimasthile­­ Now,T we can(cPaclculate ) for . with the harmonic averag­ lustrated further for simple ID problems in Examples and ingFortechniqI ,ue (se Example Example Cons i d e r t h e I D , s i n gl e p has e , i n c o mpr e s i b l e ­ ablItaaonncksdd prhaaropsducevielao.uniecAdatapreftodaoramducrtattdiheteimofoboundar nensweliolnsiSTBIsi.elTheoscofaDttepeh.dAserirnmeFitseheagerb.vcioileintrytaesdihnrdowsofstmairGrib, utalindtliblaogrinnoiedcdink­ or darcy. tmd,he reservoir hasmd,a symmetrymd,varandiation of md. md, Withatth the unifotsr tinheTaisboltehermaalpiplncyoinmprg Eq.es ible-flfoorw problgievmes) (recal ] [ avipsWipre oatxihprmtohaceteiadopurn,precoatprolciucahltaeetcePDEkthyoure pranedssotluhureteicodion.rstTheerisbputondifliounindignvifitshnceiotessyi-tdsytiffeim.serIeDenccpeo­ the gridyblcondiock ditiomnsensarioensal,l pesyrmmetmeabriilcitayl Similarly, for diwistthrirbeutspioecn,tItnaonthtdhiesasprcseiogntblneeerdm,ofboundar Greiqdualbloctok theTheprersefuorree,ofthGre pridebls oucrke in GrThusidbl, Grockidblocexpec t e d t o be statainrtedwiftrhomtheEq.IkDs, sainngld e-aprhase thee, onlincoymprunknowns es ible-offlothwe equatprobleiom.n ob­We orAgain, with the unidatsricnyTa. ble applying Eq. for gives ] [ Thetainedfinfirtoem-diEq.f erence aapprs oximation for this equation can be ob­ Wefor can wrasite the characteristic finite-dif erence equation, Eq. T T T Fig. 8.a-Schematic representation of the reservoir described in Example 8.2.

Ix

8.5 1 .

8.7

7.

8.2

A x/(p. ,B/'l,x) d Y,

=

A \ !l , B,lJ.x

( kx )

kX i+ 'h

8.3.

. . . . . . . . . . . . . . . . . . (8.57)

i ± Y,

8.1

i

=

and

1,2

9. 16 , Part 4) .

i=

Example 8.2.

fluid flow i n the horizontal reservoir shown in Fig. S.S. Gridblocks

3

5 3,000

2,000

kX3 = 355

kX4 = 1 7 8

kXl + y, = 0. 1 1 8

8.8

kx ) kX5 = 88

= 88

kX = 2

1 78

(0. 1 1 8)

=

. 3.32 STBID-psl.

i = 2,

3.

2

3

4.

kX2 + V,

8.3,

=

0.237

4. 1 ,

. . . . . . . . . . . . . . . . (8.53)

8.19

Tixl + Y, = 1 . 1 27 1 00 X 50 ( 1 )( 1 )(200) i =2

IX l + Vl P 1

. . . . . . . . . . . . . . . . . . . . (8.54)

1 84

i= I

8.57

T 1x 1 + 'h = 1 . 1 27 1 00 X 50 ( 1 )( 1 )(200)

Solution.

2 is

4. 1 ,

B[ = 1

8.57

(0.237)

=

i=2

. 6.68 STBID-pSI.

8.54,

- (Tlxl + Vl +

IX2 + Vl

)p + 2

p

lx2 + Vl 3

=

- q Isc2'

. . . . . . . . . . . . . . . . . . . . (8.58)

BASIC APPLIED RESERVOIR SIMULATION


represent no-flow boundaries. Under these conditions, what is the flow rate into the well and the pressures of Gridblocks I and 2? Solution. I . The POE that describes this problem is obtained from Eq. 8.3 as

I-

200 ft

iJ iJx

-I

Fig. 8.9-Physical system described in Example 8.3.

which yields 3.32 x 3, 000 - (3.32 + 6.68)P 2 + 6.68p3 = 0 or - I O.OOp2 + 6.68p3 = - 9, 960. For i = 3,

(p

c

)

Axkx iJp �x + q /sc = O. I1 / B/ iJx

. . . . . . . . . . . . . . . . (8.53)

The finite-difference equation, which corresponds to Eq. 8.53, may be obtained from Eq. 8 . 1 9 as

T,_"j - lJi:p ,. - I -

(L"i - Vz + T,_Ui + Vz) p . + T,_Ui+ V2p . l

,+ 1

= - q/SCi

. . . . . . . . . . . . . . . . . . . . (8.54)

or, in matrix notation, as (8.55)

. . . . . . . . . . . . . . . . . . . . (8.59)

Because of symmetry, P4 = P2 and T u3 + 1> = Tu2 + 1> = 6.68, which results in 6.68p2 - (6.68 + 6.68)P 3 + 6.68p2 = - ( - 2, 000) or 1 3.36p2 - 1 3 .36p3 = 2, 000. At this point, all the necessary equa­ tions are generated. - 1 O.00p2 + 6.68p3 = - 9, 960

for all values of i = 1 ,2,3 because Ax , kx , �x, I1/, and B/ are constant.

T uj± 1> = 1 . 1 27

and 1 3 .36p2 - 1 3 .36p3 = 2, 000. Solving the two equations simultaneously, we obtain P 2 = 2, 698.8 psia (remember P 2 = P4) and P3 = 2,549. 1 psia. A material-balance check on the system can be conducted as fol­ lows. Because flow is incompressible, the total amount of fluid supplied by Gridblocks 1 and 5 to Gridblocks 2 and 4, respectively, should be equal to the fluid produced at the wellbore (in a single­ phase incompressible-flow system, no fluid accumulation is pos­ sible). With the linear form of Darcy's law between Gridblocks 1 and 2, the flow rate entering the system from Gridblock 1 can be calculated as Axkx l + Y' (P I - P 2 ) _ q lsc - P c � - Tu l + 1>(P I �x ,,- 1 1

(8.56)

_

P2)

. . . . . (8.60)

= 3 .32(3, 000 - 2, 698.8) = 999.98 STB / D.

This flow rate represents one-half the total fluid entering the sys­ a similar volume of fluid will be supplied to the system by Gridblock 5. Therefore, the total amount of fluid en­ tering the system is 1 ,999.96 STBID, which agrees very closely with the specified production rate of 2,000 STBID. The small discrepancy of - 0.04 STBID is caused by the cumulative roundoff error encoun­ tered in the computations. This results in an error of tem. Because of symmetry,

.

2, 000 - 1 , 999.96 -10. x 1 00 = 0 002nt 2, 000

The calculated error is the material-balance error because it is a measure of the mass conserved during the computations. This topic is discussed in Sec. 8.2.7 and Example 8.5. Example 8.3. Consider the incompressible-fluid flow in the 1 0, homogeneous, horizontal porous medium shown in Fig. 8.9. The fluid viscosity is 2 cpo Answer the following questions. 1. If the well in Gridblock 2 is produced at a constant rate of 450 STBID, which creates a pressure distribution of PI = 2,400 psia, P2 = 800 psia, and P3 = 1 ,600 psia, and if the boundary conditions at both extremes of the system are unknown, what is the permeability of the system? 2. What kind of boundary condition would you assign to the ex­ treme left of the system if the right boundary is closed to flow? 3 . If the dimensions of all gridblocks are doubled, what is the flow rate into the well if the same pressure distribution is assigned to the system as in Part 1 ? 4. Assume that the viscosity of the fluid is 4 cp and the wellblock is kept at 800 psia. Further assume that the extreme ends of the system NUMERICAL SOLUTION OF SINGLE-PHASE-FLOW EQUATIONS

[

( 1 00 x 40)(kx) (2)( 1 )(200)

]

= 1 1 .27kx,

. . . . . . (8.61 )

where kx is in darcies. Substituting Eq. 8.61 into Eq. 8.54 for Gridblock 2 gives ( l 1 .27kx)P l - (2 X 1 1 .27kx)p2 + ( l 1 .27kx)P 3 = - ( - 450) .

. . . . . . . . . . . . . . . . . . . . (8.62)

For the given pressure distribution, this equation becomes ( l 1 .27 kx) (2,400) - (2 x 1 1 .27 kx) (800) + ( l 1 .27 kx) ( I ,600) = 450,

which can be solved for kx = 0.0 1 6637 darcy. 2. Because the well is produced at a rate of 450 STBID and the right side of the system is closed to flow, 450 STBID of fluid enters through the left boundary of the system. A pressure gradient must exist across the extreme left boundary for this to occur. This gradient can be quantified as q /sc = -

( ) Pc

Axkx iJp I1/B/ iJx '

(8.63)

which may also be obtained from iJp lx = o q /sc = - Tu0 + '12�x !l uX

or q /sc = - T u0 + 1>�x

. . . . . . . . . . . . . . . . . . . . . (8.64)

( P I - Po) , �X

.

. . . . . . . . . . . . . . . . . (8.65)

where T u = 1 1 .27kx = 1 1 .27 x 0.0 1 6637 = 0. 1 875 STBID-psi. Now, 45tr� - (O. l 875)(200)(iJpjax) lx = o , which gives (iJp /iJx)l x = o = - 1 2.0 psilft. 3. Examination of Eq. 8.54 for a fixed-pressure distribution re­ veals that q /sc is proportional to the transmissibility given by Eq. 8.56 for this s y stem. We observe that if the gridblock dimensions are doubled, Ax will quadruple and �x will double. Because TUj± 1> = P c(A x kx /I1 I B/�x), TUj ± v, will only double, which will double q /SCj on the right side of Eq. 8.54. In other words, q lsc 2 = - 2 x 450 = - 900 STBID or, more explicitly,

Tui ± V, = 1 ' 1 27

(200 x 80)(0.01 6637) . = 0 . 375 STBID- PSI, (2)(1 )(400)

which, when substituted into Eq. 8.54, gives (0.375)(2,400) - (2 x 0.375)(800) + (0.375)( 1 ,600) = - q /SC2 or q /SC2 = - 900 STBID. Therefore, the production rate doubles to 900 STBID. 4. Because both boundaries of the system are closed to flow, no fluid will enter the system and the flow rate from the well will be zero. This indicates that there is no pressure gradient in the system. In other words, P I = P2 = P3 = 800 psia.

1 85


No-Flow Boundary

(

A y ky + Pc " B D..y Y, r"

)

ij + V,.k

(

Zij+ l.k - Zij.k)

Fig. 8.1 o-lnclined reservoir described in Example 8.4.

8.2.6 Incompressible-Flow Equation in the Presence of Depth

(8.69)

Gradients. To this point, we have assumed that the pressure gradient

and potential gradient were the same; that is, the effects of fluid grav­ ity and reservoir depths in Eq. 8 . 1 were neglected. In this section the importance of potential gradients is highlighted. The relationship be­ tween potential and pressure from Eq. 2 . 1 4 is <1>, -

<I> �

=

P - po - y, Z,

or we can develop a new definition of the coefficient Q G ;,j,k '

Q G iJ,k

=

Vp

- y ,V Z .

BGi,j,k Z"'J, k - I + S Gi,j,k Z,lJ' - I .k + WG iJ,k Z'_ 1 I J,' k

+ CG ij,k Z'J,k + EGij,k ZI + I J.' k + NGiJ,k ZIJ + l ,k

(8.66)

and the relationship between the potential and pressure gradient giv­ en from Eq. 2. 1 5 is

V<I>,

=

(8.70)

+ AG iJ,k Z'J, ' k+ 1

(8.7 1 )

. . . . . . . . . . . . . . . . . . . . . . . . . . (8.67)

BGij,1.:

where

Eq. 8.2,

S G ij.k . . . . . (8.2)

WG iJ):

=

=

=

y, ij.k - 1J2 BlJ,, ,,,

(8.72)

" .", y, ij - 1J2,k S IJ

(8.73) (8.74)

y, i - 'h.j.k W'J,' k '

(8.75)

can be rearranged by moving the gravity-head terms to the right side.

(8.76) (8.77)

)

+ NG ij.k + A G ij.k .

(8.78)

Now Eq. 8.69 can be written with matrix notation as . . . . . . . . . . . . . . . . . . . . (8.68) Now we can proceed with the finite-difference representation of Eq. 8.68. The left side of the equation can be written in matrix nota­ tion as in Eq. 8.20. In other words, with the exception of the Qi,j,k term, it is possible to use the same definitions for the remaining ma­ trix coefficients as follows.

+ Eij.k Pi + Ij.k + Nij.k Pij + I.k + A ij.k Pij.k + 1

+ Eij.k Pi + lj.k + Nij.k Pij + l.k + A ij.k Pij.k + 1

=

Q ij.k · (8.79)

In summary, the only difference between Eqs. 8.20 and 8.79 is the definition of the respective right sides. This development assumes rate specification at the wells. For pressure-specified wells, the in­ flow-performance relationship should be used to modify the defini­ tions of Ci.j,k and Qi,j,k . Example 8.4 illustrates the importance of elevation gradients when they exist. Example 8.4. Consider the I D, inclined reservoir shown in Fig.

8.10. In this simplified system, Gridblock 1 represents a constant­

pressure boundary and a production well is located in Gridblock 3. The depths to the centers of Gridblocks 1 through 3 are 2,480 ft, 1 86

BASIC APPLIED RESERVOIR SIMULATION


2,540 ft, and 2,580 ft, respectively. A no-flow boundary is on the ex­ treme right side of the system and the pressure of Gridblock I is maintained at 2,000 psia by a strong waterdrive. The dimensions of all gridblocks are A x = 400 ft, w = 1 00 ft, and h = 80 ft. Permeabil­ ity in the x direction is constant and equals 60 md. The well in Grid­ block 3 is produced at a rate of 200 STBID, and the fluid properties are /-ll = 1 cp, BI = 1 RB/STB, P I = 62.4 Ibmlft3 , and CI = 0 psi - 1 . Find the pressure distribution in the system by use of the point successive overrelaxation (PSOR) method with Wopt . Use a toler­ ance of 0.0 1 to stabilize the spectral radius and a pressure tolerance of 1 psi as the convergence criterion. Include the effects of the eleva­ tion gradient in the calculations. Solution. The 1 D form of the incompressible-flow equation is

iJ iJx

[Pc (

iJZ I /-l I B I iJx - Y iJx

A x kx iJP

)]

Ax +

qlsc

= O.

. . . . . . . . . . (8.80)

The finite-difference approximation to this equation with matrix notation is obtained from Eq. 8.79 as

Finally, the two equations, in two unknowns, for Gridblocks 2 and 3 can be obtained by writing Eq. 8.55 for Gridblocks i = 2,3 as ( 1 .352)(2, 000) - (2.704)P 2 + ( 1 .352)p3 = - 1 1 .720

and ( 1 .352)p2 - ( 1 .352)p3 = 1 76.56. These two equations can be simplified to - 2P2 + P3 = - 2, 008 .67

and P 2 - P3 = 1 30.59 . The PSOR iterative equati6ns (see Eq. 7 . 1 08) for this system of equations are

i

p k+ l ) =

r [ (2, 008 .67 + p�k» ) ] + ( 1 - wopt)pik)

W

(8.85)

(8.55) (8.86) (8 . 8 1 )

We now calculate Q; and the coefficients W. C, and E as defined earlier with the units in Table 4. 1 . Because Ax, /ex, AX, /-ll, and BI are constant,

(Pc �)

W·I =

/-l I B I Ax

= 1 . 1 27

. . . . . . . . . . . . . . . . . . . . . . . (8.82) ; - Yz

( 1 00)(80)(0.06) = 1 . 352 , ( 1 )0 )(400)

for i = 1 ,2,3. Also, E; = 1 .352 for Gridblocks i = 1 ,2 and E; = 0 for Gridblock i = 3 . Because C; = - (W; + Et), C2 = - 2.704 and C3 = - 1 .352. We now calculate WG, Eo , Co, and the right side of the equation, the Q term. First calculate 1'1 using Eq. 2.20 and Table 4. 1 .

(

Y I = 0.2 1 584

X 10 -

3

)(62.4)(32. 1 7)

= 0.4333 psilft.

We start the calculations with an initial guess of 1 ,600 psia for the pressure of both gridblocks. Table 8.1 summarizes the results at the end of each iteration and shows that the stabilized value for the spec­ tral radius is obtained after the fourth iteration. The spectral radius is approximated by use of Eq. 7. 139 with P Gs = 0.50, and Wopt is calculated with Eq. 7. 1 38.

I

d(k + l ) P GS = d(k ) ' W opt =

l

(7. 1 39)

2

1 +

jt It

2

1 +

. . . . . . . . . . . . . . . . . . . . . . . (7 . 1 38 )

- P GS

- 0.50

= 1 . 172.

The pressure distribution for this problem is PI = 2,000 psia,

P2 = 1 ,877 .8 psia, and P3 = 1 ,747.3 psia. (8.83)

8.2.7 Material-Balance Check for the Incompressible-Flow

= (0.4333)( 1 .352) = 0.586. (8.84) = (0.4333)( 1 .352) = 0.586.

Similarly, Eo 2 = 0.586 and Eo 3 = O. Because CG; = (WG; + Eo), Ca2 = - 1 . 1 72 and CG3 = - 0.586. Now, we can write the finite-difference equation for Gridblocks 2 and 3 because P2 and P 3 are the unknowns of the problem. The ma­ trix coefficients for Gridblock 2 are W2 = 1 .352, WG2 = 0.586, C2 = - 2.704, CG 2 = - 1 . 1 72, E2 = 1 .352, and EG2 = 0.586. With the application of Eq. 8. 8 1 , Gridblock i = 2 gives -

Q2 = - 0 + (0.5 86)(2, 480) - 0 . 1 72)(2, 540)

+ (0.586)(2, 580) = - 1 1 .720.

Problem. To check the validity of the final solution, the calculated pressures usually are checked to ensure that they satisfy material balance. Material balance is an engineering expression for the con­ servation of mass over a fixed control volume. In our case, the fixed control volume is the hydrocarbon reservoir. The material-balance check is the ratio of accumulation of mass to the net mass entering and leaving the boundaries of the reservoir. In the case of incom­ pressible flow, this check becomes trivial because no fluid depletion or accumulation occurs within the reservoir. We simply need to compare the values of the total volume of fluid entering the reservoir TABLE 8.1 -80LUTION FOR EXAMPLE 8.4

k 0

Idk)1

1 ,673.7

204.3

1 ,841 .2

1 ,71 0.6

36.9

0. 1 8

3

1 ,859.6

1 ,729.0

1 8.4

0.50 0.50

Q3 = - ( - 200) + (0.586)(2, 540) - (0.586)(2, 580) + 0

NUMERICAL SOLUTION OF SINGLE-PRASE-FLOW EQUATIONS

P3

1 ,600.0

1 ,804.3

4

= 1 76.56.

P2

1 ,600.0

2

The matrix coefficients for Gridblock 3 are W3 = 1 .352, WG 3 = 0.586, C3 = - 1 .352, C G3 = - 0.586, E3 = 0, and EG = O. With the application of Eq. 8.8 1 , Gridblock i = 3 gives 3

w

1 ,868.8

1 ,738.2

9.2

5

1 . 1 71

1 ,874.2

1 ,744.5

6.3

6

1 . 1 71

1 ,877.0

1 ,746.7

2.8

7

1 . 1 71

1 ,877.8

1 ,747.3

0.8 187


with the total volume of fluid leaving the reservoir. In other words, for a perfect material balance, the ratio of mass entering the reser­ voir to the mass leaving the reservoir is equal to unity. Because we use approximations in the solution process and because the comput­ er carries only a finite number of digits, a perfect material balance can never be achieved. Example 8.5. Conduct a material-balance check on the results of Example 8.4. Solution. The amount of fluid leaving the reservoir is specified through the well-production rate in Gridblock 3 as 200 STBID. The extreme right side of the system is closed to flow. The 200-STBID fluid withdrawal from the reservoir must be replenished by fluid flow from Gridblock 1 to Gridblock 2. Therefore, by use of the cal­ culated pressure of Gridblock 2 and specified pressure of Gridblock 1 , the amount of fluid entering the reservoir can be calculated. Be­ cause P I = 2,000 psia and P 2 = 1 ,877. 8 psia, the potential gradient between Gridblocks 1 and 2 can be calculated as

d<l>l dX

=

time derivative to be materially conservative, the relationship in Eq. 8.91 must hold for every Gridblock (i.j. k).

·

To put this approximation i n terms of pressure, we add and sub­ tract (V /a cAt)(ep n /Bj + I) to the right side of Eq. 8 .9 1 .2 b

( l , 877.8 - 2, 000) / 400 ·

- (0.4333)(2, 540 - 2, 480)/400 =

-

0.3705 psi/ft.

With the linear form of Darcy's law, the rate of fluid flow from Grid­ block 1 into Gridblock 2 can be calculated as

. . . . . . . . . . . . . . . . . . . (8.9 1 )

[

. . . . . . . . . . . . . . . . . . (8.92)

=

�\��i�0

- 1 . 1 27 ( l OO

[ ( )] V a ep b a c t BI a

. 06) ( - 0.3705)

200.43 STBID .

The ratio of mass entering the reservoir to the mass leaving the reser­ voir is 200.43/200 = 1 .0022. This material-balance check indicates that the pressure-conver­ gence tolerance of 1 psi results in a material-balance error of 0.22% on the overall computations.

8.3 Single-Phase Slightly-Compressible-Flow Problem

The general flow equation Eq. 8. 1 can be simplified to describe the flow of a slightly compressible fluid in a heterogeneous and aniso­ tropic formation. This is accomplished by observing that the fluid density and formation volume factor (FVF) can be described by Eqs. 2.94 and 2.8 1 . That is, PI

=

pr[ I + eb - p O) ]

)] (

Applying Eqs. 8.89 and 8.90 to Eq. 8.92 and rearranging results in _

"" IJ.k

(

ep o e", V b a c At Bj + 1 ·

=

.

where rjij+ 1 ,k

=

n + l - Pij.k n Pij.k

ij.k

......... . .... .

[ ( :� ) ] V ep o b a c Bj

n

+ epB �el

n

+ epBI�I

.

.

.

.

)

. (8.93a)

. . . . . . . . . . . (8.94)

ij.k

Eq. 8.93b represents the final form of the finite-difference approximation to the time derivative term in Eq. 8. 1 . We could have developed an equally valid definition of rlij,k by adding and sub­ tracting (V /a c A t)(ep n + I /Bj ) (see Example 8 . 1 0). b Finite-Difference Approximation of the Spatial Derivative. The treatment of the finite-difference approximation of the spatial deriv­ atives in the slightly-compressible-flow problem is similar to the treatment used for the incompressible-flow problem. With the approximation of the time derivative discussed in the previous sec­ tion, the finite-difference approximation to Eq. 8. 1 becomes

. . . . . . . . . . . . . . . . . . . . . (8.88) . . . . . . . . . . . . . . . . . . . . . (8.89)

where I 0 or w. We also will assume that the porosity varies with pressure according to =

ep

=

[

ep o I

+ e",(p - pO ) ] .

. . . . . . . . . . . . . . . . . . . . . (8.90)

+ q /sc ij,k

rn + 1 /. "k n + 1 At P ij.k

'J._ = _

(

_

P nij.k

)

8.3.1 Finite-Difference Approximation of the Slightly-Com­ pressible-Fluid-Flow Problem. Finite-Difference Approxima­ tion of the lime Derivative. The expansion of the right side of Eq.

8. 1 must be handled carefully to preserve the material balance of the problem. This is discussed in detail in Sec. 8.5 for single-phase flow and in Example 9.9 for multiphase flow. For an expansion of the 1 88

BASIC APPLIED RESERVOIR SIMULATION


. . . ...... . . . . . (8.95) There is one major difference between the finite-difference approximation of the spatial derivatives for the slightly-compress­ ible-flow problem and the incompressible-flow problem.This dif­ ference is the dependence of the transmissibility terms on pressure. The definition of transmissibility is . .... .. . ... . . .. . . (8.96) For the incompressible-flow problem, Il[ and B[ were assumed to be constant and the remaining grid property terms, (Axkx)/ Ax, were harmonically averaged. For the slightly-compressible-flow problem, we continue to use the harmonic average for the grid property terms but must assign a time level to the pressure-dependent properties and average these properties between adjacent gridblocks. For the slightly-compressible-flow problem, the pressure-depen­ dent fluid properties, Il[ and B[, represent weak nonlinearities and can be evaluated at the old time level, n.In Sec.8.4. 1 we discuss oth­ er linearization techniques that can be applied to the slightly-com­ pressible-flow problem. Because the fluid properties in the transmissibility term are evaluated at the gridblock boundaries, Il[ and B[ need to be averaged between adjacent gridblocks.Several methods can be used in this av­ eraging process. Two of the more common methods are reviewed here; Sec. 9.5.2 discusses additional methods.In the first method, the pressures are averaged before the properties are evaluated. That is, Pi±'l 2j.k = QPJ i .k + ( 1 - Q)Pi±IJ.k'

.... . .. . . . . . . (8.97)

with the fluid properties evaluated by

)

8.3.2 Advancing the Pressure Solution in Time. Unlike the in­ compressible-flow problem, the pressure in the slightly-compress­ ible-flow problem is time dependent.To obtain the pressure at a giv­ en time, f, the pressure solution must be advanced from initial conditions at f = 0 to f) = L\ f). The pressure solution is then ad­ vanced from t) to t2 = f) + L\ t2 and so on, to the desired time. In oth­ er words, the pressure solution is advanced progressively in time un­ til the desired final time is reached.Advancing the pressure solution from the old time level, n, to the new time level, n + I, can be achieved with either the explicit or the implicit formulation methods discussed in Secs.5 .6.1 and 5 .6.2. Explicit Formulation of the Flow Equation. In the explicit for­ mulation, which is also known as the forward-difference formula­ tion, interblock-flow terms are evaluated at Time Level n.In other words, the pressures appearing on the left side of Eq.8 . 1 02 are eva­ luated at Time Level n.Therefore Eq. 8.1 02 becomes

( ) I( + Nn 'k (pn+, Ik - pn k ) + A n (pn +

) p'n )

n , + W" + J.'k - pIJ.n ' k IJ.k pIn_1 J.'k - pIJ.k + E'IJ.' k PI"1 IJ.

IJ

,

'J,k 1 -

IJ.k

'J,

'J,k

. . . . . . (8.1 03)

I,

which, when solved explicitly for pJ 7 � gives

(v+ I)

(8.98) and Bli±'I2.j,k = BI (Pi±'hJ.k '

Eq. 8.102 can be written for each Gridblock (i,j,k) including bound­ ary gridblocks in a 3D reservoir. The boundary conditions are handled as discussed in Sec. 8.2.4.Although we are evaluating the coefficients at Time Level n, we have not yet defined the time level of the un­ known pressures on the left side of Eq. 8.102. The selection of the time level is related to the explicit or implicit finite-difference formu­ lation discussed in Sec. 5 .6. For the slightly-compressible-flow problem, Sec.8.3.2 discusses selection of the timestep level.

[ f+n I

L\f +1 PJ i n ,k = PJ i n ,k + (v) qlsn Ci.j,k

_

li.j.<

.. .. . . . ... . . ... . . . . . . . . (8.99)

(

n + B�,'J.k P�'J,, kQGi.j,k 1

_

,

)

P'J,n k

In the second method, the fluid properties are evaluated with the cell-center pressures and then averaged. That is, (8.1 00)

( )

( )

and Bli±'I2.j,k = QBI PiJ.k + (1 - Q)BI P± i I J. k '

.... . (8.1 0 1 )

In Eqs.8.97 through 8.1 0 1 , Q i s a weighting factor with a value of either 1/2 for arithmetic averaging or the fraction of the pore volumes for pore-volume weighted averaging.Although we did not assign a time level to the pressures in Eqs.8.97 through 8.1 0 1 , for this discus­ sion of the slightly-compressible-flow problem we use the pressures at Time Level n.Eq.8.95 can now be written with matrix notation as

.... . . (8. 102) In Eq.8.1 02, the coefficients are defined by Eqs. 8.2 1 through 8.26, f7,;/ is defined by Eq.8.94, and QGi.j,k is defined by Eq.8.70.

NUMERICAL SOLUTION OF SINGLE-PHASE-FLOW EQUATIONS

(

)]

+ AI'k 'k + - pn'J.k , �1 J� . P 'J,

...... .. . . . . . . .. (8.1 0 4)

where (v) and (v + I) represent old and new iteration levels, respec­ tively.All terms on the right side of Eq. 8.104 are expressed at the known time level, n, and each gridblock (i,j,k) contributes only one equation in one unknown, namely p7J� I. Advancing the pressure solution from Time Level n to Time Level n + 1 is accomplished by moving through all gridblocks (i,j,k) in a systematic manner and solv­ � for each gridblock with Eq. 8.104. In the definition of ing for pi1 +n is evaluated at Time Level n + 1.To preserve material balf/'IJ.'k , Bli ance, some iteration may be required to solve Eq.8.1 04. For slightly compressible flow, this iteration may not be required for most prac­ tical purposes.In other words, fi.j,k can be evaluated at Time Level n and Eq. 8 . 1 04 can be solved in a noniterative fashion. As discussed in Sec. 5.6.3 (Example 5 . 1 7), the explicit formula­ tion is conditionally stable.The timestep L\t, which ensures stability, can be expressed with matrix notation as

L\f

���

(

:�

BJ i , i ,k + WJ i ,k + SJ

,k

)

' EJ i 'k + Nij,k + Aij'k

(8. 1 05) 189


+

0.7 1238 0 + 0.5635 For Gridblock 2,

W2

=

E2

r1 :�

=

and� t2

=

where the minimum is over all gridblocks. Example 8.6 illustrates the timestep stability criterion of the explicit formulation. Example 8.6. A slightly compressible oil is flowing in a volumet­ ric, homogeneous linear reservoir. The oil has a viscosity of 2 cp, compressibility of 5 x 10 5 psi - 1 , and FVF of approximately 1 RB/STB. The reservoir is represented by the three-gridblock sy stem shown in Fig. 8.11. The dimensions and properties of all gridblocks are �x = 200 ft, h = 20 ft, �y = 100 ft, kx = 100 md, and ¢ = 0.20. The initial reser­ voir pressure is 3,000 psia. The well in Gridblock 3 is produced so that the wellblock pressure is maintained at 1,500 psia for all times t> O. Find the maximum timestep size that ensures the stability of the explicit formulation for the problem. Solution. For a ID reservoir,

-

(

. . . . . . . . . . . . . . . . . . . . (8. 106)

)

therefore, Eq. 8. 105 reduces to �t � min ,

, ,

+o ,1 r . . W � E

(8. 107 )

The volumetric reservoir implies no-flow boundaries; that is, W = O andE3 = O. I For Gridblock 1, because all gridblocks have the same dimen­ sions and properties, the expression forE1 can be simplified to give

E1

=

/3 Axkx__ I c

(8. 108)

�x �oB'o

Substituting for numerical values, we obtain

EI = 1. 1 27 100 x 20 x 0.100 1 ( 200) (2)(1)

=

Bo

0.5635 STBID-psi,

0.71238 STB/psi,

n r+1 02

W2 +

E2

. 0. 5635 STBID-psJ .

=

r+n)

1

=

1 +n r Io

and�t3

=

r+1 on � W3

0

. . . . . . . . . . . . . . . . . . . . . . . . . . . (8. I1 1b) =

0.63 day.

0.5635 STB/D-psi,

=

0.7 1238 STB/psi,

E3

0.7 1238 0.5635 + 0

. . . . . . . . . . . . . . . . . . . . . . . . . . . (8. 1 1 Ic) =

1 .26 days.

The maximum stable timestep = min ( 1.26, 0.63, 1.26) = 0.63 day. In advancing the pressure from initial conditions, the maximum timestep that can be used with the explicit formulation cannot ex­ ceed 0.63 day. Implicit Formulation of the Flow Equation. The explicit for­ mulation of the flow equation suffers from severe restrictions on the timestep size because of the conditional stability of the procedure. As a result, it is generally not used in reservoir simulation. In con­ trast, the implicit formulation of the flow equation is unconditional­ ly stable and, hence, imposes no upper limit on timestep size (see Sec. 5.6.3 and Example 5. 16). In the implicit formulation, the interblock-flow terms are eva­ luated at Time Level n + 1 and the time derivative is discretized with a backward-difference approximation. Eq. 8. 102 becomes

" I +n + I sn 1 +n I +n BJ ik. -1 - PiJ.k ) + iJ.k (PiJ-I.k - PiJ.kn ) ik. (PJ +

=

=

W3

. . . . . . . . . . . . . . . . . . . . . . . . . (8. 109) =

r1 :�

=

For Gridblock 3,

We also have

where B�

EI

0.7 1238 0.5635 + 0.5635

Fig. 8.1 1 -Reservoir representation for Example 8.6.

Ai = Si = Ni = Bi = 0 ;

=

1.26 days.

+

W"

(

(

,,1 + +l n n 1 +n +l P,-IJ.'k P - 'J,k ) + E'J, "k PII + 'kJ. P - 'J,k n )

" k' tJ.

n ( 1 +n +l +l NIJ. ( ,'J,+1+1 P - IJ.k n ) "k P P'k'J.n ) + AIJ. "k n Pk IJ+lk . -

1 RB/STB .

Therefore,

. . . . .. . (8. 112) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (8. 1 10) 100

=

and�tl 1 90

x

20 x 200 0.20 (5.615)

x

(5 x 10-5) ( 1)

0.71238 STB/psi . . . . . . . . . . . . . . . . . . . . . . . . . . . (8. l l Ia)

which can be rearranged and rewritten with matrix notation in the form of the characteristic finite-difference equation

-

v( l + ) (v+l) sn, P +1 n, +1 n n BJkP . 'Jk. 1 + 'J.k 'J-l.k '

v() v( 1 + )

v( 1 + ) +l n iJ.P k -I , k.J

+ W"

(v+1)

(v+l)

+ � +n 1 +n ''J,k+l + E'J,'kn p+1 + C"'J.l k p kJ. + N'J.k" pIJl + lk J

=

v() QJ ik,'

.

(v+1)

n +1 + A'J,k'n p'J,k+l

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (8. 113)

BASIC APPLIED RESERVOIR SIMULATION


where the coefficients B?J,k ' S?J,k ' w:'J,k ' EJ ? ,k ' Nj'J,k' and A?J,k ' are defined as before, For gridblocks without wells and for gridblocks hosting rate-specified wells, (v)

e7" ,1 'J k

=

-

[

p�

=

=

pi =

and pj+1

pj

=

3,000 psia,

1,500 psia.

For Gridblock 1, �'k + sn, + W," n'k + E'J, B'J, IJ,k 'J,k

(v)

rn+1 I",k

]

=

EI

�'k + �J + N'!'J,'k + A'J, at

................(8.114 )

0.5635 STBID-psi, =

r�tl

and PI

0.712 38 STB/psi,

=

3,000 psia.

Eq. 8.118 becomes ....(8.115 )

[

(

l C�7" 1,/,k

=

-

:�

=

For gridblocks hosting pressure-specified wells, (v)

:� )

0.7 - 0 + 0.5635 +

38 p�+1 + 0.5635 i+1 P

- 0.7 38 (3,000 ) - 0

................. (8.122a) =

or - 0.634 74p�+1 + 0.5635Pi+1

�'k + + N'!'J,'k+ A'J.

rn+1 I" J,k

� ut

]

+J::'

ij,k

... (8.122b)

For Gridblock 2,

�'k+sn'J.'k + W," � 'k + E'J, B'J, 'J,k

(v)

- 213.71.

=

W2

r°2 n+1 .............(8.116)

and pi

E2 =

=

0.5635 STBID-psi,

0 ' 71238 STB/psi ,

=

3,000 psia.

Eq. 8.118 becomes

(

:� )

0.5635p�+1 - 0.5635 + 0.5635 + 0.7 38 pi+1 and Q(� )k IJ ,

=

+ 0.5635

x

=

1,500

:�

- 0.7

38(3,000 ) - 0

...................(8.12 3a) .................... (8.117)

In Eq. 8.113, we assigned Iteration Levels(v+ 1) and (v) to the left side and right side, respectively. This is done because the right side of Eq. 8.113 contains the B7+1 tenn in the definition of r7,+I. The assignment ofthe n + 1 time level is required to meet the mat�a ­ aI-balance condition stated in Eq. 8.91. Again, for slightly-com­ pressible-flow problems, this iteration may not be necessary for most practical situations. Example

8.7 illustrates this.

Example 8.7. Consider Example 8.6. Find the pressure of Grid­ blocks 1 and 2 at 1 = to days and 1 = 20 days with the implicit-for­ mulation method. Solution. For the ID reservoir, Eq. 8.113 reduces to

where e+1 I

=

-

(

W,'I

r n+l + EnI + � at

)

...........(8.118 )

............(8.119)

................... (8.120 )

At t= 10 Days. The solution is advanced from t=0 to t= 10 days; therefore, at = tn+1 - tn =

to

-0

=

(8.12 1) to

days,

NUMERICAL SOLUTION OF SINGLE-PHASE-FLOW EQUATIONS

or 0.5635p�+1 - 1.198 2 4Pi+1

=

- 1,0 5 8.96.

(8.12 3b)

Solving Eqs. 8.122b and 8.123b simultaneously gives p'l+1

=

and pi+1

1,924.9 psia =

1,78 9.0 psia.

At 1 = 20 Days. The solution is advanced from days; therefore,

1 = to

at = ,n+1 - tn

(8.12 1)

=

20

p�

=

1,92 4.9 psia,

pi

=

1,78 9.0 psia,

P3

=

1,500 psia,

and pj+1

=

- to

=

to days,

1,500 psia.

For Gridblock 1,

(

to t= 20

:� )

- 0 + 0.5635 + 0.7

:�

- 0.7

38

38 p'l+1 + 0.5635 Pi+1

(1,924.9) - 0

................ (8.12 4 a) 191


or

- 0.6347P7+1

For Gridblock 2,

+ 0.5635p�+1 = - 1 37.13.

(

0.5635P7+1 - 0.5635 + 0.5635

:5

TABLE 8.2-PRESSURENOLUMEITEMPERATURE PROPER­ TIES FOR A O.61 -GRAVITY GAS (AIR GRAVITY

)

(8.125b)

Solving Eqs. 8.1 24b and 8.1 25b simultaneously gives

p � +1 = 1 , 608.1 psia and P2+1 = 1 , 568.0 psia.

8.3.3 Material-Balance Check for the SJightly-Compressihle­ Flow Problem. As mentioned in Sec. 8.2.7, the material-balance

check is the ratio of accumulation of mass to the net mass entering and leaving the boundaries of the reservoir. The material-balance check performed over a timestep is known as the incremental mate­ rial balance, [MB, and is expressed as

( - ) III B,I I B"I !:i Isc. x 11.,.

[

MB =

liZ

VbiJ.k ¢"+1 � + i=lj=lk=1

¢"

nx ny nz

ij.k

tL "L "L " q" +1.k i=lj=lk=1

.

C MB

=

, .(

"

'J

liZ

Vb

¢1I+1

¢o

b�6 �nx nylipnz -B? n +1

0.9 1 40

1 ,21 4.7

0.01 34

0.8790

1.61 4.7

0.01 45

0.8530

2.01 4.7

0.01 56

0.8380

)

ij.k

'

........ (8.1 27)

i=1 j=1 k=1

where </>0 and represent these properties at the initial pressure and not the reference value as in Eqs. 8.89 and 8.90. Furthermore, Eqs. 8.126 and 8.1 27 are valid strictly for closed reservoirs. If the external­ boundary conditions specify mass transport across the external bound­ aries, these equations need to be modified to account for these fluxes. Both checks can be performed at every timestep. The CMB tends to smooth errors occurring over the various timesteps; therefore, it is a less accurate check than the [MB. The material-balance checks as expressed in Eqs. 8.1 26 and 8.127 must be close to unity to achieve an acceptable solution.

BO

8.4 Single-Phase Compressible-Flow Problem

The single-phase compressible-flow equation, although similar in form to the slightly-compressible-flow equation, is generally a more difficult equation to solve numerically. The additional difficulty arises because the transmissibility of a porous medium to gas is much more sensitive to pressure changes than is the transmissibility of a porous medium to liquid. This is illustrated in Example 8.8. Example 8.8. Given the following rock and fluid data, determine the change in transmissibility to gas with 0.6 1 gravity and to oil

1 .0000

when pressure declines from 2,014.7 to 1 ,614.7 psia. Table 8.2 gives the gas properties. Oil properties and gridblock dimensions are !:ix=!:iy=100 ft, !:i z= 1 O ft, kx=4.2 md, ,uo =3.0 cp, = 1.6 x 1 O- 6 psi 1 =580oR , psc = 14.7 psia, Tsc = 520oR , and = 1.22 RB/STB, where is reported at 1 ,014.7 psia and reser­ voir temperature. Solution. The transmissibility and properties can be estimated as follows. For the case of a real gas, the definition of transmissibility to gas is -

Tgx =

Ax kx

f3c,ug Bg!:iX'

.

T B;

................... . ...... (8.128)

I. Transmissibility to gas at 2,014.7 psia. The gas FVF can be esti­ mated with Eq. 2.83.

Bg aPcsTscTczp =

(8.129)

(14.7)(580)(0.838) 1.2 1 5 (5.6 15) (520)(2, 014.7) _

and Tgx

I !:itm I I I q�Cij.k

m=1

1 92

0.9550

0.01 25

........ (8.1 26)

The material-balance check also can be performed over the entire time period. This is known as the cumulative material balance, CMB, and is expressed as IIX

0.01 1 8

81 4.7

CoB;

In Example 8.7, we have a simple system of two equations in two unknowns. For larger systems of equations, any of the methods dis­ cussed in Chap. 7 can be used to solve the simultaneous equations resulting from the implicit finite-difference formulations .

11

41 4.7

z

(cp)

1 4.7

7:538 ( 1 , 789.0) - 0

or 0.5635P7+' - 1.1 9824p�+1 = - 972.70.

1 )3

---

(psia)

................... (8.125a)

=

0.0 1 1 3

J.lg

P

0.7 38 p +1 �

1 , 500 = - 0.

x

+ 0.5635

+

.... (8.124b)

=

x

10 -3 RB/scf

( 1.1 27)( 100 x 10)(0.0042) . = 2, 497.3 scflD-ps l. (0.0 1 56)( 1.2 1 5 x 1 0-3 )(1 00)

2. The transmissibility to gas at 1 ,614.7 psi a is calculated as

Bg

(14.7)(580)(0.853) - (5.6 1 5)(520)( 1 , 6 14.7) - 1.543 _

_

and Tgx =

x

10-3 RB/scf

(1.127)(100 x 10)(0.0042) . = 2, 1 1 5.6 scflD-psl. (0.0145)( 1.543 x 1 0 3 )( 1 00)

3. Change in transmissibility to gas is "' Tgx = 2, 497.3 - 2, 1 15.6 2, 497.3

U

x

-10. 1 00 = 1 5.31'l1

In the case of oil, the definition of transmissibility to liquid is

.......................... (8.1 30) 1. Transmissibility at 2,014.7 psia. With Eq. 2.8 1 , psia can be calculated as

Bo

=

o

[ 1 + 1.6 _

and T x -

=

x

1O-

6�i�14.7

_

1 014.7) ]

=

at 2,0 14.7

= 1.21 8 RB/STB

( 1 . 127)(100 x 1 0)(0.0042) (3.0)( 1.2 1 8)(1 00) 1.2954

x

1 O- 2 STBID-psi.

2. Transmissibility at 1 ,614.7 psia. With Eq. 2.8 1 , is estimated as

Bo

Bo

[ 1 + 1.6

x

1 O-

6fi��

1 4.7

_

1 , 014.7)]

Bo

at 1 ,614.7

=1 .2 1 9 RB/STB

BASIC APPLIED RESERVOIR SIMULATION


and

Tox

_

-

( 1 . 1 27)( 1 00 x 1 0)(0.0042) (3 .0)( 1 .2 1 9)( 1 00)

= 1 .2943

dT

X

In this approach, the implicit finite-difference approximation to Eq. 8 . 1 02 with expl icit transmissibilities becomes

3. Change in liquid transmissibility. ox

= 1 .2954

x 1 0-2 - 1 .2943

1 . 2954

x

1 0 -2

TngXi+%j,k (Pi(vn+1+1+1j,k) Pi(v"j++1,kI») Tngxi_Y>j,k (Pi(v"j+1+.k Pi(v-+I1j,k)) ) (v l) (v l +T'BYij+Y,/< (Pi,j+++1 Pi,j++1.k1) TngYij-y".t(Pi"Vj++I.k1 Pi(vnj++-l)I.k) (v ) ( +1 (v l) Vj+I) .k PinJ+1+. -k 1) + TngZij,k +h (Pin+1j+1,k + PiVn+1j,k ) TngZij/<_Y, (Pin+1 q(v)I+J.k1 (vn+1+l ) n qn+l Qn (Pij,k - Pij,k) gscij,k + CijJ<' r�:+:� A-on m+1 gij.k Qc [¢OC nBg + 1 Bgn Bng/Bng +1 / pn+1 pn ] Uk Bg Bg [Psc/(QcTsc)](Tz/p). (B�/Bn�+1 - nl)/(pn+1 _

1 0 -2 STBID-psi.

X

10-2

= 0 085'3i0.

x 100

The change of transmissibility to gas is 15.3% compared with a change of tra nsmissibility to oil of 0.085% for the same pressure change. Example 8.8 illustrates why the tra nsmissibilities can be evaluated at the o ld time level for sl ightly compressible flu ids and why special linearization techniques are required for compressible fluids. Becau se the tran smissibilities to liquids change very slowly dur ing pressure decline (or buildup during repressu rization), they can be approxi­ mated accurately with valu es at the beginning of timestep. Thi s is not true for compressible flu ids, where the change in transmissibility mu st be considered dur ing the course of the pre ssure solution. Although we assume a constant transmissibility for slightly com­ pressible flow, it actually is pressure dependent (0.085% change in Example 8.8). C onsequently, the linearization methods discussed in Sec. 8.4. 1 also can be applied to slightly-compressible-flow prob­ l ems. In addition, becau se of the inclusion of relative permeability and capillary pressures in the transmissibility terms for multiphase flow, these linearization techniques are requ ired for slightly com­ pressible fluids in multi phase-flow situations. 8.4.1 Linearization of the Flow Problem. The solu tion techniques discu ssed in Chap. 7 are appropriate only for systems of linear equa­ tions. That is, these methods are appropriate only for equations where the coefficients are constant. As we have already seen, the transmissi­ bilities in t he finite-difference equations are pre ssure dependent and, hence, are functions of the unknowns of the problem. To u se the tech­ niqu es described in Chap. 7, we must linearize the fi nite-difference equ ations. We discuss fou r methods for linea rizing the fi nite-differ­ ence equations: expl icit treatment of the transmissibility terms, ex­ trapolation of the tr ansmissibility terms, simple iteration of the trans­ missibility terms, and fully implicit treatment of the transmissibility terms. We discu ss these methods as they apply to the single-phase compressible-flow equation. In Sec. 9.5.2, we discuss how these methods apply to multiphase-flow situations. Explicit Treatment of the Transmissibility Terms. The simplest treatment of the transmissibility terms is the explicit treatment. This treatment is used in Sec. 8.3 for the slightly-compressibl e-flow equation. As the name implies, the transmissibility terms are eva­ luated at the old time level in the explicit treatment. That is,

l,k

1

or

+I j.k TgXj±VzJ,k T"gXj±lh ==

=

peT X

>, , rJJ

1

"

,

Jlg Bg Ax] ± i (1/Jlg Bg) "i±%j,k [(3(,(Ax kx/Ax)];±%j.k ( I/Jlg Bg)"i±%jJ<

. . . . . . . . . . . . . . . . . . (8. 1 3 1 b)

where the pressure-dependent properties

and

are evalu ated at 'h,i.k is averaged between gridblocks by use of the har monic average, as discussed in Sec. 8.2.2, and the gas-property term is averaged between gr idblocks with one of the methods discussed in Sec. 8.3. 1 . Becau se the term is constant with time, it needs to be calculated only at the beginning of the simu la­ tion; however, the gas-propert y term mu st be up­ dated at the beginning of each timestep.

p n. In Eq. 8. 1 3 l b, the grid-dependent ter m [(3c(A,,;kx)/

NUMERICAL SOLUTION OF SINGLE-PHASE-FLOW EQUATIONS

_

_

- �

_

,+1

_

_

_

_

1

. . . . . (8. 1 32)

-

_

where is obtained fr om the expansion of the time derivative term for liJ mater ial ly conser vative scheme as Vb

= �

_

tP + 'L (

__

1) (

_

)

. . . . . . . . . . . . . . . . . . . (8. 13 3 )

= and is given by Eq. 2.83 as While Eq . 8.94 applies to slightl y compressible liqu ids, Eq. 8 . 1 33 appl ies to gas. I n fact, the term pn) is an aver age gas compressibil ity between p and p + 1. Eq. 8. 1 32 can be rewritten in terms of matr ix notation as -

+1) B'ij. k P(vinj++1. k-l )1 + snij,k P(nivj++-l.kl)l + ij,k P(vn+l i-lj,k (v) (v ) (v ) (v+1) A + C��l p?J+1�1 +E�.k Pt:i+1j.k +Ni�,k P�+Ak + 7J.k P?j��1 Q(v)ij. k · I)1. rgi B�+1 rg;j,k'i C?j�1 Qij, k' TIm rr

(v+1)

=

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (8. 1 3 4 )

I n Eq. 8. 1 32, Iteration L evel ( v + i s assigned to the unk nown pres­ This is require d becau se of the sures and I ter ation Level (v) to term in the definition of This treatment is requ ired to pre­ serve the material balance of the problem. This approach results in the iteration levels assigned to the terms and both at I teration Level (v), in Eq. 8 . 1 34. The definitions of these terms become

r(v)ng+1i.i.k n n + N.·k +AiJ·k +

. . . . . . . (8. 1 3 1 a)

(a Ax kx )i±Yj k( gBg) i±Y>j k'

1)

_

'J .

� at

.

[

]

. . . . . . . . . . . . . . . ( 8. 1 35)

for gridblocks with rate-specified wells and for gridbloc ks with no wells,

C(v)n+ kl �

Bn. J.·+k S7J'k + wn.,k + E7J·k

= -

.

(v)gn+1 r +N?J·k + AniJ·k + ij,k +Jwn 'J.,k ,

,

� at

,

]

. . . . . . . . . . (8. 136)

193


Upda te transmissibilities and matrix coefficients

• Transmissibility value used

[

in the explicit method of linearization

pn+

o Exact value of the transmis­ sibility at

Inner Iteration

Outer iteration

SOR

Tng -----

---------

-11 I

Simple I tera tion

ADIP

S IP

CONJUGATE

1

I I I I I I I I I

GRADIENT

Fig. 8.12-Nesting of iterations in solving Eq. 8.134.

for gridblocks with pressure- specified wells.

Fig. 8.13-

79

value used in the explicit method of linearization.

With this approach, the transmissibilities are evaluated by

. . . . (8. 140a)

. . . . . . . . (8. 1 37)

for gridblocks with rate-specified wells and for gridblocks with no wells, and

........... , ...... (S.140b)

..... (S.13S)

Qc

for gridblocks with pressure-specified wells. In Eqs. 8 . 1 37 and 8 . 1 38 , is defined by Eq. 8.70 with the transmissibility terms and gravity -head terms evaluated at Time Level n. When the sy stem of equations generated by Eq. 8 . 1 34 is solved with one of the iterative techniques discussed in Chap. 7 [ succes­ sive-overrelaxation (SOR), alternating- direction implicit procedure (ADlP). strongly implicit procedure (SIP ) , or the conjugate gradient method], a nested iteration procedure results. Fig. 8.12 shows this procedure schem atically. If an alternative definition of is used for incompressible res­ ervoirs, c¢ = 0 (see Exercise 8 .2 1 ), a noniterative solution proce­ dure for Eq. S . 134 can be developed. Often, for single-phase gas flow, it is appropriate to assume that the rock compressibility is neg­ ligible compared with the gas compressibility. Fig. 8.13 shows the value of transmissib i lity used in the explicit method of linearization. Extrapolotion of the Transmissibility Terms. The explicit treat­ ment of the transmissibility terms can result in stability problems. particularly for multiphase-flow problems.2 These stability prob­ lems can be alleviated by evaluating the transmissibilities at Time Level n + 1. This treatment p resents one difficulty. ho wever, be­ cause the pressures (and saturations for multiphase-flow problems) are unknown at this time level and, consequently, are unavailable to evaluate the transmissibilities . One method used t o circumvent this difficulty is t o u s e extrapo­ lated pressures to evaluate the transmissibilities. In this approach , the results from the last two timesteps are used to extrapolate the pressures to the new time level. That is,

rgi�.i

Pn+1 ij,k Pinj,k Pin+1j,k - Pinj,k =

or

194

_

+ +

��tn+1tn (Pinj.k Pin-Ij,k ) (Itnn+1 -tn-tnI) (Pinj.k - Pin-Ij. k ) . ( ) _

_

. . . . . . . . . . . . (S . 1 39a)

. . . . . . (8. 1 39b)

The implicit finite-difference approximation to Eq. 8 . 1 02 with extrapolated transmissibilities becomes

( ivj+. k1) p(n+iv-+lI1j.k) ) p(in+vj+l,1k ) Tn+1 gXi-V,j.k pn+1 . + 1) ( +I) ) v + 1) (. + 1) p;-I (pn+1 p;-g.l ijI+ y,.k (p(n+1 'J,k 'J + I,k pn+1 ij-y,.k 'J,k p�V'J+-1I,k ) gZi.j,k (Pn+1ivj+,k1)- P(n+1ivj+.tl)-1) . + 1) - P(n+1 Tn+1 gZi.jl + (Pin+1 j.k + iVj+I,k Tn+1 rgn+1(iJv.)k ( (v+l) ) Pijn+,k 1 - P7J.k

v +1) Tn+1 gXi + y,j.k (p(n+1 i+lj,k •

+

+

_

_

_

_

v,

_

_

-

I

_

g)

_

'I,

- Tt

. . . . (8. 1 4 1 )

v +1) sn+1 (n+1 v +1) (v +1) Ain+1j. k Pi(n+1 j. -k I iJ,k Pij-I.k win+j,k 1Pin+1-Ij,k (v)p(n+1 (v +l) v + 1) v +1) N n+1 (n+1 n+1 CiJ,k ivJ+,kl) Ein+1j,k Pi(n+1 + Ij,k ij,t Pij + I,k Bin+1j,t Pinj+,k1+ I ( v) . . . Qn+1 ij,k' p��1 B� 1 r�,+.:. r; + I,

or, in matrix notation, •

+

+

+

=

+

+

+

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . ( 8 . 142)

In Eqs. 8 . 1 4 1 and 8, 1 42, I teration Level (v + I) is associated with the unknown pressures and I teration Level (v) is associated with Although the extrapolated value � is evaluated at th e new tim� level, at the old iteration, may need to be updated with an iterative process to meet the condition of mass conservation (Eq,8.91). Fig . 8.14 shows the pressure value used to evaluate the transmis­

sibilities with the extrapolation method of linearization. This figure BASIC APPLIED RESERVOIR SIMULATION


Pressure at previous tlmesteps

• Extrapolated pressure , p "+

• Transmissibility values used

in the slmple-lteratlon method of linearization

1

, used to evaluate transmissibilities

p

n-1

p

o Exact value of p" I I I I I I I I I I I -------�---------I I I ------

------

� I I I I

:

-----------

-----------

� � I

: I I I

+1

g

T

--

p n + I.

. . . . (8. 1 43a)

( A ) (/J ) n+ 1 . (v)

xkx

Pc Ax

i±'hj,k

B

g g i±'hj,k

With this definition of transmissibility, the implicit finite-differ­ ence approximation to Eq. 8 . 1 02 becomes

n+ 1 k (Pn+i1'+j.k11 ) - P(1'n+i -+Ij,11 ) k ) 1 (P(1'+n+i+lj,11 )k - P(1'+n+ij,k11 ) - TgXi-'hj, Tn+gxi+'hj,k (v)

(v)

( (i1'j++l1I),k - P(1'n+ij+,kI1) - TgyiJ-'h.k n+ 1 (Pn+1'+ij.k1I) - P(1'+n+ij -I)1I.k ) + Tgn+yij1+'h.k P n+ (v)

(v)

n+ 1 (P(1'+n+ij.k1+ 1 - P(1'+n+ij,k1I) - TgZiJ,k-'h n+ 1 (Pn+1'+ij.k11 ) - P(1'n+ij+.k11-) I ) I)

(v)

fgijn+,k1 ( (1'+n+ 11» n ) - At P ij,k P ij.k (v)

_

_

n+ 1

qgsciJ,k

(v)

n+ 1

+ QGiJ,k

....

(8. 1 44)

or, in matrix notation,

(1' + 1 ) (1'+ ) (1' + ) Bn+ij,k1 Pn+ij,k1- I + sn+ij,k1 Pn+ij -11I.k + wn+ij,k 1 Pn+i - Ij.11 k (1' + 1 ) (1'+ 1 ) (1'+ 1 ) + cn+l ij,k pn+ij,k1 + En+l ij,k pn+i + lj,1 k + Nin+l ij,k pn+ij,k1+ 1 j.k pn+ij +l.1 k + An+l Q��I. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (8. 145) =

(2)

(v)

(v)

(v)

----iI I I I I I

�� �

------�---�----

I

I I

(3)

I I I I I I I I I

------

--

I I

I I -----I I I I I I I I I I I I I I I I I

I

--iI --

I

(2)

(v)

(3)

p Fig. 8.15--Convergence behavior of the simple-Iteration method of linearization.

One difference between the simple-iteration method and the pre­ viously discussed methods is the updating of the transmissibilities during the iteration process. In the explicit and the extrapolated methods of evaluating transmissibilities, the grid-dependent terms f/J c xkx/Ax) ]i±'hJ,k are evaluated once at the beginning of the simu­ lation, while the pressure-dependent terms are eva­ luated at the beginning of each timestep. Even when an iterative pro­ cedure is used because of the fgiJ,k term, the pressure-dependent groups appearing in the transmissibility terms are not re-evaluated . In the simple-iteration method, the pressure-dependent groups are re-evaluated at every iteration. Fig. 8.15 shows the convergence be­ havior of the simple-iteration method. Fully Implicit Method. In the previously discussed methods, we estimated the values of the nonlinear terms and I, with the values of pressure at various times and iteration levels. The resulting iteration processes from these methods tend to converge slowly. This is because of the poor approximation of the nonlinear terms during the iteration process compared with their actual values. Figs. 8. 1 3 through 8 . 1 5 show these approximations; however, we have additional information that can be used to improve the approxi­ mations of these nonlinear terms. This additional information is in the form of the derivatives of and QQ. To facilitate this discussion, we consider the 1 D, nonlinear, finite­ difference approximation to the compressible-flow equation

(A

(1 //Jg Bg)i±'h.j.k

T� + f� + I,

1

. . . . . . . . . . . . . . . . . . (8. l43b)

(v)

I I I I I

n+1

pn + 1

_

+1

p" p"(+1)1 p" + 1 p" +1 p" + 1

indicates that the closer the actual pressure depletion is to linear be­ havior, the better the approximation of , is to In addi­ tion, the extrapolation method does not properly account for changes in production and injection specifications with time. Simple Iteration of the Transmissibility Terms. In the simple-it­ eration method, the transmissibility terms are evaluated one itera­ tion behind the pressure solution. That is,

(v)

I I

------�--

----

Fig. 8.14-Extrapolated pressure, P , used for the evaluation of transmlsslbllHles In the extrapolation method of linearization.

(v)

transmissibility at p"

I

t"

+ TgZiJ,k+'h

o Exact value of the

I

I

g

-

t

(v)

(0)

T" + 1 1 T"(+)1 T" + 1 T" + 1

(v)

(v)

NUMERICAL SOLUTION OF SINGLE-PHASE-FLOW EQUATIONS

Q�+ I

Tg, fg,

Tn+l ( n+l p �+l ) (pn+l pn+I I ) Tn+l gXi-lh p gXi+1h: . + 1 fn+ 1. (p �+ 1 p �) n+l + nn+ 1 ........ (8.146) ..!.!... qgsci �Gi ' At I In Eq. 8 . 1 46, all coefficients and variables are evaluated at Time Level n + 1 except the p7 value in the approximation of the time de­ rivative. We can develop an iterative procedure by approximating every n + 1 variable in Eq. 8 . 1 46 by a Taylor-series expansion about =

,

_

_

_

,-}

_

_

Iteration Level(v). That is,

Tgn+xi±'h1

=

(v)

n+ 1 Tgxi(1'+n+±'h11 ) Tgn+lxi±'h + aaTpgxi±'h i± I =

(v)

I

(v)

X

n+ I (1'n + 1 ) . +1 dp (..±1'n ++1 11 ) + aTa8pXi±'h i I dp . '

(1'+ 1 ) 1) ap I n + 1dp (1'+ PI.±n +I 1 p.�±+l1 + ....1!.! ap i± 1 I.±n +lI =

(v)

(v)

. . . . . . . . (8. 147)

( 1

. . . . . . . . . . . . . 8. 48a) 195


(v) "" p i:11

(v+I)

+ dp/:rjl,

. . . . . . . . . . . . . . . . . . . (8. 1 48b)

,

(v) (v+\) (v) iJp. n+I (v+I) ' I+_ +l pn+1 =pn+ PIn. I iJpi d I (v) =ptl

(v+1) +I,

+ Op;"

1

(v+1) (v) rg�+1 "" r�i+1

(v) iJr "+1 (v+l) Op."+1 +� iJpi

(v) (v+1) n+1 "" Qn+1 Q Gj Gj

(v) (v) aQc n+1 (v+1) iJQc ' n+1 (v+1) "+11 + --' dpIn. +1 Op.1+ + api iJPi+1

I

l

l

(v) (v+I) qg�� 1 "" q �s�i

and

. . . . . . . . . . . . . . (8. 1 50)

'

--l

(v) a Qc' n+1 (v+1) " n+1 + - --, aPi-I UP i _I '

. . . . . . . . . . . . (8. 1 52)

. . . . . . . . . . . . . . . . . (8. 1 53)

. . . . . . . . . . . . . . . . . . . (8. 1 54)

In Eqs. 8. 1 47 through 8. 1 52, we retain only the first-order terms in

the expansions. Because Tgxi±% and QCi are functions of multiple pressures, m ultiple-derivative term s are required in the expansions.

[

+

M

M

]

I

]

(V+I) n+1 + dp1+1

M

l

(v) iJQc n+1 (v+l) , + n+1 QII+I api+1 dp1+1 Ci __

I

]

I

M

iJQC' "+1 (v+1) , bpn+' + iJp I i __

. . . . . . . . . . . . . . . . . . . . (8. 1 55)

Perform ing all the multiplications in Eq. 8 . 1 55 results in

1

(v) (v) aT . "+1 (v+I) lI + l� OpI."+1 + p1+I api

1

(v) "+1 (v+\) (v) aT gxi+y, 0 11+1 +1 + p"i+1 iJ Pi+1 Pi+1 +

(v) (v+1) n+1 Tn+1+Vzbp,+ 1 gxi

_

M

l

[

[

i+

(v) +I

1

M

I

1

(v) (v) aT X 11+1 (v+1) ll+1 g i-V' Opn+1 +p I-I iJPi-l

(v)

=

X

196

-I'1t 1

[

{[

(v) r"+1 gi

(v) pj+1

+

]

1

]

(v+l) +1 - pi

+ bp;,,

}

]

(v+1) n+1

bp + Tn+' gXj_Y2 I

(v) (v) iJT . ' n+, (v+l) � 0 n+l n+l Pi Pi-I api

(v) r g", "+1 (v+!) a-dpI."+' api

]

(v+1) n+1

+ T"gxi+J/2bp,

n+1 (v+I) (v) iJT n+1 gXi_y, bpn+1 +p ' iJpi

(v) (v) Tn+' p"+1 gXi_l/� I

I

1

(v) "+1 (v+\) (v) iJT 11+1 gxi+y, 0 n+I + P, P, api

(V) (v) Tng+1 plI+1 X Vz I

11+I (v+1) (v) iJT �+1 gxi+v' Opn+1 +p 1+1 iJPi+l J

n+1 (v+1) n+1 (v+l) iJT (v) aT . bpn+1 Tn+1 + gpXi+% bpn+' + � 1+ 1 gxi+V, iJPi+1 iJ i I

]

I

(v) iJq n+1 (v+1) dpIn+I + .--!5. iJPi

(v) aQC' n+, (v+1) I " +1 uP in_ 1 + -a-Pi-I

Substituting Eqs. 8 . 1 47 through 8 . 1 54 into Eq. 8 . 1 46 results in

1

i

. . . . . . . . . . . . . . . . . . . (8. 1 5 1 )

,

(v+1 ) (v) (v+I) and bpi"+1 = p;,,+1 - pj+l.

_

(v) (v) T"+l pn+1 gxi+% 1+1

(v) iJ qgsc n+10 (v+\) + iJ P,n+1 ' Pi

(v) (v+\) (v+l) where dpi�j l = Pi�j l - p7:i

(v) qn+ gsc 1

. . . . . . . . . . . . . . . (8. 1 49a)

. . . . . . . . . . . . . . . . . . . (8. 1 49b)

[ [

I

I

(v) (v) iJT X _ n+1 (v+\) (v) (v+1) g i % +T"+I Opn+1 "+1 bpIn+1 + pI-I iJ I-I I _ gxi % Pi-1

[

(v) (v) Ipll+1 = -L rn+ gi

I'1t

_

I

(v) rng,+lpn I

_

I

(v) (v) ar ' n+1 (v+l) g, dpIn+1 + p"+I I api __

1

]

+

(v) (v+l) rn+ldpn+1 I gi

(v) ar 11+1 (v+I) bpn+ ' pn� iJPi I

I

BASIC APPLIED RESERVOIR SIMULATION


[ [

]

I

(v) (v) iJq n+1 (v+l) _ qn+1 Dp' n+1 gsc; + � iJP i

l

M

__

__

]

(v) iJQc n+1D (v+1) n+l. p,-I + p iJ i_1 -'

l

M

) iJQc n+1 (v+1) iJQc n+1D (v+n+l p,+1I + p _, Dp' n+I iJ i

(v)

+ Qn+ c; I + iJ , P i+1

l

. . . . . . . . . . . . . . . . . . . . . (8. 1 56)

In Eq. 8 . 1 56, all DPi + I DPi , DPi DPi - J, (DPi + I)2, (DPi )2, and (DPi _1)2 tenns are dropped. This approximation is appropriate be­ cause for convergent iteration processes, as the iterations continue, the differences between two iterations, the 15 tenns, become small. Therefore, when these small numbers are multiplied together, the result is a much smaller number. Collecting like tenns in Eq_8_156 results in

{ (v)

(v) (v) ] , } [(V) I [ (v) ] I [ (v) {(v) , [ (v) , l ] ---I [ (v) ] I } ( {(v) [ (v)

iJT x _ Tn+1 � gxi+y, + iJpi+1

X

I [ (v) n+ I

P n+1 i+1

iJT x uP i

+� �

P n+i l

(v)

�+I P ,-I

(v) [ _ n+l iJ � pn+1 + ...L p+1 ' Ki + iJP i !:J.t

(V) (v) iJqgsc_, n+1 iJQc_ n+1 15 (v+1) + - iJP i P in+1 iJP i '

!:J.t

. . . . . . . . . . . . . . . . . . . (8. 1 57) Inspection of the right side of Eq. 8.157 reveals that it is the nega­ tive of the residual of the original finite-difference equation, Eq. 8. 146 evaluated at (v) iteration. That is,

{(V) [ (v)

(v) f,'+1 - Tn+1v, P n+1 , i+1 KX;+

(v) [ (v) ]} (v) [ (v) ] (v)

(V)

=

_

(v+1) 15 n+1 P i-I

_ Tn+1 n+1 gXi+1f2 P i+l

NUMERICAL SOLUTION OF SINGLE-PHASE-FLOW EQUATIONS

(v)

_ Tn+1 n+1 gxi_Yl pI

p7!i

[n+1

(v)

; p�' +1 - P ni - qn+Kscl; + QC;n+1 + _K__ !:J.t . . . . . . . . . . . . . . . . . . . (8. 1 58) Further inspection of Eq. 8. 1 57 indicates that the coefficients of DPi + J, DPi , and DPi - 1 are iJr/iJpi+I' iJr/iJpi , and iJr/iJpi_I' re­ spectively_In other words, we can rewrite Eq. 8. 1 57 as

,

,

(v) (v) l) iJr_ n+1D (v+n+1 l) iJr-'_ n+1Dp (v+n+1 ---! -p' + ,+1 iJP i iJPi+1

,

(v) _ n+1 (v+1) r iJ Dp,-I n+1 + __ iJP i-1 ,_

(v) r7 +I.

=

. . . . . . . . . . . . . . (8. 1 59)

When Eq. 8 . 1 59 is written for each gridblock in the system, Eq. 8 . 1 60 is obtained.

(v) (v+I) [J]"+IDpn+1

=

(v) _ ,n+1

. . . . . . . . . . . . . . . . . . . . (8. 1 60)

Eq. 8 . 1 60 represents the basis of the classic Newton- Raphson it­ eration. In this equation, [J] the Jacobian matrix, DP vector of change in pressure from one iteration to the next, and , residual vector of the original equation. We can write a 3D version of Eq. 8. 1 59 with matrix notation as =

=

=

(v) iJTgx;_Y2 n+l n+(v) n+1 - iJpi_1 Pi l - P,I

iJQ - n+1 _� iJpi_1

p7!i

(v) [n+1 _K + _, -_ p'n+1

( Qc_' _ n �\ iJ p,n+1 ___ iJpi+1

(v) (v+I) iJT x n+l Dp n+1 + Tn+1 _� l P n+i+1 1+I gXi+V2 iJpi (v) n+l

(v) [ (v) (v) ]} [ (v)

_ Tn+1 n+1 gxi_yz p,

(v) r7j�l, where

(v) f,"J- +,kl

=

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (8. 1 6 1 )

(v) (v) (v) (v) (v) (v) (v) I Q'n+J,kl - B'n+J.klp'n+J.kl- I - s'n+J,klpIn+J-llk, - W,''J+kl , p1-n+IJ.k (v) (v) (v) (v) Cn+1 ijk, P n+1 ij,k - £n+1 ij,k P n+1 i+Ijk,

(v) (v) (v) (v) lp'n+J +11.k - A'n+J,klp'n+J,kl+I ' - N": 'J k,

(8. 1 62) 1 97


• Transmissibility values used

in the fully implicit method of linearizatron

o Exact value of the

transmissibility at pn+1

dure, In addition, because the value of e is chosen to be small enough to obtain a reasonable approximation to the derivative, the reduction in the accuracy of Eq, 8, 1 70 is not significant. Fig. 8.16 shows the convergence behavior of the fully implicit method of linearization. 8.4.2 Material-Balance Check for the Compressible-Flow Prob­ lem. For compressible fluids, the 1MB is expressed as

IMB -

(

)

nx n. y n,.. Vbi .k ¢n+1 ¢n J a;- B �+I - B � k ii nx ny nz n+1 �qgscij,k At L �L �L i=lj=lk =1

6�6

v'

, , , "" . , (8. 1 72)

and the CMB is expressed as (1) pn+1

pn

(2)

pn+1

. """. (8. 1 73)

p Fig. 8.16-Convergence behavior of the fully implicit method (generalized Newton-Raphson procedure) of linearization.

B'ij,t S,,"'J�

or, 'k 0Pij,k -I'

'J , __ _ -

=

or,IJ'k ' , opij-I ,k

=

W ij, = ' l<

C 'i j k ,

'iP

=

N ij k ' ,

-

and

or, 'k OPi-lj,k '

or",k 'J - OPij /,

,

,

,

,

,

,

,

,

,

,

,

, . (8. 1 63)

,

.

.

.

.

,

'

,

.

.

.

.

.

', . , (8, 1 65)

" . . . . . . . . . . . . . . , ', . . , " " . . (8. 1 67)

"

.

"

.

"

"

.

"

"

"

""" • ' "

-ap=

or·' 'k OPijJ,k , + I

. . . . . . , . . . . . , . , . , . . , . , , , . . (8, 169)

Tgx(p + e) e

-

Tgx(p)

, , "" . "" . "'"

(8. 170)

e is selected so that it is small enough that a reasonable approxi­ mation to the derivative is obtained but large enough that machine roundoff error does not dominate the approximation, The numerical differentiation scheme used in Eq. 8, 1 70 is a forward-difference approximation, We also could have used a central-difference approximation defined by """ " " . " (8. 1 7 1 ) Although the central-difference approximation i s a higher-order approximation, Eq. 8 . 1 70 is used more commonly in practice. This is because Tg ( p) is already available in the computational proce198

(

Vbi 1)n+1

- a At B n+1 I C

=

---.

x

In Secs. 8.2.7, 8.3.3, and 8.4.2, we discussed the material-balance calculations for incompressible-, slightly-compressible-, and com­ pressible-flow systems, respectively, In this section, we analyze these calculations to detennine the properties of the finite-differ­ ence operators that result in a material-conservative fonnulation, During the expansion of the accumulation tenn discussed in Sec. 8.3. 1 , we converted the finite-difference approximation from

(8. 168)

In Eqs. 8. 1 57 and 8, 1 63 through 8, 1 69, the derivatives of the Tg, r g, and Qo tenns with respect to pressure are required. These deriv­ atives can be evaluated either analytically, as in Example 3.7, or nu­ merically, If these derivatives are evaluated numerically, Eq, 8, 170 is used,

oTgx

8.5 Analysis of the Material-Balance Calculation Used

in Reservoir Simulation

_

or",k _ _'J__ o Pi+Ij.k '

=

,

". """. """"". , , ", , . , , (8. 1 66)

or, 'k - 0Pij+'J,I,k '

A ij,k

,

"". """""""""". , , (8. 1 64)

'J , _ _ __

-

E

As in the case of slightly compressible fluids, both 1MB and CMB checks should be in the range of 0.995 to 1 .005 .

f,,+1

1t

_

1>") BI"

(p7 +' - p7),

i

. """"". "". , , . (8. 1 74)

"" """" ". "" , , . (8, 1 75)

nx '

The expansion of the accumulation term is required to write the right side of Eq. 8, 1 74 in terms of the unknown, Pi (i = 1 ,2, . . . ) Because Eq. 8 . 1 74 is the direct result of the discretization of the POE developed in Chap. 4 and Eq. 8, 1 75 is the equation solved in numerical reservoir simulation, we need to analyze both equations to determine the requirements for a material-conservative finite­ difference formulation, In Eqs. 8, 1 74 and 8. 1 75 , we assumed 1 0, horizontal flow. In addition, we have not assigned time levels to the unknowns, Pi (i = 1 ,2 , . . . ) on the left side ofEqs. 8. 1 74 and 8.175 (the explicit or implicit formulation); time levels to the source/sink term, qlsci (explicit or implicit injection/production); or time and iteration levels to the transmissibility terms, TLti±lO (the method of linearization). Therefore, the following analysis is suf­ ficiently general to accommodate all the numerical approxima­ tions discussed for single-phase flow. Eq. 8, 1 74 is written for each gridblock in an grid system, For Gridblock 1 ,

,nx ,

nx

TL'I+V,(P2 - PI) - TU1_V,(PI - Po) + qlscl , . . . . . . . . , . . . . . . . . . (8. 1 76a)

BASIC APPLIED RESERVOIR SIMULATION


For Gridblock 2,

is the backward-difference approximation of the flow rate across the external boundary at xl- 'h (the sign of this term refers to fluid enter­ ing or leaving the grid system). . . . . . . . . . . . . . . . . . . (8. 1 76b)

is the summation of the forward-difference approximations of the flow rates across interior-gridblock boundaries at Xj + 'h (in the posi­ tive i direction).

For Gridblock 3,

Tlx3+'h(P4 - P3) - T1x3_v,(P3 - P2 ) + q/SC3 . . . . . . . . . . . . . . . . . . . (8. 176c)

(

)

Vbnx tP n+1 tP n a Bn/ . CAt Bn+1 / nx _

. . . . . . . . . . . . . . . . . . (8. 176d)

A similar system of equations is generated when Eq. 8. 1 75 is writ­ ten for each gridblock in an fix grid system. Eq. 8 . 1 77 is obtained by adding Eqs. 8 . 1 76a through 8. 1 76d. �

nx ITlxi_v,(Pi - Pi-I) i=2

is the summation of the backward-difference approximations of the flow rates across interior gridblock boundaries at Xi 'h (in the nega­ tive i direction). _

For Gridblock fix,

_ -

T

nx-1 I 1xi+v,(Pi+I - Pi) i=1

ITlxi+v,(Pi+1 - Pi) - ITlxi_v,(Pi - Pi-I) + Iq/SCi i=1 i=1 i=1 . . . . . . . . . . . . (8. 177)

TIxi+v,(Pi+1 - p;),the first term in Eq. 8 . 1 77, is the approxima­ tion to the flow rate in STBID [std m3/d] across the i + Y2 boundary of Gridblock i by use of the forward-difference approximation. Tlxi-v,(Pi - Pi-I) ' the second term in Eq. 1 77, is the approximation to the flow rate in STBID [std m3/d] across the i - Y2 boundary of Gridb10ck i by use of the backward-difference approximation. At any interior gridblock boundary, the flow rate across the boundary is calculated twice, once for each adjacent gridblock that shares the boundary. For example, in the system of linear equations listed, the equation for Gridblock 2 has the term TIx2+v,(P3 - P2 ) ' which is the forward-difference approximation of the flow rate across the gridblock boundary, while the equation for Gridblock 3 has the term, which is the backward-difference approximation of the flow rate across the gridblock boundary. Eq. 8 . 1 77 can be rewritten as

Tb:3-V,(P3 -P2)'

nx-1 + T - Ix1_v,(PI - Po) I Tlxi+v,(Pi+1 - Pi) i=1

is the forward-difference approximation of the flow rate across the external boundary at x nx+v, (the sign ofthis term refers to fluid enter­ ing or leaving the grid system).

is the summation of all production rates from (or injection rates into) the grid system, which is the total production/injection rate imposed on the system.

is the summation of the rate of change of the fluid in place during the time interval At. Because our material-balance checks,lMB (Eqs. 8 . 1 26 and 8 . 1 72) and CMB (Eqs. 8 . 1 27 and 8 . 173), are written for no-flow boundaries, we remove the flow terms across the external boundaries by setting the appropriate transmissibilities to zero. That is, (8. 1 79) Substituting Eq. 8 . 1 79 into Eq. 8.178 results in

[T

T

nx-1 nx RX + I Ixi+v,(Pi+ I - Pi)] - I[ lxi_v,(Pi - Pi-I)] Iq/sCi i=1 i=2 i=1 . . . . . . . . . . . . (8. 1 80)

Manipulating the indices in the first summation of Eq. 8. 1 80 re­ sults in

- i=2I Tlxi_v,(Pi - Pi-I)

T

nx + Ixnx+v,(P nx+1- P nx) + Iq/SCi i=1

. . . . . . . . . . . . (8. 1 8 1) The comparable equation for Eq. 8 . 1 75 can be developed in a sim­ ilar manner and has the form . . . . . . . . . . . . (8. 178)

The physical interpretations of the terms in Eq. 8 . 1 78 follow.

TIx1_v, (PI - Po) NUMERICAL SOLUTION OF SINGLE-PHASE-FLOW EQUATIONS

�{ [ =

]

l �

TIx (i_l) +v. - Tlxi_v. tPi - Pi-Il +

I

1 L [rrl(p7+ - P 7)]. i=1

q/sCi

. . . . . . . . . . . . . . . . (8. 1 82) 199


Eq. 8. 1 8 1 is the final fonn of the summation of the finite-difference equations (Eq. 8.174) for the entire grid system. Because Eq. 8.174 represents the mass-balance equation for the individual gridblocks, Eq. 8 . 1 8 1 is the summation of these mass-balance equations and rep­ resents the mass-balance equation for the grid system in its entirety. We could have developed a mass-balance equation for the entire grid system directly. For no-flow boundary conditions, the expres­ sion of mass balance for the entire system simply implies that the change in mass caused by production/injection must equal the change in mass stored in the system. With the tenninology listed, the mass balance for the entire grid system can be written as

p /sc At c = nx L q ls , ;= 1

[ (

nx cp n + 1 cp n Pisc L Vb, Bn + 1 - Bn I I ;= 1

p /scA t, nx nx [ ( cp n + 1 cp n ) ] L q lsc, = a At L Vb, Bn + 1 - Bn . ;= 1 ;=1

or, after dividing by

)]

. . . . (8. 1 83)

;

as

1

I

c

I

. . . . . . . . (8. 1 84)

;

Comparison of Eqs. 8. 1 8 1 and 8. 1 84 indicates that for the summation of the mass-balance equations of the individual grid­ blocks to equal the mass balance of the grid system in its entirety, the first tenn in Eq. 8. 1 8 1 must equal zero. That is, . . . . . (8. 1 85)

i=

, nx),

In the presence of a pressure gradient ( Pi ;o! Pi - 1 ; 2,3 , . . . the condition specified by Eq. 8 . 1 85 can be guaranteed only if

=

TLx(i - l ) + %

i=

TLxi-\-1

(8. 1 86)

for 2,3 , , nx The physical interpretation of Eq. 8 . 1 85 is that the flow rate across any internal gridblock boundary calculated in the positive direction of one gridblock must equal the flow rate across the boundary calculated in the negative direction ofthe adja­ cent gridblock. Although this conclusion is based on ID analysis, it also holds true in multiple dimensions. For incompressible-flow systems, cp n + 1 /B 7 + 1 must equal cp n /B 7. Consequently, for incom­ pressible systems with no-flow boundaries, the expression for mass balance becomes

nx L q lsc, ;= 1

.

.

i

=

.

i

O.

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (8. 1 87)

(8. 1 88)

B;J,k = A;J,k -I'

(8. 1 89) (8. 1 90)

To this point, we have analyzed the properties of the system of equations resulting from Eq. 8 . 1 74 that yield a material-conserva­ tive fonnulation. In reservoir simulation, however, we are solving the system of equations resulting from Eq. 8. 175. Because Eq. 8 . 1 74 is a direct result of the discretization of the PDE's describing flow through porous media (which was derived by use of mass-conserva­ tion principles), we now must detennine any material-balance error introduced when going from Eq. 8 . 1 74 to Eq. 8 . 1 75. 200

l,�[rr'("''' - p�)l = a1t�[ v (:;:: -�;)J ••

. . . . . . . . . . . . . . . . . . (8. 1 9 1 )

·

I f we equate the groups i n the summation signs tenn b y tenn, we obtain

rz + I(p7 + 1 - p 7 )

i=

�:, (:::: - ::)

=

I

I

. . . . . . . . . . (8. 1 92)

;

for 2,3 , . . . , 1Ix. Eq. 8 . 1 92 is the definition of a material-conser­ vative expansion of the accumulation tenn for single-phase flow. Additional infonnation is provided for multiphase-flow problems in Sec. 9.5. 1 . Example 8.9.

rnI, + 1

Show that the definition o f rz + 1 i n Eq. 8.94,

= Vab,c ( Bnc;cpo+ 1

)

cp ncl + Bt '

I

;

is a material-conservative expansion of the accumulation tenn. What is the advantage of this definition of n: + I? Starting with Eq. 8. 1 92, the definition of a material­ conservative expansion of the accumulation tenn, and adding and sub­ tracting cp n /B 7 + 1 inside the parentheses on the right side results in

Solution.

(

cp n cp n cp n , cp n + 1 rnl, + l ( P n; + 1 - P n); - Vabc Bn + ! - Bn + 1 + Bn + 1 - Bn I I I I _

= vacb, [ cpn +B17 +-1 cpn cpn (_IBj + 1 ·

(Recall the sign convention of negative for production and positive for injection.) The mathematical interpretation of Eq. 8 . 1 85 is that, for a material­ conservative solution to the system of linear equations generated by Eq. 8 . 1 74, the coefficient matrix to the system of equations must be symmetrical. For 3D systems, this requires that

and

Because the left sides of Eqs. 8. 1 8 1 and 8 . 1 82 are identical, we can equate these two equations to obtain

or mI, + l( p nI + 1

_

p �)I

;

. . . . . . . . . . . . . . . . . . (8. 1 93a) _

+

·

)

_

...!..) ] B7

;

. . . . . . . . . . . . . . . . . (8. 1 93b)

By use of the definition of a compressible porous medium, (8.90) we can develop the equation

cp n + 1

_

cp n

= c; cpo[(pn + 1 - pn)].

. . . . . . . . . . . . . . (8. 1 94)

Similarly, by use of the definition of a slightly compressible fluid, . . . . . . . . . . . . . . . . . . . . . . . (8.89) we can develop the equation CI 1 1 ( n + 1 pn) BnI + I - BnI - B Io P - o _

. . . . . . . . . . . . . . . . (8. 1 95)

= Vab,c ( Bnc;cpo+ 1

Substituting Eqs. 8 . 1 94 and 8 . 1 95 into Eq. 8 . 1 93b results in

rnI, + l ( p �I + 1

or rnI, + 1

_

p �)I

- Vab,c ( Bc;7cpo+ 1 _

)

cp ncl + B a ( p �I + 1 I

I

)

cp ncl + Bo , l ;

·

;

_

p �)I

. . . . . . . . . . . . . . . . . . (8. 1 96a) . . . . . . . . . . . . . . . . (8. 1 96b)

which is the desired solution.

BASIC APPLIED RESERVOIR SIMULATION


r7;+ I definition r?;+ I becomes

The advantage of this

d dp

( <<I» B

( q.nBr ++ 11 q.n ) _

""

I

(pr + 1

Br

\.

- pr )

• • • • • •

fluids, Ci

1

• • • • • • • • • • • • • • • ' •

• • • • • • •

.

! .JL (�)D

' dp I

BI

I I I I I I I I I

i

=

0 and

is that for incompressible

. . . . . . . . . . . . . . . . . . . . . . . .

n

This definition of Time Level

+ 1.

(8.200)

q+ I does not contain any parameter evaluated at Consequently, the use of this definition of

rz+ I

for slightly compressible liquids does not require any iteration for the solution of Eq. 8. 1 04 or 8 . 1 1 3 .

Example 8.11. After discretizing the spatial derivatives in the

PDE describing fluid flow through porous media, we obtain the equation

Tb;;+ �(Pi+1 - Pi) - Tb;;_ �(Pi - Pi- ) + q /se; I

( )'

_ Vb1 d tP

- ae dt

p Fig. 8.17-Tangent slopes and chord slope of rplB, In the vicinity of pn + 1 and pn. For a depletion case, pn + 1 < pn. The advantage of this definition of rz+1 is that for an incompress­

ible porous medium,

rz+1

=

�;(���l .

n

This definition of Time Level

c,p = 0 and rz+ I becomes

+

. . . . . . . . . . . . . . . . . . . . . . . . .

(8. 1 97)

rz+ I does not contain any parameter evaluated at r?,+ I

1. Consequently, the use of this definition of

for slightly compressible liquids does not require any iteration for the solution of Eq. 8. 1 04.

Example 8.10. What is the definition of

sion

l/I n +1 /B 7

Solution.

rz+1 when the expres­

is used in the expansion of the accumulation term?

What is the advantage of the resulting definition of

rZ+ I?

Starting with Eq. 8. 1 92, the definition of a material­

conservative expansion of the accumulation term, and adding and sub­

tracting

l/I n +1 /BI

inside the parentheses on the right side results in

(

_ Vb ; l/I n +1 l/I n +1 + l/I n +1 l/I n rnl;+ l( Pin +1 - Pin ) - Bn BiI ac B nI +1 - BiI I I I

)

I

.

. . . . . . . . . . . . . . . . . . . (8. 1 98a)

=

[

(

)

l/I n +1 _ l/I n Vb; tP n + I _ 1 _ ...!. B nI ac B n +1 B nI + I

]

BI

. . . . . . . . . . . . . . . . . . . . . . . . . .

i

We can expand the time derivative (d/dt)(l/I/B I) b y use o f the chain

rule to obtain

=

()

Vb; ..!!.. l/I dp i a e dp B l i dt '

. . . . . . . . . . . . . . . . . . . . . . .

Applying the backward-difference approximation to the derivative of pressure with respect to time results in

n + l ) + q /se; Tb;i+ �( Pin++11 _ Pin + l ) _ Tb;;_ �( Pin +1 _ PiI =

a� � (:J(P?+ I - p?) . td

Solution.

. . . . . . . . . . . . . . .

X

( p? +1 - p? )

=

(

Vb; l/I n + I C I + C�tPO a e Bt B7

.

(8.203)

How is the term (d/dp)(l/I/B I) evaluated to conserve mass?

Inspection of the right side of Eq. 8.203 indicates that

it is already in the form

rnI;+1

=

()

rz+ l (p7 + I - p?),

Vb; ..!!.. t . ae dp B I i

where

. . . . . . . . . . . . . . . . . . . . . . .

(8.204)

Starting with the definition of a material-conservative expansion of the accumulation term,

(

)

_ Vb ; tP n +1 tP n rnl;+ l ( Pin +1 - Pin ) ae BnI +1 - B nI '

i

i

. . . . . . . . .

(8.205)

. (8. 1 98b) . . . . . . . .

Substituting Eqs. 8 . 1 94 and 8 . 1 95 from Example 8.9 into Eq. 8 . 1 98b

rnI;+ l ( p I� +1 _ p �I )

(8.202)

and substituting Eq. 8.205 into the right side of Eq. 8.203 results in

. . . . . . . . . . . . . . . . . .

results in

(8.20 1 )

).

(8.206b)

In Eq. 8.206b, we have replaced the equal sign with an approxima­ tion sign because the right side of this expression represents the

I

chord slope between

l/I n + I /B 7 +1 and l/ln/B,/, not the tangent slope.

Fig. 8.17 illustrates this.

. . . . . . . . . . . . . . . . . . . . . . . . . . (8. 1 99a)

Fig. 8 . 1 7 shows the chord slope defined by Eq. 8 .206b and the tangent slopes (derivatives) evaluated at

p? and p? + I .

The results

from this example indicate that the approximate derivative (chord . . . . . . . . . . . . .

(8. 1 99b)

NUMERICAL SOLUTION OF SINGLE-PHASE-FLOW EQUATIONS

slope defined by Eq. 8.206b) yields a material-conservative finite­ difference formulation, while the exact derivative (tangent slope)

20 1


B-2

B-1

TABLE 8.3-WELL INFORMATION FOR INCOMPRESSIBLE­ FLUID-FLOW EXERCISE Radius

<

Block

Type

W-2

(9,3)

Producer

W-3

(4,4)

Injector

Well

+

Specification

0.25

P.vt = 5,600.0 psia

0.25

'lsc = 2,600.0 STBID

which is the equation of a straight line (¢ is constant). The condition of linearity would also hold for a compressible porous medium con­ taining an incompressible fluid. In this case, (8.209)

8.6 Chapter Project

B-4

B-3

Fig. 8.1 8-A-1 reservoir studied as a single-phase reservoir with only two wells.

evaluated at either or + I does not yield a material-conservative finite-difference formulation. In general, this is because

p7 p7

. . . . . . . . . . . . . . . . . . . (8.207) One exception to this inequality is when ¢ / I is linear in pressure. This would occur, for example, in an incompressible porous me­ dium containing a slightly compressible fluid. In this case,

B

................."

(8.208)

This chapter examines the numerical solution of the single-phase­ flow equations for incompressible, slightly compressible, and com­ pressible fluids. In this section, the A- I reservoir is studied as a single­ phase reservoir. First, an incompressible liquid is considered in the A- I reservoir and a numerical solution for the pressure distribution is obtained. The system is perturbed by two wells (W-2 and W-3) through flow-rate and sandface-pressure specifications at the well locations shown in Fig. 8.18. As a second problem, the A- I reservoir is studied by considering a slightly compressible liquid. The final ex­ ercise for the A- I reservoir in this chapter involves the treatment of the system as a single-phase real-gas (compressible fluid) reservoir. Single-Phase Incompressible Flow. Consider the A- I reservoir

with the two wells shown in Fig. 8. 1 8 . Assume the entire reservoir is 100% filled with an incompressible liquid (presumably water). The viscosity of the liquid is 1 .0 cp and FVF is I RB/STB . The outer boundaries of the reservoir are completely sealed. Fig. 8.19 gives the constant part of the transmissibility terms f3 (A x kx/ Ax) and f3c(Ay ky/ Ay). Note the zero entries on the extreme right and on the extreme bottom of the x- and y-direction transmissibility arrays, re­ spectively, which signify the existence of no-flow boundaries. Table 8.3 shows the well specifications for this exercise. The in­ jected- and produced-fluid properties are assumed to be the same. Fig. 8.20 gives the steady-state pressure distribution as calculated with an iterative solver with a pressure convergence criterion of I x 10 - 5 psi. c

X-DIRECTION TRANSMISSIBILITIES (CONSTANT PART)

*******

3 .52 1 5.450 7.887 1 .78 3

3 . 1 74 8 . 1 65 9.830 10.766 2.9 1 3

1 .7 1 1 4.370 7.332 1 1 .325 4.529

* * * . * * * * * * * * * * . * ** . *

0 .000 1 . 834 5 .448 1 0.537 9.739 2.230

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ** * * * * * *

0.000

3.998 9.42 1 10.240 4 .037

* * * * * * * * * * . * * * * * ****** ** * * * * * * * * * * .

****************** *

2. 1 1 8 6.341 6.223 3 .42 3 0.833

* * * * * * . * * * * * * * * * * * * * * * . * * * * * . * * * * *• • * * * * * * . * * ********* *.* *.*************.***.*• • •***

1 .755

2.696 5 .958 3.790

4.836 3.728

1 .699

1 .285

0.902 1 . 138

0.000 0.99 5 0. 820

0.802

0.848 2.207 4.707 2.233

0.525

0 . 000 1 .435 3 .063 0 .000 0. 000

*******••••••

0 . 693 0.964

0.000 0.000

** • • • * • • • • • •

******.**•••

. * • • * . * *• • • • * * * * * . * * * * * * * *

0.000 0. 000

* * * * * ** * * * * * * * * * * * *

* . * . * ** * * * * * * * * * * * *

V-DIRECTION TRANSMISSIBILITIES (CONSTANT PART)

******

2.700 3. 974 1.910 0.000

4.279 12.495 10.847 5.008 0.000

4.555 1 0.392 1 0.459 5.209 0.000

* . * * * • • * . * *• • • * * • • * * *

2.249 7 .266 1 2.267 1 3 .999 7.088 0. 000

* * * * * * * * . * * * * * •• * * . * * * * * * * * .* * • • • • • * * * * * * * * * * * * * * * * • • •

2.867 8. 1 80 1 1 .445 10.3 1 8 0.000

* . * • • * • • • * • • • • • • * • • • ** • • • * • • • * • • • •

. * • • ** • • * •• * * * . * * * * * *

7.034 1 1 .347 1 3.099 2.967 0.000

* . * * *********.******************.*** • •***

* • • * * * * * * * * . * • • * * *• • • *• • • • • •* . * *• • * • • * * . *

9 . 1 67 15.822 1 8.395 10.371 5 . 3 43 2.347 0.000

8 .380 10. 1 00 7 . 850 4.949 3 .67 1 2.396 0.000

1 .6 3 1 4.595 4.826 2.834 0.000

3 .721 7.225

6.662

2.943 0.000

• • •* * * *• •* • • •

2.432

1 . 296 0.000

• •* * * . * . * * * *

0.000

* * * . * . * . * * ••

*******************.**.**.

0.5 1 7 0.000

************.******

*••••••••••••••••••

Fig. 8.1 9-Constant parts of the x- and y-direction transmissibilities for the A-1 reservoir grid­ blocks. Transmissibilities are reported for the positive x and y directions only. 202

BASIC APPLIED RESERVOIR SIMULATION


STEADY-5TATE PRESSURE DISTRIBUTION , psla

** •••• *

7 1 77 . 9 7 1 78. 1 7178. 1 7 1 S0.7 7 174 . 8

7 1 78 . 0 7176.5 7 175. 1 718 1.6 7 163.5

7 1 73.0 7 16 8 . 1 7 179.0 7 1 69.5 7 197.6 7182.4 7 1 3 7.9 7178.9 . * . * ** * * * * * * * * * * ** * * * * 7 m.3

7 1 78 . 9

•••••••• *.* • • • * * .* * .* ••• * •• * •••••••••• • • • • • • • • • • • • • • • • • • • •

7 1 22.4 7095.4 7084.2 7057 . 1 7036.0

.* • • • • * • • *.*.* ••• **.**

698 7 . 2 698 1 .4 6970.6 6955.3 * •• ****** * * * * ** * * * . * • • * * • • * * * * * * * * * * * 6923. 3

68 1 1 .5 6825.3 6 8 3 7.5 6837.4 6825.2 * * * * * * * ** * * * * * * * * * * * * . * • • • • ** • • • • *** •• * • • • • * . 6 809. 7 * •• *.* • • * • • * • • •• • • • • * . . . . . . . . . . . . . . . . . . . . . . . . 6 809 .4

6548.4 6610. 1 6653.1 6684. 3 67 1 7.6 6737. 4 6736.7

6237. 1 61 S6.4 6444.6 6524.3 6558.9

6329.9 6347.5 6402.5 6436.3 6453.2

* * •• * * . * * * * . *

6373.4 6388.1

6375.8 6388.0

* * . * * * * * * . * **

*•••*.*****.*

• • • • • • • ••••••• **.*.**.******

6737.0 6735.4

* * . * . * • •* . ** • • • •••• • * ••••••••••**•••••••••

Fig. 8.20-8teady-state pressure distribution in the A-1 reservoir. TABLE 8.4-SUMMARY OF WELL RESULTS FOR INCOMPRESSIBLE-FLOW EXERCISE Wellblock Pressure

Productivity Index*

Flow Rate

(STB/D-psi)

(STB/D)

(psia)

Sandface Pressure

Wen

Type

(psia)

W-2

Producer

6, 1 86.4

4.434

- 2,600.0044**

5,600.Ot

W-3

Injector

7 , 1 97.6

1 2.41 6

2,600.0000t

7,406.9**

* F= I/2 and s = O "Calculated tSpecHied

TABLE 8.S-WELL INFORMATION FOR SLiGHTLYCOMPRESSIBLE-FLUID-FLOW EXERCISE

TABLE 8.6-SLIGHTLY-COMPRESSIBLE-FLUID PROPERTIES ( UNDERSATURATED CONDITIONS) q" pSi - 1

Radius

Wen

Block

Type

W-2

(9,3)

Producer

W-3

(4,4)

Producer

-.J!!L

Specification

0.25

<1sc = - 650.0 STB/D

0.25

Pwt = 5,6oo.0 psia

As Fig. 8.20 shows, the left side of the A- I reservoir is at a higher pressure than the right side of the reservoir. This is to be expected because the injection well is providing pressure support to the pro­ duction well. This is highlighted with a pressure of 7, 1 97.6 psia in the injection gridblock and a pressure of 6, 1 86.4 psia in the produc­ tion gridblock. In calculating this pressure distribution, the hydro­ static head caused by the depth gradients is taken into consideration. In addition to the pressure distribution in the reservoir, there is one unknown to be determined at each well location. Because the Well W-2 flowing sandface pressure VJwf = 5,600 psia) is specified (Table 8.4), the production rate from Well W-2 needs to be deter­ mined. Similarly, an injection rate of 2,600 STBID is specified at Well W-3; therefore, the well sandface injection pressure becomes the unknown. Table 8.4 summarizes these results and provides other relevant information.

Because the fluid is treated as an incompressible liquid and the reservoir is completely sealed, similar injection and production rates are expected to be calculated. In fact, this is exactly what is re­ ported in Table 8.4. The calculated production rate is only 4.4 X 10 3 STBID different from the specified injection rate of 2,600.0 STBID. The material-balance error is 0.00017%. This high­ accuracy check results from the very fine convergence criterion used within the equation solver. At the injection well, a sandface pressure of 7,406.9 psia is calculated. -

9.0 x 1 0 - 6

eo , lb m!ft3

80, RB/STB

52.4 1 1[1 + 9.0 x 1 0 - 6(p - 1 4.7)] Oil Viscosity Data

Pressure (psia)

Viscosity (cp)

4,500

0.91 80

5,000

0.9200

5,500

0.9243

6,000

0.9372

6,500

0.9494

7,000

0.9650

7,500

0.98 1 2

8,000

1 .001 9

Single-Phase Slightly Compressible Flow. In this exercise, the A- I reservoir is treated as a single-phase slightly-compressible-liq­ uid reservoir. This corresponds to an oil reservoir at undersaturated conditions. Again, only two active wells are considered (W-2 and W-3). Table 8.5 gives the well information for this exercise. The initial pressure distribution at t = 0 is 7,750 psia. This condition is enforced by assuming that all gridblocks initially are at this pressure irrespective of their elevations with respect to a datum plane. Table 8.6 gives the fluid properties for the undersaturated conditions. The simulation study was conducted with a timestep size of 1 day for a total of 60 days. Within the iterative solver a convergence crite-

PRESSURE DISTRIBUTION AT 60 DAYS , pSia

**.....

5478.8 5477.7 5479.8 5477.4

5479.5 5478. 1 5476.2 5476.2 5473.7

5480.2 5476.9

5477 .9

• • • • • • • * .... * • • •* • • ***.* •• *** • • • • ***.*** • • * * * * * * * * * * . * * • • *

5473 . 9

5465. 1

5468.3 5463.0 5459 . 8 5456 . 6

5460.7 5455.4 545 1 .5 5445 .4

53 1 2.0 5335 .0 • • • • • • •• • • • • • 5370.5 5296.6 5335.6 5343.3 5348.4 5384.0 5352.5 5347.2 5345 . 4 5347.6 539 1 . 1 5367.3 535 1 .4 • • • • • • • • • • • • • • 5395.4 5372.3 5353 . 5 ............. . 5401.8 ••••• * •• * • • • • • • • * • • • • • • • • * • • • 5 406 .5 5408.3 • • • • •• **** • • • • * . * . * * * 5407 . 7 5408.7 • • * * •• ** • • * * • • * * * • • • •

******* * * * . * * •••••••••

54 1 5.8 5420.7 5423.8 •••• * • • * * • • • • • • • • • • • *. 5422.4 *.* • • • • * * • • • • • * ••• *.**.* ••••••••••• *. 54 1 9.4 • • * * . * . * * * . * • • • • * . * • • • • • • * • • *• • • • • •* * • • • • **** 54 1 8 .9 .*** .* * * • • • * * * * * . * . * * * **.*.**• • • • • •****.* •••• 5420. 4 547 1 .6 5469.9 5466.6

5444.7 5446. 1 5442.4 5437.8 5430.7

Fig. 8.21 -Pressure distribution in the A-1 reservoir (slightly-compressible-fluid study).

NUMERICAL SOLUTION OF SINGLE-PHASE-FLOW EQUATIONS

203


TABLE 8.7-WELL·REPORT OUTPUT FOR SLiGHTLY·COMPRESSIBLE·FLOW EXERCISE Productivity Index (STBID-psi) Time (days)

Wellblock Pressure (psia)

W-2

W-3

(9,3)

Sandface Pressure (psia)

(4,4)

W-2

W-3

W-2

W-3

Cumulative Production (STB) Field

4.783

1 3.393

7,641 .23

7,01 2.80

7,505.33

5,600.00

650.00

1 8,921 .70

1 9,571 .70

2

4.800

1 3.670

7,559.01

6,771 . 1 4

7,423.60

5,600.00

650.00

1 6,009.89

36,231 .59

3

4.81 3

1 3.750

7,462.67

6,61 5.36

7,327.63

5,600.00

650.00

1 3,96 1 .21

50,842.80

4

4.827

1 3.802

7,354.77

6,494.22

7,220. 1 2

5,600.00

650.00

1 2,341 .84

63,834.64

5

4.840

1 3.842

7,240.56

6,394.68

7,1 06.27

5,600.00

650.00

1 0,999.98

75,484.62

6

4.854

1 3.866

7 , 1 24.24

6,31 0.95

6,990.33

5,600.00

650.00

9,857.81

85,992.44

7

4.868

1 3.886

7,008.78

6,239. 1 5

6,875.25

5,600.00

650.00

8,875 . 1 4

95,51 7.58

8

4.882

1 3.903

6,896.21

6 , 1 76.79

6,763.08

5,600.00

650.00

8,01 9. 1 7

1 04 , 1 86.75

9

4.895

1 3.91 8

6,787.88

6 , 1 22.03

6,655 . 1 0

5,600.00

650.00

7,265.69

1 1 2, 1 02.44

10

4.908

1 3.931

6,684.61

6,073.48

6,552. 1 8

5,600.00

650.00

6,596.29

1 1 9,248.73

11

4.920

1 3.943

6,586.88

6,030. 1 1

6,454.77

5,600.00

650.00

5,997.06

1 25,995.78

12

4.932

1 3.954

6,494.89

5,991 .09

6,363. 1 0

5,600.00

650.00

5,457. 1 3

1 32, 1 02.91

13

4.943

1 3.963

6,408.69

5,955.79

6,277. 1 9

5,600.00

650.00

4,968. 1 2

1 37,721 .03

14

4.950

1 3.973

6,328. 1 5

5,923.73

6 , 1 96.85

5,600.00

650.00

4,523.40

1 42,894.44

15

4.957

1 3.981

6,253.09

5,894.49

6 , 1 2 1 .97

5,600.00

650.00

4 , 1 1 7.43

1 47,661 .88

16

4.964

1 3.989

6 , 1 83.28

5,867.77

6,052.33

5,600.00

650.00

3,745.82

1 52,057.70

17

4.970

1 3.996

6 , 1 1 8.46

5,843.27

5,987.66

5,600.00

650.00

3,404.93

1 56, 1 1 2.64

18

4.975

1 4.003

6,058.33

5,820.79

5,927.68

5,600.00

650.00

3,09 1 .69

1 59,854.33

19

4.980

1 4.009

6,002.61

5,800. 1 2

5,872 . 1 0

5,600.00

650.00

2,803.47

1 63,307.80

20

4.985

1 4.01 4

5,951 .02

5,781 . 1 0

5,820.63

5,600.00

650.00

2,538.03

1 66,495.83

21

4.990

1 4.020

5,903.27

5,763.58

5,773.01

5,600.00

650.00

2,293.35

1 69,439 . 1 7

22

4.995

1 4.024

5,859. 1 1

5,747.44

5,728.97

5,600.00

650.00

2,067.68

1 72 , 1 56.86

23

4.999

1 4.029

5,81 8.28

5,732.55

5,688.25

5,600.00

650.00

1 ,859.47

1 74,666.33

24

5.003

1 4.033

5,780.53

5,71 8.81

5,650.60

5,600.00

650.00

1 ,667.28

1 76,983.61

25

5.006

1 4.036

5,745.65

5,706. 1 4

5,61 5.82

5,600.00

650.00

1 ,489.85

1 79 , 1 23.47

26

5.01 0

1 4.040

5,71 3.42

5,694.45

5,583.67

5,600.00

650.00

1 ,326.02

1 81 ,099.48

27

5.0 1 3

1 4.043

5,683.65

5,683.65

5,553.98

5,600.00

650.00

1 , 1 74.72

1 82,924.20

28

5.01 6

1 4.046

5,656. 1 4

5,673.69

5,526.55

5,600.00

650.00

1 ,034.98

1 84,609. 1 9

29

5.Q1 8

1 4.048

5,630.74

5,664.49

5,501 .22

5,600.00

650.00

905.92

1 86, 1 65 . 1 1

30

5.021

1 4.051

5,607.29

5,655.99

5,477.83

5,600.00

650.00

786.73

1 87,601 .84

=

rion of 0.0 1 psi was used. Fig. 8.21 gives the pressure distribution in the reservoir at t 60 days. Close inspection of Gridblocks (9,3) and (4,4) shows the forma­ tion of the two pressure sinks. Table 8.7 gives a summary of the re­ sults at the end of each timestep for 60 consecutive timesteps. It is interesting to note that, at a bottomhole-pressure specification of 5,600 psia, Well W-3 produces for approximately 40 days. At the 40th day, the well gets shut in. This is the reason that the sandface and wellblock pressures for Well W-3 are approximately equal. Similarly, the wellblock pressure for Well W-3 is very close to the specified flowing sandface pressure at 39 days (5,603.59 vs. 5,600). This small pressure drawdown (3.59 psi) creates a flow rate of 50.53 STBID at t 39 days. During the next timestep, the grid­ block pressure for Gridblock (4,4) is much closer to the specified sandface pressure of 5,600 psia, which indicates that Well W-3 is not capable of producing under the imposed pressure specification of 5,600 psia. The pressure drop, with respect to time, observed in Wellblock (4,4) after Well W-3 is shut in is caused by production from Well W-2, which continues to produce at a rate of 650 STBID.

=

t=

Pwf=

Single-Phase Compressible Flow. In this exercise, the A- I reser­

voir is treated as a single-phase gas reservoir. To make the problem 204

Flow Rate (STBlD)

more compatible with gas reservoirs at the onset, the x- and y-direc­ tion permeabilities are reduced two orders of magnitUde by dividing each gridblock permeability by 1 00. Wells W-2 and W-3 are the two active wells in the A- I gas reservoir. Table 8.8 provides the relevant well information. The initial formation pressure is assumed to be distributed uni­ formly throughout the reservoir at 7,750 psia. Table 8.9 gives in­ formation on reservoir-fluid properties used in this single-phase compressible-flow exercise. Total simulation time is considered to be 1 00 days. Again, both wells are put on production at the same time. During the first 5 days of simulation, a timestep of 1 day is used. For the remainder of the study, the timestep size is kept at 5 days. Within the iterative solver a pressure convergence criterion of 0.00 1 psi is applied. Fig. 8.22 gives the calculated pressure distributions at the end of 5 days and 1 00 days of production. Again, Wellblocks (9,3) and (4,4) exhibit the lowest pressure lev­ els compared with their respective neighboring gridblocks at t 5 days and 1 00 days. As one moves away from these wellblocks, pressure values increase.

t=

=

BASIC APPLIED RESERVOIR SIMULATION


TABLE S.7-WELL-REPORT OUTPUT FOR SLIGHTLY-COMPRESSIBLE-FLOW EXERCISE (continued ) Productivity I ndex (STB/D-psi) lime (days)

W-2

W-3

31

5.023

32

5.025

33 34

Wellblock Pressure (psia)

Sandface Pressure (psia) W-2

Flow Rate (STB/D)

Cumulative Production (STB)

W-3

W-2

W-3

Field

5,456.22

5,600.00

650.00

676.63

1 88,928.48

5,436.28

5,600.00

650.00

574.95

1 90,1 53.44

5,41 7.86

5,600.00

650.00

481 .04

1 91 ,284.47

5,400.85

5,600.00

650.00

394.29

1 92,328.77

5,622.34

5,385 . 1 5

5,600.00

650.00

3 1 4. 1 8

1 93,292.95

5,499.82

5,61 7.08

5,370.65

5,600.00

650.00

240.21

1 94, 1 83. 1 6

5,486.41

5,61 2.22

5,357.27

5,600.00

650.00

1 71 .88

1 95,005.03

1 4.065

5,474.02

5,607.73

5,344.88

5,600.00

650.00

1 08.79

1 95,763.83

1 4.066

5,462.58

5,603.59

5,333.45

5,600.00

650.00

50.53

1 96,464.36

5.034

1 4.067

5,452.02

5,599.77

5,322.88

5,600.00

650.00

0.00

1 97, 1 1 4.36

41

5.034

1 4.067

5,442. 1 8

5,594.23

5,31 3.05

5,594.23

650.00

0.00

1 97,764.36

42

5.034

1 4.067

5,432.93

5,588.24

5,303.81

5,588.24

650.00

0.00

1 98,41 4.36

43

(9,3)

(4,4)

1 4.053

5,585.62

5,648. 1 5

1 4.055

5,565.62

5,640.91

5.027

1 4.057

5,547. 1 5

5,634.22

5.029

1 4.059

5,530. 1 0

5,628.05

35

5.031

1 4.061

5,51 4.36

36

5.032

1 4.062

37

5.034

1 4.064

38

5.034

39

5.034

40

5.034

1 4.067

5,424. 1 5

5,581 .97

5,295.02

5,581 .97

650.00

0.00

1 99,064.36

44

5.034

1 4.067

5,41 5.72

5,575.49

5,286.59

5,575.49

650.00

0.00

1 99,71 4.36

45

5.034

1 4.067

5,407.56

5,568.85

5,278.44

5,568.85

650.00

0.00

200,364.36

46

5.034

1 4.067

5,399.63

5,562.09

5,270.50

5,562.09

650.00

0.00

201 ,01 4.36

47

5.034

1 4.067

5,391 .87

5,555.23

5,262.44

5,555.23

650.00

0.00

201 ,664.36

48

5.034

1 4.067

5,384.23

5,548.31

5,255. 1 1

5,548.31

650.00

0.00

202,31 4.36

49

5.034

1 4.067

5,376.70

5,541 .33

5,247.58

5,541 .33

650.00

0.00

202,964.36

50

5.034

1 4.067

5,369.25

5,534.30

5,240. 1 3

5,534.30

650.00

0.00

203,61 4.36

51

5 .034

1 4.067

5,361 .86

5,527.24

5,232.74

5,527.24

650.00

0.00

204,264.36

52

5.034

1 4.067

5,354.52

5,520. 1 5

5,225.40

5,520. 1 5

650.00

0.00

204,91 4.36

53

5.034

1 4.067

5,347.22

5,51 3.05

5,2 1 8. 1 0

5,51 3.05

650.00

0.00

205,564.36

54

5.034

1 4. 067

5,339.94

5,505.93

5,21 0.82

5,505.93

650.00

0.00

206,21 4.36

55

5.034

1 4.067

5,332.69

5,498.79

5,203.57

5,498.79

650.00

0.00

206,864.36

56

5.034

1 4.067

5,325.46

5,491 .65

5 , 1 96.34

5,491 .65

650.00

0.00

207,51 4.36

57

5.034

1 4.067

5,31 8.24

5,484.50

5 , 1 89. 1 2

5,484.50

650.00

0.00

208 , 1 64.36

58

5.034

1 4.067

5,31 1 .03

5,477.35

5 , 1 8 1 .91

5,477.35

650.00

0.00

208,81 4.36

59

5.034

1 4.067

5,303.82

5,470. 1 9

5 , 1 74.71

5,470. 1 9

650.00

0.00

209,464.36

60

5.034

1 4.067

5,296.63

5,463.02

5, 1 67.51

5,463.02

650.00

0.00

2 1 0 , 1 1 4.36

Table S.10 is the summary report provided by the output subrou­ tine of the model. In this report, the changes in pressure and produc­ tion rates encountered as the simulation progresses can be tracked. The accuracy of the calculations is monitored throughout the sim­ ulation by 1MB checks. Fig. S.23 shows excellent 1MB checks throughout the simulation period. The maximum material-balance error is 0.04%, which occurs at t = 3 days.

TABLE S.S-WELL INFORMATION FOR COMPRESSIBLE-FLUID-FLOW EXERCISE Well

Block

Type

Radius (ft)

Specification

W-2

(9,3)

Producer

0.25

C1sc = - 3 M Mscf/D

W-3

(4,4)

Producer

0.25

Pwf = 6,OOO psia

Exercises

S.l. Consider the ID, single-phase, incompressible flow of oil taking place in the z direction of the system in Fig. S.24 with the gridblock properties given in Table 8.11. The boundary conditions are as follows. 1 . Pressure of the production gridblock (Gridblock 4) is main­ tained at 1 ,000 psia. 2. No-flow boundary at the top of the system. 3. Pressure of the gridblock located at the constant-pressure boundary (Gridblock 1 ) is maintained at 5,000 psia. The fluid properties are = 2 cp, P o = 50 Ibrnlft3 , and = 1 .0 RBI STB. With the appropriate PDE and its finite-difference approxima­ tion, calculate the pressure distribution in the system.

Ito

Bo

NUMERICAL SOLUTION OF SINGLE-PHASE-FLOW EQUATIONS

8.2. Consider the ID, single-phase, steady-state flow of water taking place in the horizontal, homogeneous reservoir shown in Fig. 8.2S.

The gridblock and fluid properties are !u = 400 ft, w = 200 ft, h = 80 ft, = 60 md, lt w = 0.5 cp, and Bw = 1 RBIB. The boundary condi­ tions are as follows. 1 .No-flow boundaries. 2. Well in Gridblock 1 produces at a rate of 400 BID. 3. Pressure of injection Gridblock 4 is 3,600 psia. Calculate the pressure of all gridblocks with the PSOR solution method with w = 1 .5 and a pressure convergence criterion of 3 psi. Use P I = 3,000 psia, P2 = 3,200 psia, and P3 = 3,400 psia for initial guesses.

kx

205


TABLE B.9-RESERVOIR AND COMPRESSIBLE-FLUID PROPERTIES Reservo i r temperature , of

1 90

Standard temperature, O F

60 1 4.7

Standard pressure, psia Gas molecular weight, Ibm/lbm·mol

22.836

Pseudocritical temperature, oR

4 1 8.38

Pseudocritical pressure, psia

738 .44 0.058359

Gas density at standard conditions, Ibm/ft3 FVF

Bg =

(pscTz)j(a cTsap)

Gas Viscosity Data Viscosity (cp)

Pressure (psia)

3,500

0.0222403

4,000

0.024 1 1 28

4,500

0.0259745

5,000

0 .0278092

5 , 500

0.0296024

6 , 000

0.031 34 1 1

6 , 500

0.0330 1 43

7,000

0 .0346 1 33

7,500

0 . 036 1 31 8

8,000

0.0375660

I . Pressure in Gridblock 1 is maintained at 3,000 psia. 2. Production rate from Gridblock 2 is specified as 1 ,000 STBID. 3. The pressure gradient at the extreme right of the system is given as 0.2 psi/ft. The fluid properties are #0 = 2 cp and Bo = 1 RB/STB . With the ap­ propriate PDE and its finite-difference approximation, calculate the pressure distribution in the system.

8.5. Consider the incompressible-fluid-now problem in the hetero­ geneous, anisotropic porous medium shown in Fig. 8.28. The nuid properties for this problem are # = I cp and p = 62.4 Ibm/ft3 . Table 8.13 shows the gridblock properties. Ignoring the potential gradient,

calculate the pressure distribution in the system and determine the nature of the boundary condition on the lowest z boundary of the system. Quantify the boundary conditions and provide the dimen­ sionality of the problem; boundary conditions are as follows. 1 . All boundary planes perpendicular to the z direction except the bottom plane of Gridblock I , which is the unknown of the problem, are no-flow boundaries. 2. All boundary planes perpendi