Skip to main content
To KTH's start page To KTH's start page

FLOW-SESE Course: Nek5000 – theory, implementation and optimization 2021

Final report published: Nek5000_2021.pdf

Schedule updated! (see below)

We have received over 100 applications, and had to therefore make a strict selection of participants. However, depending on the feedback of this course, we will consider giving a similar course again. We apologise for not being able to accommodate all interested students.

Purpose

In this course, we discuss the theory, numerics and implementation of the various methods in Nek5000. Nek5000 is a spectral-element based solver for CFD, and is available as an open source package. The code has become popular among researchers worldwide, mainly because of its relatively high accuracy per grid point, its parallel efficiency and the wide user community and available packages (e.g. statistics, linear stability, adjoints etc.). The development of the various methods goes back to the mid 80ies, and a number of different approaches is now implemented, both when it comes to the integration of Navier-Stokes, the communication kernels and efficient single-core performance. For SESSI, Nek5000 is one of the two main codes to focus on, and in Sweden about 30 people are actively working with Nek5000. Therefore, we believe that offering an in-depth course on the internal workings of Nek5000, the relevant theory of SEM, implementations and physical models is a relevant contribution to SESE .

Intended learning outcomes:

  • Understand the basic theory of solutions to the Navier-Stokes equations and its implications to the numerical treatment
  • Understand the formulation of the pressure treatment for both PnPn and PnPn-2 methods
  • Spectral-element discretisation and necessary stabilization, time integrators
  • Workflow of Nek5000, and the various iterative solvers (including preconditioners, projections)
  • Imposition of boundary conditions and limitations
  • Implementation of meshing and metrics
  • Understanding of the basic communication kernels (GS lib)

Pre-requisites and target group

Basic knowledge in scientific computing, programming and CFD. Basic interest in fluid mechanics is recommended as most practical examples are related to fluid mechanics.

The course is aimed at researchers for academia (MSc, PhD students, researchers) and industry that use (or intend to use) Nek5000 in their work. The focus is on the underlying theory and implementation, and not on running Nek5000 for specific cases. Of course, support to install and get started with Nek5000 can be provided if necessary.  

Course schedule

We start the course with a number of plenary lectures during Week 10 and 11:

  • Thursday, 11/3, 13-16: Introduction and outline, style files. Short tutorial how to run Nek5000 v19.
  • Friday, 12/3, 10-12: Fortran 77 Tutorial
  • Monday 15/3 13-15: Fourier and Chebyshev methods part I
  • Tuesday 16/3 13-15: Fourier and Chebyshev methods part II
  • Wednesday 17/3 13-15: Fourier and Chebyshev methods part III
  • Friday 11/6 11-13: Computer Architectures/HPC (given by Stefano Markidis)

The second part of the course consists of group work and presentations, spread over 10 meetings every Friday 13-15, starting 9/4. The following topics will be treated:

  • SEM discretisation (09.04.2021, 9-11) Legendre polynomials + SEM discretisation. Properties and weak form, discretisation of advection/diffusion. Continuous level
  • Discrete operators (09.04.2021, 11-13) Matrix-free formulation, tensor operations, implementation of operators, axhelm, mxm, gather-scatter. Discrete level.
  • Pressure correction method and PN-PN-2 formulation (16.04.2021, 13-15)
  • PN-PN formulation (23.04.2021, 13-15)
  • Iterative solvers and projection method (30.04.2021, 13-15)
  • Time integration, OIFS, characteristics (07.05.2021, 13-15)
  • Pressure preconditioners/Schwarz Multigrid (14.05.2021, 13-15)
  • Direct stiffness summation (21.05.2021, 13-15)
  • Solver stabilisation (28.05.2021, 13-15)
  • Work balancing(04.06.2021, 13-15)
  • Meshing and boundary conditions (11.06.2021, 13-15)

The final outcome of the course is a LaTeX based description of the various parts, which can then be combined into a document of the relevant developer material for Nek5000. Deadline for submission of the group reports (after reviewing) to the box folder: 25.6.2021. Please use the TeX template!

The course requirements are

  • Submission of the homework for the theoretical part (Fourier Galerkin method)
  • Group work (about 3 students together) and presentation of one of the above topics, and submission of report before 25.6.2021.
  • Participation in at least 6 course meetings.

Recommended book

Deville, Fischer, Mund, High-Order Methods for Incompressible Fluid Flow, Cambridge University Press, 2002

Link to Nek5000: nek5000.mcs.anl.gov/  

Link to final report: Nek5000_2021.pdf

Contact

Responsible: Saleh Rezaeiravesh ( salehr@kth.se ) and Philipp Schlatter ( pschlatt@mech.kth.se

Involved teachers: Niclas Jansson, Adam Peplinski, Saleh Rezaeiravesh, Jon Vincent, Stefano Markidis, Philipp Schlatter

Registration: (CLOSED) www.kth.se/form/nek5000course-2021