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.77k stars 300 forks source link

Larger and faster simulations with adaptive domains? #128

Closed JohnnyRacer closed 9 months ago

JohnnyRacer commented 9 months ago

Hello, I was wondering if it is possible to add an adaptive grid to optimize large simulation domains since not all the details of the grid need to be the same size. This could really help with large simulations that would usually take a long time. This was implemented by SpaceX for their rocket engine simulation and presented at GTC here . I think this would be a powerful feature to have in the future if it can be implemented.

ProjectPhysX commented 9 months ago

Hi @JohnnyRacer,

I have thought about dynamic adaptive resolution many times, and I know that SpaceX presentation on their 2D prototype. In 3D it's a game-changer for many cases, but also an implementation nightmare on GPU. You need splitting/merging of coarse/fine cells, make sure it's only 1 resolution layer change between neighbor cells, handle streaming at coarse/fine interface with indirect addressing, reorder cells in memory, and for every finer level compute 2x the number of time steps. It's a multi-year effort I'm not yet willing to take.

I'll keep it in mind, but close this as "not planned" for now, as there is some more urgent construction sites to finish.

Kind regards, Moritz