This version (2024/06/17 09:23) is a draft.
Approvals: 0/1
The Previously approved version (2024/06/17 09:21) is available.Diff

Ansys Workbench and Ansys Fluent (CFD)

To generate your workflow for Ansys most effectively, we recommend utilizing the interactive access, generating the workflow there (noMachine). Additionally, instructions for the RSM Scheduler, are available:TUCOLAB- Ansys

Discover the available versions of Ansys by executing the following command in your terminal:

module avail 2>&1 | grep -i Ansys

and load your preferred Ansys module, e.g.,

module load *your preferred module*

For utilizing Ansys Workbench and Ansys Fluent, the RSM Scheduler presents an effective option. You can find comprehensive guidance on its usage here:TU COLAB- Ansys RSM

Ansys Fluent

The following provides a comprehensive overview of a typical workflow scenario when utilizing Fluent on your local machine for pre- and post-processing, or through noMachine (we highly recommend the use of noMachine for interactive access), along with instructions on how to submit the Fluent job to the cluster.

For learning and testing how to submit a job to the cluster on one node with multiple cores (24), we provide a test file for Fluent; instructions:

  1. Start Ansys Fluent and open the .cas file.
  2. Write a .cas and .dat file out.
  3. Submit your Slurm submit script with the following command in the terminal:
  4. Check the allocated number of processes using the terminal commands: logging into the computing nodes and running htop and top.
  5. Check the status of your job in the fluent.out file (not the slurm.out file).
  6. When the job is finished, open/write the .dat file and check the results.

All files needed for this testcase are provided here:

You can now create your own input file (Fluent journal file (fluent.jou)). If you choose to do so, please write it using a Linux editor. Be mindful that sometimes converting tools from Windows editor text files to Linux editor text files do not work properly.

This file instructs Ansys Fluent to read, run, and write files.

Alternatively, you may consider adding commands in the Console (TUI) of Ansys or using the Ansys GUI. However, we recommend this approach only for smaller files, primarily for training and testing individual commands. The TUI is primarily intended for experimenting with commands in smaller Ansys Fluent files, with the intention of later writing the necessary commands in the input file (for bigger files).

A basic template for the journal file is provided below:

# -----------------------------------------------------------
# read case file (*.cas.gz) that had previously been prepared
file/read-case "tubench1p4b.cas.gz"
solve/iterate 500
file/write-data "tubench1p4b.dat.gz"
exit yes

Preferably you can set these settings in the GUI, as shown here for the autosave frequency in the subsequent graphic. Please be mindful, that different Ansys versions have different settings!

Keep in mind to set the appropriate path for your directories for the cluster. Here the files will be saved in the same directory as the journal file is located.

The autosave/data-frequency setting will save a *.dat file every 10 iterations, the flow field is initialised to zero and then the iteration is started.

When executing Slurm jobs for Fluent, it's essential to consider specific parameters within the command, including:

  • 2d: Indicates a job for 2D Fluent simulations.
  • 2ddp: Denotes 2D Fluent jobs in double precision.
  • 3d: Specifies a job for 3D Fluent simulations.
  • 3ddp: Represents 3D Fluent jobs configured for double precision.

These parameters play a crucial role in defining the type and precision of the Fluent simulations run through Slurm.

Below is a script for running Ansys/Fluent called for a 3D case with double precision.

#SBATCH -J fluent
#SBATCH -o job.%j.out
#SBATCH --ntasks-per-node=24

module purge
module load *your preferred module*


    time fluent 3ddp -g -t 24 < "./$JOURNALFILE" > fluent.out 

These variables are defined when loading the fluent module file:



To restart a fluent job, you can read in the latest data file:

# read case file (*.cas.gz) that had previously been prepared
file/read-case "MyCaseFile.cas.gz"
file/read-data "MyCase_-1-00050.dat.gz"   # read latest data file and continue calculation
solve/iterate 500
file/write-data "MyCase.dat.gz"
exit yes

  • doku/ansys.txt
  • Last modified: 2024/06/17 09:23
  • by amelic