Online mixed multiscale finite element method with oversampling and

0 downloads 0 Views 2MB Size Report
Jul 2, 2018 - both steady-state flow, and two-phase flow and transport problems. .... next section, including the definition of coarse and fine grids, the ...
arXiv:1807.00710v1 [math.NA] 2 Jul 2018

Online mixed multiscale finite element method with oversampling and its applications Yanfang Yang1 , Shubin Fu

∗2

, and Eric T. Chung2

1

School of Mathematics and Information Science, Guangzhou University, Guangzhou, People’s Republic of China 2 Department of Mathematics, The Chinese University of Hong Kong, Hong Kong SAR July 3, 2018

Abstract In this paper, we consider an online basis enrichment mixed generalized multiscale method with oversampling, for solving flow problems in highly heterogeneous porous media. This is an extension of the online mixed generalized multiscale method [6]. The multiscale online basis functions are computed by solving a Neumann problem in an over-sampled domain, instead of a standard neighborhood of a coarse face. We are motivated by the restricted domain decomposition method. Extensive numerical experiments are presented to demonstrate the performance of our methods for both steady-state flow, and two-phase flow and transport problems.

keywords: multiscale; mixed finite element; oversampling; heterogeneous media.

1

Introduction

In many scientific and engineering applications, multiple scales and high contrast are common features. For instance, in gas and oil production, the reservoir properties, such as the permeability, can be detailed at multiple scales, varying from inches to miles. Many model reduction techniques, such as upscaling and multiscale methods, are developed for the solution of such kind of problems. These model reduction approaches aim to reduce the degrees of freedom and solve the problem on a coarse grid. For example, in upscaling methods [12, 24], one averages the media properties based by some rules and then solve problems on a coarse grid. In multiscale methods [16, 18, 3, 8, 7, 22, 23, 4, 25], one still solves the problems on a coarse grid, with precomputed multiscale basis functions that are constructed locally on the fine grid and carry the multiscale information of the media. In this paper, we introduce an oversampled enrichment algorithm in the framework of generalized multiscale finite element method (GMsFEM) in solving flow problems in the mixed formulation in heterogeneous media. We first compute a coarse grid solution with offline basis functions which are formed by following the GMsFEM. Then we iteratively compute basis functions using residuals from the previous solution in the online stage, thus we call it an online method. The method in this paper is an extension of the online mixed generalized multiscale method [6]. Here we employ the oversampling technique for the computation of the online basis functions, and study the application of this method for practical two phase simulation problems. We follow a mixed finite element framework of the flow problem. An important motivation of using mixed methods is to ensure mass conservation, which is essential for flow problems. The main idea of ∗ Corresponding

Author

1

mixed multiscale finite element method is to construct multiscale basis functions for each coarse face supported in the neighborhood of this face. Mixed GMsFEM is a generalization of the classical mixed multiscale finite element method [1, 7]. In the classical method, only one basis function per coarse face is used to capture the multiscale features of the media. However, it is shown [13, 14] that for some cases such as non-separable scales and long channels, one basis function per coarse face is not sufficient to capture all the features. For this sake, GMsFEM [8] is proposed which allows more basis functions per coarse face. The computation of basis functions in mixed GMsFEM consists of offline and online stages. In the offline stage, offline basis functions are formed by solving a series of local spectral problems. These functions carry the multiscale features and they can be reused for other input parameters to solve the equation. In the online stage, online basis functions are constructed based on the parameters. However, as pointed out in [9, 6, 10], there are multiscale problems in which an offline process fails to yield an accurate representations of solutions. The reason for this is that offline computations are carried out locally. Therefore, various basis enrichment approaches are developed. In [11], an adaptive algorithm is proposed to enrich the solution space by adding basis functions which are precomputed in the offline stage. In [9], adaptive methods in the continuous Galerkin framework, using the residuals of the previous solutions to form new online basis functions are discussed. Results show that these methods accelerate the convergence rate of GMsFEM significantly. Based on the idea of using residuals, there are also related approaches developed for the discontinuous Galerkin formulation in [10] and mixed formulation in [6], where an online adaptive method to enrich the solution space is proposed. This online adaptive method forms new basis functions by projecting the previous solution on the space of divergence free functions. In this paper, we follow the idea of paper [6], except that we use an oversampling technique in the computation of the online basis functions to further accelerate the convergence rate. Oversampling is introduced for multiscale finite element methods in [21], and it is proven that oversampling can improve the accuracy of multiscale methods. Oversampling is introduced in the context of GMsFEM in [15], where oversampling is used in the offline stage to compute the snapshot and offline spaces. Other methods such as mixed GMsFEM and mixed mortar GMsFEM involving oversampling for offline computation can be found in [8, 25]. In this paper, we discuss the use of oversampling for online basis computation. This is motivated by the restricted domain decomposition method presented in [5], where the local preconditioners are obtained by utilizing larger domain than standard domain to perform computation and then taking restriction onto standard domain. In this way, one can achieve faster convergence. For our online basis enrichment method with oversampling, a set of non-overlapping subdomains is selected. New basis functions are constructed on each of these subdomains. In particular, we solve a residual problem on an oversampled domain covering an coarse face. Then we restrict the normal trace of the solution to the coarse face. The new basis function is obtained by solving a Neumann problem with the normal trace as boundary condition for the coarse face on this coarse faces’s neighborhood. We show numerical experiments for various heterogeneous permeability fields. We compare online enrichment without oversampling and online enrichment with oversampling and show that online with oversampling has much faster convergence. We study both high and low conductivity inclusions and channels in the domain. It is shown that we can get the same convergence rate for different order of high contrast orders. We also consider a 3D two-phase flow and transport problem with permeability field from the last 50 layers of the SPE10 benchmark model [2]. We demonstrate that by adding a few online basis functions for the initial problem, without updating solution space as time advancing, we can get accurate results. The rest of the paper is organized as follows. The basic idea of mixed GMsFEM is presented in the next section, including the definition of coarse and fine grids, the construction of the snapshot space and the offline space. In section 3 we introduce the online basis enrichment method with oversampling. Extensive numerical results are given in section 4. We conclude the paper in section 5.

2

2

Preliminaries

We consider the following system of flow problem in a mixed formulation: κ−1 v + ∇p = 0 in D, div(v) = f

in D,

(1)

with the homogeneous Neumann boundary condition v · n = 0 on ∂D, where κ is a high-contrast permeability field, D ⊂ Rd (d = 2, 3) is the computational domain and n is the unit outward normal vector of the boundary of D. The basic idea of Generalized multiscale finite element method(GMsFEM) is to construct multiscale basis functions on a local coarse region. To present our method, we first introduce fine and coarse grids. Let TH be a partition of D into coarse blocks Ki with diameter Hi so that D = ∪N i=1 K i , where N is the number of coarse blocks. TH is called the coarse grid, on which our coarse grid discretization will be defined. We call EH a coarse face of the coarse element Ki if EH = ∂Ki ∩ ∂Kj or EH = ∂Ki ∩ ∂D. Let EH (Ki ) be the set of all coarse faces on the boundary of the coarse block Ki and EH = ∪N i=1 EH (Ki ) be the set of all coarse faces. For our mixed GMsFEM, the basis functions are constructed on ωi , which are the two coarse elements that share a common face, i.e., ωi = ∪{K ∈ TH : Ei ∈ ∂K}, i = 1, 2, · · · , Ne , where Ne is the number of coarse faces. We also define an over-sampled domain of a coarse face Ei as ωi+ . Note that ωi+ is not necessarily a union of coarse blocks. We further partition each coarse block Ki using a finer mesh Th (Ki ) with mesh size hi . Let Th = ∪N i=1 Th (Ki ) be the union of all these partitions, which is a fine mesh partition of the domain D. We use h = max1≤i≤n hi to denote the mesh size of Th . In addition, we let Eh (Ki ) be the set of all faces of the partition Th (Ki ) and Eh0 (Ki ) be the set of all interior faces of the partition Th (Ki ) and let Eh = ∪N i=1 Eh (Ki ) be the set of all faces in the partition Th . Figure 1 gives an illustration of the constructions of the two grids for the case of 2D. The black lines represent the coarse grid, and the gray lines represent the fine grid. For each coarse face Ei , we define a coarse neighborhood ωi as the union of all coarse blocks having the face Ei . Figure 1 shows a coarse neighborhood ωi in the blue color. The oversampled neighborhood + + + + ωi+ (yellow region in Figure 1) is the joint of two subdomains ωi,1 and ωi,2 such that Ei+ = ∂ωi,1 ∩ ∂ωi,2 . + Ei is the union of fine faces that covers a coarse face Ei .

+ ωi,1 + ωi,2

Ki1

Ki2

Ei: coarse edge (red)

ωi: Coarse neighborhood (blue) ωi+: Oversampling region (orange)

Figure 1: Illustration of a coarse edge Ei , and its coarse neighborhood ωi , oversampling neighborhood ωi+ . 3

We let Vh × Qh be the standard lowest-order Raviart-Thomas space for the approximation of (1) on the fine grid Th . Then, the fine-grid solution (vh , ph ) satisfies Z Z κ−1 vh · w − div(w)ph = 0, ∀w ∈ Vh0 , D D Z Z (2) div(vh )q = f q, ∀q ∈ Qh . D

D

Vh0

where vh · n = 0 on ∂D and = Vh ∩ {v ∈ Vh : v · n = 0 on ∂D}. The above system can be written in terms of matrix representations as      vhr 0 Ah BhT = (3) phr Fh Bh 0 where vhr and phr are vectors of coefficients in the expansions of the solutions vh , ph in the space Vh and Qh . We will use the fine-grid solution (vh , ph ) as the reference solution, and we will compare the accuracy of the multiscale solution (vH , pH ) ∈ (VH , QH ) against the fine-grid solution. Here VH , QH are multiscale solution spaces for the pressure p and the velocity v in Equation (1). Next we give the definition of VH , QH . First QH consists of functions which are constant on each coarse grid block. The construction of the space VH follows the framework of the mixed GMsFEM. Generally, it has two steps. First, we construct a snapshot space Vsnap consisting of an extensive set of functions which are able to approximate the solution j i v. To construct the snapshot space, we construct a set of snapshot functions {ψsnap,i }N j=1 supported in j i i the coarse grid neighborhood ωi . We define the local snapshot space for ωi as Vsnap = span({ψsnap,i }N j=1 ). i We call the span of all the local snapshot functions as the snapshot space Vsnap = ⊕Ei ∈EH Vsnap . The second step is to construct an offline space VH by reducing the large snapshot space to a smaller one. With the pressure space QH and the velocity space VH , the mixed GMsFEM is to find vH ∈ VH and pH ∈ QH such that Z Z κ−1 vH · w − div(w)pH = 0, ∀w ∈ VH0 , D ZD Z (4) div(vH )q = f q, ∀q ∈ QH , D

D

VH0

= VH ∩ {v ∈ VH : v · n = 0 on ∂D}. The matrix form of the above with where vH · n = 0 on ∂D and coarse system is  T     0 R Ah R RT BhT GH vHr = (5) pHr GTH Fh GTH Bh R 0 where R stores all the multiscale basis functions, GH is the restriction operator from QH into Qh . vHr and pHr are vectors of coefficients in the expansions of the solutions vH , pH in the space VH and QH . In the following sections, we present the construction of the snapshot space Vsnap and the offline space VH in detail.

2.1

Snapshot space

In this section, we discuss the construction of the snapshot space Vsnap which consists of basis functions up to the resolution of the fine grid faces on the coarse grid faces. We construct the local snapshot i spaces Vsnap by solving a set of local problems on each coarse neighborhood ωi , and then define the global i snapshot space Vsnap = ⊕Ei ∈EH Vsnap . i Let Ei ∈ EH , which can be written as a union of fine-grid faces, i.e., Ei = ∪Jl=1 el , where Ji is the total number of fine-grid faces on Ei and ei represents a fine-grid face. We solve the following problems κ−1 vli + ∇pil = 0, div(vli )

=

αli ,

4

in ωi , in ωi .

(6)

subject to the homogeneous Neumann boundary condition vli · ni = 0 on ∂ωi . The above problem is solved separately on each coarse-grid block contained in ωi , so that the snapshot basis consists of solutions of local problems with all possible boundary conditions on the face Ei up to the fine-grid resolution. To solve the equation (6) on K ⊂ ωi , an additional boundary condition vli · ni = δli on Ei is used, where δli is defined by ( 1, on el , i δl = l = 1, 2, · · · , Ji , (7) 0, on Ei \el , and ni is a fixed unit-normal for Ei . The constant αli in equation (6) is chosen to satisfy the R i R vector i compatible condition k αl = ∂K vl ·ni . The solutions of the above local problems form the local snapshot i i space Vsnap , from which we get Vsnap = ⊕Ei ∈EH Vsnap . Next, we discuss the derivation of the offline space from Vsnap .

2.2

Offline space

As we mentioned earlier, the snapshot space Vsnap is a large space with dimension comparable to the fine resolution. We will perform a dimension reduction on Vsnap to get a smaller space. This reduced space is called the offline space. The reduction is accomplished by solving a local spectral problem on each coarse i such that grid neighborhood ωi . The local spectral problems is to find real number λ and v ∈ Vsnap i ∀w ∈ Vsnap ,

a(v, w) = λs(v, w),

(8)

i i . Specifically, we × Vsnap where a(·, ·) and s(·, ·) are symmetric positive definite bilinear operators on Vsnap take Z a(v, w) = κ−1 (v · ni )(w · ni ), Ei Z  Z (9) 1 −1 κ v·w+ div(v)div(w) , s(v, w) = H ωi ωi i , and ni is the fixed unit normal vector for Ei . for v, w ∈ Vsnap After solving the spectral problem (8) in ωi , we arrange the eigenvalues in ascending order

λi1 < λi2 · · · < λiJi . Let φi1 , φi2 , · · · , φiJi be the corresponding eigenfunctions. We select the first li eigenfunctions to form the i i i offline space Voff , i.e., Voff = span{φi1 , φi2 , · · · , φili }. The global offline space is Voff = ⊕Ei ∈EH Voff . i i i,1 i,Ji Suppose the matrix form of the local snapshot space Vsnap is Rsnap = [Ψsnap , · · · , Ψsnap ]. If we follow i,+ the same procedure as in Section 2.1 on the domain ωi+ , we can get the snapshot space Vsnap with + basis functions supported on ωi . More specifically, we solve the following problem on the oversampling neighborhood ωi+ κ−1 vli,+ + ∇pi,+ = 0, l div(vli,+ ) = βli ,

in ωi+ , in ωi+ .

(10)

subject to the boundary condition vli,+ · ni = 0,

on ∂ωi+ .

(11)

+ + We solve the problem above on ωi,1 and ωi,2 separately with additional boundary condition vli,+ · ni = δli + + on Ei+ , where Ei+ is the intersection of ωi,1 and ωi,2 , see Figure 1. The constant βli is chosen to guarantee the compatible condition such that the equation (10) is solvable. Then the local oversampled snapshot i,+ i,+ space Vsnap can be formed with the solution of the above local problem. Denote Vbsnap be the divergence

5

i,+ i,+ free subspace of Vsnap . We denote the matrix form of the oversampled local snapshot space Vsnap as i,+ i,+ + + i,+ Rsnap = [Ψsnap,1 , · · · , Ψsnap,J + ], where Ji is the number of fine-grid faces on Ei . i In the next section, we will give the construction of a residual driven online space VH with the oversampling techniques.

3

Oversampling online iterative algorithm

In this section, we discuss an enrichment algorithm for the velocity space which constructs new basis functions based on the solution of the previous enrichment level. These new basis functions are formed in the online computation stage, therefore we call them online basis. With the enrichment of the online basis functions, we can achieve a fast convergence. The novelty of this paper is that we construct the online basis by using an oversampling approach. For each region Ω ⊆ D, we denote VΩ as the space of functions in Vsnap which are supported in Ω, i.e., i VΩ = ⊕ωi ⊆Ω Vsnap . Let VbΩ be the divergence free subspace of VΩ . Then we define the linear functional RΩ on VΩ by Z Z RΩ (v) = κ−1 vH · v − div(v)pH , ∀v ∈ VΩ . Ω



We note that if we restrict RΩ on VbΩ , then Z RΩ (v) =

κ−1 vH · v,

∀v ∈ VbΩ .



Online iterative algorithm with oversampling: We start with iteration number l = 0. VH0 is taken to be the offline space Voff defined in Section 2.2. l Step 1: Find the multiscale solution in the current spaces VHl and QH . That is to find vH ∈ VHl and l pH ∈ QH satisfying Z Z l κ−1 vH ·w− div(w)plH = 0, ∀w ∈ VHl , D ZD Z (12) l div(vH )q = f q, ∀q ∈ QH . D

D

Step 2: For each coarse face Ei , we select an oversampled coarse neighborhood ωi+ (see Figure 2 for illustration). We repeat the selection for coarse faces E1 , E2 , · · · EI . Then we obtain [ oversampled neighborhoods ω1+ , ω2+ , · · · , ωI+ ⊆ D. The index {1, 2, ..., I} can be chosen such that ωi (not ωi+ ) i=1,··· ,I

form a non-overlapping partition of D. b i,+ Step 3: For each ωi+ , we solve for φ+ i ∈ Vsnap such that Z κ−1 φ+ i · v = Rω + (v) ωi+

i

i,+ ∀v ∈ Vbsnap

(13)

l We note that we need to project the vH and plH into the fine-grid spaces Vh and Qh , respectively, in order to compute Rω+ (v). i

+ Step 4: We take the restriction of φ+ i · ni on the coarse face Ei and normalize it, and we denote it by λi . Step 5: The online basis χi for the coarse neighborhood ωi can be constructed by solving

κ−1 χi + ∇pi = 0 in ωi , div(χi ) = αi

in ωi ,

χi · ni = λi

on Ei ,

χi · ni = 0 on ∂ωi , 6

(14)

R R where αi is chosen to satisfy the condition K αi = ∂K vi · ni for every K ⊆ ωi , ni is a fixed unit-normal vector for the coarse face Ei . Those {χi }Ii=1 are the new online basis functions. We update the velocity space by letting VHl+1 = VHl ⊕ span{χ1 , χ2 , · · · , χI }. After Step 5, we repeat from Step 1 until we have certain number of basis functions or some predefined error indicator is small. Next we present the construction of a local online basis function for coarse face Ei in matrix formulation at level l. We define Rl = [Ψl1 , Ψl2 , · · · , ΨlN l ] + + l l where {Ψli }N i=1 are the functions in space VH . We also define a Ji × (Ji − 1) matrix   1 0 0 0 ... 0 −1 1 0 0 . . . 0    .. .. .. .. ..  . .  . . . . . .  Pi+ =   ..   0 0 −1 1 0 .    0 0 . . . −1 1 0 0 0 0 . . . −1 1 i,+ i,+ . We remark that the definition of Pi+ of Vsnap This matrix is to find the divergence free subspace Vbsnap is not unique. Then the online basis construction algorithm in matrix formulation is as follows: Step 1: Solve the coarse system    l   0 (Rl )T Ah Rl (Rl )T BhT GH vHr (15) = GTH Fh 0 plHr GTH Bh Rl l where vHr and plHr are vectors of coefficients in the expansions of the solutions vH , pH in the space VHl h,l l l . = Rl vHr is defined in space VHl , we can project it into space vh by computing vHr and QH . Note vH h,l l l We also need to compute the projection of pH in space Ph by using pHr = GH pHr .  h,l Step 2: Compute the all local residuals ri+ by ri+ = Fh − Ah vHr − BhT ph,l Hr |ωi+ . Step 3: Solve the residual Equation (13), that is to solve   i,+ + T i,+ + i,+ T + (Pi ) Asnap Pi vhr = (Pi+ )T (Rsnap ) ri i,+ T i,+ i,+ where Ai,+ snap = (Rsnap ) Ah Rsnap , which can be precomputed before online iterations and saved. The i,+ + dimension of this matrix is Ji+ × Ji+ . Note that vhr · n+ i lies on Ei , take the restriction of it on Ei and normalize it, then we get λi in the system (14). i i Step 4: We can compute the online basis χi by χi = Rsnap λi if Rsnap is precomputed. If not, one can use the lowest-order Raviart-Thomas finite element method to solve the system (14) to get the online basis for ωi .

d11

d11 d12 d22

Ei

ωi+

H

Ei

d22

d12

ωi+

d21

H

d21

Figure 2: Illustration of an oversampled neighborhood associated with the coarse edge Ei . 7

4

Numerical examples

In this section, we present several representative examples to show the performance of our oversampled online method. In all simulations reported below, the computational domain is D = (0, 1)d . The finegrid solution is used as the reference solution in all numerical examples. We use the preprocessing steps introduced in [20] for coarse-grid problem to remove the effects of singular source used in practical flow simulations. We consider three models with permeability κ depicted in Figure 3. We note that for model 1, κ = 0.1 in the blue region and 103 in the red region. As it is shown, model 3 contains high contrast, long channels, and isolated inclusions, we set the value in the blank region equals 1 and the red region equals k0 . Model (b) contains the last 50 layers of the SPE10 model [2]. The fine grid mesh for this model is 220 × 60 × 50. The SPE 10 model is used as a benchmark to test different upscaling techniques and multiscale methods, and is therefore a good test case for our methodology. For all simulations presented below, we divide the computational domain D into Nx × Ny (Nx × Ny × Nz in 3D) coarse blocks, and in each coarse block, we further generate a uniform n × n (n × n × n) fine scale square elements. We define the following weighted velocity error to quantify the accuracy of the online multiscale solution ev :=

kv ms − v f kκ,D kv f kκ,D

R where kvk2κ,D = D κ−1 v 2 . We test our method for both elliptic problem and two-phase flow simulation. First, we show the results for the elliptic problem in Section 4.1.

8

0

1000

0.1

900

0.2

800

0.3

700

0.4

600

0.5

500

0.6

400

0.7

300

0.8

200

0.9

100

1

0

0.2

0.4

0.6

0.8

1

(a) model 1: κ1

(b) model 2: κ2 in log10 scale

(c) model 3: κ3

Figure 3: Three permeability fields in the numerical examples. 9

0

0 102

102

4

10 106

-1

-1

-2

Relative error (in log 10) for u

Relative error (in log 10) for u

-2

-3

-4

-5

-6

-3

-4

-5

-6

-7

-7

-8

-9

104 106

2

4

6

-8

8

Number of basis (including 1 offline basis)

2

4

6

8

Number of basis (including 2 offline basis)

Figure 4: Relative weighted velocity error with k0 = 102 , 104 , 106 , model 3.

0

0 10-2

10-2

-4

10 10-6

-1

-1

-2

Relative error (in log 10) for u

Relative error (in log 10) for u

-2

-3

-4

-5

-6

-3

-4

-5

-6

-7

-7

-8

-8

-9

10-4 10-6

2

4

6

-9

8

Number of basis (including 1 offline basis)

2

4

6

8

Number of basis (including 2 offline basis)

Figure 5: Relative weighted velocity error with k0 = 10−2 , 10−4 , 10−6 , model 3.

4.1

Oversampled online method for elliptic problems

In this section, we first compare the performance of online enrichment with and without oversampling, and show that oversampling helps achieve faster convergence. We also discuss the influence of oversampled domain size on convergence. We compare the efficiency of the online method for the elliptic problem by using different contrast orders for both low and high contrast orders and show that convergence is almost independent  of contrastorders. d11 d12 We use to define the local domain (see Figure 2) for the computation of the online basis d21 d22 functions for 2D computation. In total, three cases which are given below are considered. Here as defined earlier, n is the number of fine elements in a coarse block for each direction. The local domain in Case 1 is exactly the neighborhood of an coarse edge, i.e., no oversampling. Case 2 and Case 3 are oversampling 10

domains. In Case 2, one layer of fine cell is added to the coarse neighborhood in the direction of the edge. Therefore, the oversampling domain is larger than the coarse neighborhood. In Case 3, the layers of cells on both sides of the coarse edge are reduced to about a half of n, while one layer of fine cells is added to the coarse neighborhood in the direction of this edge. Thus, the oversampling domain in this case is smaller than the coarse  neighborhood.  n 0 Case 1: No oversampling: 0 n  n 1 Case 2: oversampling case a: 1 n   [n/2] 1 Case 3: oversampling case b: 1 [n/2] In each table of Tables 1-6, we compare the velocity errors of the above 3 cases for each test model. Tables 1-2 are results for model 1, with Nx = 10,Ny = 10, n = 20. In Table 1, we start with 1 initial offline basis function in each coarse neighborhood ωi , then we iteratively add online basis functions up to 7. The first column gives the number of basis functions represented by Nb in each coarse neighborhood and the dimension of the coarse system (15). The second column is the error decay history for Case 1, which as we mentioned earlier is the non-oversampling case. The third and the fourth columns are for Case 2 and Case 3, respectively. It can be found that with more online basis functions added, the multiscale solutions from the three cases all converge to the reference solution. However, one can observe that the online solution with oversampling converges much faster than the no-oversampling case. For example, if 7 basis functions are used for the no-oversampling case, the error is around 10−3 , while for the Case 2 or 3 one can obtain similar accuracy solution with only 4 basis functions. We remark that adding more fine-grids in the oversampling domain one can yield faster error decay. Though the size of oversampled domain for Case 3 is much smaller for Case 2, however, its corresponding convergence rate is comparable with Case 2 since one layer of fine grid cell is added on each side in the direction of coarse edge (face). Convergence behavior for each case with two initial offline basis functions is shown in Table 2. By comparing corresponding columns for the three cases, one can see that by using one more initial basis function, faster convergence is achieved. For example, by comparing the columns for Case 2 in Table 1 and Table 2, the rate of convergence is faster in Table 2. The error convergence history for both model 2 and model 3 are reported in Tables 3-6. We can draw similar conclusion as for model 1. Next we study the performance of different k0 for model 3. Figure 4 shows the errors against the number of basis functions for k0 = 102 , 104 , 106 . The left figure is the case of using 1 initial offline basis while the right figure is for using 2 initial basis functions. We can see that for both cases the error convergence history is almost the same for different k0 . We also test the lower contrast case, i.e., k0 = 10−2 , 10−4 , 10−6 . Corresponding results are plotted in Figure 5, we found similar phenomenon, that is, the difference in the contrast has almost no effects on the relative errors. We can conclude that the oversampled online enrichment method is robust in the sense that its convergence rate is almost independent of the media’s contrast order. Nb (Dim) 1(280) 2(460) 3(640) 4(820) 5(1000) 6(1180) 7(1360)

Case 1 1.06e+0 1.85e-01 2.94e-02 1.18e-02 1.05e-02 2.48e-03 1.22e-03

Case 2 1.06e+0 7.38e-02 9.67e-03 1.38e-03 2.40e-04 1.25e-06 2.40e-08

Case 3 1.06e+0 1.13e-01 1.31e-02 1.76e-03 2.30e-04 7.35e-06 4.51e-08

Table 1: 1 initial offline basis, model 1, Nx = 10, Ny = 10, n = 20.

11

Nb (Dim) 2(460) 3(640) 4(820) 5(1000) 6(1180) 7(1360)

Case 1 9.51e-01 1.38e-01 1.38e-02 4.05e-03 2.58e-03 6.41e-04

Case 2 9.51e-01 5.38e-02 1.26e-03 8.39e-05 3.52e-06 4.73e-08

Case 3 9.51e-01 6.19e-02 2.21e-03 3.54e-04 1.28e-05 1.08e-07

Table 2: 2 initial offline basis, model 1, Nx = 10, Ny = 10, n = 20 .

Nb (Dim) 1(2368) 2(4076) 3(5784) 4(7492) 5(9200) 6(10908) 7(12616) 8(14324)

Case 1 6.54e-01 1.03e-01 3.23e-02 1.73e-02 1.35e-02 1.00e-02 7.92e-03 6.07e-03

Case 2 6.54e-01 5.22e-02 8.13e-03 2.58e-03 4.10e-04 2.38e-05 1.17e-06 4.09e-08

Case 3 6.54e-01 7.07e-02 1.11e-02 3.02e-03 5.78e-04 3.26e-05 2.74e-06 1.32e-07

Table 3: 1 initial offline basis, model 2, Nx = 6, Ny = 22, Nz = 5, n = 10.

Nb (Dim) 2(4076) 3(5784) 4(7492) 5(9200) 6(10908) 7(12616) 8(14324)

Case 1 6.34e-01 8.91e-02 2.23e-02 5.52e-03 2.53e-03 1.85e-03 1.21e-03

Case 2 6.34e-01 4.39e-02 3.20e-03 1.72e-04 1.21e-05 6.21e-07 2.87e-08

Case 3 6.34e-01 5.72e-02 5.09e-03 3.10e-04 2.80e-05 1.85e-06 8.77e-08

Table 4: 2 initial offline basis, model 2, Nx = 6, Ny = 22, Nz = 5, n = 10.

Nb (Dim) 1(756) 2(1296) 3(1836) 4(2376) 5(2916) 6(3456) 7(3996) 8(4536)

Case 1 7.69e-01 1.12e-01 2.88e-02 1.04e-02 3.74e-03 1.23e-03 4.04e-04 2.69e-04

Case 2 7.69e-01 6.99e-02 5.37e-03 2.94e-04 1.67e-05 7.13e-07 2.96e-08 9.36e-10

Case 3 7.69e-01 1.13e-01 1.19e-02 8.40e-04 4.98e-05 2.47e-06 1.30e-07 4.50e-09

Table 5: 1 initial offline basis, model 3, k0 = 104 , Nx = 6, Ny = 6, Nz = 6, n = 10.

12

basis(Dim) 2(1296) 3(1836) 4(2376) 5(2916) 6(3456) 7(3996) 8(4536)

Case 1 6.30e-01 1.03e-01 2.59e-02 7.01e-03 1.67e-03 4.13e-04 8.18e-05

Case 2 6.30e-01 3.91e-02 1.91e-03 7.76e-05 3.99e-06 1.61e-07 5.11e-09

Case 3 6.30e-01 5.77e-02 3.40e-03 1.55e-04 8.34e-06 3.51e-07 1.24e-08

Table 6: 2 initial offline basis, model 3, k0 = 104 , Nx = 6, Ny = 6, Nz = 6, n = 10.

4.2

A two phase flow and transport problem

In this section, we test our method by solving an incompressible two-phase flow and transport model problem, which is used to simulate porous media flows [17, 19]. The mixed formulation for the elliptic problem is particularly suitable for two-phase flow problems. As the velocity field is mass conservative, which is an important feature to get accurate saturation solution. In particular, we consider two-phase flow in a reservoir domain (denoted by Ω) with the assumption that the fluid displacement is only driven by viscous effects, neglecting compressibility and gravity for simplicity. The two phases we consider are water and oil, which are assumed to be immiscible. Next, we summarize the differential equations for the two-phase flow. By the Darcy’s law, we have the following equation for each phase vl = −

krl (sl ) K∇p µl

(16)

where vl is the phase velocity, K is the permeability tensor, krl is the relative permeability to phase l (l = o, w), sl is saturation, and p is pressure. Throughout the paper, we use a single set of relative permeability. By the mass conservation law, the following equation for each phases is obtained: φ

∂sl + ∇ · vl = ql . ∂t

(17)

To close the system, the property sw + so = 1 is used. Then, we can write the whole system depending on pressure and saturation as follows (we use s instead of sw for simplicity): ∇·v

= qw + qo in Ω ∂s qw φ + ∇ · (fw (s)v) = in Ω ∂t ρw v · n = 0 on ∂Ω (no flow at boundary) s(t = 0)

= s0

in Ω (initial known saturation)

(18) (19) (20) (21)

where φ is the porosity, λ is the total mobility defined as λ(s) = λw (s) + λo (s) =

krw (s) kro (s) + µw µo

(22)

fw (s) is the flux function, fw (s) =

λw (s) krw (s) = λ(s) krw (s) + µµwo kro (s)

(23)

and v = vw + vo = −λ(s)K∇p is the total flux. Moreover, qw and qo are volumetric source terms for water and oil. Here, sequential formulation is employed to solve the coupled system (18)-(21), that is at each time step the pressure equation is solved first to get the velocity, then the updated velocity is used to solve the 13

saturation equation. The pressure equation is solved by using the offline basis functions together with the online basis functions computed at the initial time step, and the saturation equation is solved by finite volume method. The initial saturation is taken to be zero. The velocity in Equation (19) is the fine grid velocity which is obtained by projecting the multiscale velocity field onto the fine grid. We use a five-spot model, i.e., we inject the water in the four corners of the model, and the sink is located at the center of the model. We test the method for model 1 and 2 with different combination of the number of offline and online basis functions. Time step size is 50, and the end of simulation time is 5000. We define the relative L2 saturation error at time step i as es (i) :=

ksms (i) − sref (i)kL2 ,Ω . ksref (i)kL2 ,Ω

The average of es is simply the arithmetic average of es (i), i = 1, · · · , 5000. Figure 6 shows the relative saturation errors of using different online basis functions and different number of offline basis function against the time instants for model 1. We note that x + y in the legend of the figure means using x offline basis functions and y online basis functions. Updating in the legend means that we update the velocity basis functions at every other five time steps by solving local problems on the coarse neighborhoods with the initial flux on the coarse face as the boundary condition. The updated basis may contain features of the updated permeability field, and thus yields more accurate saturation. Otherwise we use the online basis functions obtained with initial model. We observe the errors are greater than 30% for almost all time instants if only 1 offline basis is used (shown by the red line). However, if 1 or 2 online basis functions are added (the purple and blue lines), the error can be reduced tremendously. Updating the basis can further decrease the saturation errors. We also present the water-cut comparison (water flux fractional function fw (s)) in Figure 7. We can see that the water cut lines for all the cases that have at least 1 online basis are very close to the reference line especially when time-instant is larger than 2000. However, if we do not update the basis, there is noticeable error between multiscale water-cut and the reference water-cut. Updating the basis function can make the multiscale water-cut line and reference water-cut line almost identical. Figure 8 shows the saturation profile comparison (at time t = 2000) for model 1. We can see that if no online basis functions are used, the multiscale solution fails to capture many details of the flow compared to the reference solution, which can be confirmed by the 39.5% relative saturation error. If we use two online basis functions, the error drops to 8.2%, and the saturation profile is quite close to the reference profile.

14

Relative error for saturation advancing in time

0.5

1+0 1+1 1+2 2+1 1+2 with updating 2+1 with updating

0.45

Relative error for saturation

0.4 0.35 0.3 0.25 0.2 0.15 0.1 0.05 0

0

1000

2000

3000

4000

Time instants

Figure 6: Saturation error for model 1.

15

5000

watercut

1 0.9 0.8 0.7 0.6 0.5 0.4

1+0 1+1 1+2 2+1 reference

0.3 0.2 0.1 0

0

1000

2000

3000

4000

5000

Time instants

(a) watercut

1 0.9 0.8 0.7 0.6 0.5 0.4 0.3

1+2 1+2 with updating reference

0.2 0.1 0

0

1000

2000

3000

4000

5000

Time instants

(b) watercut

1 0.9 0.8 0.7 0.6 0.5 0.4 0.3

2+1 2+1 with updating reference

0.2 0.1 0 0

1000

2000

3000

4000

Time instants

16 (c) Figure 7: Water-cut for model 1.

5000

0

0

0

0.1

0.9

0.1

0.9

0.1

0.9

0.2

0.8

0.2

0.8

0.2

0.8

0.3

0.7

0.3

0.7

0.3

0.7

0.4

0.6

0.4

0.6

0.4

0.6

0.5

0.5

0.5

0.5

0.5

0.5

0.6

0.4

0.6

0.4

0.6

0.4

0.7

0.3

0.7

0.3

0.7

0.3

0.8

0.2

0.8

0.2

0.8

0.2

0.9

0.1

0.9

0.1

0.9

1

0

0.2

0.4

0.6

0.8

1

0

(a) Fine-scale solution

1

1

0 0

0.2

0.4

0.6

0.8

1

0.1 0

0.2

0.4

0.6

0.8

1

(b) Ms-solution with 1 offline basis (c) Ms-solution with 1 offline basis and 0 online basis, relative L2 error and 2 online basis, relative L2 error is 39.5% is 8.2%

Figure 8: Saturation comparison at t = 2000s, model 1. We also obtain similar results for model 2. The relative error against time is shown in Figure 9. We also find that online basis is very efficient in reducing the saturation error. The water-cut comparison and saturation comparison against reference solution are show in Figure 10 and 11, respectively. From Figure 10, we can see that by using more online basis, the water cut gets closer to the reference one. Updating the velocity basis at some middle time instants further improves the accuracy. In Figure 11, the saturation plots are from time t = 2000. The relative saturation error reduces from 28.4% to 9.2% by adding 2 online basis functions, and further reduces to 5.9% by updating basis functions. Relative error for saturation advancing in time

0.45

1+0 1+1 1+2 2+1 1+2 with updating 2+1 with updating

0.4

Relative error for saturation

0.35 0.3 0.25 0.2 0.15 0.1 0.05 0 0

200

400

600

800

1000

1200

1400

1600

1800

Time instants

Figure 9: Saturation error for model 2.

17

2000

watercut

1

watercut

1

0.9

0.9

0.8

0.8

0.7

0.7

0.6

0.6

0.5

0.5

0.4

0.4 1+0 1+1 1+2 2+1 reference

0.3 0.2

0.3 1+2 1+2 with updating reference

0.2

0.1

0.1

0

0 0

200

400

600

800

1000

1200

1400

1600

1800

2000

0

200

400

600

800

Time instants

1000

1200

Time instants

(a) 1

(b) 2 watercut

1 0.9 0.8 0.7 0.6 0.5 0.4 0.3

2+1 2+1 with updating reference

0.2 0.1 0 0

200

400

600

800

1000

1200

1400

1600

1800

2000

Time instants

(c) 3

Figure 10: Water-cut for model 2.

18

1400

1600

1800

2000

(a) Fine-scale solution

(b) Ms-solution with 1 offline basis and 0 online basis, relative L2 error is 28.4%

(c) Ms-solution with 1 offline basis and 2 online basis, (d) Ms-solution with 1 offline basis and 2 online basis relative L2 error is 9.2% with basis updating every 5 time steps, relative L2 error is 5.9%

Figure 11: Saturation for model 2

5

Conclusions

We have developed an oversampled online mixed generalized multiscale finite element method for flow problems in heterogeneous porous media. We start with an offline multiscale solution and use the residual to construct online basis iteratively with oversampling techniques. The method produces mass conservative solutions for flow problems. By using oversampled domain, we can compute online basis on a much smaller domain than a standard neighborhood of a coarse face, while gaining more accuracy. Numerical results show that online basis with oversampling yields faster convergence speed compared with no oversampling method. We also applied our method to flow and transport problems and demonstrate that by adding a few online basis functions, we can get good approximation solution.

Acknowledgments The research of Eric Chung is partially supported by RGC and CUHK.

19

References [1] J.E. Aarnes. On the use of a mixed multiscale finite element method for greater flexibility and increased speed or improved accuracy in reservoir simulation. Multiscale Modeling & Simulation, 2:421–439, 2004. [2] Jorg E. Aarnes, Vegard Kippe, and Knut-Andreas Lie. Mixed multiscale finite elements and streamline methods for reservoir simulation of large geomodels. Advances in Water Resources, 28(257 – 271), 2005. [3] T. Arbogast. Analysis of a two-scale, locally conservative subgrid upscaling for elliptic problems. SIAM Journal on Numerical Analysis, 42(2):576–598 (electronic), 2004. [4] T. Arbogast, G. Pencheva, M.F. Wheeler, and I. Yotov. A multiscale mortar mixed finite element method. Multiscale Modeling & Simulation, 6(1):319–346 (electronic), 2007. [5] Xiao-Chuan Cai and Marcus Sarkis. A restricted additive schwarz preconditioner for general sparse linear systems. SIAM Journal on Scientific Computing, 21(2):792–797, 1999. [6] Ho Yuen Chan, Eric T Chung, and Yalchin Efendiev. Adaptive mixed GMsFEM for flows in heterogeneous media. Numerical Mathematics: Theory, Methods and Applications, 9(4):497–527, 2016. [7] Z. Chen and T.Y. Hou. A mixed multiscale finite element method for elliptic problems with oscillating coefficients. Mathematics of Computation, 72:541–576, 2002. [8] Eric T Chung, Yalchin Efendiev, and Chak Shing Lee. Mixed generalized multiscale finite element methods and applications. Multiscale Modeling & Simulation, 13(1):338–366, 2015. [9] Eric T Chung, Yalchin Efendiev, and Wing Tat Leung. Residual-driven online generalized multiscale finite element methods. Journal of Computational Physics, 302:176–190, 2015. [10] Eric T Chung, Yalchin Efendiev, and Wing Tat Leung. An online generalized multiscale discontinuous galerkin method (gmsdgm) for flows in heterogeneous media. Communications in Computational Physics, 21(2):401–422, 2017. [11] Eric T. Chung, Yalchin Efendiev, and Guanglian Li. An adaptive GMsFEM for high-contrast flow problems. Journal of Computational Physics, 273:54–76, 2014. [12] LJ Durfolsky. Numerical calculation of equivalent grid block permeability tensors of heterogeneous porous media: Water resour res v27, n5, may 1991, p299–708. In International Journal of Rock Mechanics and Mining Sciences & Geomechanics Abstracts, volume 28, page A350. Pergamon, 1991. [13] Y. Efendiev and J. Galvis. A domain decomposition preconditioner for multiscale high-contrast problems. In Y. Huang, R. Kornhuber, O. Widlund, and J. Xu, editors, Domain Decomposition Methods in Science and Engineering XIX, volume 78 of Lect. Notes in Comput. Science and Eng., pages 189–196. Springer-Verlag, 2011. [14] Y. Efendiev, J. Galvis, and T. Hou. Generalized multiscale finite element methods. Journal of Computational Physics, 251:116–135, 2013. [15] Y. Efendiev, J. Galvis, G. Li, and M. Presho. Generalized multiscale finite element methods. oversampling strategies. International Journal for Multiscale Computational Engineering, 12(6):465–484, 2014. [16] Y. Efendiev, J. Galvis, and X.H. Wu. Multiscale finite element methods for high-contrast problems using local spectral basis functions. Journal of Computational Physics, 230:937–955, 2011.

20

[17] Y. Efendiev, E. Gildin, and Y. Yang. Online adaptive local-global model reduction for flows in heterogeneous porous media. Computation, 4(2), 2016. [18] Yalchin Efendiev and Thomas Y Hou. Multiscale finite element methods: theory and applications, volume 4. Springer Science & Business Media, 2009. [19] M. Ghasemi, Y. Yang, E. Gildin, Y. Efendiev, and V. Calo. Fast multi-scale reservoir simulations using pod-deim model reduction. SPE Journal, 2016. [20] Roland Glowinski and Mary F Wheeler. Domain decomposition and mixed finite element methods for elliptic problems. In First international symposium on domain decomposition methods for partial differential equations, pages 144–172, 1988. [21] T. Hou and X.H. Wu. A multiscale finite element method for elliptic problems in composite materials and porous media. Journal of Computational Physics, 134:169–189, 1997. [22] P. Jenny, S.H. Lee, and H. Tchelepi. Multi-scale finite volume method for elliptic problems in subsurface flow simulation. Journal of Computational Physics, 187:47–67, 2003. [23] M.F. Wheeler, G. Xue, and I. Yotov. A multiscale mortar multipoint flux mixed finite element method. ESAIM Math. Model. Numer. Anal., 46(4):759–796, 2012. [24] Xiao-Hui Wu, Y Efendiev, and Thomas Y Hou. Analysis of upscaling absolute permeability. Discrete and Continuous Dynamical Systems Series B, 2(2):185–204, 2002. [25] Y. Yang, E. T. Chung, and S. Fu. An enriched multiscale mortar space for high contrast flow problems. Commun. Comput. Phys., 23(2):476–499, 2018.

21