To run FLUENT in the background in a C-shell (csh) on a Linux/UNIX system, type a command of the following form at the system-level prompt:
fluent 2d -g < inputfile >& outputfile &
or in a Bourne/Korn-shell, type:
fluent 2d -g < inputfile > outputfile 2>&1 &
In these examples,
&tells the Linux/UNIX system to perform this task in background and to send all standard system errors (if any) to outputfile.
The file inputfile can be a journal file created in an earlier FLUENT session, or it can be a file that you have created using a text editor. In either case, the file must consist only of text interface commands (since the GUI is disabled during batch execution). A typical inputfile is shown below:
; Read case file rc example.cas ; Initialize the solution /solve/initialize/initialize-flow ; Calculate 50 iterations it 50 ; Write data file wd example50.dat ; Calculate another 50 iterations it 50 ; Write another data file wd example100.dat ; Exit FLUENT exit yes
This example file reads a case file example.cas, initializes the solution, and performs 100 iterations in two groups of 50, saving a new data file after each 50 iterations. The final line of the file terminates the session. Note that the example input file makes use of the standard aliases for reading and writing case and data files and for iterating. ( it is the alias for /solve/iterate, rc is the alias for /file/read-case, wd is the alias for /file/write-data, etc.) These predefined aliases allow you to execute commonly-used commands without entering the text menu in which they are found. In general, FLUENT assumes that input beginning with a / starts in the top-level text menu, so if you use any text commands for which aliases do not exist, you must be sure to type in the complete name of the command (e.g., /solve/initialize/initialize-flow). Note also that you can include comments in the file. As in the example above, comment lines must begin with a ; (semicolon).
An alternate strategy for submitting your batch run, as follows, has the advantage that the outputfile will contain a record of the commands in the inputfile. In this approach, you would submit the batch job in a C-shell using:
fluent 2d -g -i inputfile >& outputfile &
or in a Bourne/Korn-shell using:
fluent 2d -g -i inputfile > outputfile 2>&1 &