62
A Newton-Krylov Solver for the Euler Equat ions on Unstructured Grids Edward Wehner A thesis subrnitted in conformity with the requirements for the degree of Master of Applied Science Graduate Department of Aerospace Science and Engineering University of Toronto @ Copyright by Edward Wehner 2001

A Newton-Krylov Solver for the Euler Equat ions on ......braster of AppM Science Graduate Department of Aerospace Science and Engineering University of Toronto 2001 A Newton-Krylov

  • Upload
    others

  • View
    4

  • Download
    0

Embed Size (px)

Citation preview

Page 1: A Newton-Krylov Solver for the Euler Equat ions on ......braster of AppM Science Graduate Department of Aerospace Science and Engineering University of Toronto 2001 A Newton-Krylov

A Newton-Krylov Solver for the Euler Equat ions on Unstructured Grids

Edward Wehner

A thesis subrnitted in conformity with the requirements for the degree of Master of Applied Science

Graduate Department of Aerospace Science and Engineering University of Toronto

@ Copyright by Edward Wehner 2001

Page 2: A Newton-Krylov Solver for the Euler Equat ions on ......braster of AppM Science Graduate Department of Aerospace Science and Engineering University of Toronto 2001 A Newton-Krylov

BiWiithéaue nationale du Canada

Aquisitions and AcquSions et Bibliogaphii Semices senrices bibliographiques

The author has granted a non- L'auteur a accordé me licence non exclusive licence aliowing the exclusive permettant à la National Library of Canada to Bibliothèque nationale du Canada de reproduce, loan, distn'bute or sell reproduire. prêter, distri'buer ou copies of this thesis in mkroform, veridre des copies de cette thèse sous paper or electronic formats. la forme de microfiche/f'ilm, de

reproduction sur papier ou sur format électronique.

The author retains ownership of the L'auteur conserve la propriété du copyright in this thesis. Neither the droit d'auteur qui protège cette thèse. thesis nor substantial extracts fiom it Ni la thèse ni des extraits substantiels may be printed or othemke de celle-ci ne doivent être imprimés reproduced without the author's ou autrement reproduits sans son permission. autorisation.

Page 3: A Newton-Krylov Solver for the Euler Equat ions on ......braster of AppM Science Graduate Department of Aerospace Science and Engineering University of Toronto 2001 A Newton-Krylov
Page 4: A Newton-Krylov Solver for the Euler Equat ions on ......braster of AppM Science Graduate Department of Aerospace Science and Engineering University of Toronto 2001 A Newton-Krylov

Abstrad

A Newton-Krylov Solver for the

Euler Equations on Unstructureci Grids

Edward Wehner

braster of A p p M Science

Graduate Department of Aerospace Science and Engineering

University of Toronto

2001

A Newton-Krylov solver for the Euler equations that govern the flow of a compressible invis-

cid flow, with application to Bows over aerodynamic conûgwations, is presented. The Euler

equations and a nonhear artifiicial dissipation scheme are discretid in space using a node

based filnite-volume formulation on arbitrary polygonal unstructured Pr;&. The resulting

systern of nonlinear algebraic equations is solved using an inexact Newton strategy in which

the Linear prablern wising at each Newton iteration is solved iterativdy using the matrix-

free GMRES algorit hm preconditiond by an apprmimate Jacobian matrix subjected to an

incompIete factorisation and reordering. implicit Euler IocaI tirne stepping is applied when

solving transonic flows.

The solver is tested with single and multi-element aidoils in the subsonic and

transonic fhw regimes. Various GMRES tolerances, preconditioner fiu-in leveis, and pre

condit ioned tderances are investigated. Sets of optimum base parame ters are determineci.

Results show the solver to be cornpetitive with other solvers. Recommendations are made

for aspects of the solver that are worthy of further study.

Page 5: A Newton-Krylov Solver for the Euler Equat ions on ......braster of AppM Science Graduate Department of Aerospace Science and Engineering University of Toronto 2001 A Newton-Krylov
Page 6: A Newton-Krylov Solver for the Euler Equat ions on ......braster of AppM Science Graduate Department of Aerospace Science and Engineering University of Toronto 2001 A Newton-Krylov

Acknowledgement s

1 wish to thank my supervisor, Prof. D. W. Zingg, for his knowfedge, guidance and support

during my research. Eiis approachabiity and respect for self-initiative were always conducive

to a cornfortable cesearch atmosphere.

1 am gratefd to my coiieagues Luis Mamano, Jason Lassatine, and Peter Blaser,

with whom it was always a pleasure to coiiaborate on the Newton-Krylov project of the

UTIAS CFD group, and Todd Chishoim and Marian Nemec, who provided helpfd insights

into the Newton-Krylov topic.

Words cannot express my gratitude to my mother for everything a motber does

for her son.

The Government of Ontario / Victoria Noakes Graduate Scholarship in Science

and Technology, and the Graduate Scholarship / Loan provided by the Consejo Nacional de

Ciencia y Tecnologia (CONACYT) of Mexico are &O appreciated.

Page 7: A Newton-Krylov Solver for the Euler Equat ions on ......braster of AppM Science Graduate Department of Aerospace Science and Engineering University of Toronto 2001 A Newton-Krylov
Page 8: A Newton-Krylov Solver for the Euler Equat ions on ......braster of AppM Science Graduate Department of Aerospace Science and Engineering University of Toronto 2001 A Newton-Krylov

Contents

List of Figures Uc

List of Tables xi

List of Symbols and Abbreviations xiii

1 Introduction 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.1 Motivation 1

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.2 Objective 3 1.3 Outiine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

2 Equation Formulation 5 2.1 The Euler Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2 Spatial Discretisation 6

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.3 Artsciai Dissipation 8

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.4 Bomdary Conditions 9 . . . . . . . . . . . . . . . . . . . . . . . . . 2.4.1 Body Surface Bowdary 10

. . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.4.2 Far-field Boundary 11

3 Algorithm Formulation 13 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.1 The Residuai b c t i o n 13

. . . . . . . . . . . . . . . . . . . . . . . . . . . 3.2 An Inexact Newton Method 14 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.3 Matrix-free GMRES 15 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.4 L U Preconditioning 16

. . . . . . . . . . . . . . . . . . . 3.4.1 The Approxirnate Jacobian Matrix 17 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.5 RCM Reordering 19 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.6 Startup Strategy 19

4 Results ai . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.1 Singldement Airfoil Cases 22

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.1.1 Subsonic FIow 23

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.1.2 Transonic Flow 27 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2 Multielement Airfoii Case 31

Page 9: A Newton-Krylov Solver for the Euler Equat ions on ......braster of AppM Science Graduate Department of Aerospace Science and Engineering University of Toronto 2001 A Newton-Krylov

5 Conclusions

Appendices

A Aigorithm Flow Diagram

B Examples of the Jacobians for

References

Page 10: A Newton-Krylov Solver for the Euler Equat ions on ......braster of AppM Science Graduate Department of Aerospace Science and Engineering University of Toronto 2001 A Newton-Krylov

List of Figures

A control volume . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A representative interior ceU . . . . . . . . . . . . . . . . . . . . . . . . . . . A representative boundary ceii . . . . . . . . . . . . . . . . . . . . . . . . .

Structure of the approximate Jacubian rnatrix (3.63 1.node grid) . . . . . . . Approximate Jacobian matrix with RCM reordering (3.63 1.node grid) . . . . 3,631 and 14.19 h o d e triangui ai. grids about NACA 0012 airfoii . . . . . . . Mach number contours and Cp plot (Mm = 0.63. a = 2.0'). . . . . . . . . . Convergence history using base parameters (Mm = 0.63. a = 2.0.). . . . . . Cornparison of a d u e s (Ma = 0.63. a = 2.0'). . . . . . . . . . . . . . . . . Cornparison of GMmS tolerances. G (Mm = 0.63. a = 2.0.). . . . . . . . . Cornparison of LLU @) Ni leveh (Mm = 0.63. a = 2.0'). . . . . . . . . . . . Cornparison of preconditioner fceezing tolerances. P (M, = 0.63, a = 2.0"). O t her single-eIement subsonic cases . . . . . . . . . . . . . . . . . . . . . . . Mach number contours and Cp plot (Mm = 0.8. a = 1.0'). . . . . . . . . . . Convergence history using base parameters (Mm = 0.8. a = 1.0.). . . . . . Cornparison of a values (Mm = 0.8. a = 1.0'). . . . . . . . . . . . . . . . . Compacison of GMRES tolerances. G (Mm = 0.8. a = 1.0.). . . . . . . . . Cornparison of [LU@) f i l levels (M, = 0.8. a = 1.0.). . . . . . . . . . . . . Cornparison of preconditioner &ezing tolerances. P (Mm = 0.8, a = 1.0.). O t her singleelement transonic cases . . . . . . . . . . . . . . . . . . . . . . . 17.89 4node triangular grid about multi-element airfoii . . . . . . . . . . . . . .

4.17 Mach number contours and Cp plot (Mm = 0.2, a = 5.0"). . . . . . . . . . . 4.18 Convergence Mary using base parameters (M, = 0.2. a = 5.0.). . . . . . 4.19 Cornparison of a values (M, = 0.2. a = 5.0.). . . . . . . . . . . . . . . . . 4.20 Cornparison of GMRES tolerances. G [M, = 0.2, a = 5.0"). . . . . . . . . 4.21 Cornparison of IL&) fiil IeveIs (M, = 0.2. a = 5.0"). . . . . . . . . . . . . 4.22 Cornparison of prmnditioner k s i n g tolerances. P (M, = 0.2, a = 5.0").

Page 11: A Newton-Krylov Solver for the Euler Equat ions on ......braster of AppM Science Graduate Department of Aerospace Science and Engineering University of Toronto 2001 A Newton-Krylov
Page 12: A Newton-Krylov Solver for the Euler Equat ions on ......braster of AppM Science Graduate Department of Aerospace Science and Engineering University of Toronto 2001 A Newton-Krylov

List of Tables

. . . . . . . . . . . . . . . . 2.1 Far-field d o w and outflow boundary conditions 12

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.1 Suite of test cases 21 . . . . . . . . . . . . . . . . . 4.2 Base parameters for single-element airfoi1 cases 23

4.3 Drag, lift and moment coefficients (hla = 0.63, cr = 2.0"). . . . . . . . . . . 23 4.4 Drag. liA and moment coeficients (Mm = 0.8. a = 1.0"). . . . . . . . . . . . 28

. . . . . . . . . . . . . 4.5 Base parameters for muiti-element high-lift airfoi1 case 31 4.6 Drag, Lift and moment coefficients (Mm = 0.2. a = 5.0"). . . . . . . . . . . . 33

Page 13: A Newton-Krylov Solver for the Euler Equat ions on ......braster of AppM Science Graduate Department of Aerospace Science and Engineering University of Toronto 2001 A Newton-Krylov
Page 14: A Newton-Krylov Solver for the Euler Equat ions on ......braster of AppM Science Graduate Department of Aerospace Science and Engineering University of Toronto 2001 A Newton-Krylov

List of Symbols and Abbreviations

Generic matrix in hear system of equations Drag coefficient Lift coefficient Moment coefficient Pressure coeEcient Flux tensor GMRES tolerance Totai enthaipy Krylov subspace of dimension m Mach number Preconditioner tolerance Vector of conservecl variables Global solution vector Residual h c t i o n Density residuai Riemann invariants Interior scheme portion of residud h c t i o n Boundary scheme portion of residuaI hinction Flow velocity Normal and tangentid flow velocity components

Speed of sound Generic I&-hand side vector in hear system of equations Total energy per unit mass Tme step Unit vecton in the x and y directions GMRES iteration number Newton iteration number Local normal vector Normal vector components m the x and y directions Summation iimit for cell edges Summation b i t for boundary celi faces

Page 15: A Newton-Krylov Solver for the Euler Equat ions on ......braster of AppM Science Graduate Department of Aerospace Science and Engineering University of Toronto 2001 A Newton-Krylov

Pressure Level of E U W-in Residuai at the mth GMRES iteration Position vector Local tangent vector Tangent vector components in the x and y directions VelociS component in the x and y directions Generic solution vector in linear system of equatioas

Angle of at ta& Perturbation constant for matrix-h.ee GMRES Second and fourth-dXerence art Scia1 dissipation switches SpecXc heat ratio of gas Second and fourth-difference artScid dissipation controt constants Art Sciai dissipation scaling factor Vector of matrix-kee GMRES vector product Surface area Surface contour Density Fourth-dXérence artificial dissipation control constant

1 Identity matrix JE, 3.4 Exact and appraximate Jacobian matrices

b Subscript to indicate a boundary value e Symbol and s u E . p t to indicate an extrapolated d u e it k Subscripts for arbitrary celIs m Subscript to indicate a boundary uode 00 Symbd and subscript to indicate freestream condition - Superscript t O indicate non-dimensionalised variable O Subscript to indicate stagnation condition

CFD CFL CPU GMRES ILU PETSc RCM RHS

Computatiod FIuid Dynamics Couraut-fiecirich-Lewy (number) Central Processing Unit Generalized Minimum Residual (algorith) Incomplete Lower-Upptx (factorisation) Portable, ExtensibIe Toolkit for ScientSc Computation Reverse Cuthill-McKee (morde-) Right-Band Side

Page 16: A Newton-Krylov Solver for the Euler Equat ions on ......braster of AppM Science Graduate Department of Aerospace Science and Engineering University of Toronto 2001 A Newton-Krylov

Chapter 1

Introduction

1. i Motivation

A principal interest in the field of Computationai Fluid Dynamics (CFD) is the

developrnent of efficient solution methods for the Navier-Stokes equations, which mode1 the

behaviour of fluid Bows. This interest is strongly motivated by the application of such

methods in the aerodynamic design cycle.

Newton-Krylov solvers are a family of implicit solvers that apply quasi-Newton

methods to solve the Navier-Stokes equations. As with other solvers, they are usuaIly f i t

deveioped for the Euler equations, since, without friction and thermal conductivity terms,

the Euler equations are simpler than the Navier-Stokes equations but retain the non-iinear

behaviour and much of the physical signiscance of the superset equations. Some Newton-

Krylov solven use structureci grids to ttansform phpicd space into computational -, whiie othen use unstructured grids. Structured grids are simpler, but unstructured grids

conform better to complex geometries and are easier to adapt and refine as needed for

increased accufacy.

Application of an exact Newton method to solve large systems of partid Mer-

entiai equations is impracticai due to the memory and CPU resources required- in their

work of 1982, Dembo, Eisenstat, and Steihaug [l] showed that, if properly implemented,

inexact-Newton methods can save on these resources considerably by not perfoming each

Newton iteration exactly, while sti.1 offering quadratic convergence. Since then, a variety of

independent efforts have used inexact Newton methods in CFD. Vanka [21 deveioped New-

ton solvers for the Navier-Stokes equatiom. Venkatakrishnan [3], Orkwis [4j, and Whitfieid

Page 17: A Newton-Krylov Solver for the Euler Equat ions on ......braster of AppM Science Graduate Department of Aerospace Science and Engineering University of Toronto 2001 A Newton-Krylov

2 Chapter 1. Introduction

and Taylor [SI applied Newton-like methods to solve transonic flows. These efforts used

direct methods or stationary iterative methods to solve the linear probIem that arises at

each Newton iteration, and expiicitly formed the Jacobian matrix,

The replacement of direct methods with Krylov iterative methods, and of explicit

Jacobian matrix formation with rnatrix-fiee formulations, origiaates in works by Gear and

Saad [6], Chan and Jackson [?], B r m and Hindmarsh [8], and Brown and Saad [9]. It may

have been in this last work that the term "Newton-Krylov" appeared for the first t h e . The

first use in CFD of the Generalized Minimum Residual (GMRES) [IO] Krylov method can be

traced to Wigton, Yu, and Young [ll], and Johan, Hughes, and Shakib (12, 131. Venkatakr-

ishnan and Mavriplis (141 showed Newton-Krylov methods with Lncomplete Upper-Lower

(ILU) factorisation preconditioning to be cornpetitive with rnultigrid methods. Keyes [15]

showed the same with a matrix-free formulation. Tidriri (161 studied preconditioning tech-

niques for matrïx-free Newton-Krylov methods. Other works that have investigated partic-

ular aspects of rnatr ix-h inexact Newton-Krylov solvers include [L?, 18, 19. 20,21,22,23].

The immediate predecessors of the present thesis, within the University of Toronto

[nstitute for Aerospace Studies (UTLAS) CFD group, are two inexact Newton-Kqylov solvers

written by Blanco (24, 251, and by Pueyo [26, 271. The work of Blanco aolves the Euler

equations and is based on unstructured triangular grids using a node-based, centred finite

volume discretisation, wMe the work of Pueyo solves both the Euler and Navier-Stokes

equations and is based on Stni~tUred "Cn grids using second-order centred-dinerence oper-

aton. These works appIy second and fourth-ciifference scalar artificial dissipation, and use

the GMRES algorithm, preconditioned by the Jacobian matrix subjected to an ILU factori-

sation and Reverse Cuthiii-McKee (RCM) reordering, to solve the iinear system that arises

at each Newton iteration. Blanco has tested both matrix-present and matrix-free GMRES,

wiiile Pueyo has concentrateci on a mtarted version of the latter. In th& use of rnatrix-

free GMRES, both reseacchers have used an approximation to the Jacobian mat& for the

preconditioner- In order to overcome the instabilities that can develop during the iimt iter-

ations of transanic cases, as a start-up strategy BIanco has applied matrix-present GMRES

with a îust-order Jacobian, while Pueyo has used the approximately factored algorithm of

ARC2D in diagonal form with two IeveIs of mesh sequmcing.

Page 18: A Newton-Krylov Solver for the Euler Equat ions on ......braster of AppM Science Graduate Department of Aerospace Science and Engineering University of Toronto 2001 A Newton-Krylov

Section 1.2. Objective

1.2 Objective

The objective of this thesis projet is to develop an efiicient twdimensionai

Newton-Krylov solver for the Euler equations, with application to subsonic and transonic

Bows over aerodynamic configurations. The solver uses a node-based fite-volume formu-

iation on arbitrary polygonal unstructureci grids. The solver applies second and fourth-

ciifference scalar artificiai dissipation, and resolves the h e a r system that arises at each

Newton iteration using matrix-Etee GMRES with an LU-factorised, RCM-reordered a p

proximate Jacobian preconditioner. An implicit Euler local time step strategy is used for

the start-up of transonic cases. Tests with single and multi-element airfoih are run to

ver@ the proper functioning of the solver and determine the parameters that optimise its

performance.

1.3 Outline

This document is divided into five chapten. Foliowing on the introduction of the

first chapter, the second chapter describes the Euler equations and their spatial discretisa-

tion, including artiûcial dissipation and boundary conditions. The third chapter sets forth

the methodology appiied to solve the Euier equations as cast in the second chapter. The

fourth chapter is an exposition of test results. Based on these results, the 6fth and final

chapter presents conclusions and suggestions for future work related to the present solver.

Page 19: A Newton-Krylov Solver for the Euler Equat ions on ......braster of AppM Science Graduate Department of Aerospace Science and Engineering University of Toronto 2001 A Newton-Krylov

Chapter 1. Introduction

Page 20: A Newton-Krylov Solver for the Euler Equat ions on ......braster of AppM Science Graduate Department of Aerospace Science and Engineering University of Toronto 2001 A Newton-Krylov

Chapter 2

Equat ion Formulation

This chapter presents the Euler equations and their spatial discretisation, inchding

artificial dissipation and boundary conditions.

2.1 The Euler Equations

The integrai conservative form of the Euler equations for an unsteady, two-dimensional,

compressibIe inviscid flow aci.oss a surface 0, can be expresseci as:

where Q is the vector of conserveci variables and F(Q) is the inviscid flux tensor:

e

The dimensiouai variables, density (b), docity (6, 6) and total energy (é), are

non-dimensionalised using b s t r e a m (00) dues:

Page 21: A Newton-Krylov Solver for the Euler Equat ions on ......braster of AppM Science Graduate Department of Aerospace Science and Engineering University of Toronto 2001 A Newton-Krylov

Chapter 2. Equation Formulation

Figure 2.1: A control volume

where a is the speed of souad, which for ideal fluids is a = m. Pressure is rehted to

the conserved variables by the equation of state for a perfect gas:

which provides clmure for Eq. 2.1, by relating the thermodynamic variables of the system.

2.2 Spatial Discretisat ion

The computational domain is discretised using a hitevolume formuiation in which

the control volumes are arbitrary polygonal ceh. These celis compose a dual grid, formeci

by comecting the centroids of of a trïangdar primary grid, as shown in Fig. 2-1.

A representative ceii i fiom the interior of the domain, whose ne edges border on

ceils such as representative neighbour ceii k, is shom in Fig. 2.2. The c d has an area

and outward normais = [Ayik -Azik]. The four conserved variables of the solution

vector Qi are stored at the c d node.

Page 22: A Newton-Krylov Solver for the Euler Equat ions on ......braster of AppM Science Graduate Department of Aerospace Science and Engineering University of Toronto 2001 A Newton-Krylov

Section 2.2. Spatial Dimetisa tion

Figure 2.2: A representative interior c d

h m Gauss' theorern in two dimensions, which transforms surface integrals into

line integrals, Eq. 2.1 can be rewritten as:

where aR is the contour enclosing surface R, and n is a vector outwardly normai to the

surface. For ceiI à, this equation is applied as:

on the assumption that the d u e s of the conserveci variables of Qi are constant throughout

the c d and equal to t heir d u e s at the ceil node. The flux tensor Fik is taken as the average

of the flux tensors of ceils i and k, thus Eq. 2.7 can be written as:

d 1 % RZQi = -îC (Fi + FI) - nik

k=L

For interior ceiis, C Fi -% = O, since it is a sum over a closed contour.

Page 23: A Newton-Krylov Solver for the Euler Equat ions on ......braster of AppM Science Graduate Department of Aerospace Science and Engineering University of Toronto 2001 A Newton-Krylov

Chapber 2 Eipation Formulation

2.3 Artificial Dissipation

A scaiar artificial dissipation term is added to the right-hand side of Eq. 2.8, to

provide numerid stability. The term consists of a scalar dissipation c&cient, a second-

Merence Laplacian operator, which is applied near shocks, and a weaker fourth-dinerence

biharmonic operator, which is used everywhere else in the computationai domain.

The second-difference Laplacian operator is:

where

The coefficient &' uses the pressure gradient acroni ce& i and k to detect shocks and thus

trigger the second-difference dissipation. d2) is a user-dhed constant that controls the

strength of the dissipation. For each cell edge contribution, the average of d2) for neighbour

c e h i and k is used.

The fourth-dEerence biharmonic operator is:

The coefficieut EP is a switch that tunui on the fourth-difference dissipation whenew the

second-ciifference dissipation is turned off. d') is a user-dehd constant that controls the

strength of the dissipation.

So that the artificial dissipation is properiy s d e d with respect to solution values,

it is muitiplied by a scaling factor obtained h m the largest eigenvaiue of the flux Jambian:

Page 24: A Newton-Krylov Solver for the Euler Equat ions on ......braster of AppM Science Graduate Department of Aerospace Science and Engineering University of Toronto 2001 A Newton-Krylov

Section 2.4. Boundary Conditions

Figure 2.3: A representative boundary ceii

where u. v and a are calculateci h e d on the average of the solution vectors of ceh i and

Qik = Qi + Qk

2 C o m b ' i the scaling factor and the second and fourth-difference operaton, the complete

scalar artificid dissipation vector is:

This vector applies only to c d edges; no artificid dissipation is applied at the boundary

ceU faces described in Section 2.4.

2.4 Boundary Conditions

The cornputationai domain presents twu types of boundaries: the body surface

boundary of the solid aerodynamic con6guration placed in the domain, and the far-field

boundary at the outer M t of the domain itseif- in order to properly mode1 the 0ow in the

domain, certain conditions must be imposed at the bouudaries-

A representative boundary ceii is shom in Fig. 2.3. In addition to the centre

node, there is a node at the mid-point m of each of nf boundary faces. A vector Qb,

containing four boundaq vaiues, is stored at each fhe node. Some of the bomdary d u e s

are caicuiated bom freestream vaiues, whiIe others are extrapolateci to zeroth or ûmt order

Page 25: A Newton-Krylov Solver for the Euler Equat ions on ......braster of AppM Science Graduate Department of Aerospace Science and Engineering University of Toronto 2001 A Newton-Krylov

10 Chap ter 2. Equation Fornufation

h m the conserveci variables stored at the centre node. The extrapolations are based on

the Taylor expansion: Zemth Order

and

A r = r z i + r y j

The Eux contribution hom the boundary faces is:

where now F (Qb (Qc (Qi))), inatead of simply F(Q) as at aii other nodes in the compu-

tationai domain.

2.4.1 Body Sudace Boundary

Given that an aerodynamic configuration such as an airfoi1 presents a rigid surface

to the Bow, at body surface boundaries the nornial component of the flow velocity is zero.

That is:

V, = V - n = ( u i + v j ) - ( n , i + % j ) = u % + v % = O (2.21)

where n is the local unit vector normal to the bady surface. The tangentid component of

the flow velocity, given by

where t is the local unit vector tangent to the body surface, is extrôpoiated to fmt order.

Pressure p is also extrapoiated to k t order, and stagnation enthalpy [E = (e fp) fp] is set

to £tee-strearn dues .

In view of these considerations, for body sdàce bonndaries, density and energy

are expresseci as:

Page 26: A Newton-Krylov Solver for the Euler Equat ions on ......braster of AppM Science Graduate Department of Aerospace Science and Engineering University of Toronto 2001 A Newton-Krylov

Section 2.4. Boundary Conditions

The velocities u, u, Vn, and & are related by:

Thus, considering Eq. 2.21, and substituthg Eqs. 2.22, 2.23, and 2.24 in Eq. 2.2, at body

surface boundaries there is:

The flow over the aerodynamic configuration placed in the computational domain

generates disturbances in the b s t r e a m conditions. These disturbanm convect and diffk

throughout the domain, and when they reach the far-field boundary, instead of exiting,

t hey can be reflected back into the domain, producing large oscillations that hinder solver

convergence. To ensure that the disturbances exit the domain, non-reflecting boundary

conditions, which use the four Riemann invariants, are applied. Flow through the far-

field boundary is taken to be l o d y normal to the boundary, so onôdimensional Riemann

invariants are used. They are:

in terms of these Riemann invariants, there is:

Page 27: A Newton-Krylov Solver for the Euler Equat ions on ......braster of AppM Science Graduate Department of Aerospace Science and Engineering University of Toronto 2001 A Newton-Krylov

such that density and energy are:

where u and v are obtained considering Eqs. 2.21, 2.22, 2.25, 2.30, and 2.31.

The Riemann boundary conditions are calculateci fiom fiee-stream d u e s or ex-

trapolated to zeroth order, depending on the Ereestrearn Mach number M, and whether

the boundary is of infiow or outflow. Table 2.1 summarises how the Eu-field boundary

conditions are calculateci. As an example, substituthg Eqs. 2.27 to 2.34 in Eq. 2.2, and

applying the d e s of Table 2.1 for a far-field inflow boundary with M, < 1, there is:

where

Table 2.1: Far-field inflow and outfiow boundary conditions.

INFLOW OUTPLOW

Mm < l m

RI R2 Ri3 % e o o o o o o

> l o o o o m o o e

RI R2 R3 % e e e e e e

Page 28: A Newton-Krylov Solver for the Euler Equat ions on ......braster of AppM Science Graduate Department of Aerospace Science and Engineering University of Toronto 2001 A Newton-Krylov

Chapter 3

Algorit hm Formulation

This chapter explicitly states the equation resolved by the present solver and de-

scribes the methodoiogy used to obtain the solution. The methodology involves an inexact

Newton met hod, the matrix-Eree Generalized Minimum Residual (GMRES) algorithm, In-

complete Lower-Upper (EU) preconditioning, Reverse Cuthiil-McKee (RCM) reordering,

and Locai Time Stepping. The solution aigorithm is written in the C++ cornputer tan-

guage and uses routines kom the Portable, Extensible Toolkit for Scientific Computation

(PETSc) [28]. A fiow diagram of the algorithm is provideci in Appendix A.

3.1 The Residual Function

The discretised Bux integrah, artificial dissipation term and boundary condition

equations cast in the previous cbapter can be combined into a single Eunction for the entire

computationai domain. The function, referred to as the residual function, is a vector of

cells four-entry vectors and l ads to the non-hear system of equations:

It is this equation that is resolved by the present solver, hding the solution vector Q that

satisûes the system.

The ith equation of the system of Eq. 3.1 is obtained from Eq. 2.8, whose t h e

derivative is identically zero at steady state, and expressions 2.16 and 2.20. It can be

expressed as:

&(QI = %(Q) + T~(Q> = 0 ( 3 4

Page 29: A Newton-Krylov Solver for the Euler Equat ions on ......braster of AppM Science Graduate Department of Aerospace Science and Engineering University of Toronto 2001 A Newton-Krylov

where

3.2 An Inexact Newton Method

The present solver appiies an inexact Newton method to solve Eq. 3.1.

Newton's method is based on Newton's Linearisation to first order which, applied

to Eq. 3.1, is:

~ [ Q l n + i ) ) R ( Q ( ~ ) ) + j f ) @ ( n ) = O (3.5)

where A Q ( ~ ) E Q("+') - ~ ( ~ 1 , and fi, the exact Jacobian matrix of R, is:

Hence, to first-order accuracy, the non-linear system of Eq. 3.1 can be repiaced by the linear

system of equations:

R(Q(~) ) + $)AQ(~) = O (3.7)

which it is customary to mite as:

with the right-hand term being referred to as Ythe right-hand side" or RnS.

The solution vector Q that satisfies Eq. 3.1 is found by an iterative process, started

by proposing an initial guess vector, @O), based on, for exampIe, freestream dues . At

each iteration, refmed to as a Wewton iteration*, the solution vector is updated using the

definition of A Q ( ~ ) as: Q(~+L) = ~ ( n ) + A Q ( ~ ) (3.9)

where the updating vector AQ(R) is found by solving Eq. 3.8 using the method aesmibed

in Section 3.3. At the nth Newton iteration, there is:

Page 30: A Newton-Krylov Solver for the Euler Equat ions on ......braster of AppM Science Graduate Department of Aerospace Science and Engineering University of Toronto 2001 A Newton-Krylov

Section 3.3. Ma trix-tiee GMRES 15

which represents an inexact Newton method where the solution vector Q(") does not zero

the residual function of Eq. 3.8, but rather reduces it by a factor of @. In the limit, when

rl(n) = O, Eq. 3.10 reverts to Eq. 3.8 of Newton's method.

To determine the level of convergence of the residual function at the nth Newton

iteration, the present soIver caldates a residual R(") given by the Li-utim of the k t

equation of the residual Function, correspondhg to conservation of mass, normalised by the

same Lz-nom taken at the b t Newton iteration:

This residud is refmed to as the "density residual". The present solver stops the Newton

iterations when the density residud is equal to or d e r than 10-LO.

3.3 Matrix-fFee GMRES

The linear system of Eq. 3.8 is solved for AQ at each Newton iteration using the

GMRES aigorithm, an iterative solver belonging to the family of Krylov solvers.

For any linear system of equations of the form:

the GMFES aigorithm h d s the iterate x, E {XO f Km) that minimises the L1 n o m of

the residuai r, = b - &, where xo is an initial guess, Km is a Krylov subspace of the

form:

Km = s p z n { v , ~ v t , A'VI, .. . , A ~ - ' U ~ ) (3.13)

and

When solving Eq. 3.8, at the rnth GMRES iteration of the nth Newton iteration

the GMRES residual k rm = -R(Q(~)) - ~ ( " 1 A -

E ( Q)m (3.15)

If rm # 0, then (AQ), is still not the exact solution of Eq. 3.8. However' Pueyo [26,27]

has shown that soiving Eq. 3.8 accurateiy does not necessarily equaiiy reduce the residd

function of the non-Iinear system of Eq. 3.1. Therefore, to gave CPU time, the present

Page 31: A Newton-Krylov Solver for the Euler Equat ions on ......braster of AppM Science Graduate Department of Aerospace Science and Engineering University of Toronto 2001 A Newton-Krylov

16 Cbapter 3. Aigorithm Formulation

solver stops the GMRES iterations when the GMRES residuai has decreased by G orders

of magnitude dehed by the user. In addition, since the storage requirements of GMRES

increase ünearly and the CPU expense inmeases quadraticdy with the number of vectors

in the KryIov subspace, the preseni solver terminates GMRES at m = 40, and restarts it

irsing the Iatest value of AQ to caiculate the new initiai residuai ro. This restarted form of

the GMRES aigorithm is denoted GMRES(40).

The matrix-vector products required by the GMRES algorithm to form the Krylov

subspace of Eq. 3.13 can be approximated using finitedifferences:

where E is obtained from:

E Ilvll2 - 6 with the present solver setting E, to machine zero. This matrix-free GMRES strategy

eliminates the need to explicitly form the exact Jacobian m a t h JE, thus producing a

savings in matrix storage.

3.4 ILU Preconditioning

In solving systerns of the form of Eq. 3.12, the GMRES algorithm can converge

sIowly or no& at aU if the system is iii-conditioned. The exact Jacobian matrix JE is off-

diagonaüy dominant, causing the system of Eq. 3.8 to bc iii-conditioned and thus susceptible

to this shortcoming. To alleviate this difiicuity, the p r e n t solver right prmnditions the

system of Eq. 3.8.

Applied to a system of the form of Eq. 3.12, right-preconditioning c m be e x p d

as:

(AM-L, (MX) = b

where M is a matrix that makes this system better conditioned than the original one. The

m a t e M used by this solver is obtained from an incomplete lower-upper factorisation of

an approotimate Jacobian matrix TA, describeci in the foiiowing Snbeection 3.4.1. With

right-preconditioning, Eq. 3.8 becomes:

Page 32: A Newton-Krylov Solver for the Euler Equat ions on ......braster of AppM Science Graduate Department of Aerospace Science and Engineering University of Toronto 2001 A Newton-Krylov

Section 3.4. iL U Preconditioning 17

The factorisation of the approxhate Jacobian matrix JA is denoted ILU(p), where

the parameter p refen to the level of fill-in aiiowed in the factorisation. A 6li-in l e d of

p = O indicates that no 6ii-in beyond the original matrix pattern of nonzeros is aiiowed in

the L and U factor matrices. As p grows, more nonzero elements are added to the L and U

factors. thus making the factorisation more complete. A more complete factorisation should

reduce the number of GMRES iterations needed to converge the GMRES residual, but this

happens at the expense of inmeased storage and time per iteration.

It has been shown by Pueyo [26,27] that the number of GMRES iterations at each

Newton iteration does not increase if the preconditioner matrix JA is not recalcuiated at

each Newton iteration. Thus, the present solver freezes the preconditioner when the density

residual of Eq. 3.11 has decreased to a user-defined tolerance, P.

3.4.1 The Approximate Jacobian Matrix

The approximate Jacobian matrix JA on which the premnditioning of Eq. 3.8 is

baaed is a non-syrnrnetric sparse block matrix with block dimensions celis x cells. As the

positionof the off-diagonal blocks depends on the ordering of the ceii nodes, the unstructureci

nature of the grid of the present solver produces a matrix with a large bandwidth. An

example of the mat& structute is shown in Fig. 3.1.

Figure 3.1: Structure of the approximate Jacobian matrix (3,631-node grid).

Page 33: A Newton-Krylov Solver for the Euler Equat ions on ......braster of AppM Science Graduate Department of Aerospace Science and Engineering University of Toronto 2001 A Newton-Krylov

18 Chapter 3. Algorithm Formulation

Each nonzero entry of J.4 is a 4 x 4 Jacobian m a t h corresponding to a partial

derivative of Eq. 3.2 with respect to Qi (diagonal blocks) or Qk (off-diagonal blocks).

including three approximations, the diagonal terrns are of the form:

(3.20)

and off-diagonal terms are of the form:

where, since C Fi - nik = O for interior celis, the fkit sum of Eq. 3.20 is nonzero only for

boundary celis. Examples of the Jacobians contained in Eqs. 3.20 and 3.21 are provided in

Appendix B.

The three approximations incorporated in Eqs. 3.20 and 3.21 are:

1. The scalar dissipation coefficient Xik is treated as if it were independent of Q.

2. The fourth-difierence biharmonic operator (2.11) is neglected and the coefficient E!:)

of the second-Merence Laplacian operator (2.9) is replaced by a linear combination

of the second and fourth-difierence dissipation coefficients of the RHS, that is:

where a is a user-defined control constant. Since the fourth-Merence operator in-

volves neighbour-of-neighbour nodes, its exclusion reduces the off-diagonal dominance

of the apprcallmate Jacobian matrix and decreases the number of blocks per row, thus

economising matrix storage,

3. Given that Fm (Q6 (Qe (Qi))), applying the chah d e to Eq. 3.4 gives:

However, for the approxhate Jacobian matrix, it is taken that Q, = Qi, correspond-

ing to a zeroth-order extrapolation, a s shown in Eq. 2.17, and thus:

where Z is the identity matrix. This reduction of the boundary condition treatrnent

from fÙst order to zeroth order economises matrix storage.

Page 34: A Newton-Krylov Solver for the Euler Equat ions on ......braster of AppM Science Graduate Department of Aerospace Science and Engineering University of Toronto 2001 A Newton-Krylov

Section 3.5. RCM Reordering

Figure 3.2: Approximate Jacobian matrix with RCM reordering (3,631-node grid).

3.5 RCM Reordering

The large bandwidth of the approximate Jacobian matrix JA can affect the quality

of the preconditioning matrix. This is because o&diagonal matrix elements produce many

nonzero elements in the L and U factor matrices of a compIete LU imtorisation, and such

elements may be Iost in the incomplete LU factorisation used to iorm the preconditioning

mat& The present solver addresses this difhiculty by reordering the approximate Jacobian

mat* using the Reverse Cuthill-McKee (RCM) bandwidth reduction strategy. Fig. 3.2

shows the stmcture of the matrix of Fig. 3.1 aiter RCM reordering.

3.6 Startup Strategy

The initial Newton iterations are susceptible to converge slowly or even to diverge

if the initial guess vector @O) is far fiom the final solution vector. This is particularly the

case for flows with shocks.

The present solver appiies an implicit Euler start up strategy to attenuate this

difiiculty when solving transonic flows, in which keestream Mach nmnbers are in the range

0.7 < 1M, < 1.2. A time step h is added to the diagonai elements of the appmDcimate

Jacobian matrix, thus increasing the diagonal dominance of the mat*

Page 35: A Newton-Krylov Solver for the Euler Equat ions on ......braster of AppM Science Graduate Department of Aerospace Science and Engineering University of Toronto 2001 A Newton-Krylov

Chapter 3. Algonthm Formulation

With the time step, Eq. 3.8 becomes:

The time step is calculated IocalIy at each ceii hm:

where the Coutant-F'riedrich-Lewy (CE) number is a user-defined value. It is incorporated

into both the exact Jacobian JE and the a p p r h t e preconditioner Jacobian $A, but is

not included for boundary ceii faces. The Z/h tenn of Eq. 3.25 is multiplieci by the density

residuai R(") of Eq. 3.1 1, which acts as a scaling coefficient. As the La-nom of the density

residuai tends to zero, so does the scaluig coefficient, and the term Z/h tends to zero. in

the limit, as I/R(")II, approaches zero, Eq. 3.25 approaches Eq. 3.8.

Page 36: A Newton-Krylov Solver for the Euler Equat ions on ......braster of AppM Science Graduate Department of Aerospace Science and Engineering University of Toronto 2001 A Newton-Krylov

Chapter 4

Results

This chapter presents the resuits of tests to veri& and optimise the performance

of the Newton-Krylov solver.

The tests were conducted on a suite of eight cases, hvolving three subsonic and

four transonic flows around the singl~lement NACA 0012 airfoil, and one subsonic Bow

about a multi-element high-lift airfoil.

Airfoil

Mult i-&ment

Flow regime

Subeonic

Transonic

Table 4.1: Suite of test cases.

The three cases shown in 'm2d type in Table 4.1, one for each flow regime, were

taken as primary validation cases. They were tested using a set of base parameters deter-

Page 37: A Newton-Krylov Solver for the Euler Equat ions on ......braster of AppM Science Graduate Department of Aerospace Science and Engineering University of Toronto 2001 A Newton-Krylov

niined to be optimum for each one. The five rPmRining cases of the suite were tested in

less detail with the set of base parameten used for the primary validation case of their flow

regime.

The sets of base parameten include the fourth-Merence dissipation control con-

stant, u (Subsection 3.4.1); the artificial dissipation control constants 6 2 and ~4 (Section

2.3); the tokrance G applied to the GMRES residual, r, (Section 3.3); the level of ILU

BU-in, p (Section 3.4); and the tolerance P appiied to the density residud R (Section 3.2)

for keezing the preconditioner matrix (Section 3.4). For the transonic cases, a local tirne

step, h (Section 3.6) was applied using a CFL value determined to be optimum.

Results for the primary validation cases include Mach number contours, pressure

coefficient (C,,) plots, and force and moment coefficients, to verify the performance of the

solver. These resdts are complemented wit h convergence histories for tests that compare

the performance of the solver when one of the base parameter values is varied. Resuits for

the rernaining cases of the suite only show the convergence history for a test nin with the

corresponding base parameten.

Convergence histories are reported in terms of the CPU t h e required for the

density residual R to converge to 10-'O. For these results to be independent of the cornputer

or compiler used, the CPU tirne is normaliseci by the cost of one evaluation of the RHS. This

cost includes aU flux Jacobian evaluations, the pressure field update, and the calculation of

artificiai dissipation. The convergence histories are complemented with graphs showhg the

number of GMRES iterations per Newton iteration.

All tests were run on a Compaq Alpha ES40 server with 667 MHz Alpha 21264A

processon.

4.1 Single-element Airfoil Cases

The singIe-eIement airfoil cases were run on the 3,631 and 14,193-node trianguIar

grids shown in Fig. 4.1, with the optimum base parameters indicated in Table 4.2. UnIess

specificaüy noted, aü of the single-element airfoii test results reported are for the 14,193-

node grid.

Page 38: A Newton-Krylov Solver for the Euler Equat ions on ......braster of AppM Science Graduate Department of Aerospace Science and Engineering University of Toronto 2001 A Newton-Krylov

Section 4.1. Siogleelemen t Airfoil Cases

Figure 4.1: 3,631 and 14,193-node triangular grids about NACA 0012 airioil.

Table 4.2: Base parameters for singlôelement airfoi1 cases.

Flow Regime

Subsonic Tkansonic

4.1.1 Subsonic Flow

The primary validation case for subsonic Bow over a single-eiement airfoii

with M, = 0.63 and a = 2.0".

1%

0.63 0.8

is a case

The Mach number contours and Cp plot for this case are shown in Fig. 4.2. As

expected for an inviscid flow without shocks, the figures show a smooth flow field. The force

and moment coefficients of Table 4.3 agree weli with published resuits. in particulart the

drag mefEicient (CD), which should be zero, is sufficiently small to be attributed to numerical

error. Such error may be due to the use of zeroth instead of firstsrder extrapolation at the

airfoil boundaries.

a ("1

2.0 1.0

Table 4.3: Drag, lift and moment coetücients (M, = 0.63, a = 2.0").

o

5 4

K*

0.0 20.0

~4

0.3 0.3

CFL

- 100

G

IO-' IO-'

p

5 7

P

10-' IO-*

Page 39: A Newton-Krylov Solver for the Euler Equat ions on ......braster of AppM Science Graduate Department of Aerospace Science and Engineering University of Toronto 2001 A Newton-Krylov

Figure 4.2: Mach number contours and C,, plot (Mm = 0.63, a = 2.0').

Fig. 4.3 shows the RHS evaluations for this primary validation case run with the

optimum base parameters. Each symbol represents a Newton iteration. On the 3,631-node

grid, this case ran in approximately 20 s, with 0.12 s of CPU t h e spent per RHS evaluation,

and an average of 9.6 GMRES iterations per Newton iteration. On the 14,193-node grid,

the case ran in approximately 2 m 448 s, with 0.53 s of CPU tirne ven t per RHS evaluation,

and an average of 15.1 GMRES iterations per Newton iteration.

The choice of optimum values for the base parameters of this primary validation

RHÇ Evah&na Nirtmlmmm

Figure 4.3: Convergence history using base parameters (Mm = 0.63, a = 2.0").

Page 40: A Newton-Krylov Solver for the Euler Equat ions on ......braster of AppM Science Graduate Department of Aerospace Science and Engineering University of Toronto 2001 A Newton-Krylov

Section 4.1. Single-element Airfoi1 Cases

o=l - 0 9 - a s - &- : = . -7 -

-9

-10 -

Figure 4.4: Comparison of o values (Mm = 0.63, a = 2.0').

case is corroborated by the results of Figs. 4.4 to 4.7.

Fig. 4.4 cornpaxes solver performance when the fourth-difference dissipation contro!

constant is varied. Optimum resuits are obtained when o = 5. For a = 1, the number of

RHS evaluations more than doubles, and for each of the other values of a, except a = 7,

the difference in the number of RHS evduations is practicaiiy indistinguishable. The first

four values of o required 6 4 to be raised in the set of base parameters from 0.3 to 0.4 for

u = 2,3,4, and to 0.6 for a = 1.

Fig. 4.5 compares solver performance when the orders of magnitude that the GM-

RES residual is reduced at each Newton iteration are varied. The results c o h that it is

counterproductive to reduce the GMRES residuai by more than 1 order of magnitude. The

cases in which the GMRES residual was reduced by 2 and 3 orders of magnitude required

a local tirne step with CFL = 100, sol aithough not required, for consistency the 1-order

case was also nui with this time step. Thecefore, a true performance cornparison is one

made between the more than 3,000 RHS evaluations taken by the h r d e r reduction case of

Fig. 4.5, and the 320 RHS evaluations of the 14,193-node case of Fig. 4.3.

Fig. 4.6 compares solver performance when the Hi-in level of the preconditioner

matrix is varied. The factorisation of ILU(0) is too incomplete, Ieading to a vecy Iarge

number of RHS evaluations. An ILU(1) factorisation offérs a signiûcant improvement,

but the best resuits are obtained for ILU(4) and above, for which the ddierences in the

number of RHS evahations are aimost indiscemible. An ILU(5) factorisation was chosen

Page 41: A Newton-Krylov Solver for the Euler Equat ions on ......braster of AppM Science Graduate Department of Aerospace Science and Engineering University of Toronto 2001 A Newton-Krylov

2 Oroen - - 30rders -

-8 - -10 -

O 5 0 0 1 0 M ) l S O O a M O 2 M O 3 W O 3 5 0 0 RHS Evalunbm

Figure 4.5: Cornparison of GMRES tolerances, G (Mm = 0.63, a = 2.0").

RHS

Figure 4.6: Comparison of ILU@) fill levels (Mm = 0.63, a = 2.0").

as optimum, because it offers a slight advantage in the number of RHS evaIuations, and

can be nin with the ~4 value of the base parameters, whereas ILU(6) and ILU(7) require

K4 = 0.4.

Fig, 4.7 compares solver performance when the toletance applied to the density

residual for heezing the preconditioner rnatrix is varied. Optimum d t s are obtained

when the preconditioner matrix is fiozen as soon as the density residd is equal to or less

than 10-'.

Appiication of the base parameters to the cases of Mm = 0.3; a = 5.0°, and

Mm = 0.5; a = 3.0" yields the r d t s ofFig. 4.8. The convergence history for the Mm = 0.5;

Page 42: A Newton-Krylov Solver for the Euler Equat ions on ......braster of AppM Science Graduate Department of Aerospace Science and Engineering University of Toronto 2001 A Newton-Krylov

Section 4.1. Single-element Airfoi1 Cases

Figure 4.7: Cornparison O€ preconditioner €reezing tolerances, P (Mm = 0.63, o! = 2.0").

Figure 4.8: Other singleelement subsonic cases.

a = 3.0" case is very siraiiar to that shown in Fig. 4.3 for the primary validation case.

However, as expected, the Mm = 0.3; a = 5.0' case requires more RHS iterations given the

combination of lower keestream Mach number and higher angle of attack.

4.1.2 Tkansonic Flow

The primary validation case for transonic flow over a singie-element airioil is a

case with Mm = 0.8 and a = 1.0'.

The Mach number contours and Cp plot for this case are shown in Fig. 4.9. As

expected for this case, they show the formation of a shock on the upper surface of the aiaoil.

The force and moment coefficients of Table 4.4 agree weil with pubiished resuits. Given

that the present solver considers the Bow to be inviscid, the fact that the value of CD is

Page 43: A Newton-Krylov Solver for the Euler Equat ions on ......braster of AppM Science Graduate Department of Aerospace Science and Engineering University of Toronto 2001 A Newton-Krylov

Figure 4.9: Mach number contours and Cp plot (Mm = 0.8, a = l.OO).

Table 4.4: Drag, iift and moment coeficients (Mm = 0.8, a = 1.0").

approximately ten times greater than for the subsonic validation case is attributed solely

to the pressure discontinuity acrw the shock.

Fig. 4.10 shows the RHS evaluations for this primary validation case nin with the

optimum base parameters. Each symbol represents a Newton iteration. On the 3,631-node

grid, this case ran in approximately 42 s, with 0.1 s of CPU tirne spent per RHS evaluation,

and an average of 6 GMRES iterations per Newton iteration. On the 14,193-node grid, the

case ran in approximately 7 m 9 s, with 0.45 s of CPU t h e spent per RBS evaluation,

and an average of 8.3 GMRES iterations per Newton iteration. The appearance of "spikesn

during convergence is attributable to a poor initial guess Q(O) that tends to mislead the

solver, especiaily during the first Newton iterations.

The choice of optimum d u e s for the base parameters of this primary validation

case is corroborated by the resdts of Figs. 4.11 to 4.14.

Fig. 4.11 compares solver performance when the fourth-diffefence dissipation con-

Page 44: A Newton-Krylov Solver for the Euler Equat ions on ......braster of AppM Science Graduate Department of Aerospace Science and Engineering University of Toronto 2001 A Newton-Krylov

Section 4.1. Single-elmen t Airfoil C m 29

RHS Nirmnllvdan

Figure 4.10: Convergence history using base parameters (Mm = 0.8, a = 1.0").

Figure 4.11: Cornparison of o d u e s (Mm = 0.8, a = 1.0').

trol constant is varied. Optimum resuits are obtained when a = 4. The case with a = 2

did not converge.

Fig. 4.12 compares solver performance when the orders of magnitude that the

GMRES residual is reduced at each Newton iteration are varieci. Again, as with the subsonic

validation case, the results confina that it is counterproductive to reduce the GMRES

residuai by more than 1 order of magnitude at each Newton iteration. The 2 and h r d e r

cases were run with (3% d u e s of 30 and 10 respectively.

Fig. 4.13 compares solver performance when the fdi-in Ievel of the preconditioner

matnx is varied. The factorisations with 6il-in IeveIs below 4 are too incomplete, causing

Page 45: A Newton-Krylov Solver for the Euler Equat ions on ......braster of AppM Science Graduate Department of Aerospace Science and Engineering University of Toronto 2001 A Newton-Krylov

Figure 4.12: Comparison of GMRES tolerances, G (Ma = 0.8, a = l.OO),

Figure 4.13: Comparison of ILLT(p) 6ii levets (M, = 0.8, a = 1.0").

the solver to not converge. The optimum convergence rate is obtained with ILU(7), which

is higher than for the single-element subsonic validation me.

Fig. 4-14 compares solver performance when the tolerance appiied to the density

residuai for k i n g the preconditioner matrix is varied. Optimum resdts are obtained if

the preconditioner is frozen as soon as the density m i d d is equai to or d e r than IO-*.

Freezing the preconditioner below this tolerance has no e f f i on the nmber of GMRES

iterations per Newton iteration.

Application of the base parameters to the cases of M, = 0.729; a = 2.31°,

M, = 0.8; a = 1.25", and M, = 0.95; a = 1.0" yieIds the resntts of Fig. 4.15.

Page 46: A Newton-Krylov Solver for the Euler Equat ions on ......braster of AppM Science Graduate Department of Aerospace Science and Engineering University of Toronto 2001 A Newton-Krylov

Section 4.2. Multi-element Airfoil Case 3 1

RHS Evdwbm Hmaiimdm

Figure 4.14: Comparison of preconditioner beezing tolerances, P (Mm = 0.8, a = 1.0").

-2

a " I - 1 a 4

6 :: 4 -

-9

-IO

Figure 4.15: Other single-element transonic cases.

4.2 Multi-element Airfoil Case

O Z a 400 600 a00 l m , lm 1400 isa, lm t 2 3 4 5 6 7 s s 10 11 12 13 14 1s 1s 17 10 19 m

'IO-! 1- ..n - . 10.' - -?Y- ' . . 10' . * . -

ïS* :

\, ,-.-. .. ...,, ; .

'\

.

- '. .

The validation case for subsonic iif'ting flow over a multi-element airfoil is a case

with M, = 0.2 and cr = 5.0". It was nui on the 17,8%node triangdar grid shown in

Fig. 4.16, with the optimum base parameters indicated in Table 4.5.

The Mach number contours and Cp plot for this d d a t i o n case are shom in

40

35

30

12s a ,'= # 15

10

5

O

Table 4.5: Base parameters for multi-element high-lift airfoil case-

Flow Regirne

Subsonic lifting

Mm

0.2

cr [O]

5.0

a

5

~2

0.0

~4

0.4

G

IO-L

CFL

- p ( P

4 IO-^

Page 47: A Newton-Krylov Solver for the Euler Equat ions on ......braster of AppM Science Graduate Department of Aerospace Science and Engineering University of Toronto 2001 A Newton-Krylov

Figure 4.16: 17,894node trianguiar grid about mdti-element airfoil.

Figure 4.17: Mach number contours and Cp plot (Ma = 0.2, a = 5.0°).

Fig. 4.17. The force and moment coefficients are shown in Table 4.6.

Fii. 4.18 shows the RHS evduations for this validation case run with the optimum

base parameters. Each symbol represents a Newton iteration. The case ran in approximatdy

Page 48: A Newton-Krylov Solver for the Euler Equat ions on ......braster of AppM Science Graduate Department of Aerospace Science and Engineering University of Toronto 2001 A Newton-Krylov

Section 4.2. Multi-dement Moi1 Case

Table 4.6: Drag, lift and moment coeficients (Mm = 0.2, ct = 5.0").

Leading-edge slat Wing section Trahgedge fiap 1 Trailing-edge flap 2

Figure 4.18: Convergence history using base parameters (M, = 0.2, a = 5.0").

0.2904 0.1859 0.3694 1.138 0.4261 0.8490 3.755 -0.0854 -0.3930

0.5003 -0.4313 -0.2753

11 m 49 s, with 0.82 s of CPU tirne spent per RHS evaluation, and an average of 37.2

GMRES iterations per Newton iteration. These values are higher than for the subsonic and

transonic single-element airfoil cases. This is to be expected &en the greater complexity

of the aerodynamic co~guration.

The choice of optimum values for the base parameters of this validation case is

corroborated by the results of Figs. 4.19 to 4.22.

Fig. 4.19 compares solver performance when the fourth-difference dissipation con-

trol constant is varied. As with the singIeeIement validation cases, optimum results are

obtained when a = 5. For this case, however, the solver does not converge for any value of

a lower than this.

Fig. 4.20 compares solver performance when the orders of magnitude that the

GLIRES residual is reduced at each Newton iteration are varied. The resdts CO& that

it is counterproductive to reduce the GMRES residnat by more thau 1 order of magnitude.

The cases in which the GMRES residual was reduced by 2 and 3 orders of magnitude

Page 49: A Newton-Krylov Solver for the Euler Equat ions on ......braster of AppM Science Graduate Department of Aerospace Science and Engineering University of Toronto 2001 A Newton-Krylov

Chapter 4. Results

RHS Evaluaüom

Figure 4.19: Comparison of u values (M, = 0.2, a = 5.0").

Figure 4.20: Comparison of GMRES tolerances, G (M, = (3.2, cr = 5.0").

required a locd tirne step with CFL = 100, so, although not required, for consistency the

l-order case was also nui with this tirne step. Therefore, a true performance cornparison

is one made between the more than 5,000 RHS evaiuations taken by the 3-order reduction

case of Fig. 4.20, and the 700 RHS evaiuations of Fig. 4.18.

Fig. 4.21 compares solver performance when the fiii-in Ievel of the preconditioner

matrix is varieci. As in the previous validation cases, the factorisation of ILU(0) is too

incomplete, leading to a very large number of RHS evaiuations. A . ILU(4) factorisation

Page 50: A Newton-Krylov Solver for the Euler Equat ions on ......braster of AppM Science Graduate Department of Aerospace Science and Engineering University of Toronto 2001 A Newton-Krylov

Section 4.2. Multi-element Airfoil Case

Figure 4.21: Cornparison of ILU(p) fiii levels (Mm = 0.2, a = 5.0").

Figure 4.22: Cornparison of preconditioner b i n g tolerances, P (Mm = 0.2, a = 5.0').

offers optimum resuits. The solver does not converge for higher ievels of fiii-in.

Fig. 4.22 compares soiver performance when the tolerance applied to the density

residual for fieezing the preconditioner rnatrix is varieci. Optimum resuits are obtained

when the preconditioner matrix is fiozen as mon as the density residuai is equal to or less

than IO-*. Recalculating the preconditioner matrix for fnrther Newton iterations produces

no benefit.

Page 51: A Newton-Krylov Solver for the Euler Equat ions on ......braster of AppM Science Graduate Department of Aerospace Science and Engineering University of Toronto 2001 A Newton-Krylov
Page 52: A Newton-Krylov Solver for the Euler Equat ions on ......braster of AppM Science Graduate Department of Aerospace Science and Engineering University of Toronto 2001 A Newton-Krylov

Chapter 5

Conclusions

A node-based finite-volume Newton-Krylov solver has been implemented to solve

the Euler equations on arbitrary polygonal unstructured grids about aerodynarnic conlig-

urations. The solver applies an inexact Newton method to solve the non-iinear system of

equations that results Çom the spatial discretisation of the Euler equations. A matrix-kee

GMRES strategy is used to solve the hear system arising at each Newton iteration. This

system is right-preconditioned using an approximate Jacobian matrix subjected to ILU

factorisation and RCM reordering.

The solver ha, been tested with a single-element airfoil in the subsonic and tran-

sonic Bow regirnes, and with a multi-element aiFfoil in a subsonic high-iift case. The tests

successfully validate the functioning of the solver and investigate the &ect on convergence

of vaying grid size, scalar artiûciai dissipation parameters, preconditioner fiil-in, and GM-

RES and preconditioner-hing tolemnces. Sets of base parameters that optimise the

performance of the solver have been determined.

The solver is ready to be extendeci £iom the Eder equations to the fdi Navier-

Stokes equations; however, some of its present aspects are worthy of further attention- A

full hearisation of artificial dissipation terms and an extension h m zeroth to fitstsrder

extrapolation at boundaries codd be appiied to determine if an improved preconditioner can

be obtained without incurring excessive speed and memory penalties. Matrix dissipation,

instead of the current scalar dissipation, could be appiied in an attempt to lower the values of

the second and fourth-clifference dissipation terms, which might improve accuracy.Difkent

levels of GMRES restart codd be tested to determine their impact on solver performance.

Finaiiy, start-up strategies, such as mesh sequencing, codd be attempted to provide the

Page 53: A Newton-Krylov Solver for the Euler Equat ions on ......braster of AppM Science Graduate Department of Aerospace Science and Engineering University of Toronto 2001 A Newton-Krylov

38 Chapter S. Conclusions

solver with an improved initial guess vector, which would improve the speed of the solver,

especiaüy in subsonic lifting cases and transonic flow cases with shocks.

Page 54: A Newton-Krylov Solver for the Euler Equat ions on ......braster of AppM Science Graduate Department of Aerospace Science and Engineering University of Toronto 2001 A Newton-Krylov

Appendix A

Algorit hm Flow Diagrarn

Propose initial guess

Update solution vector &" = &' + &l

B"" €Y'

Is Wrn 5 1 Crt0

Forni J,"' matrix YES YES [lLU(n) & RCW to precondiion

J,~'&=-R(&) M = J&-

M=J/

Apply GMRES to solve for& in (J,"M-')(M& )=-R(&) Z Advance one GMRES iteraüm i+

Page 55: A Newton-Krylov Solver for the Euler Equat ions on ......braster of AppM Science Graduate Department of Aerospace Science and Engineering University of Toronto 2001 A Newton-Krylov

Appendix A. Aigori th Flow Diagram

Page 56: A Newton-Krylov Solver for the Euler Equat ions on ......braster of AppM Science Graduate Department of Aerospace Science and Engineering University of Toronto 2001 A Newton-Krylov

Appendix B

Examples of the Jacobians for JA

interior Cells

For interior ceiis i and k, the flux Jacobians of Eqs. 3.20 and 3.21 are of the form:

aF -= aQ

Rom Eqs. 2.2, 2.5, and 2.3, there is:

and

Page 57: A Newton-Krylov Solver for the Euler Equat ions on ......braster of AppM Science Graduate Department of Aerospace Science and Engineering University of Toronto 2001 A Newton-Krylov

Appendix B. Exanples of the Jacobians for JA

Tberefore. the flux Jacobians are:

Boundary Faces

For boundary faces rn, andogously, the flux Jacobians of Eqs. 3.20 and 3.21 are of the fom:

For the body surface boundary case of Subsection 2.4.1, the flux tensor of Eq. 2.3 is ex-

presseci in ternis of Qb of Eq. 2.26, where the pressure p and the tangentia.1 velocity com-

ponent V; are extrapolateci values expressed in terms of the variables q ,~ , ~ ~ 2 , qe3, and qe4.

Similarly, for each of the four far- field botmdary cases oE Subsection 2.4.2, the ftmc tensor of

Eq. 2.3 is e x p d in terms of the corresponding Qa vector; the example vector of Eq. 2.35

corresponds to the subsonic inftow case- Dependhg on the case, a, p, p, Va, and & are

extrapolateci values, expressed in terms of the variables q,~, qe2, q d , and q d .

Page 58: A Newton-Krylov Solver for the Euler Equat ions on ......braster of AppM Science Graduate Department of Aerospace Science and Engineering University of Toronto 2001 A Newton-Krylov

The Q vector Jacobians of Eq. 3.20 are of the form:

There are five such Jacobians: one for the body surface boundary Qb vector of Eq.2.26, and

four for the far-field boundary Qb vecton, of which Eq. 2.35 is the k t . The Jacobian for

the supersonic inûow case is null. As an example, for the body surface houndary case:

These Jacobians are dculated using the M~ple [29] symbolic mathematical corn-

putation system. As an example, the code for generating the C code for the Jacobian of

Eq. B.7 is:

wit h(lina1g);

Page 59: A Newton-Krylov Solver for the Euler Equat ions on ......braster of AppM Science Graduate Department of Aerospace Science and Engineering University of Toronto 2001 A Newton-Krylov

Appendix 8. Examples of the Jacobians for J..

Page 60: A Newton-Krylov Solver for the Euler Equat ions on ......braster of AppM Science Graduate Department of Aerospace Science and Engineering University of Toronto 2001 A Newton-Krylov

References

[Il Dembo, R. S., S. C. Eisenstat, and T. Steihaug, "Inexact Newton Methods," SIAM

Journal on Numerical Analysis, Vol, 19, No. 2, 1982, pp. 4ûû-408.

[2] Vanka, S. P., "BIock-Implicit Calculation of Steady Turbulent Recircuiating Flows,"

international Journal of Heat and Mass ïhnsfer, Vol. 28, 1985, pp. 2093-2103.

[3] Venkatakrishnan, V.. "Newton Solution of Inviscid and Viscous Problems," AiAA Pa-

pet 880413, January 1988.

[4] Orkwis, P. D.. "Cornparison of Newton's and Quasi-Newton's Method SoLvers for the

Navier-S tokes Equations." AIAA Journal, Vol. 31, No. 27, 1993, pp. 832-836.

[5] Whitfield, D. L., and L. K. Taylor, W k m t i z e d Newton-Relaxation SoIution of High

Resolution Flux-DWerence Split Schemes," Pmceedings of the AIAA Tenfh Annual

Computational Fluad Dynamics Conference, 1991, pp. 134145.

[6] Gear; C. W., and Y. Saad, "Iterative Solution of Linear Equations in ODE codes,"

SIAM Journal on Scientific and Statistical Computing, Vol, 4, 1983, pp. 583-601.

[?] Chan, T. F., and K- R. Jacksou, "Nonliueariy Preconditicrned Krylov Subspace Meth-

ods for Discrete Nehan Algorith," SIAM Journal on Scient+ and S t ~ t i ~ c a l Cm-

puting, Vol. 5 , 1984, pp. 535-542.

f8j Brown, P. N., and A- C. Hindmarsh, "Matrix-hm Methods for StSSystems oiODEs,"

SIAM Journal un Numericol AnalysîP, Vol. 23, L986, pp. 610-638.

[9] Brown, P. N., and Y. Saad, 'Kybnd Krylov Methods for Nonlinear Systems of Equa-

tions: SIAM Journal on Scientific and Statistid Computing, Vol. 11, 1990, pp. 450-

481.

Page 61: A Newton-Krylov Solver for the Euler Equat ions on ......braster of AppM Science Graduate Department of Aerospace Science and Engineering University of Toronto 2001 A Newton-Krylov

[IO] Saad, Y., and M. H. Schultz, "GMRES: A Generaiized Minimum Residuai Algorithm

for Solving Nonsymmetric Linear Systems," SIAM Journal on Scientific and Statisticul

Computing, Vol. 7, No. 3, 1986, pp. 856869.

[Il] Wigton, L. B., N. J. Yu, and D. P. Yomg, "GMRES Acceleration of Computational

Fluid Dynamics Codes," AIAA Paper 851494, Juiy 1985.

[12] Johan, Z., T, J. R. Hughes, and F. Shakib, "A Globdy Convergent Matrix-Free Ai-

gorithm for Impiicit Time-Marching Schemes Arising in Finite EIement Anaiysis in

Fluids," Computational Methods in Applied Liechanics and Engineering, Vol. 87, 1991,

pp. 281-304.

[13] Shakib, F., T. J. R. Hughes, and 2. Johan, "Element-by-element Algorithms for Non-

symmetric Matrix Problems Arising in Fluids," Superlarge Problems in Computational

Mechanics, Plenum, 1987, pp. 1-34.

[14] Venkamkrishnan, V., and D. J. Mavriplis, 'Impiicit Solvers for Unstructureci Meshes,"

AIAA paper 91-1537, Jwie 1991.

[15] Keyes. D. E., "Aerodynamic Applications of Newton-Kryiov-Schwarz Solvers," Proceed-

ings of the 14th International Conference on Numerimi Methods in Fluid Pynamics,

Springer, 1995, pp. 1-20.

f16] Tidriri, M. D., "Efficient Preconditioning of Newton-Krylov Matrix-Free Algorithms

for Cor ipressible Flows," Journal of Computational Physics, Vol, 132, 1997, pp. 51-61.

[17] Ajmani , K., W. F. Ng, and M. S. Liou, "Preconditioned Conjugate Gradient Methods

for the Compressible Navier-Stokes Equations," Journal of Computational Physics,

Vol. 11 1, 1994, pp. 68-81.

[18] Barth, T. J., and S. W. Linton, "An Unstructureci Mesh Newton Solver for Com-

pressible Fluid Flow and its Paralle1 Implementation," AIAA paper 95-0221, January

1995.

[191 Jiang, H., and P. A. Forsyth, "Robust Linear and Nonlinex Strategies for Solution of

the lkausonic Euler Equations," Cornputers and Fluiàs, Vol. 24, 1995, pp. 753470.

Page 62: A Newton-Krylov Solver for the Euler Equat ions on ......braster of AppM Science Graduate Department of Aerospace Science and Engineering University of Toronto 2001 A Newton-Krylov

[20] McHugh, P. R., and D. A. Knoil, "CompaRson of Standard and Matrix-Ekee Imple-

mentations of Several Newton-Kry Iov Solvers," AIAA Journal, Vol. 12, pp. 23942400,

December 1994.

[21] Mavripiis, D. J., "On Convergence Acceleration Techniques for UtI~tnictUred Meshes,"

AIAA Technical Report 982966, 1998.

[22] Nielsen, E. J., W. K. Anderson, R. W. Wdters, and D. E. Keyes, "Application

of Newton-Krylov Met hodology to a Three-Dimensional Unstmct ured Euler Code,"

AWA Paper 951733, June 1995.

[23] Tidriri, M. D., "Krylov Methods for Compressible Flows," ICASE Technical Report

95-48. June 1995.

[24] Blanco, M.. and D. W. Zingg, "Fast Newton-Krylov Method for C'nstmctured Grïds,"

AIAA Journal. Vol. 36, No. 4, 1998, pp. 607-612.

[251 Blanco, M., An Implicit Solution Method for the Euler Equations on Uns!;uctured

ïEangular Grids, Master's t hesis, University of Toronto, Sep tember 1995.

[26] Pueyo, A., and Zingg, D.W.' "Efficient Newton-Krylov Solver for Aerodynarnic Com-

putations," AIAA Journal, Vol. 36, No. 11, 1998, pp. 1991-1997.

[2?] Pueyo, A., -4n Eficient Newton-Krylov Method for the Euler and Nauier-Stokes Equa-

tions, Ph.D. thesis, University of Toronto, December 1997.

[28] Baiay, S., K. Buschelman, W. D. Gropp, D. Kaushik, L. C. Mcinnes, and B. F. Smith,

"PETSc home page," http://~.mcs.anl.gm/petsc, 2001.

i291 Char, B. W., K. O. Geddes, G. H, Gonnet, B. L. Leong, M. B. Monagan, and S. M.

Watt, First Leaues: A ïùtorial Introduction fo Mople V , Springer-VerIag, New York,

1992.