+ All Categories
Home > Documents > APPLIED COMPUTATIONAL FLUID DYNAMICS TECHNIQUES

APPLIED COMPUTATIONAL FLUID DYNAMICS TECHNIQUES

Date post: 28-Oct-2021
Category:
Upload: others
View: 3 times
Download: 0 times
Share this document with a friend
10
APPLIED COMPUTATIONAL FLUID DYNAMICS TECHNIQUES AN INTRODUCTION BASED ON FINITE ELEMENT METHODS Second Edition Rainald Löhner Center for Computational Fluid Dynamics, Department of Computational and Data Sciences, College of Sciences, George Mason University, Fairfax, Virginia, USA John Wiley & Sons, Ltd c
Transcript
Page 1: APPLIED COMPUTATIONAL FLUID DYNAMICS TECHNIQUES

APPLIED COMPUTATIONAL FLUID DYNAMICS TECHNIQUES AN INTRODUCTION BASED ON FINITE ELEMENT METHODS

Second Edition

Rainald Löhner

Center for Computational Fluid Dynamics, Department of Computational and Data Sciences, College of Sciences, George Mason University, Fairfax, Virginia, USA

John Wiley & Sons, Ltd c

Page 2: APPLIED COMPUTATIONAL FLUID DYNAMICS TECHNIQUES

CONTENTS

FOREWORD TO THE SECOND EDITION xiv

ACKNOWLEDGEMENTS xvii

1 INTRODUCTION AND GENERAL CONSIDERATIONS 1 1.1 The CFD code 4 1.2 Porting research codes to an industrial context 5 1.3 Scope of the book 5

2 DATA STRUCTURES AND ALGORITHMS 7 2.1 Representation of a grid 7 2.2 Derived data structures for static data 9

2.2.1 Elements surrounding points - linked lists 9 2.2.2 Points surrounding points 10 2.2.3 Elements surrounding elements 12 2.2.4 Edges 14 2.2.5 External faces 14 2.2.6 Edges of an dement 16

2.3 Derived data structures for dynamic data 17 2.3.1 N-trees 18

2.4 Sorting and searching 19 2.4.1 Heap lists 19

2.5 Proximity in space 22 2.5.1 Bins 22 2.5.2 Binary trees 26 2.5.3 Quadtrees and octrees 28

2.6 Nearest-neighbours and graphs 30 2.7 Distance to surface 30

3 GRID GENERATION 35 3.1 Description of the domain to be gridded 37

3.1.1 Analytical functions 37 3.1.2 Discretedata 37

3.2 Variation of dement size and shape 38 3.2.1 Internal measures of grid quality 39 3.2.2 Analytical functions ^ 39 3.2.3 Boxes ) 39

Page 3: APPLIED COMPUTATIONAL FLUID DYNAMICS TECHNIQUES

CONTENTS

3.2.4 Point/line/surface sources 39 3.2.5 Background grids 42 3.2.6 Element size attached to CAD data 43 3.2.7 Adaptive background grids 43 3.2.8 Surface gridding with adaptive background grids 45

3.3 Element type 46 3.4 Automatic grid generation methods 47 3.5 Other grid generation methods 49 3.6 The advancing front technique 51

3.6.1 Checking the intersection of faces 52 3.6.2 Data structures to minimize search overheads 56 3.6.3 Additional techniques to increase speed 56 3.6.4 Additional techniques to enhance reliability 58

3.7 Delaunay triangulation 59 3.7.1 Circumsphere calculations 61 3.7.2 Data structures to minimize search overheads 62 3.7.3 Boundary recovery 63 3.7.4 Additional techniques to increase speed 63 3.7.5 Additional techniques to enhance reliability and quality 64

3.8 Grid improvement 65 3.8.1 Removal of bad elements 66 3.8.2 Laplacian smoothing 67 3.8.3 Grid optimization 67 3.8.4 Selective mesh movement 67 3.8.5 Diagonal swapping 68

3.9 Optimal space-filling tetrahedra 70 3.10 Grids with uniform cores 72 3.11 Volume-to-surface meshing 73 3.12 Navier-Stokes gridding techniques 75

3.12.1 Design criteria for RANS gridders 77 3.12.2 Smoothing of surface normals 79 3.12.3 Point distribution along normals 81 3.12.4 Subdivision of prisms into tetrahedra 81 3.12.5 Element removal criteria 83

3.13 Filling space with points/arbitrary objects 90 3.13.1 The advancing front space-filling algorithm 90 3.13.2 Point/object placement stencils 91 3.13.3 Boundary consistency checks 93 3.13.4 Maximum compaction techniques 93 3.13.5 Arbitrary objects 96 3.13.6 Deposition patterns 96

3.14 Applications 98 3.14.1 Space Shuttle ascend configuration 99 3.14.2 PilotejectingfromF18 100 3.14.3 Circleof Willis 103 3.14.4 Generic submarine body 105

Page 4: APPLIED COMPUTATIONAL FLUID DYNAMICS TECHNIQUES

V l l

3.14.5 Ahmed carbody 105 3.14.6 Track 105 3.14.7 PointcloudforF117 106 3.14.8 Hopper füled with beans/ellipsoids 107 3.14.9 Cube Med with spheres of different sizes 107

4 APPROXIMATION THEORY 109 4.1 The basic problem 109

4.1.1 Point fitting 110 4.1.2 Weighted residual methods 110 4.1.3 Least-squares formulation 112

4.2 Choice of trial functions 112 4.2.1 Constant trial functions in one dimension 112 4.2.2 Linear trial functions in one dimension 113 4.2.3 Quadratic trial functions in one dimension 114 4.2.4 Linear trial functions in two dimensions 115 4.2.5 Quadratic trial functions in two dimensions 117

4.3 General properties of shape functions 118 4.4 Weighted residual methods with local functions 118 4.5 Accuracy and effort 119 4.6 Grid estimates 121

5 APPROXIMATION OF OPERATORS 123 5.1 Taxonomy of methods 123

5.1.1 Finite difference methods 123 5.1.2 Finite volume methods 124 5.1.3 Galerkin finite dement methods 124 5.1.4 Petrov-Galerkin finite dement methods 124 5.1.5 Spectral dement methods 124

5.2 The Poisson Operator 124 5.2.1 Minimization problem 125 5.2.2 An example 126 5.2.3 Tutorial: code fragment for heat equation 128

5.3 Recovery of derivatives 130 5.3.1 First derivatives 131 5.3.2 Second derivatives 131 5.3.3 Higher derivatives 132

6 DISCRETIZATION IN TIME 133 6.1 Explicit schemes 133 6.2 Implicit schemes 135

6.2.1 Situations where implicit schemes pay off 136 6.3 A word of caution 136

Page 5: APPLIED COMPUTATIONAL FLUID DYNAMICS TECHNIQUES

V l l l CONTENTS

7 SOLUTION OF LARGE SYSTEMS OF EQUATIONS 137 7.1 Direct solvers 137

7.1.1 Gaussian elimination 137 7.1.2 Crout elimination 139 7.1.3 Cholesky elimination 140

7.2 Iterative solvers 140 7.2.1 Matrix preconditioning 141 7.2.2 Globalization procedures 147

7.3 Multigrid methods 153 7.3.1 The multigrid concept 154 7.3.2 Injection and projection Operators 155 7.3.3 Gridcycling 157 7.3.4 Algorithmic complexity and storage requirements 157 7.3.5 Smoothing 158 7.3.6 An example 159

8 SIMPLE EULER/NAVIER-STOKES SOLVERS 161 8.1 Galerkin approximation 162

8.1.1 Equivalency with FVM 164 8.2 Lax-Wendroff(Taylor-Galerkin) 164

8.2.1 Expediting the RHS evaluation 165 8.2.2 Linear elements (triangles, tetrahedra) 166

8.3 Solving for the consistent mass matrix 167 8.4 Artificial viscosities 167 8.5 Boundary conditions 169 8.6 Viscous fluxes 172

9 FLUX-CORRECTED TRANSPORT SCHEMES 175 9.1 Algorithmic implementation 176

9.1.1 The limiting procedure 176 9.2 Steepening 178 9.3 FCT for Taylor-Galerkin schemes 179 9.4 Iterative limiting 179 9.5 Limiting for Systems of equations 180

9.5.1 Limiting any set of quantities 180 9.6 Examples 181

9.6.1 Shocktube 181 9.6.2 Shock diffraction over a wall 182

9.7 Summary 183

10 EDGE-BASED COMPRESSIBLE FLOW SOLVERS 187 10.1 The Laplacian Operator 188 10.2 First derivatives: first form 190 10.3 First derivatives: second form 191 10.4 Edge-based schemes for advection-dominated PDEs 193

10.4.1 Exact Riemann solver (Godunov scheme) 194 10.4.2 Approximate Riemann solvers 195

Page 6: APPLIED COMPUTATIONAL FLUID DYNAMICS TECHNIQUES

IX

10.4.3 Scalar limited dissipation 197 10.4.4 Scalar dissipation with pressure sensors 197 10.4.5 Scalar dissipation without gradients 198 10.4.6 Taylor-Galerkin schemes 199 10.4.7 Flux-corrected transport schemes 199

11 INCOMPRESSIBLE FLOW SOLVERS 201 11.1 The advection Operator 201

11.1.1 Integration along characteristics 202 11.1.2 Taylor-Galerkin 202 11.1.3 Edge-based upwinding 203

11.2 The divergence Operator 203 11.3 Artificial compressibility 206 11.4 Temporal discretization: projection schemes 206 11.5 Temporal discretization: implicit schemes 208 11.6 Temporal discretization of higher order 209 11.7 Acceleration to the steady State 210

11.7.1 Local timestepping 210 11.7.2 Reduced pressure iterations 210 11.7.3 Substepping for the advection terms 211 11.7.4 Implicit treatment of the advection terms 211

11.8 Projective predictionof pressure increments 212 11.9 Examples 213

11.9.1 von Karman vortex street 213 11.9.2 NACA0012wing 216 11.9.3 LPD-17topside flow study 218 11.9.4 DARPA SUBOFF model 223 11.9.5 Generic submarine forebody vortex flow study 225

12 MESH MOVEMENT 227 12.1 The ALE frame of reference 227

12.1.1 Boundary conditions 228 12.2 Geometrie conservation law 228 12.3 Mesh movement algorithms 229

12.3.1 Smoothingofthevelocityfield 230 12.3.2 Smoothing of the coordinates 233 12.3.3 Prescription via analytic funetions 235

12.4 Region of moving elements 235 12.5 PDE-based distance funetions 236

12.5.1 Eikonal equation 237 12.5.2 Laplace equation 237

12.6 Penalization of deformed elements 238 12.7 Special movement techniques for RANS grids 239 12.8 Rotating parts/domains 240

Page 7: APPLIED COMPUTATIONAL FLUID DYNAMICS TECHNIQUES

X CONTENTS

12.9 Applications 241 12.9.1 Multiple spheres 241 12.9.2 PilotejectionfromF18 242 12.9.3 Drifting fleet of ships 242

13 INTERPOLATION 245 13.1 Basic Interpolation algorithm 246 13.2 Fastest 1-time algorithm: brüte force 247 13.3 Fastest iV-time algorithm: octree search 247 13.4 Fastest known vicinity algorithm: neighbour-to-neighbour 249 13.5 Fastest grid-to-grid algorithm: advancing-front vicinity 250

13.5.1 Layering of brute-force searches 252 13.5.2 Inside-out interpolation 253 13.5.3 Measuring concavity 253 13.5.4 Vectorization 254

13.6 Conservative interpolation 257 13.6.1 Conservative and monotonic interpolation 259

13.7 Surface-grid-to-surface-grid interpolation 261 13.8 Particle-grid interpolation 265

14 ADAPTIVE MESH REFINEMENT 269 14.1 Optimal-mesh criteria 270 14.2 Error indicators/estimators 271

14.2.1 Error indicators commonly used 272 14.2.2 Problems with multiple scales 275 14.2.3 Determination of element size and shape 276

14.3 Refinement strategies 278 14.3.1 Mesh movement or repositioning (r-methods) 278 14.3.2 Mesh enrichment (h/p-methods) 278 14.3.3 Adaptive remeshing (M-methods) 284 14.3.4 Combinations 286

14.4 Tutorial: h-refinement with tetrahedra 286 14.4.1 Algorithmic implementation 287

14.5 Examples 291 14.5.1 Convection between concentric cylinders 291 14.5.2 Shock-object interaction in two dimensions 294 14.5.3 Shock-object interaction in three dimensions 296 14.5.4 Shock-structure interaction 297 14.5.5 Object falling into supersonic free stream two dimensions 297

15 EFFICIENT USE OF COMPUTER HARDWARE 299 15.1 Reduction of cache-misses 300

15.1.1 Array access in loops 300 15.1.2 Point renumbering 301 15.1.3 Reordering of nodes within elements 306 15.1.4 Renumbering of edges according to points 306

Page 8: APPLIED COMPUTATIONAL FLUID DYNAMICS TECHNIQUES

CONTENTS xi

15.1.5 Some timings 308 15.1.6 Agglomeration techniques 309

15.2 Vector machines 316 15.2.1 Basic edge colouring algorithm 317 15.2.2 Backward/forward strategy 318 15.2.3 Combining vectorizability with data locality 318 15.2.4 Switching algorithm 319 15.2.5 Reduced i/a loops 321 15.2.6 Alternative RHS formation 326

15.3 Parallel machines: general considerations 328 15.4 Shared-memory parallel machines 329

15.4.1 Local agglomeration 330 15.4.2 Global agglomeration 331 15.4.3 Implementational issues 333

15.5 SIMD machines 334 15.6 MIMD machines 336

15.6.1 General considerations 337 15.6.2 Load balancing and domain Splitting 337 15.6.3 Parallel flow solvers 342

15.7 The effect ofMoore's law on parallel Computing 344 15.7.1 The life cycle of scientific Computing codes 346 15.7.2 Examples 348 15.7.3 The consequences ofMoore's law 349

16 SPACE-MARCHING AND DEACTIVATION 351 16.1 Space-marching 351

16.1.1 Masking of points and edges 352 16.1.2 Renumbering of points and edges 354 16.1.3 Grouping to avoid memory contention 355 16.1.4 Extrapolation of the Solution 356 16.1.5 Treatment of subsonic pockets 357 16.1.6 Measuring convergence 357 16.1.7 Application to transient problems 358 16.1.8 Macro-blocking 359 16.1.9 Examples for space-marching and blocking 360

16.2 Deactivation 365 16.2.1 Examples of dynamic deactivation 366

17 OVERLAPPING GRIDS 371 17.1 Interpolation criteria 372 17.2 External boundaries and domains 373 17.3 Interpolation: initialization 373 17.4 Treatment of domains that are partially outside 375 17.5 Removal of inactive regions 375 17.6 Incremental interpolation 377 17.7 Changes to the flow solver 377

Page 9: APPLIED COMPUTATIONAL FLUID DYNAMICS TECHNIQUES

XÜ CONTENTS

17.8 Examples 378 17.8.1 Sphere in Channel (compressible Euler) 378 17.8.2 Sphere in shear flow (incompressible Navier-Stokes) 378 17.8.3 Spinning missile 379

18 EMBEDDED AND IMMERSED GRID TECHNIQUES 383 18.1 Kinetic treatment of embedded or immersed objects 385

18.1.1 Implementation details 388 18.2 Kinematic treatment of embedded surfaces 389

18.2.1 First-order treatment 389 18.2.2 Higher-order treatment 392 18.2.3 Determination of crossed edges 394

18.3 Deactivation of interior regions 395 18.4 Extrapolation of the Solution 397 18.5 Adaptive mesh refinement 397 18.6 Load/flux transfer 398 18.7 Treatment of gaps or cracks 399 18.8 Direct link to particles 400 18.9 Examples 401

18.9.1 Sodshocktube 401 18.9.2 Shuttle ascend configuration 401 18.9.3 Blast interaction with a generic ship hüll 402 18.9.4 Generic weapon fragmentation 404 18.9.5 Flow past a sphere 405 18.9.6 Dispersion in an inner city 411 18.9.7 Complex endovascular devices 411 18.9.8 Flow past a VW Golf 5 411

19 TREATMENT OF FREE SURFACES 419 19.1 Interface fitting methods 419

19.1.1 Free surface discretization 421 19.1.2 Overall scheme 422 19.1.3 Mesh update 422 19.1.4 Examples for surface fitting 424 19.1.5 Practical limitations of free surface fitting 427

19.2 Interface capturing methods 429 19.2.1 Extrapolation of the pressure 432 19.2.2 Extrapolation of the velocity 432 19.2.3 Keeping interfaces sharp 432 19.2.4 Imposition of constant mass 433 19.2.5 Deactivation of air region 433 19.2.6 Treatment ofbubbles 434 19.2.7 Adaptive refinement 435 19.2.8 Examples for surface capturing 435 19.2.9 Practical limitations of free surface capturing 448

Page 10: APPLIED COMPUTATIONAL FLUID DYNAMICS TECHNIQUES

CONTENTS XÜi

20 OPTIMAL SHAPE AND PROCESS DESIGN 449 20.1 The general optimization problem 449 20.2 Optimization techniques 451

20.2.1 Recursive exhaustive parameter scoping 452 20.2.2 Genetic algorithms 453 20.2.3 Gradient-based algorithms 458

20.3 Adjoint solvers 462 20.3.1 Adjoint equations: residuals with first derivatives and source terms . . 463 20.3.2 Adjoint equations: residuals with second derivatives 464 20.3.3 Jacobians for Euler/Navier-Stokes equations 465 20.3.4 Adjoint solvers 467 20.3.5 Gradient evaluation 468

20.4 Geometrie constraints 469 20.4.1 Volume constraint via cost funetion 469 20.4.2 Volume constraint via gradient projeetion 470 20.4.3 Volume constraint via post-processing 471

20.5 Approximate gradients 471 20.6 Multipoint optimization 471 20.7 Representation of surface changes 472 20.8 Hierarchical design procedures 472 20.9 Topological optimization via porosities 473 20.10Examples 474

20.10.1 Damage assessment for contaminant release 474 20.10.2 External nozzle 475 20.10.3 Wigley hüll 477 20.10.4 KRISO Container ship(KCS) 480

References 481

Index 515


Recommended