Table of Contents
Fetching ...

A Machine-Learned Near-Well Model in OPM Flow

Peter von Schultzendorff, Tor Harald Sandve, Birane Kane, David Landa-Marbán, Jakub Wiktor Both, Jan Martin Nordbotten

TL;DR

The paper tackles the challenge of coupling neural networks with a high-fidelity reservoir simulator by introducing the OPM Flow–NN framework, which trains networks offline in Keras and deploys them as native AD functions in OPM Flow. It presents a data-driven near-well model that learns a data-driven well index $\widetilde{WI} = q/(p_{well}-p_i)$ (often in $\log_{10}$ form) from fine-scale ensemble simulations and integrates this into the black-oil formulation with the near-well relation $q_{\eta,i}^r = WI_{\beta,i}[p_i-(p_{bhp,w}+h_{w,i})]$. The NN is trained via a fully connected architecture with normalization and Adam optimization, using upscaled inputs (e.g., $S_\alpha^{coarse,i}$ and $p^{coarse}_{\alpha,i}$ at $r_e$) and targets $\tilde{WI}$. Across 2D and 3D CO2 injection tests, the approach achieves higher accuracy than multiphase Peaceman on coarse grids and exhibits grid-independence in several scenarios, while maintaining fast inference and compatibility with the simulator’s automatic differentiation framework.

Abstract

Recent advances in reservoir simulation increasingly utilize hybrid approaches that couple physics-based simulators with machine-learning (ML) components. ML components offer high fidelity to training data and fast inference, enabling efficient and accurate modeling of complex multi-scale or multi-physics phenomena. Modern reservoir simulators rely on automatic differentiation (AD) to support efficient and flexible strategies for nonlinear solvers, inverse problems, and optimization problems. Efficient hybrid modeling therefore requires tight integration of the ML components with the simulator's AD framework. We present the first integration of neural networks into the high-performance reservoir simulator OPM Flow. Networks are trained in TensorFlow and imported into OPM, where they are accessed as native AD functions. This presents an efficient framework for hybrid modeling and enables seamless integration in existing simulator workflows. As an application, we introduce a novel, data-driven near-well model. Near-well models are essential in reservoir simulation for accurately representing singular pressure gradients around wells. Commonly used are the Peaceman near-well model and its extensions, or local grid refinement around the wells. Peaceman-type models are limited to simplified flow regimes, whereas local grid refinement is computationally expensive. We address these limitations by training a neural network to infer a Peaceman-like well index from fine-scale ensemble simulations of the near-well region. It is then integrated into OPM Flow with the new framework. Tested on relevant examples for CO$_2$ storage, the method offers high fidelity to fine-scale results at low computational cost, demonstrating the potential of the OPM Flow-Neural Network framework for hybrid modeling.

A Machine-Learned Near-Well Model in OPM Flow

TL;DR

The paper tackles the challenge of coupling neural networks with a high-fidelity reservoir simulator by introducing the OPM Flow–NN framework, which trains networks offline in Keras and deploys them as native AD functions in OPM Flow. It presents a data-driven near-well model that learns a data-driven well index (often in form) from fine-scale ensemble simulations and integrates this into the black-oil formulation with the near-well relation . The NN is trained via a fully connected architecture with normalization and Adam optimization, using upscaled inputs (e.g., and at ) and targets . Across 2D and 3D CO2 injection tests, the approach achieves higher accuracy than multiphase Peaceman on coarse grids and exhibits grid-independence in several scenarios, while maintaining fast inference and compatibility with the simulator’s automatic differentiation framework.

Abstract

Recent advances in reservoir simulation increasingly utilize hybrid approaches that couple physics-based simulators with machine-learning (ML) components. ML components offer high fidelity to training data and fast inference, enabling efficient and accurate modeling of complex multi-scale or multi-physics phenomena. Modern reservoir simulators rely on automatic differentiation (AD) to support efficient and flexible strategies for nonlinear solvers, inverse problems, and optimization problems. Efficient hybrid modeling therefore requires tight integration of the ML components with the simulator's AD framework. We present the first integration of neural networks into the high-performance reservoir simulator OPM Flow. Networks are trained in TensorFlow and imported into OPM, where they are accessed as native AD functions. This presents an efficient framework for hybrid modeling and enables seamless integration in existing simulator workflows. As an application, we introduce a novel, data-driven near-well model. Near-well models are essential in reservoir simulation for accurately representing singular pressure gradients around wells. Commonly used are the Peaceman near-well model and its extensions, or local grid refinement around the wells. Peaceman-type models are limited to simplified flow regimes, whereas local grid refinement is computationally expensive. We address these limitations by training a neural network to infer a Peaceman-like well index from fine-scale ensemble simulations of the near-well region. It is then integrated into OPM Flow with the new framework. Tested on relevant examples for CO storage, the method offers high fidelity to fine-scale results at low computational cost, demonstrating the potential of the OPM Flow-Neural Network framework for hybrid modeling.
Paper Structure (13 sections, 17 equations, 16 figures, 3 tables)

This paper contains 13 sections, 17 equations, 16 figures, 3 tables.

Figures (16)

  • Figure 1: A brief overview of existing physics-based, data-driven, and hybrid models and simulation frameworks. On the $y$-axis models are arranged by whether they are predominantly physics- or data-driven, while on the $x$-axis they are arranged by how intrusive their implementation is.
  • Figure 2: The recurring workflow to fit the machine-learned near-well model to previously unknown flow regimes and geometries.
  • Figure 3: Schematic of the upscaling procedure from the radial fine-scale simulations to a coarse-scale Cartesian cell.
  • Figure 4: Scheme of the FCNN model. Inputs can be chosen freely to accustom for the complexity of the near-well flow regimes and the geometry.
  • Figure 5: Simulation values: $k = \qty{2d-13}{\meter\squared}, p_{init} = \qty{65}{\bar{}}, h = \qty{7.5}{\meter}$
  • ...and 11 more figures