# Modeling Transient Flows in Heterogeneous Layered Porous Media Using the Space-Time Trefftz Method
## 4 Numerical Examples  
### Transient Flows in Two-Layered Porous Media  
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, as shown in Figure 4a, is  
\[\partial\Omega_{t}=\left\{\left(r,\ \theta,\ t\right)\left| \begin{array}{l}r= \left|\sec(3\theta)\right.\right|^{\sin(6\theta)},\\ 0\leq\theta\leq 2\pi,\ 0\leq t\leq 1\end{array} \right.\right\}. \tag{24}\]  
Figure 4: \(Cont.\)  
Figure 3: Convergence analysis: (**a**) error versus the order and (**b**) error versus the boundary point number. The initial data for subdomains \(\Omega_{1}\) and \(\Omega_{2}\) are imposed as follows. \[h_{1}(r,\theta,t=0)=\sinh\mathrm{h}(r\sin\theta)r\cos\theta,(r,\ \theta,\ t=0)\in\Omega_{1} \tag{25}\]  
\[h_{2}(r,\theta,t=0)=\sinh\mathrm{h}(\sqrt{\frac{D_{1}}{D_{2}}}r\sin\theta)r \cos\theta,(r,\ \theta,\ t=0)\in\Omega_{2} \tag{26}\]  
The boundary conditions for subdomains \(\Omega_{1}\) and \(\Omega_{2}\) are prescribed based on the following functions. \[h_{1}(r,\theta,t)=e^{2D_{1}t}\mathrm{sinh}\mathrm{h}(r\sin\theta)r\cos\theta, (r,\theta,t)\in\partial\Omega_{1} \tag{27}\]  
\[h_{2}(r,\theta,t)=e^{2D_{1}t}\mathrm{sinh}\mathrm{h}(\sqrt{\frac{D_{1}}{D_{2}} }r\sin\theta)r\cos\theta,(r,\theta,t)\in\partial\Omega_{2} \tag{28}\]  
The exact solution is the following function:  
\[h=e^{2D_{1}t}\mathrm{sinh}\mathrm{h}(\sqrt{\frac{D_{1}}{D_{i}}}r\sin\theta)r \cos\theta. \tag{29}\]  
In this example, the hydraulic diffusivity and hydraulic conductivity in the two subdomains were set to be \(D_{1}=\frac{1}{9}\) m\({}^{2}\)h\({}^{-1}\) and \(D_{2}=1\) m\({}^{2}\)h\({}^{-1}\), and \(k_{1}=2\) m\({}^{1}\)h\({}^{-1}\) and \(k_{2}=6\) m\({}^{1}\)h\({}^{-1}\). The final elapsed time is 1 h. The order of the basis functions is 17. There are 2026 boundary points for this domain. This example involves two-dimensional space and one-dimensional time. The space-time domain is therefore transformed into a three-dimensional object domain, as shown in Figure 3(b). The boundary points are placed on the boundary, as illustrated in Figure 3(b). For simulating transient flows in two-layered porous media, DDM is utilized [35]. The domain boundary can then be split into two subdomains. The Dirichlet boundary conditions are prescribed based on Equations (27) and (28). Based on Equation (11), the sub-boundaries at the interface, including \(\Gamma_{12}\) and \(\Gamma_{22}\), must satisfy the continuity of flows and the flux conservation. To compare the accuracy of our method with the analytical solution, the profiles of the results at different times are selected, as presented in Figure 5. Figure 5 shows  
Figure 4: Collocation points on (**a**) the space domain and (**b**) space–time domain. that the computed results adopting our approach are completely consistent with the analytical solution. To examine the accuracy of our method, the absolute error of the approximate solutions with the exact solution is evaluated. Figure 6 displays the absolute error at different simulation times. From Figure 6, the MAE is in the order of \(10^{-10}\), which indicates that our approach may acquire results with a high accuracy. To show the accuracy of the computed result from the proposed method and that from conventional mesh-generated techniques, we conducted a comparison example where transient flows in two-layered porous media satisfy the diffusion equation depicted in Equation (1) in two dimensions over a rectangular domain. The length and the width of the space domain are 4 m. The initial data for subdomains \(\Omega_{1}\) and \(\Omega_{2}\) are imposed as Equations (25) and (26). The boundary conditions for subdomains \(\Omega_{1}\) and \(\Omega_{2}\) are prescribed based on Equations (27) and (28). The exact solution for solving this example is as Equation (29).