Chapter 1 * Chapter 2 * Chapter 3 * Chapter 4 * Chapter 5 * Chapter 6 * Chapter 7 * Chapter 8 * Chapter 9 * Chapter 10 * Chapter 11 * Chapter 12 * Chapter 13 * Chapter 14 * Chapter 15 * Chapter 16 * Chapter 17 * Chapter 18 * Chapter 19
Several methods of solving the simultaneous equations are available in the ANSYS program: frontal solution, sparse direct solution, Jacobi Conjugate Gradient (JCG) solution, Incomplete Cholesky Conjugate Gradient (ICCG) solution, Preconditioned Conjugate Gradient (PCG) solution, and an automatic iterative solver option (ITER). The frontal solver is the default, but you can select a different solver using one of the following:
Command(s):
Main Menu>Preprocessor>Loads>Analysis Options
Main Menu>Solution>Analysis Options
Table 3-1 Solver selection guidelines
| Solver
|
Typical Applications
|
Model Size
|
Memory Use
|
Disk Use
|
| Frontal Solver
(direct elimination
solver)
|
When robustness is required
(nonlinear analysis) or when memory
is limited.
|
Under 50,000
DOFs
|
Low
|
High
|
| Sparse Direct
Solver (direct elimination solver)
|
When robustness and solution speed
are required (nonlinear analysis); for
linear analysis where iterative solvers
are slow to converge (especially for
ill-conditioned matrices, such as
poorly shaped elements).
|
10,000 to
500,000
DOFs (more for shell & beam models).
|
Medium
|
High
|
| PCG Solver
(iterative solver)
|
When solution speed is crucial (linear
analysis of large models). Especially well suited for large models with solid elements.
|
50,000 to
1,000,000+
DOFs
|
High
|
Low
|
| ICCG (Iterative solver)
|
When solution speed is crucial in
multiphysics applications. Handles
models that are harder to converge in
other iterative solvers (nearly indefinite
matrices).
|
50,000 to
1,000,000+
DOFs
|
High
|
Low
|
| JCG Solver
(iterative solver)
|
When solution speed is crucial in
"single-field" problems (thermal,
magnetics, acoustics, and
multiphysics)
|
50,000 to
1,000,000+
DOFs
|
Medium
|
Low
|
Figure 3-1 Typical steps and files in a frontal solution
The RMS wavefront of a model directly affects solution time: the smaller its value, the less CPU time required for solution. Before solution, therefore, you may wish to reorder the elements for a smaller wavefront. The ANSYS program does this automatically at the beginning of solution unless you have reordered the model yourself or have requested no reordering. (The ANSYS Modeling and Meshing Guide provides details about element reordering.) The maximum wavefront of a model directly affects memory requirements, in particular the amount of memory allocated for scratch data. See Chapter 19 for details about memory management.
Note-The sparse direct solver is not applicable to PSD spectrum analysis.
For some cases, the tolerance default value (set via the EQSLV,JCG command) of 1.0E-8 may be too restrictive, and may increase running time needlessly. The value 1.0E-5 may be acceptable in many situations.
The JCG solver is available only for static analyses, full harmonic analyses, or full transient analyses. (You specify these analysis types using the commands ANTYPE, STATIC, HROPT,FULL, or TRNOPT,FULL respectively.)
Figure 3-2 Typical steps and files in a JCG solution
With all conjugate gradient solvers, the user must be particularly careful to check that the model is appropriately constrained. No minimum pivot is calculated and the solver will continue to iterate if there is any rigid body motion possible.
The PCG solver usually requires less than 1/4 the disk file space used by the frontal solver. Savings increase with the problem size. The PCG solver usually runs faster than the frontal solver for large models (wavefront greater than about 1000).
The PCG solver is best suited for structural analysis. It is valid for elements with symmetric, sparse, definite or indefinite matrices. This solver is available only for static or steady-state analyses and transient analyses, or for subspace eigenvalue analyses (PowerDynamics).
The PCG solver primarily solves for displacements/rotations (in structural analysis), temperatures (in thermal analysis), etc. The accuracy of other derived variables (such as strains, stresses, flux, etc.) is dependent upon accurate prediction of primary variables.
Direct solvers (such as the frontal and sparse direct solvers) produce very accurate solution vectors. Indirect iterative solvers, such as the PCG solver, depend upon a convergence criterion specified by the user. Therefore, relaxation of the default tolerance may significantly affect the accuracy, especially of derived quantities.
The PCG solver is not recommended for problems with large numbers of constraint equations or for models with SHELL150 elements. For these types of problems, use the frontal solver. Also, the PCG solver does not support SOLID62 or MATRIX50 elements.
With all conjugate gradient solvers, the user must be particularly careful to check that the model is appropriately constrained. No minimum pivot is calculated and the solver will continue to iterate if there is any rigid body motion possible.
Note-When the PCG solver encounters an indefinite matrix, the solver will invoke an algorithm that handles indefinite matrices. If the indefinite PCG algorithm also fails (this happens when the equation system is ill-conditioned; for example, losing contact at a substep or plastic hinge developments), an outer Newton-Raphson loop will be triggered to perform a bisection. Normally the stiffness matrix will be better conditioned after bisection and the PCG solver can eventually solve all the nonlinear steps.
Since the solver and tolerance are selected based on the physics and conditions of the problem being solved, it is recommended that this command be issued immediately before solving the problem (once the problem has been completely defined).
When the automatic iterative solver option is chosen and appropriate conditions have been met, neither the Jobname.EMAT nor Jobname.EROT files will be created for structural analysis and thermal analysis. This option is not recommended for thermal analysis involving phase change. When this option is chosen but the appropriate conditions have not been met, ANSYS uses the FRONTAL solver for the solution. A NOTE message is issued which informs you of the solver and tolerance used in the solution.
Command(s):
Main Menu>Solution>Current LS or Run FLOTRAN
Because the solution phase generally requires more computer resources that the other phases of an analysis, it is better suited to batch (background) mode than interactive mode.
The solver writes output to the output file (Jobname.OUT) and the results file. If you run the solution interactively, the output "file" is actually your screen (window). By using one of the following before issuing SOLVE, you can divert the output to a file instead of the screen:
Command(s):
Utility Menu>File>Switch Output to>File or Output Window
Data written to the output file consist of the following:
Another useful file produced during solution is Jobname.STAT, which gives the status of the solution. You can use this file to monitor an analysis while it is running. It is particularly useful in iterative analyses such as nonlinear and transient analyses.
The SOLVE command calculates the solution for the load step data currently in the database.
To solve multiple load steps, issue the LSSOLVE command (Main Menu>Solution>From LS Files). LSSOLVE is actually a macro that reads in the load step files sequentially and initiates the solution for each load step. A sample command input for the load step file method is shown below:
/SOLU ! Enter SOLUTION ...
! Load Step 1: D,... ! Loads SF,... ... NSUBST,... ! Load step options KBC,... OUTRES,... OUTPR,... ... LSWRITE ! Writes load step file: Jobname.S01
! Load Step 2: D,... ! Loads SF,... ... NSUBST,... ! Load step options KBC,... OUTRES,... OUTPR,... ... LSWRITE ! Writes load step file: Jobname.S02 ... ... LSSOLVE,1,2 ! Initiates solution for load step files 1 and 2See the ANSYS Commands Reference for a discussion of the NSUBST, KBC, OUTRES, OUTPR, LSWRITE and LSSOLVE commands.
Figure 3-3 Examples of time-varying loads
Suppose that you have a set of time-varying loads such as the ones shown above. There are three load functions, so you need to define three array parameters. All three array parameters must be of type TABLE. The force function has five points, so it needs a 5x1 array; the pressure function needs a 6x1 array; and the temperature function needs a 2x1 array. Notice that all three arrays are one-dimensional. The load values are entered in column 1 and the time values are entered in column zero. (The zeroth column and zeroth row, which normally contain index numbers, must be changed and filled with a monotonically increasing set of numbers if you define the array parameter as a TABLE.)
To define the three array parameters, you first need to declare their type and dimensions. To do so, use either of the following:
Command(s):
Utility Menu>Parameters>Array Parameters>Define/Edit
For example:
*DIM,FORCE,TABLE,5,1 *DIM,PRESSURE,TABLE,6,1 *DIM,TEMP,TABLE,2,1You can now use either the array parameter editor (Utility Menu> Parameters>Array Parameters>Define/Edit) or a set of "=" commands to fill these arrays. The latter method is shown below.
FORCE(1,1)=100,2000,2000,800,100 ! Force values in column 1 FORCE(1,0)=0,21.5,50.9,98.7,112 ! Corresponding time values in column 0 FORCE(0,1)=1 ! Zeroth row PRESSURE(1,1)=1000,1000,500,500,1000,1000 PRESSURE(1,0)=0,35,35.8,74.4,76,112 PRESSURE(0,1)=1 TEMP(1,1)=800,75 TEMP(1,0)=0,112 TEMP(0,1)=1You have now defined the load histories. To apply these loads and obtain the solution, you need to construct a do-loop (using the commands *DO and *ENDDO) such as the one shown below:
TM_START=1E-6 ! Starting time (must be > 0)
TM_END=112 ! Ending time of the transient
TM_INCR=1.5 ! Time increment
*DO,TM,TM_START,TM_END,TM_INCR ! Do for TM from TM_START to TM_END in
! steps of TM_INCR
TIME,TM ! Time value
F,272,FY,FORCE(TM) ! Time-varying force (at node 272, FY)
NSEL,... ! Select nodes on pressure surface
SF,ALL,PRES,PRESSURE(TM) ! Time-varying pressure
NSEL,ALL ! Activate all nodes
NSEL,... ! Select nodes for temperature specification
BF,ALL,TEMP,TEMP(TM) ! Time-varying temperature
NSEL,ALL ! Activate all nodes
SOLVE ! Initiate solution calculations
*ENDDO
See the ANSYS Commands Reference for
discussions of the *DO, TIME, F, NSEL, SF, BF and *ENDDO commands.
You can change the time increment (TM_INCR parameter) very easily with this method. With other methods, changing the time increment for such complex load histories would be quite cumbersome.
/SOLU ... ! Load step 1: D,... SF,... ... SOLVE ! Solution for load step 1
! Load step 2 F,... SF,... ... SOLVE ! Solution for load step 2 Etc.
To terminate a nonlinear analysis "cleanly" on a multitasking operating system, create an abort file, named Jobname.ABT (or, on some case-sensitive systems, jobname.abt), containing the word nonlinear on the first line, starting in column 1. At the start of an equilibrium iteration, if the ANSYS program finds such a file in the working directory, the analysis will be stopped and can be restarted at a later time.
Note-If commands are being read using a file specified via the /INPUT command (Main Menu>Preprocessor>Material Props>Material Library, or Utility Menu> File>Read Input from), the abort file will terminate the solution, but the program will continue to read commands from the specified input file. Thus, any postprocessing commands included in the input file will execute.
In interactive mode, an existing database file is first written to a backup file (File.DBB). In batch mode, an existing database file is replaced by the current database information with no backup.
Table 3-2 Restart information for nonlinear analyses
| Cause of Termination
|
Element Saved
Data File
|
Required Corrective Action
|
| Normal (i.e., no errors)
|
Jobname.ESAV
|
Add more load steps at the end of your job.
|
| Non-convergence
|
Jobname.OSAV
|
Define a smaller time step, change the adaptive
descent option, or take other action to enhance
convergence. Rename Jobname.OSAV as
Jobname.ESAV before restarting.
|
| Non-convergence due to
insufficient equilibrium iterations
|
Jobname.ESAV
|
If the solution was converging, allow more
equilibrium equations (NEQIT
command)
|
| Cumulative iteration limit
exceeded (NCNV command)
|
Jobname.ESAV
|
Increase ITLIM on NCNV
command.
|
| Time limit exceeded (NCNV)
|
Jobname.ESAV
|
None (simply restart the analysis).
|
| Displacement limit exceeded
(NCNV)
|
Jobname.OSAV
|
(Same as for non-convergence.)
|
| Negative pivot
|
Jobname.OSAV
|
(Same as for non-convergence.)
|
| Jobname.ABT
· if solution was converging · if solution was diverging
|
Jobname.ESAV Jobname.OSAV
|
Make whatever changes are necessary to address
the behavior that caused you to voluntarily
terminate the analysis.
|
| "Full" results file (more than
1000 substeps) Time steps output.
|
Jobname.ESAV
|
Could indicate a problem - check settings on CNVTOL, DELTIM, and NSUBST, or KEYOPT(7) for contact elements. Or,
specify larger number of results allowed on results
file [/CONFIG,NRES] before solution or reduce the number
of results to be output. Also rename results file
(/ASSIGN)
|
| "Killed" job (system break),
system crash, or system
time-limit exceeded
|
Not applicable
|
No restart is possible.
|
1. Enter the ANSYS program and specify the same jobname that was used in the initial run. (To do so, issue the /FILNAME command (Utility Menu>File>Change Jobname)).
2. Resume the database file (RESUME command (Utility Menu>File> Resume Jobname.db)), then enter the SOLUTION processor (/SOLU command (Main Menu>Solution)).
3. Indicate that this is a restart analysis (by issuing the command ANTYPE,,REST (Main Menu>Solution>Restart)).
4. Replot the geometry for the analysis (using one of the plot commands (APLOT, EPLOT (Utility Menu>Plot> Replot)).
5. Specify revised or additional loads as needed. Modified ramped loads start from their previous values. Newly applied ramped loads are ramped from zero; newly applied body loads start from initial values. Deleted loads which are reapplied are treated as new, not modified, loads. Surface and body loads to be deleted should be ramped to zero or to the initial value, so that the Jobname.ESAV and Jobname.OSAV files are consistent with the database.
Command(s):
Main Menu>Preprocessor>Loads>Other>Reuse Tri Matrix
Main Menu>Solution>Other>Reuse Tri Matrix
8. Repeat steps 4, 5, and 6 for additional load steps, if any. Or use the load step file method to create and solve multiple load steps. Use the following commands:
Command(s):
Main Menu>Preprocessor>Loads>Write LS File
Main Menu>Solution>Write LS File
Command(s):
Main Menu>Solution>From LS Files
9. Postprocess as desired, then exit the ANSYS program.
A sample restart input listing is shown below.
! Restart run: /FILNAME,... ! Jobname RESUME /SOLU ANTYPE,,REST ! Specify restart of previous analysis ! ! Specify new loads, new load step options, etc. ! Take appropriate corrective action for nonlinear analyses. ! SAVE SOLVE ! Initiate restart solution SAVE ! Optional SAVE for possible subsequent restart FINISH ! ! Postprocess as desired ! /EXIT,NOSAV
A SET command in POST1 (other than SET,LAST) reads the boundary conditions for the specified results into the database, and overwrites the database stored in memory. If you subsequently save your file or exit, ANSYS overwrites the boundary conditions in the database file with the D's and F's from the current results file. However, to perform a restart which ramps boundary conditions from the last solved substep, you need the boundary conditions for the last successfully solved load substep.
1. Rename Jobname.OSAV as Jobname.ESAV.
2. Enter the ANSYS program and specify the same jobname that was used in the initial run. (To do so, issue the /FILNAME command (Utility Menu>File>Change Jobname)).
3. Resume the database file (RESUME command (Utility Menu> File>Resume Jobname.db)), then enter the SOLUTION processor (/SOLU command (Main Menu>Solution)).
4. Indicate that this is a restart analysis by issuing the command ANTYPE,,REST (Main Menu>Solution>Restart).
5. Re-specify boundary conditions from the last substep that was successfully solved. One substep is sufficient since the solution will converge immediately.
6. Issue a SOLVE command (Main Menu>Solution>Current LS or Main Menu>Solution>Run FLOTRAN).
7. Apply final loads and load step options as desired. You will need to adjust the number of substeps (or time step size) if this load step is a "continuation" of the previous (before the dummy) load step. Time step numbering may be altered from your initial intent. Use a small time increment in step 6 if you need to preserve the time step numbering (such as for a transient analysis).
8. Continue the procedure as outlined in Section 3.12.
Some possible uses of the PSOLVE approach are listed below.
The RUNSTAT module is a processor, or routine, of its own. You can enter it by issuing the /RUNSTAT (Main Menu>Run-Time Stats) command at the Begin level.
The RUNSTAT module estimates run times and other statistics based on information in the database. Therefore, you must define the model geometry (nodes, elements, etc.), loads and load options, and analysis options before you enter RUNSTAT. It is best to use RUNSTAT immediately before solving.
If you do not know such details about your computer, you can execute the macro SETSPEED, which issues the appropriate RSPEED command for you. For more information about the SETSPEED macro, see Section 3.7 of the ANSYS Operations Guide.
The other piece of information needed to estimate the total run time is the number of iterations (or load steps in a linear, static analysis) for the analysis. To get this information, use either method shown below:
Command(s):
Main Menu>Run-Time Stats>Iter Setting
To obtain an estimate of run time, use one of the following:
Command(s):
Main Menu>Run-Time Stats>Individual Stats
Based on information supplied by the RSPEED and RITER commands and the model information in the database, the RTIMST command gives you a run time estimate.
Other RUNSTAT commands are RSTAT, which gives model statistics (node and element information); RMEMRY, which gives memory statistics; and RALL (Main Menu>Run-Time Stats>All Statistics), which is a convenience command that executes the RSTAT, RWFRNT, RTIMST, and RMEMRY commands. The GUI equivalent for all these commands except for RALL is Main Menu>Run-Time Stats>Individual Stats.
The default value for the PIVCHECK
command is ON. With PIVCHECK
set to ON, a linear static analysis (in batch mode only) stops when a negative or
zero pivot value is encountered. The message "NEGATIVE PIVOT VALUE" or
"PIVOTS SET TO ZERO" is displayed. If PIVCHECK is set to OFF, the pivots are
not checked. Set PIVCHECK to OFF if
you want your batch mode linear static analysis to continue in spite of a zero or
negative pivot value. The PIVCHECK
setting has no effect for nonlinear analyses, since a negative or zero pivot value
can occur for a valid analysis. When PIVCHECK is set to OFF, ANSYS
automatically increases any pivot value smaller than machine "zero" to a value
between 10 and 100 times that machine's "zero" value. Machine "zero" is a tiny
number the machine uses to define "zero" within some tolerance. This value
varies for different computers (
1e-15).
The following conditions may cause singularities in the solution process: