# Modeling Transient Flows in Heterogeneous Layered Porous Media Using the Space-Time Trefftz Method
## 3 Convergence Analysis of Transient Flows in Heterogeneous Layered Porous Media  
In this section, convergence analysis of the transient flows in heterogeneous layered porous media is carried out. To illustrate the accuracy of the approximations, the error measures are defined as  
\[\text{RMSE}=\sqrt{\frac{1}{N_{I}}\sum_{i=1}^{N_{I}}\left[h(r_{i},\theta_{i},t_{ i})-\hat{h}(r_{i},\theta_{i},t_{i})\right]^{2}}, \tag{16}\]  
\[\text{MAE}=\max\{\left|\hat{h}(r_{i},\theta_{i},t_{i})\right|-|h(r_{i},\theta _{i},t_{i})|\},\;1\leq i\leq N_{I}, \tag{17}\]  
where \(h(r_{i},\theta_{i},t_{i})\) is the exact solution, \(\hat{h}(r_{i},\theta_{i},t_{i})\) is the approximate solution, RMSE denotes the root mean square error, MAE denotes the maximum absolute error, and \(N_{I}\) is the number of scattered inner points. Here, the scattered inner points were uniformly distributed in the space-time domain.  
Transient flows in two-layered porous media satisfy the diffusion equation depicted in Equation (1) in two dimensions over an irregular domain. The geometry for this problem is  
\[\partial\Omega_{t}=\bigg{\{}(r,\;\theta,\;t)\bigg{|}\begin{array}{l}r=2 \big{(}1+0.1\text{tanh}(10\sin(10\theta+\frac{\pi}{3})),\\ 0\leq\theta\leq 2\pi,0\leq t\leq 1\end{array}\bigg{\}}. \tag{18}\]  
The initial data for subdomains \(\Omega_{1}\) and \(\Omega_{2}\) are imposed as follows:  
\[h_{1}(r,\;\theta,\;t=0)=\sin(r\sin\theta)r\cos\theta,(r,\;\theta,\;t=0)\in \Omega_{1} \tag{19}\]  
\[h_{2}(r,\;\theta,\;t=0)=\sin(\sqrt{\frac{D_{1}}{D_{2}}}r\sin\theta)r\cos\theta,(r,\;\theta,\;t=0)\in\Omega_{2}, \tag{20}\]  
Figure 2: The numerical procedure of this study.  
where \(h_{1}(r,\ \theta,\ t=0)\) and \(h_{2}(r,\ \theta,\ t=0)\) are the initial data for subdomains \(\Omega_{1}\) and \(\Omega_{2}\), respectively. \(D_{1}\) and \(D_{2}\) are the hydraulic diffusivity in layer 1 and 2, respectively. The boundary conditions for subdomain \(\Omega_{1}\) and \(\Omega_{2}\) are prescribed based on the following functions:  
\[h_{1}(r,\ \theta,\ t)=e^{-2D_{1}t}\sin(r\sin\theta)r\cos\theta,(r,\theta,t)\in \partial\Omega_{1}, \tag{21}\]  
\[h_{2}(r,\ \theta,\ t)=e^{-2D_{1}t}\sin(\sqrt{\frac{D_{1}}{D_{2}}}r\sin\theta)r \cos\theta,(r,\theta,t)\in\partial\Omega_{2}. \tag{22}\]  
The exact solution is the function as follows:  
\[h=e^{-2D_{1}t}\sin(\sqrt{\frac{D_{1}}{D_{i}}}r\sin\theta)r\cos\theta, \tag{23}\]  
where \(D_{i}\) is the hydraulic diffusivity of the \(i\)th subdomain. The hydraulic diffusivity and hydraulic conductivity in two subdomains were set to be \(D_{1}=1\) m\({}^{2}\)h\({}^{-1}\) and \(D_{2}=0.25\) m\({}^{2}\)h\({}^{-1}\), and \(k_{1}=2\) m\({}^{1}\)h\({}^{-1}\) and \(k_{2}=1\) m\({}^{1}\)h\({}^{-1}\). The final elapsed time is 1 h. The boundary points are collocated on the boundary, as illustrated in Figure 1b. For simulating transient flows in two-layered porous media, DDM is utilized [35]. The domain boundary can be divided into several subdomains.  
The Dirichlet boundary conditions are based on Equations (21) and (22). The sub-boundaries at the interface, including \(\Gamma_{12}\) and \(\Gamma_{22}\), must satisfy the continuity of flows and the flux conservation based on Equation (11).  
Figure 3a shows the error versus the order of the basis functions. It appears that approximations with a high accuracy are acquired then the order is superior to 14. Additionally, promising results may be obtained when the order of the basis function ranges from 14 to 26. It seems that the optimal order may depend on the nature of the problems. The relationship between the absoluter error and the number of boundary points is displayed in Figure 3b. The results obtained illustrate that approximations with a high accuracy are achieved when the number of boundary points is greater than 1800. From the results of this convergence analysis, the number of the boundary points and the order of the basis functions were determined to be 2000 and 15, respectively.  
Figure 3: _Cont._