*4.2. Experiment 2*

In this experiment, we considered sine-shaped channelized permeability fields. Each permeability field contained a straight channel and a sine-shaped channel. There were altogether five channel configurations, where the straight channel was fixed and the sine-shaped channel struck the boundary of the target cell *K*0 at the same points. The curvature of the sine-shaped channel inside *K*0 varied among these configurations. For each channel configuration, we generated 500 realizations of permeability fields, where the permeability coefficients followed random distributions. Samples of permeability fields are depicted in Figure 6. Among the 2500 realizations, 2475 sample pairs were randomly chosen and used as training samples, and the remaining 25 sample pairs were used as testing samples.

**Figure 6.** Samples of permeability fields in the target block *K*0 in experiment 2.

Next, for each realization, we computed the local multiscale basis functions and local coarse-scale stiffness matrix. In building the local snapshot space, we solved for harmonic extension of randomized fine-grid boundary conditions, so as to reduce the number of local problems to be solved. Local multiscale basis functions were then constructed by solving the spectral problem and multiplied the spectral basis functions with the multiscale partition of unity functions. With the offline space constructed, we computed the coarse-scale stiffness matrix. We used the training samples to build deep neural networks for approximating these GMsFEM quantities, and examined the performance of the approximations on the testing set.

Figures 7–9 show the comparison of the multiscale basis functions in two respective coarse neighborhoods. It can be observed that the predicted multiscale basis functions were in good agreemen<sup>t</sup> with the exact ones. In particular, the neural network successfully interpreted the high conductivity regions as the support localization feature of the multiscale basis functions. Tables 5 and 6 record the mean error of the prediction by the neural networks, measured in the defined metric. Again, it can be seen that the prediction are of high accuracy. Table 7 records the mean error between the multiscale solution using the neural-network-based multiscale solver and using exact GMsFEM. we obtain a good approximation of the multiscale solution compared with the exact GMsFEM solver.

**Figure 7.** Exact multiscale basis functions *φ<sup>ω</sup>*1 *m* (**left**), predicted multiscale basis functions *φ<sup>ω</sup>*1,pre<sup>d</sup> *m* (**middle**) and their differences (**right**) in the coarse neighborhood *ω*1 in experiment 2. The first row and the second row illustrate the first basis function *φ<sup>ω</sup>*1 1 and the second basis function *φ<sup>ω</sup>*1 2 , respecitvely.

**Figure 8.** Exact multiscale basis functions *φ<sup>ω</sup>*2 *m* (**left**), predicted multiscale basis functions *φ<sup>ω</sup>*2,pre<sup>d</sup> *m* (**middle**) and their differences (**right**) in the coarse neighborhood *ω*2 in experiment 2. The first row and the second row illustrate the first basis function *φ<sup>ω</sup>*2 1 and the second basis function *φ<sup>ω</sup>*2 2, respecitvely.

**Figure 9.** Exact multiscale basis functions *φ<sup>ω</sup>*3 *m* (**left**), predicted multiscale basis functions *φ<sup>ω</sup>*3,pre<sup>d</sup> *m* (**middle**) and their differences (**right**) in the coarse neighborhood *ω*3 in experiment 2. The first row and the second row illustrate the first basis function *φ<sup>ω</sup>*3 1 and the second basis function *φ<sup>ω</sup>*3 2, respecitvely.

**Table 5.** Mean percentage error of multiscale basis functions *φ<sup>ω</sup><sup>i</sup> m* in experiment 2.


**Table 6.** Percentage error of the local stiffness matrix *AK*0 *c* in experiment 2.


**Table 7.** Percentage error of multiscale solution *ums* in experiment 2.

