How to run Fluent

Fluent is part of the Ansys suite of programs. It can be run either in batch mode or interactively.

Recommendation

We strongly advise that you run all production jobs in batch mode.

On this page:

Prerequisites

To run Fluent you need to be added to the ansys group and have set up your floating license. Review the information in the following pages:

Running in batch mode 

To do this you will need to output a journal file (refer to 2.15 Using Journaling and Scripting with FLUENT in Workbench (external site)). The journal file must be written for the TUI (text user interface), not the GUI (graphical user interface).  The Fluent manual states that the language for the TUI is Scheme, which is a dialect of Lisp.

Preprocessing (such as mesh generation) and post-processing (for example, visualisation of results) are serial processes and should not be run on HPC systems like Setonix. This means you may need to switch to a Serial→Parallel (Setonix)→ Serial for your workflow. Alternatively, for small data sets, you may wish to use your own workstations and upload/download via hpc-data.pawsey.org.au .

Below we provide a sample batch script.

Listing 1. Sample Slurm script to run Fluent in batch mode
#!/bin/bash -l
#SBATCH --job-name="fluent"
#SBATCH --nodes=1
#SBATCH --ntasks=128
#SBATCH --exclusive
#SBATCH --time=1:00:00
#SBATCH --account=pawsey0000
#SBATCH --cpus-per-task=1

#load the module  
# Fluent is a module in ansys-fluids package
module load ansys-fluids/version
module load cray-mpich-abi/8.1.27

# Tell Fluent where the licence server is. May require an update
export ANSYSLI_SERVERS=2325@myflexlmserver.edu.au
export ANSYSLMD_LICENSE_FILE=1055@myflexlmserver.edu.au

# Fluent provided by system modules sets some environment variables. 
# When NOT running fluent provided by system modules
# it may be necessary to add
export FLUENT_ENABLE_SLURM_SUPPORT=1
export FLUENT_CRAY_MPI_ABI=1
export SLURM_OVERLAP=1
# add if running on Cray machine like Setonix
# export FL_ENABLE_CRAY_AFFINITY=1

# for cray system 
fluent 3ddp -mpi=cray -t${SLURM_NTASKS} -g -i my_sim.jou > output_file

Using user-defined functions

To run Fluent with user-defined functions (UDFs) you will need to compile Fluent. We have found that UDFs compile well using the Intel compiler. Thus, you will need to compile UDFs manually on the login node before submitting the batch job. 

First cd to the directory where your case file is located. Then launch the Fluent GUI after loading the appropriate modules. 

Terminal 1. Loading fluent and intel
# Fluent is a module in ansys-fluids package
$ module load ansys-fluids/version
$ fluent

Then load up your case file, and go into the user-defined functions menu entry. From there you can build the library. Use the default name (libudf). You need to add the myudf.c file and then click the build button. Once the above is done successfully, you can submit your batch job and it shouldn't try to recompile the UDF. 

Running interactively

To run an interactive Ansys modules through GUI on remote visualisation service, follow the steps outlined in Web-based Remote Visualisation.

Remember to close your remote visualisation session when finished.

External links