A concise python implementation of the lattice Boltzmann method on HPC for geo-fluid flow

Peter Mora, Gabriele Morra, David A. Yuen

Research output: Contribution to journalArticlepeer-review

11 Scopus citations

Abstract

The lattice Boltzmann method (LBM) is a method to simulate fluid dynamics based on modelling distributions of particles moving and colliding on a lattice. The Python scripting language provides a clean programming paradigm to develop codes based on the LBM, however in order to reach performance comparable to compiled languages, it needs to be carefully implemented, maximizing its vectorized tools, mostly integrated in the NumPy module. We present here the details of a Python implementation of a concise LBM code, with the purpose of offering a pedagogical tool for students and professionals in the geosciences who are approaching this technique for the first time. The first half of the paper focuses on how to vectorize a 2-D LBM code and show how if carefully done, this allows performance close to a compiled code. In the second part of the paper, we use the vectorization described earlier to naturally write a parallel implementation using MPI and test both weak and hard scaling up to 1280 cores. One benchmark, Poiseuille flow and two applications, one on sound wave propagation and another on fluid-flow through a simplified model of a rock matrix are finally shown.

Original languageEnglish
Pages (from-to)682-702
Number of pages21
JournalGeophysical Journal International
Volume220
Issue number1
DOIs
StatePublished - 1 Jan 2020

Bibliographical note

Publisher Copyright:
© The Author(s) 2019. Published by Oxford University Press on behalf of The Royal Astronomical Society.

Keywords

  • Geomechanics
  • Non-linear differential equations
  • Numerical approximations and analysis
  • Numerical modelling
  • Permeability and porosity
  • Wave propagation

ASJC Scopus subject areas

  • Geophysics
  • Geochemistry and Petrology

Fingerprint

Dive into the research topics of 'A concise python implementation of the lattice Boltzmann method on HPC for geo-fluid flow'. Together they form a unique fingerprint.

Cite this