Book contents
- Frontmatter
- Contents
- List of Contributors
- Preface
- Acknowledgments
- Navigating the Book and the MRST Modules
- Part I Grid Generation, Discretizations, and Solvers
- Part II Rapid Prototyping and Accelerated Computation
- 5 Better AD Simulators with Flexible State Functions and Accurate Discretizations
- 6 Faster Simulation with Optimized Automatic Differentiation and Compiled Linear Solvers
- Part III Modeling of New Physical Processes
5 - Better AD Simulators with Flexible State Functions and Accurate Discretizations
from Part II - Rapid Prototyping and Accelerated Computation
Published online by Cambridge University Press: 20 November 2021
- Frontmatter
- Contents
- List of Contributors
- Preface
- Acknowledgments
- Navigating the Book and the MRST Modules
- Part I Grid Generation, Discretizations, and Solvers
- Part II Rapid Prototyping and Accelerated Computation
- 5 Better AD Simulators with Flexible State Functions and Accurate Discretizations
- 6 Faster Simulation with Optimized Automatic Differentiation and Compiled Linear Solvers
- Part III Modeling of New Physical Processes
Summary
The ad-core module in MRST offers an object-oriented framework for rapid prototyping of new reservoir simulators based on automatic differentiation (AD-OO). The framework simplifies the task of changing and extending existing simulation models in MRST or implementing brand new ones. The MRST textbook (Lie, Cambridge University Press, 2019, Chapter 12) presents a model hierarchy for the black-oil equations, discretized by a standard fully implicit method, and describes how to (automatically) select time steps and configure linear and nonlinear solvers. Herein, we present a further modularization of the AD-OO framework that aims to simplify the implementation of more complex flow models and other types of discretizations and solution strategies. To this end, we view the reservoir simulator as a graph of functional relationships and their dependencies and introduce the new concept of so-called state functions to define these functional relationships and compute discrete quantities required for the linearized governing equations. Using the graph perspective, it is relatively simple to not only visualize and understand the data flow of highly complex reservoir simulators, but also replace components of the graph and/or extend the graph with new branches as needed. The result is a versatile family of reservoir simulators that can easily be configured to run different types of multiphase, multicomponent models and at the same time support a number of different spatial and temporal discretizations. The state-function concept also has a built-in compute cache that helps you to systematically eliminate redundant function evaluations. The chapter explains the new concept in detail and exemplifies its use by showcasing implicit, explicit, and adaptive-implicit versions of the same physical processes. We also demonstrate the use of consistent and high-resolution schemes to improve simulation accuracy. Applications to complex flow physics (EOR models, compositional flow, fractured reservoirs) are discussed in other chapters.
Keywords
- Type
- Chapter
- Information
- Advanced Modeling with the MATLAB Reservoir Simulation Toolbox , pp. 151 - 199Publisher: Cambridge University PressPrint publication year: 2021
- Creative Commons
- This content is Open Access and distributed under the terms of the Creative Commons Attribution licence CC-BY-NC-ND 4.0 https://creativecommons.org/cclicenses/
- 2
- Cited by