Submitting a Fluent job¶
There are majorly 3 ways with which Ansys Fluent can be used on VSC5.
- Using an interactive session. (GUI)
- Using a batch mode of submission. (without GUI)
- Using Workbench.
When there are only a few models, required to be run on the cluster, with not much changing in between those models, a GUI based option can be explored.
However, if there are several configurations of the model that are to be simulated, (perhaps of the same model or otherwise), a batch mode submission (without GUI) should be used.
GUI based jobs¶
TBD
Non-GUI based jobs¶
As mentioend before, non-GUI based jobs mean that Fluent session is used and operated only via previously tested commands that set the case and run the simulation.
For this, one would require three things.
- A journal file.
- A Fluent file (this could be a CAD file or a Fluent msh/CAS file).
- A Slurm script that calls the fluent executable and sets the hardware resource for an HPC run.
Simply put, a tzpical workflow would include that one first loads the module, or the specific Ansys Version one wants to use as,
module load ANSYS/<version>
The journal commands describing all the necessary steps to be performed on the Fluent session saved as a file (say, set_of_steps.jou) needs to be called into the Slurm script (Run_fluent.slurm). This is indicated in the following image.
File (a) is a slurm file that requests the hardware for the Ansys Fluent job. It should have a fluent execuable, along with various hardware specification for the job. File (b) is the journal file which has the Ansys Fluent set of commands that operate on the Ansys file. This could vary and depend on the objective of using the Ansys Fluent simualtion capabilities. File (c) is the Fluent file itself, this could be a CAS/DAT file, or a MSH file, or sometimes even a CAD file depending on what one's objective and the corresponding File (b) are.
A sample example is hosted here, Mixing elbow example.
Meshing¶
A mesh file is the file containting the mesh of the geometry you want to simulate in Fluent. One could very well use a CAD file too (Linux Fluent readable format) such as an STL or a STEP file in place of a mesh file.
In such a case, a journal file will need to add additional steps for meshing such as defining cell types, surface name tags, zone details, maximum and minimum cell size, boundary layer details etc. In case the starting point is a CAD file, the journal file will also update accordingly with the steps that may look as follows,
-
Import CAD file.
-
Set up boundary names and relevant settings.
-
Set up meshing parameters necessary for the model, such as min size, max size of cells, first boundary layer length etc.
-
Mesh
-
Switch to Fluent solver.
-
Set up CFD parameters such as models, materials, boundary conditions etc.
-
Run Fluent solver.
Steps 6 and 7 are indicated via an example in the journal file indicated elbow example.
Slurm¶
Slurm job submission script (e.g. named as say, run_fluent.slurm) can be seen from an EXAMPLE here is the script that will be submitted to the scheduler to run your Fluent jobs.
The meaning of the fluent's executable call flags are as follows,
-3ddp
, uses 3-dimensional, double precision model of the Fluent solver.-ssh
is using the SSH protocol to launch MPI processes.-meshing:
This flag opens the fluent meshing. If the user wants the solver, simply remove this flag. This is also done in this example, because the starting point is a mesh import to Fluent solver.-$SLURM_NTASKS
requests the--ntasks-per-node
value (an integer stored in the shell variable$SLURM_NTASKS
) to the solver, so for the above example--ntask-per-node
, this flag will become-t$SLURM_NTASKS
.-platform=intel
This would be required if you have more than one node or--ntasks-per-node
, and implies it will be using the Intel MPI implementation.
-cnf
is the node list and can be used as it is.-gu
This is the batch mode flag, which means a GUI will “not” open when you ask Fluent to open. Removing this flag will open Fluent GUI.-i
Input a journal file with .jou extension.mesh_n_run.jou
The journal file that will perform the steps mentioned in it inside fluent.out.txt
This outputs the print statements of the fluent console to a text file, which can be tracked in real-time withtail -f out.txt
command once your submission has been made.