Global Stability Analysis: Cylinder Flow

PIC

Global Stability Analysis: Cylinder Flow

Department of Aeronautics, Imperial College London, UKScientific Computing and Imaging Institute, University of Utah, USA

May 15, 2024

Nektar++ Tutorial

1 Introduction

2 Computation of the base flow

3 Stability analysis

x3.1 Direct

x3.2 Adjoint

1 Introduction

[next] [prev] [prev-tail] [tail] [up]

Chapterx1Introduction

This tutorial further explores the use of the spectral/hp element framework Nektar++ to perform global stability computations. 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 therefore already has the necessary software installed.

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

Downloaded the tutorial files: flow-stability-cylinder.tar.gz

     Unpack it using unzip flow-stability-cylinder.tar.gz to produce a directory
     flow-stability-cylinder with subdirectories called tutorial and complete We

will refer to the tutorial directory as $NEKTUTORIAL.

In this tutorial we will compute the direct and adjoint modes of a two-dimensional flow past a cylinder. We will investigate a case in the subcritical regime (Re = 42), below the onset of the Bernard-von Kxrmxn vortex shedding that is observed when the Reynolds number is above the critical value Re_{c} ≃ 47; this analysis is important because it allows us to study the sensitivity of the flow, much like that reported by Giannetti and Luchini ( J. Fluid Mech., 2007; 592:177-194). Due to the more complex nature of the flow and the more demanding computational time that is required, only some basic information will be presented in this section, mainly to show the potential of the code for stability analysis.

The files contained in the $NEKTUTORIAL directory are as follows:

Folder geometry

Cylinder.geo - Gmshxfile that contains the geometry of the problem

Cylinder.msh - Gmshxgenerated mesh data listing mesh vertices and elements.

Folder base

Cylinder-Base.xml  -  Nektar++

session file, generated with the $NEK/NekMesh utility, for computing the base flow.

Cylinder-Base.fld - Nektar++ field file that contains the base flow, generated using

Cylinder-Base.xml.

Folder stability/Direct

Cylinder_Direct.xml - Nektar++ session file, generated with

$NEK/NekMesh.

Cylinder_Direct.bse - Nektar++ field file that contains the base flow.

Cylinder_Direct.rst - Nektar++ field file that contains the initial conditions.

     Folder stability/Adjoint

Cylinder_Adjoint.xml - Nektar++ session file, generated with

         $NEK/NekMesh.

Cylinder_Adjoint.bse - Nektar++ field file that contains the base flow.

Cylinder_Adjoint.rst - Nektar++ field file that contains the initial conditions.

Folder stability/Receptivity Pre-computed output files for calculating the receptivity.

The mesh is shown in figure 1.1 along with a detailed view around the cylinder. This mesh is made up of 782 quadrilateral elements. pict Figurex1.1: Mesh used for the direct stability analysis

Note: It is important to note that stability and transient growth calculations in particular, have a strong dependence on the domain size as reported by Cantwell and Barkley (Physical Review E, 2010; 82); moreover, poor mesh design can lead to incorrect results. Specifically, the mesh must be sufficiently refined around the cylinder in order to capture the separation of the flow and abrupt variations in the size of the elements should be avoided.

[next] [prev] [prev-tail] [front] [up] 2 Computation of the base flow

[next] [prev] [prev-tail] [tail] [up]

Chapterx2Computation of the base flow

Cylinder-Base.xml can be found inside the $NEKTUTORIAL/base folder. This is the Nektar++ file generated using $NEK/NekMesh and augmented with all the configuration settings that are required. In this case, CFL conditions can be particularly restrictive and the time step must be set around 8 × 10^{−4} . We will be using Reynolds number Re = 42 for this study.

The supplied file Cylinder-Base.bse is the converged base flow required for the analysis and is the result of running Cylinder-Base.xml. To have a steady solution it was necessary to evolve the fields for a non-dimensional time τ ≥ 300 and it is very important to be sure that the solution is steady. This can be verified by putting several history points on the centre line of the flow and monitoring their variation.

Task: 2.1 Convert the base flow into VTK format and visualise the profile of the flow past a cylinder in Paraviewx.

The base flow should look like the one in figure 2.1.

PIC Figurex2.1: Base flow for the cylinder test case [next] [prev] [prev-tail] [front] [up] 3 Stability analysis

[prev] [prev-tail] [tail] [up]

Chapterx3Stability analysis

3.1 Direct

In the folder $NEKTUTORIAL/stability/Direct there are the files that are required for the direct stability analysis. Since, the computation would normally take several hours to converge, we will use a restart file and a Krylov-space of just κ = 4. Therefore, it will be possible to obtain the eigenvalue and the corresponding eigenmode after 2 iterations.

Task: 3.1 Define a Kyrlov space of 4 and compute the leading 2 eigenvalues and the eigenvectors of the problem using Arpack and the restart file Cylinder_Direct.rst.

The simulation should converge in 6 iterations and the terminal screen should look similar to the one below:

=======================================================================EquationType:UnsteadyNavierStokesSessionName:Cylinder_DirectSpatialDim.:2MaxSEMExp.Order:7ExpansionDim.:2ProjectionType:ContinuousGalerkinAdvection:explicitDiffusion:explicitTimeStep:0.0008No.ofSteps:1250Checkpoints(steps):1000IntegrationType:IMEXOrder2=======================================================================Arnoldisolvertype:ArpackArpackproblemtype:LMSingleFouriermode:falseBetasettoZero:falseEvolutionoperator:DirectKrylov-spacedimension:4Numberofvectors:2Maxiterations:500Eigenvaluetolerance:1e-06======================================================InitialConditions:-Fieldu:fromfileCylinder_Direct.rst-Fieldv:fromfileCylinder_Direct.rst-Fieldp:fromfileCylinder_Direct.rstWriting:"Cylinder_Direct_0.chk"Initalvector:inputfileIteration0,output:0,ido=1Writing:"Cylinder_Direct_1.chk"Steps:1250Time:1CPUTime:46.5477sTime-integration:46.5477sWriting:"Cylinder_Direct.fld"Iteration1,output:0,ido=1Writing:"Cylinder_Direct_1.chk"Steps:1250Time:2CPUTime:41.7221sTime-integration:41.7221sIteration2,output:0,ido=1Writing:"Cylinder_Direct_1.chk"Steps:1250Time:3CPUTime:41.8717sTime-integration:41.8717sIteration3,output:0,ido=1Writing:"Cylinder_Direct_1.chk"Steps:1250Time:4CPUTime:41.9465sTime-integration:41.9465sIteration4,output:0,ido=1Writing:"Cylinder_Direct_1.chk"Steps:1250Time:5CPUTime:41.987sTime-integration:41.987sIteration5,output:0,ido=1Writing:"Cylinder_Direct_1.chk"Steps:1250Time:6CPUTime:42.2642sTime-integration:42.2642sIteration6,output:0,ido=99Convergedin6iterationsConvergedEigenvalues:2MagnitudeAngleGrowthFrequencyEV:00.97920.726586-0.02101960.726586Writing:"Cylinder_Direct_eig_0.fld"EV:10.9792-0.726586-0.0210196-0.726586Writing:"Cylinder_Direct_eig_1.fld"L2error(variableu):0.0501837Linferror(variableu):0.0296123L2error(variablev):0.0635524Linferror(variablev):0.0355673L2error(variablep):0.0344665Linferror(variablep):0.0176009

Task: 3.2 Verify that the leading eigenvalues show a growth rate of σ = −2.10196 × 10^{−2} and a frequency ω = ±7.26586 × 10^{−1} . Task: 3.3 Plot the leading eigenvector in Paraviewxor VisIt. This should look like the solution shown in figures 3.1.

PIC PIC Figurex3.1: u′-component and v′-component of the eigenmode 3.2 Adjoint

After the direct stability analysis, it is now interesting to compute the eigenvalues and eigenvectors of the adjoint operator A^{∗} that allows us to evaluate the effects of generic initial conditions and forcing terms on the asymptotic behaviour of the solution of the linearised equations. In the folder Cylinder/Stability/Adjoint there is the file Cylinder_Adjoint.xml that is used for the adjoint analysis.

Task: 3.4 Set the EvolutionOperator to Adjoint, the Krylov space to 4 and compute the leading eigenvalue and eigenmode of the adjoint operator, using the restart file

Cylinder_Adjoint.rst

The solution should converge after 4 iterations and the terminal screen should look like this:

=======================================================================EquationType:UnsteadyNavierStokesSessionName:Cylinder_AdjointSpatialDim.:2MaxSEMExp.Order:7ExpansionDim.:2ProjectionType:ContinuousGalerkinAdvection:explicitDiffusion:explicitTimeStep:0.001No.ofSteps:1000Checkpoints(steps):1000IntegrationType:IMEXOrder3=======================================================================Arnoldisolvertype:ArpackArpackproblemtype:LMSingleFouriermode:falseBetasettoZero:falseEvolutionoperator:AdjointKrylov-spacedimension:4Numberofvectors:2Maxiterations:500Eigenvaluetolerance:0.001======================================================InitialConditions:Fieldpnotfound.-Fieldu:fromfileCylinder_Adjoint.rst-Fieldv:fromfileCylinder_Adjoint.rst-Fieldp:fromfileCylinder_Adjoint.rstWriting:"Cylinder_Adjoint_0.chk"Initalvector:inputfileIteration0,output:0,ido=1Steps:1000Time:27CPUTime:42.0192sWriting:"Cylinder_Adjoint_1.chk"Time-integration:42.0192sWriting:"Cylinder_Adjoint.fld"Iteration1,output:0,ido=1Steps:1000Time:28CPUTime:37.1084sWriting:"Cylinder_Adjoint_1.chk"Time-integration:37.1084sIteration2,output:0,ido=1Steps:1000Time:29CPUTime:37.4794sWriting:"Cylinder_Adjoint_1.chk"Time-integration:37.4794sIteration3,output:0,ido=1Steps:1000Time:30CPUTime:37.3142sWriting:"Cylinder_Adjoint_1.chk"Time-integration:37.3142sIteration4,output:0,ido=99Convergedin4iterationsConvergedEigenvalues:2MagnitudeAngleGrowthFrequencyEV:00.9804930.727526-0.01970.727526Writing:"Cylinder_Adjoint_eig_0.fld"EV:10.980493-0.727526-0.0197-0.727526Writing:"Cylinder_Adjoint_eig_1.fld"L2error(variableu):0.434746Linferror(variableu):0.156905L2error(variablev):0.698425Linferror(variablev):0.120624L2error(variablep):0.216948Linferror(variablep):0.0676028

Task: 3.5 Verify that the eigenvalues of the system are λ_{1,2} = 0.980495 × e^{±i0.727502} with a growth rate equal to σ = −1.969727 × 10^{−2} and a frequency ω = ±7.275024 × 10^{−1} .

Task: 3.6 Plot the leading eigenmode in Paraviewxor VisIt that should look like figures 3.2 and 3.2.

Note that, in spatially developing flows, the eigenmodes of the direct stability operator tend to be located far downstream while the eigenmodes of the adjoint operator tend to be located upstream and near to the body, as can be seen in figures 3.2 and 3.3. From the profiles of the eigemodes, it can be deducted that the regions with the maximum receptivity for the momentum forcing and mass injection are near the wake of the cylinder, close to the upper and lower sides of the body surface, in accordance with results reported in the literature.

PIC Figurex3.2: Close-up of the u^{∗}-component of the adjoint eigenmode.

PIC Figurex3.3: The v^{∗}-component of the adjoint eigenmode extends far upstream of the cylinder [prev] [prev-tail] [front] [up] [next]