Webinar #3 Lattice Boltzmann method for CompBioMed (incl. Palabos)

Similar documents
LATTICE-BOLTZMANN METHOD FOR THE SIMULATION OF LAMINAR MIXERS

CUDA. Fluid simulation Lattice Boltzmann Models Cellular Automata

(LSS Erlangen, Simon Bogner, Ulrich Rüde, Thomas Pohl, Nils Thürey in collaboration with many more

Technical report: How to implement your DdQq dynamics with only q variables per node (instead of 2q)

2.7 Cloth Animation. Jacobs University Visualization and Computer Graphics Lab : Advanced Graphics - Chapter 2 123

The Lattice Boltzmann Method used for fluid flow modeling in hydraulic components

Continuum-Microscopic Models

Sailfish: Lattice Boltzmann Fluid Simulations with GPUs and Python

LATTICE-BOLTZMANN AND COMPUTATIONAL FLUID DYNAMICS

1. Mathematical Modelling

High Scalability of Lattice Boltzmann Simulations with Turbulence Models using Heterogeneous Clusters

A Particle Cellular Automata Model for Fluid Simulations

Lattice Boltzmann with CUDA

High Performance Computing

Simulation of Liquid-Gas-Solid Flows with the Lattice Boltzmann Method

Computational Fluid Dynamics with the Lattice Boltzmann Method KTH SCI, Stockholm

Pore Scale modeling (cont d)

Phys 113 Final Project

Lecture 1.1 Introduction to Fluid Dynamics

Express Introductory Training in ANSYS Fluent Workshop 04 Fluid Flow Around the NACA0012 Airfoil

Realistic Animation of Fluids

Steady Flow: Lid-Driven Cavity Flow

CGT 581 G Fluids. Overview. Some terms. Some terms

Development of Hybrid Fluid Jet / Float Polishing Process

Facilitator Guide: Programme X x time

Navier-Stokes & Flow Simulation

Introduction to ANSYS CFX

SPC 307 Aerodynamics. Lecture 1. February 10, 2018

Navier-Stokes & Flow Simulation


Interaction of Fluid Simulation Based on PhysX Physics Engine. Huibai Wang, Jianfei Wan, Fengquan Zhang

Introduction to CFX. Workshop 2. Transonic Flow Over a NACA 0012 Airfoil. WS2-1. ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

CPM Specifications Document Healthy Vertebral:

Simulating von Kármán Vortex Streets with Lattice Gas Automata

CHAPTER 3. Elementary Fluid Dynamics

Driven Cavity Example

Using the Discrete Ordinates Radiation Model

Dynamic Mode Decomposition analysis of flow fields from CFD Simulations

Preliminary Spray Cooling Simulations Using a Full-Cone Water Spray

GPU-based Distributed Behavior Models with CUDA

Realistic Animation of Fluids

ANSYS AIM Tutorial Turbulent Flow Over a Backward Facing Step

CELLULAR AUTOMATA IN MATHEMATICAL MODELING JOSH KANTOR. 1. History

Parallel Direct Simulation Monte Carlo Computation Using CUDA on GPUs

Parallel lattice fluid simulations for transport phenomena in porous media

Large Scale Parallel Lattice Boltzmann Model of Dendritic Growth

Tutorial: Modeling Liquid Reactions in CIJR Using the Eulerian PDF transport (DQMOM-IEM) Model

Simulation of moving Particles in 3D with the Lattice Boltzmann Method

Funded by the European Union INRIA. AEROGUST Workshop 27 th - 28 th April 2017, University of Liverpool. Presented by Andrea Ferrero and Angelo Iollo

CS 231. Fluid simulation

Fluid Simulation. [Thürey 10] [Pfaff 10] [Chentanez 11]

Isogeometric Analysis of Fluid-Structure Interaction

Real-time Thermal Flow Predictions for Data Centers

Aeroacoustic computations with a new CFD solver based on the Lattice Boltzmann Method

simulation framework for piecewise regular grids

Domain Decomposition for Colloid Clusters. Pedro Fernando Gómez Fernández

Modeling Evaporating Liquid Spray

Optimization of Flow Diverter Treatment for a Patient-specific Giant Aneurysm Using STAR-CCM+ László Daróczy, Philipp Berg, Gábor Janiga

Performance Analysis of the Lattice Boltzmann Method on x86-64 Architectures

STAR-CCM+: Wind loading on buildings SPRING 2018

Use of HPC to Predict Porous Media Properties and Flow in Hydrocarbon Reservoirs

International Supercomputing Conference 2009

Introducing a Cache-Oblivious Blocking Approach for the Lattice Boltzmann Method

Navier-Stokes & Flow Simulation

Using a Single Rotating Reference Frame

AIR LOAD CALCULATION FOR ISTANBUL TECHNICAL UNIVERSITY (ITU), LIGHT COMMERCIAL HELICOPTER (LCH) DESIGN ABSTRACT

FLUID SIMULATION. Kristofer Schlachter

Cloud-based simulation of plasma sources for surface treatment

IMPROVED WALL BOUNDARY CONDITIONS WITH IMPLICITLY DEFINED WALLS FOR PARTICLE BASED FLUID SIMULATION

Data Reduction in CrysAlis Pro

Computation of Velocity, Pressure and Temperature Distributions near a Stagnation Point in Planar Laminar Viscous Incompressible Flow

Lattice Boltzmann Method for Simulating Turbulent Flows

FLUID MECHANICS TESTS

Software and Performance Engineering for numerical codes on GPU clusters

Non-Newtonian Transitional Flow in an Eccentric Annulus

Optimizing Bio-Inspired Flow Channel Design on Bipolar Plates of PEM Fuel Cells

Centre for Mathematical Sciences, Mathematics, LTH, December 2015

Visualization. Images are used to aid in understanding of data. Height Fields and Contours Scalar Fields Volume Rendering Vector Fields [chapter 26]

Free Surface Lattice-Boltzmann fluid simulations. with and without level sets.

Faculty of Mechanical and Manufacturing Engineering, University Tun Hussein Onn Malaysia (UTHM), Parit Raja, Batu Pahat, Johor, Malaysia

Technology Guide. For the Spring 2018 Virtual Learning Session. 1 P a g e

Isotropic Porous Media Tutorial

INNOVATIVE CFD FOR SUPER-COMPUTER RESULTS ON YOUR DESKTOP

Supersonic Flow Over a Wedge

in:flux - Intelligent CFD Software

Citation for the original published paper (version of record):

PHYSICALLY BASED ANIMATION

Solution Recording and Playback: Vortex Shedding

Modeling Evaporating Liquid Spray

Modeling External Compressible Flow

FLUENT Secondary flow in a teacup Author: John M. Cimbala, Penn State University Latest revision: 26 January 2016

Free Surface Flows with Moving and Deforming Objects for LBM

Exploring the Epiphany manycore architecture for the Lattice Boltzmann algorithm. Volvo Penta, Göteborg and IDE Department, Högskolan i Halmstad

Curatr: a web application for creating, curating, and sharing a mass spectral library

OpenLB User Guide Associated to Release 0.8 of the Code

A Peta-scale LES (Large-Eddy Simulation) for Turbulent Flows Based on Lattice Boltzmann Method

Solved with COMSOL Multiphysics 4.2

The viscous forces on the cylinder are proportional to the gradient of the velocity field at the

Performance Analysis of a Parallel Implementation of the Lattice Boltzmann Method for Computational Fluid Dynamics

Finite Volume Discretization on Irregular Voronoi Grids

Transcription:

Webinar series A Centre of Excellence in Computational Biomedicine Webinar #3 Lattice Boltzmann method for CompBioMed (incl. Palabos) 19 March 2018 The webinar will start at 12pm CET / 11am GMT Dr Jonas Latt (Head of Research, University of Geneva) This project has received funding from the European Union s Horizon 2020 research and innovation programme under grant agreement No 675451 The series is run in collaboration with:

Webinar series A Centre of Excellence in Computational Biomedicine Webinar #3 Lattice Boltzmann method for CompBioMed (incl. Palabos) 19 March 2018 Welcome! Dr Jonas Latt (Head of Research, University of Geneva) This project has received funding from the European Union s Horizon 2020 research and innovation programme under grant agreement No 675451 The series is run in collaboration with:

Today s topics The role of Computational Fluid Dynamics in biomedical modelling. Presentation of the Lattice Boltzmann Method. Two application examples of our tool Palabos in Computational biomedicine.

Example: treatment of aneurysms Aneurysm Image by Lucien Monfils Angiography of an aneurysm in a brain artery.

Flow Diverters Aneurysm Stent Goals: Elucidate the mechanisms leading to thrombus formation. Create tools for patient-specific predictions of aneurysm treatments.

Insights from computer simulations Simulations show aneurysm Wall-Shear-Rate (WSR) deciding factor for thrombus formation. J NeuroIntervent. Surg. 2015, 011737 Threshold: 30 s -1

Patient-specific aneurysm treatment

Computational Biomedicine: Elements 1. Medical knowledge

Computational Biomedicine: Elements 2. Expertise in (molecular) biology 1. Medical Knowledge Anchoring of bovine prothrombin to the membrane Image by Andrei Lomize

Computational Biomedicine: Elements 3. Numerical Modeling 1. Medical Knowledge 2. Expertise in (molecular) biology

Computational Biomedicine: Elements 4. Computer Programming 1. Medical Knowledge 2. Expertise in (molecular) biology 3. Numerical Modeling

Computational Biomedicine: Elements 5. High Performance Computing Piz Daint Supercomputer, CSCS (Switzerland) 1. Medical Knowledge 2. Expertise in (molecular) biology 3. Numerical Modeling 4. Computer Programming

Computational Biomedicine: Elements 1. Medical Knowledge 2. Expertise in (molecular) biology 3. Numerical Modeling 4. Computer Programming 5. High Performance Computing

Today s topic: Computational Fluid Dynamics Computer solution to fluid flow equations (so-called Navier- Stokes equations). Examples of fluids: The blood or blood plasma in an artery. The air in the lungs. The Cerebrospinal fluid. Fluids used by doctors in medical interventions.

Today s method: Lattice Boltzmann Method Modern approach to Computational Fluid Dynamics. Particularly useful for complex, coupled physical systems (e.g. representation of Red Blood Cells in the blood plasma). Adjusts in a simple manner to the requirements of high performance computers.

Technical part of the Webinar: Intro to Lattice Boltzmann Method Technical, precise introduction with reference to actual code. A simple, illustrative program in the Python language is provided alongside with this Webinar. No previous knowledge required!

Background: Lattice Gas Automata HPP: A model from the 1980ies. Goal: represent a gas by modeling individual, yet highly simplified gas molecules. Space is discretized: represented by individual cells. Boolean model: each cell has between 0 and 4 «molecules», traveling in 1 one the main directions.

Lattice Gas Automata: Model When several particles meet on a node, they collide: all physics takes place here. After collision, particles are streamed to a nearest neighbor. Collision Streaming Our color scheme: Green: pre-collision Red: post-collision

Webinar series A Centre of Excellence in Computational Biomedicine Poll time! Please respond to the poll that will appear on the screen

Starting from Cellular Automata, how could simulation speed be improved substantially? Right Answer: By replacing a discrete model by a statistical one.

From discrete to continuum variables In a lattice gas automaton: Run the simulation with discrete variables. At the end, extract macroscopic variables by taking averages.

Lattice Boltzmann Method: Idea Run simulation with continuum variables right away, to save space. Continuum model is derived from discrete method by means of statistics. Particle density: real-valued. Arrow thickness stands for particle density.

Lattice Boltzmann Method: details Lattice Boltzmann 2D model D2Q9: Four directions aren t quite enough. Nine directions: eight connections to nearest neighbors + «rest population». Variables representing particle densities are called «populations».

Lattice Boltzmann Variables 8"# 7"# 6"# 5"# 4"# 3"# 2"# 1"# Space Discretization: Every cell represents flow variables at a point in space. To represent space with 8x8 points, we need a total of 8x8x9 = 576 floating point variables. Equal distance "# between cells in x- and y-direction. Python code to allocate memory: 1"# 2"# 3"# 4"# 5"# 6"# 7"# 8"# f = zeros(9, 8, 8)

Collision step Like lattice gas: maps pre-collision to post-collision populations. All populations are modified during collision. Changes are not visible on video, because they are small perturbations. Our color scheme: Green: pre-collision Red: post-collision

Collision step Model: Collision is instantaneous. Collision is localized at cell coordinates. Our color scheme: Green: pre-collision Red: post-collision

Streaming step Model: Streaming takes the system from time! to time! + #!. Streaming includes nearestneighbor access. Our color scheme: Green: pre-collision Red: post-collision

Pre- and post-collision: variables In our Python code, we save incoming and outgoing populations in separate matrices. Python code: # assign some size nx, ny = fin = zeros(9, nx, ny) fout = zeros(9, nx, ny)

Density Each cell has its own density, which is the sum of the nine populations. Equation Python Code rho = sum(fin, axis=0)

Pressure Pressure is proportional to density, like in an ideal gas: Blood is not a gas, it is incompressible: Density is constant. We still solve for a quantity we call density, just as a trick to compute the pressure cheaply.

Velocity Let s introduce a set of 9 vectors:! (! )! *! %! &! '! "! #! $! " = (1,1),! # = (1, 0),! $ = (1, 1),! & = (0, 0), Python code: Velocity is a weighted sum of the populations: u = zeros((2, nx, ny)) for i in range(9): u[0,:,:] += v[i,0] * fin[i,:,:] u[1,:,:] += v[i,1] * fin[i,:,:] u /= rho

Collision: BGK model Collision is a relaxation to local equilibrium: E: local equilibrium. Depends on the macroscopic variables and has a different value for every direction i.!: frequency of relaxation, relates to the fluid viscosity.

Collision: Python code Collision formula: Python program: fout = fin - omega * (fin - eq)

Streaming step Time! Time! + #! Streaming takes the system to the next time iteration,! + #! Post-collision Pre-collision

Streaming step: code Python code: for i in range(9): fin[i,:,:] = roll( roll(fout[i,:,:], v[i,0], axis=0), v[i,1], axis=1 )

The Palabos software Developed at University of Geneva. Our tool for biomedial fluid dynamics: all examples today run by Palabos. Open-Source: www.palabos.org

Another simulation example Vertebroplasty: Treatment of compression fractures in a vertebra. Image: Blausen.com staff

Micro-CT: porous bone structure

Computer simulation

Experiment vs. Simulation: Case 1 After 3 milliliters Experiment Simulation

Can we do «real time»?

Webinar series A Centre of Excellence in Computational Biomedicine Poll time! Please respond to the poll that will appear on the screen

Which trick made this simulation substantially faster? Right Answer: Allocate only areas filled by cement, dynamically

A better idea: sparse memory

A better idea: sparse memory

Sparse-Mem 3-4 times faster

Many thanks to The UniGe CompBioMed Team Prof. Bastien Chopard Sha Li Francesco Marson Christos Kotsalos The FlowKit Ltd team Dimitrios Kontaxakis Orestis Malaspinas Andrea Di Blasio Annick Baur

Further Resources Palabos Web Page: www.palabos.org A more thorough course: https://www.coursera.org/learn/modeling-simulationnatural-processes

Webinar series A Centre of Excellence in Computational Biomedicine Q&A To pose a question, you can: 1. if you have a microphone, raise your hand and we will unmute you, when it is your turn to speak or 2. write your question in the Questions tab

Webinar series A Centre of Excellence in Computational Biomedicine Thank you for participating! Visit the CompBioMed website (www.compbiomed.eu/training-3) for a full recording of this and other webinars, to download the slides and to keep updated on our upcoming trainings This project has received funding from the European Union s Horizon 2020 research and innovation programme under grant agreement No 675451 The series is run in collaboration with: