This chapter was written and developed by Federica Scolari
(Open Field Operation and Manipulation) is a free, open source CFD software developed primarily by OpenCFD Ltd since 2004. OpenFOAM is a C++ toolbox that can be used to deploy Finite Volume Method (FVM)-based solvers for general continuum mechanics problems, mostly for fluid flow and heat transfer.
OpenFOAM has a wide range of functions, such as:
The ability to simulate anything related to CFD, such as turbulent flows in automotive aerodynamics, fires and fire suppression in buildings, combustion, chemical reactions, heat transfer, liquid sprinklers, or films.
It includes tools for dealing with complex geometries (e.g., a fish pass) and for data processing and visualization.
It performs parallel calculations allowing to take full advantage of modern multicore processors and multiprocessor computers.
Requirements for this tutorial
To accomplish this tutorial, make sure that OpenFOAM is installed on you computer (see the OpenFOAM installation section). Technically, a basic understanding of the Navier-Stokes equations, specifically RANS and related turbulence closures, facilitates understanding the descriptions and assumptions made in this tutorial. And you are good to go.
Directories (OpenFOAM Folder Structure)#
The basic directory structure for an OpenFOAM case that contains the minimum set of files required to run an application is shown in Fig. 155:
The constant directory contains all values that remain constant during the calculation. These are files that specify the physical properties (e.g., transport properties and turbulence models). The subdirectory polyMesh contains all information concerning the mesh.
In this directory, it is possible to modify the parameters associated with the solution procedure. It contains at least the following files:
controlDict including parameters like the start/end time, time step and data output are set;
fvSchemes where the discretization schemes can be selected;
fvSolution in which the parameters and solver choice are set for the run.
These directories contain the data files for every field of the simulation.
Documentation & Further Reading#
The list below provides further sources where more information regarding OpenFOAM can be found, including tutorials and lecture notes.
General information about running OpenFOAM, compilation, solvers, models, mesh generation, and post-processing in the OpenFOAM User Guide and OpenFOAM Programmers Guide
The CFD Online OpenFOAM Forum at: https://www.cfd-online.com/Forums/openfoam/
More tutorials, videos and the book “Mathematics, Numerics, Derivations and OpenFOAM” can be found at: https://holzmann-cfd.com/
Video tutorials with detailed step-by-step instructions can be found at: youtube.com/OpenFOAMJozsefnagy
Lecture notes of a PhD course CFD with openSource Software, available at: tfd.chalmers.se