본문 펼치기
## Learning macroscopic parameters in nonlinear multiscale simulations using nonlocal multicontinua upscaling techniques
Maria Vasilyeva <sup>_∗_</sup> Wing T. Leung <sup>_†_</sup> Eric T. Chung <sup>_‡_</sup> Yalchin Efendiev <sup>_§_</sup>
Mary Wheeler <sup>_¶_</sup>
July 8, 2019
Abstract
In this work, we present a novel nonlocal nonlinear coarse grid approximation using a machine learning
algorithm. We consider unsaturated and two-phase flow problems in heterogeneous and fractured porous
media, where mathematical models are formulated as general multicontinuum models. We construct a
fine grid approximation using the finite volume method and embedded discrete fracture model. Macroscopic models for these complex nonlinear systems require nonlocal multicontinua approaches, which are
developed in earlier works [8]. These rigorous techniques require complex local computations, which
involve solving local problems in oversampled regions subject to constraints. The solutions of these local
problems can be replaced by solving original problem on a coarse (oversampled) region for many input
parameters (boundary and source terms) and computing effective properties derived by nonlinear nonlocal multicontinua approaches. The effective properties depend on many variables (oversampled region
and the number of continua), thus their calculations require some type of machine learning techniques.
In this paper, our contribution is two fold. First, we present macroscopic models and discuss how to
effectively compute macroscopic parameters using deep learning algorithms. The proposed method can
be regarded as local machine learning and complements our earlier approaches on global machine learning [39, 38]. We consider a coarse grid approximation using two upscaling techniques with single phase
upscaled transmissibilities and nonlocal nonlinear upscaled transmissibilities using a machine learning
algorithm. We present results for two model problems in heterogeneous and fractured porous media and
show that the presented method is highly accurate and provides fast coarse grid calculations.
### 1 Introduction
Mathematical models of the flow and transport problems in heterogeneous and fractured porous media are
required to solve large and complex nonlinear systems. Processes in fractured porous media are described
by the mixed dimensional coupled system of equations [27, 13, 17, 24, 30]. Such models can be generalized
as a general multicontinuum models similar to the dual porosity/dual permeability approaches [7, 32].
Solving problems in heterogeneous and fractured media requires constructing grids that resolve all small
scale heterogeneity. Numerous model order reduction techniques have been developed to construct coarse
grid approximations and reduce the computational time of the numerical simulations. Global model order reduction approaches rely on projection on the important modes space, where the full-order model is
_∗_ Institute for Scientific Computation, Texas A&M University, College Station, TX, USA & Multiscale model reduction
laboratory, North-Eastern Federal University, Yakutsk, Russia. Email: `vasilyevadotmdotv@gmail.com` .
_†_ ICES, University of Texas, Austin, TX, USA ( `wleung@ices.utexas.edu` )
_‡_ Department of Mathematics, The Chinese University of Hong Kong, Shatin, New Territories, Hong Kong SAR, China
( `tschung@math.cuhk.edu.hk` )
_§_ Department of Mathematics & Institute for Scientific Computation (ISC), Texas A&M University, College Station, TX,
USA ( `efendiev@math.tamu.edu` )
_¶_ ICES, University of Texas, Austin, TX, USA ( `mfw@ices.utexas.edu` )
1
carefully study generating POD based basis functions to perform the fast online calculations stage [16, 40].
Local model reduction techniques are based on constructing local multiscale basis functions to represent
the influence of small scale heterogeneity [30, 4, 34, 35]. One of the widely used ways is based on the numerical homogenization technique, where effective parameters are calculated in order to construct coarse
grid approximations [2, 29, 37]. The coarse grid parameters are constructed by solving local problems with
appropriate boundary conditions. For example, linear boundary conditions or periodicity can be used. The
choice of boundary conditions have a strong impact on the accuracy of results. In [5], an interpolated global
coarse grid solution is used for performing accurate construction of the upscaled transmissibilities, which
involve iterations between global coarse grid model and local fine grid calculations. In standard upscaling
methods, upscaled parameters are obtained independent of any global problem. However, these approaches
lack several features, which are important for rigorous and accurate upscaling. These include the use of
multiple continua and oversampled computations.
In the local model order reduction methods, an oversampling technique and multicontinua concepts are
needed to achieve an accuracy independent of physical parameters, such as scales and contrast [11, 41].
For example, the oversampled domain is used for constructing multiscale basis and provide more accurate
results in the Multiscale Finite Element Method [20]. In the Generalized Multiscale Finite Element Method
[15, 9], a larger domain is used to construct a space of snapshots and solution of the local spectral problem
to determine a dominant modes. Note that, the oversampled domain is used for local problem solution and
only the interior information is used to define the basis functions.
In recently developed Constrained Energy Minimization and Nonlocal Multicontinuum methods [10, 12,
33, 36], multiscale basis functions are defined in the oversampled domains and constructed via solving local constrained energy minimization problems, where constraints are related to each continuum. Continuum
plays a role of macroscopic parameter. In [5, 14], oversampling techniques have been developed in the context
of the upscaling procedure, where an interesting local-global upscaling technique is presented for constructing
coarse scale approximation for highly heterogeneous porous media. In this method, the coarse grid simulations are iterated with local calculations of the upscaled parameters, where the coarse grid solutions are used
to determine the boundary conditions for the local calculation. The local-global upscaling method requires
more computation than existing classic upscaling procedures. Therefore, in the upscaling and multiscale
methods oversampled domains are used in two contexts: (1) as extended local domains for more accurate
calculations of the coarse grid parameters with fine-scale information about heterogeneous properties and
(2) for global or quasi-global information of the solutions that are used, for example, as boundary conditions
in local calculations. The second context of the oversampling technique, due to the incorporation of solution
information into the local problems leads to the nonlinear equations even in the case of the linear problems.
In this work, we consider flow and transport processes in heterogeneous multicontinuum media and construct coarse and fine grid approximations using a finite volume method with two-point flux approximation.
Due to nonlinear nature of these flows, upscaled parameters are nonlinear functions, which depend on multiple coarse-grid variables defined in oversampled regions. Macroscopic equations use nonlinear nonlocal
multicontinuum concept [8]. This framework first identifies macroscopic variables in each coarse-grid block
and then solves local constraint problems in oversampled regions to compute macroscopic fluxes. The local
oversampled computations require solving nonlinear problems with constraints that include the values of
macroscopic variables. For example, for two-phase flow simulations, this requires solving two-phase flow
problems with known values of pressures and saturations in each coarse-grid block. Each coarse-grid block
may contain several macroscale pressures and saturations identified in the first step. Solving local nonlinear
constraint problems can be challenging due to large number of nonlinear simulations in oversampled regions.
Moreover, computing macroscale fluxes as a function of many variables as a look-up table is nearly impossible. In this work, we propose an efficient algorithm for solving the local problems consisting of original
problems with various boundary conditions and using deep learning to train macroscale fluxes. This is a
first step in designing computationally efficient and rigorous upscaling methods for nonlinear flows in porous
media.
Constructing accurate upscaled transmissibilities for the coarse grid approximation is based on the information about solution (nonlinear transmissibilities). The presented method is based on the machine
2
learning procedure for fast prediction of the nonlinear transmissibilities, where we construct neural networks
that learn dependencies between the coarse grid quantities on the oversampled local domains and upscaled
transmissibilities. We use a convolutional neural network and GPU training process to construct a machine
learning algorithm [23, 22]. For constructing the datasets, we perform local or global calculations of the
coarse grid quantities [5]. In the local approach, the upscaled transmissibilities are calculated on the local
domain corresponding to the target face, where the fine-scale solution information is used to set boundary
conditions. The global approach uses a global fine-scale solution for determining coarse scale parameters.
For training the neural networks, we use a family of problem solutions for different input conditions. Note
that, we should have many snapshots to capture all input condition variations because accuracy of the machine learning method depends on space of snapshots that is used as a train dataset. As soon as neural
networks trained on the dataset, the fast and accurate calculations can be performed. To illustrate method
construction and applicability, we considered two model problems: unsaturated flow problem and two-phase
filtration problem in heterogeneous and fractured porous media. The presented method combines accuracy
of the fine grid models with fast coarse grid calculations by constructing machine learning techniques for
predicting accurate nonlinear upscaled transmissibilities.
The paper is organized as follows. In Section 2, we present the mathematical model and fine grid
approximation. In Section 3, we consider single-phase upscaling for problems in multicontiuum media with
variable separation for nonlinear and space dependent variables. Next, we present a novel nonlinear coarse
grid approximation using a machine learning algorithm in Section 4. In Section 5, we consider two model
problems in two - dimensional formulation and present numerical results, where we consider training of
machine learning algorithm and relative errors between the reference fine grid solution and presented method.
Finally, we present conclusions.
### 2 Model problem with reference fine grid approximation
As a model problem, we consider two nonlinear problems for fractured and heterogeneous porous media:
1. Unsaturated flow problem (nonlinear flow problem)
2. Two-phase flow problem (nonlinear transport and flow problem)
We start with the formulation of the mathematical model, where we formulate models for fractured media
and generalize it for multicontinuum media. Next, we present a construction of the fine grid approximation
using finite volume approximation and embedded fracture model.
2.1 Unsaturated flow problem
Mathematical model of the unsaturated flow in porous media described by the Richards’ equations [28]
_<u>∂</u>_ <u>Θ</u>
_∂t_ <sup>_−∇·_</sup> <sup>(</sup> <sup>_k_</sup> <sup>(</sup> <sup>_x, p_</sup> <sup>)</sup> <sup>_∇_</sup> <sup>(</sup> <sup>_p_</sup> <sup>+</sup> <sup>_z_</sup> <sup>)) =</sup> <sup>_f,_</sup> _x ∈_ Ω _,_ (1)
where _p_ is the pressure head, _k_ is the unsaturated hydraulic conductivity tensors, _z_ represent the influence
of the gravity to the flow processes, Θ is the water content and _f_ refer to source and sink terms.
For fractured porous media, we consider a mixed dimensional formulation of the flow problem [27, 13, 17].
Let Ω _∈R_ <sup>_d_</sup> is the _d_ - dimensional domain of the porous matrix, where _d_ = 2 _,_ 3. Fracture network is
considered as a ( _d −_ 1) - dimensional (lower dimensional) domain _γ_ _∈R_ <sup>_d−_</sup> <sup>1</sup> due to small thickness of the
fractures compared to the domain sizes. Then, for unsaturated flow in fractured porous media, we have the
following coupled system of equations for _p_ <sup>_m_</sup> and _p_ <sup>_f_</sup> :
_<u>∂</u>_ <u>Θ</u> <sup>_m_</sup>
_−∇·_ ( _k_ <sup>_m_</sup> ( _x, p_ <sup>_m_</sup> ) _∇_ ( _p_ <sup>_m_</sup> + _z_ )) + _σ_ <sup>_mf_</sup> ( _x, p_ <sup>_mf_</sup> )( _p_ <sup>_m_</sup> _−_ _p_ <sup>_f_</sup> ) = _f_ <sup>_m_</sup> _,_ _x ∈_ Ω _,_
_∂t_
_<u>∂</u>_ <u>Θ</u> <sup>_f_</sup>
_−∇γ_ _·_ ( _k_ <sup>_f_</sup> ( _x, p_ <sup>_f_</sup> ) _∇γ_ ( _p_ <sup>_f_</sup> + _z_ )) _−_ _σ_ <sup>_fm_</sup> ( _x, p_ <sup>_mf_</sup> )( _p_ <sup>_m_</sup> _−_ _p_ <sup>_f_</sup> ) = _f_ <sup>_f_</sup> _,_ _x ∈_ _γ,_
_∂t_
3
(2)
where _p_ <sup>_m_</sup> and _p_ <sup>_f_</sup> are the pressure head in matrix and fractures; _k_ <sup>_m_</sup> and _k_ <sup>_f_</sup> are the unsaturated hydraulic
conductivity tensors for matrix and fractures; _z_ represent the influence of the gravity to the flow processes;
_∇γ_ contains partial derivativies along fracture _γ_ ; Θ <sup>_m_</sup> and Θ <sup>_f_</sup> are the water content for matrix and fracture;
and _f_ <sup>_m_</sup> and _f_ <sup>_f_</sup> refer to source and sink terms. For transfer term, we have - _V_ <sup>_σmf_</sup> <sup>(</sup> <sup>_pm_</sup> <sup>_−pf_</sup> <sup>)</sup> <sup>_dx_</sup> <sup>=</sup> - _A_ <sup>_σfm_</sup> <sup>(</sup> <sup>_pm_</sup> <sup>_−_</sup>
and _f_ <sup>_m_</sup> and _f_ <sup>_f_</sup> refer to source and sink terms. For transfer term, we have - _V_ <sup>_σmf_</sup> <sup>(</sup> <sup>_pm_</sup> <sup>_−pf_</sup> <sup>)</sup> <sup>_dx_</sup> <sup>=</sup> - _A_ <sup>_σfm_</sup> <sup>(</sup> <sup>_pm_</sup> <sup>_−_</sup>
_p_ <sup>_f_</sup> ) _ds_, _σ_ <sup>_mf_</sup> = _σ/V_, _σ_ <sup>_fm_</sup> = _σ/A_ ( _σ_ = _CI k_ <sup>_mf_</sup> and _k_ <sup>_mf_</sup> ( _x, p_ <sup>_mf_</sup> ) is the harmonic average between _k_ <sup>_m_</sup> ( _x, p_ <sup>_m_</sup> )
and _k_ <sup>_f_</sup> ( _x, p_ <sup>_f_</sup> )) for matrix volume _V_ intersecting with fracture surface and _CI_ is the connectivity index [4, 30].
As an initial condition, we set _p_ <sup>_α_</sup> = _p_ 0 ( _α_ = _m, f_ ) and zero flux boundary conditions on _∂_ Ωand _∂γ_ .
_V_ <sup>_σmf_</sup> <sup>(</sup> <sup>_pm_</sup> <sup>_−pf_</sup> <sup>)</sup> <sup>_dx_</sup> <sup>=</sup>
In general, we have following multicontinuum model:
_<u>∂</u>_ <u>Θ</u> <sup>_α_</sup> _−∇·_ ( _k_ <sup>_α_</sup> ( _x, p_ <sup>_α_</sup> ) _∇_ ( _p_ <sup>_α_</sup> + _z_ )) +
_∂t_
_β_
where _α_ = 1 _, ..., M_ and _M_ is the number of continuum.
_σ_ <sup>_αβ_</sup> ( _x, p_ <sup>_αβ_</sup> )( _p_ <sup>_α_</sup> _−_ _p_ <sup>_β_</sup> ) = _f_ <sup>_α_</sup> _,_ (3)
Let _c_ <sup>_α_</sup> ( _x, p_ <sup>_α_</sup> ) = _∂_ Θ <sup>_α_</sup> _/∂p_ therefore we have following coupled system of nonlinear parabolic equations
_c_ <sup>_α_</sup> ( _x, p_ <sup>_α_</sup> ) <sup>_<u>∂pα</u>_</sup>
_∂t_ <sup>_−∇·_</sup> <sup>(</sup> <sup>_kα_</sup> <sup>(</sup> <sup>_x, pα_</sup> <sup>)</sup> <sup>_∇pα_</sup> <sup>) +</sup>
_β_
_σ_ <sup>_αβ_</sup> ( _x, p_ <sup>_αβ_</sup> )( _p_ <sup>_α_</sup> _−_ _p_ <sup>_β_</sup> ) = _q_ <sup>_α_</sup> _,_ (4)
where _q_ <sup>_α_</sup> = _f_ <sup>_α_</sup> + _∇·_ ( _k_ <sup>_α_</sup> ( _x, p_ <sup>_α_</sup> ) _z_ ), _c_ <sup>_α_</sup> ( _p_ <sup>_α_</sup> ) and _k_ <sup>_α_</sup> ( _x, p_ <sup>_α_</sup> ) are the nonlinear coefficient ( _α_ = 1 _, ..., M_ ).
For the approximation on the fine grid, we use structured grids with embedded discrete fracture model
(EDFM) [24, 30]. Let _T_ <sup>_h_</sup> denote a structured fine grid of the porous matrix domain Ωand _G_ <sup>_h_</sup> denote a fine
grid of the fracture domain _γ_
_T_ <sup>_h_</sup> = _∪_ <sup>_N_</sup> _i_ =1 <sup>_m,h_</sup>
<sup>_N_</sup> _i_ =1 <sup>_m,hςi,_</sup> _G_ <sup>_h_</sup> = _∪_ <sup>_N_</sup> _l_ =1 <sup>_f,hι_</sup>
<sup>_N_</sup> _l_ =1 <sup>_f,hιl,_</sup>
where _ςi_ and _ιl_ are the cell of the matrix and fractures fine grids, _N_ <sup>_m,h_</sup> is the number of cells in _T_ <sup>_h_</sup>, _N_ <sup>_f,h_</sup>
is the number of cell related to fracture mesh _G_ <sup>_h_</sup> . Therefore, for finite volume approximation we have
_<u>p</u>_ <sup>_m_</sup> _<u>i</u>_
<sup>_<u>p</u>_</sup> <sup><u>ˇ</u></sup> _<u>i</u>_ <sup>_m_</sup>
_|ςi|_ +
_τ_
_u_ <sup>_mm_</sup> _ij_ +
_i_ <sup>_m|ςi|,_</sup> _∀i_ = 1 _, ..., N_ <sup>_m,h_</sup>
_j_
_c_ <sup>_m_</sup> _i_
_c_ <sup>_m_</sup> _i_
<sup>_m_</sup> _<u>i</u>_ <sup>_<u>−</u>_</sup> <sup>_<u>p</u>_</sup> <sup><u>ˇ</u></sup> _<u>i</u>_ <sup>_m_</sup>
_l_
_u_ <sup>_mf_</sup> _il_
<sup>_mf_</sup> _il_ = _qi_ <sup>_m_</sup>
_<u>l</u>_ _|ιl|_ +
_τ_
_i_
_u_ <sup>_fm_</sup> _il_
<sup>_fm_</sup> _il_ = _ql_ <sup>_f_</sup>
_l_ <sup>_f_</sup> <sup>_|ιl|,_</sup> _∀l_ = 1 _, .., N_ <sup>_f,h_</sup> _,_
_c_ <sup>_f_</sup> _l_
_<u>p</u>_ <sup>_f_</sup> _<u>l</u>_
<sup>_f_</sup> _<u>l</u>_ <sup>_<u>−</u>_</sup> <sup>_<u>p</u>_</sup> <sup><u>ˇ</u></sup> _<u>l</u>_ <sup>_f_</sup>
_n_
_u_ <sup>_ff_</sup> _ln_ <sup>+</sup>
<sup>_m_</sup> _i_ <sup>and</sup> <sup>_pf_</sup> _l_
_p_ ˇ <sup>_m_</sup> _i_ and _p_ ˇ <sup>_f_</sup> _l_
where _p_ <sup>_m_</sup> _i_
where _p_ <sup>_m_</sup> _i_ <sup>and</sup> <sup>_pf_</sup> _l_ <sup>are</sup> <sup>pressure</sup> <sup>of</sup> <sup>matrix</sup> <sup>and</sup> <sup>fracture</sup> <sup>continuum</sup> <sup>in</sup> <sup>cells</sup> <sup>_ςi_</sup> <sup>and</sup> <sup>_ιl_</sup> <sup>,</sup> <sup>_|ςi|_</sup> <sup>and</sup> <sup>_|ιl|_</sup> <sup>are</sup> <sup>the</sup> <sup>volume</sup>
of cells. Here, we use an implicit scheme for time discretization, where _p_ ˇ <sup>_m_</sup> _i_ and _p_ ˇ <sup>_f_</sup> _l_ <sup>are</sup> <sup>the</sup> <sup>solutions</sup> <sup>from</sup>
previous time step and _τ_ is the given time step [34, 35].
For approximation of the flux in matrix ( _u_ <sup>_mm_</sup> ) and fracture ( _u_ <sup>_ff_</sup> ) continuum
_u_ <sup>_mm_</sup> = _−k_ <sup>_m_</sup> ( _x, p_ <sup>_m_</sup> ) _∇p_ <sup>_m_</sup> _,_ _u_ <sup>_ff_</sup> = _−k_ <sup>_f_</sup> ( _x, p_ <sup>_f_</sup> ) _∇γp_ <sup>_f_</sup> _,_
we use a classic two point flux approximation (TPFA)
<sup>_mm_</sup> _ij_ = _u_ <sup>_mm_</sup> _· n|Eij_ = _Tij_ <sup>_mm_</sup>
<sup>_ff_</sup> _ij_ <sup>(</sup> <sup>_pf_</sup> _i_
<sup>_f_</sup> _i_ <sup>_, pf_</sup> _l_
<sup>_f_</sup> _l_ <sup>)(</sup> <sup>_p_</sup> _i_ <sup>_f_</sup>
_i_ <sup>_f_</sup> <sup>_−_</sup> <sup>_pf_</sup> _j_
<sup>_f_</sup> _j_ <sup>)</sup> <sup>_,_</sup>
_u_ <sup>_mm_</sup> _ij_
_ij_ <sup>_mm_</sup> ( _p_ <sup>_m_</sup> _i_
<sup>_m_</sup> _i_ <sup>_, pm_</sup> _j_
<sup>_m_</sup> _j_ <sup>)(</sup> <sup>_pm_</sup> _i_
<sup>_m_</sup> _i_ <sup>_−_</sup> <sup>_pm_</sup> _j_ <sup>)</sup>
<sup>_m_</sup> _j_ <sup>)</sup> <sup>_,_</sup> _u_ <sup>_ff_</sup> _ln_
<sup>_ff_</sup> _ln_ <sup>=</sup> <sup>_uff_</sup> <sup>_· n|e_</sup> _ln_ <sup>=</sup> <sup>_T ff_</sup> _ij_
_ij_ <sup>_m_</sup> <sup>= (</sup> <sup>_k_</sup> _i_ <sup>_m_</sup>
_l_ <sup>_f_</sup> <sup>(</sup> <sup>_pf_</sup> _l_
<sup>_f_</sup> _l_ <sup>)+</sup> <sup>_k_</sup> _n_ <sup>_f_</sup>
where _Tij_ <sup>_mm_</sup>
_ij_ <sup>_mm_</sup> = _kij_ <sup>_m_</sup>
_ij_ <sup>_m|Eij|/dij_</sup> <sup>,</sup> <sup>_T ff_</sup> _ln_
<sup>_ff_</sup> _ln_ <sup>=</sup> <sup>_k_</sup> _ln_ <sup>_f_</sup>
_ln_ <sup>_f_</sup> <sup>_/_</sup> <sup>∆</sup> <sup>_ln_</sup> <sup>,</sup> <sup>_k_</sup> _ij_ <sup>_m_</sup>
_i_ <sup>_m_</sup> <sup>(</sup> <sup>_pm_</sup> _i_
<sup>_m_</sup> _i_ <sup>)+</sup> <sup>_k_</sup> _j_ <sup>_m_</sup>
_j_ <sup>_m_</sup> <sup>(</sup> <sup>_pm_</sup> _j_
<sup>_m_</sup> _j_ <sup>))</sup> <sup>_/_</sup> <sup>2,</sup> <sup>_k_</sup> _ln_ <sup>_f_</sup>
_ln_ <sup>_f_</sup> <sup>= (</sup> <sup>_k_</sup> _l_ <sup>_f_</sup>
_n_ <sup>_f_</sup> <sup>(</sup> <sup>_pf_</sup> _n_
where _Tij_ <sup>_mm_</sup> = _kij_ <sup>_m|Eij|/dij_</sup> <sup>,</sup> <sup>_T ff_</sup> _ln_ <sup>=</sup> <sup>_k_</sup> _ln_ <sup>_f_</sup> <sup>_/_</sup> <sup>∆</sup> <sup>_ln_</sup> <sup>,</sup> <sup>_k_</sup> _ij_ <sup>_m_</sup> <sup>= (</sup> <sup>_k_</sup> _i_ <sup>_m_</sup> <sup>(</sup> <sup>_pm_</sup> _i_ <sup>)+</sup> <sup>_k_</sup> _j_ <sup>_m_</sup> <sup>(</sup> <sup>_pm_</sup> _j_ <sup>))</sup> <sup>_/_</sup> <sup>2,</sup> <sup>_k_</sup> _ln_ <sup>_f_</sup> <sup>= (</sup> <sup>_k_</sup> _l_ <sup>_f_</sup> <sup>(</sup> <sup>_pf_</sup> _l_ <sup>)+</sup> <sup>_k_</sup> _n_ <sup>_f_</sup> <sup>(</sup> <sup>_pf_</sup> _n_ <sup>))</sup> <sup>_/_</sup> <sup>2,</sup> <sup>_Eij_</sup> <sup>and</sup>
_eln_ are the interface between two cells, _|Eij|_ is the length of face between cells _ςi_ and _ςj_, _dij_ is the distance
between midpoint of cells _ςi_ and _ςj_, ∆ _ln_ is the distance between midpoint of cells _ιl_ and _ιn_ .
For the flux between matrix and fracture continuum
_u_ <sup>_mf_</sup> = _σ_ <sup>_mf_</sup> ( _x, p_ <sup>_mf_</sup> )( _p_ <sup>_m_</sup> _−_ _p_ <sup>_f_</sup> ) _,_ _u_ <sup>_fm_</sup> = _σ_ <sup>_fm_</sup> ( _x, p_ <sup>_mf_</sup> )( _p_ <sup>_f_</sup> _−_ _p_ <sup>_m_</sup> ) _,_
we follow EDFM and have the following approximation
_u_ <sup>_mf_</sup> _il_
<sup>_mf_</sup> _il_ = _−u_ <sup>_fm_</sup> _il_
<sup>_fm_</sup> _il_ = _Til_ <sup>_mf_</sup>
_il_ <sup>_mf_</sup> ( _p_ <sup>_m_</sup> _i_
<sup>_m_</sup> _i_ <sup>_−_</sup> <sup>_pf_</sup> _l_
<sup>_f_</sup> _l_ <sup>)</sup> <sup>_,_</sup>
4
where _Til_ <sup>_mf_</sup>
_il_ <sup>_mf_</sup> = _σil_ with _σil_ = _CIilkil_ <sup>_mf_</sup>
where _Til_ <sup>_mf_</sup> = _σil_ with _σil_ = _CIilkil_ <sup>_mf_</sup> if _ιl_ _⊂_ _ςi_ and zero else ( _CIil_ is the connectivity index from [24, 30, 18]
that proportional to the distance and area of the intersection between the fracture cell _ιl_ and porous matrix
cell _ςi_ ).
Therefore, we have following fine grid approximation
_<u>p</u>_ <sup>_m_</sup> _<u>i</u>_
<sup>_<u>p</u>_</sup> <sup><u>ˇ</u></sup> _<u>i</u>_ <sup>_m_</sup>
_|ςi|_ +
_τ_
_Tij_ <sup>_mm_</sup>
_ij_ <sup>_mm_</sup> ( _p_ <sup>_m_</sup> _i_
(5)
<sup>_m_</sup> _i_ <sup>_, pf_</sup> _l_
_i_ <sup>_m_</sup> <sup>_−_</sup> <sup>_pf_</sup> _l_
_i_ <sup>_m|ςi|,_</sup> _∀i_ = 1 _, ..., N_ <sup>_m,h_</sup>
_j_
<sup>_m_</sup> _i_ <sup>_, pm_</sup> _j_
<sup>_m_</sup> _j_ <sup>)(</sup> <sup>_pm_</sup> _i_
<sup>_m_</sup> _i_ <sup>_−_</sup> <sup>_pm_</sup> _j_
<sup>_m_</sup> _j_ <sup>) +</sup>
<sup>_f_</sup> _l_ <sup>)(</sup> <sup>_p_</sup> _i_ <sup>_m_</sup>
<sup>_pf_</sup> _l_ <sup>) =</sup> <sup>_q_</sup> _i_ <sup>_m_</sup>
_c_ <sup>_m_</sup> _i_
_c_ <sup>_m_</sup> _i_
<sup>_m_</sup> _<u>i</u>_ <sup>_<u>−</u>_</sup> <sup>_<u>p</u>_</sup> <sup><u>ˇ</u></sup> _<u>i</u>_ <sup>_m_</sup>
_l_
_Til_ <sup>_mf_</sup>
_il_ <sup>_mf_</sup> ( _p_ <sup>_m_</sup> _i_
_<u>l</u>_ _|ιl|_ +
_τ_
_c_ <sup>_f_</sup> _l_
_<u>p</u>_ <sup>_f_</sup> _<u>l</u>_
<sup>_f_</sup> _<u>l</u>_ <sup>_<u>−</u>_</sup> <sup>_<u>p</u>_</sup> <sup><u>ˇ</u></sup> _<u>l</u>_ <sup>_f_</sup>
<sup>_m_</sup> _i_ <sup>_, pf_</sup> _l_
_i_ <sup>_m_</sup> <sup>_−_</sup> <sup>_pf_</sup> _l_
_l_ <sup>_f_</sup> <sup>_|ιl|,_</sup> _∀l_ = 1 _, .., N_ <sup>_f,h_</sup> _,_
<sup>_f_</sup> _l_ <sup>_, p_</sup> _n_ <sup>_f_</sup>
_n_ <sup>_f_</sup> <sup>)(</sup> <sup>_pf_</sup> _l_
_n_ <sup>_f_</sup> <sup>)</sup> <sup>_−_</sup>
<sup>_f_</sup> _l_ <sup>)(</sup> <sup>_p_</sup> _i_ <sup>_m_</sup>
<sup>_f_</sup> _l_ <sup>) =</sup> <sup>_q_</sup> _l_ <sup>_f_</sup>
<sup>_f_</sup> _l_ <sup>_−_</sup> <sup>_p_</sup> _n_ <sup>_f_</sup>
_n_
_Tln_ <sup>_ff_</sup>
_ln_ <sup>_ff_</sup> <sup>(</sup> <sup>_pf_</sup> _l_
_i_
_Til_ <sup>_mf_</sup>
_il_ <sup>_mf_</sup> ( _p_ <sup>_m_</sup> _i_
or for general multicontinuum case [7, 32], we have
<sup>_<u>p</u>_</sup> <sup><u>ˇ</u></sup> _<u>i</u>_ <sup>_α_</sup>
_|ςi|_ +
_τ_
_j_
_Tij_ <sup>_αα_</sup>
_ij_ <sup>_αα_</sup> <sup>(</sup> <sup>_pα_</sup> _i_
_i_ <sup>_α, pβ_</sup> _l_
_i_ <sup>_α_</sup> <sup>_−_</sup> <sup>_pβ_</sup> _l_
_i_ <sup>_α|ςi|,_</sup> _∀i_ = 1 _, ..., N_ <sup>_α,h_</sup> _,_ (6)
<sup>_α_</sup> _i_ <sup>_, pα_</sup> _j_
_c_ <sup>_α_</sup> _i_
_<u>p</u>_ <sup>_α_</sup> _<u>i</u>_
<sup>_α_</sup> _<u>i</u>_ <sup>_<u>−</u>_</sup> <sup>_<u>p</u>_</sup> <sup><u>ˇ</u></sup> _<u>i</u>_ <sup>_α_</sup>
<sup>_α_</sup> _j_ <sup>)(</sup> <sup>_pα_</sup> _i_
<sup>_α_</sup> _i_ <sup>_−_</sup> <sup>_pα_</sup> _j_
<sup>_α_</sup> _j_ <sup>) +</sup>
<sup>_β_</sup> _l_ <sup>)(</sup> <sup>_p_</sup> _i_ <sup>_α_</sup>
<sup>_β_</sup> _l_ <sup>) =</sup> <sup>_q_</sup> _i_ <sup>_α_</sup>
_β_
_l_
_Til_ <sup>_αβ_</sup>
_il_ <sup>_αβ_</sup> <sup>(</sup> <sup>_p_</sup> _i_ <sup>_α_</sup>
where _α_ = 1 _, ..., M_ and _M_ is the number of continua.
2.2 Two-phase flow problem
Mathematical model of the two-phase flow problem in porous media contains a conservation law and Darcy’s
law [19]. For the case with incompressible fluid and rock and without gravitational and capillary forces, we
have
_φ_ <sup>_<u>∂s</u>_</sup> _∂t_ <sup>_−∇·_</sup> <sup>(</sup> <sup>_λw_</sup> <sup>(</sup> <sup>_s_</sup> <sup>)</sup> <sup>_k_</sup> <sup>(</sup> <sup>_x_</sup> <sup>)</sup> <sup>_∇p_</sup> <sup>) =</sup> <sup>_qw,_</sup> _x ∈_ Ω _,_
_−∇·_ ( _λ_ ( _s_ ) _k_ ( _x_ ) _∇p_ ) = _q,_ _x ∈_ Ω _,_
(7)
where _s_ = _s_ <sup>_w_</sup> is the saturation of the wetting phase, _p_ is the pressure, _q_ = _q_ <sup>_w_</sup> + _q_ <sup>_n_</sup>, _q_ <sup>_w_</sup> and _q_ <sup>_n_</sup> are the
source/sink of wetting and nonwetting phases, _λ_ <sup>_i_</sup> = _kri_ ( _s_ ) _/µi_, _λ_ = _λ_ <sup>_n_</sup> + _λ_ <sup>_w_</sup>, _φ_, _k_ are the porosity and
permeability, _µi_ and _kri_ are the viscosity and relative permeability for _i_ -phase ( _i_ = _n, w_ ).
For the fractured porous media, we consider the mixed dimensional mathematical model for two-phase
flow problem
_φ_ <sup>_m ∂sm_</sup>
_∂t_
<sup>_m_</sup> _x ∈_ Ω _,_
_∂t_ <sup>_−∇·_</sup> <sup>(</sup> <sup>_λw_</sup> <sup>(</sup> <sup>_sm_</sup> <sup>)</sup> <sup>_km_</sup> <sup>(</sup> <sup>_x_</sup> <sup>)</sup> <sup>_∇pm_</sup> <sup>) +</sup> <sup>_λw_</sup> <sup>(</sup> <sup>_smf_</sup> <sup>)</sup> <sup>_σmf_</sup> <sup>(</sup> <sup>_x_</sup> <sup>)(</sup> <sup>_pm −_</sup> <sup>_pf_</sup> <sup>) =</sup> <sup>_qw,m,_</sup>
_−∇·_ ( _λ_ ( _s_ <sup>_m_</sup> ) _k_ <sup>_m_</sup> ( _x_ ) _∇p_ <sup>_m_</sup> ) + _λ_ ( _s_ <sup>_mf_</sup> ) _σ_ <sup>_mf_</sup> ( _x_ )( _p_ <sup>_m_</sup> _−_ _p_ <sup>_f_</sup> ) = _q_ <sup>_m_</sup> _,_ _x ∈_ Ω _,_
(8)
_φ_ <sup>_f_</sup> <sup>_<u>∂sf</u>_</sup>
_∂t_
<sup>_<u>∂sf</u>_</sup> _x ∈_ _γ,_
_∂t_ <sup>_−∇γ_</sup> <sup>_·_</sup> <sup>(</sup> <sup>_λw_</sup> <sup>(</sup> <sup>_sf_</sup> <sup>)</sup> <sup>_kf_</sup> <sup>(</sup> <sup>_x_</sup> <sup>)</sup> <sup>_∇γpf_</sup> <sup>)</sup> <sup>_−_</sup> <sup>_λw_</sup> <sup>(</sup> <sup>_smf_</sup> <sup>)</sup> <sup>_σfm_</sup> <sup>(</sup> <sup>_x_</sup> <sup>)(</sup> <sup>_pm −_</sup> <sup>_pf_</sup> <sup>) =</sup> <sup>_qw,f_</sup> <sup>_,_</sup>
_−∇γ_ _·_ ( _λ_ ( _s_ <sup>_f_</sup> ) _k_ <sup>_f_</sup> ( _x_ ) _∇γp_ <sup>_f_</sup> ) + _λ_ ( _s_ <sup>_mf_</sup> ) _σ_ <sup>_fm_</sup> ( _x_ )( _p_ <sup>_m_</sup> _−_ _p_ <sup>_f_</sup> ) = _q_ <sup>_f_</sup> _,_ _x ∈_ _γ,_
where _s_ <sup>_m_</sup> and _s_ <sup>_f_</sup> are the saturation in porous matrix and in fractures; _p_ <sup>_m_</sup> and _p_ <sup>_f_</sup> are the pressure in matrix
and in fractures; _φ_ <sup>_m_</sup> and _φ_ <sup>_f_</sup> are the porosity for matrix and fracture continuum; _k_ <sup>_m_</sup> and _k_ <sup>_f_</sup> are the absolute
permeability of matrix and fractures; and _q_ <sup>_α_</sup> = _q_ <sup>_w,α_</sup> + _q_ <sup>_n,α_</sup>, _q_ <sup>_w,α_</sup> and _q_ <sup>_n,α_</sup> are the source/sink of wetting
and nonwetting phases for continua _α_ = _m, f_ . On the fine grid, we suppose _λ_ <sup>_i,m_</sup> = _λ_ <sup>_i,f_</sup> = _λ_ <sup>_i_</sup> for _i_ = _n, w_
and _λ_ = _λ_ <sup>_n_</sup> + _λ_ <sup>_w_</sup>, where _λ_ <sup>_i_</sup> = _kri_ ( _s_ <sup>_α_</sup> ) _/µi_, _µi_ is the viscosity and _kri_ is relative permeability for _i_ -phase that
depends on flux direction. In general, realtive permeability functions can be different for each continua and
for flux between them. For transfer term, similarly to the previous model for unsaturated flow, we have
_σ_ <sup>_mf_</sup> = _σ/V_, _σ_ <sup>_fm_</sup> = _σ/A_ ( _σ_ = _CI k_ <sup>_mf_</sup> and _k_ <sup>_mf_</sup> is the harmonic average between _k_ <sup>_m_</sup> and _k_ <sup>_f_</sup> ) for matrix
volume _V_ intersecting with fracture surface and _CI_ is the connectivity index [4, 30]. As an initial condition,
we set _s_ <sup>_α_</sup> = _s_ 0( _x_ ) ( _α_ = _m, f_ ). For boundary conditions, we set zero flux on _∂_ Ωand _∂γ_ .
5
For the general multicontinuum case, we can write
_φ_ <sup>_α ∂sα_</sup>
_∂t_ <sup>_−∇·_</sup> <sup>(</sup> <sup>_λw_</sup> <sup>(</sup> <sup>_sα_</sup> <sup>)</sup> <sup>_kα_</sup> <sup>(</sup> <sup>_x_</sup> <sup>)</sup> <sup>_∇pα_</sup> <sup>) +</sup>
_β_
_λ_ <sup>_w_</sup> ( _s_ <sup>_αβ_</sup> ) _σ_ <sup>_αβ_</sup> ( _x_ )( _p_ <sup>_α_</sup> _−_ _p_ <sup>_β_</sup> ) = _q_ <sup>_w,α_</sup> _,_
(9)
_β_
_−∇·_ ( _λ_ ( _s_ <sup>_α_</sup> ) _k_ <sup>_α_</sup> ( _x_ ) _∇p_ <sup>_α_</sup> ) +
where _α_ = 1 _, ..., M_ and _M_ is the number of continuum.
_λ_ ( _s_ <sup>_αβ_</sup> ) _σ_ <sup>_αβ_</sup> ( _x_ )( _p_ <sup>_α_</sup> _−_ _p_ <sup>_β_</sup> ) = _q_ <sup>_α_</sup> _,_
Similarly to the previous model problem of unsaturated flow, we use structured grids and construct
a finite volume approximation with embedded discrete fracture model (EDFM) for approximation of the
two-phase flow problem. We use same fine grid for the porous matrix domain ( _T_ <sup>_h_</sup> = _∪_ <sup>_N_</sup> _i_ =1 <sup>_m,hςi_</sup> <sup>)</sup> <sup>and</sup> <sup>the</sup>
fracture domain ( _G_ <sup>_h_</sup> = _∪_ <sup>_N_</sup> _l_ =1 <sup>_f,hιl_</sup> <sup>)</sup> <sup>with</sup> <sup>cells</sup> <sup>_ςi_</sup> <sup>and</sup> <sup>_ιl_</sup> <sup>,</sup> <sup>_N m,h_</sup> <sup>is</sup> <sup>the</sup> <sup>number</sup> <sup>of</sup> <sup>cells</sup> <sup>in</sup> <sup>_T_</sup> <sup>_h_</sup> <sup>,</sup> <sup>_N f,h_</sup> <sup>is</sup> <sup>the</sup> <sup>number</sup>
of cell related to fracture mesh _G_ <sup>_h_</sup> . For approximation by time, we use IMPES (implicit pressure explicit
saturation) scheme and a finite volume approximation by space
_<u>s</u>_ <sup>_m_</sup> _<u>i</u>_
<sup>_<u>s</u>_</sup> <sup><u>ˇ</u></sup> _<u>i</u>_ <sup>_m_</sup>
_|ςi|_ +
_τ_
_l_
_u_ <sup>_w,mf_</sup> _il_
<sup>_w,mf_</sup> _il_ = (1 _−_ _fi_ <sup>_w,m_</sup>
_i_ <sup>_w,m_</sup> ) _qi_ <sup>_w,m_</sup>
_i_ <sup>_w,m_</sup> _|ςi|,_
_u_ <sup>_w,mm_</sup> _ij_ +
_φ_ <sup>_m_</sup> _i_
_φ_ <sup>_m_</sup> _i_
<sup>_m_</sup> _<u>i</u>_ <sup>_<u>−</u>_</sup> <sup>_<u>s</u>_</sup> <sup><u>ˇ</u></sup> _<u>i</u>_ <sup>_m_</sup>
_i_ <sup>_m|ςi|,_</sup>
_u_ <sup>_mm_</sup> _ij_ +
_u_ <sup>_mm_</sup> _ij_
_l_
_u_ <sup>_mf_</sup> _il_
<sup>_mf_</sup> _il_ = _qi_ <sup>_m_</sup>
_<u>l</u>_ _|ιl|_ +
_τ_
_j_
_j_
_n_
_n_
_φ_ <sup>_f_</sup> _l_
_<u>s</u>_ <sup>_f_</sup> _<u>l</u>_
<sup>_f_</sup> _<u>l</u>_ <sup>_<u>−</u>_</sup> <sup>_<u>s</u>_</sup> <sup><u>ˇ</u></sup> _<u>l</u>_ <sup>_f_</sup>
_i_
_u_ <sup>_w,fm_</sup> _il_
<sup>_w,fm_</sup> _il_ = (1 _−_ _fl_ <sup>_w,f_</sup>
_l_ <sup>_w,f_</sup> ) _ql_ <sup>_w,f_</sup>
_l_ <sup>_w,f_</sup> _|ιl|,_
_u_ <sup>_w,ff_</sup> _ln_ +
_u_ <sup>_ff_</sup> _ln_ <sup>+</sup>
_i_
_u_ <sup>_fm_</sup> _il_
<sup>_fm_</sup> _il_ = _ql_ <sup>_f_</sup>
_l_ <sup>_f_</sup> <sup>_|ιl|,_</sup>
<sup>_m_</sup> _i_ and _s_ <sup>_f_</sup> _l_
_i_ <sup>_w,α_</sup> = _λ_ <sup>_w_</sup> ( _s_ <sup>_α_</sup> _i_
<sup>_α_</sup> _i_ <sup>)</sup> <sup>_/λ_</sup> <sup>(</sup> <sup>_sα_</sup> _i_
where _s_ <sup>_m_</sup> _i_
<sup>_f_</sup> _l_ <sup>are</sup> <sup>saturation</sup> <sup>of</sup> <sup>matrix</sup> <sup>and</sup> <sup>fracture</sup> <sup>continuum</sup> <sup>in</sup> <sup>cells</sup> <sup>_ςi_</sup> <sup>and</sup> <sup>_ιl_</sup> <sup>,</sup> <sup>_f_</sup> _i_ <sup>_w,α_</sup>
where _s_ <sup>_m_</sup> _i_ and _s_ <sup>_f_</sup> _l_ <sup>are</sup> <sup>saturation</sup> <sup>of</sup> <sup>matrix</sup> <sup>and</sup> <sup>fracture</sup> <sup>continuum</sup> <sup>in</sup> <sup>cells</sup> <sup>_ςi_</sup> <sup>and</sup> <sup>_ιl_</sup> <sup>,</sup> <sup>_f_</sup> _i_ <sup>_w,α_</sup> = _λ_ <sup>_w_</sup> ( _s_ <sup>_α_</sup> _i_ <sup>)</sup> <sup>_/λ_</sup> <sup>(</sup> <sup>_sα_</sup> _i_ <sup>),</sup>
_|ςi|_ and _|ιl|_ are the volume of cells. Here, we use an implicit scheme for time discretization, where _s_ ˇ <sup>_m_</sup> _i_ and
_s_ ˇ <sup>_f_</sup> _l_ <sup>are</sup> <sup>the</sup> <sup>solutions</sup> <sup>from</sup> <sup>previous</sup> <sup>time</sup> <sup>step</sup> <sup>and</sup> <sup>_τ_</sup> <sup>is</sup> <sup>the</sup> <sup>given</sup> <sup>time</sup> <sup>step.</sup>
<sup>_f_</sup> _l_ <sup>are</sup> <sup>the</sup> <sup>solutions</sup> <sup>from</sup> <sup>previous</sup> <sup>time</sup> <sup>step</sup> <sup>and</sup> <sup>_τ_</sup> <sup>is</sup> <sup>the</sup> <sup>given</sup> <sup>time</sup> <sup>step.</sup>
For the fluxes
_u_ <sup>_mm_</sup> = _−λ_ ( _s_ <sup>_m_</sup> ) _k_ <sup>_m_</sup> ( _x_ ) _∇p_ <sup>_m_</sup> _,_ _u_ <sup>_w,mm_</sup> = _−λ_ <sup>_w_</sup> ( _s_ <sup>_m_</sup> ) _k_ <sup>_m_</sup> ( _x_ ) _∇p_ <sup>_m_</sup> _,_
_u_ <sup>_ff_</sup> = _−λ_ ( _s_ <sup>_f_</sup> ) _k_ <sup>_f_</sup> ( _x_ ) _∇γp_ <sup>_f_</sup> _,_ _u_ <sup>_w,ff_</sup> = _−λ_ <sup>_w_</sup> ( _s_ <sup>_f_</sup> ) _k_ <sup>_f_</sup> ( _x_ ) _∇γp_ <sup>_f_</sup> _,_
_u_ <sup>_mf_</sup> = _λ_ ( _s_ <sup>_mf_</sup> ) _σ_ <sup>_mf_</sup> ( _x_ )( _p_ <sup>_m_</sup> _−_ _p_ <sup>_f_</sup> ) _,_ _u_ <sup>_w,mf_</sup> = _λ_ <sup>_w_</sup> ( _s_ <sup>_mf_</sup> ) _σ_ <sup>_mf_</sup> ( _x_ )( _p_ <sup>_m_</sup> _−_ _p_ <sup>_f_</sup> ) _,_
_u_ <sup>_fm_</sup> = _λ_ ( _s_ <sup>_mf_</sup> ) _σ_ <sup>_fm_</sup> ( _x_ )( _p_ <sup>_f_</sup> _−_ _p_ <sup>_m_</sup> ) _,_ _u_ <sup>_w,fm_</sup> = _λ_ <sup>_w_</sup> ( _s_ <sup>_mf_</sup> ) _σ_ <sup>_fm_</sup> ( _x_ )( _p_ <sup>_f_</sup> _−_ _p_ <sup>_m_</sup> ) _,_
we have following approximations
<sup>_mm_</sup> _ij_ = _u_ <sup>_mm_</sup> _· n|Eij_ = _Tij_ <sup>_mm_</sup>
<sup>_m_</sup> _i_ <sup>_−_</sup> <sup>_pm_</sup> _j_
_u_ <sup>_mm_</sup> _ij_
_ij_ <sup>_mm_</sup> ( _p_ <sup>_m_</sup> _i_
<sup>_m_</sup> _i_ <sup>_−_</sup> <sup>_pm_</sup> _j_
<sup>_m_</sup> _j_ <sup>)</sup> <sup>_,_</sup> _u_ <sup>_w,mm_</sup> _ij_
<sup>_w,mm_</sup> _ij_ = _u_ <sup>_w,mm_</sup> _· n|Eij_ = _Tij_ <sup>_w,mm_</sup>
_ij_ <sup>_w,mm_</sup> ( _p_ <sup>_m_</sup> _i_
<sup>_m_</sup> _j_ <sup>)</sup> <sup>_,_</sup>
<sup>_ff_</sup> _ln_ <sup>=</sup> <sup>_uff_</sup> <sup>_· n|e_</sup> _ln_ <sup>=</sup> <sup>_T ff_</sup> _ij_
<sup>_f_</sup> _i_ <sup>_−_</sup> <sup>_pf_</sup> _j_
_u_ <sup>_ff_</sup> _ln_
<sup>_ff_</sup> _ij_ <sup>(</sup> <sup>_pf_</sup> _i_
<sup>_f_</sup> _i_ <sup>_−_</sup> <sup>_pf_</sup> _j_
<sup>_f_</sup> _j_ <sup>)</sup> <sup>_,_</sup> _u_ <sup>_w,ff_</sup> _ln_
<sup>_f_</sup> _l_ <sup>)</sup> <sup>_,_</sup> _u_ <sup>_w,mf_</sup> _il_
<sup>_w,ff_</sup> _ln_ = _u_ <sup>_w,ff_</sup> _· n|eln_ = _Tij_ <sup>_w,ff_</sup>
_ij_ <sup>_w,ff_</sup> ( _p_ <sup>_f_</sup> _i_
<sup>_f_</sup> _j_ <sup>)</sup> <sup>_,_</sup>
_u_ <sup>_mf_</sup> _il_
<sup>_mf_</sup> _il_ = _−u_ <sup>_fm_</sup> _il_
<sup>_fm_</sup> _il_ = _Til_ <sup>_mf_</sup>
_il_ <sup>_mf_</sup> ( _p_ <sup>_m_</sup> _i_
<sup>_m_</sup> _i_ <sup>_−_</sup> <sup>_pf_</sup> _l_
<sup>_w,mf_</sup> _il_ = _−u_ <sup>_w,fm_</sup> _il_
<sup>_w,fm_</sup> _il_ = _Til_ <sup>_w,mf_</sup>
_il_ <sup>_w,mf_</sup> ( _p_ <sup>_m_</sup> _i_
<sup>_m_</sup> _i_ <sup>_−_</sup> <sup>_pf_</sup> _l_
<sup>_f_</sup> _l_ <sup>)</sup> <sup>_,_</sup>
where
_Tij_ <sup>_αβ_</sup>
_ij_ <sup>_αβ_</sup> <sup>(</sup> <sup>_s_</sup> _i_ <sup>_α_</sup>
_ij_ <sup>_αβ_</sup> = _Tij_ <sup>_αβ_</sup>
_i_ <sup>_α, sβ_</sup> _j_
<sup>_αβ_</sup> _ij_ <sup>)</sup> <sup>_W αβ_</sup> _ij_
<sup>_αβ_</sup> _ij_ <sup>_,_</sup> _Tij_ <sup>_w,αβ_</sup>
_ij_ <sup>_w,αβ_</sup> ( _s_ <sup>_α_</sup> _i_
_s_ <sup>_α_</sup> _i_ <sup>_, sβ_</sup> _j_
<sup>_αβ_</sup> _ij_ <sup>)</sup> <sup>_W αβ_</sup> _ij_
<sup>_αβ_</sup> _ij_ <sup>_,_</sup> _α, β_ = _m, f_
<sup>_β_</sup> _j_ <sup>) =</sup> <sup>_λ_</sup> <sup>(</sup> <sup>_sαβ_</sup> _ij_
_ij_ <sup>_w,αβ_</sup> = _Tij_ <sup>_w,αβ_</sup>
<sup>_β_</sup> _j_ <sup>) =</sup> <sup>_λw_</sup> <sup>(</sup> <sup>_sαβ_</sup> _ij_
_ln_ <sup>_f_</sup> <sup>_/_</sup> <sup>∆</sup> <sup>_ln_</sup> <sup>,</sup> <sup>_W mf_</sup> _il_
and _Wij_ <sup>_mm_</sup>
_ij_ <sup>_mm_</sup> = _kij_ <sup>_m_</sup>
_ij_ <sup>_m|Eij|/dij_</sup> <sup>,</sup> <sup>_W ff_</sup> _ln_
<sup>_ff_</sup> _ln_ <sup>=</sup> <sup>_k_</sup> _ln_ <sup>_f_</sup>
<sup>_mf_</sup> _il_ = _σil_ with _σil_ = _CIilkil_ <sup>_m_</sup>
and _Wij_ <sup>_mm_</sup> = _kij_ <sup>_m|Eij|/dij_</sup> <sup>,</sup> <sup>_W ff_</sup> _ln_ <sup>=</sup> <sup>_k_</sup> _ln_ <sup>_f_</sup> <sup>_/_</sup> <sup>∆</sup> <sup>_ln_</sup> <sup>,</sup> <sup>_W mf_</sup> _il_ = _σil_ with _σil_ = _CIilkil_ <sup>_m_</sup> <sup>if</sup> <sup>_ιl_</sup> <sup>_⊂_</sup> <sup>_ςi_</sup> <sup>and</sup> <sup>zero</sup> <sup>else.</sup> <sup>Here</sup> <sup>_|Eij|_</sup>
is the length of face between cells _ςi_ and _ςj_, _dij_ is the distance between midpoint of cells _ςi_ and _ςj_, ∆ _ln_ is
the distance between points _l_ and _n_, _CIil_ is the connectivity index from [24, 30, 18] that proportional to the
distance and area of the intersection between the fracture cell _ιl_ and porous matrix cell _ςi_ .
6
Therefore, we have following discrete problem on the fine grid
<sup>_<u>s</u>_</sup> <sup><u>ˇ</u></sup> _<u>i</u>_ <sup>_m_</sup>
_|ςi|_ +
_τ_
_ij_ <sup>_w,mm_</sup> (ˇ _s_ <sup>_m_</sup> _i_
<sup>_m_</sup> _i_ <sup>_,_</sup> <sup>ˇ</sup> <sup>_sm_</sup> _j_
<sup>_m_</sup> _i_ <sup>_,_</sup> <sup>ˇ</sup> <sup>_sf_</sup> _l_
_i_ <sup>_w,m_</sup> _|ςi|,_
_i_ <sup>_m_</sup> <sup>_−_</sup> <sup>_pf_</sup> _l_
_Tij_ <sup>_w,mm_</sup>
_φ_ <sup>_m_</sup> _i_
_<u>s</u>_ <sup>_m_</sup> _<u>i</u>_
<sup>_m_</sup> _<u>i</u>_ <sup>_<u>−</u>_</sup> <sup>_<u>s</u>_</sup> <sup><u>ˇ</u></sup> _<u>i</u>_ <sup>_m_</sup>
<sup>_m_</sup> _j_ <sup>)(</sup> <sup>_pm_</sup> _i_
<sup>_m_</sup> _i_ <sup>_−_</sup> <sup>_pm_</sup> _j_
<sup>_m_</sup> _j_ <sup>) +</sup>
_l_
<sup>_f_</sup> _l_ <sup>)(</sup> <sup>_p_</sup> _i_ <sup>_m_</sup>
<sup>_f_</sup> _l_ <sup>) = (1</sup> <sup>_−_</sup> <sup>_f_</sup> _i_ <sup>_w,m_</sup>
_i_ <sup>_w,m_</sup> ) _qi_ <sup>_w,m_</sup>
_Til_ <sup>_w,mf_</sup>
_il_ <sup>_w,mf_</sup> (ˇ _s_ <sup>_m_</sup> _i_
_s_ <sup>_m_</sup> _i_ <sup>_,_</sup> <sup>ˇ</sup> <sup>_sf_</sup> _l_
_i_ <sup>_m_</sup> <sup>_−_</sup> <sup>_pf_</sup> _l_
_i_ <sup>_m|ςi|,_</sup>
_Tij_ <sup>_mm_</sup>
_ij_ <sup>_mm_</sup> (ˇ _s_ <sup>_m_</sup> _i_
<sup>_m_</sup> _i_ <sup>_,_</sup> <sup>ˇ</sup> <sup>_sm_</sup> _j_
<sup>_m_</sup> _j_ <sup>)(</sup> <sup>_pm_</sup> _i_
<sup>_m_</sup> _i_ <sup>_−_</sup> <sup>_pm_</sup> _j_
<sup>_m_</sup> _j_ <sup>) +</sup>
_l_
<sup>_f_</sup> _l_ <sup>)(</sup> <sup>_p_</sup> _i_ <sup>_m_</sup>
<sup>_f_</sup> _l_ <sup>) =</sup> <sup>_q_</sup> _i_ <sup>_m_</sup>
_Til_ <sup>_mf_</sup>
_il_ <sup>_mf_</sup> (ˇ _s_ <sup>_m_</sup> _i_ <sup>_,_</sup>
_<u>l</u>_ _|ιl|_ +
_τ_
<sup>_m_</sup> _i_ <sup>_,_</sup> <sup>ˇ</sup> <sup>_sf_</sup> _l_
_i_ <sup>_m_</sup> <sup>_−_</sup> <sup>_pf_</sup> _l_
_l_ <sup>_w,f_</sup> ) _ql_ <sup>_w,f_</sup>
<sup>_f_</sup> _l_ <sup>_,_</sup> <sup>ˇ</sup> <sup>_s_</sup> _n_ <sup>_f_</sup>
_n_ <sup>_f_</sup> <sup>)(</sup> <sup>_pf_</sup> _l_
_n_ <sup>_f_</sup> <sup>)</sup> <sup>_−_</sup>
_φ_ <sup>_f_</sup> _l_
_<u>s</u>_ <sup>_f_</sup> _<u>l</u>_
<sup>_f_</sup> _<u>l</u>_ <sup>_<u>−</u>_</sup> <sup>_<u>s</u>_</sup> <sup><u>ˇ</u></sup> _<u>l</u>_ <sup>_f_</sup>
<sup>_sf_</sup> _l_ <sup>)(</sup> <sup>_p_</sup> _i_ <sup>_m_</sup>
<sup>_f_</sup> _l_ <sup>) = (1</sup> <sup>_−_</sup> <sup>_f_</sup> _l_ <sup>_w,f_</sup>
_l_ <sup>_w,f_</sup> _|ιl|,_
<sup>_f_</sup> _l_ <sup>_−_</sup> <sup>_p_</sup> _n_ <sup>_f_</sup>
_j_
_j_
_n_
_n_
_Tln_ <sup>_w,ff_</sup>
_ln_ <sup>_w,ff_</sup> (ˇ _s_ <sup>_f_</sup> _l_
_i_
_Til_ <sup>_w,mf_</sup>
_il_ <sup>_w,mf_</sup> (ˇ _s_ <sup>_m_</sup> _i_
<sup>_m_</sup> _i_ <sup>_,_</sup> <sup>ˇ</sup> <sup>_sf_</sup> _l_
_i_ <sup>_m_</sup> <sup>_−_</sup> <sup>_pf_</sup> _l_
_l_ <sup>_f_</sup> <sup>_|ιl|,_</sup>
_Tln_ <sup>_ff_</sup>
_ln_ <sup>_ff_</sup> <sup>(ˇ</sup> <sup>_sf_</sup> _l_
<sup>_f_</sup> _l_ <sup>_,_</sup> <sup>ˇ</sup> <sup>_s_</sup> _n_ <sup>_f_</sup>
_n_ <sup>_f_</sup> <sup>)(</sup> <sup>_pf_</sup> _l_
_n_ <sup>_f_</sup> <sup>)</sup> <sup>_−_</sup>
<sup>_f_</sup> _l_ <sup>)(</sup> <sup>_p_</sup> _i_ <sup>_m_</sup>
<sup>_f_</sup> _l_ <sup>) =</sup> <sup>_q_</sup> _l_ <sup>_f_</sup> <sup>_|_</sup>
<sup>_f_</sup> _l_ <sup>_−_</sup> <sup>_p_</sup> _n_ <sup>_f_</sup>
_i_
_Til_ <sup>_mf_</sup>
_il_ <sup>_mf_</sup> (ˇ _s_ <sup>_m_</sup> _i_
where _i_ = 1 _, ..., N_ <sup>_m,h_</sup> and _l_ = 1 _, .., N_ <sup>_f,h_</sup> .
For approximation of the _λ_ <sup>_w_</sup> ( _s_ <sup>_αβ_</sup> _ij_ <sup>),</sup> <sup>we</sup> <sup>use</sup> <sup>an</sup> <sup>upwind</sup> <sup>scheme</sup>
_ij_ <sup>_αβ_</sup> <sup>(ˇ</sup> <sup>_s_</sup> _i_ <sup>_α_</sup>
_i_ <sup>_α,_</sup> <sup>ˇ</sup> <sup>_sβ_</sup> _j_
_i_ <sup>_α_</sup> <sup>_−_</sup> <sup>_pβ_</sup> _j_
<sup>_β_</sup> _j_ <sup>)(</sup> <sup>_p_</sup> _i_ <sup>_α_</sup>
_λ_ <sup>_w_</sup> ( _s_ <sup>_αβ_</sup> _ij_ <sup>) =</sup>
- _λ_ <sup>_w_</sup> ( _s_ <sup>_α_</sup> _i_
_λ_ <sup>_w_</sup> ( _s_ <sup>_α_</sup> _i_ <sup>)</sup> <sup>_,_</sup> if _Tij_ <sup>_αβ_</sup> <sup>(ˇ</sup> <sup>_s_</sup> _i_ <sup>_α,_</sup> <sup>ˇ</sup> <sup>_sβ_</sup> _j_ <sup>)(</sup> <sup>_p_</sup> _i_ <sup>_α_</sup> <sup>_−_</sup> <sup>_pβ_</sup> _j_ <sup>)</sup> <sup>_>_</sup> <sup>0</sup>
_λ_ <sup>_w_</sup> ( _s_ <sup>_β_</sup> _j_ <sup>)</sup> <sup>_,_</sup> _else,_
<sup>_α_</sup> _i_ <sup>)</sup> <sup>_,_</sup> if _Tij_ <sup>_αβ_</sup>
_._
<sup>_β_</sup> _j_ <sup>)</sup> <sup>_,_</sup> _else,_
and _λ_ ( _s_ <sup>_αβ_</sup> _ij_
_i_ <sup>_α_</sup> <sup>)</sup> <sup>and</sup> <sup>_λ_</sup> <sup>(</sup> <sup>_sβ_</sup> _j_
<sup>_αβ_</sup> _ij_ <sup>)</sup> <sup>is</sup> <sup>the</sup> <sup>harmonic</sup> <sup>average</sup> <sup>between</sup> <sup>_λ_</sup> <sup>(</sup> <sup>_s_</sup> _i_ <sup>_α_</sup>
_λ_ ( _s_ <sup>_αβ_</sup> _ij_ <sup>)</sup> <sup>is</sup> <sup>the</sup> <sup>harmonic</sup> <sup>average</sup> <sup>between</sup> <sup>_λ_</sup> <sup>(</sup> <sup>_s_</sup> _i_ <sup>_α_</sup> <sup>)</sup> <sup>and</sup> <sup>_λ_</sup> <sup>(</sup> <sup>_sβ_</sup> _j_ <sup>).</sup>
For the general multicontinuum model, we have
<sup>_<u>−</u>_</sup> <sup>_<u>s</u>_</sup> <sup><u>ˇ</u></sup> _<u>i</u>_ <sup>_α_</sup>
_|ςi|_ +
_τ_
_ij_ <sup>_w,αα_</sup> (ˇ _s_ <sup>_α_</sup> _i_
_l_
_i_ <sup>_w,α_</sup> ) _qi_ <sup>_w,α_</sup>
_i_ <sup>_α_</sup> <sup>_−_</sup> <sup>_pβ_</sup> _l_
<sup>_α_</sup> _i_ <sup>_,_</sup> <sup>ˇ</sup> <sup>_sβ_</sup> _l_
_i_ <sup>_w,α_</sup> _|ςi|,_
<sup>_α_</sup> _i_ <sup>_,_</sup> <sup>ˇ</sup> <sup>_s_</sup> _j_ <sup>_α_</sup>
_j_
_j_
_Tij_ <sup>_w,αα_</sup>
<sup>_β_</sup> _l_ <sup>) = (1</sup> <sup>_−_</sup> <sup>_f_</sup> _i_ <sup>_w,α_</sup>
<sup>_β_</sup> _l_ <sup>)(</sup> <sup>_p_</sup> _i_ <sup>_α_</sup>
_φ_ <sup>_α_</sup> _i_
_<u>s</u>_ <sup>_α_</sup> _<u>i</u>_
<sup>_α_</sup> _<u>i</u>_ <sup>_<u>−</u>_</sup> <sup>_<u>s</u>_</sup> <sup><u>ˇ</u></sup> _<u>i</u>_ <sup>_α_</sup>
_i_ <sup>_α_</sup> <sup>_−_</sup> <sup>_p_</sup> _j_ <sup>_α_</sup>
_j_ <sup>_α_</sup> <sup>)(</sup> <sup>_p_</sup> _i_ <sup>_α_</sup>
_j_ <sup>_α_</sup> <sup>) +</sup>
(10)
(11)
_β_
_Til_ <sup>_w,αβ_</sup>
_il_ <sup>_w,αβ_</sup> (ˇ _s_ <sup>_α_</sup> _i_
_l_
_i_ <sup>_α_</sup> <sup>_−_</sup> <sup>_pβ_</sup> _l_
_i_ <sup>_α,_</sup> <sup>ˇ</sup> <sup>_sβ_</sup> _l_
_i_ <sup>_α|ςi|,_</sup>
<sup>_β_</sup> _l_ <sup>) =</sup> <sup>_q_</sup> _i_ <sup>_α_</sup>
<sup>_β_</sup> _l_ <sup>)(</sup> <sup>_p_</sup> _i_ <sup>_α_</sup>
_i_ <sup>_α_</sup> <sup>_−_</sup> <sup>_p_</sup> _j_ <sup>_α_</sup>
_ij_ <sup>_αα_</sup> <sup>(ˇ</sup> <sup>_s_</sup> _i_ <sup>_α_</sup>
_j_ <sup>_α_</sup> <sup>)(</sup> <sup>_p_</sup> _i_ <sup>_α_</sup>
_Tij_ <sup>_αα_</sup>
_i_ <sup>_α,_</sup> <sup>ˇ</sup> <sup>_s_</sup> _j_ <sup>_α_</sup>
_j_ <sup>_α_</sup> <sup>) +</sup>
_β_
_Til_ <sup>_αβ_</sup>
_il_ <sup>_αβ_</sup> <sup>(ˇ</sup> <sup>_s_</sup> _i_ <sup>_α,_</sup>
where _α_ = 1 _, ..., M_ .
### 3 Coarse grid upscaled model
Solution of the problems in heterogeneous and fractured media require the construction of the grids that
resolve all small scale heterogeneity. One of the widely used way is based on the numerical homogenization
technique, where effective parameters are calculated in order to construct a coarse grid approximations.
The coarse grid parameters are constructed by a solution of the local problems with appropriate boundary
conditions.
Let _T_ <sup>_H_</sup> be a structured coarse mesh of the computational domain Ω
_T_ <sup>_H_</sup> = _∪_ <sup>_N_</sup> _i_ =1 <sup>_H_</sup> <sup>_Ki,_</sup>
where _N_ <sup>_H_</sup> is the number of the coarse grid cells, _Ki_ is the quadrilateral coarse cell and _i_ is the coarse grid
cell index [37, 31]. Form of the coarse grid upscaled model is similar to the fine grid model with finite volume
approximation, where coarse grid transmissibilities _Tij_ <sup>_UP_</sup> are calculated by a solution of the local problems
that take into account fine grid resolution of the heterogeneous permeability (see Figure 1).
We let _Eij_ be the coarse grid face and we define the neighborhood (local domain) by
_ωij_ = _Ki ∪_ _Kj,_ _Ki, Kj_ _∈T_ <sup>_H_</sup> _,_
where _ωij_ is a union of two coarse cells, when _Eij_ lies in the interior of the domain Ω. For the edges on
the boundary, we will use a no flux boundary conditions and therefore not need to calculate of the upscaled
transmissibilities. For calculation of the upscaled transmissibilities _Tij_ <sup>_UP_</sup> for coarse face _Eij_, we solve local
problems for nonperiodic heterogeneous fractured media with linear boundary conditions in _ωij_ . For the
fractured/multicontinuum media, we use a similar approach for calculation of the coarse grid transmissibilities
_Tij_ <sup>_αβ,UP_</sup> . Details of the calculations, we present below for each problem.
7
Figure 1: Coarse grid, heterogeneous properties and local domains. Left: coarse grid with fine grid and local
domains. Right: heterogeneous permeability with coarse cells and local domains. Coarse grid _T_ <sup>_H_</sup> (black
color), fine grid _T_ <sup>_h_</sup> (blue color), fracture _γ_ (green), local domain _ωij_ (yellow), coarse edge _Eij_ (red)
3.1 Nonlinear flow problem
We start with single-phase upscaling and suppose that
_s_ <sup>_α_</sup> <sup>(</sup> <sup>_x_</sup> <sup>)</sup> <sup>_,_</sup> _σ_ <sup>_αβ_</sup> ( _x, p_ <sup>_αβ_</sup> ) = _σr_ ( _p_ <sup>_αβ_</sup> ) _σs_ <sup>_αβ_</sup>
_k_ <sup>_α_</sup> ( _x, p_ <sup>_α_</sup> ) = _kr_ ( _p_ <sup>_α_</sup> ) _ks_ <sup>_α_</sup>
_s_ <sup>_αβ_</sup> <sup>(</sup> <sup>_x_</sup> <sup>)</sup> <sup>_,_</sup> _α_ = _m, f,_
where, in general, _kr_ and _σr_ can be different for each continuum _α_, but in this work, we assume similar
relationships, for simplicity.
Let _T_ <sup>_H_</sup> denote a structured coarse grid of the porous matrix domain Ωand _G_ <sup>_H_</sup> denote a coarse grid of
the fracture domain _γ_
<sup>_N_</sup> _i_ =1 <sup>_m,H_</sup> _Ki,_ _G_ <sup>_H_</sup> = _∪_ <sup>_N_</sup> _l_ =1 <sup>_f,H_</sup>
_T_ <sup>_H_</sup> = _∪_ <sup>_N_</sup> _i_ =1 <sup>_m,H_</sup>
<sup>_N_</sup> _l_ =1 <sup>_f,H_</sup> <sup>_γl,_</sup>
where _Ki_ and _γl_ are the cell of the matrix and fractures fine grids, _N_ <sup>_m,H_</sup> is the number of coarse cells in
_T_ <sup>_H_</sup>, _N_ <sup>_f,H_</sup> is the number of coarse cells related to _G_ <sup>_H_</sup> . On the coarse grid for equation (4), we have the
following discrete problem for _<u>p</u>_ = ( _<u>p</u>_ <sup>_m_</sup> _, p_ <sup>_f_</sup> )
_j_
_Tij_ <sup>_mm,UP_</sup>
_ij_ <sup>_mm,UP_</sup> <u>(</u> _<u>p</u>_ <sup>_~~m~~_</sup> _i_
_<u>m</u>_
<sup>_<u>−</u>_</sup> <sup>_<u>p</u>_</sup> <sup>~~ˇ~~</sup> _<u>i</u>_
_|Ki|_ +
_τ_
(12)
<sup>_~~m~~_</sup> _i_ <sup>_−_</sup> <sup>_<u>p</u>_</sup> <sup>_~~m~~_</sup> _j_
<sup>_~~m~~_</sup> _i_ <sup>_−_</sup> <sup>_<u>p</u>_</sup> <sup>_~~f~~_</sup> _l_
_i_ <sup>_~~m~~_</sup> <sup>_|Ki|,_</sup>
_<u>c</u>_ <sup>_m_</sup> _i_
_<u>p</u>_ <sup>_m_</sup> _<u>i</u>_
<sup>_m_</sup> _<u>i</u>_ <sup>_<u>−</u>_</sup> <sup>_<u>p</u>_</sup> <sup>~~ˇ~~</sup>
<sup>_~~m~~_</sup> _j_ <sup>) +</sup>
<sup>_~~f~~_</sup> _l_ <sup>) =</sup> <sup>_<u>q</u>_</sup> _i_ <sup>_~~m~~_</sup> <sup>_|_</sup>
_l_
_Til_ <sup>_mf,UP_</sup>
_il_ <sup>_mf,UP_</sup> <u>(</u> _<u>p</u>_ <sup>_~~m~~_</sup> _i_
_n_
_<u>f</u>_
<sup>_<u>−</u>_</sup> <sup>_<u>p</u>_</sup> <sup>~~ˇ~~</sup> _<u>l</u>_
_|γl|_ +
_τ_
_Tln_ <sup>_ff,UP_</sup>
_ln_ <sup>_ff,UP_</sup> <u>(</u> _<u>p</u>_ <sup>_~~f~~_</sup> _l_
_<u>c</u>_ <sup>_~~f~~_</sup> _l_
_<u>p</u>_ <sup>_f_</sup> _<u>l</u>_
<sup>_f_</sup> _<u>l</u>_ <sup>_<u>−</u>_</sup> <sup>_<u>p</u>_</sup> <sup>~~ˇ~~</sup>
<sup>_~~f~~_</sup> _l_ <sup>_−_</sup> <sup>_<u>p</u>_</sup> _n_ <sup>_~~f~~_</sup>
_n_ <sup>_~~f~~_</sup> <sup>)</sup> <sup>_−_</sup>
<sup>_m_</sup> _i_ <sup>_−_</sup> <sup>_<u>p</u>_</sup> <sup>_~~f~~_</sup> _l_
<sup>_~~f~~_</sup> _l_ <sup>_|γl|,_</sup>
<sup>_~~f~~_</sup> _l_ <sup>) =</sup> <sup>_<u>q</u>_</sup> <sup>_~~f~~_</sup> _l_
_i_
_Til_ <sup>_mf,UP_</sup>
_il_ <sup>_mf,UP_</sup> <u>(</u> _<u>p</u>_ <sup>_m_</sup> _i_
where _l_ = 1 _, .., N_ <sup>_f,H_</sup> and _i_ = 1 _, ..., N_ <sup>_m,H_</sup> .
In general for multicontinuum model, we have
_j_
_Tij_ <sup>_αα,UP_</sup>
_ij_ <sup>_αα,UP_</sup> <u>(</u> _<u>p</u>_ <sup>_~~α~~_</sup> _i_
_α_
<sup>_<u>−</u>_</sup> <sup>_<u>p</u>_</sup> <sup>~~ˇ~~</sup> _<u>i</u>_
_|Ki|_ +
_τ_
_l_
<sup>_~~α~~_</sup> _i_ <sup>_−_</sup> <sup>_<u>pα</u>_</sup> _j_
_<u>p</u>_ <sup>_~~α~~_</sup> _i_ <sup>_−_</sup> <sup>_<u>pβ</u>_</sup> _l_
_i_ <sup>_~~α~~_</sup> <sup>_|Ki|,_</sup> (13)
_<u>c</u>_ <sup>_~~α~~_</sup> _i_
_<u>p</u>_ <sup>_~~α~~_</sup> _<u>i</u>_
<sup>_~~α~~_</sup> _<u>i</u>_ <sup>_<u>−</u>_</sup> <sup>_<u>p</u>_</sup> <sup>~~ˇ~~</sup> _<u>i</u>_
<sup>_α_</sup> _j_ <sup>) +</sup>
_β_
<sup>_β_</sup> _l_ <sup>) =</sup> <sup>_<u>q</u>_</sup> _i_ <sup>_~~α~~_</sup>
_Til_ <sup>_αβ,UP_</sup>
_il_ <sup>_αβ,UP_</sup> <u>(</u> _<u>p</u>_ <sup>_~~α~~_</sup> _i_
where _<u>c</u>_ <sup>_~~α~~_</sup> _i_ <sup>_≈_</sup> _|K_ <u>1</u> _i|_
_Ki_ <sup>_cα_</sup> <sup><u>(</u></sup> <sup>_<u>p</u>_</sup> _i_ <sup>_~~α~~_</sup> <sup>)</sup> <sup>_dx_</sup> <sup>and</sup>
<sup>_αβ_</sup> _ij_ <sup>)</sup> <sup>_W αβ,UP_</sup> _ij_
_Tij_ <sup>_αβ,UP_</sup>
<sup>_~~α~~_</sup> _i_ <sup>_, pβ_</sup> _j_
<sup>_αβ,UP_</sup> _ij_ _,_ _α_ = _m, f_ (14)
_ij_ <sup>_αβ,UP_</sup> <u>(</u> _<u>p</u>_ <sup>_~~α~~_</sup> _i_
<sup>_β_</sup> _j_ <sup>) =</sup> <sup>_kr_</sup> <sup><u>(</u></sup> <sup>_<u>pαβ</u>_</sup> _ij_
8
and _Wij_ <sup>_αβ,UP_</sup> is the precalculated effective transmissibilities.
For the calculation of the upscaled transmissibilities for the porous matrix, we solve the following local
problems in each _ωij_ (see Figure 1, where local domain is depicted by a yellow color)
_−∇_
- _ks_ <sup>_m_</sup> <sup>(</sup> <sup>_x_</sup> <sup>)</sup> <sup>_∇ψl_</sup> <sup>�</sup>
= 0 _,_ _x ∈_ _ωij,_ (15)
with boundary conditions
_ψ_ <sup>_l_</sup> = 1 _,_ _x ∈_ Γ <sup>1</sup> _ij_
<sup>1</sup> _ij_ <sup>_,_</sup> _ψ_ <sup>_l_</sup> = 0 _,_ _x ∈_ Γ <sup>2</sup> _ij_
<sup>2</sup> _ij_ <sup>_,_</sup>
_s_ <sup>_m_</sup> <sup>(</sup> <sup>_x_</sup> <sup>)</sup> <sup>_<u>∂ψl</u>_</sup>
_∂n_
_−ks_ <sup>_m_</sup>
<sup>_<u>∂ψl</u>_</sup> _x ∈_ _∂ωij/_ (Γ <sup>1</sup> _ij_
_∂n_ <sup>= 0</sup> <sup>_,_</sup>
<sup>1</sup> _ij_ <sup>_∪_</sup> <sup>Γ</sup> _ij_ <sup>2</sup>
_ij_ <sup>2</sup> <sup>)</sup> <sup>_._</sup>
In this work, we consider two-dimensional problems with _x_ = ( _x_ 1 _, x_ 2). Therefore, we solve two local problems
for _ψ_ <sup>_l_</sup>, _l_ = 1 _,_ 2. For _ψ_ <sup>1</sup>, boundaries Γ <sup>1</sup> _ij_ <sup>and</sup> <sup>Γ2</sup> _ij_ <sup>are</sup> <sup>the</sup> <sup>left</sup> <sup>and</sup> <sup>right</sup> <sup>boundaries</sup> <sup>of</sup> <sup>the</sup> <sup>domain</sup> <sup>_ωij_</sup> <sup>,</sup> <sup>respec-</sup>
tively. For _ψ_ <sup>2</sup>, boundaries Γ <sup>1</sup> _ij_ <sup>and</sup> <sup>Γ2</sup> _ij_ <sup>are</sup> <sup>the</sup> <sup>top</sup> <sup>and</sup> <sup>bottom</sup> <sup>boundaries</sup> <sup>of</sup> <sup>the</sup> <sup>domain</sup> <sup>_ωij_</sup> <sup>,</sup> <sup>respectively.</sup>
Note that, another boundary conditions can be applied for local problems.
Therefore, for calculations _Wij_ <sup>_mm,UP_</sup> in (14), we solve following discrete problem for finite volume ap
proximation up to fine grid resolution
<sup>1</sup> _ij_ <sup>and</sup> <sup>Γ2</sup> _ij_
<sup>1</sup> _ij_ <sup>and</sup> <sup>Γ2</sup> _ij_
Therefore, for calculations _Wij_ <sup>_mm,UP_</sup>
_i_ <sup>_l_</sup> <sup>_−_</sup> <sup>_ψ_</sup> _j_ <sup>_l_</sup>
_Wij_ ( _ψi_ <sup>_l_</sup>
_j_ <sup>_l_</sup> <sup>) = 0</sup> <sup>_,_</sup>
_j_
with appropriate boundary conditions.
After solution of the local problems in _ωij_, we calculate upscaled transmissibility for the porous matrix
(see Figure 1, where interface _Eij_ is depicted by a red color)
_r_ <sup>_l_</sup> <sup>_−_</sup> <sup>_ψ_</sup> _n_ <sup>_l_</sup>
_n_ <sup>_l_</sup> <sup>)</sup>
_,_ (16)
_Wij_ <sup>_mm,UP_</sup> =
_<u>r,n</u>_ <sup>_Wrn_</sup> <sup>(</sup> <sup>_ψ_</sup> _r_ <sup>_l_</sup>
_ψi_
_~~l~~_
_i_ <sup>_−_</sup> <sup>_ψ_</sup>
_~~l~~_
_j_
_~~l~~_ _~~l~~_
where _r, n_ are the fine cells around coarse face _Eij_, _ψi_ <sup>and</sup> <sup>_ψ_</sup> _j_ <sup>are the mean values in coarse cells</sup> <sup>_Ki_</sup> <sup>and</sup> <sup>_Kj_</sup> <sup>.</sup>
We use _ψ_ <sup>_l_</sup> with _l_ = 1 for all vertical edges and _l_ = 2 for horizontal edges. For the fracture continuum, we
suppose that _k_ <sup>_f_</sup> = const and therefore set _Wln_ <sup>_ff,UP_</sup> = _k_ <sup>_f_</sup> _/dln_ ( _dln_ is the distance between points _l_ and _n_ ).
_~~l~~_
_i_ <sup>and</sup> <sup>_ψ_</sup>
where _r, n_ are the fine cells around coarse face _Eij_, _ψ_
suppose that _k_ <sup>_f_</sup> = const and therefore set _Wln_ <sup>_ff,UP_</sup> = _k_ <sup>_f_</sup> _/dln_ ( _dln_ is the distance between points _l_ and _n_ ).
In this work, we suppose _k_ <sup>_f_</sup> = _const_, and therefore for the calculations of the coarse grid transmissibility
between coarse grid fracture cells _γl_ and _γn_, we have _Tln_ <sup>_ff,UP_</sup> = _k_ <sup>_f_</sup> _/_ ∆ _ln_, where ∆ _ln_ is the distance between
between coarse grid fracture cells _γl_ and _γn_, we have _Tln_ <sup>_ff,UP_</sup> = _k_ <sup>_f_</sup> _/_ ∆ _ln_, where ∆ _ln_ is the distance between
midpoint of cells _γl_ and _γn_ .
Let _ωil_ <sup>_mf_</sup> = _{Ki_ : _Ki_ _∪_ _γl̸_ = _∅,_ _γl_ _∈G_ <sup>_H_</sup> _,_ _Ki_ _∈T_ <sup>_H_</sup> _}_ be the local domain for calculation of the _Wil_ <sup>_mf_</sup> in
(14) (see Figure 1, where local domain is depicted by a orange color). For the calculation of the upscaled
transmissibility between porous matrix and fracture, we solve local problems in _ωil_ <sup>_mf_</sup>
Let _ωil_ <sup>_mf_</sup>
_il_ <sup>_mf_</sup> = _{Ki_ : _Ki_ _∪_ _γl̸_ = _∅,_ _γl_ _∈G_ <sup>_H_</sup> _,_ _Ki_ _∈T_ <sup>_H_</sup> _}_ be the local domain for calculation of the _Wil_ <sup>_mf_</sup>
_il_
_c_ <sup>_m ∂φ_</sup>
_∂t_
_s_ <sup>_m_</sup> <sup>(</sup> <sup>_x_</sup> <sup>)</sup> <sup>_∇φ_</sup> <sup>) +</sup> <sup>_σ_</sup> _s_ <sup>_mf_</sup>
<sup>_<u>∂φ</u>_</sup> _∂t_ <sup>_−∇_</sup> <sup>(</sup> <sup>_k_</sup> _s_ <sup>_m_</sup>
_s_ <sup>_mf_</sup> ( _x_ )( _φ −_ _φ_ <sup>_f_</sup> ) = 0 _,_ _x ∈_ _ωil_ <sup>_mf_</sup>
_il_ <sup>_mf_</sup> <sup>_,_</sup> (17)
where _φ_ <sup>_f_</sup> = 1 on _γl_ with zero flux boundary conditions on _∂ωil_ <sup>_mf_</sup> <sup>.</sup> <sup>Therefore,</sup> <sup>we</sup> <sup>solve</sup> <sup>following</sup> <sup>discrete</sup>
system for finite volume approximation up to fine grid resolution
_j_
<sup>_f_</sup> _l_ <sup>) = 0</sup> <sup>_,_</sup>
_c_ <sup>_m_</sup> _i_
_<u>φi −</u>_ _<u>φ</u>_ <sup>ˇ</sup> _<u>i</u>_
_|ςi|_ +
_τ_
_Wij_ ( _φi −_ _φj_ ) +
_l_
_Wil_ <sup>_mf_</sup>
_il_ <sup>_mf_</sup> ( _φi −_ _φ_ <sup>_f_</sup> _l_
until _|φi −_ _φ_ <sup>ˇ</sup> _i| > ϵ_ and find upscaled matrix-fracture transmissibility using final time step solution
<sup>_mf_</sup> _rn_ <sup>(</sup> <sup>_φr_</sup> <sup>_−_</sup> <sup>_φ_</sup> _n_ <sup>_f_</sup>
_n_ <sup>_f_</sup> <sup>)</sup>
_,_ (18)
_Wil_ <sup>_mf_</sup> =
_<u>r,n</u>_ <sup>_W mf_</sup> _rn_
_~~f~~_
_φi −_ _φl_
9
_~~f~~_
where _r_ are the cell that contains fracture, _φi_ and _φl_ <sup>are</sup> <sup>the</sup> <sup>mean</sup> <sup>values</sup> <sup>in</sup> <sup>coarse</sup> <sup>cells</sup> <sup>_Ki_</sup> <sup>and</sup> <sup>in</sup> <sup>fracture</sup>
_γl_ (see Figure 1, where interface _γl_ is depicted by a red color).
Note that, there exist different approaches for calculation of the effective transmissibilities, for example,
based on the different boundary conditions for local problems, using oversampled domains and the construction of look-up table for interpolation of the nonlinear dependence. In this work, for calculating the upscaled
transmissibilities, we use the simplest classic approach. The main goal of the paper is the construction of
the novel highly accurate nonlinear upscaled coarse grid approximations using machine learning techniques.
3.2 Nonlinear flow and transport problem
On the coarse grid for equation (8), we have following discrete problem for _<u>p</u>_ <sup>_m_</sup> _, p_ <sup>_f_</sup> _, s_ <sup>_~~m~~_</sup> and _<u>s</u>_ <sup>_~~f~~_</sup>
_Tij_ <sup>_w,mm,UP_</sup>
_ij_ <sup>_w,mm,UP_</sup> <u>(</u> <sup>~~ˇ~~</sup> _<u>s</u>_
_<u>s</u>_ <sup>_~~m~~_</sup> _<u>i</u>_
_<u>m</u>_
<sup>_<u>−</u>_</sup> <sup>~~ˇ~~</sup> <sup>_<u>s</u>_</sup> _<u>i</u>_
_|Ki|_ +
_τ_
_~~m~~_
_φi_
_~~m~~_
_i_
_<u>s</u>_ <sup>_~~m~~_</sup> _<u>i</u>_ <sup>_<u>−</u>_</sup> <sup>~~ˇ~~</sup> <sup>_<u>s</u>_</sup>
<sup>_m_</sup> _i_ <sup>_−_</sup> <sup>_<u>p</u>_</sup> <sup>_~~m~~_</sup> _j_
<sup>_~~m~~_</sup> _j_ <sup>) +</sup>
<sup>_m_</sup> _i_ <sup>_−_</sup> <sup>_<u>p</u>_</sup> <sup>_~~f~~_</sup> _l_
<sup>_~~f~~_</sup> _l_ <sup>) = (1</sup> <sup>_−_</sup> <sup>_f_</sup>
_~~w~~_ _i_ _,m_ <u>)</u> _<u>q</u>_ <sup>_~~w~~_</sup> _i_ <sup>_,m_</sup> _|Ki|,_
_~~w~~_ _i_ _,m_ <u>)</u> _<u>q</u>_ <sup>_~~w~~_</sup> _i_ <sup>_,m_</sup>
_<u>mi</u>_ <sup>_,_</sup> <sup>~~ˇ~~</sup> <sup>_<u>s</u>_</sup>
_<u>mi</u>_ <sup>_,_</sup> <sup>~~ˇ~~</sup> <sup>_<u>s</u>_</sup> _l_
_l_
_<u>fl</u>_ <sup>)(</sup> <sup>_<u>pm</u>_</sup> _i_
_<u>mj</u>_ <sup>)(</sup> <sup>_<u>pm</u>_</sup> _i_
_Til_ <sup>_w,mf,UP_</sup>
_il_ <sup>_w,mf,UP_</sup> <u>(</u> <sup>~~ˇ~~</sup> _<u>si</u>_
<sup>_~~m~~_</sup> _i_ <sup>_−_</sup> <sup>_<u>p</u>_</sup> <sup>_~~m~~_</sup> _j_
<sup>_~~m~~_</sup> _j_ <sup>) +</sup>
<sup>_~~m~~_</sup> _i_ <sup>_−_</sup> <sup>_<u>pf</u>_</sup> _l_
<sup>_f_</sup> _l_ <sup>) =</sup> <sup>_<u>q</u>_</sup> _i_ <sup>_~~m~~_</sup>
_Tij_ <sup>_mm,UP_</sup>
_<u>mi</u>_ <sup>_,_</sup> <sup>~~ˇ~~</sup> <sup>_<u>s</u>_</sup>
_<u>mi</u>_ <sup>_,_</sup> <sup>~~ˇ~~</sup> <sup>_<u>s</u>_</sup> _<u>fl</u>_
_i_ <sup>_~~m~~_</sup> <sup>_|Ki|,_</sup>
_l_
_ij_ <sup>_mm,UP_</sup> <u>(</u> <sup>~~ˇ~~</sup> _<u>si</u>_
_<u>mj</u>_ <sup>)(</sup> <sup>_<u>p</u>_</sup> <sup>_~~m~~_</sup> _i_
_<u>fl</u>_ <sup>)(</sup> <sup>_<u>p</u>_</sup> <sup>_~~m~~_</sup> _i_
_Til_ <sup>_mf,UP_</sup>
_il_ <sup>_mf,UP_</sup> <u>(</u> <sup>~~ˇ~~</sup> _<u>si</u>_
_<u>f</u>_
<sup>_<u>−</u>_</sup> <sup>~~ˇ~~</sup> <sup>_<u>s</u>_</sup> _<u>l</u>_
_|γl|_ +
_τ_
_j_
_j_
_n_
_n_
_Tln_ <sup>_w,ff,UP_</sup>
_ln_ <sup>_w,ff,UP_</sup> <u>(</u> <sup>~~ˇ~~</sup> _<u>sfl</u>_
_~~f~~_
_φl_
_<u>s</u>_ <sup>_~~f~~_</sup> _<u>l</u>_
<sup>_~~f~~_</sup> _<u>l</u>_ <sup>_<u>−</u>_</sup> <sup>~~ˇ~~</sup> <sup>_<u>s</u>_</sup>
<sup>_f_</sup> _l_ <sup>_−_</sup> <sup>_<u>p</u>_</sup> _n_ <sup>_f_</sup>
<sup>_f_</sup> _l_ <sup>) = (1</sup> <sup>_−_</sup> <sup>_f_</sup>
_<u>mi</u>_ <sup>_,_</sup> <sup>~~ˇ~~</sup> <sup>_<u>s</u>_</sup>
_<u>fl</u>_ <sup>_,_</sup> <sup>~~ˇ~~</sup> <sup>_<u>s</u>_</sup>
_n_ <sup>_f_</sup> <sup>)</sup> <sup>_−_</sup>
<sup>~~ˇ~~</sup> <sup>_<u>s</u>_</sup> _<u>fl</u>_ <sup>)(</sup> <sup>_<u>p</u>_</sup> _i_ <sup>_~~m~~_</sup>
_i_ <sup>_~~m~~_</sup> <sup>_−_</sup> <sup>_<u>pf</u>_</sup> _l_
_<u>fn</u>_ <sup>)(</sup> <sup>_<u>pf</u>_</sup> _l_
_i_
_Til_ <sup>_w,mf,UP_</sup>
_il_ <sup>_w,mf,UP_</sup> <u>(</u> <sup>~~ˇ~~</sup> _<u>s</u>_
_~~w~~_ _i_ _,f_ <u>)</u> _<u>q</u>_ <sup>_~~w~~_</sup> _l_ <sup>_,f_</sup> _|γl|,_
<sup>_f_</sup> _l_ <sup>_−_</sup> <sup>_<u>p</u>_</sup> _n_ <sup>_~~f~~_</sup>
_n_ <sup>_~~f~~_</sup> <sup>)</sup> <sup>_−_</sup>
<sup>_m_</sup> _i_ <sup>_−_</sup> <sup>_<u>p</u>_</sup> <sup>_~~f~~_</sup> _l_
<sup>_~~f~~_</sup> _l_ <sup>) =</sup> <sup>_<u>q</u>_</sup> <sup>_~~f~~_</sup> _l_
_Tln_ <sup>_ff,UP_</sup>
_<u>fl</u>_ <sup>_,_</sup> <sup>~~ˇ~~</sup> <sup>_<u>s</u>_</sup>
_<u>mi</u>_ <sup>_,_</sup> <sup>~~ˇ~~</sup> <sup>_<u>s</u>_</sup>
<sup>_~~f~~_</sup> _l_ <sup>_|γl|,_</sup>
_ln_ <sup>_ff,UP_</sup> <u>(</u> <sup>~~ˇ~~</sup> _<u>s</u>_
_<u>fn</u>_ <sup>)(</sup> <sup>_<u>pf</u>_</sup> _l_
_<u>fl</u>_ <sup>)(</sup> <sup>_<u>pm</u>_</sup> _i_
_i_
_Til_ <sup>_mf,UP_</sup>
_il_ <sup>_mf,UP_</sup> <u>(</u> <sup>~~ˇ~~</sup> _<u>s</u>_
(19)
where _l_ = 1 _, .., N_ <sup>_f,H_</sup> and _i_ = 1 _, ..., N_ <sup>_m,H_</sup> . For approximation by time similarly to the fine grid approximation,
the IMPES scheme is used.
For the general multicontinuum model, we have
_j_
_j_
_Tij_ <sup>_w,αα,UP_</sup>
_ij_ <sup>_w,αα,UP_</sup> <u>(</u> <sup>~~ˇ~~</sup> _<u>s</u>_
_<u>s</u>_ <sup>_~~α~~_</sup> _<u>i</u>_
_<u>α</u>_
<sup>_<u>−</u>_</sup> <sup>~~ˇ~~</sup> <sup>_<u>s</u>_</sup> _<u>i</u>_
_|Ki|_ +
_τ_
_~~α~~_
_φi_
_~~α~~_
_i_
<sup>_~~α~~_</sup> _<u>i</u>_ <sup>_<u>−</u>_</sup> <sup>~~ˇ~~</sup> <sup>_<u>s</u>_</sup>
<sup>_~~α~~_</sup> _i_ <sup>_−_</sup> <sup>_<u>p</u>_</sup> <sup>_~~α~~_</sup> _j_
<sup>_~~α~~_</sup> _j_ <sup>) +</sup>
<sup>_~~α~~_</sup> _i_ <sup>_−_</sup> <sup>_<u>pβ</u>_</sup> _l_
<sup>_β_</sup> _l_ <sup>) = (1</sup> <sup>_−_</sup> <sup>_f_</sup>
_l_
_<u>αi</u>_ <sup>_,_</sup> <sup>~~ˇ~~</sup> <sup>_<u>s</u>_</sup> _l_
<sup>~~ˇ~~</sup> _<u>sαi</u>_ <sup>_,_</sup> <sup>~~ˇ~~</sup> <sup>_<u>s</u>_</sup>
_~~w~~_ _i_ _,α_ <u>)</u> _<u>q</u>_ <sup>_~~w~~_</sup> _i_ <sup>_,α_</sup> _|Ki|,_
_~~w~~_ _i_ _,α_ <u>)</u> _<u>q</u>_ <sup>_~~w~~_</sup> _i_ <sup>_,α_</sup>
_<u>βl</u>_ <sup>)(</sup> <sup>_<u>p</u>_</sup> <sup>_~~α~~_</sup> _i_
_<u>αj</u>_ <sup>)(</sup> <sup>_<u>p</u>_</sup> <sup>_~~α~~_</sup> _i_
_β_
_Til_ <sup>_w,αβ,UP_</sup>
_il_ <sup>_w,αβ,UP_</sup> <u>(</u> <sup>~~ˇ~~</sup> _<u>s</u>_
<sup>_α_</sup> _i_ <sup>_−_</sup> <sup>_<u>p</u>_</sup> <sup>_~~α~~_</sup> _j_
<sup>_~~α~~_</sup> _j_ <sup>) +</sup>
<sup>_~~α~~_</sup> _i_ <sup>_−_</sup> <sup>_<u>p</u>_</sup> <sup>_~~β~~_</sup> _l_
<sup>_~~β~~_</sup> _l_ <sup>) =</sup> <sup>_<u>q</u>_</sup> _i_ <sup>_~~α~~_</sup>
_Tij_ <sup>_αα,UP_</sup>
_<u>αi</u>_ <sup>_,_</sup> <sup>~~ˇ~~</sup> <sup>_<u>s</u>_</sup>
_<u>αi</u>_ <sup>_,_</sup> <sup>~~ˇ~~</sup> <sup>_<u>s</u>_</sup> _<u>βl</u>_
_i_ <sup>_~~α~~_</sup> <sup>_|Ki|,_</sup>
_ij_ <sup>_αα,UP_</sup> <u>(</u> <sup>~~ˇ~~</sup> _<u>s</u>_
_<u>αj</u>_ <sup>)(</sup> <sup>_<u>pα</u>_</sup> _i_
_<u>βl</u>_ <sup>)(</sup> <sup>_<u>p</u>_</sup> <sup>_~~α~~_</sup> _i_
_β_
_l_
_Til_ <sup>_αβ,UP_</sup>
_il_ <sup>_αβ,UP_</sup> <u>(</u> <sup>~~ˇ~~</sup> _<u>s</u>_
(20)
where
_Tij_ <sup>_αβ,UP_</sup>
<sup>_~~α~~_</sup> _ij_ <sup>_β_</sup> <sup>) =</sup> <sup>_λ_</sup> <sup><u>(</u></sup> <sup>_<u>s</u>_</sup> _i_ <sup>_~~α~~_</sup>
_ij_ <sup>_αβ,UP_</sup> <u>(</u> _<u>s</u>_ <sup>_~~α~~_</sup> _ij_ <sup>_β_</sup>
_i_ <sup>_~~α~~_</sup> <sup>_, s_</sup> <sup>_~~β~~_</sup> _j_
<sup>_αβ,UP_</sup> _ij_ _,_ _Tij_ <sup>_w,αβ,UP_</sup>
<sup>_~~α~~_</sup> _i_ <sup>_, s_</sup> <sup>_~~α~~_</sup> _j_
<sup>_~~β~~_</sup> _j_ <sup>)</sup> <sup>_W αβ,UP_</sup> _ij_
_ij_ <sup>_w,αβ,UP_</sup> <u>(</u> _<u>s</u>_ <sup>_~~α~~_</sup> _i_
<sup>_~~α~~_</sup> _j_ <sup>) =</sup> <sup>_λw_</sup> <sup><u>(</u></sup> <sup>_<u>s</u>_</sup> <sup>_~~α~~_</sup> _ij_ <sup>_β_</sup>
<sup>_~~α~~_</sup> _ij_ <sup>_β_</sup> <sup>)</sup> <sup>_W αβ,UP_</sup> _ij_
<sup>_αβ,UP_</sup> _ij_ _,_ _α, β_ = _m, f_ (21)
with upwind scheme approximation of _λ_ <sup>_w_</sup> and _Wij_ <sup>_αβ,UP_</sup> is the precalculated effective transmissibilities that
is similar to the previous problem and based on the single phase upscaling.
The choice of boundary conditions have a strong impact on the accuracy of results. In the presented
standard upscaling method, coarse grid parameters are obtained independently to global problem solution
information. More accurate approaches can be based on the information about the fine scale flow in the local
domains up to fine grid resolution and without variable separation of nonlinear coefficients. For example, an
interpolated global coarse grid solution is used for performing accurate construction of the upscaled transmissibilities in [5], which involve iterations between global coarse grid model and local fine grid calculations with
updating of the upscaled transmissibilities. The local-global upscaling method requires extra computations
than existing classic upscaling procedures.
In this work, the construction of the accurate upscaled transmissibilities for the coarse grid approximation
is also based on the information about global solution (nonlinear transmissibilities). Moreover, the presented
method is based on the machine learning procedure for fast prediction of the nonlinear transmissibilities,
10
where we construct neural network that learn dependencies between the coarse grid quantities on the oversampled local domains and upscaled transmissibilities. We use a convolutional neural network and GPU
training process to construct a machine learning algorithm.
### 4 Machine learning for nonlinear nonlocal upscaled transmissibil- ities
We consider a machine learning approach for prediction of the upscaled nonlinear nonlocal transmissibilities
for accurate and fast coarse grid approximation. We have following main steps:
1. Generate dataset to train, validate and test of the neural network.
2. Neural networks training, validation and testing.
3. Calculation of the nonlinear upscaled transmissibilities on the fly using constructed neural networks
during coarse system construction, fast and accurate solution of the upscaled system.
For construction of the datasets, we perform local or global calculations of the coarse grid quantities [5].
In local approach, the upscaled transmissibilities are calculated on the local domain corresponding to the
target face, where the fine-scale solution information is used to set boundary conditions. Global approach
uses a global fine-scale solution for the determination of coarse scale parameters. For training of the neural
networks, we use a family of problem solutions for different input conditions (snapshots). Note that, we
should have many snapshots to capture all input condition variations because the accuracy of the machine
learning method depends on snapshot space that is as train dataset. Next, we consider dataset generation
and network construction in detail.
4.1 Dataset
The most accurate case can be based on the fine grid solution, at the same time for upscaled model, we
would like to use only coarse-grid information. For possible applicability of this, we construct a novel coarse
grid model, using machine learning algorithms and construct neural network that learn dependency between
coarse grid functions _<u>p</u>_ <sup>_~~α~~_</sup> in local domains and upscaled nonlinear transmissibilities.
For constructing accurate neural network for prediction of the transmissibilities, we should train network
on the highly accurate dataset. One of the most accurate approach for calculating upscaled transmissibilities
based on the direct calculation from the fine scale solution. We use following coarse grid approximation
(similar to previous section)
_•_ Unsaturated flow problem (nonlinear flow):
_j_
_Tij_ <sup>_αα,NL_</sup>
_ij_ <sup>_αα,NL_</sup> <u>(</u> _<u>p</u>_ <sup>_α_</sup> _i_
_α_
<sup>_<u>−</u>_</sup> <sup>_<u>p</u>_</sup> <sup>~~ˇ~~</sup> _<u>i</u>_
_|Ki|_ +
_τ_
_l_
<sup>_α_</sup> _i_ <sup>_−_</sup> <sup>_<u>p</u>_</sup> <sup>_~~α~~_</sup> _j_
<sup>_~~α~~_</sup> _i_ <sup>_−_</sup> <sup>_<u>p</u>_</sup> <sup>_~~β~~_</sup> _l_
_i_ <sup>_~~α~~_</sup> <sup>_|Ki|,_</sup> (22)
_<u>c</u>_ <sup>_~~α~~_</sup> _i_
_<u>p</u>_ <sup>_α_</sup> _<u>i</u>_
<sup>_α_</sup> _<u>i</u>_ <sup>_<u>−</u>_</sup> <sup>_<u>p</u>_</sup> <sup>~~ˇ~~</sup>
<sup>_~~α~~_</sup> _j_ <sup>) +</sup>
<sup>_~~β~~_</sup> _l_ <sup>) =</sup> <sup>_<u>q</u>_</sup> _i_ <sup>_~~α~~_</sup>
_β_
_Til_ <sup>_αβ,NL_</sup>
_il_ <sup>_αβ,NL_</sup> <u>(</u> _<u>p</u>_ <sup>_~~α~~_</sup> _i_
with nonlinear upscaled transmissibilities
_Tij_ <sup>_αβ,NL_</sup> ( _x, p_ <sup>_α_</sup> _, p_ <sup>_β_</sup> _, s_ <sup>_α_</sup> _, s_ <sup>_β_</sup> ) =
_<u>p</u>_ <sup>_α_</sup> _i_
<sup>_α_</sup> _i_ <sup>_−_</sup> <sup>_<u>p</u>_</sup> _j_ <sup>_~~β~~_</sup>
_<u>r,n</u>_ <sup>_T αβ_</sup> _rn_
<sup>_α_</sup> _r_ <sup>_−_</sup> <sup>_p_</sup> _n_ <sup>_β_</sup>
<sup>_αβ_</sup> _rn_ <sup>(</sup> <sup>_sα, sβ_</sup> <sup>)(</sup> <sup>_pα_</sup> _r_
_n_ <sup>_β_</sup> <sup>)</sup>
_._ (23)
_j_
_•_ Two-phase flow problem (nonlinear transport and flow):
_j_
_j_
_Tij_ <sup>_w,αα,NL_</sup>
_ij_ <sup>_w,αα,NL_</sup> <u>(</u> _<u>p</u>_ <sup>_α_</sup> _i_
_<u>α</u>_
<sup>_<u>−</u>_</sup> <sup>~~ˇ~~</sup> <sup>_<u>s</u>_</sup> _<u>i</u>_
_|Ki|_ +
_τ_
_~~α~~_
_φi_
_<u>s</u>_ <sup>_~~α~~_</sup> _<u>i</u>_
<sup>_~~α~~_</sup> _<u>i</u>_ <sup>_<u>−</u>_</sup> <sup>~~ˇ~~</sup> <sup>_<u>s</u>_</sup>
(24)
<sup>_α_</sup> _i_ <sup>_−_</sup> <sup>_<u>p</u>_</sup> <sup>_~~α~~_</sup> _j_
<sup>_~~α~~_</sup> _i_ <sup>_−_</sup> <sup>_<u>pβ</u>_</sup> _l_
<sup>_~~α~~_</sup> _j_ <sup>) +</sup>
<sup>_β_</sup> _l_ <sup>) = (1</sup> <sup>_−_</sup> <sup>_f_</sup>
_~~w~~_ _i_ _,α_ <u>)</u> _<u>q</u>_ <sup>_~~w~~_</sup> _i_ <sup>_,α_</sup> _|Ki|,_
_β_
_l_
_Til_ <sup>_w,αβ,NL_</sup>
_il_ <sup>_w,αβ,NL_</sup> <u>(</u> _<u>p</u>_ <sup>_~~α~~_</sup> _i_
_i_ <sup>_~~α~~_</sup> <sup>_|Ki|,_</sup>
_Tij_ <sup>_αα,NL_</sup>
<sup>_α_</sup> _i_ <sup>_−_</sup> <sup>_<u>p</u>_</sup> <sup>_~~α~~_</sup> _j_
<sup>_~~α~~_</sup> _i_ <sup>_−_</sup> <sup>_<u>p</u>_</sup> <sup>_~~β~~_</sup> _l_
_ij_ <sup>_αα,NL_</sup> <u>(</u> _<u>p</u>_ <sup>_α_</sup> _i_
<sup>_~~α~~_</sup> _j_ <sup>) +</sup>
<sup>_~~β~~_</sup> _l_ <sup>) =</sup> <sup>_<u>q</u>_</sup> _i_ <sup>_~~α~~_</sup>
-
_β_ _l_
11
_Til_ <sup>_αβ,NL_</sup>
_il_ <sup>_αβ,NL_</sup> <u>(</u> _<u>p</u>_ <sup>_~~α~~_</sup> _i_
with nonlinear upscaled transmissibilities
_Tij_ <sup>_w,αβ,NL_</sup> ( _x, p_ <sup>_α_</sup> _, p_ <sup>_β_</sup> _, s_ <sup>_α_</sup> _, s_ <sup>_β_</sup> ) =
_<u>p</u>_ <sup>_~~α~~_</sup> _i_
<sup>_~~α~~_</sup> _i_ <sup>_−_</sup> <sup>_<u>p</u>_</sup> _j_ <sup>_β_</sup>
_<u>r,n</u>_ <sup>_T w,αβ_</sup> _rn_
<sup>_α_</sup> _r_ <sup>_−_</sup> <sup>_p_</sup> _n_ <sup>_β_</sup>
_n_ <sup>_β_</sup> <sup>)</sup>
<sup>_w,αβ_</sup> _rn_ ( _s_ <sup>_α_</sup> _, s_ <sup>_β_</sup> )( _p_ <sup>_α_</sup> _r_
_j_
<sup>_α_</sup> _r_ <sup>_−_</sup> <sup>_p_</sup> _n_ <sup>_β_</sup>
<sup>_αβ_</sup> _rn_ <sup>(</sup> <sup>_sα, sβ_</sup> <sup>)(</sup> <sup>_pα_</sup> _r_
_n_ <sup>_β_</sup> <sup>)</sup>
_,_
_._
(25)
_Tij_ <sup>_αβ,NL_</sup> ( _x, p_ <sup>_α_</sup> _, p_ <sup>_β_</sup> _, s_ <sup>_α_</sup> _, s_ <sup>_β_</sup> ) =
_<u>r,n</u>_ <sup>_T αβ_</sup> _rn_
_<u>p</u>_ <sup>_α_</sup> _i_
<sup>_α_</sup> _i_ <sup>_−_</sup> <sup>_<u>p</u>_</sup> _j_ <sup>_~~β~~_</sup>
_j_
Because _T_ <sup>_w,αβ,NL_</sup> and _T_ <sup>_αβ,NL_</sup> ( _α, β_ = _m, f_ ) are nonlinear and depend on the fine grid solutions
_p_ <sup>_α_</sup> _, p_ <sup>_β_</sup> _, s_ <sup>_α_</sup> _, s_ <sup>_β_</sup>, we cannot directly use such transmissibilities on the coarse grid model. For possible applicability of this, we will use a machine learning algorithms and construct a neural network that learn
dependence between coarse grid functions _<u>p</u>_ <sup>_α_</sup> _, p_ <sup>_~~β~~_</sup> _, s_ <sup>_~~α~~_</sup> _, s_ <sup>_~~β~~_</sup> in local domains (oversampled) and upscaled nonlinear transmissibilities.
Figure 2: Coarse grid and local domains illustration. Four types (horizontal and vertical matrix-matrix flow,
fracture-matrix flow and fracture-fracture flow) of local domains _ωEl_ ( _∂ωEl_ - blue color, fine grid resolution
- black color, coarse edge or matrix-fracture interface - red color and fracture-fracture connection - yellow
point). Four types (horizontal and vertical matrix-matrix flow, fracture-matrix flow and fracture-fracture
flow) of oversampled local domains _ω_ <sup>_H_</sup> <sup>+</sup> ( _∂ω_ <sup>_H_</sup> <sup>+</sup> - orange color, coarse grid resolution - green color).
_El_ _El_
<sup>_H_</sup> <sup>+</sup> ( _∂ω_ <sup>_H_</sup> <sup>+</sup>
_El_ _El_
<sup>_H_</sup> <sup>+</sup> - orange color, coarse grid resolution - green color).
_El_
Let _El_ is the interface, where we define upscaled transmissibility, and _Xl_ and _Yl_ are the input data and
output data for machine learning algorithm and
Dataset: _{_ ( _Xl, Yl_ ) _,_ _l_ = 1 _, ..., L}._
For constructing neural network for upscaled transmissibilities, based on the (23) and (25), we use a nonlocal
upscaled transmissibilities _Tl_ <sup>_w,αβ,NL_</sup> and _Tl_ <sup>_αβ,NL_</sup> ( _α, β_ = _m, f_ ) as output data _Yl_ . Input data _Xl_ is contains
information about fine scale permeabilities, fracture position in local domain _ωEl_, coarse grid functions _<u>p</u>_
and _<u>s</u>_ in the oversampled local domains. For this purpose, we use a local multi-input data for training neural
network
_l_ <sup>_k, X_</sup> _l_ <sup>_f_</sup>
_l_ <sup>_<u>p</u>_</sup> + <sup>_~~α~~_</sup> <sup>_, X_</sup> _l_ <sup>_<u>p</u>_</sup> + <sup>_~~β~~_</sup>
_l_ <sup>_k, X_</sup> _l_ <sup>_f_</sup>
_l_ <sup>_<u>p</u>_</sup> + <sup>_~~α~~_</sup> <sup>_, X_</sup> _l_ <sup>_<u>p</u>_</sup> + <sup>_~~β~~_</sup>
_l_ <sup>_<u>p</u>_</sup> + <sup>_~~β~~_</sup> <sup>_, X_</sup> _l_ <sup>_<u>s</u>_</sup> + <sup>_~~α~~_</sup>
_l_ <sup>_<u>s</u>_</sup> + <sup>_~~α~~_</sup> <sup>_, X_</sup> _l_ <sup>_<u>s</u>_</sup> + <sup>_~~β~~_</sup>
_Xl_ = ( _Xl_ <sup>_k_</sup>
_l_ <sup>_f_</sup> <sup>_, X_</sup> _l_ <sup>_<u>p</u>_</sup> + <sup>_~~α~~_</sup>
_l_ <sup>_<u>p</u>_</sup> + <sup>_~~β~~_</sup> <sup>)</sup> <sup>for</sup> <sup>flow</sup> and _Xl_ = ( _Xl_ <sup>_k_</sup>
_l_ <sup>_f_</sup> <sup>_, X_</sup> _l_ <sup>_<u>p</u>_</sup> + <sup>_~~α~~_</sup>
_l_ <sup>_<u>s</u>_</sup> + <sup>_~~β~~_</sup> <sup>)</sup> <sup>for</sup> <sup>transport</sup> <sup>and</sup> <sup>flow</sup> <sup>_,_</sup>
(26)
where _Xl_ <sup>_k_</sup> <sup>and</sup> <sup>_X_</sup> _l_ <sup>_f_</sup> <sup>are</sup> <sup>the</sup> <sup>local</sup> <sup>heterogeneous</sup> <sup>permeabilities</sup> <sup>and</sup> <sup>local</sup> <sup>fracture</sup> <sup>position</sup> <sup>markers</sup> <sup>in</sup> <sup>local</sup>
domain _ωEl_ ; _Xl_ <sup>_<u>p</u>_</sup> + <sup>_~~α~~_</sup> <sup>and</sup> <sup>_X_</sup> _l_ <sup>_<u>s</u>_</sup> + <sup>_~~α~~_</sup> <sup>are the coarse grid nonlocal mean values for pressure and saturation for continuum</sup>
_l_ <sup>_k_</sup> <sup>and</sup> <sup>_X_</sup> _l_ <sup>_f_</sup>
_l_ <sup>_<u>p</u>_</sup> + <sup>_~~α~~_</sup> <sup>and</sup> <sup>_X_</sup> _l_ <sup>_<u>s</u>_</sup> + <sup>_~~α~~_</sup>
_l_ <sup>_<u>s</u>_</sup> + <sup>_~~α~~_</sup> <sup>are the coarse grid nonlocal mean values for pressure and saturation for continuum</sup>
12
_α_ in oversampled local domain _ωE_ <sup>_H_</sup> _l_ <sup>+.</sup> <sup>Each</sup> <sup>of</sup> <sup>the</sup> <sup>input</sup> <sup>fields</sup> <sup>is</sup> <sup>represented</sup> <sup>as</sup> <sup>two-dimensional</sup> <sup>array</sup> <sup>for</sup>
two-dimensional problem. The scale of each array in dataset is re-scaled to fall within the range 0 to 1.
In Figure 2, we present an illustration of the local domains _ωEl_ and _ωE_ <sup>_H_</sup> _l_ <sup>+,</sup> <sup>_l_</sup> <sup>=</sup> <sup>1</sup> <sup>_, ..., NE_</sup> <sup>(</sup> <sup>_NE_</sup> <sup>–</sup> <sup>number</sup>
local domains). Local domain _ωEl_ is the domain for edge _El_ up to fine grid resolution that is similar to the
classic (single phase) upscaling presented in previous section. In local domain _ωEl_, we define _Xl_ <sup>_k_</sup> <sup>_∈_</sup> <sup>_ωE_</sup> _l_ <sup>and</sup>
In Figure 2, we present an illustration of the local domains _ωEl_ and _ωE_ <sup>_H_</sup> _l_ <sup>+</sup>
classic (single phase) upscaling presented in previous section. In local domain _ωEl_, we define _Xl_ <sup>_k_</sup> <sup>_∈_</sup> <sup>_ωE_</sup> _l_ <sup>and</sup>
_Xl_ <sup>_f_</sup> <sup>_∈_</sup> <sup>_ωE_</sup> _l_ <sup>.</sup> <sup>Oversampled</sup> <sup>local</sup> <sup>domain</sup> <sup>_ω_</sup> _E_ <sup>_H_</sup> _l_ <sup>+</sup> is the domain around _El_ up to coarse grid resolution, where we
define _Xl_ <sup>_<u>p</u>_</sup> + <sup>_~~α~~_</sup> <sup>_∈_</sup> <sup>_ω_</sup> _E_ <sup>_H_</sup> _l_ <sup>+</sup> and _Xl_ <sup>_<u>s</u>_</sup> + <sup>_~~α~~_</sup> <sup>_∈_</sup> <sup>_ω_</sup> _E_ <sup>_H_</sup> _l_ <sup>+.</sup> <sup>To</sup> <sup>ensure</sup> <sup>same</sup> <sup>size</sup> <sup>and</sup> <sup>structure</sup> <sup>of</sup> <sup>the</sup> <sup>input</sup> <sup>data,</sup> <sup>we</sup> <sup>divide</sup> <sup>all</sup> <sup>local</sup>
data into four types: matrix-matrix flow through horizontal edge ( _Tl_ <sup>_mm,NL_</sup> ), matrix-matrix flow through
vertical edge ( _Tl_ <sup>_mm,NL_</sup>, fracture -matrix flow for _Tl_ <sup>_mf,NL_</sup> and fracture-fracture flow for _Tl_ <sup>_ff,NL_</sup> .
_l_ <sup>_f_</sup> <sup>_∈_</sup> <sup>_ωE_</sup> _l_ <sup>.</sup> <sup>Oversampled</sup> <sup>local</sup> <sup>domain</sup> <sup>_ω_</sup> _E_ <sup>_H_</sup> _l_ <sup>+</sup>
_E_ <sup>_H_</sup> _l_ <sup>+</sup> and _Xl_ <sup>_<u>s</u>_</sup> + <sup>_~~α~~_</sup>
_l_ <sup>_<u>p</u>_</sup> + <sup>_~~α~~_</sup> <sup>_∈_</sup> <sup>_ω_</sup> _E_ <sup>_H_</sup> _l_ <sup>+</sup>
_l_ <sup>_<u>s</u>_</sup> + <sup>_~~α~~_</sup> <sup>_∈_</sup> <sup>_ω_</sup> _E_ <sup>_H_</sup> _l_ <sup>+</sup>
_l_ <sup>_mm,NL_</sup>, fracture -matrix flow for _Tl_ <sup>_mf,NL_</sup>
_l_ <sup>_mf,NL_</sup> and fracture-fracture flow for _Tl_ <sup>_ff,NL_</sup>
edge ( _Tl_ <sup>_mm,NL_</sup>, fracture -matrix flow for _Tl_ <sup>_mf,NL_</sup> and fracture-fracture flow for _Tl_ <sup>_ff,NL_</sup> .
The output is the normalized array of the upscaled transmissibilities
_Yl_ = ( _Tl_ <sup>_αβ,NL_</sup> )
_l_ <sup>_αβ,NL_</sup> ) for flow and _Yl_ = ( _Tl_ <sup>_αβ,NL_</sup>
_l_ <sup>_αβ,NL_</sup> _, Tl_ <sup>_w,αβ,NL_</sup>
_l_ <sup>_w,αβ,NL_</sup> ) for transport and flow _,_
for edge _El_ . Dataset is divided into train, validation and test sets with sizes _Ntrain_, _Nval_ and _Ntest_ ( _N_ =
_Ntrain_ + _Nval_ + _Ntest_ ). For each type of local domain as a test set, we take 50 % of data, another 50 %
divided between train and validation set in 80/20 proportion.
We use dataset ( _Xl, Yl_ ) for training of the neural network. To ensure a good learning rate and for
obtaining a wide coverage of data, we generate several solution snapshots by varying of the source term in
global fine grid model. Another approach is related to the localization of the dataset generation, where we
can use local domains calculations for fine grid solutions and calculations of the _Xl_ and _Yl_ . Note that, this
machine learning approach for the learning of the nonlocal nonlinear upscaled transmissibilities can be also
applied for the linear problems and has a recap with nonlinear finite volume methods, where transmissibilities
are also depends on solution.
4.2 Network
In machine learning algorithm, we use a multi-input deep neural network (convolutional neural network).
Let
Dataset: _{_ ( _Xl, Yl_ ) _,_ _l_ = 1 _, ..., L}_
where _Xl_ = ( _Xl_ <sup>1</sup>
_l_ <sup>_s_</sup> <sup>) (</sup> <sup>_s_</sup> <sup>is the number of the input data for</sup> <sup>_El_</sup> <sup>, see (26)).</sup> <sup>Each input data</sup> <sup>_X_</sup> _l_ <sup>_i_</sup>
_l_ <sup>1</sup> <sup>_, ..., X_</sup> _l_ <sup>_s_</sup>
where _Xl_ = ( _Xl_ <sup>1</sup> <sup>_, ..., X_</sup> _l_ <sup>_s_</sup> <sup>) (</sup> <sup>_s_</sup> <sup>is the number of the input data for</sup> <sup>_El_</sup> <sup>, see (26)).</sup> <sup>Each input data</sup> <sup>_X_</sup> _l_ <sup>_i_</sup> <sup>is defined in</sup>
_ωE_ <sup>_i_</sup> _l_ <sup>and</sup> <sup>represented</sup> <sup>as</sup> <sup>two-dimensional</sup> <sup>array</sup> <sup>for</sup> <sup>two-dimensional</sup> <sup>problems.</sup> <sup>The</sup> <sup>architecture</sup> <sup>of</sup> <sup>the</sup> <sup>multi-</sup>
input deep neural network for prediction of the nonlinear nonlocal upscaled transmissibilities is presented in
Figure 3. For each input data _X_ <sup>_i_</sup>, we use a convolutional neural network [23, 22]. Several convolutional and
pooling layers with rectified linear units activation layer are stacked with a several fully-connected layers with
dropout. Several layers of convolutions and pooling are alternated in order to detect higher order features
for better accuracy of the method. After performing convolutions, pooling, activation and dropout layers
for each _X_ <sup>_i_</sup> ( _i_ = 1 _, ..., s_ ), we add a fully connected layers, where we compose all outputs on CNN together.
By a training process, a machine learning algorithm solve the optimization problem to find model weights
that best describe the train set by minimization of the loss function.
We train a convolutional neural network by a dataset of local multi-input data ( _Xl_ ) and upscaled transmissibilities ( _Yl_ ). As a loss function, we use the mean square error (MSE)
<u>1</u>
_Losstrain_ =
_Ntrain_
_Ntrain_
_l_ =1
_|Yl −_ _F_ ( _Xl_ ) _|_ <sup>2</sup> _._
For solution of the minimization problem, we use gradient-based optimizer Adam [21]. Implementation of
the machine learning method is based on the open source library Keras [6] with TensorFlow backend [1]
and performed on the GPU. Constructed machine learning algorithm will efficiently determine dependence
between coarse grid functions in local domains and upscaled transmissibilities.
13
Figure 3: Illustration of the multi-input deep neural network for prediction of the nonlinear nonlocal upscaled
transmissibilities
### 5 Numerical result
In this section, we present numerical results for the proposed method. We consider following model problems
in fractured and heterogeneous porous media:
_Test_ _1_ : Nonlinear flow problem (unsaturated flow problem)
_Test_ _2_ : Nonlinear transport and flow problem (two-phase flow problem)
Figure 4: Coarse mesh with source term and fracture positions (left). Heterogeneous porous matrix permeability in Ωfor _Test_ _1_ and _Test_ _2_
We solve model problem in Ω= [0 _,_ 1] _×_ [0 _,_ 1] with no flux boundary conditions. We use 10 _×_ 10 coarse
grid. Location of the source terms and fracture position are depicted in Figure 4. In Figure 4, we show a
heterogeneous porous matrix permeability for both test problems. The numerical calculations of the effective
properties has been implemented with the open-source finite element software PETSc and FEniCS [25, 26, 3].
14
To measure difference between reference solution and coarse grid solution, we compute relative _L_ 2 error
_e_ <u>(</u> _<u>u</u>_ <u>) =</u>
~~�~~
<u>�</u> <u>�</u> _N H_
- _<u>i</u>_ <u>=1</u> <sup><u>(</u></sup> <sup>_<u>u</u>_</sup> _<u>i</u>_ <sup>_~~f~~_</sup> <sup>_ine_</sup>
_Ni_ <u>=1</u> _H_ <sup><u>(</u></sup> <sup>_<u>u</u>_</sup> _<u>i</u>_ <sup>_~~f~~_</sup> <sup>_ine_</sup> _<u>−</u>_ _<u>ui</u>_ <u>)</u> <sup>2</sup>
<u>�</u> _Ni_ =1 _H_ <sup><u>(</u></sup> <sup>_<u>u</u>_</sup> _i_ <sup>_~~f~~_</sup> <sup>_ine_</sup> ) <sup>2</sup>
_,_
_i_ <sup>_~~f~~_</sup> <sup>_ine_</sup> ) <sup>2</sup>
where _u_ = _p, s_, _<u>u</u>_ <sup>_~~f~~_</sup> <sup>_ine_</sup> is the reference solution (mean value on coarse grid of the fine grid solution) and _<u>u</u>_ is
the solution on the coarse grid.
For each test problem, we present results of the fine scale solution, for upscaling technique presented in
Section 3 and new method from Section 4. Computational algorithm for single-phase upscaling method with
_T_ <sup>_αβ,UP_</sup> (Section 3):
1. Loading of the precalculated effective transmissibilities _W_ <sup>_αβ,UP_</sup> .
2. Solution of the multicontinuum model:
_Test_ _1_ : Nonlinear flow problem with
<sup>_~~α~~_</sup> _ij_ <sup>_β_</sup> <sup>)</sup> <sup>_W αβ,UP_</sup> _ij_
_Tij_ <sup>_αβ,UP_</sup>
<sup>_~~α~~_</sup> _i_ <sup>_, p_</sup> <sup>_~~β~~_</sup> _j_
<sup>_αβ,UP_</sup> _ij_ _,_ _α_ = _m, f_
_ij_ <sup>_αβ,UP_</sup> <u>(</u> _<u>p</u>_ <sup>_~~α~~_</sup> _i_
<sup>_<u>p</u>_</sup> <sup>_~~β~~_</sup> _j_ <sup>) =</sup> <sup>_kr_</sup> <sup><u>(</u></sup> <sup>_<u>p</u>_</sup> <sup>_~~α~~_</sup> _ij_ <sup>_β_</sup>
_Test_ _2_ : Nonlinear transport and flow problem with
_Tij_ <sup>_αβ,UP_</sup>
<sup>_~~α~~_</sup> _i_ <sup>_, s_</sup> <sup>_~~β~~_</sup> _j_
<sup>_~~α~~_</sup> _ij_ <sup>_β_</sup> <sup>)</sup> <sup>_W αβ,UP_</sup> _ij_
_ij_ <sup>_αβ,UP_</sup> <u>(</u> _<u>s</u>_ <sup>_~~α~~_</sup> _i_
<sup>_~~β~~_</sup> _j_ <sup>) =</sup> <sup>_λ_</sup> <sup><u>(</u></sup> <sup>_<u>s</u>_</sup> <sup>_~~α~~_</sup> _ij_ <sup>_β_</sup>
<sup>_αβ,UP_</sup> _ij_ _,_
_Tij_ <sup>_w,αβ,UP_</sup>
<sup>_~~α~~_</sup> _i_ <sup>_, s_</sup> <sup>_~~α~~_</sup> _j_
_ij_ <sup>_w,αβ,UP_</sup> <u>(</u> _<u>s</u>_ <sup>_~~α~~_</sup> _i_
<sup>_~~α~~_</sup> _j_ <sup>) =</sup> <sup>_λw_</sup> <sup><u>(</u></sup> <sup>_<u>s</u>_</sup> <sup>_~~α~~_</sup> _ij_ <sup>_β_</sup>
<sup>_~~α~~_</sup> _ij_ <sup>_β_</sup> <sup>)</sup> <sup>_W αβ,UP_</sup> _ij_
<sup>_αβ,UP_</sup> _ij_ _,_ _α, β_ = _m, f_
with upwind approximation of _λ_ <sup>_w_</sup> on the coarse grid.
For the new nonlocal nonlinear machine learning technique with _T_ <sup>_αβ,NL_</sup> (Section 4), we have:
1. Loading of the machine learning models, _NNi_ ( _i_ = 1 _,_ 2 _, ..._ ).
2. Solution of the multicontinuum model:
_Test_ _1_ : Nonlinear flow problem with
_Tij_ <sup>_αβ,NL_</sup> =
- _Tij_ <sup>_αβ,ML_</sup>
_Tij_ <sup>_αβ,ML_</sup> ( _x, p_ <sup>_α_</sup> _, p_ <sup>_β_</sup> _, p_ <sup>_α_</sup> _, p_ <sup>_β_</sup> ) _,_ if _~~|~~_ _<u>p</u>_ <sup>_~~α~~_</sup> _−_ _<u>p</u>_ <sup>_β_</sup> _| > ε,_
_Tij_ <sup>_αβ,UP_</sup> _,_ _else_
_ij_ _._
_ij_ <sup>_αβ,UP_</sup> _,_ _else_
where _Tij_ <sup>_αβ,ML_</sup> is the value predicted using machine learning algorithm.
_Test_ _2_ : Nonlinear transport and flow problem with
_Tij_ <sup>_αβ,NL_</sup> =
- _Tij_ <sup>_αβ,ML_</sup>
_Tij_ <sup>_αβ,ML_</sup> ( _x, p_ <sup>_α_</sup> _, p_ <sup>_β_</sup> _, p_ <sup>_α_</sup> _, p_ <sup>_β_</sup> ) _,_ if _~~|~~_ _<u>p</u>_ <sup>_~~α~~_</sup> _−_ _<u>p</u>_ <sup>_β_</sup> _| > ε,_
_Tij_ <sup>_αβ,UP_</sup> _,_ _else_
_ij_ _,_
_ij_ <sup>_αβ,UP_</sup> _,_ _else_
_Tij_ <sup>_w,αβ,NL_</sup> =
- _Tij_ <sup>_w,αβ,ML_</sup>
_Tij_ <sup>_w,αβ,ML_</sup> ( _x, p_ <sup>_α_</sup> _, p_ <sup>_~~β~~_</sup> _, p_ <sup>_α_</sup> _, p_ <sup>_~~β~~_</sup> ) _,_ if _~~|~~_ _<u>p</u>_ <sup>_α_</sup> _−_ _<u>p</u>_ <sup>_~~β~~_</sup> _| > ε,_ _~~|~~_ _<u>s</u>_ <sup>_~~α~~_</sup> _−_ _<u>s</u>_ <sup>_~~β~~_</sup> _| > εs_
_Tij_ <sup>_w,αβ,UP_</sup> _,_ _else_
_ij_ _._
_ij_ <sup>_w,αβ,UP_</sup> _,_ _else_
where _Tij_ <sup>_αβ,ML_</sup>
_ij_ <sup>_αβ,ML_</sup> and _Tij_ <sup>_w,αβ,ML_</sup>
_ij_ <sup>_w,αβ,ML_</sup> is the value predicted using machine learning algorithm.
Note that, the loss of positivity of upscaled transmissibilities can happen, and we use a threshold value _ε_ for
the pressure difference to guarantee a good values of the coarse grid parameters, where linear upscaling is
used for the faces with small pressure difference. Moreover, we used predicted transmissibilities adaptively
with parameter _εs_ in the coarse grid model with machine learning approach.
15
We will show results of the learning process of deep neural network for nonlocal nonlinear upscaled
transmissibilities and calculate errors for a given datasets. Finally, we consider a coarse grid solution of
the problem, where nonlocal nonlinear upscaled transmissibilities are calculated using constructed machine
learning method. Finally, we discuss the computational time of the neural networks construction and solution
of the coarse grid system using classic upscaling and machine learning approaches. We divide calculation on
the offline and online stages. On the online stage, we train neural network on the GPU by a given train and
validation datasets. On the offline stage, we have two steps: loading of the preconstructed neural network
and prediction of the upscaled coarse grid transmissibilities on each time iteration or/and nonlinear iteration.
5.1 Nonlinear flow problem
We consider the solution of the nonlinear equation in fractured and heterogeneous porous media. We
set source terms _f_ <sup>_±_</sup> = _±q_, _q_ = 10 <sup>5</sup> . For the nonlinear coefficient, we use _k_ <sup>_αβ_</sup> ( _x, u_ ) = _ks_ ( _x_ ) _kr_ ( _u_ ) with
_kr_ ( _u_ ) = exp( _−a|u|_ ), _a_ = 0 _._ 1 ( _α, β_ = _m, f_ ). In Figure 4 (second column), we show a heterogeneous porous
matrix permeability _ks_ <sup>_m_</sup> <sup>(</sup> <sup>_x_</sup> <sup>)</sup> <sup>and</sup> <sup>fracture</sup> <sup>position.</sup> <sup>We</sup> <sup>set</sup> <sup>_cm_</sup> <sup>=</sup> <sup>1,</sup> <sup>_cf_</sup> <sup>=</sup> <sup>0,</sup> <sup>_k_</sup> _s_ <sup>_f_</sup> <sup>=</sup> <sup>106</sup> <sup>and</sup> <sup>_Tmax_</sup> <sup>=</sup> <sup>10</sup> <sup>_−_</sup> <sup>3</sup> <sup>with</sup>
matrix permeability _ks_ <sup>_m_</sup> <sup>(</sup> <sup>_x_</sup> <sup>)</sup> <sup>and</sup> <sup>fracture</sup> <sup>position.</sup> <sup>We</sup> <sup>set</sup> <sup>_cm_</sup> <sup>=</sup> <sup>1,</sup> <sup>_cf_</sup> <sup>=</sup> <sup>0,</sup> <sup>_k_</sup> _s_ <sup>_f_</sup> <sup>=</sup> <sup>106</sup> <sup>and</sup> <sup>_Tmax_</sup> <sup>=</sup> <sup>10</sup> <sup>_−_</sup> <sup>3</sup> <sup>with</sup>
20 time steps. Coarse grid is 10 _×_ 10 and fine grid is 640 _×_ 640 for domain Ω.
_s_ <sup>_m_</sup> <sup>(</sup> <sup>_x_</sup> <sup>)</sup> <sup>and</sup> <sup>fracture</sup> <sup>position.</sup> <sup>We</sup> <sup>set</sup> <sup>_cm_</sup> <sup>=</sup> <sup>1,</sup> <sup>_cf_</sup> <sup>=</sup> <sup>0,</sup> <sup>_k_</sup> _s_ <sup>_f_</sup>
Figure 5: Learning process for _Test_ _1_ (nonlinear flow). Loss function vs epoch. Left: _NN_ 1 for vertical
_T_ <sup>_mm,NL_</sup> . Middle: _NN_ 2 for horizontal _T_ <sup>_mm,NL_</sup> . Right: _NN_ 3 for _T_ <sup>_mf,NL_</sup>
<u>MSE</u> <u>RMSE</u> <u>(%)</u> <u>MAE</u> <u>(%)</u>
<u>Train</u> <u>set</u> <u>(global</u> <u>data)</u>
_NN_ 1 0.012 1.101 1.072
_NN_ 2 0.016 1.273 1.272
_<u>NN</u>_ <u>3</u> <u>0.013</u> <u>1.156</u> <u>0.838</u>
<u>Test</u> <u>set</u> <u>(global</u> <u>data)</u>
_NN_ 1 0.012 1.104 1.085
_NN_ 2 0.016 1.286 1.280
_<u>NN</u>_ <u>3</u> <u>0.011</u> <u>1.050</u> <u>0.774</u>
<u>Train</u> <u>set</u> <u>(local</u> <u>data)</u>
_NN_ 1 <sup>_<u>l</u>_</sup> 0.081 2.861 2.060
_NN_ 1 <sup>_<u>l</u>_</sup> 0.081 2.861 2.060
_NN_ 2 <sup>_l_</sup> 0.014 1.223 1.229
_<u>NN</u>_ <u>3</u> <sup>_l_</sup> <u>0.042</u> <u>2.058</u> <u>1.791</u>
<u>3</u> <sup>_l_</sup> <u>0.042</u> <u>2.058</u> <u>1.791</u>
Table 1: Learning performance of machine learning algorithm for _Test_ _1_ (nonlinear flow). Errors for train
and test sets
We present results for the machine learning algorithm and calculate errors for train and test datasets.
For the training of the neural networks, we investigate two datasets: local and global. For the global dataset,
we extract local information from the fine grid calculations on the global domain Ω. For the local dataset,
16
Figure 6: Learning performance for _Test_ _1_ (nonlinear flow). Parity plots comparing preference property
values against predictions made using machine learning. First row: train and validation dataset (green
color). Second row: test dataset (blue color). Left: _NN_ 1 for vertical _T_ <sup>_mm,NL_</sup> . Middle: _NN_ 2 for horizontal
_T_ <sup>_mm,NL_</sup> . Right: _NN_ 3 for _T_ <sup>_mf,NL_</sup>
we calculate each data by solution of the local problem up to fine grid resolution with different boundary
conditions for generation of the possible set of solutions (snapshots). We use six random values of the source
term to generate datasets ( _Nr_ = 6). We train three neural networks for each type of transmissibility: _NN_ 1
for horizontal coarse edges for matrix-matrix flow, _NN_ 2 for vertical coarse edges s for matrix-matrix flow
and _NN_ 3 for matrix - fracture flow. For 10 _×_ 10 coarse mesh, we have _NE_ = 90 horizontal and _NE_ = 90
vertical coarse edges (without boundary edges due to no flux boundary conditions), furthermore, we have
_NE_ = 5 coarse cells with fracture.Therefore, the train dataset for neural network contains _N_ = _Nr · NE · Nt_
samples for learning process, where _Nt_ is the number of time steps. We have _N_ = 10800 for _NN_ 1 and _NN_ 2;
and _N_ = 600 for _NN_ 3. Each sample _Xl_ contains information about heterogeneous permeability and fracture
position up to fine grid resolution in local domain, coarse grid mean value of the solution in oversampled
local domain
_l_ <sup>_k, X_</sup> _l_ <sup>_f_</sup>
_l_ <sup>_<u>p</u>_</sup> + <sup>_~~m~~_</sup> <sup>)</sup> <sup>_._</sup>
_Xl_ = ( _Xl_ <sup>_k_</sup>
_l_ <sup>_f_</sup> <sup>_, X_</sup> _l_ <sup>_<u>p</u>_</sup> + <sup>_~~m~~_</sup>
Each dataset is divided into training and validation sets with 80 : 20 ratio. For testing, we calculate another
six solution snapshots.
For calculations, we use 500 epochs with a batch size _Nb_ = 90 and Adam optimizer with learning rate
_ϵ_ = 0 _._ 001. For accelerating of the training process of the multi-input CNN, we use GPU. We use 3 _×_ 3
convolutions and 2 _×_ 2 maxpooling layers with RELU activation for _X_ <sup>_k_</sup> and _X_ <sup>_f_</sup>, and 3 _×_ 3 convolutions
with RELU activation for _X_ <sup>_<u>p</u>_</sup> <sup>_~~m~~_</sup> . For each input data, we have 2 layers of CNN with one final fully connected
layer. Convolution layer contains 8 and 16 feature maps for _X_ <sup>_k_</sup> and _X_ <sup>_f_</sup> ; and 4 and 8 feature maps for _X_ <sup>_<u>p</u>_</sup> <sup>_~~m~~_</sup> .
17
We use dropout with rate 10 % in each layer in order to prevent over-fitting. Finally, we combine CNN
output and perform two additional fully connected layers with size 200 and 1(one final output). Presented
algorithm is used to learn dependence between multi-input data and upscaled nonlinear transmissibilities.
For error calculation on the train and test dataset, we use mean square errors, relative mean absolute
and relative root mean square errors
<u>�</u>
- <u>�</u>
_<u>i</u>_ <sup>_<u>|Yi −</u>_</sup> <sup>_<u>Y</u>_</sup> <sup>˜</sup> <sup>_<u>i|</u>_</sup> <sup>2</sup>
<u>�</u>
_,_ _MAE_ =
_i_ <sup>_|Yi|_</sup> <sup>2</sup>
_MSE_ =
_i_
_|Yi −_ _Y_ <sup>˜</sup> _i|_ <sup>2</sup> _,_ _RMSE_ =
_<u>i</u>_ <sup>_<u>|Yi −</u>_</sup> <sup>_<u>Y</u>_</sup> <sup>˜</sup> <sup>_<u>i|</u>_</sup>
<u>�</u>
_,_
_i_ <sup>_|Yi|_</sup>
where _Yi_ and _Y_ <sup>˜</sup> _i_ denotes reference and predicted values for sample _Xi_
Convergence of the loss functions for three neural networks for _Test_ _1_ are presented in Figure 5, where
we plot the MSE loss function vs epoch number for train and validation sets. In Figure 6, we present a
parity plots comparing reference values against predicted using trained neural networks for train and test
datasets (green and blue colors). Learning performance for neural networks are presented in Tables 7 for
global and local datasets. We observe good convergence of the relative errors for train and test sets with
1 _−_ 2% of RMSE.
Figure 7: Upscaling error for coarse grid parameters predicted using machine learning algorithm for _Test_ _1_ .
Green color: _e_ <u>(</u> _<u>u</u>_ <sup>_~~U~~_</sup> <sup>_P_</sup> ). Red and blue colors: _e_ <u>(</u> _<u>u</u>_ <sup>_~~N~~_</sup> <sup>_L_</sup> ) with local and global calculations
Next, we consider errors between solution of the coarse grid problem with reference and predicted upscaled
transmissibilities. In Figure 7, we present results for 50 test problems with random value of the source term.
We show a relative _L_ 2 errors for pressure head on the coarse mesh with classic upscaling algorithm and using
new nonlocal nonlinear transmissibilities. We observe small errors (1 _−_ 2%) for predicted nonlocal nonlinear
transmissibilities compared with classical upscaling technique, where we have _≈_ 15% of relative _L_ 2 errors for
pressure head. Furthermore, we see that local calculation of the dataset provide similar results as a globally
caclulated data.
In Figure 8, we depict solution of the problem on the fine grid, coarse grid upscaled solution using classic
approach from Section 3 and for new method presented in Section 4 ( _u_ <sup>_fine_</sup>, _<u>u</u>_ <sup>_~~f~~_</sup> <sup>_ine_</sup>, _<u>u</u>_ <sup>_~~U~~_</sup> <sup>_P_</sup> and _<u>u</u>_ <sup>_~~N~~_</sup> <sup>_L_</sup> ). For _<u>u</u>_ <sup>_~~U~~_</sup> <sup>_P_</sup>,
we apply presented upscaling method 16, 18 and 12. We have _e_ <u>(</u> _<u>u</u>_ <sup>_UP_</sup> ) = 14 _._ 772% and _e_ <u>(</u> _<u>u</u>_ <sup>_~~N~~_</sup> <sup>_L_</sup> ) = 1 _._ 463% at
final time. For the nonlinear nonlocal transmissibilities, we set _ε_ = 0 _._ 5 _·_ 10 <sup>_−_</sup> <sup>1</sup> for _NN_ 1 and _NN_ 2, _ε_ = 10 <sup>_−_</sup> <sup>20</sup>
for _NN_ 3. Note that, we didn’t construct _NN_ 4 of data ( _T_ <sup>_ff,NL_</sup> ) because for our test problem we observe
almost constant pressure on the fracture and set _T_ <sup>_ff,NL_</sup> = _T_ <sup>_ff,UP_</sup> on the coarse grid.
We perform training of the neural networks on the GPU, where we train three neural networks: _NN_ 1,
_NN_ 2 and _NN_ 3. Online stage (neural network training) time is 25 minutes for _NN_ 1, 28 minutes for _NN_ 2
and 6 minutes for _NN_ 3 on GPU (GeForce GTX 1060). Note that, the training time depends on size of the
18
Figure 8: Reference fine grid solution ( _u_ <sup>_fine_</sup> ), mean value on coarse grid of the fine grid solution <u>(</u> _<u>u</u>_ <sup>_~~f~~_</sup> <sup>_ine_</sup> ),
coarse grid solution using upscaling method ( _<u>u</u>_ <sup>_~~U~~_</sup> <sup>_P_</sup> ) and coarse grid solution using nonlinear nonlocal machine
learning method <u>(</u> _<u>u</u>_ <sup>_~~N~~_</sup> <sup>_L_</sup> ). Nonlinear flow problem ( _Test_ _1_ ). Pressure on final time _tm_, _m_ = 20
dataset and GPU model. Here we didn’t consider time of the dataset construction which depends on type
of calculations (global or local) and number of solution snapshots, that we used for training. Number of
snapshots ( _Nr_ ) is also effects to the algorithm errors because we should have sufficient number of snapshots
to capture all variations of the input data to know how it effects to the output.
Time of the online stage contains 6.6 seconds of loading three neural networks and 13.0 seconds for
calculations on the 10 _×_ 10 coarse grid with prediction of the nonlinear nonlocal transmissibilities. Fine grid
calculations time is 454 seconds for 20 time steps on 640 _×_ 640 fine grid. We have approximately 35 time
faster calculations for a new method with small error of the coarse grid solution.
5.2 Nonlinear flow and transport problem
We consider solution of the two-phase flow problem in fractured and heterogeneous porous media. For
nonlinear coefficient, we set _λ_ <sup>_w_</sup> ( _s_ ) = _s_ <sup>2</sup> and _λ_ <sup>_n_</sup> ( _s_ ) = (1 _−_ _s_ ) <sup>2</sup> . In Figure 4 (third column), we show the
heterogeneous porous matrix permeability _k_ <sup>_m_</sup> ( _x_ ) and fracture position. We set _φ_ <sup>_α_</sup> = 1 ( _α_ = _m, f_ ), _k_ <sup>_f_</sup> = 10 <sup>3</sup>
and _Tmax_ = 25 _·_ 10 <sup>_−_</sup> <sup>3</sup> with 250 time steps. Coarse grid is 10 _×_ 10 and fine grid is 160 _×_ 160 for domain Ω.
<u>MSE</u> <u>RMSE</u> <u>(%)</u> <u>MAE</u> <u>(%)</u>
_NN_ 1 0.017 1.316 0.959
_NN_ 2 0.043 2.092 1.507
_NN_ 3 0.014 1.218 0.778
_<u>NN</u>_ <u>4</u> <u>0.052</u> <u>2.301</u> <u>1.328</u>
Table 2: Learning performance of machine learning algorithm for _Test_ _2_ (nonlinear flow and transport).
Errors for train and test sets
For the training of the neural networks, we use a global dataset, where we extract local information from
the fine grid calculations on the global domain Ω. For generation of the train datasets, we use a three random
shapshots ( _Nr_ = 3) with _Tmax_ = 40 _·_ 10 <sup>_−_</sup> <sup>3</sup> and 400 time steps. We train four neural networks for each type
of transmissibility: _NN_ 1 for horizontal coarse edges for matrix-matrix flow, _NN_ 2 for vertical coarse edges
s for matrix-matrix flow, _NN_ 3 for matrix - fracture flow and _NN_ 4 for fracture - fracture flow. The train
dataset for first and second neural networks contains _N_ = 108000; _N_ = 6000 for _NN_ 3 and _N_ = 4800 for
_NN_ 4, where dataset is randomly divided into training and validation sets with 80 : 20 ratio. Each sample
_Xl_ contains information about heterogeneous permeability and fracture position up to fine grid resolution
19
Figure 9: Learning process for _Test_ _2_ (nonlinear flow and transport). Loss function vs epoch. First row:
_NN_ 1 and _NN_ 2 for vertical and horizontal _T_ <sup>_mm,NL_</sup> . Second row: _NN_ 3 and _NN_ 4 for _T_ <sup>_mf,NL_</sup> and _T_ <sup>_ff,NL_</sup>
in local domain, mean value of the solution in oversampled local domain (coarse grid)
_l_ <sup>_<u>s</u>_</sup> + <sup>_α_</sup> <sup>_, X_</sup> _l_ <sup>_<u>p</u>_</sup> + <sup>_~~β~~_</sup>
_l_ <sup>_<u>s</u>_</sup> + <sup>_~~β~~_</sup> <sup>)</sup>
_l_ <sup>_<u>p</u>_</sup> + <sup>_~~β~~_</sup> <sup>_, X_</sup> _l_ <sup>_<u>s</u>_</sup> + <sup>_~~β~~_</sup>
_l_ <sup>_k, X_</sup> _l_ <sup>_f_</sup>
_l_ <sup>_<u>p</u>_</sup> + <sup>_~~α~~_</sup> <sup>_, X_</sup> _l_ <sup>_<u>s</u>_</sup> + <sup>_α_</sup>
_Xl_ = ( _Xl_ <sup>_k_</sup>
_l_ <sup>_f_</sup> <sup>_, X_</sup> _l_ <sup>_<u>p</u>_</sup> + <sup>_~~α~~_</sup>
and output
_Yl_ = ( _Tl_ <sup>_αβ,NL_</sup>
_l_ <sup>_αβ,NL_</sup> _, Tl_ <sup>_w,αβ,NL_</sup>
_l_ <sup>_w,αβ,NL_</sup> ) _,_ _α, β_ = _m, f._
For calculations, we use 150 epochs with a batch size _Nb_ = 90 and perform calculations on GPU.
Architecture of the neural networks are similar to the previous test problem but as output for this case, we
obtain two values, _T_ . Learning performance for neural networks are presented in Tables 9 and 2 for train
datasets. We observe a good convergence with small error for each neural network.
In Figure 10, we present results for 20 test problems with random value of the source terms. We show
a relative mean square error in percentages for pressure and for saturation on the coarse mesh with classic
upscaling algorithm and using new nonlocal nonlinear transmissibilities.
In Figure 11, we depict solution of the problem using different methods. On the first conlumn, we depict
a reference fine grid solution ( _s_ <sup>_fine_</sup>, _p_ <sup>_fine_</sup> ), mean value on coarse grid of the fine grid solution <u>(</u> _<u>s</u>_ <sup>_~~f~~_</sup> <sup>_ine_</sup>, _<u>p</u>_ <sup>_~~f~~_</sup> <sup>_ine_</sup> )
on the second column, coarse grid solution using upscaling method <u>(</u> _<u>s</u>_ <sup>_~~U~~_</sup> <sup>_P_</sup>, _<u>p</u>_ <sup>_~~U~~_</sup> <sup>_P_</sup> ) on the third column and
coarse grid solution using nonlinear nonlocal machine learning method <u>(</u> _<u>s</u>_ <sup>_~~N~~_</sup> <sup>_L_</sup>, _<u>p</u>_ <sup>_NL_</sup> ) on the fourth column.
On the first, second and third rows, we show a saturation for time _tm_, _m_ = 50 _,_ 150 _,_ 250 and on fourth
row, we have pressure for time _tm_, _m_ = 250. For solution on the coarse grid <u>(</u> _<u>p</u>_ <sup>_UP_</sup> and _<u>s</u>_ <sup>_~~U~~_</sup> <sup>_P_</sup> ), we applied
classic upscaling method (see Section 3). Fine grid (reference) solution is performed using finite volume
approximation with embedded discrete fracture model, where for error calculations we used a mean values
20
Figure 10: Upscaling error for coarse grid parameters predicted using machine learning algorithm for _Test_ _2_
(nonlinear flow and transport). Green color: _e_ <u>(</u> _<u>u</u>_ <sup>_UP_</sup> ). Red color: _e_ <u>(</u> _<u>u</u>_ <sup>_~~N~~_</sup> <sup>_L_</sup> )
of the reference solution on the coarse grid, _<u>p</u>_ <sup>_fine_</sup> and _<u>s</u>_ <sup>_~~f~~_</sup> <sup>_ine_</sup> . On the last column of the Figure 11, we
depict a coarse grid solution using nonlinear nonlocal transmissibilities that calculate based on the machine
learning approach. For machine learning approach, we have _e_ <u>(</u> _<u>p</u>_ <sup>_~~N~~_</sup> <sup>_L_</sup> ) = 0 _._ 920%, _e_ <u>(</u> _<u>s</u>_ <sup>_~~N~~_</sup> <sup>_L_</sup> ) = 3 _._ 957%, and for
upscaling _e_ <u>(</u> _<u>p</u>_ <sup>_~~U~~_</sup> <sup>_P_</sup> ) = 13 _._ 519%, _e_ <u>(</u> _<u>s</u>_ <sup>_~~U~~_</sup> <sup>_P_</sup> ) = 13 _._ 227% at final time _tm_, _m_ = 250. For the nonlinear nonlocal
transmissibilities, we set _εS_ = 10 <sup>_−_</sup> <sup>2</sup> for transport and _ε_ = 0 _._ 5 _·_ 10 <sup>_−_</sup> <sup>2</sup> for _NN_ 1, _ε_ = 10 <sup>_−_</sup> <sup>4</sup> for _NN_ 2, _ε_ = 10 <sup>_−_</sup> <sup>3</sup>
for _NN_ 3 and _ε_ = 10 <sup>_−_</sup> <sup>20</sup> for _NN_ 4 for flow.
We perform training of the neural networks on the GPU, where we train four neural networks: _NN_ 1,
_NN_ 2, _NN_ 3 and _NN_ 4. Online stage (neural network training) time is 80 minutes for _NN_ 1, 59 minutes for
_NN_ 2, 2 minutes for _NN_ 3 and 4 minutes for _NN_ 4 on GPU (GeForce GTX 1060). Note that, the training
time depends on size of the dataset and GPU model. Time of the online stage contains 16.7 seconds of
loading four neural networks and 46.9 seconds for calculations on the 10 _×_ 10 coarse grid with prediction
of the nonlinear nonlocal transmissibilities. Fine grid calculations time is 812 seconds for 250 time steps on
160 _×_ 160 fine grid for transport and flow model. We observe a good results with fast calculations using a
machine learning algorithm for presented method.
21
Figure 11: Reference fine grid solution ( _s_ <sup>_fine_</sup>, _p_ <sup>_fine_</sup> ), mean value on coarse grid of the fine grid solution
<u>(</u> _<u>s</u>_ <sup>_~~f~~_</sup> <sup>_ine_</sup>, _<u>p</u>_ <sup>_~~f~~_</sup> <sup>_ine_</sup> ), coarse grid solution using upscaling method ( _<u>s</u>_ <sup>_~~U~~_</sup> <sup>_P_</sup>, _<u>p</u>_ <sup>_~~U~~_</sup> <sup>_P_</sup> ) and coarse grid solution using nonlinear
nonlocal machine learning method <u>(</u> _<u>s</u>_ <sup>_~~N~~_</sup> <sup>_L_</sup>, _<u>p</u>_ <sup>_~~N~~_</sup> <sup>_L_</sup> ). Nonlinear flow and transport problem ( _Test_ _2_ ). First row:
saturation for time _tm_, _m_ = 50. Second row: saturation for time _tm_, _m_ = 150. Third row: saturation for
time _tm_, _m_ = 250. Fourth row: pressure for time _tm_, _m_ = 250
22
### 6 Conclusion
In this work, we consider two nonlinear problems in heterogeneous and fractured porous media. Mathematical
models are formulated as a general multicontinuum models, where fine grid approximations are constructed
using finite volume method. For the accurate solution of the nonlinear problems on the coarse grid, a
novel machine learning algorithm combined with nonlinear nonlocal multicontinua approach for calculating
nonlocal nonlinear transmissibilities is presented and investigated. We presented the construction of the
dataset for training deep neural networks. The construction of the neural network is based on the multiinput convolutional neural networks, where GPU is used for performing a fast learning process. To illustrate
the applicability of the presented method, we presented numerical results for two test problems. Numerical
results showed that presented algorithm provides fast and accurate calculations of the nonlocal nonlinear
transmissibilities.
### 7 Acknowledgements
MV’s work is supported by the mega-grant of the Russian Federation Government N14.Y26.31.0013 and RSF
N17-71-20055. EC’s work is partially supported by the Hong Kong RGC General Research Fund (Project
numbers 14304217 and 14302018) and the CUHK Faculty of Science Direct Grant 2018-19.
### References
[1] Mart´ın Abadi, Paul Barham, Jianmin Chen, Zhifeng Chen, Andy Davis, Jeffrey Dean, Matthieu Devin,
Sanjay Ghemawat, Geoffrey Irving, Michael Isard, et al. Tensorflow: a system for large-scale machine
learning. In _OSDI_, volume 16, pages 265–283, 2016.
[2] NS Bakhvalov and GP Panasenko. Homogenization in periodic media, mathematical problems of the
mechanics of composite materials. _ed:_ _Nauka,_ _Moscow_, 1984.
[3] Satish Balay, Kris Buschelman, Victor Eijkhout, William D Gropp, Dinesh Kaushik, Matthew G Kne
pley, Lois Curfman McInnes, Barry F Smith, and Hong Zhang. Petsc users manual. Technical report,
Technical Report ANL-95/11-Revision 2.1. 5, Argonne National Laboratory, 2004.
[4] Sebastian Bosma, Hadi Hajibeygi, Matei Tene, and Hamdi A Tchelepi. Multiscale finite volume method
for discrete fracture modeling on unstructured grids (ms-dfm). _Journal_ _of_ _Computational_ _Physics_, 2017.
[5] Y Chen, Louis J Durlofsky, M Gerritsen, and Xian-Huan Wen. A coupled local–global upscaling approach for simulating flow in highly heterogeneous formations. _Advances_ _in_ _Water_ _Resources_,
26(10):1041–1060, 2003.
[6] Fran¸cois Chollet et al. Keras: Deep learning library for theano and tensorflow. _URL:_ _https://keras._ _io/_ .
[7] Eric T Chung, Yalchin Efendiev, Tat Leung, and Maria Vasilyeva. Coupling of multiscale and multi
continuum approaches. _GEM-International_ _Journal_ _on_ _Geomathematics_, 8(1):9–41, 2017.
[8] Eric T Chung, Yalchin Efendiev, Wing T Leung, and Mary Wheeler. Nonlinear nonlocal multicon
tinua upscaling framework and its applications. _International_ _Journal_ _for_ _Multiscale_ _Computational_
_Engineering_, 16(5), 2018.
[9] Eric T Chung, Yalchin Efendiev, and Wing Tat Leung. An adaptive generalized multiscale discontinuous
galerkin method (gmsdgm) for high-contrast flow problems. _arXiv_ _preprint_ _arXiv:1409.3474_, 2014.
[10] Eric T Chung, Yalchin Efendiev, and Wing Tat Leung. Constraint energy minimizing generalized
multiscale finite element method. _Computer_ _Methods_ _in_ _Applied_ _Mechanics_ _and_ _Engineering_, 339:298–
319, 2018.
23
[11] Eric T Chung, Yalchin Efendiev, Wing Tat Leung, Maria Vasilyeva, and Yating Wang. Non-local
multi-continua upscaling for flows in heterogeneous fractured media. _Journal_ _of_ _Computational_ _Physics_,
2018.
[12] Eric T Chung, Yalchin Efendiev, Wing Tat Leung, Maria Vasilyeva, and Yating Wang. Non-local
multi-continua upscaling for flows in heterogeneous fractured media. _Journal_ _of_ _Computational_ _Physics_,
372:22–34, 2018.
[13] Carlo D’Angelo and Anna Scotti. A mixed finite element method for darcy flow in fractured porous
media with non-matching grids. _ESAIM:_ _Mathematical_ _Modelling_ _and_ _Numerical_ _Analysis_, 46(2):465–
489, 2012.
[14] LJ Durlofsky, Y Efendiev, and V Ginting. An adaptive local–global multiscale finite volume element
method for two-phase flow simulations. _Advances_ _in_ _Water_ _Resources_, 30(3):576–588, 2007.
[15] Yalchin Efendiev, Juan Galvis, Guanglian Li, and Michael Presho. Generalized multiscale finite element
methods. oversampling strategies. _arXiv_ _preprint_ _arXiv:1304.4888_, 2013.
[16] Horacio Florez and Eduardo Gildin. Model-order reduction applied to coupled flow and geomechanics.
In _ECMOR_ _XVI-16th_ _European_ _Conference_ _on_ _the_ _Mathematics_ _of_ _Oil_ _Recovery_, 2018.
[17] Luca Formaggia, Alessio Fumagalli, Anna Scotti, and Paolo Ruffo. A reduced model for darcy’s problem
in networks of fractures. _ESAIM:_ _Mathematical_ _Modelling_ _and_ _Numerical_ _Analysis_, 48(4):1089–1116,
2014.
[18] H. Hajibeygi, D. Kavounis, and P. Jenny. A hierarchical fracture model for the iterative multiscale finite
volume method. _Journal_ _of_ _Computational_ _Physics_, 230(24):8729–8743, 2011.
[19] Rainer Helmig et al. _Multiphase_ _flow_ _and_ _transport_ _processes_ _in_ _the_ _subsurface:_ _a_ _contribution_ _to_ _the_
_modeling_ _of_ _hydrosystems._ Springer-Verlag, 1997.
[20] Thomas Y Hou and Xiao-Hui Wu. A multiscale finite element method for elliptic problems in composite
materials and porous media. _Journal_ _of_ _computational_ _physics_, 134(1):169–189, 1997.
[21] Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. _arXiv_ _preprint_
_arXiv:1412.6980_, 2014.
[22] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional
neural networks. In _Advances_ _in_ _neural_ _information_ _processing_ _systems_, pages 1097–1105, 2012.
[23] Yann LeCun, Yoshua Bengio, and Geoffrey Hinton. Deep learning. _nature_, 521(7553):436, 2015.
[24] SH Lee, MF Lough, and CL Jensen. Hierarchical modeling of flow in naturally fractured formations
with multiple length scales. _Water_ _Resources_ _Research_, 37(3):443–455, 2001.
[25] Anders Logg, Kent-Andre Mardal, and Garth Wells. _Automated_ _solution_ _of_ _differential_ _equations_ _by_ _the_
_finite_ _element_ _method:_ _The_ _FEniCS_ _book_, volume 84. Springer Science & Business Media, 2012.
[26] Anders Logg, Kent-Andre Mardal, and Garth Wells. _Automated_ _solution_ _of_ _differential_ _equations_ _by_ _the_
_finite_ _element_ _method:_ _The_ _FEniCS_ _book_, volume 84. Springer Science & Business Media, 2012.
[27] Vincent Martin, J´erˆome Jaffr´e, and Jean E Roberts. Modeling fractures and barriers as interfaces for
flow in porous media. _SIAM_ _Journal_ _on_ _Scientific_ _Computing_, 26(5):1667–1691, 2005.
[28] Lorenzo Adolph Richards. Capillary conduction of liquids through porous mediums. _Physics_, 1(5):318–
333, 1931.
24
[29] Enrique S´anchez-Palencia. Non-homogeneous media and vibration theory. In _Non-homogeneous_ _media_
_and_ _vibration_ _theory_, volume 127, 1980.
[30] Matei T¸ene, Mohammed Saad Al Kobaisi, and Hadi Hajibeygi. Algebraic multiscale method for flow
in heterogeneous porous media with embedded discrete fractures (f-ams). _Journal_ _of_ _Computational_
_Physics_, 321:819–845, 2016.
[31] M Vasilyeva and A Tyrylgin. Convolutional neural network for fast prediction of the effective properties
of domains with random inclusions. In _Journal of Physics:_ _Conference Series_, volume 1158, page 042034.
IOP Publishing, 2019.
[32] Maria Vasilyeva, Eric T Chung, Siu Wun Cheung, Yating Wang, and Georgy Prokopev. Nonlocal multi
continua upscaling for multicontinua flow problems in fractured porous media. _Journal of Computational_
_and_ _Applied_ _Mathematics_, 355:258–267, 2019.
[33] Maria Vasilyeva, Eric T Chung, Siu Wun Cheung, Yating Wang, and Georgy Prokopev. Nonlocal multi
continua upscaling for multicontinua flow problems in fractured porous media. _Journal of Computational_
_and_ _Applied_ _Mathematics_, 355:258–267, 2019.
[34] Maria Vasilyeva, Eric T Chung, Yalchin Efendiev, and Jihoon Kim. Constrained energy minimization
based upscaling for coupled flow and mechanics. _Journal_ _of_ _Computational_ _Physics_, 376:660–674, 2019.
[35] Maria Vasilyeva, Eric T Chung, Wing Tat Leung, and Valentin Alekseev. Nonlocal multicontinuum
(nlmc) upscaling of mixed dimensional coupled flow problem for embedded and discrete fracture models.
_arXiv_ _preprint_ _arXiv:1805.09407_, 2018.
[36] Maria Vasilyeva, Eric T Chung, Wing Tat Leung, Yating Wang, and Denis Spiridonov. Upscaling method
for problems in perforated domains with non-homogeneous boundary conditions on perforations using
non-local multi-continuum method (nlmc). _arXiv_ _preprint_ _arXiv:1805.09420_, 2018.
[37] Maria Vasilyeva and Aleksey Tyrylgin. Machine learning for accelerating effective property prediction
for poroelasticity problem in stochastic media. _arXiv_ _preprint_ _arXiv:1810.01586_, 2018.
[38] Min Wang, Siu Wun Cheung, Wing Tat Leung, Eric T Chung, Yalchin Efendiev, and Mary Wheeler.
Reduced-order deep learning for flow dynamics. _arXiv_ _preprint_ _arXiv:1901.10343_, 2019.
[39] Yating Wang, Siu Wun Cheung, Eric T Chung, Yalchin Efendiev, and Min Wang. Deep multiscale
model learning. _arXiv_ _preprint_ _arXiv:1806.04830_, 2018.
[40] Yanfang Yang, Mohammadreza Ghasemi, Eduardo Gildin, Yalchin Efendiev, Victor Calo, et al. Fast
multiscale reservoir simulations with pod-deim model reduction. _SPE_ _Journal_, 21(06):2–141, 2016.
[41] Lina Zhao and Eric T Chung. An analysis of the nlmc upscaling method for high contrast problems.
_arXiv_ _preprint_ _arXiv:1904.11124_, 2019.
25