Restarting CFD-DEM simulations

Submitted by Somnath on Wed, 03/14/2012 - 20:58

Hello,

Can I restart CFD-DEM simulations from the latest Time (by simply changing controlDict)?

My restarted simulations run into an error immediately even though the simulations run correctly if started from time 0. I am also saving the liggghts restart files and reading from the correct restart file when I am trying to restart. Has anyone faced similar problems or knows how to restart a simulation?

I am attaching below a sample output before the code crashes. Please note that timestepfraction() is ~8000 !! My DEM TS is 1e-7, coupling interval is 250 and CFD TS is 5e-6 (< DEM TS*Coupling interval).

Thanks
Som

-----------------------------
Starting time loop

Time = 0.200005

Courant Number mean: 0.000417756 max: 0.00078361
- evolve()
Starting up LIGGGHTS
Executing command: 'run 250 '
run 250 Setting up run ...
Memory usage per processor = 9.8737 Mbytes
Step Atoms KinEng 1 ts[1] ts[2] Volume
2000001 9 4.8094643e-11 0 0 0 4e-06
2000251 9 4.8096229e-11 0 0 0 4e-06
Loop time of 0.00359244 on 2 procs for 250 steps with 9 atoms

Pair time (%) = 0.000469663 (13.0737)
Neigh time (%) = 0 (0)
Comm time (%) = 0.000986948 (27.4729)
Outpt time (%) = 1.54546e-05 (0.430198)
Other time (%) = 0.00212038 (59.0233)

Nlocal: 4.5 ave 9 max 0 min
Histogram: 1 0 0 0 0 0 0 0 0 1
Nghost: 1.5 ave 3 max 0 min
Histogram: 1 0 0 0 0 0 0 0 0 1
Neighs: 6 ave 12 max 0 min
Histogram: 1 0 0 0 0 0 0 0 0 1

Total # of neighbors = 12
Ave neighs/atom = 1.33333
Neighbor list builds = 0
Dangerous builds = 0
LIGGGHTS finished

timeStepFraction() = 8000.2
evolve done
update Ksl.internalField()
DILUPBiCG: Solving for Ux, Initial residual = 0.00011336, Final residual = 2.75461e-10, No Iterations 1
DILUPBiCG: Solving for Uy, Initial residual = 0.000113347, Final residual = 3.41618e-10, No Iterations 1
DILUPBiCG: Solving for Uz, Initial residual = 4.30956e-05, Final residual = 2.68347e-10, No Iterations 1
ExecutionTime = 0.59 s ClockTime = 1 s

Time = 0.20001

Courant Number mean: 0.000417756 max: 0.00078361
- evolve()
Starting up LIGGGHTS
Executing command: 'run 250 '
run 250 Setting up run ...
Memory usage per processor = 9.8737 Mbytes
Step Atoms KinEng 1 ts[1] ts[2] Volume
2000251 9 4.8096229e-11 0 0 0 4e-06
2000501 9 4.8099861e-11 0 0 0 4e-06
Loop time of 0.00471149 on 2 procs for 250 steps with 9 atoms

Pair time (%) = 0.000467007 (9.9121)
Neigh time (%) = 0 (0)
Comm time (%) = 0.00114839 (24.3742)
Outpt time (%) = 1.79869e-05 (0.381766)
Other time (%) = 0.00307811 (65.3319)

Nlocal: 4.5 ave 9 max 0 min
Histogram: 1 0 0 0 0 0 0 0 0 1
Nghost: 1.5 ave 3 max 0 min
Histogram: 1 0 0 0 0 0 0 0 0 1
Neighs: 6 ave 12 max 0 min
Histogram: 1 0 0 0 0 0 0 0 0 1

Total # of neighbors = 12
Ave neighs/atom = 1.33333
Neighbor list builds = 0
Dangerous builds = 0
LIGGGHTS finished

timeStepFraction() = 7999.4
evolve done

cgoniva's picture

cgoniva | Thu, 03/15/2012 - 20:06

Hi Som,

currently it is not possible to simply restart the simulation.

Of course it should be possible to realize that, but it is not on our agenda of the next months.

(needless to say that you can start a coupled simulation with a LIGGGHTS restart file, see e.g. ErgunTestMPI)

Cheers,
Chris

evansmuts | Fri, 03/16/2012 - 11:07

Hi Chris

I have also been thinking about restarting CFDEM simulations as it would allow me to changes setting as my simulation goes along.

What would have to be done to get CFDEM to work with a restart? What would need to be added to the code?

Cheers
Evan

cgoniva's picture

cgoniva | Tue, 03/20/2012 - 06:58

Hi Evan,

I've tried a long time ago to realise that and skipped the effort as it was not urgent.
Most thingngs should be there allready as both LIGGGHTS and OF can restart. I'll try to have a look within the next days.

Cheers,
Chris

evansmuts | Mon, 03/26/2012 - 11:57

Thanks for taking another look Chris.

If you are too busy, then maybe I can always try? I just don't know where to start (I will have to spend more time thinking about it).

Cheers
Evan

paul | Fri, 02/01/2019 - 16:12

Yes. Make sure both CFDEMcoupling/OpenFOAM and LIGGGHTS both read their respecting latest time / restart data.

yirenxindudu | Wed, 02/06/2019 - 13:09

Thank you! but when a calculation is running, if you force to stop the run by CTRL+C, and it seems that not possible to restart the run.
Even one can replace the file of DEM/post/restart/liggghts.restart by liggghts.restartCFDEM (store in the last coupling run), the openfoam side can only start with the latest calculation data stored in CFD/, note that the calculation data were not stored in the same time.
Regards,
Hanqiao

alice's picture

alice | Wed, 02/06/2019 - 14:09

Hello Hanqiao,

you mention an important point: if you abort a simulation using ctrl+c it is possible that the liggghts restart file and the latest available CFD data do not match. If you really need this you can trigger LIGGGHTS restart files at every coupling step. You will then always be able to find matching data for a restart, but please note that restart files are not small, and that a lot of unnecessary data is saved that way.

Cheers,

Alice

yirenxindudu | Thu, 02/07/2019 - 08:01

Dear Alice,

Thank you very much!

regards,
Hanqiao