Abstract

This paper deals with the design and implementation of cross-platform, D2Q9-BGK and D3Q27-MRT, lattice Boltzmann method solver for 2D and 3D flows developed with ArrayFire library for high-performance computing. The solver leverages ArrayFire’s just-in-time compilation engine for compiling high-level code into optimized kernels for both CUDA and OpenCL GPU backends. We also provide C++ and Rust implementations and show that it is possible to produce fast cross-platform lattice Boltzmann method simulations with minimal code, effectively less than 90 lines of code. An illustrative benchmarks (lid-driven cavity and Kármán vortex street) for single and double precision floating-point simulations on 4 different GPUs are provided.

Highlights

  • Implementation of Lattice BoltzmannPopularity of the lattice Boltzmann method (LBM) has steadily grown since its inception from lattice gas automata [1] more than three decades ago

  • The lattice gas automata are a type of cellular automaton used to simulate fluid flows and they were the precursor to the LBM

  • We cover the basic theory behind LBM, followed by a description of the implementation of the solver algorithms on graphics processing unit (GPU), the pros and cons of using the ArrayFire library for the development of parallel programs and how the simulations results can be visualized in real-time with Forge library while the simulation is running

Read more

Summary

Introduction

Implementation of Lattice BoltzmannPopularity of the lattice Boltzmann method (LBM) has steadily grown since its inception from lattice gas automata [1] more than three decades ago. The lattice gas automata are a type of cellular automaton used to simulate fluid flows and they were the precursor to the LBM. From lattice gas automata it is possible to derive the macroscopic Navier–Stokes equations. A disadvantage of the lattice gas automata method is the statistical noise. Another problem is the difficulty in expanding the model to 3D case. As a mesoscopic method, filling the gap between macroscopic Navier–Stokes solvers and microscopic molecular dynamics, it has been an important tool for numerical simulations of multi-component, multiphase flows [3,4,5], flows in porous media [6,7], turbulent flows [8], and lately for more complex flows of fluids, as for instance, Bose–Einstein condensate [9], interaction of (2+1)-dimensional solitons [10], or modeling of viscous quasi-incompressible flows [11]

Methods
Results
Discussion
Conclusion
Full Text
Paper version not known

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.