This tutorial describes the use of the spectral/hp element framework Nektar++ to explore one of the classical and canonical problems of fluid dynamics: the Taylor-Green Vortex (TGV). Information on how to install the libraries, solvers, and utilities on your own computer is available on the webpage www.nektar.info.
Installed and tested Nektar++ v5.7.0 from a binary package, or compiled it
from source. Note that sources may be compiled with the CMake options
NEKTAR_USE_FFTW
and NEKTAR_USE_MPI
set to ON
for faster execution. By default
binary packages will install all executables in /usr/bin
. If you compile from source
they will be in the sub-directory dist/bin
of the build
directory you created in
the Nektar++ source tree. We will refer to the directory containing the executables
as $NEK
for the remainder of the tutorial.
Downloaded the tutorial files: incns-taylor-green-vortex.tar.gz
Unpack it using unzip incns-taylor-green-vortex.tar.gz
to produce a
directory incns-taylor-green-vortex
with subdirectories called tutorial
and
complete
. We will refer to the tutorial
directory as $NEKTUTORIAL
.
The TGV flow case has analytical initial conditions and its exact solution is known from direct numerical simulation (DNS) using incompressible Navier-Stokes solvers. For this reason it is often used for code validation. Moreover, the TGV flow problem is a very instructive analysis case: through its numerical simulation, it is possible to study turbulent transition and decay, vortex dynamics and energy dissipation mechanisms 1. In this tutorial we will focus on the solution of the TGV flow case in a 3D cube region within a time frame of 20 seconds, which is usually sufficient to observe the aforementioned phenomena. For now, we will restrict ourselves to a resolution of 643 degrees of freedom using p = 8 order interpolants in a Continuous Galerkin (CG) projection. We will also have a look at the temporal evolution of the kinetic enery and its dissipation rate in the flow domain. The case with 1283 degrees of freedom is left as an optional exercise for the user.
The necessary files to complete this tutorial are included in the .zip folder downloaded using
the link in Task 1.1
. Under the folder tutorial
, the user will find four subfolders, two for
each resolution (64 or 128):
Folder geometry64
TGV64_mesh.msh
- Gmsh generated mesh data listing mesh vertices and
elements for the 643 case.
Folder geometry128
TGV128_mesh.msh
- Gmsh generated mesh data listing mesh vertices and
elements for the 1283 case.
Folder solver64
TGV64_mesh.xml
- Nektar++ session file, generated with the $NEK/NekMesh
utility, containing the 2D mesh for the 643 case.
TGV64_conditions.xml
- Nektar++ session file containing the solver settings
for the 643 case.
shell64.sh
- A bash script with the required command structure to
automatically run the simulation on the compute nodes at Imperial College
London.
Folder solver128
TGV128_mesh.xml
- Nektar++ session file, generated with the $NEK/NekMesh
utility, containing the 2D mesh for the 1283 case.
TGV128_conditions.xml
- Nektar++ session file containing the solver
settings for the 1283 case.
shell128.sh
- A bash script with the required command structure to
automatically run the simulation on the compute nodes at Imperial College
London.
The folder completed
that can also be found in the .zip
contains the filled .xml
files to be
used as a check in case the user gets stuck, or to verify the correctness at the end of the
tutorial.
Because the test case can take some time to complete, you may want to run the solver with
the completed configurations files available in the folder completed
. To do so, in
the folder completed/solver64
, type the following command on the command
line:
$NEK/IncNavierStokesSolver TGV64_mesh.xml TGV64_conditions.xml
Note that this is entirely optional as output files are already provided in the same folder, i.e.
completed/solver64
.