Table Of ContentAPPLIED COMPUTATIONAL FLUID
DYNAMICS TECHNIQUES
APPLIED
COMPUTATIONAL
FLUID DYNAMICS
TECHNIQUES
AN INTRODUCTION BASED ON
FINITE ELEMENT METHODS
Second Edition
RainaldLöhner
CenterforComputationalFluidDynamics,
DepartmentofComputationalandDataSciences,
CollegeofSciences,GeorgeMasonUniversity,
Fairfax,Virginia,USA
John Wiley & Sons, Ltd
Copyright(cid:1)c 2008 JohnWiley&SonsLtd,TheAtrium,SouthernGate,Chichester,
WestSussexPO198SQ,England
Telephone (+44)1243779777
Email(forordersandcustomerserviceenquiries):[email protected]
VisitourHomePageonwww.wiley.com
AllRightsReserved.Nopartofthispublicationmaybereproduced,storedinaretrievalsystemor
transmittedinanyformorbyanymeans,electronic,mechanical,photocopying,recording,scanningor
otherwise,exceptunderthetermsoftheCopyright,DesignsandPatentsAct1988orundertheterms
ofalicenceissuedbytheCopyrightLicensingAgencyLtd,90TottenhamCourtRoad,
LondonW1T4LP,UK,withoutthepermissioninwritingofthePublisher.RequeststothePublisher
shouldbeaddressedtothePermissionsDepartment,JohnWiley&SonsLtd,TheAtrium,SouthernGate,
Chichester,WestSussexPO198SQ,England,[email protected],orfaxedto
(+44)1243770620.
Designationsusedbycompaniestodistinguishtheirproductsareoftenclaimedastrademarks.
Allbrandnamesandproductnamesusedinthisbookaretradenames,servicemarks,trademarksor
registeredtrademarksoftheirrespectiveowners.ThePublisherisnotassociatedwithanyproductor
vendormentionedinthisbook.
Thispublicationisdesignedtoprovideaccurateandauthoritativeinformationinregardtothesubject
mattercovered.ItissoldontheunderstandingthatthePublisherisnotengagedinrenderingprofessional
services.Ifprofessionaladviceorotherexpertassistanceisrequired,theservicesofacompetent
professionalshouldbesought.
OtherWileyEditorialOffices
JohnWiley&SonsInc.,111RiverStreet,Hoboken,NJ07030,USA
Jossey-Bass,989MarketStreet,SanFrancisco,CA94103-1741,USA
Wiley-VCHVerlagGmbH,Boschstr.12,D-69469Weinheim,Germany
JohnWiley&SonsAustraliaLtd,42McDougallStreet,Milton,Queensland4064,Australia
JohnWiley&Sons(Asia)PteLtd,2ClementiLoop#02-01,JinXingDistripark,Singapore129809
JohnWiley&SonsCanadaLtd,6045FreemontBlvd,Mississauga,ONT,L5R4J3
Wileyalsopublishesitsbooksinavarietyofelectronicformats.Somecontentthatappearsinprintmay
notbeavailableinelectronicbooks.
LibraryofCongressCataloging-in-PublicationData
Löhner,Rainald.
Appliedcomputationalfluiddynamicstechniques:anintroductionbasedonfiniteelementmethods/
RainaldLohner.–2nded.
p.cm.
Includesbibliographicalreferencesandindex.
ISBN978-0-470-51907-3(cloth:alk.paper)
1.Fluiddynamics–Mathematics.2.Numericalanalysis.3.Finiteelementmethod.I.Title.
TA357.L5922008
620.1’064–dc22
2007045555
BritishLibraryCataloguinginPublicationData
AcataloguerecordforthisbookisavailablefromtheBritishLibrary
ISBN978-0-470-51907-3
TypesetbySunriseSettingLtd,Torquay,UK
PrintedandboundinGreatBritainbyAntonyRoweLtd,Chippenham,Wiltshire
This bookisprinted onacid-free paper responsibly manufactured from sustainable forestry inwhich at
leasttwotreesareplantedforeachoneusedforpaperproduction.
CONTENTS
FOREWORDTOTHESECONDEDITION xiv
ACKNOWLEDGEMENTS xvii
1 INTRODUCTIONANDGENERALCONSIDERATIONS 1
1.1 TheCFDcode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.2 Portingresearchcodestoanindustrialcontext . . . . . . . . . . . . . . . . . 5
1.3 Scopeofthebook . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2 DATASTRUCTURESANDALGORITHMS 7
2.1 Representationofagrid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.2 Deriveddatastructuresforstaticdata. . . . . . . . . . . . . . . . . . . . . . 9
2.2.1 Elementssurroundingpoints–linkedlists . . . . . . . . . . . . . . . 9
2.2.2 Pointssurroundingpoints . . . . . . . . . . . . . . . . . . . . . . . 10
2.2.3 Elementssurroundingelements . . . . . . . . . . . . . . . . . . . . 12
2.2.4 Edges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2.2.5 Externalfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2.2.6 Edgesofanelement . . . . . . . . . . . . . . . . . . . . . . . . . . 16
2.3 Deriveddatastructuresfordynamicdata . . . . . . . . . . . . . . . . . . . . 17
2.3.1 N-trees . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
2.4 Sortingandsearching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
2.4.1 Heaplists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
2.5 Proximityinspace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
2.5.1 Bins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
2.5.2 Binarytrees . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
2.5.3 Quadtreesandoctrees . . . . . . . . . . . . . . . . . . . . . . . . . 28
2.6 Nearest-neighboursandgraphs . . . . . . . . . . . . . . . . . . . . . . . . . 30
2.7 Distancetosurface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
3 GRIDGENERATION 35
3.1 Descriptionofthedomaintobegridded . . . . . . . . . . . . . . . . . . . . 37
3.1.1 Analyticalfunctions . . . . . . . . . . . . . . . . . . . . . . . . . . 37
3.1.2 Discretedata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
3.2 Variationofelementsizeandshape. . . . . . . . . . . . . . . . . . . . . . . 38
3.2.1 Internalmeasuresofgridquality . . . . . . . . . . . . . . . . . . . . 39
3.2.2 Analyticalfunctions . . . . . . . . . . . . . . . . . . . . . . . . . . 39
3.2.3 Boxes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
vi CONTENTS
3.2.4 Point/line/surfacesources . . . . . . . . . . . . . . . . . . . . . . . 39
3.2.5 Backgroundgrids . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
3.2.6 ElementsizeattachedtoCADdata . . . . . . . . . . . . . . . . . . 43
3.2.7 Adaptivebackgroundgrids . . . . . . . . . . . . . . . . . . . . . . . 43
3.2.8 Surfacegriddingwithadaptivebackgroundgrids . . . . . . . . . . . 45
3.3 Elementtype . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
3.4 Automaticgridgenerationmethods. . . . . . . . . . . . . . . . . . . . . . . 47
3.5 Othergridgenerationmethods . . . . . . . . . . . . . . . . . . . . . . . . . 49
3.6 Theadvancingfronttechnique . . . . . . . . . . . . . . . . . . . . . . . . . 51
3.6.1 Checkingtheintersectionoffaces . . . . . . . . . . . . . . . . . . . 52
3.6.2 Datastructurestominimizesearchoverheads . . . . . . . . . . . . . 56
3.6.3 Additionaltechniquestoincreasespeed . . . . . . . . . . . . . . . . 56
3.6.4 Additionaltechniquestoenhancereliability . . . . . . . . . . . . . . 58
3.7 Delaunaytriangulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
3.7.1 Circumspherecalculations . . . . . . . . . . . . . . . . . . . . . . . 61
3.7.2 Datastructurestominimizesearchoverheads . . . . . . . . . . . . . 62
3.7.3 Boundaryrecovery . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
3.7.4 Additionaltechniquestoincreasespeed . . . . . . . . . . . . . . . . 63
3.7.5 Additionaltechniquestoenhancereliabilityandquality. . . . . . . . 64
3.8 Gridimprovement. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
3.8.1 Removalofbadelements . . . . . . . . . . . . . . . . . . . . . . . . 66
3.8.2 Laplaciansmoothing . . . . . . . . . . . . . . . . . . . . . . . . . . 67
3.8.3 Gridoptimization . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
3.8.4 Selectivemeshmovement . . . . . . . . . . . . . . . . . . . . . . . 67
3.8.5 Diagonalswapping . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
3.9 Optimalspace-fillingtetrahedra . . . . . . . . . . . . . . . . . . . . . . . . 70
3.10 Gridswithuniformcores . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
3.11 Volume-to-surfacemeshing . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
3.12 Navier–Stokesgriddingtechniques . . . . . . . . . . . . . . . . . . . . . . . 75
3.12.1 DesigncriteriaforRANSgridders . . . . . . . . . . . . . . . . . . . 77
3.12.2 Smoothingofsurfacenormals . . . . . . . . . . . . . . . . . . . . . 79
3.12.3 Pointdistributionalongnormals . . . . . . . . . . . . . . . . . . . . 81
3.12.4 Subdivisionofprismsintotetrahedra . . . . . . . . . . . . . . . . . 81
3.12.5 Elementremovalcriteria . . . . . . . . . . . . . . . . . . . . . . . . 83
3.13 Fillingspacewithpoints/arbitraryobjects . . . . . . . . . . . . . . . . . . . 90
3.13.1 Theadvancingfrontspace-fillingalgorithm . . . . . . . . . . . . . . 90
3.13.2 Point/objectplacementstencils . . . . . . . . . . . . . . . . . . . . . 91
3.13.3 Boundaryconsistencychecks . . . . . . . . . . . . . . . . . . . . . 93
3.13.4 Maximumcompactiontechniques . . . . . . . . . . . . . . . . . . . 93
3.13.5 Arbitraryobjects . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
3.13.6 Depositionpatterns . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
3.14 Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
3.14.1 Spaceshuttleascendconfiguration . . . . . . . . . . . . . . . . . . . 99
3.14.2 PilotejectingfromF18 . . . . . . . . . . . . . . . . . . . . . . . . . 100
3.14.3 CircleofWillis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
3.14.4 Genericsubmarinebody . . . . . . . . . . . . . . . . . . . . . . . . 105
CONTENTS vii
3.14.5 Ahmedcarbody . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
3.14.6 Truck . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
3.14.7 PointcloudforF117 . . . . . . . . . . . . . . . . . . . . . . . . . . 106
3.14.8 Hopperfilledwithbeans/ellipsoids. . . . . . . . . . . . . . . . . . . 107
3.14.9 Cubefilledwithspheresofdifferentsizes . . . . . . . . . . . . . . . 107
4 APPROXIMATIONTHEORY 109
4.1 Thebasicproblem. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
4.1.1 Pointfitting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
4.1.2 Weightedresidualmethods . . . . . . . . . . . . . . . . . . . . . . . 110
4.1.3 Least-squaresformulation . . . . . . . . . . . . . . . . . . . . . . . 112
4.2 Choiceoftrialfunctions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
4.2.1 Constanttrialfunctionsinonedimension . . . . . . . . . . . . . . . 112
4.2.2 Lineartrialfunctionsinonedimension . . . . . . . . . . . . . . . . 113
4.2.3 Quadratictrialfunctionsinonedimension . . . . . . . . . . . . . . . 114
4.2.4 Lineartrialfunctionsintwodimensions . . . . . . . . . . . . . . . . 115
4.2.5 Quadratictrialfunctionsintwodimensions . . . . . . . . . . . . . . 117
4.3 Generalpropertiesofshapefunctions . . . . . . . . . . . . . . . . . . . . . 118
4.4 Weightedresidualmethodswithlocalfunctions . . . . . . . . . . . . . . . . 118
4.5 Accuracyandeffort . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
4.6 Gridestimates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
5 APPROXIMATIONOFOPERATORS 123
5.1 Taxonomyofmethods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
5.1.1 Finitedifferencemethods . . . . . . . . . . . . . . . . . . . . . . . 123
5.1.2 Finitevolumemethods . . . . . . . . . . . . . . . . . . . . . . . . . 124
5.1.3 Galerkinfiniteelementmethods . . . . . . . . . . . . . . . . . . . . 124
5.1.4 Petrov–Galerkinfiniteelementmethods . . . . . . . . . . . . . . . . 124
5.1.5 Spectralelementmethods . . . . . . . . . . . . . . . . . . . . . . . 124
5.2 ThePoissonoperator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
5.2.1 Minimizationproblem . . . . . . . . . . . . . . . . . . . . . . . . . 125
5.2.2 Anexample . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
5.2.3 Tutorial:codefragmentforheatequation . . . . . . . . . . . . . . . 128
5.3 Recoveryofderivatives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
5.3.1 Firstderivatives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
5.3.2 Secondderivatives . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
5.3.3 Higherderivatives . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
6 DISCRETIZATIONINTIME 133
6.1 Explicitschemes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
6.2 Implicitschemes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
6.2.1 Situationswhereimplicitschemespayoff . . . . . . . . . . . . . . . 136
6.3 Awordofcaution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
viii CONTENTS
7 SOLUTIONOFLARGESYSTEMSOFEQUATIONS 137
7.1 Directsolvers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
7.1.1 Gaussianelimination . . . . . . . . . . . . . . . . . . . . . . . . . . 137
7.1.2 Croutelimination . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
7.1.3 Choleskyelimination . . . . . . . . . . . . . . . . . . . . . . . . . . 140
7.2 Iterativesolvers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
7.2.1 Matrixpreconditioning . . . . . . . . . . . . . . . . . . . . . . . . . 141
7.2.2 Globalizationprocedures . . . . . . . . . . . . . . . . . . . . . . . . 147
7.3 Multigridmethods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
7.3.1 Themultigridconcept . . . . . . . . . . . . . . . . . . . . . . . . . 154
7.3.2 Injectionandprojectionoperators . . . . . . . . . . . . . . . . . . . 155
7.3.3 Gridcycling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
7.3.4 Algorithmiccomplexityandstoragerequirements. . . . . . . . . . . 157
7.3.5 Smoothing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
7.3.6 Anexample . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
8 SIMPLEEULER/NAVIER–STOKESSOLVERS 161
8.1 Galerkinapproximation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
8.1.1 EquivalencywithFVM . . . . . . . . . . . . . . . . . . . . . . . . . 164
8.2 Lax–Wendroff(Taylor–Galerkin) . . . . . . . . . . . . . . . . . . . . . . . . 164
8.2.1 ExpeditingtheRHSevaluation . . . . . . . . . . . . . . . . . . . . . 165
8.2.2 Linearelements(triangles,tetrahedra) . . . . . . . . . . . . . . . . . 166
8.3 Solvingfortheconsistentmassmatrix . . . . . . . . . . . . . . . . . . . . . 167
8.4 Artificialviscosities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
8.5 Boundaryconditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
8.6 Viscousfluxes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172
9 FLUX-CORRECTEDTRANSPORTSCHEMES 175
9.1 Algorithmicimplementation . . . . . . . . . . . . . . . . . . . . . . . . . . 176
9.1.1 Thelimitingprocedure . . . . . . . . . . . . . . . . . . . . . . . . . 176
9.2 Steepening. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178
9.3 FCTforTaylor–Galerkinschemes . . . . . . . . . . . . . . . . . . . . . . . 179
9.4 Iterativelimiting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
9.5 Limitingforsystemsofequations . . . . . . . . . . . . . . . . . . . . . . . 180
9.5.1 Limitinganysetofquantities . . . . . . . . . . . . . . . . . . . . . 180
9.6 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
9.6.1 Shocktube . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
9.6.2 Shockdiffractionoverawall . . . . . . . . . . . . . . . . . . . . . . 182
9.7 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
10 EDGE-BASEDCOMPRESSIBLEFLOWSOLVERS 187
10.1 TheLaplacianoperator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188
10.2 Firstderivatives:firstform . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
10.3 Firstderivatives:secondform . . . . . . . . . . . . . . . . . . . . . . . . . . 191
10.4 Edge-basedschemesforadvection-dominatedPDEs. . . . . . . . . . . . . . 193
10.4.1 ExactRiemannsolver(Godunovscheme) . . . . . . . . . . . . . . . 194
10.4.2 ApproximateRiemannsolvers . . . . . . . . . . . . . . . . . . . . . 195