Restarting a simulation
Description
This text describes how to consecutively Aspherix® simulations that depend on each other.
Introduction
There are several reasons for splitting a simulation in several parts: one could either separate initializing steps and different production or process phases, it can turn out that more simulation time is needed after stopping the calculation in the first place, or one could simply use a state as starting point for different investigations. Furthermore it is possible that a simulation was stopped forcefully and should be continued. In this section we provide different solutions for all of these scenarios.
Detailed description
Technically, there are three ways for continuing Aspherix® simulations:
Multiple simulate commands in an input script: this option is often used when commands should be disabled or changed throughout a process (e.g., when a geometry motion stops or starts at some point).
Binary restart files: the write_restart command can be used to write the current status of a simulation, the restart command does this continuously throughout a simulation. The first one is usually used at the end of a simulation, so that the calculation can be re-started from its final state, whereas the restart command is used to write “safety-restart-files” at defined times. When a calculation is cancelled, an automatic restart file is written. Binary restart files can be converted to data files in text format using aspherix with the command-line switch -r (see example below).
Text data files: the write_data command can be used to save the current state of the simulation in text format. Because a data file is in text format, the initial state of the new run will be slightly different than the final state of the old run (when the file was written) which was represented internally by Aspherix® in binary format. More exact restarts can certainly be obtained with the binary restart files.
Both binary and text restart files can be loaded with the read command. The particle_shape, the simulation domain and the units do not have to not have to be re-defined. Please note that while the internal state of the simulation is stored in the restart file, most material properties and simulation settings are not saved in the restart file. Be careful when changing settings and/or material parameters when restarting a simulation.
Conversion of binary restart file to data file in text format:
aspherix -r tmp.restart.50 tmp.restart.data
If a simulation that is launched from a restart file should start from time 0, please use the reset_timestep keyword in the read command. Alternatively, he reset_timestep command can be used.
Tutorial cases
Tutorials that use restart files (binary and data files) can be found here:
examples/solver/insertion/insert_stream
examples/solver/post_processing/contact_test
Questions?
If any questions remain, contact us.