Fluent - Running in Background Mode

Latest revision: 07 November, 2003, 12:10 p.m.

Introduction and Instructions:

This learning module contains a procedure to run Fluent in background mode. This enables users to log in, start the code running in the background, log out, and come back later to look at the solutions. This is especially useful for a large number of iterations, which can be most time-effective overnight. When Fluent runs in the background, it must be run in its non-graphical interface form, of course.

Run Fluent to set up the case and data files :

  1. Before Fluent can run from the journal file, both case and data files must be available.
  2. Run Geomesh to generate the grid, and run Fluent in the normal graphical way, set up the boundary conditions, initialize, and run a few iterations to make sure everything is working properly.
  3. Write out case and data files for your problem. For this example, suppose the files are called test.cas and test.dat.
  4. Exit Fluent.

Create a journal file for Fluent:

  1. Create a text (ascii) file, which can be any name. For this example, the file will be called test.jou (this is the journal file for the example case called test).
  2. In this journal file, copy and paste the following lines: (Note: A text file containing these lines can be downloaded from this web site for your convenience.)

    file
    
    read-case-data
    test.cas
    
    /solve
    
    iterate
    20
    
    quit
    
    /file
    
    write-case-data
    
    y
    
    quit
    quit
    quit
    quit
    quit
    quit
    quit
    quit
    quit
    
    exit
    


  3. In this example, the number of iterations is set to 20. This should be changed to the desired number of iterations, of course.
  4. Also, change the name of the case and data files.

Run Fluent in background mode :

  1. Make sure you are in the directory which contains the case and data files.
  2. Enter one of the following unix commands:
    fluent 2d -g -i test.jou & 
    
    fluent 3d -g -i test.jou & 
    

    depending on whether it is a 2-D or 3-D problem. The -g tells Fluent to run without the graphical user interface. The -i tells Fluent to run with instructions from journal file test.jou. Change the file name to your journal file name, of course.
  3. Now you can log out, go home, eat supper, sleep, etc. When the program is done running, it will write (update) your case and data files!
  4. Option - It is also possible to record the Fluent output on some other file. This is strongly recommended because then you have a record of the iterations completed and any errors that may occur. To run Fluent in background mode and send the output to a file called test.out, Enter one of the following the unix commands:
    fluent 2d -g -i test.jou >& test.out &
    
    fluent 3d -g -i test.jou >& test.out &
    

    depending on whether it is a 2-D or 3-D problem. As in the commands above, change the file name to your journal file name, of course.