OpenFOAM
OpenFOAM running in a terminal
OpenFOAM running in a terminal
Original author(s)Henry Weller
Developer(s)CFD Direct / OpenCFD
Initial release10 December 2004; 14 years ago (2004-12-10)
Stable release
v6 / 29 June 2018 (2018-06-29)

v1812 / 20 December 2018 (2018-12-20)

Repository
    Edit this at Wikidata
    Written inC++
    Operating systemUnix/Linux
    TypeComputational fluid dynamics, simulation software
    LicenseGPLv3
    Website openfoam.org

    OpenFOAM (for "Open-source Field Operation And Manipulation") is a C++ toolbox for the development of customized numerical solvers, and pre-/post-processing utilities for the solution of continuum mechanics problems, including computational fluid dynamics (CFD).

    The software is released as free and open-source software under the GNU General Public License Version 3. OpenFOAM has been released by OpenCFD Ltd. since 2004, the name OpenFOAM was registered as a trademark by OpenCFD Ltd. in 2007 and has been non-exclusively licensed to the OpenFOAM Foundation Ltd since 2011.

    History

    Flow simulation using OpenFOAM and ParaView for visualization

    OpenFOAM (originally, FOAM) was created by Henry Weller from the late 1980s at Imperial College, London, to develop a more powerful and flexible general simulation platform than the de facto standard at the time, FORTRAN. This led to the choice of C++ as programming language, due to its modularity and object-oriented features. Hrvoje Jasak joined Imperial College as a PhD candidate from 1993 to 1996, developing error estimation and bounded second-order schemes for FOAM. In 2000, Jasak joined forces with Weller in an attempt to commercialize FOAM through the company Nabla Ltd. In 2004, Nabla Ltd folded and Henry Weller, Chris Greenshields and Mattijs Janssens founded OpenCFD Ltd to develop and release OpenFOAM. At the same time, Jasak founded the consulting company Wikki Ltd and maintained the fork openfoam-extend, later renamed to foam-extend.

    On 8 August 2011, OpenCFD was acquired by Silicon Graphics International (SGI). At the same time, the copyright of OpenFOAM was transferred to the OpenFOAM Foundation Ltd., a newly founded, not-for-profit organisation established to distribute OpenFOAM. On 12 September 2012, the ESI Group announced the acquisition of OpenCFD Ltd from SGI. In 2014, Weller and Greenshields left ESI Group and continue the development and management of OpenFOAM, on behalf of the OpenFOAM Foundation, at CFD Direct. CFD Direct develops OpenFOAM with a sequence based identifier (e.g. 5.0), whereas ESI-OpenCFD release OpenFOAM with a date-of-release identifier (e.g. v1806).


    Distinguishing features

    Syntax

    One distinguishing feature of OpenFOAM is its syntax for tensor operations and partial differential equations that closely resembles the equations being solved. For example, the equation

    is represented by the code

    solve
    (
         fvm::ddt(rho,U)
       + fvm::div(phi,U)
       - fvm::laplacian(mu,U)
     ==
       - fvc::grad(p)
    );
    

    This syntax, achieved through the use of object-oriented programming and operator overloading, enables users to create custom solvers with relative ease. However, code customization becomes more challenging with increasing depth into the OpenFOAM library, owing to a lack of documentation and heavy use of template metaprogramming.

    Extensibility

    Users can create custom objects, such as boundary conditions or turbulence models, that will work with existing solvers without having to modify or recompile the existing source code. OpenFOAM accomplishes this by combining virtual constructors with the use of simplified base classes as interfaces. As a result, this gives OpenFOAM good extensibility qualities. OpenFOAM refers to this capability as run-time selection.

    Structure of OpenFOAM

    OpenFOAM is constituted by a large base library, which offers the core capabilities of the code:

    • Tensor and field operations
    • Discretization of partial differential equations using a human-readable syntax
    • Solution of linear systems
    • Solution of ordinary differential equations
    • Automatic parallelization of high-level operations
    • Dynamic mesh
    • General physical models
      • Rheological models
      • Thermodynamic models and database
      • Turbulence models
      • Chemical reaction and kinetics models
      • Lagrangian particle tracking methods
      • Radiative heat transfer models
      • Multi-reference frame and single-reference frame methodologies

    The capabilities provided by the library are then used to develop applications. Applications are written using the high-level syntax introduced by OpenFOAM, which aims at reproducing the conventional mathematical notation. Two categories of applications exist:

    • Solvers: they perform the actual calculation to solve a specific continuum mechanics problem.
    • Utilities: they are used to prepare the mesh, set-up the simulation case, process the results, and to perform operations other than solving the problem under examination.

    Each application provides specific capabilities: for example, the application called blockMesh is used to generate meshes from an input file provided by the user, while another application called icoFoam solves the Navier–Stokes equations for an incompressible laminar flow.

    Finally, a set of third-party packages are used to provide parallel functionality ( OpenMPI) and graphical post-processing (ParaView).

    Capabilities

    Simulation of burning Methane. The Graphical user interface is ParaView.

    OpenFOAM solvers include:

    • Basic CFD solvers
    • Incompressible flow with RANS and LES capabilities
    • Compressible flow solvers with RANS and LES capabilities
    • Buoyancy-driven flow solvers
    • DNS and LES
    • Multiphase flow solvers
    • Particle-tracking solvers
    • Solvers for combustion problems
    • Solvers for conjugate heat transfer
    • Molecular dynamics solvers
    • Direct simulation Monte Carlo solvers
    • Electromagnetics solvers
    • Solid dynamics solvers

    In addition to the standard solvers, OpenFOAM syntax lends itself to the easy creation of custom solvers.

    OpenFOAM utilities are subdivided into:

    • Mesh utilities
      • Mesh generation: they generate computational grids starting either from an input file (blockMesh), or from a generic geometry specified as STL file, which is meshed automatically with hex-dominant grids (snappyHexMesh)
      • Mesh conversion: they convert grids generated using other tools to the OpenFOAM format
      • Mesh manipulation: they perform specific operations on the mesh such as localized refinement, definition of regions, and others
    • Parallel processing utilities: they provide tools to decompose, reconstruct and re-distribute the computational case to perform parallel calculations
    • Pre-processing utilities: tools to prepare the simulation cases
    • Post-processing utilities: tools to process the results of simulation cases, including a plugin to interface OpenFOAM and ParaView.
    • Surface utilities
    • Thermophysical utilities

    License

    OpenFOAM is free and open-source software, released under the GNU General Public License version 3.

    Advantages and disadvantages

    Advantages

    • Friendly syntax for partial differential equations
    • Fully documented source code
    • Unstructured polyhedral grid capabilities
    • Automatic parallelization of applications written using OpenFOAM high-level syntax
    • Wide range of applications and models ready to use
    • Commercial support and training provided by the developers
    • No license costs

    Disadvantages

    • The development community suffers from fragmentation, giving rise to numerous forked projects.
    • Absence of an integrated graphical user interface (stand-alone open-source and proprietary options are available)
    • The Programmer's guide does not provide sufficient details, making the progress slow if you need to write new applications or add functionality

    GUI and software tools integrated with OpenFOAM

    • FEATool Multiphysics is an easy to use physics simulation toolbox and GUI for MATLAB.
    • HELYX-OS
    • iconCFD
    • InsightCAE is an open source project for creating automated simulation workflows which can be controlled from a GUI ("vertical apps"). OpenFOAM is supported as the primary backend for CFD simulations.
    • MantiumFlow - a CLI and GUI tool which automates CFD pre and post-processing, turning simulations into Apps ("vertical apps").
    • SimFlow
    • SimScale
    • simulationHub - online platform with automated cloud based CFD Apps ("vertical apps"), specifically developed for Design engineer
    • SwiftBloc and SwiftSnap
    • Visual-CFD is an advanced, intelligent environment for OpenFOAM including Pre and Post modules with process Automation/Customization features
    • preCICE is an open-source coupling library for partitioned multi-physics simulations.

    Official resources

    Community resources

    Other resources


      This article uses material from the Wikipedia article OpenFOAM, which is released under the Creative Commons Attribution-Share-Alike License 3.0.