FluidX3D 3.7 – a package for computational fluid dynamics that uses the lattice Boltzmann method (LBM) and OpenCL. The project is positioned as a high-performance and memory-efficient CFD package capable of running on GPUs and CPUs from different manufacturers via OpenCL.
The main change in version 3.7 is the optimization of the Q-criterion isosurface rendering kernel (graphics_q()), used for visualizing vortex structures in the flow. In the previous implementation, the kernel loaded a heavy template of 32 three-dimensional speeds for each grid cell from video memory. Now, a thread group of size 8×8×8 loads a block of 11×11×11 speeds into 16 KB of first-level local memory, after which neighboring threads reuse this data. According to the author, this reduces the number of loads from VRAM by about 12 times — down to 2.6 speeds per cell — and shifts the kernel from a memory bandwidth-limited mode to a compute-limited mode.
Practical gains depend on the specific hardware. On newer GPUs with advanced caching systems, manual optimization of local memory may yield little or no gain, or even slightly reduce frame rates. On some older GPUs, the author recorded performance boosts of up to two times, which is especially noticeable in the interactive graphics mode of FluidX3D. For instance, in published tests, the NVIDIA Titan Xp accelerated from 7 to 13 frames/s, Intel UHD 770 — from 8 to 14 frames/s in one mode, and the Intel Arc A750 — from 22 to 26 frames/s.
For older integrated GPUs, there is an automatic fallback to the previous implementation: some such devices do not support thread groups of size 512 or have less than 16 KB of L1 local memory. In these cases, FluidX3D will continue to use the old kernel variant to maintain compatibility.
This version also simplifies the conditions for VR rendering, disables loop unrolling in rasterization to reduce 'spaghetti' in the assembly output, introduces micro-optimizations in convert_triangle/_interpolated(), and fixes error output in the OpenCL adapter when the kernel name is empty and the thread group size is specified.
FluidX3D features a built-in interactive 3D renderer that allows you to visualize velocity fields, streamlines, Q-criterion isosurfaces, and slices in real-time during calculations, without the need to export to a separate post-processing tool. FluidX3D The project also claims to support free surface, thermal convection, Smagorinsky-Lilly turbulence models, particle tracking, VTK export, and multi-GPU operation.
It is worth noting the licensing status: the source code of FluidX3D is open and available on GitHub, however, the project license is not considered free in the strict OSI/FSF sense. It allows use for public research, education, and personal purposes, but prohibits commercial and military applications, as well as training AI models on the source code.
Source: linux.org.ru
