5.8. Restarting an Analysis

Occasionally, you may need to restart an analysis after the initial run has been completed. Two different restart procedures are available:

The following examples illustrate cases where a restart may be necessary:

  • More load steps must be added to the analysis (multiframe restart).

  • There are additional loading conditions in a linear static analysis or additional portions of a time-history loading curve in a transient analysis (multiframe restart).

  • To recover from a convergence failure in a nonlinear analysis (multiframe restart).

  • To do a linear perturbation analysis (multiframe restart). See General Procedure for Linear Perturbation Analysis for details.

  • To generate load vectors, residual vectors, or enforced motion pseudo-static shapes for a subsequent mode-superposition analysis or spectrum analysis (modal analysis restart).

The multiframe restart can resume a job at any point in the analysis for which information is saved, allowing you to perform multiple analyses of a model and giving you more options for recovering from an abnormal termination. The program allows a multiframe restart for static and transient (full or mode-superposition method) analyses. For analyses using distributed-memory parallel (DMP) processing, multiframe restarts are supported for nonlinear static, full transient and linear perturbation analyses.

The modal analysis restart can be used to do additional calculations after the eigensolution. Modal extraction typically requires more computing time than element loads generation, residual vector generation, and enforced static modes calculation. Reusing eigenmodes that have already been generated can save significant time in a downstream analysis.

5.8.1. Multiframe Restart

To perform a multiframe restart, the model must meet the following conditions:

  • The analysis type must be static (steady-state), harmonic (2D magnetic only), or transient (full or mode-superposition method only). No other analysis types can be restarted.

  • At least one iteration must have been completed in the initial run.

  • The initial run should not have stopped abnormally due to a system-level problem.

  • The initial analysis, which generated the restart files, and the restarted analysis must be performed with the same version of Mechanical APDL.

For nonlinear static and full transient analyses, the program sets up the parameters for a multiframe restart by default.

Multiframe restart allows you to save analysis information at many substeps during a run, then restart the run at one of those substeps. Before running the initial analysis, use the RESCONTROL command to set up the frequency at which restart files are saved within each load step of the run.

When restarting a job, use the ANTYPE command to specify the restart point and type of restart. You can continue the job from the restart point (making any corrections necessary), or terminate a load step at the restart point (rescaling all loading) and continue with the next load step.

The following example input shows how to set up the restart file parameters in an analysis then restart the analysis, continuing from a specified load step and substep.

Example 5.1: Setting Up Restart File Parameters and Restarting the Analysis

/prep7  
et,1,182,,,	         !Define nodes and elements
mp,ex,1,10
mp,alpx,1,0.1
mp,alpy,1,0.1
mp,alpx,1,0.1
mp,nuxy,1,0.2
n,1 
n,2,1   
n,3,1,1 
n,4,,1  
n,5,2
n,6,2,1
e,1,2,3,4   
e,2,5,6,3
finish


/solu
rescontrol,,all,1,5    !For all load steps, write the restart
                       !file .Rnnn at every substep, but allow
                       !a maximum of 5 restart files per load step
nlgeom,on          !Large strain analysis with temperature loadings
nsubst,6,6,6
d,1,all
d,2,uy
outres,all,all
bfe,1,temp,1,1
bfe,2,temp,1,5
solve
rescontrol,file_summary  !List information contained in all the
                         !.Rnnn files for this job
finish
/post1
set,1,3
presol
set,last
presol
finish


/solu
antyp,,rest,1,3   		 !Restart the analysis at load step 1,
                  		 !substep 3
solve
rescontrol,file_summary
finish
/post1
set,last
presol
finish

/solu
antype,,rest,1,3,endstep !End load step 1 at substep 3
                         !when time (load factor) = 0.5
                         !ldstep = 1, substep = 3, load
solve                    !execute ENDSTEP, loads are 
                         !rescaled to time = 0.5
rescontrol,file_summary
bfe,1,temp,1,2           !apply higher loads, 
bfe,2,temp,1,6				
solve                    !execute solve to advance load
                         !factor from previous 
                         !time = 0.5 to time = 1.5
/post1
set,last
presol
finish 

The following example input shows how to terminate a load step at a particular substep, then continue with the next load step.

Example 5.2: Terminating a Load Step and Continuing with Next Load Step

/solu
antype,,rest,1,3,endstep !End load step 1 at substep 3
                         !when time (load factor) = 0.6125
                         !ldstep = 1, substep = 3, load
solve                    !execute ENDSTEP, loads are 
                         !rescaled to time = 0.6125
rescontrol,file_summary
bfe,1,temp,1,2           !apply higher loads, 
bfe,2,temp,1,6				
solve                    !execute solve to advance load
                         !factor from previous 
                         !time = 0.6125 to time = 1.6125
/post1
set,last
presol
finish 

The following example input shows how to restart an analysis with old and new parameters.

Example 5.3: Restarting an Analysis with Old and New Parameters

/prep7
et,1,182         ! Build model
n,1,0.0,0.0
n,2,0.0,0.5
n,3,0.0,1.0
n,4,1.0,0.0
n,5,1.0,0.5
n,6,1.0,1.0
e, 1,4,5,2
e, 2,5,6,3
mp,ex,1,1000.0
mp,nuxy,1,0.3
mp,alpx,1,1.e-4

d,1,all       
d,2,ux,0.0   
d,3,ux,0.0    
d,4,uy,0.0   

*dim,ftbl,table,4,1,,time   ! Make tabular point load
ftbl(1,0)=1,2,3,4
ftbl(1,1)=2.5,5.0,7.5,10.0
nsel,all
f,all,fx,%ftbl%             ! Apply it to all nodes
flist

/solu
rescont,,all,all            ! Save all substeps for possible restart
nlgeo,on
time,4
deltim,1
outres,all,all
solve                       ! Solve with point loads and the *.RDB file is saved
                            ! at the moment. The parameterized tabular point load
                            ! FTBL is also saved into *.RDB


*dim,temtbl,table,4,1,,time  ! Define table TEMTBL and use it for body load: temperature
temtbl(1,0)=1,2,3,4
temtbl(1,1)=250,500.0,750,1000.
! bf,all,TEMP,%temtbl%       ! May use this to apply the body load table
! bflist       
parsave,all,moreload         ! Save all the APDL parameters and tables to file: moreload
                             ! NOTE: *.RDB does not have information of table TEMTBL.
fini

/clear, nostart
/solu
antype,,restart,1,3,endstep  ! Do restart ENDSTEP because we want to apply TEMTBL at
                             ! TIME = 3.5 (LDSTEP=1,SUBSTEP=3) because we want to 
                             ! Apply the temperature load from TIME=3.5 onwards.
                             ! Here, RESTART has resumed *.RDB database where the
                             ! Table FTBL is saved.

solve                        ! Activate ENDSTEP

parresu,,moreload            ! For further load step, we want to apply table TEMTBL
                             ! as body force. NOTE: table TEMTBL is not in *.RDB. Therefore,
                             ! we have to use PARRESU command. APDL file "moreload" is
                             ! saved earlier.

*status                      ! List all the ADPL information available at this point
bf,all,TEMP,%temtbl%         ! Apply temperature table load TEMTBL
bflist
time,4                       ! Solve up to TIME = 4.0 because the load step ENDSTEP only
                             ! carries up to TIME = 3.5
solve
fini
/post1
set,last
prdis
prrsol
fini

The following example input demonstrates the use of a negative value input for Ldstep on the RESCONTROL command in order to reduce the size of the .ldhi file and reduce the total number of .rnnn files written.

Example 5.4: Using a Negative Ldstep Value on RESCONTROL

/prep7
mp,ex,1,10
mp,nuxy,1,0.3
mp,dens,1,0.5
n,1,
n,2,1
n,3,1,1
n,4,0,1
n,5,2
n,6,2,1
n,7,3,0
n,8,3,1
nlist
et,1,182
e,1,2,3,4
e,2,5,6,3
e,5,7,8,6
nsel,all
d,1,all
d,4,ux,0.01
finish
/solu
antype,static
nlgeom,on
nsubst,2,2,2
rescontrol,,-3,last       ! For the next 11 loadsteps, write load history
                          ! information to .ldhi file every 3rd loadstep
*do,i,1,11
solve                     ! Solve for 11 loadsteps
*enddo
rescontrol,,-100,last     ! For the next 1300 loadsteps, write load history 
                          ! information to .ldhi file every 100th loadstep
*do,i,1,1300
solve                     ! Solve for another 1300 loadsteps
*enddo
finish
/solu
antype,,restart,,,pert    ! Use the LAST possible restart point from 
                          ! the previous 1311 loadsteps 
                          ! to do a linear perturbation modal analysis
perturb,modal
solve,elform
modopt,lanb,1
solve
finish                    ! Completion of linear perturbation modal phase

The following example input shows how to delete a previously defined restart specification prior to adding a new one.

Example 5.5: Deleting Restart Specifications

/prep7
et,1,182        ! Build the model
mp,ex,1,3e9
mp,nuxy,1,0.3
mp,dense,1,2500
n,1,
n,2,1
n,3,1,1
n,4,0,1
n,5,2
n,6,2,1
n,7,3,0
n,8,3,1
nlist
e,1,2,3,4
e,2,5,6,3
e,5,7,8,6
nall
nsel,s,loc,x,0
d,all,all,0
nsel,all
save
finish

/solu
antype,static      ! Perform a static analysis
nlgeom,on          ! Large deflection is on
nsel,s,loc,x,3
f,all,fx,50
allsel,all
nsubst,5,5,5

rescontrol,define,-3,last    ! For the next 10 loadsteps, write load history 
                                ! information to .ldhi file every 3rd loadstep
								
*do,i,1,10       ! solve for 10 loadsteps
solve               
*enddo                       

rescontrol,delete,-3          ! Delete previous RESCONTROL command
rescontrol,define,last,last   ! For the next 10 loadsteps, write load history 
                                 ! information to .ldhi file for the last loadstep only
								 
*do,i,1,10        ! solve for another 10 loadsteps
solve
*enddo  

rescontrol,file_summary     ! Print the substeps and load step information for all .Xnnn files
                                ! The .Xnnn files saved for loadsteps: 3, 6, 9, 20
                                ! The .ldhi file saved for loadsteps: 2,3,5,6,8,9,19,20            
finish



Note:  If you are using the Solution Controls dialog to perform a static or full transient analysis, you can specify basic multiframe restart options on the dialog's Sol'n Options tab. These options include the maximum number of restart files that you want to write for a load step, as well as how frequently you want the files to be written. For an overview of the Solution Controls dialog box, see Using Special Solution Controls for Certain Types of Structural Analyses. For details about how to set options on the Solution Controls dialog box, access the dialog box (Main Menu> Solution> Sol'n Control), select the tab that you are interested in, and click the Help button.


5.8.1.1. Multiframe File Restart Requirements

The following files are necessary for performing a multiframe restart:

  • Jobname.rdb

    Database file saved automatically at the first iteration of the first load step, first substep of a job. This file provides a complete description of the solution with all initial conditions, and remains unchanged regardless of how many restarts are done for a particular job. When running a job, you should input all information needed for the solution - including parameters (APDL), components, and mandatory solution setup information - before you issue the first SOLVE. If you do not specify parameters before issuing the first SOLVE command, the parameters are not saved in the .RDB file. In this case, you must use PARSAV before you begin the solution and PARRES during the restart to save and restore the parameters. If the information stored in the .rdb file is not sufficient to perform the restart, you must input the additional information in the restart session before issuing the SOLVE command.

  • Jobname.rdnn

    Required if remeshing occurs before the restart, where nn is the number of remeshings before the current restart. This file has the same content as Jobname.rdb except that it contains the most recent mesh and is saved automatically at the first remeshing iteration. This file remains unchanged regardless of how many restarts occur for the current job.

  • Jobname.ldhi

    Load-history file for the specified job. It is an ASCII file (similar to files created by LSWRITE) that contains all loading and boundary conditions for specified load steps, including parameters that may be required for tabular loads and boundary conditions. The frequency at which load history information is written is determined by the RESCONTROL command. In general, you need the loading and boundary conditions for two contiguous load steps because of the ramped load conditions for a restart.

    Loading and boundary conditions are stored for the FE mesh. Loading and boundary conditions applied to the solid model are transferred to the FE mesh before being stored in Jobname.ldhi. During a multiframe restart, the program reads the loading and boundary conditions for the restart load step from this file (similar to an LSREAD command).

    By default, load-history information is written to Jobname.ldhi only for the last load step. For analyses that involve many load steps, this saves disk space and speeds up overall solution time. Alternatively, you can specify the frequency that load-step information is written to Jobname.ldhi by inputting a negative number for the Ldstep argument of the RESCONTROL command.

    The file is modified at the end of each specified load step. You cannot alter the file manually because any modifications may cause an unexpected restart condition.

  • Jobname.rnnn

    For nonlinear static and full transient analyses. This file contains element saved records similar to the .esav or .osav files. It also contains all solution commands and status for a given substep of a load step. All of the .Rnnn files are saved at the converged state of a substep so that all element saved records are valid.

    If a substep does not converge, no .rnnn file is written for that substep; instead, an .rnnn file from a previously converged substep is written. If the current substep number is 1, however, the .rnnn file is from the last substep of the previous load step.

  • Jobname.mnnn

    For mode-superposition transient analysis. This file contains the modal displacements, velocities, and accelerations records and solution commands for a single substep of a load step

Considerations for Distributed-Memory Parallel (DMP) Processing  —  When running in distributed-memory parallel (DMP) mode, the Jobname.rdb and Jobname.ldhi files contain data for the entire model and are required by the master process only. Depending on the procedure used, either the Jobname.rnnn file or the Jobnamen.rnnn files (where n stands for the process rank of 0 to N-1) are required. For more information, see Restarts with DMP processing in the Parallel Processing Guide. For more information on file conventions used in DMP analyses, see Differences in General Behavior in the Parallel Processing Guide.

5.8.1.1.1. Multiframe Restart Limitations

For a nonlinear static analysis, a nonlinear full transient analysis, or a linear full transient analysis, the following limitatioons to multiframe restart apply:

  • Material properties or elements cannot be changed during a restart.

  • The factorized matrix cannot be reused (KUSE). A new stiffness matrix and the related sparse solver workspace files (Jobname.DSPxxxx) are regenerated.

  • The .Rnnn file does not save EKILL and EALIVE commands. If EKILL or EALIVE are required in the restarted session, issue them again. Restarting with tabular input (EALIVE,%table%) is not supported.

  • The restart does not use the database file (Jobname.db) that you save (SAVE). Instead, it uses the Jobname.rdh file (a database file saved automatically at the start of the first substep of the first load step).

  • The .rdb file saves only the database information available at the first substep of the first load step. If other information is input after the first load step and that information is needed for the restart, it must be input again in the restart session. This situation often occurs when parameters are used (APDL); issue PARSAV to save the parameters during the initial run, and PARRES restore them in the restart. The situation also occurs when changing element REAL constants values; in this case, reissue R during the restart session.

  • A restart cannot occur at the equation solver level (for example, the PCG iteration level). The job can only be restarted at a substep level (either transient or Newton-Raphson loop).

  • Multiframe restart does not support the arc-length method (ARCLEN), reading and solving multiple load steps (LSSOLVE), or nested *DO loops.

  • All loading and boundary conditions are stored in the Jobname.ldhi file. Upon restart, removing or deleting solid modeling loading and boundary conditions does not remove these conditions from the finite element model. Loading and boundary conditions must be removed directly from nodes and elements.

  • To terminate a nonlinear analysis cleanly on a multitasking operating system, create an abort file named Jobname.ab in the working directory (or on case-sensitive systems, jobname.abt). In the first column of the first line of the file, the word nonlinear should appear. If the program locates this file at the start of an equilibrium iteration, the analysis stops and can be restarted at a later time.

  • Changing the number of substeps (or the time step size) upon restarting an analysis during a load step is not good practice. Change the number of substeps (or the time step size) only between load steps.

  • For distributed-memory parallel processing, it is generally recommended you use the same core count in the restart as in the original run. However, you can change the core count with some limitations. For more information, see Restarts with DMP processing in the Parallel Processing Guide.

The following limitation applies 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.

5.8.1.2. Multiframe Restart Procedure

Use the following procedure to restart an analysis:

  1. Enter the program and specify the same jobname that was used in the initial run. To do so, issue the /FILNAME command. Enter the SOLUTION processor (/SOLU).

  2. Determine the load step and substep at which to restart by issuing RESCONTROL, FILE_SUMMARY. This command prints the substep and load step information for all .rnnn files in the current directory.

  3. Resume the database file and indicate that this is a restart analysis by issuing ANTYPE,,REST,LDSTEP,SUBSTEP,Action.

  4. Specify revised or additional loads as needed. Be sure to take whatever corrective action is necessary if you are restarting from a convergence failure.

  5. Initiate the restart solution by issuing the SOLVE command. (See Obtaining the Solution for details.) You must issue the SOLVE command when taking any restart action, including ENDSTEP or RSTCREATE.

  6. Postprocess as desired, then exit the program.

If the files Jobname.ldhi and Jobname.rdb exist, the ANTYPE,,REST command:

  • Resumes the database Jobname.rdb

  • Rebuilds the loading and boundary conditions from the Jobname.ldhi file

  • Rebuilds the solution commands and status from the .rnnn file, or from the .mnnn file in the case of a mode-superposition transient analysis.

At this point, you can enter other commands to overwrite input restored by the ANTYPE command.

The loading and boundary conditions restored from the Jobname.ldhi are for the FE mesh. The solid model loading and boundary conditions are not stored on the Jobname.ldhi.

After the job is restarted, the files are affected in the following ways:

  • The .rdb file is unchanged.

  • All information for load steps and substeps past the restart point is deleted from the .ldhi file. Information for each new load step is then appended to the file.

  • All of the .rnnn or .mnnn files that have load steps and substeps earlier than the restart point remain unchanged. Those files containing load steps and substeps beyond the restart point are deleted before the restart solution begins in order to prevent file conflicts.

  • For nonlinear static and full transient analyses, the results file (.rst) is updated according to the restart. All results from load steps and substeps later than the restart point are deleted from the file to prevent conflicts, and new information from the solution is appended to the end of the results file.

  • For a mode-superposition transient analysis, the reduced displacements file .RDSP is updated according to the restart. All results from load steps and substeps later than the restart point are deleted from the file to prevent conflicts, and new information from the solution is appended to the end of the reduced displacements file.

When a job is started from the beginning again (first substep, first load step), all of the restart files (.rdb, .ldhi, and .rnnn or .mnnn) in the current directory for the current jobname are deleted before the new solution begins.

You can issue the command ANTYPE,,REST,LDSTEP,SUBSTEP,RSTCREATE to create a results file for a particular load step and substep of an analysis. Use the ANTYPE command with the OUTRES command to write the results. A RSTCREATE session does not update or delete any of the restart files, allowing you to use RSTCREATE for any number of saved points in a session. The RSTCREATE option is not supported in mode-superposition analysis.

The following example input shows how to create a results file for a particular substep in an analysis.

Example 5.6: Creating a Results File for a Particular Substep

!  Restart run:
/solu
antype,,rest,1,3,rstcreate	!Create a results file from load 
			!step 1, substep 3
outres,all,all		!Store everything into the results file
outpr,all,all		!Optional for printed output
solve			!Execute the results file creation
finish
/post1
set,,1,3		!Get results from load step 1,
			!substep 3
prnsol 
finish

5.8.2. Modal Analysis Restart

After solving a modal analysis to obtain the eigensolution, you can restart the modal analysis to perform the following calculations:

  • Expand modes of interest or all of the modes (MXPAND command) when the modes were not expanded during the modal analysis step.

  • Generate multiple load vectors (MODCONT command).

  • Generate residual vectors and residual response (RESVEC command).

  • Generate enforced motion pseudo-modes (MODCONT command).

An eigensolution is not calculated in the restart phase.

The symmetric eigensolvers (LANB, LANPCG, SNODE, and SUBSP on the MODOPT command) support all of the above calculations during a modal analysis restart. The complex eigensolvers support only some of the above calculations during a restart, as described below:

  • The damped eigensolver (MODOPT,DAMP) only supports mode expansion.

  • The QR Damped eigensolver (MODOPT,QRDAMP) only supports mode expansion when complex solutions are requested (Cpxmod = ON on the MODOPT command). When complex solutions are not requested (Cpxmod = OFF), this eigensolver supports mode expansion and multiple load vector generation.

  • The unsymmetric eigensolver (MODOPT,UNSYM) supports mode expansion and multiple load vector generation and residual response calculations.

For a modal analysis restart, the database must contain the model data as well as the modal solution data. The model in the database must match the initial model used to solve the first modal solution. In addition, the following files must be available: mode file (Jobname.mode, as well as Jobname.lmode if the unsymmetric eigensolver was used with MODOPT,UNSYM,,,,,,BOTH), EMAT file (Jobname.emat), ESAV file (Jobname.esav), and database (Jobname.db).

New elements can be added in the restart session to define the load vectors. These new elements must have no mass or stiffness characteristics that could affect the eigenvalues obtained from the original modal analysis. Examples of such elements include:

During each restart solution, the load vectors generated will replace those generated during the previous modal solution (which may be the original modal analysis or a modal analysis restart). See Example 5.7: Modal Analysis Restart for a detailed example of this procedure.

The following restrictions apply to modal analysis restart:

  • A modal analysis cannot be restarted if residual vectors or residual responses (RESVEC command) are calculated during the first analysis.

  • Modal analysis restart is not generally supported for cyclic symmetry analysis. However, a modal analysis restart may be performed to generate loads for a downstream cyclic mode-superposition harmonic analysis.

The following example demonstrates a typical command sequence for a modal analysis restart.

Example 5.7: Modal Analysis Restart

/filnam,case1
/prep7
et,1,plane182       ! 2D PLANE182 elements
mp,ex,1,2.0e11      ! Material Properties
mp,dens,1,7800
mp,nuxy,1,0.3

rect,0,4,0,2        ! Rectangular area
esize,0.5
type,1
mat,1
amesh,1             ! Mesh area with PLANE182 elements
allsel,all

nsel,s,loc,x,0
d,all,all,0         ! Fix the model at location X=0
nsel,all
finish

/com, 
/com,  First Modal solve
/com,

/solu
antype,modal
modopt,lanb,20,0,20000  ! Use Block Lanczos, extract 20 modes in frequency range of 0 to 20000
nsel,s,loc,x,4
f,all,fx,10e5           ! First load vector (FX)
nsel,all
solve                   ! First modal solve
save,case1,db
finish
/clear,nostart


/filname,case1
resume,,db
finish

/com, 
/com,  Adding New elements 
/com,

/prep7
et,2,surf153    ! 2D Structural effect element
keyopt,2,4,1    ! No midside node
mp,dens,2,0     ! Density set to zero so it won't affect modal analysis results
type,2
mat,2
lmesh,2
allsel,all
finish

/com,
/com,   Modal Restart Analysis
/com,

/solu
antype,modal,restart        ! Restart previous modal solve to define new load vectors
fdele,all,fx                ! Delete previously defined load
modcont,on               ! Generate multiple load vectors
mxpand,20,,,yes             ! Expand modes
esel,s,type,,2
sfe,all,1,pres,0,20000      ! First load vector (SFE) overwrites the load vector generated 
allsel,all                  ! in the first modal solve (FX)
solve                       ! First solve in modal analysis restart

sfedele,all,1,pres,0        ! Delete previously defined load
nsel,s,loc,x,2
nsel,r,loc,y,2
f,all,fy,-10e5              ! Second load vector (FY)
allsel,all
solve                       ! Second solve in modal analysis restart
finish

/com,
/com,  MSUP harmonic analysis by scaling the loads generated in modal solve
/com,

/solu
antype,harmonic             ! Perform Harmonic analysis
hropt,msup,20           
fdele,all,fy                ! Delete loads defined in the modal analysis        
fdele,all,fx
sfedele,all,1,pres,0
outres,all,all
hrout,on
harfrq,315,325              ! Excitation frequency
nsubs,20,20,20              ! Number of substeps
kbc,1
lvscale,0.5,1               ! Scale the first load vector (SFE)
lvscale,0.0,2               ! Do not scale the second load vector (FY)
solve
finish

/com,
/com,  Expansion of MSUP harmonic results
/com,

/solu
expass,on
outres,all,all
numexp,all,,,yes            ! Expand results for all substeps and calculate element results
solve
finish

/com,
/com, Time history post processing of displacement and reaction force results
/com,

/post26
n1=node(4,2,0)
n2=node(0,0,0)
nsol,2,n1,u,x,ux1
rforce,3,n2,f,x,fx1
prvar,2,3
finish