OpenFOAM
OpenFOAM (Open Field Operation and Manipulation) is a free and open-source computational fluid dynamics (CFD) software package that is used to simulate and analyze fluid flow, heat transfer, and other related phenomena. It is written primarily in C++ and can be used on various operating systems such as Linux, Windows, and macOS.
OpenFOAM offers a wide range of solvers, turbulence models, and physical models that can be used to model various engineering applications such as automotive, aerospace, chemical processing, and power generation. It also allows users to customize and extend its functionality to meet specific needs.
The software is widely used in academia, research, and industry, and is known for its robustness, flexibility, and scalability. It offers a high degree of parallelization, which allows it to be used on large clusters of computers for complex simulations. Because it is open source, it is often used by researchers and developers to create new solvers, models, and add-ons for specific applications.
Availability¶
| Software | Version | Dependent Toolchain | Module Load Command |
|---|---|---|---|
| OpenFOAM | v2406 | foss/2024a | module load foss/2024a OpenFOAM/v2406 |
Application Information, Documentation¶
The documentation of OpenFOAM is available at OpenFOAM Documentation, where you can find the tutorials in OpenFOAM meshing (blockMesh), postprocessing, setting boundary conditions etc.
Using OpenFOAM¶
OpenFOAM can be used for both serial and parallel jobs. To run OpenFOAM in parallel, you need to use the following job script.
Sample Batch Script to Run OpenFOAM in parallel: openfoam_parallel.submit.sh
Note
You can copy the tutorial cavity mentioned in the above job script from the /apps/easybuild/examples/openFoam/parallel directory.
To run OpenFOAM in serial, the following job script can be used.
Sample Batch Script to Run OpenFOAM in serial: openfoam_serial.submit.sh
Submit the job script using the sbatch command: sbatch openfoam_parallel.submit.sh or sbatch openfoam_serial.submit.sh.
Building OpenFOAM from source¶
Sometimes, users need to create a new solver or modify the existing solver by adding different functions for their research. In that case, users need to build openFOAM from source since user do not have the permission to add libraries in the root directory where OpenFOAM is installed. The following instructions are provided on how to build openFOAM from source on cluster. If you have any queries or issues regarding building OpenFOAM, please contact us at hpc@njit.edu.
Related Applications¶
User Contributed Information¶
Please help us improve this page
Users are invited to contribute helpful information and corrections through our Github repository.