Open-source CFD toolbox: OpenFOAM is now a mature open-source CFD program with reliability matching that of commercial products. This page describes summary of utilities and dictionaries used in OpenFOAM meshing and visualization such as (blockMesh, snappyHexMesh, ParaView) and OpenFOAM CFD codes and pre-processors such as (simpleFoam, pimpleFoam, engineFoam...).
OpenFOAM CFD: A Beginner's Diary
This content is not approved or endorsed by OpenCFD Limited, the producer of the OpenFOAM CFD software and owner of the OpenFOAM and OpenCFD trademarks.
However, if one does not want to run parallel version (using more than 1 processor), simply use blockMesh and then snappyHexMesh on the command prompt to get the desired mesh, thus skipping the utilities decomposePar, reconstructParMesh and reconstructPar.
List of Sampe Cases
As per user guide: "Steady-state solver for incompressible, 1D turbulent flow, typically to generate boundary layer conditions at an inlet". The description of flow geometry and boundary conditions used are shown below.
A detailed description of this tutorial case by Grant Ingram from Durham University can be found here.
No blockMeshDict available in tutorial folder. polyMesh data available for simulation. Typically, the information is provided in utility file Allrun. If there is no mention of mesh in this file, there is not one. For example, in problem case 'flange' under laplacianFoam, there is neither blockMeshDict nor polyMesh. But there is a file 'flange.ans'. Inside 'Allrun' it is explained that flange.ans is ANSYS file.
This is one of the test cases described in user guide. There are two simulation cases - they differ mainly between the turbulence model used and the way input boundary conditions are specified. "pitzDailyExptInlet" demonstrate how to interpolate or apply non-uniform boundary conditions at the inlet. The differences in U sub-dictionaries are shown below.
This is a good demonstration of block mesh utility to generate mesh with internal cavities and nice representation of car as simplified geometry.
This demo case shows how to use parameter definition in blockMeshDict, use of #calc utility and create wedge elements [axisymmetric domain with zero inner radius]. The blockMesh utility creates on-the-fly library for few occurrence of #calc [in Windows version of 1606+]. Some messages appearing in the terminal are:
wmakeLnInclude: linking include files to ./lnInclude
ln: creating symbolic link './codeStreamTemplate.C': Protocol error
Making dependency list for source file codeStreamTemplate.C
Creating new library in "dynamicCode/_9273df81ebe52476e105ce9128b702a57ad95417/platforms/
This tutorial demonstrates the moving mesh without any re-meshing or addition/deletion of layer. The size of elements expands and contracts during the mesh motion with constant velocity 1 [m/s] defined in dictionary 0/pointMotionUx.
pimpleDyMFoam - propeller with AMI (Arbitrary Mesh Interface)
Used to create high quality hex-dominant meshes [similar to but not exactly Cartesian Mesh in ICEM CFD] based on arbitrary geometry, the controlling dictionary is system/snappyHexMeshDict. Requires a starting [hexahedral] mesh created by blockMesh [designated as base mesh or level 0 mesh] and geometry data in STL and Nastran (.nas) files format. A snappyHexMeshDict file created after reading through such files used in various tutorial application can be found here. This is a generic dictionary which demonstrates all the features of this utility. Different stages of mesh generation in snappyHexMesh utility is shown in following images.
Examples of snappyHexMesh application can be found in tutorial cases:
Conductive heat transfer using laplacianFoam in openFOAM
Multiphase flow using VOF method for 4 immiscible phases.
The content on CFDyna.com is being constantly refined and improvised with on-the-job experience, testing, and training. Examples might be simplified to improve insight into the physics and basic understanding. Linked pages, articles, references, and examples are constantly reviewed to reduce errors, but we cannot warrant full correctness of all content.