<-- | Up: Software | -->

OpenFOAM

OpenFOAM (Open Field Operation And Manipulation) is a C++ toolbox for the customisation and extension of numerical solvers for continuum mechanics problems, mainly CFD. Standard Solvers include: basic CFD, incompressible flows, compressible flows, multiphase flows, particle-tracking flows, combustion, heat transfer, molecular dynamics, direct simulation Monte Carlo, electromagnetics, solid dynamics, etc.

Overview

OpenFOAM stands for Open Source Field Operation and Manipulation.

OpenFOAM is mainly a C++ library used to solve partial differential equations (PDEs), and ordinary differential equations (ODEs).

OpenFOAM is under active development. It is originally developed by Henry Weller and Hvorje Jasak in Imperial College London and released as open source code in 2004.

At the moment, the development of OpenFOAM have been forked into three main development1) More details here :

openfoam.com (OpenCFD Ltd, ESI Group)

openfoam.org (The OpenFOAM Foundation Ltd - Henry Weller)

foam-extend (Wikki Ltd - Prof Hvorje Jasak)

OpenFOAM are packaged with ready-to-use solvers, pre-processing utilities, and post-processing utilities.

OpenFOAM is licensed under the GNU General Public License (GPL). Therefore, it can be freely distributed with the source code, and run on massively parallel computers.

Industries, academia and research labs makes up the large community of OpenFOAM users and contributors.

Features

Fluid Dynamics/physical modelling features listed in CFD Direct (openfoam.org):

Turbulence modelling: (Reynolds-Averaged Simulation (RAS), Large-Eddy Simulation (LES) and Detached-Eddy Simulation (DES, DDES, etc).

Thermophysical modelling

Transport/rheology

Multiphase flows

Rotating flows with multiple reference frames (MRF)

Rotating flows with arbitrary mesh interface (AMI)

Dynamic meshes

Compressible/thermal flows

Conjugate heat transfer

Porous media

Lagrangian particle tracking

Reaction kinetics / chemistry

OpenFOAM in General CFD Workflow

Architecture and Numerics

Discretisation based on Finite Volume Method (FVM), with collocated polyhedral unstructured meshes.

Second order accuracy in space and time. Various discretization schemes are available.

Steady and transient solvers are available.

Pressure-velocity coupling via segregated methods (SIMPLE and PISO). Coupled solvers are under active development.

Massive parallelism through domain decomposition.

All components are implemented in library structure to facilitate the development of customised solvers and applications.

OpenFOAM vs commercial CFD applications

Most capabilities offered by commercial CFD applications are available in OpenFOAM. However, the main differences are:

There is no native GUI in official release.

The users have to execute each solvers and pre- and post-processing utilities via command line interface (CLI), particularly Linux bash shell.

The users have to directly edit case configurations in human-readable plain text format.

While being tedious and prone to errors, these allow:

automation of large number of runs using user-defined shell scripts.

development of 3rd party GUI and workflows tailored for a specific application.

Official documentation may not be complete, but useful resources are available from various online sources contributed by users/developer community.

Complete source code is accessible, allowing customisation of a solver for a specific need. Therefore OpenFOAM is suitable to be used for research and development.

Most importantly, it is free. No restriction on the number of parallel computing processes makes OpenFOAM typically available in large HPC clusters.

GUI for OpenFOAM

No official GUI

But many 3rd party GUI available,

HELYX-OS

Desktop application suite from ESI

Web application suite at simscale.com

See more at https://openfoamwiki.net/index.php/GUI

It is possible to develop own GUI tailored for a problem of interest, e.g a simple GUI can be quickly written in Python with PySimpleGUI GUI framework + PyFoam utilities

Learn

Serious use of OpenFOAM can be a good reason to be exposed with linux-based OS and its CLI shell scripting for those uninitiated

It is always recommended to follow official tutorials that will run through simple cases and demonstrate how OpenFOAM utilities can help including useful tips, e.g., https://www.openfoam.com/documentation/tutorial-guide

More up-to-date and detailed description can be found in official user-guide, e.g., https://www.openfoam.com/documentation/user-guide

There are also good learning materials from the community

OpenFOAMWiki

CFD Online

Wolf Dynamics .

While they offer paid training, most of their training slides and case files are available for free. Their 1000+ pages introductory training slides can be worth to follow, covering most important aspects of OpenFOAM comprehensively.

Other good resources can be found scattered in the internet. Users have to be careful in judging whether the materials are up-to-date or compatible with their version at hand, and to see if appropriate changes are required

Ultimately, understanding the actual code is the only way to know the exact implementation and behaviour of the software. However, this is usually not required unless for a niche and advanced applications and for precise solution control.

Tutorials

Abdullah, Abu Hasan. ‘Starting OpenFOAM on Linux’. OSCAE.Initiative, Faculty of Engineering, Universiti Teknologi Malaysia, October 2018.

Mohd Hazmil Syahidy Abdol Azis. ‘A Brief Introduction to OpenFOAM’. OSCAE.Initiative, February 2022.

Bahram Haddadi, Christian Jordan, and Michael Harasek, eds. OpenFOAM® Basic Training | TU Wien. 5th ed. chemical-engineering.at, 2019. https://www.cfd.at/tutorials.

Books

Maric, Tomislav, Kyle Mooney, and Jens Höpken. The OpenFOAM Technology Primer (Version V2012), 2021.

Moukalled, F., L. Mangani, and M. Darwish. The Finite Volume Method in Computational Fluid Dynamics -- An Advanced Introduction with OpenFOAM® and Matlab. 1st ed. Fluid Mechanics and Its Applications. Springer, Cham, 2016.

Courses

Nilsson, Håkan. ‘PhD Course in CFD with OpenSource Software, Chalmers University of Technology’, 2022. http://www.tfd.chalmers.se/~hani/kurser/OS_CFD/.

Workshops & Conferences

The OpenFOAM Workshops: the longest running conference (since 2006) on CFD with foam-extend and OpenFOAM®.

Wikis for the community

‘OpenFOAM Wiki’. https://wiki.openfoam.com/Main_Page.

This wiki is sponsored and managed by OpenFOAM.com and members of the OpenFOAM community.

‘Unofficial OpenFOAM Wiki’. http://openfoamwiki.net/index.php/Main_Page.

This Wiki collects information about the OpenSource CFD toolbox OpenFOAM and provides a platform for collaborations

Discussion Forums

‘OpenFOAM -- CFD Online Discussion Forums’. https://www.cfd-online.com/Forums/openfoam/.

Applications

Resistance and powering of ships

Displacement hull

Najihah, Ummu Saiyidah, Abu Hasan Abdullah, and Nasrudin Haji Ismail. ‘Ship Modelling and Analysis Using Open Source Computer Aided Engineering (CAE) Part 2 : Resistance Prediction of Passenger Ship Hull Form Model Using OpenFOAM’. Jurnal Mekanikal, 1 September 2021, 38–48.

Zainudin, Ummu Saiyidah Najihah, and Abu Hasan Abdullah. ‘Open Source CAE for Ship Design and Analysis -- Introduction to OpenFOAM’, December 2019.

Maki, Kevin. ‘Ship Resistance Simulations with OpenFOAM’. Presented at the 6th OpenFOAM Workshop, The Pennsylvania State University State College, PA, USA, 13 June 2011.

Planing hull

Prediction of Resistance of a planing hull using OpenFOAM

Turbulent flow over airfoil

Numerical simulation of turbulent flow over airfoil (2D) using OpenFOAM

FSI

Yao, Hua-Dong. ‘Simulation of Fluid-Structural Interaction Using OpenFOAM’. Department of Applied Mechanics, Chalmers University of Technology, 15 September 2014. http://www.tfd.chalmers.se/~hani/kurser/OS_CFD_2014/OFLecFSI-1.pdf.