OpenFOAM: Object-Oriented Numerical Simulation Library


OpenFOAM (Field Operation And Manipulation), a numerical simulation package for continuum mechanics designed to answer the complex physics demands and transparently provide the necessary complex geometry support. The package is designed to allow easy, quick and reliable implementation of physical models by mimicking the form of partial differential equations in the code. OpenFOAM implements several modelling paradigms (Finite Volume, Finite Element, Lagrangian particle tracking, Finite Area) in library form using object-oriented design, handles complex geometries through polyhedral mesh support, automatic mesh motion and topological changes. Model-to-model interaction is handled by grouping related models under a common interface. The novel software design allows extensive code re-use, unit testing, layered development, and user-defined extensions, resulting in purpose-built, high quality customisable solvers.

OpenFOAM is implemented in the C++ programming language and strictly relies on object orientation and generic programming, thus providing extensive capabilities with minimum bug counts.

An example on how OpenFOAM mimics the form of the partial differential equation in software is given below for the momentum equation:

momentum equation

is represented by the code:


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

This allows for easy, quick and reliable implementation of new physical models and separates the issues of numerics implementation into several independent levels: field algebra, boundary conditions, operator discretisation, matrix support, inter-equation coupling and model-to-model interaction.

A combination of easy model implementation, first-class numerics support, unstructured polyhedral mesh support with motion and topological changes, as well as a library of pre-implemented models makes OpenFOAM an extremely flexible development platform in computational continuum mechanics simulations.


Workshop Contents

Training and Workshop are targeted to University and industrial researchers, users and developers who wish to use, extend and adapt OpenFOAM for their use, as well as further develop its capabilities. In both roles, an insight into the code organisation, philosophy and standard coding practices is extremely valuable.

Suggested Preparation for New Users

For novice users intending to join the Workshop, some background knowledge would be beneficial. This should include running some OpenFOAM tutorials, reading FOAM-related publications and some background in CFD and Unix-based computing. Additionally, exposure to C++ would be extremely helpful.

Provisional contents of the training presentations to be held by Dr. Hrvoje Jasak is listed below.

OpenFOAM Training Presentations

  1. Background
  2. Discretisation and capabilities
  3. Main objects
  4. Code organisation
  5. OpenFOAM case organisation
  6. Mesh generation
  7. Pre-processing OpenFOAM applications
  8. Running OpenFOAM and post-processing
  9. Existing standard solvers in OpenFOAM: capabilities and examples of application
  10. Model implementation, virtual interfaces and run-time selection
  11. Model libraries and their usage in solvers
  12. Customisation of OpenFOAM solvers: adding new capabilities
  13. Programming in OpenFOAM

Additional sessions on the basic principles of programming in OpenFOAM and basics of object orientation and C++ are also being considered. The decision will be made based on the response from the audience; if you are interested, please contact dr. Jasak directly.

  1. Main programming guidelines and patterns in OpenFOAM
  2. C++ language training and object orientation