---
title: "Ansys Fluent Guide"
canonical: "https://kb.uconn.edu/space/SH/26033783792/Ansys%20Fluent%20Guide"
format: markdown
---
This how-to article explains and demonstrates how to launch the Ansys fluent suite on HPC.

Ansys Fluent is available from within the main Ansys suite on HPC.

## \uD83D\uDCD8 Instructions

## Module File

First check the available ansys modules.

```
module avail ansys
```

To load ansys version 2026R1:

```
module load ansys/2026R1
```

## Parallel Job

To run several tasks in parallel on one or more nodes, here is an example fluentP.sh batch script for older versions of Fluent:

```
#!/bin/bash
#SBATCH -N 2 # allocate 2 nodes for the job
#SBATCH --ntasks-per-node=126
##SBATCH --exclusive # no other jobs on the nodes while job is running
#SBATCH -o fluentP_%J.out # the file to write stdout for fluent job
#SBATCH -e fluentP_%J.err # the file to write stderr for fluent job

source /etc/profile.d/modules.sh
module load ansys/$VERSION
module load openmpi/5.0.10

if [ -z "$SLURM_NPROCS" ]; then
  N=$(( $(echo $SLURM_TASKS_PER_NODE | sed -r 's/([0-9]+)\(x([0-9]+)\)/\1 * \2/') ))
else
  N=$SLURM_NPROCS
fi

echo -e "N: $N\n";

# run fluent in batch on the allocated node(s)
fluent 2ddp -g -slurm -t$N -mpi=openmpi -pdefault (or -pinfiniband) -ssh -i foo.txt


```

Make sure to replace foo.txt in the last line with the name of your job file. Then, submit your job with:

```
sbatch fluentP.sh
```

## Parallel Job for new fluent versions

Here is an example fluentP.sh batch script for newer versions of Fluent:

```
#!/bin/bash
#SBATCH -N 2 # allocate 2 nodes for the job
#SBATCH --ntasks-per-node=126
#SBATCH --exclusive # no other jobs on the nodes while job is running
#SBATCH -o fluentP_%J.out # the file to write stdout for fluent job
#SBATCH -e fluentP_%J.err # the file to write stderr for fluent job

module purge # allow for a clean module environment for the submission
module load ansys/2026R1 # load the most current ansys module to be used along with other modules
module load openmpi/5.0.10 # load the most current openmpi module to be used along with other modules

# run fluent in batch mode on the allocated node(s) using either one of the types of fluent solvers 2d,2ddp,3d, or 3ddp
# The -g option is used to run without GUI or graphics, The -slurm option is used to specify the scheduler, -t is used to specify the number of processors "cores" for the fluent model to use
# The -i option is used to specify the input file for fluent to execute, the file would need to be in the SAME directory where this submission script is located
# The standard error and output will be generated with the above format in the SBATCH headers.  The names for these files can change to the name of the specific project currently being worked 
on.
# the fluent -h or fluent -help commands will list available options for fluent that can be used

fluent 3ddp -g -slurm -t$SLURM_NTASKS -mpi=openmpi -pdefault -i foo.txt
```

> ⚠️ If you get an error about MPI and Hydra Proxy errors for any version of fluent, the issue is coming from the built-in Intel MPI that Ansys Fluent uses by default.  The issue can be bypassed by specifying openmpi as the MPI back-end within Fluent.
> ⚠️ 
> ⚠️ fluent 3ddp -g -slurm -t$SLURM_NTASKS -mpi=openmpi -pdefault -i foo.txt

Make sure to replace foo.txt in the last line with the name of your job input file. Then, submit your job with:

```
sbatch fluentP.sh
```

## Interactive Job

Start the interactive session on 1 node with 12 CPUs with srun, if X11 is required to load the Ansys Fluent GUI, add the --x11 flag to the srun command:

```
srun --x11 -N 1 -n 126 --partition=general --pty bash
```

### Fluent

The first parameter to fluent is the version (namely, 2ddp below). The version can be either 2d, 3d, 2ddp, or 3ddp; change it to whatever you need. The "dp" stands for "double precision".

Run fluent with:

```
fluent 2ddp -g -t $SLURM_NTASKS -mpi=openmpi -i <journal>
```

Type "exit" to end the session.

Or launch the Fluent GUI if connected to HPC with X11 enabled and the x11 flag was passed to the srun command above on a compute node:

```
fluent
```

The GUI will look like:

![AnsysFluentLauncher.png](media://55e4a2e8-54d8-46cd-9fac-308baa60f149)

### Ansys Electromagnetics Suite

Run the graphical launcher for Ansys Electromagnetics Suite with:

```
ansysedt
```

## User Guide

The command-line help usage actually provides very limited information:

```
fluent -help
```

The only place Ansys supplies to read more documentation is from the "Help" inside the Fluent GUI. Open a terminal in [X2Go](https://wiki.hpc.uconn.edu/index.php/X), load the fluent module, and then run `fluent` from the command-line to launch the GUI. Click on the Help button > Help on Starting and Executing Fluent.

### Ansys Workbench

Run the graphical launcher for Ansys Workbench with:

```
runwb2 -oglmesa
```