FluidX3D Python Module
Real-time interactive GPU-accelerated Computational Fluid Dynamics (CFD) with Python!
This is a Python wrapper for FluidX3D v2.16, the fastest and most memory efficient Lattice Boltzmann CFD software, capable of running simulations with up to 10 billion cells in VRAM.
Features
- 🚀 Full GPU Acceleration - Utilizes OpenCL for massive parallel computation
- 🎮 Interactive Graphics - Real-time 3D visualization with interactive controls
- 🔧 Runtime Configuration - All simulation parameters configurable via Python API
- 📊 High Performance - Processes millions of lattice cells per second
- 🎯 Easy to Use - Simple Python interface to powerful CFD engine
- 🪟 Windows Graphics - Native window support with keyboard/mouse controls
Requirements
- Windows (required for interactive graphics)
- Python 3.11+
- OpenCL-capable GPU (NVIDIA, AMD, or Intel)
- Visual C++ Redistributables (usually already installed)
Installation
pip install fluidx3d
Quick Start
import fluidx3d
# Configure simulation
config = fluidx3d.Config()
config.parse_args([
'--D3Q27', # Use D3Q27 velocity set
'--FP16S', # Use FP16 precision
'--SUBGRID', # Enable subgrid model
'--SRT', # Use SRT collision operator
'--GRAPHICS', # Enable graphics
'--window', # Use windowed mode (not fullscreen)
'-f', 'your_model.stl', # Input STL file
'-r', '15400', # Resolution (VRAM in MB)
'-u', '7.0', # Velocity (m/s)
'--re', '535000000', # Reynolds number
'--secs', '10.0', # Simulation time (seconds)
])
# Run simulation (opens interactive window!)
config.run_simulation()
Interactive Controls
When the graphics window opens:
- P - Pause/resume simulation
- O - Save frames to disk
- H - Show/hide help overlay
- 1-7 - Toggle visualization modes
- Mouse - Rotate camera
- W/A/S/D - Move camera (in free camera mode)
- F - Toggle free camera mode
- Esc - Quit
Example: Airship Simulation
import fluidx3d
config = fluidx3d.Config()
config.parse_args([
'--D3Q27', '--FP16S', '--SUBGRID',
'--SRT', '--UPDATE_FIELDS', '--GRAPHICS',
'--EQUILIBRIUM_BOUNDARIES', '--window',
'-f', 'LZ_129_Hindenburg.stl',
'-r', '15400', # ~15GB VRAM
'-u', '7', # 7 m/s velocity
'--re', '535000000', # Reynolds number
'--rho', '1024', # Density
'--secs', '30.0', # 30 seconds simulation
'--fps', '60',
'--slomo', '10',
])
# Access parameters
print(f"Velocity: {config.get_float('u')} m/s")
print(f"Reynolds: {config.get_float('re')}")
# Get all parameters as dict
params = config.to_dict()
# Run simulation
config.run_simulation()
Available Arguments
Velocity Sets
--D2Q9- 2D 9-velocity--D3Q15- 3D 15-velocity--D3Q19- 3D 19-velocity--D3Q27- 3D 27-velocity (recommended)
Precision & Performance
--FP16S- Half precision (recommended, 2x faster)--FP16C- Half precision compression--SUBGRID- Subgrid turbulence model
Collision Operators
--SRT- Single Relaxation Time--TRT- Two Relaxation Time
Features
--GRAPHICS- Enable interactive graphics--window- Windowed mode (not fullscreen)--UPDATE_FIELDS- Update velocity/density fields--EQUILIBRIUM_BOUNDARIES- Equilibrium boundaries--MOVING_BOUNDARIES- Moving solid boundaries--SURFACE- Free surface flow--TEMPERATURE- Temperature simulation--PARTICLES- Particle tracking
Simulation Parameters
-f FILE- Input STL file-r RES- Resolution (VRAM usage in MB)-u VEL- Velocity (m/s)-c CHORD- Characteristic length (m)--re RE- Reynolds number--rho RHO- Density (kg/m³)--secs TIME- Simulation duration (seconds)--fps FPS- Video framerate--slomo FACTOR- Slow motion factor--export PATH- Export directory
Geometry Transform
--rotx DEG- Rotate around X axis--roty DEG- Rotate around Y axis--rotz DEG- Rotate around Z axis--scale FACTOR- Scale factor--aoa DEG- Angle of attack
Performance Tips
- Use
--FP16S- Doubles performance on most GPUs - Use
--D3Q27- Best accuracy for complex flows - Adjust resolution - Use
-rto balance quality vs speed - Monitor VRAM - Shown in console output at startup
Hardware Requirements
Minimum
- NVIDIA GTX 1060 / AMD RX 580 / Intel Arc A380 (4GB VRAM)
- 8GB system RAM
- Windows 10/11
Recommended
- NVIDIA RTX 3060 or better (12GB+ VRAM)
- 16GB+ system RAM
- Windows 11
Credits
- Original FluidX3D: Dr. Moritz Lehmann - https://github.com/ProjectPhysX/FluidX3D
- Python Bindings: AuraFriday (cnd) - https://github.com/gitcnd/FluidX3D-2.16-python
License
GNU General Public License v3.0 - See LICENSE.md
Links
- GitHub: https://github.com/gitcnd/FluidX3D-2.16-python
- Original FluidX3D: https://github.com/ProjectPhysX/FluidX3D
- Issues: https://github.com/gitcnd/FluidX3D-2.16-python/issues
Metadata
Release files for fluidx3d 2.16.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| fluidx3d-2.16.3-cp314-cp314-win_amd64.whl | CPython 3.14 | CPython 3.14 | Windows x86-64 | Details for fluidx3d-2.16.3-cp314-cp314-win_amd64.whl |
| fluidx3d-2.16.3-cp313-cp313-win_amd64.whl | CPython 3.13 | CPython 3.13 | Windows x86-64 | Details for fluidx3d-2.16.3-cp313-cp313-win_amd64.whl |
| fluidx3d-2.16.3-cp312-cp312-win_amd64.whl | CPython 3.12 | CPython 3.12 | Windows x86-64 | Details for fluidx3d-2.16.3-cp312-cp312-win_amd64.whl |
| fluidx3d-2.16.3-cp311-cp311-win_amd64.whl | CPython 3.11 | CPython 3.11 | Windows x86-64 | Details for fluidx3d-2.16.3-cp311-cp311-win_amd64.whl |
Total release size: 2.3 MB
Release files / fluidx3d-2.16.3-cp314-cp314-win_amd64.whl
| Download URL | fluidx3d-2.16.3-cp314-cp314-win_amd64.whl |
|---|---|
| Size | 580.6 kB |
| Tags | CPython 3.14 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
724e11a5a3b69c222c91c72bc3843ef08ca0bbf1827cdaec6e70a84fd8012893
|
|
BLAKE2b-256 checksum How to use checksums |
a8ecbd82bc6bd060143da0b4e5a95e6274908ad786ae7c67f7beb964636c6e5c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.8.10
|
Release files / fluidx3d-2.16.3-cp313-cp313-win_amd64.whl
| Download URL | fluidx3d-2.16.3-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 566.8 kB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
dc1b423546a7706fc98779def1db9c0a3f77ddde39426682796102b15614c567
|
|
BLAKE2b-256 checksum How to use checksums |
32c6a96aedd9d3b9fa49e30e925d2d50d2e2f54dce59eb9109749c1246b15682
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.8.10
|
Release files / fluidx3d-2.16.3-cp312-cp312-win_amd64.whl
| Download URL | fluidx3d-2.16.3-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 566.7 kB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
96dafe649bdc5afeafdb5ee7f2e8d2fcce64f4a3d742f1bdd63fed777011e670
|
|
BLAKE2b-256 checksum How to use checksums |
145387ef101d218a71a23a3e179ec49af404ba34fa0ea10b5ab17fba5c4c911a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.8.10
|
Release files / fluidx3d-2.16.3-cp311-cp311-win_amd64.whl
| Download URL | fluidx3d-2.16.3-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 566.2 kB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
9c731e296ff3ad03bf63475635b57f2fc453ac9e7f243b698d1917de6131266d
|
|
BLAKE2b-256 checksum How to use checksums |
dab42ba8122d0145a565453d08883f1d57abc76bcc63fcdce3cb42450c225958
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.8.10
|
Security for fluidx3d 2.16.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.