Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. JAX
  3. XLB

XLB

NOASSERTIONPythonv0.3.1

A differentiable, massively parallel Lattice Boltzmann library in Python for physics-based machine learning and fluid dynamics simulations.

GitHubGitHub
510 stars86 forks0 contributors

What is XLB?

XLB is a differentiable, massively parallel Lattice Boltzmann Method library in Python for simulating fluid dynamics. It solves complex flow problems efficiently while providing differentiable kernels that enable seamless integration with machine learning frameworks for physics-based AI applications.

Target Audience

Researchers and engineers in computational fluid dynamics, physics-based machine learning, and scientific computing who need scalable, differentiable simulations for optimization and AI-driven design.

Value Proposition

Developers choose XLB for its unique combination of full differentiability, massive parallel scalability across multiple hardware backends, and user-friendly Python interface that bridges traditional CFD with modern ML workflows.

Overview

XLB: Accelerated Lattice Boltzmann (XLB) for Physics-based ML

Use Cases

Best For

  • Physics-informed neural networks requiring differentiable fluid simulations
  • Large-scale computational fluid dynamics research on multi-GPU clusters
  • Gradient-based optimization in aerodynamic design and shape optimization
  • Integrating traditional CFD simulations with JAX-based machine learning pipelines
  • Educational purposes for learning Lattice Boltzmann methods with modern Python tools
  • Rapid prototyping of fluid dynamics experiments with in-situ GPU visualization

Not Ideal For

  • Projects requiring multi-GPU acceleration with the Warp backend, as it currently only supports single GPU
  • Simulations involving free surface or multiphase flows, as these features are on the wishlist and not yet implemented
  • Teams developing on macOS who need GPU-accelerated simulations, since JAX backend lacks GPU support on MacOS
  • Applications needing real-time, interactive fluid simulations with low latency, due to the computational intensity of LBM methods

Pros & Cons

Pros

Cross-Platform Performance

Supports JAX and Warp backends for optimal performance on CPUs, GPUs, and TPUs, allowing the same code to run on diverse hardware without modification.

ML-Ready Differentiability

Provides fully differentiable LBM kernels and boundary conditions, enabling seamless integration with JAX-based machine learning libraries like Flax and Optax for gradient-based optimization.

Distributed Scalability

Scales to billions of cells on distributed multi-GPU systems using the JAX backend, making it suitable for large-scale research and industrial simulations.

Intuitive Python API

Written entirely in Python with a numpy-like interface, simplifying setup and extension of simulations without requiring deep C++ or CUDA expertise.

Efficient Visualization

Offers in-situ GPU rendering via PhantomGaze, reducing I/O overhead and enabling real-time visualization during simulations without saving to disk.

Cons

Warp Backend GPU Limit

The Warp backend currently only supports single GPU, which restricts multi-GPU acceleration for users preferring this backend over JAX, as noted in the README.

Incomplete Physics Coverage

Advanced features like free surface flows, multiphase simulations, and combustion are not yet implemented and are listed in the wishlist, limiting scope for complex applications.

Platform-Specific Restrictions

On macOS, GPU acceleration is unavailable with the JAX backend, forcing users to rely on CPU-only simulations or switch platforms for better performance.

Assumed CFD Knowledge

While user-friendly, XLB requires familiarity with Lattice Boltzmann methods and CFD concepts, which can be a steep learning curve for newcomers without prior experience.

Frequently Asked Questions

Quick Stats

Stars510
Forks86
Contributors0
Open Issues11
Last commit20 days ago
CreatedSince 2023

Tags

#scientific-computing#computational-fluid-dynamics#jax#python-library#gpu-acceleration

Built With

J
JAX
P
Python

Included in

JAX2.1k
Auto-fetched 21 hours ago

Related Projects

ALXALX

Google Research

Stars38,873
Forks8,477
Last commit6 days ago
OryxOryx

Probabilistic reasoning and statistical analysis in TensorFlow

Stars4,436
Forks1,129
Last commit13 days ago
BRAXBRAX

Massively parallel rigidbody physics simulation on accelerator hardware.

Stars3,247
Forks356
Last commit1 day ago
MctxMctx

Monte Carlo tree search in JAX

Stars2,671
Forks219
Last commit1 day ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub