Fluid Mechanics: Standard Continuum ModelingThe equations governing fluid mechanics have been known since the 1840's with the development of the NavierStokes equations. The theoretical underpinning of fluid mechanics is surprisingly simple; one must simply evoke conservation of momentum on a small deformable volume, stating that the change in momentum of the element in time equals the applied force. In addition to conservation of momentum, if one assumes that the fluid is incompressible (like water at standard temperatures and pressures) and that the stresses in the fluid are proportional to the fluid's rate of deformation (strain rate), one obtains the incompressible NavierStokes equation where u(x,y, t) is the velocity of the fluid at each point x, y at time t in space (it is a vectorfield; it has a magnitude and direction at each point in space), ρ is the density of the fluid (it is a constant as the fluid is incompressible), P(x, y, t) is the pressure field imposed on the fluid, and ν is the kinematic viscosity which is essentially a measure of how hard it is to shear the fluid. For example, honey has a larger kinematic viscosity ν than water. Many numerical schemes such as finite volume, finite element, and finite difference focus on discretizing this partial differential equation in space and solving for the time evolution of the velocity field u. These methods are generally intuitive but suffer from a couple of problems:
Mesoscopic View: The Lattice Boltzmann TechniqueIntroduction to the TechniqueMotivated by the kinetic theory of fluids, a new technique to simulate fluids was developed in the 1970s: the Lattice Boltzmann technique. At microscopic scales, fluids are composed of individual atoms bumping around and moving in a collective manner. When the behavior of enough atoms are averaged, we obtain the macroscopic Navier Stokes equations as discussed above. In between the microscopic and macroscopic scale lies the mesoscopic scale. The mesoscopic scale describes the probability density f(x,y, u, v t) of finding a particle at the position x, y, with horizontal velocity u and vertical velocity v at time t. Note that f explicitly depends on space and velocity now. At large enough scales, the fluctuations due to the probability density f are averaged out and we obtain the macroscopic NavierStokes equation. At smaller scales, we must track the motion of each atom individually which is a computationally infeasible task. By prescribing physical rules that govern the evolution of f(x,y, u, v,t), it can be shown that, when coarse grained, the behavior of f reproduces the Navier Stokes equations. Deriving the equations that govern f are highly technical; we will not discuss them in detail here. The basic idea is that the evolution of f must obey all physical laws, such as conservation of momentum, mass, and energy, which constrains how f must evolve in time. For a good discussion of deriving the equations governing f, see the Lattice Boltzmann Scholarpedia page. Ultimately, the prescription that works is This equation describes fields of particle f_{i} that move with a constant velocity c_{i} (i.e. the ith type of particle moves with velocity c_{i}). If the particles are on a lattice, they will hop one lattice site per time step in the c_{i} direction. The lattice we used was called "D2Q9," the 2 standing for two dimensions and 9 standing for 9 types of jumpers. The different directions of the jumpers can be seen in the figure below. Note that jumper 0 does not move. In the equation governing the evolution of f, feq is a local equilibrium that depends on the current hydrodynamic variables, i.e. density ρ, pressure P, and velocity u and v. w is the relaxation frequency towards the local equilibrium field feq. It can be shown that the viscosity of a fluid ν is related to w by Coding Lattice BoltzmannNow that we have discussed the basics of the Lattice Boltzmann method, let us write some pseudo code to help the reader imagine how a simulation would work. Note that our actual code is structured like the below (see it here). # Begin by creating dimensionless parameters from input parameters...discussed more in "Simulation Verification" Although the discussion above may have been intimidating, it is actually relatively straightforwards to computationally implement the Lattice Boltzmann technique; all one has to do is write each of these functions for a desired lattice (in our case D2Q9). Note that the structure of this pseudocode and our eventual final code was loosely based on Sauro Succi's Lattice Boltzmann code written in Fortran (the professor teaching AC274: Computational Fluid Dynamics). Advantages of the Lattice Boltzmann TechniqueThe Lattice Boltzmann technique is clearly nonintuitive in comparison to a naive discretization of the NavierStokes equations. Why do people use it? There are several reasons:

Home >