Mechanical APDL

The Mechanical APDL system launches Mechanical APDL (formerly known as the Ansys software), allowing you to manage the various files often used and created by Mechanical APDL, especially when working with a linked analysis (for example, thermal-stress, substructuring, submodeling, and so on). It is important that you understand the types of files that the Mechanical APDL application uses and generates, because the actions you take in Workbench act on these files. These files fall into three broad categories: input, reference, and output.

Input Files

Files that are consumed directly by the Mechanical APDL application. Examples include:

  • Files consisting of Mechanical APDL commands, generated manually or by Mechanical APDL (log files) or by the Mechanical or Meshing applications.

  • Coded input files, such as .cdb files, generated by Mechanical APDL and third-party preprocessors

  • Mechanical APDL geometry files (.anf), generated by Mechanical APDL or DesignModeler


Note:  In some cases, the Mechanical APDL solver overwrites one of its input files with its generated output (for example, the .rst file from a Modal system in a Modal to Response Spectrum analysis linked to a Mechanical APDL component system). If this occurs, subsequent updates of the Mechanical APDL component system will fail. To copy the correct input from an upstream system, perform a reset operation on the Mechanical APDL component system.


Referenced Files

Files that are referenced by the execution of an input file. Examples include:

  • Database files

  • Results files

  • Command macro files

  • Superelement files

  • Solver files

  • CAD geometry files

Output Files

Files that are produced by all Mechanical APDL application runs. Primary output files include:

  • Results file (.rst, .rth, etc.)

  • Output file (.out) of the command echoes, solution information, and requested data listings

  • Log file (.log) of the commands issued to the Mechanical APDL application

  • Error file (.err) listing any warnings or errors encountered

Creating a Mechanical APDL Analysis

Use the following procedure to create a Mechanical APDL analysis.

To work through a Mechanical APDL system:

  1. To add a Mechanical APDL component system, drag the system from the Toolbox to the Project Schematic or double-click the system in the Toolbox.

  2. If required, connect other systems to a Mechanical APDL system by using the Transfer Data From New or Transfer Data To New context menu options. You can also drag systems from the toolbox, or manually create links between systems.

    When transferring data to a Mechanical APDL system from another system, you can transfer data from the following cell sources:

    • Geometry: transfers just the geometry in the form of an .anf file. This option is only supported for geometry that is represented as DesignModeler geometry.

    • Model (Mesh cell if a meshing system): transfers an input file containing only the mesh, contact, coordinate system, and named selections data.

    • Setup (Mechanical Systems): transfers an input file containing all data necessary to solve the analysis, including geometry, model, loads, materials, etc. Any supporting files needed to execute the input file will be transferred as well. Examples include pre-stress modal or random vibration.

    • Setup (Finite Element Modeler): Transfers input file containing any finite data recognized inside Finite Element Modeler, such as mesh, materials, components, constraints, etc.

    • Solution (Mechanical Systems): transfers the database file (.db) if it exists and result file only.


    Note:  For Model, Setup (Mechanical Systems), and Solution transfer cells, if you solve within Mechanical, you must run an update on the appropriate cell in the Mechanical system to obtain the correct state on the schematic.

    In most cases, Model and Setup components from the same Mechanical system should not be linked to one Mechanical APDL system. Doing so will cause the Mechanical system to provide two different (and possibly conflicting) input files to the Mechanical APDL system.

    Named selections and coordinate systems that are added to a solved Mechanical system are not immediately reflected in downstream Mechanical APDL systems. They will be available in future solution attempts.



    Important:  The Mechanical APDL system consumes all input data without unit system knowledge. You must assure that all input data being used by the Mechanical APDL system is in a consistent unit system. See Solving Units for more information on unit system.


    When transferring data from a Mechanical APDL system to another Mechanical APDL system, you can transfer four types of data:

    • Results: transfers all results files (including .rst, .rth, etc.)

    • Database: transfers all database files (.db)

    • Solver: transfers all files in the system folder

    • CDB: transfers .cdb files

    You can also transfer data to a new Finite Element Model system, which uses the .cdb file(s).

    These files are simply copied to the new system if they exist; Workbench does not generate the files. Before transferring data to a new system, be sure that you have an input file that generates the necessary files from the existing Mechanical APDL system.

    When you transfer data to or from another system, right-click the link connecting the systems and select Properties from the context menu. The Properties pane opens, detailing the nature of the transfer (such as Transfer CDB File).

  3. To open the Components workspace to select Mechanical APDL parameters, double-click the Analysis cell or right-click the cell and select Edit from the context menu.

    From the Components workspace, you can select Mechanical APDL parameters or specify setup properties (such as command line options, memory settings, number of processors, etc.).

    When you add an input file using the context menu, Workbench automatically searches the file for potential parameters (for example, *SET, *GET, = assignments). Those parameters are then displayed in the Properties pane when that input file is selected in the Outline pane. To use one of those parameters, select that parameter's check box and indicate whether it should be used as an input or an output parameter. Input parameters are sent to Mechanical APDL with the value specified when updating. After the update, Workbench retrieves the output values from Mechanical APDL and sets those values in Workbench.


    Note:  The presence of a /EXIT command in the input file causes state and parameters to malfunction. Make sure you remove this command before adding the input file.


  4. Launch the Mechanical APDL application using one of the following options:

    • To launch the Mechanical APDL application interactively, right-click the Analysis cell and select Edit in Mechanical APDL or Open in Mechanical APDL from the context menu.

    • To launch the Mechanical APDL application with input and reference files specified, right-click the Analysis cell and select Add Input File or Add Reference File from the context menu. Then select Edit in Mechanical APDL

      The Mechanical APDL application launches in interactive mode, and the input file(s) specified will be sent to the Mechanical APDL application and processed in the order listed. After all of these files are processed, the Mechanical APDL application remains active and you can continue your analysis using the standard Mechanical APDL application interface. Any action you take in the Mechanical APDL application will not be reflected in Workbench state indicators or parameters.

Be aware that any time you launch the Mechanical APDL application, Workbench does not log or record the actions that occur in the Mechanical APDL application. If you make changes in the Mechanical APDL application, be sure that the changes are reflected appropriately in the input files. To maintain connectivity (such as to read output parameters), complete an update, either at the project level or at the appropriate system/cell level.

To save Mechanical APDL changes from an open session, you must include a SAVE command in one of your input files. The Workbench save capability does not invoke the Mechanical APDL SAVE command.

When you add an input file, the files are processed in the order shown. You can change the order in which the files are processed by dragging the files into the proper order. To delete files, right-click the file to be deleted and select Delete from the context menu.

To stop a Mechanical APDL batch run, you can interrupt the update progress.

Mechanical APDL Context Menu Options

When the Mechanical APDL system is active in the schematic, use the right mouse button to initiate the following Analysis cell actions.

Menu ItemDescription
EditOpens the Components workspace, where you can specify Mechanical APDL parameters and setup properties. This is the default action.
Edit in Mechanical APDLLaunches the Mechanical APDL application interactively and reads the input files. If the state is currently up to date, Workbench sets the state to Update Required at this time, even if you do not make any changes in the Mechanical APDL application.
Open in Mechanical APDLLaunches the Mechanical APDL application interactively without reading any input files. Any action you take in the Mechanical APDL application are not be reflected in Workbench state indicators.
Add Input FileOpens a dialog box where you can browse to an input file. When you add an input file, the file is immediately copied into the project directory. To make changes to this file, change the file in the project directory, not the original file. If you have a large input file and have disk space concerns, keep the file in the directory of your choice and use a separate input file to reference it (using the /INPUT command).
Add Referenced FileOpens a dialog box where you can browse to a referenced file. When you add a referenced file, the file is immediately copied into the project directory. To make changes to this file, change the file in the project directory, not the original file. If you have a large reference file and have disk space concerns, keep the file in the directory of your choice and reference it manually.
Track SolutionLaunches the Results Tracking tool during an update, allowing you to monitor diagnostics results of interest in real time during the solution. For more information, see the NLHIST command.
UpdateRuns the Mechanical APDL application in batch mode, processing all input files in the order listed. If you make changes in the Mechanical APDL application, be sure that the changes are reflected appropriately in the input files before running an update. If you do not, an update could potentially overwrite the work you have done in the Mechanical APDL application.

Note:  An update launches the Mechanical APDL application in batch mode, using all input and referenced files in the order shown in the Outline pane. After all files are processed, the Mechanical APDL application exits. Updating captures any output parameters generated in the Mechanical APDL application and allows you to continue working in Workbench.

RefreshCopies the latest transfer files into the project directory. Input and referenced files are not re-copied from their original locations. If you change an upstream system after you make changes to the Mechanical APDL application, a refresh could potentially overwrite your Mechanical APDL application changes. Be sure that any changes you do in the Mechanical APDL application are reflected appropriately in the input files before running a refresh. Only changes that occur within the schematic are captured with a Refresh Required state; Workbench does not indicate Refresh Required for changes made directly to a file (such as manually editing an input file).
Clear Generated DataDeletes all files on disk in the system directory except input or reference files. It will not affect any input or reference files.
Rename, Reset

Standard actions as described in Common Context Menu Options.

PropertiesLaunches the Properties pane, where you can define graphics settings, command line options, database and tab memory, and other settings. Be aware when selecting graphics settings that some options are potentially platform-specific and must be changed when switching platforms before running the project with Mechanical APDL in interactive mode.
Solver Input File Generated from the Setup cell of a Mechanical APDL System

The solver input file transferred from the Setup cell contains all the commands needed to execute a complete run, including any SOLVE commands that are necessary. However, the input also contains a conditional /EOF statement to halt reading of the file and therefore not execute the solve. This conditional statement will be executed when the Mechanical APDL application is invoked from the Edit in Mechanical APDL context menu option, therefore running the analysis to the point just prior to the SOLVE command. If a different behavior is desired, you can edit the input file in the Mechanical APDL system folder to obtain a different behavior or to add an additional input file containing the SOLVE command.