CFD Lab Course The Lattice Boltzmann Method Philipp Neumann - - PowerPoint PPT Presentation

cfd lab course
SMART_READER_LITE
LIVE PREVIEW

CFD Lab Course The Lattice Boltzmann Method Philipp Neumann - - PowerPoint PPT Presentation

Technische Universit at M unchen CFD Lab Course The Lattice Boltzmann Method Philipp Neumann 20.5.2011 P. Neumann: CFD Lab Course The Lattice Boltzmann Method, 20.5.2011 1 Technische Universit at M unchen Review: The story so


slide-1
SLIDE 1

Technische Universit¨ at M¨ unchen

CFD Lab Course

The Lattice Boltzmann Method

Philipp Neumann

20.5.2011

  • P. Neumann: CFD Lab Course

The Lattice Boltzmann Method, 20.5.2011 1

slide-2
SLIDE 2

Technische Universit¨ at M¨ unchen

Review: The story so far

So far: Navier–Stokes

  • Compute pressure and velocity of the fluid
  • Nonlinear equations
  • Equation system to be solved in each timestep

However:

  • Only valid in the continuum regime, that is for

Kn := lmfp Lc << 1 Kn Knudsen number, lmfp mean free path of fluid molecules, Lc characteristic length of flow system

  • Not that trivial to bring Navier–Stokes to supercomputers
  • P. Neumann: CFD Lab Course

The Lattice Boltzmann Method, 20.5.2011 2

slide-3
SLIDE 3

Technische Universit¨ at M¨ unchen

Lattice What???

Lattice Boltzmann Method: Derived from Boltzmann equation (→ microscopic description)

  • Describes fluid by means of statistics

→ Find probability f( x, v, t) that fluid molecules are in a small surrounding of x at time t with a certain velocity v

  • Macroscopic quantities are obtained by integration over the

velocity space: ρ(x, t) =

  • −∞

f( x, v, t)dv ρ(x, t) u =

  • −∞

f( x, v, t) v dv (1) with fluid density ρ and fluid velocity u

  • Assumption “Ideal gas” ⇒ Pressure p = c2

sρ, cs speed of sound

  • P. Neumann: CFD Lab Course

The Lattice Boltzmann Method, 20.5.2011 3

slide-4
SLIDE 4

Technische Universit¨ at M¨ unchen

Lattice What???

Problems:

  • Probabilities live in a 2D + 1-dimensional space

→ “Curse of dimensionality”

  • Integration over infinite domains can be quite hard
  • P. Neumann: CFD Lab Course

The Lattice Boltzmann Method, 20.5.2011 4

slide-5
SLIDE 5

Technische Universit¨ at M¨ unchen

Lattice What???

Problems:

  • Probabilities live in a 2D + 1-dimensional space

→ “Curse of dimensionality”

  • Integration over infinite domains can be quite hard

How can we solve these issues?

  • P. Neumann: CFD Lab Course

The Lattice Boltzmann Method, 20.5.2011 4

slide-6
SLIDE 6

Technische Universit¨ at M¨ unchen

Welcome to the dark ages: Castle invasion

Let’s find a simple model for a castle invasion: Assume Q bowmen on a castle tower, defending the castle. Assume, we have ‘fair” battle, i.e. there are only Q invaders

  • P. Neumann: CFD Lab Course

The Lattice Boltzmann Method, 20.5.2011 5

slide-7
SLIDE 7

Technische Universit¨ at M¨ unchen

Welcome to the dark ages: Castle invasion

Let’s find a simple model for a castle invasion: Assume Q bowmen on a castle tower, defending the castle. Assume, we have ‘fair” battle, i.e. there are only Q invaders

  • Each bowman can shoot arrows only

into the direction of one enemy (and vice versa)

  • P. Neumann: CFD Lab Course

The Lattice Boltzmann Method, 20.5.2011 5

slide-8
SLIDE 8

Technische Universit¨ at M¨ unchen

Welcome to the dark ages: Castle invasion

Let’s find a simple model for a castle invasion: Assume Q bowmen on a castle tower, defending the castle. Assume, we have ‘fair” battle, i.e. there are only Q invaders

  • Each bowman can shoot arrows only

into the direction of one enemy (and vice versa)

  • If a bowman does not have any more

arrows, he gets new arrows from the

  • ther bowmen
  • P. Neumann: CFD Lab Course

The Lattice Boltzmann Method, 20.5.2011 5

slide-9
SLIDE 9

Technische Universit¨ at M¨ unchen

Welcome to the dark ages: Castle invasion

Let’s find a simple model for a castle invasion: Assume Q bowmen on a castle tower, defending the castle. Assume, we have ‘fair” battle, i.e. there are only Q invaders

  • Each bowman can shoot arrows only

into the direction of one enemy (and vice versa)

  • If a bowman does not have any more

arrows, he gets new arrows from the

  • ther bowmen
  • The arrows coming from the enemies

are collected and re-used by the bowmen

  • P. Neumann: CFD Lab Course

The Lattice Boltzmann Method, 20.5.2011 5

slide-10
SLIDE 10

Technische Universit¨ at M¨ unchen

Dark ages ↔ Lattice Boltzmann

Q Bowmen on a tower Probability densities fi (i = 1, ..., Q) in a (cubic) lattice cell Q directions for the arrows Q lattice velocities ci for fluid molecules Re-distribution of arrows Collision process between populations fi within a cell Incoming arrows from Q attackers Molecules streamed from Q neighboured cells

  • P. Neumann: CFD Lab Course

The Lattice Boltzmann Method, 20.5.2011 6

slide-11
SLIDE 11

Technische Universit¨ at M¨ unchen

Collision and Streaming

1 collision + 1 streaming = 1 timestep

  • P. Neumann: CFD Lab Course

The Lattice Boltzmann Method, 20.5.2011 7

slide-12
SLIDE 12

Technische Universit¨ at M¨ unchen

Reduce the effort...

Problems:

  • Probabilities live in a 2D + 1-dimensional space → “Curse of

dimensionality”

  • Integration over infinite domains can be quite hard

Our discrete formulation...

  • P. Neumann: CFD Lab Course

The Lattice Boltzmann Method, 20.5.2011 8

slide-13
SLIDE 13

Technische Universit¨ at M¨ unchen

Reduce the effort...

Problems:

  • Probabilities live in a 2D + 1-dimensional space → “Curse of

dimensionality”

  • Integration over infinite domains can be quite hard

Our discrete formulation...

  • ... lives in a D + 1-dimensional space, having Q unknowns per

lattice cell

  • P. Neumann: CFD Lab Course

The Lattice Boltzmann Method, 20.5.2011 8

slide-14
SLIDE 14

Technische Universit¨ at M¨ unchen

Reduce the effort...

Problems:

  • Probabilities live in a 2D + 1-dimensional space → “Curse of

dimensionality”

  • Integration over infinite domains can be quite hard

Our discrete formulation...

  • ... lives in a D + 1-dimensional space, having Q unknowns per

lattice cell

  • ... can easily (and locally!) handle the integration procedure:

ρ =

Q

  • i=1

fi ρ u =

Q

  • i=1

fi ci

  • P. Neumann: CFD Lab Course

The Lattice Boltzmann Method, 20.5.2011 8

slide-15
SLIDE 15

Technische Universit¨ at M¨ unchen

Collision

  • Interaction of local populations fi inside each lattice cell
  • Denote the post-collision state by f ∗

i

  • Assume, our system is close to an equilibrium state
  • If f eq

i

represents the equilibrium state of the fluid system, the molecular collisions should drive our system even closer towards this equilibrium BGK model (Bhatnagar – Gross – Krook): f ∗

i (x, t) = fi(x, t) − 1

τ

  • fi(x, t) − f eq

i

  • with relaxation time τ ∈ (0.5, 2)
  • P. Neumann: CFD Lab Course

The Lattice Boltzmann Method, 20.5.2011 9

slide-16
SLIDE 16

Technische Universit¨ at M¨ unchen

The equilibrium distribution

  • Can be derived from the Maxwell-Boltzmann distribution
  • Equilibrium state only depends on macroscopic quantities (ρ,

u) f eq

i

(ρ, u) = wiρ

  • 1 +

ci · u c2

s

+

  • ci ·

u 2 2c4

s

− u · u 2c2

s

  • with cs :=

1 √ 3 speed of sound on the lattice

  • P. Neumann: CFD Lab Course

The Lattice Boltzmann Method, 20.5.2011 10

slide-17
SLIDE 17

Technische Universit¨ at M¨ unchen

The Lattice Boltzmann Algorithm

Given: fi(x, tstart) everywhere in our computational domain for (t = tstart; t < tend; t = t + dt) ; do done

  • P. Neumann: CFD Lab Course

The Lattice Boltzmann Method, 20.5.2011 11

slide-18
SLIDE 18

Technische Universit¨ at M¨ unchen

The Lattice Boltzmann Algorithm

Given: fi(x, tstart) everywhere in our computational domain for (t = tstart; t < tend; t = t + dt) ; do Compute density and velocity inside a fluid cell: ρ =

i

fi, ρ u =

i

fi ci done

  • P. Neumann: CFD Lab Course

The Lattice Boltzmann Method, 20.5.2011 11

slide-19
SLIDE 19

Technische Universit¨ at M¨ unchen

The Lattice Boltzmann Algorithm

Given: fi(x, tstart) everywhere in our computational domain for (t = tstart; t < tend; t = t + dt) ; do Compute density and velocity inside a fluid cell: ρ =

i

fi, ρ u =

i

fi ci Local collision: f ∗

i (x, t) = fi(x, t) − 1 τ

  • fi(x, t) − f eq

i

(ρ, u)

  • done
  • P. Neumann: CFD Lab Course

The Lattice Boltzmann Method, 20.5.2011 11

slide-20
SLIDE 20

Technische Universit¨ at M¨ unchen

The Lattice Boltzmann Algorithm

Given: fi(x, tstart) everywhere in our computational domain for (t = tstart; t < tend; t = t + dt) ; do Compute density and velocity inside a fluid cell: ρ =

i

fi, ρ u =

i

fi ci Local collision: f ∗

i (x, t) = fi(x, t) − 1 τ

  • fi(x, t) − f eq

i

(ρ, u)

  • Streaming to/ from neighbours: fi(x +

cidt, t + dt) = f ∗

i (x, t)

done

  • P. Neumann: CFD Lab Course

The Lattice Boltzmann Method, 20.5.2011 11

slide-21
SLIDE 21

Technische Universit¨ at M¨ unchen

The Lattice Boltzmann Algorithm

Given: fi(x, tstart) everywhere in our computational domain for (t = tstart; t < tend; t = t + dt) ; do Compute density and velocity inside a fluid cell: ρ =

i

fi, ρ u =

i

fi ci Local collision: f ∗

i (x, t) = fi(x, t) − 1 τ

  • fi(x, t) − f eq

i

(ρ, u)

  • Streaming to/ from neighbours: fi(x +

cidt, t + dt) = f ∗

i (x, t)

done fi(x + cidt, t + dt) = fi(x, t) − 1 τ

  • fi − f eq

i

  • P. Neumann: CFD Lab Course

The Lattice Boltzmann Method, 20.5.2011 11

slide-22
SLIDE 22

Technische Universit¨ at M¨ unchen

Remarks

  • P. Neumann: CFD Lab Course

The Lattice Boltzmann Method, 20.5.2011 12

slide-23
SLIDE 23

Technische Universit¨ at M¨ unchen

Remarks

  • Explicit method, no equation system that needs to be solved!
  • P. Neumann: CFD Lab Course

The Lattice Boltzmann Method, 20.5.2011 12

slide-24
SLIDE 24

Technische Universit¨ at M¨ unchen

Remarks

  • Explicit method, no equation system that needs to be solved!
  • Asymptotic theory: In the continuum limit (Kn→0):

Lattice Boltzmann → (incompr.) Navier-Stokes

  • P. Neumann: CFD Lab Course

The Lattice Boltzmann Method, 20.5.2011 12

slide-25
SLIDE 25

Technische Universit¨ at M¨ unchen

Remarks

  • Explicit method, no equation system that needs to be solved!
  • Asymptotic theory: In the continuum limit (Kn→0):

Lattice Boltzmann → (incompr.) Navier-Stokes

  • Lattice Boltzmann: Simulation of weakly compressible flows

→ ρ ≈ 1.0,

  • u << cs
  • P. Neumann: CFD Lab Course

The Lattice Boltzmann Method, 20.5.2011 12

slide-26
SLIDE 26

Technische Universit¨ at M¨ unchen

Boundary Conditions: Back to the dark ages

Bowman vs. Bowman What should a bow- man do when there’s no enemy?

  • P. Neumann: CFD Lab Course

The Lattice Boltzmann Method, 20.5.2011 13

slide-27
SLIDE 27

Technische Universit¨ at M¨ unchen

Boundary conditions - No-slip wall

  • No-slip wall ⇔

u = 0 at wall

  • P. Neumann: CFD Lab Course

The Lattice Boltzmann Method, 20.5.2011 14

slide-28
SLIDE 28

Technische Universit¨ at M¨ unchen

Boundary conditions - No-slip wall

  • No-slip wall ⇔

u = 0 at wall

  • In “Dark Ages”-words:

If an arrow (loaded with particles) leaves the domain ⇔ An arrow with the same amount of particles needs to enter the domain

  • P. Neumann: CFD Lab Course

The Lattice Boltzmann Method, 20.5.2011 14

slide-29
SLIDE 29

Technische Universit¨ at M¨ unchen

Boundary conditions - No-slip wall

  • No-slip wall ⇔

u = 0 at wall

  • In “Dark Ages”-words:

If an arrow (loaded with particles) leaves the domain ⇔ An arrow with the same amount of particles needs to enter the domain

  • Write f ∗

i (x, t) to f ∗ inv(i)(x +

cidt, t)

  • Similar modeling of moving walls (see worksheet)
  • P. Neumann: CFD Lab Course

The Lattice Boltzmann Method, 20.5.2011 14

slide-30
SLIDE 30

Technische Universit¨ at M¨ unchen

Worksheet 2: 3D Cavity flow

  • Program a 3D cavity based on the D3Q19 Lattice Boltzmann

model (→ 3D, 19 lattice velocities)

  • P. Neumann: CFD Lab Course

The Lattice Boltzmann Method, 20.5.2011 15

slide-31
SLIDE 31

Technische Universit¨ at M¨ unchen

Worksheet 2: 3D Cavity flow

  • Program a 3D cavity based on the D3Q19 Lattice Boltzmann

model (→ 3D, 19 lattice velocities)

  • Simulate cavities at different Reynolds numbers

→ kinematic viscosity ν is defined by ν = c2

s

  • τ − 1

2

  • → viscosity limited to the range
  • 0, 1

2

  • → velocity needs to be (much) smaller than the speed of sound
  • P. Neumann: CFD Lab Course

The Lattice Boltzmann Method, 20.5.2011 15