A Semi-Implicit Scheme of Lattice Boltzmann Method for Two Dimensional Cavity Flow Simulation

The calculation sequence of collision, propagation and macroscopic variables is not very clear in lattice Boltzmann method (LBM) code implementation. According to the definition, three steps should be computed on all nodes respectively, which mean three loops are needed. While the “pull” scheme makes the only one loop possible for coding, this is called semi-implicit scheme in this study. The accuracy and efficiency of semi-implicit scheme are discussed in detail through the simulation of lid-driven cavity flow. Non-equilibrium extrapolation scheme is adopted on the boundary of simulation area. The results are compared with two classic articles, which show that semi-implicit scheme has good agreement with the classic scheme. When Re is less than 3000, the iterations steps of semi-scheme can be decreased by about 30% though comparing the semi-implicit scheme with standard scheme containing three loops. As the Re increases into more than 3400, the standard scheme is not converged. On the contrary, the iterations of semi-implicit scheme are approximately linear to Re.


Introduction
In recent years, the lattice Boltzmann method has developed into an alternative and promising numerical scheme for simulating fluid flows and modeling physics in fluids.The LBM can simulate various fluid flow situations that are difficult to operate in the laboratory.However, these simulations are very computation-intensive and time-consuming even with modern computing power.There are many different ways to accelerate the simulation, such as parallel computing and different data layouts [1] or data storage in memory [2].Among them, parallel computing contains CPU parallel computing [3]- [5] and GPU parallel computing [6] [7].
However, the calculation sequence of collision, propagation and macroscopic variables is ambiguous in code implementation.The "pull" and "push" scheme [1] can be used in propagation step.According to the definition, three steps should be computed orderly on all nodes, which means three loops are needed in the programming, and both "pull" and "push" scheme are available.Especially the "pull" scheme, which integrates the three steps into one loop, will be discussed in this paper.The "pull" scheme with one loop is called semi-implicit scheme.In Section 2, Figure 1 will show why we call it "semi-implicit".The accuracy and efficiency of semi-implicit scheme is discussed in detail through the simulation of lid-driven cavity flow.
Lid-driven cavity flow is a well-known fluid flow problem where the fluid is set into motion by a part of containing boundary.This type of flow has been used as a benchmark problem for many numerical methods due to its simple geometry and complicated flow behavior.Ghia et al. [8] give a comprehensive review on the numerical studies related to this type of fluid flows.Hou et al. [9] use LBM for simulating the cavity flow and present solution up to Reynolds number Re = 7500.The results in this paper will be compared with the results of these two articles.
In this paper, Section 2 presents the lattice Boltzmann model used in this study.The standard scheme and semi-implicit scheme of LBM are introduced, and the difference between two schemes is given.Section 3 draws the cavity flow problem, which is simulated by lattice Boltzmann method with semi-implicit scheme.The simulation result is compared with the results from previous articles.In addition, the performance comparison between the two schemes is given.Moreover, the final section shows the concluding remarks.

Lattice Boltzmann Method
A lattice Bhatnagar-Gross-Krook (BGK) model [10] [11] is briefly introduced here for the purpose of describing the semi-implicit scheme in the following section.The BGK model is defined by the following equation: , 1 where ( ) is a particle distribution function representing the probability of finding a fluid particle with a velocity j e at location x and time t .τ is the relaxation time.b is the number of velocities. ( )( ) x is an equilibrium distribution function.
Velocity j e is determined by a lattice structure.For 2D regular cell models, the most commonly used lattice structure is D2Q9 according to the DdQb notation of Qin et al. [11].Here, d is the space dimensions, while b is the number of velocities including the zero velocity, 0 e .The equilibrium distribution function for the D2Q9 lattice model is given by where j ω is the weight factor in the j direction.The weight factors for the D2Q9 model are 4/9 for the rest particles ( ) 0 j = , 1/9 for particles streaming to the face connected neighbors ( )

Boundary Conditions
The boundary condition most commonly used in lattice Boltzmann method is the bounce-back method.The bounce-back scheme is easy to implement and make the method ideal for simulating fluid flows in complicated geometries [8].However, the bounce-back scheme is only first-order in numerical accuracy at the boundaries, which is not consistent with the order of the LBM in interior points.The non-equilibrium extrapolation scheme is adopted here.The basic idea is to decompose the distribution function into equilibrium part and non-equilibrium part.The scheme is of second-order accuracy in both time and space region [12].

Difference between Standard and Semi-Implicit Schemes
The macroscopic variables such as density and velocity, which are required for equilibrium distribution function, can be obtained from the following equations: ( ) From Equation (1), the fluid particle evolution involves two distinct steps: Collision: , 1 Propagation: Macroscopic variables, collision and propagation are the three time consuming steps during the lattice Boltzmann simulation process.The main difference between the standard scheme and semi-implicit scheme in code implementation is that, the former scheme needs three loops for three steps, while the latter scheme needs only one loop in all the nodes for all three steps.When the distribution functions ( ) were computed, the distribution functions ( ) of its neighboring node are used by standard scheme for all directions, but the distribution functions ( ) of its neighboring nodes are used by semi-implicit scheme for the red directions (shown in Figure 1).The accuracy and efficiency of semi-implicit scheme will be discussed through the simulation of cavity flow in the next section.

Cavity Simulation and Discussion
The present simulation uses Cartesian coordinates with the origin located at lower left corner.Numerical simulations are carried out using the standard and semi-implicit scheme LBGK model for different Re numbers on a 257 257 × lattice.Initially the velocities at all nodes, except the top nodes, are set to zero.The x-velocity of the top, u is set to 0.1 and the y-velocity is zero.Uniform fluid density 2.7 ρ = is imposed initially.The convergence criterion for the steady state is given by the follow: where N is the total number of nodes in the computational domain.u and v are the x-velocity and y-ve- locity respectively.

Stream Function
The simulation results computed by semi-implicit scheme were compared with previous works done by Ghia et al. [8] and Hou et al. [9].First, the locations of primary and secondary vortices are listed in Table 1 and Table 2.
The convergence criterion, Er is choosen 10 −6 for all simulations.Numerical simulations were carried out for Re 400 = , 1000, 2000, 5000, 7500.Figure 2 shows the changes of stream function for each Reynolds numbers, the locations of vortices with different level can be seen clearly from these figures, for example, the third level vortices is turned out on the upper left corner of the square cavity when Re 2000 = .Table 1 shows the locations of the center of primary vortices and the pair of lower vortices for different Reynolds numbers.The locations of the secondary vortex in the upper left corner for Re 5000 = and 7500 are listed in Table 2.These result show good agreement with Ghia et al. [8] and Hou et al. [9].

Performance Compare
For all simulations, steady state is reached when the convergence criterion, Er is less than 10 −6 for successive 1000 simulation steps.Table 3 shows the iterations that both schemes are needed.Ef in Table 3      scheme.The iterations can be saved about 30%, when Re less than 3000, and the advantage of semi-implicit scheme becomes more obvious as the Re increases.The standard scheme is not converged once Re > 3400.On the contrary, the iterations of semi-implicit scheme is approximately linear to Re (Figure 3).

Conclusion
The essence of semi-implicit scheme is that it uses the latest equilibrium distribution function, computed by the new macroscopic variables.The semi-implicit scheme accelerates the computation rate of flowing status to steady statement and increases the computation efficiency.In addition, the application of semi-implicit scheme is not limited to the cavity flow simulation; many other problems can choose this scheme to reduce the total computing time.

1 Figure 1 .
Figure 1.Comparison between standard scheme and semi-implicit scheme.
, 2,3, 4 j = and 1/36 for particles streaming to the edge connected neighbors ( ) 5, 6, 7,8 j = and while s c is the speed of sound, and 1 3 s c = for D2Q9 model.The relaxation time τ is related to the viscosity by

Figure 2 .
Figure 2. Stream functions for different Reynolds numbers.

Figure 3 .
Figure 3.Comparison of iterations between two schemes.

Table 3 .
Comparison of iterations between two schemes.