[Table of Contents][Introduction →].

The OpenFOAM User Guide provides an introduction to OpenFOAM, through some basic tutorials, and some details about the general operation of OpenFOAM. OpenFOAM is a collection of approximately 250 applications built upon a collection of over 100 software libraries (modules). Each application performs a specific task within a CFD workflow. The snappyHexMesh application, for example, is a mesh generator for complex geometry, which could be used to generate a mesh around a vehicle. The simpleFoam application could then be used to simulate steady-state, turbulent, incompressible flow around the vehicle. Alternatively, a transient simulation could be run with the pimpleFoam application. The OpenFOAM User Guide describes these applications and how to execute them, either on a single processor or in parallel on multiple processors.

The OpenFOAM User Guide then examines the set up of input data files for a CFD analysis. The input data includes time information (start time, end time, time step, etc) and controls for reading and writing data (time, format, compression, etc). It describes the setting of numerical schemes that affects accuracy and stability of a simulation. Matrix solver controls and algorithm controls are also explained that affect computational time and stability.

The OpenFOAM User Guide includes a chapter on meshing, beginning with the mesh structure of OpenFOAM and the handling of boundaries and boundary conditions. The blockMesh application for generating meshes of simple geometries is described in detail, followed by the snappyHexMesh application and its control parameters. OpenFOAM includes applications that convert meshes from well known formats into the OpenFOAM format and detailed coverage is given to the principle conversion applications, e.g. fluentMeshToFoam. The mapFields application maps field data, e.g. pressure, velocity, from one mesh/geometry to another.

OpenFOAM is shipped with a version of ParaView that includes a reader module to read data in OpenFOAM format. This enables visualization of solution from OpenFOAM, with elements used commonly in CFD such as geometry surfaces, cutting planes, vector plots and streamlines. Animations can be generated conveniently from ParaView.

Contents

1 Introduction 2 Tutorials 2.1 Lid-driven cavity flow 2.1.1 Pre-processing 2.1.2 Viewing the mesh 2.1.3 Running an application 2.1.4 Post-processing 2.1.5 Increasing the mesh resolution 2.1.6 Introducing mesh grading 2.1.7 Increasing the Reynolds number 2.1.8 High Reynolds number flow 2.1.9 Changing the case geometry 2.1.10 Post-processing the modified geometry 2.2 Stress analysis of a plate with a hole 2.2.1 Mesh generation 2.2.2 Running the code 2.2.3 Post-processing 2.2.4 Exercises 2.3 Breaking of a dam 2.3.1 Mesh generation 2.3.2 Boundary conditions 2.3.3 Setting initial field 2.3.4 Fluid properties 2.3.5 Turbulence modelling 2.3.6 Time step control 2.3.7 Discretisation schemes 2.3.8 Linear-solver control 2.3.9 Running the code 2.3.10 Post-processing 2.3.11 Running in parallel 2.3.12 Post-processing a case run in parallel 3 Applications and libraries 3.1 The programming language of OpenFOAM 3.1.1 Language in general 3.1.2 Object-orientation and C++ 3.1.3 Equation representation 3.1.4 Solver codes 3.2 Compiling applications and libraries 3.2.1 Header .H files 3.2.2 Compiling with wmake 3.2.3 Removing dependency lists: wclean and rmdepall 3.2.4 Compilation example: the pisoFoam application 3.2.5 Debug messaging and optimisation switches 3.2.6 Linking new user-defined libraries to existing applications 3.3 Running applications 3.4 Running applications in parallel 3.4.1 Decomposition of mesh and initial field data 3.4.2 Running a decomposed case 3.4.3 Distributing data across several disks 3.4.4 Post-processing parallel processed cases 3.5 Standard solvers 3.6 Standard utilities 3.7 Standard libraries 4 OpenFOAM cases 4.1 File structure of OpenFOAM cases 4.2 Basic input/output file format 4.2.1 General syntax rules 4.2.2 Dictionaries 4.2.3 The data file header 4.2.4 Lists 4.2.5 Scalars, vectors and tensors 4.2.6 Dimensional units 4.2.7 Dimensioned types 4.2.8 Fields 4.2.9 Directives and macro substitutions 4.2.10 The #include and #inputMode directives 4.2.11 The #codeStream directive 4.3 Time and data input/output control 4.4 Numerical schemes 4.4.1 Interpolation schemes 4.4.2 Surface normal gradient schemes 4.4.3 Gradient schemes 4.4.4 Laplacian schemes 4.4.5 Divergence schemes 4.4.6 Time schemes 4.4.7 Flux calculation 4.5 Solution and algorithm control 4.5.1 Linear solver control 4.5.2 Solution under-relaxation 4.5.3 PISO and SIMPLE algorithms 4.5.4 Other parameters 5 Mesh generation and conversion 5.1 Mesh description 5.1.1 Mesh specification and validity constraints 5.1.2 The polyMesh description 5.1.3 The cellShape tools 5.1.4 1- and 2-dimensional and axi-symmetric problems 5.2 Boundaries 5.2.1 Specification of patch types in OpenFOAM 5.2.2 Base types 5.2.3 Primitive types 5.2.4 Derived types 5.3 Mesh generation with the blockMesh utility 5.3.1 Writing a blockMeshDict file 5.3.2 Multiple blocks 5.3.3 Creating blocks with fewer than 8 vertices 5.3.4 Running blockMesh 5.4 Mesh generation with the snappyHexMesh utility 5.4.1 The mesh generation process of snappyHexMesh 5.4.2 Creating the background hex mesh 5.4.3 Cell splitting at feature edges and surfaces 5.4.4 Cell removal 5.4.5 Cell splitting in specified regions 5.4.6 Snapping to surfaces 5.4.7 Mesh layers 5.4.8 Mesh quality controls 5.5 Mesh conversion 5.5.1 fluentMeshToFoam 5.5.2 starToFoam 5.5.3 gambitToFoam 5.5.4 ideasToFoam 5.5.5 cfx4ToFoam 5.6 Mapping fields between different geometries 5.6.1 Mapping consistent fields 5.6.2 Mapping inconsistent fields 5.6.3 Mapping parallel cases 6 Post-processing 6.1 paraFoam 6.1.1 Overview of paraFoam 6.1.2 The Properties panel 6.1.3 The Display panel 6.1.4 The button toolbars 6.1.5 Manipulating the view 6.1.6 Contour plots 6.1.7 Vector plots 6.1.8 Streamlines 6.1.9 Image output 6.1.10 Animation output 6.2 Function Objects 6.2.1 Using function objects 6.2.2 Packaged function objects 6.3 Post-processing with Fluent 6.4 Post-processing with Fieldview 6.5 Post-processing with EnSight 6.5.1 Converting data to EnSight format 6.5.2 The ensight74FoamExec reader module 6.6 Sampling data 6.7 Monitoring and managing jobs 6.7.1 The foamJob script for running jobs 6.7.2 The foamLog script for monitoring jobs 7 Models and physical properties 7.1 Thermophysical models 7.1.1 Thermophysical and mixture models 7.1.2 Transport model 7.1.3 Thermodynamic models 7.1.4 Composition of each constituent 7.1.5 Equation of state 7.1.6 Selection of energy variable 7.1.7 Thermophysical property data 7.2 Turbulence models 7.2.1 Model coefficients 7.2.2 Wall functions 7.3 Transport/rheology models 7.3.1 Newtonian model 7.3.2 Bird-Carreau model 7.3.3 Cross Power Law model 7.3.4 Power Law model 7.3.5 Herschel-Bulkley model

© 2011-2015 OpenFOAM Foundation
CC-NC-ND 3.0