Вы находитесь на странице: 1из 9

June 16, 2017

Lattice Boltzmann Methods for a 2D Lid-Driven Cavity

The Lid-Driven cavity flow problem is one of the most common benchmark
tests for solvers due to its simplicity, because of this there is abundant
literature for this configuration. This test case involved two-dimensional
viscous flow in a cavity. The fluid is within in a square box and the flow is
driven by the uniform velocity of the top wall.

The following diagram represent the problem configuration and the


boundary conditions.

Figure 1, Cavity and boundary conditions diagram.

For this case to get the right fluid field is important to match the Reynolds
number and the geometrical aspect ratio. For this case the aspect ratio is 1
since is just a square. We have chosen Reynolds number of 1000, and three
different lattice grid size. 128, 256 and 512. These three cases were run with
different time steps to ensure that they have reached steady state. The time
steps where base on reference [1]. However, there are some authors that use
the residuals as a baseline to determine the convergence of the simulation.

-1-
June 16, 2017

To compare the results with the references 2 and 3 it is important that the
simulations have reached steady state.

Table 1, Simulations meshes.


LATTICE SIZE 128 X 128 256 X 256 512 X 512
TIME STEPS 200,000 350,000 600,000

The standard definition of Reynolds number is,


= (1)

However, in LBM simulations we are not using the dimension characteristic


length. Instead we use the number of lattices points, as the following
formulation,


= (2)

Where N is the number of lattices, u the velocity and is the viscosity which
is related to the collision frequency by [2],

1
= 2 ( 0.5) (3)

Where cs is the lattice speed of sound which generally is equal to 1/3 in


lattice units, and is the collision frequency. The collision frequency needs
to have a numerical value not too close to 0 and 2 to avoid having numerical
issues. Another important consideration when running LBM simulations is
to keep the Mach number (u/cs) low. Usually, it is recommended to keep u
in order of 0.1 or 0.2. Lattice Boltzmann simulates weakly or incompressible
flow, therefore the variation on density has to be small.

-2-
June 16, 2017

Boundary Conditions

In any CFD simulation, boundary conditions are crucial for the correct flow
field. The scale of the fluid is defined by its physical properties, such as
density, viscosity, composition. However, the motion of the fluid is imposed
in the boundaries conditions, therefore the importance of prescribing them
correctly. Imposing boundary conditions for the traditional NaiverStokes
equations is different than LBM since these are specified directly on the
macroscopic variables. While for LBM the distribution functions need to be
determined at the boundaries of the domain.

The bounce back scheme is one of the most employed LBM. It can be used
to model stationary and moving walls. This scheme is simple and
straightforward to implement [2]. This scheme can be implemented on the
grid, or at the mid-grid. On-grid condition means that the boundary lies on
the lattices links, so half of the distribution functions are in the fluid, and the
other half in the wall. Whereas, the mid-grid is when the boundary wall is
between two lattice cells, therefore all the distribution functions are within
the fluid or the wall. We adopted the mid-grid approach.

C6 C4 C5

C3 C1 C2

C9 C7 C8
Figure 2, D2Q9 lattice arrangement.

The idea behind the bounce back is that the incoming fluid particles towards
the solid walls rebound on the boundary back to the fluid domain. The
boundaries conditions utilised for these simulations are no-slip bounce back

-3-
June 16, 2017

which means that the velocity at the surface of the wall is equal zero, as
illustrated in Figure 1, and a bounce back moving wall on the top of the
cavity with a prescribed velocity.

The no-slip bounce back boundary is quite easy to implement in LBM. In


the mid-grid approach, the populations of a single point in the wall will
receive the populations from the fluid. This description is illustrated in
Figure 3. Succi in [3] fully explains the moving wall boundary condition.

Boundary

Fluid
Figure 3, Mid-grid bounce back, no-slip boundary condition.

On the other hand, the on the grid approach is simpler to implement than
the mid-grid approach, since in this method there is no interaction between
different lattices. You just need to inverse the populations of the boundary
node [3]. The disadvantage of this method is that is less accurate than the
mid-grid [4].

Simulations:

The following simulations were performed on a single core with at an


average frequency of 3 GHz. All the results presented were obtained with
the F77 prototype code, unless is explicitly stated, with a minor modification
on the moving wall boundary condition. The stream lines and velocity field
computed are plotted in Figure 5, Figure 6 and Figure 7. They are the
solution for the 512 Lattices.

-4-
June 16, 2017

Table 2, Time in hours and minutes hh:mm


LATTICE SIZE 128 256 512
F77 Prototype 00:05 00:46 05:07
LBM Fundamentals 00:14 02:08 15:10

Table 2 compares the running time between two different codes. One is the
LBM F77 prototype and the other one is based on Mohamads book [2]. It
can be seen that there is a significant difference on the execution time. F77
code requires less time to run the simulation. As a note, the second code was
slightly modified. Mohamads implemented a node LBM. The boundaries
for the stationary wall are bounce back on-grid, and for the moving wall he
implemented of Zou and He [4] velocity boundary condition. Nevertheless,
both codes produce the similar results as it can be seen on Figure 4.

Figure 4, Velocity profile at mid-width (x-velocity) for 512x512 grid.

-5-
June 16, 2017

a) b)

c) d)

Figure 5, Streamlines evolution over time steps, a) 10k, b) 20k, c) 30k and d) 40k

a) b)

Figure 6, Streamlines at convergence, a) LBM, b) Ghia [5]

-6-
June 16, 2017

Figure 7, Velocity magnitude field at 600k time steps for 512 x 512 mesh.

The u and v velocity distribution along vertical and horizontal centreline are
shown in Figure 8, Table 3 and Table 4.

Figure 8, a) u profile at mid-width, b) v profile at mid-height.

-7-
June 16, 2017

Table 3, X-velocity at the mid-width for the three different meshes.


Y 128 256 512 Ghia [5] Bruneau [6]
0.9688 0.606 0.589 0.582 0.575 0.580
0.9531 0.438 0.452 0.460 0.466 0.472
0.7344 0.187 0.187 0.187 0.187 0.189
0.5000 -0.064 -0.063 -0.063 -0.061 -0.062
0.2813 -0.268 -0.273 -0.276 -0.278 -0.280
0.1016 -0.285 -0.288 -0.290 -0.297 -0.300
0.0625 -0.175 -0.185 -0.190 -0.202 -0.202

Table 4, Y-velocity at the mid-height for the three different meshes.


X 128 256 512 Ghia [5] Bruneau [6]
0.0391 -0.292 -0.288 -0.287 -0.277 -0.293
0.0547 -0.395 -0.397 -0.399 -0.392 -0.410
0.1406 -0.395 -0.424 -0.424 -0.427 -0.426
0.5000 0.029 0.028 0.027 0.025 0.026
0.7734 0.317 0.324 0.327 0.331 0.334
0.9062 0.315 0.320 0.323 0.326 0.333
0.9297 0.268 0.279 0.285 0.290 0.296

The above results of the LBM code show a good agreement with the best
literature available on this subject [5], [6]. As it is expected, as the number of
lattice points increases, the closer the results get to the references values.

All the results of both codes are not presented and compared in this
document, but they do produce similar results. However, in terms of stability
they are quite different. Mohamads code become unstable earlier when the
relaxation time is decreased. Also it would be beneficial for better
understanding to check until which Reynolds number is possible to get
convergence for both codes.

-8-
June 16, 2017

References

[1] S. Hou and Q. Zou, Simulation of cavity flow by the Lattice Boltzman Method,
Journal of Computational Physics, 1995.
[2] A. Mohamad, Lattice Boltzmann Fundamentals and Engineering Applications
with Computer Codes, 2011.
[3] S. Succi, The Lattice Boltzmann Equation: For Fluid Dynamics and Beyond,
Oxford Science Publications, 2001.
[4] Q. Zou and X. He , On pressure and velocity boundary conditions for the lattice
Boltzmann BGK model, Physics of Fluids, 1997.
[5] U. Ghia, K. Ghia and C. Shin, High-Re solutions for incompressible flow using
the Navier-Stokes equations and a multigrid method, Journal of Computational
Physics, 1982.
[6] C.-H. Bruneau and M. Saad, The 2D lid-driven cavity problem revisited,
Computers & Fluids, 2006.
[7] T. Inamuro, M. Yoshino and F. Ogino, A non-slip boundary condition for lattice
Boltzmann simulations, Physics of Fluids, 1995.

-9-

Вам также может понравиться