introduction: lattice boltzmann method for non-fluid applications ye zhao
TRANSCRIPT
Introduction:Introduction:Lattice Boltzmann Method for Lattice Boltzmann Method for Non-fluid ApplicationsNon-fluid Applications
Ye ZhaoYe Zhao
Lattice Boltzmann MethodLattice Boltzmann Method Microscopic numerical solver initially Microscopic numerical solver initially
desinged for fluid dynamicsdesinged for fluid dynamics Simple, explicit and parallel schemeSimple, explicit and parallel scheme Parallel scheme for hardware Parallel scheme for hardware
accelerationacceleration Graphics hardware: GPU, GPU cluster Graphics hardware: GPU, GPU cluster
LBM in Computer GraphicsLBM in Computer Graphics Natural phenomena with fluidsNatural phenomena with fluids
Fluid FlowsFluid Flows Smoke and fireSmoke and fire Ink dispersionInk dispersion Snowing Snowing Liquid mixture Liquid mixture (Wang et al. 2006)(Wang et al. 2006)
More …More … Non-fluids Non-fluids
Lighting Lighting (Geist et al. 2004)(Geist et al. 2004)
Image ProcessingImage Processing
Navier-Stokes EquationNavier-Stokes Equation
Model the macroscopic behavior of Model the macroscopic behavior of fluidfluid
Fupuut
u
ut
21
0
Microscopic DynamicsMicroscopic DynamicsMicroscopic particles
inside fluids
Fictitious particles moving along lattice links
Lattice Boltzmann EquationLattice Boltzmann Equation
f : f : probability distribution function of particle populations on each linkprobability distribution function of particle populations on each link
Recover the Navier-Stokes equationRecover the Navier-Stokes equation At the limit of low Mach number fluids At the limit of low Mach number fluids
Discretize Boltzmann equation on Discretize Boltzmann equation on discrete moving directions discrete moving directions ii (1988)(1988)
)(),(),( ftrfttetrf iiii
Lattice StructureLattice Structure
Single-relaxation-time LBMSingle-relaxation-time LBM
)),(),((1
),(),( * uftrftrftrf eqiiii
CollisionCollision
BGK model BGK model (1954) for equilibrium(1954) for equilibrium
))()((),( 22 ueDCuueBAuf iieq
i
Streaming along a link to a neighborStreaming along a link to a neighbor),()1,( *trfterf iii
Macroscopic PropertiesMacroscopic Properties
Density, velocity and viscosityDensity, velocity and viscosity
6
12
ii
i
ii
efuf
Body ForcesBody Forces
ieFB
2
12)),(),((
1),()1,( trftrftrfterf eq
iiiii
Graphics HardwareGraphics Hardware Graphics processing unitsGraphics processing units (GPU)(GPU)
Low priceLow price Inherently parallelInherently parallel ProgrammableProgrammable
Booming growth rate on speedBooming growth rate on speed 3.0 GHz dual-core Pentium4: 24.6 GFLOPs3.0 GHz dual-core Pentium4: 24.6 GFLOPs NVIDIA GeForce FX 7800: 165 GFLOPsNVIDIA GeForce FX 7800: 165 GFLOPs
Ideal general-purpose applicationsIdeal general-purpose applications Large data setsLarge data sets High parallelismHigh parallelism Minimal dependencies between data Minimal dependencies between data
elementselements
Computation on GPUComputation on GPU
Texture
Images Fragment
Processing
Fragments
Fragment w/ Colors
Graphics:
Data
Numerical
Calculation
Fragments
Results
Computation:
LBM Acceleration on GPULBM Acceleration on GPU Simple addition, subtraction Simple addition, subtraction
and multiplicationand multiplication
Computation on cluster Computation on cluster Large-scale simulationLarge-scale simulation Domain decompositionDomain decomposition
LBM for Non-fluids LBM for Non-fluids ApplicationsApplications
Actually LBM is a special numerical Actually LBM is a special numerical solver for partial differential solver for partial differential equations (PDE)equations (PDE)
PDEs are widely used in graphics and PDEs are widely used in graphics and visualization applicationsvisualization applications Image processingImage processing Surface processingSurface processing Volume graphics and visualizationVolume graphics and visualization Computer vision …Computer vision …
Use LBM in these fields?Use LBM in these fields? Pros:Pros:
LBM is simple to implement LBM is simple to implement both CPU and GPUboth CPU and GPU
Flexible and easy to modify its schemeFlexible and easy to modify its scheme Computational speed very fast with Computational speed very fast with
hardware accelerationhardware acceleration Cons:Cons:
Difficult understanding at the beginningDifficult understanding at the beginning Memory usageMemory usage
Worth a try!Worth a try!
Research TopicsResearch Topics
How to modify LBM scheme in order to How to modify LBM scheme in order to theoretically recover the preferred theoretically recover the preferred PDEsPDEs
How to improve hardware acceleration How to improve hardware acceleration performance performance New-generation GPU architectureNew-generation GPU architecture Memory use optimizationMemory use optimization
How to incorporate with particular How to incorporate with particular applicationsapplications
Modify LBM Equilibrium Modify LBM Equilibrium Equation for DiffusionEquation for Diffusion
For fluid dynamics For fluid dynamics BGK model BGK model (1954) for equilibrium(1954) for equilibrium
))()((),( 22 ueDCuueBAuf iieq
i
For diffusion onlyFor diffusion onlyAuf eq
i ),(
Recover Diffusion EquationRecover Diffusion Equation Chapman-Enskog expansion, Chapman-Enskog expansion, εε
represents a small expansion represents a small expansion parameter (Knudsen number)parameter (Knudsen number)
Use this and Taylor expansion on Use this and Taylor expansion on LBM equationLBM equation
Recover Diffusion Equation Recover Diffusion Equation (Continue)(Continue)
We get expanded equation :We get expanded equation :
Constraints Constraints
Summation on expanded equation Summation on expanded equation over iover i
Recover Diffusion Equation Recover Diffusion Equation (Continue)(Continue)
Diffusion tensor defined by lattice Diffusion tensor defined by lattice structurestructure
For a particular lattice structure we For a particular lattice structure we obtainobtain
For D3Q19For D3Q19
ApplicationsApplications
Volume SmoothingVolume Smoothing
Volume SmoothingVolume Smoothing
Volume Volume SmoothingSmoothing
Surface SmoothingSurface Smoothing
Surface SmoothingSurface Smoothing
Image De-noisingImage De-noising
Poisson Image EditingPoisson Image Editing
Poisson Equation with Dirichlet Poisson Equation with Dirichlet boundaryboundary
is a computed guidance field is a computed guidance field computed from origin imagecomputed from origin image
PerformancePerformance
GPU NVidia 8800GTX with 768MB GPU NVidia 8800GTX with 768MB memorymemory
More ApplicationsMore Applications Apply to others beyond diffusionApply to others beyond diffusion Use level set equation as a pivot Use level set equation as a pivot
exampleexample It has many application fieldsIt has many application fields Combine several different types of PDEsCombine several different types of PDEs
Propagation interface as zero level Propagation interface as zero level setset
d is distance to interfaced is distance to interface Surface motionSurface motion
F = Signed speed in direction of normalF = Signed speed in direction of normal
Level SetLevel Set
F Speed FunctionF Speed Function
Curvature flow Curvature flow diffusion on distance diffusion on distance fieldfield
Advected propagation by a external fieldAdvected propagation by a external field Constant speed expansionConstant speed expansion
advcurvprop FFFF
),,(0 tyxUFt
LBM for Level SetLBM for Level Set Use distance field as the Use distance field as the
computational primitive in LBMcomputational primitive in LBM Play the role as density in fluidsPlay the role as density in fluids Design appropriate equlibrium Design appropriate equlibrium
function for PDEsfunction for PDEs
ThanksThanks