The lattice-Boltzmann Method Introduction - ParCFD · 2007. 5. 22. · The lattice-Boltzmann Method...

15
The lattice-Boltzmann Method Introduction Gunther Brenner Institute of Applied Mechanics Clausthal University ParCFD, Antalya, 21 May 2007 2 Contents Part 1: LBM Theorie Introduction - classification - top-down versus bottom-up development - cellular automata - HPP, FHP and LGA From LGA to LBA/LBM - comparison LBM in detail - from Boltzmann to Navier Stokes - liskrete Boltzmann equation - lattice BGK method

Transcript of The lattice-Boltzmann Method Introduction - ParCFD · 2007. 5. 22. · The lattice-Boltzmann Method...

Page 1: The lattice-Boltzmann Method Introduction - ParCFD · 2007. 5. 22. · The lattice-Boltzmann Method Introduction Gunther Brenner Institute of Applied Mechanics Clausthal University

The lattice-Boltzmann Method

Introduction

Gunther Brenner

Institute of Applied MechanicsClausthal University

ParCFD, Antalya, 21 May 2007

2Contents

Part 1: LBM Theorie

Introduction- classification- top-down versus bottom-up

development- cellular automata- HPP, FHP and LGA

From LGA to LBA/LBM- comparison

LBM in detail- from Boltzmann to Navier Stokes- liskrete Boltzmann equation- lattice BGK method

Page 2: The lattice-Boltzmann Method Introduction - ParCFD · 2007. 5. 22. · The lattice-Boltzmann Method Introduction Gunther Brenner Institute of Applied Mechanics Clausthal University

3Contents

Part 2: LBM in practice

Lattice Boltzmann algorithm

Boundary Conditions

Implementation

4Contents

Part 3: LBM - modeling of complex fluids

Prof. Manfred Krafczyk, TU Braunschweig

Tuesday, 22.5.07

Page 3: The lattice-Boltzmann Method Introduction - ParCFD · 2007. 5. 22. · The lattice-Boltzmann Method Introduction Gunther Brenner Institute of Applied Mechanics Clausthal University

5Contents

Part 4: LBM - Parallel and HPC issues

Dr. Gerhard Wellein, RRZE Erlangen,Dr. Peter Lammers, RUS StuttgartThomas Zeiser, RRZE Erlangen

Wednesday, 23.5.07

6

partial differential equationse.g. Navier-Stokes

algebraicequation

top-down

discretisation- truncation error- conservation

discrete modelLGA or LBM

bottom-up

multi-scale analysis

top-down vs. bottom-up

Page 4: The lattice-Boltzmann Method Introduction - ParCFD · 2007. 5. 22. · The lattice-Boltzmann Method Introduction Gunther Brenner Institute of Applied Mechanics Clausthal University

7

Boltzmann equation- two particle collisions- molecular chaos hypothesis- external forces // collisions

)( fQffft =∂+∂+∂ cx Kc

Classical mechanics- Hamiltons equation- Liouville equation

Molecular Dynamics methodsDirect Simulation Monte Carlo

Classification

Balance of- Mass- Momentum- Energy

0=∂+∂ ijxit Πuj

ρ0=∂+∂ jxt u

jρρ

0=∂+∂ jxt Eej

ρ

),(),( tuutΠ ijjiij xx σρ +=

ijijij p τδσ +−≡

8

Ensemble averageChapman-Enskog

Makro-level

Continuumconservation eqs.e.g. Navier-Stokes

, , ,p uρ νr

Mikro-level

Boltzmannequation

Meso-level

lattice-gasequation

abstraction

Ensemble averageChapman-Enskogin discrete system

Classification

Page 5: The lattice-Boltzmann Method Introduction - ParCFD · 2007. 5. 22. · The lattice-Boltzmann Method Introduction Gunther Brenner Institute of Applied Mechanics Clausthal University

9cellular automata

cellular automata (CA)

- idealized physical system- state defined at discrete times and locations- finite levels of discrete states

- simultaneous update of state variables in discrete time steps- deterministic and homogeneous rules of update- rules depend on neighborhood states

Neumann Moore

10cellular automata: HPP

lattice gas automataorigin: Hardy, de Pazzi und Pomeau (1976)

- Cartesian grid- propagation along grid links

4 directions corresponding to 4 discrete states

- max. 1 bit each direction each node- simple collision rules

„no collision“„head on collision“„transparent collision“

n n+1

Page 6: The lattice-Boltzmann Method Introduction - ParCFD · 2007. 5. 22. · The lattice-Boltzmann Method Introduction Gunther Brenner Institute of Applied Mechanics Clausthal University

11cellular automata: HPP

example HPP LGA - Chopard (1996)

expansion

after reversingtime step

12

1cα =nα

( , ) ( ) ( ) 0..6 , n t x c n t,x nα α α α ατ τ α+ + − = Δ =r r r

two dimensional Lattice-Gas AutomataFHP - Frisch, Hasslacher, Pomeau

1. Step: Propagation Fluid- Particle

2. Step : Collision Partikel / Particle Particle / Wall

cellular automata: LGA FHP

Density:

Massflux:

3. Step : Ensemble Average –Pressure, density, fluxes, …

⎩⎨⎧

== αα nf∑=α

αρ f

∑=α

ααρ fcu

Page 7: The lattice-Boltzmann Method Introduction - ParCFD · 2007. 5. 22. · The lattice-Boltzmann Method Introduction Gunther Brenner Institute of Applied Mechanics Clausthal University

13cellular automata: LGA FHP

Relation to macroscopic magnitudes

uuuu Δ+∇−=∇+∂∂ ν

ρρ pg

t

1))((

( ) 0=∇+∂∂ uρρt

)(ρg Nonlinear scaling term

ρ2scp =

14

Lattice-Gas Automata – some properties

☺ guarantees conservation principles at micro-level☺ quite simple algorithm ☺ only Boolean operations, no truncation error, no error propagation☺ unconditionally stable, though explicit in time

solution is noisy due to averaging in finite ensembleviscosity hard to control and prescribed by collision modelnonlinear scaling term in advection term is unphysical no chance for “healing”, just symptomatic treatment

lattice-Boltzmann method (McNamara and Zanetti)

cellular automata

Page 8: The lattice-Boltzmann Method Introduction - ParCFD · 2007. 5. 22. · The lattice-Boltzmann Method Introduction Gunther Brenner Institute of Applied Mechanics Clausthal University

15LGA and LBA

diskrete (Boolsche) states

collision rules

unconditionally stable

continuousdistribution functions

relaxation term

conditionally stable

From lattice-Gas to lattice-Boltzmann

lattice Gas lattice Boltzmann

),(),( tntf xx αα =),( tn xα

16

c

xc

yc

zc

cx

z

y

x

Boltzmann equation

)( fQffft =∂+∂+∂ cx Kc ),,( cxtff =

From Boltzmann to NS equation

Page 9: The lattice-Boltzmann Method Introduction - ParCFD · 2007. 5. 22. · The lattice-Boltzmann Method Introduction Gunther Brenner Institute of Applied Mechanics Clausthal University

17

Boltzmann equation

)( fQffft =∂+∂+∂ cx Kc ),,( cxtff =

Moments of distribution functions

),(

),(

),(

221 xcc

xucc

xc

c

c

c

tedmf

tdmf

tmdf

ρ

ρ

ρ

=

=

=

∫∫∫

From Boltzmann to NS equation

),,( 221 cc mmmk =ψ

Invariants

18

Boltzmann equation

)( fQffft =∂+∂+∂ cx Kc ),,( cxtff =

),,(,0)()( 221 cccc

cmmmdfQ kk ==∫ ψψ

Invariants of collision term

From Boltzmann to NS equation

Page 10: The lattice-Boltzmann Method Introduction - ParCFD · 2007. 5. 22. · The lattice-Boltzmann Method Introduction Gunther Brenner Institute of Applied Mechanics Clausthal University

19

Integration of Boltzmann equation

0)( =∂+∂∫c x cc dfftkψ

:0 m=ψ 0=∂+∂ uxρρt:31 cm=Lψ 0=∂+∂ Πu xρt:2

21

4 cm=ψ 0=∂+∂ Εxetρ

0=∂+∂ ijjxit Πuρ

∫=c jiij fdccmtxΠ c),( ∫=

c ii fdcmtxE cc221),(

0=∂+∂ jjxt uρρ

0=∂+∂ jxt Eej

ρ

From Boltzmann to NS equation

20From Boltzmann to NS equation

Decomposition of the velocity iii wuc +=

∫+=c

cfdwwuutxΠ jijiij ρρ),(

( ) ( )ijsxjixit cuuujj

ρδρρ 2−∂=∂+∂

“Macrosopic” momentum equation of inviscid flow

⎟⎟⎠

⎞⎜⎜⎝

⎛ −−⋅=2

2

2 2

)(exp

)2( 23

ss

eq

ccf

ucπρ

Maxwell distribution (equilibrium)

ρ2scp =

ijjiij p τδσ +=

RTcs =2

Page 11: The lattice-Boltzmann Method Introduction - ParCFD · 2007. 5. 22. · The lattice-Boltzmann Method Introduction Gunther Brenner Institute of Applied Mechanics Clausthal University

21From Boltzmann to Lattice Boltzmann

Solution of Boltzmann equation:H-theorem and Maxwell distribution results in Krook equation(BGK Approximation)

Chapman-Enskog Expansion

L+++= )2(2)1( ffff eq εε

)(),( 32

ijkxixjxij uuuRTtkji

δρττ ∂−∂+∂−=x

)(1

ffff eqt −=∂+∂

τxc

2~ scτν

22From Boltzmann to NS equation

44 344 2144344214444 34444 21heatflux

j

ofwork

jii

transportconvective

iii fdwfdwwufduutE cwccwuxc

σcc ∫∫∫ +++= 2

212

212

21),( ρρρρ

( ) ( )jijixjxt qupeuejj

+−∂=+∂+∂ τρρ

“Macrosopic” energy equation

Energy flux

TRTtqjxm

kj ∂−= τρ2

5),(x

Page 12: The lattice-Boltzmann Method Introduction - ParCFD · 2007. 5. 22. · The lattice-Boltzmann Method Introduction Gunther Brenner Institute of Applied Mechanics Clausthal University

23

),(),(~

),( xex,cx, tftftf αα =⇒

Representation in discrete velocities

)(),(),( ααααα τff

ttftttf eq −Δ=−Δ+Δ+ xex

[ ] ..),(),(),(),( SRttftttft

tfttf =Δ+−Δ+Δ+ΔΔ+−Δ+ xexx

exx αααααα

Lattice Boltzmann Equation xe Δ=Δtfor α

)(1

ααααα τffff eq

t −=∂+∂ xe

Velocity-discrete Boltzmann Equation

(STR Approximation)

1

4

3

52

6

7 8

0

D2Q9

From Boltzmann to Lattice Boltzmann

D3Q19

24From Boltzmann to Lattice Boltzmann

Equlibrium velocity distribution for lattice Boltzmann Equation- no direct transfer of Maxwell distribution

?eqeq ff =α

Moments of equilibrium velocity distribution shall satisfy

∑∫ ≅∞

−∞= αααα ψψ

ec

ecc )()( eqeq fWdf

up to 2th order !

⎪⎭

⎪⎬⎫

⎪⎩

⎪⎨⎧

⎟⎟⎠

⎞⎜⎜⎝

⎛−++= α

αααα δρ

2221

sssp

eq

ccctf

eeuuue

After linearisation

Page 13: The lattice-Boltzmann Method Introduction - ParCFD · 2007. 5. 22. · The lattice-Boltzmann Method Introduction Gunther Brenner Institute of Applied Mechanics Clausthal University

25

Relation to macroscopic properties

from moments of distribution function

- density

- massflux

- momentum flux

from scale analysis (Chapman Enskog)

- pressure

(weakly compressible)

- viscosity

ρ2scp =

( ) tcs Δ−= 212 τν

∑=α αρ fm

∑=α ααρ femu ii ,

)(,, αα ααατ ffeem eqjiij −= ∑

From Boltzmann to Lattice Boltzmann

26From Boltzmann to Lattice Boltzmann

Summary:

BG Krook equation (STR)

)(1

ffff eqt −=∂+∂

τxc

Boltzmann equation

)( fQffft =∂+∂+∂ cx Kc

Velocity discrete BGK (1. order DGL in diagonalform)

)(1

ααααα τffff eq

t −=∂+∂ xe

Finite difference approximation

)(),(),( ααααα τff

ttftttf eq −Δ=−Δ+Δ+ xex

Page 14: The lattice-Boltzmann Method Introduction - ParCFD · 2007. 5. 22. · The lattice-Boltzmann Method Introduction Gunther Brenner Institute of Applied Mechanics Clausthal University

27

Solid nodes

Boundary Conditions for complex geometries

MAC approach to describe geometry

no-slip wall boundary condition applying “bounce back”

allows to represent arbitrarily complex structures

allows quasi automatic generation of meshes

Solid nodes

From Boltzmann to Lattice Boltzmann

28Lattice Boltzmann

Advantage of LBM

simple, explicit Algorithms- low memory requirements- data locality- high Performance on many processor architectures- advantages regarding parallel processing

complex geometries via immersed boundaries- Cartesian grids- Modeling of geometry from Computer Tomography or other

interferometry

Page 15: The lattice-Boltzmann Method Introduction - ParCFD · 2007. 5. 22. · The lattice-Boltzmann Method Introduction Gunther Brenner Institute of Applied Mechanics Clausthal University

29Lattice Boltzmann

Summary LBM Theory

LBM is not an attempt to duplicate exactly microscopic processes like in molecular dynamics schemes

LBM is an abstraction of these processes

LBM leads to a solution of the Navier-Stokes equations in certain limits such as low Mach number and weak compressibility

simple algorithmic structure (stream – relax)

Note: In contrats to LGA, LBM does have stability limits

30Lattice Boltzmann

Variants of LBM

incompressible fluidsMulti-time relaxation scheme (improvement of stability)Spezies transport and chemical reactions, combustionenergy transport (often hybrid methods)turbulence models (ke, LES, … ) free surface / immiscible fluidsmulti-phase flows non-Newtonian fluidsComposite grids / local grid refinement / non-Cartesian gridsHigher order boundary conditions / curved boundaries