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

How to save and resume simulations? #119

Closed rodionstepanov closed 10 months ago

rodionstepanov commented 10 months ago

It seems I can save current data with lbm.rho.write_device_to_vtk(); lbm.u.write_device_to_vtk(); but how to read it in order to continue simulation form the save data?

ProjectPhysX commented 10 months ago

Hi @rodionstepanov,

this is not (yet) possible. Full checkpoints would need storing the density distribution functions too, basically a full dump of VRAM, which means checkpoints would be gigantic in file size. And extension support would be rather complicated. Since simulation runtime is a only few hours at most, I decided not to implement checkpoints in the near future.

Regards, Moritz

rodionstepanov commented 10 months ago

Hi @ProjectPhysX ! Thanks for explanation. I agree the full checkpoints is too expensive but why don't take velocity field form stored data file and generate the density distribution functions as for an initial state?

ProjectPhysX commented 10 months ago

Yes you can do that, use the .vtk output of one simulation as starting conditions for another. A .vtk loading/import function is not yet implemented but you can reverse-engineer the write_vtk() storing/export function.