Introduction to OpenFOAM Development

This 3 month course offers the student a chance to learn in-depth about the development of a CFD solver in OpenFOAM. Enroll in the course to become an OpenFOAM developer

  • Domain : CFD
Enroll Now View demo

A Quick Overview

This course on OpenFOAM is the first of its kind in lieu of the depth it covers teaching development of new CFD code. This course trains students to progress from basic coding skills to focused CFD development – which presents opportunities in research and industry.  This course covers the basic building blocks of the developing OpenFOAM, combining a unique theory and hands-on approach for familiarity with the source code. 
Why Enroll?

1. OpenFOAM is heavily used in CFD groups in industry and academia 
2. Developing new CFD code with OpenFOAM is where the cutting edge of research lies 
3. The advantages of learning C++ applied to CFD opens avenues in organizations that do not use OpenFOAM as well 
4. Improvement of prospects in higher education 



Get a 1-on-1 demo to understand what is included in the course and how it can benefit you from an experienced sales consultant. The demo session will help you enroll in this course with a clear vision and confidence.

Request a Demo Session


1Introduction and Setting Up

The first week of the course introduces you to what exactly OpenFOAM is. OpenFOAM is developed primarily for the LINUX operating system. We will also cover the basics of the Linux operating system for anybody who is not acquainted with Linux. We will be covering in detail on the following topics: 

  • Introduction to OpenFOAM 
  • Users, Future opportunities
  • OS and Version Selection
  • Windows Subsystem for Linux
  • Basics of Linux
  • Test case
  • Installing opt and debug modes

2Basics of C++

The course is targeted towards the development of a CFD solver using OpenFOAM. OpenFOAM is primarily a C++ library. Hence, a good understanding of the basics of C++ is quintessential. In this week, we will cover in detail the following topics:

  • Setting up environment: Visual Studio Code
  • Namespaces
  • Data Structures
  • Pointers
  • Static and dynamic arrays
  • STL - std::array and std::vector
  • Declarations and definitions
  • Passing by reference/value 
  • Function Parameters and overloading

3Basics of C++

Object Oriented Programming brings a plethora of features to improve usability of any C++ code that you generate. In this week, we will cover:

  • OOP – Classes and objects
  • Inheritance 
  • Smart Pointers – auto, unique, and shared  
  • Template programming
  • Polymorphism
  • Operator overloading
  • Abstract classes, Virtual functions

4High Level Programming 1

C++ is a high level language that let’s users create independent programs that are easier to interpret than assembly level codes. Here we will delve into the building blocks of it’s code organization by covering the following topics :

  • Introduction to parallel programming MPI 
  • Make files and Cmake 
  • Library and class organization
  • Compiling a solver

5High Level Programming 2

In this week, we further explore the various dictionaries available in OpenFOAM and try to understand the different C++ concepts used to achieve a particular task. We will be looking into : 

  • 5 OpenFOAM Classes : Constructor/Destructor,Overloading,Inheritance & Polymorphism 
  • Time dictionary 
  • IOObject and objectRegistry
  • Fields dictionary 
  • Scalars, Vectors, and Tensors
  • Implicit & Explicit namespaces (FVM & FVC)

6FVM for OpenFOAM 1

Finite Volume Method (FVM) is one of the most commonly used methods of converting PDE’s to ALE’s. In this week, Upon introducing the basic principles of FVM, we dive deep into the way in which openFOAM handles individual terms of the governing equations. The following concepts are covered in this week:

  • General conservation equation
  • Navier-Stokes equations 
  • Gauss Divergence Theorem 
  • Discretization of the source term
  • Discretization of the convective term 
    • Upwind
    • Linear Upwind
    • Flux Limiter (TVD)
  • Stability criterion – CFL condition 

7FVM for OpenFOAM 2

FVM in openFOAM is implemented in 3 parts. 1) Surface interpolation 2) fvc and 3) fvm using the mentioned finite volume techniques covered in the previous week. In this week, we will look into the multiple algorithmic choices of gradient operators and discretization schemes that can be employed by covering the following topics :

  • Gradient schemes
    • Green-Gauss Cell Based
    • Green- Gauss Node Based
  • Discretization of the diffusion term 
  • Laplacian schemes
  • Non orthogonal meshes and solution
  • N-S Equations revisited
  • Collocated vs Staggered grids
  • SIMPLE algorithm 

8FVM for OpenFOAM 3

If we consider the discretized form of the Navier-Stokes system, the form of the equations shows linear dependence of velocity on pressure and vice-versa. This inter-equation coupling is called velocity pressure coupling and often calls for a special treatment in order to decouple the terms. This week, we will look at some of the standard techniques used in CFD to achieve the same. Topics include :

  • SIMPLE algorithm - Need for Under Relaxation 
  • SIMPLEC algorithm - Consistent SIMPLE
  • PISO algorithm 
  • PIMPLE algorithm

9Linear Solvers

Linear systems in numerical methods often reduce to a sparse system (matrix having many zero elements) which can be computationally expensive to solve using standard algebraic methods. This week we will look into the working of some of the linear solvers used in openFOAM. Topics include : 


  • Non-orthogonal correctors
  • From mesh to matrix 
  • Linear solvers 
  • Jacobi
  • Gauss Seidel
  • Newton-Kyrlov family 
  • Preconditioners 
  • Smoothers 
  • Solver tolerances


10Turbulence 1

The concept of turbulence is something that has not been understood vividly till date although turbulent flows are commonplace in most real life scenarios. Considered as the cornerstone of fluid dynamics, Turbulence modeling is the construction and use of a mathematical model to predict the effects of turbulence. This week, we will look into the basic types of turbulence models used in CFD.  

  • Basics of turbulence 
  • RANS averaging 
  • The k-epsilon model
  • The k-omega model 

11Turbulence 2

This week is an extension of the concepts covered in the previous week where different turbulence models are weighed in against each other for specific applications. This week we further our understanding of the boundary layer theory by introducing ‘Wall functions’ which  are used to bridge the inner region between the wall and the fully developed turbulent layer to customizing a user defined turbulence model. Topics include :

  • The k-omega SST model 
  • Wall modelling and wall functions
  • Creating a turbulence model

12Temporal Discretization

Time discretization is a mathematical technique applied to transient problems which require solutions in which position varies as a function of time. Temporal discretization involves the integration of every term in different equations over a time step (Δt). Topics include :

  • Discretization of the time term 
  • Forward and backward Euler 
  • Crank-Nicholson 
  • Function Objects 
  • Latex for Report Writing 

Projects Overview

Project 1


This project is meant to be an introduction to implementing your own solver in OpenFOAM. The points below are meant to be rough guiding points to what you should be looking at in the process. You are required to write a report (1000 words) about the steps you took to create the solver as well as results from the case you run with it.

Project Description: Use the icoFoam solver in the applications/solvers/incompressible/icoFoam directory to create your own solver - scalarFoam

The scalar transport equation is defined as:
∂s + ∇ • (us) = 0,
Where s is the scalar quantity being transported by the velocity u.

Changes in the solver:
• Replace the main working equation with
• What change will you make in the createFields.H file (Hint: the p field is originally created here)
• What change will you make in the UEqn.H file? (Hint: replace the solve function)
• Compile scalarFoam using wmake. How are the Make/files modified?

Changes in the case:
• Use the $FOAM_TUTORIALS/incompressible/icoFoam/cavity case to test out your solver. Rename it scalarCavity.
• The scalar transport equation has no pressure p to solve, instead a scalar s. What changes will you make in the 0 folder?
• You will have to change the interpolation scheme in fvSchemes to account for the ∇ • (us) term. How will you do this?
• In fvSolutions, a solver has to be specified for the quantity s. Can you just replace this with the solver used for p?
• Run this case by making the appropriate change in controlDict.


Project 2


The total pressure ptotal is the contribution of the static pressure p and the dynamic pressure. To calculate this, we decide to write a coded function object called p_total which:

  • reads in the fields p and U
  • creates a field p_total (using IOobject)
  • computes the expression ptotal = p +1/2U2
  • writes the file p_total to the disk

Place this in the controlDict file of the pitzDaily tutorial and plot your results. Write a short report including the code you used in LATEX.

Project 3


The icoFoam solver solves the incompressible flow equations for mass and momentum. Our goal is to now add an equation for temperature

Changes in the solver:

  • Create a new solver based on icoFoam called icoTempFoam
  • Replace file names and mentions of icoFoam with icoTempFoam
  • Change the solver target directory to FOAM_USER_APPBIN
  • Change createFields.H to include a dictionary reader for kappa (κ) and a field read and write IOObject for temperature T
  • Add a fvScalarMatrix in the main .C file that stores the scalar matrix value of TEqn
  • Run the solve() function on this matrix object
  • Compile the solver 

Changes in the case:

  • Copy the FOAM_TUTORIALS/incompressible/icoFoam/cavity/cavity tutorial and rename it to cavityTemp
  • Add a dictionary entry for kappa in transportProperties

kappa [ 0 2 -1 0 0 0 0 ] 0.001;

  • Add a file in the 0 folder for temperature T. Remember to set the correct dimensions for it! Set the movingWall to be 400K and the other walls and internal field to be 300K
  • Add a div(phi,T) in divSchemes and laplacian(kappa,T) in laplacianSchemes
  • Add a smoothSolver linear solver for temperature in fvSolution. Use a tolerance of 1e-07 and a relTol of 0
  • Run the solver and plot the results of temperature in Paraview
  • Write a short report including the code you used in LATEX

Project 4


These cases should be simulated for t = 5 seconds with the same blockMesh settings as in the original sonicFoam tutorial
• Set velocity to 0 ( U = (0, 0, 0) ) and vary diffusion coefficient via the transportProperties file, like so:
DT DT [ 0 2 -1 0 0 0 0] 0;

• Use these diffusion coefficients and compare the contour plots of temperature for this case of pure diffusion:

  1. 0
  2. 0.0001
  3. 0.01
  4. 1

• Set x-velocity to 1 ( U = (1, 0, 0) ) and set diffusion coefficient via the transportProperties file to 0:
DT DT [ 0 2 -1 0 0 0 0] 0;
• Use the following divSchemes and compare the results for this case of pure advection

  1. upwind
  2. linearUpwind
  3. quadratic
  4. cubic
  5. vanLeer
  6. QUICK

The comparison of convection schemes should be done via a plot that captures the
change of the temperature profile along the length of the tube, as shown in the lecture
(and on the next slides )

Plot of temperature profile at t = 0

Plot of temperature profile at t = 5

• Write about the difference in results because of different diffusion coefficients and what it
could mean physically. Additionally, explain how this could be controlled by the user in
• Why do different convection schemes cause changes in the original temperature profile
when convected?
• What is the most accurate convection scheme from the list and why?
• Summarize the case, your changes, your results, and answers to the above questions in a
LATEX report

What will the student gain from your course?

  • Students will gain valuable insight into the inner workings of the OpenFOAM code, strengthen every CFD fundamental, and understand software development of an industry leading CFD toolbox



OpenFOAM is a C++ toolbox for the development of customized numerical solvers, and pre-/post-processing utilities for the solution of continuum mechanics problems, most prominently including computational fluid dynamics


Get an edge over your peers by investing in your future.

6 month 0% EMI
Total Course Fee is Rs. 30,000.
Check your 0% EMI Eligibility


Take Scholarship Test

Flexible Course Fees

Choose the Master’s plan that’s right for you


2 Months Access


Per month for 3 months

  • Access Duration : 2 months
  • Mode of Delivery : Online
  • Project Portfolio : Available
  • Certification : Available
  • Email Support : Available
  • Forum Support : Available

Lifetime Access


Per month for 3 months

  • Access Duration : Lifetime
  • Mode of Delivery : Online
  • Project Portfolio : Available
  • Certification : Available
  • Individual Video Support : 12/month
  • Group Video Support : 12/month
  • Email Support : 12/month
  • Forum Support : Available
  • Telephone Support : Available
  • Dedicated Support Engineer : Available

Frequently Asked Questions

1Who can take your course?

Students pursuing an undergraduate/graduate degree in Mechanical/Aerospace engineering

2What is included in your course?

Theory and overview to software development of a popular open source toolbox in Computational Fluid Dynamics (CFD), OpenFOAM

3What will the student gain from your course?

Students will gain valuable insight into the inner workings of the OpenFOAM code, strengthen every CFD fundamental, and understand software development of an industry leading CFD toolbox

4What software skills are you teaching and how well are these tools used in the industry?

C++ and OpenFOAM is heavily used by in industry and academia alike.

5What is the real world application for the tools and techniques will you teach in this course?

The cutting edge of CFD requires developing new methods and converting new research into code usable for a better simulation future. OpenFOAM development is very active and presents an entry into the cutting edge of CFD.

6Which companies use these techniques and for what?

OpenFOAM development is very active in automotive and aerospace companies. Furthermore, learning software development in CFD is a transferable skill to those looking to work in the development of any other commercial software.

7How is your course going to help me in my path to MS or PhD?

This course is geared slightly more towards those looking to purse a higher academic degree. Unlike regular undergraduate courses, this allows students to directly take up research problems, which may strongly improve chances of success at research assistantship positions, either as part of MS or PhD degrees.

8How is this course going to help me get a job?

Software development and a solid C++ background is a vital requirement for CFD engineers, given the highly numerical nature of work done. An OpenFOAM background is very well received as a gateway to any other commercial software.


See all


  • Top 5% of the class will get a merit certificate
  • Course completion certificates will be provided to all students
  • Build a professional portfolio
  • Automatically link your technical projects
  • E-verified profile that can be shared on LinkedIn

You Might Also Be Interested In

Related Courses

See all

The Skill-Lync Advantage

See all


Companies hire from us

See all