Run Ansys Batch Mode¶
- Ansys consists of many different products as well as many ways to run those products usin batch mode. This guide will focus on:
- Running the Ansys Mechanical APDL
- Using the Mechanical APDL Launcher to run batch script
- The beginning of the PBS script can be used as a template.
- The computation part of the script (non
#PBSlines) will differ
#PBS -N anyName #PBS -l nodes=1:ppn=8 #PBS -l pmem=4gb #PBS -l walltime=1:00:00 #PBS -q force-6 #PBS -j oe #PBS -o ansys.out cd <dir that holds input files> module load ansys/17.0 #or any other version <where the ansys run lines go, differing based on what you want to run>
#PBSdirectives are standard, requesting just 1 minute of walltime and 1 node with 4 cores. More on
#PBSdirectives can be found in the PBS guide
- After, the computation portion begins. You must enter the directory where you store your input files, so that ansys knows what to run
module load ansys/17.0loads ansys 17.0. You can find different versions to load with
module avail ansys
- the last line is the line to run the ansys product, and will differ with what product you are running.
Ansys Mechanical APDL¶
launcher170 -runbatch - np x -diswill run .dat files in the directory specified
nohup ansys170 -b -p -np x -dis productvar < inputname > outputname 2>&1 &: another option to run the solver,
nohupstands for no hangups and will make the job less prone to interuptions
- For both, you must include
-np xwhere x is the num of processors you requested in your
Using the Ansys Mechanical APDL Launcher¶
- The launcher is a gui tool that allows you to put all your inputs in, and then it will run the job or generate a command for you.
- RECOMMENDED WORKFLOW: Open launcher interactively, input all preferences including simulation environment and number of processors, then copy the command it generates and paste that in your PBS script.
- To make it create the command, after you input your parameters, click
Display Command line