# A Multiscale CNN-Based Intrinsic Permeability Prediction in Deformable Porous Media
## 3 Database Generation
### Lbm for Single-Phase Fluid Flow  
In this study, we employ lattice Boltzmann method (LBM) simulations to calculate the average fluid velocity within each 3D sample under an applied pressure gradient. This allows for the inverse calculation of the intrinsic permeability tensor using the Darcy flow equation presented in (15) with \(\mathbf{v}_{S}=\mathbf{0}\). Abstract introduction to the LBM in the context of single fluid flow is given below, while more details and references can be found in [33; 36; 54]. The LBM uses a mesh-based approach to solve the Boltzmann equation [55]. It starts by defining the velocity distribution function \(f(\mathbf{x},\xi,t)\), which represents the probability of finding a fluid particle at a specific position \(\mathbf{x}\) and time \(t\) with a certain discrete velocity \(\xi\). The Boltzmann equation then describes how \(f(\mathbf{x},\xi,t)\) evolves over space and time. The evolution of \(f(\mathbf{x},\xi,t)\), associated with the exchange of momentum and energy amongst these particles, occurs through two key processes--streaming and collision--viz.,  
\[\left.\frac{df}{dt}\right|_{\text{streaming}}=\left.\frac{df}{dt}\right|_{ \text{collision}}\quad\text{with}\quad\quad\underbrace{\frac{\partial f}{ \partial t}+\xi\cdot\frac{\partial f}{\partial\mathbf{x}}}_{\text{streaming operator}}\ =\ \underbrace{\Omega\left(f\right).}_{\text{collision operator}} \tag{17}\]  
As described in [PERSON] et al. [56] and [PERSON] [57], the distribution function \(f(\mathbf{x},\xi,t)\) is linked to macroscopic variables such as fluid density \(\rho^{FR}\) and fluid velocity \(\mathbf{v}_{F}\) through its moments. This connection is established using the following integrals:  
\[\rho^{FR}(\mathbf{x},t)\approx\rho_{l}\left(\mathbf{x},t\right)= \int f(\mathbf{x},\xi,t)\,d\xi\ \ \text{and}\ \ \mathbf{v}_{F}(\mathbf{x},t)\approx\mathbf{u}_{l}\left(\mathbf{x},t\right)= \frac{1}{\rho_{l}}\int\xi f(\mathbf{x},\xi,t)\,d\xi\,. \tag{18}\]  
For the spatial discretization in 3D, a fluid particle is restricted to stream in 19 possible directions, known as D3Q19. These directions are defined as follows:  
\[\mathbf{e}_{i}=\left\{ \begin{array}{ll}(0,0,0)&i=0\\ (\pm 1,0,0),(0,\pm 1,0),(0,0,\pm 1)&i=1,2,\ldots,6\\ (\pm 1,\pm 1,0),(\pm 1,0,\pm 1),(0,\pm 1,\pm 1)&i=7,8,\ldots,18,\end{array} \right. \tag{19}\]  
where \(\mathbf{e}_{i}\) is the direction of the velocity vectors \(\xi_{i}=c\,\mathbf{e}_{i}\) given in terms of \(c\) as the ratio of the distance between the nodes \(\Delta x\) to the time-step size \(\Delta t\). Regarding the collision operator \(\Omega\left(f\right)\) in (17), the Bhatnagar-Gross-Krook (BGK) [58] model is used since it is easy  
Figure 2: Illustration of data sampling in which 448 3D samples are generated (**left**). Mean and standard deviation of the porosity \(n^{F}\) for each strain level \(\varepsilon^{V}\) showing the deformation dependency, while the 448 samples are considered (**right**). to implement and has been widely used in LBM fluid flow simulation [59]. In particular, the BGK collision operator \(\Omega_{\text{BGK}}\) is expressed as  
\[\Omega_{\text{BGK}}=-\frac{f_{i}-f_{i}^{eq}}{\tau}\quad\text{with}\quad\tau:= \frac{1}{2}+v_{l}\,c_{s}^{-2}\,. \tag{20}\]  
Herein, the relaxation time \(\tau\) depends on the lattice fluid viscosity \(v_{l}\) and lattice speed of sound \(c_{s}=1/\sqrt{3}\,\). The BGK model facilitates the relaxation of the distribution functions \(f_{i}\) toward equilibrium distributions \(f_{i}^{eq}\) at a collision frequency \(\tau^{-1}\). The formulation of \(f_{i}^{eq}\) is expressed as follows  
\[f_{i}^{eq}=w_{i}\,\rho_{l}\left(1+\frac{\mathbf{e}_{i}\cdot\mathbf{u}_{l}}{{c_ {s}}^{2}}+\frac{(\mathbf{e}_{i}\cdot\mathbf{u}_{l})^{2}}{2{c_{s}}^{4}}-\frac{( \mathbf{u}_{l}\cdot\mathbf{u}_{l})^{2}}{2{c_{s}}^{2}}\right), \tag{21}\]  
where \(w_{i}\) presents the lattice weights, i.e.,  
\[w_{i}=\left\{ \begin{array}{ll}1/3&\quad i=0\\ 1/18&\quad i=1,2,\ldots,6\\ 1/36&\quad i=7,8,\ldots,18\,.\end{array} \right.