Introduction to CFD using OpenFOAM Technology

Licence Sciences des Données, Université Mohammed VI Polytechnique, 2021

OpenFOAM is a popular open source software package for Computational Fluid Dynamics (CFD). It has a large user base across most areas of engineering and science, from both commercial and academic organisations. OpenFOAM has an extensive range of features to solve anything from complex fluid flows involving chemical reactions, turbulence and heat transfer, to acoustics, solid mechanics and electromagnetics. It is free-to-use numerical simulation software, including usage on HPC systems. In this course you are going to learn how to simulate various flow configurations in the Computational Fluid Dynamics software OpenFOAM. This includes the simulation of laminar and turbulent, stationary and transient flows. Furthermore, you are going to see how to work with multiphase flows. We will cover how to choose correct initial and boundary conditions for the calculation. Moreover you will learn how to define a spatial domain and mesh it with a structured or unstructured grid. You are going to learn how to edit runtime controls and how to run a job including how to check convergence of the solution and visualize it graphically with ParaView.

Course prerequisites

  • Students should have basic computer management skills and be able to work comfortably on the Unix/Linux command line.

Topics to be covered

  • OpenFOAM general overview
  • Lid driven cavity example walk through
  • Pre-processing OpenFOAM cases
  • OpenFOAM case configuration
  • Running OpenFOAM case
  • Post-processing OpenFOAM cases
  • Stress analysis of plateHole example
  • Create custom solver
  • Adding a transport equation to icoFoam

Learning outcomes

  • Learn how to download, install, compile and run standard OpenFOAM solvers and utilities
  • Learn how to implement solvers and utilities
  • Learn how to implement a turbulence model
  • Learn how to implement a boundary condition
  • Learn the basics of C++ and object orientation
  • Learn how to do CFD with OpenFOAM together with Python, Gnuplot, Paraview etc.
  • Learn basics of Linux (see link on homepage), Doxygen, Compilation procedures, Debugging, Version Control Systems and VTK
  • Learn how to use OpenFOAM by doing a project work