Example: stock market

A Practical Introduction to the Lattice Boltzmann Method

A Practical Introduction to theLattice Boltzmann MethodAlexander J. WagnerDepartment of PhysicsNorth Dakota State March 20082 Contents1 Introduction72 The Boltzmann equation93 Derivation of Introduction .. The Boltzmann equation .. The BGK approximation .. Moments of the equilibrium distribution function .. Mass conservation .. Momentum conservation .. Energy conservation .. 134 Lattice The Lattice Boltzmann equation .. Taylor expansion .. One dimensional implementation .. Isothermal Lattice Boltzmann .. Non-ideal fluids .. Boundaries .. 225 Applications of Lattice Turbulence .. Liquid-gas systams .. Two-fluid systems ..256 Non-traditional Lattice Boltzmann Introduction .. No conserved parameter .. Magnetic Systems .. Conserved zeroth moment .. Diffusion .. Electrostatics.

Navier Stokes equations and it was shown that the lattice gas methods could be used to simulate (rather noisy) hydrodynamics. However, the lattice gas methods had several drawbacks consisting mainly of their noisy nature and the apperance of some additional terms in the Navier Stokes level equations that limited their success.

Tags:

  Navier, The navier

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Transcription of A Practical Introduction to the Lattice Boltzmann Method

1 A Practical Introduction to theLattice Boltzmann MethodAlexander J. WagnerDepartment of PhysicsNorth Dakota State March 20082 Contents1 Introduction72 The Boltzmann equation93 Derivation of Introduction .. The Boltzmann equation .. The BGK approximation .. Moments of the equilibrium distribution function .. Mass conservation .. Momentum conservation .. Energy conservation .. 134 Lattice The Lattice Boltzmann equation .. Taylor expansion .. One dimensional implementation .. Isothermal Lattice Boltzmann .. Non-ideal fluids .. Boundaries .. 225 Applications of Lattice Turbulence .. Liquid-gas systams .. Two-fluid systems ..256 Non-traditional Lattice Boltzmann Introduction .. No conserved parameter .. Magnetic Systems .. Conserved zeroth moment .. Diffusion .. Electrostatics.

2 Quantum Mechanics .. Hydrodynamic formulation .. 28A Einstein convention for vectors and tensors33B Functional Derivatives35C Lagrangian multipliers37D Evaluating Gaussian integrals39E Galilean transformations4134 CONTENTSF D1Q5 Lattice Boltzmann code43 CONTENTS5 PrefaceThe Lattice Boltzmann Method is increasingly attracting researchers in many areas from turbulenceto multi-phase flow in porous media. Several textbooks have been written to addressthe need ofstudents to learn about this relatively new aim of this Introduction is to provide a succinct description of the field and to providestudents with sample codes so that they can immediatly apply their knowledge to Practical ap-plications. Source codes, which are provided under the GNU copyright, can be manuscript is still in a rough state and is continuously beeing improoved. Your commentsand corrections are always Wagner, Fargo, March 1 IntroductionWhen simulating traditional fluid dynamics one principally thinks of the continuityand navier -Stokes equations.

3 The is given by t + ( u) = 0( )and expresses that the density is a locally conserved quantity and can only be changed if it isadvected away by a flow with velocityu. So the change of the density is given by the divergenceof the current u. So the only physical content of this equation is that the density in this system islocally conserved. We need to couple this with an equation for the local velocityuand this equationis the , given by t( u) + ( uu) = p+ ( )wherepis the local pressure and is a viscous stress tensor. For the stress is given by = [ u+ ( u)T] + .u1.( )To numerically integrate these equations we need to discretize the derivatives requiring first andsecond order derivatives. There are many possible discretizations of these equations and findingapproproate discrete operators is the subject of the field of . Many of these possible discretizationwill only conserve mass and momentum up to the order of alternative approach to these computational fluid dynamics simulations was invented in thelate 1980s with the Lattice gas methods.

4 These methods allowed particles to move on a discretelattice and local collisions conserved mass and momentum. Because the continuity and NavierStokes equations are only continuous forms of the mass and momentum conservation statementsand Method that locally conserves mass and momentum will obey some kind of continuity andNavier Stokes equations and it was shown that the Lattice gas methods could be usedto simulate(rather noisy) hydrodynamics. However, the Lattice gas methods had several drawbacks consistingmainly of their noisy nature and the apperance of some additional terms in the navier Stokes levelequations that limited their success. It was then discovered that instead of discrete particles adensity distribution could be adevecting which eliminated the noisyness of the Method and allowedfor a more general collision operator. This is the Lattice Boltzmann Method which has been extraor-dinarily successful for many applications including turbulence, multi-component and multi-phaseflows as well als additional applications, including simulations of the Schr odingerequation.

5 Westart by introducing the Boltzmann equation and describe how the hydrodynamic equations canbe obtained from the Boltzmann equation. We then show how the Boltzmann equation can besimulated by a very simple numerical Method leading to the same hydrodynamic we extend the Lattice Boltzmann Method to systems that are not typically described by aBoltzmann equation, namely non-ideal gases and phase-separating multi-component 1. INTRODUCTIONC hapter 2 The Boltzmann equationWe have already seen1that the dynamics of the Boltzmann equation always mimimizes theH-Functional given byH(t) =Zdxdvf(x,v,t) log (f(x,v,t)).( )So we can conclude that the equilibrium distribution functionf0in a volumeVfor a given densityn,mean momentumnuand energyn = 1/2nu2+3/2n will minimize theH-functional. We can useLagrangian multipliers to minimize this functional. With Lagrangian multipliers theH-functionalreadsH(t) =Zdxdvf(x,v,t) logf(x,v,t) 1(nV Zdxdvf(x,v,t)) 2 (nu V Zdxdvf(x,v,t)v ) 3(n V Zdxdvf(x,v,t)v22( )Now we calculate the functional derivative of theH-functional with respect to the distributionfunction.)

6 Since the equilibrium distribution minimizes theH-functional this derivative has tovanish when the distribution is the equilibrium distributionf= != H(t) f f=f0= 1 + log(f0) + 1+ 2 v + 3v22( )We can solve this for the equilibrium distribution:f0= exp" 1 1+ 222 3 32 2 3+v 2#( )Introducing a new set of Lagrangian multipliersa,b andcwe can also write this asf0=aexp (b v)2c ( )Note that this expression does not depend on spatial variables. So we know that the solution willbe homogeneous. We now find the Lagrange multipliers by invoking the conservationlawsnV=Zdxdvf0nu V=Zdxdvf0v nu22V+32n V=Zdxdvf0v22( )1 Kerson Huang, Statistical Mechanics, 2nd ed., chapter 2. THE Boltzmann EQUATIONS olving these equations fora,b andcwe find that the equilibrium distribution is given byf0=n(2 )3/2exp (v u)22 ( )which is known as the Maxwell- Boltzmann :Which function (x) minimizes the functional [ ] =Rba 2(x) + 4(x)dx?

7 :Which function (x) minimizes the functional [ ] =Rba 2(x) + 4(x)dxif the integralRba (x)dx=c(b a) is a constant? Do you obtain different kinds of solutions for certainranges of the constantc? :Derive ( ) [ ,b, andcfor equation ( )].Chapter 3 Derivation of the hydrodynamicequations from the IntroductionIn this lecture we will examine the hydrodynamic limit of the Boltzmann equation and derive thetransport equations for the macroscopic quantities from first principles. We will see that the macro-scopic equations of motion are simply the conservation equations for continuous fields. Because ofthe general concepts involved the transport equations we derive are not only applicable for dilutegases, which we require for the Boltzmann equation to apply, but also for muchdenser is the reason that recently a numerical Method called Lattice Boltzmann hasbeen de-veloped for the simulation of fluids.

8 We will cover the Lattice Boltzmann approach in the The Boltzmann equationThe Boltzmann equation we derived in the last lecture is given by tf+v xf+F vf=Zdv 1dv 2dv2(f 1f 2 f1f2)P12 1 2 ( )Solving this equation analytically is very challenging and can only be done for special The BGK approximationThere Bhatnagar, Gross and Krook noticed, however, that the main effect of the collision term isto bring the velocity distribution function closer to the equilibrium equilibriumdistribution is given by ( )f0(v) =n(2 )3/2e (v u)2/2 ( )wherenis the number density of particle,uis the mean velocity and =kTis the macroscopic quantities are given by moments of the distribution function:Zf=n( )Zfv =nu ( )Zfv2=nu2+ 3n ( )1112 CHAPTER 3. DERIVATION OF HYDRODYNAMICSThe simplest way of approximating the the collision term is by using a singlerelaxation timeapproximationZdv 1dv 2dv2(f 1f 2 f1f2)P12 1 2 1 (f0 f)( )One important feature of this approximation is that mass, momentum and energy are are stillexactly conserved by the collision term.

9 With this approximation the Boltzmann equation reads tf+v xf+F vf=1 (f0 f)( )We can use this expression to approximate the probability density function by the equilibriumdistribution and its derivatives:f=f0 ( tf+v xf+F vf)( ) Moments of the equilibrium distribution functionBecause we can express the distribution function in terms of the equilibrium distribution functionwe will require several velocity moments of the equilibrium distribution function ( ). They areZf0=n,( )Zf0(v u ) = 0,( )Zf0(v u )(v u ) =n ,( )Zf0(v u )(v u )(v u ) = 0,( )Zf0(v u )(v u )(v u)2= 5n 2 .( )This is easily derived using Gaussian integrals (see appendix D). Mass conservationIntegrating over the Boltzmann equation we obtain for the mass conservation equation tZdvf+ Zdvfv +FZdv vf=1 Zdv(f0 f) tn+ (nu ) = 0( )which is the continuity Momentum conservationMultiplying the Boltzmann equation withv and integrating we obtain as a momentum conservationequation tZdvfv + Zdvfv v +F Zdv v fv =1 Zdv(f0 f)v t(nu ) + Zdvfv v nF = 0We now need to use equation ( ) to approximateZdvfv v =Zdvf0v v ( tZdvf0v v + Zdvf0v v v +nF u +nu F )+O( 2) ( ) ENERGY CONSERVATION13To first order in derivatives our conservation equation now reads t(nu ) + (nu u ) = (n ) +nF.

10 ( )This equation is known as the Euler equation. Using the continuity equation ( ) we can alsowrite it as tu +u u = 1n (n ) +F .( )To calculate the equations of motion to second order in the derivatives we need to evaluate thehigher order terms in eqn. ( ). t(Zf0v v )= t(nu u +n )= t(nu )u +nu tu + tn +n t = (nu u )u (n )u nF u nu u u u (n ) nu F (nu ) nu ( ) 23 u = (nu u u ) (n )u (n )u n(F u +u F ) (n u ) 23n u ( )where we used equations ( ),( ) and ( ). We need to combine this with Zf0v v v = (n u ) + (n u ) + (n u ) + (nu u u )( )where we used equation ( ). Combining the terms of the two previous equations we have tZdvf0v v + Zdvf0v v v =n ( u + u ) 23n u ( )Now we can use this expression to obtain the first order momentum conservation from equation( ):n tu +nu u = (n ) +nF + [ ( u + u 23 u )]( )where =n is the viscosity.


Related search queries