====== Ansys Fluent/Aero/Icing Help ======
> Ansys Fluent is the industry-leading fluid simulation software known for its advanced physics modeling capabilities and industry leading accuracy.
* See: https://www.ansys.com/products/fluids/ansys-fluent
* Fluent users guide: https://ansyshelp.ansys.com/public/account/secured?returnurl=/Views/Secured/corp/v252/en/flu_ug/flu_ug.html
----
===== Running =====
To use ANSYS Fluent on Comet, please read the main [[:advanced:software:ansys|ANSYS guide]] first.
----
===== Fluent tools =====
A number of tools are included in the Fluent component of our ANSYS license. Those which you can directly run on Comet are listed below.
You may also want to consult:
* [[advanced:software:ansys|ANSYS guide]] - our main ANSYS guide for Comet
* [[advanced:ansys_workbench|ANSYS Workbench guide]] - using ANSYS Workbench on Comet
----
===== aero =====
To start the Fluent Aero workspace, first launch a new [[advanced:software:x11|X11 desktop session]] using our [[advanced:interactive|Open OnDemand]] service.
Once the VNC Desktop session is running, launch a the terminal application from the bottom bar:
{{:advanced:software:ansys_desktop_terminal.png?800|}}
In the terminal, enter the following commands:
$ source /nobackup/shared/containers/ansys.2025r2.sh
$ container.run bash
> aero
The Fluent Aero workspace application will open:
{{:advanced:ansys_fluent_aero.png?800|}}
Functionality, the Aero workspace works the same as the main Fluent application.
----
===== fluent =====
ANSYS Fluent can be run in either batch mode for long, complex compute jobs, or interactively via the graphical application running on Open OnDemand. Both approaches are covered below.
==== Sample batch job - Single Node ====
This example requires testing
Running Fluent on a single node (aka a server) is the easiest method, but you are limited by the resources available on that single node (//maximum of 256 cores and 1.5TB of RAM//).
The example below allocates:
* A single node
* 32 parallel Fluent tasks, each with one CPU core (//total 32 cores//)
* 128GB RAM in total
* 8 hours of runtime
* Uses a Slurm partition named 'default_free'
Adjust the values as needed.
#!/bin/bash
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=32
#SBATCH --cpus-per-task=1
#SBATCH --mem=128G
#SBATCH --time=08:00:00
#SBATCH --partition=default_free
source /nobackup/shared/containers/ansys.2025r2.sh
container.run fluent 2d -i myfluentjob.jou -gu -t $SLURM_NTASKS -driver null
Submit the job as **sbatch fluent_single.sh**
----
==== Sample batch job - Multi Node ====
This example requires testing
Multi-node Fluent jobs can take advantage of more resources simultaneously, but the script is a little more complex.
The example below allocates:
* 4 nodes
* 4 parallel Fluent tasks per node, each with 8 cores (32 per node), for a total of 16 Fluent tasks and 128 CPU cores (''4 nodes x 4 tasks x 8 cores'')
* 64GB RAM per node, for a total of 256GB RAM (''4 nodes x 64GB per node'')
* 8 hours of runtime
* Uses a Slurm partition named 'default_free'
Adjust the values as needed.
#!/bin/bash
#SBATCH --chdir=/path_to/your_ansys/working_directory/
#SBATCH --nodes=4
#SBATCH --ntasks-per-node=4
#SBATCH --cpus-per-task=8
#SBATCH --mem=64G
#SBATCH --time=08:00:00
#SBATCH --partition=default_free
HOSTNAMES=`scontrol show hostnames $SLURM_JOB_NODELIST`
echo "Job will run on:
$HOSTNAMES"
source /nobackup/shared/containers/ansys.2025r2.sh
# Now run ansys....
# -i : the name of your input file
# -gu and -driver null : to disable the graphical user interface
# Running on normal nodes (not low-latency)
srun container.run fluent 3ddp -g -nm -np ${SLURM_NTASKS} -nt ${SLURM_CPUS_PER_TASK} -slurm -pdefault -mpi=intel -platform=intel -i MY_PROJECT.JOU
# If running on low-latency nodes (uses infiniband inter-process communication)
#srun container.run fluent 3ddp -g -nm -np ${SLURM_NTASKS} -nt ${SLURM_CPUS_PER_TASK} -slurm -pinfiniband -mpi=intel -platform=intel -i MY_PROJECT.JOU
Submit the job as **sbatch fluent_multi.sh**
//Note: Multi node example taken from// https://innovationspace.ansys.com/forum/forums/topic/multiple-nodes-using-fluent-on-hpc-under-slurm/
Further examples may be found at https://docs.hpc.shef.ac.uk/en/latest/stanage/software/apps/ansys/fluent.html
You may need to do some performance profiling to understand whether it is better to have __more__ tasks with fewer cpu cores per task, or __fewer__ tasks with more cpu cores per task, e.g:
* ''--ntasks-per-node=4'' //and// ''--cpus-per-task=8''
//or//...
* ''--ntasks-per-node=8'' //and// ''--cpus-per-task=4''
This represents the //same// number of cores, but presented via a //different// mix of tasks. Some experimentation may be needed in order to find the most optimal balance of task quantity and task size.
----
==== Example graphical job ====
To start the graphical Fluent tool, first launch a new [[advanced:software:x11|X11 desktop session]] using our [[advanced:interactive|Open OnDemand]] service.
Once the VNC Desktop session is running, launch a the terminal application from the bottom bar:
{{:advanced:software:ansys_desktop_terminal.png?800|}}
In the terminal, enter the following commands:
$ source /nobackup/shared/containers/ansys.2025r2.sh
$ container.run bash
> fluent
The Fluent Launcher window opens:
{{:advanced:ansys_fluent_launcher.png?800|}}
Start a //new// project - make the following settings changes:
* **Parallel Settings** -> Shared Memory on local machine
* **Scheduler** -> None
If loading an //existing// project:
* **Home** -> Solution -> Read -> Case -> Select your input data
Now press the **Start** button, the main Fluent application opens, either with a blank window:
{{:advanced:ansys_fluent_new.png?800|}}
... or your existing project if you chose to load one:
{{:advanced:ansys_fluent_load.png?800|}}
----
==== Testing Fluent ====
A copy of an interactive Fluent job is kindly provided by one of our postgraduate researchers, below:
* {{ :advanced:fluent_example.tar.gz|}}
To use this example to test Fluent, copy the ''.tgz'' to your home directory, extract it (''tar -zxf fluent_example.tar.gz'') and then follow these steps:
**Option 1**
* Start the ''fluent'' launcher as described above
* In the launcher window navigate to **Home** -> Solution -> Read -> Case -> and select the file ''animation/pulse_pipe_fluid_vol_transient_exp.cas.h5'' from your home directory
* Click **Start** in the launcher window, the Fluent application starts
* In the outline view on the left panel of the Fluent application window navigate to **Case View** -> //Solution// -> then right click //Initialization// and choose //Initialize//
* In the outline view on the left panel of the Fluent application window navigate to **Case View** -> //Solution// -> //Calculation Activities// -> then right click //Run Calculations// and choose //Calculate//
* Once solution is completed choose the **File** menu then -> //Write// -> //Case & Data//
**Option 2**
* In the top menu choose the **File** menu then -> //Read// -> //Journal// -> and choose ''animation/solve0.jou'' from your home directory
----
===== icing =====
To start the Fluent Icing workspace, first launch a new [[advanced:software:x11|X11 desktop session]] using our [[advanced:interactive|Open OnDemand]] service.
Once the VNC Desktop session is running, launch a the terminal application from the bottom bar:
{{:advanced:software:ansys_desktop_terminal.png?800|}}
In the terminal, enter the following commands:
$ source /nobackup/shared/containers/ansys.2025r2.sh
$ container.run bash
> icing
The Fluent Icing workspace application will open:
{{:advanced:ansys_fluent_icing.png?800|}}
Functionality, the Icing workspace works the same as the main Fluent application.
----
===== post_analysis =====
To start the ''post_analysis'' tool, first launch a new [[advanced:software:x11|X11 desktop session]] using our [[advanced:interactive|Open OnDemand]] service.
Once the VNC Desktop session is running, launch a the terminal application from the bottom bar:
{{:advanced:software:ansys_desktop_terminal.png?800|}}
In the terminal, enter the following commands:
$ source /nobackup/shared/containers/ansys.2025r2.sh
$ container.run bash
> post_analysis
The ''post_analysis'' application interface will open:
{{:advanced:ansys_fluent_postanalysis.png?800|}}
----
===== udil2udil =====
The ''udil2udil'' tool does not need to be run in a graphical session and can be used from either a command line or desktop environment.
$ source /nobackup/shared/containers/ansys.2025r2.sh
$ container.run udil2udil -h
udil2udil
Usage: udil2udil [-v] [-h] infile outfile
Options:
-h Display this information
-fps [fps] Change the fps for the output movie
-options [opts] Change the writer options for the output movie
-v Enable verbose mode
----
[[:advanced:software:ansys|Back to ANSYS]]
[[:advanced:software|Back to Software]]