Computational Physics

(Rick Simeone) #1

458 The lattice Boltzmann method for fluid dynamics


to having zero velocity in between the two particles. More accurate implementations
for the boundary conditions have been developed [ 12 , 13 ].
In Section 14.5 we show that the lattice Boltzmann model leads to the Navier–
Stokes equations for an incompressible fluid in the limit of small velocities. There,
it will be shown that the only parameter of the algorithm, which is the relaxation
timeτ, is related to the viscosityνby


ν=

2 τ− 1
6

x^2
t

, (14.36)


where x, tare the lattice constant and the time steps (which are usually taken
equal to 1).


programming exercise
Construct a lattice Boltzmann code for the flow through a two-dimensional
pipe which we imagine to be horizontal. This is a rectangle, where on the left
hand side we supply fluid, which is drained on the right hand side. Use the
d2q9 lattice. On the lateral boundaries, the bounce back rule is used to ensure
stick boundary conditions. The easiest way to realise the flow is by imposing
a pressure gradient over the system from left to right. This means that on each
segment of the fluid (corresponding to a point of the Boltzmann lattice), a
constant force is acting. This has the effect of increasing all velocities along
the direction of the flow at each time step by the same (small) amount.
The algorithm is set up as follows.
Move the densitynito the appropriate neighbour;
Reverse the new velocities on points beyond the system boundaries;
Calculate velocities at each point;
Add a small velocity along the direction of the pressure gradient;
Calculate equilibrium distribution at each point;
Relax the densities at the points inside the system according to
nnewi =( 1 − 1 /τ )noldi +neqi /τ.

CheckIf your program works correctly, you should obtain a parabolic flow profile
throughout the pipe. Note that the simulation is only reliable for small velocities.
The parabola should have curvature∇P/(ρν). The viscosityνis related to the
relaxation timeτasν=( 2 τ− 1 )/6 (see the next section). See also Problem 14.1.


14.4 Additional remarks


The lattice Boltzmann method works on a hexagonal lattice and on a square
lattice provided the stresses can relax isotropically. This requirement forces us

Free download pdf