PDF Computational Fluid Dynamics For Incompressible Flow First Edition Roychowdhury Ebook Full Chapter

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 53

Computational fluid dynamics for

incompressible flow First Edition


Roychowdhury
Visit to download the full and correct content document:
https://textbookfull.com/product/computational-fluid-dynamics-for-incompressible-flow
-first-edition-roychowdhury/
More products digital (pdf, epub, mobi) instant
download maybe you interests ...

Computational Fluid Dynamics: Incompressible Turbulent


Flows 1st Edition Takeo Kajishima

https://textbookfull.com/product/computational-fluid-dynamics-
incompressible-turbulent-flows-1st-edition-takeo-kajishima/

Computational Methods for Fluid Dynamics Joel H.


Ferziger

https://textbookfull.com/product/computational-methods-for-fluid-
dynamics-joel-h-ferziger/

Computational Fluid Dynamics for Built and Natural


Environments Zhiqiang (John) Zhai

https://textbookfull.com/product/computational-fluid-dynamics-
for-built-and-natural-environments-zhiqiang-john-zhai/

Computational fluid dynamics in food processing Second


Edition. Edition Sun

https://textbookfull.com/product/computational-fluid-dynamics-in-
food-processing-second-edition-edition-sun/
Computational Fluid Dynamics A Practical Approach 3rd
Edition Jiyuan Tu

https://textbookfull.com/product/computational-fluid-dynamics-a-
practical-approach-3rd-edition-jiyuan-tu/

Computational Fluid Dynamics in Food Processing 2nd


Edition Da-Wen Sun (Editor)

https://textbookfull.com/product/computational-fluid-dynamics-in-
food-processing-2nd-edition-da-wen-sun-editor/

Uncertainty Quantification in Computational Fluid


Dynamics and Aircraft Engines 1st Edition Francesco
Montomoli

https://textbookfull.com/product/uncertainty-quantification-in-
computational-fluid-dynamics-and-aircraft-engines-1st-edition-
francesco-montomoli/

Using HPC for Computational Fluid Dynamics A Guide to


High Performance Computing for CFD Engineers 1st
Edition Shamoon Jamshed

https://textbookfull.com/product/using-hpc-for-computational-
fluid-dynamics-a-guide-to-high-performance-computing-for-cfd-
engineers-1st-edition-shamoon-jamshed/

Computational Fluid Flow and Heat Transfer: Advances,


Design, Control, and Applications 1st Edition Mukesh
Kumar Awasthi

https://textbookfull.com/product/computational-fluid-flow-and-
heat-transfer-advances-design-control-and-applications-1st-
edition-mukesh-kumar-awasthi/
Computational Fluid
Dynamics for
Incompressible Flows
Computational Fluid
Dynamics for
Incompressible Flows

D. G. Roychowdhury
First edition published 2020
by CRC Press
6000 Broken Sound Parkway NW, Suite 300, Boca Raton, FL 33487-2742
and by CRC Press
2 Park Square, Milton Park, Abingdon, Oxon, OX14 4RN
© 2021 Taylor & Francis Group, LLC
CRC Press is an imprint of Taylor & Francis Group, LLC
ISBN: 978-0-367-40806-0 (Hardback)
ISBN: 978-0-367-80917-1 (eBook)
Reasonable efforts have been made to publish reliable data and information, but the author and
publisher cannot assume responsibility for the validity of all materials or the consequences of their
use. The authors and publishers have attempted to trace the copyright holders of all material
reproduced in this publication and apologize to copyright holders if permission to publish in this
form has not been obtained. If any copyright material has not been acknowledged please write and
let us know so we may rectify in any future reprint.
Except as permitted under U.S. Copyright Law, no part of this book may be reprinted, reproduced,
transmitted, or utilized in any form by any electronic, mechanical, or other means, now known or
hereafter invented, including photocopying, microfilming, and recording, or in any information storage
or retrieval system, without written permission from the publishers.
For permission to photocopy or use material electronically from this work, access www.copyright.com
or contact the Copyright Clearance Center, Inc. (CCC), 222 Rosewood Drive, Danvers, MA 01923,
978-750-8400. For works that are not available on CCC please contact mpkbookspermissions@tandf.
co.uk

Trademark notice: Product or corporate names may be trademarks or registered trademarks, and
are used only for identification and explanation without intent to infringe.
Visit the eResource page: www.routledge.com/9780367408060
Dedication

To my Parents, Wife and Daughters


Contents
Preface ............................................................................................................ xix
Acknowledgements .......................................................................................xxiii

Chapter 1 Overview of CFD..........................................................................1


1.1 Introduction ......................................................................... 1
1.2 Basic Principles of CFD ....................................................... 2
1.3 What Does a CFD Algorithm Do?....................................... 2
1.4 Stages of a CFD Analysis ..................................................... 3
1.4.1 Pre-Processor........................................................... 3
1.4.2 Solver ...................................................................... 4
1.4.3 Post-Processor ......................................................... 4
1.5 Governing Equations ........................................................... 5
1.6 Discretization ....................................................................... 5
1.6.1 Finite Difference Method ........................................ 5
1.6.2 Finite Volume Method ............................................ 5
1.6.3 Finite Element Method ........................................... 5
1.7 Discretization Properties ...................................................... 6
Questions:..................................................................................... 7

Chapter 2 Governing Equations and Classification of PDE ..........................9


Governing Equations.................................................................... 9
2.1 Introduction ......................................................................... 9
2.1.1 Integral Form .......................................................... 9
2.1.2 Differential Form..................................................... 9
2.2 Conservative Form of the Flow Equations ........................... 9
2.2.1 Mass (Continuity).................................................... 9
2.2.1.1 Derivation of Continuity Equation.........10
2.2.2 Momentum Equations............................................12
2.2.2.1 Derivation of X-Momentum Equation ...13
2.2.3 Energy Equation.....................................................16
2.2.3.1 Derivation of Energy Equation...............18
2.2.4 General Scalar ........................................................23
2.3 Some Comments .................................................................24
2.3.1 Conservative and Non-Conservative Forms of
Equations ...............................................................24
2.3.2 Compressible and Incompressible Flow..................24

vii
viii Contents

Physical and Mathematical Classification of Partial


Differential Equations..............................................................25
2.4 Equilibrium Problems .........................................................25
2.5 Marching Problems .............................................................25
2.6 Mathematical Classification ................................................26
2.7 Important Equations...........................................................27
2.8 Boundary Conditions (BCs) ................................................28
2.8.1 Inlet Boundary .......................................................29
2.8.1.1 Inflow .....................................................29
2.8.1.2 Stagnation (Reservoir) ............................29
2.8.2 Outlet Boundary.....................................................29
2.8.2.1 Outflow...................................................29
2.8.2.2 Pressure ..................................................29
2.8.2.3 Radiation (Convection) ..........................29
2.8.3 Wall Boundaries .....................................................29
2.8.3.1 No-Slip Wall...........................................29
2.8.3.2 Slip Wall .................................................29
2.8.4 Other Boundary Conditions ...................................30
2.8.4.1 Symmetry Plane and Axis Boundary ......30
2.8.4.2 Periodic...................................................30
2.9 Summary.............................................................................30
Questions.....................................................................................30

Chapter 3 Finite Difference Method: Fundamentals ................................... 33


3.1 Introduction ........................................................................33
3.2 Taylor Series Expansion ......................................................34
3.3 Unequal Grid Spacing.........................................................38
3.4 Difference Representation of PDE ......................................39
3.4.1 Errors .....................................................................39
3.4.1.1 Truncation Error ....................................39
3.4.1.2 Round-off Error......................................40
3.4.2 Consistency ............................................................40
3.4.3 Stability ..................................................................41
3.4.3.1 Von Neumann’s Method .........................42
3.4.4 Convergence ...........................................................43
3.4.5 Lax’s Equivalence Theorem....................................43
3.4.6 Courant Number ....................................................44
3.5 Examples.............................................................................44
3.6 Summary.............................................................................46
Questions:....................................................................................46
Contents ix

Chapter 4 Finite Difference Method: Application ....................................... 49


4.1 Introduction ........................................................................49
4.2 One-Dimensional Diffusion Equations................................49
4.2.1 Explicit Methods ....................................................50
4.2.1.1 The Forward Time, Central Space ..........50
4.2.1.2 The Richardson’s Method ......................51
4.2.1.3 The DuFort-Frankel Method (D-F
Leap-Frog Method) ................................53
4.2.2 Implicit Methods ....................................................55
4.2.2.1 The Classical Implicit Method................55
4.2.2.2 The Crank-Nicolson Method .................57
4.2.2.3 The Method of Weighted Averages .........60
4.3 One-Dimensional Transport Equations...............................61
4.3.1 The Wave Equation ................................................62
4.3.1.1 The FTCS Method .................................62
4.3.1.2 Upwind Differencing ..............................63
4.3.1.3 The Lax Method (Lax-Friedrichs
Method)......................................................66
4.3.1.4 The Lax-Wendroff Method.....................67
4.3.1.5 The Two-Step Lax-Wendroff Method .....68
4.3.1.6 The MacCormack Method .....................68
4.3.1.7 The Beam-Warming Method ..................69
4.3.1.8 The Implicit Method ..............................70
4.3.2 The Complete Transport Equation.........................71
4.3.2.1 Central Difference...................................71
4.3.2.2 The Richardson Method.........................72
4.3.2.3 The DuFort-Frankel Method .................72
4.3.2.4 The Upwind Method ..............................73
4.4 Two-Dimensional Diffusion Equation.................................73
4.4.1 The Explicit Method ..............................................74
4.4.2 Implicit Methods ....................................................75
4.4.2.1 The Fully Implicit Method .....................75
4.4.2.2 The Crank-Nicolson Method .................75
4.4.2.3 The Alternate Direction Implicit (ADI)
Method...................................................75
4.4.2.4 Comments on Diffusion Equations.........77
4.4.2.5 Further Comments on Conservative vs.
Non-Conservative Variables ...................77
4.4.2.6 The Grid (Mesh) Independence Study ....78
4.5 Burgers’ Equation ...............................................................79
4.5.1 The Inviscid Burgers’ Equation ..............................81
4.5.1.1 Upwind Differencing ..............................81
x Contents

4.5.1.2 The Lax (Lax-Friedrichs) Method ..........81


4.5.1.3 The Lax-Wendroff Method.....................82
4.5.1.4 The MacCormack Method .....................83
4.5.1.5 Implicit Methods ....................................84
4.5.1.6 The Godunov Method............................84
4.5.1.7 The Roe Method.....................................89
4.5.2 The Viscid Burgers’ Equation .................................92
4.5.2.1 The FTCS Method .................................93
4.5.2.2 The DuFort-Frankel Method .................93
4.5.2.3 The Lax-Wendroff Method.....................94
4.5.2.4 The MacCormack Method .....................94
4.6 The Laplace Equation .........................................................95
4.7 Examples.............................................................................95
4.8 Summary...........................................................................107
Questions...................................................................................107

Chapter 5 Finite Volume Method.............................................................. 111


5.1 Introduction ......................................................................111
5.2 The Diffusion Equation.....................................................112
5.2.1 The Steady-State One-Dimensional Diffusion
Equation...............................................................113
5.2.2 Discretization of the Source Term ........................115
5.2.3 Discretized Equation at Boundaries .....................116
5.2.3.1 For Given Value at the Boundaries
(Dirichlet Boundary Conditions) ..........116
5.2.3.2 Insulated Boundary ..............................116
5.2.3.3 Mixed Boundary Conditions ................117
5.2.4 Assembling the Algebraic Equations ....................117
5.2.5 Extension to Two Dimensions ..............................118
5.2.6 Extension to Three Dimensions............................119
5.2.7 Desirable Properties of a Discretization Scheme...119
5.2.8 Further Comments on Interface Diffusion
Coefficients ...........................................................120
5.3 The Convection-Diffusion Equation .................................121
5.3.1 The Steady-State One-Dimensional
Advection-Diffusion Equation..............................122
5.3.1.1 The Central Differencing Scheme .........122
5.3.1.2 The Upwind Differencing Scheme ........124
5.3.1.3 Exact Solution ......................................127
5.3.1.4 The Exponential Scheme ......................128
5.3.1.5 The Hybrid Differencing Scheme..........129
Contents xi

5.3.1.6
The Second Order Upwind (SOU)
Scheme .................................................130
5.3.1.7 The Quadratic Upstream Interpolation
for Convective Kinetics (QUICK)
Scheme .................................................132
5.3.1.8 The FROMM Scheme ..........................133
5.3.1.9 Advantages and Disadvantages of
Various Convective Schemes.................135
5.3.2 Deferred Correction Approach.............................135
5.3.2.1 CDS......................................................136
5.3.2.2 SOU......................................................137
5.3.2.3 QUICK.................................................138
5.3.2.4 FROMM ..............................................139
5.3.3 Extension to Two Dimension ...............................140
5.3.3.1 UDS .....................................................141
5.3.3.2 CDS......................................................142
5.3.3.3 SOU......................................................143
5.3.3.4 QUICK.................................................144
5.3.3.5 FROMM ..............................................145
5.3.4 Extension to Three Dimension .............................146
5.3.4.1 UDS .....................................................147
5.3.4.2 CDS......................................................147
5.3.4.3 SOU......................................................147
5.3.4.4 QUICK.................................................148
5.3.4.5 FROMM ..............................................148
5.3.5 High Resolution and Bounded Convective
Schemes ................................................................148
5.3.5.1 Normalized Variable Formulation ........149
5.3.5.2 Convective Boundedness Criteria .........151
5.3.5.3 High-Resolution Schemes .....................151
5.3.5.4 The TVD Framework ...........................153
5.3.5.5 Implementation of Various Convective
Schemes in Code...................................156
5.4 Time-Dependent Methods.................................................157
5.4.1 One-Step Methods................................................158
5.4.1.1 Forward Differencing (Euler Method) ..158
5.4.1.2 Backward Differencing (Backward
Euler)....................................................158
5.4.1.3 Central Differencing (Crank-Nicolson) 158
5.5 Time Discretization Methods Applied to the General
Scalar Transport Equation ................................................159
xii Contents

5.5.1 Forward Differencing – Explicit Scheme ..............159


5.5.2 Backward Differencing – Implicit Scheme ............159
5.5.3 Crank-Nicolson – Central Difference Scheme: .....160
5.6 Courant Number...............................................................161
5.7 Uses of Time-Marching in CFD........................................161
5.8 Implementation of Boundary Conditions in Code ............161
5.8.1 Generalized Boundary Conditions .......................161
5.8.2 Convective Boundary Conditions .........................162
5.9 Examples...........................................................................163
5.10 Summary .........................................................................177
Questions...................................................................................179

Chapter 6 Solution of Incompressible Navier-Stokes Equations ............... 181


6.1 Introduction ......................................................................181
6.2 Pressure-Velocity Coupling ...............................................182
6.3 The Vorticity-Stream Function Method ............................184
6.3.1 Boundary Conditions ...........................................186
6.4 Primitive Variable Methods ...............................................187
6.4.1 Co-located Storage of Variables............................187
6.4.2 Staggered Grid .....................................................189
6.5 Solution Methods for the Primitive Variable Form of
N-S Equations...................................................................190
6.5.1 The Artificial Compressibility Method .................190
6.5.2 The Pressure Correction Approach ......................191
6.5.2.1 The MAC Method................................192
6.5.2.2 The Fractional Step Pressure
Projection Method................................192
6.6 The SIMPLE Method .......................................................193
6.6.1 Derivation of Velocity Correction and
Pressure Correction Equations .............................193
6.6.1.1 Pressure and Velocity Corrections ........194
6.6.2 Pressure Correction Equation...............................195
6.6.3 The SIMPLE Algorithm.......................................196
6.7 Variants of SIMPLE .........................................................198
6.7.1 The SIMPLER Algorithm....................................199
6.7.2 The SIMPLEC Algorithm ....................................201
6.7.3 The PISO (Pressure Implicit with Split
Operator) Algorithm ............................................202
6.8 Summary...........................................................................204
Questions:..................................................................................205
Contents xiii

Chapter 7 Finite Volume Method for Complex Geometries ...................... 207


7.1 Introduction ......................................................................207
7.2 Staggered Grid Algorithm .................................................207
7.3 The Co-located Grid Algorithm ........................................208
7.4 Discretization Methods for Non-Orthogonal
Structured Grids................................................................210
7.4.1 The Continuity Equation......................................211
7.4.2 The Transport Equation .......................................211
7.4.2.1 Discretization of Convective Flux.........212
7.4.2.2 Discretization of Diffusive Flux............214
7.4.2.3 Discretization of Pressure Term............216
7.4.2.4 Implementation of the QUICK
Scheme .................................................216
7.5 Solution of the Pressure Field ...........................................217
7.5.1 Derivation of Pressure Correction and Velocity
Correction Equations ...........................................217
7.5.2 Implementation of Momentum Interpolation ......219
7.6 Extension to Three Dimension ..........................................222
7.6.1 Discretization of Continuity Equations ................223
7.6.2 Discretization of Convective Flux.........................223
7.6.3 Discretization of Diffusive Flux............................224
7.6.4 Discretization of the Pressure Term......................227
7.6.5 Implementation of the QUICK Scheme ...............227
7.6.6 Implementation of the SIMPLE Algorithm .........228
7.7 Discretization Method for the Cartesian Structured Grid .231
7.7.1 The Continuity Equation......................................231
7.7.2 The Transport Equation .......................................233
7.7.2.1 Discretization of Convective Flux.........233
7.7.2.2 Discretization of Diffusive Flux............234
7.7.2.3 Discretization of the Pressure Term ......235
7.7.2.4 Implementation of the QUICK
Scheme .................................................235
7.7.2.5 Derivation of Pressure Correction
and Velocity Correction Equation ........236
7.7.2.6 Implementation of the Momentum
Interpolation.........................................238
7.8 Discretization Method for the Non-Orthogonal
Unstructured Grid.............................................................240
7.8.1 The Continuity Equation......................................240
7.8.2 The Transport Equation .......................................240
7.8.2.1 Discretization of Convective Flux.........242
7.8.2.2 Discretization of Diffusive Flux............242
7.8.2.3 Discretization of the Pressure Term ......245
xiv Contents

7.9 Solution of the Pressure Field ...........................................245


7.9.1 Derivation of Pressure Correction and
Velocity Correction Equations..............................245
7.9.2 Implementation of the Momentum Interpolation.. 247
7.9.3 Implementation of Higher-Order Schemes ...........249
7.10 Summary .........................................................................250
Questions...................................................................................250

Chapter 8 Solution of Algebraic Equations............................................... 253


8.1 Introduction ......................................................................253
8.2 Direct Methods .................................................................253
8.2.1 Gauss Elimination ................................................253
8.2.2 LU Decomposition ...............................................255
8.2.3 Tri-Diagonal Matrix Algorithm............................256
8.3 Iterative Methods ..............................................................258
8.3.1 The Jacobi Method...............................................258
8.3.2 The Point Gauss-Seidel Method ...........................259
8.3.3 Point Successive Over-Relaxation Method ...........260
8.3.4 The Line Gauss-Seidel Method ............................260
8.3.5 Convergence of the Iterative Methods ..................261
8.4 Conjugate Gradient (CG) Methods...................................262
8.4.1 The Pre-Conditioned BCG Method .....................263
8.4.2 The Pre-Conditioned CGS Method......................263
8.5 The Incomplete L-U Decomposition Method ...................264
8.5.1 Introduction .........................................................264
8.5.2 Pre-Conditioning by L-U Decomposition ............265
8.6 The Multigrid Method ......................................................268
8.6.1 Coarsening Step ...................................................269
8.6.2 Restriction Step ....................................................270
8.6.3 Prolongation Step.................................................270
8.6.4 Cycling Strategy ...................................................271
8.7 Examples...........................................................................272
8.8 Summary...........................................................................276
Questions:..................................................................................277

Chapter 9 Turbulence Modeling................................................................ 279


9.1 Introduction ......................................................................279
9.2 What Is Turbulence?..........................................................279
9.2.1 Characteristics of Turbulent Flows.......................279
9.2.2 Task of Turbulence Modeling ...............................280
9.3 Direct Numerical Simulation (DNS) .................................280
Contents xv

9.4 Reynolds Averaging...........................................................281


9.4.1 Reynolds-Averaged Navier-Stokes (RANS)
Equations .............................................................281
9.4.2 Eddy Viscosity Models Hypothesis ......................284
9.5 RANS Turbulence Models ................................................285
9.5.1 Zero-Equation Models .........................................285
9.5.1.1 Structure of the Turbulent Boundary
Layer ....................................................286
9.5.2 Key Modifications of Prandtl’s Mixing Length
Model ...................................................................287
9.5.2.1 The Cebaci-Smith Model......................287
9.5.2.2 The Baldwin-Lomax Model..................288
9.5.3 The Transport Equation for Turbulent Kinetic
Energy (One-Equation Model) .............................288
9.5.4 Two-Equation Models ..........................................289
9.5.4.1 The Standard k-ε Model.......................290
9.5.4.2 The Wilcox k-ω Model .........................290
9.5.4.3 The SST k- ω (Menter) Turbulence
Model ...................................................291
9.5.4.4 Near-Wall Modifications for
Two-Equation Models ..........................292
9.6 Reynolds Stress Transport (Equation-based) Models
(RSTMs) ...........................................................................295
9.7 Large Eddy Simulation......................................................298
9.8 Summary...........................................................................298
Questions...................................................................................299

Chapter 10 Grid Generation ....................................................................... 301


10.1 Introduction ....................................................................301
10.2 Geometry ........................................................................301
10.3 Grid Structure .................................................................301
10.4 Classification of Grid Types ............................................303
10.5 Generating Structured Grids Fitting Complex
Boundaries ......................................................................304
10.5.1 Blocking Out Cells..............................................304
10.5.2 Multi-Block Structured Grids.............................305
10.5.3 Body-Fitted Grids ..............................................305
10.6 Mesh Quality...................................................................306
10.7 Adaptive Grid..................................................................307
10.8 Grid-Generation Techniques ...........................................308
10.8.1 Coordinate Transformation ................................308
xvi Contents

10.8.2 Grid Generation .................................................310


10.8.2.1 Algebraic Grid Generation .................310
10.8.2.2 Differential-Equation Based
Techniques ..........................................313
10.9 Unstructured Grid Generation ........................................314
10.9.1 Connectivity Information ...................................315
10.9.2 Triangular Grid Generation................................316
10.9.2.1 The Advancing-Front Technique ........317
10.9.2.2 The Delaunay-Based Method .............318
Questions...................................................................................320

Chapter 11 Best Practice Guidelines in CFD............................................... 323


11.1 Introduction ....................................................................323
11.2 Sources of Error ..............................................................323
11.2.1 Model Errors and Uncertainties .........................324
11.2.2 Discretization or Numerical Errors ....................324
11.2.3 Iteration or Convergence Errors .........................324
11.2.4 Round-off Errors ................................................325
11.2.5 Application Uncertainties...................................325
11.2.6 User Errors .........................................................325
11.2.7 Code Errors ........................................................325
11.3 Best Practices Guidelines.................................................325
11.3.1 Geometry and Grid Design ................................325
11.3.1.1 Geometry Generation .........................325
11.3.1.2 Grid Design ........................................326
11.3.2 Discretization Schemes .......................................326
11.3.2.1 Spatial Discretization Errors...............326
11.3.2.2 Time Discretization Errors .................326
11.3.3 Convergence .......................................................327
11.3.4 Modeling Uncertainty ........................................327
11.3.4.1 Solution Algorithms ...........................327
11.3.4.2 Turbulence Modeling ..........................328
11.3.4.3 Near-Wall Modeling ...........................328
11.3.5 Round-off Errors ................................................329
11.3.6 User Errors .........................................................329
11.3.6.1 Boundary Conditions .........................329
11.4 Analysis of Results, Sensitivity Studies and
Uncertainties ...................................................................331
11.4.1 Analysis of Results..............................................331
11.4.2 Sensitivity Analysis .............................................331
11.4.3 Uncertainties ......................................................331
Contents xvii

11.5 Verification, Validation and Calibration ..........................332


11.5.1 Verification .........................................................332
11.5.1.1 Code Verification ................................332
11.5.1.2 Calculation Verification ......................332
11.5.2 Validation ...........................................................333

Appendix 1: Area and Volume Calculation...................................................... 335


Appendix 2: Transformation of Governing Equations to
Generalized Curvilinear Coordinates ........................................... 343
Appendix 3: Review of Vector Calculus........................................................... 349
Appendix 4: Case Studies ............................................................................... 369
References...................................................................................................... 381
Index.............................................................................................................. 387
Preface
Computational Fluid Dynamics (CFD) has become a powerful and essential tool
for fluid-flow analysis with the increase of computational power, better solution
algorithms and reduced cost of the computer. CFD can provide insight into
detailed flow behavior in a system. Today, engineers are increasingly using it for
the cost-effective, optimal design of a component/system based on performance
analysis. CFD has been successfully applied to various fields of engineering and
even medicine; the range of application is wide and encompasses many different
fluid phenomena.
Many commercial general-purpose CFD codes and very specialized CFD
programs are available. All the commercial codes are user-friendly and have a
pre-processing, solver and post-processing modules. However, while using the
commercial CFD codes, the user has no idea what is going on inside the
solver. It will be very difficult for the user to effectively use these codes unless
he/she is exposed to basic knowledge of the CFD process.
This book is written mainly for incompressible flow. It is prepared in simple
language with enough background for practicing engineers to find the book
useful for strengthening their fundamental knowledge in CFD. During my study
and teaching, I felt the need for a book that deals in detail with both finite differ-
ence and finite volume methods. This is necessary as the finite difference method
provides the basic foundations in CFD and strengthens the fundamentals of
CFD for the students/researchers engaged in the field.
I hope that this book will be very useful for both the undergraduate and gradu-
ate students. Wherever necessary, some advanced topics are added, which may be
useful for research students to gain insight and appreciate the CFD procedure. At
the end of the book, a chapter on best practice guidelines helps students and
practicing engineers.
Most chapters provide workout examples and questions to allow students to
check their understanding of the subject manually as well as with the help of
computer either by writing their own program or using commercial codes. Under-
graduate and graduate students undergoing CFD coursework are advised to
undertake CFD problems as their project work for a better understanding of the
essentials of the CFD process.

SCOPE
Chapter 1 is devoted to an overview of CFD and a basic introduction to vari-
ous CFD processes. The structure of commercial codes, basic governing equa-
tions and different types of discretization procedures with desirable properties
are discussed.
Chapter 2 deals with the governing equations used in CFD and their deriv-
ations, even though students have already had an introduction to these equa-
tions in their earlier courses. The basic difference between conservative and

xix
xx Preface

non-conservative forms of equations and their merit are discussed, as are the
physical and mathematical significance of partial difference equations and
various types of boundary conditions.
Chapter 3 explores the fundamentals of the finite difference method, along
with the errors associated with various numerical schemes. The consistency
and stability of the method is discussed, and Von Neumann’s method of
assessing the stability of the finite difference scheme is narrated.
Chapter 4 looks into the application of various finite difference methods.
This chapter discusses in detail, various common numerical methods of diffu-
sion equation, wave equation, complete transport equation and inviscid and
viscid Burgers’ equations with associated error, consistency and stability con-
sideration using explicit and implicit methods.
Chapter 5 deals with the finite volume method applied to one-dimensional
steady state diffusion and convection-diffusion problems. Discretization schemes
for convection fluxes and their merits are discussed in detail, and high-resolution
and bounded convective schemes are provided, especially for researchers. The
implementation of convective schemes in the code is discussed, so that readers
can appreciate them. The extension of these schemes to two and three dimension
is described. This chapter also deals with time dependent methods, including
various discretization schemes for the transient term, and the implementation of
boundary conditions in code.
Chapter 6 addresses the solution of incompressible N-S equations. The
merit and demerits of co-located and staggered grid arrangements are high-
lighted. Both vorticity-stream function and primitive variable methods are
explored. The SIMPLE algorithm and its variants used to solve the incom-
pressible N-S equations are described in detail along with their associated
merits and demerits.
Chapter 7 is devoted to the application of finite volume method in complex
geometries. The advantage of using the non-orthogonal co-located grid is high-
lighted, and the detailed discretization procedure for non-orthogonal structured
grid, Cartesian structured grid and unstructured grid with co-located meshes
are described. Finally, the implementation of the SIMPLE algorithm for these
cases is introduced.
Chapter 8 discussed the solution of algebraic equations arising from finite
difference/finite volume discretization. Various direct and iterative methods of
solving the system of equations and their merits are highlighted. Advanced
methods like conjugate gradient methods, preconditioning and the multigrid
method are discussed.
Chapter 9 deals with an introduction to turbulence and the need for turbu-
lence modeling. Since most real-life flow is turbulent in nature, characteristics
of turbulence and the task of turbulent modeling is discussed in detail. Popu-
larly used RANS turbulence models like k-ε, k-ω, SST k-ω are discussed. The
RSTM models and LES are presented.
Chapter 10 explores various types of grids and their classification. This
chapter briefly discusses body-fitted grids, adaptive grid and mesh quality.
Preface xxi

A short introduction to grid-generation methods for structured and unstruc-


tured grids is provided.
Chapter 11 involves sources of errors and the best practice guidelines to be
followed to reduce/avoid such types of error. An analysis of results, sensitivity
studies and uncertainties is provided to help CFD practitioners. The chapter
also discusses the need for and methods of verification and validation.
In Appendix 1, the method for calculating the area and volume for non-
orthogonal structured geometry is discussed, while in Appendix 2, the trans-
formation of equation from physical space to computation space is addressed.
In Appendix 3, basic vector calculus is discussed. Appendix 4 provides prob-
lems for readers to solving with commercial codes or by writing their own
codes and gain knowledge in CFD.
Acknowledgements
I would like to put on record the role played by my teachers, Prof. S.M. Deshpande
of the Indian Institute of Science, Bangalore, and Prof. T. Sundararajan and
Prof. Jayanti Srinivas of the Indian Institute of Technology, Madras, for expos-
ing me to the exciting field of CFD and providing me a basic background.
I would like to acknowledge the Indira Gandhi Centre for Atomic Research,
Kalpakkam, for providing the opportunities and training required during my
entire career. I would also like to put on record the contributions made by my
undergraduate and graduate students of the Hindustan Institute of Technology
and Science, Chennai, in the form of useful discussions that provided me insight
while writing this book.
Finally, I would like to thank my wife, Subhasree Roychowdhury, and daugh-
ters, Somasree Roychowdhury and Suryasree Roychowdhury, for their affection-
ate support, encouragement, tolerance of all my tantrums, and sacrifices to their
personal lives that they have endured while I was writing this book.

D. G. Roychowdhury

xxiii
1 Overview of CFD

1.1 INTRODUCTION
‘Computational fluid dynamics’ (CFD) is the science or art of solving
problems involving fluid flow using computers and numerical techniques.

Industrial flow is often complex and involves intricate geometries in heat


exchangers, turbomachinery, aircraft, electrical and electronic components,
meteorology, biomedical engineering, nuclear reactor, etc. In practical situ-
ations, the flow is generally three dimensional and turbulent. Also, the govern-
ing equations involving fluid flow are non-linear. Hence, obtaining analytical
solutions is impossible, although analytical solutions are available for simpli-
fied cases (like pipe flow, etc.) that are obtained after various degrees of
assumptions. These very useful techniques lack universal applications; we shall
see that turbulent flows are not amenable to analytical solutions. In earlier
days, designers used various correlations derived from experiments for designing
components. However, experiments normally provide global parameters like
drag, lift, pressure drop and heat transfer coefficients. A basic understanding of
the local details of flow and transport phenomena is essential for optimal design
performance of equipment. If we want to obtain any local flow parameters, vari-
ous sophisticated instruments are necessary, making the method very costly and,
in some cases, altering the flow phenomena. Also, not all flow parameters can be
simulated in the same setup.
CFD simulations can provide insight into a system’s detailed flow behavior
and help the designer arrive at an optimum design based on the “virtual” per-
formance analysis. With the increase of computational power, better solution
algorithm and reduced cost of the computer, the cost of “virtual prototyping”
has decreased with the use of CFD. Now, various aspects of flow field and
transport phenomena, which are not amenable to direct experimental technique,
can be studied in greater detail by CFD. However, one should remember that
CFD cannot replace the experimental technique completely. Only through CFD
analysis we can find the parameter important for a flow situation in a compo-
nent such as pump and design the experiment accordingly. Hence, both CFD
and experiments are complementary, and whatever we are designing by CFD
analysis must be validated through experiment.
As mentioned earlier, with the increase of computational power and reduced
cost of computers, CFD has become very popular and powerful in the design
stage for fluid flow analysis of the components. CFD has already been success-
fully applied to various fields of engineering and medicine. The range of applica-
tions is wide and encompasses many different fluid phenomena.

1
2 CFD for Incompressible Flows

1.2 BASIC PRINCIPLES OF CFD


Fluid dynamics is governed by the conservation of mass, momentum, energy
and any constituents normally expressed in terms of partial differential equations
(PDEs), which are continuously varying functions. Equations can be expressed
in differential or integral form (explained henceforth). We normally approximate
PDEs at a finite number of points, a process called discretization. In this process,
we get a set of equations known as difference equations (DEs). By discretization,
we convert the PDE to difference equations. This is shown in Figure 1.1.
The basic process of any CFD simulation

• The Governing Equation, normally represented by PDE and related to


field variables (u, v, w, p, . . .) that are continuous varying functions, is
discretized or approximated by their values at a finite number of
points called nodes.
• By this process, we get discrete equation, which is known as difference
equation (DE), for each node. Differential or integral equations, which
are continuous functions, are converted into a set of algebraic equations
consisting of each node by the discretization process.
• The system of algebraic equations thus obtained is solved to obtain
values at the nodes.

Continuous Discrete
curve approximation

FIGURE 1.1 Continuous vs discrete curve.

1.3 WHAT DOES A CFD ALGORITHM DO?


Many commercial general-purpose CFD programs are available (e.g. Fluent,
CFX, Star-CD, FLOW-3D and Phoenics). Some very specialized programs are
also available (e.g. simulating combustion in engines, electronic cooling systems,
etc.). All the commercial codes are user friendly and have pre-processing, solver
and post-processing modules. OpenFoam is an open-source program and can
handle most CFD problems. However, this code is not as user friendly as com-
mercial codes. In solving a problem using CFD, many steps must be defined, as
illustrated in Figure 1.2.
Overview of CFD 3

Physical System

Mathematical Modeling

Governing PDEs - Non-linear and Coupled

• Geometric Modeling – Define


geometry & boundary
• Grid Generation – Divide geometry into Pre-
small computational nodes/cells Processing
• Define Flow Properties
• Define Initial & Boundary Conditions

• Discretization
• Solution of System of Quasi-linear Equations
Solver
• Field Values of Flow Variables at Discrete Grid
Nodes

Post-Processing

FIGURE 1.2 CFD Process.

1.4 STAGES OF A CFD ANALYSIS


A complete CFD analysis consists of:

• pre-processing;
• solving;
• post-processing.

In Figure 1.2, we saw that the solver plays the most important part in the
CFD process; in this course, we shall be focusing our attention on the solving
process. However, we shall see that pre-processing and post-processing play
important roles in CFD. In commercial CFD codes, pre-processing and post-
processing are integral, and its user-friendly GUI helps the user to operate the
codes effortlessly.

1.4.1 PRE-PROCESSOR
The pre-processor is a user-friendly interface that provides problem inputs in
a form suitable for the flow solver.
A CFD pre-processor provides a
4 CFD for Incompressible Flows

• Definition of the geometry of the computational domain,


• Grid generation or meshing (i.e. subdivision of computation domain
into a finite number of non-overlapping sub-domains),
• Choice of time step sizes for unsteady problems,
• Choice of mathematical models for different physical complexities,
• Definition of fluid properties and
• Specification of boundary and initial conditions.

In commercial CFD packages, developing geometry and grid generation for


simpler geometry is possible. However, for complex geometries, the geometry
can be developed in dedicated CAD software like CATIA and PRO-E, and the
geometry can be imported in commercial CFD packages or other dedicated
software for generating quality grids.

1.4.2 SOLVER
Numerical solution of the governing equations consists of the

• Discretization and
• Solution of algebraic equations.

In commercial CFD codes, the solver is a “black box” (i.e. the user has no
idea what is going on inside the solver). However, unless the user is familiar
with the discretization process, it will be very difficult for him/her to supply
the proper input data for solving the cases and interpreting the output data.
Hence, proper understanding of the discretization is required.

1.4.3 POST-PROCESSOR
The first objective in post-processing is to analyse the quality of the solution.
Is the solution independent of the grid size, the convergence criterion and the
numerical schemes? Have the proper turbulence model and boundary condi-
tions been chosen, and is the solution strongly dependent on those choices?
Normally, output from the solver is a set of flow parameters (u, v, w, p, . . .)
corresponding to each point of the mesh. It will be very difficult for the user
to interpret the results from these raw data; they need to be manipulated in
a visual form so that interpretation becomes easier. For example, we can draw
the velocity distribution or velocity vector to understand the flow behavior.
Similarly, pressure contours become helpful in understanding the flow phe-
nomena. Commercial CFD packages provide facilities to monitor the residuals
during each iteration to check the convergence of the solution so that the user
can intervene if required.
Analysis of the final simulation results will then give local information
about flow, concentrations, temperatures, reaction rates, etc. The results that
can be typically presented are
Another random document with
no related content on Scribd:
Sewing Stand with Workbag in Top
The stand shown in the sketch may be made by using part of a
small table, or by building the framework especially for the purpose.
It was made for use in connection with sewing and fancy work, and
provides for the tools and incidental materials necessary. The stand
is 28 in. high and about 15 in. square at the top. The bag built into
the frame may be made of any strong, suitable material, and its color
should match the finish of the wooden part. A row of nails are set in
the top edge of the rails to provide for spools of thread and thimbles.
Scissors and other tools are placed on the shoulder hooks fastened
on the side of the rail.

¶When paper sticks to a negative during printing remove it by


soaking it in the hypo bath, sacrificing the print rather than the
negative.
Toy Paper Warships

Fig. 1
Fig. 3
Fig. 2
Fig. 4

Fleets of Battleships may be Made of Paper

With a pair of scissors, pins, and a newspaper or two, a fleet of


warships can be made to sail the seven seas of polished floors.
Strips of paper, through which holes at opposite points have been
cut, and pinned together at one end, as shown in Fig. 1, are used for
the sides of the boat. Rolls of paper are slipped through the opposite
holes, as shown at Fig. 2, and provide support for the deck, which is
a flat piece of paper pointed at the end to fit between the sides of the
craft. A second deck fitted with funnels and masts, as shown in Fig.
3, is made of a folded piece of paper with holes cut through it for the
masts and funnels, which are rolls of paper. If plain paper is used,
the warships may be made in several colors, which adds to the effect
of rivalry between the fleets. Other types of craft may easily be
devised, two of which are shown in Fig. 4. Not only the youngsters in
the household, but their elders as well, may find not a little
amusement and diversion in the making of a fleet of such warships,
modeled after battleships, destroyers, battle cruisers, and other
vessels.
Caster Board for Scrubbing and Floorwork
A board for use in work that requires tedious kneeling, as in
scrubbing, repairing of sidewalk lights, and similar work, may be
made as follows: Procure a board, ⁷⁄₈ by 10 by 14 in., and pad it with
a section of carpet. Place three casters under it, two being set at the
rear and one at the front edge. If desired, small strips may be nailed
at the sides to prevent the knees from slipping off. Such a device
enables the user to move along the floor easily without injuring the
knees.—R. S. Matzen, Fort Collins, Colo.
A Lamp Cooker
An ordinary circular-wick kerosene lamp produces enough heat to
do considerable cooking, provided the heat is properly utilized. A
simple and practicable method of converting such a lamp into a
cooker is as follows: Saw a hole, 12 in. square, in the top of a small
table, or packing box of about the same height as a table. Cover this
with a piece of sheet metal, having a 4-in. hole in the center. Place a
5-in. flowerpot over the hole in the metal, and plug up the hole in the
bottom of the pot with fire clay or plaster of Paris. Vegetables in jars
may be set around the flowerpot to cook slowly and a roast in a pan
on top of it. A wooden box, or metal pail, large enough to cover the
arrangement, should be placed over it. Air holes should be provided
in the lower box and in the cover.
This Lamp Cooker will Prepare Meats and Vegetables Satisfactorily, and is
Useful for the Camper and in Emergencies

To operate the device light the lamp and when it is burning brightly,
place it under the table, elevating it so that the top of the chimney is
in the center and barely within the rim of the flowerpot. Use little
water in the vegetables and keep the caps loosely on the jars. The
roast, if well buttered, will brown nicely, and while the cooking will
require considerably more time than it would in a range, the results
will be as good, if not superior. The natural juices are preserved by
the slow cooking at comparatively low temperature. The cover may
be lifted to turn the meat occasionally. This device will appeal to
campers, summer cottagers and others.—W. W. Baldwin, New York,
N. Y.
Placing a Miter Box on the Workbench
In placing a miter box on a workbench considerable space is often
wasted, and the workman is obstructed. By raising the miter box on
the bench mounting it upon two blocks, about 6 in. high and set back
about 18 in. from the front of the bench, small space is utilized, and
the tool may be used as conveniently as otherwise. The space under
the miter box and the open space in front of it are available for the
disposal of ordinary tools, and there is no danger of the saw striking
them. By making another stand, the height of the bearing surface of
the miter box, and moving this about on the bench, long pieces may
be handled with ease. This stand is removed from the bench when
not in use.—Henry Simon, Laguna Beach, Calif.
A Book and Document Protector
A device for punching identification marks in the pages of books or
papers, may be made easily by setting pins into a small box filled
with sealing wax. The box should be large enough to accommodate
the desired wording without crowding, leaving about ¹⁄₄ in. all around
the edge. Cut the box, which may be of cardboard, to a height ¹⁄₁₆ in.
less than the length of a common pin. Mark the words to be punched
on a piece of cardboard which just fits into the box. Punch holes
along the letters and transfer them to the bottom of the box. Insert
pins from the outside through the bottom of the box and permit their
ends to come out of the holes in the cardboard guide. Cut away
enough of the guide piece so that the melted sealing wax can be
poured in, setting the pins firmly. The guide piece is then removed,
exposing the ends of the pins about ¹⁄₁₆ in. If the work is carefully
done they will be of uniform length. Place heavy blotting paper or
cardboard under the page when using the punch.—D. G. Stevenson,
Chicago, Ill.
Blotter Attached to Wrist Saves Time

The annoyance of having to look for a misplaced blotter or to pick


it up each time a signature is to be blotted, may be avoided by the
use of the wrist blotter shown in the sketch. It is made by folding a
piece of blotting paper, 6 in. wide and 12 in. long, into three sections.
A rubber band is placed in the fold of the blotter and passed around
the wrist, thus holding it in place until no longer needed. When one
portion of the blotter becomes soiled, the folding may be reversed
and a new surface exposed.—Frank W. Roth, Joplin, Mo.
Celluloid Cover for Road Maps
Road maps are easily soiled and torn unless properly protected,
and a satisfactory case to hold them should provide for conveniently
examining the map. A piece of transparent celluloid about twice the
size of the map when folded can be made into a suitable cover. Fold
the celluloid into an envelope form and rivet or sew the ends, leaving
the fourth edge open. The map is inserted in the cover with the
desired section uppermost, affording protection and ready access at
the same time.
Shield for Heater in Chick Brooding House
A shield of sheet metal, having a small heater in the center of it,
provides a good means of warming a brooding house for small
chicks. The heat is radiated from the shield and the chicks remain at
a distance, seeking a comfortable temperature. The device may be
made easily by cutting a sheet of metal to form a cone-shaped hood
and fitting it with a vent passing out through the roof of the house.—
Samuel S. Snelbaker, York, Pa.
Kink for Removal of Wall Paper

Removing old wall paper, particularly from the ceiling of a room, is


a disagreeable task at best, and the device shown in the sketch aids
in the process. A board, about 15 in. long and 12 in. wide, was
provided with strips at its edges and a pad of flannel was fitted into it.
The device is used by moistening the pad and applying it to the wall
paper. The paper is loosened thoroughly and may be removed in
pieces of considerable size. This method has been found much
quicker than that of soaking the paper with a moistened brush.—J.
H. Moore, Hamilton, Canada.

¶A clay pipe may be used as a crucible for melting small quantities


of metal. The stem is broken off and a plug fitted into it.
A Secret Trinket Case for the
Bookshelf
By T. H. LINTHICUM

Practical use as well as the novelty of its construction makes the


trinket case shown in the illustration well worth the time and effort
necessary to make it. Various kinds of wood—preferably of the better
cabinet varieties—are suited to the design shown, which was made
of ³⁄₁₆-in. stock, like that used in cigar boxes. The size shown is that
of a bound volume of a magazine like Popular Mechanics, and may
be adapted to special needs. The back and the cover slide in
grooves, which are not visible when the “book” is closed, making it
difficult and interesting for one to discover how the case is opened.
The back may be marked and lettered to resemble a bound volume
closely, and if special secrecy is desired, it may even be covered
with leather, in exact duplication of those on a bound set of
magazines kept in the bookcase with it.
This Trinket Case Is a Practical Novelty That may be Used as a Secret
Container to be Set on the Bookshelf with Similar Bound Volume

Make the pieces for the frame of the box first. If possible, make
one strip of the proper width—2 in., in this case—and long enough
for the two ends and the front. Make another strip 1³⁄₄ in. wide and
long enough for the partition and false back of the tray. Cut these to
the lengths indicated in the detailed sketches of the parts. Mark out
the grooves in the end pieces carefully and cut them with a saw that
cuts a groove ³⁄₃₂ in. wide. The grooves may be cut by clamping a
straight strip of wood on the surface of the ends the proper distance
from the top, and sawing cautiously along the strip to the proper
depth. The grooves across the grain may be cut similarly, or in a
miter box.
Glue the pieces of the frame together, taking care that the corners
are square. If necessary, place blocks inside to insure that the
clamping will not disturb the right angles of the box. Shape the

You might also like