2014 - modelos físico-matemáticos de fluidos

136
Arthur Vinicius Secato Rodrigues Fisico-Mathematical Models of Fluids From Mesoscopic to Continuum Florianópolis 2014

Upload: mephis-balthasar

Post on 12-Jan-2016

44 views

Category:

Documents


0 download

DESCRIPTION

Work in English about lattice-boltzmann methods

TRANSCRIPT

Page 1: 2014 - Modelos Físico-Matemáticos de Fluidos

Arthur Vinicius Secato Rodrigues

Fisico-Mathematical Models of Fluids

From Mesoscopic to Continuum

Florianópolis

2014

Page 2: 2014 - Modelos Físico-Matemáticos de Fluidos
Page 3: 2014 - Modelos Físico-Matemáticos de Fluidos

Arthur Vinicius Secato Rodrigues

Modelos Físico-Matemáticos de Fluidos:

Do Mesoscópico ao Contínuo

Monografia submetida ao

Programa de Graduação em Engenharia

de Produção da Universidade Federal

de Santa Catarina para a obtenção do

Grau de Engenheiro Mecânico c/

Habilitação em Engenharia de

Produção.

Orientador: Prof. Dr. Sérgio F. Mayerle

Coorientador: Prof. Dr. Paulo C. Philippi

.

Florianópolis

2014

Page 4: 2014 - Modelos Físico-Matemáticos de Fluidos

Ficha de identificação da obra elaborada pelo autor

através do Programa de Geração Automática da Biblioteca

Universitária da UFSC.

A ficha de identificação é elaborada pelo próprio autor

Maiores informações em:

http://portalbu.ufsc.br/ficha

Page 5: 2014 - Modelos Físico-Matemáticos de Fluidos

Arthur Vinicius Secato Rodrigues

Modelos Físico-Matemáticos de Fluidos:

Do Mesoscópico ao Contínuo

Este Trabalho de Conclusão de Curso foi julgado adequado para

obtenção do Título de Engenheiro Mecânico c/ habilitação em Engenharia

de Produção, e aprovado em sua forma final pelo Departamento de

Engenharia de Produção e Sistemas.

Florianópolis, 1 de dezembro de 2014.

Prof.ª Mônica Maria Mendes Luna, Dr.ª

Coordenadora do Curso

Banca Examinadora:

Prof. Sérgio Fernando Mayerle, Dr.

Orientador

Universidade Federal de Santa Catarina

Prof. Paulo Cesar Philippi, Dr.

Coorientador

Universidade Federal de Santa Catarina

Prof. Osmar Possamai, Dr.

Universidade Federal de Santa Catarina

Page 6: 2014 - Modelos Físico-Matemáticos de Fluidos
Page 7: 2014 - Modelos Físico-Matemáticos de Fluidos

To the Cosmos.

Page 8: 2014 - Modelos Físico-Matemáticos de Fluidos
Page 9: 2014 - Modelos Físico-Matemáticos de Fluidos

ACKNOWLEDGEMENTS

I want to begin to thank Prof. Philippi and Prof. Mayerle for

trusting in this work. I appreciated it a lot. Special thanks to LMPT team

and ex-team for all conversations, laughs and daily working.

Thanks to UFSC for being a public university and the place

where most of my life was spent in the last few years, implying my debt

to the Brazilian people who finance this university and its aid to students

like me, with their daily work.

Thanks to the pirate community, especially to The Pirate Bay,

for sharing with me and with the world, information and knowledge that

some want to keep locked in their copyrights.

I thank my parents and my wonderful family for the opportunity

to exist and for the freedom to choose. I am the developing result of their

love and kindness.

I thank all my friends, ALL OF THEM. Their friendship is my

biggest treasure. Even those who are distant in space or time, they are

constituent parts of my being, inspiring me with the memories of their

smiles and words.

Finally, I thank the Gods for given me some order, stars in the

sky, light, life and love; and I thank the Demons for giving me chaos, sex,

music, wine, science and friends.

Page 10: 2014 - Modelos Físico-Matemáticos de Fluidos
Page 11: 2014 - Modelos Físico-Matemáticos de Fluidos

1

1 O disbelievers!

I do not worship what you worship;

Nor are you worshippers of what I worship;

Nor will I be a worshipper of what you worship;

Nor will you be worshippers of what I worship;

For you is your truth, and for me is my truth.

Surat Al –Kāfirūn (free author’s translation)

Page 12: 2014 - Modelos Físico-Matemáticos de Fluidos
Page 13: 2014 - Modelos Físico-Matemáticos de Fluidos

RESUMO

A descrição de fluidos na natureza é um desafio para físicos,

matemáticos e engenheiros. O conceito de fluidos permeia os estados da

matéria que compreendem os líquidos, os gases e os plasmas, sendo

portanto, o comportamento físico-cinemático mais abundante no

universo, justificando assim sua importância. A complexidade dessa

descrição é abordada através de idealizações matemáticas pertinentes,

normalmente restringindo-a a fluidos newtonianos incompressíveis,

onde, mesmo assim, carece de soluções analíticas gerais. Os fluidos,

protagonistas deste trabalho, são contextualizados em sua dimensão

econômica a nível nacional e internacional; sua modelagem clássica,

baseada na hipótese do contínuo, é revisada e aprofundada, focando-se na

interpretação de seus termos e na compreensão de sua linguagem. Na

sequência será introduzido os conceitos básicos da teoria cinética, de onde

emerge uma nova abordagem para fluidos baseada na equação de

Boltzmann, uma equação fenomenológica que descreve a matéria

considerando-a um sistema de partículas. Dentro desta nova abordagem

deriva-se modelos numéricos, comumente chamados de Lattice-

Boltzmann Method (LBM). Com estes modelos, simulações são

conduzidas e os resultados discutidos..

Palavras-chave: Mecânica dos fluidos. LBM. Lattice-Boltzmann.

Page 14: 2014 - Modelos Físico-Matemáticos de Fluidos
Page 15: 2014 - Modelos Físico-Matemáticos de Fluidos

ABSTRACT

The description of fluids is a challenge for physicists,

mathematicians and engineers. The concept of fluids permeates most of

states of matter which includes liquids gases and plasmas, being therefore,

the most abundant physic-kinematic behavior in the universe and thus

justifying its multidimensional importance. The complexity of this

description is managed with pertinent mathematical idealizations,

normally restricting it to incompressible Newtonian fluids which, even

though, lacks general solutions. Fluids, the protagonists of this work, are

contextualized in its economical dimension at national and international

level. Its classical modelling based on the continuum hypothesis is

revisited, emphasizing the interpretation of its terms and comprehension

of the language. In the sequence, basic topics on kinetic theory will be

introduced, from where a new approach for dealing with fluids emerges,

based on the Boltzmann equation, a phenomenological equation that

describes matter considering it as a system of particles. With this new

approach numerical methods will be derived. They are called Lattice-

Boltzmann Methods (LBM). With these methods some simulations will

be carried out and its results discussed.

Keywords: Fluid dynamics. LBM. Lattice-Boltzmann.

Page 16: 2014 - Modelos Físico-Matemáticos de Fluidos
Page 17: 2014 - Modelos Físico-Matemáticos de Fluidos

LIST OF FIGURES

Figure 1 – Water fishbones. ...................................................................32 Figure 2 - Brazil’s GDP growth in recent years. ....................................38 Figure 3 – GDP in 2013 .........................................................................39 Figure 4 – Common gases at 300K ........................................................58 Figure 5 – Velocity vectors in the D2Q9 model: ...................................73 Figure 6 – Streaming step with halfway bounce-back ...........................79 Figure 7 – Periodic topological manifolds for a 2D domain ..................80 Figure 8 – Three unknown populations..................................................81 Figure 9 - Framework for LBM models. ................................................86 Figure 10 – Coalescence cascade of a drop. ...........................................87 Figure 11 - Comparison between analytical and simulated velocity. .....96 Figure 12 – Transient to periodic evolution of the forces. .....................99 Figure 13 – Normalized Fast Fourier Transform (FFT) .......................100 Figure 14 - Magnification of some vortices of Fig. 15.........................101 Figure 15 – Flow past a cylinder: vorticity field. .................................102 Figure 16 - Flow past a cylinder: velocity field. ..................................103 Figure 17 – Cangaceiro’s original picture. ...........................................104 Figure 18 – The immiscible cangaceiro after 50 time steps ................105 Figure 19 - The immiscible cangaceiro after 250 time steps ...............106 Figure 20 – Immiscible cangaceiro after 30 000 time steps .................108 Figure 21 – EOS curves for some attraction forces. .............................110 Figure 22 – The initial configuration ...................................................110 Figure 23 – Above is shown the system after 100 time steps ..............111 Figure 24 – System in equilibrium after 50 000 time steps. .................112 Figure 25 – Symmetrical flow field during the first time steps ............114 Figure 26 - Asymmetrical flow field during the first time steps ..........115

Page 18: 2014 - Modelos Físico-Matemáticos de Fluidos
Page 19: 2014 - Modelos Físico-Matemáticos de Fluidos

LIST OF TABLES

Table 1 – LBGK models ....................................................................... 70

Table 2 – Parameters for the flow past a cylinder. ................................ 93

Table 3 – Main parameters of the immiscible cangaceiro. .................. 103

Table 4 – Parameters for the SCMP simulation. ................................. 105

Page 20: 2014 - Modelos Físico-Matemáticos de Fluidos
Page 21: 2014 - Modelos Físico-Matemáticos de Fluidos

ACRONYMS

ABNT – Associação Brasileira de Normas Técnicas

IBGE – Instituto Brasileiro de Geografia e Estatística

IPEA – Instituto de Pesquisa Econômica Aplicada

IMO – International Maritime Organization

UNCTAD – United Nations Conference on Trade and Development

SCN – Sistema de Contas Nacionais

GDP – Gross domestic product

Eq. – Equation

Dist. – Distribution

NS – Navier-Stokes

BE – Boltzmann equation

LGA – Lattice-Gas Automaton

LBGK – LBM with BGK collision operator.

LBM – Lattice-Boltzmann method

LBE – Lattice-Boltzmann equation

EOS – Equation of state

BC – Boundary condition

SCMP – Single component multiphase

MCMP – Multicomponent multiphase

Page 22: 2014 - Modelos Físico-Matemáticos de Fluidos
Page 23: 2014 - Modelos Físico-Matemáticos de Fluidos

LIST OF SYMBOLS

SI Units

m Meter (lenght) [m]

s Second (time) [s]

kg Kilogram (mass) [kg]

c Meter per second (velocity) [c]

Pa Pascal (pressure, stress) [Pa]

N Newton (force) [N]

J Joule (energy, work) [J]

K Kelvin (temperature)

[K]

Greek Letters

ψ Intensive tensor property

Ψ Extensive tensor property

𝜌 Specific mass/density [kg/m³]

𝚷,Π𝛼𝛽 Momentum flux tensor [kg/(m.s²)]

Π𝛼𝛽𝑠𝑡𝑟 Strees tensor [kg/(m.s²)]

Π𝛼𝛽𝑣𝑖𝑠𝑐 Deviatoric viscous stress tensor [kg/(m.s²)]

𝜇 Dynamic viscosity [kg/(m.s)]

𝜇𝑛 n-th moment of a function

𝜆 Second viscosity [kg/(m.s)]

𝜈 Kynematic viscosity [m²/s]

𝜉 (𝜇 + 𝜆) [kg/(m.s)]

Page 24: 2014 - Modelos Físico-Matemáticos de Fluidos

Ω, Ω𝑖 Collision operator [kg/(c³m³s²)]

𝛷 Positive unknown function

Φ Collision invariants vector

𝜃 Lattice sound speed squared

𝜔 Relaxation frequency parameter

𝜔+ Symmetric part of 𝜔

𝜔− Amtisymmetric part of 𝜔

Roman Letters

A Surface area [m²]

𝑐 Mean particles velocity modulus [m/s]

𝑐𝛼 Mean particles velocity vector [m/s]

𝒄, 𝑐𝛼, 𝒄𝒊 Particle velocity vector [m/s]

𝑐𝑠 Sound speed [m/s]

𝑐𝑟 Lattice reference speed

𝐶1, 𝐶2, 𝐶3 Arbitrary constants

ℯ(𝐫, 𝑡) Massic energy function [J/kg]

ℯ𝑝 Mean peculiar massic kinetic energy [J/kg]

𝒇 Body force [m/s²]

𝑓, 𝑓𝑖 Mass probability distribution [kg/(c³m³s)]

[𝑓′∗, 𝑓′] Bullet and target dist. before collision [kg/(c³m³s)]

[𝑓∗, 𝑓] Bullet and target dist. after collision [kg/(c³m³s)]

F Normalized probability distribution [1/(c³m³s)]

𝐹𝑐(𝑐) Equilibrium distribution (maxwellian) [1/c³]

𝐹(𝑐) Equilibrium dist. (maxwell-boltzmann) [1/c³]

Page 25: 2014 - Modelos Físico-Matemáticos de Fluidos

𝑓(𝒄)𝑒𝑞 Mass Equil. dist. (maxwell-boltzmann) [kg/c³]

Ӻ, Ӻ𝛼 Force vector [(kg.m)/s²]

𝒈, 𝑔𝛼 Body force vector [m/s²]

ℋ Hamiltonian [J]

𝐻(𝑓) Boltzmann H-function

𝑘𝑏 Boltzmann constant [J/K]

𝐾 Kinetic energy [(kg.m²)/s²]

𝐾𝑐 Bulk modulus of compressibility [kg/(m.s²)]

Ӄ Bulk viscosity coefficient [kg/(m.s)]

𝐿 Characteristic length; Length [m]

𝑚 mass [kg]

𝑀 Molar mass [kg/mol]

𝐧 Unit normal vector [m]

𝑛 Number of moles; Number density

N Number of particles

𝑁𝐴 Avogadro’s number. [1/mol]

𝑝 Mean pressure [kg/(m.s²)]

𝐩, p𝛼 , 𝐩𝐢 Momentum vector [(kg.m)/s]

Mean mechanical pressure [kg/(m.s²)]

q Position vector in phase space ℙ

𝔔𝛽 Kinetic energy transport vector [(kg.m³)/s³]

𝒓, 𝑟𝛼, 𝒓𝒊 Position vector [m]

𝑅 Ideal gas constant [J/(K.mol)]

𝑆𝛾𝛿 Strain rate tensor [1/s]

𝑡 Time [s]

𝑇 Temperature [K]

Page 26: 2014 - Modelos Físico-Matemáticos de Fluidos

𝒖, 𝑢𝛼 Velocity vector [m/s]

u Bulk flow velocity [m/s]

𝑈 Characteristic velocity [m/s]

𝑣 Peculiar velocity [m/s]

V Volume [m³]

𝑤𝑖 Discrete weights

Other Symbols

Ӂ𝛼𝛽𝛾𝛿 Viscosity tensor [kg/(m.s)]

Ϣ𝑐𝛼𝑐𝛽 ...𝑐𝜔 Generic higher order moments

Ç Number of replicates

Щ Collision operator model [kg/(c³m³s²)]

Щ𝐵𝐺𝐾 BGK collision operator [kg/(c³m³s²)]

Dimensionless Numbers

𝑀𝑎 Mach number

𝑅𝑒 Reynolds number

𝑆𝑡 Strouhal number

Mathematical Symbols

𝛿𝛼𝛽 Krocecker’s delta

𝐷𝑡 Material derivative

Page 27: 2014 - Modelos Físico-Matemáticos de Fluidos

∫ (∙)𝑑𝑎∂𝑣

Surface integral [m²]

∫ (∙)𝑣

𝑑𝑣 Volume integral [m³]

𝜕𝑡 Time derivative [1/s]

𝜕𝛽 Space derivative [1/m]

𝛁 Nabla operator [1/m]

∇𝒓 Nabla operator over spatial space [1/m]

∇𝒄 Nabla operator over velocities space [1/(m/s)]

∇2 Laplacian operator [1/m²]

⊗ Tensor product

dq Infinitesimal phase space volume [m³.(m/s)³]

𝒪2 Second to higher order terms

ℙ, 𝔹 Phase space

Continuum body א

Page 28: 2014 - Modelos Físico-Matemáticos de Fluidos
Page 29: 2014 - Modelos Físico-Matemáticos de Fluidos

CONTENTS

1 INTRODUCTION ................................................................. 31

1.1 PHYLOSOPHICAL AND HISTORICAL CONSIDERATIONS….33

1.2 OBJECTIVES .................................................................................. 37

1.3 FIELDS’ RELEVANCE .................................................................. 37

1.3.1 Brazil: a fluid based industrial economy ................................... 38

2 MATHEMATICAL MODELLING .................................... 43

2.1 MACROSCOPIC MODELS ............................................................ 43

2.1.1 Reynolds Transport Theorem .................................................... 44

2.1.2 Transport Equations in Continuum .......................................... 45

2.1.3 Newtonian fluids .......................................................................... 47

2.1.4 Incompressibility hypothesis ...................................................... 50

2.1.5 Dynamic similarity ...................................................................... 51

2.2 MESOSCOPIC MODELS ............................................................... 52

2.2.1 Ideal gases (pressure and temperature) .................................... 54

2.2.2 The equilibrium distribution ...................................................... 55

2.2.3 The local equilibrium distribution ............................................. 59

2.2.4 The Boltzmann equation (BE) ................................................... 59

2.2.5 Macroscopic equations recovery ................................................ 63

2.2.6 The BGK kinetic model .............................................................. 66

3 THE LATTICE-BOLTZMANN METHOD ....................... 71

3.1 LBGK SCHEMES ........................................................................... 72

3.1.1 Physical LBGK simulations ...................................................... 75

3.1.2 External force implementation .................................................. 77

3.2 BOUNDARY CONDITIONS (BC) ................................................. 79

3.2.1 Non-slip at walls .......................................................................... 79

3.2.2 Periodic BC .................................................................................. 80

3.2.3 Constant flux BC (Von Neumann) ............................................. 81

3.2.4 Constant pressure/density BC (Dirichlet) ................................. 82

Page 30: 2014 - Modelos Físico-Matemáticos de Fluidos

3.2.5 Zero derivative at boundaries .................................................... 83

3.3 COLLISION OPERATOR ALTERNATIVES ................................ 83

3.3.1 Two-time relaxation collision operator (TRT) ......................... 83

3.4 MULTIPHASE AND MULTICOMPONENT MODEL ................. 85

3.4.1 Interparticle potential model ..................................................... 88

4 SIMULATIONS ..................................................................... 93

4.1 HAGEN-POISEUILLE FLOW ....................................................... 95

4.2 FLOW PAST A CYLINDER .......................................................... 97

4.3 THE IMMISCIBLE CANGACEIRO (MCMP) .............................. 104

4.4 PHASE TRANSITION (SCMP) .................................................... 109

4.5 BIDIMENSIONAL SWALLOW FLIGHT ................................... 113

5. FINAL CONSIDERATIONS ............................................. 117

REFERENCES ........................................................................ 121

APPENDIX: Code examples .................................................. 127

Page 31: 2014 - Modelos Físico-Matemáticos de Fluidos

31

1 INTRODUCTION

Fluid flows are ubiquitous in nature and are experienced

everywhere by those who observe their environment attentively. They are

vital to all those transport processes that make our tiny Earth like it is and

even life like we know it. The entire homeostasis of the planet can be

thought as a gracious balance of heat, mass and momentum transport that

shape its atmosphere, rivers, oceans and even life.

For life, fluids act as an important sculptor of its ontogeny, being

the cradle of its early development. This importance might be seen in an

interesting article from CARTWRIGHT et al. (2009) which exposes the

relevance of the field:

“It is becoming increasingly clear that

the number of genes in the genome of a typical organism is not sufficient to specify the

minutiae of all features of its ontogeny. Instead, genetics often acts as a

choreographer, guiding development but

leaving some aspects to be controlled by

physical and chemical means. Fluids are

ubiquitous in biological systems, so it is not surprising that fluid dynamics should play an

important role in the physical and chemical

processes shaping ontogeny.”

Furthermore and beyond applied sciences, fluids are also

embedded with intrinsic beauty that tickles our minds, being also motifs

of art, photography and contemplation, showing lovely patterns like

clouds, vortexes and like the water fishbones shown in Figure 1.

In matter of science, their models are on the edge of physical-

mathematical research. From one side, solution’s smoothness and

existence of the Navier-Stokes Equations, the equations of the continuum

approach modelling, is still one of the Millenium Prize Problems

announced from The Clay Mathematics Institute2, which gives a million

dollars prize for its solution. Although these nonlinear partial differential

equations were well stablished in the 19th century, until these days it is a

benchmark problem for mathematicians and engineers, who often adopt

a numerical approach to approximate solutions of the equation in many

applications.

2 http://www.claymath.org

Page 32: 2014 - Modelos Físico-Matemáticos de Fluidos

32

On the other hand there is a relatively new approach for modelling

fluid dynamics and transport phenomena. It is based on the Boltzmann

equation, which got big attention since such kinetic models could be

verified with the always advancing computing resources.

Figure 1 – Water fishbones.

Source: (BUSH; HASHA, 2004)

Such models offer a more flexible way to describe transport

phenomena, which are vital to engineering, since it can be easily adapted.

From fluid dynamics to drop coalescence, immiscible

displacement, thermal and chemical diffusion and even relativistic flows.

There is a big list of applications where the solutions of this kinetic

approach are valid. Its mathematics is a quite a hard job to comprehend,

since most of it lies on statistical mechanics’ tools, which are not normally

taught in ordinary engineering courses. Nevertheless they are an

enjoyable mind exercise. From the abstraction of colliding particles to

computer simulations recovering observed physical behavior. It is

simultaneously scary and delightful to think on the possibilities of the

human mind with its incommensurable creativity and abstraction power. In this work, the essentials behind both approaches will be

described through a deeper review on the main topics. More emphasis on

the kinetic approach will be given, since it is a relatively new method. It

does not have any pretension to put or propose anything new. This work

Page 33: 2014 - Modelos Físico-Matemáticos de Fluidos

33

just expresses the passion from this author for the subject and represents

the results of its intention to have a deeper comprehension on the subject,

both physically and mathematically, while linking that knowledge with

the physical world, where the author thinks he lives in, but is not really

sure.

1.1 PHYLOSOPHICAL AND HISTORICAL CONSIDERATIONS

Imre Lakatos, a philosopher of mathematics and science wrote

once: “Philosophy of science without history of science is empty, history

of science without philosophy of science is blind.”

From an engineering perspective, an analogue thought could be

constructed: engineering without its own history is blind and dangerous.

The age of science is also the age of the political and financial

manipulation of its activity to stablish and/or maintain cultural and

economical hegemony. An engineering act is always a political act, since

it has a defined impact in space-time of political societies. Mankind lives

in a world that still uses most of its engineering for selfish and coercive

purposes. Humans are now the victims of the technology sold with

massive propaganda. Victims of the pollution from cars, industries.

Victims of the contamination of its environment, agriculture. From the

everywhere spraying of pesticides, to the chemicals in the more and more

industrialized food, which many times could look like everything but

food. Not to mention one of the biggest industrial markets in the world:

military.

History is essential for the formation of a critical thinker as it is for

the formation of a critical engineer. This spirit is beautifully caught by

Alexis de Tocqueville: “When the past no longer illuminates the future, the spirit walks in darkness.”

This is not a work on philosophy of science or history, but the

opportunity for a brief reflection on it couldn't have been missed, since it

is of great value for its author.

With that in mind, we shall present a brief history of fluid

mechanics poetically, highlighting that it is an ancient issue in human

mind and culture. This poem, called The Turbulent History of Fluid Mechanics, was written by Naomi Tsafnat and published in May 17,

1999. It gives a lovely list of the main historical events that marks this

branch of human knowledge.

It all started with Archimedes, way back in BC, Who was faced with an interesting problem, you see...

Page 34: 2014 - Modelos Físico-Matemáticos de Fluidos

34

The king came to me, and this story he told:

I am not sure if my crown is pure gold.

You are a wise man, or so it is said, Tell me: is it real, or is it just lead?

I paced and I thought, and I scratched my head, But the answer eluded me, to my dread.

I sat in my bath, and pondered and tried, And then...”Eureka! Eureka! I found it!” I cried.

As I sat in my tub and the water was splashing, I knew suddenly that a force had been acting.

On me in the tub, it’s proportional, see,

To the water that was where now there is me.

Of course, Archimedes caused quite a sensation But not because of his great revelation;

As he was running through the streets of Syracuse

He didn’t notice he was wearing only his shoes.

The great Leonardo –oh what a fellow... No, not diCaprio, DaVinci I tell you!

He did more than just paint the lovely Mona,

He also studied fluid transport phenomena.

Then came Pascal, who clarified with agility,

Basic concepts of pressure transmissibility. Everyone knows how a barometer looks,

But he figured out just how it works.

How can we talk about great scientists,

Without mentioning one of the best: Sir Isaac Newton, the genius of mathematics,

Also contributed to fluid mechanics.

One thing he found, and it’s easy as pie,

Is that shear stress, τ, equals μ dv/dy. His other work, though, was not as successful;

His studies on drag were not all that useful.

He thought he knew how fast sound is sent, But he was way off, by about twenty percent.

Page 35: 2014 - Modelos Físico-Matemáticos de Fluidos

35

And then there was Pitot, with his wonderful tubes,

Which measure how fast an airplane moves. Poiseuille, d’Alembert, Lagrange and Venturi –

Through his throats – fluid pass in a hurry.

Here is another hero of fluid mechanics,

In fact, he invented the word “hydrodynamics”. It would take a book to tell you about him fully,

But here is the short tale of Daniel Bernoulli:

Everyone thinks is just one Bernoulli...

It is not so! There are many of us, truly.

My family is big, many scientists in this house, With father Johan, nephew Jacob and brother Nicolaus.

But the famous principle is mine, you know,

It tells of the relationship of fluid flow,

To pressure, velocity, and density too.

I also invented the manometer – out of the blue!

Yes, Bernoulli did much for fluids, you bet!

He even proposed the use of a jet.

There were others too, all wonderful folks, Like Lagrange, Laplace, Navier and Stokes.

Here is another well - known name, A mathematician and scientist of great fame:

He is Leonard Euler, I’m sure you all know,

His equations are basis for inviscid flow.

He did more than introduce the symbols π, I, e, He also derived the equation of continuity.

And with much thought and keen derivation, He published the famous momentum equation.

Those wonderful equations and diagrams you see?

They are all thanks to Moody, Weisbach and Darcy.

Then there was Mach, and the road that he paves, After studying the shocking field of shock waves.

Page 36: 2014 - Modelos Físico-Matemáticos de Fluidos

36

Rayleigh studied wave motion, and jet instability,

How bubbles collapse, and dynamic similarity. He was also the first to correctly explain.

Why the sky is blue – except when it rains.

Osborne Reynolds, whose number we know, Found out all about turbulent flow.

He also examined with much persistence,

Cavitation, viscous flow, and pipe resistance.

In the discovery of the boundary layer

Prandtl was the major player. It’s no wonder that all the scientists say,

He’s the father of Modern Fluid Mechanics, hooray!

It is because of Prandtl that today we all can

Describe the lift and drag of wings of finite span.

If it weren’t for him, then the brothers Wright

Would probably never have taken flight.

And so we come to the end of this story,

But it’s not the end of the tales of glory! The list goes on, and it will grow too

Maybe the next pioneer will be you?

Naomi Tsafnat

Page 37: 2014 - Modelos Físico-Matemáticos de Fluidos

37

1.2 OBJECTIVES

The main objective of this work is to make a generalized review

on the subject of fluid dynamics, focusing on a detailed derivation of its

mathematical models and on the physical interpretation of its

implications, providing a deeper mathematical and physical

understanding on the subject. This theoretical understanding is vital for

those who want to make further research, contributing scientifically on

the field as for those who want to use benchmark numeric models for

engineering applications, optimizing and/or predicting the behavior of

turbomachinery, productive systems and so on.

A further objective is to explore some recently developed numeric

mesoscopic models, which are based on the Boltzmann equation. This

implies a review on the main topics of kinetic theory, while giving some

examples and applications. Moreover, the results of some simulations will

be analyzed and discussed.

As a secondary objective is the highlighting of the theme in an

economical perspective, exploring its importance in modern productive

systems and specially its importance for the Brazilian industrial economy.

1.3 FIELDS’ RELEVANCE

The understanding of the underlying physics in fluid dynamical

phenomena has a huge impact in the current globalized context of human

economy and its technical systems. Airplanes, cars, trains, pumps,

spaceships, weather forecast, sports and so on. The list of applications is

endless. From microfluidics in cells, blood vessels or porous media to

macro phenomena like weather forecasting and stellar relativistic flows.

From optimizing the technique of swimming, allowing competitors to be

faster, to the shape optimization of turbines, allowing them to extract

more power from the same water or wind flow. Fluids are ubiquitous in

our daily life. The whole earth is immersed in a fluidic atmosphere. Every

movement between the surface and the outer space from one point to

another, by any means, is a fluid dynamical motion. Likewise, more than

2/3 of the Earths’ surface is covered with liquid water, through which over

90% of world’s economic trade flow (UNITED NATIONS; IMO3, 2014).

According to UNCTAD4 statistics a fleet of around 1,5 million ships

transported circa 600 million containers in 2012 (UNITED NATIONS,

UNCTAD, 2014).

3 International Maritime Organization, 4 United Nations Conference on Trade and Development.

Page 38: 2014 - Modelos Físico-Matemáticos de Fluidos

38

The importance of advancing knowledge in the field is evident.

Imagine, for example, the inherent economical cost associated to the lack

of knowledge in turbulence alone, i.e., all the aggregate cost to society of

our limited turbulence prediction abilities which result in necessity of

adopting big safety factors, depending on empiricism and

experimentation for designing fluid-thermal systems, from heat

exchangers to hypersonic planes. Not to mention the cost of inaccurate

weather forecasting (GEORGE, 1990). For instance, turbulence is one of

the biggest open research fields in fluid dynamics. A fundamental

mathematical modelling is still unknown.

1.3.1 Brazil: a fluid based industrial economy

In recent years, Brazil has seen many improvements in its socio-

economic scenario. According to the WORLD BANK (2014), poverty

(people living with US$2 per day) has fallen from 21% of the population

in 2003 to 9% in 2012. Extreme poverty (people living with less than

US$1.25 per day) also dropped from 10% in 2004 to 2.2% in 2009. This

social achievements were also accompanied by its economical

counterpart. GDP grew consistently in the last years and is shown in

Figure 1.

Figure 2 - Brazil’s GDP growth in recent years.

Source: Author

R$ 0,00

R$ 5,00

R$ 10,00

R$ 15,00

R$ 20,00

R$ 25,00

R$ 0,00

R$ 1.000,00

R$ 2.000,00

R$ 3.000,00

R$ 4.000,00

R$ 5.000,00

1990 1993 1996 1999 2002 2005 2008 2011

Brazil's GDP Growth

Services - value added - R$ (billions) - Reference 2000 (IBGE/SCN 2000)

Industry - value added - R$ (billions) - Reference 2000 (IBGE/SCN 2000)

Agriculture - value added - R$ (billions) - Reference 2000 (IBGE/SCN 2000)

PIB per capita - R$ (Thousands) - IPEA - Reference 2000.

Page 39: 2014 - Modelos Físico-Matemáticos de Fluidos

39

Despite all this promising scenario there is still a huge social

inequality in Brazil. The 20% richest had almost 60% of the total

country’s income in 2009 (WORLD BANK, 2014). It is getting

constantly better, that is true, but there is still much work to do.

Something interesting to note in Figure 2 is the proportion of the

economic sectors in the total GDP. Many people in Brazil believe that

agriculture is a very important economic activity that sustains the

country’s economic health. Agriculture should not be underestimated but

the fact is that the agricultural sector is responsible for less than 6% of

GDP.

Figure 2 shows the proportion of economy sectors in GDP in 2013.

Just one quarter of it is based on industrial activities. It is not much since

around half of it is based on the primary sector (FIESP, 2013).

Figure 3 – GDP in 2013

Source: Author

Now a curious fact: The sector of oil and gas grew from 3% in

2000 to 13% of GDP in 2014 (NUNES, 2014). This number will reach

around 20% in 2020 (NOVAES, 2012). The main responsible for such

numbers is Petrobras, which has an investment plan of U$220,6 billion

for the 2014-2018 period. It includes 28 perforation underwater probes,

32 oil production platforms, 154 large support ships and 81 tank-ships.

All this production will take place here, in Brazil (NOVAES, 2012).

Therefore, this sector represents 52% of the Brazilian industrial GDP and

5,7%

25,0%

69,3%

GDP 2013

Agriculture - percentage of GDP( IBGE 2013)

Industry - percentage of GDP( IBGE 2013)

Services - percentage of GDP( IBGE 2013)

Page 40: 2014 - Modelos Físico-Matemáticos de Fluidos

40

may grow to 80% of it, if its industrial sector remains with the same 25%

of the total economy.

So, analyzing this data is clear that the sector of oil and gas is and

will be the most strategic activity in Brazil. It pulls many other productive

sectors around it such as the navy and steel industry. It is of great

importance in development of science and technical systems, fomenting

universities and research centers.

The Petroleum National Agency, ANP (2013), estimates

investments of U$20 to U$30 billion in R&D for the next 35 years for the

Campo de Libra alone, one of the Pre-Salt5 reserves.

Likewise, the recently sanctioned PNE, Plan of National

Education, among other goals, wants to increase the educational budget

to 10% of GDP until 2024 (BRASIL, 2014). The current number is around

5,5%. It is widely known that most of this investment has as its primary

source the oil royalties that come, and will come from the Pre-Salt

extraction.

The strategic dimension of the sector for Brazil’s future is

undeniable. Education, economy, science, technology, among others, will

have these prehistoric fluids as its main source of foment.

Oil. The black fluid. Thousands, maybe millions of years of sun’s

light energy captured and stored. All that energy that once irradiated over

those places is now there, available to drive the wheels of modern

capitalistic societies, which are thirsty for energy, especially for oil.

Ships, pipelines, gas, oil, reservoir rocks, sea water… this world is a world

of fluids. Improvements of 1% in efficiency to extract, pump, transport,

etc… may have an impact of billions of dollars. They want those dollars.

We want those dollars too. But to improve, technology is needed. For

technology, models are needed. Not only some kind of models, but always

changing-to-better models. Models that become more and more

sophisticated. Models that are able to describe and recover the essential

physics in the phenomena of interest.

5 The Brazil’s Pre-salt is a sequence of sedimentary rocks formed more

than 100 million years ago by the separation of the current American and African

continents. Its huge gas and oil reserves pushed Brazil into the international

scenario of this sector. This reserves, however, are allocated deep under the sea

level, between 7 and 8 kilometers, from where circa 6 kilometers are post-salt and

salt rocks (FOLHA, 2010). This technological challenge pushes the investments

from Petrobras in R&D, in order to make the extraction economically viable.

Page 41: 2014 - Modelos Físico-Matemáticos de Fluidos

41

Physics is mathematical not because we

know so much about the physical world, but because

we know so little; it is only its mathematical

properties that we can discover.

Bertrand Russell

Page 42: 2014 - Modelos Físico-Matemáticos de Fluidos

42

Page 43: 2014 - Modelos Físico-Matemáticos de Fluidos

43

2 MATHEMATICAL MODELLING

Now we enter in the world where abstract thoughts become

symbols. These symbols become models and these models describe their

own structure in an ontological sense. The philosophical foundation of

mathematics is still a mystery. Some theories say it deals with real objects,

being the language of an intrinsic reality. Other theories say that

mathematics is only a human mind construct, nothing more than games

derived from some set of rules.

Real or not, it is effective. The success of mathematical modelling

in physics is enormous. We appreciate it daily using modern machinery

created with applied physical description of things. Behind any physical

description lies a model, and often, a mathematical model.

In fluid dynamical phenomena modelling there are two main

approaches, macroscopic and mesoscopic. The latter came first, being the

standard approach for teaching fluid mechanics in engineering

graduation. The former came as a translation of the microscopic models

to match the latter.

2.1 MACROSCOPIC MODELS6

Macroscopic approach was known at least since the Ancient

Greece. The work published by Archimedes of Syracuse, On Floating Bodies (250 BC), is considered the first major work on fluid mechanics.

It studies fluid statics and buoyancy based on macroscopic observations.

Archimedes’ Principle is still widely used in shipbuilding and

submarines’ buoyancy.

Since then, many improvements have been made in the design of

ships, canals and flow systems, most of them based on empiric

observations and practice. Advances in flow analysis though really began

with the birth of Renaissance.

The essence behind the macroscopic approach for analysis lies

on the continuum hypothesis. It treats matter as a continuum medium that

completely fills the space it occupies. Thermodynamic properties like

specific mass7 ρ, pressure p and temperature T can be then defined as

continuous functions of space and time.

Such approach was assumed by Euler in his inviscid equations of

hydrodynamics and was later develop to a formal mathematical branch by

the French mathematician Augustin-Louis Cauchy in the 19th century

6 Ref. (LANDAU; LIFSHITZ; 1987), (MATTILA, 2010), (Wikipedia) 7 Density and specific mass will be considered synonyms along the text,

so that they will be used interchangeably.

Page 44: 2014 - Modelos Físico-Matemáticos de Fluidos

44

which is called continuum mechanics. It deals with the mechanical

behavior of deformable media (continua), describing their kinematics,

and represents the basis upon which classical disciplines of fluid

dynamics and strength of materials are modeled.

By applying the physical conservation laws of mass, momentum

and energy to these kinematic models, differential equations arise, which

describe the transport behavior of those quantities in such a continuum.

This conservation laws might be applied to a system or a control volume. A system is a fixed quantity of mass that can be described by a

Lagrangian reference frame, also called material coordinates. A control

volume, however, is a defined and fixed region in the domain and is

described by an Eulerian reference frame. Given that is harder to track a

fixed quantity of mass in a fluid flow, the Eulerian reference frame is

almost always used in the description of fluid dynamics. Lagrangian

reference frame is mostly used in strength of materials, also known as

solid mechanics.

The link between these two descriptions is called Reynolds

Transport theorem.

2.1.1 Reynolds Transport Theorem8

Let Ψ(x,t) be an extensive tensor9 property with its respective

intensive tensor property ψ(𝐱, t) in a continuum body א. An extensive

property is that property which is proportional to the mass (or extension)

of the system, while an intensive property, is not.

In a system, it can be called with

Ψ(𝐱, t) = ∫ ψ(𝐱, t)𝜌(𝐱, t)

𝑣

𝑑𝑣10

8 Ref. (ARIS, 1989) 9 A Tensor is a generalization of vectors in a vector space. Considering

the Euclidian vector space ℝ3 with which we are working here, a n-th order tensor

will have 3𝑛 components. Therefore, a 0th order tensor is a scalar; a 1st order tensor

is a vector and so on… 10 Intensive properties are usually given per mass unit. E.g.: specific heat

𝑐𝑝 is an intensive property with dimensions of [kJ/(kg.K)]. The value of 𝑐𝑝 is only

applicable to points in a non-uniform field. By performing this integral one

recovers the extensive property with dimensions [kJ/K], which is the amount of

energy absorbed/released by the considered extension of the system (integrated

volume) by changing its temperature in one Kelvin.

Page 45: 2014 - Modelos Físico-Matemáticos de Fluidos

45

Now, the theorem states that the material rate of an extensive

tensor property associate to a continuum body א is equal to the local rate

of such property in a control volume 𝑣 plus the efflux of the respective

intensive property across its control surface ∂ 𝑣, hence,

𝐷𝑡Ψ(𝐱, t) = 𝜕𝑡Ψ(𝐱, t) + ∫ ψ(𝐱, t)𝜌(𝐱, t)

∂𝑣

𝒖 ∙ 𝐧 𝑑𝑎,

where 𝒖 is the velocity vector, n the unit normal, 𝑑𝑎 a surface element

and 𝐷𝑡 the material derivative.

2.1.2 Transport Equations in Continuum Applying the Reynolds Transport Theorem with the conservation

laws of mass and momentum yields to the general conservation equations

of continuum bodies in an Eulerian reference frame:

𝜕𝑡𝜌 + 𝛁 ∙ (𝜌𝒖) = 0

𝜕𝑡(𝜌𝒖) + 𝛁 ∙ 𝚷 − 𝜌𝒈 = 0

where 𝜌, 𝒖, 𝒈,𝚷 are specific mass, velocity vector, body force and a

momentum flux tensor, respectively. These both equations can be written

in index notation as

𝜕𝑡𝜌 + 𝜕𝛼𝜌𝑢𝛼 = 0 (1)

𝜕𝑡𝜌𝑢𝛼 + 𝜕𝛽Π𝛼𝛽 − 𝜌𝑔𝛼 = 0 (2)

The result expressed in equation (1) is easy to catch. If mass

appears or disappears from a continuum body with time, it must have

crossed its boundaries. This is just the conservation of mass expressed

mathematically for a continuum differential element in a Cartesian

coordinate system.

Interpretation of equation (2) is identic. The crossing momentum through the boundaries is caused by the second term, which will be

explored next, plus the term of the body force, e.g. gravity, which acts in

the positive direction of the axis. Likewise, this is just the conservation

of momentum expressed mathematically for a continuum element.

Page 46: 2014 - Modelos Físico-Matemáticos de Fluidos

46

The momentum flux tensor 𝚷 = Π𝛼𝛽 gives the 𝛼 component of the

momentum in the 𝛽 direction, remember that the 𝛼 component is

associated with the 𝛼 plane of the differential cube which is orthogonal to

the 𝛼 direction of the coordinate system. Since we know that momentum

is transferred through forces, the term 𝜕𝛽Π𝛼𝛽 is interpreted as the net

force, or stresses, on the element due to its neighbors.

So now, another good picture from equation (2) can be made: if

momentum is growing inside the continuum element (first term will be

positive in Eq. (2)), it must be caused by net force due to its neighbors

(the divergence in the second term of Eq. (2) will be negative) plus the

body force which acts in the positive directions of the coordinate system,

transferring momentum to the continuum element.

This tensor Π𝛼𝛽 is made out of two parts,

Π𝛼𝛽 = 𝜌𝑢𝛼𝑢𝛽 − Π𝛼𝛽𝑠𝑡𝑟 (3)

The first term on the right-hand side of equation (3) is the

convective momentum flux tensor and represents the 𝛼 component of the

momentum being transported in the 𝛽 direction. Second term of equation

(3) is the stress tensor of the continuum, which might be split11 into

contributions from two tensors, an isotropic mean pressure tensor −𝑝𝛿𝛼𝛽

and a deviatoric viscous stress tensor Π𝛼𝛽𝑣𝑖𝑠𝑐, hence

Π𝛼𝛽𝑠𝑡𝑟 = −𝑝𝛿𝛼𝛽 + Π𝛼𝛽

𝑣𝑖𝑠𝑐 (1)

Remember that the mean pressure tensor12 is related with

stretching and squeezing deformations, which maintain the edge angles

in the fluid element, while the deviatoric viscous stress tensor is related

with distortion of those angles. If incompressibility is not assumed, these

deformations may cause volume change, otherwise volume is kept

constant.

Now, using relations (3) and (4), equation (2) can be better

analyzed when written in the following form,

11 Any given second-rank tensor can be split into its isotropic and

deviatoric part. 12 Which is equivalent to the thermodynamic pressure given by an

equation of state.

Page 47: 2014 - Modelos Físico-Matemáticos de Fluidos

47

𝜕𝑡𝜌𝑢𝛼 = −(𝜕𝛽𝜌𝑢𝛼𝑢𝛽 + 𝜕𝛽𝑝𝛿𝛼𝛽) + 𝜕𝛽Π𝛼𝛽𝑣𝑖𝑠𝑐 + 𝜌𝑔𝛼

which is nothing more than the expression of Newton’s Second Law in a

continuum body.

𝜕𝑡p𝛼 = Ӻ𝛼

where p𝛼 and Ӻ𝛼 is the momentum and force in the α direction,

respectively. The term in parenthesis is negative, because from one side

pressure acts on the opposite direction of its gradient (compressive) and

the divergence is negative for a positive momentum inflow in the

continuum element.

2.1.3 Newtonian fluids

It is important to note that absolutely nothing was said about

fluids. Until now only classical principles of mechanics was applied in

the mathematical abstraction of continuum media. To associate the

mathematical model with the actual behavior of matter some constitutive

relation is needed, which relates physical measurable properties between

each other. For some fluids, Sir. Isaac Newton discovered that the viscous

stress tensor is linearly proportional to the strain rate tensor, defined as

𝑆𝛾𝛿 =

(𝜕𝛿𝑢𝛾 + 𝜕𝛾𝑢𝛿)

2

(5)

hence,

Π𝛼𝛽𝑣𝑖𝑠 = Ӂ𝛼𝛽𝛾𝛿𝑆𝛾𝛿 (6)

where the fourth-rank tensor Ӂ𝛼𝛽𝛾𝛿 is some thermophysical property of

the fluid which represents the viscosity of the medium. Viscosity, thus,

characterizes how fluids react to strain rate and measures its internal

friction. Temperature has a strong effect and pressure a moderate if not

negligible effect on viscosity (WHITE, 2003). For isothermal flows,

therefore, Ӂ𝛼𝛽𝛾𝛿 is assumed to be made of constant coefficients whereas

pressure influence is neglected, a common approximation. Fluids which

can be good modeled with this assumptions are called Newtonian fluids.

Tensor Ӂ𝛼𝛽𝛾𝛿 has 81 components, a huge number for practical

purposes. For this reasons another simplification is made, restricting the

model only for isotropic media. That means that the thermophysical

Page 48: 2014 - Modelos Físico-Matemáticos de Fluidos

48

property which relates the strain rate tensor to the stress tensor - viscosity

- is constant over all directions. Mathematically it means that the tensor

Ӂ𝛼𝛽𝛾𝛿 must be isotropic13. A fourth-rank isotropic tensor is given

generally as

Ӂ𝛼𝛽𝛾𝛿 = 𝐶1𝛿𝛼𝛽𝛿𝛾𝛿 + 𝐶2𝛿𝛼𝛾𝛿𝛽𝛿 + 𝐶3𝛿𝛼𝛿𝛿𝛽𝛾 (7)

where 𝐶1, 𝐶2 and 𝐶3 are constants. Putting relation (7) on equation (6) and

using (5) yields to

Π𝛼𝛽𝑣𝑖𝑠𝑐 = (𝐶2 + 𝐶3)𝑆𝛼𝛽 + 𝐶1𝛿𝛼𝛽𝑆𝛾𝛾

therefore,

Π𝛼𝛽𝑣𝑖𝑠𝑐 = 𝜇(𝜕𝛼𝑢𝛽 + 𝜕𝛽𝑢𝛼) + 𝜆𝛿𝛼𝛽𝜕𝛾𝑢𝛾 (8)

The divergent 𝜕𝛾𝑢𝛾 in equation (8) is related to the dilatation or

compression of the fluid element, so that coefficient 𝐶1 = 𝜆 is the a

compression viscosity coefficient, also called second viscosity coefficient.

Furthermore, (𝐶2 + 𝐶3)/2 = 𝜇 is the first viscosity coefficient, also

known as dynamic viscosity, which represents the shear stress coefficient

and is related to distortion.

The isotropy consideration made the 81 components of Ӂ𝛼𝛽𝛾𝛿

collapse in only two constants, i.e., 2𝜇 and 𝜆. It is easy to imagine that

any work with non-isotropic fluids, measuring its 81 components

experimentally, since these coefficients are empirical from a macroscopic

approach, must be an infernal task.

The final result is the general Navier-Stokes equation for

Newtonian, isotropic and compressible fluids.

𝜕𝑡𝜌𝑢𝛼 + 𝜕𝛽𝜌𝑢𝛼𝑢𝛽 = −𝜕𝛽𝑝𝛿𝛼𝛽 + 𝜇𝜕𝛽𝜕𝛽𝑢𝛼

+(𝜇 + 𝜆)𝜕𝛼𝜕𝛾𝑢𝛾 + 𝜌𝑔𝛼

13 An isotropic tensor is a tensor whose components are unchanged in all

Cartesian coordinate systems.

Page 49: 2014 - Modelos Físico-Matemáticos de Fluidos

49

Or using a more familiar vector notation:

𝜕𝑡(𝜌𝒖) + 𝛁 ∙ (𝜌𝒖 ⊗ 𝒖) = −𝛁𝑝 + 𝜇∇2𝒖 + 𝜉 𝛁 ∙ 𝛁𝒖 + 𝜌𝒈14 (9)

where 𝜉 = (𝜇 + 𝜆). This equation can be written in many forms,

especially the convective term on the left side, which can be expressed as

𝛁 ∙ (𝜌𝒖 ⊗ 𝒖) = (𝛁𝜌𝒖) ∙ 𝒖 = (𝛁 ∙ 𝜌𝒖)𝒖

If we define the mean mechanical pressure as the negative one-

third of the sum of the three normal stresses of Π𝛼𝛽𝑠𝑡𝑟, i.e., the negative one-

third of the trace (a tensor invariant) of Π𝛼𝛽𝑠𝑡𝑟, yields to

=

−Π𝛼𝛼𝑠𝑡𝑟

3=

−(−𝑝𝛿𝛼𝛼 + 𝜇(𝜕𝛼𝑢𝛼 + 𝜕𝛼𝑢𝛼) + 𝜆𝛿𝛼𝛼𝜕𝛼𝑢𝛼)

3

which results in

= 𝑝 − (𝜆 +

2

3𝜇) 𝜕𝛼𝑢𝛼

(10)

The factor Ӄ = (𝜆 +2

3𝜇) is called the bulk viscosity coefficient,

although many textbooks mistakenly reserve this designation to 𝜆 itself.

It represents the mechanical dissipation related to any volume change at

finite rate, acting as a dumping factor of volumetric vibrations such as

sound absorption. Eq. (10) also reveals that unless either Ӄ or 𝜕𝛼𝑢𝛼 is

zero, the mean mechanical pressure in a deforming viscous fluid is not

equal to the thermodynamic one (MOHAMED, 1995). Moreover, Second

Law of Thermodynamics enforces this factor to be positive.

In 1845 Stokes simply assumed Ӄ = 0, which now is known as

Stokes’ hypothesis. This relation between the viscosity coefficients is

frequently used, but has not yet been definitely confirmed as a proper approximation.

14 The gradient operator 𝛁(∗) adds one dimension to the tensor.

The divergent operator 𝛁 ∙ (∗) subtracts one dimension from the tensor.

The laplacian operator ∇2(∗) = Δ(∗) is a scalar sum operation.

Page 50: 2014 - Modelos Físico-Matemáticos de Fluidos

50

2.1.4 Incompressibility hypothesis

So far the equations derived here describe isotropic-newtonian

fluids. A further simplification is made with the incompressibility

hypothesis. Its validity is measured by the Mach number, which is a

measure of compressibility in the fluid flow. The Mach number is defined

as

𝑀𝑎 =

𝑈

𝑐𝑠

where U is the characteristic fluid flow velocity and 𝑐𝑠 the speed of sound

in the fluid medium. The speed of sound in a fluid is a thermodynamic

property and is given generally as

𝑐𝑠 = (

𝜕𝑝

𝜕𝜌 |

𝑠

)

1/2

meaning a derivative taken in an isentropic process. For liquids and solids

is common to define the bulk modulus of compressibility 𝐾𝑐

𝐾𝑐 = 𝜌

𝜕𝑝

𝜕𝜌 |

𝑠

𝐾𝑐 measures to resistance of the medium to uniform compression,

i.e. the pressure increase needed to a relative decrease in volume. Thus,

another relation for the sound speed can be given with

𝑐𝑠 = √𝐾𝑐

𝜌

For fluid flows with 𝑀𝑎 ≤ 0.3 density variations are negligible,

therefore, the incompressibility hypothesis for these flows becomes valid.

A statement of incompressibility, is mathematically equivalent to

𝜌 = 𝑐𝑡𝑒 → 𝜕𝑡𝜌 = 0. From Eq. (1) follows that with this consideration the divergent of velocity must vanish,

𝛁 ∙ 𝒖 = 0 (11)

Page 51: 2014 - Modelos Físico-Matemáticos de Fluidos

51

This yields to the vanishing of the compressibility term in Eq. (9),

hence,

𝜕𝑡(𝜌𝒖) + 𝛁 ∙ (𝜌𝒖 ⊗ 𝒖) = −𝛁𝑝 + 𝜇∇2𝒖 + 𝜌𝒈

and dividing per 𝜌 yields to

𝜕𝑡𝒖 + (𝛁 ∙ 𝒖)𝒖 = −

1

𝜌𝛁𝑝 + 𝜈∇2𝒖 + 𝒈

(12)

Eq. (11) and Eq. (12) form the most widely used equations in fluid

dynamics for engineering purposes. They offer a set of four equations

solvable for four variables. Three components of velocity and pressure.

Kinematic viscosity 𝜈 = 𝜇/𝜌 and acceleration 𝒈 are input parameters.

Since there is no equation of state (EOS) for incompressible

substances, thermodynamic pressure 𝑝 cannot be defined. Pressure 𝑝 in

this case is interpreted as the mean mechanical pressure , as shown in

Eq. (10), and remembering that 𝜕𝛼𝑢𝛼 = 0 for incompressible fluids.

2.1.5 Dynamic similarity

It is useful to turn Eq. (12) dimensionless to see which

parameters remain in the equation. Defining a set of dimensionless

variables a

𝒓∗ =

𝒓

𝐿 𝒖∗ =

𝒖

𝑈 𝑡∗ = 𝑡

𝑈

𝐿 𝑝∗ =

𝑝

𝜌𝑈2 𝒇∗ = 𝒇

𝐿

𝑈2

where 𝐿 is a characteristic length of the flow, and 𝑈 a characteristic fluid

flow velocity. 𝐿 might be the diameter of a cylinder, the size of a wing or

any length that characterizes the flow under analysis. 𝑈 is normally taken

as the velocity of the free flow for external flows problems. Both are

considered constant. It is important to remember that also the derivatives

have to be turned dimensionless

𝜕𝛼 =𝜕

𝜕𝑟𝛼=

𝜕

𝜕𝑟𝛼∗𝐿

=1

L∇∗

Page 52: 2014 - Modelos Físico-Matemáticos de Fluidos

52

Inserting the above dimensionless relations into Eq. (12) one

finds the incompressible NS equations in its most generic form

𝜕𝑡

∗𝒖∗ + (𝛁∗ ∙ 𝒖∗)𝒖∗ = −𝛁∗𝑝∗ +

1

𝑅𝑒∇∗

2𝒖∗ + 𝒇∗ ; 𝑅𝑒 =𝑈𝐿

𝜈

This result is of huge importance. It expresses that for a given

dimensionless body force, which might be null, the dynamic behavior of

velocity and pressure field will be identic for any flow with the same

Reynolds number. The Reynolds number is the only parameter which

really characterizes the evolution of the flow field. This enables

engineers, as an example, to know the flow conditions around an airplane,

by constructing a small model of it, and putting this model to the same

Reynolds regime that the real plane would have in the sky. This is the

power of dynamic similarity. Flows sharing the same geometrical

relations and Reynolds number are dynamically similar.

2.2 MESOSCOPIC MODELS

The mesoscopic scale lies between the atomic-molecular and the

macroscopic scale. It is a bridge that connects these two levels of

“reality”. The essence behind a mesoscopic model is the assumption that

by correct averaging the molecular behavior of matter, one should be able

to recover the macroscopic manifestations of it. Such averaging is made

with statistical tools specially developed to deal with it. It is today a whole

branch in theoretical physics and it is called statistical mechanics.

Obviously, statistical mechanics is based on the atomic theory of

matter, which although as old as at least ancient Greece, was not a widely

accept theory until the beginning of the 20th century.

Its derivation starts at the micro scale. Suppose a system of N

particles of mass 𝑚𝒊 in 3D space. Each particle could be tracked

instantaneously by its position 𝒓𝒊 and its momentum 𝐩𝐢 , 𝑖 = 1, 2,… , 𝑁.

By doing so, the state of the particle is well defined and if the state of all

N particles is defined so it is the state of the system. Note that in a

microscopic system, pressure, temperature and specific mass have no

meaning. The system is defined only based on the mechanical state of its

particles. Now, three components of position plus three components of

velocity, then multiplied by N particles. 6N is the total number of degrees

of freedom of that system. The instantaneous state of this system could be

then plotted in a phase space ℙ with 6N mutually orthogonal axis and a

Page 53: 2014 - Modelos Físico-Matemáticos de Fluidos

53

parametric hyper dimensional line would appear as the system evolves in

time, following the basic laws of mechanics. So the phase space ℙ is a

space in which all possible states of a mechanic system are representable

and each state corresponds to a unique point represented by a vector q.

This dynamical system is called a Hamiltonian system since it can be

described by Hamilton’s equations15

𝜕𝑡𝐩 = −

𝜕ℋ

𝜕𝒓

𝜕𝑡𝐫 =

𝜕ℋ

𝜕𝒑

where ℋ = ℋ(𝒓, 𝐩, 𝑡) is the Hamiltonian16.

Now consider Ç replicates of that system of N particles. They are

all macroscopically equivalent between each other but microscopically

different. One could think in this, for analogy, as Ç hourglasses with N

sand grains each. They all have the same macroscopic property of flowing

all the sand down in a determined time, although those N sand grains are

not identically flowing in same speeds in each hourglass. In other words,

for every macroscopic system S there will be a set of Ç distinct

microscopic systems which are all macroscopically equivalent.

Plotting those Ç replicates as points in the phase space ℙ, these

points become dense enough as Ç→∞ to enable the definition of a

continuous function, called the normalized probability density function F(q,t), where t is time and q is the position vector of a point in the phase

space ℙ, i.e., q has 6N components, 3 components of 𝒓𝒊 and 3 from 𝐩𝐢 for

each particle i=1,2,…,N. Hence, F(q,t)dq represents the expected fraction

of the total Ç replicates points which lies inside the volume dq around

point q in the phase space ℙ. In other words, F(q,t)dq represents the

probability of a macroscopic system be in a specific microscopic state

interval.

Remember that N is normally a huge number. If the system is, for

example, 18 grams of water, there would be 𝑁𝐴 ≅ 6.0221422 x 1023

water molecules in the system, which is the Avogadro’s number. It is just

15 A mathematical formalism in analytical mechanics. 16 It corresponds to the total energy of the system. For a closed system,

the Hamiltonian is the sum of the kinetic and potential energy.

Page 54: 2014 - Modelos Físico-Matemáticos de Fluidos

54

an insane number for any practical purpose. If someone write down the

whole sequence of coordinates 𝒓𝒊 𝐩𝐢 for each particle from 1 to 𝑁𝐴 in a

writing rate of six coordinates per second, it will be needed more than a

quadrillion years to finish the job. By the way, the age of the universe is

estimated in 14 billion years. This person would need almost a million

reincarnations of the current universe to accomplish this herculean task.

Facing this impossibility to track such a system considering each

individual particle it is natural to put the first efforts to treat a new

problem with the most basic physical situation. This situation is an ideal

gas in thermodynamic equilibrium.

2.2.1 Ideal gases (pressure and temperature)

Imagine a flying particle in a cubic container of side L, colliding

elastically (no dissipation of kinetic energy) against its inner surfaces with

velocity c and flying over just one dimension α. The force Ӻ exerted on

the walls is given by the derivative of momentum: 𝜕𝑡p𝛼 = Ӻ𝛼 . Integrating

it over the time interval ∆t between two collisions, Ӻ∆𝑡 = 𝑚𝑐𝛼—𝑚𝑐𝛼 =2𝑚𝑐𝛼, where m is the mass of the particle. Now, time between hits is

2L/𝑐𝛼. Hence, Ӻ = 𝑚𝑐𝛼2/𝐿 and the force that N particles would exert in

that box would be Ӻ = 𝑁𝑚(𝑐𝛼12 + 𝑐𝛼2

2 + …+ 𝑐𝛼𝑁2)/𝐿.

It is much easier to take the mean square velocity 𝑐𝛼 2of the

particles then the individual velocity of every particle. It can be then

generalized to 3D thinking that since there are a huge number of particles,

the relation 𝑐2= 𝑐𝛼

2 + 𝑐2 + 𝑐

2 → 𝑐2= 3 𝑐𝛼

2 is a good hypothesis.

The total force exerted on the walls of a container from N particles in

space is therefore Ӻ = 𝑁𝑚𝑐2/3𝐿. Pressure p is Ӻ/𝐴, where A is the inner

surface area of the walls. But the product LA is the volume V of the

container, thus,

𝑝 =

𝑚𝑐2

2

2𝑁

3𝑉

This equation links pressure, which is a macroscopic property

with kinetic energy of constituent particles. Defining temperature T as the

macroscopic manifestation of thermal motion, which is proportional to

the kinetic energy 𝐾 and comparing with the widely known empiric

equation of state for ideal gases

𝑝𝑉 = 𝑛𝑅𝑇 (13)

Page 55: 2014 - Modelos Físico-Matemáticos de Fluidos

55

which describes with precision gases far from its critical point, yields

𝑛𝑅𝑇 =𝑚𝑐

2

2

2

3𝑛𝑁𝐴, where n is the number of moles of the gas and R the

ideal gas constant. The Boltzmann constant can be then defined as, 𝑘𝑏 =𝑅/𝑁𝐴 and the 𝐾 given per particle is

𝐾 =

𝑚𝑐2

2=

3

2𝑘𝑏𝑇

So now there is a microscopic correspondent to the macroscopic

ideal gas law, namely,

𝑝𝑉 = 𝑁𝑘𝑏𝑇 (14)

The Boltzmann constant 𝑘𝑏 = 1.38065 x 10−23J/K is therefore

the microscopic equivalent of the ideal gas constant 𝑅 = 8.314472 J/(K.mol) and relates energy at the particle level with temperature at the

bulk level, having the same units as entropy. They are interrelated with

𝑘𝑏 = 𝑅/𝑁𝐴 .

Relation (9) can be rewritten in a very illuminative form,

𝑝 =

𝑅

𝑀𝜌𝑇

(15)

where M is the molar mass of the constituent particles.

Eq. (15) relates explicitly pressure, density 𝜌 = 𝑛𝑀/𝑉 and

temperature. Remember that 𝑛𝑀 is the total mass of the system.

The ideal gas law whether in its macro- (Eq. (13)) or microscopic

(Eq. (14)) form is just the mathematical manifestation of the ideal gas model, being a constitutive equation which provides a relation between

the state variables.

2.2.2 The equilibrium distribution17

Consider the normalized probability density function F for an

ideal gas in thermal equilibrium inside a container. If it is in

thermodynamic equilibrium, the function F does not depend on time t as

long as no disturbance is performed on the gas. Likewise, the function

17 Also called maxwellian or maxwell-boltzmann distribution.

Page 56: 2014 - Modelos Físico-Matemáticos de Fluidos

56

does not depend on space neither, since in equilibrium a gas fills the space

it occupies uniformly. That means that the macroscopic system will have

no preference to any microscopic configuration so that statistically, the

function F is constant throughout the space, depending only on

momentum. Hence, F(q,t)= F(r,p,t) → F(p).

If it is assumed that the mass of each particle is identic and does

not change in time F(p) →F(c), where c is the velocity vector of each

point in a molecular velocity space 𝕧. Now, two hypothesis are important about the F(c) function. They

were made by Maxwell in his first derivation of the equilibrium solution,

(Maxwell, 1860).

1. It is isotropic.

2. The velocities of a particle in orthogonal direction are

uncorrelated (it depends only on the modulus).

So, integrating over the whole 3D space and over all the possible

velocities, i.e., ∭−∞

∞𝑁𝐹(𝑐𝛼)𝐹(𝑐𝛽)𝐹(𝑐𝛾)𝑑𝑐𝛼𝑑𝑐𝛽𝑑𝑐𝛾 yields the number

of particles in the system, N. Hence,

∭−∞

∞𝐹(𝑐𝛼)𝐹(𝑐𝛽)𝐹(𝑐𝛾)𝑑𝑐𝛼𝑑𝑐𝛽𝑑𝑐𝛾 = 1

Since directions are arbitrary, function F should not depend on

direction but only on the distance of the origin, which is equivalent to

depend on the square of the particle speed (modulus). This leads to,

𝐹(𝑐𝛼)𝐹(𝑐𝛽)𝐹(𝑐𝛾) = 𝛷(𝑐𝛼² + 𝑐𝛽² + 𝑐𝛾²) (16)

where Φ is a positive unknown function which represents the combined

probability in the three directions of space. The mathematical behavior

shown in Eq. (16) is found in logarithmic and exponential functions, but

only a special exponential function can satisfy the two hypothesis given.

It is a Gaussian function of the following form

𝐹(𝑐) = 𝐴3𝑒−𝐵𝑐2

The probability of particles lying in a spherical shell with velocities

between c + dc will be then 𝐹(𝑐)𝑑𝑐 = 4𝜋𝑐²𝐴3𝑒−𝐵𝑐2𝑑𝑐.

Page 57: 2014 - Modelos Físico-Matemáticos de Fluidos

57

Constants A and B are found by integrating F over all possible

speeds to find the total number of particles N and their energy E, yielding

to

𝐹𝑐(𝑐) = 4𝜋𝑐2 (

𝑚

2𝜋𝑘𝑏𝑇)3/2

𝑒−

𝑚𝑐2

2𝑘𝑏𝑇 (17)

This probability density function gives the probability of finding

a particle within an infinitesimal spherical shell of radius c. This shell

represents the equidistant particles from the origin, i.e., the particles that

have the same velocity modulus. Therefore, this is the distribution used

to represent molecular velocities of an ideal gas. Distribution (17)

increases parabolically from zero for low speeds, reaching its maximum

and then decreases exponentially. When temperature T increase, the curve

is shifted to the right, meaning a distribution with higher velocities. An

example of such a distribution is given in Fig. 3 for common gases at 300

Kelvin. While high temperatures tend to shifts the curve to the right,

making the exponential decrease slower, the mass of each molecule tend

to shift the curve to the left, speeding up the exponential decrease. These

are the two competing parameters that shape the equilibrium distribution

for a given gas.

Dividing Eq. (17) by the surface of the sphere yields to

𝐹(𝑐) = (

𝑚

2𝜋𝑘𝑏𝑇)3/2

𝑒−

𝑚𝑐2

2𝑘𝑏𝑇

which is the probability of finding a particle inside an infinitesimal

Cartesian element dc with speeds around c.

If the ideal gas has a bulk velocity 𝑢 relative to a reference frame,

a peculiar velocity is defined as 𝑣 = 𝑐 − 𝑢, which is the velocity of a

particle with respect to the flow.

Now let 𝑓(𝑐)𝑒𝑞 = 𝑚𝑁𝐹(𝑐) be the mass of particles expected to be

found in the element dc, around c. Since 𝐹(𝑐) does not depend on r, this

also represents the mass of particles expected in a dcdr volume in phase

space, thus mN is equivalent to the specific mass 𝜌. Therefore,

𝑓(𝒄)𝑒𝑞 = 𝜌 (

𝑚

2𝜋𝑘𝑏𝑇)3/2

𝑒−𝑚(𝒄−𝒖)2

2𝑘𝑏𝑇 (18)

Page 58: 2014 - Modelos Físico-Matemáticos de Fluidos

58

Figure 4 – Common gases at 300K.

Source: Author

An ideal gas in thermodynamical equilibrium is governed by Dist.

(18). This distribution makes the pressure tensor hydrostatic and the

energy flux vanishes. The corresponding fields of internal energy, density

and pressure are everywhere constant. (Truesdell, Muncaster, 1980)

The equilibrium distribution was first derived by Maxwell in 1860

with some abstract arguments, namely the two hypothesis assumed for the

distribution function’s nature. In 1867 he extended the analysis trying to

justify his arguments. He used the consideration that the distribution

should be stationary at thermodynamical equilibrium, i.e. it should not

change its shape as a result of the continual collisions between the

particles. This would involve a more sophisticated analysis on the nature

of collision but it was still an essentially mathematical analysis, with no

persuasive physical arguments to fundament why atoms should behave

like that (MAXWELL, 1860, 1867; LINDLEY, 2001; UFFINK, 2014).

In 1868 Boltzmann verified Maxwell’s arguments in a variety of

models, including gases in a static external force field. He then replaced

the logic-mathematical assumptions made by Maxwell with a more

Page 59: 2014 - Modelos Físico-Matemáticos de Fluidos

59

physical set of arguments, deriving the same distribution from the ergodic

hypothesis18, using a Hamiltonian system. These results suggests that the

distribution of the molecular velocities for an isolated mechanical system

in a stationary state will always tend to the maxwellian distribution as the

number of particles approaches infinity. They dispense any assumptions

about the collisions or the state of matter. They had the power of

generality. (LINDLEY, 2001; UFFINK, 2014).

For all these reasons, Dist. (18) is also called the Maxwell-Boltzmann distribution.

2.2.3 The local equilibrium distribution

If not further mentioned, a stationary system is in a global

thermodynamic equilibrium, which is a state where all intensive

properties are homogeneous throughout the system vanishing all kind of

macroscopic fluxes. A local thermodynamical equilibrium however,

means that intensive properties do vary with space, but so slowly that in

the neighborhood of any given point it can be assumed thermodynamic

equilibrium and thus, a local equilibrium distribution can be defined just

replacing the constants of Dist. (18) by its counterpart functions of space

and time. Therefore,

𝑓(𝐫, 𝒄, 𝑡)𝑒𝑞 = 𝜌(𝑟, 𝑡) (

𝑚

2𝜋𝑘𝑏𝑇(𝑟, 𝑡))3/2

𝑒−𝑚(𝒄−𝒖(𝑟,𝑡))2

2𝑘𝑏𝑇(𝑟,𝑡) (19)

2.2.4 The Boltzmann equation (BE)

Let 𝑓(𝐫, 𝒄, 𝑡)∆r∆c = f(𝐪, t)∆𝐪 be the number of particles at time

𝑡 expected to be found in the hypercube ∆𝐪 in the phase space 𝔹. They

have coordinates between (𝐪 + ∆𝐪) = (𝐫 + ∆𝐫, 𝒄 + ∆𝐜). A Taylor

expansion can be used to infer the expected value of 𝑓 for a small

displacement of its variables, hence

𝑓(𝐫 + ∆𝐫, 𝒄 + ∆𝐜, 𝑡 + ∆t) = 𝑓(𝐫, 𝒄, 𝑡) (20)

18 By the Hamiltonian equations of motion, a point in phase space

representing a system evolves in time, and thus describes a trajectory 𝒒𝑡. This

trajectory is constrained to lie on a given energy hypersurface ℋ(𝒒𝑡) = 𝐸, where

ℋ denotes the Hamiltonian function and E the associated energy. Now, the

ergodic hypothesis states that all dynamic states associated to the energy E are

equiprobable, implying that a dynamical system will pass over all these states in

sufficient long periods of time.

Page 60: 2014 - Modelos Físico-Matemáticos de Fluidos

60

+𝜕𝑓

𝜕𝒓∆𝐫 +

𝜕𝑓

𝜕𝒄∆𝐜 +

𝜕𝑓

𝜕𝑡∆t + 𝒪2

where 𝒪2 represents the higher order terms. Rearranging Eq. (20) and

dividing by ∆t,

𝑓(𝐫 + ∆𝐫, 𝒄 + ∆𝐜, 𝑡 + ∆t) − 𝑓(𝐫, 𝒄, 𝑡)

∆t

=𝜕𝑓

𝜕𝒓

∆𝐫

∆t+

𝜕𝑓

𝜕𝒄

∆𝐜

∆t+

𝜕𝑓

𝜕𝑡

∆t

∆t+

𝒪2

∆t

Then, taking the limit when ∆𝐭 0 yields to

𝐷𝑓

𝐷𝑡=

𝜕𝑓

𝜕𝑡+ 𝐜

𝜕𝑓

𝜕𝒓+ 𝐠

𝜕𝑓

𝜕𝒄 ,

(21)

which is just the convective derivative19 of 𝑓 derived from a Taylor

expansion.

But if 𝑓 is being transported from(𝐪, t) to (𝐪 + ∆𝐪, 𝑡 + ∆t), the

convective derivative is zero, because it represents f traveling in a

hypercube through the phase space 𝔹 . Changes inside this hypercube is

zero except if collisions occur.

If collisions occur, it shall be then represented by a collision

operator Ω , hence

𝜕𝑓

𝜕𝑡+ 𝐜

𝜕𝑓

𝜕𝒓+ 𝐠

𝜕𝑓

𝜕𝒄= Ω

(21)

where 𝐠 is an acceleration due to external forces acting on the particles.

The collision process can bring in, or expel out particles from the

infinitesimal hypercube. Particles in the spatial coordinates’ interval (𝐫 +

∆𝐫) may acquire, or loose the velocities in the range (𝒄 + ∆𝐜) during time

interval ∆t. In Boltzmann’s model, particles behave like hard spheres colliding

elastically. Because particles (material points) do not have dimensions,

19 Also called material, substantial and total derivative. This is a more

generalized definition, whereas in fluid mechanics textbooks the third right-hand

term of Eq. (21) is suppressed from the definition, because 𝑓 in the NS equation

is the velocity vector and this derivative vanishes.

Page 61: 2014 - Modelos Físico-Matemáticos de Fluidos

61

they are modelled as points with a force field around them. Furthermore,

his model assumes some premises:

i. Binary collisions: the gas is sufficiently dilute, so that the

particles take most of time travelling in a straight line and eventually

encounters another particle (collision). Three or more particle-collision

would be so improbable, that they would not affect results.

ii. Conservation laws: collisions conserve momentum, mass and

kinetic energy (elastic collisions).

iii. Molecular chaos20: velocities of two particles about to collide

are uncorrelated and independent of position.

From the reference frame of a target particle with distribution 𝑓′

before collision, a bullet particle with distribution 𝑓∗′ comes about to

collide. The relative velocity before collision is given by ‖𝒄′∗ − 𝒄′‖, and [𝑓∗, 𝑓] are the distribution after collision for bullet and target particles,

which acquire velocities [𝒄∗, 𝒄], respectively.

The net balance inside the hypercube dq due to collisions of these

particles is described by the collision operator Ω, given by Boltzmann as

Ω = ∭‖𝒄′∗ − 𝒄′‖(𝑓∗

′𝑓′ − 𝑓∗𝑓)𝑠𝑑𝑠𝑑𝜖𝒅𝒄 (22)

where 𝑠𝑑𝑠𝑑𝜖 are scattering parameters.21

The revolutionary BE is then:

𝜕𝑓

𝜕𝑡+ 𝐜

𝜕𝑓

𝜕𝒓+ 𝐠

𝜕𝑓

𝜕𝒄= ∭‖𝒄′∗ − 𝒄′‖(𝑓∗

′𝑓′ − 𝑓∗𝑓)𝑠𝑑𝑠𝑑𝜖𝒅𝒄 (23)

or in equivalent notation

𝜕𝑡𝑓 + 𝒄 ∙ ∇𝒓𝑓 + 𝐠 ∙ ∇𝐜𝑓 = Ω,

20 Also known as Stoβzahlansatz (SZA). It is an important assumption,

because it introduces time asymmetry in the modelling, as stated by the

Loschmidt’s paradox in 1874, in which it should not be possible to derive an

irreversible model from time-symmetric dynamics. 21 Details on the derivation of the Boltzmann equation can be found in

Ref. (PHILIPPI; BOLTZMANN, 1896, 1872; LIBOFF, 2003; CERCIGNANI,

1988)

Page 62: 2014 - Modelos Físico-Matemáticos de Fluidos

62

The left-hand side of (23) is the convective derivative of 𝑓,i.e., a

linear transport operator. The right-hand side is the non-linear collision

operator.

The BE was first published in 1872 and forms the basis for the

kinetic theory22 of gases (BOLTZMANN, 1872). It belongs to the

fundamental equations of physics since its birth and although derived for

the context of dilute gases, its validity stretches from transport processes

and hydrodynamics all the way to cosmology applications (ALEXEEV,

2014; SUCCI, 2001).

In equilibrium conditions, the right-hand side of Eq. (23) must

vanish, otherwise 𝑓 would vary with time. This implies 𝑓∗′𝑓′ = 𝑓∗𝑓, which

also yields to the Maxwell-Boltzmann distribution 𝑓(𝒄)𝑒𝑞.

An important result derived from the BE is called the H-theorem.

Assuming that Eq. (23) is valid for all times, it is possible to define a

function

𝐻(𝑓) = ∫𝑓 𝑙𝑛𝑓 𝒅𝒄

and demonstrate that this function always decrease over time, except

when 𝑓 = 𝑓(𝒄)𝑒𝑞, satisfying the relation

𝜕𝐻(𝑓)

𝜕𝑡≤ 0

The H-theorem is interpreted as the molecular counterpart of the

Second Law of thermodynamics, in which a property called entropy can

only increase over time for closed systems. This theorem is the result of

the time asymmetry introduced by the assumption of molecular chaos,

indicating irreversibility in time, which is also a property of the

thermodynamic entropy.

The BE can be discretized in a finite set of velocities Φ𝑛 =𝒄0, 𝒄1, 𝒄2, … , 𝒄𝑛−1 to cut its dependency on the three velocity variables,

yielding to the discrete Boltzmann equation

22 “Kinetic theory is the branch of statistical physics dealing with

dynamics of non-equilibrium processes and their relaxation to thermodynamic

equilibrium.” (SUCCI, 2001, p. 3)

Page 63: 2014 - Modelos Físico-Matemáticos de Fluidos

63

𝜕𝑓𝑖𝜕𝑡

+ 𝐜𝑖

𝜕𝑓𝑖𝜕𝒓

+ 𝐠𝜕𝑓𝑖𝜕𝒄

= Ω𝑖(𝑓 ) , 𝑖 = 0,1,… , 𝑛 − 1.

Remember, velocities range from negative to positive infinity.

Now 𝑓𝑖 = 𝑓(𝒓, 𝐜𝑖 , 𝑡) and the vector 𝑓 = (𝑓0, 𝑓1, … , 𝑓𝑛−1). The final result

is that the discrete BE simplified Eq. (23) by turning its dependency on

seven variables of 𝑓 in set of 𝑛 coupled equations for the unknown

function 𝑓𝑖, which depends on four variables instead of seven. It is also

important to note that the integrals in the collision operator was

substituted by summations in its discrete counterpart, representing a

substantial simplification in the most complex term of the BE.

2.2.5 Macroscopic equations recovery

Moments of a function is a common mathematical concept used

over continuous functions, especially for probability density functions.

The 𝑛𝑡ℎ moment of a real-valued continuous function ℎ(𝑥) about 𝑥0 is

defined as:

𝜇𝑛 = ∫ (𝑥 − 𝑥0)

𝑛ℎ(x)𝑑𝑥∞

−∞

If 𝑥0=0 and ℎ(𝑥) is a probability density function, the 𝑛𝑡ℎ

moment represents the most probable value of 𝑥𝑛, or its expectancy.

Since distribution 𝑓(𝐫, 𝒄, 𝑡) is a function with physical meaning, its

moments over the velocities 𝒄 are interpreted as the hydrodynamic

functions of the continuum description. So, the zeroth moment of 𝑓 is just

its integration over all possible velocities, giving rise to a function that

represents the expected mass in a differential element about 𝐫 at time 𝑡,

corresponding to the macroscopic specific mass function 𝜌(𝐫, 𝑡),

therefore,

𝜌(𝐫, 𝑡) = ∫ 𝑓(𝐫, 𝒄, 𝑡)𝒅𝒄

−∞

(24)

The first moment recovers the momentum density function, from

where the macroscopic velocity 𝒖(𝐫, 𝑡) can be determined:

Page 64: 2014 - Modelos Físico-Matemáticos de Fluidos

64

𝜌(𝐫, 𝑡)𝒖(𝐫, 𝑡) = ∫ 𝒄𝑓(𝐫, 𝒄, 𝑡)𝒅𝒄

−∞

(25)

Moments of any order can be defined arbitrarily,

Ϣ𝑐𝛼𝑐𝛽 ...𝑐𝜔

= ∫ 𝑐𝛼𝑐𝛽 . . . 𝑐𝜔𝑓(𝐫, 𝒄, 𝑡)𝒅𝒄∞

−∞

but only low order moments have physical meaning. Second order

moments are related to momentum transfer and energy. There are two of

them. The first one is a scalar second moment, which recovers from the

physical underworld, the kinetic energy associated with the particles’

speeds. The second one, is the second-rank momentum flux tensor Π𝛼𝛽 . A monoatomic gas has only energy associated to the translational

motion, thus, the total energy of a particle is its kinetic energy

K = mc²/2 , therefore,

𝜌(𝐫, 𝑡)ℯ(𝐫, 𝑡) =

1

2∫ 𝑐𝛼𝑐𝛼 𝑓(𝐫, 𝒄, 𝑡)𝒅𝒄

−∞

is the energy density in a monoatomic gas, remembering that 𝑓 = 𝑚𝑁𝐹. Substituting the peculiar velocity 𝑣𝛼 = 𝑐𝛼 − 𝑢𝛼 in the equation

above yields to

𝜌(𝐫, 𝑡)ℯ(𝐫, 𝑡) =

1

2∫ 𝑣𝛼𝑣𝛼 𝑓(𝐫, 𝒄, 𝑡)𝒅𝒄

−∞

+1

2𝜌(𝐫, 𝑡)(𝑢(𝐫, 𝑡))

2

(

(26)

where the second right-hand term is associated with the macroscopic

kinetic energy and the equation can be expressed as (suppressing the

arguments):

𝜌ℯ = 𝜌ℯ𝑝 +

1

2𝜌𝑢2

The term 𝜌ℯ𝑝 is called the mean peculiar kinetic energy of the

particles. This energy is associated with the molecular motion of the

Page 65: 2014 - Modelos Físico-Matemáticos de Fluidos

65

particles, being independent from macroscopic velocity 𝑢 and vanishes

only at absolute zero. It is proportional to the mean kinetic energy per

particle, thus, this energy sums to

𝜌ℯ𝑝 = 𝑛 (

3

2𝑘𝑏𝑇)

where the number density 𝑛 is given by

𝑛(𝐫, 𝑡) =

1

𝑚∫ 𝑓(𝐫, 𝒄, 𝑡)𝒅𝒄

−∞

The momentum flux tensor Π𝛼𝛽 can be recovered by relation

Π𝛼𝛽 = ∫ 𝑐𝛼𝑐𝛽 𝑓(𝐫, 𝒄, 𝑡)𝒅𝒄

−∞

And inserting the peculiar velocity,

Π𝛼𝛽 = 𝜌𝑢𝛼𝑢𝛽 + ∫ 𝑣𝛼𝑣𝛽 𝑓(𝐫, 𝒄, 𝑡)𝒅𝒄

−∞

= 𝜌𝑢𝛼𝑢𝛽 − Π𝛼𝛽𝑠𝑡𝑟

which is just exactly the result derived in the macroscopic approach.

As before, the mechanical pressure can be defined as =−Π𝛼𝛼

𝑠𝑡𝑟

3

(see page 47), so (𝐫, 𝑡) =1

3∫ 𝑣𝛼𝑣𝛼 𝑓(𝐫, 𝒄, 𝑡)𝒅𝒄

−∞. For ideal gases =

𝑝 and since from Eq. (26) 1

2∫ 𝑣𝛼𝑣𝛼 𝑓(𝐫, 𝒄, 𝑡)𝒅𝒄

−∞= 𝜌ℯ𝑝, it yields to

𝑝 =

2

3𝜌ℯ𝑝 = 𝑛𝑘𝑏𝑇

and integrating over a volume 𝑉 = ∆𝒓 where intensive properties are held

constant

∫ 𝑝𝒅𝒓

𝑉

= ∫ 𝑛(𝐫, 𝑡)𝑘𝑏𝑇𝒅𝒓

𝑉

→→→ 𝑝𝑉 = 𝑁𝑘𝑏𝑇

Page 66: 2014 - Modelos Físico-Matemáticos de Fluidos

66

which is just the microscopic ideal gas law Eq. (14)!

The third order moment is a vector, and represents the transport, or

flux of the kinetic energy.

𝔔𝛽 =

1

2∫ 𝑐𝛼𝑐𝛼𝑐𝛽 𝑓(𝐫, 𝒄, 𝑡)𝒅𝒄

−∞

2.2.6 The BGK kinetic model Examining Eq. (23) for a possible solution, one finds that it

actually deals with a non-linear partial stochastic integro-differential

equation! Now, that sounds really scary, and it is. Solving the Boltzmann

equation for any application is a challenging task. It includes

• Solving the seven fold, space (six) + time (one), nonlinear

integro-differential equation given by Eq. (23).

• Computing the collision operator (22) by performing its integrals.

• Computing specific mass and momentum given by Eq. (24) and

Eq. (25).

So, it becomes natural trying to simplify this equation while

retaining the essential physics in it. Most of this complexity is due to the

non-linear collision operator Ω(𝑓, 𝑓), which is replaced by simpler linear

ones, forming approximating models to the BE, called kinetic models.

Whatever might be the proposed simplifying collision operator, it

must satisfy three basic properties of the continuous, original one. It might

be denoted as Щ(𝑓) and the three properties are:

i. Щ(𝑓𝑒𝑞) = 0

ii. ∫Щ(𝑓)𝒅𝒄 = ∫c𝛼Щ(𝑓)𝒅𝒄 = ∫c²Щ(𝑓)𝒅𝒄 = 0

iii. ∫log (𝑓) Щ(𝑓)𝒅𝒄 ≤ 0

Page 67: 2014 - Modelos Físico-Matemáticos de Fluidos

67

meaning: it vanishes for a Maxwell-Boltzmann distribution 𝑓𝑒𝑞. It must

conserve mass, momentum and kinetic energy and, it must satisfy the H-

theorem, and vanishes only if 𝑓 = 𝑓𝑒𝑞.

Property iii expresses a tendency of the gas to the equilibrium

distribution 𝑓𝑒𝑞. This feature can be taken into account considering that

the average effect of collisions on f will be proportional to the departure

of f from 𝑓𝑒𝑞,i.e., the collisions will relax f toward 𝑓𝑒𝑞 proportionally to

a collision frequency parameter 𝜔23. So, if the collision frequency 𝜔 is

constant relative to velocity 𝒄, the BGK model is introduced as

Щ𝐵𝐺𝐾(𝑓) = 𝜔(𝑓𝑒𝑞(𝒄) − 𝑓(𝒄)) (27)

The main advantage of BGK collision model is the ability to give

integral equations for macroscopic variables 𝜌, 𝒖, 𝑇, which, although non-

linear, are easily solvable in fast computers. On the other hand, BGK’s

non-linearity is much worse than that of the original operator. While the

latter is only quadratic in 𝑓, the former contains 𝑓 in the numerator and

denominator of an exponential (u and T in 𝑓𝑒𝑞 are functions of 𝑓). (CERCIGNANI, 1988). The final kinetic model is then:

𝜕𝑡𝑓 + 𝒄 ∙ ∇𝒓𝑓 + 𝐠 ∙ ∇𝐜𝑓 = 𝜔(𝑓𝑒𝑞(𝒄) − 𝑓(𝒄)) (28)

The purpose of a kinetic model is not to solve the full BE but to

retrieve the macroscopic equations which describe the physical behavior

of a system, since it is the primary goal of most of applications.

One important aspect of the BGK model is a result derived from

property ii. This might be formulated as

∫ Φ Щ(𝑓)𝒅𝒄 = 0

(29)

where the vector Φ represents the collisional invariants ,i.e., the

quantities which must be conserved during collisions, given as

23 A correspondent parameter is often used in LBM literature; 𝜏 = 1/𝜔,

where 𝜏 is interpreted as the mean free flight time between collisions.

(MATTILA, 2010)

Page 68: 2014 - Modelos Físico-Matemáticos de Fluidos

68

Φ = [

1𝒄𝒄²

]

Replacing the BGK operator Eq. (27) into Eq. (29) yields to the

following result: (BRESOLIN, 2012)

𝜌(𝐫, 𝑡) = ∫ 𝑓(𝐫, 𝒄, 𝑡)𝒅𝒄∞

−∞

= ∫ 𝑓𝑒𝑞(𝐫, 𝒄, 𝑡)𝒅𝒄∞

−∞

𝜌(𝐫, 𝑡)𝒖(𝐫, 𝑡) = ∫ 𝒄𝑓(𝐫, 𝒄, 𝑡)𝒅𝒄∞

−∞

= ∫ 𝒄𝑓𝑒𝑞(𝐫, 𝒄, 𝑡)𝒅𝒄∞

−∞

𝜌ℯ𝑝 =1

2∫ 𝑣𝛼𝑣𝛼 𝑓(𝐫, 𝒄, 𝑡)𝒅𝒄

−∞

=1

2∫ 𝑣𝛼𝑣𝛼 𝑓

𝑒𝑞(𝐫, 𝒄, 𝑡)𝒅𝒄∞

−∞

remembering that the peculiar velocity 𝑣𝛼 = 𝑐𝛼 − 𝑢𝛼 is the velocity of

the particle in a reference frame that moves with the fluid macroscopic

velocity and 𝜌ℯ𝑝 the mean peculiar kinetic energy.

This is an important advantage in the BGK model, since the

hydrodynamic equation can be recovered from the moments of the

equilibrium distribution 𝑓𝑒𝑞, which is a well known function.

Page 70: 2014 - Modelos Físico-Matemáticos de Fluidos

70

* 24

24 Maurits Cornelius Escher (1898-1972) was a Dutch graphic artist,

known for his mathematically inspired works, exploring impossible

constructions, infinity and symmetry.

Circle Limit - Woodcut in black and ocre. Escher, 1960.

Page 71: 2014 - Modelos Físico-Matemáticos de Fluidos

71

3 THE LATTICE-BOLTZMANN METHOD

Discrete simulations for fluid flow really began to advance in the

80’s with a modified version of Lattice-Gas Automaton (LGA)25 for the

Navier-Stokes equation. Limitations of this Boolean26 model were soon

recognized and the Boolean variables were further replaced by real ones.

This idea, introduced by McNamara and Zanetti in 1988, is widely

considered as the birth of LBM. Since then, scientific research grew

rapidly around this method, which is now a prolific theme with an

uncountable number of models, variations of those models, and

applications of them.

The Lattice-Boltzmann method (LBM) is the general name of the

discrete models based on the Lattice-Boltzmann equation (LBE), given as

𝑓𝑖(𝒓 + ∆𝑡𝒄𝒊, 𝑡 + ∆𝑡) = 𝑓𝑖(𝒓, 𝑡) − Ω𝑖(𝒓, 𝑡)

where the subscript 𝑖 means the set of prescribed velocities chosen to

represent the whole velocity space. The LBE can be seen as the fully

discrete counterpart of the BE. Remember that in the discrete BE only the

velocity space has been discretized. In the LBE, both space and time are

also discretized, yielding to a fully discrete scheme.

It is important to stress that standard LBE methods, or LBM, are

weakly compressible approximations of the incompressible NS equations,

intended to recover its macroscopic physics with the mesoscopic

approach (SUCCI, 2001).

Numerically, the method consists in a stream-collide algorithm,

which can be detailed in steps by the following scheme:

1. Set up distributions in the domain for the initial time

accordingly to the initial conditions.

2. Compute collision term Ω𝑖(𝒓, 𝑡) for every point in the

domain.

3. Compute the new distributions for every point.

4. Stream the distributions.

5. Apply boundary conditions.

6. Return to step 2.

25 A more detailed description of this LGA model and its evolution to

LBM is given by (SUCCI, 2001). 26 In Boolean logic variables have only two possible states, often

represented as true/false, or, 0/1.

Page 72: 2014 - Modelos Físico-Matemáticos de Fluidos

72

The loop that represents steps (2-3-4-5-6-2) can also be done with

steps (4-5-6-2-3-4), where the initial distributions are considered to be

given after a full colliding step.

3.1 LBGK SCHEMES

A further step for LBM occurred in 1991 and 1992, when three

different parties proposed the replacement of the collision term as a

simple relaxation process involving a single parameter. (MATTILA,

2010).

Ω𝑖(𝒓, 𝑡) = 𝜔(𝑓𝑖(𝒓, 𝑡) − 𝑓𝑖𝑒𝑞

(𝒓, 𝑡))

These models were called LBGK and can be seen as a discrete

counterpart of the BGK kinetic model Eq. (28). A direct derivation from

the BE has been first stablished by HE; LUO (1997), who demonstrated

that LBM can be seen as a finite-difference approximation of the BE. A

systematically discretization approach from the BGK kinetic model to

higher order schemes is shown by PHILIPPI et al. (2006) and SHAN;

YUAN; CHEN (2006).

The LBGK general representation is therefore

𝑓𝑖(𝒓 + ∆𝑡𝒄𝒊, 𝑡 + ∆𝑡) = 𝑓𝑖(𝒓, 𝑡) − 𝜔(𝑓𝑖(𝒓, 𝑡) − 𝑓𝑖𝑒𝑞

(𝒓, 𝑡))

QIAN et al. (1992) proposed a family of BGK schemes that share

a common discrete equilibrium function

𝑓𝑖𝑒𝑞(𝜌, 𝒖) = 𝑤𝑖𝜌 (1 +

𝑐𝑖𝛼𝑢𝛼

𝜃+

𝑐𝑖𝛼𝑢𝛼𝑐𝑖𝛽𝑢𝛽

2𝜃2−

𝑢𝛼𝑢𝛼

2𝜃)

(

30)

The discrete weights 𝑤𝑖 and the parameter 𝜃 are model dependent.

The arguments of 𝑓𝑖𝑒𝑞

are local, and represent the hydrodynamic variables

recovered with the local moments of the discrete distribution 𝑓𝑖:

𝜌(𝐫, 𝑡) = ∑𝑓𝑖(𝒓, 𝑡)

𝑖

𝜌(𝐫, 𝑡)𝑢𝛼(𝐫, 𝑡) = ∑𝑐𝑖𝛼𝑓𝑖(𝒓, 𝑡)

𝑖

Page 73: 2014 - Modelos Físico-Matemáticos de Fluidos

73

Note the similarity with the equations above to their continuous

counterpart Eq. (24) and Eq. (25). The integrals were replaced by

summations and this means that the dimensionality of 𝑓 and 𝑓𝑖 are

different. While the former has a dimensionality of [𝑘𝑔/𝑟³𝑐³], where

𝑟³𝑐³, is a hypercube in the phase space, the later has it as [𝑘𝑔/𝑟³]. Each of the models proposed by QIAN et al. (1992) are defined

when a set D of d dimensions in space, and a set Q of q velocities are

specified. They called each model of DqQq. For these models, a uniform

lattice discretization is used.

As an example, the D2Q9 model is a model which operates in a

uniform two dimensional lattice with a set of nine velocities. Eight

velocities go towards the neighboring lattice points, and one velocity goes

nowhere. It stays still due to zero speed. There are only three possible

speeds in this model: 0, 𝑐𝑟, √2𝑐𝑟, where 𝑐𝑟 is the reference speed in the

Cartesian axes. This scheme can be visualized in Fig. 5.

Figure 5 – Velocity vectors in the D2Q9 model: the distributions 𝒇𝒊 are

transported with three different speeds along the 𝒊 different directions,

represented by the nine velocity vectors. The speeds are just the modulus of these

vectors. In this model only three speeds are possible: 0, 𝒄𝒓, √𝟐𝒄𝒓. The lattice

spacing ∆𝒓 and the discrete time step are related with the reference speed by ∆𝒓 =∆𝒕𝒄𝒓.

Source: (MATTILA, 2010)

Page 74: 2014 - Modelos Físico-Matemáticos de Fluidos

74

The discrete weights 𝑤𝑖 are assumed to be speed dependent. For

the D2Q9 model, 𝑤0 = 𝑊0 is the weight for speed zero. 𝑤𝑖 =𝑊1, 𝑓𝑜𝑟 𝑖 = 1,2,3,4; because these speeds are identical, and similarly,

𝑤𝑖 = 𝑊2, 𝑓𝑜𝑟 𝑖 = 5,6,7,8. Therefore, for the D2Q9 model there are only

three different weights 𝑊𝑖 which represent the set of nine velocities in Eq.

(20).

The parameter 𝜃 is given by

𝜃 =

𝑐𝑟²

3

(4)

and is related to the speed of sound through a Chapman-Enskog analysis27, which derives an appropriate equation of state for these LBGK

family of schemes, given by

𝑝 = 𝜃𝜌 (31)

Remembering from section 2.1.4 that the sound speed is given as

𝑐𝑠 = (𝜕𝑝

𝜕𝜌 |

𝑠

)

1/2

The lattice sound speed is then defined for analogy as 𝑐𝑠 = √𝜃.

Furthermore, the LBGK models share a common expression for the

kinematic viscosity:

𝜈 = 𝜃 (

1

𝜔−

1

2)Δ𝑡

Table 1 shows the LBGK models proposed by QIAN et al. (1992)

with their respective weights. The most common models are the two

dimensional D2Q9 and the three dimensional D3Q19.

27 A multiple scale analysis which recover the Navier-Stokes equation and

the macroscopic transport coefficients from the LBM theory.

Page 75: 2014 - Modelos Físico-Matemáticos de Fluidos

75

Table 1 – LBGK models

Model 𝑾𝟎 𝑾𝟏 𝑾𝟐 𝑾𝟑

D1Q3 2/3 1/6 0 0

D2Q9 4/9 1/9 1/36 0

D3Q15 2/9 1/9 0 1/72

D3Q19 1/3 1/18 1/36 0

D4Q25 1/3 1/36 0 0 Source: (QIAN et al., 1992)

3.1.1 Physical LBGK simulations The best way to simulate physical flows is utilizing the dynamic

similarity discussed in section 2.1.5. This powerful feature allow us to

forget our worries with quantitatives aspect of some variables. All that

matters is the Reynolds number of the physical problem to be simulated.

This number is then implemented in a LBGK in its lattice-dimensional form.

In order to work with this lattice-dimensional form, a set of lattice-

parameters must be set equal to unity, remembering the relation ∆𝑟𝑙 =∆𝑡𝑙𝑐𝑟𝑙

which bounds them together, where subscript 𝑙 indicates lattice

variables28.

So we have

𝑐𝑟𝑙= 𝜌𝑙 = ∆𝑟𝑙 = ∆𝑡𝑙 = 1

Now, any characteristic length 𝐿 follows the relation 𝐿 = 𝐿𝑙∆𝑟,

where 𝐿𝑙 will be the number of lattice-spacing ∆𝑟𝑙 (=1) which composes

the 𝐿 representation. As an elucidative example, imagine a characteristic

length 𝐿 = 1 𝑚𝑒𝑡𝑒𝑟. We decide to represent it with 11 pixels, or 11

lattice-nodes (or points). It is easy to conclude that in 11 lattice-nodes,

there will be 10 lattice-spacing ∆𝑟𝑙, so 𝐿𝑙 = 10. We conclude that every

lattice-spacing ∆𝑟𝑙 represents in fact a real discrete-spacing

∆𝑟 = 0.1𝑚𝑒𝑡𝑒𝑟

𝑙𝑎𝑡𝑡𝑖𝑐𝑒−𝑠𝑝𝑎𝑐𝑖𝑛𝑔 .

The other parameters follow analogous relations. This lattice-

variables allow to construct also a lattice-viscosity and lattice-sound-speed

28 Which are identical to dimensionless variables. Subscript 𝑙 and

superscript * are used interchangeably.

Page 76: 2014 - Modelos Físico-Matemáticos de Fluidos

76

𝑐𝑠𝑙2 = 𝜃𝑙 =

1

3 → 𝜈𝑙 =

1

3(1

𝜔−

1

2)

These lattice-variables are also related to as dimensionless

variables, because they do not refer to a dimensional world but instead, to

the computing world. The reader should note that thinking in terms of

lattice-units helps to understand the problems dimensionally, but that

dimensionless units or lattice-units are totally correspondent. Changing

now subscript 𝑙 for lattice-units to superscript * for dimensionless

variables, the whole LBGK method will be given as

𝑓𝑖∗(𝒓∗ + ∆𝑡∗𝒄𝒊

∗, 𝑡∗ + ∆𝑡∗) = 𝑓𝑖∗(𝒓∗, 𝑡∗) − 𝜔 (𝑓𝑖

∗(𝒓∗, 𝑡∗) − 𝑓𝑖𝑒𝑞∗

(𝒓∗, 𝑡∗))

𝑓𝑖

𝑒𝑞∗(𝜌∗, 𝒖∗) = 𝑤𝑖𝜌

∗ (1 + 3𝑐𝑖𝛼∗ 𝑢𝛼

∗ + 𝑐𝑖𝛼∗ 𝑢𝛼

∗ 𝑐𝑖𝛽∗ 𝑢𝛽

∗ −3

2𝑢𝛼

∗ 𝑢𝛼∗ )

𝜌∗(𝒓∗, 𝑡∗) = ∑𝑓𝑖∗(𝒓∗, 𝑡∗)

𝑖

𝜌∗(𝒓∗, 𝑡∗)𝑢𝛼∗ (𝒓∗, 𝑡∗) = ∑𝑐𝑖𝛼

∗ 𝑓𝑖∗(𝒓∗, 𝑡∗)

𝑖

And to recover the dimensional forms, the following relations are

called:

𝑐𝑖𝛼 = 𝑐𝑖𝛼∗ 𝑐𝑟; 𝑢𝛼 = 𝑢𝛼

∗ 𝑐𝑟; 𝑓𝑖 = 𝜌𝑓𝑖∗; 𝑓𝑖

𝑒𝑞= 𝜌𝑓𝑖

𝑒𝑞∗

where 𝜌 is a physical reference specific mass.

Now the Reynolds number can be simply set as

𝑅𝑒𝑙 =

𝐶∗𝐿∗

𝜈∗≡

𝑈𝐿

𝜈= 𝑅𝑒

𝐶∗ is a dimensionless characteristic lattice-speed. Likewise, 𝐿∗ is a

dimensionless characteristic lattice length counted in lattice-spacings and

𝜈∗ the lattice viscosity. The relation above relates the Reynolds number

Page 77: 2014 - Modelos Físico-Matemáticos de Fluidos

77

in the lattice world with this number in the physical world. If they are

equal, the discrete dynamics in the computer will be dynamically similar

to the real world dynamics, provided the limitations of the LBGK are not

overlooked.

Recover from section 2.1.4 that the incompressibility hypothesis is

generally valid if the Mach number is small enough. This limit is

normally accepted for 𝑀𝑎 ≤ 0.3.

Since LBGK is derived from the BE, which deals with ideal gases,

the model is naturally compressible, as can be seen in Eq. (31), which is

an ideal gas equation of state. Pressure and density are linearly dependent

on the parameter 𝜃, which can be thought as equivalent to temperature T.

Our dimensionless lattice sound speed is 𝑐𝑠∗ =

1

√3, so the lattice

Mach number is then 𝑀𝑎 = 𝐶𝑚𝑎𝑥∗ /𝑐𝑠

∗, where 𝐶𝑚𝑎𝑥∗ is the maximum speed

(modulus) found in the lattice. SUCCI, (2001) states that in order to avoid

compressibility errors, the Mach number should be held under control,

this would mean

𝑀𝑎2 < ~0.1

and therefore the maximum velocity should be held under

𝐶𝑚𝑎𝑥∗ < ~ 0.182

Being more precise than this limit, like SUKOP; THORNE,

(2007), state that 𝐶𝑚𝑎𝑥∗ should remain under approximately 0.1, thus

𝐶𝑚𝑎𝑥∗ <≈ 0.1

From this point on, we will always use the dimensionless form

of the LBM equations and relations. We will suppress all the

superscripts * for the sake of notation clarity and simplicity.

3.1.2 External force implementation

Recover the BE:

𝜕𝑓

𝜕𝑡+ 𝐜

𝜕𝑓

𝜕𝒓+ 𝐠

𝜕𝑓

𝜕𝒄= Ω .

Page 78: 2014 - Modelos Físico-Matemáticos de Fluidos

78

The third term on the left hand side of the BE is related to external

forces acting on the particles. The standard LBE is derived without this

term and assumes the general form:

𝑓𝑖(𝒓 + ∆𝑡𝒄𝒊, 𝑡 + ∆𝑡) = 𝑓𝑖(𝒓, 𝑡) − Ω𝑖(𝒓, 𝑡)

Many systems have internal or external body forces acting on the

particles. These forces might be electric forces, magnetic forces, gravity

forces, etc… If these forces are present, this external force term in the BE

must be incorporated into the model.

The effect of such forces can be seen physically as being injections

of momentum into the fluid particles. Therefore, an external force term is

added to the LBE, resulting in

𝑓𝑖(𝒓 + ∆𝑡𝒄𝒊, 𝑡 + ∆𝑡) = 𝑓𝑖(𝒓, 𝑡) − Ω𝑖(𝑠𝑑)(𝒓, 𝑡) + Ω𝑖

(𝑒)(𝒓, 𝑡)

where (sd) stands for short distance and (e) for external. The short

distance operator is related with the original collision operator Ω in the

BE and can be modelled with the BGK approximation. The new LBGK

model with external forces Ω𝑖(𝑒)29 is then:

𝑓𝑖(𝒓 + ∆𝑡𝒄𝒊, 𝑡 + ∆𝑡) = 𝑓𝑖 − 𝜔(𝑓𝑖 − 𝑓𝑖𝑒𝑞

) +𝑤𝑖

𝑐𝑠2𝑔𝑖𝑐𝑖

Arguments (𝒓, 𝑡) of 𝑓𝑖 and 𝑓𝑖𝑒𝑞

in the right hand side were

suppressed for simplicity. The body force in the 𝑖-th direction 𝑔𝑖

contributes to the probability of populations being transported with

molecular velocity 𝑐𝑖 through an internal product (𝑔𝑖𝑐𝑖) and is weighted

by the weight factors 𝑤𝑖.

Alternatively, for each time step, the net momentum induced by a

body force 𝑔𝛼 can be added to the macroscopic velocity with the

expression (SHAN; CHEN, 2003):

𝜌(𝐫)𝑢𝛼(𝐫) = 𝑐𝑖𝛼𝑓𝑖(𝒓) + (𝑔𝛼

𝜔)

29 Dimensionally, Ω𝑖(𝑒) is given as: Ω𝑖

(𝑒) =𝑤𝑖Δ𝑡

𝑐𝑠2 𝑔𝑖𝑐𝑖 .

Page 79: 2014 - Modelos Físico-Matemáticos de Fluidos

79

where the term (𝑔𝛼

𝜔) 30 represents an increase of momentum at a lattice

node by an amount of Δ𝑡𝑔𝛼 during each time step without changing the

specific mass 𝜌 (ZHANG, 2011).

A numerical technique to achieve stability improvement consists

in splitting the momentum contribution of the external force in two

halves. One half is added in the collision step and another half is added to

the macroscopic velocity.

3.2 BOUNDARY CONDITIONS (BC)

3.2.1 Non-slip at walls From the boundary layer theory it is known that a fluid particle

adjacent to a solid wall has exactly its speed, meaning that they are

“glued” to each other and no relative slip occurs.

This BC is numerically implemented with the halfway bounce-

back. It is a very simple idea: the walls are put between two nodes

(halfway). All distributions that point towards the wall are reversed in its

direction after a streaming step. This can be seen in Fig. 6. It shows as an

example, the halfway bounce-back for a D2Q9 scheme. The three

distributions that point towards the wall are just reversed at the same

origin point in the streaming step, while the other distributions, pointing

towards the fluid domain, stream normally.

Figure 6 – Streaming step with halfway bounce-back. The walls are

allocated between two adjacent nodes. The distributions that point towards the

wall are just reversed at the same origin point in the streaming step, while the

other distributions, pointing towards the fluid domain, stream normally.

Source: (RIIKILÄ, 2012)

30 This term is given dimensionally as (Δ𝑡𝑔𝛼

𝜔).

Page 80: 2014 - Modelos Físico-Matemáticos de Fluidos

80

This is mathematically stated as

𝑓𝑖𝑏(𝒓, 𝑡 + ∆𝑡) = 𝑓−𝑖

𝑏(𝒓, 𝑡)

meaning that all populations going in directions "𝑖" towards the boundary

"𝑏" will remain after streaming "𝑡 + ∆𝑡" at the same site "𝒓", but with

reversed directions " − 𝑖".

3.2.2 Periodic BC

This is the simplest boundary condition which can be applied at the

boundaries of the domain. It consists in topologically connect its

boundaries, forming a continuum domain in one or more directions. As

an example, a 2D computational domain can be converted in two different

topological manifolds with periodic boundary conditions. It will be either

a cylinder or a torus. This can be seen in Fig. 7.

Figure 7 – Periodic topological manifolds for a 2D domain. Black lines

shown where the extremities are “glued” together to form a continuum in either

one or both directions of the domain.

Source: (RIIKILÄ, 2012)

Page 81: 2014 - Modelos Físico-Matemáticos de Fluidos

81

3.2.3 Constant flux BC (Von Neumann)

When there is a desired velocity at the boundaries in order to

constrain a specific flux on them, there will be some unknown populations

coming from outside the domain that must be specified. For a D2Q9

model, there will be three unknown populations after the streaming step,

as can be seen in Figure 8. It shows a north boundary but it can be easily

understood for other boundaries by analogy.

Figure 8 – Three unknown populations (7,4,8) coming from outside the

computational domain, after the streaming step at the north boundary.

Source: (SUKOP; THORNE, 2007)

Let us consider a macroscopic velocity applied to the north boundary

of Fig. 7, i.e., a velocity vector 𝒖 = (𝑢𝑥 , 𝑢𝑦), then we have to solve for

this three distributions plus the density 𝜌. Therefore, four equations are

needed. The first three equations come from the moments of 𝑓𝑖.

𝜌(𝐫, 𝑡) = ∑𝑓𝑖(𝒓, 𝑡)

𝑖

𝜌(𝐫, 𝑡)𝑢𝛼(𝐫, 𝑡) = ∑𝑐𝑖𝛼𝑓𝑖(𝒓, 𝑡)

𝑖

Remembering that the second moment expression gives two

equations, one for each direction of the coordinate axis.

Page 82: 2014 - Modelos Físico-Matemáticos de Fluidos

82

The fourth equation can be found by assuming that the halfway

bounce-back condition holds for the non-equilibrium31 distributions in the

normal direction to the boundary, as proposed by ZOU; HE (2007), thus

𝑓2𝑛𝑒𝑞

= 𝑓4𝑛𝑒𝑞

→ 𝑓2 − 𝑓2𝑒𝑞

= 𝑓4 − 𝑓4𝑒𝑞

.

With some algebra it is possible to solve the unknowns with the

following expressions:

𝜌 =𝑓0 + 𝑓1 + 𝑓3 + 2(𝑓2 + 𝑓5 + 𝑓6)

1 + 𝑢𝑦

𝑓4 = 𝑓2 −2

3 𝜌𝑢𝑦

𝑓7 = 𝑓5 +(𝑓1 − 𝑓3)

2−

1

2𝜌𝑢𝑥 −

1

6𝜌𝑢𝑦

𝑓8 = 𝑓6 −(𝑓1 − 𝑓3)

2+

1

2𝜌𝑢𝑥 −

1

6𝜌𝑢𝑦

3.2.4 Constant pressure/density BC (Dirichlet)

Analogous to the Von Neumann BC, here, specific mass 𝜌0 is

specified, from where velocity is computed. Note that in standard LBGK

models density is related to pressure by the EOS Eq. (31). Therefore,

setting density is equivalent to setting pressure.

Using Fig. 7 again as an example and considering 𝑢𝑥 = 0 we need

to solve for the three unknown distributions plus velocity 𝑢𝑦. Using the

same equations as before and using the bounce-back of the non-

equilibrium distribution as proposed by ZOU; HE (2007), we get after

similar algebraic manipulations also similar expressions for the

unknowns:

31 The non-equilibrium distribution is defined as 𝑓𝑖

𝑛𝑒𝑞(𝒓, 𝑡) = 𝑓𝑖(𝒓, 𝑡) −

𝑓𝑖𝑒𝑞(𝒓, 𝑡), i.e., it is the deviation of 𝑓𝑖 from the equilibrium distribution 𝑓𝑖

𝑒𝑞.

Page 83: 2014 - Modelos Físico-Matemáticos de Fluidos

83

𝑢𝑦 =𝑓0 + 𝑓1 + 𝑓3 + 2(𝑓2 + 𝑓5 + 𝑓6)

𝜌0− 1

𝑓4 = 𝑓2 −2

3 𝜌0𝑢𝑦

𝑓7 = 𝑓5 +(𝑓1 − 𝑓3)

2−

1

6𝜌0𝑢𝑦

𝑓8 = 𝑓6 −(𝑓1 − 𝑓3)

2−

1

6𝜌0𝑢𝑦

3.2.5 Zero derivative at boundaries

This is a simpler and faster variation of the Von Neumann

boundary condition. It is suitable for unsteady flows at the outlets. It

consists of prescribing to the boundary nodes the same macroscopic

velocity from its nearest neighbors, which are in the normal directions to

the boundary, in such a way that the spatial derivative of macroscopic

velocities are zero over these directions, i.e., 𝜕𝑥𝑢𝑥 = 0 for west and east

boundaries and 𝜕𝑦𝑢𝑦 = 0 for south and north boundaries. This can be

done by copying all the distributions from the neighbors to the boundary

nodes. However, This BC might lead to unphysical results for some

simulations, as it was found in a flow past a cylinder. A better variation

is to copy only the unknown distributions from the neighbors. Using

Figure 7 as an example for the D2Q9 model, only Dist. 7, 4 and 8 would

be copied from the south neighbor site for this BC. This strategy gave

good results.

3.3 COLLISION OPERATOR ALTERNATIVES

3.3.1 Two-time relaxation collision operator (TRT)

The TRT is based on the decomposition of the collision operator

in its symmetric and anti-symmetric components, having each component

its own relaxation-time parameter (GINZBURG; D’HUMIÈRES, 2003).

Denoting index “+” for the symmetric part and “–” for the antisymmetric

one, the TRT is defined as

Ω𝑖 = Ω𝑖+(𝒓, 𝑡) + Ω𝑖

−(𝒓, 𝑡)

Page 84: 2014 - Modelos Físico-Matemáticos de Fluidos

84

Ω𝑖±(𝒓, 𝑡) = 𝜔± [𝑓𝑖

±(𝒓, 𝑡) − 𝑓𝑖𝑒𝑞±

(𝒓, 𝑡)]

𝑓𝑖

±(𝒓, 𝑡) =𝑓𝑖(𝒓, 𝑡) ± 𝑓−𝑖(𝒓, 𝑡)

2

𝑓𝑖𝑒𝑞±

(𝜌, 𝒖) =𝑓𝑖

𝑒𝑞(𝜌, 𝒖) ± 𝑓−𝑖𝑒𝑞(𝜌, 𝒖)

2

and the model is now

𝑓𝑖 = 𝑓𝑖 − 𝜔+ [𝑓𝑖+(𝒓, 𝑡) − 𝑓𝑖

𝑒𝑞+(𝒓, 𝑡)] − 𝜔−[𝑓𝑖

−(𝒓, 𝑡) − 𝑓𝑖𝑒𝑞−

(𝒓, 𝑡)]

yielding to

𝑓𝑖 = 𝑓𝑖 − 𝜔+ [𝑓𝑖 + 𝑓−𝑖

2−

𝑓𝑖𝑒𝑞

+ 𝑓−𝑖𝑒𝑞

2] − 𝜔− [

𝑓𝑖−𝑓−𝑖

2−

𝑓𝑖𝑒𝑞

− 𝑓−𝑖𝑒𝑞

2]

Again, 𝑓𝑖 , 𝑓−𝑖 and 𝑓𝑖𝑒𝑞

, 𝑓−𝑖𝑒𝑞

denote populations in opposite

directions.

The main reason to use the TRT is the gain in stability it provides.

This comes from the extra degree of freedom provided by the

antisymmetric relaxation parameter 𝜔−. To understand this is important

to remember that the decomposition of the distributions fulfil the

following relations

𝑓𝑖 = 𝑓𝑖+ + 𝑓𝑖

− 𝑓−𝑖 = 𝑓𝑖+ − 𝑓𝑖

− 𝑓𝑖+ = 𝑓−𝑖

+ 𝑓𝑖− = −𝑓−𝑖

the last two expressions exposes the fundamental property in TRT: odd

moments of the symmetric function vanishes32 as the even moments of

the antisymmetric function. The relaxation parameter 𝜔+ is therefore

32 Remember that the integral over the whole real line of an odd function

vanishes. The symmetric distribution 𝑓𝑖+

is even and becomes odd when

multiplied by odd functions like 𝑐𝛼 , 𝑐𝛼𝑐𝛼𝑐𝛽 , 𝑒𝑡𝑐.; The odd distribution

𝑓𝑖−

remains odd when multiplied by even functions, vanishing in the integral.

Page 85: 2014 - Modelos Físico-Matemáticos de Fluidos

85

coupled with the even moments, tuning viscosity, while relaxation

parameter 𝜔− is coupled with the odd moments, giving a further degree

of freedom. It is chosen to minimize the viscosity dependence of the slip

velocity, a numerical peculiarity of LBM (MATTILA, 2010).

The kinematic viscosity can be determined as before with 𝜔+:

𝜈 =1

3(

1

𝜔+−

1

2)

By choosing a “magic” proportion we can defined a 𝜔− which

minimizes this viscosity dependency of the slip velocity. The super-

convergent proportion for a D2Q9 Hagen-Poiseuille flow is given by

DUBOIS; LALLEMAND; TEKITEK (2010) as:

𝜔− =

8(2 − 𝜔+)

8 − 𝜔+

Note that if 𝜔− = 𝜔+ the TRT collision model

reduces to the standard single relaxation time BGK collision

model and this value is

𝜔± = 8 − 4√3

3.4 MULTIPHASE AND MULTICOMPONENT MODEL

The standard LBGK model is suitable for simulating fluid

dynamics in low Reynolds regimes. The true strength of LBM, however,

is its ability to simulate multiple fluids and phases. These models in LBM

are called multicomponent and multiphase models (MCMP). They are

very important for many applications, since they offer solutions for

physical phenomena as surface tension, evaporation, condensation,

cavitation, immiscible displacement, contact angle and others. Such

phenomena are mainly driven from microscopic forces and interactions

between molecules. Since LBM is based on a mesoscopic scale, it is able

to provide a bridge between this microscopic interactions and its bulk

result in the macroscopic world.

Fig. 10 shows an interesting example of such complex phenomena.

It is called “coalescence cascade”. It happens in fractions of a second

when dropping a small drop of ultra-purified deionized water in its own

Page 86: 2014 - Modelos Físico-Matemáticos de Fluidos

86

surface. The frames shown in Fig. 10 were taken with a high speed

camera.

MCMP models are particularly important for the petroleum

industry. Oil is often found with water, and/or displaced with water, in

reservoir rocks. This displacement process occurs in porous media, which

is an extremely intricate labyrinth of small pores down to the micrometer

scale. MCMP models are able to simulate such behavior, enlightening its

comprehension.

These models might be separate in two families: single component

multiphase models (SCMP), in which a single component fluid is

governed with a Van der Waals like EOS, instead of an ideal gas EOS.

This make possible phase transition.

The other family is the MCMP, where many non-ideal fluids can

coexist and interact with each other. Fig. 9 gives an overview of the LBM

models. It shows how components, interactions and parallelism are

interrelated.

Figure 9 - Framework for LBM models.

Source: (SUKOP; THORNE, 2007)

Page 87: 2014 - Modelos Físico-Matemáticos de Fluidos

87

Figure 10 – Coalescence cascade of a drop.

Source: Author

Page 88: 2014 - Modelos Físico-Matemáticos de Fluidos

88

3.4.1 Interparticle potential model

The model proposed by SHAN; CHEN (1993) is probably the most

common multiphase and multicomponent model due to its simplicity. It

is based on the idea of a pairwise intermolecular forces between the

conceptual particles in LBM. This force is considered to be relevant only

between a first neighborhood range, i.e., only between nearest adjacent

populations in the lattice. If a system is multicomponent, there must exist

a distribution function for every component 𝜎, therefore we get the

following LBM equation

𝑓𝑖𝜎(𝒓 + ∆𝑡𝒄𝒊, 𝑡 + ∆𝑡) = 𝑓𝑖

𝜎(𝒓, 𝑡) − Ω𝑖𝜎(𝒓, 𝑡)

representing that this equality holds in every direction 𝑖 of the lattice for

each component 𝜎 that constitutes the system.

The collision operator Ω𝑖𝜎(𝒓, 𝑡) is the single relaxation time BGK

Ω𝑖𝜎(𝒓, 𝑡) = 𝜔𝜎(𝑓𝑖(𝒓, 𝑡) − 𝑓𝑖

𝑒𝑞(𝒓, 𝑡))

SHAN; CHEN (1993) define an interaction potential between

particles as

𝑉(𝒓, 𝒓′) = 𝐺𝜎(𝒓, 𝒓′)𝜙𝜎(𝒓)𝜙(𝒓′)

and consider only nearest neighbors interactions, i.e.

𝐺𝜎(𝒓 − 𝒓𝒊

′) = 0, 𝑖𝑓 | 𝒓 − 𝒓𝒊

′| > 𝑐𝑖

𝐺𝜎 , 𝑖𝑓 | 𝒓 − 𝒓𝒊′| = 𝑐𝑖

where 𝑐𝑖 is the velocity modulus33 in the direction of the velocity vector

𝒄𝒊. 𝐺𝜎(𝒓, 𝒓′) is a Green’s function34 where its magnitude controls the

33 Which is equal to the lattice distance (𝒓 − 𝒓𝒊

′) in a dimensionless LBM

scheme. 34 “In mathematics, a Green's function is the impulse response of an

inhomogeneous differential equation defined on a domain, with specified initial

conditions or boundary conditions. Via the superposition principle, the

convolution of a Green's function with an arbitrary function f(x) on that domain

Page 89: 2014 - Modelos Físico-Matemáticos de Fluidos

89

interaction strength between two different components and, its sign, if this

interaction is rather attractive or repulsive. The quantity 𝜙𝜎(𝒓) =𝜙𝜎(𝑓𝜎(𝒓)) is a function of the density distribution 𝑓𝜎(𝒓) and acts as the

effective number density for component 𝜎. It must increase

monotonically and be bounded.

With the interaction potential, it is possible to calculate the net

momentum change in a site for each time step, which is equivalent to the

net force, as

Ӻ 𝜎(𝒓) = −𝜙𝜎(𝒓)∑ 𝐺𝜎 ∑𝜙(𝒓 + 𝒄𝒊)

𝑛

𝑖=1

𝑆

=1

𝒄𝒊

where S is the total number of components in the system. Therefore, after

collision, the new net momentum at site 𝐫 for the 𝜎𝑡ℎ component is

𝜌𝜎(𝐫)𝑢𝛼𝜎(𝐫) = 𝑐𝑖𝛼𝑓𝑖

𝜎(𝒓) + (Ӻ𝛼

𝜎

𝜔𝜎)

The above relation indicates a non-conservative momentum

equation for a site. However, it can be demonstrated that the total

momentum within the system is conserved, provided 𝐺𝜎 is a symmetric

matrix with dimensions 𝑆 x 𝑆.

It is possible to show that the equation of state for a D2Q9 model

is

𝑝 =𝜌

3+

𝐺

6𝜙2

The second term from the right hand side is the non-ideal

attractive forces contribution from molecules and leads to a reduction in

pressure when 𝐺 < 0. This leads to a non linear 𝑝- 𝜌 plot in which a

substance can coexist with two different densities (phases) at the same

pressure.

is the solution to the inhomogeneous differential equation for f(x).”

(WIKIPEDIA, 2014)

Page 90: 2014 - Modelos Físico-Matemáticos de Fluidos

90

Page 91: 2014 - Modelos Físico-Matemáticos de Fluidos

91

Alles vergängliche

Ist nur ein Gleichniss!

Goethe*

Page 92: 2014 - Modelos Físico-Matemáticos de Fluidos

92

* 35

35 Boltzmann’s epigraph for his “Vorlesungen über Gastheorie”.

(BOLTZMANN, 1986, 1898), meaning everything temporal is only a likeness,

or all that is transitory is only a metaphor.

Page 93: 2014 - Modelos Físico-Matemáticos de Fluidos

93

4 SIMULATIONS

One of the problems faced by engineers when dealing with

numerical methods is often the need to learn a low level language and its

extension to parallelization. Low level programing languages like C and

FORTRAN and its extensions to parallelization, like OpenMP, take time

to master. The possibility to create an optimized code for a given problem

is their main advantage, extracting the biggest possible efficiency from

the given computational resources.

However, this might cost a precious time of an engineer, who

instead of concentrating his efforts to comprehend the physical problem

and interpreting it, must learn and explore a low level programming

language up to a reasonable level, considering many aspects from the field

of computational science. Although this kind of knowledge is desirable

and welcome it might also discourage engineers when the construction of

an algorithm for a simple problem demands a deeper understanding of a

low level programming language and much time.

In this context a family of software come in scene to help in the

task of scientific computing. They work in a high level environment

where many built-in functions are available for the users. Furthermore,

they work with a matrix logic, being very versatile when manipulating

matrices. Matlab, Scilab, GNU Octave and Mathematica are some

examples of high level softwares. The environment used to learn and

explore LBM in this work was Matlab. Matlab is a powerful software. It

is possible to program parallelized codes without any knowledge of

parallelization at low level. Its built in vectorized functions are already

parallelized in its source code. Of course, for being a high level language

it still has not the same efficiency as a full low level parallelized code.

However, this author believe that the future of scientific computing will

be such software, with which an engineer will not need anymore to care

so much with the deep numerics. As an example to show how powerful

Matlab is and its ability to work in a logic of multidimensional matrices,

let us consider an example:

The streaming step consists of transporting the net resulting

populations after the collision step to their respective neighbors. In a low

level language this would normally be made with a loop over all the

dimension of the domain plus a loop over the velocities. In a D2Q9 model,

for example, there would be loops in the two directions of the

bidimensional domain, visiting each point of it and for each point, there

will be 9 velocities directions where the functions should be streamed.

In Matlab, this step can be done recalling a single function within

a single loop over the directions.

Page 94: 2014 - Modelos Físico-Matemáticos de Fluidos

94

% STREAMING STEP FLUID A AND B

for i=1:9

fIn(i,:,:) = circshift(fOut(i,:,:), [0,cx(i),cy(i)]);

end

where cx and cy are the components of the velocity directions

cx = [ 0, 1, 0, -1, 0, 1, -1, -1, 1]; cy = [ 0, 0, 1, 0, -1, 1, 1, -1, -1];

As can be seen, fIn is a 3 dimensional matrix. The above code

says: We shift all the values of every “i” bidimensional slice, which

represents the domain points for each velocity direction “i”, to its

nearest neighbors located at [0,cx(i),cy(i)].

The circshift function is a vectorized built-in Matlab function

which automatically parallelizes the computing. It is important to note

that with this function periodic boundary condition are naturally built in.

Matlab possesses many such vectorized built-in function and suggests

users should make use of them to enhance their code efficiency.

We see such software as the future of scientific computing. While

computational technology is growing very fast in the last decades, high

level software are becoming more and more sophisticated. We believe

that soon the trade of between the complexity of programming and the

efficiency of computation will not be a big question anymore.

Page 95: 2014 - Modelos Físico-Matemáticos de Fluidos

95

4.1 HAGEN-POISEUILLE FLOW

A Hagen-Poiseuille Flow is one of the simplest flow

configurations to validate results. It consists of a steady one dimensional

laminar viscous flow in a pipe or between two flat plates. This model is

successfully used in blood flows inside veins and capillaries, air flow in

lung alveoli, flow in hypodermic needles, flows in oil and gas pipelines,

etc… Short, it is a model for any Newtonian incompressible viscous fluid

flowing through a pipe with constant cross-section that is much smaller

than its length.

The flow velocity profile was independently derived by Gotthilf

Heinrich Ludwig Hagen and Jean Léonard Marie Poiseuille between

1838 and 1839. It is axisymmetric and depends on coordinate 𝑟 from the

center only. For a flow between flat plates, the velocity profile is given

by

𝑢(𝑟) = −

1

2𝜇𝜕𝑥𝑝(𝑅2 − 𝑟2)

where p is pressure, x the direction of the flow, R half of the channel width

and 𝜇 the dynamic viscosity of the fluid. If some bodyforce is acting on

the fluid, in the direction of the motion, e.g. gravity, the derivative of

pressure is given from hydrostatics as

𝜕𝑥𝑝 = −𝜌𝑔

Where 𝜌 is the fluid specific mass and 𝑔 the gravity acceleration.

Hence,

𝑢(𝑟) =𝑔

2𝜈(𝑅2 − 𝑟2)

or with dimensionless parameters,

𝑢(𝑙) =

3𝑔

2 (𝜏 −12)

(𝐿2 − 𝑙2)

Results for different channel widths are shown in Fig. 11. Solid

lines are the analytical curves, while the plotted points are the simulated

ones. Simulations show very good agreement with the analytical model.

Page 96: 2014 - Modelos Físico-Matemáticos de Fluidos

96

Figure 11 - Comparison between analytical and simulated velocity.

Source: Author

Page 97: 2014 - Modelos Físico-Matemáticos de Fluidos

97

4.2 FLOW PAST A CYLINDER

Flow past a cylinder is also a classical and interesting problem.

As the Reynolds number increases, instabilities in the laminar wake

develop to periodic vortex shedding36, which induce a periodic force on

the cylinder driven by the pressure gradients. The frequency of this

vortices and thus, the forces, can match the natural frequency of the

cylinder. This would lead to resonance if the cylinder is not rigidly

mounted and the structure would vibrate harmonically with the flow’s

energy, emitting sound. This vortex shedding occurs in the range 102 <𝑅𝑒 < 107 and its frequency is related by the Strouhal37 number

𝑆𝑡 =

𝑓𝑞𝐷

𝑈≅ 0.198 (1 −

19.7

𝑅𝑒)

where 𝐷,𝑈 are the cylinder diameter and the free flow velocity,

respectively.

A LBGK simulation was conducted on this problem. The main

parameters are shown

Table 2 – Parameters for the flow past a cylinder.

LBGK model D2Q9

BC at inlet Von Neumann

BC at outlet Von Neumann

BC at the side walls Periodic

Cylinder diameter 34

Domain 410 x 1022

Free stream velocity 0.3

Relaxation parameter 𝝎 10/7

Reynolds number 153 Source: Author

36 They are called von Kármán vortex street, named after Theodore von

Kármán, who explained it theoretically in 1912. (WHITE, 2011 ) 37 Named after a German physicist, who in the late 19th century

experimented with wires singing in the wind.

Page 98: 2014 - Modelos Físico-Matemáticos de Fluidos

98

The dimensionless Strouhal number for lattice variables can be

found with

𝑆𝑡 =

𝑓𝑞∗𝐷∗

𝑈∗≅ 0.198 (1 −

19.7

𝑅𝑒)

where 𝑓𝑞∗, 𝐷∗, 𝑈∗ are the frequency per time step, the diameter of the

cylinder in lattice nodes and the free flow lattice velocity, respectively.

The simulation was conducted from rest until a periodic steady

state was reached using a small body force to accelerate the field. A

balance of momentum in a volume control was made in both directions,

as shown in Fig. 12, where the evolution from rest of the lift and drag

force is given until periodicity is reached. As expected, the drag force

grows with the flow velocity while it is laminar. A critical value38 is

reached (around -30), which represents the minimal angle of flow

separation. Instabilities on the wake begin and the flow separation angle

increases, driving to the periodic vortex shedding.

From the Strouhal number for lattice units, the frequency39 of the

shadings is predicted to be 𝒇𝒒∗ ≅ 𝟏. 𝟓𝟐 × 𝟏𝟎−𝟑. To compare this

expected result, the Fast Fourier Transform (FFT) from a periodic interval

of the lift force was taken, which gives the main frequencies of the signal.

This is given in Fig.13. The FFT gives a main frequency as 𝒇𝒒∗ ≅ 𝟏. 𝟕 ×

𝟏𝟎−𝟑, which means that the simulated value was underpredicted by

around 12%. This is a good result.

38 Not shown in Fig.7 because of scaling. 39 Means a frequency per time step.

Page 99: 2014 - Modelos Físico-Matemáticos de Fluidos

99

Figure 12 – Transient to periodic evolution of the forces.

Source: Author

Page 100: 2014 - Modelos Físico-Matemáticos de Fluidos

100

Figure 13 – Normalized Fast Fourier Transform (FFT) of the periodic lift force.

Source: Author

Page 101: 2014 - Modelos Físico-Matemáticos de Fluidos

101

Another check might be done be a relation given as: (DOUGLAS

et al., 2001 apud SUKOP; THORNE, 2007)

𝑙≅ 0.281

The parameter ℎ

𝑙 is the ratio between the vertical distance ℎ of

two lanes and the distance 𝑙 of two vortices in the same lane. For this

purpose, a view of the vorticity and velocity field is prepared in Fig. 15

and Fig. 16, where the lovely von Kármán vortex street can be seen. From

the velocity field we take a closer look into some vortices in the wake,

which is depicted in Fig. 14. By taking the position of the pixels in the

center of the vortices both parameters can be estimated. It was found

𝑙=

44.5

156≅ 0.285

(8)

which is a great result, diverging less than 2% of the relation given above.

Figure 14 - Magnification of some vortices of Fig. 15.

Source: Author

Page 102: 2014 - Modelos Físico-Matemáticos de Fluidos

102

Figure 15 – Flow past a cylinder: vorticity field.

Source: Author

Page 103: 2014 - Modelos Físico-Matemáticos de Fluidos

103

Figure 16 - Flow past a cylinder: velocity field.

Source: Author

Page 104: 2014 - Modelos Físico-Matemáticos de Fluidos

104

4.3 THE IMMISCIBLE CANGACEIRO40 (MCMP)

We might now apply the multicomponent interparticle potential

model in an example to illustrate the behavior of such a model. In this

simulation, two different components were considered. We shall call

them component A and component B. The initial condition was taken

from a picture shown in Fig. 17.

Figure 17 – Cangaceiro’s original picture.

Source: CINEMOTION41

This picture was converted into an 8 bits matrix, whose values

range from 0 to 255, representing a gray scale, 0 for black to 255 for white.

Thereafter a normalization was made dividing all the values by 255 so

40 Cangaceiro is the name given to the warriors of cangaço, a social

banditry movement in northeast Brazil in late 19th and early 20th centuries. 41 From the 1964 film directed and written by Glauber Rocha: Deus e o

Diabo na Terra do Sol.

Page 105: 2014 - Modelos Físico-Matemáticos de Fluidos

105

that they all are in an interval [0,1]. We set the the density distribution for

component A as [1 + NormalizedMatrix] and for component B as [1 −

NormalizedMatrix].

It is used periodic boundary conditions in the boundaries. The first

steps of the simulation can be seen in Fig. 18 and Fig. 19, which shows

the real nature of our cangaceiro.

Figure 18 – The immiscible cangaceiro after 50 time steps. The initial

density for Fluids A and B are in the interval [0,1], [1,2], respectively. After 50

time steps concentrations raised considerably due to the repulsive interparticle

force between Fluid A and Fluid B. They tend to concentrate in some regions of

the domain. The column on the side indicates density for Fluid B.

Source: Author

Page 106: 2014 - Modelos Físico-Matemáticos de Fluidos

106

The main parameters utilized in this simulation are shown in

Table 3. 𝑮𝐴𝐴, 𝑮𝐵𝐵, 𝑮𝐴𝐵 are the interparticle forces between the fluids in

the subscript.

Figure 19 - The immiscible cangaceiro after 250 time steps. Colorbar

shows the density for Fluid B.

Source: Author

Page 107: 2014 - Modelos Físico-Matemáticos de Fluidos

107

Table 3 – Main parameters of the immiscible cangaceiro.

LBGK model D2Q9 MCMP

BC Periodic

𝑮𝑨𝑨 0

𝑮𝑩𝑩 0

𝑮𝑨𝑩 0.7

Domain 600 x 555

Relaxation parameter 𝝎𝑨 1

Relaxation parameter 𝝎𝑩 1

Referencial Density 1 (for both Fluids) Source: Author

We can see that Fluid A, indicated with the darker zones, does not

want to mix with Fluid B, indicated by the white zones. They are

immiscible and that is why our unlucky cangaceiro is falling apart, he is

becoming a system of drops. We might think of this as an emulsion of

water/oil or any two immiscible fluids, which are put at an initial

concentration field as the original pixel scale of Figure 13. Concentration

rises since the fluids do not want to share the same space.

This diffusion process continues until an equilibrium configuration

is reached. This equilibrium configuration will be a single bubble of a

fluid inside the other. But this requires a lot of time. Figure 20 shows the

system after 30 thousand time steps and it is still far from this equilibrium

situation.

Page 108: 2014 - Modelos Físico-Matemáticos de Fluidos

108

Figure 20 – Immiscible cangaceiro after 30 000 time steps. Colorbar

shows the density for Fluid B.

Source: Author

Page 109: 2014 - Modelos Físico-Matemáticos de Fluidos

109

4.4 PHASE TRANSITION (SCMP)

A single component multiphase simulation was conducted in order

to show the ability of LBM in modelling phase transition. The simulation

was conducted with fully periodic BC and an appropriate function 𝜙 was

used as shown in Table 4.

Table 4 – Parameters for the SCMP simulation.

LBGK model D2Q9 SCMP

BC Periodic

𝑮𝑨𝑨 -120

𝑭𝒖𝒏𝒄𝒕𝒊𝒐𝒏 𝝓 𝜙(𝝆(𝒓)) = 𝟒𝑒−200/𝜌(𝒓)

Domain 256 x 256

Relaxation parameter 𝝎 1

Referential Density 200 Source: Author

With this function 𝜙 defining the interaction potential, and, taking

the reference density, the EOS curves of this component can be plotted

for many magnitudes of G, as can be seen in Fig. 21..

It is easy to note in Figure 21 that the modulus of G must be

beyond a value, in order to get phase transition, i.e., two different densities

for a same pressure.

Figure 22 represents our initial condition for the distributions. The

reference density was applied with a random perturbance.

Fig. 23 shows the state of the system after 100 (above) and 500

(below) time steps. The colorbar in the right side indicates the density

values. It can be noted that vapor has a density around 90 while liquid a

density around 520. We can then find the correspondent pressure in Fig.

21, which is around 28.

Page 110: 2014 - Modelos Físico-Matemáticos de Fluidos

110

Figure 21 – EOS curves for some attraction forces.

Source: Author

Figure 22 – The initial configuration with a reference density of 200 plus

a random perturbation in the interval [0,1].

Source: Author

Page 111: 2014 - Modelos Físico-Matemáticos de Fluidos

111

Figure 23 – Above is shown the system after 100 time steps. Below, after

500 time steps. The colorbar indicates the density, where it can be seen that black

represents the liquid state, while white the gaseous state.

Source: Author

Page 112: 2014 - Modelos Físico-Matemáticos de Fluidos

112

After 50 thousands time steps the system is in perfect

equilibrium, just a bubble of fluid immersed in its gas, as shown in Fig.

24.

Figure 24 – System in equilibrium after 50 000 time steps.

Source: Author

Page 113: 2014 - Modelos Físico-Matemáticos de Fluidos

113

4.5 BIDIMENSIONAL SWALLOW FLIGHT

Another example simulated was a bidimensional flow over

swallows in its classic triangular formation. Here, the picture of a

silhouette showing five swallows arranged triangularly was binarized, in

order to be used as the domain of the simulation. Figure 25 (above) shows

the velocity flow field with its respective streamlines in the first time

steps. Darker zones indicate low velocities. The below figure shows the

correspondent vorticity field, representing clockwise vorticity with darker

tons.

It can be seen the symmetry of the flow field in these first time

steps, which develops to a periodic asymmetrical flow that is shown in

Figure 26. As in Fig. 25, Fig. 26 also shows the velocity field with

streamlines and vorticity field.

The main parameters for this simulation are listed in Table 7.

Table 5 – Main simulation’s parameters used for the swallow flight.

LBGK model D2Q9

BC at inlet Von Neumann

BC at outlet Von Neumann

BC at the side walls Von Neumann

Characteristic Length 435

Domain 877 x 1205

Free stream velocity 0.0753

Relaxation parameter 𝝎 10/6

Reynolds number 982

Source: Author

Page 114: 2014 - Modelos Físico-Matemáticos de Fluidos

114

Figure 25 – Symmetrical flow field during the first time steps.

Velocity field with streamlines (above). Vorticity field.

Source: Author

Page 115: 2014 - Modelos Físico-Matemáticos de Fluidos

115

Figure 26 - Asymmetrical flow field during the first time steps.

Velocity field with streamlines (above). Vorticity field (below).

Source: Author

Page 116: 2014 - Modelos Físico-Matemáticos de Fluidos

116

Page 117: 2014 - Modelos Físico-Matemáticos de Fluidos

117

5. FINAL CONSIDERATIONS

In this work we have explored the mathematical modelling which

describes the behavior of fluids, beginning with the classical continuum

approach and then introducing the mesoscopic models, which recover

with proper mathematical treatment the fundamental macroscopic

equations. The mesoscopic insight gives new possibilities for the

descriptions of fluids. This description have shown that more complex

phenomena are easier to implement than its classical counterpart. LBM is

a powerful method in fully development. We cited few models and gave

examples of them. However, the literature in LBM is getting constantly

bigger. There are other models available for the same problems. The

objective is always to turn our models as sophisticated as possible in order

to advance with human technical possibilities. Of course, these

technological advances and possibilities should come to help mankind

achieve what it really wants, a life of completeness. Why should we care

about helping some corporations to extract and pump oil, while taking the

bio-ecological risk of an oil spill or environmental catastrophe, if this does

not help people to live better? As before, we emphasize that science is

just a tool. Our free will decides what we make out of it.

Fluid dynamical phenomena are not only useful to understand

practical problems from the physical world and advance or technologies,

they are also intrinsically beautiful as some of our simulations show. The

approximation of nature’s behavior through mathematical modelling

makes possible the reproduction of it. As in Mr. Escher words, we adore chaos because we love to produce order, and indeed is a lovely feeling to

see through our simulations the manifestations of order, movements

towards equilibrium states, that come from the chaotic collision of

molecules, symbols, abstractions all the way to the electric pulses in

microprocessors that compute millions of operations in a second.

Finally, we hope that this work helps some in the path of discrete

fluid dynamics simulation, showing doors and directions for those who

want to begin to work with it but has little knowledge.

Page 118: 2014 - Modelos Físico-Matemáticos de Fluidos

118

Page 119: 2014 - Modelos Físico-Matemáticos de Fluidos

119

Man muss noch Chaos in sich

haben, um einen tanzenden Stern gebären

zu können.

Nietzsche*

Page 120: 2014 - Modelos Físico-Matemáticos de Fluidos

120

* 42

42 One must have interior chaos, in order to give birth to a dancing star.

Page 121: 2014 - Modelos Físico-Matemáticos de Fluidos

121

REFERENCES

ALEXEEV, Boris V. Generalized Boltzmann Physical Kinetics, Elsevier,

Amsterdam 2014.

ANP. Um novo ciclo de investimentos e desafios. Boletim ANP – Petróleo

e P&D. Ed. N°2. Oct, 2013.

ARIS R. Vectors, Tensors, and the Basic Equations of Fluid Dynamics. Dover Publications, Inc, New York 1989.

BOLTZMANN L. Lectures on gas theory. Cambridge University Press.

London, 1964. Translated by Stephen G. Brush from the original

Vorlesungen über Gastheorie. J. A. Barth, Leipzig – Part I, 1896; Part II,

1898.

BOLTZMANN L. Further Studies on the Thermal Equilibrium of Gas Moleules. Translated by Stephen G. Brush from the original Weitere

Studien über das Wärmegleichgewicht unter Gasmolekülen.

Sitzungsberichte Akad. Wiss. Part II, 66, pp. 275-370, Vienna, 1872.

BRASIL. Plano Nacional de Educação. URL: <http://pne.mec.gov.br/>.

Accessed in: 30 oct. 2014.

BRESOLIN, C. S. Análise da Transferência de Massa com Reação Química no Cátodo de Células a Combustível do Tipo PEM Utilizando o

Método de Lattice Boltzmann. Tese (doutorado) - Universidade Federal

de Santa Catarina. Programa de Pós-Graduação em Engenharia Mecânica.

Florianópolis, 2012.

BUSH, J. W. M.; HASHA, A. E. On the collision of laminar jets: fluid

chains and fishbones. Journal of Fluid Mechanics. Vol. 511, pp. 285–310,

2004.

CARTWRIGHT, Julyan H. E. et al. Fluid dynamics in developmental

biology: moving fluids that shape ontogeny- HFSP Journal. Vol.3, No. 2, April 2009, pg. 77-93

CERCIGNANI, C. The Boltzmann Equation and its Applications,

Springer-Verlag, New York, 1988

Page 122: 2014 - Modelos Físico-Matemáticos de Fluidos

122

CINEMOTION – URL: <http://www.cinemotions.com/photos-n005-Le-

Dieu-noir-et-le-Diable-blond-tt25480>.

DUBOIS, F.; LALLEMAND, P.; TEKITEK, M. On a superconvergent

lattice Boltzmann boundary scheme. Computers and Mathematics with

Applications, volume 59, number 7, pages 2141-2149, April 2010.

FIESP. Participação da indústria no PIB pode cair para 9,3% em 2029,

aponta estudo da Fiesp. Agência Indusnet Fiesp, 06 Set. 2013. URL:

<http://www.fiesp.com.br/noticias/participacao-da-industria-no-pib-

pode-cair-para-93-em-2029-aponta-estudo-da-fiesp/>. Accessed in: 30

Oct. 2014.

FOLHA, de São Paulo. Entenda o que é a camada pré-sal. 10 Oct. 2010.

URL: < http://www1.folha.uol.com.br/mercado/748802-entenda-o-que-

e-a-camada-pre-sal.shtml>. Accessed in: 30 Oct. 2014.

GEORGE, W.K. The Nature of Turbulence. Reprinted from FED, Vol.

94, Forum on Turbulent Flows. Book N° H00599, 1990.

GINZBURG, I.; VERHAEGHE, F.; d’HUMIÈRES, D. Two-Relaxation-

Time Lattice Boltzmann Scheme: About Parametrization, Velocity,

Pressure and Mixed Boundary Conditions. Communications in Computational Physics, Vol. 3, No. 2, pp. 427-478, 2008.

HE, X.; LUO L. Theory of the lattice Boltzmann method: From the

Boltzmann equation to the lattice Boltzmann equation. Physical Review

E. 56(6), pp. 6811, 1997.

IBGE. IBGE Séries Históricas e Estatísticas. URL:

<http://seriesestatisticas.ibge.gov.br/>. Accessed in: 30 Oct. 2014

IPEA. IPEAdata. URL: <http://www.ipeadata.gov.br/>. Accessed in: 30

Oct. 2014.

LANDAU L. D., LIFSHITZ E. M., Fluid Mechanics - Landau and Lifshitz Course of Theoretical Physics, Volume 6, 2nd Edition.

Page 123: 2014 - Modelos Físico-Matemáticos de Fluidos

123

Butterworth-Heinemann, Oxford 1987. Translated from the Russian by J.

B. Sykes and W. H. REID.

LIBOFF R. L., Kinetic Theory: Classical, Quantum and Relativistic

Descriptions, 3th Edition, Springer-Verlag, New York, 2003.

LINDLEY, David. Boltzmann's Atom: The Great Debate that Launched a

Revolution in Physics. Simon & Schuster, Inc, New York, 2001

MATTILA K., Implementations Techniques for the Lattice Boltzmann

Method. Jyväskylä University Printing House, Jyväskylä 2010.

MAXWELL J, Illustration of the dynamical theory of gases. Part I. On

the motions and Collisions of Perfectly Elastic Spheres - Philosophical

Magazine Series 4, Volume 19, pp. 19-32, 1860

MAXWELL J, On the Dynamical Theory of Gases- Philosophical

Transactions of the Royal Society of London, Vol. 157 (1867), pp. 49-88

MOHAMED G. Stokes’ hypothesis for a Newtonian, isotropic fluid.

Journal of Fluids Engineering 117, no. 1, pp. 3–5, 1995.

NOVAES, F. C.; PIB do petróleo no país deve dobrar até 2020: Mercado

prevê demandas de US$ 400 bi no setor e 2,5 milhões de empregos, O Globo, publicado em 16 set. 2012. Disponível em:

<http://oglobo.globo.com/economia/pib-do-petroleo-no-pais-deve-

dobrar-ate-2020-6097255> . Acesso em: 30 out. 2014.

NUNES, F. Petrobrás, petróleo avança para 13% do PIB brasileiro.

Estadão – Agência Estado; 17 jun. 2014. URL:

<http://economia.estadao.com.br/noticias/mercados,com-investimentos-

da-petrobras-petroleo-avanca-para-13-do-pib-brasileiro,1513541>.

Accessed in: 30 Oct. 2014.

PHILIPPI P. C., Lectures in the Lattice Boltzmann Method, Autonomous

lectures notes.

PHILIPPI, P. C. et al. From the continuous to the lattice Boltzmann

equation: The discretization problem and thermal models. Physical

Review E, v. 73, p. 056702, 2006.

Page 124: 2014 - Modelos Físico-Matemáticos de Fluidos

124

QIAN Y.; d’HUMIÈRES D.; LALLEMAND P. Lattice BGK Models for

Navier-Stokes Equation. Europhysics Letters, 17 (6), pp. 479-484, 1992.

RIIKILÄ T., Application of the lattice-Boltzmann method for simulating

attachment of ink particles in paper, MSc Thesis - University of

Jyväskylä, Department of Physics, Jyväskylä 2012.

SHAN, X.; YUAN, X.; CHEN, H. Kinetic theory representation of hydrodynamics: a way beyond the navier-stokes equation. Journal of

Fluid Mechanics, v.550, p. 413-441, 2006.

TRUESDELL, C. A.; MUNCASTER, R. G. - Fundamentals of

Maxwell’s kinetic theory of a simple monatomic gas: Treated as a branch

of rational mechanics. Academic Press, Inc – New York, 1980.

SHAN, X.; CHEN, H. Lattice Boltzmann model for simulating flows with multiple phases and components. Physical Review E, Vol. 47, N° 3. pp.

1815-1819. March 2003.

SOUTAS-LITTLE, Robert W.; Continuum Mechanics - History of

Continuum Mechanics. UNESCO-EOLSS

SUCCI S., The Lattice Boltzmann Equation for Fluid Dynamics and

Beyond. Clarendon Press, Oxford 2001.

SUKOP, M. C.; THORNE, Jr. D. T. Lattice Boltzmann Modelling: An

Introduction for Geoscientists and Engineers. 2nd corrected printing. Springer-Verlag, Berlin-Heidelberg, 2007.

UFFINK, Jos, "Boltzmann's Work in Statistical Physics", The Stanford

Encyclopedia of Philosophy (Fall 2014 Edition), Edward N. Zalta (ed.),

URL = <http://plato.stanford.edu/archives/fall2014/entries/statphys-

Boltzmann/>.

UNITED NATIONS; IMO. Introduction to IMO (International Maritime

Organization). URL: <http://www.imo.org/About/Pages/Default.aspx>.

Accessed in: 30 Oct. 2014.

UNITED NATIONS; UNCTAD. UNCTADstat Data Center. URL:

<http://unctadstat.unctad.org/EN/>. Accessed in: 30 Oct. 2014

Page 125: 2014 - Modelos Físico-Matemáticos de Fluidos

125

WHITE F. M., Fluid Mechanics, 7th Edition, McGraw-Hill, New York

2011.

WIKIPEDIA. URL: < http://en.wikipedia.org/wiki/Green%27s_function

>. Accessed in : 02/11/2014.

WORLD BANK. URL: <http://data.worldbank.org/country/brazil>.

Accessed in: 30 Oct. 2014.

ZHANG, J. Lattice Boltzmann method for microfluidics: models and

applications. (Review) Microfluid Nanofluid 10:1-28, 2011.

ZOU, Q.; HE, X. On pressure and velocity boundary conditions for the

lattice Boltzmann BGK model. Phys. Fluids, Vol. 9, No. 6, June 1997.

Page 126: 2014 - Modelos Físico-Matemáticos de Fluidos

126

Page 127: 2014 - Modelos Físico-Matemáticos de Fluidos

127

APPENDIX: Code examples

I – LBGK FLOW PAST A CYLINDER

%%%%%%%%%%%%%%%%%%%%% %%% LBGK TRT D2Q9 %%%%%% %%%%% FLOW PAST A CYLINDER %%%% function [ fIn Domain ux uy MOMENTUMX MOMENTUMY] = ... cylinder(Gx,tau,D,time, fIn) inputt = input('Type "1" for velocity field or "2" for the vorticity field: '); p=0; % CREATING DOMAIN SIZE WITH 2 GHOST LAYERS ly=D*6; lx=D*18; Domain = logical(zeros(ly+2,lx+2)); % INITIAL VELOCITY FIELD CONDITIONS ux=0.1; uy=0; % INITIAL REFERENCE DENSITY rho0=1; % DECLARING BASIC VARIABLES % use of "single" just to save memory omega1 = 1/tau; omega2 = (16-8*omega1)/(8-omega1); tPlot = 20; ux = single (ones (ly+2, lx+2) * ux); uy = single (ones (ly+2, lx+2) * uy); rho = single (ones (ly+2, lx+2) * rho0); fEq = single (zeros (9, ly+2, lx+2)); % CREATING THE CENTER POINT OF THE CYLINDER qy=(ly+3.0)/2; qx=(lx/8); % CREATING CYLINDER for i=2:lx+1 for j=2:ly+1 if (i-qx)^2+(j-qy)^2 <= (D/2.0)^2 && (i-qx)^2+(j-qy)^2 >= ((D-3)/2.0)^2 Domain(j,i)= 1; else end end end % LISTING SOLID NODES SolidRegion=find(Domain); % CREATING OPPOSITION ARRAY

Page 128: 2014 - Modelos Físico-Matemáticos de Fluidos

128

opp = [1 3 2 7 9 8 4 6 5]; % CREATING ARRAY OF VELOCITIES cx=[0 0 0 1 1 1 -1 -1 -1]; cy=[0 1 -1 0 1 -1 0 1 -1]; % CREATING ARRAY OF WEIGHTS w = [16/36 4/36 4/36 4/36 1/36 1/36 4/36 1/36 1/36]; % SETTING INITIAL CONDITIONS FOR INPUT DISTRIBUTION FUNTION EQUAL TO ZERO if fIn==0 for i=1:9 cu = 3*(cx(i)*ux+cy(i)*uy); fEq(i,:,:) = rho0 .* w(i) .*... ( 1 + cu + 1/2*(cu.*cu) - 3/2*(ux.^2+uy.^2) ); end fIn=fEq; fOut=fIn; % SETTING INITIAL CONDITIONS FOR A GIVEN INPUT DISTRIBUTION FUNTION else fOut=fIn; for i=1:9 cuInicial=3*cx(i)*UxInicial; UxEntrada(i,:,1) = rho0.* w(i) .*... ( 1 + cuInicial + 1/2*(cuInicial.*cuInicial) - 3/2*(UxInicial.^2) ); end end for t=1:time % MACROSCOPIC VARIABLES rho = sum(fIn,1); ux = reshape ( cx*(reshape(fIn,9,(ly+2)*(lx+2))),1, ly+2,lx+2) ; ux = (ux + Gx/2)./rho; uy = reshape (cy* (reshape(fIn,9,(ly+2)*(lx+2))),1, ly+2,lx+2) ./rho; % COLISION STEP for i=1:9 cu = 3*(cx(i)*ux+cy(i)*uy); fEq(i,:,:) = rho .* w(i) .*( 1 + cu + 1/2*(cu.*cu) - 3/2*(ux.^2+uy.^2) ); end for i=1:9 BodyForce = rho*w(i)*3 * cx(i)*Gx; fIn(i,:,:) = BodyForce/2 + fIn(i,:,:) - ... omega1.*((fIn(i,:,:) + fIn(opp(i),:,:))./2 - (fEq(i,:,:)+fEq(opp(i),:,:))./2) ... - omega2.*((fIn(i,:,:) - fIn(opp(i),:,:))./2 - (fEq(i,:,:) - fEq(opp(i),:,:))./2); end

Page 129: 2014 - Modelos Físico-Matemáticos de Fluidos

129

% STREAMING STEP for i=1:9 fOut(i,:,: ) = circshift(fIn(i,:,: ), [0, cy(i),cx(i)]); end fIn=fOut; % BOUNCE BACK for i=1:9 fIn(i,SolidRegion) = fOut(opp(i),SolidRegion); end % OUTLET B.C. for k=7:9 fIn(k,:,lx+2)= fIn(k,:,lx+1); end % VISUALIZATION OF VELOCITY FIELD if inputt == 1 if (mod(t,tPlot)==0) p=p+1; %MOMENTUM BALANCE IN CONTROL VOLUME UUY = (+sum(uy(1,ceil(qy-D),ceil(qx-D): ceil(qx+D)))... + sum(uy(1,ceil(qy+D),ceil(qx-D): ceil(qx+D))))*rho0; UUX = (-sum(ux(1,ceil(qy-D):ceil(qy+D),ceil(qx-D)))... + sum(ux(1,ceil(qy-D):ceil(qy+D),ceil(qx+D))))*rho0; MOMENTUMX(p)=UUX; MOMENTUMY(p)=UUY; u =sqrt(ux.^2+uy.^2); LP(:,:)=u(1,:,:); LP(Domain)=nan; imagesc(LP); colormap(hot(128)) colorbar axis equal off; drawnow t end % VISUALIZATION OF VORTICITY FIELD elseif inputt==2 if (mod(t,tPlot)==0); uyy=circshift(uy(:,:,:),[0, 0,-1]); uxx=circshift(ux(:,:,:),[0,-1,0]); Vorticity =(uy - uyy) - (ux - uxx); Vorticity = reshape(Vorticity,ly+2, lx+2); Vorticity(Domain)=nan; Vorticity(:,1)=0;

Page 130: 2014 - Modelos Físico-Matemáticos de Fluidos

130

imagesc(Vorticity, [-0.01 0.01]); colormap(hot(128)) colorbar axis equal off; drawnow t end end end

Page 131: 2014 - Modelos Físico-Matemáticos de Fluidos

131

II – SINGLE COMPONENT MULTIPHASE MODEL

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% SINGLE COMPONENT MULTIPHASE MODEL %%% %%%%% INTERPARTICLE POTENTIAL MODEL %%%% %%% LBGK D2Q9 %%% function [fOut]=scmp(tau,G) %DOMAIN lx=200; ly=200; % TIME STEPS maxT = 80000; rho0=200; % PLOTS FOR EVERY TPLOT ITERATIONS tPlot = 10; % D2Q9 LATTICE CONSTANTS w = [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]; % MOMENTUM CONTRIBUTION'S CONSTANTS omega=1/tau; Gtau = G/omega; % INITIAL CONDITION FOR BOTH DISTRIBUTION FUNCTIONS: perturbation=rand(lx,ly); for i=1:9 fIn(i,1:lx,1:ly) = w(i).*(rho0+perturbation); end % GETTING INITIAL FRAMES for i=1:50 rho = reshape(sum(fIn),lx,ly); imagesc(rho); colormap(flipud(gray(256))); axis equal off; drawnow end % MAIN LOOP (TIME CYCLES) for cycle = 1:maxT % MACROSCOPIC VARIABLES rho = sum(fIn); phi = 4*exp(-rho0/rho); MomentumX = reshape ( (cx * reshape(fIn,9,lx*ly)), 1,lx,ly); MomentumY = reshape ( (cy * reshape(fIn,9,lx*ly)), 1,lx,ly); % FORCE INDUCED BY RHO

Page 132: 2014 - Modelos Físico-Matemáticos de Fluidos

132

rhoFX = 0; rhoFY = 0; for i=2:9 rhoFX = rhoFX + circshift(phi*w(i), [0,cx(i),cy(i)])*cx(opp(i)); rhoFY = rhoFY + circshift(phi*w(i), [0,cx(i),cy(i)])*cy(opp(i)); end %POTENTIAL CONTRIBUTION MomentumTotX = MomentumX - phi.*rhoFX*Gtau; MomentumTotY = MomentumY - phi.*rhoFY*Gtau; Ux = MomentumTotX./rho; Uy = MomentumTotY./rho; % COLLISION STEP for i=1:9 cu = 3*(cx(i)*Ux+cy(i)*Uy); fEq(i,:,:) = rho .* w(i) .* ... ( 1 + cu + 0.5*(cu.*cu) - 1.5*(Ux.*Ux + Uy.*Uy) ); fOut(i,:,:) = fIn(i,:,:) - omega.*(fIn(i,:,:) ... - fEq(i,:,:)); end % STREAMING STEP FLUID A AND B for i=1:9 fIn(i,:,:) = circshift(fOut(i,:,:), [0,cx(i),cy(i)]); end % VISUALIZATION if(mod(cycle,tPlot)==0) rho = reshape(rho,lx,ly); imagesc(rho); colorbar colormap(flipud(gray(256))); title('Fluid 1 density'); axis equal off; drawnow cycle end end

Page 133: 2014 - Modelos Físico-Matemáticos de Fluidos

133

III – MULTI COMPONENT MULTIPHASE MODEL

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% MULTI COMPONENT MULTIPHASE MODEL %%% %%%%% INTERPARTICLE POTENTIAL MODEL %%%% %%% LBGK D2Q9 %%% function [fOut]=MCMP(tauA, tauB,GAA, GBB, GAB) %DOMAIN lx=200; ly=200; % TIME STEPS maxT = 80000; rho0A=200; rho0B=100; % PLOTS FOR EVERY TPLOT ITERATIONS tPlot = 10; % D2Q9 LATTICE CONSTANTS w = [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]; % MOMENTUM CONTRIBUTION'S CONSTANTS omegaA=1/tauA; omegaB=1/tauB; GtauBA = GAB/omegaA; GtauAB = GAB/omegaB; GtauAA = GAA/omegaA; GtauBB = GBB/omegaB; % INITIAL CONDITION FOR BOTH DISTRIBUTION FUNCTIONS: perturbation=rand(lx,ly); for i=1:9 fIn(i,1:lx,1:ly) = w(i).*(rho0A+perturbation); gIn(i,1:lx,1:ly) = w(i).*(rho0B-perturbation); end % GETTING INITIAL FRAMES for i=1:50 rhoA = reshape(sum(fIn),lx,ly); imagesc(rhoA); colormap(flipud(gray(256))); axis equal off; drawnow end % MAIN LOOP (TIME CYCLES)

Page 134: 2014 - Modelos Físico-Matemáticos de Fluidos

134

for cycle = 1:maxT % MACROSCOPIC VARIABLES rhoA = sum(fIn); rhoB = sum(gIn); phiA = 4*exp(-rho0A/rhoA); phiB = 4*exp(-rho0B/rhoB); MomentumXA = reshape ( (cx * reshape(fIn,9,lx*ly)), 1,lx,ly); MomentumYA = reshape ( (cy * reshape(fIn,9,lx*ly)), 1,lx,ly); MomentumXB = reshape ( (cx * reshape(gIn,9,lx*ly)), 1,lx,ly); MomentumYB = reshape ( (cy * reshape(gIn,9,lx*ly)), 1,lx,ly); rhoMedio = rhoA*omegaA + rhoB*omegaB; UxMedio = (MomentumXA*omegaA+MomentumXB*omegaB) ./ rhoMedio; UyMedio = (MomentumYA*omegaA+MomentumYB*omegaB) ./ rhoMedio; % FORCE INDUCED BY RHO rhoFXA = 0; rhoFYA = 0; rhoFXB = 0; rhoFYB = 0; for i=2:9 rhoFXA = rhoFXA + circshift(phiA*w(i), [0,cx(i),cy(i)])*cx(opp(i)); rhoFYA = rhoFYA + circshift(phiA*w(i), [0,cx(i),cy(i)])*cy(opp(i)); rhoFXB = rhoFXB + circshift(phiB*w(i), [0,cx(i),cy(i)])*cx(opp(i)); rhoFYB = rhoFYB + circshift(phiB*w(i), [0,cx(i),cy(i)])*cy(opp(i)); end %POTENTIAL CONTRIBUTION FROM FLUID A to A MomentumTotXA = rhoA.*UxMedio - phiA.*rhoFXA*GtauAA; MomentumTotYA = rhoA.*UyMedio - phiA.*rhoFYA*GtauAA; %POTENTIAL CONTRIBUTION FROM FLUID B to A MomentumTotXA = MomentumTotXA - phiA.*rhoFXB*GtauBA; MomentumTotYA = MomentumTotYA - phiA.*rhoFYB*GtauBA; UxA = MomentumTotXA./rhoA; UyA = MomentumTotYA./rhoA; %POTENTIAL CONTRIBUTION FROM FLUID B to B MomentumTotXB = rhoB.*UxMedio - phiB.*rhoFXB*GtauBB; MomentumTotYB = rhoB.*UyMedio - phiB.*rhoFYB*GtauBB; %POTENTIAL CONTRIBUTION FROM FLUID A to B MomentumTotXB = MomentumTotXB - phiB.*rhoFXA*GtauAB; MomentumTotYB = MomentumTotYB - phiB.*rhoFYA*GtauAB; UxB = MomentumTotXB./rhoB; UyB = MomentumTotYB./rhoB;

Page 135: 2014 - Modelos Físico-Matemáticos de Fluidos

135

% COLLISION STEP for i=1:9 cuA = 3*(cx(i)*UxA+cy(i)*UyA); cuB = 3*(cx(i)*UxB+cy(i)*UyB); fEq(i,:,:) = rhoA .* w(i) .* ... ( 1 + cuA + 0.5*(cuA.*cuA) - 1.5*(UxA.*UxA + UyA.*UyA) ); gEq(i,:,:) = rhoB .* w(i) .* ... ( 1 + cuB + 0.5*(cuB.*cuB) - 1.5*(UxB.*UxB+ UyB.*UyB) ); fOut(i,:,:) = fIn(i,:,:) - omegaA.*(fIn(i,:,:) - fEq(i,:,:)); gOut(i,:,:) = gIn(i,:,:) - omegaB .* (gIn(i,:,:)-gEq(i,:,:)); end % STREAMING STEP FLUID A AND B for i=1:9 fIn(i,:,:) = circshift(fOut(i,:,:), [0,cx(i),cy(i)]); gIn(i,:,:) = circshift(gOut(i,:,:), [0,cx(i),cy(i)]); end % VISUALIZATION if(mod(cycle,tPlot)==0) rhoA = reshape(rhoA,lx,ly); imagesc(rhoA); colorbar colormap(flipud(gray(256))); title('Fluid 1 density'); axis equal off; drawnow cycle end end

Page 136: 2014 - Modelos Físico-Matemáticos de Fluidos

136