4.1. Starting a Mechanical APDL Session from the Command Level

To start an interactive session in graphics mode on Linux systems, enter the following command at the prompt:

ansys182 -g

To start Mechanical APDL from the command prompt on a Windows system, type the following command:

ansys182

Always use the ansys182 command for running Mechanical APDL. User-written scripts for running Mechanical APDL products are not supported.

You can specify any of the following options for the Mechanical APDL execution command:

-aasEnables server mode. When enabling server mode, a custom name for the keyfile can be specified using the -iorFile option. For more information, see Mechanical APDL as a Server User's Guide.
-acc deviceEnables the use of GPU hardware to accelerate the analysis. See GPU Accelerator Capability in the Parallel Processing Guide for more information.
-ansexeIn the ANSYS Workbench environment, activates a custom Mechanical APDL executable.
-b list or nolistActivates the Mechanical APDL program in batch mode. The options -b list or -b by itself cause the input listing to be included in the output. The -b nolist option causes the input listing not to be included. For more information about running Mechanical APDL in batch mode, see Batch Mode.
-customCalls a custom Mechanical APDL executable. See Running Your Custom Executable in the Mechanical APDL Programmer's Reference for more information.
-d deviceSpecifies the type of graphics device. This option applies only to interactive mode. For Linux systems, graphics device choices are X11, X11C, or 3D. For Windows systems, graphics device options are WIN32 or WIN32C, or 3D.
-db valueDefines the portion of workspace (memory) to be used as the initial allocation for the database. The default is 1024 MB. Specify a negative number (-value) to force a fixed size throughout the run; useful on small memory systems.
-dirDefines the initial working directory. Using the -dir option overrides the ANSYS182_WORKING_DIRECTORY environment variable.
-disEnables Distributed ANSYS. See the Parallel Processing Guide for more information.
-dvtEnables ANSYS DesignXplorer advanced task (add-on).
-dynEnables LS-DYNA.
-g Launches the Mechanical APDL program with the Graphical User Interface (GUI) on. If you select this option, an X11 graphics device is assumed for Linux unless the -d option specifies a different device. This option is not used on Windows systems. To activate the GUI after Mechanical APDL has started, enter two commands in the input window: /SHOW to define the graphics device, and /MENU,ON to activate the GUI. The -g option is valid only for interactive mode.

Note:  If you start Mechanical APDL via the -g option, the program ignores any /SHOW command in the start.ans file and displays a splash screen briefly before opening the GUI windows.

-i inputnameSpecifies the name of the file to read input into Mechanical APDL for batch processing. On Linux, the preferred method to indicate an input file is <.
-iorFile keyfile_nameSpecifies the name of the server keyfile when enabling server mode. If this option is not supplied, the default name of the keyfile is aas_MapdlID.txt. For more information, see Mechanical APDL as a Server Keyfile in the Mechanical APDL as a Server User's Guide.
-j JobnameSpecifies the initial jobname, a name assigned to all files generated by the program for a specific model. If you omit the -j option, the jobname is assumed to be file.
-l languageSpecifies a language file to use other than US English. This option is valid only if you have a translated message file in an appropriately named subdirectory in /ansys_inc/v182/ansys/docu (or Program Files\ANSYS Inc\V182\ANSYS\docu on Windows systems).
-m workspaceSpecifies the total size of the workspace (memory) in megabytes used for the initial allocation. If you omit the -m option, the default is 2 GB (2048 MB). Specify a negative number (-value) to force a fixed size throughout the run.
-machinesSpecifies the machines on which to run a Distributed ANSYS analysis. See Starting Distributed ANSYS in the Parallel Processing Guide for more information.
-mfmSpecifies the master field name in an ANSYS Multi-field solver - MFX analysis. See Starting and Stopping an MFX Analysis in the Coupled-Field Analysis Guide for more information.
-mpiSpecifies the type of MPI to use. See the Parallel Processing Guide for more information.
-mpifileSpecifies an existing MPI file (appfile) to be used in a Distributed ANSYS run. See Using MPI appfiles in the Parallel Processing Guide for more information.
-naSpecifies the number of GPU accelerator devices per machine or compute node when running with the GPU accelerator feature. See GPU Accelerator Capability in the Parallel Processing Guide for more information.
-name valueDefines Mechanical APDL parameters at program start-up. The parameter name must be at least two characters long. For details about parameters, see the ANSYS Parametric Design Language Guide.
-npSpecifies the number of processors to use when running Distributed ANSYS or Shared-memory ANSYS. See the Parallel Processing Guide for more information.
-o outputnameSpecifies the name of the file to store the output from a batch execution of Mechanical APDL. On Linux, the preferred method to indicate an output file is >.
-p productnameDefines which ANSYS product will run during the session. For more detailed information about the -p option, see Choosing an ANSYS Product via Command Line.
-ppf license feature nameSpecifies which HPC license to use during a parallel processing run. See HPC Licensing in the Parallel Processing Guide for more information.
-s read or noreadSpecifies whether the program reads the start.ans file at start-up. If you omit the -s option, Mechanical APDL reads the start.ans file in interactive mode and not in batch mode.
-schost host name Specifies the host machine on which the coupling service is running (to which the co-simulation participant/solver must connect) in a System Coupling analysis.
-scid valueSpecifies the licensing ID of the System Coupling analysis.
-sclic port@hostSpecifies the licensing port@host to use for the System Coupling analysis.
-scname name of the solverSpecifies the unique name used by the co-simulation participant to identify itself to the coupling service in a System Coupling analysis. For Linux systems, you need to quote the name to have the name recognized if it contains a space:

ansys182 -scname "Solution 1"

-scport port number Specifies the port on the host machine upon which the coupling service is listening for connections from co-simulation participants in a System Coupling analysis.
-ser Specifies the communication port number between Mechanical APDL and CFX in an MFX analysis.
-usershDirects the MPI software (used by Distributed ANSYS) to use the remote shell (rsh) protocol instead of the default secure shell (ssh) protocol. See Configuring Distributed ANSYS in the Parallel Processing Guide for more information.
-vReturns the Mechanical APDL release number, update number, copyright date, customer number, and license manager version number.

Release 18.2 - © ANSYS, Inc. All rights reserved.