SAVE

The SAVE command stores the current Adams Solver (FORTRAN) model and simulation conditions or only the current simulation states. This allows you to return to the model or states at a later time using the RELOAD command.
 

Format

Arguments

 
AUTOSAVE=i
Indicates that Adams Solver (FORTRAN) is to save the simulation states every i output steps. Each subsequent SAVE command overwrites the previous one. Setting AUTOSAVE to zero turns AUTOSAVE off.

Range: i > 0
FILE=C
Specifies the complete file name where Adams Solver (FORTRAN) writes the SAVE command information. The file name may include the directory on operating systems that support such path names, such as Linux. There is no default extension for this file.

Range: All printable characters except “!”, “;”, “,” and “&”
STATES
Specifies Adams Solver (FORTRAN) to save just the current simulation time and state values (displacements, velocities, force values, user-defined variable values, etc.). The RELOAD/STATES command can later reload these states to restart the simulation from this point.
SYSTEM
Specifies Adams Solver (FORTRAN) to save the entire current system, including the model definition (parts, markers, joints, and so on), simulation time and state values (displacements, velocities, force values, user-defined variable values, and so on) and solver data (integrator parameters, state derivatives, and so on). SYSTEM creates a complete record of the current model and simulation conditions. The RELOAD/SYSTEM command can later reload this record to return to these model and simulation conditions.

Extended Definition

You can use the SAVE command with the STATES argument to save the current simulation time and state values, including displacements, velocities, force values, and user-defined variable values. You can later restart a simulation from this point by reloading the states with the RELOAD/STATES command. When you reload this file, Adams Solver (FORTRAN) resets the simulation time to the saved value and uses the saved states as initial conditions for the next simulation.
You may use the SAVE command with the SYSTEM argument to save the entire current system, including the model definition (parts, markers, joints, and so on), simulation time and state values (displacements, velocities, force values, user-defined variable values, and so on), and solver data (integrator parameters, state derivatives, and so on). SAVE/SYSTEM creates a complete record of the current model and simulation conditions. You can later return to this point by reloading the conditions using the RELOAD/SYSTEM command.
When you reload a system file, Adams Solver (FORTRAN) completely resets all model, simulation, and solver data to that stored in the file. Except for interactive plotting, Adams Solver (FORTRAN) responds to subsequent commands just as it would have at the time the file was saved. (Since past simulation results are not stored in the save file, they cannot be plotted when the file is restored.)
 
Tip:  
You can use the AUTOSAVE=i argument feature to “checkpoint” a difficult simulation at the specified interval. If the simulation fails, you can debug it by restarting the simulation from the last saved step. This is very similar to the OUTPUT/ICSAVE-EXEC/ICSTART capability which the SAVE/RELOAD command now supersedes.
Caution:  
The AUTOSAVE=i argument function continually overwrites the information in the specified file. Therefore, this file contains only one set of states. For multiple files, you need to specify multiple times with different file names with the SAVE command.
Files are saved in a machine- and code-dependent binary format. They are not portable across platforms or between versions of Adams Solver (FORTRAN).
Results are unpredictable if saved states are restored to different models from those that existed at the time of the save.
The OUTPUT/ICSAVE-EXEC/ICSTART combination is now obsolete and is removed from a future version of Adams Solver (FORTRAN).
Adams Solver (FORTRAN) turns AUTOSAVE off if you ACTIVATE an element, DEACTIVATE an element, or modify an SFORCE, MARKER, or MOTION.
Models containing nonlinear flexible bodies are not supported by the [SAVE/RELOAD] command.

Examples

SAVE/SYSTEM,FILE=BASE1.SAV
This SAVE command saves the current model and simulation information in file BASE1SAV. When this file is reloaded with the RELOAD command, Adams Solver (FORTRAN) returns to this exact configuration.
SAVE/STATES,AUTOSAVE=10,FILE=AS.SAV
This SAVE command saves the simulation states in file AS.SAV at every tenth output step. When this file is reloaded, Adams Solver (FORTRAN) resets the current model with the saved states.
Used with other interactive Adams Solver (FORTRAN) commands, SAVE and RELOAD can help simulate several versions of the same model. SAVE/SYSTEM creates a baseline configuration which you can then reload and simulate repeatedly without leaving Adams Solver (FORTRAN). After each RELOAD/SYSTEM, you may modify the model. This can be done by using the ACTIVATE and DEACTIVATE commands to switch sets of loads on and off, for example.
The following command file uses the SAVE/SYSTEM and RELOAD/SYSTEM commands to run three simulations from the same input file, creating three sets of output files: case1, case2, and case3. The command file loads example.adm, the original model, which contains three sets of forces. After deactivating all the forces and performing a static solution, the SAVE command saves the whole system. ACTIVATE commands then turn on one set of forces at a time.
Between simulations, the RELOAD command restores the saved version of the model. Reloading the save file returns the model to the conditions at the time of the save. In this case, the saved version of the model is at static equilibrium with all the forces inactive.
 
example
 
case1
 
dea/sfo,id=101,102,201,202,301,302
! Deactivate all forces
sim/static
! Find static equilibrium
save/system, file=ex.sav
! Save system at static, no forces
act/sfo, id=101,102
! Activate first set of forces
sim/dyn, end=.25, steps=100
! Simulate
rel/system, file=ex.sav, out=case2
! Reload(now back at static,no forces)
act/sfo, id=201,202
! Activate second set of forces
sim/dyn, end=.05, steps=20
! Simulate
rel/system, file=ex.sav, out=case3
! Reload(now back at static,no forces)
act/sfo, id=301,302
! Activate third set of forces
sim/dyn, end=.10, steps=40
! Simulate
stop
 
See other Simulation available.