With a novel "Esoteric-Pull" in-place streaming scheme, combined with FP32/FP16 mixed precision, the memory requirements for the Volume-of-Fluid lattice Boltzmann method is cut down from 181 to 67 Bytes/Node, about 1/3 of vanilla LBM.
This enables colossal resolutions. The simulation in the video is a d = 7 mm diameter terminal velocity (9.55 m/s) raindrop impact (D3Q19 SRT) at 20° inclination, simulated for 1.5 milliseconds. The box is 5d x 5d x 4.25d and the pool height is 2d. Velocity, density and fluid mass are solved at 253 million lattice points (668 x 668 x 568). The simulation requires 16 GB video memory. For reproducibility: The dimensionless numbers for this setup are Re = 63618, We = 8864, Fr = 36.44, Ca = 0.1393, Bo = 6.674.
Raytracing is done at 2560x1440 pixel resolution with 1-10 rays per pixel; 305 frames are generated. There was no more VRAM for a larger frame buffer. Combined simulation and rendering time is 50 minutes, of which simulation time alone is about 5 minutes.
Raindrop simulations: [ Ссылка ]
Volume-of-Fluid: [ Ссылка ]
Esoteric-Pull: [ Ссылка ]
FP32/FP16 mixed precision: [ Ссылка ]
FluidX3D: [ Ссылка ]
The simulation software used is FluidX3D, an OpenCL implementation of the lattice Boltzmann method. FluidX3D runs at peak hardware efficiency on the worlds fastest data-center GPUs (8799/5232 MLUPs/s on the Nvidia A100/V100 @ D3Q19 SRT FP32), on gaming GPUs and CPUs and it even runs my smartphone.
The rendering is done by FluidX3D as well, now with raytracing. Simulated light rays from the camera traverse the LBM lattice and check for intersections with the triangles that marching-cubes generates on-the-fly from the isovalues. Triangles never leave registers.
The 3D lattice that the LBM provides already is one of the ideal acceleration structures for raytracing. Any ray only has to check for possible intersections with iso-surface triangles contained within the traversed grid cells. This makes it - when the lattice is not too large - even run in real time on non-RTX GPUs.
FluidX3D is now built entirely on my open source OpenCL-Wrapper, reducing the entire code on the C++ side to about half. If you want to get into OpenCL yourself, look no further: [ Ссылка ]
#FluidX3D #OpenCL #Raytracing #GPU #LBM
Raytraced 250 Million Voxel Fluid Simulation (Radeon VII)
Теги
raindrop impactdrop impactraindropdropraincomputer simulationsimulationterminal velocitywaterFluidX3DMoritz LehmannProjectPhysXlattice Boltzmann methodlattice BoltzmannLBMCFDcomputational fluid dynamicsfluid dynamicsGPUOpenCLC++parallelizationfluidliquidfree surfacesurfacevolume of fluidvolume-of-fluidVoFfree surface LBMinterfaceMarching Cubessurface tensioncurvatureReynolds numberraytracingray tracingraytracerRTXreal time