Chapter 1
Introduction

This tutorial provides an overview of utilising the spectral/hp element framework Nektar++ for the numerical solution of a classical fluid dynamics problem: Rayleigh–Bénard Convection (RBC). The tutorial will delve into the direct numerical simulation and linear stability analysis of a two-dimensional RBC.

Information on how to install the libraries, solvers, and utilities on your own computer is available on the webpage www.nektar.info. This tutorial assumes the reader has already completed the previous tutorial in the Flow Stability series on the channel and already has the necessary software installed.

Task: 1.1 Prepare for the tutorial. Make sure that you have:

Governing equations

The dynamical equations that describe Rayleigh–Bénard Convection (RBC) under Boussinesq approximation in the non-dimensional form are

∂u-
∂t + u ⋅∇u = -∇p + RaPrTey + Pr∇2u, (1.1)
∂T-
 ∂t + u ⋅∇T = ∇2T, (1.2)
∇⋅u = 0, (1.3)

where u and T are the velocity and temperature fields, respectively, and ey is the buoyancy direction. Here p is the modified pressure including the buoyancy term accounting for the reference temperature. Flow is controlled by two non-dimensional numbers, the Rayleigh number Ra and the Prandtl number Pr.

By decomposing the velocity, temperature and pressure in the equations (1.2-1.3) as a summation of a base flow (U,T,P) and perturbation (u,T,p), such that

u = U + u (1.4)
T = T + T (1.5)
p = P + p, (1.6)

and retaining first-order terms only yields the linearised equations governing the evolution of infinitesimal perturbations:

∂u-′
 ∂t + u⋅∇U + (U ⋅∇)u = -∇p + RaPrTe y + Pr∇2u, (1.7)
∂T ′
----
 ∂t + u⋅∇T + U ⋅∇T = ∇2T, (1.8)
∇⋅u = 0. (1.9)

In Chapter 2, we will validate a case of two-dimensional RBC in a domain of aspect ratio 2.02. In Chapter 3, we will discuss the linear stability analysis for a no-slip boundary condition at top and bottom plates, and will estimate the critical value of Rayleigh number. The files contained in the $NEKTUTORIAL directory are as follows:

Mesh generation

The first step is to generate a mesh that is readable by Nektar++. The files necessary in this section can be found in $NEKTUTORIAL/geometry/. To achieve this task, we use Gmsh in conjunction with the Nektar++ pre-processing utility called $NEK/NekMesh. Specifically, we first generate the mesh in figure 1.1 using Gmsh and successively, we convert it into a suitable Nektar++ format using $NEK/NekMesh. For all calculations in this tutorial, we fix Lx = 2.02 and Ly = 1.0 to maintain the aspect ratio of 2.02.

Task: 1.2 Convert the Gmsh geometry provided into the XML Nektar++ format and with two periodic boundaries


pict
Figure 1.1 100 quadrilaterals mesh