Using OpenFOAM on the Blade Center
|About OpenFOAM|||||Serial Usage|||||Serious Serial Usage|||||Parallel Runs|
Software licenses for commercial finite element codes are more expensive than the hardware. Use of commercial codes can be subject to license restrictions.
OpenFOAM is "open source" and versatile, so if someone learns to use it, they can use it anywhere. It is used for example by Boeing engineers who suggested to us. OpenFOAM is developed by the OpenCFD corporation, founded in 2004. Standard solvers include 'basic' CFD, incompressible flows, compressible flows, combustion, electromagnetics, and solid dynamics. Partitioning routines and choices of linear algebra solvers are provided.
One use is for liquid solid (Again, is this correct?) interactions. A program called paraview provides visualization. For more about OpenFOAM capabilities, see Features of OpenFOAM.
(I think this needs some introductory sentence telling the reader why you're telling them this. Is it to help them accomplish a particular task? I'm thinking something like, "Follow these steps to run FOAM, set its environment variables, and to see some examples:" )
From one of the login64 nodes on the blade center, (login04 or login05):
will add the needed paths. Example codes are available in:
To try the examples, you can copy them to your personal /share directory using the following commands. If you don't already have a directory in /share, you can make one by mkdir /share/myunityID).
tar cvf /share/myunityID/tutorials.tar tutorials
tar xvf tutorials.tar
To run FOAM, use:
to set environmental variables. The subdirectories give simple examples for a variety of problems. See OpenFOAM tutorial for usage description. These commands detail how to run a first example:
"foamToVTK" converts to VTK form, usable by the paraview GUI, which presumably pops with the paraview command. In the paraview GUI click on File and VTK. Then, click on cavity_1.vtk and then Display under the Object Inspector. Next, click Set Color and pick some color. Scrolling down to Style, scroll through the Representation and try Wireframe.
Many other examples and detailed explanation as to input files and file formats are found in the online tutorial.
Only short jobs should be run from the login nodes. Longer jobs should be submitted to the LSF scheduler so that they can run on any of the thousand or so computational cores. Postprocessing with the GUI interface can be run on the VCL using a 64 bit HPC Linux image (http://oit.ncsu.edu/vcl).
As a first try, it's convenient to run the same simple job to make sure it goes without a hitch. Assume that in tutorials/icoFoam/cavity directory, you have the following file:
#BSUB -q debug
#BSUB -W 5
#BSUB -n 1
#BSUB -R em64t
#BSUB -o /share/myname/out.%J
#BUSB -e /share/myname/err.%J
If the above file is bfoam, then the job can be submitted by:
bsub < bfoam
The #BSUB -W 5 line asks for 5 minutes. Once you know the job runs, edit the file to ask for more time. Also, make sure the -o and -e output and error files are writing to a directory for which you have write privileges.
Parallel runs will require a similar file to a serial batch run and should be feasible with OpenFOAM. If an NC Sate user needs help beyond that offered here, please contact email@example.com.