See discussions, stats, and author profiles for this publication at: https://www.researchgate.net/publication/355431293 Physics Inspired Machine Learning for Solving Fluid Flow in Porous Media: A Novel Computational Algorithm for Reservoir Simulation Conference Paper · October 2021 DOI: 10.2118/203917-MS CITATIONS READS 2 453 2 authors: Chico Sambo Yin Feng Louisiana State University University of Louisiana at Lafayette 17 PUBLICATIONS 189 CITATIONS 48 PUBLICATIONS 337 CITATIONS SEE PROFILE SEE PROFILE Some of the authors of this publication are also working on these related projects: Streamline Simulation of Transport and Retention of Nanoparticles in Subsurface Porous Media View project New Approach to Reservoir Characterization by Integrating Seismic Stochastic Inversion and Rock Physics Model: Case Study in Malay Basin View project All content following this page was uploaded by Chico Sambo on 03 November 2021. The user has requested enhancement of the downloaded file. SPE-203917-MS Chico Sambo and Yin Feng, University of Louisiana at Lafayatte, LA, 70504, USA Copyright 2021, Society of Petroleum Engineers This paper was prepared for presentation at the SPE Reservoir Simulation Conference, available on-demand, 26 October 2021 – 25 January 2022. The official proceedings were published online 19 October 2021. This paper was selected for presentation by an SPE program committee following review of information contained in an abstract submitted by the author(s). Contents of the paper have not been reviewed by the Society of Petroleum Engineers and are subject to correction by the author(s). The material does not necessarily reflect any position of the Society of Petroleum Engineers, its officers, or members. Electronic reproduction, distribution, or storage of any part of this paper without the written consent of the Society of Petroleum Engineers is prohibited. Permission to reproduce in print is restricted to an abstract of not more than 300 words; illustrations may not be copied. The abstract must contain conspicuous acknowledgment of SPE copyright. Abstract The Physics Inspired Machine Learning (PIML) is emerging as a viable numerical method to solve partial differential equations (PDEs). Recently, the method has been successfully tested and validated to find solutions to both linear and non-linear PDEs. To our knowledge, no prior studies have examined the PIML method in terms of their reliability and capability to handle reservoir engineering boundary conditions, fractures, source and sink terms. Here we explored the potential of PIML for modelling 2D single phase, incompressible, and steady state fluid flow in porous media. The main idea of PIML approaches is to encode the underlying physical law (governing equations, boundary, source and sink constraints) into the deep neural network as prior information. The capability of the PIML method in handling reservoir engineering boundary including no-flow, constant pressure, and mixed reservoir boundary conditions is investigated. The results show that the PIML performs well, giving good results comparable to analytical solution. Further, we examined the potential of PIML approach in handling fluxes (sink and source terms). Our results demonstrate that the PIML fail to provide acceptable prediction for no-flow boundary conditions. However, it provides acceptable predictions for constant pressure boundary conditions. We also assessed the capability of the PIML method in handling fractures. The results indicate that the PIML can provide accurate predictions for parallel fractures subjected to no-flow boundary. However, in complex fractures scenario its accuracy is limited to constant pressure boundary conditions. We also found that mixed and adaptive activation functions improve the performance of PIML for modeling complex fractures and fluxes. Keywords: Physics informed machine learning, deep neural networks, Partial differential equations, activation functions, fractures, production and injection wells, boundary conditions Introduction In the last 20 years, machine learning methodologies, especially deep learning methods have yield transformative and impressive results in diverse applications; to name a few speech recognition (Lee et al., 2019; Vishal and Aggarwal, 2019), machine vision (Bernal et al., 2019; Aslam et al., 2019; Wang et al., Downloaded from http://onepetro.org/spersc/proceedings-pdf/21RSC/1-21RSC/D011S008R007/2507961/spe-203917-ms.pdf/1 by Louisiana State University user on 03 November 2021 Physics Inspired Machine Learning for Solving Fluid Flow in Porous Media: A Novel Computational Algorithm for Reservoir Simulation 2 SPE-203917-MS Governing Equation Here we consider the standard governing equation for incompressible, steady state, homogenous system, and single-phase fluid flow in porous media. It is derived assuming that the fluid moves into a representative elementary volume. The fundamental law of mass conservation states that the accumulation of mass inside of given volume must be equal to net flux over its boundaries. This principle can be written mathematically as follows: (1) where Downloaded from http://onepetro.org/spersc/proceedings-pdf/21RSC/1-21RSC/D011S008R007/2507961/spe-203917-ms.pdf/1 by Louisiana State University user on 03 November 2021 2020), medical science (Yang et al., 2016), petroleum problems (Wood and Choubineh, 2019; Mahdiani et al., 2020; Jin et al., 2014; Dobrescu et al., 2016; Sambo et al., 2018a; Sambo et al., 2018b) and image recognition (Goodfellow et al., 2016). These remarkable successes achieved in abovementioned and other areas can be attributed to the explosive growth of data, computing resources, and advances in optimization algorithms (Raissi et al., 2017a). However, in petroleum engineering applications the cost of acquiring large amount of data can be prohibitive, and we are often faced with the challenges of making predictions to making decisions with small or limited data. In this small data scenario, machine learning algorithms can be used as physics-based algorithms to solve physical laws written in form of partial differential equations (PDE's). To solve a PDE via deep learning methods, a key ingredient is to constrain the neural network to minimize the PDE residual and boundary points, and several methods have been proposed to accomplish this. Among these methods, some are limited to particular types of problems, for instance image-like input domain (Khoo et al., 2017, Long et al., 2018; Zhu et al., 2019) or parabolic PDE's (Beck et al., 2017; Han et al., 2018). Some recent studies adopted the minimization of corresponding energy functional using variational form of PDE (E and Yu., 2018). However, not all PDE's can be derived from a known functional; therefore, Galerkin type projections have also been considered (Meade and Fernandez, 1994). Alternatively, one could use the PDE in its strong form directly as presented in the literature works (Lagaris et al., 1998; Lagaris et al., 2000; Berg and Nystrom, 2018; Raissi et al., 2017; Sirignano and Spiliopoulos,2018). This strong form uses automatic differentiation to a known and differentiable activation function, thus, avoiding truncation errors and numerical quadrature errors of variational forms. This strong form is widely known as Physics-informed neural networks (Samaniegoa et al., 2019; Raissi et al., 2017a; Raissi et al., 2017b; Raissi et al., 2019). Although Physics-informed neural networks have been successfully tested and validated to find solutions to both linear and non-linear PDE's (Dwivedi et al., 2019; Samaniegoa et al., 2019; Raissi et al., 2017a; Chengping et al., 2020; Raissi et al., 2017b; Raissi et al., 2019). However, the problems dealt with are not in general problems directly related to reservoir engineering applications and the literature lacks detailed investigation of PIML for solving fluid flow in porous media with reservoir engineering constraints. Thus, it is extremely important to understand the effectiveness of PIML method for reservoir engineering applications. Here, we investigated the application of physics inspired machine learning method for the simulation of steady state and incompressible fluid flow in 2D systems. We examined the performance of the PIML method for a system containing (a) reservoir engineering boundary conditions, (b) fluxes (source/ sink), and (c) fractures. The objective is to assess how well this method performs for reservoir engineering related problems. The remaining part of the paper proceed as follows: Section II describes the governing equation for incompressible single phase fluid flow in 2D homogenous system. Section III introduces PIML methodology. Section IV presents a set of numerical examples to demonstrate the effectiveness and the capability of PIML method. Finally, we conclude the paper in section V. SPE-203917-MS 3 ρ is the fluid density, ϕ stands for formation porosity, is the macroscopic Darcy velocity, denotes the normal at the boundary (∂Ω) of the computational domain(Ω), and q denotes fluid sources and sinks, i.e., outflow and inflow of fluids per volume at certain locations. Applying Gauss’ theorem, Eq. (1) can be written on the alternative integral form as: This equation is valid for particular volumes that are infinitesimally small in domain (Ω), and hence it follows that the macroscopic behavior of the single-phase fluid must satisfy the continuity equation. (3) Eq. (3) contains more unknowns than number of equations and to derive a closed mathematical model. Therefore, some constitutive equations can be introduced. In this regard, the rock compressibility is introduced, which describes the relationship between the porosity (ϕ) and the pressure(p). (4) It worth mentioned that changes take place under constant temperature and pressure, respectively. Since ∂V is constant for a fixed number of particles, hence, Eq. (4) can be writen in the equivalent form as follows: (5) In many subsurface systems, the density changes slowly so that heat conduction keeps the temperature constant, in which case Eq. (5) simplifies to: (6) The macroscopic fluid velocity is defined as volume per area occupied by fluid per time. This usually defined by Darcy law shown as follows: (7) Introducing Darcy's law, the compressibility of fluid and rock in Eq. (3), we obtain the following parabolic equation for the fluid pressure. (8) Assuming that the fluid and rock are both incompressible, meaning cr and cf are independent of p so that (ct = 0), (8) simplifies to the following equation: (9) If we introduce the fluid potential,Φ = p−gρz, Eq. (9) can be recognized as the (generalized) Poisson's equation ∇. k ∇ϕ = ∓q or as the Laplace equation ∇. k ∇ϕ=∓q if there are no volumetric fluid sources or sinks. Assuming that the formation is horizontal and homegenous, incompressible fluid, and isotropic, the permeability, k, is constant(assunmed to be equal to 1). The problem shown in Eq. (9) can be transformed into: (10) Downloaded from http://onepetro.org/spersc/proceedings-pdf/21RSC/1-21RSC/D011S008R007/2507961/spe-203917-ms.pdf/1 by Louisiana State University user on 03 November 2021 (2) 4 SPE-203917-MS The PDE shown in Eq. (10) is the subject of this work, and its solution represent pressure distribution within the Ω. Depending on the experiment, Eq. (10) can be solved either analytically or numerically. Those solutions are then used to validate the results from PIML method. Physics Inspired Machine Learning Algorithm Figure 1—General PIML workflow for governing PDE. The right side, neural networks is informed with while in the left side is uninformed neural networks. Neural networks are known to be universal function approximator (Hornik et al., 1989). They can approximate a continuous function to any acceptable level of precision. Based on the approach introduced by Raissi et al., 2019, the solution p(x,y) to the given governing partial differential equation can be approximated by DNN parametrised by set of trainable parameters (i.e., weight and biases). This simply means that PDE solution can be represented as nested compositional functions such as: (11) x represents input vectors, 2D space coordinates such as x = (x,y), the symbol θ ensemble all trainable parameters such as: (12) Here, σ is activation function and nl represents the number of hidden layers. Now let us define vi(x) = σ(wix +bi) for a given i = 1,…..,nl on other hand vi(x) = (wix +bi) for i = nl+1. As a result, we can write the governing equation (PDE) as follows: Downloaded from http://onepetro.org/spersc/proceedings-pdf/21RSC/1-21RSC/D011S008R007/2507961/spe-203917-ms.pdf/1 by Louisiana State University user on 03 November 2021 Mathematically, deep neural networks are choice of nested compositional functions. The deep neural networks employed here is based on feedforward neural network (FNN), also known as multilayer perceptron (MLP). It uses linear transformation to the inputs and output layers while applying nonlinear transformations to the hidden layers recursively. FNN is adopted in our modelling process amongst many other types of neural networks available in the literature, such as the convolutional neural networks (CNN) and the recurrent neural networks (RNN). This is because the FNN is good enough for most PDE's and easier to train for deep neural networks (DNNs). The detailed methodology used in the work is shown in Fig. 1. SPE-203917-MS 5 (13) The governing equation can be written in terms of neural networks parameters as follows: (14) The PDE in its general form: Subject to the Dirichlet and Neumann BC's: (15) Here, Ω is the computational domain limited with the boundary (∂Ω), where ∂Ω = ∂DΩ∪∂NΩ and ∂DΩ∩∂NΩ ≡ ∅, n is the unit vector normal to the boundary (∂Ω). To learn the PDE with DNN, we approximate the p(x) with another trial solution denoted as , this is in line with the principle that says the neural networks are universal approximator [ ]. The main objective in PIML is to train the DNN by optimizing the parameters (θ). We convert the problem into optimization problem and the objective function is defined as mean square error (MSE). The MSE illustrated here is in its general case where the system contains the combination of Neumann, injection well, production well, and Dirichlet conditions. where: (16) The terms in Eq. (16) such as MSEb, MSEfu, MSEs0/i represent mean root square for boundary data, colocation points and sink and source. The first term (MSEb) force Dirichlet and Neumann boundary, the Downloaded from http://onepetro.org/spersc/proceedings-pdf/21RSC/1-21RSC/D011S008R007/2507961/spe-203917-ms.pdf/1 by Louisiana State University user on 03 November 2021 We consider a single phase and incompressible fluid system that is characterized by p(x). In some examples presented in this work, some boundary data were assumed (Dirichlet boundary conditions) while on other cases boundary data are unavailable (Neumann boundary conditions). We also presented numerical examples where fractures and fluxes terms are included in the system. Therefore, we have constructed unique loss functions for each problem. However, the loss function provided in this section is for general governing equation: 6 SPE-203917-MS second term (MSEfu) enforce the PDE over colocation points over the domain that are generated in uniform or nonuniform fashion. The last term (MSEs0/i) is used to enforce fluxes (source/sink). Where, Nint, Nneu, and (17) The process of minimizing the error is carried out with the help of optimization algorithm such as Adam (Kingma and Ba, 2014). Numerical results and Discussion In all examples presented in this research, we employed the fully connected neural network consisting in 5 hidden layers with 50 neurons per hidden layer. The single and fixed activation functions (i.e., hyperbolic tangent, rectified linear unit) are used in all hidden layers for all numerical examples in reservoir engineering boundary conditions section. On the other hand, the mixed and adaptive activation functions are employed on numerical examples related to fractures and fluxes. The Xavier initialization method is adopted to initialize weights (Glorot and Bengio, 2010). The mean square error is optimized with an Adam optimization algorithm (Kingma and Ba, 2014). For all numerical examples except mentioned, we use uniformly distributed points on ∂Ω and Ω. The computational domain (Ω) is given by (x, y) ∈ [0, 1] × [0, 1]. The PIML method is implemented in Tensorflow v2.0. Reservoir Engineering Boundary Conditions (REBC's) Although the physics informed/inspired machine learning has attracted the interest of many researchers. However, its effectiveness when subjected to REBC's, have received little attention. Therefore, in this section, we investigate the capability and effectiveness of PIML method exposed to widely known REBC's namely, (i) No-flow boundary, (ii) constant pressure boundary, and(iii) mix boundary conditions. The investigation of other BCs with little application to petroleum industry is beyond the scope of this work. For each example presented here, either an analytical solution or a conventional numerical algorithm is available to verify the correctness of the model and quantify the relative error. Constant Pressure boundary. In reservoir engineering applications, it is common that parts of the reservoir may be in communication with a larger aquifer system that provides external pressure support. Also, reservoir with strong gas cap fall in this category. These scenarios tend to maintain reservoir pressure as constant at boundaries. These types of reservoir boundaries are named constant pressure boundaries and they can be modeled in terms of Dirichlet boundary condition. The single phase, homogenous system, incompressible fluid flow equation along with constant pressure at boundaries is given by: (18) The neural networks parameters can be learned by minimizing the mean squared error loss: Downloaded from http://onepetro.org/spersc/proceedings-pdf/21RSC/1-21RSC/D011S008R007/2507961/spe-203917-ms.pdf/1 by Louisiana State University user on 03 November 2021 Ndir represent the number of points (xi),( ), in the interior domain, on the Dirichlet boundary and the Neumann boundary. Moreover, adir and aneu represent penalty terms for the Dirichlet and Neumann boundaries. Now the DNN is trained with the main goal of minimizing the objective function (MSE). This is achieved by optimizing the trainable parameters θ using the following equation. SPE-203917-MS 7 where: (19) (20) Fig. 2b illustrates predicted pressure values . These predicted pressure values are obtained with 5000 iterations and the boundary scaling factor(α = 10). We consider a data set comprising of 200 boundary points and inner colocation points of 800. The fixed tangent hyperbolic activation function was adequate for this example. The exact (true) pressure values are shown in Fig. 2a. These exact pressures p(x) values are generated with the analytical solution of the PDE (16) derived based on method of separation of variable. Fig. 2c presents the absolute error which is difference between the exact and the neural network prediction results. The results indicate smaller values of absolute error (−0.005≤ε≤ 0.04). Although the PIML method obtained good results highlighted with smaller (ε). Howver, it is worth highlighting some boundary effects experienced in the left and right-side boundary (see Fig. 2c). We believe that those effects can be eliminated by finding the most optimum scaling factor. The accuracy of the model is quantified through average relative error. The resulting relative L2-norm between predicted and exact solution is 2.44×10−2. The computed relative is very small, this suggest that the PIML method produces accurate predictions of the given PDE subjected to constant pressure boundary. The PIML predictions are also consistent with lower Laplace values (∇⋅∇p(x)≈0) presented in Fig. 2d. However, we observe that not always zero Laplace translate to better predictions, there are cases where zero Laplace led to poor predictions or vice versa. Figure 2—(a) Illustrate pressure predicted from PIML model for strong aquifer. (b) True solution estimated from analytical solution. The absolute error and Laplace distribution are shown in (c) and (d), respectively. Downloaded from http://onepetro.org/spersc/proceedings-pdf/21RSC/1-21RSC/D011S008R007/2507961/spe-203917-ms.pdf/1 by Louisiana State University user on 03 November 2021 The accuracy of PIML method was assessed through analytical solution written as following: 8 SPE-203917-MS Mixed Reservoir Boundary Conditions. Combinations of these conditions are used when studying parts of a reservoir (e.g., sector models). There are also cases, for instance when describing groundwater systems or CO2 sequestration in saline aquifers, where (parts of) the boundaries are open, or the system contains a background flow. The governing equation under these conditions can be reduced in form of: (21) (22) Subjected to the constant pressure conditions (Dirichlet BC's) (23) Therefore, the loss function can be written as follows: MSE = MSEfu + MSED + MSEN where: (24) The accuracy of PIML method was assessed through analytical solution written as following: (25) Our goal in this example remains the same as in previous ones but this time we focus on mixed reservoir boundary conditions. The pressure solutions obtained from PIML tests are presented in Fig. 3b. These predicted pressure values are obtained with 8000 iterations and the boundary scaling factor (α = 5). The boundary and inner training datasets arrangement is similar to the previous example. The fixed relu activation function was adequate for this example. The analytical solutions are shown in Fig. 3a. We also present the difference between true and predicted pressure distribution as indicated Fig. 3c. The results indicate that the absolute error is very insignificant (−0.0028≤ε≤0.0014). The computed relative L2 norm between predicted and actual solution is 4.17×10−2. The Laplace values (see Fig. 3d) are close to zero (∇⋅∇p(x)≈0). Therefore, it is evident that the PIML method provides an accurate estimate of p(x) with mixed reservoir boundary conditions. Reservoirs with No-Flow Boundary Conditions. In reservoir engineering applications, one is often interested in describing closed flow systems that have no fluid flow across its external boundaries. This is a natural assumption when studying full reservoirs that have trapped and contained petroleum fluids for million of years (Knut-Andreas Lie, 2019). Mathematically, no-flow conditions across external boundaries are modeled by specifying homogeneous Neumann conditions ( ). In this section, we consider pressure equation given as follows: (26) Downloaded from http://onepetro.org/spersc/proceedings-pdf/21RSC/1-21RSC/D011S008R007/2507961/spe-203917-ms.pdf/1 by Louisiana State University user on 03 November 2021 Subjected to the no-flow boundary conditions (Neumann BC's) SPE-203917-MS 9 Subjected to the No-flow boundary (Neumann BC's) (27) With no-flow boundary conditions, the solution of PDE above is a constant pressure (initial reservoir pressure distribution). Here, we assume that the initial reservoir pressure is uniformly distributed (p = 2). Thus, the analytical solution is written as follows: (28) The loss function (MSE) for no-flow boundary system has slightly different form compared to other previous examples. This is because the solution of pure no-flow boundary tends to converge to different constants for every single experiment. In order to avoid this issue, we have added a new term in loss function based on our analytical solution. The addition of this term ensures that the neural networks learning process not only minimize the residual of PDE and boundary points but also it converges to a constant uniform pressure. Thus, the loss function takes the form: where: Downloaded from http://onepetro.org/spersc/proceedings-pdf/21RSC/1-21RSC/D011S008R007/2507961/spe-203917-ms.pdf/1 by Louisiana State University user on 03 November 2021 Figure 3—(a) Illustrate pressure predicted from PIML model for mixed boundary conditions. (b) Exact solution estimated from analytical solution. The absolute error and Laplace distribution are shown in (c) and (d), respectively. 10 SPE-203917-MS (29) Figure 4—(a) Illustrate pressure predicted from PIML model. (b) True solution estimated from analytical solution. The absolute error and Laplace distribution are shown in (c) and (d), respectively. Downloaded from http://onepetro.org/spersc/proceedings-pdf/21RSC/1-21RSC/D011S008R007/2507961/spe-203917-ms.pdf/1 by Louisiana State University user on 03 November 2021 The number of hidden layers, activation function, number of nodes and many other neural networks parameters remain the same from mixed boundary case (αneu = 7). Unlike, in the previous numerical example, here we deal with pure no-flow boundary case. Fig. 4a shows the exact solution p(x) field generated with analytical solution p(x)=2,whereas the predicted pressure values are shown in Fig. 4b. It is important to note, although the visual observation indicate significant color contrast between those two Figures. However, the numerical values of those two pressure field maps are very close to each other. Likewise, in previous numerical examples we present 2D plots shown in Fig. 4c which represent absolute error. The results indicate that the absolute error is very insignificant(−0.00002≤ε≤0.0000216). Another interesting point that worth noting is close to zero Laplace values (∇⋅∇p(x)≈0) over the computational domain which is indicated in the Fig. 4d. The computed relative L2 norm between predicted and actual solution is 4.17×10−2. This highlights the capability of this approach in handling no-flow boundary problems. SPE-203917-MS 11 Modelling Fluxes with PIML In this example, we consider our previous problem with new constraints (source and sink). These are well known in reservoir engineering applications. The fluid flow equation with sink and source can be written as follows: (30) The source and sink are represented as q+ (injection intensity) and q− (production intensity). The location of all five wells are shown as follows: (31) (32) (33) (34) (35) Although several studies in the literature (e.i. Raissi et al., 2017a; Raissi et al., 2017b; Raissi et al., 2019) have generated the training datasets using random method such as Latin hypercube sampling strategy (Stein,1987). However, these studies have not substantiated their motivations of adopting the random approach instead of uniform input data generation. To fill this gap, we investigated the impact of these two methods of training data generation. Training datasets generated using random and uniform method are shown in Figure 5.a and Figure 5.b, respectively. It turns out that no matter which method is used to generate the training datasets, their impact on the performance of the PIML method is inconsequential. As illustrated in figures, we have enforced the training points around the wells. This was achieved by adding more training data sets in circular shape with different radius (rw = 0.1, r1 = 0.15, r2 = 0.2, r3 = 0.25, r4 = 0.3) and the rw represents the wellbore radius. Around 100 training datasets were allocated for each radius (r1 = r2 = r3 = r4 = 100). It noteworthy that the literature lacks a scientific method to obtain optimum radius and number of training points. Therefore, the trial-and-error method has been used in this study. We have observed that adding more training datasets around source and sink has no benefit on the performance of PIML method. In our experiments, a five-spot injection pattern has been used to test the performance of PIML method. It consists of four production wells located at the corners of square domain {(0.1, 0.1);(0.1, 0.9);(0.9, 0.9); (0.9, 0.1)} and the injection well located in the center{(0.5, 0.5)}. The highest-pressure values can be found around the injection well (p = +1) while the lowest pressure values can be found at the production well (p = Downloaded from http://onepetro.org/spersc/proceedings-pdf/21RSC/1-21RSC/D011S008R007/2507961/spe-203917-ms.pdf/1 by Louisiana State University user on 03 November 2021 Subjected to Neumann and Dirichlet BC's: 12 SPE-203917-MS Figure 5—Uniformely distributed training dasets(a) and Randomly distributed training datsets (b) The results of five spot pattern of PIML has not matched perfectly with those from FEM. PIML method experience a wellbore related problem which we defined in this study as "wellbore extension phenomena". The PIML tends to disturb larger radius around the wellbore compared to FEM (See Fig. 6a and Fig. 6b). One of the possible reasons for this small discrepancy, could be related with the way how we define the loss functions. Overall, our findings on application of PIML for the simulation of single fluid flow in porous media with source and source at least hint the potential of this method. Our future research will investigate this issue in more details. The universal approximation theorem states that neural networks have properties of universal approximator (Hornik et al., 1989; Cybenko, 1989), which means they can approximate any continuous function. However, the neural networks failed to provide acceptable solution for no flow boundary conditions. This could be because the PIML requires some data on boundary to avoid sink and source interference. We also believe that if the problem is unsteady the no flow boundary condition has no inference on the performance of PIML because there will be one more constraint such as initial conditions. This is not the first attempt that shows that the neural networks fail to provide solution when applied to solve petroleum Downloaded from http://onepetro.org/spersc/proceedings-pdf/21RSC/1-21RSC/D011S008R007/2507961/spe-203917-ms.pdf/1 by Louisiana State University user on 03 November 2021 −1). Unlike previous section, in this example wells are present in the domain of interest (qsc≠0). The PIML model consisting of 5 hidden layers with 50 neurons in each layer, mixed activation functions with Tanh in the first two hidden layers and Relu for the rest of hidden layers was employed to compute results illustrated in Fig. 6b. The training points are uniformly distributed on the boundary (Nb = 800) and computational domain(Nint = 1,000). Here we also compared the results from PIML with those from FEM method shown in Fig. 6a. In order to numerically compare the results, two lines (x = 0.51 and y = 0.3) were drawn from both 2D plots and the data was extracted. The extracted data was then used to create plots shown in Fig. 6c and Fig. 6d. Numerical experiments indicated that fixed activation function was inadequate for more problems containing complex fractures and well patterns. Our observation is in line with previous research (Jagtap et al.,2019). Adaptive functions provide better results compared to fixed activation functions because they accelerate the convergence. SPE-203917-MS 13 related problem. In fact, previous study (Fuks and Tchelepi, 2020) also pointed out similar issue when they used PIML to solve fluid flow equation. Modelling Fractures with PIML The capability of PIML in handling fractures is assessed in this section. The governing equation remaining the same from previous section except for fractures cases line sources are allocated in the system. We started with parallel fractures with no-flow boundary conditions. A fully connected neural network with 5 hidden layers of 50 neurons each has been employed for both parallel and complex fractures cases. The training datasets are distributed as boundary points (Nb = 800), fractures points (Nf = 1000), and collocation points (Nint = 3000). Four parallel fractures are present in a system with no flow boundary conditions, they are located at x=0.05,x = 0.3,x = 0.70,x = 0.95 as illustrated in the Fig. 7a. The pressure distribution in fracture tends to be different from pressure distribution matrix, for this reason we denoted fractures with negative unit (p = −1.0,x = 0.30,x = 0.95) and positive unit (p = +1,x = 0.05,x = 0.70). The computed pressure distribution with PIML is shown in Fig. 7b. We compare the prediction results with those from FEM (see Fig. 7a). To show the results in the same graph, 1D plots are presented based on pressure extracted from selected points. Since the fractures are all parallel to each other, taking lines perpendicular to fracture seems to be more Downloaded from http://onepetro.org/spersc/proceedings-pdf/21RSC/1-21RSC/D011S008R007/2507961/spe-203917-ms.pdf/1 by Louisiana State University user on 03 November 2021 Figure 6—The results of five spot pattern from FEM (a) and PIML (b). The values of pressure distribution for y = 0.3 (c) and x = 0.51 (d) 14 SPE-203917-MS representative. Therefore, different lines are drawn at y = 0.5 and y = 0.70 as shown in Fig. 7c and Fig. 7d, respectively. We note that for this problem the PIML can predict pressure with high accuracy. Next, we study the performance of PIML when subjected to more complex fractures. The system contains four (4) fractures (see Fig. 8a). This numerical example is designed to show the performance of the PIML method in handling more complex fracture system. The predicted pressure distribution pattern is found to be similar to those from FEM as illustrated in Fig. 8a and Fig. 8b. We also note that while in previous example (parallel fractures) the PIML accurately predicted pressured distribution with fixed activation function and no flow boundary conditions. However, for complex fracture case, we considered the tanh for the first hidden layer and relu for next 4 hidden layers, adaptive activation function (n = 20,a = 0.1). The results highlight that increase number of fractures improved the solution because more constraints are present in the system as illustrated in Fig. 8.c and Fig. 8. d. Overall, the results obtained illustrate that the PIML can approximate the solution to the PDE with Dirichlet boundary conditions. Downloaded from http://onepetro.org/spersc/proceedings-pdf/21RSC/1-21RSC/D011S008R007/2507961/spe-203917-ms.pdf/1 by Louisiana State University user on 03 November 2021 Figure 7—The results of parallel fractues from FEM (a) and PIML (b). The values of pressure distribution for y = 0.7 (c) and y = 0.5 (d). SPE-203917-MS 15 Conclusions In this work, we investigated the capability of the physics inspired machine learning (PIML) method for the simulation of single-phase, incompressible fluid, steady state fluid flow in porous media. The main idea of physics inspired machine learning method is to encode the underlying physical law (governing equations) into the deep neural network as prior information. The performance of the PIML method in handling reservoir boundary conditions, fluxes term and fractures. The following conclusions are drawn: 1. The capability of the PIML method in handling reservoir engineering boundary conditions including no-flow, constant pressure, and mixed reservoir boundary conditions is investigated. When comparing PIML results to those of analytical solution, it must be point out that the PIML performs well, giving good results comparable to analytical solution. 2. The capability of the PIML method in handling fluxes (sink and source terms) is examined. Our results demonstrate that the PIML fail to provide acceptable prediction for no-flow boundary conditions. However, it provides acceptable predictions for constant pressure boundary conditions. 3. We also assessed the capability of the PIML method in handling fractures. The results indicate that the PIML can provide accurate predictions for parallel fractures subjected to no-flow boundary. However, in complex fractures scenario its accuracy is limited to constant pressure boundary conditions. We also found that mixed and adaptive activation functions improve the performance of PIML for modelling complex fractures and fluxes. Downloaded from http://onepetro.org/spersc/proceedings-pdf/21RSC/1-21RSC/D011S008R007/2507961/spe-203917-ms.pdf/1 by Louisiana State University user on 03 November 2021 Figure 8—The results of parallel fractues from FEM (a) and PIML (b). The values of pressure distribution for x = 0.7 (c) and y = 0.6 (d). 16 SPE-203917-MS References 1. 2. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. Downloaded from http://onepetro.org/spersc/proceedings-pdf/21RSC/1-21RSC/D011S008R007/2507961/spe-203917-ms.pdf/1 by Louisiana State University user on 03 November 2021 3. 4. X. Glorot, Y. Bengio. 2010. Understanding the difficulty of training deep feedforward neural networks, in: Proceedings of the Thirteenth International Conference on Artificial Intelligence and Statistics, pp. 249–256 Jagtap A.D., Kawaguchi K., Karniadakis G.E. 2019. Adaptive activation functions accelerate convergence in deep and physics-informed neural networks J. Comput. Phys., 109136), I. Goodfellow, Y. Bengio, A. Courville. 2016. Deep learning, MIT press, X. Yang, R. Kwitt, M. Niethammer. 2016. Fast predictive image registration. Deep Learning and Data Labeling for Medical Applications, Springer pp. 48–57 Y. Khoo, J. Lu, and L. Ying. 2017. Solving parametric PDE problems with artificial neural networks, arXiv preprint arXiv:1707.03351, Z. Long, Y. Lu, X. Ma, and B. Dong. 2018. PDE-net: Learning PDEs from data, in International Conference on Machine Learning, pp. 3214–3222. Y. Zhu, N. Zabaras, P.-S. Koutsourelakis, and P. Perdikaris. 2019. Physics-constrained deep learning for high-dimensional surrogate modeling and uncertainty quantification without labeled data, arXiv preprint arXiv:1901.06314,) C. Beck, W. E, and A. Jentzen. 2017. Machine learning approximation algorithms for highdimensional fully nonlinear partial differential equations and second order backward stochastic differential equations, Journal of Nonlinear Science, pp. 1–57 J. Han, A. Jentzen, and W. E 2018. Solving high-dimensional partial differential equations using deep learning, Proceedings of the National Academy of Sciences, 115, pp. 8505–8510. W. E and B. Yu. 2018. The deep Ritz method: A deep learning-based numerical algorithm for solving variational problems, Communications in Mathematics and Statistics, 6 pp. 1–12. A. J. Meade Jr and A. A. Fernandez. 1994. The numerical solution of linear ordinary differential equations by feedforward neural networks, Mathematical and Computer Modelling, 19, pp. 1–25 I. E. Lagaris, A. Likas, and D. I. Fotiadis. 1998. Artificial neural networks for solving ordinary and partial differential equations, IEEE Transactions on Neural Networks, 9, pp. 987– 1000. I. E. Lagaris, A. C. Likas, and D. G. Papageorgiou. 2000. Neural-network methods for boundary value problems with irregular boundaries, IEEE Transactions on Neural Networks, 11 pp. 1041–1049. J. Berg and K. Nystrom. 2018. A unified deep artificial neural network approach to partial differential equations in complex geometries, Neurocomputing, 317), pp. 28–41 J. Sirignano and K. Spiliopoulos. 2018. DGM: A deep learning algorithm for solving partial differential equations, Journal of Computational Physics, 375 pp. 1339–1364 Vikas Dwivedi, Nishant Parashar, Balaji Srinivasan. 2019. Distributed physics informed neural network for data-efficient solution to partial differential equations. E. Samaniegoa, C. Anitescub, S. Goswamib, V.M. Nguyen-Thanhc, H. Guoc, K. Hamdiac, T. Rabczukb, X. Zhuangc. 2019. An Energy Approach to the Solution of Partial Differential Equations in Computational Mechanics via Machine Learning: Concepts, Implementation and Applications D.P. Kingma, J. Ba. 2014. Adam: a method for stochastic optimization Preprint arXiv:1412.6980 Raissi, Maziar, Paris Perdikaris, and George E. Karniadakis. (2019. "Physics-informed neural networks: A deep learning framework for solving forward and inverse problems involving nonlinear partial differential equations." Journal of Computational Physics 378 686–707. Raissi, Maziar, Paris Perdikaris, and George Em Karniadakis. 2017. "Physics Informed Deep Learning (Part I): Data-driven Solutions of Nonlinear Partial Differential Equations." arXiv preprint arXiv:1711.10561. SPE-203917-MS 17 View publication stats Downloaded from http://onepetro.org/spersc/proceedings-pdf/21RSC/1-21RSC/D011S008R007/2507961/spe-203917-ms.pdf/1 by Louisiana State University user on 03 November 2021 21. Raissi, Maziar, Paris Perdikaris, and George Em Karniadakis. 2017."Physics Informed Deep Learning (Part II): Data-driven Discovery of Nonlinear Partial Differential Equations." arXiv preprint arXiv:1711.10566. 22. Chengping Rao, Hao Sun and Yang Liu. 2020. Physics-informed deep learning for incompressible laminar flows. 23. Olga Fuks & Hamdi A. Tchelepi. 2020. Limitations of Physics Informed Machine Learning for Nonlinear Two-Phase Transport in Porous Media. Journal of Machine Learning for Modeling and Computing, 1(1):19–37. 24. K. Hornik, M. Stinchcombe, and H. White. 1989. Multilayer feedforward networks are universal approximators. Neural Networks, 2(5):359–366, 25. Jin H., Zhang L., Liang W., Ding Q. 2014. Integrated leakage detection and localization model for gas pipelines based on the acoustic wave method J. Loss Prev. Process Ind., 27, pp. 74–88 26. Dobrescu S., Chenaru O., Matei N., Ichim L., Popescu D. 2016. A service-oriented system of reusable algorithms for distributed control of petroleum facilities in onshore oilfields Electronics, Computers and Artificial Intelligence (ECAI), 2016 8th International Conference on, IEEE, pp. 1–6 27. Sambo, C., Yin, Y., Djuraev, U. et al. 2018a. Application of Adaptive Neuro-Fuzzy Inference System and Optimization Algorithms for Predicting Methane Gas Viscosity at High Pressures and High temperatures Conditions. Arab J Sci Eng 43, 6627–6638). https://doi.org/10.1007/ s13369-018-3423-8 28. Sambo, C. H., Hermana, M., Babasari, A., Janjuhah, H. T., & Ghosh, D. P. 2018, March 20, b. Application of Artificial Intelligence Methods for Predicting Water Saturation from New Seismic Attributes. Offshore Technology Conference. doi:10.4043/28221-MS 29. D.P. Kingma, J. Ba. 2014. Adam: A Method for Stochastic Optimization. arXiv: 1412.6980 30. M. Stein. 1987. Large sample properties of simulations using Latin hypercube sampling. Technometrics, 29, pp. 143–151 31. Wood, D.A., Choubineh. 2019.A. Reliable predictions of oil formation volume factor based on transparent and auditable machine learning approaches. Advances in Geo-Energy Research, 3(3): 225–241, doi: 10.26804/ager.2019.03.01. 32. Mahdiani, M.R., Khamehchi, E., Hajirezaie, S. and Sarapardeh, A.H. 2020. Modeling viscosity of crude oil using k-nearest neighbor algorithm. Advances in Geo-Energy Research, 4(4), pp.435–447. 33. J. Wang, L.P. Tchapmi, A.P. Ravikumar, M. McGuire, C.S. Bell, D. Zimmerle, S. Savarese, A.R. Brandt. 2020. Machine vision for natural gas methane emissions detection using an infrared camera. Appl. Energy, 257, Article 113998, 10.1016/j.apenergy.2019.113998 34. P. Vishal, K.R. Aggarwal. 2019. A hybrid of deep CNN and bidirectional LSTM for automatic speech recognition J. Intell. Syst., 29 (1), pp. 1261–1274, 10.1515/jisys-2018-0372 35. M. Lee, J. Lee, J.-H. Chang. 2019. Ensemble of jointly trained deep neural network-based acoustic models for reverberant speech recognition Digit. Signal Process., 85, pp. 1–9, 10.1016/ j.dsp.2018.11.005 36. J. Bernal, K. Kushibar, D.S. Asfaw, S. Valverde, A. Oliver, R. Martí, X. Lladó.. 2019. Deep convolutional neural networks for brain image analysis on magnetic resonance imaging: a review Artif. Intell. Med., 95, pp. 64–81, 10.1016/j.artmed.2018.08.008M. 37. Aslam, T.M. Khan, S.S. Naqvi, G. Holmes, R. Naffa. 2019. On the application of automated machine vision for leather defect inspection and grading: a survey IEEE Access, 7, pp. 176065–176086, 10.1109/ACCESS.2019.2957427