Single-Course English 5 ECTS

Computational Fluid Dynamics

Overall Course Objectives

To develop a finite-volume method solution to the incompressible Navier-Stokes equations in two-dimensions. To gain experience in building a complex computer program in a modular and effective way using MATLAB. To compute examples of heat convection/diffusion and lid driven flows and compare with benchmark results from the literature. To aquire some insight into the steps required to turn this code into a state of the art commercial CFD code.

Learning Objectives

  • Derive finite difference schemes of arbitrary order, in any number of dimensions on uniform or non-uniform grids.
  • Derive finite volume schemes of arbitrary order on a rectangular grid.
  • Determine the order of accuracy (truncation error) of finite difference and finite volume schemes and show the relationship between them.
  • Apply finite difference schemes explicitly and implicitly to evaluate and/or solve systems of partial differential equations.
  • Apply a second-order finite volume scheme to solve systems of partial differential equations in conservation form including, in particular, the incompressible Navier-Stokes equations.
  • Use a set of templates to build a clear, well orginized and modular program for making CFD calculations in MATLAB.
  • Use an efficient direct method for solving sparse linear systems of equations.
  • Demonstrate the convergence of CFD calculations for 2D laminar flows through a quantitative comparison with benchmarks from the litterature.
  • Perform a linear stability analysis of a discrete solution scheme for a system of partial differential equations.
  • Prepare a clear and concise report on a short research project.

Course Content

This course is focused on methods for solving the generic conservation law, and in particular its manifestation as the fundamental equations of a fluid flow: The Navier-Stokes equations. We begin with the inviscid approximation to these equations (a potential flow) and work up to the full equations. The resulting partial differential equations are discretised and solved using finite difference and finite-volume methods. The topics of: Stability, numerical diffusion, linearisation, truncation error, convergence, and consistency are discussed. Direct and iterative methods for solving linear systems of equations are briefly introduced.

A series of solvers is built up during the course and applied to some simple two-dimensional flows including: Pipe-flow; 2D potential flows; and laminar lid driven flow in a square cylinder. Tips are given for effective visualisation of the results using Matlab, and comparison is made to benchmark results from the literature. These examples are used to guide the student through the process of building their own 2-D finite-volume method solution to the incompressible Navier-Stokes equations using MATLAB.

Recommended prerequisites

41312/41102/10346/41320/02601/02631, A basic course in fluid dynamics along with some programming experience in MATLAB is expected. An advanced course in fluid mechanics and courses on numerical algorithms and methods for solving differential equations are all very helpful.

Teaching Method

Lectures, exercises with sample quizzes.



Problem solving in the data bar using Matlab.

See course in the course database.





13 weeks


DTU Lyngby Campus

Course code 41317
Course type Candidate
Semester start Week 5
Semester end Week 19
Days Fri 13-17

7.500,00 DKK