/boltzmann

C / C++ Implementations of the d2q9-bgk lattice Boltzmann scheme for OpenMP, MPI and OpenCL

Primary LanguageCGNU General Public License v3.0GPL-3.0

Boltzmann Fluid Simulations for HPC

Introduction

This project contains a number of implementations in C/C++ of a Boltzmann fluid simulation optimised for different environments / platforms in addition to the original serial implementation of the d2q9-bgk lattice Boltzmann scheme.

Each subsequent implementation of the code was arrived at by making changes to the preceeding version, starting with the original serial sub-optimal version, in the order listed in this table:

Executable Name Description
boltzmann-original Original serial version of the code
boltzmann-serial Optimised (still serial) version of the original serial code
boltzmann-openmp Pararelised version of the code using OpenMP
boltzmann-mpi Distributed version of the code using MPI
boltzmann-opencl Graphics Processing Unit version of the code implemented using OpenCL

Building and Running the Code

Each of the projects can be built and run individually using CMake, e.g.

cd boltzmann-mpi
cmake .
make

Please note that unlike the code, which has been run on a number of operating systems and GPU devices, the CMake build files have only been tested on MacOS.

Some of the sub-projects have pre-requisites and specific build instructions wich are described in separate documentation files:

Documentation

This repository also includes a number of short papers describing how the optimisations, paralisation and distribution of the original across a number of nodes was achieved.

  1. Parallelising the Lattice Boltzman scheme
  2. Distributed Lattice Boltzman using MPI
  3. Lattice Boltzman simulation in OpenCL