Skip to content


ANSYS CFX software is a high-performance, general purpose fluid dynamics program that has been applied to solve wide-ranging fluid flow problems for over 20 years. At the heart of ANSYS CFX is its advanced solver technology, the key to achieving reliable and accurate solutions quickly and robustly. The modern, highly parallelized solver is the foundation for an abundant choice of physical models to capture virtually any type of phenomena related to fluid flow. The solver and its many physical models are wrapped in a modern, intuitive, and flexible GUI and user environment, with extensive capabilities for customization and automation using session files, scripting and a powerful expression language.

To run ANSYS CFX in batch mode you can utilize/modify the default cfx.pbs script and execute it via the qsub command.

#PBS -l select=5:ncpus=24:mpiprocs=24
#PBS -q qprod
#PBS -N ANSYS-test

#! Mail to user when job terminate or abort
#PBS -m ae

#!change the working directory (default is home directory)
#cd <working directory> (working directory must exists)

echo Running on host `hostname`
echo Time is `date`
echo Directory is `pwd`
echo This jobs runs on the following processors:
echo `cat $PBS_NODEFILE`

ml ANSYS/19.1-intel-2017c

#### Set number of processors per host listing
#### (set to 1 as $PBS_NODEFILE lists each node twice if :ppn=2)
#### Create host list
for host in `cat $PBS_NODEFILE`
 if ["$hl" = "" ]
 then hl="$host:$procs_per_host"
 else hl="${hl}:$host:$procs_per_host"

echo Machines: $hl

#-dev input.def includes the input of CFX analysis in DEF format
#-P the name of prefered license feature (aa_r=ANSYS Academic Research, ane3fl=Multiphysics(commercial))
cfx5solve -def input.def -size 4 -size-ni 4x -part-large -start-method "Platform MPI Distributed Parallel" -par-dist $hl -P aa_r

Header of the PBS file (above) is common and description can be find on this site. SVS FEM recommends to utilize sources by keywords: nodes, ppn. These keywords allows to address directly the number of nodes (computers) and cores (ppn) which will be utilized in the job. Also the rest of code assumes such structure of allocated resources.

Working directory has to be created before sending PBS job into the queue. Input file should be in working directory or full path to input file has to be specified. Input file has to be defined by common CFX def file which is attached to the CFX solver via parameter -def

License should be selected by parameter -P (Big letter P). Licensed products are the following: aa_r (ANSYS Academic Research), ane3fl (ANSYS Multiphysics)-Commercial.