FluidX3D Versions Save

The fastest and most memory efficient lattice Boltzmann CFD software, running on all GPUs via OpenCL.

v2.16

2 weeks ago

I'm doing my part! With the v2.16 update I've put down all remaining known bugs for good. 🖖😎❌🪳❌ WOULD YOU LIKE TO KNOW MORE?


Bug fixes in this release:

  • fixed that voxelization failed in Intel OpenCL CPU Runtime due to array out-of-bounds access
  • fixed that voxelization did not always produce binary identical results in multi-GPU compared to single-GPU
  • fixed that velocity voxelization failed for free surface simulations
  • fixed terrible performance on ARM GPUs by macro-replacing fused-multiply-add (fma) with a*b+c
  • fixed that Y/Z keys were incorrect for QWERTY keyboard layout in Linux
  • fixed that free camera movement speed in help overlay was not updated in stationary image when scrolling
  • fixed that cursor would sometimes flicker when scrolling on trackpads with Linux-X11 interactive graphics
  • fixed flickering of interactive rendering with multi-GPU when camera is not moved
  • fixed missing XInitThreads() call that could crash Linux interactive graphics on some systems
  • fixed z-fighting between graphics_rasterize_phi() and graphics_flags_mc() kernels

Other improvements:

  • simplified 10% faster marching-cubes implementation with 1D interpolation on edges instead of 3D interpolation, allowing to get rid of edge table
  • added faster, simplified marching-cubes variant for solid surface rendering where edges are always halfway between grid cells
  • refactoring in OpenCL rendering kernels

With GitHub I can track every bug from day it was discovered/fixed back to the day it was first introduced. This allows me to graph the number of open bugs over time, along with a curve weighted by their individual severity (minor 0.25, low 0.5, medium 1.0, high 2.0, showstopper 4.0): grafik

Here is the distribution of days open, days till discovery and days till fix. I fixed 56% of bugs on the day of discovery. Notice the bimodal distribution of days open - a clear separation into "easy" and "nasty" bugs. grafik

Lessons learned:

  • Since release there was 63 bugs in FluidX3D in total, with at max 41 open bugs at one time. 🖖😱 Now there is 0, at least until I find more. 🖖😎 For reference: FluidX3D is 12.1k lines of code.
  • Most bugs were a byproduct of big feature updates, like v2.0 (multi-GPU) and v2.1/v2.2 (voxelization). Of course at the time of introduction I didn't know that bugs slipped through, and I (or users) only discovered them later.
  • Only 17% of bugs were found by users, all the others I found myself with rigorous testing. It takes continuous poking around in the code to find these often super rare bugs.
  • 30% of bugs were actually bugs in the compiler, driver or operating system that needed a workaround on application side.
  • The latest v2.16 release is the best FluidX3D has ever been. The worst, most bugged version by this metric is v2.2. 🖖🤠

Have fun with the software! -- Moritz


PS: Here's an amusing FluidX3D video from @SLGY, he's doing his part too!

v2.15

1 month ago

Thank you for using FluidX3D! Update v2.15 boosts framerate in interactive graphics by 20-70%:

  • eliminated one frame memory copy and one clear frame operation in rendering chain
  • enabled g++ compiler optimizations for faster startup and higher rendering framerate

Bug fixes:

  • fixed bug in multithreaded sanity checks
  • fixed wrong unit conversion for thermal expansion coefficient
  • fixed density to pressure conversion in LBM units
  • fixed bug that raytracing kernel could lock up simulation
  • fixed minor visual artifacts with raytracing
  • fixed that console sometimes was not cleared before INTERACTIVE_GRAPHICS_ASCII rendering started

Have fun with the software! -- Moritz

v2.14

2 months ago

Thank you for using FluidX3D! Update v2.14 brings an upgrade to visualization kernels and eases compiling:

  • 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

Bug fixes:

  • 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

Here is a YouTube video (some screen recordings) to showcase the update, all real-time simulations on an Intel Arc A750: image

Have fun with the software! -- Moritz

v1.4

2 months ago
  • Big update for Linux users: Added interactive graphics mode on Linux with X11. No external dependencies, compiles out-of-the-box with the "compile on Linux with X11" command in make.sh.
  • Re-wrote C++ graphics library to minimize API dependencies
  • Colors are now signed int consistently.
  • Fixed streamline visualization in 2D.

v2.13

3 months ago

Thank you for using FluidX3D! Update v2.13 improves .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

Bug fixes:

  • 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()

Have fun with the software! -- Moritz

v2.12

4 months ago

Thank you for using FluidX3D! Update v2.12 significantly reduces compile and startup time:

  • if make is installed, source code compiling on Linux is now ~3x faster using multiple CPU cores, from ~15s to ~5s
  • simulation initialization for single-GPU simulations is ~40% faster now
  • simulation initialization for multi-GPU simulations is ~15% faster now

Bug fixes:

  • minor bug fix in Memory_Container::reset() function

Here is how launch time changed with FluidX3D versions: grafik Setup: 3D Taylor-Green vortices, single 384³ domain, D3Q19 SRT FP32/FP16S Hardware: Lenovo Y50-70, i7-4720HQ, 2x 8GB DDR3 1600 MT/s, GTX 960M 4GB

I had compared all previous versions and found v2.0 to introduce a big jump in startup time. This was due to changing LBM data field access from direct array access to domain decomposition indexing, which turned out as the main bottleneck during simulation startup. This is now fixed, with an indexing shortcut for single-GPU and pre-computing variables for multi-GPU indexing. Together with multi-core parallelization of initialization (v2.9) and faster buffer initialization (v2.11), launch time is now shorter than ever.

Have fun with the software! -- Moritz

v2.11

5 months ago

Thank you for using FluidX3D! I have recently upgraded my laptop from Windows 10 to bugged and bloated Windows 11 kubuntu Linux with the amazing KDE Plasma desktop, and wanted the same FluidX3D interactive graphics capabilities as on Windows. FluidX3D could already do interactive graphics on Linux since v1.4, but only in 720p windowed mode. Update v2.11 changes that, and also adds two more minor improvements:

  • interactive graphics on Linux are now in fullscreen mode too, fully matching interactive graphics on Windows in functionality and user interface
  • 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

Bug fixes:

  • fixed flickering with frustrum culling at very small field of view
  • fixed bug where rendered/exported frame was not updated when visualization_modes changed

Have fun with the software! -- Moritz

128

v2.10

6 months ago

Thank you for using FluidX3D! Update v2.10 contains improvents to rasterization performance:

  • improved rasterization performance via frustrum 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

Bug fixes:

  • 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

Have fun with the software! -- Moritz

v2.9

9 months ago

Thank you for using FluidX3D! The v2.9 update makes simulation startup a lot quicker, especially for large multi-GPU simulations:

  • 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
  • refactoring
  • added total runtime and LBM runtime to lbm.write_status()

Bug fixes:

  • 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

Let the cores go brrrr!

FluidX3D-v2 9


Have fun with the software! -- Moritz

v2.8

10 months ago

Thank you for using FluidX3D! The v2.8 update doesn't add too many new features, but finally more documentation, loads of refactoring and significant usability improvements:

  • finally added more documentation
  • cleaned up all sample setups in setup.cpp for much more beginner-friendly learning
  • added required extensions in defines.hpp as comments to all setups in setup.cpp
  • improved loading of composite .stl geometries, by adding an option to omit automatic repositioning of the mesh
  • 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
  • made Info/Warning/Error message labels colored
  • added Cessna 172 propeller airplane and Bell 222 helicopter setups to showcase how loading of composite .stl geometries and revoxelization of moving parts works
  • added Ahmed body setup as an example on how body forces and drag coefficient are computed; expect absolute forces to be too large by up to a factor 2, because even large resolution is not enough to fully capture the turbulent boundary layer in this case; a wall function is needed, I'll scan literature on it
  • added optional semi-transparent rendering mode (#define GRAPHICS_TRANSPARENCY 0.7f in defines.hpp)

Bug fixes:

  • 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 isosurface rendering of halo data in multi-GPU mode
  • reduced gap width between domains in Q-criterion isosurface rendering in multi-GPU mode
  • fixed crash/bug in local memory optimization in mesh voxelization kernel
  • 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 Info/Warning/Error message formatting for loading files

Some showcases of what v2.8 is capable of: (click on images to show videos on YouTube)


Have fun with the software! -- Moritz