Thesis Final Review 2021:

Fast and scalable metamodelling of reservoir flows via machine learning techniques

Student:

Pavel Temirchev

Ph.D. student, 4th year

 

Scientific advisor:

Dmitry Koroteev

Individual Doctoral Committee:

Dmitry Koroteev

Evgeny Burnaev

Ivan Oseledets

Our team:
Pavel Temirchev, Egor Illarionov, Dmitry Voloskov,
Ruslan Kostoev, Anna Gubanova

Objectives and Tasks

Objectives:
  1. Create a fast and scalable reservoir model based on machine learning algorithms:
    • ​3D, 3-phase flow
    • Arbitrary reservoir and wells' geometry
    • Generalizable between reservoirs
  2. Develop history-matching and schedule optimization modules suitable for the model.
Tasks:
  1. Formulate, generate and calculate training data
  2. Develop load / store / dump framework for hydrodynamical models
  3. Develop the architecture of the ML reservoir model, implement several algorithms
  4. Train and test different models
  5. Develop History-Matching procedure as a gradient descent process
  6. Develop schedule optimization in the Reinforcement-Learning-like wayr the model.

Hydrodynamical Reservoir Simulation

Finite-Differences modelling

The standard approach (ECLIPSE, TNAVIGATOR, OPM-FLOW)

\sim O(n^\alpha), \;\;\;\; \alpha=2\div3
\text{PDE\_solver}(s_0, \theta, u)

Time

initial reservoir state:
pore pressure, saturation fields

porosity, permeability, relative permeability and PVT tables

control applied on wells:

BHP, injection rates

The computational complexity depends on the number of computational cells (the complexity of matrix inversion)

\theta
u_0
s_0
\frac{\partial s_0}{\partial t}
\frac{\partial s_1}{\partial t}
\frac{\partial s_2}{\partial t}
u_1
u_2
u_3

Prior art

ROMs:

  • Dynamic Mode Decomposition
    P.J. Schmid (2010). “Dynamic mode decomposition of numerical and experimental data”
    J.L. Proctor, S.L. Brunton, J.N. Kutz (2014). “Dynamic mode decomposition with control”
  • Galerkin-POD projection
    T. Lassila, A. Manzoni, A. Quarteroni, G. Rozza (2014). “Model order reduction in fluid dynamics: challenges and perspectives”
    S. Chaturantabut, D.C. Sorensen (2010). “Nonlinear model reduction via discrete empirical interpolation”
  • Deep Residual Recurrent Neural Networks
     J.N. Kani, A.H. Elsheikh (2018). “Reduced order modeling of subsur-face multiphase flow models using deep residual recurrent neural networks”
  • Embed to Control
    M. Watter, J. Springenberg, J. Boedecker, M. Riedmiller (2015). “Embed to control: A locally linear latent dynamics model for control from raw images”
    Z.L Jin, Y. Liu, L.J. Durlofsky (2020). “Deep-learning-based surrogate model for reservoir simulation with time-varying well controls”
  • LSTM + Variational Autoencoder model
    P. Temirchev, M. Simonov, R. Kostoev, E. Burnaev, I. Oseledets, A. Akhmetov, A. Margarit, A. Sit- nikov, D. Koroteev (2020). “Deep neural networks predicting oil movement in a development unit”

Supervised Machine Learning

"Cat"

"Cat"

"Dog"

"Giraffe"

Object
Target variable

The training set of reservoirs

Object - a reservoir
Target variable
  • forecast of pore pressure and saturations (States)
  • forecast of the production rates (Rates)

Problem: how to find the target variable for an object?

Solution: let us compute it on the commercial simulator (tNavigator).

  • initial pore pressure and saturations (initial State)
  • porosity and permeability (Rock)
  • PVT, RPP (Tables)
  • reservoir geometry (Grid)
  • wells and their working schedule (Wells)
tNavigator

Expanding the training set using reservoir randomization

porosity
wells' control

Applying standard transformations during sampling

NDE-b-ROM metamodel:

Neural Differential Equations based Reduced Order Model

Time

\theta
u_{0:T}
s_0
\frac{\text{d}z_1}{\text{d}t}
\frac{\text{d}z_2}{\text{d}t}
z_1
z_2
z_3

ENCODER

\tilde\theta
\tilde{u}_{0:T}
z_0
\frac{\text{d}z_0}{\text{d}t}

DECODER

DECODING

ENCODING

DERIVATIVES

Conv3d_3x3, 8ch

Conv3d_3x3, 16ch, str=2

Conv3d_3x3, 32ch

Conv3d_3x3, 32ch,

str=2

Conv3d_3x3, 64ch

Conv3d_3x3, 64ch

(s_0, \theta, u_{0:T})
(z_0,\tilde \theta, \tilde u_{0:T})

Transp3d_3x3, 16ch

Transp3d_3x3, 8ch

Transp3d_3x3, 32ch, str=2

Transp3d_3x3, 32ch

Transp3d_3x3 64ch, str=2

Transp3d_3x3 64ch

(s_t)
(z_t)

VGG-like autoencoder, LINK

(z_t,\tilde \theta, \tilde u_t)

ReLU

Conv3d_3x3, 32ch

ReLU

Conv3d_3x3, 4ch

(\frac{dz_t}{dt})

Neural Ordinary Differential Equations, LINK

Neural Networks training

Minimisation problem

\mathbb{E}_{s_0, \theta, u} \sum_t ||s_t - \hat s_t||^2_2 \rightarrow \min_\phi
z_0 = E_s(s_0)
z_{t} = z_{t-1} + \frac{dz}{dt}(z_{t-1}, \tilde\theta, \tilde u_{t-1})\Delta t
\hat s_t = D(z_t)
\tilde\theta = E_\theta(\theta)
\tilde u = E_u(u)

\(\phi\) - a vector of neural network parameters

\(\hat{s}_{0:T}\) - the solution obtained as follows:

1. encoding:

2. latent space forecast:

3. decoding:

\frac{dz}{dt}(z_{t-1}, \tilde\theta, \tilde u_{t-1})
z_{t} = z_{t-1} + \frac{dz}{dt}(z_{t-1}, \tilde\theta, \tilde u_{t-1})\Delta t

stochastic optimization

backpropagation + ADAM

a neural network

0
1
2
3
4
  • Almost as fast as the standard convolutional layer
  • Only active cells are stored in the memory
  • Non-active cells participate the calculations only partially
  • We can take the distances between cells into account by adding them into layer's weights

Convolutions on regular graphs

A A
A A A A
A A A A A A
A A A A A A A A
A A A A A A A A A
A A A A
A
x_0^{l+1} = \sigma \Big([ x_0^l, x_1^l, x_2^l, x_3^l, \text{na}^l] \cdot w^l +bias^l\Big)
\text{na}^l - \text{filler for non-active cell 4}

Computation of production rates

Q_p(p, S_w, S_g, t) = T(t) M_p(p, S_w, S_g) (p - p_w)
T(t) = \frac{2 \pi K_{mult}(t) Kh}{\ln(r_o/r_w) + s}
M_p = \frac{k_{rp}(S_w, S_g)}{\mu_p(p)}

We use a fully physics-based approach for production rates calculation.

where

Tightly approximates
commercial solutions

oil field Х

Tightly approximates
commercial solutions

oil field Х: production rates

view from above

Average on the Z axis:

x_{ij} = \frac{1}{n_z}\sum_k x_{ijk}

wells

Experimental results (on toy example)

tNavigator

NDE-b-ROM

Pressure

Oil saturation

Technical details

Well-known API 

​           formatted files created either by hand or in model designer

RUNSPEC

GRID

PROPS

SOLUTION

SCHEDULE

​.DATA

​Can be used as:

  • ​python library
  • separate software with GUI

Supports CUDA and Pytorch computations 

Provides output within diverse formats:

  • ECLIPSE binary
  • Pytorch \ numpy
  • other...

 

 

1

Computatuional time results

Compared with commercial simulator tNavigator

 
Time, sec
​Model
​NDE-b-ROM
tNavigator
1 GPU
20 sec
40 CPU
2400 sec

Tested on:

  • large real oil reservoir
    with more than 3.000.000 of active cells
  • non-linear well trajectories, fish-bones
  • 40 years of simulation

Publications

 

Publications

 

Conclusions

Positive

  • We constructed the scalable reservoir model based on DL techniques
     
  • The speed up is around 100x times
     
  • The framework for working with datasets was developed
     
  • The API similar to conventional hydrodynamical models was developed
     
  • History-matching and optimization procedures are under research

Conclusions

Negative

  • The problems chosen are too complex for scientific validation of the model - the growth of complexity was too fast
     
  • The model does not take into account a lot of important features
     
  • The dataset generative scheme produces too narrow training sets
     
  • Orthogonal networks overfit, while graph networks are not capable enough

  •  

Annual Review

By cydoroga

Annual Review

  • 495