Skip to end of banner
Go to start of banner

How to run Fluent

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

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
# 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
# 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
# for non-cray systems with openmpi 
fluent 3ddp -mpi=openmpi -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 remote visualisation session, first follow the steps outlined in /wiki/spaces/VIS/pages/58306621.

Next, type the following commands into a terminal.

Terminal 2. Launching the Fluent GUI
$ export ANSYSLI_SERVERS=2325@myflexlmserver.edu.au
$ export ANSYSLMD_LICENSE_FILE=1055@myflexlmserver.edu.au
# Fluent is a module in ansys-fluids package 
$ module load ansys-fluids/version
$ module load virtualgl
$ vglrun fluent

Remember to close your remote visualisation session when finished.

External links

  • No labels