---------
PyLaBolt
---------
|Documentation status|
PyLaBolt is a single phase, 2D, parallel lattice Boltzmann solver for fluid flow. It uses
`Numba <https://numba.readthedocs.io/en/stable/>`_ accelerated `Python <https://www.python.org/>`_ code
to run lattice Boltzmann simulations on 2D lattices. Simulations can be run on CPU in parallel via
Numba's own `OpenMP <https://www.openmp.org/>`_ parallelization and the `mpi4py <https://mpi4py.readthedocs.io/en/stable/>`_ library.
For running on NVIDIA GPUs, PyLaBolt uses Numba's `CUDA <https://developer.nvidia.com/cuda-toolkit>`_ bindings.
.. |Documentation status| image:: https://readthedocs.org/projects/pylabolt/badge/?version=latest
:target: https://PyLaBolt.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status
=======================
Installation and Usage
=======================
PyLaBolt can be installed via ``pip`` via the command::
$ pip install pylabolt
More details on the dependencies and their configuration can be found
in the PyLaBolt documentation `here <https://PyLaBolt.readthedocs.io/en/latest/>`_.
Tutorial cases are provided in the ``tutorials`` folder. For example, consider the lid driven cavity
problem in ``tutorials/cavity/Re_100/``. The configuration file that defines the simulation is
called ``simulation.py``. After installation just run the following command from the ``tutorials/cavity/Re_100/``
folder::
$ pylabolt --solver fluidLB
The output data is written in the ``output`` folder. By default the data is written into binary files with
``.dat`` extension. To visualize the data in `Paraview <https://www.paraview.org/>`_ /
`Mayavi <https://docs.enthought.com/mayavi/mayavi/>`_, the `VTK <https://vtk.org/>`_ library is used.
For example, to convert the last time-step data to a ``.vtk`` file, run the following command from
the working directory::
$ pylabolt --toVTK last
The ``output_<time-step>.vtk`` files are stored in ``output/VTK`` directory which can be opened in
Paraview/Mayavi. Sample results for lid driven cavity, plane Poiseuille flow, and flow past a cylinder are shown below.
.. figure:: https://github.com/Malyadeep/pylabolt/blob/main/tutorials/cavity/cavity_Vcontour.png
:width: 550px
:alt: `lid driven cavity (Re = 100) <https://github.com/Malyadeep/pylabolt/blob/main/tutorials/cavity/cavity_Vcontour.png>_`
.. figure:: https://github.com/Malyadeep/pylabolt/blob/main/tutorials/poiseuille_flow/gravity_driven/U_contour.png
:width: 550px
:alt: `Gravity driven plane Poiseuille flow (Re = 100) <https://github.com/Malyadeep/pylabolt/blob/main/tutorials/poiseuille_flow/gravity_driven/U_contour.png>_`
.. figure:: https://github.com/Malyadeep/pylabolt/blob/main/tutorials/flow_past_cylinder/flowpastcylinder_Vcontour.png
:width: 550px
:alt: `Flow past a cylinder (Re = 100) <https://github.com/Malyadeep/pylabolt/blob/main/tutorials/flow_past_cylinder/flowpastcylinder_Vcontour.png>_`
More details on setting up and running simulations can be found in the `documentation <https://PyLaBolt.readthedocs.io/en/latest/>`_.
=======================
Features
=======================
PyLaBolt currently supports the following collision schemes
- Bhatnagar-Gross-Krook (BGK) scheme - `Physical Review, vol. 94, Issue 3, pp. 511-525
<https://ui.adsabs.harvard.edu/link_gateway/1954PhRv...94..511B/doi:10.1103/PhysRev.94.511>`_
- Multiple Relaxation Time (MRT) scheme - `Multiple relaxation time lattice Boltzmann models in three dimensions
<https://doi.org/10.1098/rsta.2001.0955>`_
It also supports the `Guo's forcing scheme <https://doi.org/10.1103/PhysRevE.65.046308>_` for force-driven
flows.
The boundary conditions available are
- No slip boundary via the halfway bounce back method - `Journal of Fluid Mechanics , Volume 271 , 25 July 1994
, pp. 285 - 309 <https://doi.org/10.1017/S0022112094001771>`_
- Moving wall boundary condition via the halfway bounce back method - `Journal of Fluid Mechanics , Volume 271 , 25 July 1994
, pp. 285 - 309 <https://doi.org/10.1017/S0022112094001771>`_ ,
`Journal of Statistical Physics volume 104, pages 1191–1251 (2001)
<https://doi.org/10.1023/A:1010414013942>`_
- The fixed pressure boundary condition via the anti-bounce back method - `Commun. Comput. Phys. 3, 427 (2008)
<https://www.researchgate.net/publication/281975403_Study_of_Simple_Hydrodynamic_Solutions_with_the_Two-Relaxation-Times_Lattice_Boltzmann_Scheme>`_
- Zero gradient boundary condition
- Periodic boundary condition - `The Lattice Boltzmann Method <https://doi.org/10.1007/978-3-319-44649-3>`_
For more information on the schemes and boundary conditions, we urge the reader the go through the following books
- `The Lattice Boltzmann Method - Timm Krüger, Halim Kusumaatmaja, Alexandr Kuzmin, Orest Shardt, Goncalo Silva, Erlend Magnus Viggen
<https://doi.org/10.1007/978-3-319-44649-3>`_
- `The Lattice Boltzmann Equation: For Complex States of Flowing Matter - Sauro Succi
<https://global.oup.com/academic/product/the-lattice-boltzmann-equation-9780199592357?cc=us&lang=en&>`_
PyLaBolt 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:
- `Numba <https://numba.readthedocs.io/en/stable/>`_ accelerated `Python <https://www.python.org/>`_ code can
run in parallel on multi-core CPUs through `OpenMP <https://www.openmp.org/>`_.
- To run on multiple machines/clusters, PyLaBolt uses `OpenMPI <https://www.open-mpi.org/>`_ via the `mpi4py <https://mpi4py.readthedocs.io/en/stable/>`_
library.
- PyLaBolt can also run simulations on NVIDIA GPUs through Numba's `CUDA <https://developer.nvidia.com/cuda-toolkit>`_ bindings.
- PyLaBolt provides support to convert output to `VTK <https://vtk.org/>`_ format, which can post-processed in Paraview/Mayavi.
For more details, refer to the `documentation <https://PyLaBolt.readthedocs.io/en/latest/>`_.
=======================
Acknowledgements
=======================
PyLaBolt grew from the course project of AE6102 course, of the `Department of Aerospace Engineering <https://www.aero.iitb.ac.in/home/>`_
at Indian Institute of Technology, Bombay. We are grateful to `Prof. Prabhu Ramachandran <https://www.aero.iitb.ac.in/~prabhu/>`_
of 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 to `Dr. Amol Subhedar <https://www.che.iitb.ac.in/faculty/amol-subhedar>`_ at
`Department of Chemical Engineering <https://www.che.iitb.ac.in/>`_, Indian Institute of Technology, Bombay for providing
us critical suggestions on the theoretical foundations of the algorithms.
For contributors see the `Github contributors page <https://github.com/Malyadeep/pylabolt/graphs/contributors>`_.
Raw data
{
"_id": null,
"home_page": "https://github.com/Malyadeep/pylabolt/tree/stable",
"name": "pylabolt",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "lattice Boltzmann,fluid flow,CFD",
"author": "Malyadeep Bhattacharya, Mithun M Nair",
"author_email": "malyadeep1999@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/d4/94/fc897f2026f39b93818d6fcc081135129aaf1398dabfb324ced7eb14b108/pylabolt-0.2.0.tar.gz",
"platform": null,
"description": "---------\nPyLaBolt\n---------\n|Documentation status|\n\nPyLaBolt is a single phase, 2D, parallel lattice Boltzmann solver for fluid flow. It uses \n`Numba <https://numba.readthedocs.io/en/stable/>`_ accelerated `Python <https://www.python.org/>`_ code\nto run lattice Boltzmann simulations on 2D lattices. Simulations can be run on CPU in parallel via \nNumba's own `OpenMP <https://www.openmp.org/>`_ parallelization and the `mpi4py <https://mpi4py.readthedocs.io/en/stable/>`_ library.\nFor running on NVIDIA GPUs, PyLaBolt uses Numba's `CUDA <https://developer.nvidia.com/cuda-toolkit>`_ bindings.\n\n\n.. |Documentation status| image:: https://readthedocs.org/projects/pylabolt/badge/?version=latest\n :target: https://PyLaBolt.readthedocs.io/en/latest/?badge=latest\n :alt: Documentation Status\n\n=======================\nInstallation and Usage\n=======================\nPyLaBolt can be installed via ``pip`` via the command::\n\n $ pip install pylabolt\n\nMore details on the dependencies and their configuration can be found\nin the PyLaBolt documentation `here <https://PyLaBolt.readthedocs.io/en/latest/>`_.\n\nTutorial cases are provided in the ``tutorials`` folder. For example, consider the lid driven cavity\nproblem in ``tutorials/cavity/Re_100/``. The configuration file that defines the simulation is \ncalled ``simulation.py``. After installation just run the following command from the ``tutorials/cavity/Re_100/``\nfolder::\n\n $ pylabolt --solver fluidLB\n\nThe output data is written in the ``output`` folder. By default the data is written into binary files with \n``.dat`` extension. To visualize the data in `Paraview <https://www.paraview.org/>`_ / \n`Mayavi <https://docs.enthought.com/mayavi/mayavi/>`_, the `VTK <https://vtk.org/>`_ library is used.\nFor example, to convert the last time-step data to a ``.vtk`` file, run the following command from\nthe working directory::\n\n $ pylabolt --toVTK last\n\nThe ``output_<time-step>.vtk`` files are stored in ``output/VTK`` directory which can be opened in\nParaview/Mayavi. Sample results for lid driven cavity, plane Poiseuille flow, and flow past a cylinder are shown below.\n\n.. figure:: https://github.com/Malyadeep/pylabolt/blob/main/tutorials/cavity/cavity_Vcontour.png\n :width: 550px\n :alt: `lid driven cavity (Re = 100) <https://github.com/Malyadeep/pylabolt/blob/main/tutorials/cavity/cavity_Vcontour.png>_`\n\n.. figure:: https://github.com/Malyadeep/pylabolt/blob/main/tutorials/poiseuille_flow/gravity_driven/U_contour.png\n :width: 550px\n :alt: `Gravity driven plane Poiseuille flow (Re = 100) <https://github.com/Malyadeep/pylabolt/blob/main/tutorials/poiseuille_flow/gravity_driven/U_contour.png>_`\n\n.. figure:: https://github.com/Malyadeep/pylabolt/blob/main/tutorials/flow_past_cylinder/flowpastcylinder_Vcontour.png\n :width: 550px\n :alt: `Flow past a cylinder (Re = 100) <https://github.com/Malyadeep/pylabolt/blob/main/tutorials/flow_past_cylinder/flowpastcylinder_Vcontour.png>_`\n\nMore details on setting up and running simulations can be found in the `documentation <https://PyLaBolt.readthedocs.io/en/latest/>`_.\n\n\n=======================\nFeatures\n=======================\nPyLaBolt currently supports the following collision schemes\n\n- Bhatnagar-Gross-Krook (BGK) scheme - `Physical Review, vol. 94, Issue 3, pp. 511-525 \n <https://ui.adsabs.harvard.edu/link_gateway/1954PhRv...94..511B/doi:10.1103/PhysRev.94.511>`_\n- Multiple Relaxation Time (MRT) scheme - `Multiple relaxation time lattice Boltzmann models in three dimensions \n <https://doi.org/10.1098/rsta.2001.0955>`_\n\nIt also supports the `Guo's forcing scheme <https://doi.org/10.1103/PhysRevE.65.046308>_` for force-driven \nflows.\n\nThe boundary conditions available are\n\n- No slip boundary via the halfway bounce back method - `Journal of Fluid Mechanics , Volume 271 , 25 July 1994 \n , pp. 285 - 309 <https://doi.org/10.1017/S0022112094001771>`_\n- Moving wall boundary condition via the halfway bounce back method - `Journal of Fluid Mechanics , Volume 271 , 25 July 1994 \n , pp. 285 - 309 <https://doi.org/10.1017/S0022112094001771>`_ , \n `Journal of Statistical Physics volume 104, pages 1191\u20131251 (2001)\n <https://doi.org/10.1023/A:1010414013942>`_ \n- The fixed pressure boundary condition via the anti-bounce back method - `Commun. Comput. Phys. 3, 427 (2008) \n <https://www.researchgate.net/publication/281975403_Study_of_Simple_Hydrodynamic_Solutions_with_the_Two-Relaxation-Times_Lattice_Boltzmann_Scheme>`_\n- Zero gradient boundary condition\n- Periodic boundary condition - `The Lattice Boltzmann Method <https://doi.org/10.1007/978-3-319-44649-3>`_\n\nFor more information on the schemes and boundary conditions, we urge the reader the go through the following books\n\n- `The Lattice Boltzmann Method - Timm Kr\u00fcger, Halim Kusumaatmaja, Alexandr Kuzmin, Orest Shardt, Goncalo Silva, Erlend Magnus Viggen\n <https://doi.org/10.1007/978-3-319-44649-3>`_\n- `The Lattice Boltzmann Equation: For Complex States of Flowing Matter - Sauro Succi \n <https://global.oup.com/academic/product/the-lattice-boltzmann-equation-9780199592357?cc=us&lang=en&>`_\n\nPyLaBolt leverages the performance advantages on multi-core CPUs, High Perfomance computing clusters, and\nGPUs to run large simulations. Currently the parallel computing features supported by PyLaBolt are:\n\n- `Numba <https://numba.readthedocs.io/en/stable/>`_ accelerated `Python <https://www.python.org/>`_ code can\n run in parallel on multi-core CPUs through `OpenMP <https://www.openmp.org/>`_.\n- To run on multiple machines/clusters, PyLaBolt uses `OpenMPI <https://www.open-mpi.org/>`_ via the `mpi4py <https://mpi4py.readthedocs.io/en/stable/>`_\n library.\n- PyLaBolt can also run simulations on NVIDIA GPUs through Numba's `CUDA <https://developer.nvidia.com/cuda-toolkit>`_ bindings.\n- PyLaBolt provides support to convert output to `VTK <https://vtk.org/>`_ format, which can post-processed in Paraview/Mayavi.\n\nFor more details, refer to the `documentation <https://PyLaBolt.readthedocs.io/en/latest/>`_.\n\n=======================\nAcknowledgements\n=======================\nPyLaBolt grew from the course project of AE6102 course, of the `Department of Aerospace Engineering <https://www.aero.iitb.ac.in/home/>`_ \nat Indian Institute of Technology, Bombay. We are grateful to `Prof. Prabhu Ramachandran <https://www.aero.iitb.ac.in/~prabhu/>`_ \nof Department of Aerospace Engineering at Indian Institute of Technology, Bombay for exposing us to the necessary skills to write\nhigh performance scientific codes.\n\nWe are also grateful to `Dr. Amol Subhedar <https://www.che.iitb.ac.in/faculty/amol-subhedar>`_ at\n`Department of Chemical Engineering <https://www.che.iitb.ac.in/>`_, Indian Institute of Technology, Bombay for providing \nus critical suggestions on the theoretical foundations of the algorithms.\n\nFor contributors see the `Github contributors page <https://github.com/Malyadeep/pylabolt/graphs/contributors>`_.\n",
"bugtrack_url": null,
"license": "GNU GENERAL PUBLIC LICENSE 3.0",
"summary": "A single phase 2D lattice Boltzmann solver",
"version": "0.2.0",
"project_urls": {
"Homepage": "https://github.com/Malyadeep/pylabolt/tree/stable"
},
"split_keywords": [
"lattice boltzmann",
"fluid flow",
"cfd"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "a436d40c6604298f5b7621f424e5cef4bc9d7006a391795fc0851cbb8d0a8f0c",
"md5": "40c7475c943f7299c1ec48df0761f984",
"sha256": "846b6fd46c35975e662dc26461f1341c5dc7068be3aa1a8cdc00d93b32533a69"
},
"downloads": -1,
"filename": "pylabolt-0.2.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "40c7475c943f7299c1ec48df0761f984",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 61023,
"upload_time": "2023-07-14T12:34:41",
"upload_time_iso_8601": "2023-07-14T12:34:41.500049Z",
"url": "https://files.pythonhosted.org/packages/a4/36/d40c6604298f5b7621f424e5cef4bc9d7006a391795fc0851cbb8d0a8f0c/pylabolt-0.2.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "d494fc897f2026f39b93818d6fcc081135129aaf1398dabfb324ced7eb14b108",
"md5": "4c8cbe4ace67733167fb3a2fe4065bf0",
"sha256": "aef59f12154eea63db1d7a3f6f3374b93bd2238e8186c7da38c8272582820bfc"
},
"downloads": -1,
"filename": "pylabolt-0.2.0.tar.gz",
"has_sig": false,
"md5_digest": "4c8cbe4ace67733167fb3a2fe4065bf0",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 52509,
"upload_time": "2023-07-14T12:34:43",
"upload_time_iso_8601": "2023-07-14T12:34:43.282235Z",
"url": "https://files.pythonhosted.org/packages/d4/94/fc897f2026f39b93818d6fcc081135129aaf1398dabfb324ced7eb14b108/pylabolt-0.2.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-07-14 12:34:43",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Malyadeep",
"github_project": "pylabolt",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "pylabolt"
}