Advanced Petroleum Reservoir Simulation www.ebook3000.com Scrivener Publishing 100 Cummings Center, Suite 541J Beverly, MA 01915-6106 Publishers at Scrivener Martin Scrivener (martin@scrivenerpublishing.com) Phillip Carmical (pcarmical@scrivenerpublishing.com) www.ebook3000.com Advanced Petroleum Reservoir Simulation Towards Developing Reservoir Emulators Second Edition M R Islam, M E Hossain, S H Moussavizadegan, S Mustafiz, J H Abou-Kassem www.ebook3000.com Copyright © 2016 by Scrivener Publishing LLC All rights reserved Co-published by John Wiley & Sons, Inc Hoboken, New Jersey, and Scrivener Publishing LLC, Salem, Massachusetts Published simultaneously in Canada No part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning, or otherwise, except as permitted under Section 107 or 108 of the 1976 United States Copyright Act, without either the prior written permission of the Publisher, or authorization through payment of the appropriate per-copy fee to the Copyright Clearance Center, Inc., 222 Rosewood Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 750-4470, or on the web at www.copyright.com Requests to the Publisher for permission should be addressed to the Permissions Department, John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ 07030, (201) 748-6011, fax (201) 748-6008, or online at http://www.wiley.com/go/permission Limit of Liability/Disclaimer of Warranty: While the publisher and author have used their best efforts in preparing this book, they make no representations or warranties with respect to the accuracy or completeness of the contents of this book and specifically disclaim any implied warranties of merchantability or fitness for a particular purpose No warranty may be created or extended by sales representatives or written sales materials The advice and strategies contained herein may not be suitable for your situation You should consult with a professional where appropriate Neither the publisher nor author shall be liable for any loss of profit or any other commercial damages, including but not limited to special, incidental, consequential, or other damages For general information on our other products and services or for technical support, please contact our Customer Care Department within the United States at (800) 762-2974, outside the United States at (317) 572-3993 or fax (317) 572-4002 Wiley also publishes its books in a variety of electronic formats Some content that appears in print may not be available in electronic formats For more information about Wiley products, visit our web site at www.wiley.com For more information about Scrivener products please visit www.scrivenerpublishing.com Cover design by Kris Hackerott Library of Congress Cataloging-in-Publication Data: ISBN 978-1-119-03851-1 Printed in the United States of America 10 www.ebook3000.com Authors would like to dedicate this book to their teacher and 'grand teacher', Professor S.M Farouq Ali, Encana/Petroleum Society Chair Professor at the University of Calgary www.ebook3000.com Contents Preface xv Introduction 1.1 Summary 1.2 Opening Remarks 1.3 The Need for a Knowledge-Based Approach 1.4 Summary of Chapters Reservoir Simulation Background 2.1 Essence of Reservoir Simulation 2.2 Assumptions Behind Various Modeling Approaches 2.2.1 Material Balance Equation 2.2.2 Decline Curve 2.2.3 Statistical Method 2.2.4 Analytical Methods 2.2.5 Finite-Difference Methods 2.2.6 Darcy’s Law 2.3 Recent Advances in Reservoir Simulation 2.3.1 Speed and Accuracy 2.3.2 New Fluid-Flow Equations 2.3.3 Coupled Fluid Flow and Geo-Mechanical Stress Model 2.3.4 Fluid-Flow Modeling Under Thermal Stress 2.4 Memory Models 2.4.1 Thermal Hysteresis 2.4.2 Mathematical and Numerical Models 2.5 Future Challenges in Reservoir Simulation 2.5.1 Experimental Challenges 2.5.2 Numerical Challenges 2.5.2.1 Theory of Onset and Propagation of Fractures due to Thermal Stress 2.5.2.2 Viscous Fingering during Miscible Displacement www.ebook3000.com 1 2 10 11 12 13 15 16 19 19 19 21 26 29 31 32 32 33 33 35 35 36 vii viii Contents Reservoir Simulator-Input/Output 3.1 Input and Output Data 3.2 Geological and Geophysical Modeling 3.3 Reservoir Characterization 3.3.1 Representative Elementary Volume, REV 3.3.2 Fluid and Rock Properties 3.3.2.1 Fluid Properties 3.3.3 Rock Properties 3.4 Upscaling 3.4.1 Power Law Averaging Method 3.4.2 Pressure-Solver Method 3.4.3 Renormalization Technique 3.4.4 Multiphase Flow Upscaling 3.5 Pressure/Production Data 3.6 Phase Saturations Distribution 3.7 Reservoir Simulator Output 3.8 History Matching 3.8.1 History-Matching Formulation 3.8.2 Uncertainty Analysis 3.8.2.1 Measurement Uncertainty 3.8.2.2 Upscaling Uncertainty 3.8.2.3 Model Error 3.8.2.4 The Prediction Uncertainty 3.9 Real-Time Monitoring Reservoir Simulators: Problems, Shortcomings, and Some Solution Techniques 4.1 Multiple Solutions in Natural Phenomena 4.1.1 Knowledge Dimension 4.2 Adomian Decomposition 4.2.1 Governing Equations 4.2.2 Adomian Decomposition of Buckley-Leverett Equation 4.2.3 Results and Discussions 4.3 Some Remarks on Multiple Solutions Mathematical Formulation of Reservoir Simulation Problems 5.1 Black Oil Model and Compositional Model 5.2 General Purpose Compositional Model 5.2.1 Basic Definitions 5.2.2 Primary and Secondary Parameters and Model Variables www.ebook3000.com 39 40 42 45 46 49 49 54 58 59 60 62 63 65 66 68 70 72 75 76 78 79 80 81 85 87 90 104 106 108 111 114 117 119 120 120 122 Contents ix 5.2.3 Mass Conservation Equation 5.2.4 Energy Balance Equation 5.2.5 Volume Balance Equation 5.2.6 The Motion Equation in Porous Medium 5.2.7 The Compositional System of Equations and Model Variables 5.3 Simplification of the General Compositional Model 5.3.1 The Black Oil Model 5.3.2 The Water Oil Model 5.4 Some Examples in Application of the General Compositional Model 5.4.1 Isothermal Volatile Oil Reservoir 5.4.2 Steam Injection Inside a Dead Oil Reservoir 5.4.3 Steam Injection in Presence of Distillation and Solution Gas The Compositional Simulator Using Engineering Approach 6.1 Finite Control Volume Method 6.1.1 Reservoir Discretization in Rectangular Coordinates 6.1.2 Discretization of Governing Equations 6.1.2.1 Components Mass Conservation Equation 6.1.2.2 Energy Balance Equation 6.1.3 Discretization of Motion Equation 6.2 Uniform Temperature Reservoir Compositional Flow Equations in a 1-D Domain 6.3 Compositional Mass Balance Equation in a Multidimensional Domain 6.3.1 Implicit Formulation of Compositional Model in Multidimensional Domain 6.3.2 Reduced Equations of Implicit Compositional Model in Multidimensional Domain 6.3.3 Well Production and Injection Rate Terms 6.3.3.1 Production Wells 6.3.3.2 Injection Wells 6.3.4 Fictitious Well Rate Terms (Treatment of Boundary Conditions) 6.4 Variable Temperature Reservoir Compositional Flow Equations 6.4.1 Energy Balance Equation www.ebook3000.com 125 128 133 134 139 141 141 143 146 146 148 150 155 156 157 158 158 166 168 170 175 178 180 183 183 185 186 190 190 x Contents 6.4.2 Implicit Formulation of Variable Temperature Reservoir Compositional Flow Equations 6.5 Solution Method 6.5.1 Solution of Model Equations Using Newton’s Iteration 6.6 The Effects of Linearization 6.6.1 Case 1: Single Phase Flow of a Natural Gas 6.6.2 Effect of Interpolation Functions and Formulation 6.6.3 Effect of Time Interval 6.6.4 Effect of Permeability 6.6.5 Effect of Number of Gridblocks 6.6.6 Spatial and Transient Pressure Distribution Using Different Interpolation Functions 6.6.7 CPU Time 6.6.8 Case 2: An Oil/water Reservoir Development of a New Material Balance Equation for Oil Recovery 7.1 Summary 7.2 Introduction 7.3 Mathematical Model Development 7.3.1 Permeability Alteration 7.3 Porosity Alteration 7.4 Pore Volume Change 7.4.1 A Comprehensive MBE with Memory for Cumulative Oil Recovery 7.5 Numerical Simulation 7.5.1 Effects of Compressibilities on Dimensionless Parameters 7.4.2 Comparison of Dimensionless Parameters Based on Compressibility Factor 7.4.3 Effects of M on Dimensionless Parameter 7.4.4 Effects of Compressibility Factor with M Values 7.4.5 Comparison of Models Based on RF 7.4.6 Effects of M on MBE 7.5 Conclusions Appendix Chapter 7: Development of an MBE for a Compressible Undersaturated Oil Reservoir www.ebook3000.com 194 197 198 203 203 210 210 212 214 214 218 220 239 239 241 243 243 244 246 247 250 251 252 253 255 255 257 258 259 Contents xi State-of-the-art on Memory Formalism for Porous Media Applications 8.1 Summary 8.2 Introduction 8.3 Historical Development of Memory Concept 8.3.1 Constitutive Equations 8.3.2 Application of Memory in Diffusion in Porous Media 8.3.3 Definition of Memory 8.4 State-of-the-art Memory-Based Models 8.5 Basset Force: A History Term 8.6 Anomalous Diffusion: A memory Application 8.6.1 Fractional Order Transport Equations and Numerical Schemes 8.7 Future Trends 8.8 Conclusion Modeling Viscous Fingering During Miscible Displacement in a Reservoir 9.1 Improvement of the Numerical Scheme 9.1.1 The Governing Equation 9.1.2 Finite Difference Approximations 9.1.2.1 Barakat-Clark FTD Scheme 9.1.2.2 DuFort-Frankel Scheme 9.1.3 Proposed Barakat-Clark CTD Scheme 9.1.4 Accuracy and Truncation Errors 9.1.5 Some Results and Discussion 9.1.6 Influence of Boundary Conditions 9.2 Application of the New Numerical Scheme to Viscous Fingering 9.2.1 Stability Criterion and Onset of Fingering 9.2.2 Base Stable Case 9.2.3 Base Unstable Case 9.2.4 Parametric Study 9.2.4.1 Effect of Injection Pressure 9.2.4.2 Effect of Overall Porosity 9.2.4.3 Effect of Mobility Ratio 9.2.4.4 Effect of Longitudinal Dispersion 9.2.4.5 Effect of Transverse Dispersion 9.2.4.6 Effect of Aspect Ratio www.ebook3000.com 271 271 272 273 274 274 277 277 284 287 288 297 298 301 302 303 305 305 307 307 309 309 316 317 318 318 324 330 331 335 336 341 343 347 Appendix A 561 variable definitions given in Sec A.4 to modify his/her own data file such that it describes the constructed model of the reservoir under study It is important to note that a data file must saved as a Notepad file The simulator can be run any number of times during preparation of the data file to correct errors in data and format The computer responds with the following statement requesting names (with file type) of input, output, and two restart-up files; and giving the format for reading such names: ENTER NAMES OF INPUT, OUTPUT, RESTART-UP FILES input.txt, output.lis, restin.txt, restout.txt The user responds using the names of four files separated by blanks or commas as follows user-input.txt user-output.lis r1.txt r2.txt The computer program continues execution until completion, which will be signaled by printing on the screen: END OF MPSFFA RUN Prior to using the post graphic processor, the user has to run MATLAB and set the path to the appropriate folders (within MALAB, highlight “File”, select “Set Path …”, then select “Add Folder”, “Browse For Folder”, and select the folder where the simulation results are stored and the folder for the MATLAB post processor program, push “OK”, then push “Save”, and finally push “Close”) Once the simulation run is completed successfully, the results (user-output.lis) and six other files needed for the post processor (pvt.lis, krp.lis, well.lis, res.lis, resmat.lis, and rokmat.lis) are generated by the simulator The user may then proceed to examine the results using the graphic post processor (Mpsffa_pp.m) by issuing the following command at the MATLAB command level: Mpsffa_pp The user then follows instructions to run the post processor It is important not to delete any window or interrupt the execution of the post processor program The program gives the user an option to terminate program execution orderly at any time A.6 Limitations Imposed on the Compiled Versions The compiled versions of MPSFFA contained in the accompanied CD is provided here for demonstration and student training purposes The 562 Advanced Petroleum Reservoir Simulation critical variables were therefore restricted to the dimensions given below Dimensioning parameters are assigned values such that all methods of solving the linear algebraic equations can be run for the same problem Advanced users may increase these dimensions by editing the dimensioning FORTRAN program (SizempsffaV1-15.for) and then re-compiling the main program (MpsffaV1-15.for) 1XPEHURIEORFNVLQ[GLUHFWLRQ 1XPEHURIEORFNVLQ\GLUHFWLRQ 1XPEHURIEORFNVLQ]GLUHFWLRQ 1XPEHURIDFWLYHEORFNV 1XPEHURI.UURFNUHJLRQV 1XPEHURI397ÀXLGUHJLRQV 1XPEHURIHQWULHVLQDQ\WDEOH 1XPEHURIZHOOV 1XPEHURIWLPHVZHOOVFKDQJHRSHUDWLRQDOFRQGLWLRQV The following is a list of the values of the parameters, in the dimensioning program (SizempsffaV1-15.for), that are used in the compiled versions of MPSFFA ,17(*(53$5$0(7(5,$ 11 ,17(*(53$5$0(7(5,% 12 ,17(*(53$5$0(7(5,& 13 INTEGER, PARAMETER :: I9D=I9A*I9B*I9C ,17(*(53$5$0(7(5,( 15 !Cmnt CCCCCCCC START CCCCCCC 16 INTEGER, PARAMETER :: I8E=I9E 17 !Calt 18 !Cmnt CCCCCCCC 19 INTEGER, PARAMETER :: I8E=1 END CCCCCCC INTEGER, PARAMETER :: I7E=I9E ,17(*(53$5$0(7(5,) 21 ,17(*(53$5$0(7(5,* 22 ,17(*(53$5$0(7(5,+ 23 ,17(*(53$5$0(7(5,, ,17(*(53$5$0(7(5,- 25 ,17(*(53$5$0(7(5, 26 ,17(*(53$5$0(7(5,/ 27 ,17(*(53$5$0(7(5,0 28 ,17(*(53$5$0(7(5,1 29 INTEGER, PARAMETER :: I1O=MIN(I9A,I9B,I9C) INTEGER, PARAMETER :: I3O=MAX(I9A,I9B,I9C) 31 INTEGER, PARAMETER :: I2O=I9A+I9B+I9C-I1O-I3O 32 ,17(*(53$5$0(7(5,4 33 ,17(*(53$5$0(7(5,5 !Cmnt CCCCCC START CCCCCC 35 INTEGER, PARAMETER :: I8R=I9R 36 !Calt 37 !Cmnt CCCCCC INTEGER, PARAMETER :: I8R=1 END CCCCCC Appendix A 38 INTEGER, PARAMETER :: I7R=I9R 39 INTEGER, PARAMETER :: I9S=1+I9R*I9E INTEGER, PARAMETER :: I9T=I9Q*I9M INTEGER, PARAMETER :: I9W=I9E INTEGER, PARAMETER :: I9X=I9W !Cmnt CCCCCC 563 START CCCCCC INTEGER, PARAMETER :: I8X=I9X ,17(*(53$5$0(7(5,< !Calt INTEGER, PARAMETER :: I8X=1 !Calt INTEGER, PARAMETER :: I9Y=1 !Cmnt CCCCCCC END CCCCC A.7 Example of a Prepared Data File The following data file was prepared for the SPE bench-mark test problem of Odeh (1981) à '$7$( 7,7/(2)6,08/$7,21581ả à7,7/(ả127(6833/