ProjectPhysX / FluidX3D

The fastest and most memory efficient lattice Boltzmann CFD software, running on all GPUs via OpenCL. Free for non-commercial use.
https://youtube.com/@ProjectPhysX
Other
3.88k stars 308 forks source link

Capture small structure to make more real #70

Closed randomwangran closed 1 year ago

randomwangran commented 1 year ago

I still feel we missing something to make more real. How to push the boundary more?

image

image

image

Ref: https://www.youtube.com/watch?v=pZwtBEdYNIE&ab_channel=TheSlowMoGuys

ProjectPhysX commented 1 year ago

I know that Slow Mo Guys video, very cool! Such high-speed impacts need super high resolution to capture the microscopic droplets and at the same time the large domain overall, which in turn needs hundreds of GB of VRAM. Largest free surface simulation I've done so far is a high-speed raindrop impact at 8 billion cells (~2000³ grid) in 512GB VRAM across 8 MI200 GPUs. Raytracing graphics is restricted to single GPU; here is the raindrop at 1 billion cells (~1000³ grid) with raytracing, on a single MI200 64GB.

The small feature demo in my video is at very low resolution, 0.003 billion cells (96x352x96), requiring only 170MB of VRAM. This is small enough to run interactively in real-time with fancy raytracing graphics (1x reflection, 2x refraction, 7 rays/pixel), on a 6-year-old Titan Xp GPU. Much larger resolution is possible (0.192 billion cells in 12GB) if you give the software a couple hours.

Full resolution at bullet velocity impact is still out of reach, even on a large supercomputer. 2x finer grid resolution requires 8x the VRAM capacity and 16x the compute time. FluidX3D is already optimized for smallest possible memory footprint, but I'm still having an eye on new developments. Dynamic adaptive grid refinement would be the holy grail of CFD, but is super complicated to pull off on GPU.

randomwangran commented 1 year ago

@ProjectPhysX Thanks for bringing this case actually into our attention. I check out the research paper of in your reference: https://microplastics.springeropen.com/articles/10.1186/s43591-021-00018-8 Additional file 3: figure-12a.mp4 (Great job in Fig. 1)

One thing you probably notice is that compared to the slow motion guy, this experimental study is too fast for us to do a real comparison.

I also noticed that they also did a water droplet experiment and kind of showing different patterns when the water recover. So I was wondering if the code is able to capture this kind of physical phenomena? https://youtu.be/cNI-LIVs-to?t=44