Simulation of floating bodies with lattice Boltzmann by Simon Bogner, 17.11.2011, Lehrstuhl für Systemsimulation, Friedrich-Alexander Universität Erlangen 1
Simulation of floating bodies with lattice Boltzmann Lattice Boltzmann Method (LBM) Multiphase Flow 3 Phases: Liquid, gas and solid (rigid bodies) Cell conversion scheme Simulations with walberla and pe Floating Bodies Kinetic origin of the lattice BGK Method Hydrostatic floating stability Evaluation of forces Outlook & Conclusion Further applications 2
Simulation of floating bodies with lattice Boltzmann Lattice Boltzmann Method (LBM) Multiphase Flow 3 Phases: Liquid, gas and solid (rigid bodies) Cell conversion scheme Simulations with walberla and pe Floating Bodies Kinetic origin of the lattice BGK Method Hydrostatic floating stability Evaluation of forces Outlook & Conclusion Further applications 3
Kinetic Origin of Lattice Boltzmann Navier-Stokes equation for fluids Continuum assumption: Macroscopic Variables are defined at every point in space inside the medium Behavior of the flow is described as equation of the macroscopic variables Boltzmann: Microscopic assumption: Fluid is made up of particles (molecules) Particles of mass m, defined by position and velocity. Statistical mechanics: Description of kinetic behavior by means of probabilistic methods (Large number of particles!) Kinetic particle distribution function is the number of particles within the volume element d x around x and velocity within d v around v. 4
Boltzmann Equation Boltzmann: Macroscopic variables are moments of the statistical distribution function Boltzmann Equation: LHS: transport term RHS: collision term (hidden) 5
BGK Collision Model Collision term: Describes the changes in the particle motion due to collisions Boltzmann: Time-independent two-body collisions ( Stosszahl Ansatz ) Bhatnagar Gross Krook Model H-Theorem: Thermodynamic systems strive towards a state of Equilibrium (Entropic behavior) Equilibrium state solution given by a Maxwell-Boltzmann distribution (distribution of particle velocities in thermodynamic equilibrium) BGK - Equation Collision term: Linear BGK - relaxation towards equilibrium 6
From the BGK Equation to Lattice Boltzmann BGK Equation f is function of ( x, v ) Discretization of velocity space Restriction of particle velocities to finite set {c i }. Set must span a discrete lattice (~grid) of cells. Lattice velocities connect the cells. Discrete set of particle distributions functions { f i ( x, t)} at each cell D3Q19 Model shown in figure 7
Lattice Boltzmann Scheme Discretized equilibrium function Discrete approximation of f eq around u =0 (low Mach number expansion). c s is the lattice speed of sound (model dependent constant). ( Skip lots of lots of mathematics ) Stream and Collide Algorithm Streaming: Collision: Dimensionless lattice relaxation time τ is related to the viscosity Lattice Boltzmann scheme 8
Moments of the Lattice Boltzmann Model Local macroscopic quantities are moments of the discrete particle distribution functions (PDFs): Approximates Navier-Stokes in the incompressible limit. (See Hänel, D. Molekulare Gasdynamik; Succi, S. Lattice Boltzmann Equation for Fluid Dynamics and Beyond) Mesoscopic Method 9
Simulation of floating bodies with lattice Boltzmann Lattice Boltzmann Method (LBM) Multiphase Flow 3 Phases: Liquid, gas and solid (rigid bodies) Cell conversion scheme Simulations with walberla and pe Floating Bodies Kinetic origin of the lattice BGK Method Hydrostatic floating stability Evaluation of forces Outlook & Conclusion Further applications 10
Three - Phase Flow Liquid-Gas-Solid Simulation Free Surface Flows Particulate Flows (Rigid Bodies) Everyday life: water & air 2 immiscible fluids (a liquid and a gas) Examples: river, bubbles & foam, Suspensions (e.g., paint, blood, colloids) Rigid Bodies in Free Surface Flow Non-deformable Newtonian body physics Examples: Ship, Weizenbier Pictures taken from Physics of Continuous Matters (Benny Lautrup), and Wikipedia. 11
Liquid-Gas-Solid Lattice Boltzmann Boltzmann method used to simulate the liquid phase Different cell types control the system behavior Figure: floating box in discrete lattice Gas, liquid, and solid cells represent the three phases Interface cells model the free surface boundary Computation uses a flag field to store the cell type of each cell Flag field is updated dynamically 12
Liquid-Gas-Solid Lattice Boltzmann Boltzmann method used for the liquid phase Interaction with other phases via boundary conditions Three phase transitions: Liquid-gas boundary (free surface) Liquid-solid boundary (obstacle walls) Solid-gas (no boundary for LBM scheme!) 13
Liquid-Gas-Solid Lattice Boltzmann Boltzmann method used for the liquid phase Interaction with other phases via boundary conditions Three phase transitions: Liquid-gas boundary (free surface) Liquid-solid boundary (obstacle walls) Solid-gas (no boundary for LBM scheme!) 14
Liquid-Gas-Solid Lattice Boltzmann Boltzmann method used for the liquid phase Interaction with other phases via boundary conditions Three phase transitions: Liquid-gas boundary (free surface) Liquid-solid boundary (obstacle walls) Solid-gas (no boundary for LBM scheme!) 15
Liquid-Gas-Solid Lattice Boltzmann Boltzmann method used for the liquid phase Interaction with other phases via boundary conditions Three phase transitions: Liquid-gas boundary (free surface) Liquid-solid boundary (obstacle walls) Solid-gas (no boundary for LBM scheme!) 16
Liquid-Gas Boundary Free surface boundary Boundary treatment is done at the interface cells. PDFs only in liquid and interface cells No PDFs defined in gas cells! Free Surface Boundary Condition Construct PDFs pointing towards liquid phase from streamed PDFs according to 2 where ρg =1/c s p G incorporates the gas pressure, and u ( x ) is the local flow velocity. No tangential stresses at free surface boundary 17
Liquid-Gas Boundary Free Surface Boundary Second moment of distribution functions: Split sum for momentum flux and stress tensor, respectively For equilibrium all stresses vanish (S=0), and p is the gas pressure. 18
Liquid-Solid Boundary Particle reflection at obstacles Bounce back rule realized as a modified stream step (figure) Reflection is given by with boundary velocity u w. Flow velocity near wall equals boundary velocity (no slip) Momentum transfer Elastic collision of PDFs at the surface. Change in momentum Force exerted locally onto boundary. Momentum exchange method: Calculate boundary stress directly from all PDF reflections at a given surface. 19
Simulation of floating bodies with lattice Boltzmann Lattice Boltzmann Method (LBM) Multiphase Flow 3 Phases: Liquid, gas and solid (rigid bodies) Cell conversion scheme Simulations with walberla and pe Floating Bodies Kinetic origin of the lattice BGK Method Hydrostatic floating stability Evaluation of forces Outlook & Conclusion Further applications 20
Multiphase Flow Cell Conversion Scheme Lattice configuration Cell state (liquid, gas, interface, obstacle) stored as flag value in each cell May change during simulation Free surface movement Rigid body movement 21
Free Surface Movement Free Surface Flow Model Volume of Fluid approach Interface cells: Additional fill value liquid in a cell, such that stores the amount of Mass Exchange Mass balance is calculated during the stream step according to Fill level changes according to free surface movement 22
Free Surface Movement Free Surface Flow Model Mass balance is calculated during the stream step according to Interface cell converts to liquid, if. Interface cell converts to gas, if. May trigger further conversions to close interface layer (assure valid boundary!). No direct conversions from liquid to gas or vice versa! 23
Obstacle Movement Obstacles are mapped to the lattice Cell is treated as obstacle, if the center of the cell is inside of the object shape (e.g., box shape, sphere shape, ) Obstacle movement calculated from the fluid stresses Physics engine calculates movement from given surface stresses. Lattice has to be updated according to obstacle movement. 24
Conversion Scheme with Obstacles Free Surface: No direct transition between liquid and gas. Remaining transitions are from obstacle to fluid, and back. 25
Conversion Scheme with Obstacles Consider a spherical particle with rightwards movement. Direct conversions from fluid into obstacle (continuous lines) regardless of fluid state. Conversions from obstacle back to fluid are critical (broken lines). 26
Cell Conversion Algorithm 27
Cell Conversion Algorithm 28
Simulation of floating bodies with lattice Boltzmann Lattice Boltzmann Method (LBM) Multiphase Flow 3 Phases: Liquid, gas and solid (rigid bodies) Cell conversion scheme Simulations with walberla and pe Floating Bodies Kinetic origin of the lattice BGK Method Hydrostatic floating stability Evaluation of forces Outlook & Conclusion Further applications 29
Simulations with walberla and pe Widely Applicable Latttice Boltzmann from Erlangen p.e. - Rigid body physics engine Software projects of the Lehrstuhl für Systemsimulation, University of Erlangen-Nürnberg 30
Showcase 1 4096 Particles dropped into a Basin Spherical particles, radius 6 lattice units Red particles are heavier, green ones more lightweight Computed on 32 woodcrest processes ~ 3 days computation time Watch online: http://youtu.be/leorscgdrqm 31
Showcase 2 Bubbe Rise in Particle Array Freely floating spherical particles (neutral material density) Watch online: http://youtu.be/mtoidjcvuxu 32
Simulation of floating bodies with lattice Boltzmann Lattice Boltzmann Method (LBM) Multiphase Flow 3 Phases: Liquid, gas and solid (rigid bodies) Cell conversion scheme Simulations with walberla and pe Floating Bodies Kinetic origin of the lattice BGK Method Hydrostatic floating stability Evaluation of forces Outlook & Conclusion Further applications 33
Floating Stability - Literature Floating Positions of Rigid Bodies Application: Hydrostatic Floating stability (as known from marine engineering) J.M.J. Journée and W.W. Massie: Offshore Hydromechanics, www.shipmotions.nl (some pictures and formulae taken from this book) Captain D.R. Derrett and C.B. Barrass: Ship Stability for Masters and Mates Simon Bogner, Ulrich Rüde. Liquid-gas-solid flows with lattice Boltzmann Simulation of floating bodies ICMMES proceedings 2011 (submitted article under review) 34
Floating Bodies Buoyancy Force Archimedes: Lifting force equals the weight of the displaced fluid mass Force acts at the center of buoyancy B Partial Immersion: B is different from the center of gravity G Floating behavior of half immersed cube Assumption: Equilibrium of buoyancy and weight (vertical balance) Unstable and stable equilibrium (Equilibrium position for cube of specific density 0.5) 35
Floating Bodies Rotational Stability Unstable Equilibrium of Cube: Construction of B as the center of gravity of the immersed trapezoid Elongate each of the parallel sides (u and v) by its opposite in opposed directions Connect the newly obtained endpoints Intersection with middle line of the parallel sides gives B Horizontal displacement of G versus B Result: Rotational moment in the direction of heel. Upright position is unstable 45 position is stable 36
Floating Bodies Righting Moment Heel from stable floating position Righting Moment opposes the heeling moment M H Shift of masses from z e to z i (shift of B) Metacenter N ϕ: Intersection of line B ϕ +α ρ g =B ϕ α F B with the corresponding line of the upright position. Righting Stability Moment M S =ρ g GZ = F B GZ (Momentum: lever arm force ) Important for the stability of offshore structures (ships, barges,..) 37
Floating Structures Stability Formula Wall-sided structure Scribanti Formula Parallel side walls in upright position Immersed and emerged volume parts are wedges with triangular front side Compute the metacenter N ϕ for a given angle of heel. I T is the moment of inertia of the water plane. From BN ϕ follows B ϕ and the righting moment M S =ρ g GZ Example: Floating Box 38
Floating Structures Floating Box Stability of Floating Box For a cuboid, the Stability Formula can be written as with L, B and T are the length, width and draft of the box Stability Curve Righting moment at a given angle of heel α Cube (b:h = 4:4): negative righting moment; upright position unstable Increased width means more stability 39
Simulation of floating bodies with lattice Boltzmann Lattice Boltzmann Method (LBM) Multiphase Flow 3 Phases: Liquid, gas and solid (rigid bodies) Cell conversion scheme Simulations with walberla and pe Floating Bodies Kinetic origin of the lattice BGK Method Hydrostatic floating stability Evaluation of forces Outlook & Conclusion Further applications 40
Floating Structures Evaluation of Torque Validation of righting moment of box structures Half immersed box Angle of heel 0..30 Tested b:h ratios 6:4 (a) and 5:4 (b) Resolution of box in lattice units: 24x16, 48x32, 96x64 (a) 20x16, 40x32, 80x64 (b) 41
Floating Structures Evaluation of Torque Ideal Stability Curve Versus Simulation Higher relative errors in (b) because of lower floating stability. Convergence to ideal curve 42
Floating Structures Convergence Test Check for convergence of three-phase system (ideal floating positions) Equilibrium for cube of density 0.5 For cube of density 0.25, the stability curve shows has a root at 26.57 (~ Angle of Loll ) Same angle for density 0.75 43
Floating Structures Convergence Test Demonstration of convergence to ideal floating positions Cubes of density 0.25, 0.5, and 0.75 Low resolution of particles: 16x16 lattice units Watch online: http://youtu.be/5f-qhspirye 44
Simulation of floating bodies with lattice Boltzmann Lattice Boltzmann Method (LBM) Multiphase Flow 3 Phases: Liquid, gas and solid (rigid bodies) Cell conversion scheme Simulations with walberla and pe Floating Bodies Kinetic origin of the lattice BGK Method Hydrostatic floating stability Evaluation of forces Outlook & Conclusion Further applications 45
Conclusion Liquid-Gas-Solid Method so far... Arbitrary shaped rigid bodies or particles Free surface flows Ready for parallel computation (tested on woodcrest cluster) Outlook Further development for bubbly flows (foams), like, e.g., flotation processes or chemical reactors Surface tension and contact line behavior with particles Further validation, e.g., floating objects motion in waves, bubbleparticle interaction,...... 46
Thanks for Listening Thank you for your attention! Have a nice and pleasant evening. http://www10.informatik.uni-erlangen.de 47