MCPcopy Create free account
hub / github.com/ProjectPhysX/FluidX3D

github.com/ProjectPhysX/FluidX3D @v3.7

Chat with this repo
repository ↗ · DeepWiki ↗ · release v3.7 ↗ · + Follow
1,484 symbols 3,642 edges 41 files 348 documented · 23% updated 3d agov3.7 · 2026-05-14★ 5,16548 open issues

Browse by type

Functions 1,203 Types & classes 281
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

FluidX3D

The fastest and most memory efficient lattice Boltzmann CFD software, running on all GPUs and CPUs via OpenCL. Free for non-commercial use.

(click on images to show videos on YouTube)

Update History

  • v1.0 (04.08.2022) changes (public release)
  • public release
  • v1.1 (29.09.2022) changes (GPU voxelization)
  • added solid voxelization on GPU (slow algorithm)
  • added tool to print current camera position (key G)
  • minor bug fix (workaround for Intel iGPU driver bug with triangle rendering)
  • v1.2 (24.10.2022) changes (force/torque computation)
  • added functions to compute force/torque on objects
  • added function to translate Mesh
  • added Stokes drag validation setup
  • v1.3 (10.11.2022) changes (minor bug fixes)
  • added unit conversion functions for torque
  • FORCE_FIELD and VOLUME_FORCE can now be used independently
  • minor bug fix (workaround for AMD legacy driver bug with binary number literals)
  • v1.4 (14.12.2022) changes (Linux graphics)
  • complete rewrite of C++ graphics library to minimize API dependencies
  • added interactive graphics mode on Linux with X11
  • fixed streamline visualization bug in 2D
  • v2.0 (09.01.2023) changes (multi-GPU upgrade)
  • added (cross-vendor) multi-GPU support on a single node (PC/laptop/server)
  • v2.1 (15.01.2023) changes (fast voxelization)
  • made solid voxelization on GPU lightning fast (new algorithm, from minutes to milliseconds)
  • v2.2 (20.01.2023) changes (velocity voxelization)
  • added option to voxelize moving/rotating geometry on GPU, with automatic velocity initialization for each grid point based on center of rotation, linear velocity and rotational velocity
  • cells that are converted from solid->fluid during re-voxelization now have their DDFs properly initialized
  • added option to not auto-scale mesh during read_stl(...), with negative size parameter
  • added kernel for solid boundary rendering with marching-cubes
  • v2.3 (30.01.2023) changes (particles)
  • added particles with immersed-boundary method (either passive or 2-way-coupled, only supported with single-GPU)
  • minor optimization to GPU voxelization algorithm (workgroup threads outside mesh bounding-box return after ray-mesh intersections have been found)
  • displayed GPU memory allocation size is now fully accurate
  • fixed bug in write_line() function in src/utilities.hpp
  • removed .exe file extension for Linux/macOS
  • v2.4 (11.03.2023) changes (UI improvements)
  • added a help menu with key H that shows keyboard/mouse controls, visualization settings and simulation stats
  • improvements to keyboard/mouse control (+/- for zoom, mouseclick frees/locks cursor)
  • added suggestion of largest possible grid resolution if resolution is set larger than memory allows
  • minor optimizations in multi-GPU communication (insignificant performance difference)
  • fixed bug in temperature equilibrium function for temperature extension
  • fixed erroneous double literal for Intel iGPUs in skybox color functions
  • fixed bug in make.sh where multi-GPU device IDs would not get forwarded to the executable
  • minor bug fixes in graphics engine (free cursor not centered during rotation, labels in VR mode)
  • fixed bug in LBM::voxelize_stl() size parameter standard initialization
  • v2.5 (11.04.2023) changes (raytracing overhaul)
  • implemented light absorption in fluid for raytracing graphics (no performance impact)
  • improved raytracing framerate when camera is inside fluid
  • fixed skybox pole flickering artifacts
  • fixed bug where moving objects during re-voxelization would leave an erroneous trail of solid grid cells behind
  • v2.6 (16.04.2023) changes (Intel Arc patch)
  • patched OpenCL issues of Intel Arc GPUs: now VRAM allocations >4GB are possible and correct VRAM capacity is reported
  • v2.7 (29.05.2023) changes (visualization upgrade)
  • added slice visualization (key 2 / key 3 modes, then switch through slice modes with key T, move slice with keys Q/E)
  • made flag wireframe / solid surface visualization kernels toggleable with key 1
  • added surface pressure visualization (key 1 when FORCE_FIELD is enabled and lbm.calculate_force_on_boundaries(); is called)
  • added binary .vtk export function for meshes with lbm.write_mesh_to_vtk(Mesh* mesh);
  • added time_step_multiplicator for integrate_particles() function in PARTICLES extension
  • made correction of wrong memory reporting on Intel Arc more robust
  • fixed bug in write_file() template functions
  • reverted back to separate cl::Context for each OpenCL device, as the shared Context otherwise would allocate extra VRAM on all other unused Nvidia GPUs
  • removed Debug and x86 configurations from Visual Studio solution file (one less complication for compiling)
  • fixed bug that particles could get too close to walls and get stuck, or leave the fluid phase (added boundary force)
  • v2.8 (24.06.2023) changes (documentation + polish)
  • finally added more documentation
  • cleaned up all sample setups in setup.cpp for more beginner-friendliness, and added required extensions in defines.hpp as comments to all setups
  • improved loading of composite .stl geometries, by adding an option to omit automatic mesh repositioning, added more functionality to Mesh struct in utilities.hpp
  • added uint3 resolution(float3 box_aspect_ratio, uint memory) function to compute simulation box resolution based on box aspect ratio and VRAM occupation in MB
  • added bool lbm.graphics.next_frame(...) function to export images for a specified video length in the main_setup compute loop
  • added VIS_... macros to ease setting visualization modes in headless graphics mode in lbm.graphics.visualization_modes
  • simulation box dimensions are now automatically made equally divisible by domains for multi-GPU simulations
  • fixed Info/Warning/Error message formatting for loading files and made Info/Warning/Error message labels colored
  • added Ahmed body setup as an example on how body forces and drag coefficient are computed
  • added Cessna 172 and Bell 222 setups to showcase loading composite .stl geometries and revoxelization of moving parts
  • added optional semi-transparent rendering mode (#define GRAPHICS_TRANSPARENCY 0.7f in defines.hpp)
  • fixed flickering of streamline visualization in interactive graphics
  • improved smooth positioning of streamlines in slice mode
  • fixed bug where mass and massex in SURFACE extension were also allocated in CPU RAM (not required)
  • fixed bug in Q-criterion rendering of halo data in multi-GPU mode, reduced gap width between domains
  • removed shared memory optimization from mesh voxelization kernel, as it crashes on Nvidia GPUs with new GPU drivers and is incompatible with old OpenCL 1.0 GPUs
  • fixed raytracing attenuation color when no surface is at the simulation box walls with periodic boundaries
  • v2.9 (31.07.2023) changes (multithreading)
  • added cross-platform parallel_for implementation in utilities.hpp using std::threads
  • significantly (>4x) faster simulation startup with multithreaded geometry initialization and sanity checks
  • faster calculate_force_on_object() and calculate_torque_on_object() functions with multithreading
  • added total runtime and LBM runtime to lbm.write_status()
  • fixed bug in voxelization ray direction for re-voxelizing rotating objects
  • fixed bug in Mesh::get_bounding_box_size()
  • fixed bug in print_message() function in utilities.hpp
  • v2.10 (05.11.2023) changes (frustum culling)
  • improved rasterization performance via frustum culling when only part of the simulation box is visible
  • improved switching between centered/free camera mode
  • refactored OpenCL rendering library
  • unit conversion factors are now automatically printed in console when units.set_m_kg_s(...) is used
  • faster startup time for FluidX3D benchmark
  • miner bug fix in voxelize_mesh(...) kernel
  • fixed bug in shading(...)
  • replaced slow (in multithreading) std::rand() function with standard C99 LCG
  • more robust correction of wrong VRAM capacity reporting on Intel Arc GPUs
  • fixed some minor compiler warnings
  • v2.11 (07.12.2023) changes (improved Linux graphics)
  • interactive graphics on Linux are now in fullscreen mode too, fully matching Windows
  • made CPU/GPU buffer initialization significantly faster with std::fill and enqueueFillBuffer (overall ~8% faster simulation startup)
  • added operating system info to OpenCL device driver version printout
  • fixed flickering with frustum culling at very small field of view
  • fixed bug where rendered/exported frame was not updated when visualization_modes changed
  • v2.12 (18.01.2024) changes (faster startup)
  • ~3x faster source code compiling on Linux using multiple CPU cores if make is installed
  • significantly faster simulation initialization (~40% single-GPU, ~15% multi-GPU)
  • minor bug fix in Memory_Container::reset() function
  • v2.13 (11.02.2024) changes (improved .vtk export)
  • data in exported .vtk files is now automatically converted to SI units
  • ~2x faster .vtk export with multithreading
  • added unit conversion functions for TEMPERATURE extension
  • fixed graphical artifacts with axis-aligned camera in raytracing
  • fixed get_exe_path() for macOS
  • fixed X11 multi-monitor issues on Linux
  • workaround for Nvidia driver bug: enqueueFillBuffer is broken for large buffers on Nvidia GPUs
  • fixed slow numeric drift issues caused by -cl-fast-relaxed-math
  • fixed wrong Maximum Allocation Size reporting in LBM::write_status()
  • fixed missing scaling of coordinates to SI units in LBM::write_mesh_to_vtk()
  • v2.14 (03.03.2024) changes (visualization upgrade)
  • coloring can now be switched between velocity/density/temperature with key Z
  • uniform improved color palettes for velocity/density/temperature visualization
  • color scale with automatic unit conversion can now be shown with key H
  • slice mode for field visualization now draws fully filled-in slices instead of only lines for velocity vectors
  • shading in VIS_FLAG_SURFACE and VIS_PHI_RASTERIZE modes is smoother now
  • make.sh now automatically detects operating system and X11 support on Linux and only runs FluidX3D if last compilation was successful
  • fixed compiler warnings on Android
  • fixed make.sh failing on some systems due to nonstandard interpreter path
  • fixed that make would not compile with multiple cores on some systems
  • [v2.15](https://gith

Core symbols most depended-on inside this repo

Shape

Method 689
Function 514
Class 273
Enum 8

Languages

C++100%

Modules by API surface

src/OpenCL/include/CL/opencl.hpp362 symbols
src/utilities.hpp308 symbols
src/lodepng.cpp249 symbols
src/units.hpp89 symbols
src/lbm.hpp81 symbols
src/lbm.cpp74 symbols
src/opencl.hpp54 symbols
src/X11/include/X11/extensions/XKBstr.h46 symbols
src/graphics.hpp36 symbols
src/graphics.cpp35 symbols
src/X11/include/X11/Xlib.h24 symbols
src/X11/include/X11/extensions/Xrender.h20 symbols

For agents

$ claude mcp add FluidX3D \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page