To call the Mechanical APDL program, use the following:
program ansys
For multiple calls to subroutine ansys, you must open and close
standard input in the calling subroutine. (Usually, input and output are Fortran units 5
and 6, respectively.) The calling subroutine cannot use the database access subroutines;
however, other user-programmable features can use the database access subroutines
freely.
There may be times when Mechanical APDL exits abnormally. Check the file.err file to see if Mechanical APDL wrote an exit code to the file before ending. These error codes may help you to understand what caused the abnormal program exit:
Table 2.1: ANSYS Exit Codes
| Code | Explanation | Code | Explanation |
|---|---|---|---|
| 0 | Normal Exit | 14 | XOX Error |
| 1 | Stack Error | 15 | Fatal Error |
| 2 | Stack Error | 16 | Possible Full Disk |
| 3 | Stack Error | 17 | Possible Corrupted or Missing File |
| 4 | Stack Error | 18 | Possible Corrupted DB File |
| 5 | Command Line Argument Error | 21 | Authorized Code Section Entered |
| 6 | Accounting File Error | 25 | Unable to Open X11 Server |
| 7 | Auth File Verification Error | 30 | Quit Signal |
| 8 | Error in ANSYS or End-of-run | 31 | Failure to Get Signal |
| 11 | User Routine Error | >32 | System-dependent Error |
| 12 | Macro STOP Command |