{"id":752,"date":"2018-11-06T11:05:26","date_gmt":"2018-11-06T11:05:26","guid":{"rendered":"http:\/\/ri.itservices.manchester.ac.uk\/csf3\/?page_id=752"},"modified":"2026-02-18T14:22:06","modified_gmt":"2026-02-18T14:22:06","slug":"fluent","status":"publish","type":"page","link":"https:\/\/ri.itservices.manchester.ac.uk\/csf3\/software\/applications\/fluent\/","title":{"rendered":"Ansys Fluent"},"content":{"rendered":"<h2>Overview<\/h2>\n<p>Ansys Fluent is a computational fluid dynamics application. Fluent versions 2022R1, 2021R1, 19.5 (also known as 2019 R3), 19.3, 19.2 and 18.1 are available.<\/p>\n<div class=\"hint\"><strong>Please note:<\/strong> when requesting help with, or access to, this application, please use the name &#8220;Fluent&#8221; and not simply &#8220;Ansys.&#8221; There are other Ansys products installed on the CSF (see <a href=\"..\/ansys-mechanical\">Ansys Mechanical<\/a>) so it isn&#8217;t always obvious to the sysadmins which product you mean if you simply request &#8220;Ansys.&#8221;<\/div>\n<h2>Restrictions on Use<\/h2>\n<p>Only users who have been added to the <code>fluent<\/code> group can run the application. Owing to licence restrictions, only users from the Dept. of MACE, one specific research group in CEAS, or one specific group in BMH, can be given access to Fluent (these groups all have an Ansys license.) Requests to be added to the <code>fluent<\/code> group should be submitted via our <a href=\"\/csf3\/overview\/help\/\">Connect Portal form<\/a>.<\/p>\n<p>See below for maximum job sizes (they are a limitation imposed by the license).<\/p>\n<p>Fluent jobs must not be run on the login node. If you need to run an interactive job please use <a href=\"\/csf3\/batch-slurm\/srun\/\">srun<\/a> as detailed below.<\/p>\n<h2>Set Up Procedure<\/h2>\n<p>Once you have been added to the Fluent group, you will be able to access the executables by using <em>one<\/em> of the following module commands:<\/p>\n<pre>\r\nmodule load apps\/binapps\/fluent\/2024R2          # Max job size: 32 cores\r\nmodule load apps\/binapps\/fluent\/2022R1          # Max job size: 32 cores\r\nmodule load apps\/binapps\/fluent\/2021R1          # Max job size: 32 cores\r\nmodule load apps\/binapps\/fluent\/19.5            # Max job size: 16 cores\r\nmodule load apps\/binapps\/fluent\/19.3            # Max job size: 16 cores\r\nmodule load apps\/binapps\/fluent\/19.2            # Max job size: 16 cores\r\nmodule load apps\/binapps\/fluent\/18.1            # Max job size: 16 cores\r\n\r\n# <strong>Custom modulefiles for specific research groups<\/strong>\r\nmodule load apps\/binapps\/fluent\/2024R2-frangi   # Prof. Alex Frangi's group\r\nmodule load apps\/binapps\/fluent\/19.5-fonte      # Dr.  Claudio Pereira Da Fonte's group\r\n<\/pre>\n<h2>Required Input Files<\/h2>\n<p>To run a fluent job you will need a fluent <em>journal<\/em> file, a fluent <em>case<\/em> file and usually a data file which the case file will load.<\/p>\n<p>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 &#8211; 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).<\/p>\n<h3>UDF Files<\/h3>\n<p>If you need to compile a <em>User Defined Function<\/em> (UDF) file, this should be done on the CSF &#8211; UDF files compiled elsewhere will not usually run on the CSF.<\/p>\n<p>There are two methods. The first method is only recommended when you know there are no mistakes in your UDF source code &#8211; e.g., you&#8217;ve tested it elsewhere. You can let Fluent do the compilation automatically when your job runs &#8211; it just requires that  you have a line in your <em>case<\/em> (<code>.cas<\/code>) file similar to:<\/p>\n<pre>(udf\/compile\/files ((\"libudf\" (source \"\/scratch\/<em>username<\/em>\/<em>my_project<\/em>\/<em>my_udf<\/em>.c\") (header))))\r\n<\/pre>\n<p>This would ask fluent to compile your UDF source file (named <code>my_udf.c<\/code> in a directory named <em>my_project<\/em> in your scratch area &#8211; change as required).<\/p>\n<p><strong>A better method<\/strong> is to NOT add the above line to your <em>case<\/em> (<code>.cas<\/code>) file and instead compile the UDF <em>before<\/em> your job runs. That way, Fluent won&#8217;t need to do it itself. This is also a good way to check your UDF code actually compiles. If you wait until Fluent compiles it (when your job runs), any mistakes in your code will mean you have to fix the code then resubmit the job. It is much easier to try to compile the UDF <em>on the login node<\/em> before the job runs and make any corrections to the code if you need to do so.<\/p>\n<p>Compiling Fluent UDF files on the login node is permitted. But running fluent to process your data on the login node is NOT permitted &#8211; you must submit a batch job to do that.<\/p>\n<p>To check your UDF code compiles on the CSF <em>before<\/em> submitting a job to the batch system, you can run:<\/p>\n<pre>csf_compile_udf <em>simtype1<\/em> <em>simtype1<\/em>_node <em>simtype1<\/em>_host ...\r\n\r\n# Example 1: Compile for a 3ddp (3D double-precision) simulation:\r\ncsf_compile_udf 3ddp 3ddp_node 3ddp_host\r\n\r\n# Example 2: Compile for a 2d (2D single-precision) simulation:\r\ncsf_compile_udf 2d 2d_node 2d_host\r\n\r\n# For more info:\r\ncsf_compile_udf --help\r\n<\/pre>\n<p>This helper script will compile your <code>my_udf.c<\/code> file in to a <code>libudf.so<\/code> file. It will create a new sub-directory named <code>libudf<\/code> in the current directory (where you run the script). Each simulation type (2d, 3ddp, &#8230;) will have its own <code>libudf.so<\/code> file in directories inside the <code>libudf\/<\/code> sub-dir.<\/p>\n<div class=\"note\">\nIf you compiled the UDF on Windows before transferring the files to the CSF, remove any automatically-generated Windows files from the CSF folder (e.g. <code>udf_names.c<\/code>, <code>ud_io1.h<\/code> and any existing <code>libudf\/<\/code> folder.) These files will cause the compilation on the CSF to fail. You should have only the source files you wrote (e.g., <code>my_udf.c<\/code>) in your CSF directory. All of the necessary files will then be generated by fluent when you compile the UDF on the CSF.<\/div>\n<h2>Running Fluent in Parallel in batch<\/h2>\n<p>Fluent is SLURM-aware, so there is no need to write a batch-system jobscript &#8211; it will submit the job for you. However, a jobscript gives you a permanent record of how you ran your job, which might be useful in future if you need to rerun something. We recommend you write a jobscript!<\/p>\n<p>First we show how to use the no-jobscript method.<\/p>\n<p>Then we give the equivalent jobscript. You can run the <code>fluent<\/code> command 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 SLURM and pass the required options and number of cores you would like to use.<\/p>\n<p>To submit a 16-core job, with a 4-day wallclock in the multicore partition, directly from login nodes without using a jobscript:<\/p>\n<pre class=\"slurm\">\r\n# Load the modulefile on the login node, for the version you require, eg:\r\nmodule purge\r\nmodule load apps\/binapps\/fluent\/2022R1       # Older versions are not SLURM aware\r\n\r\nfluent <strong>3d<\/strong> -g -t<strong>16<\/strong> -mpi=openmpi -scheduler=slurm -scheduler_queue=multicore -scheduler_opt=--time=<strong>4-0<\/strong> -i <em>input.jou<\/em>\r\n       ^\r\n       | \r\n       +---- Simulation type. If you have compiled a UDF using the csf_compile_udf\r\n             script then it must have been compiled for this type of simulation.\r\n<\/pre>\n<p>You can submit as a batch job with the following in a file named <code>fluent-batch.sh<\/code> for <strong>SLURM Batch system<\/strong>:<\/p>\n<pre class=\"slurm\">\r\n#!\/bin\/bash --login\r\n#SBATCH -p multicore   # AMD 168-core nodes\r\n#SBATCH -n 16          # Run in parallel with 16 mpi processes (max is 168 in multicore)\r\n#SBATCH -t 4-0         # 4-day wallclock (7-0 is max permitted)\r\n\r\n# Load the modulefile for the version you require, eg:\r\nmodule load apps\/binapps\/fluent\/2022R1\r\n\r\n# Now run fluent\r\nfluent 3d -g -t$SLURM_NTASKS -mpi=openmpi -i <em>input<\/em>.jou \r\n                                               #\r\n                                               # Replace input.jou with your input file.\r\n<\/pre>\n<p>Run <code>sbatch fluent-batch.sh<\/code> to submit to the batch system.<\/p>\n<p>Please check the maximum job size permitted by your chosen version (see modulefiles above.)<\/p>\n<h2>Running Serial Interactive Jobs via srun<\/h2>\n<p>The running of <strong>serial<\/strong>, 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 <a href=\"\/csf3\/overview\/help\/\">contact us<\/a>.<\/p>\n<p>You may run fluent interactively using the <code>interactive<\/code> partition , with a default wallclock of 1 hour and 1 CPU core (use <code>srun-x11<\/code> to make the remote displaying of the GUI work):<\/p>\n<h3>Starting Fluent interactively on short nodes<\/h3>\n<pre>\r\nsrun-x11\r\n<\/pre>\n<p>Then, once you are at the <em>prompt<\/em> on a compute node, setup and start fluent:<\/p>\n<pre>\r\nmodule load apps\/binapps\/fluent\/19.2     # Load the modulefile for the version you require\r\nfluent &amp;                             # The &amp; ensures you get your command line and the GUI at the same time.\r\n  #\r\n  # Save your work often - you only have a 1-hour session on the compute node!\r\n\r\n# When finished, return to the login node\r\nexit\r\n<\/pre>\n<p>Notes:<\/p>\n<ol>\n<li>Linux: if the render window section of the GUI does not display your model try setting the following before running fluent:\n<pre>export LIBGL_ALWAYS_INDIRECT=1<\/pre>\n<\/li>\n<li>alternatively run fluent using <strong>(useful for version 18.1)<\/strong>:\n<pre>fluent -driver x11<\/pre>\n<\/li>\n<li>Windows: if the render window is slow to redraw or flashes try running fluent using:\n<pre>fluent -driver x11<\/pre>\n<\/li>\n<\/ol>\n<p><strong>Note:<\/strong> For the GUI to work you must have an X server running on your PC. See the instructions on the <a href=\"\/csf3\/getting-started\/connecting\/gui-apps\/\">using GUI based applications<\/a> page.<\/p>\n<h2>Further Information<\/h2>\n<p>None<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Overview Ansys Fluent is a computational fluid dynamics application. Fluent versions 2022R1, 2021R1, 19.5 (also known as 2019 R3), 19.3, 19.2 and 18.1 are available. Please note: when requesting help with, or access to, this application, please use the name &#8220;Fluent&#8221; and not simply &#8220;Ansys.&#8221; There are other Ansys products installed on the CSF (see Ansys Mechanical) so it isn&#8217;t always obvious to the sysadmins which product you mean if you simply request &#8220;Ansys.&#8221; Restrictions.. <a href=\"https:\/\/ri.itservices.manchester.ac.uk\/csf3\/software\/applications\/fluent\/\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":7,"featured_media":0,"parent":86,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-752","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf3\/wp-json\/wp\/v2\/pages\/752","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf3\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf3\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf3\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf3\/wp-json\/wp\/v2\/comments?post=752"}],"version-history":[{"count":22,"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf3\/wp-json\/wp\/v2\/pages\/752\/revisions"}],"predecessor-version":[{"id":11886,"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf3\/wp-json\/wp\/v2\/pages\/752\/revisions\/11886"}],"up":[{"embeddable":true,"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf3\/wp-json\/wp\/v2\/pages\/86"}],"wp:attachment":[{"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf3\/wp-json\/wp\/v2\/media?parent=752"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}