# Krylov Subspace Methods with Application in Incompressible Fluid Flow Solvers

1. Edition August 2020

256 Pages, Hardcover*Wiley & Sons Ltd*

**978-1-119-61868-3**

A succinct and complete explanation of Krylov subspace methods for solving systems of equations

Krylov Subspace Methods with Application in Incompressible Fluid Flow Solvers is the most current and complete guide to the implementation of Krylov subspace methods for solving systems of equations with different types of matrices.

Written in the simplest language possible and eliminating ambiguities, the text is easy to follow for post-grad students and applied mathematicians alike. The book covers a breadth of topics, including:

* The different methods used in solving the systems of equations with ill-conditioned and well-conditioned matrices

* The behavior of Krylov subspace methods in the solution of systems with ill-posed singular matrices

* Expertly supported with the addition of a companion website hosting computer programs of appendices

The book includes executable subroutines and main programs that can be applied in CFD codes as well as appendices that support the results provided throughout the text. There is no other comparable resource to prepare the reader to use Krylov subspace methods in incompressible fluid flow solvers.

List of Tables xv

Preface xvii

About the Companion Website xix

1 Introduction 1

1.1 Motivation 1

1.1.1 Governing Equations 2

1.1.2 Methods for Solving Flow Equations 3

1.2 History of Krylov Subspase Methods 4

1.3 Scope of Book 7

1.3.1 The General Structure of Solver 7

1.3.2 Review of Book Content 10

2 Discretization of Partial Differential Equations and Formation of Sparse Matrices 13

2.1 Introduction 13

2.2 Partial Differential Equations 13

2.2.1 Elliptic Operators 14

2.2.2 Convection-Diffusion Equation 15

2.3 Finite Difference Method 16

2.4 Sparse Matrices 17

2.4.1 Benchmark Problems for Comparing Solvers 17

2.4.2 Storage Formats of Sparse Matrices 21

2.4.2.1 Coordinate Format 21

2.4.2.2 Compressed Sparse Row Format 22

2.4.2.3 Block Compressed Row Storage Format 23

2.4.2.4 Sparse Block Compressed Row Storage Format 24

2.4.2.5 Modified Sparse Row Format 25

2.4.2.6 Diagonal Storage Format 25

2.4.2.7 Compressed Diagonal Storage Format 27

2.4.2.8 Ellpack-Itpack Format 28

2.4.3 Redefined Matrix-Vector Multiplication 28

Exercises 29

3 Theory of Krylov Subspace Methods 31

3.1 Introduction 31

3.2 Projection Methods 31

3.3 Krylov Subspace 34

3.4 Conjugate Gradient Method 35

3.4.1 Steepest Descent Method 35

3.4.2 Derivation of Conjugate Gradient Method 38

3.4.3 Convergence 40

3.5 Minimal Residual Method 41

3.6 Generalized Minimal Residual Method 42

3.7 Conjugate Residual Method 44

3.8 Bi-Conjugate Gradient Method 45

3.9 Transpose-Free Methods 47

3.9.1 Conjugate Gradient Squared Method 48

3.9.2 Bi-Conjugate Gradient Stabilized Method 50

Exercises 54

4 Numerical Analysis of Krylov Subspace Methods 57

4.1 Numerical Solution of Linear Systems 57

4.1.1 Solution of Symmetric Positive-Definite Systems 58

4.1.2 Solution of Asymmetric Systems 64

4.1.3 Solution of Symmetric Indefinite Systems 67

4.2 Preconditioning 69

4.2.1 Preconditioned Conjugate Gradient Method 69

4.2.2 Preconditioning With the ILU(0) Method 71

4.2.3 Numerical Solutions Using Preconditioned Methods 72

4.3 Numerical Solution of Systems Using GMRES¯* 77

4.4 Storage Formats and CPU-Time 78

4.5 Solution of Singular Systems 84

4.5.1 Solution of Poisson's Equation with Pure Neumann Boundary Conditions 84

4.5.2 Comparison of the Krylov Subspace Methods with the Point Successive Over-Relaxation (PSOR) Method 95

Exercises 96

5 Solution of Incompressible Navier-Stokes Equations 99

5.1 Introduction 99

5.2 Theory of the Chorin's Projection Method 100

5.3 Analysis of Projection Method 101

5.4 The Main Framework of the Projection Method 103

5.4.1 Implementation of the Projection Method 104

5.4.2 Discretization of the Governing Equations 104

5.5 Numerical Case Study 109

5.5.1 Vortex Shedding from Circular Cylinder 109

5.5.2 Vortex Shedding from a Four-Leaf Cylinder 111

5.5.3 Oscillating Cylinder in Quiescent Fluid 112

Exercises 115

Appendix A Sparse Matrices 117

A.1 Storing the Sparse Matrices 117

A.1.1 Coordinate to CSR Format Conversion 117

A.1.2 CSR to MSR Format Conversion 118

A.1.3 CSR to Ellpack-Itpack Format Conversion 119

A.1.4 CSR to Diagonal Format Conversion 121

A.2 Matrix-Vector Multiplication 124

A.2.1 CSR Format Matrix-Vector Multiplication 124

A.2.2 MSR Format Matrix-Vector Multiplication 125

A.2.3 Ellpack-Itpack Format Matrix-Vector Multiplication 125

A.2.4 Diagonal Format Matrix-Vector Multiplication 126

A.3 Transpose Matrix-Vector Multiplication 127

A.3.1 CSR Format Transpose Matrix-Vector Multiplication 127

A.3.2 MSR Format Transpose Matrix-Vector Multiplication 127

A.4 Matrix Pattern 128

Appendix B Krylov Subspace Methods 131

B.1 Conjugate Gradient Method 131

B.2 Bi-Conjugate Gradient Method 135

B.3 Conjugate Gradient Squared Method 136

B.4 Bi-Conjugate Gradient Stabilized Method 138

B.5 Conjugate Residual Method 140

B.6 GMRES* Method 142

Appendix C ILU(0) Preconditioning 145

C.1 ILU(0)-Preconditioned Conjugate Gradient Method 145

C.2 ILU(0)-Preconditioned Conjugate Gradient Squared Method 149

C.3 ILU(0)-Preconditioned Bi-Conjugate Gradient Stabilized Method 151

Appendix D Inner Iterations of GMRES* Method 155

D.1 Conjugate Gradient Method Inner Iterations 155

D.2 Conjugate Gradient Squared Method Inner Iterations 157

D.3 Bi-Conjugate Gradient Stabilized Method Inner Iterations 158

D.4 Conjugate Residual Method Inner Iterations 160

D.5 ILU(0) Preconditioned Conjugate Gradient Method Inner Iterations 162

D.6 ILU(0) Preconditioned Conjugate Gradient Squared Method Inner Iterations 163

D.7 ILU(0) Preconditioned Bi-Conjugate Gradient Stabilized Method Inner Iterations 165

Appendix E Main Program 167

Appendix F Steepest Descent Method 173

Appendix G Vorticity-Stream Function Formulation of Navier-Stokes Equation 177

Bibliography 219

Index 225