Download presentation
1
Karin Erbertseder Ferienakademie 2007
Lattice Boltzmann Karin Erbertseder Ferienakademie 2007
2
Outline Introduction Origin of the Lattice Boltzmann Method
Lattice Gas Automata Method Boltzmann Equation Explanation of the Lattice Boltzmann Method Comparison between Lattice Boltzmann Method and Navier-Stokes-Equations Applications
3
Introduction Computational Fluid Dynamics (CFD):
solution of transport equations simulation of mass, momentum and energy transport processes Applications: automotive, ship and aerospace industry, material science, … Advantage: prediction of flow, heat and mass transport fundamental physical understanding optimization of machines, processes, … source:
4
Experiment vs. Simulation
Introduction Experiment vs. Simulation Experiment measurement often difficult or impossible expensive and time consuming parameter variations extremely expensive measurement of only a few quantities at predefined locations Numerical Simulation compliance of similarity rules is no problem less expensive and faster easy parameter variation provides detailed information on the entire flow field Compliance = Einhaltung
5
Introduction General Procedure Flow Problem Solution of the Problem
mathematical model, measured data Conservation Equations Visualization Analysis Interpretation discretization, grid generation software, computer conservation equations = partial differential equations, for example Navier-Stokes equations, Euler equations or Lattice Boltzmann equations Algebraic System of Equations Numerical Solution algorithms
6
Introduction Macroscopic Methods Mesoscopic Methods
e.g. Navier-Stokes fluid simulation (FDM, FVM) Mesoscopic Methods e.g. Lattice Boltzmann method Microscopic Methods e.g. molecular dynamics
7
Lattice Gas Automata (LGA)
Cellular Automata (CA): idealized system where space and time are discrete regular lattice of cells characterized by a set of boolean state variables 1 or 0 particle at a lattice node Lattice Gas Automata (LGA): special class of CA description of the dynamics of point particles moving and colliding in a discrete space-time universe The LBM can be derived from the LGA or directly from the BE. First I will explain the development of the LBM from the method of lattice gas automata. After a time interval , each particle will move to the neighboring node in its direction and this step is called the propagation. When there are more than one particle arriving at the same node from different directions they collide and change their directions according to a set of collision rules
8
Lattice Gas Automata (LGA)
Hexagonal grid streaming step flow simulation by moving representative particles one node per time step collision step source:
9
Lattice Gas Automata (LGA)
advantages stability easy introduction of boundary conditions high performance computing due to the intrinsic parallel structure disadvantages statistical noise lack of Galilean invariance velocity dependent pressure motivation for the transition from LGA to LBM: removal of the statistical noise by replacing the Boolean particle number in a lattice direction with its ensemble average density distribution function [all disadvantages are improved or vanish] Galilean invariance = behavior of a system is not influenced by rotation or translation Statistical noise is the colloquial term for recognized amounts of variation in a sample The LBM historically developed from LGA. McNamara and Zanetti were the first who extended the boolean dynamics of the automaton to real numbers, the particle distribution functions, representing the probability for a cell to have a given state. The philosophy behind this procedure is that it is more efficient to average the micro dynamics before than after the simulation. That is, the discrete nature of the fluid particles vanishes on the macroscopic level of the observation. The LBM is characterized by a much higher numerical efficiency than the Boolean dynamics. In addition, LBM maintain the intuitive microscopic level of the interpretation belonging to the CA.
10
Boltzmann Equation (BE)
definition: description of the evolution of the single particle distribution f in the phase space by a partial differential equation (PDE) particle distribution function f (x,ξ,t): probability for particles to be located within a phase space control element dxdξ about x and ξ at time t where x and ξ are the spatial position vector and the particle velocity vector macroscopic quantities, like density or momentum, by evaluation the first moments of the distribution function LBM can also be derived rigorously from the underlying physical model, the Boltzmann equation, and it can be shown that Navier Stokes flow behavior is recovered in the macroscopic limit.
11
Boltzmann Equation (BE)
collision term interaction between the molecules time variation spatial variation effect of a force acting on the particle velocity vector of a molecule force per unit mass acting on the particle position of the molecule f = f (x, ξ, t) distribution function The BE describes the behavior of a gas on the microscopic scale. Assumptions for the BGK model: - near equilibrium state of low Mach number Mach number = is only relevant in compressible flows and characterizes the rate of the flow velocity and the speed of sound Ma = U/c f(e) = Maxwellian distribution representing the local equilibrium, that is parameterized by the conserved quantities density, speed and temperature Τ = relaxation time, which controls the rate of approaching equilibrium or in other words the viscosity of the fluid The collision term is quadratic in f and has a complex integrodifferential expression simplification of the collision term with the Bhatnagar-Gross-Krook (BGK) model
12
Lattice Boltzmann Method (LBM)
assumptions: - neglect of external forces - BGK model (SRT = single-relaxation-time approximation) - velocity discretization using a finite set of velocity vectors ei - movement of the particles only along the lattice vectors - modeling of the fluid by many cells of the same type - update of all cells each time step - storage of the number of particles that move along each of the lattice vectors particle distribution function f The next point is the development of the Lattice Boltzmann method from the Lattice Boltzmann equation. For this we have to make some assumptions SRT = that means that you have only one relaxation time but there are also MRT (multiple-relaxation time) approximations: here you have several time parameters 1/λ = A * n is the relaxation time for the collision, that is calculated from the number of particles n and the proportional coefficient A velocity discrete Boltzmann equation
13
Lattice Boltzmann Method (LBM)
common lattice nomination: DXQY number of dimensions number of distinct lattice velocities model for two dimensions: f f f2 D2Q9 - most common model in 2D - 9 discrete velocity directions - eight distribution functions with the particles moving to the neighboring cells - one distribution function according to the resting particle e4 e e2 LBM, as the name suggests, work on a given lattice. Depending on the field of application, different lattices can be used The D2Q9 model is used for simulating two-dimensional flows. e5 f5 5 1 f1 e1 e e7 e8 f f f8 source: J.Götz 2006
14
Lattice Boltzmann Method (LBM)
models for three dimensions: D3Q15 D3Q19 D3Q27 small range of good compromise highest stability between the two computational models effort 19 distribution functions one stationary velocity in the center for the particles at rest 6 velocity directions along the Cartesian axes 12 velocities combining two coordinate directions resting particles don`t move in the following time step, but: changing amount of resting particles due to collisions For the three-dimensional problem, several velocity models have been proposed including the fifteen velocity model D3Q15, the nineteen velocity model D3Q19 and the twenty-seven velocity model D3Q27. source: J.Götz 2006
15
Lattice Boltzmann Method (LBM)
next step: calculation of the density and momentum fluxes in the discrete velocity space starting point: velocity discrete BE equilibrium distribution function for D2Q9 model: weighting factor discrete particle velocity vector The following calculations, equations and assumptions are only valid for the D2Q9 model. The next step is the calculation of the density and momentum fluxes in the discrete velocity space. The staring point for this calculation is the velocity discrete Boltzmann equation. f(eq) is derived by a Taylor expansion of the Maxwell distribution. This formula is also valid for the other lattice models. You only have other weighting factors. u = fluid velocity The weighting factor depends on the lattice model. 4/9 i = 0 = 1/9 i = 1, 3, 5, 7 1/36 i = 2, 4, 6, 8 lattice speed with the lattice cell size x and the lattice time step t
16
Lattice Boltzmann Method (LBM)
calculation of the density and the momentum: density momentum Discretization: discretization in time and space leads to the lattice BGK equation With the help of the equations of the slight before it is possible to calculate the macroscopic values of the density and the momentum. point in the discretized physical space dimensionless relaxation time
17
Lattice Boltzmann Method (LBM)
lattice BGK equation is solved in two steps: collision step: streaming step: interpretation as many particle collisions calculation of the equilibrium distribution function for each cell and at each time step from the local density ρ and the local macroscopic flow velocity u using the equations of the slide before values after collision and propagation, values entering the neighboring cell = data for the next time step distribution values after collision The collision does not change the density or velocity of a cell, it only changes the distribution of the particles for all particle distribution functions.
18
Lattice Boltzmann Method (LBM)
streaming step: streaming of the particles to their neighboring cells according to their velocity directions lattice vector 0 no change of its particle distribution function in the streaming step After the collision step all particles are streamed to their neighboring cells according to their velocity directions. particle distribution before stream step particle distribution after stream step source: J.Götz 2006
19
LBM Parametrization standard parameters describing a given fluid flow problem: size of a LBM cell ∆x [m] fluid density ρ [kg/m3] fluid viscosity ν [m2/s] fluid velocity u [m/s] strength of the external force g [m/s2] lattice time step ∆t*, lattice density ρ*, lattice cell size ∆x* constant during simulation no multiplications with real world values of the time step, the density, the lattice size are necessary While all important aspects of the Lattice Boltzmann Method were described in the previous sections, it is not obvious how to parametrize a simulation to represent a real fluid. The last conclusion is on the one hand a big advantage compared to other methods like FVM or FEM, but on the other hand it can also be a drawback, because the step size control gets more complicated (time step is fixed to one) and the calculation of real world values is more complicated.
20
LBM Parametrization calculation of the dimensionless lattice values:
lattice viscosity: lattice velocity: lattice gravity: relation of all lattice values to the physical ones: calculation of the physical time step restricted time step depending on the maximal lattice velocity lattice viscosity, lattice velocity, lattice gravity are dimensionless lattice velocity of 0.3 means that the fluid moves 0.3 lattice cells per time step The calculation of the physical time step can be done by one of the equations above, depending on which one gives the smaller time step.
21
LBM Parametrization calculation of the lattice viscosity ν*:
Calculation of the relaxation time: fluid velocity v is given calculation of the relaxation time needed for a simulation with the formula above due to stability reasons: relaxation time speed of sound = 1/√3 This equation can be used to calculate the dynamic viscosity v of a fluid that is simulated with given the LBM parameters and with the help of the equation a slide before and with the help of the physical time step . The speed of sound is not the physical speed of sound of the simulated fluid. It just represents the speed with which information is transported through the grid. It will be noticed that the LBM only yields valid results for a relaxation time within certain limits.
22
LBM Boundary Treatment
no-slip: no movement of the fluid close to the boundary each cell next to a boundary has the same amount of particles moving into the boundary as moving into the opposite direction zero velocity (along the wall and in wall direction) reflection of all distribution functions at the wall in the opposite direction source:N.Thürey 2005 The boundary conditions play an important role for the stability and the convergence of the Lattice Boltzmann method. There are different types of boundary cells No-slip: implementation with the bounce back scheme, boundary is placed half way between the fluid node and the boundary node, fout=fin
23
LBM Boundary Treatment
free slip: reflection of the velocities normal to the boundary boundaries with no friction (zero velocity only in wall direction) inflow: given velocities calculation of the distribution function based on the equilibrium function (only on special type) outflow several different types source:N.Thürey 2005 For the implementation this means that boundary and fluid cells need to be distinguished.
24
LBM Boundary Treatment
periodic particles that leave the domain through the periodic wall reenter the domain at the corresponding periodic wall copying the PDFs leaving the domain to the corresponding cells during the streaming step source: C.Feichtinger 2006
25
Navier-Stokes Equations (NSE)
description of the macroscopic behavior of an isothermal fluid: conservation of mass: incompressible fluid (ρ = constant): momentum equation velocity in i-direction (i = 1,2,3 for x,y,z) density viscous stress tensor The macroscopic behavior of a isothermal fluid can be fully described with 2 equations. The NSE are the basic equations for the theoretical description of fluids. They are a set of a momentum equation and continuity equation, which guaranties mass conservation. Different simulation methods, like FEM and FVM, use the NSE to simulate fluid flow. The NSE can be derived formally from the lattice Boltzmann equation through the Chapman-Enskog expansion by a standard multi-scale expansion with time and space rescaled and the distribution function fi expanded up to second order. advection pressure momentum forces acting due to molecule upon the fluid movement
26
Comparison between LBM and NSE
Navier-Stokes Equations Lattice Boltzmann Method second order partial differential equations non-linearity quadratic velocity terms need to solve the Poisson equation for pressure calculation global solution for all lattice cells grid generation needs longer than simulation set of first order partial differential equations linear non linear convective term becomes a simple advection pressure through an equation of state regular square grids kinetic-based easy application to micro-scale fluid flow problems complicate simulation of stationary flow problems The LBM differs from methods which are directly based on the NSE in various aspects:
27
Applications Java-Simulation
Now you know the basic ideas of the LBM. The LBM is a kinetic-based approach for fluid flow computations. This method has been successfully applied to the multi-phase and multi-component flows. In the following minutes I will show you some simulations done by some assistants of Prof. Rüde. I will start with a simulation model of Thomas Pohl. Due to the boundary conditions no fluid can leave or enter this square domain. The left, right, and lower wall impose a so called no-slip boundary condition, i. e. the fluid's velocity is zero at these boundaries. The upper boundary (the lid) is constantly imposing a tangential velocity on the fluid, either to the left or to the right. Visualization Panel It just consists of a slider at the top and a visualization of the simulation domain. With the slider you can adjust the speed of the lid at the top of the domain. The further you draw it to one side, the faster the lid is pulled in that direction. To give you a feedback when the slider is in its center position (i. e. the lid is not moving), the slider turns to a darker grey. The visualization panel shows by default the speed of the fluid mapped to different colors. See the description of the visualization controls for more details. Simulation Controls With the "Start/Pause" button you can start and pause the simulation. A green button signals that the simulation is running right now, red means pausing. To reset the fluid to its initial state (no movement at all) press the "Reset fluid" button below. Depending on the performance of your computer you can adjust the size of the simulation grid. The smaller the domain, the faster the simulation (I bet you would have guessed that ;-) ). The entire simulation will be reset when you change the grid size. This also includes the obstacles and the tracers, which will be explained later.Obstacle Controls One nice feature of the Lattice-Boltzmann method used here is the fact, that it can deal with complicated and changing obstacle structures. Obstacles means in this case that the fluid cannot flow through obstacles and that the fluid's speed is zero at the surface of obstacles. To place or erase an obstacle, you have to left-click into the visualization panel. You can also drag the mouse while keeping the mouse button pressed to draw lines of obstacles. The "Set/Erase" button toggles between setting (dark) and erasing (light) obstacles. Another way to toggle the button is to right-click in the visualization panel. The "Clear" button does exactly what you would expect it to do. You can also choose from some built-in scenarios if you selected a grid size of 150. Just keep in mind that although you can still modify the scenario, these modifications will not be stored.Visualization Controls The most important control in this section is the choice of the color-mapped visualization. There are four options, which all have slightly different color mappings: Velocity: The velocity has an artificial unit of pixels/iteration x/y-Velocity: Negative and positive x/y-velocities can easily be distinguished Density: The dimensionless equilibrium density is As you can see all four color mappings are wrapped, i. e. a value lower resp. higher than the minimum resp. maximum value is projected again to the color corresponding to the maximum resp. minimum value. Tracers are just some way to visualize the movement in the fluid. They are virtual particles without mass or momentum that follow the current and do not influence the fluid's behavior in any way. Nevertheless their update consumes some computation power. If you feel the need for some extra speed boost, turn them off using the "Tracers on/off" button. Below you can choose the density of the tracers. Finally, you can select the number of performed time-steps between the update of the visualization. Increase it to get better computing performance, but be prepared for a jerky visualization display. The last number in this panel displays the number of Mega Lattice Site Updates per second. It is just meant as a performance indicator and has no impact on the simulation itself. To give you an idea: with an 1.4GHz-Athlon I get about 1.7 MLSUD/s. Webmaster · URL: update: 2002/07/23
28
Applications source: N.Thürey
Metal foams are interesting for material science due to their combination of very low density and excellent mechanical, thermal and acoustic properties, which makes them applicable to automotive lightweight constructions. The resulting metal foams do not have the desired physical properties doe to inhomogeneities. So the following simulation can help to understand the production process and to ensure reproducibility. This simulation did Thomas Thürey. source: N.Thürey
29
Applications metal foam simulation: source:N.Thürey 2005 D3Q19 model
free-surface model filled with fluid interface: contains both liquid and gas gas: not considered in fluid simulation computation of the fill level of a cell by dividing by the density of this cell (0 = empty cell; ρ = filled cell) transformation of fluid and gas cells into interface cells and vice versa
30
Applications source: N.Thürey
31
Thanks For Your Attention
any questions ?
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.