To main content

Local Forward-Mode Automatic Differentiation For High Performance Parallel Pilot-Level Reservoir Simulation


Local forward-mode automatic differentiation for high performance parallel pilot-level reservoir simulation Robust reservoir simulation requires accurate linearization and involve complex property evaluations and dynamics. Handcoded Jacobian derivative calculations require significant resources to maintain and change, when taking into account all needed features for industrially relevant simulations. Automatic differentiation (AD) is a technique which gives machine precision accuracy of derivatives while requiring minimal extra effort, essentially only requiring the implementation of the residual equations. This makes extending the model simpler and less error-prone The optimal use of AD techniques depend on the particular grid structures and discretizations used. Here we present how local forward-mode AD can be used with a discretization based on the Distributed Uniform Numerics Enviroment (DUNE) grid interface to achieve a high performance reservoir simulator. This paper discusses how one can exploit the structure of the full reservoir equations to obtain a dense data representation with only local evaluations in the AD framework, thereby avoiding excessive treatment of sparse sets or matrices. We highlight aspects of the C++ implementation which contribute to giving clean code, parallel performance and efficient use of modern microprocessors. Finally, the OPM Flow simulator is used to demonstrate the approach on field case examples


Academic chapter/article/Conference paper


  • CLIMIT / 617115





  • Germany
  • NORCE Norwegian Research Centre AS
  • SINTEF Digital / Mathematics and Cybernetics




European Association of Geoscientists and Engineers (EAGE)


ECMOR XVI - 16th European Conference on the Mathematics of Oil Recovery, 3–6 September 2018, Barcelona, Spain



View this publication at Cristin