investigation of outflow boundary conditions for convection …804993/... · 2015. 4. 14. ·...

120
DEGREE PROJECT, IN , SECOND LEVEL MATHEMATICS STOCKHOLM, SWEDEN 2015 Investigation of Outflow Boundary Conditions for Convection-Dominated Incompressible Fluid Flows in a Spectral Element Framework ERIK BOSTRÖM KTH ROYAL INSTITUTE OF TECHNOLOGY SCI SCHOOL OF ENGINEERING SCIENCES

Upload: others

Post on 17-Aug-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

DEGREE PROJECT, IN , SECOND LEVELMATHEMATICS

STOCKHOLM, SWEDEN 2015

Investigation of Outflow BoundaryConditions for Convection-DominatedIncompressible Fluid Flows in aSpectral Element Framework

ERIK BOSTRÖM

KTH ROYAL INSTITUTE OF TECHNOLOGY

SCI SCHOOL OF ENGINEERING SCIENCES

Page 2: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of
Page 3: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

Investigation of Outflow Boundary Conditions for Convection-Dominated

Incompressible Fluid Flows in a Spectral Element Framework

E R I K B O S T R Ö M

Master’s Thesis in Scientific Computing (30 ECTS credits) Master Programme in Mathematics (120 credits) Royal Institute of Technology year 2015

Supervisor at Argonne National Laboratory was Oana Marin Supervisor at KTH was Philip Schlatter

Examiner was Michael Hanke TRITA-MAT-E 2015:11 ISRN-KTH/MAT/E--15/11--SE Royal Institute of Technology School of Engineering Sciences KTH SCI SE-100 44 Stockholm, Sweden URL: www.kth.se/sci

Page 4: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of
Page 5: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

AbstractIn this thesis we implement and study the effects of differentconvective outflow boundary conditions for the high orderspectral element solver Nek5000 in the context of solvingconvective-dominated fluid flow problems. By numericaltesting we show that the convective boundary conditionspreserve the spatial and temporal convergence rates of thesolver. We also study highly convective test cases such asa single vortex propagating through the outflow boundary,and the typical Kármán vortex shedding problem to analyzethe accuracy and stability. A detailed comparison with thenatural boundary condition that corresponds to the varia-tional form of the incompressible Navier–Stokes equations(the Nek5000 “O” condition), and a stabilized version of it(by Dong et al. (2014)), are also presented.

Our results show a major advantage of using the con-vective boundary conditions over the natural counterpart insolving convective problems, both according to stability andaccuracy. Analytic and numerical results show that the nat-ural condition has big stability problems for high Reynoldsnumbers, which make the use of stabilization methods ordamping regions crucial. But, the (Dong) stabilized naturalcondition does not improve accuracy, and damping regionsare computationally expensive. The convective conditionsshow very good accuracy if its convection speed is approx-imated accurately, and our results indicate that it can beused without damping regions efficiently. Our results alsoshow that the magnitude of reflections significantly dependson the amplitude of the disturbances that move through theboundary. The convective boundary condition can handlelarge disturbances without producing significant reflections,while the natural one or a stabilized version of it in generalcan not.

Page 6: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of
Page 7: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

ReferatUndersökning av Utflödesrandvillkor förKonvektivt-Dominanta InkompressiblaFlöden i ett Spektral-Element Ramverk

I det här examensarbetet har vi implementerat och stude-rat effekterna av olika konvektiva randvillkor för spektral-element lösaren Nek5000 vid beräkningar av konvektivt do-minanta flödesproblem. Med hjälp av numeriska tester be-visar vi att de nya implementationerna bevarar lösarenskonvergens i både rum och tid. Vi studerar noggrannhe-ten hos de konvektiva randvillkoren genom konvektivt do-minanta testfall i form av en ensam virvel som propagerargenom utflödet, samt det klassiska Kármán-virvel-gata pro-blemet. En detaljerad jämförelse med det naturliga rand-villkoret tillhörande den svaga formuleringen av de inkom-pressibla Navier-Stokes ekvationerna (Nek5000 “O”) och enstabiliserad version av denna är också presenterade.

Våra resultat visar tydliga fördelar med att använda dekonvektiva randvillkoren mot det naturliga vid lösningar avkonvektiva problem, både stabilitetsmässigt och noggrann-hetsmässigt. Analytiska och numeriska resultat visar attdet naturliga randvillkoret har stora stabilitetsproblem vidhöga Reynolds-tal, vilket medför att specifika stabilitets-versioner eller dämpningsregioner måste användas. Men sta-biliserande naturliga randvillkor (Dong) förbättrar inte nog-grannheten och dämpningsregioner är dyra beräkningsmäs-sigt. De konvektiva randvillkoren har uppvisat en väldigtgod noggrannhet om konvektionshastigheten i villkoren ärnoggranna approximationer. Analyser av amplituden hosreflektioner har också undersökts. Våra resultat visar ettsignifikant linjärt förhållande mellan storleken på störning-ar som genomborrar utflödes-randen och de reflektionerdessa störningar skapar. De konvektiva randvillkoren vi-sar sig klara starka störningar bra, vilket det naturliga ochden stabiliserade versionen av det naturliga randvillkoretgenerellt sett inte gör.

Page 8: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of
Page 9: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

AcknowledgementsThere are several persons that have contributed to thisproject which I would like to mention. First of all I wantto devote special thanks to Philipp Schlatter. I am ex-tremely grateful that you introduced me to this project. Ithas helped me to develop in many areas, and strengthenedmy interests in computational fluid dynamics. I also wantto thank you for all interesting discussions during this pe-riod. Special thanks I also want to devote to Oana Marinfor all tips, all comments about the writing and coding, butalso for your thoughtfulness. Other persons I want to thankfor their contribution are Adam Peplinski for all interestingdiscussions regarding Nek5000, Ekaterina Ezhova for com-menting the report, and Ricardo Vinuesa for borrowing meyour video clip for the oral presentation.

In addition to the people above I also feel I want toname some other persons that have meant a lot to me dur-ing the master-years. I want to thank Babak Maboudi–Afgham partly for commenting the report, but also for allsupport you have given me, both regarding the studies andpersonal. You have with your great attitude made me be-lieve that hard work pays off in the long run. I also want tothank Tahar Nabil and Jerker Nilsson for all support youhave given me during lab-work and exam preparations. Iwish you all the best luck in the future.

Page 10: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of
Page 11: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

Contents

1 Introduction 11.1 Motivation and background . . . . . . . . . . . . . . . . . . . . . . . 11.2 Fluid dynamics – Analytic and numerical issues . . . . . . . . . . . . 3

1.2.1 Numerical considerations . . . . . . . . . . . . . . . . . . . . 41.3 Outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

2 Navier–Stokes discretization 72.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72.2 Domain decomposition . . . . . . . . . . . . . . . . . . . . . . . . . . 82.3 Spatial discretization . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

2.3.1 Functional spaces . . . . . . . . . . . . . . . . . . . . . . . . . 112.3.2 Weak formulation . . . . . . . . . . . . . . . . . . . . . . . . 122.3.3 The PN × PN method . . . . . . . . . . . . . . . . . . . . . . 142.3.4 The PN × PN−2 method . . . . . . . . . . . . . . . . . . . . . 152.3.5 Semi-discrete matrix form . . . . . . . . . . . . . . . . . . . . 15

2.4 Time discretization . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182.4.1 The BDFk/EXTk scheme . . . . . . . . . . . . . . . . . . . . 182.4.2 The operator integration factor splitting scheme (OIFS) . . . 20

2.5 Operator splitting – The fractional step method . . . . . . . . . . . . 22

3 Natural outflow boundary conditions 253.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253.2 Natural outflow conditions for the incompressible Navier–Stokes equa-

tions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273.3 Energy balance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283.4 A stabilized natural boundary condition . . . . . . . . . . . . . . . . 293.5 Problems with natural boundary conditions in pipe flow computations 30

3.5.1 A hidden pressure condition . . . . . . . . . . . . . . . . . . . 303.5.2 Non-uniqueness . . . . . . . . . . . . . . . . . . . . . . . . . . 30

4 Convective outflow boundary conditions – Theory and imple-mentation 334.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

Page 12: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

CONTENTS

4.2 Exact "Non-reflecting" boundary conditions . . . . . . . . . . . . . . 334.2.1 The one dimensional case . . . . . . . . . . . . . . . . . . . . 334.2.2 Higher dimensions . . . . . . . . . . . . . . . . . . . . . . . . 34

4.3 The Sommerfeld radiation condition . . . . . . . . . . . . . . . . . . 384.4 Estimating the convection speed . . . . . . . . . . . . . . . . . . . . 39

4.4.1 The Orlanski scheme . . . . . . . . . . . . . . . . . . . . . . . 394.4.2 Exponential weighted moving average . . . . . . . . . . . . . 40

4.5 Nek5000 implementations . . . . . . . . . . . . . . . . . . . . . . . . 424.5.1 BDFk/EXTk . . . . . . . . . . . . . . . . . . . . . . . . . . . 424.5.2 Linear characteristic method . . . . . . . . . . . . . . . . . . 434.5.3 Curved characteristics method (OIFS) . . . . . . . . . . . . . 44

5 Numerical results 455.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 455.2 Temporal order estimation, unsteady flow . . . . . . . . . . . . . . . 465.3 Spatial convergence, Kovasznay flow . . . . . . . . . . . . . . . . . . 49

5.3.1 Convergence rates . . . . . . . . . . . . . . . . . . . . . . . . 505.3.2 Accuracy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52

5.4 Convecting vortex . . . . . . . . . . . . . . . . . . . . . . . . . . . . 565.4.1 PN × PN vs. PN × PN−2 . . . . . . . . . . . . . . . . . . . . . 655.4.2 Robustness analysis . . . . . . . . . . . . . . . . . . . . . . . 665.4.3 Stability and reflections . . . . . . . . . . . . . . . . . . . . . 68

5.5 Flow past a circular cylinder . . . . . . . . . . . . . . . . . . . . . . 705.5.1 Re = 100 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 725.5.2 Re = 1000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77

6 Discussion and conclusions 836.1 Outlook . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85

Appendices 85

A Mathematical concepts and formulas 87A.1 Tensor products . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87A.2 Orthogonal Lagrange polynomials . . . . . . . . . . . . . . . . . . . . 88

A.2.1 Legendre polynomials . . . . . . . . . . . . . . . . . . . . . . 88A.2.2 GLL polynomials . . . . . . . . . . . . . . . . . . . . . . . . . 89A.2.3 GL polynomials . . . . . . . . . . . . . . . . . . . . . . . . . . 89

A.3 The inf-sup condition . . . . . . . . . . . . . . . . . . . . . . . . . . 90A.4 Backward differentiating scheme (BDF) . . . . . . . . . . . . . . . . 90A.5 Extrapolation scheme (EXT) . . . . . . . . . . . . . . . . . . . . . . 91A.6 Alternate forms of the Navier–Stokes equations . . . . . . . . . . . . 92

A.6.1 Alternate forms of the convective term . . . . . . . . . . . . . 92A.6.2 Alternate forms of the viscous term . . . . . . . . . . . . . . 93

Page 13: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

CONTENTS

B Sponge layers 95

C Nek5000 spectral element solver 97C.1 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97C.2 Basic setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98

Bibliography 101

Page 14: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of
Page 15: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

Chapter 1

Introduction

1.1 Motivation and background

Mathematical modeling of fluid flow problems often deals with unbounded domains.To be able to compute a numerical solution to such problems, the domain must beartificially truncated. However, truncated domains result in regions where the so-lution along the truncation surface is unknown a priori. And without knowledgeabout boundary conditions it is generally impossible to obtain a well posed solutionto a partial differential equation. The difficulty of prescribing outflow boundaryconditions arises from the impossibility to predict the flow behavior as it exits thedomain. Therefore, the best one can achieve is to perform a qualitative approxi-mation of those boundary conditions. And one must have in mind that the choiceof approximation will be a significant source of errors of the whole numerical sim-ulation. Boundary conditions of this type are commonly called “open” boundaryconditions.

The quality of an open boundary condition highly depends on the complexityof the problem, and the insight one has on the solution. It does not matter if oneis concerned with an accurate and stable solution method if the open boundarycondition is approximated poorly; it will destroy the solution anyway.

Another problem regarding the practical use of these boundary conditions re-gards the discretization. Even if a complete mathematical understanding of thecontinuous boundary condition can be obtained, it must still be discretized to beusable. A numerical boundary condition depends significantly on the numerical dis-cretization of the problem, not only the continuous counterpart. Thus, the choiceof open boundary conditions in practice is often made as easy as possible. Forinstance, homogeneous Neumann boundary conditions are often a first choice [27].

In fluid dynamics we talk about inflows, where fluid enters a domain and out-flows where fluids leaves a domain. The boundary conditions corresponding to aspecific inflow are usually unproblematic and can generally be chosen by the user.The outflow boundary is typically an open boundary. Henceforth we use the term“outflow” boundary conditions through this thesis. Typical simulations concerned

1

Page 16: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

CHAPTER 1. INTRODUCTION

with outflow boundary conditions are: flow simulations in wakes, jets, spatiallydeveloping pipes and boundary layers [38], all types of aerodynamic simulations,blood flow simulations in the arterial trees [15], atmospheric and ocean modeling[31] etc. The problem of open boundary conditions is interdisciplinary; the sametheory is also applied in many other fields such as electrodynamics [4].

The difficulty arising from outflow boundary conditions is well known. Theoutflow and the region around it is usually thought to be unimportant to the char-acteristics of the solution, and is thus required to provide no spurious effects in theupstream direction. A common observation with outflows is that, especially at highand moderate Reynolds numbers1 the computations would become unstable whenstrong vortices penetrate the outflow boundaries. Hence, the domain is usuallyelongated such as the outflow boundary condition does not influence the impor-tant part of the solution. In a simulation the flow dissipates with time, where theamount of dissipation depends on the Reynolds number. Hence in a laminar flow(low Re) an elongated domain will imply that disturbances are smaller when theyreach the outflow boundary. However, in high Reynolds number flows, especiallyfor direct numerical simulation2 (DNS) the computational grid must often be verydense to yield stable solutions and an elongated domain will be computationallyvery expensive. Also, the dissipation of the flow is low, and elongating the domaingives no guarantee to sufficiently damp out the disturbances anymore. The typi-cal thing to do in this situation is to use “ad hoc” techniques; in particular someartificial damping (PML3, absorbing layers etc.) in the region close to the outflowboundary, with the purpose of damping out the disturbances [4, 7, 26]. Obviouslythe region where the technique is imposed must be excluded from the simulation,since the damping indeed destroys the solution, but in a favorable way. Drawbacksof damping regions are added computational time, but they may also imply non-physical reflections [26]. Thus, it is not clear beforehand that damping regions willwork efficiently. The setup is mainly performed by “trial and error”, which makesthe techniques problem dependent.

Typical examples of outflow boundary conditions in use are the natural bound-ary conditions arising from the variational form (finite element methods, spectralmethods etc.) [17, 35], homogeneous Neumann boundary conditions [27], and con-vective boundary conditions [36, 44].

For the current project we have studied outflow boundary conditions in the con-text of the high-order spectral element method (SEM)[32]. The code we have used,which is highly parallel is Nek5000 [16], developed and maintained by Paul Fischer(Argonne National Laboratory, and University of Illinois, Champaign-Urbana). Thecode is in heavy use for various types of internal and some external flows in manyresearch groups, including KTH Mechanics. To date, the only available choice of

1The Reynolds number is defined in §1.2.2A direct numerical simulation (DNS) is a simulation in computational fluid dynamics were

the flow equations are numerically solved by resolving even the smallest scales.3Perfectly Matched Layer, see e.g. [4]

2

Page 17: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

1.2. FLUID DYNAMICS – ANALYTIC AND NUMERICAL ISSUES

outflow boundary condition in Nek5000 is to use a natural boundary condition, alsoknown as “O” inside the code. But the “O” condition has shown to be the sourceto several problems such as: poor accuracy; instability, and obvious reflections. Inaddition to the “O” condition a number of different treatments of the flow insidethe domain are commonly used, e.g. a sponge layer (see §B) or the so called “noz-zle condition” (injection of mass to accelerate and thus damp disturbances). Thepurpose of the work in this thesis has therefore been to study alternatives to the“O” condition; where the alternatives in particular have been convective boundaryconditions and a stabilized version of the natural condition.

Due to the importance of outflow boundary conditions in incompressible flowproblems, a lot of research has been devoted to it during the years. Sani andGresho [36] gave a detailed review of what has been done in the area up to mid-1990s. Colionius [7] also gave a review of the topic, mainly focused on an exacttreatment of outflow boundaries. Another relevant review regarding open boundaryconditions for the shallow water equations is [31]. Some recent work regardingoutflow boundary conditions in the spectral element framework has been performedby Dong et al. [10], Poux et al. [34], and Xu and Lin [44]. Detailed analysis of thenatural outflow condition has been performed by Heywood et al. [17] and Rannacher[35]. The largest part of the research however use the finite differences method.Some relevant references among those are: the standard reference by Orlanski [29],Miyauchi et al. [27], and Poinsot and Lele [33]. A general “non-reflective” form ofan outflow boundary condition has also been widely studied; the original referencehere is the famous papers by Engquist and Majda [12, 11], another well cited one isthe paper by Trefethen and Halpen [42]. A short review of those “exact” boundaryconditions is presented in §4.2.

1.2 Fluid dynamics – Analytic and numerical issuesThe field of fluid dynamics deals with problems governed by partial differentialequations that represents the conservation laws of mass, momentum and energy.The main equations in this topic, based on the Newton’s second law of motion isthe famous Navier–Stokes equations derived by Claude–Louis Navier and GeorgeGabriel Stokes in the early 1800’s. The incompressible Navier–Stokes equations(non-dimensionalized) are written as

∂u∂t

+ u · ∇u = −∇p+ 1Re

∆u + f , (1.1a)

∇ · u = 0. (1.1b)where Re is the so called Reynolds number and f an external force. The Reynoldsnumber is a dimensionless quantity that governs the state of the flow (laminar, tran-sitional or turbulent) and is defined as Re := UL/ν, where U is the characteristicvelocity [m/s] (mean velocity of the fluid), L the characteristic linear dimension [m],and ν the kinematic viscosity [m2/s].

3

Page 18: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

CHAPTER 1. INTRODUCTION

The Navier–Stokes equations have been a broadly studied subject in severaldifferent areas due to their physical relevance in hydrodynamics etc. but also purelymathematically the complicated non-linear equations are of great interest. TheNavier–Stokes equations are indeed so complicated that even the most fundamentalsolutions are not yet found analytically; it is well known that one of the millenniumprize problems4 in mathematics is to prove that solutions of the three dimensionalincompressible Navier–Stokes equations always exist. The problem is still open, eventhough it has been approached lately by some of the most skilled mathematiciansin the world.

In two dimensions the global regularity was proven by Jean Leray in 1933 [22].So, why is it so hard to prove existence and uniqueness of the Navier–Stokes equa-tions in three dimensions, when it is often relatively easy for many other equations,or at least shown to be achievable? The simple, and most general answer for thatis that the Navier–Stokes equations often include the problematic phenomenon ofturbulence. The non-linearity of the Navier–Stokes equations makes them chaoticunder certain conditions. A change in the initial conditions will change the solutioncompletely, and hence the solution becomes extremely sensitive to disturbances; nomatter how small the disturbances are, the solution will change after a finite time.Another problem is the non-locality of the equations. The pressure is a functionalof the field of velocity derivatives. Hence, the pressure in one point depends onthe whole velocity field. Which is of course both very costly computationally innumerical simulations and also implies problems discretizing the equations.

As with many other non-linear partial differential equations, numerical analysisis an advantageous tool to get a meaningful result. The numerical treatment of fluiddynamical problems mainly goes under the topic of “computational fluid dynamics”(CFD).

1.2.1 Numerical considerations

In this subsection we explain the complications in numerical solutions of fluid flowproblems, i.e. why they need so high spatial resolution, and hence the need of ahighly parallel solver like Nek5000.

At large Reynolds number regime, the dynamics of the flow tend to becomemore and more non-linear and time-dependent, which can be explained by that thenon-linear term in (1.1) becomes dominant. Due to the non-linearity, the prob-lems become extremely hard to solve analytically, especially in cause of turbulentflow. There are indeed some rare cases which have solutions in a three dimensionalsetting, but they are few and restricted. This non-linearity together with the com-plex physical geometry that often exists in fluid flow problems, cause the numericaltreatments very challenging and computational costly. Even though there are nu-merical tools to use, the physical domains are often complex and high Reynolds

4The Millennium Prize Problems are seven problems in mathematics that were stated by theClay Mathematics Institute in 2000. At the time of 2014 six of them remains unsolved, where theNavier–Stokes problem is one of them.

4

Page 19: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

1.2. FLUID DYNAMICS – ANALYTIC AND NUMERICAL ISSUES

number computations especially in three dimensions become not only difficult butalso computationally expensive to solve using DNS, where the turbulence has to becomputed by the numerical method for all spatial and time scales. It can be shownthat the number of floating point operations indeed are proportional to the spatialresolution of the discretization (see e.g. [30]). Hence, the number of operationsgrows with Re3 in three dimensions. This will also affect the memory consumption.Given the large amount of memory needed, the need of a parallel environment iscrucial. Just at the super computer center PDC at the Royal Institute of Technol-ogy (KTH) it was shown that around 60% of all running jobs are related to solvingsomething related to the Navier–Stokes equations [37].

The complications of solving the Navier–Stokes equations numerically can bedivided up into three main difficulties:

1. Discretization errors are easily amplified and lead to inaccurate results, orblown up solutions. The non-linear term can potentially produce smaller andsmaller scales, which can lead to the need of very high spatial resolution.

2. Parameters such as the Reynolds number implies difficulties, due to instabilityproblems. For a very high Reynolds number there will be a very small termin front of the diffusion term that physically cannot be approximated to bezero. Indeed, approximating Re−1 ≈ 0 will drastically change the number ofboundary conditions needed in the regular setting, and hence the dynamics ofthe system is completely changed. Letting the Reynolds number be zero givesus indeed another set of equations, namely the Euler equations. But the Eulerequations are purely hyperbolic, which is not the case for the Navier–Stokesequations.

3. The incompressible Navier–Stokes equations are of mixed parabolic-hyperbolictype, which means that we cannot use efficient parabolic methods such asexplicit time marching methods, neither efficient hyperbolic methods such ascharacteristic methods to solve it.

The first two of these are the major challenges for direct DNS, because of the needof very high resolution in high Reynolds number flows. This explains the great needof parallel computations.

There are other ways to treat turbulence simulations, i.e. large eddy simulation(LES) and Reynolds averaged Navier–Stokes equations (RANS) [13]. These workin ways that reduce the computational cost of the simulation significantly, but theyhave of course drawbacks: LES is for instance not universal, and RANS raise ques-tions of the validity of the results. The limitations of our computers to date, restrictthe use of DNS, which make the use of LES and RANS unavoidable. Karniadakisand Orszag estimated in 1993 that an exaFLOPS (1018FLOPS) is required to carryout a DNS of a complete aeroplane [18]. The record to date on a supercomputerwas estimated to 33.86× 1015 FLOPS by NUDT Tianhe-2 at Guangzhou in China[1]. This shows the difficulty in computational power for DNS. In fact, the founder

5

Page 20: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

CHAPTER 1. INTRODUCTION

of Intel corporation Gordon Moore predicted in 1965 the density of components onchips to double every 18 months [28]. This law was shown to predict the fact verywell over the preceding 30 years or so. Over the recent years the clock frequencyof the computers has somewhat stabilized, and the problem with cooling has ledthe evolution in the direction that the processors have multiple cores instead of ahigh clock frequency. This makes the Moore’s law a bit outdated, and maybe alsoirrelevant. By following the Moore’s law however, the magic limit of reaching oneexaFLOPS (1018FLOPS) should be reached in around 2020, which is indeed thelimit Karniadakis and Orszag estimated the DNS of the aeroplane to.

1.3 OutlineThe thesis is structured as follows. In chapter two the background theory of thenumerical technique used is explained; the spectral element method is introducedand the time discretization techniques of Nek5000 are presented. In chapter threethe theory of natural boundary conditions is explained, and the natural boundarycondition of the incompressible Navier–Stokes equations is derived. We also reviewsome issues that have been encountered from these natural boundary conditions.In chapter four the theory and implementation of convective boundary conditionsin Nek5000 is examined. This includes also some theory of “exact” boundary con-ditions and wave reflections. In chapter five we analyze the outflow boundary con-ditions of chapter three and four numerically by several test cases: an unsteadyflow to test temporal convergence rates, a stable flow problem (Kovasznay flow) toanalyze spatial convergence rates, a case of a single convecting disturbance (vortex)in a base flow, and the classical case of flow past a circular cylinder.

6

Page 21: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

Chapter 2

Navier–Stokes discretization

2.1 Introduction

The incompressible Navier–Stokes equations can be solved numerically in severalways, where the choice of method is highly problem dependent. Roughly speaking,the main numerical methods to approach a numerical solution to the incompressibleNavier–Stokes equations are: the finite difference method (FDM), the finite elementmethod (FEM), the finite volume method (FVM), and spectral methods (SM). FDMis easy to implement, but cannot generally be used on very complex grids. FEM isadvantageous for its generality; it can handle complex geometries and is thereforeapplyable on a wide range of problems. SM are derived similarly as FEM from avariational formulation, and give high spatial accuracy, due to the choice of highorder basis functions. But, the drawback with SM is that similarly to FDM, theyhave problems with complex geometries. An obvious approach is to combine thegenerality of FEM with the accuracy of SM. Such a combination was first presentedby Patera in 1984 [32]. The hybrid method Patera presented was to be called the“spectral element method” (SEM).

In this chapter we present the spatial and temporal discretization of the in-compressible Navier–Stokes equations (1.1), the way implemented in the Nek5000code. The section should serve as a ground to understand the implementation of the

+ =

Finite element Spectral Spectral element

Figure 2.1: A spectral element method is a finite element method with a spectralmethod applied on each individual element.

7

Page 22: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

CHAPTER 2. NAVIER–STOKES DISCRETIZATION

boundary conditions presented in §§3,4, and give the tools needed to understandthe numerical results we present in §5.

2.2 Domain decomposition

Let Ω define a finite d = 2 or 3 dimensional domain. In a SEM discretizationof Ω, the data is represented on sets of non-overlapping sub-domains (elements)Ωe, e = 1, 2 . . . , E such that Ω = ∪Ee=1Ωe. One can consider every element in thegrid individually where for each a spectral method is applied (see Figure 2.1). Thespectral elements share points along the element boundaries, hence the elementsare often of similar resolution. Such setup is called a conformal grid [13]. If onthe other hand, hanging nodes are accepted one gets a non-conformal grid thatis more complicated to deal with. The resolution of the elements depends on theorder of the polynomial basis functions (“Lagrange polynomials”) of a Lagrangianinterpolation over the element. We hereby shortly describe the theory. Consider afinite sequence of distinct points ξiNi=0 ⊂ [−1, 1], where ξ0 = −1 and ξN = 1, andlet the function u : [−1, 1] 7→ R be a one dimensional representation of a solution.The Lagrangian interpolation of u reads

u(ξi) :=N∑j=0

ujφj(ξi) = ui, i = 0, 1 . . . , N. (2.1)

where ujNj=0 is the basis coefficients corresponding to a set of orthogonal nodal ba-sis functions φjNj=0. Nodal basis functions are known as “Lagrangian interpolants”and have the property that the basis coefficients uiNi=0 are also function valuesat the distinct points ξiNi=0, i.e. φj(xi) = δij holds, where δij is the Kroneckerdelta function, which is one if i = j and zero else. In SEM, one way to choose theLagrange basis functions is to use Legendre polynomials PN (x) (see §A.2), where Nis the polynomial order. The discrete points ξi are then located in the polynomialroots of the polynomials (1− x2)P ′N (x). These points are called the Gauss LobattoLegendre (GLL) points, and the corresponding Lagrange polynomials can be definedas “GLL polynomials”. Thus we get a non-uniform grid that is more dense close tothe element boundaries. One benefit of this is that the spectral elements avoid theRunge’s phenomenon1. The orthogonality of the Lagrange polynomials also leadsto diagonal or block diagonal “mass matrix”2, which are favorable in time domaincomputations due to that the inversion of such matrices are trivial. Consider thefirst five GLL polynomials over non uniform GLL points in Figure 2.2.

1Runge’s phenomenon is a problem of oscillation at the edges of an interval that occurs whenusing polynomial interpolation with polynomials of high degree over a set of uniformly distributedinterpolation points.

2The mass matrix is defined in §2.3.5. See Equation (2.23).

8

Page 23: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

2.2. DOMAIN DECOMPOSITION

-0.4

-0.2

0.0

0.2

0.4

0.6

0.8

1.0

1.2

-1 -0.5 0 0.5 1

φ(ξ

)

ξ

φ0

φ1 φ2 φ3 φ4φ5

Figure 2.2: Lagrange polynomials over GLL points (N = 5).

The GLL points have a nice property regarding the computation of numericalquadrature. For any GLL polynomial p of degree ≤ 2N − 1 it is given that∫ 1

−1p(x)dx ≡

N∑j=0

ρjp(ξj), ξj ∈ [−1, 1], (2.2)

where ρjNj=0 are the quadrature weights given by

ρj = 2N(N + 1)

1[PN (ξk)]2

, (2.3)

(see also §A.2.2).Since we are considering domains Ω of dimension two or three, we need to extend

the interpolation dimension of (2.1). This is easily performed due to the presenceof tensor products (see also §A.1). The choice of GLL points gives us the referenceelement Ω := [−1, 1]d, (d = 2, 3) which is the corresponding element using theGLL polynomials in higher dimensions. If we know the deformation (the shape)of our domain, it is possible to define a conformal one-to-one mapping from thereference element to each element in the domain, i.e. xe : Ω 7→ Ωe, ∀e. If thedomain is rectangular, the transformation is affine, and the Jacobian becomes aconstant value. If the domain is for instance a cylinder then a polar coordinatesubstitution is handy to use etc. In SEM it is suitable to have elements with fourcorner-points in each dimension. The element shapes are therefore conveniently informs of quadrilateral in two dimensions and hexahedral in three dimensions (Otherforms are also possible, but less common; see e.g. Sherwin and Karniadakis [39] fortriangular and tetrahedral SEM).

The followings are two examples of multi-dimensional discretizations, a two di-mensional, and a three dimensional, with non-deformed elements, i.e. the mappingsare affine.

9

Page 24: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

CHAPTER 2. NAVIER–STOKES DISCRETIZATION

Example 2.1 (2D affine transformation). Assume we have a two dimensional phys-ical domain Ω = [0, L1] × [0, L2] which is partitioned into two spectral elements:Ω1 = [0, L1/2] × [0, L2], and Ω2 = [L1/2, L1] × [0, L2]. The derivation of an affinecoordinate mapping x : Ω = [−1, 1]2 7→ Ωe, (r1, r2) 7→ x(r1, r2) = (xe1, xe2) is straightforward; only linear scaling needed to be applied to the elements. The transforma-tion becomes x(r1, r2) = (minxe1+(L1/4)(r1 +1),minxe2+(L2/2)(r2 +1)). Thenfor a function u|Ωe the Lagrange interpolation expressed in reference coordinates is

u(x(r1, r2))|Ωe =N∑i=0

N∑i=0

uijφi(r1)φj(r2), (r1, r2) ∈ Ω.

The x and y derivatives are also easy to express in reference coordinates. They are

∂u

∂x(x(r1, r2))|Ωe =

N∑i=0

N∑j=0

uij4L1φ′i(r1)φj(r2), (r1, r2) ∈ Ω,

∂u

∂y(x(r1, r2))|Ωe =

N∑i=0

N∑j=0

uijφi(r1) 2L2φ′j(r2), (r1, r2) ∈ Ω.

where φj is the (GLL) Lagrange basis functions.

Example 2.2 (3D affine transformation). Assume we have a three dimensionalphysical domain Ω = [0, L1] × [0, L2] × [0, L3]. In three dimensions, the referenceelement is Ω = [−1, 1]3. Similarly to the previous example we partition Ω intotwo spectral elements: Ω1 = [0, L1/2] × [0, L2] × [0, L3], and Ω2 = [L1/2, L1] ×[0, L2] × [0, L3]. The affine transformation of this example becomes x(r1, r2, r3) =(minxe1 + (L1/4)(r1 + 1),minxe2 + (L2/2)(r2 + 1),minxe3 + (L3/2)(r3 + 1)).And for a function u|Ω we get the Lagrange interpolation expressed in referencecoordinates

u(x(r1, r2, r3))|Ωe =N∑i=0

N∑j=0

N∑k=0

uijkφi(r1)φj(r2)φk(r3), (r1, r2, r3) ∈ Ω.

Differentiating with respect to x expressed in reference coordinates yields

∂u

∂x(x(r1, r2, r3))|Ωe =

N∑i=0

N∑j=0

N∑k=0

uijk4L1φ′i(r1)φj(r2)φk(r3), (r1, r2, r3) ∈ Ω.

∂u

∂y(x(r1, r2, r3))|Ωe =

N∑i=0

N∑j=0

N∑k=0

uijkφi(r1) 2L2φ′j(r2)φk(r3), (r1, r2, r3) ∈ Ω.

∂u

∂z(x(r1, r2, r3))|Ωe =

N∑i=0

N∑j=0

N∑k=0

uijkφi(r1)φj(r2) 2L3φ′k(r3), (r1, r2, r3) ∈ Ω.

where φj is the (GLL) Lagrange basis functions.

10

Page 25: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

2.3. SPATIAL DISCRETIZATION

u04 u14 u24 u34 u44

u03 u13 u23 u33 u43

u02 u12 u22 u32 u42

u01 u11 u21 u31 u41

u00 u10 u20 u30 u40

Figure 2.3: Ordering of the points in a two dimensional spectral element (N = 4).

The ordering of the nodal points is crucial to be able to use a matrix form. Thepoints in the grid is stored in a lexicographic order, which is a result of the tensorproduct representation. In two and three dimensional computations each elementis represented as follows

(d = 2), u := (u1, u2, . . . , u(N+1)2)> := (u00, u10, . . . , uij , . . . uNN )>, (2.4)(d = 3), u := (u1, u2, . . . , u(N+1)3)> := (u000, u100, . . . , uijk, . . . , uNNN )>. (2.5)

Consider the location of the elements in the two dimensional setting (Eq. (2.4)) inFigure 2.3.

The discretization process over each element Ωe ⊂ Ω can be divided into twoseparate parts. The spatial discretization, resulting in a semi-discretization of theequations, and the temporal discretization which discretizes the equations in timeusing the obtained spatial discretization. In the following section we explain thespatial part, which finally results in a semi-discrete matrix form, that is convenientto work with in the temporal part which follows in the section after.

2.3 Spatial discretization

2.3.1 Functional spaces

Through this section, we use several functional spaces. For convenience they are allexplained here.

The L2(Ω) space of square integrable functions with corresponding norm:

L2(Ω)d := u : Ω 7→ Rd : ‖u‖L2(Ω)d <∞, (2.6)

‖u‖L2(Ω)d :=(∫

Ω|u|2 dΩ

)1/2. (2.7)

11

Page 26: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

CHAPTER 2. NAVIER–STOKES DISCRETIZATION

The L20(Ω) space is the space of square integrable functions that has a mean value

zero:

L20(Ω) := q ∈ L2(Ω) :

∫Ωq dΩ = 0. (2.8)

Define the boundary as Γ := ∂Ω, and partition it in the following way: Γ = Γn∪Γe,Γn∩Γe = ∅, where Γn correspond to boundaries with a natural boundary conditionimposed, and Γe boundaries corresponding to essential (Dirichlet) boundary con-ditions. The solutions of weak formulations correspond to specific Sobolev spaces,which are spaces of functions in L2 with smoothness up to a specific differentiatingorder:

H1(Ω)d := u ∈ L2(Ω)d : |α| ≤ 1, Dαu ∈ L2(Ω)d, (2.9)H1

0 (Ω)d := u ∈ H1(Ω)d : u|Γe = 0, (2.10)

where α := (α1, . . . , αd), and |α| = α1+. . .+αd, Dα := ∂|α|

∂x1...∂xαdd

is the distributionalderivative.

2.3.2 Weak formulationSEM is based on the weak form of a partial differential equation. The weak formallows us to use Lagrangian basis functions together with the Galerkin method.That gives a spatial accuracy that is consistent with the order of the basis functions.

To obtain the weak formulation we follow the well known procedure from thefinite element community; we multiply the incompressible Navier–Stokes equations(1.1) with test functions v ∈ H1(Ω)d and q ∈ L2(Ω); then we integrate over Ω toobtain∫

Ωv · ∂u

∂tdΩ +

∫Ω

v · (u · ∇u) dΩ

= −∫

Ωv · ∇p dΩ + 1

Re

∫Ω

v · ∇2u dΩ +∫

Ωv · f dΩ. (2.11a)∫

Ωq(∇ · u) dΩ = 0. (2.11b)

Integration by parts on the viscous and pressure terms then yields∫Ω

v · ∂u∂t

dΩ +∫

Ωv · (u · ∇u) dΩ

= −∮

Γev · pndΓe −

∮Γn

v · pndΓn +∫

Ωp(∇ · v) dΩ

+ 1Re

∮Γe

v · ∇u · ndΓe + 1Re

∮Γn

v · ∇u · ndΓn −1Re

∫Ω∇u · ∇v dΩ

+∫

Ωv · f dΩ. (2.12a)∫

Ωq(∇ · u) dΩ = 0. (2.12b)

12

Page 27: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

2.3. SPATIAL DISCRETIZATION

The next step is to choose functional spaces (V ×Z) ⊂ (H1(Ω)d×L2(Ω)) for (u, p)(trial functions) such that the solution is sufficiently smooth and includes natural(derived in §3.2) and essential (Dirichlet and periodic) boundary conditions; andchoose spaces v ∈ V0 := H1

0 (Ω)d and q ∈ Z := L20(Ω) for the test functions such

that the boundary integrals that correspond to essential boundary conditions can-cel. Natural boundary conditions are assumed to cancel the boundary integral (

∮Γn)

in the case they are used and the test functions are assumed to cancel the boundaryintegrals (

∮Γe) for the essential boundary conditions (note that convective boundary

conditions (§4) will be treated as Dirichlet conditions and are therefore of essentialtype too). Taking all this into account, then the “weak formulation” of the problemcan be stated as:

Find (u, p) ∈ V × Z such that

ddt(v,u) +A(v,u,u) = B(v, p) + 1

ReC(v,u) + F(v), ∀v ∈ V0, (2.13a)

B(u, q) = 0, ∀q ∈ Z. (2.13b)

where

ddt(v,u) =

∫Ω

v · ∂u∂t

dΩ = ddt

∫Ω

v · u dΩ

A(v,u,u) = (v,u · ∇u) =∫

Ωv · (u · ∇u) dΩ,

B(v, w) = −(∇ · v, w) = −∫

Ω(∇ · v)w dΩ,

C(v,u) = −(∇v,∇u) = −∫

Ω∇u · ∇v dΩ,

F(v) = (v, f) =∫

Ωv · f dΩ.

Note that the regularity of the pressure solution is different than that of the ve-locity. Since u ∈ H1(Ω)d the interpolation of the velocity is continuous acrosselement boundaries, whereas p ∈ L2

0(Ω) means that the pressure interpolation canbe discontinuous.

A “discrete weak form” follows by the Galerkin method, where we choose trialand test functions in the same Sobolev space that is built up by of Lagrangianinterpolants. It is suitable to use homogeneous Dirichlet boundary conditions forall essential boundary conditions here and add the inhomogeneity to the forcingfunction f instead of including it in the Sobolev spaces. Thus, we choose discretesub-spaces in the following way (uN , pN ) ∈ V0,N × ZN ⊂ V0 × Z, v ∈ V0,N , andq ∈ ZN (where V0,N , and Z0 are soon to be defined), and the discrete weak formreads:

13

Page 28: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

CHAPTER 2. NAVIER–STOKES DISCRETIZATION

Find (uN , pN ) ∈ V0,N × ZN such thatddt(vN ,uN ) +AN (vN ,uN ,uN ) = BN (vN , pN ) + 1

ReCN (vN ,uN )

+ FN (vN ), ∀vN ∈ V0,N , (2.14a)BN (vN ,uN ) = 0, ∀qN ∈ ZN . (2.14b)

where

AN (vN ,uN ,uN ) = (vN ,uN · ∇uN )GLL,BN (vN , wN ) = −(∇ · vN , wN )GLL (or GL),

CN (vN ,uN ) = −(∇vN ,∇uN )GLL,FN (vN ) = (vN , fN )GLL,

(vN ,uN ) = (vN ,uN )GLL,

Here the inner products on the form (·, ·)GLL are computed with the GLL-quadraturerule3, which includes all quadrature computations that regard velocity. The innerproducts that include pressure are either computed with the GLL-quadrature rule(collocated setting), or the GL-quadrature4 (·, ·)GL (staggered setting). In the fol-lowing two subsections we present the theory of the collocated and staggered im-plementations respectively and the choices of approximation spaces V0,N and ZN .Since a discrete solution of SEM is defined by polynomial basis functions, the dis-crete subspaces must be polynomial spaces. A general definition we will use todefine polynomial spaces in the following subsections is

PN (Ω)d := φ : φ ∈ L2(Ω)d, φ is a polynomial of degree ≤ N. (2.15)

The choice of staggered against collocated grids has been discussed for a longtime in the field of computational fluid dynamics. The staggered grid was introducedin the mid 1960s by Harlow and Welsh (before that the collocated grid were theonly possible choice), and from that time until early 1980s the staggered gridswere considered the only way to go. In the 1980s, improvements in the couplingalgorithms were found, and the popularity of the collocated arrangement began torise again [13].

2.3.3 The PN × PN methodIn a spectral element framework the collocated approach is commonly named thePN × PN method. In this setting the discrete spaces in the discrete variationalformulation (2.14) becomes

V0,N := V0 ∩ PN (Ω)d, (2.16)ZN := Z ∩ PN (Ω). (2.17)

3Quadrature on GLL grid (see §A.2.2).4Quadrature on GL grid (see §A.2.3).

14

Page 29: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

2.3. SPATIAL DISCRETIZATION

The collocated approach assumes that the GLL nodal basis functions are used forboth velocity and pressure.

Collocating the velocity and the pressure points has drawbacks. Since the pres-sure appear as a gradient, it is not uniquely defined. The pressure solutions satisfiesthe weak continuous relation

(∇p,v) = 0, ∀v ∈ V0. (2.18)

Thus, any pair (u, p+constant) is a solution to (2.18) as long as (u, p) is a solution.In the original setting the PN×PN method does not satisfy the inf-sup condition (see§A.3), which implies a set of spurious pressure modes (see e.g. [9]). The spuriouspressure modes is a well known phenomena. However, often the pressure is not theinteresting quantity; so this problem seems fine as long as the velocity field give usthe right result.

In the Nek5000 code the collocated method is available mostly thanks to prof.Tomboulides. He introduced a high order splitting routine, that has shown highorder accuracy in time and minimal mass conservation errors [41].

2.3.4 The PN × PN−2 methodIt was proven by Maday and Patera [24] that choosing the basis functions of thepressure field two polynomial orders below the velocity field indeed eliminates theproblem of spurious pressure modes and therefore enforce the inf-sup condition. Inthis setting the functional spaces for the discrete weak formulation (2.14) thereforebecome

V0,N := V0 ∩ PN (Ω)d, (2.19)ZN := Z ∩ PN−2(Ω). (2.20)

Instead of using the GLL points for both velocity and pressure, the pressure is nowchosen in GL (Gauss Lobatto) nodes (see §A.2). Hence different quadrature rulesare performed for different terms in the discrete weak formulation.

2.3.5 Semi-discrete matrix formThe spatial discretization of the spectral element method is easiest described inmatrix form. We concentrate on a general case of a non-deformed conformal grid todescribe the context. In the computations we mainly restrict ourself to two dimen-sions to save space and keep the notations simple. The matrix operators can then beextended by the tensor product form (see A.1). More complicated implementationsand more details can be considered in the literature by e.g. Fischer, Deville andMund [9].

First some assumptions and definitions. Let φjNj=0 represent a set of La-grangian interpolants. Assume that the domain is rectangular Ω := [0, L1] × . . . ×

15

Page 30: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

CHAPTER 2. NAVIER–STOKES DISCRETIZATION

[0, Ld] with only one spectral element for simplicity, and define the reference do-main as Ω := [−1, 1]d. Then an affine transformation x : Ω 7→ Ω, (r1, . . . , rd) 7→(x1, . . . , xd) is given by x(r1, . . . , rd) = ((L1/2)(r1 + 1), . . . , (Ld/2)(rd + 1)). For asingle coordinate direction the sequences ξlNl=0 ⊂ [−1, 1] and ρlNl=0 are denotingrespectively the quadrature nodes and weights of an integral approximation. Also letdiag(A1, . . . , Am) represents a diagonal block matrix with the matrices A1, . . . , Amtrough the diagonal, and similarly diag(a) a diagonal matrix with the elements ofthe vector a, through the diagonal.

The inner products of (2.14) are computed using (2.1) as

(u, v)N =∫

ΩvudΩ =

∑ij

∑ij

vij

(∫Ωφiφjφiφj dxdy

)uij , (2.21)

where v = vij and u = uij are vectors of basis coefficients ordered as in Equation(2.4). A much simpler form of the inner product (2.21) is

(u, v)N = v>Mu, (2.22)

where M is the so called “mass matrix” with the entries

Mkk =∫ 1

−1

∫ 1

−1φi(r1)φi(r1)φj(r2)φj(r2)L1

2 dr1L22 dr2 (2.23)

= L1L24

(∫ 1

−1φi(r1)φi(r1) dr1

)(∫ 1

−1φj(r2)φj(r2) dr2

)

≈ L1L24

(N∑l=0

ρlφi(ξl)φi(ξl))(

N∑l=0

ρlφj(ξl)φj(ξl))

φi(ξj) = δij , M := diag(ρ0, ρ1, . . . , ρN)

= L1L2

4 MiiMjj . (2.24)

where k = 1 + i + (N + 1)j, k = 1 + i + (N + 1)j is the natural ordering of theelements (see Figure 2.3), and L1L2/4 is the constant Jacobian that corresponds tothe affine mapping. Note, in a deformed element configuration the Jacobian willobviously not be constant which make the expressions much more complicated.

Equation (2.23) written in tensor product form yields

M = L1L24

(M ⊗ M

). (2.25)

Where M is the one dimensional mass matrix. The mass matrix in three dimensionsbecomes

M = L1L2L38

(M ⊗ M ⊗ M

). (2.26)

16

Page 31: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

2.3. SPATIAL DISCRETIZATION

Derivatives are represented by the “differential matrix”, which in one dimensionis given by D, with corresponding matrix elements

Dij := dφjdr

∣∣∣∣r=ξi

, i, j ∈ 0, 1, . . . , N2 (2.27)

The derivative operators for two dimensions reads

D1 := (I ⊗ D) 2L1, D2 := (D ⊗ I) 2

L2. (2.28)

The diffusive part of the solution is represented by the so called “stiffness matrix”.Where the one-dimensional version is defined as

Kij :=∫ 1

−1

dφidr

∣∣∣∣r=ξj

dφjdr

∣∣∣∣r=ξi

dr ≈N∑l=0

DliρlDlj , i, j ∈ 0, 1, . . . , N2. (2.29)

The two dimensional operator for the stiffness matrix becomes

K = L2L1

(M ⊗ K

)+ L1L2

(K ⊗ M

)(2.30)

Now define

M := diag(M, . . . ,M), K := diag(K, . . . ,K), D :=[D1 . . . Dd

], (2.31)

i.e. we construct general matrices, that represents all flow fields. Then the innerproducts of the discrete variational form (2.14) can be evaluated as follow

AN (v,u,u) = (v,u · ∇u)

=∑ij

vi,j

[u1,iju2,ij

]∫Ωφiφj

∑ij

(φ′iφju1,ij + φiφ

′ju2,ij

)dΩ

= v>

[M diag(u1) M diag(u2)

](D1u1 +D2u2)

= v>[M diag(u1)D1 0

0 M diag(u2)D2

]︸ ︷︷ ︸

:=C(u)

u

= v>C(u)u.

BN (v, p) = −(∇ · v, p)

= −∑ij

pi,j

∫Ωφiφj

∑ij

(φ′iφjv1,ij + φiφ

′jv2,ij

)dΩ

= −p> (D1v1 +D2v2) = −v>D>p

CN (v,u) = −(∇v,∇u) = −v>Ku

FN (v) = (v, f) = v>Mf .

17

Page 32: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

CHAPTER 2. NAVIER–STOKES DISCRETIZATION

This results in the following semi-discrete matrix form of the Navier-Stokes equa-tions

Mdudt + C(u)u + 1

ReKu−D>p = Mf , (2.32a)

−Du = 0. (2.32b)

2.4 Time discretizationThe spatial discretization is where SEM is applied. For the temporal discretizationthere are several time-stepping schemes that can be used. In Nek5000 there are twodifferent choices available. The BDFk/EXTk scheme based on backward differenti-ating and extrapolation, and the OIFS/Characteristic method which is a sub-cyclingmethod where the advective part is integrated more often than the diffusive part.We explain both of the methods in this section. Our numerical results are mainlybased on the BDFk/EXTk formulation, but we also explain OIFS/Characteristicsfor the discussion of convective boundary conditions based on curved characteristics(§4.5.3).

The order of time discretization is important for accuracy and stability. Gen-erally, a higher order temporal discretization makes it possible to choose largertime-steps and still preserves a relatively high accuracy provided the method is sta-ble. A higher order method reaches in general a certain level of accuracy fasterthan a low order method. And, the computational cost of a low order method isnot always lower than for a higher order method, which makes the higher orderoften to prefer. The time step size also relates to the stability of the method. Asmall time step size must be chosen to obtain stability, which makes high ordermethods advantageous in this manner too. Implicit time stepping is in general tobe preferred over the explicit analog since implicit methods have a larger stabilityregion. But, a drawback of them is that they can be very complex to compute. TheNavier–Stokes equations are complex, and therefore require rather complex time-stepping methods. Since the equations include both velocity and pressure, the timeadvancement can hardly be done in a single equation. Instead so called “splitting”methods are used, that decouple the velocity and pressure and solve the system intwo steps. This procedure can be performed in several ways. In this thesis we re-strict ourselves to shortly explain the methods included in the Nek5000 code, whichare based on the fractional step method.

2.4.1 The BDFk/EXTk schemeThe backward differentiating scheme of order k (BDFk) is an implicit formulationthat is based on Taylor expansion. A time derivative on the form dy/dt = f(y) isdiscretized as follows with the BDFk scheme

1∆t

k∑i=0

βkyn+1−i ≈ f(yn+1) (2.33)

18

Page 33: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

2.4. TIME DISCRETIZATION

where βiki=0 are BDF coefficients (see §A.4) and ∆t the time-step size. Note thatthe number of implicit relations to be solved are the same for different orders k.Hence, the computational cost does not depend on the choice of order, i.e. there isno reason to pick k = 2 in front of k = 3 to save computational cost.

In the Navier–Stokes discretization (2.32) the only way to avoid the iterativeform of a non-symmetric, non-linear system, that occurs if the advection terms aretreated implicitly is obviously to treat them explicitly. A simple explicit method thatsatisfies this proposed by Karniadakis et al. [19] is to use high order extrapolationon the non-linear terms including the advection part. The kth order extrapolation(EXTk) of a general non linear term f(yn+1) is given by

f(yn+1) ≈k∑i=1

αif(yn+1−i). (2.34)

where αiki=1 is a set of extrapolation coefficients corresponding to the specificorder of the scheme (see §A.5). Adding the BDFk and EXTk schemes togetherresults in the BDFk/EXTk scheme

1∆t

k∑i=0

βkyn+1−i =

k∑i=1

αif(yn+1−i). (2.35)

The stability regions of the second and third order BDFk/EXTk schemes are con-sidered by solving the scalar equation dy/dt = λy and are depicted in Figure 2.4.We can note that the BDF3/EXT3 scheme does include more of the imaginary axiseigenvalues than the BDF2/EXT2 scheme.

The BDFk/EXTk discretization applied to the semi-discrete equation (2.32)yields

M 1∆t

k∑i=0

βiun+1−i −D>pn+1 + 1Re

Kun+1 = −k∑i=1

αiC(un+1−i)un+1−i + Mfn+1

(2.36a)−Dun+1 = 0. (2.36b)

Which is transformed into

Hun+1 −D>pn+1 = M(fn+1 − 1∆t

k∑i=1

βiun+1−i)− 1∆t

k∑i=1

αiC(un+1−i)un+1−i

(2.37a)−Dun+1 = 0. (2.37b)

where H = diag(H, . . . ,H) is the discrete Helmholtz operator defined as H =1ReK + β0

∆tM .It is convenient to write (2.37) as a linear system. We get:[

H −D>−D 0

] [un+1

pn+1

]=[fn+1

0

], (2.38)

19

Page 34: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

CHAPTER 2. NAVIER–STOKES DISCRETIZATION

-1

-0.5

0

0.5

1

-1.5 -1 -0.5 0 0.5Re

Im

BDF2/EXT2BDF3/EXT3

Figure 2.4: Stability regions of BDFk/EXTk methods.

where

fn+1 = M(

fn − 1∆t

k∑i=1

βiun+1−i)− 1

∆t

k∑i=1

αiC(un+1−i)un+1−i. (2.39)

This system can be solved with the fractional step method (see §2.5).

2.4.2 The operator integration factor splitting scheme (OIFS)

Operator integration factor splitting (OIFS), due to Maday, Rønnquist and Patera[25] helps producing an efficient and more stable numerical scheme. The methodseparates the linear viscous from the non-linear advection term in the incompressibleNavier–Stokes equations. In the OIFS method an explicit term is used for theadvection part and treats the implicit Stokes part of the equations implicitly; this issimilar to the BDFk/EXTk scheme. However, the OIFS method differs a lot fromthe BDFk/EXTk scheme. OIFS uses the Lagrangian formulation to compute thematerial derivative which makes it more complex than the BDFk/EXTk scheme toimplement.

The fist step in the derivation of the OIFS is to introduce an integrating factorQt∗C which indeed never need to be explicitly defined. By multiplying both sides ofEquation (2.32) with this integrating factor we obtain

ddt[Qt∗C (t)Mu

]+ReQt∗C (t)C(u) = Qt∗C (t)(−Ku + D>p+ Mf), (2.40)

20

Page 35: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

2.4. TIME DISCRETIZATION

u2

u3u1 = u1

Figure 2.5: In the OIFS method the Lagrangian formulation is used to compute thematerial derivative. Consider a typical streamline backward in time from the valueu1, and the solutions u2, and u3 at times t−∆t and t− 2∆t.

where the integrating factor is constructed such that

ddt[Qt∗C (t)Mu

]= Qt∗C (t)(−Ku + D>p+ Mf), (2.41)

andddt[Qt∗C (t)Mu

]= ReQt∗C (t)C(u), Qt∗C (t∗) = I, (2.42)

holds. Then the BDFk scheme is applied to the time derivative, resulting in

Mβ0un+1 +k∑j=1

βk−jS(Qtn+1C (tn+1−j)Mun+1−j

)= ∆t(−Kun+1 + D>pn+1 + Mfn+1), (2.43)

where the term

S(Qtn+1C (tn+1−j)Mun+1−j

)= Mun+1

j , j = 1, . . . , k, (2.44)

represents a solution computed with fourth order Runge Kutta (RK4) sub–stepping.Here un+1

j kj=1 are the velocities at off grid locations on the characteristic curvebackward in time from un+1 (see Figure 2.4.2). The off grid values are obtainedby solving a separate initial value problem

M dds uj(s) = −ReC(uj(s))uj(s), tn+1−j ≤ s ≤ tn+1, (2.45a)

uj(tn+1−j) = uj(s). (2.45b)

where the time steps of the sub-problem are of size ∆s = ∆t/γ, where γ is thenumber of sub-steps of the RK4 scheme that are used to solve (2.45). The numberof sub–steps shall be chosen such that the CFL stability condition of the problem is

21

Page 36: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

CHAPTER 2. NAVIER–STOKES DISCRETIZATION

satisfied. The RK4 scheme is an appropriate choice since it can handle eigenvalueson the imaginary axis [9]. The final form of the full Navier–Stokes discretizationcan now be stated as

Hun+1 −D>pn+1 = −M∆t

k∑j=1

βjun+1−jj

+ Mfn+1 (2.46a)

−Dun+1 = 0, (2.46b)

which yields the OIFS analogue to the linear system (2.38):[H −D>−D 0

] [un+1

pn+1

]=[fn

0

], (2.47)

where

fn+1 = M(

fn+1 − 1∆t

k∑i=1

βiun+1−i). (2.48)

2.5 Operator splitting – The fractional step methodThe solution procedures of the linear systems (2.38) and (2.47) are not trivial tasks.Much effort has been devoted to decoupling the pressure from the velocity fieldcalculation, to eliminate so called splitting errors that occur in this process [9]. Thesimplest, most popular decoupling method is the fractional-step method, which hasa first order time error that can be improved to second order by pressure correction.

Recall, we are given a system on the form:[H −D>−D 0

] [un+1

pn+1

]=[fn+1

0

], (2.49)

The solution is computed in two steps. First one solves

Hu∗ = fn + D>pn (2.50)

by approximating the inverse H; resulting in

u∗ = H−1(fn + D>pn), (2.51)

which is followed by a pressure correction step

E∇2pn+1 = − 1∆tDu∗, (2.52)

un+1 = u∗ + ∆tM−1D>∇2pn+1, (2.53)pn+1 = pn +∇2pn+1, (2.54)

22

Page 37: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

2.5. OPERATOR SPLITTING – THE FRACTIONAL STEP METHOD

where E := DM−1D> is a consistent Poisson operator for the pressure.

The solution procedure differs a bit depending on whether we use PN × PN orPN ×PN−2, since the PN ×PN must set a boundary condition for the pressure (see[9], p.312),

n · ∇p = n · [−∇× (∇× u) + f ], on ∂Ω, (2.55)

while the PN × PN−2 does not. Roughly speaking the solution procedures for twodifferent methods can be summarized as follow:

PN × PN , solution procedure:

1. Discretize in time;

2. Take continuous divergence of momentum equation to arrive at a Poissonequation for pressure, with special boundary conditions.

PN × PN−2, solution procedure:

1. Discretize in space using compatible approximation spaces;

2. Solve coupled system for pressure/velocity.

23

Page 38: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of
Page 39: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

Chapter 3

Natural outflow boundary conditions

3.1 IntroductionRecall that, to obtain an unique solution to a partial differential equation suit-able boundary conditions must be specified on the boundaries. However, it is notnecessary that all the boundary conditions are explicitly set. “Natural” boundaryconditions are such boundary conditions. In the weak form of a partial differentialequation natural boundary conditions are incorporated implicitly. And since SEMuses the weak form for the spatial discretization, natural boundary conditions existin our incompressible Navier–Stokes discretization.

Due to the implicit nature of natural boundary conditions they often go underthe name “do-nothing” boundary conditions. Also the name “traction boundarycondition” frequently appears, which refers to a specific form where traction is im-posed on the boundary; thus the boundary condition has in this setting a specificphysical meaning. However, we will mainly use the name “natural” boundary con-dition through the remaining of this thesis, to refer to the general form.

Before moving on to the incompressible Navier–Stokes equations, let us firstpresent a short introduction of the background theory of natural boundary condi-tions. A typical example problem presented in the book [23] (p.181) is this:“A river with parallel straight banks b units apart has stream velocity given byv(x, y) = v(x)j, where j is the unit vector in the y direction. Assuming that one ofthe banks is the y axis and that the point (0, 0) is the point of departure, what pathshould a boat take to reach the opposite bank in the shortest possible time? Assumethat the speed of the boat in still water is c, where c2 > v2.”In this problem the right end–point at x = b is not specified. But it must be spec-ified as a part of the solution to the problem. Indeed, if v(x) is a critical function(i.e. min or max), then a certain condition must hold at x = b. This condition is anatural boundary condition. The existence of a solution to this kind of problem isclear. If we start at a point a, and the path we want to follow is continuous, thenthere certainly exist shortest paths to point b. It does not matter if we know or notknow the derivative or exact height at the b location. Thus, it is sufficient to add a

25

Page 40: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

CHAPTER 3. NATURAL OUTFLOW BOUNDARY CONDITIONS

boundary condition at a and the solution will be unique.Let us give an example to explain the mathematical framework.

Example 3.1. Assume that we want to find the minimal function y∗(x) to thefunctional

J =∫ x2

x1f(x, y, y′) dx, (3.1)

where one or both of the boundary points y(x1) and y(x2) are unknown. (Let usfor instance assume that the problem is the problem with the boat above, wherey(x2) is unknown.) Define a set of comparison functions as S = g(x) : g(x) =y∗+ εη(x), ε > 0, η(x) ∈ R. Here η(x) is a function that prescribes the direction inwhich the derivative is computed. Then substitute y(x, ε, η) ∈ S in Equation (3.1)and obtain the new functional

J(ε) =∫ x2

x1f(x, y∗ + εη, (y∗)′ + εη′) dx. (3.2)

Now, apply the standard technique of finding stationary points, i.e. derive the func-tions and compute the roots:

dJdε

∣∣∣∣ε=0

= ∂f

∂y′η

∣∣∣∣x2

x1

+∫ x2

x1

(∂f

∂y− d

dx

(∂f

∂y′

)= 0. (3.3)

Since ∂f∂y −

ddx

(∂f∂y′

)= 0 is the well known Euler–Lagrange equation, the minimiza-

tion problem exist if the boundary term is equal to zero. i.e.

∂f

∂y′η

∣∣∣∣x2

x1

= ∂f

∂y′

∣∣∣∣x=x2

η(x2)− ∂f

∂y′

∣∣∣∣x=x1

η(x1) = 0. (3.4)

These conditions are satisfied if η(x1) = 0 and η(x2) = 0. But in the case theboundary points are variable, i.e. η(x1) and η(x2) are arbitrary, then the only wayto ensure that the condition (3.4) is satisfied is to choose

∂f

∂y′

∣∣∣∣x=x1

= 0, and ∂f

∂y′

∣∣∣∣x=x2

= 0. (3.5)

This conditions are exactly what we call the natural boundary conditions of theproblem. Boundary conditions where η = 0 are called essential boundary conditions.

Mathematically, an intuition of natural boundary conditions for a variationalform of a partial differential equation is basically a requirement for the boundaryintegrals at a non-Dirichlet boundary to cancel after integration by parts has beenapplied in the derivation of the weak form of a PDE. The minimization problemexplained above is another way to explain the concept, which may give a morephysical intuition. The minimization problem of a PDE is typically a measure ofthe energy stored in a system.

26

Page 41: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

3.2. NATURAL OUTFLOW CONDITIONS FOR THE INCOMPRESSIBLENAVIER–STOKES EQUATIONS

3.2 Natural outflow conditions for the incompressibleNavier–Stokes equations

To derive the natural boundary conditions for the incompressible Navier–Stokesequations (1.1) we choose a domain Ω of dimension two or three with the boundaryΓ that is partitioned into the disjoint sets of points corresponding to the outflowboundary ΓO where the natural outflow boundary conditions is imposed, and Γ\ΓOwhich are boundaries with essential boundary conditions.

Recall from (1.1) the dimensionless form of the incompressible Navier–Stokesequations

∂u∂t

+ u · ∇u = −∇p+ 1Re∇2u + f , (3.6a)

∇ · u = 0. (3.6b)

A variational formulation was derived in §2.3.2. Let us quickly re-do the calcula-tions: multiply (3.6a) with a test function v ∈ H1

0 (Ω)d (see Equation (2.10)), andintegrate over the domain Ω

∫Ω

v · ∂u∂t

dΩ +∫

Ωv · u · ∇u dΩ

= −∫

Ωv · ∇p dΩ +

∫Ω

v · ∇2u dΩ +∫

Ωv · f dΩ, (3.7)

Then apply integration by parts on the pressure and viscous terms of (3.7) to obtain

∫Ω

v ·(∂u∂t

+ u · ∇u− f)

=∫

Ω(∇ · v)p dΩ− 1

Re

∫Ω∇v · ∇u dΩ +

∮Γ

v ·(−p+ 1

Re∇u

)· ndΓ. (3.8)

By the choice v ∈ H10 (Ω)d, the surface integrals corresponding to essential boundary

conditions cancel, and we end up with∫

Ωv ·(∂u∂t

+ u · ∇u− f)

=∫

Ω(∇ · v)p dΩ− 1

Re

∫Ω∇v · ∇u dΩ +

∮ΓO

v ·(−p+ 1

Re∇u

)· ndΓ. (3.9)

From which the following natural boundary condition then follows from the surfaceintegral over ΓO

−pn + 1Re

(n · ∇u) = 0, on ΓO. (3.10)

27

Page 42: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

CHAPTER 3. NATURAL OUTFLOW BOUNDARY CONDITIONS

3.3 Energy balanceAn energy estimate can be used to study e.g. the stability of the system (1.1).Multiply (1.1a) with u, and integrate over Ω, then we obtain

ddt(u,u) + (u,u · ∇u) = (∇ · u, p)− 1

Re(∇u,∇u) +

∮Γ

u ·(−p+ 1

Re∇u

)· ndΓ.

(3.11)

Now we evaluate each terms in (3.11) separately (note that some terms cancel byEquation (1.1b))

ddt(u,u) = d

dt

∫Ω

uu dΩ

= 12ddt

∫Ω|u|2 dΩ,

= 12ddt‖u‖

2L2(Ω),

(u,u · ∇u) =∫

Ωu · (u · ∇u) dΩ

=∫

Ωu · 1

2∇|u|2 dΩ

=∮

Γ

12 |u|

2u · ndΓ−∫

Ω

12 |u|

2 (∇ · u)︸ ︷︷ ︸=0

=∮

Γ

12 |u|

2u · ndΓ,

(∇ · u, p) =∫

Ω(∇ · u)︸ ︷︷ ︸

=0

·p dΩ = 0,

1Re

(∇u,∇u) = 1Re

∫Ω|∇u|2 dΩ

= 1Re‖∇u‖L2(Ω).

Then,

12ddt‖u‖

2L2(Ω) = − 1

Re‖∇u‖2L2(Ω) +

∮Γ\ΓO

u ·(−p+ 1

Re∇u− 1

2 |u|2)· ndΓ \ ΓO

+∮

ΓOu ·(−p+ 1

Re∇u− 1

2 |u|2)· ndΓO. (3.12)

From (3.12) we can notice that the energy decay depends entirely on the boundaryterms for high Reynolds numbers. If those terms are negative then the energychange over time is also negative; but if they are positive then a growth of energy

28

Page 43: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

3.4. A STABILIZED NATURAL BOUNDARY CONDITION

is possible. Hence, we obtain the following inequality to ensure that the energy isnon-positive

u ·(−p+ 1

Re∇u− 1

2 |u|2)· n∣∣∣∣Γ\ΓO

+ u ·(−p+ 1

Re∇u− 1

2 |u|2)· n∣∣∣∣ΓO≤ 0.

(3.13)If we assume that the non-outflow part of the boundary is either of Dirichlet orperiodic type, then the total energy change over these boundaries is controlled.This is true due to the fact that Dirichlet boundary conditions are pre-defined andthe total energy change over the periodic boundaries cancel due to the periodicity.Hence, the only boundary term that may cause uncontrolled energy growth is theoutflow boundary. We get the stability constraint

u ·(−p+ 1

Re∇u− 1

2 |u|2)· n ≤ 0, on ΓO. (3.14)

Where the two first terms cancel due to that the natural boundary condition (3.10)holds at ΓO. Thus, to restrict blow ups we have

−12 |u|

2 (u · n) ≤ 0, on ΓO. (3.15)

which does not hold for (u · n)|ΓO < 0. Let us state this result as a theorem:

Theorem 3.1. If Ωd, d = 2 (or 3) is a closed domain with boundary Γ = Γ1 ∪ ΓO,Γ1 ∩ ΓO = ∅, where Γ1 is of either Dirichlet or periodic type and ΓO is an outflowboundary with the natural boundary condition (3.10) imposed. Then,

Re→∞ =⇒

ddt‖u‖

2L2(Ω) ≤ 0, u · n|ΓO ≥ 0,

ddt‖u‖

2L2(Ω) > 0, u · n|ΓO < 0.

(3.16)

3.4 A stabilized natural boundary conditionA way to stabilize the natural condition (3.10) was presented in the paper by Dong,et. al (2014) [10]. It is based on the results of the previous subsection. Adding thecondition u ·

(−p+ 1

Re∇u− 12 |u|

2)·n = 0 if an energy influx on ΓO is present, the

energy growth as Re→∞ is eliminated. To remove the discontinuity that appearswhen fluxes turn from negative to positive from one time step to another a smoothstep function was used

Θ(n,u) := 12

[1− tanh

(n · uUδ

)], (3.17)

where U is the characteristic velocity scale, and δ > 0 is a chosen non-dimensionalpositive constant that regulates the amount of smoothness, i.e. as δ → 0, Θ(n,u)approaches a step function. The new stabilized outflow boundary condition reads

−pn + 1Re

(n · ∇u)−[1

2 |u|2Θ(n,u)

]n = 0, on ΓO. (3.18)

29

Page 44: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

CHAPTER 3. NATURAL OUTFLOW BOUNDARY CONDITIONS

3.5 Problems with natural boundary conditions in pipeflow computations

Some interesting remarks about natural boundary conditions in pipe flow computa-tions were proposed by Heywood et al. [17], and Rannacher [35]. These are reviewedin this section.

3.5.1 A hidden pressure conditionConsider a two dimensional cross section of a pipe Ω = [0, L1]× [−L2, L2], and withflow in the x direction. On the upper and lower boundaries “no slip” boundaryconditions are imposed. If we compute the integral over the outflow boundary werethe natural boundary condition (3.10) is imposed we get

0 =∮

ΓO

(−p+ 1

Re

∂u

∂x

)dx = −

∫ L2

−L2p dx+ 1

Re

∫ L2

−L2

∂u

∂xdx = −

∫ L2

−L2p dx. (3.19)

where the fundamental theorem of calculus was applied to cancel the 1Re

∫ L2−L2

∂u∂x dx

term. Indeed, this means that the mean pressure is zero over the outflow boundary.Hence in a bifurcated pipe with two (or more) outlets where natural boundaryconditions are imposed on each, the mean pressure must be zero at all the outlets. Ifthe outlets are placed asymmetrically, this is certainly wrong, and gives a physicallyincorrect solution.This result is interesting since it appear because of the pressuredependence, which is the main difference between the natural and the convectiveboundary conditions that we present in the next chapter.

3.5.2 Non-uniquenessDue to the incompressibility constraint (1.1b) it is possible to change the variationalformulation of the incompressible Navier–Stokes equations using different modifi-cations of the transport and diffusion terms and still preserve the same continuoussolution. It is possible to rewrite the convection term of the variational form (2.13)in the following way

(u · ∇u,v) = 12(u · ∇u,v)− 1

2(u · ∇v,u) (3.20)

and similarly for the viscous term

1Re

(∇u,∇v) = 1Re

(12(∇u +∇u>), 1

2(∇v +∇v>

)). (3.21)

That (3.20) and (3.21) hold are proven in §A.6. These two modifications resultin two new natural boundary conditions; see the theorems below. The first one isindeed the same boundary condition as the stabilized natural boundary condition(3.18) when the stability fix is activated, which means that the stabilized conditionitself also is a true natural boundary condition of the discrete variational form (2.14).

30

Page 45: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

3.5. PROBLEMS WITH NATURAL BOUNDARY CONDITIONS IN PIPE FLOWCOMPUTATIONS

Theorem 3.2. If the (3.20) modification is applied, then we obtain the followingnatural boundary condition(

−p+ 1Re∇u− 1

2 |u|2)· n = 0, on ΓO. (3.22)

Proof. Integration by parts of (3.20) yields

(u · ∇u,v) = 12(u · ∇u,v)− 1

2(u · ∇v,u)

= 12

∫Ω

v · (u · ∇u) dΩ + 12

∫Ω

v · (u · ∇u) dΩ− 12

∮Γ

v · |u|2 · ndΓ

=∫

Ωv · (u · ∇u) dΩ− 1

2

∮Γ

v · |u|2 · ndΓ.

Substitute this into the variational form (3.7) and we get the boundary term∮Γ

v ·(−p+ 1

Re∇u− 1

2 |u|2)· ndΓ

From which the natural boundary condition (3.22) follow.

Theorem 3.3. If the (3.21) modification is applied, then we obtain the followingnatural boundary condition(

−p+ 12Re

[∇u +∇u>

])· n = 0, on ΓO. (3.23)

Proof. This follows directly from the linearity of inner products after substituting(3.21) into (3.7).

Heywood et al. applied the original natural boundary condition (3.10) and thetwo different ones (3.22), and (3.23), on a Poseuille flow problem. The original nat-ural boundary condition showed expected streamlines, but the two other conditionsimplied non-physical behavior at the outflow, with streamlines either pointing in-wards or outwards instead of straight. Since the boundary condition (3.22) indeedis similar to the stabilized boundary condition (3.18), the natural and the stabilizednatural boundary conditions are not expected to yield similar results.

31

Page 46: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of
Page 47: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

Chapter 4

Convective outflow boundary conditions– Theory and implementation

4.1 IntroductionA convective boundary condition is a specific artificial boundary condition thatneglects the diffusive effects near the boundary and assumes that the flow is purelyadvective. The general form of the convective boundary condition yields

∂φ

∂t+ c · ∇φ = 0, on ΓO, (4.1)

where φ is some physical quantity to be convected and c the convecting speed.Convective boundary conditions often go under the names “radiation”, “wave-permeable” or “non-reflective” boundary conditions. Other common names thatrelate to specific convective outflow boundary conditions are the “Sommerfeld radi-ation condition” and the “Orlanski boundary condition”.

The chapter is structured as follows: first we explain the background theory,then we present several ways to implement the convective condition in the spectralelement framework.

4.2 Exact "Non-reflecting" boundary conditionsIn the following section we review the fact of constructing “non-reflective” boundaryconditions of the wave equation. For highly convective problems the dissipation isnegligible, and the flow therefore becomes close to hyperbolic. By the superpositionprinciple of waves [14] it is possible to explain such flows in terms of wave modes.

4.2.1 The one dimensional caseThe one dimensional wave equation reads

∂2u

∂t2= c2∂

2u

∂x2 , (4.2)

33

Page 48: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

CHAPTER 4. CONVECTIVE OUTFLOW BOUNDARY CONDITIONS – THEORYAND IMPLEMENTATION

where c is the wave speed. By the linearity of the differential operators in (4.2) itis possible to separate (4.2) into(

∂t+ c

∂x

)(∂

∂t− c ∂

∂x

)u = 0. (4.3)

Equation (4.3) implies the existence of two types of solutions: right going solutionsu(x, t) that satisfy

∂u

∂t+ c

∂u

∂x= 0, (4.4)

and left going solutions u(x, t) that satisfy

∂u

∂t− c∂u

∂x= 0. (4.5)

By the superposition principle, the solution to (4.2) can then be expressed as a sumof the left and right going solutions

u(x, t) = u(x, t) + u(x, t). (4.6)

An exact continuous solution to the convective equation ut + cux = 0 is thereforethe solution of the wave equation where the right going solutions are the solutionsu = u, and where there are no left going solutions, i.e. u = 0. This is exactlywhat the convective boundary condition tries to achieve; and such boundary con-ditions are commonly called “non-reflecting” boundary conditions. If the flow ispurely hyperbolic, then the convective boundary condition is exact in the continu-ous setting. But if the convective boundary condition is an approximation, then theerrors do certainly imply wave solutions in the opposite direction; wave solutionsthat satisfy (4.5). This is always present in numerical simulations in some amount,due to round off errors and discretization errors of the approximation q ≈ 0, whichcan only be satisfied down to machine precision.

4.2.2 Higher dimensionsIn two and higher dimensions everything becomes much more complicated instantly.Now waves are allowed to travel in infinitely many directions. Consider the waveequation in two dimensions

∂2u

∂t2= c2

(∂2u

∂x2 + ∂2u

∂y2

). (4.7)

Let us for simplicity assume that c2 = 1. Then, in order to find “non-reflective”boundary conditions, (4.7) is rewritten to(

∂2

∂x2 −(∂2

∂t2− ∂

∂y2

))u = 0. (4.8)

34

Page 49: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

4.2. EXACT "NON-REFLECTING" BOUNDARY CONDITIONS

Splitting of the differential operator gives ∂

∂x−√∂2

∂t2− ∂2

∂y2

∂x+√∂2

∂t2− ∂2

∂y2

u = 0. (4.9)

Hence, a two dimensional analogue to (4.4) yields ∂

∂x+√∂2

∂t2− ∂2

∂y2

u = 0. (4.10)

However, the differential operator√

∂2

∂t2 −∂2

∂y2 is non-local1 in space and time, anddoes therefore become an integral equation that cannot be approximated locally bya numerical method. Approximations are therefore unavoidable, even in the con-tinuous case.

A convenient way to consider traveling waves is to study wave modes of the form

u = zκ = ei(ξx+ηy+ωt) (4.11)

where z = eiωt is the “temporal discretization factor” and κ = eiξx+iηy the “spatialamplification factor”. Such a solution satisfies the wave equation (4.7) exactly, butnot for all (ξ, η) and ω. By substituting the wave mode into the wave equation (withc = 1) the continuous dispersion relation ω(ξ/η) of the wave equation is obtained

ω2 = ξ2 + η2. (4.12)

Dividing Equation (4.12) with ω2 results in the relation of x and y velocities withconstant velocity one, i.e.(

− ξω,− η

ω

)= (− cos θ,− sin θ) , θ ∈ [0, 2π]. (4.13)

where the angle θ represents the angle of incidence for a wave traveling in thepositive x direction (see Figure 4.1). Thus, the solution to (4.7) admits plane wavesolutions traveling with constant speed one in all possible directions. If the angle θlies in the interval [−π, π] then the group velocity is positive and we have a rightmoving solution, and for the angle θ ∈ [π, 3π/2] the solution is left moving. SeeFigure 4.1a. Waves in the x direction are represented by

ξ = ±ω√

1−(η

ω

)2, (4.14)

1In order to check whether a differential equation holds at a certain point one only need to knowvalues in a neighborhood of the point if the differential operator is local. For a non-local differentialoperator one needs in particular information from points far away from the point considered. Thisis for instance the case if the differential operator involves integrals.

35

Page 50: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

CHAPTER 4. CONVECTIVE OUTFLOW BOUNDARY CONDITIONS – THEORYAND IMPLEMENTATION

ηω

ξω

θ

(a)

y

θ

x

(b)

Figure 4.1: (a) Dispersion relation of the two dimensional wave equation in Fourierspace. (b) Angle of incidence for a plane wave packet.

with ηω = sin θ ∈ [−1, 1], and θ ∈ [−π, π]. Due to the square root, the relation (4.14)

has two solutions for each ξ:

ξ = ω

√1−

ω

)2, (4.15)

and

ξ = −ω√

1−(η

ω

)2, (4.16)

where (4.15) is the dispersion relation of a left moving solution, and (4.16) thedispersion relation of a right moving solution. Let us study the positive equation(4.15). This dispersion relation cannot be a dispersion relation of a true differentialequation because of the square root (see the splitting (4.10)). The best one canachieve is to approximate the square root with a polynomial expansion (e.g. Taylorseries). Then one get a so called “pseudo-differential operator” instead. But as aconsequence the normal derivative ∂xu at any outflow boundary point cannot becomputed locally, either in space or time. To get a local boundary condition it isinstead better to approximate the pseudo-differential, by a real differential operator.But this also means that one must accept some spurious errors in the solution. Thisidea was proposed by Engquist and Majda [12]. Their approximation of the squareroot yields

ξ = ω

√1−

ω

)2≈ ωr(η/ω), r(η/ω) ∈ Q. (4.17)

36

Page 51: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

4.2. EXACT "NON-REFLECTING" BOUNDARY CONDITIONS

Since r(η/ω) is chosen as a rational function we can write

r(s) = pm(s)qn(s) , s := η

ω, (4.18)

where pm(s), qn(s) are polynomials of orders m, and n. Recall that, a side ofthe basic requirement that an outflow boundary condition must yield a well-posedproblem, the main goal is non-reflectivity. Reflections may actually be a bigger issuethan using a physically incorrect boundary condition since they influence the wholesolution. Approximating the rational function r(s) in (4.18) exactly yields a non-reflective boundary condition in the continuous setting. Hence, partial differentialequations that has a dispersion relation that satisfies r(s) as exact as possible is themain goal.

A natural choice of estimating r(s) is by Taylor expansion. But, it can be shownthat Taylor expansions is unstable for order greater than two and cannot thereforebe used generally [12]. Engquist and Majda proposed ways to approximate r(s) byPadé approximants instead, which showed to be a better alternative. It is worthy tomention that the Padé expansion is not proven to be the optimal. Other ways havebeen considered and proven to yield well-posed results too (Trefethen and Halpern[42]). For the easiest case: p0, and q0 in (4.18) the Padé approximant is simplyone, resulting in ξ = ω, which is the dispersion relation of the first order advectionequation (the convective condition); which is obviously only true if η → 0 (seeFigure 4.1). Higher order approximations can be considered in the Table 4.1. Aswe can notice, the boundary conditions become very complex already at the thirdorder approximation. Also the Padé approximants are very accurate if s → 0, butnot if s± 1 (θ ≈ π/2, 3π/2); see Figure 4.2. A lot of studies have been made for thewell-posedness of these boundary conditions. For example Trefethen and Halpern[42] found that if r(s) is approximated by sufficiently many points in (−1, 1), thenwell-posedness is assured. They also found that absorbing boundary conditions ofthis kind are well-posed if and only if (m,n) lies in one of two distinct diagonals inthe Padé table, where the Padé table is the table that is obtained by write out allpossible choices of (m,n), m,n ≥ 0.

The Padé approximants and the exact boundary conditions presented by En-gquist and Majda are exact in the continuous case. They make it possible to specifyoutflow boundary conditions in forms of a differential equation, but since the ex-pressions become very complicated already at lower orders they are not easy todiscretize. The convective boundary condition is the first Engquist-Majda bound-ary condition, but certainly the less accurate. All angles of incidence of incomingwaves to the boundary other than the correct will imply a poor approximation ofthe dispersion relation of the wave, which implies reflections (waves in the oppositedirection).

37

Page 52: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

CHAPTER 4. CONVECTIVE OUTFLOW BOUNDARY CONDITIONS – THEORYAND IMPLEMENTATION

r(s) fi(u)

1 f1(u) =(∂u∂t + ∂u

∂x

)∣∣∣x=xO

= 0

1− 12s

2 f2(u) =(∂2u∂t2 + ∂2u

∂t∂x −12∂2u∂y2

)∣∣∣x=xO

= 01− 3

4 s2

1− 14 s

2 f3(u) =(

∂3u∂t3∂x −

14

∂3u∂x∂y2 − ∂3u

∂3t + 34∂3u∂t∂y2

)∣∣∣x=xO

= 0...

...

fN+1(u) =(∂∂tfN (u)− 1

4∂u∂y fN (u)

)∣∣∣x=xO

= 0

Table 4.1: The Engquist-Majda boundary conditions.

ξω

ηω

Figure 4.2: The approximation problem. The solid line half circle is the square rootsolution

√1− s2 to be approximated, and the dashed line a high order polynomial

approximation.

4.3 The Sommerfeld radiation condition

Named after the theoretical physicist Arnold Sommerfeld (1868-1951); the Som-merfeld radiation boundary condition is a classical simple form of the convectivecondition (4.1), by choosing the convection speed c constant. The Sommerfeld radi-ation condition was first used for electromagnetic waves to eliminate incoming wavesin the solution generated from an oscillating dipole antenna. The term “radiationboundary condition” was found by Sommerfeld, who defined it as the boundarycondition that “the sources must be sources, not sinks, of energy. The energy whichis radiated from the sources must scatter to infinity; no energy may be radiatedfrom infinity into the field.” ([40], p.189).

The problem of determining c is certainly crucial, but not always possible. TheSommerfeld radiation condition is a great choice if the convection speed can beaccurately approximated. But if the approximation is hard to perform, the Som-merfeld condition is certainly not a great choice. Instead, one may look at otherchoices to estimate the convection speed iteratively.

38

Page 53: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

4.4. ESTIMATING THE CONVECTION SPEED

4.4 Estimating the convection speedIf the Sommerfeld condition does not give appropriate results one may test to es-timate the convection speed. It can be a question of estimating the speed in alldirections, or to vary the speed in the normal direction to the boundary.

The choice of convection speed for the convective condition is often a non trivialtask, especially if the flow contains vortices etc. If we want to accurately computethe convective boundary condition the choice of convecting speed may indeed bethe most important thing in the whole implementation. Wrong convection speedslead to reflections; this is confirmed by our numerical results in §5.4.2.

4.4.1 The Orlanski schemeThe classical method to estimate a varying convection speed is to use a “Orlanskitype” boundary condition, which is a commonly used name for computing the con-vection speed locally. The “Orlanski boundary condition” refers to the well citedwork by Orlanski (1976) [29]. Orlanski proposed a method of estimating the con-vection speed from the solution at the previous time step. The basic idea stemsfrom rewriting the convective condition φt + Cφx = 0 as

C = ∂φ/∂t

∂φ/∂x(4.19)

and then discretize the derivatives using the Leap-Frog finite differences scheme.The method has shown some success, but does direct relate to the CFL2 numberwhich directly relates to the stability of the scheme. Orlanski proposed ways to getrid of the CFL related problem by limit the value of C to the interval

0 ≤ C ≤ ∆x∆t . (4.20)

Then one can freely chose ∆x and ∆t such that stability is ensured. Several testshave been made regarding both the Orlanski scheme and the estimation of C inthe finite differences community; the general conclusion is that the Orlanski schemeresults in a C that is often oscillating with time, either being over or under-predicted.

In a spectral element framework, the implementation of the Orlanski scheme ismuch more complicated than the original finite differences approach. Now we havea non-uniform grid, that means a varying ∆x. The ∆x between a boundary pointand its neighbor is often very small. Hence, ∆t must be chosen very small to ensurethe relation (4.20).

The Orlanski method can in many situations be a nice tool to use. However, ifthe flow is dominated with strong disturbances with large local velocity derivativesin space, then it will be very hard to gain stable results. Since we are mainlyinterested in such flows, we do not use the Orlanski scheme in our implementations.

2The CFL condition (Courand–Fredrich–Leivy, 1928) is a non-dimensional number that isa necessary condition for stability. For the BDF3/EXT3 discretization, the CFL bound is|u|∆t/∆x ≤ 0.6339.

39

Page 54: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

CHAPTER 4. CONVECTIVE OUTFLOW BOUNDARY CONDITIONS – THEORYAND IMPLEMENTATION

4.4.2 Exponential weighted moving averageAs was just mentioned; often in high Reynolds number flows, and in particularwhen we are concerned with turbulence, the flow is dominated by flow instabilitiessuch as eddies and vortices. Using a local estimate of the convection speed fromthe velocity fields will certainly not give the right group velocity of the flow overthe boundary. Vortices and eddies may indeed give a negative local velocity, eventhough they are superimposed on top of a base flow.

One way to obtain a smooth estimate of a solution over time is to use a low-pass filter. The basic idea is to disregard the disturbances in the flow and thereforeobtain a sufficiently good estimation of the base flow.

The exponentially weighted moving average (EWMA) filter (Robert GoodellBrown in 1956) is a good choice, since it unlike some other averaging methods doesnot require any minimum number of observations to be made before it begins toproduce results. For a continuous function q(t) EWMA is identical to the discretefirst-order causal low-pass filter

q =∫ t

−∞T (τ − t,∆)q(τ)dτ, (4.21)

where q is the temporally filtered quantity, T is the parameterized filter kernel, and∆ is its associated filter width. There are basically two requirements the kernel Tmust satisfy: (i) it must be positive, and (ii) if ∆ → 0 then T → δ, where δ is thedirac delta function [20]. One simple kernel that fulfills (i)-(ii) is the exponentialkernel

T (τ − t,∆) = 1∆ exp

(τ − t

). (4.22)

By substitution into (4.21) one obtains

q = 1∆

∫ t

−∞exp

(τ − t

)q(τ) dτ. (4.23)

The integral formulation of the filter (4.23) is not practical since it requires thestorage of the complete time history of the signal q. Instead the differential form ispreferred, which is obtained by derivating (4.23) with respect to t

dqdt = q − q

∆ , (4.24)

which can easily be discretized in time. Applying the BDFk scheme (§2.4.1) yields

1∆t

k∑i=0

βiqn+1−i = qn+1 − qn+1

∆ . (4.25)

Rearrangement gives

qn+1 =

(∆tqn+1

∆ −∑ki=1 βiq

n+1−i)

β0 + ∆t/∆ . (4.26)

40

Page 55: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

4.4. ESTIMATING THE CONVECTION SPEED

The most common form of this discretization is to use the first order BDF1 (Eulerimplicit) version, which yields

qn+1 = αqn+1 + (1− α)qn, (4.27)

where

α =( ∆

∆ + ∆t

). (4.28)

The parameter α ∈ (0, 1) controls the strength of the filter. The practical expla-nation of the variables simply are: qn is the solution at time-step n, and qn is thefiltered solution at time-step n. Some examples of the exponential filter (4.27) canbe seen in Figure 4.3.

(a)

-1.5

-1

-0.5

0

0.5

1

1.5

0 1 2 3 4 5 6t

(b)

-1.5

-1

-0.5

0

0.5

1

1.5

0 1 2 3 4 5 6t

(c)

-0.2

0

0.2

0.4

0.6

0.8

1

1.2

0 0.2 0.4 0.6 0.8 1t

(d)

-0.2

0

0.2

0.4

0.6

0.8

1

1.2

0 0.2 0.4 0.6 0.8 1t

Figure 4.3: Exponential filter applied on a noisy sinus curve: (a) α = 0.2, (b)α = 0.7; and the filter applied to a typical discontinuity: (c) α = 0.2, (d) α = 0.7.

41

Page 56: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

CHAPTER 4. CONVECTIVE OUTFLOW BOUNDARY CONDITIONS – THEORYAND IMPLEMENTATION

4.5 Nek5000 implementationsIn this section we present different discretization techniques of the convective con-dition (4.1) to use with the Nek5000 solver. In a first implementation we apply theBDFk/EXTk scheme on the convective condition. In a second implementation weapply the exact solution of the convective equation that satisfies linear characteristiclines in time. And the third implementation considered, that is still under develop-ment, is based on the same principle as the second but now non-linear characteristiccurves (based on the OIFS/Characteristic implementation) are considered insteadof linear ones.

4.5.1 BDFk/EXTkThe discrete variational form of (4.1) yields:

Find u ∈ VN such that

ddt(u,v)GLL = −(c · ∇u,v)GLL, ∀v ∈ V0,N , (4.29)

where the quadrature (·, ·)GLL is computed as in §A.2.2. Proceeding as in §2.3.2 weend up with the following semi-discrete form

Mdudt = −Cu (4.30)

where M is the stiffness matrix defined in (2.23) and where C is given by (shall notbe confused with C in §2.3.5)

C = M(

d∑i=1

ciDi

)(4.31)

where cidi=1 are the convection speeds, and Di the differentiation matrices (2.27)-(2.28).Note that C may be time-dependent if e.g. a exponential moving averagetechnique (§4.4.2) is used.

Time discretization is applied to the left hand side of (4.30) by the BDFk scheme

ddtMun+1 ≈ 1

∆tMk∑i=0

βiun+1−i, (4.32)

where βiki=0 is the set of backward differentiating coefficients (see table A.2). Forthe convective term of (4.30) the explicit extrapolation scheme EXTk is applied

Cn+1un+1 ≈k∑i=1

αiCn+1−iun+1−i, (4.33)

42

Page 57: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

4.5. NEK5000 IMPLEMENTATIONS

where αki=1 are the extrapolation coefficients (see table A.3). Equations (4.32)and (4.33) together yields

un+1 =[−

k∑i=1

βiun+1−i −∆tM−1(

k∑i=1

αiCn+1−iun+1−i)]

/β0. (4.34)

This expression is valid for all points in Ω. To get a matrix form that treats theboundary points only, we add a maskMOBC which is one for the outflow boundarypoints and zero elsewhere (like the subroutine userbc() do in the Nek5000 code;see, §C). The final form of the boundary condition can now be stated as

un+1 =[−

k∑i=1

βiun+1−i −∆tMOBCM−1(

k∑i=1

αiCn+1−iun+1−i)]

/β0. (4.35)

4.5.2 Linear characteristic method

It is well known that the convective equation (4.1) has an exact solution for suitableinitial conditions. Any initial condition φ0(x) := φ(x, t = 0) simply moves withconstant shape in space. A specific point travels along a linear trajectory in time;after a so called characteristic line dx

dt = c, resulting in the continuous solutionφ(x, t) = φ0(x + ct). The discrete solution follows as

φ(x, tn+1) = φ(x− c∆t, tn), (4.36)

for an arbitrary initial condition φ0(x). Thus, if the condition (4.36) is imposed asan outflow boundary condition over un at x = xO (outflow boundary points), then

un+1(xO) = un(xO − c∆t). (4.37)

This implementation in comparison to the BDF3/EXT3 discretization is purelylocal. For each boundary point we only need to pick the solutions at the locationsxO − c∆t. Figure 4.4 shows a one-dimensional case.

One problem we are concerned with in this implementation is that the locationsxO−c∆t are significantly not points of the grid, and must therefore be interpolated.We use linear interpolation for this purpose,

un(xO − c∆t) = un(x(O−1)) + u(xO − c∆t− x(O−1))un(xO)− un(x(O−1))

xO − x(O−1),

(4.38)

where x(O−1) is the location of the point one x-step into the domain from the outflowboundary. More sophisticated (higher order) interpolation methods can certainly beused too, and are also to prefer for deformed grids etc. However, the interpolationmay itself be the most computational expensive part of this implementation.

43

Page 58: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

CHAPTER 4. CONVECTIVE OUTFLOW BOUNDARY CONDITIONS – THEORYAND IMPLEMENTATION

tn+1

tn

xO

x

xxO − c∆t

xO

Figure 4.4: The solution to the one dimensional advection equation at an outflowboundary can be written as u(xO, tn+1) = u(xO− c∆t, tn). The solution is constantalong its characteristic lines (dotted). Here the initial condition is a Gaussian pulse.

4.5.3 Curved characteristics method (OIFS)If we assume that the convection speed of the convective equation (4.1) is a time-dependent smooth function, then the characteristic lines are curved, i.e. the solutionto φt+c(t)φx is x′(t) = c(t). In the discrete setting where the convection speed mustbe approximated, this can lead to inaccurate approximations, especially if drasticchanges of the derivative of c(t) appear in between two time steps.

Since curved characteristics are part of the Nek5000 code in the OIFS /Charac-teristic time discretization (§2.4.2), the same sub-routines can be used. The curvedcharacteristics are then treated by Runge Kutta sub-stepping. Even though wethrough this implementation can use more accurate convection speeds, the con-vective condition is still a rather rough approximation to the incompressible NavierStokes equations. The usefulness of this implementation regarding accuracy is there-fore open for further discussion. For instance, if the convection speed cannot beestimated with a great accuracy, it is no reason to use this implementation over thelinear analog. However, if the OIFS/Characteristics time-stepping is used to ensurestability, the Runge–Kutta sub-stepping may be used also for the boundary points.

44

Page 59: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

Chapter 5

Numerical results

5.1 IntroductionNumerical simulations are performed to test several properties of the outflow bound-ary conditions presented in §§3,4. Convergence rates in both time and space areinvestigated, and a detailed comparison of natural against convective outflow bound-ary conditions is performed in two highly convective test cases: a single disturbance(vortex) moving across the outflow boundary, and the classical flow past a circularcylinder case (Kàrmàn vortex street). Accuracy is analyzed by comparing the so-lution to a reference solution, computed either from an exact solution or from thesolution for an elongated domain. Stability is considered by studying the effects asthe strength of disturbances is increased.

Four outflow boundary conditions are considered; see below. The function fb isa forcing function that is added to all the conditions (which is equal to the zerovector in the original setting).

NBC1. The natural boundary condition of the variational form derived in §3.2,i.e. the Nek5000 “O” condition:

−pn + 1Re

(n · ∇u) = fb, on ΓO. (5.1)

NBC2. The stabilized natural boundary condition proposed by Dong et al. [10],presented in §3.4

−pn + 1Re

(n · ∇u)−[1

2 |u|2Θ(n · u)

]n = fb, on ΓO, (5.2)

where negative flux is controlled by the smooth step function

Θ(n · u) = 12

[1− tanh

(n · uUδ

)], (5.3)

where the smoothness is regulated by the parameter δ, and where U is base flowmagnitude in the stream-wise direction.

45

Page 60: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

CHAPTER 5. NUMERICAL RESULTS

CBC1. The BDFk/EXTk (k = 2, 3) discretized convective boundary conditionderived in §4.5.1,

un+1 =[−

k∑i=1

βiun+1−i −∆tMOBCM−1(

k∑i=1

αiCn+1−iun+1−i)

+ fnb

]/β0. (5.4)

where αi and βi are the EXT3 respective BDF3 coefficients (see §§A.4,A.5).

CBC2. The linear characteristic boundary condition derived in §4.5.2,

u(x, tn+1) = u(x−∆tcnn, tn) + fnb , on ΓO. (5.5)

For all tests in this chapter the BDFk/EXTk time discretization of Nek5000 isused. If nothing else is mentioned the time-step size is chosen as ∆t = 0.001, andthe standard element order is N = 12. For NBC1,CBC1, and CBC2 we mainlyuse the collocated setting PN × PN , since we experienced it less noisy than thestaggered counterpart PN ×PN−2 (more about that in §5.4.1). The implementationof NBC2 was performed by editing already existing subroutines in the Nek5000code corresponding to the free-stress formulation (logical IFSTRS, see §C, and [16]),which is only working in the PN × PN−2 setting at date.

5.2 Temporal order estimation, unsteady flowIn this section we consider an unsteady flow with a known analytic solution thatsatisfies the convective outflow boundary condition exactly. The goal is to study ifthe temporal convergence order of the solver is preserved when it is used togetherwith the new convective conditions CBC1 and CBC2. The choice of temporal orderin Nek5000 is given by the parameter TORDER (in the .rea file; see §C); which equalsthe order the BDFk/EXTk k = 2, 3 discretization. It is easy to test that the code isconsistent with TORDER by using exact boundary conditions. This fact has also beentested numerically before. See e.g. the example problem ”eddy” in the Nek5000repository [16].

An exact unsteady flow solution over the domain [0, 2π]2, which is adapted from[44] is given by

u = sin(t− x) sin(y), (5.6a)v = − cos(t− x) cos(y), (5.6b)

p = 14(cos(2(t− x))− cos(2y)). (5.6c)

where t ≥ 0. It is straight forward to test by substitution that this is a solution to theconvective boundary condition ut + c · ∇u = 0 with the constant convection speed

46

Page 61: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

5.2. TEMPORAL ORDER ESTIMATION, UNSTEADY FLOW

0 1 2 3 4 5 6

x

0

1

2

3

4

5

6

y

u

0 1 2 3 4 5 6

x

0

1

2

3

4

5

6

y

v

0 1 2 3 4 5 6

x

0

1

2

3

4

5

6

y

Pressure

Figure 5.1: The exact unsteady flow fields (5.6a)-(5.6c) at time t = 1. Solid linesrepresents positive- and dashed lines negative- values.

c = (1, 0)>. The fact that the solution exactly satisfies the convective conditionimplies that no forcing (fb) has to be added to CBC1 and CBC2 in order to obtainan expression of the solution at the outflow boundary. The flow fields at time t = 1can be considered in Figure 5.1. The flow moves in the positive x direction.

The domain was selected such that the solution undergoes a full period in they direction and periodic boundary conditions can therefore be used. Hence, thedomain [0, 2π] × [0, 2π] was chosen. For the time advancement errors to dominatethe spatial counterparts the domain was discretized into a sufficiently dense grid;8 × 8 spectral elements of order N = 16 was chosen. At the left boundary weused the given exact solution (5.6a)-(5.6b) as a Dirichlet boundary condition. Atthe upper and lower boundaries, periodic boundary conditions were set, and at theright boundary we imposed one of the convective boundary conditions.

To observe the ratio of the temporal discretization errors, the x-velocity solutionwas systematically computed at t = 1 for varying time step-sizes resulting in asequence of numerical solutions

uh/2ini=0, n ∈ N. (5.7)

Here, the subscript represents a constant temporal step-size h/2i = ∆t. The largeststep-size was chosen as h = 0.004, and four different solutions were computed(n = 3).

The temporal order can be estimated from a log-log diagram. Let us recall theprocedure: Since the error is a finite number, it follows that; if the temporal orderis N , there exist a constant C ∈ R independent of h such that

|u∆t − u| ≤ C∆tN . (5.8)

It is also possible to write

u∆t − u = C∆tN +O(∆tN+1). (5.9)

47

Page 62: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

CHAPTER 5. NUMERICAL RESULTS

(a)

10−11

10−10

10−9

10−8

10−7

10−6

10−5

10−4

10−3

10−4 10−3 10−2 10−1

∆t

CBC1

TO2,INTO2,PTO3,INTO3,P

R2R3

(b)

10−11

10−10

10−9

10−8

10−7

10−6

10−5

10−4

10−3

10−4 10−3 10−2 10−1

∆t

CBC2

TO2,INTO2,PTO3,INTO3,P

R2R3

Figure 5.2: Temporal order estimation. TO2 - TORDER=2, TO3 - TORDER=3, IN -‖ · ‖∞, P - error in the point (x = xO, y = 3.92), R2 - Reference solution of order 2,R3 - Reference solution of order 3.

Then using the logarithm laws we get

log |u∆t − u| = log |C|+N log(∆t) +O(∆t). (5.10)

from which it is easy to determine N . Since (5.10) is a linear function of the formy = ax+ b that maps the step-size ∆t to the error |u∆t − u|, the order N is easilydetermined as the slope of the curve N log(∆t) if (5.10) is plotted in a log-log plotdiagram assuming that the order is the same for all ∆t. Consider the log-log plotof the solutions corresponding to CBC1 and CBC2 in Figure 5.2a-b.

In Figure 5.2a we observe that CBC1 has temporal orders that are very closeto the expected (k = 2, 3), and that the slopes of the error curves are close toconstant. In Figure 5.2b we see the order estimation of the CBC2 condition. Herethe temporal orders are close to 2 and 3 for small ∆t, but smaller if ∆t is increased.This may also be expected since the implementation of CBC2 assumes that thesolution has constant shape, which is a better approximation for small ∆t.

Numerical values for the temporal orders can be computed from the error ratiosof the sequence of numerical solutions (5.7). An approximation of the order p followsfrom ∣∣∣∣∣ u∆t − u

u∆t/2 − u

∣∣∣∣∣ = C∆tN +O(∆tN+1)C(∆t/2)N +O((∆t/2)N+1) = 2N +O(∆t) (5.11)

Thus,

log2

∣∣∣∣∣ u∆t − uu∆t/2 − u

∣∣∣∣∣ = N +O(∆t). (5.12)

48

Page 63: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

5.3. SPATIAL CONVERGENCE, KOVASZNAY FLOW

The values computed this way can be considered in Table 5.1. Since we havecomputed the solution using four different ∆t, the min and max ratios (5.12) wereconsidered. We can see that the orders of CBC2 are pretty much below the correctorders in the outflow boundary point. Indeed, the minimal order was closer to 2(2.36) than 3 in that case. The orders for CBC1 however, are very close to thecorrect orders.

TO2, e(xO, 3.92) TO2, ‖e‖∞ TO3, e(xO, 3.92) TO3, ‖e‖∞CBC1 min 2.00 2.00 3.00 3.00CBC1 max 2.00 2.00 3.00 3.00CBC2 min 1.89 1.94 2.36 2.91CBC2 max 1.97 1.98 2.85 2.98

Table 5.1: Time order computation. TO2 : Time order = 2; TO3 Time order = 3;‖e‖∞ : max norm of the error; e(xO, 3.92) : error in the outflow boundary point(xO, 3.92).

5.3 Spatial convergence, Kovasznay flowTo estimate numerical convergence rates in space of the new implementations andanalyze the accuracy of outflow conditions in a steady flow situation we consider Ko-vasznay flow [21], which is a simple exact steady state solution to the incompressibleNavier–Stokes equations.

The velocity and pressure fields of Kovasznay flow are given by

u = 1− eλx cos(2πy), (5.13a)

v = λ

2πeλx sin(2πy), (5.13b)

p = 12(1− e2λx

), (5.13c)

where λ is a parameter that contains the Reynolds number contribution to the flow:

λ = Re

2 −

√Re2

4 + 4π2. (5.14)

Physically, the Kovasznay flow is the low-speed flow of a viscous fluid past anperiodic array of cylinders. Consider streamlines and contour plots of the flow fields(5.13a)-(5.13c) over the domain [−0.5, 1]× [−0.5, 1.5] in Figure 5.3. The Reynoldsnumber was chosen as Re = 40.

49

Page 64: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

CHAPTER 5. NUMERICAL RESULTS

−0.5 0 0.5 1−0.5

0

0.5

1

1.5Streamlines

−0.5 0 0.5 1−0.5

0

0.5

1

1.5u

−0.5 0 0.5 1−0.5

0

0.5

1

1.5v

−0.5 0 0.5 1−0.5

0

0.5

1

1.5p

Figure 5.3: Kovasznay flow solutions. Solid lines represent positive and dotted linesnegative values. The axes are: x :→, y :↑. The flow moves in the positive x direction.The min and max values of the respective fields are given by: min(u) = −0.6191,max(u) = 2.6191, min(v) = −0.2483, max(v) = 0.2483, min(p) = −0.8107, andmax(p) = 0.4272.

5.3.1 Convergence ratesIn a first test we analyze if the convective boundary conditions preserve the expo-nential convergence of the spectral element discretization. To compute the spatialconvergence rate the spatial errors must be dominating over all other possible er-rors in the solution. To test the outflow boundary conditions, that do not satisfythe Navier–Stokes equations exactly, we need to add necessary forcing (fb) to theoutflow conditions. Since we know the exact solution beforehand, we simply com-pute the remainder as (5.13a)-(5.13b) are substituted into the expressions of theboundary conditions.

We consider the steady state solutions that were computed from the initialcondition (1, 0)> on grids with a fixed number of spectral elements (4 × 4) withmonotonically varying element orders in the interval 3 to 16. For the computationaldomain, we used [−0.5, 1] × [−0.5, 1.5], similar to the solutions depicted in Figure5.3. At the inflow the exact solutions (5.13a)-(5.13b) were imposed as Dirichletconditions. At the upper and lower boundaries periodic boundary conditions wasset, and at the outflow one of the convective boundary conditions was imposed.

The forcing that is required for CBC1 (with c = (1, 0)>) to satisfy the Kovaznayflow is computed as:

fx,CBC1 = (ut + 1ux)|x=xO = −λeλxO cos(2πy), (5.15a)

fy,CBC1 = (vt + 1vx)|x=xO = λ2

2πeλxO sin(2πy). (5.15b)

And in the case of CBC2, (with c = (1, 0)>) similarly

fx,CBC2 = u(xO, y)− u(xO − 1∆t, y) = eλx cos(2πy)(e−λ1∆t − 1

), (5.16a)

fy,CBC2 = v(xO, y)− v(xO − 1∆t, y) = −eλx sin(2πy)(e−λ1∆t − 1

). (5.16b)

50

Page 65: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

5.3. SPATIAL CONVERGENCE, KOVASZNAY FLOW

Since this test is about spatial convergence, sufficiently small time-step sizeswere chosen such that the temporal discretization errors did not affect the spatialcounterparts; ∆t = 0.001 was tested to be small enough for this purpose. After asteady state was reached the errors between the numerical solution and the exactsolution (5.13a)-(5.13b) in both the L2 and L∞ norms were computed. In Figure5.4 the norms are plotted against element orders for the CBC1 and CBC2 caseswith the forcing functions (5.15)-(5.16) added. For comparison we also computedthe errors using exact boundary conditions (denoted as E in the Figures). From theplots we can observe that exponential convergence is obtained down to the giventolerance levels (≈ 10−12) for all outflow boundary conditions considered; in boththe PN × PN and the PN × PN−2 formulations.

(a)

10−14

10−12

10−10

10−8

10−6

10−4

10−2

100

2 4 6 8 10 12 14N

CBC1

P-B-L2P2-B-L2P-E-L2P2-E-L2

(b)

10−14

10−12

10−10

10−8

10−6

10−4

10−2

100

2 4 6 8 10 12 14N

CBC1

P-B-LIP2-B-LIP-E-LI

P2-E-LI

(c)

10−14

10−12

10−10

10−8

10−6

10−4

10−2

100

2 4 6 8 10 12 14N

CBC2

P-B-L2P2-B-L2P-E-L2P2-E-L2

(d)

10−14

10−12

10−10

10−8

10−6

10−4

10−2

100

2 4 6 8 10 12 14N

CBC2

P-B-LIP2-B-LIP-E-LI

P2-E-LI

Figure 5.4: Spatial convergence in L2 and L∞ norms. P: PN ×PN , P2: PN ×PN−2,B : BDF3/EXT3, E : Exact, L2: L2-norm, LI: L∞-norm.

51

Page 66: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

CHAPTER 5. NUMERICAL RESULTS

5.3.2 AccuracyAs x → ∞ it directly follows from (5.13a)-(5.13c) that u → 1, v → 0 and p → 0.This means that the shape of the streamlines converge to straight lines, and thatthe base flow at the given x converge to (1, 0). Hence for the convective boundaryconditions the convecting speed c = (1, 0)> will be correct for large x, but not asx→ −0.5.

The accuracy of the boundary conditions depends on how well they approxi-mates the Navier–Stokes equations for the specific problem; the errors are computedequally to the forcing function expressions derived in (5.15)-(5.16) if the convectionspeed is specified. In a complex flow where the exact solution is not known, nospecific forcing can generally be derived for the outflow boundary conditions. Forthe convective boundary conditions certainly the choice of c becomes the only user-dependent source of errors.

For comparison we now also consider the error NBC1 gives us. The forcingfunctions (errors) of NBC1 are computed as

fx,NBC1 =(−p+ 1

Reux

)∣∣∣∣x=xO

= −12(1− eλxO))− 1

ReλeλxO cos(2πy), (5.17a)

fy,NBC1 = 1Re

vx|x=xO = λ2

2πReeλxO sin(2πy). (5.17b)

Consider in Figure 5.5 the forcing functions (errors) (5.15)-(5.17) of the boundaryconditions plotted against the location of the outflow boundary for all three outflowboundary conditions (NBC1, CNC1 and CBC2). NBC2 does not make sense heresince the flux over the outflow boundary is positive for both the x and y velocityfields. It is noticeable both from the equations and the plots that, as xO →∞ theerrors tend to zero exponentially for all three outflow conditions. CBC1 with unitconvection speed gives largest- and CBC2 with unit convection speed the smallest-errors of the three. However, both the convective conditions do converge to homo-geneous Neumann conditions as the flow approaches a steady state (since ut → 0);see Figure 5.5.

The errors of the convective conditions are easy to deduce. If we disregarderrors related to pressure, the errors can directly be described by the diffusion term1Re∇

2u of the incompressible Navier–Stokes, which do converge to zero if Re→∞(which imply that the convective condition equals the incompressible Navier–Stokesequation as c = u, ∇p = 0 and ut = 0), but is a problem for low Reynolds numbers.

It is of course possible to add the diffusion term to the convective boundarycondition. Then, the convective condition becomes the advection-diffusion equa-tion. This condition may work better for the Kovasznay flow case, but one cannotguarantee that it will be a better condition generally; this requires more analysis.But for high Reynolds numbers the diffusion term is of no interest anyway since itis small; we have restricted ourselves to the convective conditions and highly con-vective problems beforehand. Outflow boundary conditions for laminar flow may beapproached differently, which is worthy to mention. For the interested reader, tests

52

Page 67: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

5.3. SPATIAL CONVERGENCE, KOVASZNAY FLOW

fx,CBC1

0 1 2 3 4 5xO -0.50

0.51

1.5

y-1

-0.8-0.6-0.4-0.2

00.20.40.60.81

fy,CBC1

0 1 2 3 4 5xO -0.50

0.51

1.5

y-0.15-0.1-0.05

00.050.1

0.15

fx,CBC2

0 1 2 3 4 5xO -0.50

0.51

1.5

y-0.001

-0.0008-0.0006-0.0004-0.0002

00.00020.00040.00060.00080.001

fy,CBC2

0 1 2 3 4 5xO -0.50

0.51

1.5

y-0.001-0.0008-0.0006-0.0004-0.0002

00.00020.00040.00060.00080.001

fx,NBC1

0 1 2 3 4 5xO -0.50

0.51

1.5

y-0.025-0.02-0.015-0.01-0.005

00.0050.01

0.0150.02

0.025

fy,NBC1

0 1 2 3 4 5xO -0.50

0.51

1.5

y-0.004-0.003-0.002-0.001

00.0010.0020.0030.004

Figure 5.5: The forcing functions (5.15)-(5.17) plotted for varying outflow locations.

53

Page 68: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

CHAPTER 5. NUMERICAL RESULTS

with the advection-diffusion treated outflow boundary condition can be consideredin the paper by Miyauchi et al. [27].

Another interesting aspect that relates to the choice of convection speed forthe convective boundary conditions. Since Kovasznay flow is a steady flow, thesolution is equivalent to the base flow. Hence a correct estimation of the convectionspeed will be the same as the solution (5.13a)-(5.13b). But, if the flow has non-zerodiffusion (which it certainly has for Re = 40), then the solution will not be accurate.The flow field for CBC1 can be considered in Figure 5.4d. As we can see, there isa significant amount of errors in the contour plots close to the outflow boundaryespecially in the v field. A “correct” convection speed does not give appropriateresults here.

In Figure 5.6 we note that the natural condition shows better results for thistest case. The streamlines are consistent with the streamlines of the exact solution(compare to Figure 5.3). There are some direct possible reasons to this. The naturalcondition does not depend on time; it does not converge to a homogeneous Neumanncondition in a steady state because of the pressure term; and the spatial derivativehas the 1/Re factor in front, which makes it smaller than the counterpart of theconvective condition. The accuracy of the pressure field is also better in the NBC1results compared to the results for the convective conditions.

As a final remark; we might point out that the purpose of the convective con-dition is not to use it in steady flows and in particular not for low Reynolds num-bers. But, one may bear in mind, that if the convective condition is used for lowerReynolds number flows, even though a correctly estimated convection speed is avail-able, the boundary condition may not produce streamlines that are consistent withthe true solution.

54

Page 69: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

5.3. SPATIAL CONVERGENCE, KOVASZNAY FLOW

(a)

−0.4−0.2 0.0 0.2 0.4 0.6 0.8 1.0

x

−0.5

0.0

0.5

1.0

1.5

y

u

−0.4−0.2 0.0 0.2 0.4 0.6 0.8 1.0

x

−0.5

0.0

0.5

1.0

1.5

y

v

−0.4−0.2 0.0 0.2 0.4 0.6 0.8 1.0

x

−0.5

0.0

0.5

1.0

1.5

y

Pressure

(b)

−0.4−0.2 0.0 0.2 0.4 0.6 0.8 1.0

x

−0.5

0.0

0.5

1.0

1.5

y

u

−0.4−0.2 0.0 0.2 0.4 0.6 0.8 1.0

x

−0.5

0.0

0.5

1.0

1.5

y

v

−0.4−0.2 0.0 0.2 0.4 0.6 0.8 1.0

x

−0.5

0.0

0.5

1.0

1.5

y

Pressure

(c)

−0.4−0.2 0.0 0.2 0.4 0.6 0.8 1.0

x

−0.5

0.0

0.5

1.0

1.5

y

u

−0.4−0.2 0.0 0.2 0.4 0.6 0.8 1.0

x

−0.5

0.0

0.5

1.0

1.5

y

v

−0.4−0.2 0.0 0.2 0.4 0.6 0.8 1.0

x

−0.5

0.0

0.5

1.0

1.5

y

Pressure

(d)

−0.4−0.2 0.0 0.2 0.4 0.6 0.8 1.0

x

−0.5

0.0

0.5

1.0

1.5

y

u

−0.4−0.2 0.0 0.2 0.4 0.6 0.8 1.0

x

−0.5

0.0

0.5

1.0

1.5

y

v

−0.4−0.2 0.0 0.2 0.4 0.6 0.8 1.0

x

−0.5

0.0

0.5

1.0

1.5

y

Pressure

Figure 5.6: (a) NBC1, (b) CBC1 with c = (1, 0)> (c) CBC1 with c = uexact, (d)CBC2 with c = (1, 0)>.

55

Page 70: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

CHAPTER 5. NUMERICAL RESULTS

5.4 Convecting vortexIn this section we consider the problem of a single vortex that is superimposed ontoa two dimensional flow. This is a typical convective test problem with a controllabledisturbance. The flow domain is chosen as [0, L1] × [0, L2], and the base flow anunit velocity in the x direction (a so called plug flow). At the inflow ΓI a Dirichletboundary condition is imposed equal to the base flow u|ΓI = (1, 0)>; and on theupper and lower boundaries periodic boundary conditions were set; see Figure 5.7a.The vorticity distribution of the vortex at the initial state (t = 0) was chosen as

ω(r) = A

R2 e− r2

2R2

(r2

R2 − 2), (5.18)

where r =√

(x− x0)2 + (y − y0)2, A is the vortex strength and R is the vortexradius, see Figure 5.7b. This configuration is an useful test case since the totalcirculation of the vortex is zero and therefore no corrections of the initial boundaryconditions are needed [33]. In our standard configuration the initial placement ofthe vortex was chosen in the middle of the domain x0 = L1/2, y0 = L2/2. Due tothe fact that the flow is purely laminar, the viscosity can freely be chosen withoutproducing any disturbances (like vortices) to the flow. The only thing that theviscosity will influence is the amount of dissipation of the vortex. According to this,the Reynolds number was picked large enough to restrict the vortex to dissipatesignificantly; the size of the vortex was assumed to be invariant with time. A suf-ficiently large Reynolds number was tested to be Re = 1000. For higher Reynoldsnumbers stability problems occurred if the natural condition (NBC1) was used.A more detailed stability analysis is performed later on in this section. We useduex(x) = u(x0 + ct) as the exact solution to compute the errors in the domain.Small errors due to dissipation of the vortex (since Re = 1000) were ignored in theanalysis. Those errors are of less importance here since the exact solution after the

(a)

u|ΓI = (1, 0)> ΓO

(b)

r

ω(r)

2−2

8

−2

Figure 5.7: (a) Configuration of the single vortex problem. The vortex has theinitial position x0 = L1/2, y0 = L2/2, and moves with the base flow (1, 0). (b) Thevorticity distribution of the vortex. Equation (5.18) with A = R = 1.

56

Page 71: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

5.4. CONVECTING VORTEX

vortex has left domain will be correct anyway; i.e. equal to the base flow (1, 0)>.The errors of interest are measured either at states when the vortex travels overthe boundary, or after the vortex has left the domain. In the latter case all errors(larger than machine precision) that is still left in the domain corresponds to nu-merical errors.

As a first test case, the NBC1 was imposed at the outflow boundary. The flowfields of the times t = 4, 5, and 6 are depicted in Figure 5.8. The first row shows thex velocity field scaled such that the vortex has equally large positive and negativeparts. At time t = 5 when the vortex has penetrated the outflow boundary, theshape of the vortex is disturbed. In the x velocity field we see that the contourlines are rotated clockwise, and in the y velocity field the contour lines are rotatedcounter-clockwise. One may also note that the minimal x velocity is lower when thevortex cross the boundary than it is when the vortex is inside. Another problem isobserved in the vorticity plot at t = 6, where the part of the vortex with positivex-velocity (y < 5) has close to circular vorticity contours, but the upper half withnegative velocity has serious problems. This phenomena can also be considered inFigure 5.12, where the vorticity in the y direction are plotted at the boundary.

Figure 5.9 shows states when the vortex has left the domain. Now, everything ontop of the base flow corresponds to errors. At the same time as the vortex touchesthe outflow boundary, numerical reflections that travel upstream are generated.Those are small, travel fast, and when they reach the inflow boundary a new physicalreflection that now travels with the base flow occur [33, 43]. The physical reflectionsthat move with the base flow can be considered in the (a) figures. In the same plotswe can also see that the NBC1 case does not maintain the base flow on the side ofthe reflections close to the outflow boundary. There is still a lot of energy left thatdoes not advect out, but rather dissipates with time. When a reflection reaches theoutflow, new numerical reflections appear and the same procedure happens again.However, now the reflections are smaller. Indeed the amplitude of the reflectionsseems to be proportional to the amplitude of the reflected flow (see §5.4.3). In Figure5.9b, we can also note that there are some noticeable reflections that correspond tothe vortex wake.

The Figures 5.10-5.11 show the same single vortex problem computed with theCBC1 condition. Now, the vortex leaves the domain without any shape variances.The reflections in the velocity fields are easier to localize than in the NBC1 casesince no significant amount of energy remains on the side of the reflection close tothe outflow boundary now. But, reflections that correspond to the vortex wake arestill present for later times (see Figure 5.11b).

57

Page 72: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

CHAPTER 5. NUMERICAL RESULTS

0 2 4 6 8 10

x

0

2

4

6

8

10

y

max = 1.15e + 00min = −1.15e + 00

(u− u0)/u0

0 2 4 6 8 10

x

0

2

4

6

8

10

y

max = 1.05e + 00min = −1.46e + 00

(u− u0)/u0

0 2 4 6 8 10

x

0

2

4

6

8

10

y

max = 1.80e − 01min = −7.61e − 01

(u− u0)/u0

0 2 4 6 8 10

x

0

2

4

6

8

10

y

max = 1.15e + 00min = −1.15e + 00

v

0 2 4 6 8 10

x

0

2

4

6

8

10

y

max = 1.06e + 00min = −1.15e + 00

v

0 2 4 6 8 10

x

0

2

4

6

8

10

y

max = 3.60e − 01min = −8.61e − 01

v

0 2 4 6 8 10

x

0

2

4

6

8

10

y

max = 5.12e − 03min = −1.81e + 00

Pressure

0 2 4 6 8 10

x

0

2

4

6

8

10

y

max = 5.32e − 01min = −3.94e − 01

Pressure

0 2 4 6 8 10

x

0

2

4

6

8

10

y

max = 1.45e − 01min = −3.55e − 22

Pressure

0 2 4 6 8 10

x

0

2

4

6

8

10

y

max = 7.50e + 00min = −1.02e + 00

Vorticity

(a) t = 4s

0 2 4 6 8 10

x

0

2

4

6

8

10

y

max = 7.42e + 00min = −6.32e + 00

Vorticity

(b) t = 5s

0 2 4 6 8 10

x

0

2

4

6

8

10

y

max = 6.30e + 00min = −3.15e + 00

Vorticity

(c) t = 6s

Figure 5.8: NBC1. Snapshots of the flow fields at the times t = 4, 5, and 6s. Dashedlines show the negative part of the solution and solid lines the positive part.

58

Page 73: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

5.4. CONVECTING VORTEX

0 2 4 6 8 10

x

0

2

4

6

8

10

y

max = 4.08e − 03min = −4.30e − 03

(u− u0)/u0

0 2 4 6 8 10

x

0

2

4

6

8

10

y

max = 1.19e − 06min = −1.43e − 06

(u− u0)/u0

0.0 0.2 0.4 0.6 0.8 1.0

x

0.0

0.2

0.4

0.6

0.8

1.0

y

(u− u0)/u0

0 2 4 6 8 10

x

0

2

4

6

8

10

y

max = 4.34e − 03min = −4.35e − 03

v

0 2 4 6 8 10

x

0

2

4

6

8

10

y

max = 4.93e − 06min = −4.53e − 06

v

0 2 4 6 8 10

x

0

2

4

6

8

10

y

max = 2.83e − 09min = −3.31e − 09

v

0 2 4 6 8 10

x

0

2

4

6

8

10

y

max = 2.13e − 05min = −7.56e − 06

Pressure

0 2 4 6 8 10

x

0

2

4

6

8

10

y

max = 3.77e − 07min = −5.24e − 07

Pressure

0 2 4 6 8 10

x

0

2

4

6

8

10

y

max = 2.37e − 10min = −1.95e − 10

Pressure

0 2 4 6 8 10

x

0

2

4

6

8

10

y

max = 2.02e − 02min = −1.89e − 02

Vorticity

(a) t = 12

0 2 4 6 8 10

x

0

2

4

6

8

10

y

max = 5.44e − 05min = −6.15e − 05

Vorticity

(b) t = 20

0 2 4 6 8 10

x

0

2

4

6

8

10

y

max = 4.56e − 08min = −3.48e − 08

Vorticity

(c) t = 37

Figure 5.9: NBC1. Snapshots of the flow fields at the times t = 12, 20, and 37s.Dashed lines show the negative part of the solution and solid lines the positive part.

59

Page 74: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

CHAPTER 5. NUMERICAL RESULTS

0 2 4 6 8 10

x

0

2

4

6

8

10

y

max = 1.15e + 00min = −1.15e + 00

(u− u0)/u0

0 2 4 6 8 10

x

0

2

4

6

8

10

y

max = 1.14e + 00min = −1.14e + 00

(u− u0)/u0

0 2 4 6 8 10

x

0

2

4

6

8

10

y

max = 1.68e − 01min = −1.68e − 01

(u− u0)/u0

0 2 4 6 8 10

x

0

2

4

6

8

10

y

max = 1.15e + 00min = −1.15e + 00

v

0 2 4 6 8 10

x

0

2

4

6

8

10

y

max = 1.72e − 03min = −1.14e + 00

v

0 2 4 6 8 10

x

0

2

4

6

8

10

y

max = 6.48e − 05min = −5.42e − 01

v

0 2 4 6 8 10

x

0

2

4

6

8

10

y

max = 1.79e − 02min = −1.80e + 00

Pressure

0 2 4 6 8 10

x

0

2

4

6

8

10

y

max = 1.01e − 02min = −1.77e + 00

Pressure

0 2 4 6 8 10

x

0

2

4

6

8

10

y

max = 6.30e − 04min = −3.85e − 02

Pressure

0 2 4 6 8 10

x

0

2

4

6

8

10

y

max = 7.50e + 00min = −1.02e + 00

Vorticity

(a) t = 4

0 2 4 6 8 10

x

0

2

4

6

8

10

y

max = 7.42e + 00min = −1.01e + 00

Vorticity

(b) t = 5

0 2 4 6 8 10

x

0

2

4

6

8

10

y

max = 1.08e − 03min = −9.87e − 01

Vorticity

(c) t = 6

Figure 5.10: CBC1. Snapshots of the flow fields at the times t = 4, 5, and 6s.Dashed lines show the negative part of the solution and solid lines the positive part.

60

Page 75: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

5.4. CONVECTING VORTEX

0 2 4 6 8 10

x

0

2

4

6

8

10y

max = 2.49e − 05min = −3.11e − 05

(u− u0)/u0

0.0 0.2 0.4 0.6 0.8 1.0

x

0.0

0.2

0.4

0.6

0.8

1.0

y

(u− u0)/u0

0 2 4 6 8 10

x

0

2

4

6

8

10

y

max = 1.72e − 05min = −1.71e − 05

v

0 2 4 6 8 10

x

0

2

4

6

8

10

y

max = 7.06e − 09min = −6.11e − 09

v

0 2 4 6 8 10

x

0

2

4

6

8

10

y

max = 1.67e − 08min = −2.12e − 08

Pressure

0 2 4 6 8 10

x

0

2

4

6

8

10

y

max = 3.54e − 10min = −5.43e − 10

Pressure

0 2 4 6 8 10

x

0

2

4

6

8

10

y

max = 1.34e − 04min = −1.84e − 04

Vorticity

(a) t = 12

0 2 4 6 8 10

x

0

2

4

6

8

10

y

max = 9.50e − 08min = −7.97e − 08

Vorticity

(b) t = 20

Figure 5.11: CBC1. Snapshots of the flow fields at the times t = 12 and 20s. Dashedlines show the negative part of the solution and solid lines the positive part.

61

Page 76: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

CHAPTER 5. NUMERICAL RESULTS

(a)

-4-202468

0 2 4 6 8 10y

Vortitcity

-0.50

0.51

1.52

2.5

0 2 4 6 8 10y

u

-0.5

0

0.5

1

1.5

0 2 4 6 8 10y

v

-0.1

-0.05

0

0.05

0.1

0 2 4 6 8 10y

Pressure

(b)

-202468

0 2 4 6 8 10y

Vortitcity

-0.50

0.51

1.52

2.5

0 2 4 6 8 10y

u

-0.08-0.06-0.04-0.02

00.02

0 2 4 6 8 10y

v

-2-1.5-1

-0.50

0.5

0 2 4 6 8 10y

Pressure

Figure 5.12: Solutions at the outflow at time t = 5. (- -) Exact solution of thevortex given from (5.18) with A = R = 1. (—) Numerical solution. (a) NBC1, (b)CBC1.

The error over a region is preferably studied by considering the L2 norm. Wenow present an error analysis that makes it easy to measure and compare the sizeof reflections in the domain. Figure 5.13 shows the L2 error vs time of the ufield for both CBC1 and NBC1. Four different element orders were considered:N = 8, 12, 16, 20. We can observe the times the vortex reaches the boundary, andwhen reflections appear and leave the domain. In the NBC1 plot (see Figure 5.13a),we can notice a peak in the error curve (after t ≈ 5s) in the time interval when thevortex travels across the boundary. This peak can be explained as the error of theasymmetric behavior of the vortex that we saw in Figure 5.8. Another significantobservation is the steps in the error curves. These typically correspond to reflectionsthat travel over the domain. Consider for instance the N = 12 curve and compareto the contour plots. The reflection that we clearly identify at t = 12 (Figure 5.11)corresponds to the first step in the error time plot (Figure 5.13b). An illustrativeexplanation to these plots can be considered in Figure 5.15.

In Figure 5.14a the NBC1 and NBC2 solutions are compared against each otherfor N = 12. We can note a small difference between the two. This small differencecorresponds to the fact that the NBC2 does have smaller errors in the parts of theboundary where it is negative flux present.

In Figure 5.14b similarly the CBC1 and CBC2 solutions are compared againsteach other for N = 12. Here the results almost coincide.

62

Page 77: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

5.4. CONVECTING VORTEX

(a)

10−14

10−12

10−10

10−8

10−6

10−4

10−2

100

0 5 10 15 20 25 30 35 40

L2error

time t

NBC1

N = 8N = 12N = 16N = 20

(b)

10−14

10−12

10−10

10−8

10−6

10−4

10−2

100

0 5 10 15 20 25 30 35 40

L2error

time t

CBC1

N = 8N = 12N = 16N = 20

Figure 5.13: Error vs time plots of the x velocity errors in the L2 norm.

(a)

10−10

10−8

10−6

10−4

10−2

100

0 5 10 15 20 25 30 35 40

L2error

time t

NBC1 vs NBC2 ( PN × PN−2)

NBC11NBC2

(b)

10−14

10−12

10−10

10−8

10−6

10−4

10−2

100

0 5 10 15 20

L2error

time t

CBC1 vs CBC2

CBC1CBC2

Figure 5.14: Comparison of: (a) the NBC1 and NBC2 results, (b) the CBC1 andCBC2 results. N = 12

63

Page 78: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

CHAPTER 5. NUMERICAL RESULTS

Assymetric vortex deformation at the outflow boundary

Reflection leave the domain

Numerical reflection travels upstream

New "physical" reflection appear at inflow

10s

"Physical" reflection travels over the domain

Errors dissipate

Reference line for reflections

0 5 10 15 20 25 30 35 40

100

10-1

10-2

10-3

10-4

10-5

10-6

10-7

10-8

10-9

10-10

10-11

10-12

10-13

10-14

time t

L2 e

rror

Figure 5.15: Explanation. L2 error vs time plots. NBC1, PN × PN .

64

Page 79: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

5.4. CONVECTING VORTEX

5.4.1 PN × PN vs. PN × PN−2

We have noticed some differences in the results obtained using PN × PN and PN ×PN−2 formulations. For both the natural boundary conditions (NBC1 and NBC2)and the convective (CBC1 and CBC2) these problems occur. The errors in thevelocity fields in the PN ×PN−2 setting are covered by noise (wiggles). The wigglesare located close to the element boundaries. As the element order is increased, thewiggles also decrease in size due to the faster dissipation of the higher resolution.Consider in Figures 5.16(a and d), the error-time plots of both the PN × PN andthe PN × PN−2 results plotted side by side for the NBC1 and CBC1 solutions, andin Figures 5.16(b and d) the u and v velocity fields at t = 20. The wiggles are mostevident in the CBC1, u field (Figure 5.16d).

(a)

10−10

10−8

10−6

10−4

10−2

0 5 10 15 20 25 30 35 40

L2error

time t

NBC1

PN × PNPN × PN−2

(b)

0 2 4 6 8 100

2

4

6

8

10

max = 1.19e− 06min = −1.43e− 06

(u− u0)/u0, PN − PN

0 2 4 6 8 100

2

4

6

8

10

max = 4.93e− 06min = −4.53e− 06

v, PN − PN

0 2 4 6 8 100

2

4

6

8

10

max = 9.39e− 05min = −8.22e− 05

(u− u0)/u0, PN − PN−2

0 2 4 6 8 100

2

4

6

8

10

max = 2.02e− 05min = −1.77e− 05

v, PN − PN−2

(c)

10−10

10−8

10−6

10−4

10−2

0 5 10 15 20

L2error

time t

CBC1

PN × PNPN × PN−2

(d)

0 2 4 6 8 100

2

4

6

8

10

max = 0.00e+ 00min = 0.00e+ 00

(u− u0)/u0, PN − PN

0 2 4 6 8 100

2

4

6

8

10

max = 7.06e− 09min = −6.11e− 09

v, PN − PN

0 2 4 6 8 10

x

0

2

4

6

8

10

y

max = 0.00e+ 00min = −2.09e− 05

(u− u0)/u0, PN − PN−2

0 2 4 6 8 10

x

0

2

4

6

8

10

y

max = 3.39e− 06min = −3.33e− 06

v, PN − PN−2

Figure 5.16: Comparison of PN × PN and PN × PN−2 solutions. (a) CBC1 – error–time plots. (b) CBC1 – velocity fields at t = 20. (c) NBC1 – error–time plots. (d)NBC1 – velocity fields at t = 20.

65

Page 80: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

CHAPTER 5. NUMERICAL RESULTS

5.4.2 Robustness analysis

The convecting vortex problem is a perfect test case to test the susceptibility ofdisturbances of the convective boundary conditions. In this subsection we performseveral tests to examine the robustness, i.e. how disturbances of the system (theconvective boundary condition) affect the solution.

Convection speed

As has been pointed out in §4, for the convective boundary conditions a perfectlyestimated convection speed is seldom available in more complex simulations. Anapproximation of the base flow must be performed, which certainly has rather badaccuracy. We hereby perform a test where the convection speed is chosen otherthan the base flow (1, 0)>. Let c = (cx, 0)>; both cx values below and above onewere tested, with the main focus on large cx. All tests were performed in the samedomain as before, and with the polynomial order fixed to N = 12. The results canbe considered in Figure 5.17. As we can see, similar to the error-time plots of NBC1in the previous section (Figure 5.8-5.9), there is now a peak of the error curve as thevortex crosses the boundary. This does not actually mean we have the same kindof errors as for NBC1. Indeed, the vortex still leaves almost symmetrically overthe boundary, but the wrong convection speed of the boundary condition changesthe magnitude of the vortex. As the condition is not a correct solution to the flowanymore, reflections do occur. Indeed, the size of the reflections seems to convergeto a specific magnitude as cx →∞.

10−10

10−8

10−6

10−4

10−2

100

0 5 10 15 20

L2error

time t

CBC1

cx = 0.5cx = 1cx = 2cx = 4cx = 8cx = 16

Figure 5.17: Robustness analysis of the convective outflow boundary conditions.Error time plots of different convection speeds cx.

66

Page 81: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

5.4. CONVECTING VORTEX

Angles of incidence

Another interesting test case regarding robustness is to analyze the magnitude ofthe errors as disturbances approach the boundary at angles of incidence other thanzero. We let the vortex start from several locations in the domain (see Figure5.18) and change the base flow direction such that the vortex reaches the boundarycondition at the same time, with the same speed (U∞ = 1), and at the same location(x = xO, y = Ly/2) for all tests. The setting of the convective boundary conditionwas fixed to the original one, i.e. the case with angle of incidence is zero. Theangles considered were 0°, 15°, 30° and 45°. In Figure 5.19a we show the error-timegraphs for the CBC1 condition, and in Figure 5.19b we present for comparisonthe similar results for the stabilized natural condition (NBC2). We also tested theNBC1 condition, but it displays stability problems for the higher angles (30° and45°). This happens due to the fact that the magnitude of negative flux over theboundary is increased with the higher angles and therefore implies instability byTheorem 3.1 (also see next section). As long as stability is preserved the naturalconditions are perfectly robust against different angles of incidence of disturbancesas expected (since it is an implicit condition); see Figure 5.19a. This is obviouslynot the case for the convective boundary condition, which also has been confirmedanalytically in §4.2. The convective condition only satisfies traveling characteristicsin one given direction, which needs to be determined a priori. As can be seen inFigure 5.19, both errors and reflections increase with an increased incident angle ofthe vortex. However, the accuracy as the vortex travels across the boundary is notmuch worse for CBC1 than for NBC1 or NBC2; even for the worst angle considered(45°). Tests with the CBC2 condition have also been performed, and the plots looksimilar to the plots for CBC1.

××××

15°

30°

45°

ΓOΓI

Figure 5.18: Initial locations (×) of the vortex and the angles of incidence of thedifferent cases.

67

Page 82: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

CHAPTER 5. NUMERICAL RESULTS

(a)

10−10

10−8

10−6

10−4

10−2

100

0 5 10 15 20

L2error

time t

CBC1

0°15°30°45°

(b)

10−10

10−8

10−6

10−4

10−2

100

0 5 10 15 20

L2error

time t

NBC2, (PN × PN−2)

0°15°30°45°

Figure 5.19: Error-time plots corresponding of the u field for different angles ofincidence of the vortex. (a) CBC1, (a) NBC2.

5.4.3 Stability and reflections

We have already experienced stability issues for the NBC1 condition in the previoussubsection as the shape of the vortex was slightly changed. A simple way to teststability is to regulate the strength of the vortex (parameter A in (5.18)) and see ifthe solution remains stable or not as the vortex travels trough the outflow bound-ary. Indeed, we do not need to change A much until the solution blows up for theNBC1 boundary condition (see Figure 5.20a); when the strength of the vortex ischanged, then both the amount of negative flux over the outflow boundary and theCFL number will be affected. It suffices to change the amplitude (A) to approx-imately 1.05 and the NBC1 condition blows up rapidly as the vortex approachesthe boundary. Using the stabilized natural condition NBC2 instead, we obtaineda stable result all the way up to A ≈ 16, when simulations systematically wereperformed by doubling A from A = 0.125 (0.125, 0.25, 0.5, 1, 2, 4, 8, 16) ; see Figure5.20b. Both the convective conditions (CBC1, and CBC2) also remain stable upto the same limit; see Figure 5.21, and the plots for CBC2 coincide. The reasonfor instability here is that the strong vortex implies a large CFL number, and thesolution blows up instantly, which has nothing to do with the boundary conditionitself.

Considering the same results we can also observe the size of the first reflectionthat appears at the inflow boundary when numerical spurious errors are reflectedinto “physical” reflections. We picked the error at t = 14s for all separate solutionscomputed with CBC1; then the errors were plotted against the vortex amplitude(see Figure 5.21a). If we assume that the size of the reflections are equal to themagnitude of the steps we have determined in the error-time plots, then we canconclude that the reflections are proportional to the strength of the vortex (A), by

68

Page 83: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

5.4. CONVECTING VORTEX

observation. The reflections in the results of the natural boundary conditions areharder to localize, but are also close to proportional to the vortex strength fromwhat one can observe from Figure 5.20b. There are several other aspects one musthave in mind due to reflections. Consider for instance the figures in the robustnesssubsection (§5.4.2) again. In Figure 5.17, we can note that for cx ≥ 4 the size of the

(a)

10−8

10−7

10−6

10−5

10−4

10−3

10−2

10−1

100

0 5 10 15 20

L2error

time t

NBC1

A = 1A = 1.01A = 1.02A = 1.03A = 1.04A = 1.05A = 1.06

(b)

10−9

10−8

10−7

10−6

10−5

10−4

10−3

10−2

10−1

100

101

0 5 10 15 20 25

L2error

time t

NBC2

A

Figure 5.20: Error time plots of the u solutions computed with different A. (a) Insta-bility occur for NBC1. (b) Error-time plots corresponding to the vortex strengths:A ∈ 0.125, 0, 25, 0.5, 1, 2, 4, 8, 16 (where A = 16 is the one that blows up instantly).

(a)

2.4E−07

4.8E−07

9.5E−07

1.9E−06

3.8E−06

7.6E−06

1.5E−05

3.1E−05

0.061 0.125 0.25 0.5 1.0 2.0 4.0 8.0 16

L2error

Vortex amplitude

CBC1

‖e‖|t=14

(b)

10−7

10−6

10−5

10−4

10−3

10−2

10−1

0 2 4 6 8 10 12 14

L2error

time t

CBC1

A

Figure 5.21: CBC1, (a) Size of the first downstream reflection in the x velocity fieldfor varying vortex amplitudes. (b) Error-time plots corresponding to the vortexstrengths: A ∈ 0.125, 0, 25, 0.5, 1, 2, 4, 8.

69

Page 84: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

CHAPTER 5. NUMERICAL RESULTS

reflections does not vary significantly; there are almost equally large reflections. Butthose reflections are larger than the reflections that occur if the convection speed ischosen exactly (cx = 1). There is obviously no proportional relation here. The samething can be observed from the angle disturbance analysis (Figure 5.19). However,what can be noted is that reflections are proportional to the size of the error peakthat corresponds to asymmetry as the vortex crosses the outflow boundary.

5.5 Flow past a circular cylinder

In this section we consider the flow past a circular cylinder, i.e. the typical Kàrmànvortex street problem. This test case has been intensively investigated due to itsrelevance to practical applications. Depending on the Reynolds number, the flowin the cylinder wake is either steady (Re / 50), laminar with vortex shedding(50 / Re / 150), transitional (150 / Re / 300), or turbulent (Re ' 300) [2]. Asthe flow is unsteady (Re ' 50), then the cylinder wake usually shapes into a regularpattern of two parallel slightly shifted rows of vortices. The vortices are formed atthe two points of separation on the cylinder. The purpose of this test case is toconsider errors in the solutions computed with different domain sizes and considerstability at high Reynolds numbers.

The flow configuration is depicted in Figure 5.22a. We consider a rectangulartwo dimensional domain of size [−L1, L2]×[−L3, L3] where the cylinder is of circulartype with radius r, and placed with its centrum in (x, y) = (0, 0). We choose a ratherdense spectral element grid in this problem since the boundary of the cylinder mustbe densely meshed to provide accurate results. The meshing around the cylinder isillustrated in Figure 5.22b.

The boundary conditions of the problem are chosen in the following way: atthe left boundary ΓI := −L1 × [−L3, L3] the constant inflow u = (1, 0)> is im-posed; at the upper and lower boundaries ([−L1, L2]×L3 and [−L1, L2]×−L3)periodic boundary conditions are set due to symmetry; on the cylinder boundary

(a)

Γcu|ΓI =(

10

)ΓO

(b)

Figure 5.22: (a) Domain configuration. Flow enters from the left boundary withconstant unit velocity, pass past a circular cylinder, with boundary Γc and leavethe domain at the outflow ΓO. (b) Meshing around the cylinder. Here the elementorder is N = 5.

70

Page 85: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

5.5. FLOW PAST A CIRCULAR CYLINDER

a homogeneous Dirichlet (“No-slip”) conditions is used; and the right boundaryΓO := L2× [−L3, L3] is the outflow boundary, where one of the outflow boundarycondition is imposed. The distance from the cylinder to the periodic boundaries waschosen large enough such that the periodic boundaries do not contain any importantinformation of the cylinder wake. Hence, a larger domain in the y direction maybe needed for lower Reynolds numbers. We may mention that the purpose of oursimulations is not to analyze the physical behavior of an accurate modeled vortexshedding. It is possible that the periodic boundary conditions may give rise to someblockage effect [2] etc. which we need to disregard, our results may therefore differfrom experimental ones.

We observed that with the initial condition set to u = 1, v = 0, vortex sheddingappeared after a rather long time (> 10s). This implies expensive computations.To save time, we therefore added a disturbance to the initial condition to enforcethe shedding to start. This “fix” was adapted from [10] and simply adds an initialcondition with a slightly higher x velocity at the upper part of the cylinder thanthe lower. For the initial base flow (1, 0) we therefore used

u = 1 + 0.1 tanh(

y

0.2√

2

), (5.19a)

v = 0. (5.19b)which is actually a flow field where the upper half of the domain has u = 1.1 andthe lower half has u = 0.9.

We present two test configurations; first a flow ofRe = 100 (§5.5.1), where vortexshedding is present but with rather weak vortices; secondly we consider the case ofRe = 1000 (§5.5.2), where the flow is more complicated and the vortices are stronger.In both cases the convection speed of the convective boundary conditions was chosenas c = (1, 0)>. The same tests were performed for both configurations: severaldomains were considered, where the distance to the outflow boundary was varied.The purpose was to test the accuracy and stability of the boundary conditions, andeventually how much the domain must be elongated for the flow to be accurate closeto the cylinder.

The drag and lift coefficients (dimensionless quantities of the forces) that act onthe cylinder are considered. They are computed as

CD = 2FxρU2 , CL = 2Fy

ρU2 , (5.20, 5.21)

where Fx is the time averaged drag force, Fy is the root mean square (r. m. s.) liftforce, and U is the characteristic velocity. Also the frequency of the vortex sheddingis of great interest. A dimensionless form related to the frequency is the Strouhalnumber. It is given by

St = fD

U, (5.22)

71

Page 86: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

CHAPTER 5. NUMERICAL RESULTS

where f is the frequency in hertz, and D is the diameter of the cylinder.

5.5.1 Re = 100

In the Re = 100 case, the element order was chosen as N = 5 in all meshes, andthe time-stepping was overall performed with the constant step-size ∆t = 0.001.Five different domains were considered; all with the same inflow and cylinder place-ment, but with a varying location of the outflow boundary. The inflow boundarywas defined as ΓI = (x, y) : x = −15,−15 ≤ y ≤ 15, and the outflow bound-ary conditions was imposed on x ∈ XO = 5, 10, 15, 20, 35 over the boundariesΓO,x=ii∈XO , where ΓO,x=i := (x, y) : x = i,−15 ≤ y ≤ 15.

In Figure 5.23 we consider the drag and lift coefficients plotted over the timeinterval [0, 80] for the NBC1 case. The oscillations mean there is shedding in thecylinder wake. For the shortest domain where the outflow is ΓO,x=5 it is noticeablethat the phase of the oscillations is significantly larger than for the other cases,which have close to similar curves. The Strouhal number is in this case St = 0.1602which can be compared to the Strouhal number of the reference solution (ΓO,x=35)that is St = 0.1675.

Figure 5.24 shows the drag and lift forces in the CBC1 case. Here the Strouhalnumber of the ΓO,x=5 result is St = 0.1639, which is closer to the reference solutionthan NBC1 result of the same domain. From the drag and lift results we notedtimes where the lift forces of the different solutions coincided. Even though the fre-quencies of the shedding were not exactly equal for the different cases we wanted topick times where the solutions close to the cylinder were equal. Therefore we pickedthe time of the second last peak for all results in Figure 5.23 and Figure 5.24 respec-tively. In the NBC1 case, the times observed were 75.18, 72.97, 72.67, 72.59, 72.56corresponding to ΓO,x=ii∈XO . For the CBC1 case we got similarly the sequence oftimes: 73.37, 72.51, 72.53, 72.55, 72.56. Then the vorticity fields were plotted atthat times, side by side for comparison. See in Figure 5.25 and 5.26 contour plotsof the various cases. It is easy to see that the frequency of the shedding is slightlydifferent in the ΓO,x=5 case (solutions are shifted in the x direction), and that theconvective condition performs overall better than the natural.

For a more detailed analysis of the accuracy related to the placement of theoutflow we also considered the cross sections (x, y) : −15 ≤ x ≤ xi, y = 0, i ∈ XOover the vorticity fields, and the several cross sections (x, y) : x = xi,−15 ≤y ≤ 15, i ∈ XO over the x velocity fields. The result with the outflow boundaryat xO = 35, was used as a reference solution. Results corresponding to NBC1and CBC1 can be considered in Figures 5.27-5.30. For the NBC1 case we canobserve that the solutions close to and at the outflow boundary are not consistentwith the reference solution. But otherwise the curves almost coincide. The resultsconfirm the observations from Figure 5.25, and also the results from the convectivevortex case, i.e. the natural boundary condition NBC1 has accuracy problems asvortices cross the boundary. In the case of CBC1 however, the cross sections ofthe vorticity coincide with the reference solution for all solutions, even for the short

72

Page 87: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

5.5. FLOW PAST A CIRCULAR CYLINDER

domain. We can note some dissimilarities to the reference solution at the boundaryfor the solutions in domains with outflows at xO = 5, and xO = 10. But those aresmall. And for the longer domains the solutions are accurate even over the outflowboundary.

2.42.62.8

3xO = 5

−1

0

1 xO = 5

2.42.62.8

3xO = 10

−1

0

1 xO = 10

2.42.62.8

3

CD

xO = 15

−1

0

1CL

xO = 15

2.42.62.8

3xO = 20

−1

0

1 xO = 20

2.42.62.8

3

0 10 20 30 40 50 60 70 80time t

xO = 35

−1

0

1

0 10 20 30 40 50 60 70 80time t

xO = 35

Figure 5.23: NBC1, Re = 100. Drag and lift coefficients of the cylinder.

2.42.62.8

3xO = 5

−1

0

1 xO = 5

2.42.62.8

3xO = 10

−1

0

1 xO = 10

2.42.62.8

3

CD

xO = 15

−1

0

1

CL

xO = 15

2.42.62.8

3xO = 20

−1

0

1 xO = 20

2.42.62.8

3

0 10 20 30 40 50 60 70 80time t

xO = 35

−1

0

1

0 10 20 30 40 50 60 70 80time t

xO = 35

Figure 5.24: CBC1, Re = 100. Drag and lift coefficients of the cylinder.

73

Page 88: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

CHAPTER 5. NUMERICAL RESULTS

(a)

(b)

(c)

(d)

(e)

Figure 5.25: NBC1, Re = 100. Comparison of vorticity contours. (a) xO = 5, (b)xO = 10, (c) xO = 15, (d) xO = 20, (e) xO = 35.

(a)

(b)

(c)

(d)

(e)

Figure 5.26: CBC1, Re = 100. Comparison of vorticity contours. (a) xO = 5, (b)xO = 10, (c) xO = 15, (d) xO = 20, (e) xO = 35.

74

Page 89: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

5.5. FLOW PAST A CIRCULAR CYLINDER

−2−1

012

-15 -10 -5 0 5 10 15 20 25 30

ω

xO = 5xO = 35

−2−1

012

-15 -10 -5 0 5 10 15 20 25 30

ω

xO = 10xO = 35

−2−1

012

-15 -10 -5 0 5 10 15 20 25 30

ω

xO = 15xO = 35

−2−1

012

-15 -10 -5 0 5 10 15 20 25 30

ω

x

xO = 20xO = 35

Figure 5.27: NBC1, Re = 100. Cross sections for y = 0.

−2−1

012

-15 -10 -5 0 5 10 15 20 25 30

ω

xO = 5xO = 35

−2−1

012

-15 -10 -5 0 5 10 15 20 25 30

ω

xO = 10xO = 35

−2−1

012

-15 -10 -5 0 5 10 15 20 25 30

ω

xO = 15xO = 35

−2−1

012

-15 -10 -5 0 5 10 15 20 25 30

ω

x

xO = 20xO = 35

Figure 5.28: CBC1, Re = 100. Cross sections for y = 0.

75

Page 90: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

CHAPTER 5. NUMERICAL RESULTS

(a)

-15

-10

-5

0

5

10

x=

5

y

u

(b)

-15

-10

-5

0

5

10

x=

5

y

x=

10

u

(c)

-15

-10

-5

0

5

10

x=

5x

=5

y

x=

10

x=

15

u

(d)

-15

-10

-5

0

5

10

x=

5

y

x=

10

x=

15

x=

20

u

Figure 5.29: NBC1, Re = 100. Cross sections of the u field along the x axis. Dashedline: reference solution xO = 35. Solid lines: (a) xO = 5, (b) xO = 10, (c) xO = 15,(d) xO = 20.

(a)

-15

-10

-5

0

5

10

x=

5

y

u

(b)

-15

-10

-5

0

5

10

x=

5

y

x=

10

u

(c)

-15

-10

-5

0

5

10

x=

5x

=5

y

x=

10

x=

15

u

(d)

-15

-10

-5

0

5

10

x=

5

y

x=

10

x=

15

x=

20

u

Figure 5.30: CBC1, Re = 100. Cross sections of the u field along the x axis. Dashedline: reference solution xO = 35. Solid lines: (a) xO = 5, (b) xO = 10, (c) xO = 15,(d) xO = 20.

76

Page 91: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

5.5. FLOW PAST A CIRCULAR CYLINDER

5.5.2 Re = 1000

We follow on with the more convective dominated flow of Re = 1000. Now thecylinder wake becomes turbulent in the three dimensional setting, and the vorticesof the wake are stronger than in the Re = 100 case due to less dissipation. Indeed,now the vortices that are produced by the cylinder have similar properties as thesingle vortex in the previous section.

Since the problem now is more sensible (Due to the higher Reynolds number.See e.g. §1.2.) we choose to increase the resolution of the mesh; the order of eachelements is now chosen as N = 12. Also the domain is shrinken down in the ydirection to speed up the computations; the domain size in the y direction waschanged from [−15, 15] to [−5, 5]. We assume that it is sufficient with a smallerdomain here because of the less amount of dissipation.

The standard natural boundary condition (NBC1) becomes unstable in this set-ting. As the first vortex of the shedding hits the boundary the problem blows-up.This confirms the analytic results of §3. Half of a vortex has negative flux, and thevortices now have a strength that is higher than A = 1.05, which was shown to bethe approximate limit of instability for Re = 1000. Hence, this case is a great pos-sibility to compare the stabilized natural boundary condition with the convective.We do not show any results of the CBC2 case here, but testing have shown similarresults as for the CBC1 conditions also for CBC2.

The tests were chosen similar as for the Re = 100 case. In Figure 5.31 considerthe drag and lift coefficients on the cylinder in the time interval t ∈ [0, 80] ofthe NBC2 solutions. A first general observation is that there is more oscillationscompared to the Re = 100 results (higher Strouhal number), and for NBC2 thedrag and lift curves do not coincide for any of the solutions. Similar to before wenoted down times in the lift coefficient plots to obtain states for comparison. Nowwe picked times at the last peaks. Figures 5.33-5.34 show the vorticity fields at thechosen times, and the Figures 5.35 and 5.37 show cross sections of the vorticity fieldsand the x velocity fields. We can observe that for all domain sizes the solution overthe outflow is very inaccurate, but also the solution some distance into the domainsare rather erroneous for NBC2. Especially for the domains with outflows xO ≤ 15this is evident, where the only solution that may be used in an accurate simulationis the solution close to the cylinder (at x = 5). For the case with outflow at xO = 20however, the solutions at x = 5, 10, and 15 are still accurate.

Considering the results of the convective boundary condition CBC1 we can seeimprovements over the NBC1 counterparts in all tests. The vorticity plots now al-most coincide even for the shortest domain considered (see Figure 5.34), the Strouhalnumbers are accurate even for the computations on the shortest domain (the fre-quency of the drag and lift plots coincide, see Figure 5.32), and the cross sectionplots (Figures 5.36 and 5.38) strengthen the conclusions even more.

77

Page 92: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

CHAPTER 5. NUMERICAL RESULTS

0246

xO = 5

−6−4−2

0246

xO = 5

0246

xO = 10

−6−4−2

0246

xO = 10

0246

CD

xO = 15

−6−4−2

0246

CL

xO = 15

0246

xO = 20

−6−4−2

0246

xO = 20

0246

0 10 20 30 40 50 60 70 80time t

xO = 35

−6−4−2

0246

0 10 20 30 40 50 60 70 80time t

xO = 35

Figure 5.31: NBC2, Re = 1000. Drag and lift coefficients on the cylinder.

0123456

xO = 5

−6−4−2

0246

xO = 5

0123456

xO = 10

−6−4−2

0246

xO = 10

0123456

CD

xO = 15

−6−4−2

0246

CL

xO = 15

0123456

xO = 20

−6−4−2

0246

xO = 20

0123456

0 10 20 30 40 50 60 70 80time t

xO = 35

−6−4−2

0246

0 10 20 30 40 50 60 70 80time t

xO = 35

Figure 5.32: CBC1, Re = 1000. Drag and lift coefficients on the cylinder.

78

Page 93: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

5.5. FLOW PAST A CIRCULAR CYLINDER

(a)

(b)

(c)

(d)

(e)

Figure 5.33: NBC2, Re = 1000. Comparison of vorticity contours. (a) xO = 5, (b)xO = 10, (c) xO = 15, (d) xO = 20, (e) xO = 35.

(a)

(b)

(c)

(d)

(e)

Figure 5.34: CBC1, Re = 1000. Comparison of vorticity contours. (a) xO = 5, (b)xO = 10, (c) xO = 15, (d) xO = 20, (e) xO = 35.

79

Page 94: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

CHAPTER 5. NUMERICAL RESULTS

−15−10−5

05

1015

−5 0 5 10 15 20 25 30 35

ω

xO = 5xO = 35

−15−10−5

05

1015

−5 0 5 10 15 20 25 30 35

ω

xO = 10xO = 35

−15−10−5

05

1015

−5 0 5 10 15 20 25 30 35

ω

xO = 15xO = 35

−15−10−5

05

1015

−5 0 5 10 15 20 25 30 35

ω

x

xO = 20xO = 35

Figure 5.35: NBC2, Re = 1000. Cross sections for y = 0 of the vorticity field.

−15−10−5

05

1015

−5 0 5 10 15 20 25 30 35

ω

xO = 5xO = 35

−15−10−5

05

1015

−5 0 5 10 15 20 25 30 35

ω

xO = 10xO = 35

−15−10−5

05

1015

−5 0 5 10 15 20 25 30 35

ω

xO = 15xO = 35

−15−10−5

05

1015

−5 0 5 10 15 20 25 30 35

ω

x

xO = 20xO = 35

Figure 5.36: CBC1, Re = 1000. Cross sections for y = 0 of the vorticity field.

80

Page 95: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

5.5. FLOW PAST A CIRCULAR CYLINDER

(a)

-5

0

5

x=

5

y

u

(b)

-5

0

5

x=

5

y

<

x=

10

u

(c)

-5

0

5

x=

5

y

x=

10

x=

15

u

(d)

-5

0

5

x=

5

y

x=

10

x=

15

x=

20

u

Figure 5.37: NBC2, Re = 1000. Cross sections of the u field along the x axis.Dashed line: reference solution xO = 35. Solid lines: (a) xO = 5, (b) xO = 10, (c)xO = 15, (d) xO = 20.

(a)

-5

0

x=

5

y

u

(b)

-5

0

x=

5

y

x=

10

u

(c)

-5

0

x=

5

y

x=

10

x=

15

u

(d)

-5

0

x=

5

y

x=

10

x=

15

x=

20

u

Figure 5.38: CBC1, Re = 1000. Cross sections of the u field along the x axis.Dashed line: reference solution xO = 35. Solid lines: (a) xO = 5, (b) xO = 10, (c)xO = 15, (d) xO = 20.

81

Page 96: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of
Page 97: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

Chapter 6

Discussion and conclusions

In this thesis we have presented the implementation and analysis of convectiveboundary conditions for incompressible flows in a spectral element framework. Wehave compared new implementations with the already available natural boundarycondition (the so called “O” condition) of the Nek5000 solver, and a stabilized ver-sion of it (by Dong et al. [10]).

Different discretization alternatives of the convective condition φt + c · ∇φ = 0were investigated. The first and main idea was to use the same discretization tech-nique for the convective condition as for the inner points, i.e. SEM in space, and theBDFk/EXTk scheme in time. Another idea was to impose the discretized exact so-lution of the convective equation directly, i.e. simply pick the solution from the for-mer time step by following the characteristic lines of the solution. A third techniquewas also discussed, where the accuracy of the second implementation was studiedeven further by considering an implementation that allowed curved characteristics.The curved characteristic implementation was examined due to the accessibility tothe OIFS/Characteristic time stepping technique in Nek5000. The usefulness ofthis implementation may be significant if the OIFS/Characteristic time-stepping isused for stability purposes, which make the need of sub-stepping also required forthe boundary points. More analysis are needed for the curved characteristic method.

Tests of spatial and temporal discretization orders, indicate that the BDF3/EXT3discretized convective boundary condition preserves the order of the solver, both inspace and in time. The linear characteristic implementation preserves the spatialconvergence, but the temporal order depends on the time step size, where a smallerstep size is better. This means that both can be used successfully, but the char-acteristic version requires sufficiently small step sizes in time (∆t = 0.001 shall besufficient here) to provide accurate results.

As long as the user has a sufficient insight in the physical solution (leads toan accurate estimation of the convection speed), and that the flow is convection-

83

Page 98: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

CHAPTER 6. DISCUSSION AND CONCLUSIONS

dominant (Re is large), then our numerical tests show remarkable good resultsfor the convective boundary conditions. The convective conditions handle strongvortices without significant reflections, and in comparison to the natural boundaryconditions they showed better results in all unsteady flow tests. Even in situationswhere the convection speed was relatively poorly estimated the amount of reflectionsand accuracy errors were still not much worse than what the natural boundarycondition provided us with. In the classical Kármán vortex street problem theconvective boundary conditions gave accurate results, even for highly truncateddomains.

A steady state problem was also considered (Kovasznay flow; same test as forspatial convergence), where the Reynolds number was picked low (Re = 40). Forthis test case the convective conditions had problems, both because of the factthat a steady state solution transforms the convective equation into a homogeneousNeumann condition, but also that the convective conditions do not be an accurateapproximation of the Navier–Stokes equations for this specific problem (Re small).We can conclude that for the convective boundary conditions to work well thediffusion term of the Navier–Stokes equations must not be dominant. In case of lowReynolds number flows, the natural boundary condition indeed works better.

Regarding stability, our tests show that the convective conditions are a great im-provement over the natural condition. The natural condition indeed implies blownup solutions for sufficiently large Reynolds numbers together with negative flux overthe boundary. For instance, if a vortex travels across the boundary, the solutionmay blow up since half the vortex has negative flux. The stability fix of Dong etal. [10] was shown to cure the stability issue, but did still imply as bad accuracy asthe natural condition.

One must keep in mind that the convective boundary condition is not alwaysa good general choice. The main problem regarding the implementation of theconvective condition ut + c · ∇u = 0 is the approximation of the convection speedc, which showed rather bad robustness properties. Our results indicate that theconvective condition does only become an accurate outflow boundary condition ifthe flow is highly convective (large Re) and if the convection speed is close to thegroup velocity of the flow. Our tests show that a wrongly estimated convectionspeed implies reflections.

Another problem that is also related to the convection speed is the importanceof correct angle of incidence of the streamlines over the boundary. The convectivecondition does only give minimal amount of reflections if it is transporting the flowin the correct direction. Our results show that also a wrong angle of incidence of adisturbance leads to reflections.

Due to time restrictions etcetera there are some analysis that were not includedin this thesis. Let us describe some of these observations and ideas shortly.

A method of computing the convection speed from the flow fields using expo-nential filtering was considered (§4.4.2). The tests we have performed this far showshared results, and more testing is needed. Our results indicate that the filter seems

84

Page 99: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

6.1. OUTLOOK

to work better for small disturbances than large. Small disturbances can often beclose to completely disregarded by the filter, while larger cannot. The more time-steps a disturbance need to travel across the boundary, the harder it is for theexponential filter to completely disregard it.

Damping regions such as sponge layers (see §B) were also tested together withthe different outflow boundary conditions. More analysis are needed also here.The results this far show that sponge regions produce reflections if the amountof damping is large. If we for instance try to damp out rather strong vortices,the length of the sponge region must be chosen very long to restrict significantreflections. If the aim of the addition of a sponge region is to damp out numericalreflections, then our testing shows that the sponge region does not work well withouta great amount of modification; it may indeed produce larger reflections itself thanthe numerical reflections it is supposed to damp out.

6.1 OutlookThe BDFk/EXTk and the linear characteristic discretizations of the convectiveboundary condition have shown advantages over the natural Nek5000 “O” condi-tion in convection-dominated problems, both according to accuracy and stability.Therefore it is relevant for researchers solving any kind of unsteady flow problemsto use convective conditions instead of the “O” condition. We therefore intend toinclude the convective boundary conditions in the Nek5000 repository. The firststep might be to add some example case. Since the estimation of the convectionspeed is crucial, general estimation approaches might be further investigated (fil-tering etc.). For the convective boundary conditions to work optimally, there mightbe several types of approximation alternatives available such as constant, local, andfiltered types.

Also we like to add the (Dong et al.) stabilized version of the “O” condition to theNek5000 repository since it is generally to prefer over the standard “O” condition;and may be to prefer over the convective conditions too when a significant amountof diffusion is present.

Other possible continuations of this thesis are: further testing of the convectiveconditions in more complex flows; analysis of optimal sponge regions to damp outupstream reflections; new ways of estimating the convection speed (such as filteringtechniques); further analytic analysis of the size of numerical reflections for differentoutflow boundary conditions; and investigation in mass conservation errors of thedifferent outflow boundary conditions studied.

85

Page 100: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of
Page 101: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

Appendix A

Mathematical concepts and formulas

A.1 Tensor productsA tensor product, defined as ⊗ is the most general bilinear operation. It can beapplied to vectors, matrices, tensors, vector spaces, algebras, topological vectorspaces, and modules etc.

The tensor product of two vector spaces V and W is defined as the vector spaceover F, given by the map

φ : V ×W 7→ V ⊗W, (A.1)

equipped with the following fundamental properties:

i. The map φ is bilinear. i.e. for the scalar α, and the vectors v,v(1),v(2) ∈ Vand w,w(1),w(2) ∈W we have

(v(1) + v(2))⊗w = v(1) ⊗w + v(2) ⊗w, (A.2)v⊗ (w(1) + w(2)) = v⊗w(1) + v⊗w(2) (A.3)α(v⊗w) = (αv)⊗w = v⊗ (αw) (A.4)0⊗w = v⊗ 0 = 0. (A.5)

ii. If vini=1 is a basis of V and wimi=1 a basis of W , then vi ⊗ wj , i =1, 2, . . . n, j = 1, 2, . . .m is a basis of V ⊗W . The dimension of V ⊗W willtherefore be given by the product of the dimensions of V and W .

iii. Every element in a vector space can be written as a linear combination of itsbasis: given scalar coefficients ai and bi, we can write V 3 v = a1v1 + a2v2 +. . .+ anvn and W 3 w = b1w1 + b2w2 + . . .+ bnwn. Hence we might write

v⊗w =n∑i=1

m∑j=1

ai · bj(vi ⊗wj). (A.6)

87

Page 102: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

APPENDIX A. MATHEMATICAL CONCEPTS AND FORMULAS

Thus, by defining cij := ai · bj , we get

v⊗w =n∑i=1

m∑j=1

cij(vi ⊗wj). (A.7)

This is the form of a general element in V ⊗W . However, every polynomial intwo variables x and y can not be written as a product (a0+a1x . . .)·(b0+b1y+. . .)(e.g xy+1 can not), so the form (A.6) is not always possible in general. However,if V andW are one dimensional this problem is not present, which is the case ine.g. the SEM implementation. Hence, for SEM, every element are representedin the form of (A.7).Note that, adding one more vector space to the problem U , with elements urepresented in the basis uklk=1, results in

v⊗w⊗ u =n∑i=1

m∑j=1

l∑k=1

cijk(vi ⊗wj ⊗ uk). (A.8)

A.2 Orthogonal Lagrange polynomials

A.2.1 Legendre polynomials“Legendre functions” are the solutions to the “Legendre’s differential equation”

d

dx

[(1− x2) d

dxPN (x)

]+N(N + 1)PN (x) = 0. (A.9)

These solutions for N = 0, 1, 2, . . . (with the normalization PN (1) = 1) form apolynomial sequence of orthogonal polynomials called the “Legendre polynomials”.The first few Legendre polynomials are given in table A.1.

N PN (x)0 11 x2 1

2 (3x2 − 1)3 1

2 (5x3 − 3x)4 1

8 (35x4 − 30x2 + 3)5 1

8 (63x5 − 70x3 + 15x)6 1

16 (231x6 − 315x4 + 105x2 − 5)7 1

16 (429x7 − 693x5 + 315x3 − 35x)8 1

128 (6435x8 − 12012x6 + 6930x4 − 1260x2 + 35)9 1

128 (12155x9 − 25740x7 + 18018x5 − 4620x3 + 315x)10 1

256 (46189x10 − 109395x8 + 90090x6 − 30030x4 + 3465x2 − 63).

Table A.1: Legendre polynomials.

88

Page 103: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

A.2. ORTHOGONAL LAGRANGE POLYNOMIALS

A.2.2 GLL polynomials

Gauss–Lobatto–Legendre (GLL) Lagrangian basis functions are given by:

φj(ξ) = −1N(N + 1)

(1− ξ2)P ′N (ξ)(ξ − ξj)PN (ξj)

, 0 ≤ j ≤ N, ξ ∈ [−1, 1]. (A.10)

where ξjNj=0 are the roots of the polynomial (1− ξ2)P ′N (ξ) (GLL points).

The GLL quadrature rule is given by

∫ 1

−1u(ξ) dx ≡

N∑k=0

ρku(ξk), (A.11)

where

ξk : ξ0 = −1, ξN = 1, zeros of P ′N (ξ), 1 ≤ k ≤ N − 1 (A.12)

ρk = 2N(N + 1)

1[PN (ξk)]2

, 0 ≤ k ≤ N. (A.13)

The GLL quadrature is exact for polynomials of orders up to 2N − 1, see [9].

A.2.3 GL polynomials

Gauss–Legendre (GL) Lagrangian basis functions are given by:

φj(ζ) = PN−1(ζ)(ζ − ζj)P ′N−1(ζj)

, 1 ≤ j ≤ N − 1, ζ ∈ [−1, 1]. (A.14)

where ζjN−1j=1 are the roots of the polynomial PN−1(ζ) (GL points).

The GL quadrature rule is given by

∫ 1

−1u(ζ) dx ≡

N−1∑k=1

ωku(ζk), (A.15)

where

ζk : zeros of PN−1(ζ), 1 ≤ k ≤ N − 1 (A.16)

ωk = 2(1− ζ2

k)[P ′N−1(ζk)]2, 1 ≤ k ≤ N − 1. (A.17)

The GL quadrature is exact for polynomials of orders up to 2N − 3, see [9].

89

Page 104: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

APPENDIX A. MATHEMATICAL CONCEPTS AND FORMULAS

A.3 The inf-sup conditionThe so called “inf-sup” condition by Brezzi [5] and Babuška [3] guarantees existenceand uniqueness of a solution to a Stokes problem (e.g. the semi-discrete systemof §2.3), i.e. it ensures the absence of spurious pressure modes and non-physicalwiggles.

Consider the Steady Stokes problem over the domain Ω

− 1Re∇2u +∇p = f in Ω, (A.18a)

−(∇ · u) = 0 in Ω, (A.18b)

The discrete variational form of this problem reads:

Find (uN , pN ) ∈ (V dN ⊂ H1

0 (Ω)d)× (ZN ⊂ L10(Ω)) such that

1Re

(∇uN ,∇vN )N − (pN ,∇ · vN )N = (f ,vN )N , ∀u ∈ V dN (A.19a)

−(∇ · uN , qN )N = 0, ∀q ∈ ZN . (A.19b)

where (·, ·)N is the discrete inner product to be defined. A function qN ∈ ZN iscalled a spurious mode of the Stokes problem (A.18) if ∀vN ∈ V d

N

(∇ · vN , qN )N = 0. (A.20)

Now suppose that there exist a solution (uN , pN ) to (A.19), and that qN satisfies(A.20) then pN +αqN , α ∈ R is also a solution to (A.19), i.e. uniqueness is no longerensured.

The inf-sup condition reads: Problem (A.18) is well posed, if there exist a realβN > 0 such that

βN = infqN∈ZN ,qN 6=0

supvN∈XN

(∇ · vN , qN )N‖vN‖H1

0 (Ω)d‖qN‖L20(Ω)

. (A.21)

This condition is obviously not satisfied if a spurious mode (A.20) exist in ZN ,which is the case for the standard setting of PN × PN .

A.4 Backward differentiating scheme (BDF)A backward differentiating formula (BDF) is a family of implicit methods used tosolve the initial value problem

∂y

∂t= f(t, y), y(t0) = y0. (A.22)

90

Page 105: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

A.5. EXTRAPOLATION SCHEME (EXT)

The general formula for a BDF is written as

1∆t

k∑i=0

βkyn+1−i ≈ f(yn+1) (A.23)

where ∆t denotes the time step-size. The coefficients βiki=0 are chosen so that themethod achieves order k , which is the maximum possible.

The BDF coefficients βiki=0 of order 1 to 5 are given by:

k β0 β1 β2 β3 β4 β5

1 1 −12 3/2 −2 1/23 11/6 −3 3/2 −1/34 25/12 −4 3 −4/3 1/45 137/60 −5 5 −10/3 5/4 −1/5

Table A.2: BDFk coefficients.

A.5 Extrapolation scheme (EXT)

The k:th order extrapolation (EXTk) of a general non linear term f(yn+1) is givenby

f(yn+1) ≈k∑i=1

αif(yn+1−i), (A.24)

where the coefficeints αiki=1 are given by:

k α1 α2 α3

1 12 2 −13 3 −3 1

Table A.3: EXTk coefficients.

91

Page 106: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

APPENDIX A. MATHEMATICAL CONCEPTS AND FORMULAS

A.6 Alternate forms of the Navier–Stokes equations

A.6.1 Alternate forms of the convective term

The convection operator can be written in two different ways

∇ · uu = 0, conservative form (A.25)(u · ∇)u = 0, convective form (A.26)

12(u · ∇)u + 1

2∇ · uu, skew-symmetric form. (A.27)

Theorem A.1. (A.25)-(A.27) are equivalent if ∇ · u = 0.

Proof. (A.25) =⇒ (A.26):

∇ · uu = u(∇ · u) + u · ∇u = u · ∇u.

(A.27) =⇒ (A.26): Use the result above to rewrite the second therm, then

12(u · ∇)u + 1

2∇ · uu = 12(u · ∇)u + 1

2(u · ∇)u = (u · ∇)u.

Although (A.25)-(A.27) are equivalent in the continuous setting, differences doappear in the discrete case, due to the non-exact representation of u, ∇ · u and ∇u.Numerical tests has shown that for spectral element discretizations based on theconvective term yields more accurate results than discretizations based on the skewsymmetric analogue, with very small differences [8]. Thus, accuracy is hardly thereason to choose one of these versions over another. However, the distribution ofthe eigenvalues varies for the three. Couzy computed the eigenvalues numericallyby discretizing the following expressions with using the spectral element method

∂θ

∂t= −∇ · uθ, −∇ · u = 0, (A.28)

∂θ

∂t= −u · ∇θ, −∇ · u = 0, (A.29)

∂θ

∂t= −1

2 (u · ∇θ +∇ · uθ) , −∇ · u = 0, (A.30)

With homogeneous Dirichlet boundary conditions on θ. The results he obtained wasthat the largest imaginary eigenvalue grows like O(N2) and there is no difference inthe conservative, convective, and skew-symmetric form for the case of u = 1. But ifthe velocity cannot be represented exactly, the skew-symmetric form is preferable,since the real parts of the eigenvalues was shown to be always close to machineepsilon. The conservative and convection forms gave rise to real components withpositive and negative signs.

92

Page 107: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

A.6. ALTERNATE FORMS OF THE NAVIER–STOKES EQUATIONS

In another study by Wilhelm and Kleiser ?? it was noticed that an unstablebehavior occurred for stagged grids for the conservative and skew-symmetric formbut stable for the convective.

Recall the trilinear convection term of the variational form (??)

c(w,u,v) =∫

Ωw · ∇u · v dΩ, ∀u,v,w ∈ H1(Ω). (A.31)

The skew-symmetrized form of (A.31) reads

c(w,u,v) = 12c(w,u,v)− 1

2c(w,v,u) (A.32)

Theorem A.2. Whenever ∇ · u = 0 in Ω, if u · n = 0, or v = 0 on Γ, then

c(u,u,v) = c(u,u,v). (A.33)

Proof. Since ∇ · u = 0 we get

∇ · (uv) = v(∇ · u) + u · ∇v = u · ∇v.

Thus,

c(u,u,v) = 12c(u,u,v)− 1

2c(v,u,u)

= 12

∫Ω

u · ∇u · v dΩ− 12

∫Ω

v · ∇u · u dΩ

= 12

∫Ω

u · ∇u · v dΩ− 12

∫Ω

(∇ · (vu)) · u dΩ

= 12

∫Ω

u · ∇u · v dΩ + 12

∫Ω

u · ∇u · v dΩ−∮∂Ω

vuu · ndS

=∫

Ωu · ∇u · v dΩ

= c(u,u,v).

A.6.2 Alternate forms of the viscous term

1Re∇2u, (A.34)

∇ · 1Re

(∇u + (∇u)>

), (A.35)

− 1Re∇×∇× u, (A.36)

− 1Re

(∇(∇ · u)−∇×∇× u) , (A.37)

Theorem A.3. If ∇ · u = 0, then (A.34)-(A.37) are equivalent.

Note that the only form that is admissible to use if ∇ · u 6= 0 is (A.34). Theother three are only for incompressible flows.

93

Page 108: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of
Page 109: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

Appendix B

Sponge layers

Flow directionΓO

Sponge layer

Figure B.1: A sponge layer can be added to the domain to damp out unwantedreflections of an outflow boundary condition.

In a sponge region (see Figure B.1) the idea is to damp out all unwanted re-flections by adding extra forcing to the flow. Hence, the sponge region itself willdestroy the physical correctness of the region it is applied to. The consequence ofthis is obviously that the solution in the sponge region cannot be used and this ex-tra resolution must be removed from the solution. Thus, a sponge region results inextra computational costs. The sponge region treatment has been widely adoptedbecause of its simplicity, robustness, non-stiff nature, and flexibility to handle com-plex geometries and unstructured grids [26].

The idea of a sponge region can be applied in many ways. We consider the waypresented by in the manual by Chavallier et al. [6]. The implementation procedurefollows: an additional volume force is added to the flow of the form

F = λ(x)(uref − u), (B.1)

where uref a known reference solution, and where λ(x) is a non-negative damping

95

Page 110: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

APPENDIX B. SPONGE LAYERS

function which is non-zero only within the sponge region (see Figure B.2),

λ(x) = λmax

[S

(x− xstart

∆rise

)− S

(x− xend

∆fall+ 1

)], (B.2)

where λmax is the maximum strength of the damping, sstart to xend the spatiallength of the region and ∆rise and ∆fall are the rise and fall distances of the dampingfunction, and the S function is a smooth step function given by

S(x) =

0, x ≤ 0,1/(1 + exp

(1

x−1 + 1x

)), 0 < x < 1,

1, x ≥ 1.(B.3)

The aim is to construct the sponge such that u→ uref as the flow travels through theregion. The damping function characterize the strength of the sponge by its lengthand amplitude. Larger sponges perform better than smaller sponges with the samestrength since they damp flow less intense, but are more computationally expensiveto use. Sponge design is a highly “trial-and-error” procedure, hence cost-optimalsponges are seldom used.

0

0.2

0.4

0.6

0.8

1

0 0.2 0.4 0.6 0.8 1

λ(x

)

x

Figure B.2: A typical damping function with λmax = 1, ∆rise = 0.6 and ∆fall = 0.2.

96

Page 111: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

Appendix C

Nek5000 spectral element solver

Nek5000 is a spectral element code based on the Nekton 2.0 project that was devel-oped by Paul Fischer, Lee Ho, and Einar Rønnquist in 1986-1991, in collaborationwith two of the most known developers of the spectral element theory, AnthonyPatera and Yvone Maday. The Nekton 2.0 code was the first spectral elementcode designed that could handle three dimensions and one of the first commerciallyavailable codes for distributed-memory parallel processors. Nek5000 is used by re-searchers all over the world, several people at KTH Mechanics included. The aimof this section is to give a short introduction.

C.1 Features• scales to over a million processes

• high-order spatial discretization using spectral elements

• high-order semi-implicit time-stepping

• incompressible + low Mach number (variable density) flows

• efficient preconditioners (multigrid + scalable coarse grid solves)

• highly optimized computational kernels (e.g. matrix-matrix multiply)

• low memory footprint and scalable memory design

• high performance parallel I/O

• ALE/moving meshes and free surface flow

• accurate Lagrangian particle tracking

• conjugate fluid-solid heat transfer

• scalable communication kernels

97

Page 112: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

APPENDIX C. NEK5000 SPECTRAL ELEMENT SOLVER

• build-in profiling analysis

• interface to VisIt1 for parallel data analysis and visualization

• interface to MOAB for advanced meshing capabilities

See [16] for more information.

C.2 Basic setupNek5000 is written in Fortran77 and C. It uses the Message Passing Interface (MPI)for parallelzation. Thus, a Fortran77 and a C compiler has to be installed on acomputer system to be able to compile the code. As a user, the specification ofthe desired problem is written into some specific user files. Examples of the filesare given in the repository of the Nek5000 code, and can easily be used to suit thespecific needs. There are three main files that have to be edited. The content ofthem are given below:

• .rea file (ascii or binary) :

– parameters: viscosity, conductivity (), number of steps, time-step size,order of the time-stepping, frequency of output, iteration tolerances, flowrate, filter strength, etc. + free parameters that can be used in the .usrfile.

∗∗∗∗∗∗ PARAMETERS ∗∗∗∗∗2.610000 NEKTON VERSION2 DIMENSIONAL RUN

103 PARAMETERS FOLLOW1.000000 p01 DENSITY1.000000 p02 VISCOS

0.0000000E+000.0000000E+000.0000000E+000.0000000E+00

1.000000 p07 RHOCP1.000000 p08 CONDUCT

0.0000000E+000.0000000E+00 p10 FINTIME

5000.000 p11 NSTEPS1.0000000E−03 p12 DT0.0000000E+00 p13 IOCOMM0.0000000E+00 p14 IOTIME

500.0000 p15 IOSTEP0.0000000E+00 p16 PSSOLVER0.0000000E+000.0000000E+000.0000000E+000.0000000E+001.0000000E−08 p21 DIVERGENCE1.0000000E−12 p22 HELMHOLTZ0.0000000E+00 p23 NPSCAL1.0000000E−06 p24 TOLREL1.0000000E−10 p25 TOLABS0.3500000 p26 COURANT/NTAU

3.000000 p27 TORDER

1VisIt is an Open Source, interactive, scalable, visualization, animation and analysis tool.https://wci.llnl.gov/simulation/computer-codes/visit/

98

Page 113: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

C.2. BASIC SETUP

– logicals: Steady or unsteady solution, advection on/off etc.T IFFLOW s o l v e f o r f l u i d ( v e l o c i t y , p r e s s u r e )T IFHEAT s o l v e f o r heat ( temperature and/ or s c a l a r s )T IFTRAN s o l v e t r a n s i e n t e q u a t i o n sT IFADVC s p e c i f y the f i e l d s with convect ionT IFTMSH s p e c i f y the f i e l d ( s ) d e f i n e d on T meshF IFAXIS axisymmetric f o r m u l a t i o nF IFSTRS s t r e s s f o r m u l a t i o n in the i n c o m p r e s s i b l e caseT IFLOMACH low Mach number c o m p r e s s i b l e f lowF IFMGRID moving g r i d ( f r e e s u r f a c e f low )F IFMVBD moving boundary ( f r e e s u r f a c e f low )F IFCHAR use c h a r a c t e r i s t i c s f o r convect ion o p e r a t o r

– geometry: In 3d xyz locations of each of the eight points for each ele-ment, or the xy locations of each of the four points for each element in2d.

ELEMENT 1 [ 1a ] GROUP 00.0000000E+00 6.2500000E−02 6.2500000E−02 0.0000000E+000.0000000E+00 0.0000000E+00 6.2500000E−02 6.2500000E−02

ELEMENT 2 [ 1b ] GROUP 06.2500000E−02 1.2500000E−01 1.2500000E−01 6.2500000E−020.0000000E+00 0.0000000E+00 6.2500000E−02 6.2500000E−02

. . .

– boundary conditions: Specified as follow: P = Periodic, V = Dirich-let (velocity), v = user specified Dirichlet (in .usr file), O = Outflow(natural), E = inner points etc.

∗∗∗∗∗ FLUID BOUNDARY CONDITIONS ∗∗∗∗∗P 1 1 241.0000 3.000000 0 . 0E+00 0 . 0E+00 0 . 0E+00E 1 2 2.000000 4.000000 0 . 0E+00 0 . 0E+00 0 . 0E+00E 1 3 17.00000 1.000000 0 . 0E+00 0 . 0E+00 0 . 0E+00P 1 4 16.00000 2.000000 0 . 0E+00 0 . 0E+00 0 . 0E+00

. . .

– restart conditions: Specify a file to use as an initial condition.1 PRESOLVE/RESTART OPTIONS ∗∗∗∗∗f i l e 0 . f000XX

– output specifications:∗∗∗∗∗ OUTPUT FIELD SPECIFICATION ∗∗∗∗∗6 SPECIFICATIONS FOLLOWT COORDINATEST VELOCITYT PRESSURET TEMPERATUREF TEMPERATURE GRADIENT0 PASSIVE SCALARS

• .usr file: Contains Fortran subroutines to be specified by the user.

– userchk(): interrogates the solution at the end of each time-step (diag-nostic purposes). Calls all points once in each time step.

SUBROUTINE USERCHKINCLUDE ’ SIZE ’INCLUDE ’TOTAL’

RETURNEND

99

Page 114: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

APPENDIX C. NEK5000 SPECTRAL ELEMENT SOLVER

– useric(): specify the initial condition. Note that the condition for eachof the velocity and temperature field has to be set separately.

SUBROUTINE USERIC ( IX , IY , IZ , i e g )INCLUDE ’ SIZE ’INCLUDE ’NEKUSE’

UX = . .UY = . .UZ = . .TEMP = . .RETURNEND

– userbc(): user defined boundary conditions (v in .rea file). Calls theboundary points individually.

SUBROUTINE USERBC ( IX , IY , IZ , i e g )INCLUDE ’ SIZE ’INCLUDE ’NEKUSE’

UX = . .UY = . .UZ = . .TEMP = . .RETURNEND

– userf(): user defined forcing functionSUBROUTINE USERF ( IX , IY , IZ , i e g )INCLUDE ’ SIZE ’INCLUDE ’NEKUSE’

FFY = . .FFX = . .FFZ = . .RETURNEND

• SIZE file:

– ldim: dimension (= 2 or 3).parameter ( ldim =2)

– lx1, ly1, lz1: order of the basis functions (N). lelt: the maximumnumber of elements per processor.

parameter ( lx1 =12, ly1=lx1 , l z 1 =1, l e l t =80, l e l v=l e l t )

– lxd: polynomial order of integration for convective terms (lcd=3*lx1/2).parameter ( lxd=( lx1 ∗3)/2 , lyd=lxd , l z d =1)

– lx2, ly2: PN × PN (=lx1,ly1) or PN × PN−2 (=lx1-2,ly1-2).parameter ( lx2=lx1 −2) ! Pn x Pn−2parameter ( ly2=ly1 −2) ! Pn x Pn−2parameter ( l z 2=l z 1 )

100

Page 115: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

Bibliography

[1] Top500, the list. http://www.top500.org.

[2] Flow Around Circular Cylinders: Volume I: Fundamentals. Flow Around Cir-cular Cylinders: A Comprehensive Guide Through Flow Phenomena, Experi-ments, Applications, Mathematical Models, and Computer Simulations. OUPOxford, 1997.

[3] I. Babuška. The finite element method with lagrangian multipliers. NumerischeMathematik, 20(3):179–192, 1973.

[4] J.P. Berenger. A perfectly matched layer for the absorption of electromagneticwaves. Journal of Computational Physics, 114(2):185 – 200, 1994.

[5] F. Brezzi. On the existence, uniqueness and approximation of saddle-pointproblems arising from lagrangian multipliers. ESAIM: Mathematical Modellingand Numerical Analysis - Modélisation Mathématique et Analyse Numérique,8(R2):129–151, 1974.

[6] M. Chavallier, P. Schlatter, Lundblad, and D.S. A. Henningsson. Simpson, apseudo-spectral solver for incompressible boundary layer flows. 2007.

[7] T. Colonius. Modeling artificial boundary conditions for compressible flow.Annual Review of Fluid Mechanics, 36(1):315–345, 2004.

[8] W. Couzy. Spectral element discretization of the unsteady navier-stokes equa-tions and its iterative solution on parallel computers. 1995.

[9] M.O. Deville, P.F. Fischer, and E.H. Mund. High-Order Methods for Incom-pressible Fluid Flow, volume 9. Cambridge University Press, 2002.

[10] S. Dong, G.E. Karniadakis, and C. Chryssostomidis. A robust and accurateoutflow boundary condition for incompressible flow simulations on severely-truncated unbounded domains. Journal of Computational Physics, 2014.

[11] B. Engquist and A. Majda. Radiation boundary conditions for acoustic andelastic wave calculations. Communications on Pure and Applied Mathematics,32(3):314–358, 1979. NR 20140805.

101

Page 116: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

BIBLIOGRAPHY

[12] B. Engquist and A. Majda. Absorbing boundary conditions for the numeri-cal simulation of waves. Mathematics of Computation, 1:629–651, 1997. NR20140805.

[13] J.H. Ferziger and M. Peric. Computational Methods for Fluid Dynamics.Springer Berlin Heidelberg, 2001.

[14] R.P. Feynman, R.B. Leighton, and M.L. Sands. The Feynman Lectures onPhysics. Number v. 1 in The Feynman Lectures on Physics. Addison-Wesley,1963.

[15] P.F. Fischer, F. Loth, S.W. Lee, D Smith, H.M. Tufo, and H.S. Bassiouny.Parallel simulation of high reynolds number vascular flows. 02/2006 2006.

[16] P.F Fischer, J.W. Lottes, and S.G. Kerkemeier. nek5000 web page, 2008.http://nek5000.mcs.anl.gov.

[17] J. G. Heywood, R. Rannacher, and S. Turek. Artificial boundaries and fluxand pressure cconditions for the incompressible navier–stokes equations. Inter-national Journal for Numerical Methods in Fluids, 22(5):325–352, 1996.

[18] G. Karniadakis and S. Orszag. Nodes, modes and flow codes. Physics Today,46(3):34–42, 1993.

[19] G.E. Karniadakis, M. Israeli, and S. Orszag. High-order splitting methods forthe incompressible navier-stokes equations. Journal of Computational Physics,97(2):414 – 443, 1991.

[20] E. Åkervik, L. Brandt, D.S. Henningson, J. Hœpffner, O. Marxen, andP. Schlatter. Steady solutions of the navier-stokes equations by selective fre-quency damping. Physics of Fluids (1994-present), 18(6):–, 2006.

[21] L.I.G. Kovasznay. Laminar flow behind a two-dimensional grid. MathematicalProceedings of the Cambridge Philosophical Society, 44:58–62, 1 1948.

[22] L. Leray. On the motion of a viscous liquid filling space. Acta mathematica.,1934.

[23] J.D. Logan. Applied Mathematics. A Wiley-Interscience publication. Wiley,1997.

[24] Y. Maday and A.T. Patera. Spectral element methods for the incompressibleNavier-Stokes equations. In State-of-the-art surveys on computational mechan-ics (A90-47176 21-64). New York, American Society of Mechanical Engineers,1989, p. 71-143. Research supported by DARPA., pages 71–143, 1989.

[25] Y. Maday, A.T. Patera, and E.M. Rø nquist. An operator-integration-factorsplitting method for time-dependent problems: Application to incompressiblefluid flow. Journal of Scientific Computing, 5(4):263–292, 1990.

102

Page 117: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

BIBLIOGRAPHY

[26] A. Mani. Analysis and optimization of numerical sponge layers as a nonreflec-tive boundary treatment. Journal of Computational Physics, 231(2):704 – 716,2012.

[27] T. Miyauchi, M. Tanahashi, and M. Suzuki. Inflow and outflow boundaryconditions for direct numerical simulations. Transactions of the Japan Societyof Mechanical Engineers Series B, 60(571):813–821, 1994.

[28] G. E. Moore. Cramming More Components onto Integrated Circuits. Electron-ics, 38(8):114–117, April 1965.

[29] I. Orlanski. A simple boundary condition for unbounded hyperbolic flows.Journal of Computational Physics, 21(3):251 – 269, 1976.

[30] S. Orszag. Analytical theories of turbulence. Journal of Fluid Mechanics,41:363–386, 4 1970.

[31] E.D. Palma and R.P. Matano. On the implementation of passive open boundaryconditions for a general circulation model: The barotropic mode. Journal ofGeophysical Research: Oceans, 103(C1):1319–1341, 1998.

[32] A.T. Patera. A spectral element method for fluid dynamics: Laminar flow in achannel expansion. Journal of Computational Physics, 54(3):468 – 488, 1984.

[33] T.J. Poinsot and S.K. Lele. Boundary conditions for direct simulations ofcompressible viscous flows. Journal of Computational Physics, 101(1):104 –129, 1992.

[34] A. Poux, S. Glockner, and M. Azaïez. Improvements on open and tractionboundary conditions for navier–stokes time-splitting methods. Journal of Com-putational Physics, 230(10):4011 – 4027, 2011.

[35] R. Rannacher. Methods for numerical flow simulation. In HemodynamicalFlows, volume 37 of Oberwolfach Seminars, pages 275–332. Birkhäuser Basel,2008.

[36] R. L. Sani and P. M. Gresho. Résumé and remarks on the open boundarycondition minisymposium. International Journal for Numerical Methods inFluids, 18(10):983–1008, 1994.

[37] P. Schlatter. Personal communication.

[38] P. Schlatter, Q. Li, G. Brethouwer, A.V. Johansson, and D.S. Henningson.Simulations of spatially evolving turbulent boundary layers up to reθ= 4300.International Journal of Heat and Fluid Flow, 31(3):251–261, 2010.

[39] S.J. Sherwin and G.E. Karniadakis. A triangular spectral element method;applications to the incompressible navier-stokes equations. Computer Methodsin Applied Mechanics and Engineering, 123(1–4):189 – 229, 1995.

103

Page 118: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

BIBLIOGRAPHY

[40] A. Sommerfeld. Partial differential equations in physics. Pure and AppliedMathematics. Elsevier Science, 1949.

[41] A.G. Tomboulides, J.C.Y. Lee, and S. Orszag. Numerical simulation of lowmach number reactive flows. Journal of Scientific Computing, 12(2):139–167,1997.

[42] L.N. Trefethen and L. Halpern. Well-posedness of one-way wave equationsand absorbing boundary conditions. Mathematics of Computation, 47(176):pp.421–435, 1986.

[43] R. Vichnevetsky and E.C. Pariser. High order numerical sommerfeld boundaryconditions: Theory and experiments. Computers & Mathematics with Applica-tions, 11(1–3):67 – 78, 1985.

[44] C.J. Xu and Y.M. Lin. A numerical comparison of outflow boundary conditionsfor spectral element simulations of incompressible flows. Commun. Comput.Phys., 2:477–500, 2007.

104

Page 119: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of
Page 120: Investigation of Outflow Boundary Conditions for Convection …804993/... · 2015. 4. 14. · DEGREE PROJECT, IN MATHEMATICS , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Investigation of

TRITA -MAT-E 2015:11

ISRN -KTH/MAT/E-15/11--SE

www.kth.se