Parallel Free-Surface Extension of the Lattice-Boltzmann Method A Lattice-Boltzmann Approach for Simulation of Two-Phase Flows Stefan Donath (LSS Erlangen, stefan.donath@informatik.uni-erlangen.de) Simon Bogner, Ulrich Rüde, Thomas Pohl, Nils Thürey in collaboration with many more Lehrstuhl für Informatik 10 (Systemsimulation Systemsimulation) Universität Erlangen-Nürnberg www10.informatik.uni-erlangen.de February 24, 2010 1
Outline Free-Surface LBM Boundary condition Gas volume pressure Surface tension Curvature computation for surface tension Free-Surface in motion images Further extensions Coupling with moving objects Disjoining pressure for foam simulation Capillary force and contact angles 2
Free-Surface LBM Cell types and gas phase model Free surface is two phase, however: Compute only liquid phase Model gas phase by ideal gas equation (no flow but only pressure is modeled) T. Pohl, High Performance Simulation of Free Surface Flows Using the Lattice Boltzmann Method, PhD Thesis, 2008, http://www10.informatik.uni-erlangen.de/publications/dissertations/diss_pohl_2008.pdf Pohl pdf N. Thürey, Physically based Animation of Free Surface Flows with the Lattice Boltzmann Method, PhD Thesis, 2007, http://www10.informatik.uni-erlangen.de/publications/dissertations/diss_thuerey_070313.pdf 3
Free-Surface LBM Fraction of fluid volume in Interface cells Interface cells store fluid fraction (similar to VoF) Fluid advection: Mass transfer between interface and liquid id cells Mass is conserved For two interface cells a weighting factor depends on the fill levels 4
Outline Free-Surface LBM Boundary condition Gas volume pressure Surface tension Curvature computation for surface tension Free-Surface in motion images Further extensions Coupling with moving objects Disjoining pressure for foam simulation Capillary force and contact angles 5
Free-Surface LBM Interface boundary condition Simplification of stress tensor at interface Navier-Stokes for incompressible fluid with stress tensor Treating gas as inert phase with vanishing density reduces stress to sole influence of pressure 6
Free-Surface LBM Interface boundary condition: gas pressure Gas volume pressure Initial state with initial gas volume Tracking gas volume changes in all interface cells leads to current volume Pressure is ratio of current volume to initial volume Remarks: Tracking gas volume changes throughout a parallel simulation involves means of all-to-all communication Gas pressure depends on accurate mass tracking in interface cells Supports continuous inflation of bubbles 7
Free-Surface LBM Interface boundary condition: surface tension Surface tension Energy balance relates pressure to surface tension: Young-Laplace equation (for 3 dimensions) Takes only mean curvature into account, which is the mean value of the two principal curvatures 8
Free-Surface LBM Interface boundary condition in LBM Reconstruction of distribution functions at interface Simplified stress tensor means in LBM: Velocity of fluid and gas phase have to be equal at interface Force of the gas has to be balanced with force by fluid Reconstruct distribution functions pointing in opposite direction of surface normal Density of gas phase is computed from gas pressure 9
Outline Free-Surface LBM Boundary condition Gas volume pressure Surface tension Curvature computation for surface tension Free-Surface in motion images Further extensions Coupling with moving objects Disjoining pressure for foam simulation Capillary force and contact angles 10
Free-Surface LBM Surface curvature computation Calculating the surface curvature Needs information of a 5x5x5 neighborhood For parallelization: Split in 3 parts: Surface normal Reconstruction of surface point Surface curvature Only one layer has to be communicated for parallelization 11
Free-Surface LBM Surface curvature computation Calculating surface normal Treat fluid fraction of cells as scalar field Compute the gradient and its normal by Parker-Youngs approximation Similar to Center-of-Mass method as used in VoF, but with coefficients different from 1 12
Free-Surface LBM Surface curvature computation Calculating the surface point For simplification: Surface fraction in a cell is assumed to be planar, fulfilling two requirements: Plane s normal is equal to surface normal Plane bisects cell into two volumes corresponding to fluid fraction of cell 13
Free-Surface LBM Surface curvature computation Calculating the surface point (cont.) Direct calculation of offset a is difficult Solve the inverse problem by bisection algorithm Calculate the fluid volume with a Correct a and proceed Calculation of fluid volume difficult in 3D: 14
Free-Surface LBM Surface curvature computation Calculating the surface curvature (of 3x3x3 neighborhood s interface cells) Select appropriate subset of neighboring surface points (to avoid degenerated triangles) Local triangulation of chosen surface points and calculation of surface curvature (similar algorithm as described in: G. Taubin. Estimating the Tensor of Curvature of a Surface from a Polyhedral Approximation. In Proceedings of the Fifth International Conference on Computer Vision, pages 902 905, 1995) 15
Free-Surface LBM Bubble coalescence Bubble coalescence (Bubble merging) If two bubbles touch each other: Add initial and current volume from bubble with higher index to bubble with lower index Delete bubble with higher index Connect all cells belonging to old bubble to new bubble If target bubble merges with other bubble, do process iterativelyti 16
Outline Free-Surface LBM Boundary condition Gas volume pressure Surface tension Curvature computation for surface tension Free-Surface in motion images Further extensions Coupling with moving objects Disjoining pressure for foam simulation Capillary force and contact angles 17
Free-Surface LBM in motion images Drop falling on free surface 18
Free-Surface LBM in motion images Rising and coalescing bubbles 19
Free-Surface LBM in motion images Many rising and coalescing bubbles 20
Outline Free-Surface LBM Boundary condition Gas volume pressure Surface tension Curvature computation for surface tension Free-Surface in motion images Further extensions Coupling with moving objects Disjoining pressure for foam simulation Capillary force and contact angles 21
Free-Surface LBM Extension: Coupling with moving objects Coupling with FSI-LBM New cell conversion rules Adapted force calculation for interface cells Adapted interface boundary condition for particle cells S. Bogner, Simulation of Floating Objects in Free-Surface Flows, Diploma Thesis, 2009, http://www10.informatik.uni-erlangen.de/publications/theses/2009/bogner_da09.pdf 22
Free-Surface LBM Extension: Disjoining pressure Disjoining i i pressure for foam modeling Add pressure component depending on distance to next bubble C. Körner, M. Thies, T. Hofmann, N. Thürey, and U. Rüde, Lattice Boltzmann Model for Free Surface Flow for Modeling Foaming, Journal of Statistical Physics, Vol. 121, Nos. 1/2, 2005, http://www10.informatik.uni-erlangen.de/publications/papers/2005/koerner_etal_j.statist.phys.121_2005.pdf 23
Free-Surface LBM Extension: Capillary force and contact angles Different approaches: Define additional pressure depending on contact angle θ Contact Angle Enforce a curvature at triple line by manipulating curvature computation Introduce additional force based on Young s equation S. Donath, to be published 2010, http://www10.informatik.uni-erlangen.de/ 24
Free-Surface LBM Extension: Capillary force and contact angles Drop on Plate Defined volume, prescribed contact angle, measure height h = 3 1 1 1 V ( ) 1 cosϑ 3 π D Θ=10,, h=3.28 Θ=90,, h=15.12 Θ=150,, h=22.49 25
The End Thank you for your attention! 26
Lattice Boltzmann Method Boltzmann equation Evolved from Lattice-Gas-Cellular-Automata Lattice, Rules, Local Mesoscopic - works with distributions of particles Boltzmann equation f f + ξ f = + f F r r ( x, p, t) f = ξ F...external forces t p Fulfills the Maxwell distribution Ω Solves the Navier-Stokes equations ξ Ω... particle velocity... collision operator 27
Lattice Boltzmann Method BGK collision i model Collision i Operator 1 )... particle velocity (0 (0) f + f = [ f f ] f... equilibrium distribution function t ξ τ τ... relaxation time ξ f ( 0 ) α Equilibrium distribution function 1 9 2 3 = wα ρ[ 1 + e u ( e u ) 2 α + 4 α 4 c 2c 2c Macroscopic quantities ( u u )] ρ = fα ρu = α α e α w a... weighting factors dx c... lattice speed dt u... macroscopic velocity f α 28
Lattice Boltzmann Method Discretization of Velocity Space Discretization of particle velocity space t (finite set of discrete velocities) f + ξ f f α α α = 1 (eq f f ) α α [ τ Different discretization schemes Numerical accuracy and stability Computational speed and simplicity ] f α r r ( x, t) = f ( x, ξα, t) r (0) r ( x, t) = f ( x,, t) ( ) f eq α ξ α D3Q15 D3Q19 D3Q27 29
Lattice Boltzmann Method Spatial and Temporal Discretization Discretization in space x and dtime t: collision step: streaming step: f α ~ ( eq f ) α fα ( xi, t) = fα ( xi, t) ω [ fα ( xi, t) ~ ( x + e r δ t, t + δt) = f ( x, t) i α α i ( x i, t)] 30
Lattice Boltzmann Method Boundary Conditions Boundary conditions at walls No slip / Free slip / Part slip boundary conditions May be enough for qualitative examination (without contact angle modeling) 31
Lattice Boltzmann Method Parameterization ti All physical quantities have to be scaled such that the following conditions hold in lattice space: δt * * * * 1 1 = 1; δx = 1; ρ = 1; c s = ; 0.5 < < 1.95; u 3 τ Physical quantities are scaled and dimensionlessi * < 0.1 Kinematic viscosity m υ s 2 : v * = v δt x 6 υ τ = 2 δx 2 * + 1 Velocity m u : s u * = δt u δx Surface Tension kg : 2 s δt ρ δx 2 * σ σ = σ 3 32
Parallelization Why parallelize? li Because of the complicated geometry 3.0 x 0.15x 0.16mm³ resolution dx = 0.1µm Domain of 7.2 * 10 10 cells 425 Bytes per cell Approx. 28 TB memory Subset of 0.5 x 0.1 x 0.1mm³ results in 2 TB of memory Code is parallel, yes. But not suitable for large-scale parallel simulations! Portation to walberla framework. 33
walberla Widelyy applicable lattice Boltzmann from Erlangen pp g CFD project based on lattice Boltzmann method Modular software concept Various applications under development: Blood flow Moving particles and agglomerates Charged colloids Free surfaces Species transport Multi-component multi-phase Brownian motion Integration in efficient massive-parallel environment Project involving currently 5 scientists and many diploma theses 34
walberla Patch Concept Supports Fast Integration ti of FreeSurfaces Optimized i for Large-Scale Parallelization li and Porous Media 35
Outlook: Contact Angles In our model: Fill levels in cells influence normal Normals influence curvature and hence Fill levels influence force exerted by surface tension Idea: Control contact angle at walls by fill level in wall cells Körner et al. (at FAU Material Sciences) successfully showed relation between physical contact angle and fill levels for 2D 36
Outlook: Contact Angles Problems and Open Questions Interface modeling Calculations in 3D Which fill levels taken into account? Which cells for curvature computation? 37
Outlook: Contact Angles Open Questions Will contact angle induce capillary effects? Capillaries? Drops? Will capillary effects be necessary? Will this contact angle model work with the thin fibres in the substrate? 38