## 2 Lbm  
### D2Q9 Formulations  
The LBM, grounded in the principles of statistical mechanics, serves as a computational fluid dynamics approach that relies on mesoscopic simulation scales. It describes the evolution of particle distribution functions on a uniform grid [32; 33]. In this study, the D2Q9 lattice model was employed to simplify the analysis and effectively illustrate the essence of the problem, as depicted in Figure 1a. Suppose a two-dimensional incompressible fluid flow in a planar rectangular domain is initially divided into squares of length \(h\) along the \(x\) and \(y\) directions, respectively. The fluid phase can then be represented by fluid particles at lattice nodes with discrete velocities at specific times, allowed to move only along predetermined directions to adjacent nodes during numerical calculation process. In the D2Q9 model, each regular node's fluid particles are permitted to move to their eight immediate neighbors with eight different velocities \(\mathbf{e}_{i}\), (\(i=1,2,\ldots,8\)), while the zero velocity particle \(\mathbf{e}_{0}\) can remain on the node, as shown in Figure 1b. This will result in a total of nine distinct velocity vectors being defined as follows:  
\[\left\{ \begin{array}{l}\mathbf{e}_{0}=c(0,0),\\ \mathbf{e}_{1}=c(1,0),\mathbf{e}_{3}=c(-1,0),\\ \mathbf{e}_{2}=c(0,1),\mathbf{e}_{4}=c(0,-1),\\ \mathbf{e}_{5}=c(1,1),\mathbf{e}_{7}=c(-1,-1),\\ \mathbf{e}_{6}=c(-1,1),\mathbf{e}_{8}=c(1,-1).\end{array} \right. \tag{1}\]  
where \(c\) is the lattice speed and given by  
\[c=h/\Delta t \tag{2}\]  
in which \(\Delta t\) represents the discrete time step. Although the motion of a single fluid particle is irregular, the collective motion of multiple particles can impact the macroscopic parameters of fluid motion. The D2Q9 model can be depicted by nine fluid density distribution functions \(f_{i}(i=0,\ldots,8)\). \(f_{i}\) is associated with the possible quantity of fluid particles that move at velocity \(\mathbf{e}_{i}\) along the \(i\)th direction at each node. During the collision process, fluid particles will move towards the nearest node in the given direction at each fluid time step. The evolution of the density distribution function (\(f_{i}\)) is given as follows [34]:  
\[f_{i}(\mathbf{x}+\mathbf{e}_{i}\Delta t,t+\Delta t)-f_{i}(\mathbf{x},t)=- \frac{1}{\tau}[f_{i}(\mathbf{x},t)-f_{i}^{\text{eq}}(\mathbf{x},t)] \tag{3}\]  
where \(\mathbf{x}\) represents the position of any fluid grid node and \(t\) represents time. \(\mathbf{x}+\mathbf{e}_{i}\Delta t\) represents its nearest neighbor in the direction \(i\) after a discrete time step. \(\tau\) is the relaxation  
Figure 1: Lattice Boltzmann method discretization and D2Q9 model. time, which is a dimensionless parameter. The equilibrium distribution function, \(f_{i}^{\text{eq}}(\mathbf{x},t)\), is described as follows:  
\[f_{0}^{\text{eq}}=w_{0}\rho(1-\frac{3}{2c^{2}}\mathbf{u}\cdot \mathbf{u}) \tag{4}\] \[f_{i}^{\text{eq}}=w_{i}\rho\bigg{[}1+3\frac{\mathbf{e}_{i}\cdot \mathbf{u}}{c^{2}}+\frac{9}{2}\frac{(\mathbf{e}\cdot\mathbf{u})^{2}}{c^{4}}- \frac{3}{2}\frac{(\mathbf{u}\cdot\mathbf{u})^{2}}{c^{2}}\bigg{]}\qquad(i=1, \dots,8) \tag{5}\]  
where \(\rho\) represents the fluid density, \(\mathbf{u}\) denotes the fluid velocity, and \(w_{i}\) represents the weighting factor in the direction \(i\). The weighting factor should satisfy the following criterion:  
\[\sum_{i=0}^{8}\omega_{i}=1 \tag{6}\]  
where \(w_{0}=\frac{4}{9}\), \(w_{1,2,3,4}=\frac{1}{9}\), and \(w_{5,6,7,8}=\frac{1}{36}\). The two most crucial steps in LBM calculation are collision and streaming. The right-hand side of Equation (3) signifies a collision occurring at position \(\mathbf{x}\) and time \(t\), specifically involving variables pertinent solely to the individual node \(\mathbf{x}\), thereby rendering it a localized operation. Following a collision, new fluid particles occupy the positions of the original particles while the original particles migrate.