Skip to main content

Code Generation for Lattice Boltzmann Methods

Project description

lbmpy

Binder Docs pipeline status coverage report

Run fast fluid simulations based on the lattice Boltzmann method in Python on CPUs and GPUs. lbmpy creates highly optimized LB compute kernels in C or CUDA, for a wide variety of different collision operators, including MRT, entropic, and cumulant schemes.

All collision operators can be easily adapted, for example, to integrate turbulence models, custom force terms, or multi-phase models. It even comes with an integrated Chapman Enskog analysis based on sympy!

Common test scenarios can be set up quickly:

ch = create_channel(domain_size=(300,100, 100), force=1e-7, method="trt",
                    equilibrium_order=2, compressible=True,
                    relaxation_rates=[1.97, 1.6], optimization={'target': 'gpu'})

To find out more, check out the interactive tutorial notebooks online with binder.

Installation

For local installation use pip:

pip install lbmpy[interactive]

Without [interactive] you get a minimal version with very little dependencies.

All options:

  • gpu: use this if nVidia GPU is available and CUDA is installed
  • alltrafos: pulls in additional dependencies for loop simplification e.g. libisl
  • interactive: installs dependencies to work in Jupyter including image I/O, plotting etc.

Options can be combined e.g.

pip install lbmpy[interactive,gpu,doc]

Documentation

Read the docs here and check out the Jupyter notebooks in doc/notebooks.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lbmpy-0.2.11.tar.gz (136.5 kB view details)

Uploaded Source

File details

Details for the file lbmpy-0.2.11.tar.gz.

File metadata

  • Download URL: lbmpy-0.2.11.tar.gz
  • Upload date:
  • Size: 136.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0.post20200106 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.6.9

File hashes

Hashes for lbmpy-0.2.11.tar.gz
Algorithm Hash digest
SHA256 dc796a684ec9dcd7dae5cd9ec42af0fea30b4ae9106e645b17dc88f064354322
MD5 a6326b8f0820a2005e65f34bfaca614c
BLAKE2b-256 d27305fd9d9a1546408dd1d7d12cc72f40d0d84a610344c3b89c9c393c97dfa7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page