How pmocz/latticeboltzmann-python works
This is a compact, single-file Lattice Boltzmann simulation of flow past a cylinder. Running the script initializes the lattice and obstacle, iterates streaming, fluid-variable calculation, collision, and boundary handling, then visualizes and saves the vorticity result. All implementation stages share one source file; the README documents the run command and simulation purpose.
Main entry points: latticeboltzmann.py Simulation Loop
Components 9
Other components
- User
- Simulation Loop
latticeboltzmann.py - Lattice Setup
latticeboltzmann.py - Particle Streaming
latticeboltzmann.py - Fluid Variables
latticeboltzmann.py - Collision Update
latticeboltzmann.py - Cylinder Boundary
latticeboltzmann.py - Vorticity Display
latticeboltzmann.py - Image Output
latticeboltzmann.py
Connections 8
- User → Simulation Loop: runs script
README.md - Simulation Loop → Lattice Setup: initializes
latticeboltzmann.py - Simulation Loop → Particle Streaming: streams particles
latticeboltzmann.py - Simulation Loop → Fluid Variables: calculates variables
latticeboltzmann.py - Simulation Loop → Collision Update: updates populations
latticeboltzmann.py - Simulation Loop → Cylinder Boundary: applies reflection
latticeboltzmann.py - Simulation Loop → Vorticity Display: renders vorticity
latticeboltzmann.py - Simulation Loop → Image Output: saves figure
latticeboltzmann.py