write_data and read_data for restarting cfdem simulation

Submitted by atul2018 on Thu, 12/23/2021 - 15:27

Dear All

I tried t o use wrire_restart and read_restart to restart my cfdem simulation from last time steps which gets killed due to time limit by cluster. However, I figure out that write_restart has several bugs and one of them is that it writes the restart file at every DEM time step (but first restart file is written at cfd write interval (desired) then it starts to write every DEM time step (not desired)) rather than every cfd write interval. Due to this the restarting time of CFD and DEM side are different which causes the main problem in restarting CFDEM simulations, thus produces some error.

I found that one can use write_data and read_data to do the same. But I could not find how can I specify at what interval tha data should be written? Obviously, I can use '*' to write at every time steps but in this case i will have the same problem as data written for DEM side will not match the data written for CFD side (different restarting point for CFD and DEM side).

Another problem is where one should put write_data command in liggghts script (in.liggghts_run/in.liggghts_restart). It seems that it doesn't matter wherever you write this command (before run 0), it produces the data file before the simulation starts (not the updated data as simulation proceeds), i.e. only data file is generated for time step 0. When this command is put after run 0, it doesn't write anything.

I got stucked here since weeks but no success. I would be grateful if I can get some expert advice.

Best Regards
Atul

RussellHolt | Tue, 02/08/2022 - 14:24

Hi Atul

You need to use the 'restart' command to write restart files at x timesteps, for example

"restart 50000 post/restart/liggghts.restart"

This will write a restart file every 50000 steps in the folder post/restart/

Hope this helps!

see here for more details: https://www.cfdem.com/media/DEM/docu/restart.html