Restart the fluid information where the code suddenly stops

Hello everybody;
I am using DEM coupling with LBM. In DEM, at every timestep, I can save the particle information, so that if my code suddenly stops, I can restart the particle information before the code corrupted. So I am wondering can I store fluid information at every timestep and then restart it ? Right now, I can only get the fluid information in vtk to visualize.
Thank you

1 Like

Hey Nina,
It is possible to create checkpoints (look in showcases->io-> checkpointing.cpp for an example) but doing so at every time step will significantly slow down your code. Depending on the size of your domain you can end up with some massive files that take a long time to write ( my checkpoint for example is 6gb ).


Hi Catsgomeow;
Thank you for replying me question. I looked at the example that you mentioned. They created a “.dat” file. I am wondering how can you restart your simulation from that file?
Thank you

Hey Nina,
it’s in the example as well

    // Load saved data from a previous simulation, if the initial time step
    //   is larger than zero.
    if (iniT>0) {
        //loadRawMultiBlock(lattice, "checkpoint.dat");
        loadBinaryBlock(lattice, "checkpoint.dat");
1 Like