ANSYS

ANSYS is an engineering package and support routine for general-purpose finite-element analysis: statics, heat transfer, mode frequency, stability analysis, magnetostatics, coupled field analysis, etc. Supports are provided by ANSYS, Inc.

Availability & Restrictions

OSC has an "Academic Teaching Advanced " license for ANSYS. This allows for academic use of the software by Ohio faculty and students, with some restrictions. To view current ANSYS node restrictions, please see ANSYS's Terms of Use.

For academic users not on the OSU campus, OSC must pay an additional fee to Ansys to validate their use. For this reason, such new users must have their department or PI confirm their funding for ANSYS licenses.

The following versions of ANSYS are available at OSC:
Version Glenn Oakley
11.0 X  
11.0  update X  
13.0 X X
14.0   X*
14.5 X X

* Commercial users should use the "ndem" module.

Usage

Set-up

Use of ANSYS for academic purposes requires validation. To obtain validation please complete and return "Academic Agreement to Use ANSYS." This can be obtained from your site consultant or from the files ansys.pdfansys.ps, oransys.txt located in the Academic Agreement Forms.

ANSYS supports X11 Windows and 3-D devices. PostScript and HP-GL output are available through the DISPLAY program.

Using ANSYS

The ANSYS commands and utility programs (see below) are located in your execution path. ANSYS is normally started with a module load command for the specific version, e.g. ansys110; or use only ansys for the default version (ansys110 on Glenn).

module load ansys

Following a successful loading of the ANSYS module, you can access the ansys commands:

ansys <switch options> <file>

The ansys command takes a number of Unix-style switches and parameters.

The -j Switch

The ansys command accepts a -j switch. It specifies the "job id," which determines the naming of output files. The default is the name of the input file.

The -d Switch

The ansys command accepts a -d switch. It specifies the device type. The value can be X11, x11, X11C, x11c, or 3D.

The -m Switch

The ansys command accepts a -m switch. It specifies the amount of working storage obtained from the system. The units are megawords.

The memory requirement for the entire execution will be approximately 5300000 words more than the -m specification. This is calculated for you if you use ansnqs to construct an NQS request.

The -b [nolist] Switch

The ansys command accepts a -b switch. It specifies that no user input is expected (batch execution).

The -s [noread] Switch

The ansys command accepts a -s switch. By default, the start-up file is read during an interactive session and not read during batch execution. These defaults may be changed with the -s command line argument. The noread option of the -s argument specifies that the start-up file is not to be read, even during an interactive session. Conversely, the -s argument with the -b batch argument forces the reading of the start-up file during batch execution.

The -g [off] Switch

The ansys command accepts a -g switch. It specifies that the ANSYS graphical user interface started automatically.

ANSYS parameters

ANSYS parameters may be assigned values on the ansys command. The parameter must be at least two characters long and must be a legal parameter name. The ANSYS parameter that is to be assigned a value should be given on the command line with a preceding dash (-), a space immediately after, and the value immediately after the space:

module load ansys
ansys -pval1 -10.2 -EEE .1e6
sets pval1 to -10.2 and EEE to 100000

  

OSC Batch Usage

ANSYS can be run on OSC systems in interactive mode or in batch mode. Interactive mode is similar to running ANSYS on a desktop machine in that the graphical user interface will be sent from OSC and displayed on the local machine. Batch mode means that you submit the ANSYS job with a batch script by providing all the ANSYS input file(s) needed to run the simulation when resources become available.

Interactive jobs are run on compute nodes of the cluster, by turning on X11 forwarding. You can submit a simple one processor interactive batch job with X11 forwarding with the command qsub -I -X. The intention is that users can run ANSYS interactively for the purpose of building their model and preparing their input file. Once developed this input file can then be run in batch mode.

Batch jobs can request mutiple nodes/cores and long compute time, up to the limits of the OSC systems (refer to the computing pages). Batch jobs run on the compute nodes of the system and not on the login node. It is desirable for big problems since more resources can be used.

Interactive Example

To run interactive ANSYS, a batch job need to be submitted from the login node, to request necessary compute resources, with X11 forwarding. For example, the following line requests one node (the default), one core, for a walltime of one hour, with one ANSYS license.

qsub -I -X -l walltime=1:00:00 -l software=ansys+1

This job will queue until resources becomes available. Once the job is started, you're automatically logged in on the compute node; and you can launch ANSYS and start the graphic interface with the following commands:

module load ansys
ansys -g

Batch Mode

For a given model, prepare the input file with ANSYS commands (named ansys.in for example) for the batch run. Assume the solution will need 30 hours and 1 processor. The following batch script would be needed for the serial applicaiton:

#PBS -N ansys_test  
#PBS -l walltime=30:00:00  
#PBS -l nodes=1:ppn=1  
#PBS -j oe
cd $TMPDIR  
cp $PBS_O_WORKDIR/ansys.in .    
module load ansys  
ansys < ansys.in   
cp * $PBS_O_WORKDIR

To run this job on OSC batch system, the above script (named submit_ansys.job) is to be submitted with the command:

qsub submit_ansys.job

To take advantage of the powerful compute resources at OSC, you may choose to run distributed ANSYS for large problems. Multiple nodes and cores can be requested to accelerate the solution time. Note that you'll need to change your batch script slightly for distributed runs.

For distributed ANSYS jobs using one node (nodes=1), the number of processors needs to be specified in the command line with options '-dis -np':

#PBS -N ansys_test 
#PBS -l walltime=3:00:00 
#PBS -l nodes=1:ppn=8
#PBS -W x=GRES:ansys+1%ansyspar+4
...
ansys -dis -np 8 < ansys.in  
...

Notice that in the script above, the ansys parallel license is requested as well as ansys license in the format of

#PBS -W x=GRES:ansys+1%ansyspar+n

where n=m-4, with m being the total cpus called for this job. This line is necessary when the total cpus called is greater than 4 (m>4), which applies for the parallel example below as well.

For distributed jobs requesting multiple nodes, you need to specify the number of processors for each node in the command line. This information can be obtained from $PBS_NODEFILE. The following shows changes in the batch script if 2 nodes on Glenn are requested for a parallel ansys job:

#PBS -N ansys_test 
#PBS -l walltime=3:00:00 
#PBS -l nodes=2:ppn=8
#PBS -W x=GRES:ansys+1%ansyspar+12
...
export MPI_WORKDIR=$PWD
machines=`uniq -c ${PBS_NODEFILE} | awk '{print $2 ":" $1}' | paste -s -d ':'`
ansys -dis -machines $machines < ansys.in  
...
pbsdcp -g '*' $PBS_O_WORKDIR

The 'pbsdcp -g' command in the last line in the script above makes sure that all result files generated by different compute nodes are copied back to the work directory.

Information on how to monitor the job can be found in the computing environments section.

 

Further Reading

 

See Also

 

Supercomputer: 
Service: 
Fields of Science: