## 2 Numerical Methods  
In this study, the D2Q9 model is used, where the velocity components are distributed, as shown in Figure 1.  
LBM originated from lattice gas automata and can be derived from the macroscopic Navier-Stokes equations through the Chapman-Enskog multiscale expansion. The control equations and computational methods of the standard LBM are relatively simple. The equations are as follows:  
\[f_{i}(x+c_{i}\delta t,\ t+\delta t)=f_{i}(x,\ t)+\Omega(f) \tag{1}\]  
\(f_{i}(x,t)\) represents the velocity distribution function at time \(t\) at spatial grid point \(x\), \(c_{i}\) is the discrete velocity set of fluid particles, \(\delta t\) is the discrete time step, \(t\) is the current time step, and \(\Omega(f)\) is the collision operator. The single relaxation time LBM model is adopted, and the equation is as follows:  
\[f_{i}(x+c_{i}\delta t,\ t+\delta t)-f_{i}(x,\ t)=-\frac{1}{\tau}\Big{[}f_{i}(x,\ t)-f_{i}^{eq}(x,\ t)\Big{]} \tag{2}\]  
Figure 1: D2Q9 model.  
\(\tau\) is the relaxation factor, and \(f_{i}^{eq}(x,\ t)\) is the equilibrium distribution function. For the D2Q9 discrete model, the equilibrium distribution function is as follows:  
\[f_{i}^{eq}=\rho\omega_{i}\left[1+\frac{c_{i}\cdot u}{c_{s}^{2}}+\frac{\left(c_{ i}\cdot u\right)^{2}}{2c_{s}^{4}}-\frac{u^{2}}{2c_{s}^{2}}\right] \tag{3}\]  
The weight coefficient is \(\omega_{i}\), the dimensionless speed of sound is \(c_{s}=c\ /\ \sqrt{3}\), and the lattice velocity is \(c=\delta x\ /\ \delta t\), where \(\delta x\) and \(\delta t\) are the lattice spacing and time step. The weight coefficients and discrete velocities for the 9 directions are shown in Table 1.  
The macroscopic density and velocity of the fluid in the lattice Boltzmann equation are obtained from Equations (4) and (5), respectively:  
\[\rho=\sum_{i}f_{i}=\sum_{i}f_{i}^{eq} \tag{4}\]  
\[\rho u=\sum_{i}c_{i}f_{i}=\sum_{i}c_{i}f_{i}^{eq} \tag{5}\]  
The relationship between the viscosity coefficient \(\gamma\) and the relaxation time \(\tau\) can be expressed as:  
\[\gamma=\left(\tau-\frac{1}{2}\right)c_{s}^{2}\delta t \tag{6}\]  
During the simulation process, the periodic grid is treated as a normal internal grid, while the solid boundaries are handled using the standard bounce-back rule. As shown in Figure 2, the arrows represent the components of the distribution function in different directions. It can be observed that at the solid boundary, the outward components of the distribution function are completely reversed to simulate the bouncing effect on the solid surface, while the remaining components migrate to the adjacent lattice points to maintain the continuity of the flow field.  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline \multirow{2}{*}{**Model**} & **Velocity** & \multirow{2}{*}{**Quantity**} & \multirow{2}{*}{**Mould Length**} & \multirow{2}{*}{**Weight**} \\  & **Component** & & & \\ \hline \multirow{3}{*}{D2Q9} & \((0,0)\) & 1 & 0 & 4/9 \\  & \((\pm 1,0)\) & 2 & 1 & 1/9 \\ \cline{1-1}  & \((0,\pm 1)\) & 2 & 1 & 1/9 \\ \cline{1-1}  & \((\pm 1,\pm 1)\) & 4 & \(\sqrt{2}\) & 1/36 \\ \hline \hline \end{tabular}
\end{table}
Table 1: Parameters of the D2Q9 model.  
Figure 2: Bounce-back scheme at solid wall boundaries.