If an Aspherix or CFDEMcoupling simulation is aborted unexpectedly, it is possible to restart it from the last completed timestep if corresponding restart files are available. Aspherix writes restart file on aborts, which can be used to continue the DEM calculation.
How does Aspherix/CFDEMcoupling write restart files?
By default, CFDEMcoupling triggers Aspherix restart files to be written whenever CFD results are. The behavior is configured by the writeAsx command model in CFDEMcoupling.
By default, restart file location and naming convention is:
../DEM/restart/aspherix.restartCFDEM_<time>Before attempting a restart of a coupled simulation, you may want to backup your simulation, including restart files and results.
How do I restart a CFDEMcoupling simulation?
1. Choose a time for restart
Depending on why your simulation failed you may want to restart from the last available snapshot or further back in history (e.g. when the simulation diverged).
Determine and locate the corresponding restart file on the DEM side.
2. Create a restart input script
Create a copy of your original run script and use this copy specifically for restarting the simulation.
In the copied script, replace the original:
simulation_domain/readwith the appropriate read command for the restart file corresponding to the last completed timestep.
Do not use the keyword reset_timestep.
The restart should continue from the timestep stored in the restart file rather than resetting the DEM timestep.
3. Update startTime in controlDict
Set the startTime in the CFD controlDict to the desired time to start from. Also make sure to use startFom startTime; (the default) and not latestTime
4. Update the job submission script
If you are using Slurm or another job scheduler, update the submission/start script so that it uses the new restart input script instead of the original run script. This also holds if you are using the Autorun script.
Notes of caution
It is very easy to start the CFD and DEM from different snapshots if not being careful with this workflow. If you accidentially start from different snapshots your CFD and DEM results at that time do not match. This may lead to invalid physics, wrong results or an unstable problem due to excessive forces being generated.
Most importantly, if the simulation continues for long enough, this mistake may corrupt existing results and restart files.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article