Simulation of Liquid-Gas-Solid Flows with the Lattice Boltzmann Method June 21, 2011
Introduction Free Surface LBM Liquid-Gas-Solid Flows Parallel Computing Examples and More References Fig. Simulation of spherical particles dropped into liquid (http://youtu.be/bwgbqslqr-m). Free Surface Flow (i.e., immiscible fluids or liquid-gas flows, respectively) Particulate Flows (i.e. rigid bodies in the flow) Extension of existing Lattice Boltzmann approaches into a method for liquid-gas-solid flows. 2
Outline 1 Introduction Lattice Boltzmann Model 2 Free Surface LBM Free Surface Extension 3 Liquid-Gas-Solid Flows Liquid-Solid Flows with LBM Liquid-Gas-Solid Flows with LBM 4 Parallel Computing WaLBerla and MPI Scaling results 5 Examples and More Example Videos Conclusion 3
Table of Contents 1 Introduction Lattice Boltzmann Model 2 Free Surface LBM Free Surface Extension 3 Liquid-Gas-Solid Flows Liquid-Solid Flows with LBM Liquid-Gas-Solid Flows with LBM 4 Parallel Computing WaLBerla and MPI Scaling results 5 Examples and More Example Videos Conclusion 4
Lattice and discrete velocities Fig. D3Q19 model Let us assume the D3Q19 model. We have 19 particle distribution functions (PDFs), i.e., f i encodes the fraction of particles with lattice velocity v i, (i = 0,.., 18). The Stream step propagates PDFs from neighboring cells. The Collide step does a relaxation of the PDFs in a cell towards a local equilibrium. Fig. Stream step 5
Table of Contents 1 Introduction Lattice Boltzmann Model 2 Free Surface LBM Free Surface Extension 3 Liquid-Gas-Solid Flows Liquid-Solid Flows with LBM Liquid-Gas-Solid Flows with LBM 4 Parallel Computing WaLBerla and MPI Scaling results 5 Examples and More Example Videos Conclusion 6
Basic Idea - Interface Tracking The free surface extension is based on (KT04) 1 (volume of fluid - approach). Idea: Simulate only the liquid region and neglect the gas phase. Fig. Different cell types: gas, liquid, interface, and obstacle 1 Körner, Carolin ; Thies, Michael: Lattice boltzmann model for free surface flow. (2004) 7
Basic Idea - Interface Tracking The free surface extension is based on (KT04) 1 (volume of fluid - approach). Idea: Simulate only the liquid region and neglect the gas phase. Track the position of the free surface and do lattice Boltzmann inside the liquid region. Therefore different cell types are needed (see figure). Fig. Different cell types: gas, liquid, interface, and obstacle 1 Körner, Carolin ; Thies, Michael: Lattice boltzmann model for free surface flow. (2004) 7
Basic Idea - Interface Tracking Fig. Different cell types: gas, liquid, interface, and obstacle The free surface extension is based on (KT04) 1 (volume of fluid - approach). Idea: Simulate only the liquid region and neglect the gas phase. Track the position of the free surface and do lattice Boltzmann inside the liquid region. Therefore different cell types are needed (see figure). Interface Cells: Cells that have both gas and liquid in their neighborhood. 1 Körner, Carolin ; Thies, Michael: Lattice boltzmann model for free surface flow. (2004) 7
Basic Idea - Interface Tracking Fig. Different cell types: gas, liquid, interface, and obstacle The free surface extension is based on (KT04) 1 (volume of fluid - approach). Idea: Simulate only the liquid region and neglect the gas phase. Track the position of the free surface and do lattice Boltzmann inside the liquid region. Therefore different cell types are needed (see figure). Interface Cells: Cells that have both gas and liquid in their neighborhood. Form closed boundary between liquid and gas regions. 1 Körner, Carolin ; Thies, Michael: Lattice boltzmann model for free surface flow. (2004) 7
Basic Idea - Interface Tracking Fig. Different cell types: gas, liquid, interface, and obstacle The free surface extension is based on (KT04) 1 (volume of fluid - approach). Idea: Simulate only the liquid region and neglect the gas phase. Track the position of the free surface and do lattice Boltzmann inside the liquid region. Therefore different cell types are needed (see figure). Interface Cells: Cells that have both gas and liquid in their neighborhood. Form closed boundary between liquid and gas regions. A free surface boundary condition incorporates the gas pressure. 1 Körner, Carolin ; Thies, Michael: Lattice boltzmann model for free surface flow. (2004) 7
Interface Cells - Fill Levels Interface cells have a full set of PDFs. Fig. Different cell types: gas, liquid, interface, and obstacle 8
Interface Cells - Fill Levels Interface cells have a full set of PDFs. Interface cells have a fill level 0 ϕ 1, such that M = ρ ϕ. Fig. Different cell types: gas, liquid, interface, and obstacle 0, if gas at x + v i m i (x) = f ī (x + v i) f i(x), if liquid at x + v i 1 [ϕ(x) + ϕ(x + 2 vi)][fī (x + v i) f i(x)], if interface at x + v i. 8
Interface Cells - Fill Levels Interface cells have a full set of PDFs. Interface cells have a fill level 0 ϕ 1, such that M = ρ ϕ. Fig. Different cell types: gas, liquid, interface, and obstacle As a result of advection (stream step) the fill level may change (see formula below). 0, if gas at x + v i m i (x) = f ī (x + v i) f i(x), if liquid at x + v i 1 [ϕ(x) + ϕ(x + 2 vi)][fī (x + v i) f i(x)], if interface at x + v i. 8
Interface Cells - Fill Levels Interface cells have a full set of PDFs. Interface cells have a fill level 0 ϕ 1, such that M = ρ ϕ. Fig. Different cell types: gas, liquid, interface, and obstacle As a result of advection (stream step) the fill level may change (see formula below). This mass tracking technique is the first step towards a dynamical boundary. 0, if gas at x + v i m i (x) = f ī (x + v i) f i(x), if liquid at x + v i 1 [ϕ(x) + ϕ(x + 2 vi)][fī (x + v i) f i(x)], if interface at x + v i. 8
Interface Cells - Cell Conversion If ϕ 0 or ϕ 1, then the interface cell must be converted to gas or liquid, respectively. Fig. Possible state changes for the interface layer. 9
Interface Cells - Cell Conversion If ϕ 0 or ϕ 1, then the interface cell must be converted to gas or liquid, respectively. If such a cell conversion occurs, then cells in the neighborhood may have to be converted to interface cells (see figure below). Fig. Possible state changes for the interface layer. 9
Interface Cells - Cell Conversion If ϕ 0 or ϕ 1, then the interface cell must be converted to gas or liquid, respectively. If such a cell conversion occurs, then cells in the neighborhood may have to be converted to interface cells (see figure below). This assures a closed boundary layer between gas and liquid regions. Fig. Possible state changes for the interface layer. 9
Table of Contents 1 Introduction Lattice Boltzmann Model 2 Free Surface LBM Free Surface Extension 3 Liquid-Gas-Solid Flows Liquid-Solid Flows with LBM Liquid-Gas-Solid Flows with LBM 4 Parallel Computing WaLBerla and MPI Scaling results 5 Examples and More Example Videos Conclusion 10
Liquid-Solid Flows with LBM Moving boundaries induce fluid flow. For a moving no-slip wall one has (Lad) 2 f i (x, t+δ t ) = f i (x, t)+ 6 c 2 w iρ(x)v i u o 2 Ladd, A.J.C.: Numerical Simulations of Particulate Suspensions via a Discretized Boltzmann Equation Part I 11
Liquid-Solid Flows with LBM Moving boundaries induce fluid flow. For a moving no-slip wall one has (Lad) 2 f i (x, t+δ t ) = f i (x, t)+ 6 c 2 w iρ(x)v i u o Objects are discretized to the lattice by marking the according cells as obstacle Fig. Mapping of a moving obstacle into the lattice. 2 Ladd, A.J.C.: Numerical Simulations of Particulate Suspensions via a Discretized Boltzmann Equation Part I 11
Momentum Exchange Method Fluid flow leads to stresses and forces on the boundaries. 12
Momentum Exchange Method Fluid flow leads to stresses and forces on the boundaries. A rigid body dynamics engine is then used to calculate the resulting motion of the objects. 12
Liquid-Gas-Solid Flows Problem: Additional cell type that has to be handled dynamically. Fig. Mapping of a moving obstacle into the lattice. 13
Liquid-Gas-Solid Flows Problem: Additional cell type that has to be handled dynamically. The free surface algorithm relies on the assertion that there is a closed boundary around the liquid cells. Fig. Obstacle to fluid - conversions are critical. 13
Complex Cell Conversion Algorithm Cell conversions from obstacle to fluid (i.e., either liquid, interface or gas) have to conserve the closed layer of interface cells between gas and liquid (Bog09) 3. 3 Bogner, S.: Simulation of Floating Objects in Free-Surface Flow. Diplomarbeit, Jan 2009 14
Complex Cell Conversion Algorithm Cell conversions from obstacle to fluid (i.e., either liquid, interface or gas) have to conserve the closed layer of interface cells between gas and liquid (Bog09) 3. For an obstacle cell x that is going to change to a fluid state for timestep t + δ t, let N := {x + v i δ t i [1..18] and x + v i δ t is no obstacle cell} be the set of non-obstacle cells in the neighbourhood. 3 Bogner, S.: Simulation of Floating Objects in Free-Surface Flow. Diplomarbeit, Jan 2009 14
Complex Cell Conversion Algorithm (Cont.) Correct cell type is determined from local neighborhood N of the converted cell, i.e., If N contains no gas cells: conversion into liquid cell. The new liquid cell is initialized with an equilibrium set of PDFs. Therefore local density ρ(x, t + δ t ) is approximated from N and u(x, t + δ t ) = u o is asumed, where u o is the velocity of the obstacle. 15
Complex Cell Conversion Algorithm (Cont.) Correct cell type is determined from local neighborhood N of the converted cell, i.e., If N contains no gas cells: conversion into liquid cell. If N contains both gas and liquid cells: create an interface cell. PDFs are set to equilibrium as for liquid cells. In addition to the PDFs, a fill value has to be interpolated from the neighborhood N. 15
Complex Cell Conversion Algorithm (Cont.) Correct cell type is determined from local neighborhood N of the converted cell, i.e., If N contains no gas cells: conversion into liquid cell. If N contains both gas and liquid cells: create an interface cell. If N contains no liquid cells: conversion into gas cell. 15
Table of Contents 1 Introduction Lattice Boltzmann Model 2 Free Surface LBM Free Surface Extension 3 Liquid-Gas-Solid Flows Liquid-Solid Flows with LBM Liquid-Gas-Solid Flows with LBM 4 Parallel Computing WaLBerla and MPI Scaling results 5 Examples and More Example Videos Conclusion 16
WaLBerla Communication Concept WaLBerla framework: Widely applicable Lattice Boltzmann software framework from Erlangen. Fig. WaLBerla logo, see http://www10.informatik.uni-erlangen. de/research/projects/walberla/. 17
WaLBerla Communication Concept WaLBerla framework: Widely applicable Lattice Boltzmann software framework from Erlangen. Simulation domain is split into patches, which are then distributed over the number of processes. 17
WaLBerla Communication Concept WaLBerla framework: Widely applicable Lattice Boltzmann software framework from Erlangen. Simulation domain is split into patches, which are then distributed over the number of processes. Ghostlayer concept. 17
WaLBerla Communication Concept WaLBerla framework: Widely applicable Lattice Boltzmann software framework from Erlangen. Simulation domain is split into patches, which are then distributed over the number of processes. Ghostlayer concept. If neighboring patches are residing on different processes, then the patch data is communicated via MPI. 17
Ghostlayer with moving obstacles The information needed for obstacle to fluid conversions fits perfectly into the ghostlayer concept. 18
Ghostlayer with moving obstacles The information needed for obstacle to fluid conversions fits perfectly into the ghostlayer concept. No need for global communication, since only a local neighborhood needs to be considered. 18
Scaling Experiment Particles floating on a free surface (basin partially filled with liquid). 19
Scaling Experiment Particles floating on a free surface (basin partially filled with liquid). 2D - Scaling because of load balancing considerations. 19
Scaling Experiment Particles floating on a free surface (basin partially filled with liquid). 2D - Scaling because of load balancing considerations. Scaling along X - and Y - axes. 19
Scaling Experiment Particles floating on a free surface (basin partially filled with liquid). 2D - Scaling because of load balancing considerations. Scaling along X - and Y - axes. LIMA Cluster, RRZE http://www.rrze.uni-erlangen.de 19
Strong Scaling Fixed problem size: 512 512 64 cells, scaling from 16 to 256 processes. MLups: Number (M=millions) of lattice cells updated per second. 20
Weak Scaling Scaling the problem size, from 320 240 300 cells on 24 processes to: 2560 1920 300 cells on 1536 processes. Performance was 998 MLups (i.e., 86% performance compared to ideal scaling). 21
Table of Contents 1 Introduction Lattice Boltzmann Model 2 Free Surface LBM Free Surface Extension 3 Liquid-Gas-Solid Flows Liquid-Solid Flows with LBM Liquid-Gas-Solid Flows with LBM 4 Parallel Computing WaLBerla and MPI Scaling results 5 Examples and More Example Videos Conclusion 22
Buoyancy Example 23 Fig. Buoyancy due to concavity of the object (http://www10. informatik.uni-erlangen.de/gallery3/index.php/movies/3002).
Particles Example Fig. Simulation of spherical particles dropped into liquid (http://youtu.be/bwgbqslqr-m).
Rising Bubble in Particulate Flow Fig. Video of a rising bubble in a particulate flow (http://youtu.be/mtoidjcvuxu).
Conclusion Method for the simulation of liquid-gas-solid flows with Lattice Boltzmann Integration into walberla with support for high performance computers Future tasks: Improvement and validation of bubble-particle interaction. 26
Conclusion Method for the simulation of liquid-gas-solid flows with Lattice Boltzmann Integration into walberla with support for high performance computers Future tasks: Improvement and validation of bubble-particle interaction. Key application of free surface method: simulation of foaming processes. Stability of foams is influenced by the presence of particles in such a flow. Possible application: Simulation of foaming and froth flotation processes. 26
Thank you very much for listening! http://www10.informatik.uni-erlangen.de 27
References 28 [Bog09] Bogner, S.: Simulation of Floating Objects in Free-Surface Flow. Diplomarbeit, Jan 2009 [KT04] Körner, Carolin ; Thies, Michael: Lattice boltzmann model for free surface flow. (2004) [Lad] Ladd, A.J.C.: Numerical Simulations of Particulate Suspensions via a Discretized Boltzmann Equation Part I.