rescontrol#
- MiscLoads.rescontrol(action='', ldstep='', frequency='', maxfiles='', maxtotalfiles='', filetype='', **kwargs)#
Controls file writing for multiframe restarts.
Mechanical APDL Command: RESCONTROL
- Parameters:
- action
str Command action:
DEFINE- Specifies how often.xnnnrestart files (default) or.rdnnremeshing database files (for nonlinear mesh adaptivity analysis) are written for a load step. The file type controlled by this command is determined byFiletype.FILE_SUMMARY- Prints the substep and load-step information for all.xnnnor.rdnnfiles for the current jobname in the current directory. If specified, all other arguments are ignored.STATUS- Issuing the command lists the current status in the tables of restart controls specified previously by rescontrol. If this option is specified, all other arguments are ignored.NORESTART- Cleans up some of the restart files after a distributed-memory parallel (DMP) solution. (Not valid for nonlinear mesh adaptivity.)The master process will not have the following files in the working directory at the end of the run:
.esav,.osav,.xnnn,.rdb,.ldhi. The worker processes will not have the following files in the working directory at the end of the run:.esav,.osav,.xnnn,.rst(or.rth, etc.). Some restart files are never written, some are removed upon exiting the solution processor (for example, upon finish ), and some are removed upon exiting the program.This option is useful for cleaning up files written by all distributed processes, especially when you know that these restart files will not be needed later. If this option is specified, all other arguments are ignored.
If this option is used in a shared-memory parallel (SMP) environment, most restart files in the working directory are removed. It has the same effect as issuing rescontrol,,NONE.
LINEAR- Same asAction= DEFINE, but for linear static applications only. For a linear static analysis, the restart capability is normally not needed; however, it is typically needed when a subsequent linear perturbation analysis is desired. By default, none of the restart files are written for a linear static analysis.DELETE- Delete the restart control specification corresponding to theLdsteplabel on a previous rescontrol,DEFINE command.
- ldstep
str Specifies how the
.xnnnor.rdnnfiles are written for the specified load steps. This option also affects how often the load history information is written to the.ldhifile.ALL- Write the.xnnnor.rdnnfiles at the same substepFrequencyfor all load steps; write the load history information to the.ldhifile for all load steps. For.rdnnfiles, this option is the default.LAST- Write the.xnnnor.rdnnfiles for the last load step only; write load- history information to the.ldhifile for the last load step only. This option is the default for nonlinear static and full transient analyses for.xnnnfiles. If specified, all remaining arguments are ignored.N- Number that indicates how often the.xnnnor.rdnnfiles are written.Input a positive number to write the
.xnnnor.rdnnfiles at the substepFrequencyindicated only for load stepN. Other load steps will be written at the default substep frequency or at a frequency defined by a previous rescontrol specification. Load- history information is written to the.ldhifile only for load stepsN.Specifying a negative number (-
N) is valid for controlling.xnnnfiles only. The files are written for everyNth load step at the specified substepFrequency. The load history information is written to the.ldhifile everyNth load step. This option is suitable for restart applications in which more than a few hundred load steps are required. Compared to the ALL and positiveNoptions, it can save disk space, as the.ldhifile is smaller and fewer.xnnnfiles are written.If
Ldstep= -N, all otherLdstepoptions specified by rescontrol are ignored and the program follows the -Noption (write load history information everyNth load step). If you want to change this pattern, issue rescontrol,DELETE, -N, then issue another rescontrol command with the desiredLdstepoption.NONE- No multiframe restart files (.rdb,.ldhi,.xnnn) are created. (Not valid for nonlinear mesh adaptivity analysis.)This option is the default for mode-superposition analyses. The remaining arguments are ignored.
For nonlinear static, linear static, and full transient analyses, this option enables a restart to occur at the last or abort point (using the
.emat,.esavor.osav, and.dbfiles).For mode-superposition transient analyses, this option allows a restart from the last point using the
.rdspand.dbfiles.
- frequency
str Frequency at which the
.xnnnfiles are written at the substep level, or at which the.rdnnfiles are written at the remeshing level:NONE- Do not write.xnnnfiles for this load step (not available for.rdnnfiles).LAST- Write the.xnnnfiles for the last substep of the load step only (default for nonlinear static and full transient analyses), or write the.rdnnfiles for the last remesh of the load step only (default for nonlinear mesh adaptivity analysis).N- IfNis positive, write the.xnnnfiles at everyNth substep of a load step, or write the.rdnnfiles at everyNth remesh of a load step.If
Nis negative (not valid for.rdnnfiles), writeNequally spaced.xnnnfiles within a load step.In nonlinear static and full transient analyses,
-Nis valid only when automatic time stepping is enabled ( autots,ON).In mode-superposition analyses, negative
Nis always valid.
- maxfiles
intorstr Maximum number of
.xnnnfiles to save within a load step ( not available for.rdnnfiles):-1- Overwrite existing.xnnnfiles (default). The total maximum number of.xnnnfiles for one run is 999. If this number is reached before the analysis is complete, the program will reset the.xnnnfile numbering back to 1 and continue to write.xnnnfiles; the program keeps the newest 999 restart files and overwrites the oldest restart files. For this option, the maximum number of files can be changed to a number less than 999 by setting the MAXTotalFiles argument.0- Do not overwrite any existing.xnnnfiles. The total maximum number of.xnnnfiles for one run is 999. If this number is reached before the analysis is complete, the analysis continues but no longer writes any.xnnnfiles.N- Maximum number of.xnnnfiles to keep for each load step. WhenN.xnnnfiles have been written for a load step, the program overwrites the first.xnnnfile of that load step for subsequent substeps.Nmust be <= 999. If a total of 999 restart files is reached before the analysis is complete, the analysis continues but writes no additional.xnnnfiles.
- maxtotalfiles
str Total number of restart files to keep. Default = 999 for
.xnnnfiles and 99 for.rdnnfiles. This option is valid only whenMAXFILES= -1 (default).Valid
MAXTotalFilesvalues are 1 through 999 for.xnnnfiles, and 1 through 99 for.rdnnfiles.When the total number of restart files written exceeds
MAXTotalFiles, the program resets the.xnnnor.rdnnfile numbering back to 1 and continues to write.xnnnor.rdnnfiles. The newest files are retained and the oldest files are overwritten.The
MAXtotalFilesvalue specified applies to all subsequent load steps. To reset it to the default, reissue the command withMAXTotalFiles= 0 or some negative value.If
MAXTotalFilesis set to different values at different load steps, and if the value ofMAXTotalFilesspecified in the prior load step is larger than that of the current load step, the program can only overwrite the current number of maximum restart files up to the numberMAXTotalFilescurrently specified (which is smaller than the previous number).The recommended way to control the maximum number of restart files is to specify
MAXTotalFilesat the first load step and not vary it in subsequent load steps. Also,MAXTotalFilesis best used whenLdstep= -Nor ALL.- filetype
str The type of restart file to be controlled by this command. Valid only when
Action= DEFINE:XNNN- Control.xnnnfiles (default).RDNN- Control.rdnnremeshing database files. Needed only for a nonlinear mesh adaptivity analysis.
- action
Notes
rescontrol sets up the restart parameters for a multiframe restart, enabling you to restart an analysis from any load step and substep for which there is an
.xnnnfile. You can perform a multiframe restart for static and transient (full or mode-superposition method) analyses only. For more information about multiframe restarts and descriptions of the contents of the files used, see Restarting an AnalysisSyntax
Multiframe restart files are generically indicated here as
.xnnnfiles. They correspond to.rnnnfiles for nonlinear static and full transient analyses, and.mnnnfiles for mode-superposition analyses.Remeshing database files are indicated as
.rdnnfiles. This type of restart file is needed only after remeshing during a nonlinear mesh adaptivity analysis.When
Action= DEFINE, the specifiedFiletypedetermines the type of file (.xnnnor.rdnn) controlled by this command.
Number of Restart Files Allowed
The total number of restart files for any analysis cannot exceed 999 (for example,
jobname.r001tojobname.r999).The total number of remeshing database files cannot exceed 99 (for example,
jobname.rd01tojobname.rd99).
Considerations for Nonlinear Mesh Adaptivity Analysis
To control both
.xnnnand.rdnnfile writing (Filetype= XNNN andFiletype= RDNN, respectively), separate rescontrol commands are necessary.Action= NORESTART andLdstep= NONE are not valid and will cause the analysis to fail.Ldstep=-Nis not valid for controlling.xnnnfiles.
Limiting the Number of Files Saved
If you have many substeps for each load step and are writing
.xnnnfiles frequently, you may want to setMAXFILESto limit the number of.xnnnfiles saved, as they can fill your disk quickly.You can specify
MAXFILESandFrequencyfor individual load steps. These arguments take on the default value or the value defined by rescontrol,,ALL,Frequency,MAXFILESif they are not explicitly defined for a specific load step.When
.xnnnfiles are written over many load steps, you may want to further limit the number of.xnnnfiles by settingMAXTotalFiles.
Maximum Number of Load Steps
You can specify a maximum of ten load steps; that is, you can issue the rescontrol,,N command a maximum of ten times. Specified load steps cannot be changed in a restart.
Specifying
Ldstep= LAST or-NThe program accepts only one occurrence of rescontrol with
Ldstep= LAST. If you issue rescontrol,,LAST,Frequency,MAXFILESmultiple times, the last specification overwrites the previous one.The program accepts only one occurrence of rescontrol with a negative
Ldstepvalue ( rescontrol,NwhereNis a negative number). If you issue rescontrol multiple times with a negativeLdstepvalue, the last specification overwrites the previous one.
Using rescontrol in a Restarted Analysis
The rescontrol command is not valid in the restarted load step of a restart analysis. It is only valid in subsequent load steps.
Example Usage