Fluent is used for computational fluid dynamics (CFD).
Meshing tool
The meshing tool in Fluent is called ICEM. You can start ICEM with the command icemcfd
. As it is a graphical
application you should start icemcfd
from within a NoMachine session.
Submit a Fluent job
You can run a Fluent job interactively on ALICE using the srun
command. However it is more sensible to run Fluent
as a non-interactive job.
To run Fluent as a non-interactive job you need to:
- Store instructions including locations of input and output files in a Fluent journal file. A journal file is a simple text file containing Fluent Text User Interface (TUI) commands.
- Use the -i option followed by the name of the journal file to make Fluent execute the commands in a journal file.
- Use the -g option to disable the graphical user interface (GUI) since this isn't required.
- Use a submission script to submit the Fluent job to the job scheduler. The scheduler uses this to execute the Fluent command.
Job Submission Example
In the example below the case and data files simulation.cas and simulation.dat will be processed over 10000 iterations by Fluent by reading instructions from the simulation.jou file.
Example journal file simulation.jou:
; Read case and data files
file read-case-data simulation.cas
; Do 10000 iterations
it 10000
; Write output back to data file
file write-data simulation.dat
; 'yes' here allows the existing .dat file to be overwritten
yes
Example submission script submit.sh:
This example requests one hour of walltime, uses 16 processor cores and 120GB of memory (the job requests exclusive use of an entire node, then runs 16 parallel threads as this is the limit imposed by the fluent license).
#!/bin/bash
#
#SBATCH --job-name=Fluent
#SBATCH --mail-type=BEGIN,FAIL,END
#SBATCH --mail-user=username@leicester.ac.uk
#SBATCH --time=01:00:00
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=16
#SBATCH --cpus-per-task=1
#SBATCH --mem=60g
#SBATCH --output=%x-%j.out
#SBATCH --error=%x-%j.err
#SBATCH --export=NONE
# Load the Fluent module
module load fluent/2022R2
# cd into the job submission directory
cd $SLURM_SUBMIT_DIR
# Start fluent using the specified journal file
fluent 3d -pib -ssh -g -mpi=ibmmpi -t${SLURM_NTASKS} -i $HOME/fluent/fluent3dles.jou
Submit the Fluent submission job to the queue:
sbatch submit.sh
Create your own submission script
You will usually only need to make small changes to the example submission script:
- Walltime
- Memory limits
- Fluent grid (this is 2ddp in the example above).
The current Fluent licence allows parallelism up to a maximum of 16 cores, which can be distributed across multiple nodes in the cluster. Such a run will use only one Fluent licence.
You can find details of the TUI commands in the Fluent documentation.
CFD Online is a very useful resource, particularly its section on Journal Files and TUI.