Fast Approximate Hydrodynamic Simulation with Deep Neural Networks
Pavel Temirchev
Scientific advisor:
Dmitry Koroteev
Individual Doctoral Committee:
Dmitry Koroteev
Evgeny Burnaev
Ivan Oseledets

Our team:
Pavel Temirchev, Ruslan Kostoev, Egor Illarionov, Dmitry Voloskov, Anna Gubanova
Motivation
- Petroleum Engineers are interested in modeling liquid flow inside oil reservoirs
- They solve the system of PDEs for multiphase flow in a porous medium
- Finite Differences and Finite Volumes are in use
- The modelling is slow!
- Multivariate simulation is also required:
- production optimization
- inverse problems

Hydrodynamical Reservoir Simulation
Finite-Differences modelling
The standard approach (ECLIPSE, TNAVIGATOR, OPM-FLOW)
Time
initial conditions
PDE coefficients
boundary conditions
The computational complexity depends on the number of computational cells (the complexity of matrix inversion)



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 - the solution
How to find the target variable for an object?
- initial conditions
- PDE coefficients
- boundary conditions
Commercial Simulator
- solution for all t
NDE-b-ROM model:
Neural Differential Equations based Reduced Order Model
Time



ENCODER
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
Transp3d_3x3, 16ch
Transp3d_3x3, 8ch
Transp3d_3x3, 32ch, str=2
Transp3d_3x3, 32ch
Transp3d_3x3 64ch, str=2
Transp3d_3x3 64ch
VGG-like autoencoder, LINK
ReLU
Conv3d_3x3, 32ch
ReLU
Conv3d_3x3, 4ch
Neural Ordinary Differential Equations, LINK
Neural Networks training
Minimisation problem
ϕ - a vector of neural network parameters
s^0:T - the solution obtained as follows:
1. encoding:
2. latent space forecast:
3. decoding:
stochastic optimization
backpropagation + ADAM
a neural network
- As fast as the standard convolutional layer
- Only active cells are stored in the memory
- Can take distances into account
Convolutions on regular graphs
view from above
Average on the Z axis:
wells
Experimental results (on toy example)
tNavigator
NDE-b-ROM
Pressure
Oil saturation




Tightly approximates
commercial solutions
oil field Х







Computational 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 6.000.000 of active cells - non-linear well trajectories, fish-bones
- 40 years of simulation
Technical details
Open-source repository DeepField


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...
Publications


Publications



Conclusions
Positive:
- The speed up is around 100x times
- Open-source library was developed
- Good approximation on fixed oil field
Negative:
- Dataset generation - is an extremely complex task!
- Have made experiments on huge oil fields
- Hard to extend the model
A gridless approximate solution for a PDE
An example
The diffusivity equation:
∇⋅∇p(t,x)+q(t,x)=α∂t∂p∀t,x∈X×T
s.t.∇p(t,x)=0∀t,x∈B×T
s.tp(0,x)=p0(x)∀x∈X.
The set of proper points: X=(0,xmax).
The set of boundary points: B={0,xmax}.
The set of source points: S=[xs0,xs1].
A gridless approximate solution for a PDE
An example
Let fθ(t,x) be a NN with parameters θ.
The NN will converge to a true PDE solution if the loss is zero:
L(θ)=E(t,x)∼(T×X)[(∇⋅∇fθ(t,x)+q(t,x))−α∂t∂fθ(t,x)]2+
+Ex∼X[fθ(0,x)−p0(x)]2+
+E(t,x)∼(T×B)[∇fθ(t,x)]2
Non-linearity matters!

Results
For 1d and 2d non-linear diffusivity PDE


Thank you!
Questions?
AIRI report Interview
By cydoroga
AIRI report Interview
- 482