The CSF2 has been replaced by the CSF3 - please use that system! This documentation may be out of date. Please read the CSF3 documentation instead. To display this old CSF2 page click here. |
Fluent
Overview
Ansys Fluent is a computational fluid dynamics application. Fluent v19.2, v19.1, v18.1, v18.0, v16.2, v14.0 and v13.0 are now available. The previous version, 6.3.26, is no longer available as the licences have end-of-lifed.
Restrictions on Use
Only users who have been added to the Fluent group can run the application. Owing to licence restrictions, only users from the School of MACE can be added to this group. Requests to be added to the Fluent group should be emailed to its-ri-team@manchester.ac.uk
Fluent jobs must not be run on the login node. If you need to run an interactive job please use qrsh as detailed below.
Due to licence restrictions parallel jobs using version 13 and 14 can use no more that 4 cores. Newer versions may use up to 24 cores in fluent-smp.pe |
Set Up Procedure
Once you have been added to the Fluent group, you will be able to access the executables by using one of the following module commands:
module load apps/binapps/fluent/19.2 module load apps/binapps/fluent/19.1 module load apps/binapps/fluent/19.0 module load apps/binapps/fluent/18.1 module load apps/binapps/fluent/18.0 module load apps/binapps/fluent/16.2 # Max 24 cores in a job (this and newer versions) module load apps/binapps/fluent/14.0 # Max 4 cores in a job module load apps/binapps/fluent/13.0 # Max 4 cores in a job
Available Parallel Environments for Fluent
When running Fluent jobs, one of the Fluent-specific SGE parallel environments must be used; these ensure proper clean-up at the end of the job.
Only one such environment is currently available:
fluent-smp.pe | Suitable for parallel jobs of no more than 24 processes. The PE ensures that all processes are on the same compute node. |
See the instructions below for how to use this in your job submissions.
Required Input Files
To run a fluent job you will need a fluent journal file, a fluent case file and usually a data file which the case file will load.
The journal file can be created either by asking fluent to write it while using the fluent GUI (which can be run from the CSF or from a desktop PC installation). Alternatively, the journal file can be written by hand. This is common – they are often very simple files which load the case and data files, then start the simulation (we have seen journal files that are only 3 lines long).
UDF Files
If you need to compile a User Defined Function (UDF) file, this should be done on the CSF. Fluent will usually do this automatically when your job runs provided you have a line in your case (.cas
) file similar to:
(udf/compile/files (("libudf" (source "/scratch/username/my_project/my_udf.c") (header))))
This will ask fluent to compile your UDF source file (named my_udf.c
in a directory named my_project in your scratch area – change as required).
If you wish to check your UDF code compiles on the CSF before submitting a job to the batch system, you can run:
csf_compile_udf --help
for instructions on how to use this script to check your code.
Running Fluent in Parallel in batch
Fluent is SGE-aware, so there is no need to write a SGE submission script. You can run fluent
on the login node and it will submit a job to the batch system for you. You must tell Fluent that you wish to run your job under SGE and pass the name of the parallel environment and number of cores you would like to use, for example, to run a 2-core job:
# Run this on the CSF login node at ask fluent to submit a batch job fluent 3d -g -t2 -ssh -sge -sgepe fluent-smp.pe 2 -i input.jou ^ ^ ^ | | | +---------------+----------------+ +--- Journal file to run | The value given to the "-t" option MUST be the same as the value given to the "-sgepe fluent-smp.pe" option (in this example, 2 [cores])
Running High Memory Fluent Jobs in Parallel
The HIGHMEM nodes are NOT currently available while the CSF3 merger takes place. DO NOT USE.
Please DO NOT use this option unless you genuinely need more than 4GB per core as the available resources for such work is very limited.
The built in SGE functions of fluent are unable to take account of ‘-l
‘ options passed to it. The following will submit a fluent job the to 8GB per core nodes:
# Run this on the CSF login node to submit a batch job yourself qsub -V -cwd -l highmem -pe fluent-smp.pe 2 -b y fluent 3ddp -g -t2 -ssh -i input.jou ^ ^ ^ ^ | | | | +--------------------+--------------------+ +-------------+-------------+ | | Flags given to the qsub command Flags given to the fluent command used to submit the batch job. that will be run in the batch job.
The -V
and -cwd
are important to ensure your job finds the fluent command and the input file. The above command is equivalent to the following jobscript:
#!/bin/bash #$ -V #$ -cwd #$ -l highmem #$ -pe fluent-smp.pe 2 # In a jobscript the $NSLOTS variable is automatically set to the number # given on the '#$ -pe' line (2 in this case). Now run fluent. fluent 3ddp -g -t$NSLOTS -ssh -i input.jou
If you use a jobscript you should then submit it from the login node using
qsub jobscript
where jobscript
is the name of your jobscript file.
Running Serial Interactive Jobs via qrsh
The running of serial, interactive jobs is tolerated. This is mainly used to set up a simulation which can then be saved to file and run in batch. You may need to use the GUI to set up a UDF. If you are setting up a parallel UDF please email its-ri-team@manchester.ac.uk.
You may run fluent interactively using the short
option which has a time limit of 1 hour.
Starting Fluent interactively on short nodes
qrsh -l short -l inter
Then, once qrsh
has returned a commandline on a compute node, load the appropriate environment module and start Fluent:
module load apps/binapps/fluent/16.2 # Load the modulefile for the version you require fluent
Notes:
- Attempting to combine the above steps by, from the login node, using the single command
# Do NOT do this - it will fail! qrsh -l short -l inter /opt/gridware/apps/binapps/fluent/14.0/ansys_inc/v140/fluent/bin/fluent
will result in an incorrect environment for Fluent and the GUI may not operate correctly.
- Linux: if the render window section of the GUI does not display your model try setting the following before running fluent:
export LIBGL_ALWAYS_INDIRECT=1
- alternatively run fluent using:
fluent -driver x11
- Windows: if the render window is slow to redraw or flashes try running fluent using:
fluent -driver x11
Note: For the GUI to work you must have an X server running on your PC. See the instructions on the using GUI based applications page.
Further Information
Further information on Fluent and other CFD applications may be found by visiting the MACE CFD Forum.
More information about qrsh on the CSF.