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
\(\phi\) - a vector of neural network parameters
\(\hat{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:
$$ \nabla \cdot \nabla p(t, x) + q(t, x) = \alpha \frac{\partial p}{\partial t} \;\;\; \forall t, x \in \mathcal{X} \times \mathcal{T}$$
$$ s.t. \;\; \nabla p(t, x) = 0 \;\;\; \forall t, x \in \mathcal{B} \times \mathcal{T}$$
$$ s.t \;\; p(0, x) = p_0(x) \;\;\; \forall x \in \mathcal{X}. $$
The set of proper points: \( \mathcal{X} = (0, x_{max}) \).
The set of boundary points: \( \mathcal{B} = \{0, x_{max} \} \).
The set of source points: \( \mathcal{S} = [x_{s0}, x_{s1}] \).
A gridless approximate solution for a PDE
An example
Let \( f_\theta(t, x) \) be a NN with parameters \(\theta\).
The NN will converge to a true PDE solution if the loss is zero:
$$ \mathcal{L}(\theta) = \mathbb{E}_{(t, x) \sim (\mathcal{T} \times \mathcal{X})} \left[ \left( \nabla \cdot \nabla f_\theta(t, x) + q(t, x) \right) - \alpha \frac{\partial f_\theta}{\partial t}(t, x) \right]^2 + $$
$$ + \mathbb{E}_{x \sim \mathcal{X}} \left[ f_\theta(0, x) - p_0(x) \right]^2 + $$
$$ + \mathbb{E}_{(t, x) \sim (\mathcal{T} \times \mathcal{B})} \left[ \nabla f_\theta(t, x) \right]^2 $$
Non-linearity matters!
Results
For 1d and 2d non-linear diffusivity PDE
Thank you!
Questions?
AIRI report Interview
By cydoroga
AIRI report Interview
- 408