README.md 2.21 KB
Newer Older
1
2
lbmpy
=====
3

Martin Bauer's avatar
Martin Bauer committed
4
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/mabau/lbmpy/master?filepath=doc%2Fnotebooks)
Markus Holzer's avatar
Markus Holzer committed
5
[![Docs](https://img.shields.io/badge/read-the_docs-brightgreen.svg)](http://pycodegen.pages.i10git.cs.fau.de/lbmpy)
6
[![pipeline status](https://i10git.cs.fau.de/pycodegen/lbmpy/badges/master/pipeline.svg)](https://i10git.cs.fau.de/pycodegen/lbmpy/commits/master)
Markus Holzer's avatar
Markus Holzer committed
7
[![coverage report](https://i10git.cs.fau.de/pycodegen/lbmpy/badges/master/coverage.svg)](http://pycodegen.pages.i10git.cs.fau.de/lbmpy/coverage_report)
8
9


Martin Bauer's avatar
Martin Bauer committed
10
11
12
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.
13

Martin Bauer's avatar
Martin Bauer committed
14
15
16
17
18
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:
```python
Markus Holzer's avatar
Markus Holzer committed
19
from lbmpy.scenarios import create_channel
20

Martin Bauer's avatar
Martin Bauer committed
21
22
23
24
25
26
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](https://mybinder.org/v2/gh/mabau/lbmpy/master?filepath=doc%2Fnotebooks).
27
28
29
30
31


Installation
------------

Martin Bauer's avatar
Martin Bauer committed
32
33
For local installation use pip:

34
35
36
37
38
39
40
41
```bash
pip install lbmpy[interactive]
```


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

All options:
Markus Holzer's avatar
Markus Holzer committed
42
- `gpu`: use this if a NVIDIA GPU is available and CUDA is installed
43
- `opencl`: use this to enable the target `opencl` (execution using OpenCL)
44
45
46
47
48
- `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.
```bash
49
pip install lbmpy[interactive,gpu,doc]
50
51
52
53
54
55
```


Documentation
-------------

Markus Holzer's avatar
Markus Holzer committed
56
Read the docs [here](http://pycodegen.pages.i10git.cs.fau.de/lbmpy) and
Martin Bauer's avatar
Martin Bauer committed
57
check out the Jupyter notebooks in `doc/notebooks`.