MRST-AD – an Open-Source Framework for Rapid Prototyping and Evaluation of Reservoir Simulation Problems
- Stein Krogstad (SINTEF ICT) | Knut–Andreas Lie (SINTEF ICT) | Olav Møyner (SINTEF ICT) | Halvor Møll Nilsen (SINTEF ICT) | Xavier Raynaud (SINTEF ICT) | Bård Skaflestad (SINTEF ICT)
- Document ID
- Society of Petroleum Engineers
- SPE Reservoir Simulation Symposium, 23-25 February, Houston, Texas, USA
- Publication Date
- Document Type
- Conference Paper
- 2015. Society of Petroleum Engineers
- 5.5.3 Scaling Methods, 5.4.7 Chemical Flooding Methods (e.g., Polymer, Solvent, Nitrogen, Immiscible CO2, Surfactant, Vapex)
- reservoir simulation, black oil, simulator prototyping, open source
- 7 in the last 30 days
- 333 since 2007
- Show more detail
- View rights & permissions
|SPE Member Price:||USD 8.50|
|SPE Non-Member Price:||USD 25.00|
We present MRST–AD, a free, open-source framework written as part of the Matlab Reservoir Simulation Toolbox and designed to provide researchers with the means for rapid prototyping and experimentation for problems in reservoir simulation. The article outlines the design principles and programming techniques used and explains in detail the implementation of a full-featured, industry-standard black-oil model on unstructured grids. The resulting simulator has been thoroughly validated against a leading commercial simulator on benchmarks from the SPE Comparative Solution Projects, as well as on a real-field model (Voador, Brazil). We also show in detail how practitioners can easily extend the black-oil model with new constitutive relationships, or additional features such as polymer flooding, thermal and reactive effects, and immediately benefit from existing functionality such as constrained-pressure-residual (CPR) type preconditioning, sensitivities and adjoint-based gradients.
Technically, MRST–AD combines three key features: (i) a highly vectorized scripting language that enables the user to work with high-level mathematical objects and continue to develop a program while it runs; (ii) a flexible grid structure that enables simple construction of discrete differential operators; and (iii) automatic differentiation that ensures that no analytical derivatives have to be programmed explicitly as long as the discrete flow equations and constitutive relationships are implemented as a sequence of algebraic operations. We have implemented a modular, efficient framework for implementing and comparing different physical models, discretizations, and solution strategies by combining imperative and object-oriented paradigms with functional programming. The toolbox also offers additional features such as upscaling and grid coarsening, consistent discretizations, multiscale solvers, flow diagnostics and interactive visualization.
|File Size||4 MB||Number of Pages||26|
Aarnes, J. E., Gimse, T., and Lie, K.-A. 2007a. An introduction to the numerics of flow in porous media using Matlab. In Hasle, G., Lie, K.-A., and Quak, E., editors, Geometrical Modeling, Numerical Simulation and Optimisation: Industrial Mathematics at SINTEF, pages 265–306. Springer Verlag, Berlin Heidelberg New York.
Aarnes, J. E., Hauge, V. L., and Efendiev, Y. 2007b. Coarsening of three-dimensional structured and unstructured grids for subsurface flow. Adv. Water Resour., 30(11):2177–2193. DOI: 10.1016/j.advwatres.2007.04.007.
Aarnes, J. E., Krogstad, S., and Lie, K.-A. 2006. A hierarchical multiscale method for two-phase flow based upon mixed finite elements and nonuniform coarse grids. Multiscale Model. Simul., 5(2):337–363. DOI: 10.1137/050634566.
Aarnes, J. E., Krogstad, S., and Lie, K.-A. 2008. Multiscale mixed/mimetic methods on corner-point grids. Comput. Geosci., 12(3):297–315. DOI: 10.1007/s10596-007-9072-8.
Alberty, J., Carstensen, C., and Funken, S. A. 1999. Remarks around 50 lines of Matlab: short finite element implementation. Numer. Algorithms, 20(2-3):117–137. DOI: 10.1023/A:1019155918070.
Alpak, F. O., Pal, M., and Lie, K.-A. 2012. A multiscale method for modeling flow in stratigraphically complex reservoirs. SPE J., 17(4):1056–1070. DOI: 10.2118/140403-PA.
Andersen, O., Nilsen, H. M., and Lie, K.-A. 2014. Reexamining CO2 storage capacity and utilization of the Utsira Formation. In ECMOR XIV – 14th European Conference on the Mathematics of Oil Recovery, Catania, Sicily, Italy, 8-11 September 2014. EAGE. DOI: 10.3997/2214-4609.20141809.
DeBaun, D., Byer, T., Childs, P., Chen, J., Saaf, F., Wells, M., Liu, J., Cao, H., Pianelo, L., Tilakraj, V., Crumpton, P., Walsh, D., Yardumian, H., Zorzynski, R., Lim, K.-T., Schrader, M., Zapata, V., Nolen, J., and Tchelepi, H. A. 2005. An extensible architecture for next generation scalable parallel reservoir simulation. In SPE Reservoir Simulation Symposium, 31 January–2 Feburary, The Woodlands, Texas, USA. DOI: 10.2118/93274-MS.
Gries, S., Stüben, K., Brown, G. L., Chen, D., and Collins, D. A. 2014. Preconditioning for efficiently applying algebraic multigrid in fully implicit reservoir simulations. SPE J., 19(04):726–736. DOI: 10.2118/163608-PA.
Hasan, A., Foss, B., Krogstad, S., Gunnerud, V., and Teixeira, A. F. 2013. Decision analysis for long-term and short-term production optimization applied to the voador field. In SPE Reservoir Characterization and Simulation Conference and Exhibition, 16-18 September, Abu Dhabi, UAE. SPE 166027-MS, DOI: 10.2118/166027-MS.
Hauge, V. L. and Aarnes, J. E. 2009. Modeling of two-phase flow in fractured porous media on unstructured non-uniformly coarsened grids. Transport in Porous Media, 77(3):373–398. DOI: 10.1007/s11242-008-9284-y.
Hauge, V. L., Lie, K.-A., and Natvig, J. R. 2012. Flow-based coarsening for multiscale simulation of transport in porous media. Comput. Geosci., 16(2):391–408. DOI: 10.1007/s10596-011-9230-x.
Hilden, S. T., Lie, K.-A., and Raynaud, X. 2014. Steady state upscaling of polymer flooding. In ECMOR XIV – 14th European Conference on the Mathematics of Oil Recovery, Catania, Sicily, Italy, 8-11 September 2014. EAGE. DOI: 10.3997/2214-4609.20141802.
Killough, J. E. 1995. Ninth SPE comparative solution project: A reexamination of black-oil simulation. In SPE Reservoir Simulation Symposium, 12-15 February 1995, San Antonio, Texas. SPE 29110-MS, DOI: 10.2118/29110-MS.
Krogstad, S. 2011. A sparse basis POD for model reduction of multiphase compressible flow. In 2011 SPE Reservoir Simulation Symposium, The Woodlands, Texas, USA, 21-23 February 2011. DOI: 10.2118/141973-MS.
Krogstad, S., Hauge, V. L., and Gulbransen, A. F. 2011. Adjoint multiscale mixed finite elements. SPE J., 16(1):162–171. DOI: 10.2118/119112-PA.
Krogstad, S., Lie, K.-A., and Skaflestad, B. 2012. Mixed multiscale methods for compressible flow. In Proceedings of ECMOR XIII–13th European Conference on the Mathematics of Oil Recovery, Biarritz, France. EAGE. DOI: 10.3997/2214-4609.20143240.
Leeuwenburgh, O., Peters, E., and Wilschut, F. 2011. Towards an integrated workflow for structural reservoir model updating and history matching. In SPE EUROPEC/EAGE Annual Conference and Exhibition, 23-26 May, Vienna, Austria. DOI: 10.2118/143576-MS.
Li, X. and Zhang, D. 2014. A backward automatic differentiation framework for reservoir simulation. Comput. Geosci., pages 1–14. DOI: 10.1007/s10596-014-9441-z.
Lie, K.-A. 2014. An Introduction to Reservoir Simulation Using MATLAB. http://www.sintef.no/Projectweb/MRST/Publications/.
Lie, K.-A., Krogstad, S., Ligaarden, I. S., Natvig, J. R., Nilsen, H., and Skaflestad, B. 2012. Open-source MATLAB implementation of consistent discretisations on complex grids. Comput. Geosci., 16:297–322. DOI: 10.1007/s10596-011-9244-4.
Lie, K.-A., Natvig, J. R., Krogstad, S., Yang, Y., and Wu, X.-H. 2014a. Grid adaptation for the Dirichlet–Neumann representation method and the multiscale mixed finite-element method. Comput. Geosci. DOI: 10.1007/s10596-013-9397-4.
Lie, K.-A., Nilsen, H. M., Andersen, O., and Møyner, O. 2014b. A simulation workflow for large-scale CO2 storage in the Norwegian North Sea. In ECMOR XIV – 14th European Conference on the Mathematics of Oil Recovery, Catania, Sicily, Italy, 8-11 September 2014. EAGE. DOI: 10.3997/2214-4609.20141877.
Møyner, O., Krogstad, S., and Lie, K.-A. 2014. The application of flow diagnostics for reservoir management. SPE J. DOI: 10.2118/171557-PA.
Møyner, O. and Lie, K.-A. 2014a. The multiscale finite-volume method on stratigraphic grids. SPE J., 19(5):816–831. DOI: 10.2118/163649-PA.
Møyner, O. and Lie, K.-A. 2014b. A multiscale two-point flux-approximation method. J. Comput. Phys., 275:273–293. DOI: 10.1016/j.jcp.2014.07.003.
MRST 2014. The MATLAB Reservoir Simulation Toolbox, version 2014a. http://www.sintef.no/MRST/.
Neidinger, R. 2010. Introduction to automatic differentiation and MATLAB object-oriented programming. SIAM Review, 52(3):545–563. doi:10.1137/080743627.
Nilsen, H. M., Lie, K.-A., and Natvig, J. R. 2012. Accurate modelling of faults by multipoint, mimetic, and mixed methods. SPE J., 17(2):568–579. DOI: 10.2118/149690-PA.
Norwegian University of Science and Technology 2012. IO Center – Norne Benchmark Case. http://www.ipt.ntnu.no/?norne.
Raynaud, X., Krogstad, S., and Nilsen, H. M. 2014. Reservoir management optimization using calibrated transmissibility upscaling. In ECMOR XIV – 14th European Conference on the Mathematics of Oil Recovery, Catania, Sicily, Italy, 8-11 September 2014. EAGE. DOI: 10.3997/2214-4609.20141864.
Sandve, T., Berre, I., and Nordbotten, J. 2012. An efficient multi-point flux approximation method for discrete fracturematrix simulations. J. Comput. Phys., 231(9):3784–3800. DOI: 10.1016/j.jcp.2012.01.023.
Voskov, D. V. and Tchelepi, H. A. 2012. Comparison of nonlinear formulations for two-phase multi-component eos based simulation. J. Petrol. Sci. Engrg., 82-83(0):101–111. DOI: 10.1016/j.petrol.2011.10.012.
Voskov, D. V., Tchelepi, H. A., and Younis, R. 2009. General nonlinear solution strategies for multiphase multicomponent eos based simulation. In SPE Reservoir Simulation Symposium, 2–4 February, The Woodlands, Texas. DOI: 10.2118/118996-MS.
Younis, R. and Aziz, K. 2007. Parallel automatically differentiable data-types for next-generation simulator development. In SPE Reservoir Simulation Symposium, 26–28 February, Houston, Texas, USA. SPE 106593-MS, DOI: 10.2118/106493-MS.
Zhou, Y., Tchelepi, H. A., and Mallison, B. T. 2011. Automatic differentiation framework for compositional simulation on unstructured grids with multi-point discretization schemes. In SPE Reservoir Simulation Symposium, 21-23 February, The Woodlands, Texas. SPE 141592-MS, DOI: 10.2118/141592-MS.