Introduction to the lattice Boltzmann method · Introduction Molecular dynamics Lattice Boltzmann...

Preview:

Citation preview

Introduction to the lattice Boltzmann method

Física dos Meios Contínuos – Faculdade de Ciências da Universidade de Lisboa

2

Computational fluid dynamics

● Solve the Navier-Stokes equation in the macroscopic limit;

● Finite differences, finite volumes, lattice-Boltzmann (LBM), smoothed particles hydrodynamics (SPH), …

3

Finite differences

● Regular grids;● Easy to implement;● Direct implementation of the differential equations;● Runge-Kutta metods;● Lack of stability;● Difficult to treat complex boundaries.

4

Finite volumes

● Irregular grids;● Professional software;● Fine grids close to corners;● Complicated for moving parts, complex geometries and interfaces.

5

Example of application: Gearbox

● Moving parts● Complex geometry● Free surface● Fluid-structure

interaction● Turbulence

6

Applications

Porous media Hydraulic pumps

Multiphase fluids Medical research

7

Introduction

● Do not discretize the Navier-Stokes directly;

● Modeling a gas from a mesoscopic point of view;

● High performance in parallel architectures;

● Simple mesh generation: cartesian grid;

● Many physical models;

Ludwig Eduard Boltzmann

(1844-1906)

The lattice Boltzmann method

8

Introduction

Molecular dynamics Lattice Boltzmann Finite volumes

9

Introduction

Lattice Boltzmann

10

Introduction

Lattice Boltzmann

Gaussian quadrature

Numerical method to calculate integrals

Ex.: density

11

Introduction

Lattice Boltzmann

Gaussian quadrature Boltzmann equation

Numerical method to calculate integrals

Gives the time evolution of the

distribution function

Ex.: density

Important concepts: Distribution function, Boltzmann equation, Gaussian quadrature

12

Distribution function

13

Distribution function

Total number of particles Distribution of number of particles

14

Distribution function

Total number of particles Distribution of number of particles

Total mass

15

Distribution function

Total number of particles Distribution of number of particles

Total mass

= (⍴( x,t)

16

Macroscopic fields (moments)

Density

Momentum -> velocity

Energy -> temperature

Connection between microscopic and macroscopic

17

Equilibrium distribution

Maxwell-Boltzmann distribution function: used in the classical LBM

Probability density to find a particle with velocity u in a gas with density ρ and temperature θ.

Fields at equilibrium

18

Equilibrium distribution

Maxwell-Boltzmann distribution function: used in the classical LBM

Probability density to find a particle with velocity u in a gas with density ρ and temperature θ.

Fields at equilibrium

Second order expansion in Hermite polynomials (to use the Gauss-Hermite quadrature)

Approximation: small Mach number

19

Hermite polynomials

Hermite weight function

Orthogonalization

Rodrigues’ formula

The Hermite polynomials are the mathematical basis of the LBM: Gauss-Hermite quadrature and expansion of the equilibrium distribution function. In D dimensions they are:

where

20

Expansion of the EDF

Maxwell-Boltzmann distribution

21

Expansion of the EDF

Expansion in Hermite polynomials

Maxwell-Boltzmann distribution

Projections of the distribution function on the Hermite polynomials

22

Expansion of the EDF

Expansion in Hermite polynomials

Maxwell-Boltzmann distribution

Hermite polynomials

Hermite weight function

Order of the expansion

Projections of the distribution function on the Hermite polynomials

23

Expansion of the EDF

Expansion in Hermite polynomials

Maxwell-Boltzmann distribution

Hermite polynomials

Hermite weight function

Order of the expansion

Projections of the distribution function on the Hermite polynomials

Ex.: expansion up to second order (K=2)

24

Time evolution

Without collisions and external force

25

Time evolution

Without collisions

26

Time evolution

27

Time evolution

28

Boltzmann equation

Now considering collisions...

All the physics of the scattering process is contained in the collision operator

29

Collision operator

Two-body collision term

● Tricky to calculate computationally● Not efficient for simulating macroscopic fluids● Unnecessary complexity from the macroscopic point of view

30

Collision operator

Bhatnagar-Gross-Krook (BGK) collision operator: The distribution function f tends exponentially to the equilibrium distribution feq with a characteristic time 𝜏

31

Collision operator

Lattice-BGK equation

Bhatnagar-Gross-Krook (BGK) collision operator: The distribution function f tends exponentially to the equilibrium distribution feq with a characteristic time 𝜏

Related to the kinematic viscosity

32

Collision operator

Lattice-BGK equation

Does it describe the macroscopic equations?

Bhatnagar-Gross-Krook (BGK) collision operator: The distribution function f tends exponentially to the equilibrium distribution feq with a characteristic time 𝜏

Related to the kinematic viscosity

33

Macroscopic equations

Ex.: Equation for density (mass conservation). Integration of the Boltzmann equation

34

Macroscopic equations

Ex.: Equation for density (mass conservation). Integration of the Boltzmann equation

35

Macroscopic equations

General procedure: Chapman-Enskog method.Recovers continuity, Navier-Stokes and energy equations.

Ex.: Equation for density (mass conservation). Integration of the Boltzmann equation

36

Macroscopic equations

Perturbation theory: Expansion for small Knudsen number

Distribution function

Chapman-Enskog method

In the limit of small Knudsen number, the statistics of a fluid is described by the equilibrium distribution function. Off-equilibrium effects (viscosity, heat flux)

appear at non-vanishing Knudsen number.

37

Macroscopic equations

Mass conservation (continuity): recovered with a first order expansion

Momentum conservation (Navier-Stokes): recovered with a second order expansion

Viscosity stress tensor

Energy conservation: recovered with a fourth order expansion (thermal models)

38

Gauss-Hermite quadrature

How to calculate the integrals?

Density Momentum

Lattice Boltzmann:● The equilibrium distribution function (Maxwell-

Boltzmann) is expanded in Hermite polynomials up to order N (usually N=2);

● The phase (velocity and position) space is discretized.

● Regular lattices

Gaussian quadrature: ● Approximate integrals by sums:

● The integrand is needed just at few points ξ𝛼;● The method is exact if the function g(ξ) is polynomial up to a maximum order given by the

quadrature (e.g.: for the D2Q9 lattice, the integration is exact for monomials up to fifth order).

where

39

D2Q9 lattice

Nomenclature DdQq: “d” spatial dimensions and “q” lattice vectorsEx.: D2Q9 - two dimensions and nine velocity vectors

40

D2Q9 lattice

Quadrature equations

where

Nomenclature DdQq: “d” spatial dimensions and “q” lattice vectorsEx.: D2Q9 - two dimensions and nine velocity vectors

For the D2Q9 lattice

where

Up to the fifth moment of the weight function

The MB distribution is expanded up to second order

Solution

41

3D lattice

3D lattices

D3Q19 D3Q27

D3Q27

D3Q19

42

Discrete space

Discrete distribution function

Macroscopic quantities (density and velocity) D2Q9 lattice

Boltzmann equation

Collision step

Streaming step

Δxx

where

Lattice-Boltzmann: Quadrature + Boltzmann Eq.

43

Algorithm

44

Boundary conditions

Bounce back BC

● Used for complex and static obstacles (e.g., porous media);

● No-slip condition;● Do not treat moving boundaries.

● Initial and BC conditions are necessary to solve partial differential equations (e.g., N-S);

● Problem: Calculate the distributions from the macroscopic fields.

Periodic BC● Simulates an infinite periodic system;● Conserves the macroscopic quantities.

45

Forcing scheme

Continuum Boltzmann equation

Discrete form

● External forces (e.g., gravity)● Boundary conditions (e.g., IBM)● Multiphase methods (e.g., Shan-

Chen)

46

Forcing scheme

Method 1 (Guo): calculate the forcing term explicitly (second order accurate)

Method 2 (Shan-Chen): shift the macroscopic velocity in the equilibrium distribution(first order accurate)

Newton’s law

These two methods are equivalent up to first order in Δxt

47

Multiphase model

Interaction potential between the particles

Strength of the interaction (repulsive if G is positive)

Force implemented through the velocity:

Multicomponent fluid: more distributions

48

Conclusion

• Lattice-Boltzmann = Gauss-Hermite quadrature + Boltzmann equation;

• Mesoscopic scale: the LBM numerically solves the Boltzmann equation and “extracts” the macroscopic fields from the distribution functions;

• LBM solves the Navier-Stokes equations (simple mesh generation);

• Naturally treats complex geometries;• Many physical models: multiphase, supersonic, relativistic ...

49

• Kruger et al, The Lattice Boltzmann Method. Springer (2017);

• Sukop and Torme, Lattice Boltzmann Modeling. Springer (2006);

• Landau and Lifshitz, Fluid Mechanics. Elsevier (2013).

Units conversion

Three independent conversion factors are required to generate the dimension of mechanical quantities:

Law of similarity: two incompressible flow systems are dynamically similar if they have the same Reynolds number and geometry

Units conversion

Lattice units● Time step (for one LBM cycle): Δxt = 1● Lattice spacing: Δxx = 1● Fluid density: = 1⍴(

Thermal models

Energy conservation● Fourth order expansion of the equilibrium distribution function;● Higher order lattices (e.g., D2Q37);● Usually less stable than the isothermal models due to the complexity of the lattices.

Advection-diffusion model: treats temperature as a concentration.

Ex.: smoke

Advection Diffusion Advection-Diffusion(convection)

Advection-diffusion model

Advection-diffusion equation for a concentration C (similar to the NS equation)

The concentration is calculated through the distribution and the velocity is taken from another solver

Evolution

Boussinesq approximation: the effect of a small density change creates a buoyancy force density

The density is changed only in the force term, not in the equilibrium distribution

Recommended