Running Ansys Fluent in Batch Mode on a Linux-based Cluster Using LSF Job Schedule

The following are guidelines for running a Fluent simulation in our CAD Compute Cluster. 


With Ansys, you can generally read an older project in a newer version of the software, but you will have difficulty viewing projects created in newer versions from within older releases. It is good practice to use the same release for your local project development as you will use on our CAD Compute Cluster. 

CMC’s Cluster operating system is Linux. It is strongly recommended that you have familiarity with some Linux commands that enable you to move files, check directories, etc. before using our Cluster. We provide some basic Linux instructions on our website:

Our CAD Compute Cluster runs simulations in batch mode from a command line. 

CMC staff implemented a job scheduler from IBM in our Cluster called Load Sharing Facility (LSF). It runs constantly in the background, and LSF accepts simulation requests from all CAD software loaded on the Cluster. CMC provides a list of basic LSF commands for users and a link to the scheduler’s online manual.

Logging into the CAD Compute Cluster

Use an image called CAD Compute Cluster that is launched from the CMC website. See our main Cloud page for details.

Preparing your Project on your Workstation

There are several ways to create a Fluent simulation to run in batch mode. In batch mode, a simulation is run without a GUI interface, using a series of instructions entered on a command line.

A user project is created on a local workstation, saved locally in *.cas or other format and uploaded to the CAD Compute Cluster.

In creating a project, you assemble a 2D or 3D model of the system under study, create a mesh over/through the body or bodies of interest, and enter the initial boundary and operating conditions of the simulation.

One common way to run Fluent in batch mode is to construct a journal file from within Fluent first. A journal file is a series of commands that you send to Fluent, to prepare a project for simulation. 

References for this section:

  • Journal files: Fluent 2022 User’s Guide, Chapters 3 and 5
  • Other: Fluent 2022 Tutorials

Writing an LSF Script to Run a Fluent Simulation

An LSF shell script for Fluent is written in a similar fashion to one for other Ansys software. CMC’s Cluster settings restrict all users to a maximum of 32 processors (cores).

In an LSF shell script, any line starting with a single # can be read by LSF but not by Ansys. Any line starting with ## is read as a comment by both LSF and Ansys programs.

Here is an example.


#!/bin/usr/env sh

## This sets the Linux shell to BASH

## Commands to be read by LSF start with #BSUB

## — Name of the job —

#BSUB -J ansys_Fluent_example

## — specify queue from the bqueues list —

#BSUB -q adept

## — specify the number of processors to a maximum of 32 —

#BSUB -n 32

## — Specify the output and error files written by LSF. %J is the job ID —

## — -o and -e mean append, -oo and-eo mean overwrite —

#BSUB -oo Example_%J.out

#BSUB -eo Example_%J.err

##  — Example of an Ansys command line call —

fluent 3d -g -t32 -i input_file.jou 


Editing Scripts and Extra Disk Space for Larger Simulations

CMC’s Cluster has a built-in Linux editor called vim that allows you to write scripts in your home directories. Editor vim is a newer version of the program vi. A list of vim user commands are available on various websites.

Because Fluent creates many temporary files during simulation iterations, users should monitor the number and sizes of these files created in their home directories. If your Cluster disk space becomes limited, use the /scratch/*user_name* directory disk space provided to you on the Cluster for temporary simulation file storage. Your Cluster *user_name* is generally a five-digit number.

More information about using a /scratch directory is available in the Ansys Fluent manual.

Loading Ansys Fluent in the CAD Compute Cluster

Commands to load and check Fluent are shown in Figure 1. The command module avail will list all the software programs linked to the job scheduler.

Figure 1: Loading Fluent Commands

References for this Section:

  • Fluent 2022 User’s Guide: Running Fluent Using a Load Manager, Chapter 5

Running a Fluent Simulation using an LSF Job Scheduler

Launch your shell script in using a bsub command in a terminal prompt.

~$ bsub <

Help for Constructing a Project for Batch Simulations

Does your research benefit from products and services provided by CMC Microsystems?
Scroll to Top

We use cookies

CMC uses cookies to ensure you get the best experience on our website

Skip to content