Jump to content

OpenFOAM

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by 193.170.16.107 (talk) at 13:30, 21 June 2017 (External links). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

OpenFOAM
Original author(s)Henry Weller
Developer(s)CFD Direct[1]
Initial release10 December 2004; 20 years ago (2004-12-10)[2]
Stable release
4.1[3] / 13 October 2016 (2016-10-13)[4]
Repository
Written inC++
Operating systemUnix/Linux
TypeComputational fluid dynamics, simulation software
LicenseGPLv3
Websiteopenfoam.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 code is released as free and open source software under the GNU General Public License. The OpenFOAM name was registered by OpenCFD Ltd[5] in 2007 and non-exclusively licensed to the OpenFOAM Foundation Ltd in 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. In 2004, Henry Weller, Chris Greenshields and Mattijs Janssens founded OpenCFD Ltd to develop and release OpenFOAM.[6] On 8 August 2011, OpenCFD was acquired by Silicon Graphics International (SGI).[7] At the same time, the copyright of OpenFOAM was transferred to the OpenFOAM Foundation, a newly founded, not-for-profit organisation that manages OpenFOAM and distributes it to the general public. On 12 September 2012, the ESI Group announced the acquisition of OpenCFD Ltd from SGI.[8] 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.[9]

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[10]

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[11]

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[12]
  • Solution of ordinary differential equations[13]
  • Automatic parallelization of high-level operations
  • Dynamic mesh[14]
  • General physical models
    • Rheological models[15]
    • Thermodynamic models and database[16]
    • Turbulence models[17]
    • Chemical reaction and kinetics models[18]
    • Lagrangian particle tracking methods[19]
    • 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 (i.e.OpenMPI) and graphical post-processing (ParaView).

Capabilities

OpenFOAM solvers include:[20]

Simulation of burning Methane. The Graphical user interface is ParaView.
  • Basic CFD solvers
  • Incompressible flow with RANS and LES capabilities[21]
  • Compressible flow solvers with RANS and LES capabilities[22]
  • Buoyancy-driven flow solvers[23]
  • DNS and LES
  • Multiphase flow solvers[24]
  • Particle-tracking solvers
  • Solvers for combustion problems[25]
  • Solvers for conjugate heat transfer[26]
  • Molecular dynamics solvers[27]
  • Direct Simulation Monte Carlo solvers[28]
  • Electromagnetics solvers[29]
  • Solid dynamics solvers[30]

In addition to the standard solvers, OpenFOAM's 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.[31]

Advantages and disadvantages

Advantages

  • Friendly syntax for partial differential equations
  • Fully documented source code [32]
  • 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 learning curve very steep if you need to write new applications or add functionality

See also

  • ParaView an open source multiple-platform application for interactive scientific visualization

References

  1. ^ CFD Direct Ltd
  2. ^ "OpenFOAM Version 1.0".
  3. ^ "OpenFOAM Version 4.1".
  4. ^ "Release History - OpenFOAM".
  5. ^ OpenCFD homepage
  6. ^ OpenFOAM Release History
  7. ^ "Press Releases: SGI Acquires OpenCFD Ltd., the Leader In Open Source Computational Fluid Dynamics (CFD) Software". SGI. Retrieved 18 December 2012.
  8. ^ "Acquisition of OpenCFD Ltd., The leader in Open Source software in Computational Fluid Dynamics". ESI Group. 11 September 2012. Retrieved 18 December 2012.
  9. ^ "OpenFOAM". CFD Direct. 25 March 2015.
  10. ^ Creating solvers in OpenFOAM
  11. ^ OpenFOAM's run-time selection mechanism explained
  12. ^ Linear system solvers in OpenFOAM
  13. ^ Ordinary differential equation solvers in OpenFOAM
  14. ^ Dynamic mesh in OpenFOAM
  15. ^ Rheological models in OpenFOAM
  16. ^ Thermophysical models in OpenFOAM
  17. ^ Turbulence models in OpenFOAM
  18. ^ Chemical reactions and kinetics models in OpenFOAM
  19. ^ Lagrangian particle tracking in OpenFOAM
  20. ^ OpenFOAM features
  21. ^ OpenFOAM incompressible flow solvers
  22. ^ OpenFOAM Compressible flow solvers
  23. ^ OpenFOAM buoyancy-driven flow solvers
  24. ^ Multiphase flow solvers
  25. ^ OpenFOAM solvers for combustion
  26. ^ OpenFOAM solvers for conjugate heat transfer
  27. ^ OpenFOAM molecular dynamics solvers
  28. ^ OpenFOAM Direct Simulation Monte Carlo solvers
  29. ^ OpenFOAM Electromagnetics solvers
  30. ^ OpenFOAM solid dynamics solvers
  31. ^ OpenFOAM Licensing Page
  32. ^ OpenFOAM C++ Source Guide

Official resources

Community resources

Other resources