Package: pylabolt
PyLaBolt is a single phase, 2D, parallel lattice Boltzmann solver for fluid flow. It usesNumbaacceleratedPythoncode
to run lattice Boltzmann simulations on 2D lattices. Simulations can be run on CPU in parallel via
Numba’s ownOpenMPparallelization and thempi4pylibrary.
For running on NVIDIA GPUs, PyLaBolt uses Numba’sCUDAbindings.Installation and UsagePyLaBolt can be installed viapipvia the command:$ pip install pylaboltMore details on the dependencies and their configuration can be found
in the PyLaBolt documentationhere.Tutorial cases are provided in thetutorialsfolder. For example, consider the lid driven cavity
problem intutorials/cavity/Re_100/. The configuration file that defines the simulation is
calledsimulation.py. After installation just run the following command from thetutorials/cavity/Re_100/folder:$ pylabolt --solver fluidLBThe output data is written in theoutputfolder. By default the data is written into binary files with.datextension. To visualize the data inParaview/Mayavi, theVTKlibrary is used.
For example, to convert the last time-step data to a.vtkfile, run the following command from
the working directory:$ pylabolt --toVTK lastTheoutput_<time-step>.vtkfiles are stored inoutput/VTKdirectory which can be opened in
Paraview/Mayavi. Sample results for lid driven cavity, plane Poiseuille flow, and flow past a cylinder are shown below.More details on setting up and running simulations can be found in thedocumentation.FeaturesPyLaBolt currently supports the following collision schemesBhatnagar-Gross-Krook (BGK) scheme -Physical Review, vol. 94, Issue 3, pp. 511-525Multiple Relaxation Time (MRT) scheme -Multiple relaxation time lattice Boltzmann models in three dimensionsIt also supports theGuo’s forcing scheme <https://doi.org/10.1103/PhysRevE.65.046308>_for force-driven
flows.The boundary conditions available areNo slip boundary via the halfway bounce back method -Journal of Fluid Mechanics , Volume 271 , 25 July 1994
, pp. 285 - 309Moving wall boundary condition via the halfway bounce back method -Journal of Fluid Mechanics , Volume 271 , 25 July 1994
, pp. 285 - 309,Journal of Statistical Physics volume 104, pages 1191–1251 (2001)The fixed pressure boundary condition via the anti-bounce back method -Commun. Comput. Phys. 3, 427 (2008)Zero gradient boundary conditionPeriodic boundary condition -The Lattice Boltzmann MethodFor more information on the schemes and boundary conditions, we urge the reader the go through the following booksThe Lattice Boltzmann Method - Timm Krüger, Halim Kusumaatmaja, Alexandr Kuzmin, Orest Shardt, Goncalo Silva, Erlend Magnus ViggenThe Lattice Boltzmann Equation: For Complex States of Flowing Matter - Sauro SucciPyLaBolt leverages the performance advantages on multi-core CPUs, High Perfomance computing clusters, and
GPUs to run large simulations. Currently the parallel computing features supported by PyLaBolt are:NumbaacceleratedPythoncode can
run in parallel on multi-core CPUs throughOpenMP.To run on multiple machines/clusters, PyLaBolt usesOpenMPIvia thempi4pylibrary.PyLaBolt can also run simulations on NVIDIA GPUs through Numba’sCUDAbindings.PyLaBolt provides support to convert output toVTKformat, which can post-processed in Paraview/Mayavi.For more details, refer to thedocumentation.AcknowledgementsPyLaBolt grew from the course project of AE6102 course, of theDepartment of Aerospace Engineeringat Indian Institute of Technology, Bombay. We are grateful toProf. Prabhu Ramachandranof Department of Aerospace Engineering at Indian Institute of Technology, Bombay for exposing us to the necessary skills to write
high performance scientific codes.We are also grateful toDr. Amol SubhedaratDepartment of Chemical Engineering, Indian Institute of Technology, Bombay for providing
us critical suggestions on the theoretical foundations of the algorithms.For contributors see theGithub contributors page.