0% found this document useful (0 votes)
22 views60 pages

Lattice Boltzmann Method: Rui Liu Chengcheng Lu Junjun Li

This document provides an overview of the Lattice Boltzmann Method (LBM) for fluid simulation. It begins with an introduction that describes LBM as a mesoscopic modeling approach derived from the Boltzmann transport equation. The document then covers the historical perspective of LBM, which evolved from lattice gas automata. It also outlines the general principles of LBM, including the governing lattice Boltzmann equation. Examples are provided to demonstrate LBM, including a hand calculation example of pressure propagation through a pipeline. The document discusses advantages and applications of LBM compared to traditional computational fluid dynamics methods.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views60 pages

Lattice Boltzmann Method: Rui Liu Chengcheng Lu Junjun Li

This document provides an overview of the Lattice Boltzmann Method (LBM) for fluid simulation. It begins with an introduction that describes LBM as a mesoscopic modeling approach derived from the Boltzmann transport equation. The document then covers the historical perspective of LBM, which evolved from lattice gas automata. It also outlines the general principles of LBM, including the governing lattice Boltzmann equation. Examples are provided to demonstrate LBM, including a hand calculation example of pressure propagation through a pipeline. The document discusses advantages and applications of LBM compared to traditional computational fluid dynamics methods.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 60

Lattice Boltzmann Method

Rui Liu
Chengcheng Lu
Junjun Li
Project Outline
• Introduction
• Historical Perspective
• General Principle
• Governing Equation
• Hand-Calculation Example
• Numerical Example
• Field Application
• References
Introduction

Lattice Boltzmann Method is a dynamic method that simulates the macroscopic behavior
of fluids by using a simple mesoscopic model. It inherited the main principles of Lattice
Gas Automaton (LGA) and made improvements. From lattice gas automaton, it is possible
to derive the macroscopic Navier-Stokes equations.
Introduction
Specialty of Lattice Boltzmann Method & Difference from the traditional macroscopic
numerical calculation method:

1. It is based on and starts from Non-equilibrium statistical mechanics and Discrete model

2. It connected dynamic lattice model, whose time, space and velocity phase space are fully
discrete, with Boltzmann equation.

3. The implementation of this method can describe the law of fluid motion without
Solving Navier-Stokes equations
Introduction
Achievements of Lattice Boltzmann method from a macroscopic perspective

1. It connected macroscopic and microscopic world;

2. It connected continuous model and discrete model

3. It is an all-new perspective to understand the nature of fluids.

All in all, its successful application reflect a fundamental principle of scientific research.
That is, conservation is the most fundamental law in the material world, which guides the
movement and development of the material world. There are certain internal links between
the macroscopic and microscopic world, which is in fact a dialectical unity.
Introduction
Compare LBM with CFD
LBM vs. CFD (traditional)

CFD(traditional): Computational Fluid Dynamics, including Navier-


Stokes equations , Euler equation, Burnett equation.
LBM: Lattice-Boltzmann method
Introduction
The extent of gas rarefaction refers to the ratio of the average free path of gas
molecule to the characteristic length.

The Knudsen number (​k↓n ) represents:​ 𝑘↓𝑛 =​𝜆/𝐿

𝜆 is the average free path of gas molecule;


L is the characteristic length.

The following figure will show that different CFD equations could be applied
to different ranges of ​𝑘↓𝑛 .
Introduction
Introduction
Compared with traditional computational fluid dynamics methods, Lattice-Boltzmann method has the
following advantages:

(1) Its algorithm is simple, which can simulate various complicated nonlinear macroscopic phenomena;

(2) It can handle complicated boundary conditions

(3) The values of pressure in the lattice Boltzmann method can be directly solved by the state equation;

(4) It is easy to program, and the processing before and after calculation is also very simple

(5) It is easy to process and complete the parallel tasks based LBM;

(6) It can directly simulate connected-domain flow fields with complex


geometric boundaries, such as porous media.
Historical Perspective

Ludwig Eduard Boltzmann (February 20, 1844


– September 5, 1906) was an Austrian physicist
and philosopher whose greatest achievement
was in the development of statistical mechanics,
which explains and predicts how the properties
of atoms (such as mass, charge, and structure)
determine the physical properties of matter (such
as viscosity, thermal conductivity, and diffusion).
Historical Perspective
LBM Derivation

Novier-stokes equation Engineer

Mathematic
Boltzmann equation LBE
physics

Lattice Gas
Newton automata
Historical Perspective

The Lattice gas model meaning:

Ø to establish a simple model as far as possible to be able to simulate a system


consisting of a large number of particles;

Ø reflecting the true collision of granules, so that we can get the fluid Macro
features for a long time.
Historical Perspective
J·Hardy, Y·Pomeau and O·Pazzis (1973)-HPP Model

Only Four Direction!!


U·Frish, Y·Pomeau and B·HassIacher (1986)-FHP Model

Non-Galilean invariance!!

McNamara and Zanetti(1988)-LB Model

Still improving !!
Historical Perspective

Lattice Gas Automata (LGA,1992):


• Type of cellular automation used to simulate fluid flow
• Precursor to the Lattice Boltzmann Methods

Disadvantages:
• Lack of Galilean invariance
• Statistical noise
• Difficulty in expanding the model to handle three dimensional problems
Why Lattice Boltzmann method?

Simplicity and efficiency

ü When solving compressible Navier-Stokes equations, LBM resembles a pseudo-compressible method,


increasing its simplicity and extensibility through artificial compressibility.

ü Similar pseudo-compression method, LBM does not involve Poisson equation

ü Most of the calculations in LBM are local and more suitable for parallel

Ø LBM requires a lot of memory to store the distribution function, which is also the main bottleneck of
LBM

Ø The nature of LBM is time-dependent, so calculating steady flow is not particularly efficient
Why Lattice Boltzmann method?
Geometry
ü LBM is well suited for mass-conservative fluid simulation of complex boundaries (e.g.
porous media)
ü LBM can well realize mass-conserving mobile boundary problems and it is very attractive
for soft material simulation
Thermal effect
ü Thermal disturbances originate from the microscopic and average macroscopic, LBM
includes them in the mesoscopic description
Ø Simulation of energy conservation in LBM is not straightforward
Sound generation
Ø LBM is not suitable for direct simulation of long-distance acoustic transmission under real
adhesion
Ø LBM does not adapt to strong compressible (eg ultrasonic and transonic) fluids
Why Lattice Boltzmann method?

Multiphase flow and multicomponent flow

ü Many methods for solving multiphase flow and multicomponent flow using LBM
ü LBM is suitable for simulation of multi-phase flow and multi-component flow in complex
boundary
Ø The lattice-based method has the existence of spurious currents between fluid-fluid interface
Ø The current multiphase flow and multicomponent flow methods of LBM do not make good
use of the kinetics principle.
Ø In the simulation of multi-phase flow and multi-component flow, the values ​of viscosity and
density are limited.
General Principles
General Principles
Lattice Gas Automata (LGA)
C3 C2

C4 C1

C5
C6
General Principles

https://www.youtube.com/watch?v=8qorVDJS1QA
General Principles
Lattice Gas Automata (LGA)

Single-Particle Distribution Function Averaged Particle Distribution


(Boolean Variables) (Mesoscopic Variables)
General Principles
Lattice Arrangement

ωi = 4/6, 1/6,
1/6 DnQm

ωi = 1/4 ωi = 2/6, 1/6*4 D3Q15


General Principles
Bounce Back
Good For Porous Media
Governing Equation
Boltzmann Transport Equation
​𝑑𝑓/𝑑𝑡 = (𝑓)
Governing Equation
The Bhatnagar, Gross, Krook and Welander (BGKW) Approximation
Governing Equation
Streaming Collision

LBM Equation

After discretizing
Governing Equation
Chapman-Enskog Expansion
Governing Equation
Relative to Macroscopic View
Hand-Calculation Example
Model & Example Introduction

1. Our calculation example is a long pipeline of oil, whose initial pressure


is zero (t=0; P=0).

2. The pressure of the pipeline’s left boundary changes to one (P=1) when
time goes by (t>0).

3.This example is aimed to simulate the pressure variations of the whole


pipeline as time goes by.

4. This example is based on this assumption that the surroundings outside


the pipeline have no influences on the pipeline’s pressure changes.
Hand-Calculation Example
Model & Example Introduction

Our example could be processed and regarded as D1Q3 model

1. For this example, it would obey this following equation :


​𝝏𝑷/𝝏𝒕 =𝜶​​𝝏↑𝟐 𝑷/𝝏​𝒙↑𝟐

In addition, it is feasible to set that :


𝜶=​𝑨​𝒌↓𝒇 /​𝝁↓𝒈 𝒄​ ↓𝒈 𝑽
​ ↓𝒃 𝑪
​ ↓𝒕 =𝟏/𝟑
Hand-Calculation Example
Model & Example Introduction

For this D1Q3 model, it has following character and definition:

1. In this model, each element has corresponding distribution functions,


the weight factors corresponding to the distribution function ​𝑓↓0, ​𝑓↓1, ​𝑓↓2
are showed below:
​𝒘↓𝒐 =​𝟒/𝟔 ; ​ 𝒘↓𝟏 =​𝟏/𝟔 ; ​𝒘↓𝟐 =​𝟏/𝟔
2. The velocity vectors are defined as follow:
​𝑪↓𝟎 =𝟎; ​𝑪↓𝟏 =𝟏; ​𝑪↓𝟐 =−𝟏
3. The displacement and time interval are defined as follow:
∆𝒕=𝟏; ∆𝒙=𝟏
Hand-Calculation Example

The flow chart of hand-calculation


Hand-Calculation Example
Initialization
1. Initialize macroscopic properties :

As assumed before, when time goes by, the pressure of the left boundary is one
(PBoundary=1)

2.Start the iteration calculation with suitable initialization of distribution function:

For this case, distribution function ​𝑓↓𝑖 is set as ​𝑤↓𝑖 in first element, and in the second and
third elements distribution function ​𝑓↓𝑖 set as ​𝐶↓𝑖 initially.
Hand-Calculation Example

Initialization Calculation------Equilibrium Distribution Function Calculation


As initialization:
​𝑓↓0 (1,0)=​4/6 ;​𝑓↓1 (1,0)=​1/6 ;​𝑓↓2 (1,0)=​1/6 ;
Because,
𝑃(𝑥,𝑡)=∑𝑖=1↑3▒​𝑓↓𝑖 (𝑥,𝑡)
So,
𝑃(1,0)=​𝑓↓0 (1,0)+​𝑓↓1 (1,0)+​𝑓↓2 (1,0)=1;
In addition, the same as the process above:

​𝑓↓0 (2,0)=0;​𝑓↓1 (2,0)=1;​𝑓↓2 (2,0)=−1;


​𝑓↓0 (3,0)=0;​𝑓↓1 (3,0)=1;​𝑓↓2 (3,0)=−1;

Therefore:

𝑃(2,0)=0;𝑃(3,0)=0
Hand-Calculation Example
Initialization Calculation------Equilibrium Distribution Function Calculation
Because,
​𝒇↓𝒊↑𝒆𝒒 (𝒙,𝒕)=​𝒘↓𝒊 𝑷(𝒙,𝒕)
So,
​𝒇↓𝟎↑𝒆𝒒 (𝟏,𝟎)=​𝒘↓𝟏 ×𝑷(𝟏,𝟎)=​𝟒/𝟔 ×𝟏=​𝟒/𝟔 ;

In the same way, the following the result values of equilibrium distribution function could be obtained:

​𝒇↓𝟏↑𝒆𝒒 (𝟏,𝟎)=​𝟏/𝟔 ; ​𝒇↓𝟐↑𝒆𝒒 (𝟏,𝟎)=​𝟏/𝟔 ;

​𝒇↓𝟎↑𝒆𝒒 (𝟐,𝟎)=​𝒇↓𝟏↑𝒆𝒒 (𝟐,𝟎)=​𝒇↓𝟐↑𝒆𝒒 (𝟐,𝟎)=0;

​𝒇↓𝟎↑𝒆𝒒 (𝟑,𝟎)=​𝒇↓𝟏↑𝒆𝒒 (𝟑,𝟎)=​𝒇↓𝟐↑𝒆𝒒 (𝟑,𝟎)=0;


Hand-Calculation Example
Collisions Calculations
1. When calculate collisions, the following equation is obeyed:

​𝑓↓𝑖↑∗ (𝑥,𝑡)=(1-𝜔)​𝑓↓𝑖 (𝑥,𝑡)+𝑤​𝑓↓𝑖↑𝑒𝑞 (𝑥,𝑡)

This model uses BGK Approximation for the collision calculation .


For this example,
∵𝛼=𝜏−​∆𝑡/2 =​1/3 ; ∆𝑡=1; 𝜔=​∆𝑡/𝜏 ;
∴ 𝜔=​6/5
Therefore,
​𝑓↓0↑∗ (1,0)=(1−​6/5 )×​𝟒/𝟔 +​6/5 ×​𝟒/𝟔 =​2/3 ;
​𝑓↓1↑∗ (1,0)=(1−​6/5 )×​𝟏/𝟔 +​6/5 ×​𝟏/𝟔 =​1/6 ;
​𝑓↓2↑∗ (1,0)=(1−​6/5 )×​𝟏/𝟔 +​6/5 ×​𝟏/𝟔 =​1/6 ;
Hand-Calculation Example
Collisions Calculations
In the same way, the following values could be calculated:
​𝑓↓0↑∗ (2,0)=(1−​6/5 )×0+​6/5 ×0=0;
​𝑓↓1↑∗ (2,0)=(1−​6/5 )×1+​6/5 ×0=−​1/5 ;
​𝑓↓2↑∗ (2,0)=(1−​6/5 )×−1+​6/5 ×0=​1/5 ;
And,
​𝑓↓0↑∗ (3,0)=(1−​6/5 )×0+​6/5 ×0=0;
​𝑓↓1↑∗ (3,0)=(1−​6/5 )×1+​6/5 ×0=−​1/5 ;
​𝑓↓2↑∗ (3,0)=(1−​6/5 )×−1+​6/5 ×0=​1/5 ;
Hand-Calculation Example
Streaming Calculations
When calculate streaming, the following equation is obeyed:
​𝑓↓𝑖 (𝑥+​𝑐↓𝑖 ∆𝑡, 𝑡+∆𝑡)=​𝑓↓𝑖↑∗ (𝑥,𝑡)
​𝑪↓𝟎 =𝟎; ​𝑪↓𝟏 =𝟏; ​𝑪↓𝟐 =−𝟏

Therefore,
​𝑓↓0 (1,1)=​𝑓↓0↑∗ (1,0)=​2/3 ;
​𝑓↓0 (2,1)=​𝑓↓0↑∗ (2,0)=0;
​𝑓↓0 (3,1)=​𝑓↓0↑∗ (3,0)=0;
Similarly,

​𝑓↓1 (3,1)=​𝑓↓1↑∗ (2,0)=−​1/5 ;


​𝑓↓1 (2,1)=​𝑓↓1↑∗ (1,0)=​1/6 ;
​𝑓↓1 (1,1)=​𝑓↓1↑∗ (1,0)=​1/6 ; (Boundary Condition)
Hand-Calculation Example
Similarly,
Streaming Calculations
​𝑓↓2 (3,1)=​𝑓↓2↑∗ (3,0)=​1/5 ;
​ ↓2 (2,1)=​𝑓↓2↑∗ (3,0)=​1/5 ;
𝑓
​ ↓2 (1,1)=​𝑓↓2↑∗ (1,0)=​1/6 ; (Boundary Condition)
𝑓

Because they are under boundary condition:

​𝑓↓1 (1,1)=​𝑓↓1↑∗ (1,0)=​1/6 ; (Boundary Condition)


​𝑓↓2 (1,1)=​𝑓↓2↑∗ (1,0)=​1/6 ; (Boundary Condition)
Hand-Calculation Example
Re-Calculation of Macroscopic Properties
As presented above:
𝑃(𝑥,𝑡)=∑𝑖=1↑3▒​𝑓↓𝑖 (𝑥,𝑡)
Submit the latest value of ​𝑓↓𝑖 (𝑥,𝑡) into this equation,
Therefore,
𝑃(1,1)=​𝑓↓0 (1,1)+​𝑓↓1 (1,1)+​𝑓↓2 (1,1)=​2/3 +​1/6 +​1/6 =1;

𝑃(2,1)=​𝑓↓0 (2,1)+​𝑓↓1 (2,1)+​𝑓↓2 (2,1)=0+0+​1/5 =​1/5 ;

𝑃(3,1)=​𝑓↓0 (3,1)+​𝑓↓1 (3,1)+​𝑓↓2 (3,1)=0−​1/5 +​1/5 =0;


Hand-Calculation Example
Re-Calculation------Equilibrium Distribution Function Calculation
As presented above:
​𝒇↓𝒊↑𝒆𝒒 (𝒙,𝒕)=​𝒘↓𝒊 𝑷(𝒙,𝒕)
​𝒘↓𝒐 =​𝟒/𝟔 ; ​ 𝒘↓𝟏 =​𝟏/𝟔 ; ​𝒘↓𝟐 =​𝟏/𝟔
Submit the latest value of 𝑷(𝒙,𝒕) into this equation, therefore:
​𝒇↓𝟎↑𝒆𝒒 (𝟏,𝟏)=​𝒘↓𝟎 𝑷(𝟏,𝟏)=​𝟒/𝟔 ×𝟏=​𝟒/𝟔
​𝒇↓𝟏↑𝒆𝒒 (𝟏,𝟏)=​𝒘↓𝟏 𝑷(𝟏,𝟏)=​𝟏/𝟔 ×𝟏=​𝟏/𝟔
​𝒇↓𝟐↑𝒆𝒒 (𝟏,𝟏)=​𝒘↓𝟐 𝑷(𝟏,𝟏)=​𝟏/𝟔 ×𝟏=​𝟏/𝟔
Similarly:
​𝒇↓𝟎↑𝒆𝒒 (𝟐,𝟏)=​𝒘↓𝟎 𝑷(𝟐,𝟏)=​𝟒/𝟔 ×​𝟏/𝟓 =​𝟐/𝟏𝟓
​𝒇↓𝟏↑𝒆𝒒 (𝟐,𝟏)=​𝒘↓𝟏 𝑷(𝟐,𝟏)=​𝟏/𝟔 ×​𝟏/𝟓 =​𝟏/𝟑𝟎
​𝒇↓𝟐↑𝒆𝒒 (𝟐,𝟏)=​𝒘↓𝟐 𝑷(𝟐,𝟏)=​𝟏/𝟔 ×​𝟏/𝟓 =​𝟏/𝟑𝟎
Hand-Calculation Example
Re-Calculation------Equilibrium Distribution Function Calculation
And similarly:
​𝒇↓𝒊↑𝒆𝒒 (𝒙,𝒕)=​𝒘↓𝒊 𝑷(𝒙,𝒕)

​𝒇↓𝟎↑𝒆𝒒 (𝟑,𝟏)=​𝒘↓𝟎 𝑷(𝟑,𝟏)=​𝟒/𝟔 ×𝟎=𝟎


​𝒇↓𝟏↑𝒆𝒒 (𝟑,𝟏)=​𝒘↓𝟏 𝑷(𝟑,𝟏)=​𝟏/𝟔 ×𝟎=𝟎
​𝒇↓𝟐↑𝒆𝒒 (𝟑,𝟏)=​𝒘↓𝟐 𝑷(𝟑,𝟏)=​𝟏/𝟔 ×𝟎=𝟎

That is a whole process of one iteration, aiming to obtain the final result, more iterations
are needed, here is just an example. When the latest macroscopic properties are pretty
closed to the previous macroscopic result, get out of the iterations and output the final
result.
Matlab Implementation
Define Velocity Vector
Matlab Implementation
% D2Q9 LATTICE CONSTANTS
t = [4/9, 1/9,1/9,1/9,1/9, 1/36,1/36,1/36,1/36];
Cx= [0, 1, 0, -1, 0, 1, -1, -1, 1];
Cy= [0, 0, 1, 0, -1, 1, 1, -1, -1];
Opp=[1, 4, 5, 2, 3, 8, 9, 6, 7];
col = [2:(ly-1)];
[y,x]= mesggrid(1:ly,1:lx);
obst = (x-obst_x).^2 + (y-obst_y).^2 <= obst_r.^2;
obst(:,[1,ly]) = 1;
bbRegion = find(obst);

% INITIAL CONDITION: (rho=0, u=0) ==> fIn(i) = t(i)


fIn = reshape( t' * ones(1,lx*ly), 9, lx, ly);
Matlab Implementation

% MAIN LOOP (TIME CYCLES)


for cycle = 1:maxT

% MACROSCOPIC VARIABLES
rho = sum(fIn); % Density
Ux = reshape ( ...
(cx * reshape(fIn,9,lx*ly)), 1,lx,ly) ./rho;
Uy = reshape ( ...
(cy * reshape(fIn,9,lx*ly)), 1,lx,ly) ./rho
Matlab Implementation

% MACROSCOPIC (DIRICHLET) BOUNDARY


CONDITIONS
% Inlet: Poiseuille profile
L = ly-2; y = col-1.5;
ux(:,1,col) = 4 * uMax / (L*L) * (y.*L-y.*y);
uy(:,1,col) = 0;
rho(:,1,col) = 1 ./ (1-ux(:,1,col)) .* ( ... sum(fIn([1,3,5],
1,col)) + 2*sum(fIn([4,7,8],1,col)) );

% Outlet: Zero gradient on rho/ux


rho(:,lx,col) = rho(:,lx-1,col);
uy(:,lx,col) = 0;
ux(:,lx,col) = ux(:,lx-1,col);
Matlab Implementation

% COLLISION STEP

for i=1:9
cu = 3*(cx(i)*ux+cy(i)*uy);
fEq(i,:,:) = rho .* t(i) .* ...
( 1 + cu + 1/2*(cu.*cu) ...
-3/2*(ux.^2+uy.^2) );
fOut(i,:,:) = fIn(i,:,:) - ...
omega .* (fIn(i,:,:)-fEq(i,:,:));
end
Matlab Implementation
% MICROSCOPIC BOUNDARY CONDITIONS
for i=1:9

% Left boundary
fOut(i,1,col) = fEq(i,1,col) + ...
18*t(i)*cx(i)*cy(i)* ( fIn(8,1,col) - ...
fIn(7,1,col)-fEq(8,1,col)+fEq(7,1,col) );

% Right boundary
fOut(i,lx,col) = fEq(i,lx,col) + ...
18*t(i)*cx(i)*cy(i)* ( fIn(6,lx,col) - ...
fIn(9,lx,col)-fEq(6,lx,col)+fEq(9,lx,col) );

% Bounce back region


fOut(i,bbRegion) = fIn(opp(i),bbRegion);

end
Matlab Implementation
% STREAMING STEP

for i=1:9
fIn(i,:,:) = ...
circshift(fOut(i,:,:), [0,cx(i),cy(i)]);
end
% VISUALIZATION
if (mod(cycle,tPlot)==0)
u = reshape(sqrt(ux.^2+uy.^2),lx,ly);
u(bbRegion) = nan;
imagesc(u');
axis equal off; drawnow
end
end
% end main loop
Results
Other simulation
Flow around moving boundary
Field Application

• Stimulate Material crystal condensation and diffusion


• Application of urban development planning
Stimulation Changing Process

Simulate rules of the surface growth process, the


probability cellular automata rules of the model
forest fire, and the sand pile rules, even simulating
the basic accumulation and collapse of particles like
sand grains.

This method has been widely used in studying the


recrystallization of metallic materials and dendritic
growth of metal solidification process .
Field Application
The lattice Boltzmann method is based on the same idea of cellular automata.

Application of Lattice-Boltzmann method:

1. Land-cover variations

2. Human-land relationships

3. Urban development planning


Field Application

Fig. Numerical simulation of the different forms of the rock cranny

Fig. The arching phenomenon in crowd pedestrian flow

Fig. Simulation result on things of one kind come together


Thank You!

You might also like