Skip to content

Commit cc33309

Browse files
committed
Fixed mkdocs build
1 parent eba8aff commit cc33309

14 files changed

+129
-110
lines changed

.github/workflows/mkdocs.yml

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ name: mkdocs-deployment
22
on:
33
push:
44
branches:
5-
- master
65
- main
76
# paths:
87
# - 'docs/**'

CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
88
## [Unreleased]
99
- _No changes yet_ <!-- Placeholder for future changes -->
1010

11+
### Fixed
12+
- mkdocs is now configured correctly for the new project structure
13+
1114
## [0.2.0] - 2024-10-22
1215

1316
### Added

docs/assets/airfoil.png

-3.98 MB
Binary file not shown.

docs/assets/car.png

-6.35 MB
Binary file not shown.

docs/assets/cavity.gif

-9.26 MB
Binary file not shown.

docs/assets/logo-transparent.png

-105 KB
Binary file not shown.

docs/assets/logo.svg

-12
This file was deleted.

docs/base.md

-1
This file was deleted.

docs/boundary_conditions.md

-18
This file was deleted.

docs/index.md

+124-45
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,139 @@
1+
[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
2+
[![GitHub star chart](https://img.shields.io/github/stars/Autodesk/XLB?style=social)](https://star-history.com/#Autodesk/XLB)
13
<p align="center">
2-
<img src="assets/logo-transparent.png" alt="" width="700">
4+
<img src="https://raw.githubusercontent.com/autodesk/xlb/main/assets/logo-transparent.png" alt="" width="300">
35
</p>
46

5-
# XLB: A Hardware-Accelerated Differentiable Lattice Boltzmann Simulation Framework based on JAX for Physics-based Machine Learning
7+
# XLB: A Differentiable Massively Parallel Lattice Boltzmann Library in Python for Physics-Based Machine Learning
68

7-
XLB (Accelerated LB) is a fully differentiable 2D/3D Lattice Boltzmann Method (LBM) solver that leverages hardware acceleration. It's built on top of the [JAX](https://github.com/google/jax) library and is specifically designed to solve fluid dynamics problems in a computationally efficient and differentiable manner. Its unique combination of features positions it as an exceptionally suitable tool for applications in physics-based machine learning.
9+
🎉 **Exciting News!** 🎉 XLB version 0.2.0 has been released, featuring a complete rewrite of the library and introducing support for the NVIDIA Warp backend!
10+
XLB can now be installed via pip: `pip install xlb`.
11+
12+
XLB is a fully differentiable 2D/3D Lattice Boltzmann Method (LBM) library that leverages hardware acceleration. It supports [JAX](https://github.com/google/jax) and [NVIDIA Warp](https://github.com/NVIDIA/warp) backends, and is specifically designed to solve fluid dynamics problems in a computationally efficient and differentiable manner. Its unique combination of features positions it as an exceptionally suitable tool for applications in physics-based machine learning. With the new Warp backend, XLB now offers state-of-the-art performance for even faster simulations.
13+
14+
## Getting Started
15+
To get started with XLB, you can install it using pip:
16+
```bash
17+
pip install xlb
18+
```
19+
20+
To install the latest development version from source:
21+
22+
```bash
23+
pip install git+https://github.com/Autodesk/XLB.git
24+
```
25+
26+
The changelog for the releases can be found [here](https://github.com/Autodesk/XLB/blob/main/CHANGELOG.md).
27+
28+
For examples to get you started please refer to the [examples](https://github.com/Autodesk/XLB/tree/main/examples) folder.
29+
30+
## Accompanying Paper
31+
32+
Please refer to the [accompanying paper](https://doi.org/10.1016/j.cpc.2024.109187) for benchmarks, validation, and more details about the library.
33+
34+
## Citing XLB
35+
36+
If you use XLB in your research, please cite the following paper:
37+
38+
```
39+
@article{ataei2024xlb,
40+
title={{XLB}: A differentiable massively parallel lattice {Boltzmann} library in {Python}},
41+
author={Ataei, Mohammadmehdi and Salehipour, Hesam},
42+
journal={Computer Physics Communications},
43+
volume={300},
44+
pages={109187},
45+
year={2024},
46+
publisher={Elsevier}
47+
}
48+
```
849

950
## Key Features
10-
- **Integration with JAX Ecosystem:** The solver can be easily integrated with JAX's robust ecosystem of machine learning libraries such as [Flax](https://github.com/google/flax), [Haiku](https://github.com/deepmind/dm-haiku), [Optax](https://github.com/deepmind/optax), and many more.
11-
- **Scalability:** XLB is capable of scaling on distributed multi-GPU systems, enabling the execution of large-scale simulations with billions of voxels.
51+
- **Multiple Backend Support:** XLB now includes support for multiple backends including JAX and NVIDIA Warp, providing *state-of-the-art* performance for lattice Boltzmann simulations. Currently, only single GPU is supported for the Warp backend.
52+
- **Integration with JAX Ecosystem:** The library can be easily integrated with JAX's robust ecosystem of machine learning libraries such as [Flax](https://github.com/google/flax), [Haiku](https://github.com/deepmind/dm-haiku), [Optax](https://github.com/deepmind/optax), and many more.
53+
- **Differentiable LBM Kernels:** XLB provides differentiable LBM kernels that can be used in differentiable physics and deep learning applications.
54+
- **Scalability:** XLB is capable of scaling on distributed multi-GPU systems using the JAX backend, enabling the execution of large-scale simulations on hundreds of GPUs with billions of cells.
1255
- **Support for Various LBM Boundary Conditions and Kernels:** XLB supports several LBM boundary conditions and collision kernels.
13-
- **User-Friendly Interface:** Written entirely in Python, XLB emphasizes a highly accessible interface that allows users to extend the solver with ease and quickly set up and run new simulations.
14-
- **Leverages JAX Array and Shardmap:** The solver incorporates the new JAX array unified array type and JAX shardmap, providing users with a numpy-like interface. This allows users to focus solely on the semantics, leaving performance optimizations to the compiler.
56+
- **User-Friendly Interface:** Written entirely in Python, XLB emphasizes a highly accessible interface that allows users to extend the library with ease and quickly set up and run new simulations.
57+
- **Leverages JAX Array and Shardmap:** The library incorporates the new JAX array unified array type and JAX shardmap, providing users with a numpy-like interface. This allows users to focus solely on the semantics, leaving performance optimizations to the compiler.
1558
- **Platform Versatility:** The same XLB code can be executed on a variety of platforms including multi-core CPUs, single or multi-GPU systems, TPUs, and it also supports distributed runs on multi-GPU systems or TPU Pod slices.
59+
- **Visualization:** XLB provides a variety of visualization options including in-situ on GPU rendering using [PhantomGaze](https://github.com/loliverhennigh/PhantomGaze).
1660

17-
## Documentation
18-
The documentation can be found [here](https://autodesk.github.io/XLB/) (in preparation)
1961
## Showcase
2062

21-
The following examples showcase the capabilities of XLB:
2263

2364
<p align="center">
24-
<img src="assets/cavity.gif" alt="" width="500">
65+
<img src="https://raw.githubusercontent.com/autodesk/xlb/main/assets/airfoil.gif" width="800">
66+
</p>
67+
<p align="center">
68+
On GPU in-situ rendering using <a href="https://github.com/loliverhennigh/PhantomGaze">PhantomGaze</a> library (no I/O). Flow over a NACA airfoil using KBC Lattice Boltzmann Simulation with ~10 million cells.
69+
</p>
70+
71+
72+
<p align="center">
73+
<img src="https://raw.githubusercontent.com/autodesk/xlb/main/assets/car.png" alt="" width="500">
74+
</p>
75+
<p align="center">
76+
<a href=https://www.epc.ed.tum.de/en/aer/research-groups/automotive/drivaer > DrivAer model </a> in a wind-tunnel using KBC Lattice Boltzmann Simulation with approx. 317 million cells
77+
</p>
78+
79+
<p align="center">
80+
<img src="https://raw.githubusercontent.com/autodesk/xlb/main/assets/building.png" alt="" width="700">
2581
</p>
2682
<p align="center">
27-
Lid-driven Cavity flow at Re=100,000 (~25 million voxels)
83+
Airflow in to, out of, and within a building (~400 million cells)
2884
</p>
2985

3086
<p align="center">
31-
<img src="assets/car.png" alt="" width="500">
87+
<img src="https://raw.githubusercontent.com/autodesk/xlb/main/assets/XLB_diff.png" alt="" width="900">
3288
</p>
3389
<p align="center">
34-
<a href=https://www.epc.ed.tum.de/en/aer/research-groups/automotive/drivaer > DrivAer model </a> in a wind-tunnel using KBC Lattice Boltzmann Simulation with approx. 317 million voxels
90+
The stages of a fluid density field from an initial state to the emergence of the "XLB" pattern through deep learning optimization at timestep 200 (see paper for details)
3591
</p>
3692

93+
<br>
94+
3795
<p align="center">
38-
<img src="assets/airfoil.png" width="500">
96+
<img src="https://raw.githubusercontent.com/autodesk/xlb/main/assets/cavity.gif" alt="" width="500">
3997
</p>
4098
<p align="center">
41-
Flow over a NACA airfoil using KBC Lattice Boltzmann Simulation with approx. 100 million voxels
99+
Lid-driven Cavity flow at Re=100,000 (~25 million cells)
42100
</p>
43101

44102
## Capabilities
45103

46104
### LBM
105+
47106
- BGK collision model (Standard LBM collision model)
48107
- KBC collision model (unconditionally stable for flows with high Reynolds number)
49108

109+
### Machine Learning
110+
111+
- Easy integration with JAX's ecosystem of machine learning libraries
112+
- Differentiable LBM kernels
113+
- Differentiable boundary conditions
114+
50115
### Lattice Models
116+
51117
- D2Q9
52118
- D3Q19
53119
- D3Q27 (Must be used for KBC simulation runs)
54120

121+
### Compute Capabilities
122+
- Single GPU support for the Warp backend with state-of-the-art performance
123+
- Distributed Multi-GPU support using the JAX backend
124+
- Mixed-Precision support (store vs compute)
125+
- Out-of-core support (coming soon)
126+
55127
### Output
128+
56129
- Binary and ASCII VTK output (based on PyVista library)
130+
- In-situ rendering using [PhantomGaze](https://github.com/loliverhennigh/PhantomGaze) library
131+
- [Orbax](https://github.com/google/orbax)-based distributed asynchronous checkpointing
57132
- Image Output
58133
- 3D mesh voxelizer using trimesh
59134

60135
### Boundary conditions
136+
61137
- **Equilibrium BC:** In this boundary condition, the fluid populations are assumed to be in at equilibrium. Can be used to set prescribed velocity or pressure.
62138

63139
- **Full-Way Bounceback BC:** In this boundary condition, the velocity of the fluid populations is reflected back to the fluid side of the boundary, resulting in zero fluid velocity at the boundary.
@@ -70,43 +146,46 @@ The following examples showcase the capabilities of XLB:
70146
- **Regularized BC:** This boundary condition is used to impose a prescribed velocity or pressure profile at the boundary. This BC is more stable than Zouhe BC, but computationally more expensive.
71147
- **Extrapolation Outflow BC:** A type of outflow boundary condition that uses extrapolation to avoid strong wave reflections.
72148

73-
### Compute Capabilities
74-
- Distributed Multi-GPU support
75-
- JAX shard-map and JAX Array support
76-
- Mixed-Precision support (store vs compute)
149+
- **Interpolated Bounceback BC:** Interpolated bounce-back boundary condition for representing curved boundaries.
77150

78-
## Installation Guide
151+
## Roadmap
79152

80-
To use XLB, you must first install JAX and other dependencies using the following commands:
153+
### Work in Progress (WIP)
154+
*Note: Some of the work-in-progress features can be found in the branches of the XLB repository. For contributions to these features, please reach out.*
81155

82-
```bash
83-
# Please refer to https://github.com/google/jax for the latest installation documentation
156+
- 🌐 **Grid Refinement:** Implementing adaptive mesh refinement techniques for enhanced simulation accuracy.
84157

85-
pip install --upgrade pip
158+
- 💾 **Out-of-Core Computations:** Enabling simulations that exceed available GPU memory, suitable for CPU+GPU coherent memory models such as NVIDIA's Grace Superchips (coming soon).
86159

87-
# For CPU run
88-
pip install --upgrade "jax[cpu]"
89160

90-
# For GPU run
161+
-**Multi-GPU Acceleration using [Neon](https://github.com/Autodesk/Neon) + Warp:** Using Neon's data structure for improved scaling.
91162

92-
# CUDA 12 and cuDNN 8.8 or newer.
93-
pip install --upgrade "jax[cuda12_pip]" -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html
163+
- 🗜️ **GPU Accelerated Lossless Compression and Decompression**: Implementing high-performance lossless compression and decompression techniques for larger-scale simulations and improved performance.
94164

95-
# CUDA 11 and cuDNN 8.6 or newer.
96-
pip install --upgrade "jax[cuda11_pip]" -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html
165+
- 🌡️ **Fluid-Thermal Simulation Capabilities:** Incorporating heat transfer and thermal effects into fluid simulations.
97166

98-
# Run dependencies
99-
pip install jmp pyvista numpy matplotlib Rtree trimesh jmp
100-
```
167+
- 🎯 **Adjoint-based Shape and Topology Optimization:** Implementing gradient-based optimization techniques for design optimization.
101168

102-
Run an example:
103-
```bash
104-
git clone https://github.com/Autodesk/XLB
105-
cd XLB
106-
export PYTHONPATH=.
107-
python3 examples/cavity2d.py
108-
```
109-
## Citing XLB
110-
Accompanying publication coming soon:
169+
- 🧠 **Machine Learning Accelerated Simulations:** Leveraging machine learning to speed up simulations and improve accuracy.
170+
171+
- 📉 **Reduced Order Modeling using Machine Learning:** Developing data-driven reduced-order models for efficient and accurate simulations.
172+
173+
174+
### Wishlist
175+
*Contributions to these features are welcome. Please submit PRs for the Wishlist items.*
176+
177+
- 🌊 **Free Surface Flows:** Simulating flows with free surfaces, such as water waves and droplets.
178+
179+
- 📡 **Electromagnetic Wave Propagation:** Simulating the propagation of electromagnetic waves.
180+
181+
- 🛩️ **Supersonic Flows:** Simulating supersonic flows.
182+
183+
- 🌊🧱 **Fluid-Solid Interaction:** Modeling the interaction between fluids and solid objects.
184+
185+
- 🧩 **Multiphase Flow Simulation:** Simulating flows with multiple immiscible fluids.
186+
187+
- 🔥 **Combustion:** Simulating combustion processes and reactive flows.
188+
189+
- 🪨 **Particle Flows and Discrete Element Method:** Incorporating particle-based methods for granular and particulate flows.
111190

112-
**M. Ataei, H. Salehipour**. XLB: Hardware-Accelerated, Scalable, and Differentiable Lattice Boltzmann Simulation Framework based on JAX. TBA
191+
- 🔧 **Better Geometry Processing Pipelines:** Improving the handling and preprocessing of complex geometries for simulations.

docs/lattice.md

-7
This file was deleted.

docs/models.md

-5
This file was deleted.

docs/utils.md

-13
This file was deleted.

mkdocs.yml

+2-8
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ repo_url: https://github.com/Autodesk/XLB
3030
edit_uri: edit/master/docs/
3131

3232
watch:
33-
- ./src/
33+
- ./xlb/
3434

3535
# Can be used to add a meta tag to the HTML header
3636
site_description: 'Documentation for project XLB'
@@ -147,10 +147,4 @@ extra_javascript:
147147
- https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js
148148

149149
nav:
150-
- XLB's home: index.md
151-
- XLB API:
152-
- XLB base: base.md
153-
- XLB models: models.md
154-
- XLB lattice: lattice.md
155-
- XLB utils: utils.md
156-
- XLB boundary conditions: boundary_conditions.md
150+
- XLB's home: index.md

0 commit comments

Comments
 (0)