# Acceleration of Gas Reservoir Simulation Using Proper Orthogonal Decomposition

Authors: Yi Wang; Bo Yu; Ye Wang
Journal: Geofluids
 (2018)

---

## Abstract

High-precision and high-speed reservoir simulation is important in engineering. Proper orthogonal decomposition (POD) is introduced to accelerate the reservoir simulation of gas flow in single-continuum porous media via establishing a reduced-order model by POD combined with Galerkin projection. Determination of the optimal mode number in the reduced-order model is discussed to ensure high-precision reconstruction with large acceleration. The typical POD model can achieve high precision for both ideal gas and real gas using only 10 POD modes. However, acceleration of computation can only be achieved for ideal gas. The obstacle of POD acceleration for real gas is that the computational time is mainly occupied by the equation of state (EOS). An approximation method is proposed to largely promote the computational speed of the POD model for real gas flow without decreasing the precision. The improved POD model shows much higher acceleration of computation with high precision for different reservoirs and different pressures. It is confirmed that the acceleration of the real gas reservoir simulation should use the approximation method instead of the computation of EOS.


---

## Body

## 1. Introduction

Reservoir simulation, utilizing mathematical models to predict fluid flow in petroleum reservoirs, has been developed since the 1800s [1]. It plays more and more important roles in the development of oil exploration and production [2]. Correspondingly, mathematical theories and numerical methods have attracted extensive attention [3–10]. The computational cost of the oil reservoir simulations is huge because a very dense mesh should be used causing long-time iterations to achieve enough resolution. This kind of long-time computation is usually not endurable in engineering. Petroleum engineers attempted several approaches to speed up oil reservoir simulations, including the scale-up approach [11–15] and parallel computation [16]. Proper orthogonal decomposition (POD) can reduce computational loads efficiently via a reduced-order model. It has been applied to heated-crude-oil pipe flow [17, 18] and other fields [19–21]. Ghommem et al. [22, 23] and Efendiev et al. [24] discussed the POD and dynamic mode decomposition method for time-dependent incompressible single-phase flow in high-contrast heterogeneous porous media. They proved that the POD model can achieve good precision in an appropriate range. With fast progress of the exploration and development of gas reservoirs, gas reservoir simulation attracted more and more attention [25–28]. Additional computation should be made to calculate the compressibility of the gas, which does not exist in incompressible oil flow. Thus, the numerical simulations of gas reservoirs are more complex and time-consuming. The study on the acceleration method of gas reservoir simulation by POD is meaningful. On the other hand, the compressibility of the gas leads to a POD model with stronger nonlinearity than oil flow. This situation might cause the POD modeling process to be more difficult than the previous POD modeling for incompressible single-phase flow. To the best of the authors’ knowledge, there is no report concerning the POD model for gas reservoir simulation especially for real gas. Therefore, it is worth discussing the POD modeling method for gas reservoir simulations.This paper is organized as follows. We revisit the governing equations of gas reservoir simulation and explain how to apply the POD to the gas reservoir simulation briefly. Then, a POD model will be established for gas reservoir simulation in single-continuum porous media. Key effects will be discussed on the acceleration ability of the POD model. Finally, conclusions and suggestions will be made.


## 2. Numerical Methods

### 2.1. Governing Equations of Gas Reservoir Simulation

Pure gas flow obeys mass conservation law (see (1)), Darcy’s law (see (2)), and the gas law (see (3)) as follows:(1)ϕ∂ρ∂t=-∇·ρu+q,(2)u=-kμ∇p,(3)ρ=pWZRT,where u is the Darcy velocity of gas flow in reservoirs, k is the diagonal permeability tensor, p is the pressure, ρ is the density of gas, μ is the dynamic viscosity of gas, ϕ is the porosity of porous media, q is the injection or production rate, W is the molecular weight of gas, R is the universal gas constant, T is the temperature of gas, and Z is the compressibility factor of gas. Z should be calculated by the equation of state of gas. In this paper, we use the Van der Waals equation:(4)Z3-B+1Z2+AZ-AB=0,where A=ap/R2T2,B=bp/RT,Z=pv/RT,v is the molar volume of gas, and a and b are gas constants changing with different real gases. The compressibility of gas for isothermal flow can be defined as(5)cg=1ρdρdpT.Using pressure as the primary variable, (1) and (5) can be rewritten as follows:(6)ϕcgp∂p∂t=∇·kμp∇p+ZRTWq,(7)cg=1p-1ZB-Z3Z2-2B+1Z+AaR2T2+A+Z23Z2-2B+1Z+AbRT.For the convenience of expression, we only use two-dimensional cases in this paper, but the extension to three-dimensional cases is straightforward. Thus, the above governing equations have the following expressions:(8)ϕcgp∂p∂t=∂∂xkxxμp∂p∂x+∂∂ykyyμp∂p∂y+ZRTWq,(9)u=-kxxμ∂p∂x,(10)v=-kyyμ∂p∂y,where kxx and kyy are two components of permeability k in the x and y directions, respectively, and u and v are two components of Darcy velocity u in the x and y directions, respectively. Gas reservoir simulation can be accomplished via numerically solving (8)~(10) to obtain pressure and velocity with the calculation of parameters (Z and cg) using (4) and (7). Here, cg is the implicit function of p (shown in (7)) so that it can only be explicitly solved. Therefore, the whole term cgp is treated explicitly.


### 2.2. Basic Idea of Proper Orthogonal Decomposition

The above governing equations clearly show that the core of the whole computation is the calculation ofp. Once p is solved, one can directly solve u and v. Therefore, the acceleration of the computation of p is the most important in the POD modeling. The basic idea of the POD modeling for (8) is briefly stated as follows.(1) Separate the variable in space and time using the following linear combination:(11)p=∑n=1Mcnφn,where φn are the POD modes which are the functions of space (φnx,y), cn are the temporal coefficients (cnt), and φn are the identity basis vectors orthogonal with each other:(12)φi·φj=δij,where “·” means the inner product of two vectors and δij is the Kronecker delta taking the value 1 for j=i and 0 for others.(2)φn can be calculated from the eigenvalue decomposition of a sample matrix, which can be obtained by aligning the samples in a time series (t1,t2,t3,…,tN):(13)S=S1,S2,S3,…,SN,where S1=p11p21⋮pL1,S2=p12p22⋮pL2,S3=p13p23⋮pL3,…,SN=p1Np2N⋮pLN,L is the number of grid points (including boundary points), and N is the number of samples. A kernel can be calculated as follows:(14)Cij=1N∫ΩSiSjdΩ,where Ω means domain. The matrix form of (14) is(15)C=ΔxΔyNSTS.The matrixC can be decomposed by eigenvalue decomposition to obtain the eigenvalues and eigenvectors:(16)CV=λV,where V is the eigenvector matrix and λ are the eigenvalues of the corresponding eigenvectors. Along with the descending order of λ (λ1>λ2>λ3>⋯>λN), the importance of eigenvectors v1,v2,v3,…,vN in V is also descending. To quantitatively represent the importance of each eigenvector, the energy ξn of the nth eigenvector is introduced:(17)ξn=λn∑i=1Nλi×100%.Correspondingly, the cumulative energy ζn of the top n eigenvectors can be expressed as follows:(18)ζn=∑j=1nλj∑i=1Nλi×100%.POD modesφn can be obtained as follows:(19)φn=SVSV,where “” means the Euclidean distance.(3) Substituting (11) into (8) and projecting the whole equation onto the Hilbert space spanned by the POD modes ϕm (m=1~M), one can finally obtain a linear equation system of cn in the scale of M×M, where M is the number of POD modes in (11). Once the temporal coefficients cn are solved, the original variable p can be directly reconstructed in (11), instead of the computation of (8). The computational cost of (11) is in the scale of M×M while the computational cost of (8) is in the scale of L×L. The number of samples is usually quite smaller than the number of grid points (N≪L). The number of effective POD modes is smaller than the number of samples (M≤N). Thus, the computational time can be largely reduced using POD. The POD model is a type of reduced-order model. The details of this step will be explained in Section 2.3.According to the above analyses, the core computation of POD is the calculation of temporal coefficientscn. The equation of cn for gas reservoir simulation will be established in detail in the next section.


### 2.3. Establishment of the POD Model for Gas Reservoir Simulation

Substituted by (11), (8) can be transformed to(20)ϕcgp∑n=1Mφndcndt=∑n=1M∑l=1Mcncl∂∂xkxxμφl∂φn∂x+∂∂ykyyμφl∂φn∂y+ZRTWq.Equation (20) is projected onto φm:(21)∫0ly∫0lxφmϕcgp∑n=1Mφndcndtdxdy=∫0ly∫0lxφm∑n=1M∑l=1Mcncl∂∂xkxxμφl∂φn∂x+∂∂ykyyμφl∂φn∂ydxdy+∫0ly∫0lxφmZRTWqdxdy,where lx and ly are the lengths of the computational domain in the x and y directions, respectively. As stated in (11), cn and φn are functions of time and space, respectively. Thus, the left-hand side of (21) is transformed to(22)∫0ly∫0lxφmϕcgp∑n=1Mφndcndtdxdy=ϕ∑n=1Mdcndt∫0ly∫0lxcgpφmφndxdy.Using integration by part and the property of the POD modes (see (12)), we can simplify the first term and the second term of the right-hand side of (21) as follows:(23)∫0ly∫0lxφm∑n=1M∑l=1Mcncl∂∂xkxxμφl∂φn∂x+∂∂ykyyμφl∂φn∂ydxdy=∑n=1M∑l=1Mcncl∫0ly∫0lxφm∂∂xkxxμφl∂φn∂x+∂∂ykyyμφl∂φn∂ydxdy=∫0lxφmkyyμp∂p∂yly-φmkyyμp∂p∂y0dx+∫0lyφmkxxμp∂p∂xlx-φmkxxμp∂p∂x0dy-∑n=1M∑l=1Mcncl∫0ly∫0lxφlkxxμ∂φn∂x∂φm∂x+kyyμ∂φn∂y∂φm∂ydxdy,(24)∫0ly∫0lxφmZRTWqdxdy=RTW∫0ly∫0lxφmZqdxdy.Please note that the projection of the boundary condition in (23) is dependent on boundary pressures and boundary pressure gradients. To update them, the pressure field should be firstly reconstructed using (11) in every time step once cn is updated by the POD model. Therefore, the projection of the boundary condition leads to additional computations of the full-order equations (see (9), (10), and (11)), consuming much more time. This is very harmful for the high acceleration of the POD model. To ensure the high-acceleration advantage of the POD model, the computations of (9), (10), and (11) should be avoided in the POD model. This can be fulfilled by further decomposing the pressures in (23). The derivations will be made in the following three steps.(1) If all the boundaries are Dirichlet condition (known boundary pressure), boundary treatment can be expressed as follows:(25)∂p∂xnx+1,j=pnx+1,j-pnx,jΔx/2=2Δxpnx+1,j-∑n=1Mcnφnnx,j,∂p∂x0,j=p1,j-p0,jΔx/2=2Δx∑n=1Mcnφn1,j-p0,j,∂p∂xi,ny+1=pi,ny+1-pi,nyΔy/2=2Δypi,ny+1-∑n=1Mcnφni,ny,∂p∂xi,0=pi,1-pi,0Δy/2=2Δy∑n=1Mcnφni,1-pi,0,where the boundary pressures pnx+1,j, p0,j, pi,ny+1, and pi,0 are constant so that they remain in the expressions, and their neighbor pressures (pnx,j,p1,j,pi,ny,pi,1) are changing with time so that they are decomposed into cn and φn using (11). Thus, the projection of the boundary condition can be transformed to(26)∫0lxφmkyyμp∂p∂yly-φmkyyμp∂p∂y0dx+∫0lyφmkxxμp∂p∂xlx-φmkxxμp∂p∂x0dy=2ΔyΔx∑j=1nykxxμφmp2nx+1,j+kxxμφmp20,j+2ΔxΔy∑i=1nxkyyμφmp2i,ny+1+kyyμφmp2i,0-∑n=1Mcn2ΔyΔx∑j=1nykxxμφmpnx+1,jφnnx,j+kxxμφmp0,jφn1,j+2ΔxΔy∑i=1nxkyyμφmpi,ny+1φni,ny+kyyμφmpi,0φni,1.(2) If all the boundaries are Neumann condition (known boundary velocity), boundary treatment can be expressed as follows:(27)u0,j=-kxxμ∂p∂x0,j,unx,j=-kxxμ∂p∂xnx+1,j,vi,0=-kyyμ∂p∂yi,0,vi,ny=-kyyμ∂p∂yi,ny+1.The projection of the boundary condition can be transformed to(28)∫0lxφmkyyμp∂p∂yly-φmkyyμp∂p∂y0dx+∫0lyφmkxxμp∂p∂xlx-φmkxxμp∂p∂x0dy=∑n=1Mcn∑j=1nyu0,jφmφn0,j-unx,jφmφnnx+1,jΔy+∑i=1nxvi,0φmφni,0-vi,nyφmφni,ny+1Δx.(3) For general boundary conditions, the projection of the boundary condition can be summarized via both (26) and (28):(29)∫0lxφmkyyμp∂p∂yly-φmkyyμp∂p∂y0dx+∫0lyφmkxxμp∂p∂xlx-φmkxxμp∂p∂x0dy=HBm+∑n=1McnHVm,n-HPm,n,where(30)HBm=2ΔyΔx∑j=1nykxxμφmp2nx+1,jDiriXnx+1,j+kxxμφmp20,jDiriX0,j+2ΔxΔy∑i=1nxkyyμφmp2i,ny+1DiriYi,ny+1+kyyμφmp2i,0DiriYi,0,HVm,n=Δy∑j=1nyu0,jφmφn0,j1-DiriX0,j-unx,jφmφnnx+1,j1-DiriXnx+1,j+Δx∑i=1nxvi,0φmφni,01-DiriYi,0-vi,nyφmφni,ny+11-DiriYi,ny+1,HPm,n=2ΔyΔx∑j=1nykxxμφmpnx+1,jφnnx,jDiriXnx+1,j+kxxμφmp0,jφn1,jDiriX0,j+2ΔxΔy∑i=1nxkyyμφmpi,ny+1φni,nyDiriYi,ny+1+kyyμφmpi,0φni,1DiriYi,0,where DiriX and DiriY are 1 for Dirichlet boundary condition and 0 for Neumann boundary condition. Thus, boundary pressures only appear in the expressions of HBm and HPm,n while boundary velocities only appear in the expression of HVm,n. HBm, HVm,n, and HPm,n can also be calculated only once, saving computational time. Let(31)HUm,n=∫0ly∫0lxcgpφmφndxdy=∑j=1ny∑i=1nxcgpφmφni,jΔxΔy,(32)HDm,n,l=∫0ly∫0lxφlkxxμ∂φn∂x∂φm∂x+kyyμ∂φn∂y∂φm∂ydxdy=∑j=1ny∑i=1nxφlkxxμ∂φn∂x∂φm∂x+kyyμ∂φn∂y∂φm∂yi,jΔxΔy,(33)HSm=∫0ly∫0lxφmZqdxdy=∑j=1ny∑i=1nxφmZqi,jΔxΔy.Then, the POD model for gas reservoir simulation can be obtained in the following expression:(34)ϕ∑n=1MdcndtHUm,n=HBm+∑n=1McnHVm,n-HPm,n-∑n=1M∑l=1McnclHDm,n,l+RTWHSm.Equation (34) is the time evolution equation of cn. For each time step, (34) can be solved via an efficient linear solver (DLSARG) provided by FORTRAN coding language. Numerical results are discussed in the next section to evaluate the precision and the acceleration performances of the POD reduced-order model.


## 2.1. Governing Equations of Gas Reservoir Simulation

Pure gas flow obeys mass conservation law (see (1)), Darcy’s law (see (2)), and the gas law (see (3)) as follows:(1)ϕ∂ρ∂t=-∇·ρu+q,(2)u=-kμ∇p,(3)ρ=pWZRT,where u is the Darcy velocity of gas flow in reservoirs, k is the diagonal permeability tensor, p is the pressure, ρ is the density of gas, μ is the dynamic viscosity of gas, ϕ is the porosity of porous media, q is the injection or production rate, W is the molecular weight of gas, R is the universal gas constant, T is the temperature of gas, and Z is the compressibility factor of gas. Z should be calculated by the equation of state of gas. In this paper, we use the Van der Waals equation:(4)Z3-B+1Z2+AZ-AB=0,where A=ap/R2T2,B=bp/RT,Z=pv/RT,v is the molar volume of gas, and a and b are gas constants changing with different real gases. The compressibility of gas for isothermal flow can be defined as(5)cg=1ρdρdpT.Using pressure as the primary variable, (1) and (5) can be rewritten as follows:(6)ϕcgp∂p∂t=∇·kμp∇p+ZRTWq,(7)cg=1p-1ZB-Z3Z2-2B+1Z+AaR2T2+A+Z23Z2-2B+1Z+AbRT.For the convenience of expression, we only use two-dimensional cases in this paper, but the extension to three-dimensional cases is straightforward. Thus, the above governing equations have the following expressions:(8)ϕcgp∂p∂t=∂∂xkxxμp∂p∂x+∂∂ykyyμp∂p∂y+ZRTWq,(9)u=-kxxμ∂p∂x,(10)v=-kyyμ∂p∂y,where kxx and kyy are two components of permeability k in the x and y directions, respectively, and u and v are two components of Darcy velocity u in the x and y directions, respectively. Gas reservoir simulation can be accomplished via numerically solving (8)~(10) to obtain pressure and velocity with the calculation of parameters (Z and cg) using (4) and (7). Here, cg is the implicit function of p (shown in (7)) so that it can only be explicitly solved. Therefore, the whole term cgp is treated explicitly.


## 2.2. Basic Idea of Proper Orthogonal Decomposition

The above governing equations clearly show that the core of the whole computation is the calculation ofp. Once p is solved, one can directly solve u and v. Therefore, the acceleration of the computation of p is the most important in the POD modeling. The basic idea of the POD modeling for (8) is briefly stated as follows.(1) Separate the variable in space and time using the following linear combination:(11)p=∑n=1Mcnφn,where φn are the POD modes which are the functions of space (φnx,y), cn are the temporal coefficients (cnt), and φn are the identity basis vectors orthogonal with each other:(12)φi·φj=δij,where “·” means the inner product of two vectors and δij is the Kronecker delta taking the value 1 for j=i and 0 for others.(2)φn can be calculated from the eigenvalue decomposition of a sample matrix, which can be obtained by aligning the samples in a time series (t1,t2,t3,…,tN):(13)S=S1,S2,S3,…,SN,where S1=p11p21⋮pL1,S2=p12p22⋮pL2,S3=p13p23⋮pL3,…,SN=p1Np2N⋮pLN,L is the number of grid points (including boundary points), and N is the number of samples. A kernel can be calculated as follows:(14)Cij=1N∫ΩSiSjdΩ,where Ω means domain. The matrix form of (14) is(15)C=ΔxΔyNSTS.The matrixC can be decomposed by eigenvalue decomposition to obtain the eigenvalues and eigenvectors:(16)CV=λV,where V is the eigenvector matrix and λ are the eigenvalues of the corresponding eigenvectors. Along with the descending order of λ (λ1>λ2>λ3>⋯>λN), the importance of eigenvectors v1,v2,v3,…,vN in V is also descending. To quantitatively represent the importance of each eigenvector, the energy ξn of the nth eigenvector is introduced:(17)ξn=λn∑i=1Nλi×100%.Correspondingly, the cumulative energy ζn of the top n eigenvectors can be expressed as follows:(18)ζn=∑j=1nλj∑i=1Nλi×100%.POD modesφn can be obtained as follows:(19)φn=SVSV,where “” means the Euclidean distance.(3) Substituting (11) into (8) and projecting the whole equation onto the Hilbert space spanned by the POD modes ϕm (m=1~M), one can finally obtain a linear equation system of cn in the scale of M×M, where M is the number of POD modes in (11). Once the temporal coefficients cn are solved, the original variable p can be directly reconstructed in (11), instead of the computation of (8). The computational cost of (11) is in the scale of M×M while the computational cost of (8) is in the scale of L×L. The number of samples is usually quite smaller than the number of grid points (N≪L). The number of effective POD modes is smaller than the number of samples (M≤N). Thus, the computational time can be largely reduced using POD. The POD model is a type of reduced-order model. The details of this step will be explained in Section 2.3.According to the above analyses, the core computation of POD is the calculation of temporal coefficientscn. The equation of cn for gas reservoir simulation will be established in detail in the next section.


## 2.3. Establishment of the POD Model for Gas Reservoir Simulation

Substituted by (11), (8) can be transformed to(20)ϕcgp∑n=1Mφndcndt=∑n=1M∑l=1Mcncl∂∂xkxxμφl∂φn∂x+∂∂ykyyμφl∂φn∂y+ZRTWq.Equation (20) is projected onto φm:(21)∫0ly∫0lxφmϕcgp∑n=1Mφndcndtdxdy=∫0ly∫0lxφm∑n=1M∑l=1Mcncl∂∂xkxxμφl∂φn∂x+∂∂ykyyμφl∂φn∂ydxdy+∫0ly∫0lxφmZRTWqdxdy,where lx and ly are the lengths of the computational domain in the x and y directions, respectively. As stated in (11), cn and φn are functions of time and space, respectively. Thus, the left-hand side of (21) is transformed to(22)∫0ly∫0lxφmϕcgp∑n=1Mφndcndtdxdy=ϕ∑n=1Mdcndt∫0ly∫0lxcgpφmφndxdy.Using integration by part and the property of the POD modes (see (12)), we can simplify the first term and the second term of the right-hand side of (21) as follows:(23)∫0ly∫0lxφm∑n=1M∑l=1Mcncl∂∂xkxxμφl∂φn∂x+∂∂ykyyμφl∂φn∂ydxdy=∑n=1M∑l=1Mcncl∫0ly∫0lxφm∂∂xkxxμφl∂φn∂x+∂∂ykyyμφl∂φn∂ydxdy=∫0lxφmkyyμp∂p∂yly-φmkyyμp∂p∂y0dx+∫0lyφmkxxμp∂p∂xlx-φmkxxμp∂p∂x0dy-∑n=1M∑l=1Mcncl∫0ly∫0lxφlkxxμ∂φn∂x∂φm∂x+kyyμ∂φn∂y∂φm∂ydxdy,(24)∫0ly∫0lxφmZRTWqdxdy=RTW∫0ly∫0lxφmZqdxdy.Please note that the projection of the boundary condition in (23) is dependent on boundary pressures and boundary pressure gradients. To update them, the pressure field should be firstly reconstructed using (11) in every time step once cn is updated by the POD model. Therefore, the projection of the boundary condition leads to additional computations of the full-order equations (see (9), (10), and (11)), consuming much more time. This is very harmful for the high acceleration of the POD model. To ensure the high-acceleration advantage of the POD model, the computations of (9), (10), and (11) should be avoided in the POD model. This can be fulfilled by further decomposing the pressures in (23). The derivations will be made in the following three steps.(1) If all the boundaries are Dirichlet condition (known boundary pressure), boundary treatment can be expressed as follows:(25)∂p∂xnx+1,j=pnx+1,j-pnx,jΔx/2=2Δxpnx+1,j-∑n=1Mcnφnnx,j,∂p∂x0,j=p1,j-p0,jΔx/2=2Δx∑n=1Mcnφn1,j-p0,j,∂p∂xi,ny+1=pi,ny+1-pi,nyΔy/2=2Δypi,ny+1-∑n=1Mcnφni,ny,∂p∂xi,0=pi,1-pi,0Δy/2=2Δy∑n=1Mcnφni,1-pi,0,where the boundary pressures pnx+1,j, p0,j, pi,ny+1, and pi,0 are constant so that they remain in the expressions, and their neighbor pressures (pnx,j,p1,j,pi,ny,pi,1) are changing with time so that they are decomposed into cn and φn using (11). Thus, the projection of the boundary condition can be transformed to(26)∫0lxφmkyyμp∂p∂yly-φmkyyμp∂p∂y0dx+∫0lyφmkxxμp∂p∂xlx-φmkxxμp∂p∂x0dy=2ΔyΔx∑j=1nykxxμφmp2nx+1,j+kxxμφmp20,j+2ΔxΔy∑i=1nxkyyμφmp2i,ny+1+kyyμφmp2i,0-∑n=1Mcn2ΔyΔx∑j=1nykxxμφmpnx+1,jφnnx,j+kxxμφmp0,jφn1,j+2ΔxΔy∑i=1nxkyyμφmpi,ny+1φni,ny+kyyμφmpi,0φni,1.(2) If all the boundaries are Neumann condition (known boundary velocity), boundary treatment can be expressed as follows:(27)u0,j=-kxxμ∂p∂x0,j,unx,j=-kxxμ∂p∂xnx+1,j,vi,0=-kyyμ∂p∂yi,0,vi,ny=-kyyμ∂p∂yi,ny+1.The projection of the boundary condition can be transformed to(28)∫0lxφmkyyμp∂p∂yly-φmkyyμp∂p∂y0dx+∫0lyφmkxxμp∂p∂xlx-φmkxxμp∂p∂x0dy=∑n=1Mcn∑j=1nyu0,jφmφn0,j-unx,jφmφnnx+1,jΔy+∑i=1nxvi,0φmφni,0-vi,nyφmφni,ny+1Δx.(3) For general boundary conditions, the projection of the boundary condition can be summarized via both (26) and (28):(29)∫0lxφmkyyμp∂p∂yly-φmkyyμp∂p∂y0dx+∫0lyφmkxxμp∂p∂xlx-φmkxxμp∂p∂x0dy=HBm+∑n=1McnHVm,n-HPm,n,where(30)HBm=2ΔyΔx∑j=1nykxxμφmp2nx+1,jDiriXnx+1,j+kxxμφmp20,jDiriX0,j+2ΔxΔy∑i=1nxkyyμφmp2i,ny+1DiriYi,ny+1+kyyμφmp2i,0DiriYi,0,HVm,n=Δy∑j=1nyu0,jφmφn0,j1-DiriX0,j-unx,jφmφnnx+1,j1-DiriXnx+1,j+Δx∑i=1nxvi,0φmφni,01-DiriYi,0-vi,nyφmφni,ny+11-DiriYi,ny+1,HPm,n=2ΔyΔx∑j=1nykxxμφmpnx+1,jφnnx,jDiriXnx+1,j+kxxμφmp0,jφn1,jDiriX0,j+2ΔxΔy∑i=1nxkyyμφmpi,ny+1φni,nyDiriYi,ny+1+kyyμφmpi,0φni,1DiriYi,0,where DiriX and DiriY are 1 for Dirichlet boundary condition and 0 for Neumann boundary condition. Thus, boundary pressures only appear in the expressions of HBm and HPm,n while boundary velocities only appear in the expression of HVm,n. HBm, HVm,n, and HPm,n can also be calculated only once, saving computational time. Let(31)HUm,n=∫0ly∫0lxcgpφmφndxdy=∑j=1ny∑i=1nxcgpφmφni,jΔxΔy,(32)HDm,n,l=∫0ly∫0lxφlkxxμ∂φn∂x∂φm∂x+kyyμ∂φn∂y∂φm∂ydxdy=∑j=1ny∑i=1nxφlkxxμ∂φn∂x∂φm∂x+kyyμ∂φn∂y∂φm∂yi,jΔxΔy,(33)HSm=∫0ly∫0lxφmZqdxdy=∑j=1ny∑i=1nxφmZqi,jΔxΔy.Then, the POD model for gas reservoir simulation can be obtained in the following expression:(34)ϕ∑n=1MdcndtHUm,n=HBm+∑n=1McnHVm,n-HPm,n-∑n=1M∑l=1McnclHDm,n,l+RTWHSm.Equation (34) is the time evolution equation of cn. For each time step, (34) can be solved via an efficient linear solver (DLSARG) provided by FORTRAN coding language. Numerical results are discussed in the next section to evaluate the precision and the acceleration performances of the POD reduced-order model.


## 3. Results and Discussions

The computational domain (100 m × 100 m) is shown in Figure1. Permeability takes the value ks in the blue area (50 m × 50 m in the center of the domain) and kl in the red area. Natural gas with the main component of methane (CH4) is the most important gas in subsurface reservoirs. Thus, it is used in the numerical cases in this paper. Initial pressure p0 is given in the whole domain with zero injection or production. plb and prb are imposed on the left and the right boundaries. No flow boundary condition is applied to the top and bottom boundaries. All parameters are listed in Table 1, where 1md=9.869233×10-16m2.Table 1
Computational parameters.
Parameter
Value
Unit
ϕ
0.2
/
p
0
101325
Pa
p
l
b
1013250
Pa
p
r
b
101325
Pa
q
0
kg/(m3⋅s)
k
s
1
md
k
l
100
md
R
8.3147295
J/(mol⋅K)
T
298
K
W
16
×
10
-
3
Kg/mol
μ
11.067
×
10
-
6
Pa⋅s
a
0.2283
Pa⋅m6⋅mol-2
b
4.278
×
10
-
5
m
3/mol
M
2000
/
n
x
100
/
n
y
100
/
l
x
100
m
l
y
100
m
Δ
x
1
m
Δ
y
1
m
Δ
t
1.296
s
Simulation time scope
30
DaysFigure 1
Computational domain and permeability.In this condition, governing equations (see (4) and (7)~(10)) are solved to collect samples at different moments, using the highly accurate finite difference method (FDM) to ensure the grid-independent results for the grid number more than 60 × 60 [29]. Thus, the grid number in this paper (100 × 100) is enough. The temporal scheme is an explicit advancement for each time step (Δt=1.296s) with 2×106 time steps. After the total time scale of the simulation of 30 days, 2000 samples are collected. To evaluate the precision and computational speed of the POD model, the relative deviation ε and the acceleration ratio r are defined in the following:(35)ε=pPOD-pFDMpFDM×100%,(36)r=tFDMtPOD,where t is the CPU time for the computation and the subscripts “POD” and “FDM” represent the results from the POD model and from the direct calculation of the governing equations via the FDM. If r>1, the POD model can accelerate the computation. The larger r represents the larger acceleration.


### 3.1. POD Results for Ideal Gas

First of all, the POD model is examined in the case of ideal gas (Z≡1), where a and b in the Van der Waals equation (see (4)) are all zero. Thus, the expression of the gas compressibility (see (7)) decays to cg=1/p so that (31) and (33) can be simplified as(37)HUm,n=∑j=1ny∑i=1nxφmφni,jΔxΔy,HSm=∑j=1ny∑i=1nxφmqi,jΔxΔy.As shown in Figure2, the first POD mode occupies the vast majority (96.86%) of the total energy. This indicates that the first mode captures the main characteristics of the whole transient process. However, the relative deviation of the reconstruction results largely fluctuates with time. The maximum deviation is as high as 210% while the minimum deviation is only 4.6×10-2% (Table 2). This phenomenon indicates that a dominant mode occupying the vast majority of energy can only obtain high-accurate reconstruction at some moments but loses the fidelity at other moments. To promote the reconstruction precision of the whole transient process, more POD modes should be included. To ensure high acceleration of the reduced-order model, the inclusion of the POD modes should be as little as possible. Thus, there is an optimal truncation number of modes. Theoretically, the number of the POD modes can be usually determined when the cumulative energy contribution achieves 100%. As shown in Figure 2, the cumulative energy contribution ζn achieves 100% at and after the 7th POD mode. Although the maximum deviation decreases rapidly with increasing number of POD modes, the maximum deviation is still as high as 13% when the top 7 modes are used. Therefore, more modes should be considered in the reduced-order model.Table 2
Reconstruction deviations using top 1~top 7 modes.
POD modes
Top 1
Top 2
Top 3
Top 4
Top 5
Top 6
Top 7
ε
m
a
x
210%
84%
46%
29%
27%
12%
13%
ε
m
i
n
4.6
×
10
-
2%
4.3
×
10
-
3%
2.4
×
10
-
3%
1.9
×
10
-
4%
5.7
×
10
-
3%
4.7
×
10
-
3%
6.9
×
10
-
4%Figure 2
Energy spectrum of the POD modes.Relative deviations along with time, using more POD modes, are shown in Figure3. With the increasing number of POD modes, the deviation converges rapidly when more than top 10 modes are used. The maximum deviation decreases greatly from 13.06% at the top 7 modes to 6.39% at the top 10 modes. After the top 10 modes, the decrease of the maximum deviation becomes much slower (5.31% for the top 20 modes, 5.25% for the top 30 modes, and 5.21% for the top 40 modes). The minimum deviations are all small. Thus, it can be considered that the reconstruction results converge at the number of top 20 modes. However, the computational time of the POD model is increasing with increasing number of POD modes, causing the acceleration ratio to be largely influenced (Table 3). The largest drop of the acceleration ratio occurs between the top 10 modes and top 20 modes. More POD modes cause the dimension of the POD model to increase much faster so that the computation of a larger equation system consumes much more time. Therefore, the optimal number of POD modes needs a balance between the precision and the acceleration. Between the top 10 modes and top 20 modes, the precision is promoted a little (ε from 6.39% to 5.31%) but the acceleration ratio of the POD model decreases from 24 for the top 10 modes to 6.6 for the top 20 modes, so that the number of the top 10 modes is an appropriate optimal number of POD modes. From the comparison, it should be noted that the theoretical energy criterion is not enough to determine the optimal number of POD modes. The balance of precision and acceleration should be considered. This will include much more POD modes with very small energy contribution, but their actual contributions to precision are important.Table 3
Computational time using top 7~top 40 modes.
POD modes
Top 7
Top 10
Top 20
Top 30
Top 40
CPU time of POD
15 s
23 s
85 s
246 s
420 s
r
37
24
6.6
2.2
1.3
Note. The computational time of FDM is 560 s.Figure 3
Reconstruction deviations using different numbers of POD modes.It can also be seen from Figure3 that the maximum deviation (6.39%) and the minimum deviation (1.63×10-3%) occur at about 0.8 days and about 22 days when the top 10 modes are used in the POD model. The velocity field and pressure field obtained by the POD model are compared with those obtained by FDM to examine the reconstruction precision of local characteristics. From Figure 4, it is clear that the two components of Darcy velocity and pressure are all reconstructed well with tiny local deviation. From Figure 5, reconstructed velocity component v and reconstructed pressure agree well with those of FDM, but reconstructed velocity component u can only capture part of the features. Fortunately, this maximum deviation only exists in a very narrow range in Figure 3. The deviation at other moments decreases rapidly. We examine the local flow field at the mean deviation (3.54%) in Figure 6 and find that the local distributions of u, v, and p are well reconstructed. Thus, the POD model using the top 10 POD modes can reconstruct the flow field in high precision for the whole transient process.Figure 4
Flow field comparison for the minimum deviation. Black line: FDM; red dashed line: POD.
(a)
u
(b)
v
(c)
pFigure 5
Flow field comparison for the maximum deviation. Black line: FDM; red dashed line: POD.
(a)
u
(b)
v
(c)
pFigure 6
Flow field comparison for the mean deviation. Black line: FDM; red dashed line: POD.
(a)
u
(b)
v
(c)
p


### 3.2. POD Results for Real Gas

For real gas, compressibility factor (Z) and compressibility (cg) should be computed by the equation of state (see (4)) and the equation of real gas compressibility (see (7)). POD results for the same case in Section 3.1 are obtained by solving (34). The reconstruction precision (ε=2.78×10-3%~6.39%) is as high as that of ideal gas (Figure 3). Flow field comparisons are also very similar to those in Figures 4–6. Thus, these results are not redundantly shown here. The above POD model maintains high precision for real gas simulation.However, the acceleration ratio is as low as 0.9 (i.e., 6240 s/7256 s in Table4), which means the POD model causes the simulation to be even slower than FDM. This is quite different from the high acceleration ratio for ideal gas (r=24 in Table 3). The main difference between the computations of real gas and ideal gas is that the equation of state (EOS) should be computed for real gas. We analyze the different contributions of the total computational time for FDM and POD in Table 4 and find two important phenomena: (1) the largest part of the total computational time is mainly consumed on EOS for both FDM and POD (92% for FDM and 78% for POD); the EOS cannot be expressed as an explicit function of pressure so that it cannot be decomposed by the POD; it can only be calculated locally for both FDM and POD and thus the main computational time of real gas simulation is not reduced in the POD model; (2) the computational time for flow equations in POD (1596 s) is much longer than that in FDM (493 s) with much higher contribution (22%) than that of FDM (8%). This means the POD model is still slower than FDM even not considering the computational time of EOS. This can be explained using the expression of the POD model. In the model (see (34)), all terms are constant for time advancement except the projection of the unsteady term (see (31)) and the projection of the source term (see (33)). They should be calculated in every time step because they contain the variables changing with time (cg, p, and Z). This kind of calculation largely increases the total computations.Table 4
Computational time analyses in the case of real gas.
Total CPU time
CPU time for EOS
CPU time for flow equations
Time contribution of EOS
Time contribution of flow equation
FDM
6240 s
5747 s
493 s
92%
8%
POD
7256 s
5660 s
1596 s
78%
22%The above analyses indicate that the improvement of the acceleration ability of the POD model should reduce the time contribution of EOS and avoid the frequent computations of the two projection terms in the POD computation. According to these two points, we propose a new method: EOS is only calculated once at the initial time. Then, the initial compressibility, the initial compressibility factor, and the initial pressure are used to approximate the two projection terms in (31) and (33), which are treated as constants in the following transient computation of the POD model. Through this treatment, the calculations of EOS and the two projection terms in every time step are all avoided for the POD computation so that the computational time of the POD model is expected to be reduced greatly. The approximations of the two projection terms are shown as follows:(38)HUm,n=∑j=1ny∑i=1nxcg0p0φmφni,jΔxΔy,HSm=∑j=1ny∑i=1nxφmZ0qi,jΔxΔy,where cg0, Z0, and p0 are the compressibility, the compressibility factor, and the pressure in the initial condition (t=0), respectively.Figure7 shows that the relative deviation of the above treatment is almost the same as that updating the compressibility every time step, indicating that this treatment does not affect the precision of the POD model. Table 5 shows that the total computational time of the POD model has been largely reduced because the computational time of EOS and flow equations are all reduced greatly. The time decrease of EOS is because the EOS is only calculated once. The time decrease of flow equations is because the two projection terms are not calculated with time advancement of the POD model. These results demonstrate that large acceleration ratio (r=6240s/23s=271) of POD for real gas simulation can only be achieved when the time contribution of EOS is greatly reduced.Table 5
Computational time for real gas after improvement.
Total CPU time
CPU time for EOS
CPU time for flow equations
Time contribution of EOS
Time contribution of flow equation
FDM
6240 s
5747 s
493 s
92%
8%
POD
23 s
0.02 s
22.98 s
0.09%
99.91%Figure 7
Precision of the POD model for different treatment of compressibility.


### 3.3. Verification of the Improved POD Model in a More Realistic Case

The improved POD model in the above section is applied to a more complex case of real gas flow simulation to confirm its capability. Permeability field is shown in Figure8, where the red area has a permeability 100 md and the blue area has a permeability 1 md. The large permeability represents the main flow path of the gas in the reservoir such as soil or sand. The small permeability represents the main obstacles such as rock. Higher boundary pressure on the left border (100 atm) is used because gas pressure is usually high in engineering. Other parameters are the same as the previous case.Figure 8
Real gas flow in a more realistic reservoir.As shown in Figure9, the relative deviations are also as low as the previous case. The maximum and minimum deviations are 6.65% and 0.13%, respectively, indicating high precision of the improved POD model. It is further confirmed in Figures 10 and 11 that the local flow fields are reconstructed well at the maximum and minimum deviations. A little larger deviation of pressure in Figure 10(c) may be caused by the approximation of gas compressibility. However, the main features of the pressure field are correct while the velocity field has much smaller deviation. Thus, the precision is acceptable.Figure 9
Precision of the improved POD model.Figure 10
Flow field comparison at the maximum deviation for real gas. Black line: FDM; red dashed line: POD.
(a)
u
(b)
v
(c)
pFigure 11
Flow field comparison at the minimum deviation for real gas. Black line: FDM; red dashed line: POD.
(a)
u
(b)
v
(c)
pTable6 shows that the computational time is reduced from 5823 s for FDM to 25 s for POD. The acceleration ratio is as high as 233. Therefore, the improved POD model can still greatly save computational time for more complex reservoir and higher pressure.Table 6
Computational time comparison for real gas.
CPU time of FDM
CPU time of POD
r
5823 s
25 s
233


## 3.1. POD Results for Ideal Gas

First of all, the POD model is examined in the case of ideal gas (Z≡1), where a and b in the Van der Waals equation (see (4)) are all zero. Thus, the expression of the gas compressibility (see (7)) decays to cg=1/p so that (31) and (33) can be simplified as(37)HUm,n=∑j=1ny∑i=1nxφmφni,jΔxΔy,HSm=∑j=1ny∑i=1nxφmqi,jΔxΔy.As shown in Figure2, the first POD mode occupies the vast majority (96.86%) of the total energy. This indicates that the first mode captures the main characteristics of the whole transient process. However, the relative deviation of the reconstruction results largely fluctuates with time. The maximum deviation is as high as 210% while the minimum deviation is only 4.6×10-2% (Table 2). This phenomenon indicates that a dominant mode occupying the vast majority of energy can only obtain high-accurate reconstruction at some moments but loses the fidelity at other moments. To promote the reconstruction precision of the whole transient process, more POD modes should be included. To ensure high acceleration of the reduced-order model, the inclusion of the POD modes should be as little as possible. Thus, there is an optimal truncation number of modes. Theoretically, the number of the POD modes can be usually determined when the cumulative energy contribution achieves 100%. As shown in Figure 2, the cumulative energy contribution ζn achieves 100% at and after the 7th POD mode. Although the maximum deviation decreases rapidly with increasing number of POD modes, the maximum deviation is still as high as 13% when the top 7 modes are used. Therefore, more modes should be considered in the reduced-order model.Table 2
Reconstruction deviations using top 1~top 7 modes.
POD modes
Top 1
Top 2
Top 3
Top 4
Top 5
Top 6
Top 7
ε
m
a
x
210%
84%
46%
29%
27%
12%
13%
ε
m
i
n
4.6
×
10
-
2%
4.3
×
10
-
3%
2.4
×
10
-
3%
1.9
×
10
-
4%
5.7
×
10
-
3%
4.7
×
10
-
3%
6.9
×
10
-
4%Figure 2
Energy spectrum of the POD modes.Relative deviations along with time, using more POD modes, are shown in Figure3. With the increasing number of POD modes, the deviation converges rapidly when more than top 10 modes are used. The maximum deviation decreases greatly from 13.06% at the top 7 modes to 6.39% at the top 10 modes. After the top 10 modes, the decrease of the maximum deviation becomes much slower (5.31% for the top 20 modes, 5.25% for the top 30 modes, and 5.21% for the top 40 modes). The minimum deviations are all small. Thus, it can be considered that the reconstruction results converge at the number of top 20 modes. However, the computational time of the POD model is increasing with increasing number of POD modes, causing the acceleration ratio to be largely influenced (Table 3). The largest drop of the acceleration ratio occurs between the top 10 modes and top 20 modes. More POD modes cause the dimension of the POD model to increase much faster so that the computation of a larger equation system consumes much more time. Therefore, the optimal number of POD modes needs a balance between the precision and the acceleration. Between the top 10 modes and top 20 modes, the precision is promoted a little (ε from 6.39% to 5.31%) but the acceleration ratio of the POD model decreases from 24 for the top 10 modes to 6.6 for the top 20 modes, so that the number of the top 10 modes is an appropriate optimal number of POD modes. From the comparison, it should be noted that the theoretical energy criterion is not enough to determine the optimal number of POD modes. The balance of precision and acceleration should be considered. This will include much more POD modes with very small energy contribution, but their actual contributions to precision are important.Table 3
Computational time using top 7~top 40 modes.
POD modes
Top 7
Top 10
Top 20
Top 30
Top 40
CPU time of POD
15 s
23 s
85 s
246 s
420 s
r
37
24
6.6
2.2
1.3
Note. The computational time of FDM is 560 s.Figure 3
Reconstruction deviations using different numbers of POD modes.It can also be seen from Figure3 that the maximum deviation (6.39%) and the minimum deviation (1.63×10-3%) occur at about 0.8 days and about 22 days when the top 10 modes are used in the POD model. The velocity field and pressure field obtained by the POD model are compared with those obtained by FDM to examine the reconstruction precision of local characteristics. From Figure 4, it is clear that the two components of Darcy velocity and pressure are all reconstructed well with tiny local deviation. From Figure 5, reconstructed velocity component v and reconstructed pressure agree well with those of FDM, but reconstructed velocity component u can only capture part of the features. Fortunately, this maximum deviation only exists in a very narrow range in Figure 3. The deviation at other moments decreases rapidly. We examine the local flow field at the mean deviation (3.54%) in Figure 6 and find that the local distributions of u, v, and p are well reconstructed. Thus, the POD model using the top 10 POD modes can reconstruct the flow field in high precision for the whole transient process.Figure 4
Flow field comparison for the minimum deviation. Black line: FDM; red dashed line: POD.
(a)
u
(b)
v
(c)
pFigure 5
Flow field comparison for the maximum deviation. Black line: FDM; red dashed line: POD.
(a)
u
(b)
v
(c)
pFigure 6
Flow field comparison for the mean deviation. Black line: FDM; red dashed line: POD.
(a)
u
(b)
v
(c)
p


## 3.2. POD Results for Real Gas

For real gas, compressibility factor (Z) and compressibility (cg) should be computed by the equation of state (see (4)) and the equation of real gas compressibility (see (7)). POD results for the same case in Section 3.1 are obtained by solving (34). The reconstruction precision (ε=2.78×10-3%~6.39%) is as high as that of ideal gas (Figure 3). Flow field comparisons are also very similar to those in Figures 4–6. Thus, these results are not redundantly shown here. The above POD model maintains high precision for real gas simulation.However, the acceleration ratio is as low as 0.9 (i.e., 6240 s/7256 s in Table4), which means the POD model causes the simulation to be even slower than FDM. This is quite different from the high acceleration ratio for ideal gas (r=24 in Table 3). The main difference between the computations of real gas and ideal gas is that the equation of state (EOS) should be computed for real gas. We analyze the different contributions of the total computational time for FDM and POD in Table 4 and find two important phenomena: (1) the largest part of the total computational time is mainly consumed on EOS for both FDM and POD (92% for FDM and 78% for POD); the EOS cannot be expressed as an explicit function of pressure so that it cannot be decomposed by the POD; it can only be calculated locally for both FDM and POD and thus the main computational time of real gas simulation is not reduced in the POD model; (2) the computational time for flow equations in POD (1596 s) is much longer than that in FDM (493 s) with much higher contribution (22%) than that of FDM (8%). This means the POD model is still slower than FDM even not considering the computational time of EOS. This can be explained using the expression of the POD model. In the model (see (34)), all terms are constant for time advancement except the projection of the unsteady term (see (31)) and the projection of the source term (see (33)). They should be calculated in every time step because they contain the variables changing with time (cg, p, and Z). This kind of calculation largely increases the total computations.Table 4
Computational time analyses in the case of real gas.
Total CPU time
CPU time for EOS
CPU time for flow equations
Time contribution of EOS
Time contribution of flow equation
FDM
6240 s
5747 s
493 s
92%
8%
POD
7256 s
5660 s
1596 s
78%
22%The above analyses indicate that the improvement of the acceleration ability of the POD model should reduce the time contribution of EOS and avoid the frequent computations of the two projection terms in the POD computation. According to these two points, we propose a new method: EOS is only calculated once at the initial time. Then, the initial compressibility, the initial compressibility factor, and the initial pressure are used to approximate the two projection terms in (31) and (33), which are treated as constants in the following transient computation of the POD model. Through this treatment, the calculations of EOS and the two projection terms in every time step are all avoided for the POD computation so that the computational time of the POD model is expected to be reduced greatly. The approximations of the two projection terms are shown as follows:(38)HUm,n=∑j=1ny∑i=1nxcg0p0φmφni,jΔxΔy,HSm=∑j=1ny∑i=1nxφmZ0qi,jΔxΔy,where cg0, Z0, and p0 are the compressibility, the compressibility factor, and the pressure in the initial condition (t=0), respectively.Figure7 shows that the relative deviation of the above treatment is almost the same as that updating the compressibility every time step, indicating that this treatment does not affect the precision of the POD model. Table 5 shows that the total computational time of the POD model has been largely reduced because the computational time of EOS and flow equations are all reduced greatly. The time decrease of EOS is because the EOS is only calculated once. The time decrease of flow equations is because the two projection terms are not calculated with time advancement of the POD model. These results demonstrate that large acceleration ratio (r=6240s/23s=271) of POD for real gas simulation can only be achieved when the time contribution of EOS is greatly reduced.Table 5
Computational time for real gas after improvement.
Total CPU time
CPU time for EOS
CPU time for flow equations
Time contribution of EOS
Time contribution of flow equation
FDM
6240 s
5747 s
493 s
92%
8%
POD
23 s
0.02 s
22.98 s
0.09%
99.91%Figure 7
Precision of the POD model for different treatment of compressibility.


## 3.3. Verification of the Improved POD Model in a More Realistic Case

The improved POD model in the above section is applied to a more complex case of real gas flow simulation to confirm its capability. Permeability field is shown in Figure8, where the red area has a permeability 100 md and the blue area has a permeability 1 md. The large permeability represents the main flow path of the gas in the reservoir such as soil or sand. The small permeability represents the main obstacles such as rock. Higher boundary pressure on the left border (100 atm) is used because gas pressure is usually high in engineering. Other parameters are the same as the previous case.Figure 8
Real gas flow in a more realistic reservoir.As shown in Figure9, the relative deviations are also as low as the previous case. The maximum and minimum deviations are 6.65% and 0.13%, respectively, indicating high precision of the improved POD model. It is further confirmed in Figures 10 and 11 that the local flow fields are reconstructed well at the maximum and minimum deviations. A little larger deviation of pressure in Figure 10(c) may be caused by the approximation of gas compressibility. However, the main features of the pressure field are correct while the velocity field has much smaller deviation. Thus, the precision is acceptable.Figure 9
Precision of the improved POD model.Figure 10
Flow field comparison at the maximum deviation for real gas. Black line: FDM; red dashed line: POD.
(a)
u
(b)
v
(c)
pFigure 11
Flow field comparison at the minimum deviation for real gas. Black line: FDM; red dashed line: POD.
(a)
u
(b)
v
(c)
pTable6 shows that the computational time is reduced from 5823 s for FDM to 25 s for POD. The acceleration ratio is as high as 233. Therefore, the improved POD model can still greatly save computational time for more complex reservoir and higher pressure.Table 6
Computational time comparison for real gas.
CPU time of FDM
CPU time of POD
r
5823 s
25 s
233


## 4. Conclusions

Proper orthogonal decomposition is utilized in gas reservoir simulation to accelerate the simulation speed of gas flow in single-continuum porous media. High-precision reconstruction can be achieved using only 10 POD modes with the deviations as low as1.63×10-3%~6.39% for ideal gas and 1.95×10-3%~6.55% for real gas. The acceleration ratio is as high as 24 for the typical POD model of the ideal gas flow. However, the computational speed of the typical POD model of the real gas flow is even slower than FDM. Two key points for improving the computational speed of the POD model are discussed and verified:(1)
The computation of EOS should be avoided in the solving process of the POD model because the total computational time is dominated by EOS.(2)
POD projection terms containing compressibility of gas should not be updated in every time step. Otherwise, the computational time of flow equations will also be longer than FDM.According to the two points, we proposed a new method to approximate the projection terms in all time steps using the initial compressibility so that EOS only needs to be calculated once at the initial condition. After this treatment, it is verified in two different cases that the computational speed of the POD model is largely promoted while high precision is retained (0.13%~6.65%). The computational time of the real gas reservoir simulation is reduced from 6240 s and 5823 s of FDM to 23 s and 25 s of POD for the two cases. The acceleration ratios are 271 and 233, respectively.



---

*Source: 8482352-2018-01-03.xml*