# Fourier Neural Operator for Fluid Flow in Small-Shape 2D Simulated Porous Media Dataset
## 4 Results  
There are two main hyperparameters in FNO: the number of channels and modes. The former defines the width of the FNO network, referring to the number of features learned in each layer. The latter defines the number of lower Fourier modes retained when truncating the Fourier series. The size of the grid space controls the maximum allowable number of modes. In this research, five values were evaluated for the width: 20, 60, 100, 140, and 180, and four cases were evaluated for the mode: 5, 10, 15, and 20. Figure 3a reveals that the FNO models generated very similar errors, based on MSE, when calculated based on initial pressure values (actual non-normalized values) for the training data when the number of modes is 10, 15, or 20. However, the errors increased slightly for models configured with \(modes=5\). The coefficient of determination (R\({}^{2}\)) values for the training data varied from 0.9945 to 0.9971, according to Figure 3b. As a general result, all models were able to predict pressure with acceptable error levels for the training subset. Figure 3c,d display the FNO results for the testing subset. The model with modes of 5 generated the poorest prediction performance, i.e., highest MSE and lowest R\({}^{2}\). As width increased (with modes held at 5), MSE decreased from 109.9231 to 86.3347 and R\({}^{2}\) increased from 0.7661 to 0.8163. When the number of modes was increased to 10, the FNO performance improved. Additionally, an increase in width had a positive effect on accuracy when  
Figure 2: The structure of the CNN model used in this study. modes were held at 10. The model with \(modes=15\) performed better than models with modes of 5 or 10, as it generated MSE and R\({}^{2}\) displaying ranges of 42.1611-65.5664 and 0.8605-0.9103, respectively. In general, the prediction performance of the FNO model with modes of 20 overlapped with that of modes of 15. Considering all twenty cases, the model with \(modes=15\) and \(width=100\) generated the best performance with an MSE of 1.4087 and R\({}^{2}\) of 0.997 for the training subset, and an MSE of 42.1611 and R\({}^{2}\) of 0.9103 for the testing subset. In addition to the graphical comparisons (Figure 3), the MSE and R\({}^{2}\) values achieved by all FNO cases evaluated are listed in Table 1.  
Figure 3: Prediction error graphical analysis of the developed FNO models: (**a**) MSE for training data, (**b**) R\({}^{2}\) for training data, (**c**) MSE for testing data, and (**d**) R\({}^{2}\) for testing data. To assess whether downsampling has a positive or negative impact on the FNO model performance with respect to small-shape data (in the dataset modeled: \(30\times 30\)), a downsampling rate was set to 2. By applying that rate, the data shape was reduced to \(15\times 15\), which led to poor prediction results. For example, with \(\textit{modes}=10\) and \(\textit{width}=100\), the FNO model achieved pressure predictions with MSE of 27.3128 and R\({}^{2}\) of 0.9411 for the training subset, and with MSE of 410.7709 and R\({}^{2}\) of 0.1259 for the testing subset. As to be expected, further downsampling of the initial case caused prediction accuracy to deteriorate further. A likely explanation for this outcome is that the size of the grid space controls the maximum allowable number of modes. This means that by downsampling, the allowable number of FNO modes also decreases. Meantime, because CNN acts on discretized vectors, downsampling with CNN is not reasonable. In order to improve visualization of the pressure changes occurring over the defined shapes, three examples are illustrated for selected training (Figure 4) and testing (Figure 5) subsets. The plots in the left-side columns display the permeability fields, for representative sample grids. The plots in the left-central columns display the pressure distribution derived by FEM (considered to be true distribution). The plots in the right-central columns display the predicted pressure distributions of the best-performing FNO model developed.