You are here

ANSYS simulation software, including Fluent and CFX

Table of Contents

Introduction

ANSYS provides a wide range of simulation software, but here we concentrate on the computational fluid dynamics packages, Fluent and CFX.  See the Software Versions tab for the specific versions available on WestGrid systems.

Licensing and access

WestGrid has not purchased ANSYS licenses.  Researchers must provide their own licenses (or obtain access to appropriate licenses through their institutions) to use ANSYS software on WestGrid systems.

ANSYS CFD products (Fluent and CFX) have been installed on Lattice and Parallel for use by University of Calgary researchers only.  (See the QuickStart Guides for those systems for instructions on requesting Lattice and Parallel accounts.)  Licenses are provided through a shared pool managed by the U. of C. Information Technologies software librarian.  University of Calgary researchers should write to the librarian at appinst@ucalgary.ca to register interest in using these licenses. Any subsequent issues regarding licensing should be referred to that address, not the WestGrid support mailing list.  A UNIX group, wg-ucans, is used to control access to the University of Calgary licensed ANSYS software on WestGrid systems.  Write to accounts@westgrid.ca to request that your user name be added to wg-ucans.

Fluent

Running Fluent on Lattice and Parallel (University of Calgary researchers only)

As explained above, ANSYS Fluent has been installed on Lattice and Parallel for use by University of Calgary researchers only, using a shared pool of licenses.  The job scheduler will start jobs without checking whether licenses are available at the time.  Therefore, it is important to be generally aware of whether your research colleagues are actively using the licenses and whether a certain size job is reasonable to submit or not.  On Lattice or Parallel, the status of licenses can be checked with the command:

/global/software/ansys/ansys16/v162/fluent/bin/lmstat -a -c 1055@ansyslic.ucalgary.ca

The most relevant parts of the lmstat output are likely the aa_r (ANSYS Academic Research) and aa_r_hpc (ANSYS Academic Research HPC) license availability sections.  A job using more than four cores, the normal case for running Fluent on Parallel or Lattice, will use an aa_r license and additional aa_r_hpc licenses.

It is permissible to run Fluent with the full graphical interface to prepare models, check results or facilitate the setup of parallel jobs with User Defined Functions, this should be done on a compute node reserved for interactive use, as described on the Running Jobs page and the Lattice and Parallel QuickStart Guides.

For extended calculations with Fluent, non-interactive batch jobs are used. To run a Fluent job, you use the qsub command to submit a TORQUE job script as described on the Running Jobs page. An example of a job script is given below.  In the batch job script there is a line to run the fluent command on which the -i argument is used to specify the name of a file containing the Fluent text-mode commands to execute.  An example of such an input file is also shown below.

Sample Fluent batch job script

Here is a sample of a batch job script to run Fluent 16.2 on Lattice or Parallel.  Note, however, that ANSYS 18.0 is available, by changing the definition of the FLUENT variable in the script to point to /global/software/ansys/ansys18/v180/fluent/bin/fluent.

#!/bin/bash
#PBS -S /bin/bash

# Fluent 16 job script for elbow example on Lattice or Parallel.
# Requires input files elbow3.in and elbow3.cas
# The elbow3.cas file is from the tutorial files off a
# Fluent 6.1 disk and described in Chapter 25 of the
# Fluent 6 user manual - the section on parallel processing.

INPUT=elbow3.in
SOLVER="2d"

# 2015-09-11 DSP

FLUENT=/global/software/ansys/ansys16/v162/fluent/bin/fluent

cd $PBS_O_WORKDIR

echo "Current working directory is `pwd`"

echo "Node file: $PBS_NODEFILE :"
echo "---------------------"
cat $PBS_NODEFILE
echo "---------------------"
NUM_CORES=`/bin/awk 'END {print NR}' $PBS_NODEFILE`
echo "Running on $NUM_CORES cores."

echo "Starting run at: `date`"

$FLUENT $SOLVER -g -t${NUM_CORES} -ssh -pib -cnf=${PBS_NODEFILE} -i $INPUT

echo "Job finished at: `date`"

To adapt the script to your needs, change the file specified on the INPUT line to the name of your input text file of Fluent commands. You may also have to change the SOLVER="2d" line to specify whether you are using the 2d, 2ddp, 3d, or 3ddp solver (according to whether your problem is two- or three-dimensional and whether you are using single or double precision calculations). The above script and a sample Fluent case file and input command file are available in the directory /global/software/ansys/examples/fluent/elbow on Lattice and Parallel.

Creating a Fluent input file

Typically the main difficulty in getting started with Fluent on WestGrid is figuring out what text interface commands correspond to the graphical interface commands with which you may be more familiar. At the Fluent command prompt, if you just hit enter the available commands will be shown:

adapt/                  file/                   report/
define/                 mesh/                   solve/
display/                parallel/               surface/
exit                    plot/                   views/

Entering one of those commands and then another enter will give sub-options:

> file

/file>
async-optimize?         read-case-data          start-journal
auto-save/              read-field-functions    start-transcript
binary-files?           read-journal            stop-journal
confirm-overwrite?      read-macros             stop-macro
define-macro            read-profile            stop-transcript
execute-macro           read-transient-table    transient-export/
export/                 set-batch-options       write-cleanup-script
import/                 show-configuration      write-field-functions
read-case               solution-files/         write-macros

So, for example, one can discover by exploring these menus that the commands to set the frequency with which data and case files can be automatically stored periodically during a long run are of the form:

/file/auto-save/data-frequency 1000
/file/auto-save/case-frequency if-case-is-modified

Here is an example of a complete text input file in which case and data files are read in, some parameters are set related to the storing of output, the solver is run and data and case files saved at the end of the run.

/file/read-case test.cas
/file/read-data test.dat

/file/confirm-overwrite no
/file/auto-save/data-frequency 1000
/file/auto-save/case-frequency if-case-is-modified
/file/auto-save/root-name test

/solve/dual-time-iterate
22200
150

/file/write-case test.%t.%i.cas
/file/write-data test.%t.%i.dat

For More Information

2015-09-08: Page created
2015-09-11: Added batch job and Fluent input file examples.
2015-10-07: Updated for Fluent 16.2.
2017-09-15: Added a mention of ANSYS 18.0 and updated the license server address to use with lmstat.