Failure Analysis of FEV
Failure Analysis of FEV
CFD
Franjo Juretic
Thesis submitted for the
Degree of Doctor of Philosophy of the University of London
and
Diploma of Imperial College
Department of Mechanical Engineering
Imperial College London
December, 2004
2
Abstract
This study was aimed towards improving the accuracy of Computational Fluid Dy-
namics (CFD) by developing methods for reliable estimation of the discretisation
error and its reduction.
A new method for error estimation of the discretisation error for the second-
order accurate Finite Volume Method is presented, called the Face Residual Error
Estimator (FREE), which estimates the discretisation error on the cell faces. The es-
timator is tested on a set of cases with analytical solutions, ranging from convection-
dominated to diusion-dominated dominated ones. Testing is also performed on a
set of cases of engineering interest and on polygonal meshes.
In order to automatically produce a solution of pre-determined accuracy an au-
tomatic error-controlled adaptive mesh renement procedure is set up. It uses local
mesh renement to control the local error magnitude by rening hexahedral cells
parallel to the face with large discretisation error. The procedure is tested on four
cases with analytical solutions and on several laminar and turbulent ow cases of
engineering interest. It was found able to produce accurate solutions with savings
in computational resources.
In order to explore the possibilities of dierent mesh structures, a mesh generator
producing polyhedral meshes based on the Delaunay technique is developed. An
adaptive mesh generation technique for polyhedral meshes is also developed and is
based on remeshing parts of the mesh which are selected for renement. The mesh
adaptation technique is tested on a case with an analytical solution. A comparison
of accuracy achieved on quadrilateral, triangular and polygonal meshes is also given,
where quadrilateral meshes perform best followed by polygonal meshes.
3
Acknowledgements
I would like to express my gratitude to my supervisor Prof A. D. Gosman for his
interest and continuous guidance during this study.
I would like to use the opportunity to thank my colleagues from Prof Gosmans
CFD group, especially Dr. Hrvoje Jasak, Mr. Henry Weller and Mr Mattijs Janssens
for developing the FOAM C++ simulation code which made the implementation of
the ideas easier. Their support and suggestions were invaluable.
This study and the text of this thesis has beneted a lot from the numerous
suggestions and comments by Dr. Hrvoje Jasak.
It would be unfair not to thank Mrs Nicky Scott-Knight and Mrs Susan Clegg
for arranging administrative matters.
Finally, the nancial support provided by the Computational Dynamics Ltd. is
gratefully acknowledged.
4
Contents
1 Introduction 25
1.1 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
1.2 Present Contributions . . . . . . . . . . . . . . . . . . . . . . . . . . 28
1.3 Thesis Outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
2 Governing Equations of Continuum Mechanics 31
2.1 Navier-Stokes Equations . . . . . . . . . . . . . . . . . . . . . . . . . 31
2.2 Constitutive Relations for Newtonian Fluids . . . . . . . . . . . . . . 31
2.2.1 Turbulence Modelling . . . . . . . . . . . . . . . . . . . . . . . 32
2.3 General Form of a Transport Equation . . . . . . . . . . . . . . . . . 36
2.4 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
3 Finite Volume Discretisation 39
3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
3.2 Measures of Mesh Quality . . . . . . . . . . . . . . . . . . . . . . . . 41
3.3 Discretisation of Spatial Terms . . . . . . . . . . . . . . . . . . . . . 43
3.3.1 Convection Term . . . . . . . . . . . . . . . . . . . . . . . . . 47
3.3.2 Diusion Term . . . . . . . . . . . . . . . . . . . . . . . . . . 51
3.3.3 Source Terms . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
3.4 Temporal Discretisation . . . . . . . . . . . . . . . . . . . . . . . . . 54
3.5 Boundary Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . 56
3.5.1 Boundary Conditions for the General Transport Equation . . . 56
3.5.2 Boundary Conditions for the Navier-Stokes Equations . . . . . 57
3.6 Discretisation Errors on dierent types of meshes . . . . . . . . . . . 58
3.6.1 Convection Term . . . . . . . . . . . . . . . . . . . . . . . . . 60
3.6.2 Diusion Term . . . . . . . . . . . . . . . . . . . . . . . . . . 64
3.7 Solution of Linear Equation Systems . . . . . . . . . . . . . . . . . . 67
5
6 Contents
3.8 Solution Algorithm for the Navier-Stokes System . . . . . . . . . . . 69
3.8.1 Pressure Equation . . . . . . . . . . . . . . . . . . . . . . . . 69
3.8.2 Algorithms for Pressure-Velocity Coupling . . . . . . . . . . . 71
3.9 Summary and Conclusions . . . . . . . . . . . . . . . . . . . . . . . . 73
4 Error Estimation 75
4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
4.2 Literature Survey . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
4.2.1 Methods Used in FEM Analysis . . . . . . . . . . . . . . . . . 76
4.2.2 Methods Used in FV Analysis . . . . . . . . . . . . . . . . . . 78
4.3 Error Transport Through a Face . . . . . . . . . . . . . . . . . . . . . 83
4.4 Face Residual Error Estimator . . . . . . . . . . . . . . . . . . . . . . 87
4.4.1 Analysis of the Normalisation Practice . . . . . . . . . . . . . 88
4.5 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
4.5.1 Planar Jet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
4.5.2 Creeping Stagnation Flow . . . . . . . . . . . . . . . . . . . . 96
4.5.3 Convection Transport of Heat with a Distributed Heat Source 99
4.6 Summary and Conclusions . . . . . . . . . . . . . . . . . . . . . . . . 103
5 Mesh Adaptation 105
5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
5.2 Literature Survey . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
5.3 Adaptation Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . 109
5.3.1 Selection of Cells and Mesh Renement . . . . . . . . . . . . . 109
5.3.2 Solution Mapping Between Meshes . . . . . . . . . . . . . . . 115
5.4 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
5.4.1 Planar Jet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
5.4.2 Stokes Stagnation Flow . . . . . . . . . . . . . . . . . . . . . . 120
5.4.3 Convection Transport of Heat with a Distributed Heat Source 127
5.4.4 Convection and diusion of a Temperature Prole without a
Heat Source . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
5.5 Summary and Conclusions . . . . . . . . . . . . . . . . . . . . . . . . 135
6 Further Case Studies 137
6.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
Contents 7
6.2 Flow Over a Cavity . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
6.3 S-shaped Pipe Bend . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
6.4 Tube Bundle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
6.5 Wall-Mounted Cube . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
6.6 Summary and Conclusions . . . . . . . . . . . . . . . . . . . . . . . . 177
7 Adaptive Polyhedral Mesh Generation 179
7.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
7.2 Literature survey . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
7.3 Voronoi Polygons and Delaunay Triangulation . . . . . . . . . . . . . 185
7.3.1 Algorithm for calculation of the Dirichlet Tessellation . . . . . 187
7.4 Computational mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
7.5 Polyhedral Mesh Generation . . . . . . . . . . . . . . . . . . . . . . . 191
7.5.1 A comparison of accuracy on Quadrilateral, Polygonal and
Triangular Meshes . . . . . . . . . . . . . . . . . . . . . . . . 197
7.6 Mesh adaptation on Polyhedral Meshes . . . . . . . . . . . . . . . . . 205
7.6.1 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207
7.7 Summary and Conclusions . . . . . . . . . . . . . . . . . . . . . . . . 212
8 Conclusions and Future Work 213
8.1 Error Estimation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214
8.2 Mesh Adaptation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214
8.3 Mesh Generation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216
8.4 Future Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216
8 Contents
List of Figures
3.1 Computational cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
3.2 Mesh non-orthogonality . . . . . . . . . . . . . . . . . . . . . . . . . 42
3.3 Mesh skewness . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
3.4 Variation of near the face . . . . . . . . . . . . . . . . . . . . . . . 49
3.5 Non-orthogonality treatment . . . . . . . . . . . . . . . . . . . . . . . 51
3.6 Boundary cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
3.7 Square mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
3.8 Triangular mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
3.9 Hexagonal mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
3.10 Split-hexahedron mesh . . . . . . . . . . . . . . . . . . . . . . . . . . 60
4.1 Inconsistency of the interpolated values on the face . . . . . . . . . . 84
4.2 Distance between points on non-orthogonal mesh . . . . . . . . . . . 90
4.3 Solution domain and boundary conditions for the jet case . . . . . . 92
4.4 Starting mesh for the jet case (10 x 4 cells) . . . . . . . . . . . . . . 93
4.5 Velocity eld for the jet case [m/s] (80 x 32 mesh) . . . . . . . . . . 94
4.6 Pressure isobars for the jet case [m
2
/s
2
] (80 x 32 mesh) . . . . . . . . 94
4.7 Velocity error eld for the jet case [m/s] (80 x 32 mesh) . . . . . . . 95
4.8 Variation of errors with uniform mesh renement for the jet case
(|U
norm
| = 2.474m/s) . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
4.9 Solution domain and boundary conditions for the stagnation ow . . 97
4.10 Velocity and pressure for the stagnation ow (40 x 40 mesh) . . . . . 98
4.11 Velocity error elds for the stagnation ow [m/s] (40 x 40 mesh) . . 98
4.12 Variation of errors with uniform mesh renement for the stagnation
ow (|U
norm
| = 1.107m/s) . . . . . . . . . . . . . . . . . . . . . . . . 99
4.13 Solution domain and boundary conditions for the convection trans-
port case . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
9
10 List of Figures
4.14 Temperature and source elds for the convection transport case (40
x 40 mesh) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
4.15 Error elds for the convection transport case [
o
C] (40 x 40 mesh) . . 101
4.16 Uniform mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
4.17 Variation of errors with uniform mesh renement for the convection
transport case (T
norm
= 1
o
C) . . . . . . . . . . . . . . . . . . . . . . 102
5.1 A split-hexahedron cell with left face split in one direction shared
with two cells. The top face is cross-split and shared with four cells . 110
5.2 Directional splitting of cells . . . . . . . . . . . . . . . . . . . . . . . 111
5.3 Renement of split-hexahedron cells . . . . . . . . . . . . . . . . . . . 111
5.4 Node distances at a split face . . . . . . . . . . . . . . . . . . . . . . 112
5.5 Additional splitting of cells . . . . . . . . . . . . . . . . . . . . . . . . 113
5.6 Consistency over a split face in 2D (dotted lines represent the selected
renement) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
5.7 Consistency over a cross-split face in 3D (dotted lines represent the
selected renement) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
5.8 Treatment of incompatible cell splitting directions in 3D (dotted lines
represent the selected renement) . . . . . . . . . . . . . . . . . . . . 115
5.9 Mesh after 6 cycles of renement for the jet case (209 cells) . . . . . . 117
5.10 Variation of velocity errors with adaptive renement for the jet case
(|U
norm
| = 2.474m/s) . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
5.11 Velocity errors after 6 cycles of renement for the jet case [m/s] (209
cells) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
5.12 Estimated errors on the faces of the nal mesh with 209 cells (given
as percentage of the maximum estimated error on that mesh) . . . . . 119
5.13 Meshes for the creeping stagnation ow . . . . . . . . . . . . . . . . . 121
5.14 Velocity errors after 4 cycles of renement for the creeping stagnation
ow [m/s] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
5.15 Velocity error scaling with adaptive renement for the creeping stag-
nation ow (|U
norm
| = 1.107m/s) . . . . . . . . . . . . . . . . . . . . 123
5.16 Estimated errors on the faces of the nal mesh with 280 cells (given
as percentage of the maximum estimated error on that mesh) . . . . . 124
5.17 Meshes for the creeping stagnation ow (second calculation) . . . . . 125
List of Figures 11
5.18 Variation of velocity errors with adaptive mesh renement for the
stagnation ow (Second calculation) (|U
norm
| = 1.107m/s) . . . . . . 126
5.19 Velocity error elds after 2 cycles of adaptive renement for the stag-
nation ow (Second calculation) [m/s] . . . . . . . . . . . . . . . . . 126
5.20 Mesh after 3 cycles of renement for the convection transport case . . 127
5.21 Fields after 3 cycles of renement . . . . . . . . . . . . . . . . . . . . 128
5.22 Variation of temperature errors with adaptive renement for the con-
vection transport case (T
norm
= 1
o
C) . . . . . . . . . . . . . . . . . . 129
5.23 Temperature eld for the internal layer case [
o
C] . . . . . . . . . . . . 129
5.24 Solution domain and boundary conditions for the convection and dif-
fusion of heat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
5.25 Variation of temperature errors with adaptive renement for the con-
vection and diusion of heat (T
norm
= 1
o
C) . . . . . . . . . . . . . . . 132
5.26 Temperature errors after 5 cycles of renement for the convection and
diusion of heat [
o
C] (1706 cells) . . . . . . . . . . . . . . . . . . . . 133
5.27 Temperature and its gradient for the convection and diusion of heat 133
5.28 Mesh and errors for the calculation driven by the exact face errors . . 134
6.1 Geometry and boundary conditions for the ow over a cavity . . . . . 138
6.2 Starting mesh for the ow over a cavity (36 cells) . . . . . . . . . . . 138
6.3 Velocity eld for the ow over a cavity on the nal adapted mesh
with 3257 cells (normalised by U
avg
) . . . . . . . . . . . . . . . . . . . 139
6.4 Pressure coecient eld for the ow over a cavity on the nal adapted
mesh with 3257 cells . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
6.5 Mesh after 8 cycles of renement for the ow over a cavity (3257 cells)140
6.6 Errors for the ow over a cavity on the nal adapted mesh with 3257
cells (given as percentage of U
avg
) . . . . . . . . . . . . . . . . . . . . 141
6.7 Variation of velocity errors with adaptive mesh renement for the
ow over a cavity (errors given as percentage of U
avg
) . . . . . . . . . 141
6.8 Estimated velocity error on the faces of the nal mesh with 3257 cells
(given as percentage of the maximum estimated error on that mesh) . 142
6.9 Case setup for the S-bend case . . . . . . . . . . . . . . . . . . . . . . 144
6.10 Starting mesh for the S-bend case (270 cells) . . . . . . . . . . . . . . 145
12 List of Figures
6.11 Velocity eld in for the S-bend case obtained on the nal adapted
mesh with 390787 cells (normalised by U
avg
) . . . . . . . . . . . . . . 146
6.12 Pressure coecient in the symmetry plane for the S-bend case ob-
tained on the nal adapted mesh with 390787 cells . . . . . . . . . . 147
6.13 Section at X = 2D (390787 cells) . . . . . . . . . . . . . . . . . . . . 148
6.14 Variation of velocity errors with adaptive mesh renement for the
S-bend case (given as percentage of U
max
) . . . . . . . . . . . . . . . 149
6.15 Mesh after 9 cycles of renement for the S-bend case (390787 cells) . 150
6.16 Velocity error in the symmetry plane after 9 cycles of renement for
the S-bend case (390787 cells) (given as percentage of U
max
) . . . . . 151
6.17 Geometry and boundary conditions for the tube bundle case . . . . . 153
6.18 Starting mesh for the tube bundle case (640 cells) . . . . . . . . . . . 154
6.19 Velocity eld for the tube bundle case (17505 cells)(given as
U
U
avg
) . . 155
6.20 Pressure coecient for the tube bundle case (17505 cells) . . . . . . . 156
6.21 q eld for the tube bundle case (17505 cells)(given as
q
U
avg
) . . . . . . 156
6.22 eld for the tube bundle case (17505 cells)(given as
D
Uavg
2
) . . . . . 156
6.23 Mesh after 7 cycles of renement for the tube bundle case (17505 cells)158
6.24 Variation of errors with adaptive mesh renement for the tube bundle
case (errors given as percentage of U
max
, q
max
and
max
respectively) . 159
6.25 Exact and estimated error elds after 7 cycles of renement (17505
cells)(errors are given as percentage of U
max
, q
max
and
max
respec-
tively). Exact errors are calculated as the dierence from the bench-
mark solution. Estimated errors are plotted as a weighted average of
face errors. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
6.26 A comparison of proles for the tube bundle case . . . . . . . . . . . 161
6.27 Geometry and boundary conditions for the wall mounted cube case . 162
6.28 Starting mesh for the wall-mounted cube case (3444 cells) . . . . . . . 163
6.29 Distribution of ow variables in the symmetry plane for the wall-
mounted cube case, obtained on the nal adapted mesh (1.16149e+06
cells) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164
6.30 Distribution of ow variables in the plane y/H = 0.5 for the wall-
mounted cube case, obtained on the nal adapted mesh (1.16149e+06
cells) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
List of Figures 13
6.31 Distribution of ow variables in the plane x/H = 0.5 for the wall-
mounted cube case, obtained on the nal adapted mesh (1.16149e+06
cells) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
6.32 Streamlines in the plane x/H = 2 for the wall-mounted cube case,
obtained on the nal adapted mesh (1.16149e+06 cells) . . . . . . . . 168
6.33 Mesh after 7 cycles of renement for the wall-mounted cube case
(1.16149e+06 cells) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
6.34 Variation of estimated errors with adaptive mesh renement for the
wall-mounted cube case (errors are given as percentage of U
avg
, k
max
at inlet and
max
at inlet) . . . . . . . . . . . . . . . . . . . . . . . . 170
6.35 Remaining estimated errors after 7 cycles of renement (errors are
given as percentage of U
avg
, k
max
at inlet and
max
at inlet, respec-
tively) Estimated errors are plotted as a weighted average of face
errors. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
6.36 Regions of highest gradients after 7 cycles of renement . . . . . . . . 172
6.37 Proles of ow variables taken at
x
H
= 0,
z
H
= 0.5 (above the corner
at which the leading edges meet) . . . . . . . . . . . . . . . . . . . . 173
6.38 C
p
on the bottom wall . . . . . . . . . . . . . . . . . . . . . . . . . . 175
6.39 Velocity and turbulent energy k proles . . . . . . . . . . . . . . . . . 176
7.1 Delaunay Triangulation (solid lines) and Voronoi Polygons (dashed
lines) for a set of points P
n
(dots) . . . . . . . . . . . . . . . . . . . 186
7.2 Delaunay vs other triangulations . . . . . . . . . . . . . . . . . . . . 186
7.3 Initial hull for the Delaunay triangulation . . . . . . . . . . . . . . . 188
7.4 Dirichlet Tessellation and polyhedral mesh . . . . . . . . . . . . . . . 191
7.5 Generation of an internal face of the polyhedral mesh (section in the
plane of the face) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
7.6 Tetrahedra sharing a face. The edge of the polyhedral mesh (thick
lines) is perpendicular to the shared triangular face (red). There exist
a polygonal face for every edge of the triangular face. . . . . . . . . . 194
7.7 Generation of an internal face including the intersection of a boundary
edge (section in the plane of the face) . . . . . . . . . . . . . . . . . . 195
7.8 Generation of boundary faces (coloured) including intersections with
boundary edges (thick lines) and a corner point . . . . . . . . . . . . 195
14 List of Figures
7.9 An example of a 3D mesh for a cube with side length l = 1m . . . . . 196
7.10 Meshes used for the jet case . . . . . . . . . . . . . . . . . . . . . . . 198
7.11 Exact velocity errors for the jet case [m/s] . . . . . . . . . . . . . . . 199
7.12 Quadrilateral, polygonal and triangular meshes used for comparison . 202
7.13 Variation of the exact velocity error on dierent types of meshes for
the cavity case. Errors are given as percentage of average inlet velocity
U
avg
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203
7.14 Magnitude of the exact velocity error (given as percentage of average
inlet velocity U
avg
) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203
7.15 The exact pressure error (given as percentage of p
max
=
1.64
2
U
2
avg
) . . 204
7.16 Scaling of the pressure drop for dierent types of meshes . . . . . . . 205
7.17 Adaptation of polyhedral meshes . . . . . . . . . . . . . . . . . . . . 206
7.18 Staring polygonal mesh for the convection and diusion of heat . . . 208
7.19 Mesh after 9 cycles for the convection and diusion of heat (5925 cells)209
7.20 Polygonal mesh from nearly degenerate Delaunay Triangulation . . . 209
7.21 Errors after 9 cycles of renement (5925 cells) . . . . . . . . . . . . . 210
7.22 Uniform mesh and the exact error (6769 cells) . . . . . . . . . . . . . 210
7.23 Variations of errors with adaptive renement for the convection and
diusion of heat (T
norm
= 1
o
C) . . . . . . . . . . . . . . . . . . . . . 211
List of Tables
5.1 Estimated errors on the faces of the nal mesh with 209 cells (given
as percentage of the maximum estimated error on that mesh) . . . . . 119
6.1 Distribution of face errors for the cavity case . . . . . . . . . . . . . . 142
6.2 Pressure drop coecients for the ow over a cavity . . . . . . . . . . 143
6.3 Pressure drop coecients C
p
, force coecients C
F
and average vor-
ticity coecient C
source term
S
e
error source term
Sp linear part of the source term
Su constant part of the source term
S
CV
area of a control volume
T temperature, time-scale
t time
U velocity
U
b
velocity of the arbitrary volumes face
V volume
V
M
material volume
V
CV
control volume
V
i
Voronoi Polygon
V
P
volume of the cell
x x component
x position vector
y y component
z z component
20 List of Tables
Greek Characters
under-relaxation factor
N
non-orthogonality angle
diusivity
blending factor
orthogonal part of the face area vector
dissipation rate of turbulent kinetic energy
eectivity index, -eld in the q turbulence model
heat conduction coecient
dynamic viscosity
kinematic viscosity
T
turbulent kinematic viscosity
density
turbulent Prandtl number
stress tensor
exact solution
general scalar property
measure of mesh skewness
Superscripts
q
T
transpose
q mean
q
govEqn
. (1.1)
Complex problems like turbulence, combustion and multi-phase ows are very
dicult to describe exactly and require approximations in the process of de-
riving the governing equations. Initial and boundary conditions may also
introduce errors if they are not known exactly. The geometry description can
also introduce errors if it is not exact.
Discretisation errors are dened as the dierence between the exact solu-
tion of the dierential equations
govEqn
and the exact solution of their discrete
FV approximations
FV
:
E
discretisation
=
govEqn
FV
. (1.2)
Discretisation errors originate from the discretisation approximations, the mesh
density and quality, and the size of the time-step in transient calculations. A
discretisation procedure, which can be partly characterised by its approxima-
tion order, can be exact in the parts of the ow where the variable distribution
corresponds exactly to the discretisation assumptions and very inaccurate in
the regions where the variables vary in dierent ways.
1.1 Background 27
Iteration errors are a group of errors which arise if the governing equations
are solved using an iterative procedure. They are dened as the dierence
between the exact solution of the FV equations and the solution obtained by
using an iterative procedure
iteration
, thus:
E
iteration
=
FV
iteration
. (1.3)
These errors can be reduced to the level of computer truncation error for any
given problem at the expense of time needed to complete the calculation.
Programming and User errors are a result of the incorrect implementation
or use of the CFD methodology in a computer code.
Error estimators are tools for estimation of the discretisation error in the nu-
merical solution by using properties of the discretisation practice and the governing
equations. They provide information about the discretisation error distribution and
its magnitude in some norm and therefore measure the quality of the results in this
respect.
The required discretisation accuracy is known before the analysis is performed.
It depends on the objective of the calculations and on the accuracy of the dierential
equations which are used to describe the physics. Error estimators can be used as
indicators of where and how to modify the mesh to achieve solutions of the required
discretisation accuracy. This can be achieved by locally rening the mesh where
the error is large and coarsening the mesh in the regions where the error is small,
in order to maintain the error at the required level and equidistribute it over the
computational domain. An adaptive procedure, used for achieving the required
accuracy, should be composed of a number of cycles, each cycle consisting of solving
equations using a current mesh and the discretisation practice, followed by error
estimation and nally modication of the mesh.
The quality of a computational mesh is an important factor in minimising dis-
cretisation error [47]. The quality is inuenced by spatial resolution, skewness and
non-orthogonality of the mesh and also by the type of cells used.
The aim of the present study is to develop:
1. An accurate method for estimation of the discretisation error in the FV so-
lution which is applicable to dierent types of dierential equations and for
problems ranging from convection to diusion dominated ones.
28 Introduction
2. A method capable of reducing the discretisation error below the required level
without any user intervention and with the smallest computational load by
producing the optimum mesh for the given problem.
1.2 Present Contributions
This study has contributed to the eld of Computational Fluid Dynamics in the
following respects:
A Face Residual Error Estimator (FREE) which estimates the error on the
faces of the computational cells is developed. It is a result of an analysis of
the discretisation error and its transport through cell faces. The estimator
measures the error in the eld under consideration by comparing the values
extrapolated onto the face from the neighbouring nodes.
A fully automatic mesh adaptation procedure is set up and applied to several
steady-state ows, both laminar and turbulent. The mesh is adapted by re-
ning the cells sharing a face with large error by splitting them parallel to the
face.
A mesh generator for polyhedral meshes for the Finite Volume Method based
on the Delaunay method is developed.
A mesh adaptation procedure for polyhedral meshes is developed. It is per-
formed by enriching the Delaunay structure with vertices where more resolu-
tion is needed resulting in local renement.
An analysis of discretisation errors on meshes consisting of squares, trian-
gles, hexagons and split-hexahedra is presented. A comparison of the relative
accuracy on quadrilateral, polygonal and triangular meshes is performed on
laminar ow cases.
1.3 Thesis Outline
In Chapter 2, a summary of the governing equations of continuum mechanics can be
found along with the Newtonian constitutive relations. A transport equation as a
model equation is introduced. A brief description of turbulence modelling is given.
1.3 Thesis Outline 29
Chapter 3 presents the Finite Volume Method used in this study. It is a second-
order accurate method for arbitrary unstructured meshes. Discretisation of spatial
terms in the transport equation is described term by term along with the errors
which may arise. Temporal discretisation and the errors which may results from
temporal discretisation are briey discussed. An analysis of the discretisation error
on dierent shapes of computational cells is performed. A solution algorithm for
Navier-Stokes equations is presented at the end of the chapter.
Developments in the eld of a posteriori error estimation made during this
study are presented in Chapter 4. A literature survey of the existing methods is
given rst. A new method for error estimation is proposed. The performance of
the proposed error estimator is tested on a set of cases with analytical solutions,
including convection and diusion-dominated ones.
In Chapter 5 a mesh renement procedure is proposed. A literature survey of
mesh adaptation methods is presented rst, followed by the proposed mesh rene-
ment procedure based on directional cell-by-cell renement of hexahedral cells. The
performance of the renement procedure is examined on a set of test for which
analytical solutions are available.
In Chapter 6, the mesh renement procedure proposed in Chapter 5 is further
tested on four cases of engineering interest, involving laminar and turbulent ows.
Chapter 7 presents an algorithm for polyhedral mesh generation developed during
this study. A survey of mesh generation methods is given at the beginning of the
chapter. It is followed by an algorithm assembled for calculating polyhedral meshes
from the Delaunay Triangulation and the Voronoi Polygons which is described step
by step. A mesh adaptation technique for polyhedral meshes is also presented. A
comparison of relative accuracy which can be achieved on triangular, quadrilateral
and polygonal meshes is performed on cases introduced in earlier chapters. An
example of the adaptive mesh generation is also given.
Finally, a summary of the Thesis with some conclusions and suggestions for
future work are given in Chapter 8.
30 Introduction
Chapter 2
Governing Equations of
Continuum Mechanics
2.1 Navier-Stokes Equations
Governing equations of Fluid Mechanics so-called Navier-Stokes equations are a set
of partial dierential equations which read [111, 112]:
Continuity equation:
t
+ (U) = 0, (2.1)
Momentum equation:
U
t
+ (UU) = g + , (2.2)
where g is the gravity acceleration and is a surface stress tensor.
Energy equation:
e
t
+ (eU) = g.U+ ( U) q +Q. (2.3)
Here, q is the heat ux through the control volume surface and Q is the heat
source within the CV.
2.2 Constitutive Relations for Newtonian Fluids
The uids treated in this study are assumed to obey the following constitutive
relations [112]:
31
32 Governing Equations of Continuum Mechanics
Newtons law of viscosity
=
_
P +
2
3
U
_
I +
_
U+ (U)
T
(2.4)
where P is the pressure, is dynamic viscosity and I is the unit tensor.
The equation of state for the ideal gas
P = RT, (2.5)
where R is a universal gas constant.
Fourier law of heat conduction
q = T, (2.6)
being a heat conduction coecient.
When the above relations are inserted into Eqs. (2.2) and (2.3) a closed system
of equations is obtained, as follows [112]:
Continuity equation:
t
+ (U) = 0, (2.7)
Momentum equation:
U
t
+ (UU) = g
_
P +
2
3
U
_
+
_
_
U+ (U)
T
_
,
(2.8)
Energy equation:
e
t
+ (eU) = g U (P U)
_
2
3
( U) U
_
+
_
_
U+ (U)
T
_
U
+ (T) +Q,
(2.9)
2.2.1 Turbulence Modelling
Turbulent ows occur in most engineering applications and there are many methods
developed for prediction of such ows which dier in the level of detail the ow is
resolved [123].
Direct Numerical Simulation ( DNS ) is the most detailed approach to turbulence
modelling and it numerically solves the governing equations over the whole range
2.2 Constitutive Relations for Newtonian Fluids 33
of turbulent scales. This approach requires high spatial and temporal resolution,
demanding large computational resources and long simulation times, making DNS
unsuitable for most engineering applications. Some examples can be found in [19,
85, 123, 130].
Large Eddy Simulation ( LES ) ( Smagorinsky [137], Haworth and Jansen [58],
a review by Piomelli [121]) is an approach where the large scale eddies are resolved
and the small eddies are modelled. Therefore, this approach requires a spatial lter
separating the large scales from the small ones. As the small eddies are usually much
weaker and more isotropic than the large ones it makes sense to model them and
to fully resolve the large ones, as they are the main transporters of the conserved
properties. When the mesh size tends to zero such that it can resolve the smallest
eddies LES tends to DNS.
Reynolds-averaged method ( RANS ), originally proposed by Osborne Reynolds,
is a statistical approach to turbulence modelling. The rationale behind this approach
is that the instantaneous quantity (x, t) in a certain point in the domain can be
written as the sum of an averaged value and a uctuation about that value, thus:
(x, t) = (x, t) +
(x, t) denotes turbulent uctuations and (x, t) is the averaged value. There
are three main techniques for calculating the averaged value namely time averaging,
space averaging and ensemble averaging Hinze [60].
Depending on whether the ow is incompressible or compressible, averaging can
be unweighted namely Reynolds averaging, or density weighted named Favre aver-
aging (eg. Favre [45], Cebeci and Smith [34]).
When the above averaging is applied to the momentum and the continuity equa-
tions for incompressible isothermal ow without body forces Eqs. (2.1) and (2.8)
there results:
U = 0, (2.11)
U
t
+ (UU+U
)
_
U
_
= p. (2.12)
where the term U
. In order to link the Reynolds stress with the mean ow variables, modelling
approximations have to be introduced and they are usually called turbulence models.
34 Governing Equations of Continuum Mechanics
The turbulence models used in this study are based on the Boussinesq approx-
imation [27] which assumes that turbulent stresses are linked to the averaged ow
variables as follows:
U
=
t
_
U+ (U)
T
_
+
2
3
k I, (2.13)
where k stands for the kinetic energy of turbulence dened as:
k =
1
2
U
. U
. (2.14)
The turbulent eddy viscosity can be calculated in many ways but the most popular
one is a two-equation approach where the
t
is dened as:
t
= C
k
2
, (2.15)
where is the turbulence dissipation rate, dened as:
= U
: U
. (2.16)
The variables k and are calculated as the solution of their own transport equations.
The equation for the turbulent dissipation has the following form [123]:
(U) ((
+)) = C
1
P
k
C
2
2
k
, (2.17)
and the equation for the turbulent energy k reads [123]:
(Uk) ((
k
+)k) = P . (2.18)
The production term P in the above equation has the following form:
P = 2
T
(U+U
T
)
2
:
(U+U
T
)
2
. (2.19)
The values of the coecients are: C
= 0.09, C
1
= 1.44, C
2
= 1.92,
k
= 1.0 and
= 1.3.
In the vicinity of the impermeable no-slip walls physics of the turbulence is
dominated by the presence of the wall. The most general treatment for resolving
the ow near the wall is by solving the transport equations in the near wall region,
eg. Launder and Sharma [83]. However, as the large variations of ow variables exist
in the near-wall region, the computational mesh has to be very ne there. A model
developed to alleviate these problems is q
k and (2.20)
=
2q
. (2.21)
2.2 Constitutive Relations for Newtonian Fluids 35
The equation for and q read [53]:
(U) ((
+)) = (2C
1
1) G
q
(2C
2
1) f
2
2
q
+E, (2.22)
(Uq) ((
q
+)q) = G. (2.23)
The f
2
function is dened as follows:
f
2
= 1 0.3e
(Re
)
2
. (2.24)
The source terms E and G in the above equations are calculated from the velocity
eld as follows:
E =
T
q
(U) : (U), (2.25)
G =
T
q
(
U+ (U)
T
2
) : (
U+ (U)
T
2
). (2.26)
The turbulent viscosity
T
is calculated from q and using:
T
= C
q
3
2
, (2.27)
where the f
is a damping function:
f
= e
6
(1+
Re
50
)
2
(1+3e
Re
10 )
, (2.28)
and the turbulence Reynolds number Re
is dened as:
Re
=
q
3
2
. (2.29)
The values of the constants are: C
= 0.09, C
1
= 1.44, C
2
= 1.92,
= 1.3 and
q
= 1.
For most engineering problems it is often too expensive to resolve the boundary
layer next to the wall using low-Re turbulence models. An alternative is to model it
by using wall-functions (eg. Launder and Spalding [84], Ferziger and Peric [46]) which
mimic the behaviour of the turbulent boundary layer near the wall by assuming that
it behaves as the turbulent boundary layer near a at plate. The wall-functions rely
on the existence of a logarithmic region in the velocity prole of a turbulent boundary
layer which has the following form [46]:
U
+
=
U
t
U
=
1
ln Y
+
+B, (2.30)
where U
t
is the mean velocity parallel to the wall, U
dened as U
=
_
w
/ is
the shear velocity,
w
is the shear stress at the wall, is the von Karman constant
36 Governing Equations of Continuum Mechanics
( = 0.41), B is an empirical constant which depends on the thickness of the viscous
sublayer (B 5.2 in a at plate boundary layer) and Y
+
is the dimensional distance
from the wall dened as:
Y
+
=
U
. (2.31)
Here, d is the distance from the wall. The wall-function is valid when the near-wall
node is within the logarithmic region, i.e. Y
+
> 15. This imposes a limitation
on mesh resolution in the near-wall region characterised by high gradients of all
elds which need ne mesh resolution to achieve accurate solutions of the governing
equations. On the other hand, if the mesh becomes too ne (Y
+
< 15) the wall-
function becomes invalid. It this is present over a large portion of wall boundaries
it may result in serious modelling errors.
2.3 General Form of a Transport Equation
All equations described above can be written in the form of a general transport equa-
tion, given below and used throughout this study to present the FV discretisation
practices and error analysis.
_
V
CV
t
dV
. .
temporal derivative
+
_
V
CV
(U) dV
. .
convection term
_
V
CV
(
) dV
. .
diusion term
=
_
V
CV
S
() dV.
. .
source term
(2.32)
Here is a tensorial property considered continuous in space,
is the diusion
coecient and S
t
_
t
+O(t
2
), (3.4)
where the subscript P relates to the node in which the solution is sought and the
superscript t denotes the current time step. O(|(x x
P
)|
2
) and O(T
2
) are the
truncated terms in the full series, having the following form:
O(|(x x
P
)|
2
) =
i=2
1
i!
(x x
P
)
i
:::
..
i
(..
. .
i
)
P
, (3.5)
O(t
2
) =
i=2
1
i!
t
n
t
i
(3.6)
where :::
..
i
is a scalar product of ith rank tensors. (x x
P
)
i
is a ith tensor product
of a vector with itself resulting in an ith rank tensor. The leading terms of the
truncation errors are proportional to (x x
P
)
2
and t
2
, so the approximations are
second-order accurate.
3.2 Measures of Mesh Quality
The distribution of the nodes and the quality of the mesh inuence the accuracy
of results. The properties which determine mesh quality and their measures are
42 Finite Volume Discretisation
presented here and they will be used when discussing dierent discretisation errors
later in this chapter. These properties are dened for mesh faces and their denition
is the same irrespective of the mesh type. Finally, the properties are:
Non-orthogonality is measured by the angle
N
between the vector d con-
necting nodes adjacent to a face and the face area vector S, as can be seen in
Fig. 3.2. The angle should be as small as possible. The reasons for this will
be given later in this chapter.
f
N
N P
d
S
Figure 3.2: Mesh non-orthogonality
Mesh skewness. When the vector d does not intersect a face in its centre the
mesh is dened as skewed, Fig. 3.3. The degree of skewness can be measured
N
P
S
f
f
i
m
d
Figure 3.3: Mesh skewness
by:
=
|m|
|d|
. (3.7)
Here m and d are vectors dened in Fig. 3.7. Skewness aects the accuracy
of the interpolation from the nodes onto the faces as will be shown in the
remainder of the chapter.
3.3 Discretisation of Spatial Terms 43
Uniformity. A mesh is uniform when d intersects the face midway between
the nodes P and N, Fig. 3.3. Uniformity can be measured by:
f
x
=
|x
f
i
x
N
|
|d|
, (3.8)
thus f
x
= 0.5 on uniform meshes. The inuence of uniformity on accuracy will
be discussed later in the chapter.
3.3 Discretisation of Spatial Terms
The FV approximation of the spatial terms in Eqn. (2.32) will be given in this sec-
tion. Approximations of volume and surface integrals and interpolation techniques
which are needed for the FV discretisation of the spatial terms in Eqn. (2.32) will
be given rst.
Volume integrals of can be approximated by integrating Eqn. (3.3) over the
cell and using Eqn. (3.1) [68]:
_
V
P
(x) dV =
P
V
P
+O(|(x x
P
)|
2
) (3.9)
where V
P
stands for the volume of the cell and
P
is the value of at the centroid.
Surface integrals can be evaluated in the similar fashion, thus [68]:
_
S
f
(x) dS =
f
S
f
+O(|(x x
f
)|
2
) (3.10)
_
S
f
dS a(x) = S
f
a
f
+O(|(x x
f
)|
2
) (3.11)
where
f
and a
f
are the values of tensorial property and a vector property a in
the centroid of the face dened in Eqn. (3.2). Values in the face centroids can be
interpolated or extrapolated from nodal values and are denoted by
f
and a
f
.
A second-order interpolation practice from the nodes onto internal faces can be
written as follows [20, 90]:
f
=
f
i
+m ()
f
i
, (3.12)
where
f
i
and ()
f
i
are the interpolated values of and at the point where the
vector d intersects the face, as shown in Fig. 3.3.
f
i
and ()
f
i
can be evaluated
by using linear interpolation:
f
i
= f
x
P
+ (1 f
x
)
N
, (3.13)
()
f
i
= f
x
()
P
+ (1 f
x
)()
N
. (3.14)
44 Finite Volume Discretisation
The linear interpolation factor f
x
is dened as follows, Fig. 3.3:
f
x
=
|x
f
i
x
N
|
|d|
. (3.15)
The truncation error for the interpolation practice dened in Eqn. (3.12) can be
estimated by using the following Taylor expansions:
P
=
f
i
+ (x
P
x
f
i
) ()
f
i
+
1
2
(x
P
x
f
i
)
2
: ()
f
i
(3.16)
N
=
f
i
+ (x
N
x
f
i
) ()
f
i
+
1
2
(x
N
x
f
i
)
2
: ()
f
i
(3.17)
f
=
f
i
+m ()
f
i
+
1
2
m
2
: ()
f
i
(3.18)
By substituting
P
and
N
in Eqn. (3.13) with Eqn. (3.16) and Eqn. (3.17), respec-
tively, the truncation error for linear interpolation from Eqn. (3.13) can be obtained
as [47]:
e
l
=
f
i
f
i
=
1
2
|x
P
x
f
i
||x
N
x
f
i
| (
d
2
: ()
f
i
)
=
1
2
f
x
(1 f
x
)|d|
2
(
d
2
: ()
f
i
) (3.19)
d
2
: ()
f
i
) (3.20)
Taking the dierence between the Eqn. (3.18) and Eqn. (3.12), the truncation error
for the linear interpolation scheme which is second-order accurate on every mesh
can be obtained in the following form:
e
interpolation
=
1
2
|x
P
x
f
i
||x
N
x
f
i
|
_
(
d
2
: ()
f
i
) +m (
d
2
: ()
f
i
)
_
+
1
2
|m|
2
m
2
: ()
f
i
=
1
2
f
x
(1 f
x
)|d|
2
_
(
d
2
: ()
f
i
) +m (
d
2
: ()
f
i
)
_
+
1
2
|m|
2
m
2
: ()
f
i
=
1
2
|d|
2
_
f
x
(1 f
x
)(
d
2
: ()
f
i
) +|d| m (
d
2
: ()
f
i
)
_
+
2
2
|d|
2
( m
2
: ()
f
i
). (3.21)
3.3 Discretisation of Spatial Terms 45
Here,
d and m are unit vectors in the directions of d and m, respectively. This
error reduces with the square of the distance between the neighbouring nodes and
is minimal when the mesh is not skewed ( = 0).
The gradient and divergence terms can be approximated by using the Gauss
theorem [68]:
Divergence of the vector property a can be approximated as follows:
_
V
a dV =
_
S
CV
dS a
=
f
_
S
f
dS a
=
f
S
f
a
f
. (3.22)
Here, V represents the volume of the CV and S
CV
its surface area. dS is the
surface area vector pointing outwards and a
f
is evaluated using the interpola-
tion practice dened in Eqn. (3.12) for the vector property a.
The truncation error for the divergence term consists of the error in the inter-
polation of a
f
, thus:
e
div
=
f
S
f
(a
f
a
f
)
=
f
S
f
e
interpolation
=
1
2
|d|
2
S
f
_
f
x
(1 f
x
)(
d
2
: (a)
f
i
) +|d| m (
d
2
: (a)
f
i
)
_
+
2
2
|d|
2
S
f
( m
2
: (a)
f
i
). (3.23)
This error reduces with the square of d and is smallest in case when = 0.
The error is also dependent on the shape of the CV. This will be discussed in
Section 3.6.
Gradient term. Discretisation of the gradient term can be performed either
using the Gauss Theorem or the Least Squares Fit (LSF). Discretisation using
46 Finite Volume Discretisation
the Gauss Theorem can be written as follows [68]:
_
V
P
dV =
_
S
C
V
dS
=
f
_
S
f
dS
=
f
dS
f
f
, (3.24)
where
f
is evaluated using the interpolation practice dened in Eqn. (3.12).
The truncation error for this term is:
e
grad
=
f
S
f
(
f
f
)
=
f
S
f
e
interpolation
=
1
2
|d|
2
S
f
_
f
x
(1 f
x
)(
d
2
: ()
f
i
) +|d| m (
d
2
: ()
f
i
)
_
+
2
2
|d|
2
S
f
( m
2
: ()
f
i
). (3.25)
Everything said about errors for the divergence term can be applied here.
The LSF is based on minimising the following functional [93]:
L =
f
1
|d|
2
(
N
(
P
+d ()
P
))
2
, (3.26)
with respect to the gradient ()
P
. When
dL
d()
P
= 0 (3.27)
it results in a system of equations from which the cell gradient can be calcu-
lated, such as:
G
P
=
f
d(
N
P
)
|d|
2
, (3.28)
where matrix G is dened as:
G =
f
dd
|d|
2
. (3.29)
The foregoing results will now be used to obtain the FV form of the individual
terms in Eqn. (2.32).
3.3 Discretisation of Spatial Terms 47
3.3.1 Convection Term
The discretisation of the convection term is performed using Eqn. (3.22) in the
following fashion:
_
V
P
(U) dV =
f
S (U)
f
=
f
S (U)
f
f
=
f
F
f
, (3.30)
where the volume integral is rst transformed into a sum over the faces and then
approximated. Here F represents the mass ux through the face:
F = S (U)
f
. (3.31)
These uxes have to satisfy continuity for every CV. They can be estimated using
the interpolated values of U and onto the face. This interpolation may introduce
an error into the mass ux which can then be written:
F = (S (U)
f
) +e
flux
. (3.32)
The procedure for obtaining conservative uxes and errors which can arise will be
described in Section 3.8.
The next issue is how to obtain the value of on the face. Many dierent inter-
polation techniques can be used to obtain
f
but some do not ensure boundedness.
Linear Interpolation (Central Dierencing) (CD) is a natural second-
order interpolation practice for obtaining the value of on the face. This
practice has already been described in Eqn. (3.12) and is:
f
= (f
x
P
+ (1 f
x
)
N
+m ()
f
i
) +e
conv
. (3.33)
The truncation error, dened in Eqn. (3.21), is:
e
CD
=
1
2
|d|
2
_
f
x
(1 f
x
)(
d
2
: ()
f
i
) +|d| m (
d
2
: ()
f
i
)
_
+
2
2
|d|
2
( m
2
: ()
f
i
). (3.34)
In [61, 114, 119, 148] it is shown that with CD the convective contribution to
the coecients of downstream nodes is always negative, which may give rise to
48 Finite Volume Discretisation
non-physical oscillations which violate boundedness and degrade the quality
of the results. On convection-diusion problems this undesired behaviour may
occur if the value of face Peclet Number is greater than two. This undesirable
property may not become apparent if the gradients in the solution are not
large, but if boundedness of the solution is essential (as in solutions of the eg.
k and in turbulence equations) some other scheme may have to be used.
Upwind Dierencing (UD) was introduced to overcome the problem of
oscillatory solutions and make the convection term unconditionally positive.
Boundedness of the convection term is achieved by assuming that the value
on the face is determined by the upstream node, thus:
f
i
=
_
f
i
=
P
for F > 0.
f
i
=
N
for F < 0.
(3.35)
This discretisation practice ensures the boundedness of the solution by making
the matrix coecients unconditionally positive.
The truncation error for the UD scheme can be obtained by using the following
Taylor series expansions:
f
=
_
P
+ (x
f
x
P
) ()
P
+
1
2
(x
f
x
P
)
2
: ()
P
for F > 0.
N
+ (x
f
x
N
) ()
N
+
1
2
(x
f
x
N
)
2
: ()
N
for F < 0.
(3.36)
The truncation error can be found as a dierence between Eqn. (3.36) and
Eqn. (3.35), thus:
e
UD
=
_
_
(x
f
x
P
) ()
P
+
1
2
(x
f
x
P
)
2
: ()
P
for F > 0.
(x
f
x
N
) ()
N
+
1
2
(x
f
x
N
)
2
: ()
N
for F < 0.
(3.37)
The leading error term in the above equation is a function of (x
f
x
P
) ()
P
,
resembling a form of the diusion term, and is therefore called numerical dif-
fusion [114]. This discretisation practice is rst-order accurate and it requires
high spatial resolution to achieve accurate solutions [114].
Gamma dierencing scheme (Gamma) described in [68, 75] is a bounded
scheme formed by blending CD with UD in the regions where CD would not
produce a bounded solution, thus:
f
= () (
f
)
CD
+ (1 ()) (
f
)
UD
+e
Gamma
. (3.38)
3.3 Discretisation of Spatial Terms 49
Here () is a blending factor, 0 () 1, dependent on the nature of the
distribution around the face. The procedure used for evaluating () is based
on Normalised Variable Approach (NVA) of Leonard [87] and Gaskell et al.
[49]. A normalised variable is dened as [87]:
P
=
P
U
U
, (3.39)
where
P
,
U
and
D
are the values in the node P, upwind node U and
downstream node D, as depicted in Fig. 3.4. The solution is bounded if the
P D U
Flow direction
U
D
P
f
Figure 3.4: Variation of near the face
following conditions are satised:
U
P
D
, (3.40)
or
U
P
D
, (3.41)
from where it follows that
P
should obey:
0
P
1. (3.42)
Jasak [68] has modied Eqn. (3.39) to be applicable to arbitrary meshes, thus:
P
= 1
()
f
d
2()
P
d
(3.43)
where the node P must be an upwind node to the face f and d = x
D
x
P
connects the D and P nodes, Fig. 3.4. Depending on
P
, the blending factor
50 Finite Volume Discretisation
() is determined as follows [68]:
P
> 1 () = 0,
P
1 () = 1,
0
P
<
m
() =
m
,
P
< 0 () = 0,
where
m
is a constant of the scheme which was introduced to ensure linear
transition between CD and UD when 0
P
<
m
to improve convergence
for steady-state problems. The range of
m
recommended by Jasak [68] is
0.1
m
0.5.
The truncation error for this interpolation practice can be written as follows:
e
Gamma
= ()e
CD
+ (1 ())e
UD
, (3.44)
where e
CD
and e
UD
are dened in Eqs. (3.34) and (3.37). The scheme is
second-order accurate when () = 1 but it reduces down to rst order when
() < 1.
The total error resulting from the discretisation of the convection term has con-
tributions from the interpolation of mass ux and the interpolation of , so:
_
V
P
(U) dV =
f
(F +e
flux
)(
f
+e
int
)
=
f
F
f
+e
conv
(3.45)
where e
conv
has the following form:
e
conv
=
f
(F e
int
+e
flux
f
+e
int
e
flux
)
C
flux
e
int
+C
f
e
flux
+e
int
e
flux
. (3.46)
The order of the approximation is therefore equal to the lowest order approximation
used in the process. If the procedures for interpolation of and F are second-
order accurate then the approximation of the convection term is also second-order
accurate.
3.3 Discretisation of Spatial Terms 51
3.3.2 Diusion Term
The discrete approximation of the diusion term is obtained by using Eqn. (3.22)
and taking the gradients on the faces to be constant due to the assumed linear
variation of the property . The result is:
_
V
P
(
) dV =
f
S (
)
f
=
f
(
)
f
(S )
f
, (3.47)
where the terms (S )
f
and (
)
f
need further treatment. The latter is interpo-
lated onto the faces using Eqn. (3.12), where is substituted by
. Approximation
k
P N
f
d
S
N
Figure 3.5: Non-orthogonality treatment
of (S )
f
on a non-orthogonal mesh, Fig. 3.5, when vectors d and S are not par-
allel, is performed using the following expression [68]:
(S )
f
= ||
N
P
|d|
+k ()
f
(3.48)
where ()
f
can be evaluated using Eqn. (3.14). Here, is parallel with d where
and k have the property:
S = +k. (3.49)
In [68] Jasak has tested dierent treatments of and k. The one for which k is
orthogonal to S, Fig. 3.5, performed best in terms of accuracy and convergence and
is adopted here. The length of can be expressed as follows:
|| =
|S|
cos
N
, (3.50)
52 Finite Volume Discretisation
and the length of k can be calculated from:
|k| = |S| tan
N
. (3.51)
The truncation error for the approximation of the (S )
f
term can be obtained
using the following Taylor expansions:
P
=
f
+ (x
P
x
f
) ()
f
+
1
2
(x
P
x
f
)
2
: ()
f
+
1
6
(x
P
x
f
)
3
:: ()
f
(3.52)
N
=
f
+ (x
N
x
f
) ()
f
+
1
2
(x
N
x
f
)
2
: ()
f
+
1
6
(x
N
x
f
)
3
:: ()
f
(3.53)
By substituting Eqn. (3.52) and Eqn. (3.53) into Eqn. (3.48) and by adding the error
from the interpolation of ()
f
, the truncation error for (S )
f
is obtained, thus:
e
snGrad
= (S )
f
(S )
f
=
1
2
||
|d|
(|x
N
x
f
|
2
|x
P
x
f
|
2
)
d
2
: ()
f
1
6
||
|d|
(|x
N
x
f
|
3
+|x
P
x
f
|
3
)
d
3
:: ()
f
1
2
|x
N
x
f
||x
P
x
f
|k (
d
2
: ()
f
)
=
|S|
cos
N
|d|
2
(2f
x
1)
d
2
: ()
f
|S|
6 cos
N
|d|
2
_
(1 f
x
)
3
+f
x
3
_
d
3
:: ()
f
|S| tan
N
|d|
2
2
f
x
(1 f
x
)
k (
d
2
: ()
f
), (3.54)
where
d and
k are unit vectors in directions of d and k, respectively, and f
x
is the lin-
ear interpolation factor dened in Eqn. (3.15). From the dependence of Eqn. (3.54)
on the f
x
, it follows that the approximation is rst-order accurate except for f
x
= 0.5,
i.e. present when the mesh is uniform. It is therefore advisable to keep the mesh
as uniform as possible to obtain best accuracy. If the mesh is uniform, the approxi-
mation becomes second-order accurate. The error is also dependent on the angle of
non-orthogonality and is minimal when
N
= 0.
Finally, the discrete form of the diusion term can be written:
_
V
P
(
) dV =
f
((
)
f
+e
interpolation
)(||
N
P
|d|
+k ()
f
+e
snGrad
)
=
f
(
)
f
(||
N
P
|d|
+k ()
f
) +e
diff
(3.55)
3.3 Discretisation of Spatial Terms 53
where the truncation error for the diusion term e
diff
has the form:
e
diff
=
f
(
)
f
e
snGrad
+
f
(||
N
P
|d|
+k ()
f
) e
interpolation
+
f
e
interpolation
e
snGrad
f
(C
int
e
snGrad
+C
snGrad
e
int
+e
snGrad
e
int
). (3.56)
from which it follows that the order of the approximation is equal to the lowest order
found in Eqs. (3.54) and (3.21). Thus, the discretisation is second-order accurate on
uniform meshes and reduces to rst-order on the non-uniform ones. The behaviour
of the truncation error and the achievable accuracy on CVs of dierent shapes will
be compared in Section 3.6.
3.3.3 Source Terms
As it was previously mentioned, all the terms in the equations which cannot be
expressed as convection, diusion or temporal terms are grouped into the so-called
source term. If the source term is dependent on , linearisation should be performed
[114], such as:
S(, x) = Su(x, ) +Sp(x, ) (x). (3.57)
When the Eqn. (3.57) is integrated over the control volume using Eqn. (3.9) the
discretised form of the source term is obtained, thus:
_
V
P
S
() dV = SuV
P
+Sp V
P
P
+e
source
. (3.58)
The truncation error for the source term can be estimated by using the following
Taylor expansion:
_
V
P
S(x, ) dV =
_
V
P
_
S(x
P
,
P
) + (x x
P
) (S(x, ))
P
+
S(x, )
_
dV
+
_
V
P
_
1
2
(x x
P
)
2
:: (S(x, ))
P
_
dV
+
_
V
P
_
1
2
(x x
P
) (S(x, ))
P
_
dV
+
_
V
P
_
1
2
()
2
2
S(x, )
2
_
dV, (3.59)
54 Finite Volume Discretisation
where can be substituted by:
= (x x
P
) ()
P
. (3.60)
After substituting and S(x
P
,
P
)+
S(x,)
V
P
+
1
2
(x x
P
)
2
: (()
P
)
2
2
S(x, )
2
V
P
. (3.61)
The error is a function of (xx
P
)
2
but it also depends on the linearisation practice
used.
3.4 Temporal Discretisation
Temporal discretisation is performed on a semi-discretised form of the transport
equation, where the spatial terms have already been approximated using the prac-
tices described in the previous section. This form reads [61]:
_
t+t
t
_
_
t
_
P
V
P
+
f
F
f
f
(
)
f
S ()
f
_
dt
=
_
t+t
t
(SuV
P
+Sp V
P
P
) dt.
(3.62)
and can be written in a shorter form [47]:
V
P
_
t+t
t
t
dt =
_
t+t
t
f(t, (x, t)) dt, (3.63)
where f(t, (x, t)) contains all spatial terms from Eqn. (3.62). After performing
integration of Eqn. (3.63) there results:
V
P
_
t+t
t
t
dt = V
P
(
n
o
) =
_
t+t
t
f(t, (x, t)) dt, (3.64)
where the subscripts o and n represent old and new time levels, respectively. The
second important part of the temporal discretisation process is to choose an approx-
imation for
_
t+t
t
f(t, (x, t)) dt, which cannot be evaluated exactly. Taylor series
expansion gives:
f(t +t, (x, t +t)) = f(t
o
, (x, t
o
)) +t
df(t
o
, (x, t
o
))
dt
+
1
2
(t)
2
d
2
f(t
o
, (x, t
o
))
dt
2
,
(3.65)
3.4 Temporal Discretisation 55
which will be used later to establish the order of temporal discretisation. Some of
the most common temporal discretisation practices are:
Euler Explicit method. This method approximates Eqn. (3.64) by assuming
[47]:
_
t+t
t
f(t, (x, t)) dt = f(t, (x, t
o
))t (3.66)
i.e. it integrates the spatial terms by using the values at the beginning of the
time interval. These spatial terms can be calculated because
o
is known and
the value at the end of the interval can be obtained directly for every node
without having to solve a system of equations. It is shown in [47, 61] that
this scheme is stable for Courant numbers Co =
|U|t
h
< 0.5. Here, U is the
transport velocity and h is the cell size.
The truncation error for this practice can be found as a dierence between
Eqn. (3.65) and Eqn. (3.66) which yields:
e
expEuler
= t
df(t
o
, (x, t
o
))
dt
+
1
2
(t)
2
d
2
f(t
o
, (x, t
o
))
dt
2
(3.67)
This error is proportional to t, i.e. this method is rst-order accurate in
time.
The Crank-Nicholson discretisation practice assumes linear variation of
f(t, (x, t)) in time [47, 61], giving:
_
t+t
t
f(t, (x, t)) dt =
1
2
[f(t, (x, t
o
)) +f(t, (x, t
n
))] t (3.68)
Eqn. (3.68) requires evaluation of spatial terms for old and new time steps.
Because the values of
n
are not known at the new time level this method
requires a solution of a system of algebraic equations for each time step [61, 68].
The truncation error for this practice is:
e
CN
=
1
2
(t)
2
d
2
f(t
o
, (x, t
o
))
dt
2
(3.69)
Thus, it is second-order accurate in time.
Euler Implicit method. This method approximates Eqn. (3.64) by assuming
[47]:
_
t+t
t
f(t, (x, t)) dt = f(t, (x, t
n
))t (3.70)
56 Finite Volume Discretisation
Here the spatial terms in f(t, (x, t)) are evaluated using the
n
which are
obtained by solving a system of algebraic equations [61, 68]. This method is
unconditionally stable for even for large time steps [47, 61].
The truncation error is:
e
impEuler
= t
df(t
o
, (x, t
o
))
dt
+
1
2
(t)
2
d
2
f(t
o
, (x, t
o
))
dt
2
(3.71)
Thus, as in the case of explicit method, the error is proportional to t and is
therefore rst-order accurate.
3.5 Boundary Conditions
3.5.1 Boundary Conditions for the General Transport Equa-
tion
The solution of the general transport equation, Eqn. (2.32), is not complete without
boundary and initial conditions. The latter are necessary for transient calculations
in order to determine the initial state of the problem under consideration. Some
terms in the equation (eg. convection and diusion terms) require uxes through
CV faces which have to be specied at the boundary or evaluated from internal and
boundary data. Most commonly, boundary conditions are given by prescribing the
value of at the boundary ( Dirichlet boundary condition) or its gradient ( Von
Neumann boundary condition).
Convective uxes require a value of at a face, which is known exactly in case
of Dirichlet boundary condition but in case of Von Neumann boundary condition.
it can be extrapolated from the neighbouring nodes onto the face by using:
b
=
P
+|d
n
| (
S
|S|
)
b
+m ()
b
, (3.72)
where d
n
is a vector normal to the face, m is a skewness vector, Fig. 3.6, and ()
b
is the prescribed boundary gradient. The truncation error for this extrapolation
practice can be found using the following Taylor series expansion:
P
=
b
d ()
b
+
1
2
d
2
: ()
b
. (3.73)
When
P
in Eqn. (3.72) is substituted with Eqn. (3.73), the following truncation
error is obtained:
e
extrapolation
=
b
b
=
|d|
2
2
d
2
: ()
b
, (3.74)
3.5 Boundary Conditions 57
P
b
d
d
S
n
m = k
Figure 3.6: Boundary cell
which shows that the approximation Eqn. (3.72) is second-order accurate.
Diusive uxes require the gradient of normal to the boundary face which is
known exactly in case of Von Neumann boundary condition. In case of Dirichlet
boundary condition it can be evaluated as follows:
(S )
b
=
|S|
|d
n
|
(
b
P
k ()
P
), (3.75)
where k is a non-orthogonality vector, Fig. 3.6. The truncation error for (S )
b
approximated using Eqn. (3.75) can be derived by using the following Taylor series
expansion:
b
=
P
+d ()
P
+
1
2
d
2
: ()
P
. (3.76)
Substituting
b
in Eqn. (3.75) with Eqn. (3.76), after some algebra it gives:
e
bouSnGrad
= |S|
|d|
cos
N
(
d
2
: ()
P
). (3.77)
d is a unit vector in the direction of d. The error is a function of |d| and is therefore
rst-order accurate. This method corresponds to backward and forward dierences
in Finite Dierence Method which are rst-order accurate [47]. The error is minimal
when the mesh is orthogonal (
N
= 0).
3.5.2 Boundary Conditions for the Navier-Stokes Equations
The most common boundary conditions which occur when solving the laminar and
turbulent ows are:
58 Finite Volume Discretisation
Inlet. The velocity distribution is prescribed and the surface normal gradient
is set to zero for the pressure. Values of turbulent properties (eg. k, , q and
) are prescribed.
Outlet. The pressure distribution is prescribed there. Surface normal gradi-
ents of the velocity eld and turbulent properties are set to zero.
Symmetry plane. The surface normal gradients of all scalar elds are zero
at the symmetry plane. The convection ux through the symmetry plane is
zero. Viscous stress of the velocity component parallel to the boundary is zero
and it must be imposed directly [47] while the viscous stress of the velocity
component normal to the wall is evaluated using Eqn. (3.75).
Impermeable no-slip walls. The velocity eld is xed to the velocity of the
wall and the normal gradient of the pressure is set to zero there. The convection
ux through the wall is zero. Viscous stress of the velocity component normal
to the wall is zero at the wall and it must be imposed as an additional condition
[47]. Viscous stress of the velocity component parallel to the wall is not zero
and its evaluation is dependent on the near-wall modelling employed [47].
Conditions imposed on the turbulence properties depend on the turbulence
model and the type of near-wall treatment. The values of q and elds,
dened in Chapter 2, are xed at the wall boundary while the zero normal
gradient is imposed on k and elds.
3.6 Discretisation Errors on dierent types of meshes
Discretisation errors are dependent both on the type of computational mesh (i.e.
tetrahedral, hexahedral, polyhedral) and the approximations for dierent terms in
the governing equations. This section will present a comparison of accuracy achiev-
able on dierent mesh types. This is done by using the expressions for the truncation
errors presented in the preceeding sections of this chapter. The comparison will be
presented for convection and diusion terms. Discretisation procedures for diver-
gence and gradient terms are very similar to the discretisation procedure for the
convection term and everything that will be said about error for the convection
term can be applied to them.
Four types of mesh will be considered for the analysis:
3.6 Discretisation Errors on dierent types of meshes 59
Square mesh. A representative cell with its neighbours which inuence it
are shown in Fig. 3.7.
U
=
c
o
n
s
t.
X
Y
P E
N
W
S
l
Figure 3.7: Square mesh
This mesh is orthogonal, it is not skewed and f
x
= 0.5 because the centre of
each internal face lies midway between the neighbouring nodes.
Triangular mesh. A mesh consisting of equilateral triangles is uniform, or-
thogonal and not skewed, see Fig. 3.8.
X
Y
U
=
c
o
n
s
t.
P
E W
S
l
Figure 3.8: Triangular mesh
Regular hexagonal mesh. This type of mesh can be generated using a
Delaunay algorithm, see Chapter 7. It consists of hexagons and is uniform,
orthogonal and not skewed, Fig. 3.9.
X
Y
U
=
c
o
n
s
t.
P
N
NE
SE
NW
SW
S
l
Figure 3.9: Hexagonal mesh
Split-hexahedron mesh. This type of mesh is produced when local rene-
60 Finite Volume Discretisation
ment of hexahedral cells is done by splitting cells, such that a cell face gets
divided into two or four faces. An example is shown in Fig. 3.10.
X
Y
d
s
U
=
c
o
n
s
t
.
P E
N
S
l
SW
NW
S
N
m
k
Figure 3.10: Split-hexahedron mesh
Unlike the previous examples, a split-hexahedron mesh is skewed and not or-
thogonal but f
x
= 0.5. The distances between nodes at the split face are also
larger than on other faces. Thus, for the example above:
d
s
= l
s
d =
l
cos
N
d, (3.78)
where
N
can be calculated from:
tan
N
=
0.25 l
l
=
1
4
. (3.79)
3.6.1 Convection Term
The analysis of errors in the convection term will be performed by using the Central
Dierencing scheme and taking the uid velocity and density to be constant:
U = const.
= const.
in order not to include errors coming from evaluation of mass uxes, Eqn. (3.31).
The truncation error for the CD scheme was given in Section 3.3.1 and it is:
e
conv
=
1
2
f
F|d|
2
_
f
x
(1 f
x
)(
d
2
: ()
f
i
) +|d| m (
d
2
: ()
f
i
)
_
+
f
F
2
2
|d|
2
( m
2
: ()
f
i
). (3.80)
Here, f
x
is a linear interpolation factor dened in Eqn. (3.15). The second and the
third terms in Eqn. (3.80) are zero on meshes which are not skewed.
3.6 Discretisation Errors on dierent types of meshes 61
Error on square mesh. The distance between the two nodes is equal to the
length of a side. Hence, the mass ux is:
F = |U| l (3.81)
because |S| = l; and f
x
= 0.5. Replacing |d| in Eqn. (3.80) with l yields:
e
convSquare
=
1
8
F cos l
2
(n
2
e
: ()
e
)
1
8
F sin l
2
(n
2
n
: ()
n
)
+
1
8
F cos l
2
(n
2
w
: ()
w
)
+
1
8
F sin l
2
(n
2
s
: ()
s
)
=
1
8
l
2
F cos (n
2
e
: (()
e
()
w
))
1
8
l
2
F sin (n
2
n
: (()
n
()
s
)), (3.82)
where
d
2
from Eqn. (3.80) is replaced by n which represents a unit face normal
vector pointing outwards from the cell P. The subscript n
e
denotes that the
face is shared with a neighbour E. is the angle between the velocity vector
and the x axis.
Equilateral Triangular Mesh. For this the mass ux is:
F =
3 |U| l. (3.83)
The truncation error can be found using Eqn. (3.80), yielding:
e
convTri
=
3
16
l
2
F cos ((n
2
e
: ()
e
) (n
2
w
: ()
w
))
1
8
l
2
F sin (
1
2
(n
2
e
: ()
e
) (n
2
s
: ()
s
)
1
2
(n
2
w
: ()
w
)).
(3.84)
Hexagonal Mesh. Here the expression for the mass ux is:
F =
3
3
|U| l, (3.85)
62 Finite Volume Discretisation
and Eqn. (3.80) gives the truncation error as:
e
convHexagon
=
3
16
l
2
F cos
_
n
2
ne
: (()
ne
()
sw
)
3
16
l
2
F cos
_
n
2
se
: (()
se
()
nw
)
1
8
l
2
F sin
_
n
2
n
: (()
s
()
s
)
1
16
l
2
F sin
_
n
2
ne
: (()
ne
()
sw
)
1
16
l
2
F sin
_
n
2
se
: (()
se
()
nw
)
. (3.86)
Split-hexahedron Mesh. The truncation error for the conguration shown
in Fig. 3.10 is:
e
convSplitHex
=
1
8
l
2
F sin
_
n
2
n,s
: (()
n
()
s
)
1
8
F cos
_
l
2
n
2
e
: ()
e
1
2
l
2
s
d
2
nw
: ()
nw
_
1
8
F cos
_
1
2
l
2
s
d
2
sw
: ()
sw
_
+
1
2
F cos l
3
s
_
m
nw
(
d
2
nw
:: ()
nw
)
_
+
1
2
F cos l
3
s
_
m
sw
(
d
2
sw
:: ()
sw
)
_
F cos
2
2
l
2
s
_
m
2
nw
: (()
nw
+ ()
sw
)
(3.87)
where F is dened in Eqn. (3.81), l
s
can be calculated from Eqn. (3.78) and
can be obtained from Eqn. (3.7), thus:
=
|m|
l
s
=
l
4 l
s
. (3.88)
Evidently, the error in Eqs. (3.82), (3.84), (3.86) and (3.87) is dependent both
on the spatial resolution and the form of the solution itself as expressed through its
gradients. A comparison of accuracy can therefore only be performed by examining
dierent forms of solutions, as follows:
1. = constant. When the solution eld has a uniform and xed gradient the
error is zero on all types of meshes. This is consistent with the assumption
expressed in Eqn. (3.3).
2. = constant. This class of solutions with uniform curvature reveals dier-
ences in accuracy between dierent mesh types. The discretisation on square
3.6 Discretisation Errors on dierent types of meshes 63
and hexagonal meshes still produces exact solutions Eqs. (3.82) and (3.86),
while triangular meshes and meshes with split-hexahedra produce errors. The
truncation error for triangular meshes, Eqn. (3.84), can be simplied to:
e
convTri
=
3
16
l
2
F cos ((n
2
e
n
2
w
) : )
1
8
l
2
F sin ((
1
2
n
2
e
n
2
s
1
2
n
2
w
) : ) (3.89)
while the truncation error for a split-hexahedron mesh, Eqn. (3.87), can be
reduced to:
e
convSplitHex
=
1
8
F cos
_
(l
2
n
2
e
1
2
l
2
s
d
2
nw
1
2
l
2
s
d
2
sw
) :
_
F cos
2
2
l
2
s
_
( m
2
nw
+ m
2
sw
) :
. (3.90)
The above equations show that the errors exist because these mesh types have
not got face pairs such that the error on each pair cancel. Two cell faces form
a face pair if the sum of their outward-pointing normal vectors is a zero vector.
From there it follows that the dierence between the second tensors of the face
normals, i.e. (n
2
e
n
2
w
) = 0, is a zero tensor for every face pair; which results
in zero discretisation error. Triangular meshes have not got any face pairs
because (n
2
e
n
2
w
) and (
1
2
n
2
e
n
2
s
1
2
n
2
w
) in Eqn. (3.89) are not zero tensors.
Skewness contributes to the error in Eqn. (3.90) because ( m
2
nw
+ m
2
sw
) is not
a zero tensor.
3. = constant. This type of problem cannot be resolved exactly on any
type of mesh. Hence, it should show which of the square or hexagon shapes
should be the most accurate. The variation of (x) within the cell is:
(x) = ()
P
+ (x x
P
) (3.91)
When in Eqn. (3.80) is substituted with Eqn. (3.91), the following ex-
pressions for the truncation errors result.
e
convSquare
=
1
8
l
3
F cos n
3
e
::
1
8
l
3
F sin n
3
n
:: . (3.92)
e
convHexagon
=
1
8
l
3
F cos
3
2
(n
3
ne
+n
3
nw
) ::
1
8
l
3
F sin (n
3
n
+
1
2
n
3
ne
1
2
n
3
nw
) :: . (3.93)
64 Finite Volume Discretisation
In order to determine which type of mesh is the most accurate the problem
is simplied such that
3
x
3
= constant while all other components of
are zero. The velocity U is at angle = 0. When the above is inserted in
Eqs. (3.92) and (3.93) there results:
e
convSquare
=
1
8
l
3
F
3
x
3
, (3.94)
e
convHexagon
=
9
64
l
3
x
3
. (3.95)
For the same number of cells in the domain the area of the square cell is equal
to the area of the hexagon. From there it follows that:
l
hexagon
=
2
3
3
l
square
. (3.96)
By knowing the ratio between l
hexagon
and l
square
, Eqn. (3.96) the ratio between
the errors is:
e
convHexagon
e
convSquare
= 1.155. (3.97)
Eqn. (3.97) shows that the error on the hexagonal mesh is expected to be
higher than for the square mesh. The reason for this lies in a fact that hexagons
always have more faces with non-zero mass uxes than the square such that
the sum of errors committed on those faces is larger than for the square.
3.6.2 Diusion Term
The accuracy of the diusion term discretisation on dierent types of meshes can
be performed by comparing the truncation errors dened by Eqn. (3.56). In order
to simplify the analysis, the uid density and the diusion coecient are assumed
to be constant, i.e. :
= constant.
= constant.
This makes the error arising from interpolation of onto the cell faces equal to
zero; and the only remaining error comes from the approximation of surface normal
3.6 Discretisation Errors on dierent types of meshes 65
gradients, Eqn. (3.48):
e
diff
=
f
()
|S|
cos
N
|d|
2
(2f
x
1)
d
2
: ()
f
f
()
|S|
6 cos
N
|d|
2
_
(1 f
x
)
3
+f
x
3
_
d
3
:: ()
f
f
()|S| tan
N
|d|
2
2
f
x
(1 f
x
)
k (
d
2
: ()
f
), (3.98)
This will now be evaluated for the dierent mesh types.
Square Mesh. For the conguration depicted in, Fig. 3.7, the magnitude of
the surface vector is:
|S| = l. (3.99)
Noting that |d| = l,
N
= 0 and f
x
= 0.5, the truncation error can be written:
e
diffHex
=
1
24
()|S|l
2
(n
3
e
:: ()
e
)
1
24
()|S|l
2
(n
3
w
:: ()
w
)
1
24
()|S|l
2
(n
3
n
:: ()
n
)
1
24
()|S|l
2
(n
3
s
:: ()
s
)
=
1
24
()|S|l
2
_
n
3
e
:: (()
e
()
w
)
1
24
()|S|l
2
_
n
3
n
:: (()
n
()
s
)
(3.100)
Equilateral Triangular Mesh. The truncation error for this cell type is:
e
diffTri
=
1
24
|S|l
2
_
n
3
e
:: ()
e
+n
3
w
:: ()
w
+n
3
s
:: ()
s
,
(3.101)
where |S| =
3l.
Equilateral Hexagonal Mesh.
e
diffHexagon
=
1
24
()|S|l
2
_
n
3
n
:: (()
n
()
s
)
1
24
()|S|l
2
_
n
3
ne
:: (()
ne
()
sw
)
1
24
()|S|l
2
_
n
3
nw
:: (()
nw
()
se
)
(3.102)
where |S| =
3
3
l.
66 Finite Volume Discretisation
Split-Hexahedron Mesh.
e
diffSplitHex
=
1
24
|S|l
2
_
n
3
n
:: (()
n
()
s
)
1
24
|S|l
2
n
3
e
:: ()
e
1
48
|S|
l
2
cos
3
N
_
d
3
nw
:: ()
nw
+
d
3
sw
:: ()
sw
)
_
1
16
|S|
l
2
sin
N
cos
3
N
_
k
nw
(
d
2
nw
: ()
nw
)
_
1
16
|S|
l
2
sin
N
cos
3
N
_
k
sw
(
d
2
sw
: ()
sw
)
_
. (3.103)
Again, the comparison will be made for dierent forms of solution elds:
1. = constant. Eqs. (3.100), (3.101), (3.102) and (3.103) show that the
error is zero for all mesh types.
2. = constant. For such elds, exact solutions are produced on meshes
consisting of squares Eqn. (3.100) and hexagons Eqn. (3.102). The truncation
errors for the triangular and split-hexahedral meshes are, respectively:
e
diffTri
=
1
24
|S|l
2
_
(n
3
e
+n
3
w
+n
3
s
) :: ()
, (3.104)
e
diffSplitHex
=
1
24
|S|l
2
_
(n
3
e
+
d
3
nw
+
d
3
sw
2 cos
3
N
) :: ()
_
1
16
|S|
l
2
sin
N
cos
3
N
_
k
nw
(
d
2
nw
d
2
sw
) : ()
_
. (3.105)
The above errors are a consequence of the fact that these types of cells have an
odd number of faces, some of which are not paired; thus the error committed
on them cannot cancel out. For example, third rank tensor (n
3
e
+n
3
w
+n
3
s
) in
Eqn. (3.104) is not a zero tensor. On the contrary, cell face pairs make the sum
of those tensors equal to zero, i.e. (n
3
n
+ n
3
s
) = 0 in Eqs. (3.100) and (3.102).
Non-orthogonality increases the error because (
d
2
nw
d
2
sw
) in Eqn. (3.105) is
not a zero tensor because
d
nw
and
d
sw
are not parallel.
3. = constant. Exact solutions for this type of problem cannot be
obtained on any mesh type. The variation of (x) within the domain is:
(x) = ()
P
+ (x x
P
) . (3.106)
3.7 Solution of Linear Equation Systems 67
The error for the square cell reads:
e
diffSquare
=
1
24
|S|l
3
(n
4
e
+n
4
n
) ::: , (3.107)
and the error for hexagon can be written:
e
diffHexagon
=
1
24
|S|l
3
(n
4
ne
+n
4
n
+n
4
nw
) ::: . (3.108)
In order to get an insight into the error behaviour on such problems, the
problem is simplied to
4
x
4
= constant while all other components of
are zero. By inserting this into Eqs. (3.107) and (3.108), there results:
e
diffSquare
=
1
24
()|S|l
3
x
4
, (3.109)
e
diffHexagon
=
1
24
()l
3
9
8
x
4
. (3.110)
By comparing Eqs. (3.109) and (3.110) on meshes with the same number of
cells there results:
e
diffHexagon
e
diffSquare
= 1.155. (3.111)
This is the same result as the one obtained for the convection term.
The results of the analysis lead to conclusion that cell shapes with paired faces
should be used whenever possible. Such cells have the number of symmetry planes
equal to the number of face pairs which cancel the error. Taking all of the above into
account suggests that square is the best possible shape from the aspect of accuracy
followed by a hexagon, a triangle and a split-hexahedron.
3.7 Solution of Linear Equation Systems
Discretisation produces systems of algebraic equations equal in number to the prod-
uct of the numbers of cells and dependent variables. The equations may be linear
or non-linear, according to the nature of the parent dierential equations. When
the equations are non-linear they can be linearised in some manner and then solved
as for linear problems, but in an iterative or time-marching fashion. Solution of the
algebraic systems is the most time consuming part of the CFD analysis [48, 79].
The system of linear algebraic equations can be written [47]:
a
P
P
+
N
a
N
N
= Q
P
. (3.112)
68 Finite Volume Discretisation
There are two main classes of solution algorithms.
Direct methods provide a solution of the system in a xed number of oper-
ations. The most popular methods of this type are: Thomas algorithm (TDMA),
Gauss Elimination, LU decomposition [47]. They are appropriate for small systems
as the number of required operations increases rapidly with the number of equa-
tions, except in case of TDMA for which it increases linearly. Memory requirement
for direct methods also increases with the number of equations squared making this
approach even less attractive for large systems.
Iterative methods start from an initial solution and improve the solution until
the error tolerance imposed by the user is met. In CFD applications, discretisation
and modelling errors are generally larger than the machine accuracy and it is not
necessary to solve the system exactly, making iterative methods very attractive.
However, these solvers impose some conditions on the structure and characteristics
of the matrix. Matrices resulting from the FV discretisation process are sparse,
with most coecients equal to zero. The memory requirement for such matrices can
be reduced if the solver can preserve the sparseness of the matrix. Some iterative
methods preserve sparseness, making their use even more attractive.
Some iterative solvers require the matrix to be diagonally dominant in order
to guarantee convergence. Diagonal dominance occurs if the diagonal coecient is
equal to the sum of magnitudes of the o-diagonal coecients for every equation,
with at least one diagonal coecient greater than the sum of magnitudes of non-
diagonal terms [133]. Diagonal dominance can be increased by under-relaxation.
The dominant diagonal coecient can be calculated as follows [69]:
a
P
= max(a
P
,
N
|a
N
|). (3.113)
After some algebra the under-relaxed system can be written as:
a
P
n
P
+
N
a
N
n
N
= Q
P
+ (
a
P
a
P
)
o
P
, (3.114)
where 0 < < 1 is the under-relaxation factor,
o
P
represents the value from the
previous iteration and
n
P
is the new value of the eld. When the system has
converged to its solution the additional terms cancel out as (
n
P
=
o
P
). Under-
relaxation is not used for transient calculations as the transient term enhances the
diagonal dominance of the matrix and has the same eect as under-relaxation.
3.8 Solution Algorithm for the Navier-Stokes System 69
In this study the Conjugate Gradient (CG) based methods are used to solve the
system of algebraic equations. This method was proposed by Hestens and Steifel
[59]. For symmetric matrices the Incomplete Cholesky preconditioned Conjugate
Gradient (ICCG) is used, described in detail in [67]. Bi-CGSTAB by van der Vorst
[147] is the solver used for asymmetric matrices.
3.8 Solution Algorithm for the Navier-Stokes Sys-
tem
The discretisation of all terms in the general transport equation, Eqn. (2.32), have
been described in the preceeding sections. The same principles apply to the terms
of the Navier-Stokes equations with some additional problems which require further
treatment.
The system of N-S equations is dependent on the pressure through the pressure
gradient term in the momentum equation but the pressure lacks its own equation.
If the ow is compressible the continuity equation can be used to obtain the density
eld which can be used to calculate the pressure from an equation of state. On the
contrary, for incompressible ows the continuity equation becomes an additional
constraint on the velocity eld. A way to overcome this diculty is to construct the
pressure eld such that velocity satises the continuity equation. This is done by
modifying the continuity equation into an equation for pressure [47].
3.8.1 Pressure Equation
Derivation of the pressure equation for the collocated variable arrangement [47, 119]
will be presented in this section.
The pressure equation will be derived by using the incompressible isothermal
N-S equations as the model, which read:
U
t
+ UU U = p, (3.115)
U = 0, (3.116)
where and p are the kinematic viscosity and the kinematic pressure, respectively.
Temporal discretisation is performed using some implicit temporal scheme, such as:
_
t+t
t
f(t, U(x, t)) dt = (1 C)tf(t, U(x, t
o
)) +Ctf(t, U(x, t
n
)), (3.117)
70 Finite Volume Discretisation
where dierent values of C can recover temporal schemes dened in Section 3.4.
When the momentum equation is approximated by using Eqn. (3.117) and the dis-
cretisation procedures for spatial terms described in the preceeding sections are
applied, there results:
(U
n
P
U
o
P
)V
P
+Ct
_
f
F
n
U
n
f
f
(S U)
n
f
+p
n
V
P
_
+ (1 C)t
_
f
F
o
U
o
f
f
(S U)
o
f
+p
o
V
P
_
.
The above equation can be written [68]:
a
n
P
U
n
P
= H(U) p
n
, (3.118)
where H(U) includes all terms apart from the pressure gradient at the new time
step and the diagonal term a
n
P
U
n
P
where the subscript n represents the new time
level.
The continuity equation is discretised as follows:
f
S U
f
= 0, (3.119)
and is enforced for every time step. By interpolating U
P
obtained from Eqn. (3.118)
onto the cell faces and inserting it into Eqn. (3.119) there results:
f
S
_
H(U)
a
n
P
_
f
f
_
1
a
n
P
_
f
(S p
n
)
f
= 0. (3.120)
The term (Sp
n
)
f
is evaluated using Eqn. (3.48) to ensure strong coupling between
the velocity and pressure as originally proposed by Rhie and Chow procedure [129].
The terms
_
H(U)
a
n
P
_
f
and (
1
a
n
P
)
f
are interpolated onto the face by using Eqn. (3.12),
which is second-order accurate. If the interpolation is not second-order accurate, it
may result in unboundedness of the pressure eld [86, 119]. The pressure equation
can be written in a dierential form, thus [68]:
_
1
a
P
p
_
=
_
H(U)
a
P
_
. (3.121)
The mass ux through a cell face can be obtained by using Eqn. (3.120) as follows
[68]:
F = S
_
_
H(U)
a
P
_
f
_
1
a
P
_
f
(p)
f
_
. (3.122)
3.8 Solution Algorithm for the Navier-Stokes System 71
Eqn. (3.122) ensures that the face uxes satisfy the continuity equation if the pres-
sure equation is satised. Even though the continuity is satised, face uxes may be
under or over predicted as a consequence of approximations used for dierent terms
in Eqn. (3.122). Therefore, the mass ux error comes from interpolation of
H(U)
a
P
,
1
a
P
and from the evaluation of (S p)
f
. This can be written in the following form:
F = S
_
H(U)
a
P
+e
interpolation
(
H(U)
a
P
)
_
f
_
1
a
P
+e
interpolation
(
1
a
P
)
_
f
(S p +e
snGrad
(S p))
f
= S
_
H(U)
a
P
_
_
1
a
P
_
f
(S p)
f
+e
flux
(3.123)
where e
flux
from Eqn. (3.123) has the following form:
e
flux
= S e
interpolation
(
H(U)
a
P
)
_
1
a
P
_
f
e
snGrad
(S p) e
interpolation
(
1
a
P
)(S p)
f
e
interpolation
(
1
a
P
)e
snGrad
(S p). (3.124)
Here
e
interpolation
(
H(U)
a
P
) is the error originating from the interpolation of
H(U)
a
P
.
e
interpolation
(
1
a
P
) is the error in the interpolation of
1
a
P
.
e
snGrad
(S p) is the error in the pressure surface normal gradient approxi-
mated by Eqn. (3.48).
The truncation errors for interpolated terms and the surface normal gradient are
given by Eqn. (3.21) and Eqn. (3.54), respectively. e
flux
is dependent on the error in
the pressure surface normal gradient e
snGrad
(S p), thus the inuence of pressure
on mass uxes may be large in the regions where the approximation of (S p)
f
is
not accurate. This error reduces with mesh renement and is second-order accurate
on uniform meshes, for which f
x
= 0.5 in Eqs. (3.54) and (3.21), but it becomes
rst-order accurate when the mesh is not uniform due to the pressure surface normal
gradient which becomes rst-order accurate on non-uniform meshes.
3.8.2 Algorithms for Pressure-Velocity Coupling
The pressure and momentum equations dened in Eqs. (3.118) and (3.120) are non-
linear, because the a
P
and H(U) depend on the velocity eld. This non-linearity can
72 Finite Volume Discretisation
be resolved using an iterative procedure. When high temporal accuracy is required
the equations must be solved iteratively within each time step until the solution
is satised to the desired tolerance. Steady ows can be solved by iterating the
steady-state equations until the tolerance is met.
The most widely used approach for solving coupled equations is the segregated
approach where equations are linearised and solved in sequence one after another
[66, 113, 114]. These algorithms have gained popularity within the CFD community
and are regarded as the best compromise between accuracy and computational cost
[47]. One of the most widely used algorithms based on this approach is SIMPLE
[113, 114] which will be presented next.
The SIMPLE Algorithm
The SIMPLE algorithm is widely used for steady-state calculations. SIMPLE stands
for Semi-Implicit Method for Pressure-Linked Equations. It consists of the following
steps:
1. Momentum predictor. The velocity eld is calculated from the momentum
equation by using the pressure and velocity from the previous iteration or an
initial guess [114]. The equation is under-relaxed, using an under-relaxation
factor
U
, (0 <
U
< 1), to reduce the inuence of non-linearity and to
increase the diagonal dominance of the matrix. The resulting velocity eld
does not necessarily satisfy the continuity equation.
2. Pressure solution. The pressure equation is formulated using the predicted
velocities and then solved to obtain the new pressure eld.
3. Velocity correction. Using the new pressure eld, a new eld of conserved
uxes is calculated using Eqn. (3.122). The associated velocity eld which
satises continuity is calculated from Eqn. (3.118), but it will not satisfy the
momentum equation until the overall process has converged. The solution of
the pressure eld is under-relaxed to minimise the eect of non-linearity [68]:
p
new
= p
old
+
p
(p
p
p
old
). (3.125)
Here p
p
is the solution of the pressure equation, p
old
is the solution from the
previous iteration or an initial guess. p
new
stands for the pressure eld which
3.9 Summary and Conclusions 73
will be used in the next iteration and
p
is the pressure under-relaxation
factor with limits 0 <
p
< 1.
4. The procedure is stopped if the solution has converged; otherwise it is repeated
from Step 1.
The energy and turbulence equations described in Chapter 2 are solved after
step 3, using the corrected uxes and velocities.
3.9 Summary and Conclusions
This chapter has presented a second-order accurate FV discretisation practice to-
gether with the errors which may arise during the discretisation process. It has been
shown that the accuracy is dependent on the mesh quality and it reduces with the
increase of skewness and/or non-orthogonality. Analysis of errors on dierent type
of cells has shown that cell shapes which have face pairs are expected to give better
accuracy because the errors committed on the faces of the face pair cancel them-
selves out. It was also shown that the discretisation of the surface normal gradient
becomes rst-order accurate when the mesh is not uniform and it is therefore ad-
visable to keep the mesh as uniform as possible, especially for diusion-dominated
problems. The mass ux, Eqn. (3.122), is dependent on pressure and the inuence
of pressure reduces as a second-order accurate error on uniform meshes while it
becomes a rst-order error on non-uniform ones.
74 Finite Volume Discretisation
Chapter 4
Error Estimation
4.1 Introduction
In the previous chapter the Finite Volume Discretisation has been described. A new
estimator of the discretisation error in the FV solution, developed during this study,
will be presented in this chapter.
Before any judgement on the quality of error estimators can be given, it is neces-
sary to dene their desired properties. The properties required for an error estimator
are described by Jasak [68]:
1. It should provide a reliable information about the error distribution and its
magnitude.
2. The absolute value of the estimated error should have the dimensions of the
eld it is applied to, so that it is easily understood.
3. It has to work well on meshes which may be too coarse for adequate resolution.
4. It should be applicable to the various kinds of transport equations encountered
in CFD.
5. The estimated error should tend asymptotically to the exact error with mesh
renement.
6. The error estimator should modestly overestimate the error.
7. The cost of error estimation should not be too large.
75
76 Error Estimation
The Eectivity index is a measure of the quality of error estimation and is
dened as:
=
|e|
|E|
(4.1)
where e is the estimated disretisation error and E is the exact discretisation error in
the solution. From Eqn. (4.1) it is clear that it is desirable to have eectivity indices
close to unity from above. Eectivity indices can be assembled on a cell-by-cell basis
or evaluated globally for the whole domain.
The remainder of this chapter is organised as follows. A literature survey of pre-
vious studies is given in Section 4.2. An analysis of errors on mesh faces, performed
in this study, will be presented in Section 4.3. The result is a new error estimator
called the Face Residual Error Estimator (FREE) described in Section 4.4.
The performance of FREE is tested in Section 4.5 on a set of cases for which
analytical solutions are available.
Some closing remarks are given in Section 4.6.
4.2 Literature Survey
Error detection can be performed by using error indicators which can pinpoint the
regions where better resolution is needed, but they do not provide information about
the error magnitude. Error indicators which monitor pressure and/or density gra-
dients give useful information for problems with discontinuous features (i.e. shocks)
where ne resolution is needed around them [2, 122, 151], but they may fail to pro-
vide useful information when the solution varies smoothly [151]. The Cell Reynolds
number can also be used to provide information about where better resolution is
needed to suppress spurious oscillations from the CD convection scheme [41].
Error estimators provide additional information, namely the error magnitude,
which is important when judging the quality of the solution. A review of error
estimation methods used in the FEM will be given rst, followed by the methods
used in the FVM.
4.2.1 Methods Used in FEM Analysis
A summary of the error estimation methods used in FEM is given by Ainsworth
and Oden in [6]. They can be divided into three major groups:
4.2 Literature Survey 77
1. Gradient recovery estimators are based on an approach of obtaining a
continuous approximation of the solution gradient from the solution obtained
by the FEM calculation. The dierence between the continuous solution gra-
dient, evaluated using a higher-order technique, and the discontinuous FEM
solution gradient is then used as an error estimator.
Error estimates of this kind were proposed and introduced by Zienkiewicz and
Zhu. In [162] they presented a technique for calculating the continuous approx-
imation of stresses in an elastic body by using the linear variation operator
for the stresses. After the improved solution is known it is compared with
the stresses calculated from the FEM solution to compute the errors. Further
research of the above error estimation technique was described in [163, 164]
where Zienkiewicz and Zhu have shown that the higher order variation of the
solution should be computed in the Gauss points, where the convergence of
the solution is one order higher than the discretisation.
2. Explicit residual error estimates. Early work on estimates of this type
was presented in [15] by Babuska and Rheinboldt, who proposed an estimator
where the residual is weighted by a normalisation factor to give the error
bound. Sandri in [132] derived explicit error estimates for the non-Newtonian
uids governed by the power law stress model.
The accuracy of Explicit Residual Estimators is unsatisfactory as they tend
to substantially over-estimate the error [6]. This approach has been improved
and extended to the FVM by Jasak [68] by making the normalisation factor
dependent on FV uxes, which improved the eciency of the estimate.
3. Implicit residual error estimates require the solution of a local problem
posed on each element or a patch of elements. The solution of the local
problem provides the approximation of the discretisation error in some norm.
Examples of this approach can be found in [1, 17, 18, 76, 105, 126, 127] and
many more.
Equilibrated residual error estimates are a group of implicit methods which
require that the internal error uxes and the boundary error uxes are con-
served. Equilibrated error estimators have been studied in [35, 7, 8, 107, 108]
and shown to produce good estimates of the discretisation error. In [80] Kelly
78 Error Estimation
has discussed the issue of ux equilibration for the implicit error estimates.
He has also shown that non-equilibrated uxes result in over-estimation of
the error. This approach has been extended to the FVM by Jasak [68] where
it tends to under-estimate the error because of the limited accuracy of the
method used to solve the local error problem.
4.2.2 Methods Used in FV Analysis
Error estimation techniques used in the FV framework can be divided into four main
groups:
1. Truncation analysis. Every smooth solution can be written in a form of a
Taylor series expansion about a given point in space. The series is potentially
innite depending on the number of non-zero gradients, thus:
(x) =
P
+
n=1
1
n!
(x x
P
)
n
::
..
n
(..
. .
n
)
P
. (4.2)
The FVM approximates the solution by using a truncated form of the Taylor
series. The error in the solution is then equal to the sum of truncated terms:
e(x) = (x) (x) =
n=p
1
n!
(x x
P
)
n
::
..
n
(..
. .
n
)
P
, (4.3)
where p is the order of discretisation. The error can be estimated by approxi-
mating higher gradients from the existing FV solution and inserting them into
Eqn. (4.3).
One of the rst error estimation techniques used in the framework of the FVM
is Richardson Extrapolation (RE). Examples can be found in [23, 46, 68, 101]
etc. The RE method requires the existence of solutions of the problem on two
or more meshes with dierent cell sizes to estimate the leading term of the
truncation error by solving the system:
(x)
1
(x) = C h
p
1
,
(x)
2
(x) = C h
p
2
, (4.4)
where C h
p
i
is the leading term of the truncation error, (x) is the unknown
exact solution and
i
(x) is the FV solution on a mesh with density h
i
. h
i
is
dened as a ratio between the volume and area of the cell [68]:
h
i
=
V
f
|S|
. (4.5)
4.2 Literature Survey 79
By solving the system in Eqn. (4.4), C and (x) can be obtained and the error
can be expressed as follows:
e = |(x)
2
(x)| =
|
2
(x)
1
(x)|
_
h
1
h
2
_
p
1
. (4.6)
This is not a reliable method because it generally under-estimates the error,
especially if the ner mesh is still coarse [68, 95]. Another drawback is the
fact that it requires two solutions which make it time consuming.
Methods which can estimate the error by using a single solution obtained on
a single mesh started appearing relatively recently [10, 39, 55, 63, 68, 70,
138, 159], etc.. A method for the rst-order accurate FVM discretisation
presented by Ilinca et al. in [63] estimates the error as the dierence between
the computed solution, assumed to be of constant value within the CV, and a
reconstructed linearly-varying solution, thus:
e =
_
V
P
[(
P
+ (x x
P
) ()
P
)
P
]
2
dV
=
_
V
P
(x x
P
)
2
dV : ()
2
P
=
_
M : ()
2
P
, (4.7)
where M is the moment of inertia of the CV and ()
P
is the reconstructed
gradient at the node P. The estimator accounts for the ow physics through
the gradient of and it also accounts for the size and shape of the control
volumes through the moments of inertia. The same approach was followed by
Jasak in [68, 70] where the error is estimated using the second-order term in
the Taylor Series and applied to second-order accurate FVM:
e =
1
2
_
V
P
[(x x
P
)
2
: ()
P
] dV
=
1
2
M : ()
P
, (4.8)
where ()
P
is calculated from the available solution. This estimator tends
to under-estimate the error when the computational mesh is coarse because
the higher-order terms neglected by the estimator are still of considerable
importance.
80 Error Estimation
An interesting method for error estimation based on truncation analysis can
be found in [10, 39, 55, 138]. The error is computed on mesh edges as follows:
e =
_
l
0
_
s(l)
T
H(l)s(l) dl (4.9)
where s(l) is parametric representation of the edge and
H(l) is a modied
Hessian obtained from the second gradient. The estimator is used to drive a
mesh adaptive algorithm aimed at equidistributing the error over every edge
in the domain.
An approach to error estimation where the convection and diusion uxes
are calculated using a fourth-order scheme and compared with the ones from
the second-order accurate FV solution was presented by Muzaferija et al. in
[101, 102]. The source of the truncation error
P
is dened as:
P
=
f
[(U S)
f
(
h
f
f
) ()
f
((S )
h
f
(S )
f
)] (4.10)
where
h
f
and (S )
h
f
are evaluated from the FV solution using a fourth-
order scheme while
f
and (S )
f
are known from the FV discretisation
process. The authors assumed that
P
serves as a source which can be added
to the discretised form of the governing dierential equation in order to obtain
the exact solution. This method under-estimates the error and is even less
accurate than Richardson Extrapolation because it cannot detect non-local
phenomena. A similar approach to error estimation developed for hyperbolic
equations, for which the error may manifest itself away from its source, was
presented by Zhang et al. in [159]. The source term of the error equation
consists of the higher order truncated terms which are evaluated from the
existing solution. The estimated errors are in good agreement with the exact
errors in terms of their locations but the magnitudes are under-estimated. It
has also been shown that an ecient grid adaptation can be achieved using
the estimated error source to drive the adaptive algorithm instead of the error
distribution itself, especially on cases where the error is convected away from
its source.
2. Methods based on derived quantities of the solution variable. The
second group of estimators used in the FVM framework was derived upon a fact
that the discretisation schemes enforce conservation of the primary quantities
4.2 Literature Survey 81
for which the equations are being solved, regardless of the mesh resolution, but
none of them conserve their derived properties (i.e. kinetic energy (
1
2
UU) and
angular momentum (x U) are derived from velocity) except when the mesh
is suciently ne. Haworth et al. [57] presented a method which measures
cell-to-cell imbalances of the angular momentum and kinetic energy in order
to characterise the solution error. The imbalance of kinetic energy can be
written:
Res(
1
2
U U) = ((
1
2
U U)U) + (P U) P U
+
_
2
3
( U) U
_
_
U+ (U)
T
_
U
+U :
_
_
U+ (U)
T
_
+
_
2
3
U
_
I
_
, (4.11)
and the imbalance of angular momentum can be written as follows:
Res(x U) = [(x U)U] x ( ) (x g), (4.12)
where all elds are known from the FV solution and the terms are evaluated
using the same approximation as the ones used for the FV solution. The
drawback of the method is that it is not capable of estimating the absolute
error levels in the velocity eld. Jasak [68] generalised the same approach and
made it capable of estimating absolute error levels. The error is estimated by
calculating the imbalance in the transport equation for the second moment of
dened as m
=
1
2
2
. The equation for the second moment can be obtained
by multiplying the general transport equation Eqn. (2.32) with , thus [68]:
Res(m
) =
_
P
[ (Um
) (
) S
() +
(.)] dV.
(4.13)
The values of all elds in the above equation are known and the imbalance is
calculated using the same approximation as the ones used for FV equations.
Multiplying Eqn. (4.13) with a normalisation factor enables recovery of the
error magnitude, thus:
e = 2
|Res(m
)| T
trans
V
P
. (4.14)
V
P
is the cell volume and T
trans
is the characteristic time scale of m
dened
as:
T
trans
=
h
2
|U| h +
, (4.15)
82 Error Estimation
where h is a cell size dened in Eqn. (4.5), |U| is a transport cell velocity and
is the diusion factor. A problem with this error estimator is its inaccuracy
on ne meshes. This is due to the higher order of variation of the second
moment. The transport equation for the higher moment has to be discretised
in a higher-order manner than the transport equation for the property to scale
the errors correctly. It may happen the error estimate indicates the error exists
even if it is zero. This undesired behaviour is the most severe in the regions
where the variation of the variable is modest while in the regions of steep
gradients it does not have a signicant inuence on the estimated error.
3. Residual methods for error estimation in the FV analysis have their origin
in similar work in the Finite Element eld. In the FVM the concept of residual
error estimation has been introduced by Jasak [68] and Angermann [12, 13].
The residual is a function measuring how well are the governing dierential
equations approximated over the computational cell and is dened as [68]:
Res() = SuV
P
+Sp
P
V
P
f
F
f
(
P
+ (x
f
x
P
) ()
P
) +
f
()
f
(S
f
()
P
), (4.16)
where all elds are known from the available FV solution. The residual is
consistent with the discretisation practice and is zero when the solution varia-
tion is linear. It does not give information about the error magnitude directly
because of its dierent dimension from . Jasak [68] has proposed a normali-
sation practice to extract the magnitude of the error from the residual which
consists of the convection and diusion transport coecients and the linearised
part of the source term Sp, thus:
F
norm
=
f
max(F, 0) +
f
_
|S|
(
)
f
|d|
_
+SpV
P
. (4.17)
and the error is calculated from:
e =
Res()
F
norm
(4.18)
The normalisation practice assumes rst-order accurate UD discretisation of
the convection term, the rst term on the r.h.s. in Eqn. (4.17), which en-
sures that the convection contribution to the normalisation factor is always
positive. This has an adverse eect on the accuracy of error estimation espe-
cially on meshes with insucient resolution where it may result in an incorrect
4.3 Error Transport Through a Face 83
distribution of the discretisation error. In [12] Angermann described a local
a posteriori error estimates for convection-dominated problems. In [13]
Angermann et al. the method was modied for density-driven time dependent
problems. The proposed estimate is assembled from four parts which repre-
sent the local indicators. The full error estimate is dened as a sum of local
error indicators. The rst indicator is the residual and the other indicators
account for the imbalance of convection uxes over the computational cell.
This method is not easy to understand and it does not measure the absolute
value of the error. It is also not accurate enough for engineering application
because of severe over-estimation of the error.
4. The Equilibrated residual method is a technique which was used rst
in the framework of FEM. Its extension to FVM was presented by Jasak in
[68, 74]. The method is not as successful as its FEM counterpart because the
procedure used for solving local problems is not accurate enough, especially
on coarse meshes.
Even though the FV error estimation has undergone a rapid development during
the last decade there is still some room for improvement. Truncation methods which
can estimate the error from a single solution have been developed, but they remain
prone to under-estimation of the error. Residual based methods are considered to
be the most promising group of methods and will be utilised in this study. In order
to be accurate, residual methods require conserved error uxes through the cell
faces and a reliable procedure for extracting the error magnitude from the residual.
The approach taken during this study is aimed towards developing an estimator on
mesh faces where balanced error uxes and the data needed for extraction of error
magnitude are available.
4.3 Error Transport Through a Face
The FV discretisation practice is conservative for each CV and is performed by
approximating uxes through the CV faces such that they are in balance with the
sources/sinks acting within the CV. The approximated uxes may contain errors
which are transported through cell faces and these errors inuence the accuracy in
the neighbouring cells.
84 Error Estimation
Due to the property of the FV discretisation, the general transport equation,
Eqn. (2.32), can have three equally valid solutions on every internal face: two ex-
trapolated from both sides of the face (
f
)
P
, (
f
)
N
, Fig. 4.1, and the interpolated
value onto the face
f
[68].
P N
( )
f
N
f
N
(
f
)
P
P
f
Figure 4.1: Inconsistency of the interpolated values on the face
The value on the face extrapolated from the cell P can be calculated using a
second-order accurate variation of in the cell, Eqn. (3.3), such as [68]:
(
f
)
P
=
P
+ (x
f
x
P
) ()
P
, (4.19)
while the value from the cell N can be obtained in the same manner as for the cell
P, thus:
(
f
)
N
=
N
+ (x
f
x
N
) ()
N
. (4.20)
The interpolated value on the face can be calculated using Eqn. (3.12) and the
gradients in the cells P and N can be evaluated using the second-order accurate
methods, Eqs. (3.24) and (3.28). When the variation of the solution is linear, the
gradients in the cells and on the face are equal and the extrapolated values (
f
)
P
and (
f
)
N
become equal to the interpolated value
f
resulting in the discretisation
error equal to zero [68].
A transport equation for error can be derived by substituting Eqn. (1.2) into the
transport equation Eqn. (2.32). For steady state conditions it reads:
_
V
P
(U(E(x) +(x))) dV
_
V
P
((E(x) +(x))) dV =
_
V
P
S
() dV.
(4.21)
4.3 Error Transport Through a Face 85
The transient term is omitted as the focus here is on the discretisation error arising
from the spatial terms. The terms can be reordered such that the terms known
from the FV solution are put on the right-hand side and denoted by Res(), and
the terms governing the error transport are put on the left-hand side. The transport
equation for error then has the form [6]:
_
V
P
(UE(x)) dV
_
V
P
((E(x))) dV = Res() (4.22)
where the residual term Res() on the right-hand side has the following form:
Res() =
_
V
P
[S
()V
P
f
F
f
f
+
f
()
f
(S )
f
. (4.24)
If the evaluation of
f
and (S )
f
terms in the residual is performed using same
procedures as for the convection Section 3.3.1 and the diusion term Section 3.3.2,
respectively, the residual is zero even though the error exists. This is a consequence
of conservation which is then satised. But
f
can also be approximated by us-
ing Eqn. (4.19) which is valid within the computational cell and (S )
f
can be
approximated by:
(S )
f
= (S
f
()
P
). (4.25)
When the variation of the solution is of higher-order than linear the residual evalu-
ated by using Eqn. (4.19) and Eqn. (4.25) [68]:
Res
P
() = S
()V
P
f
F
f
(
P
+(x
f
x
P
)()
P
)+
f
()
f
(S
f
()
P
), (4.26)
may not be equal to zero if the mesh is not suciently ne. Thus, it provides an
estimate of the magnitude of the error source in the computational cell. Regarding
the source term, the discretised source term Section 3.3 cannot be written as sum
over cell faces and its inuence on the discretisation error is neglected. The residual
is consistent with the discretisation practice and it is zero when the variation of
is linear. It is sensitive to the shape of the cells and should therefore capture the
mesh induced errors because the extrapolated values onto the faces are dependent
on (x
f
x
P
).
86 Error Estimation
As was shown by Ainsworth et al. [3, 8] and Jasak [68] the residual can be split
into a sum of partial face residuals from all the faces bounding the computational
cell, thus:
Res
P
() =
f
Res
P
f
(), (4.27)
where the partial face residual Res
P
f
() is dened as [68]:
Res
P
f
() = F
f
(
f
(
P
+(x
f
x
P
)()
P
))+()
f
((S()
P
)(S )
f
). (4.28)
Here,
f
represents the interpolated value on the face shown in Fig. 4.1 and (S )
f
is the surface normal gradient on the face calculated using Eqn. (3.48). The partial
face residual represents the imbalance in values and gradients on the face originating
from cell P Fig. 4.1, only. The partial face residual can detect how well is the
governing equation satised on the faces comprising the cell and can therefore give
information about the direction in which the error is transported.
When the left-hand side of Eqn. (4.22) is discretised in a second-order manner
for a representative cell, we get:
f
F
f
e
P
f
f
()
f
(S
f
(e)
P
f
) =
f
F
f
(
f
(
P
+ (x
f
x
P
) ()
P
)) +
f
()
f
((S ()
P
) (S )
f
)
(4.29)
from which it follows that:
e
P
f
=
f
(
P
+ (x
f
x
P
) ()
P
),
(S e)
P
f
= (S )
f
(S ()
P
). (4.30)
After some algebra a link between the error and the error in gradient on the face
can be found, thus:
e
P
f
= (x
f
x
P
) (e)
P
f
. (4.31)
From Eqn. (4.30) an interesting property of the error eld can be found. The error
can be transported in the opposite direction to the solution uxes, because from
Eqn. (4.30) it is clear that the convection F
f
e
P
f
and diusion (S
f
(e)
P
f
) error
uxes may have dierent signs from the uxes F
f
f
and ()
f
(S )
f
used to
approximate convection and diusion terms. The following section will show how
this can be used to develop an error estimate.
4.4 Face Residual Error Estimator 87
4.4 Face Residual Error Estimator
The estimator developed during this study follows the approach of Jasak [68, 73]
but is dened on the faces because the uxes used for normalisation of the residual
are available. Additionally, the estimator dened on the faces provides information
which faces largely contribute to the error. This can be used for anisotropic mesh
renement, see Chapter 5.
The partial face residuals, dened in the previous section Eqn. (4.28), provide
the information about the error ux through a face. But, for every internal face
there exist two partial face residuals from both sides of that face. The partial face
residual from the cell P has the form, Fig. 4.1:
Res
P
f
() = F
f
(
f
(
P
+ (x
f
x
P
) ()
P
)) + ()
f
_
(S
f
()
P
) (S )
f
_
(4.32)
and from the cell N:
Res
N
f
() = F
f
(
f
(
N
+(x
f
x
N
) ()
N
)) +()
f
_
(S
f
()
N
) (S )
f
_
.
(4.33)
When these partial face residuals from both sides of the face are summed, the full
face residual is obtained:
Res
f
() =Res
P
f
() +Res
N
f
()
=F
f
((
N
+ (x
f
x
N
) ()
N
) (
P
+ (x
f
x
P
) ()
P
))
+()
f
S
f
(()
P
()
N
).
(4.34)
Because Res
f
() is assembled from information in the adjoining cells, only, its cal-
culation is inexpensive and is unique for each face. On boundary faces the residual
is calculated using Eqn. (4.32) and is equal to the partial face residual for that face.
The face residual is dependent both on the mesh and the solution itself. De-
pendence on (x
f
x
N
) and (x
f
x
P
) make the residual sensitive to mesh density
and skewness. It becomes larger with the increase of mesh skewness. The solution
variables, (eg. S
f
(()
P
()
N
)) are also sensitive to mesh size because the
closer P and N the smaller is the dierence between the gradients at those nodes
but only if the solution is non-singular.
The face residual does not have the same dimension as the eld, so it is
necessary to introduce a normalisation procedure which enables extraction of the
error magnitude from the residual. The normalisation factor can be assembled using
88 Error Estimation
the information available at the face, namely the magnitude of the convection and
diusion transport coecients, thus:
F
conv
= |F
f
|,
F
diff
()
f
|S|
1
2
|x
N
x
P
|
,
F
norm
= F
conv
+F
diff
,
(4.35)
where F
f
and ()
f
are the same as in Eqs. (3.30) and (3.47), respectively. The
factor
1
2
in F
diff
is included to approximate the distances from the cell centre to
the face centre on both sides of the face as in Eqn. (4.31). The analysis of the
normalisation practice will be presented in the next section.
Finally, on the internal faces the Face Residual Error Estimator (FREE) is de-
ned as:
e
f
=
Res
f
()
F
norm
(4.36)
while on boundary faces it is calculated according to the type of boundary condition
imposed. Thus, for example:
e
f
=
_
_
0 on xed value boundaries
Res
P
()
F
norm
b
on other boundaries
(4.37)
where F
norm
b
is dened as:
F
conv
b
= |U S|
f
F
diff
b
= ()
f
|S|
|x
f
x
P
|
F
norm
b
= F
conv
b
+F
diff
b
(4.38)
4.4.1 Analysis of the Normalisation Practice
An analysis of the normalisation practice will now be presented term by term in
order to establish a link between the estimated face error and Eqn. (4.30). The
estimated face error will also be expressed in a form of truncation error, which
provides information about the scaling of the estimated error with mesh renement.
Convection Term
The face residual for the convection-dominated problems with no diusion can be
written:
Res
f
() = (U S)
f
((
N
+(x
f
x
N
) ()
N
) (
P
+(x
f
x
P
) ()
P
)). (4.39)
4.4 Face Residual Error Estimator 89
The estimated error is obtained by normalising the above residual, Eqn. (4.39), with
the convection part of the normalisation factor, Eqn. (4.35). The result is:
e
f
= sgn(U S)
f
[(
N
+ (x
f
x
N
) ()
N
) (
P
+ (x
f
x
P
) ()
P
)]
= sgn(F)
f
[(
N
f
+ (x
f
x
N
) ()
N
) (
P
f
+ (x
f
x
P
) ()
P
)]
= sqn(F)
f
[e
P
f
e
N
f
]
(4.40)
where sgn(F) is dened as follows:
sgn(F) =
_
_
1 F 0
1 F < 0.
(4.41)
e
P
f
and e
N
f
can be calculated from Eqn. (4.30). Eqn. (4.40) can be rewritten in a
form of truncation error by using the Taylor expansions in Eqs. (3.16) and (3.17),
thus:
e
f
=
P
+ (x
P
x
f
) ()
f
+
1
2
(x
P
x
f
)
2
: ()
f
+ (x
f
x
P
) (()
f
+ (x
P
x
f
) ()
f
)
N
+ (x
N
x
f
) ()
f
+
1
2
(x
N
x
f
)
2
: ()
f
(x
f
x
N
) (()
f
+ (x
N
x
f
) ()
f
)
=
1
2
[(x
N
x
f
)
2
(x
f
x
P
)
2
] : ()
f
=
1
2
[(2f
x
1) 2]|d|
2
(
d
2
: ()
f
), (4.42)
where f
x
is a linear interpolation factor dened in Eqn. (3.15), is a measure of
skewness, Eqn. (3.7) and d is a distance vector, Fig. 3.3. The estimator is consistent
with the second-order accurate discretisation practice and it is also sensitive to mesh
skewness. Eqn. (4.42) is the most similar to the truncation error for the CD scheme
and is expected to provide best results in that case. The truncation error for the
UD scheme, Eqn. (3.37), is rst-order accurate and it should not be used because it
may result in under-estimation of the error on ne meshes. Examples of such error
behaviour is shown by Jasak [68].
Diusion Term
The residual when convection is not present is:
Res
f
() = ()
f
S (()
P
()
N
). (4.43)
90 Error Estimation
The expression can be recast using F
diff
from Eqn. (4.35) and Eqn. (4.43) into
Eqn. (4.36) to give:
e
f
=
1
2
|x
N
x
P
|
d (()
P
()
N
)
=
1
2
|x
N
x
P
|
d [(()
P
()
f
) (()
N
()
f
)].
(4.44)
As in case of convection term, Eqn. (4.44) can be recast in a form of truncation
error, thus:
e
f
1
2
|x
N
x
P
|
d [
(()
f
+ (x
P
x
f
) ()
f
)
(()
f
+ (x
N
x
f
) ()
f
)]
1
2
|d|
2
(
d
2
: ()
f
)
1
2
|d
n
|
2
cos
2
N
(
d
2
: ()
f
) (4.45)
Eqn. (4.45) is consistent with the second-order discretisation practice as it is a
N P
d
n
d
N
f
Figure 4.2: Distance between points on non-orthogonal mesh
function of |d
n
|
2
which is the distance between the grid nodes in the direction of
normal vector Fig. 4.2. According to the discretisation practice for diusion term,
Eqn. (3.48), the relation between |d
n
| and |d| is:
|d| =
|d
n
|
cos
N
.
Eqn. (4.45) is not similar to the truncation error for the surface normal gradient,
Eqn. (3.54). The estimated error is proportional to the second gradient of while
Eqn. (3.54) shows that the error is proportional to the second gradient of and rst-
order accurate on non-uniform meshes while on uniform meshes it is second-order
4.5 Examples 91
accurate and dependent on the third gradient of . From there it follows that high
accuracy of error estimation cannot be expected for diusion-dominated problems
because the truncation errors are not consistent.
4.5 Examples
Tests of the face residual error estimator were performed on three cases where analyt-
ical solutions of the governing equations are available. The cases included diusion
and convection-dominated ones.
In order to test the order of the discretisation procedure and the error estimator,
the exact and the estimated errors are monitored with uniform mesh renement.
The quality of the error estimation is assessed in terms of the absolute magnitudes
of both the maximum and mean errors. The mean error can be monitored for
cell-based and face-based variables. For the cell-based variables the mean error is
calculated using:
e
meanCell
=
n
i=0
|e
i
|V
i
n
i=0
V
i
(4.46)
and for the face-based variables:
e
meanFace
=
n
i=0
|e
i
||S
i
|
n
i=0
|S
i
|
(4.47)
where |e
i
| represents the magnitude of the error for the i th face or cell and n is
a number of cells or faces in the mesh.
The values of the exact error magnitudes are calculated at the grid nodes and
plotted as cell values, where the cell colour corresponds to the error magnitude for
that cell. Estimated errors are also plotted as cell values, where the value in the cell
is the weighted average of the error on the faces forming the cell, thus:
e
cell
=
f
|e
f
||S
f
|
f
|S
f
|
. (4.48)
4.5.1 Planar Jet
In this test case, a uid enters a planar two-dimensional domain via a slot, forming a
jet, see Fig. 4.5. The solution of the Navier-Stokes equations, which can be found in
[111, 134], was derived by assuming the ow is incompressible with uniform pressure
and a small cross-stream velocity. The analytical solution for the axial velocity U
x
92 Error Estimation
has the form [111]:
U
x
=
A
B
x
1
3
sech
2
(
y
B
x
2
3
), (4.49)
and the cross-stream velocity component U
y
is given by:
U
y
=
1
3
Ax
2
3
tanh(
y
B
x
2
3
) +
2
3
A
B
yx
4
3
sech
2
(
y
B
x
2
3
) (4.50)
where
A = (
9
2
M
j
)
1
3
, (4.51)
B = (
48
2
M
j
)
1
3
, (4.52)
and M
j
= U
2
0
h is the jet momentum. The value of M
j
used for calculations is:
M
j
= 0.1 [m
3
/s
2
], (4.53)
and the kinematic viscosity is set to:
= 0.0012 [m
2
/s]. (4.54)
outlet B. C.
Point jet
U = infinity
U = 0
0.25m
0
.
1
m
inlet B. C.
X
Y
0.05m
Figure 4.3: Solution domain and boundary conditions for the jet
case
The computational domain and the boundary conditions used for this case are
shown in Fig. 4.3, where the left, top and bottom boundary were treated as inlet.
The velocities at those boundaries are set to values of the analytical solution. An
outlet was prescribed at the right boundary and the dynamic pressure is set to zero
there. The convection scheme is Central Dierencing (CD). Gradients of all variables
are evaluated by the Gauss Theorem. Eqn. (4.49) has a singularity at the origin of
the coordinate system, hence the domain was moved downstream in order not to
4.5 Examples 93
have the singularity within the domain. The coordinates of the bottom-left corner
of the domain were located at (0.05m, 0m) and the top-right corner was positioned
at (0.3m, 0.1m).
Figure 4.4: Starting mesh for the jet case (10 x 4 cells)
Figs. 4.5 and 4.6 show the velocity and pressure elds. The velocity and its gra-
dient are high in the region where the jet enters the domain and reduce downstream
due to the inuence of diusion. Fig. 4.6 shows that the pressure eld is not uniform
within the domain as was assumed during the derivation of analytical solution.
To examine the quality of error estimation on meshes with dierent cell size,
solutions were obtained on ve meshes. The starting uniform mesh had ten cells in
the streamwise direction and only four cells in the cross-stream direction, Fig. 4.4.
Subsequent meshes were constructed by halving the cell size in both directions.
Fig. 4.7(a) presents the exact velocity error magnitude eld on the 80 x 32 cells
mesh. The error is largest in the vicinity of the region where the jet enters the
domain, where the gradients of pressure and velocity are high. The estimated error
distribution obtained by using FREE is shown in Fig. 4.7(b). The locations of large
and small errors are in moderate agreement because the error is over-estimated.
The dierences are also caused by averaging of face errors, Eqn. (4.48) and by the
modelling error in the analytical solution. The latter originates from the neglect
of pressure gradients and other approximations introduced when developing the an-
alytical solution. Figs. 4.7(a) and 4.7(b) show that the maximum exact error is
downstream of the maximum estimated error. This is due to the pressure gradient,
Fig. 4.6, which is assumed zero in the analytical solution. The errors are large in the
region where the shear is dominant and are a result of diusion term discretisation.
94 Error Estimation
Figure 4.5: Velocity eld for the jet case [m/s] (80 x 32 mesh)
Figure 4.6: Pressure isobars for the jet case [m
2
/s
2
] (80 x 32 mesh)
4.5 Examples 95
(a) Exact error
(b) Estimated error
Figure 4.7: Velocity error eld for the jet case [m/s] (80 x 32
mesh)
96 Error Estimation
The behaviour of both maximum and mean error with uniform mesh renement
Planar Jet - Velocity Error
10
1
10
2
10
3
10
4
10
5
10
-1
10
0
10
1
10
2
no of cells
m
a
x
e
r
r
o
r
[
%
]
Exact error
Estimated error
(a) Maximum error
Planar Jet - Velocity Error
10
1
10
2
10
3
10
4
10
5
10
-2
10
-1
10
0
10
1
no of cells
m
e
a
n
e
r
r
o
r
[
%
]
Exact error
Estimated error
(b) Mean error
Figure 4.8: Variation of errors with uniform mesh renement for
the jet case (|U
norm
| = 2.474m/s)
is shown in Figs. 4.8(a) and 4.8(b), respectively. The errors are normalised by the
maximum value of the velocity magnitude |U| = 2.474m/s and given as percentages.
Estimation of the mean velocity error is considered accurate on the rst four meshes
and becomes under-estimated on the nest mesh due to the modelling error in the
analytical solution. The maximum error, Fig. 4.8(a), is over-estimated. This can be
explained by looking into the truncation error for the diusion term, Eqn. (3.100),
which is dependent on the third velocity gradient on uniform meshes while the esti-
mator is dependent on the second gradient, Fig. 4.45. Unfortunately, the estimator
may therefore predict larger errors in the regions where the discretisation practice
can produce a more accurate solution.
4.5.2 Creeping Stagnation Flow
This test case was chosen for the purpose of testing the error estimator on a problem
where diusion is the main transport mechanism, i.e. for Re << 1 and is modelled
with the Stokes equations for creeping ows. It is a 2D problem where the uid
impinges vertically into a at wall forming a stagnation point, Figs. 4.9 and 4.10(a).
The analytical solution of the Stokes equations for this problem is [111]:
U
x
= x
1
p
y
y, (4.55)
U
y
=
1
p
y
y
2
2
, (4.56)
4.5 Examples 97
where
p
y
is uniform and here set to:
p
y
= 1 [m/s
2
] (4.57)
and its choice determines the velocities. The pressure gradient in the x-direction is
zero. The kinematic viscosity used in the calculations is:
= 1 [m
2
/s]. (4.58)
X
Y
1
m
1m
symmetry plane B. C.
noslip wall B. C.
Stagnation point
inlet B. C.
Figure 4.9: Solution domain and boundary conditions for the
stagnation ow
Calculations were performed on a square-shaped domain with a lower-left corner
located at the origin of the coordinate system and the upper-right corner positioned
at (1m, 1m), as shown in Fig. 4.9. The initial mesh consisted of twenty-ve cells,
ve in each direction, while the three subsequent ones were obtained by halving the
cell size in both directions.
The boundary conditions used for calculations are shown in Fig. 4.9. The values
of velocity on top and right boundaries are set to the match the analytical solution.
The exact velocity error is small and second-order accurate with mesh renement,
Figs. 4.11(a) and 4.12(a). The small error is a consequence of the fact that the second
velocity gradient is constant which can be resolved exactly by the discretisation
98 Error Estimation
(a) Velocity eld (m/s) (b) Pressure isobars (m
2
/s
2
)
Figure 4.10: Velocity and pressure for the stagnation ow (40 x 40
mesh)
(a) Exact error (b) Estimated error
Figure 4.11: Velocity error elds for the stagnation ow [m/s] (40
x 40 mesh)
4.5 Examples 99
practice, Section 3.6.2, so the main source of error in the solution is the evaluation
of the velocity surface normal gradients at the xed value boundaries (S U)
b
,
Eqn. (3.77). On the contrary, the FREE is sensitive to the second gradient of
velocity, Eqn. (4.45), which results in over-estimation of the error. This is the
reason why the estimated velocity error distribution, shown in Fig. 4.11, is in poor
agreement with the exact one, Fig. 4.11(a).
Stagnation - Velocity Error
10
1
10
2
10
3
10
4
10
-3
10
-2
10
-1
10
0
10
1
no of cells
m
a
x
e
r
r
o
r
[
%
]
Exact error
Estimated error
(a) Maximum error
Stagnation - Velocity Error
10
1
10
2
10
3
10
4
10
-3
10
-2
10
-1
10
0
no of cells
m
e
a
n
e
r
r
o
r
[
%
]
Exact error
Estimated error
(b) Mean error
Figure 4.12: Variation of errors with uniform mesh renement for
the stagnation ow (|U
norm
| = 1.107m/s)
The behaviour of the estimator is second-order accurate, as shown in Figs. 4.12(a)
and 4.12(b) where the maximum velocity magnitude used for normalisation is |U| =
1.107m/s. The estimator over-predicts both maximum and mean velocity error
because of the reasons given above.
4.5.3 Convection Transport of Heat with a Distributed Heat
Source
This case was designed for the purpose of testing the FREE on a convection-
dominated problem. It involves a temperature eld which changes due to convection
and heat source/sink, see Fig. 4.14(a). The problem is governed by the equation:
(UT) = Su(x, y).
where Su(x, y) is given below. The uid density is constant and equal to =
1kg/m
3
. The velocity eld U is uniform and at 45
o
to the mesh, Fig. 4.13.
The solution is a parabolic temperature prole:
T(x, y) = Ax(1 x)y(1 y) (4.59)
100 Error Estimation
Y
X
U
=
1
.4
1
4
m
/
s
1m
1
m
T fixed to analytical solution
gradient of analytical solution
gradient of T fixed to
Figure 4.13: Solution domain and boundary conditions for the
convection transport case
and the source term which generates the above prole is:
Su(x, y) = A
_
U
x
(y(1 y)(1 2x)) +U
y
(x(1 x)(1 2y))
_
, (4.60)
where U
x
and U
y
are the x and y velocity components, respectively, both 1 m/s.
The constant A is set to:
A = 16 [K/m
4
]. (4.61)
The exact solution and the corresponding source can be seen in Figs. 4.14(a) and
4.14(b), respectively.
Fig. 4.13 shows the numerical setup with the boundary conditions imposed on
the temperature eld. The convection dierencing scheme used for the calculations
is Gamma [68] with the factor
m
= 0.5.
Four meshes were considered for the analysis. The initial mesh had ve cells in
both x and y directions and the subsequent ones were generated by doubling the
resolution in both directions.
The exact error distribution, Fig. 4.15(a), is a consequence of the fact that the
Gamma interpolation scheme becomes Central Dierencing when the boundedness
criterion is satised, Section 3.3.1. For the CD scheme a central coecient in the
computational molecule is equal to zero on uniform meshes shown in Fig. 4.16, thus:
T
N
T
S
+T
E
T
W
= Su
2V
P
F
4.5 Examples 101
(a) Temperature eld (
o
C) (b) Source eld (
o
C/s)
Figure 4.14: Temperature and source elds for the convection
transport case (40 x 40 mesh)
(a) Exact error (b) Estimated error
Figure 4.15: Error elds for the convection transport case [
o
C] (40
x 40 mesh)
102 Error Estimation
where N, S, E and W are the neighbouring cells to the cell of interest whose
temperature is not present in the equation above.
X
Y
P E
N
W
S
Figure 4.16: Uniform mesh
Because of this, the cells with no boundary faces exchange information with their
second neighbours which results in a chequerboard error eld. Rows and columns
with small errors, Fig. 4.15(a), are initiated at the boundary due to the known
boundary information and they inuence the second neighbours while their rst
neighbours are inuenced by the opposite boundary.
A comparison of the exact and estimated error elds, Figs. 4.15(a) and 4.15(b),
shows moderate agreement. The error in the lower-left quadrant is not detected by
the estimator because it is generated by the source term discretisation which cannot
be detected by the estimator. This has caused under-estimation of the maximum
error, Fig. 4.17(a). The estimated mean error, Fig. 4.17(b), is in very good agreement
with the exact mean error curve. It is noteworthy that the rate of reduction of mean
and maximum errors is second-order accurate on ne meshes when the Gamma
interpolation scheme becomes CD.
Convection Transport - Temperature Error
10
1
10
2
10
3
10
4
10
-1
10
0
10
1
10
2
no of cells
m
a
x
e
r
r
o
r
[
%
]
Exact error
Estimated error
(a) Maximum error
Convection Transport - Temperature Error
10
1
10
2
10
3
10
4
10
-2
10
-1
10
0
10
1
no of cells
m
e
a
n
e
r
r
o
r
[
%
]
Exact error
Estimated error
(b) Mean error
Figure 4.17: Variation of errors with uniform mesh renement for
the convection transport case (T
norm
= 1
o
C)
4.6 Summary and Conclusions 103
4.6 Summary and Conclusions
This chapter has presented a new method for error estimation on mesh faces, namely
the FREE, which has resulted from an analysis of discretisation errors on the mesh
faces. The FREE is of better accuracy on convection-dominated cases than on
diusion-dominated ones for which it over-estimates the error. The over-estimation
is caused by the fact that the FV approximation of the diusion term may be capable
of producing exact solutions even when the variation of the solution is of higher order
than linear, as shown in Section 3.6.2, while the estimated error is not zero when
the above is present. This undesirable behaviour could be avoided by modifying the
face residual for the diusion term such that its truncation error becomes consistent
with the truncation error for the diusion term.
The estimator will be further tested in Chapters 5 and 6 in conjunction with an
adaptive renement technique. In addition, the estimator will be tested in conjunc-
tion with an adaptive mesh generation scheme presented in Chapter 7.
104 Error Estimation
Chapter 5
Mesh Adaptation
5.1 Introduction
Problems of uid dynamics are rich in phenomena characterised by dierent length
scales which have an impact on the discretisation error. These scales require appro-
priate mesh resolution to achieve a solution of the desired accuracy. The estimated
error distribution can be used to control the distribution of cells in the mesh in order
to achieve the requested accuracy with the smallest cost. This chapter will present
a mesh adaptation technique developed during this study which uses the FREE.
The remainder of this chapter is organised as follows. A survey of existing
methods is given in Section 5.2. The method developed during this study will be
presented in Section 5.3. Examples can be found in Section 5.4. Concluding remarks
are given in Section 5.5.
5.2 Literature Survey
The mesh adaptation strategies can be grouped into four main groups, depending
on the type of changes imposed on the mesh and/or the discretisation practice, thus:
h-renement is a strategy where additional computational cells are inserted
in the regions of high error. Cells can also be removed from the regions of
small error using a coarsening procedure. The number of cells may increase
or decrease during the calculation process as a consequence of additions and
removals. The topology of the mesh changes during the adaptation process
to achieve a mesh with optimum cell distribution. Examples can be found
105
106 Mesh Adaptation
in Vilsmeier and H anel [150], Becker et al. [21], Ramakrishnan et al. [128],
Vijayan et al. [149], Erlebacher et al. [44], Chang et al. [35], Peraire et al.
[118], Mavriplis [97], Almeida et al. [11], Apel et al. [14] and many more.
r-renement keeps the number of cells and their topology constant but
changes their distribution in order to minimise the error. The fact that the
topology remains constant during the process makes this approach attractive
for block-structured meshes. However with this approach there is no guarantee
that the required accuracy can be achieved with the specied number of cells.
The approach may also cause severe distortion of the mesh and convergence
problems. Examples of this approach can be found in Ait-Ali-Yahia et al.
[10], Gnoo [54], Nakahashi et al. [103], Oden et al. [106], Dwyer et al. [42],
Tattersall et al. [141] and others.
p-renement refers to the group of methods which change the order of the
discretisation practice according to the error distribution. This approach is
particularly suitable for Finite Element calculations as the nature of the dis-
cretisation practice allows easy implementation of higher-order shape func-
tions. The p-renement method is not suitable for non-smooth solutions as
higher-order schemes are more prone to spurious oscillations in regions of steep
gradients than their lower order counterparts. Calculations using p-renement
have been presented by Zienkiewicz et al. [161], Demkowicz et al. [37], etc.
Composite methods. These methods combine two or more of the previously
mentioned methods. The most popular ones are hr methods Tam et al. [138]
and h p methods [162].
Reviews of mesh adaptation techniques can be found in [16, 56].
In the framework of h-renement methods, dierent ways of inserting and re-
moving cells have been suggested. They mainly dier regarding the type of mesh
and problems they are designed to work on. Early mesh renement techniques in
the FVM were used in conjuction with multigrid technique for solving systems of
algebraic equation i.e. [29, 145]. In [29] Brandt presented a technique to optimise
accuracy and minimise the computational work by changing the spatial discretisa-
tion and the order of approximation locally in the domain. Berger et al. [2224]
presented a technique based on inserting patches of ne mesh covering the regions
5.2 Literature Survey 107
of the domain where ner resolution is needed. Error estimation was performed by
using Richardson Extrapolation. In order to simplify implementation and apply a
safety margin, at the expense of error equidistribution, patches of rened mesh
were uniform, orthogonal and structured. Transfer of data between the overlapping
rened grids is facilitated through boundary conditions. Thompson et al. in [145]
used a similar methodology where renement was performed by using overlapping
meshes of increasing neness. The adaptation criterion is based on the truncation
error and systems of algebraic equations are solved using a multigrid technique.
Muzaferija [101, 102] has presented a renement method which works on poly-
hedral elements. The method is based on splitting of hexahedral cells into eight new
cells and updating a list holding information about the cells added into the domain.
Coarsening is performed by merging cells which were previously rened. The inter-
action between the rened parts of the mesh and its surroundings is facilitated by
using split-hexahedron cells. A split-hexahedron has a shape of a hexahedron but
has more than six faces. The method does not require any special treatment at the
boundary of the rened regions but requires appropriate mesh addressing.
Jasak and Gosman [68, 71, 72] have presented a method which enables directional
renement and coarsening by splitting and merging hexahedral and split-hexahedral
cells. The split-hexahedron cell used in this work can have only one face shared by
two neighbouring cells thus making the procedure inecient for cases where highly
localised renement is needed, because the procedure renes more cells than needed
in order to satisfy the criterion that every cell in the mesh is either a hexahedron
or a split-hexahedron. Coarsening is performed by merging two cells together and
taking into account that the shape of the newly created cell is either a hexahedron
or a split-hexahedron. The decision about directions of renement is based on the
solution gradient and directional stretching of the cell. This has a drawback that the
directional splitting is dependent on the mesh stretching which in some cases may
cause renement and coarsening being performed in an inappropriate direction. This
may result in the increase of the disretisation error causing local over-renements in
such regions.
An hr method using directional renement and coarsening has been presented
by Habashi et al. [9, 10, 38, 39, 55]. Directional renement is achieved by driving the
adaptation by estimating the errors on the computational mesh edges. In [10, 55]
the authors discuss the principles of error equidistribution based on the concept
108 Mesh Adaptation
that a mesh adapted to resolve the ow features can be viewed as a uniform mesh
in the error space. The r-renement procedure aimed at equidistributing the error
on edges has been discussed in [9]. In [38] this method was applied to several cases,
including turbulent ones, and was tested with two dierent solvers, a Finite Element
one and a Finite Volume one, which showed that it yields similar meshes and results
for both solvers. The method is capable of producing accurate solutions with saving
on the number of cells but requires many adaptation loops, which is not desired in
the engineering environment.
There has been a substantial eort recently to apply mesh adaptation methodol-
ogy to turbulent ows. Jasak and Gosman [72] have applied the methodology from
[68, 71] to a ow over a 2D hill and to a ow over a 3D swept step. The method
did not reduce the error monotonically because the quality of the mesh was not
preserved in the important regions. Muzaferija and Gosman [101, 102] have tested
their methodology on turbulent cases of engineering interest. As the method renes
each hexahedral cell into eight new cells, it produces over-rened meshes for features
such as boundary layers and shear layers which are highly directional.
In [38] Habashi et al. have applied their methodology to a turbulent ow around
a 2D car and to a turbulent ow around NACA 0012 prole. The methodology im-
proved predictions of pressure coecients and clustered most of cells in the boundary
layer region where the high gradients reside.
Pelletier et al. [62, 64, 65, 115117, 146] developed a mesh renement technique
for turbulent ows simulated with two-equation turbulence models. The estimation
of error is performed using the method developed by Zienkiewicz and Zhu [162] while
the mesh renement is based on methodology developed by Peraire et al. [118]. The
method does not produce anisotropic meshes aligned with important ow features,
which increases the number of cells required to achieve accurate solutions. In order
to reduce errors for turbulence quantities they are solved in logarithmic form which
makes their variation smooth and less computationally demanding.
Even though the adaptive methods have evolved during the last decades none
of them can generate high quality anisotropic meshes which is required to achieve
high accuracy with the smallest possible number of cells and achieve it in a small
number of adaptation cycles. The renement technique developed during this study
is a h-renement method which provides best control of the mesh resolution and
mesh quality. h-renement is also considered to be the most suitable for problems
5.3 Adaptation Procedure 109
of engineering interest where the geometries are complex.
5.3 Adaptation Procedure
The procedure operates on hexahedral meshes and it consists of the following steps:
1. Solve the problem on the initial mesh.
2. Estimate the discretisation error distribution. If the error on every face is
below the required level the calculation is terminated.
3. Determine faces for which the estimated error is above the limit and mark
them. Cells sharing marked faces are marked for renement parallel to those
faces to reduce distances between the nodes which mainly contribute to the
error. This rule has some exceptions and will be treated in more detail in Sec-
tion 5.3.1. The coarsening procedure is not implemented because the author is
not certain how to perform coarsening based on information provided by the
FREE such that it does not have an adverse eect on mesh quality and error
reduction.
4. In order to ensure the correct boundary description, newly created boundary
vertices may have to be moved from the position where they were located by
the renement procedure to the closest point at the boundary surface.
5. Map the solution from the previous mesh and use it as an initial guess.
6. Repeat from step 1 until the error is reduced below the required upper limit.
5.3.1 Selection of Cells and Mesh Renement
Selection of cells is performed by using the information about the error on the faces
provided by the FREE. A hexahedral cell can be split parallel to a face without
making any changes in other directions. This directional renement results in re-
duced computational cost as the number of the cells in the adapted mesh is smaller
than in the case when the cells are split in all three directions.
Selection of cells for renement also has an impact on the quality of the adapted
mesh and it has to be performed in such a way that it does not have an adverse eect
on accuracy. The accuracy may be reduced at the interface between the rened cells
110 Mesh Adaptation
and the rest of the mesh where split-hexahedron cells appear, Fig. 5.1. A split-
hexahedron can have one or more split faces which obey the property that each split
face can be shared with two or four neighbouring cells, Fig. 5.1. In Section 3.6 it was
1
2
3
4
6
0
5
7
Figure 5.1: A split-hexahedron cell with left face split in one
direction shared with two cells. The top face is
cross-split and shared with four cells
shown that split-hexahedra produce higher errors than the hexahedra for the same
cell size when higher solution gradients are non-zero. This happens due to increased
distance between the neighbouring nodes of the split face, Eqn. (3.78), skewness and
non-orthogonality which reduce the quality of the mesh. It may therefore happen
that the solution on the rened mesh has higher errors than on its parent mesh
in the regions where split-hexahedra are present. To prevent this from happening,
selection of cells for renement is performed in two steps:
1. Compare the estimated error on the face e
f
with the specied upper limit E.
If:
e
f
> E, (5.1)
the face is marked and the adjacent cells are marked for renement in the
direction parallel to that face, Fig. 5.2. This reduces the distance between the
neighbouring nodes which are the main contributors to the error on that face.
Therefore, the directional information about the error is directly used to drive
the adaptation.
This rule has exceptions. If the marked face is a split face of a split-hexahedron,
only the split-hexahedron cell is split such that the face is not a split face
any more, in order to minimise skewness, non-orthogonality and the distance
between the neighbouring nodes, as shown in Fig. 5.3.
5.3 Adaptation Procedure 111
marked face
Marked face Rened mesh
Figure 5.2: Directional splitting of cells
l
h
h
"splithexahedron"
|d
|
0.25l
h
marked face
h
h
0.5l 0.5l
|d| = h
Before renement After renement
Figure 5.3: Renement of split-hexahedron cells
112 Mesh Adaptation
If the ow under consideration is turbulent and a high-Re model with wall-
functions is used, it is necessary to ensure that the wall-functions is still valid
on the rened mesh by not allowing renement of the near-wall cells parallel
to the wall if Y
+
< 50.
2. The second step is aimed to make the estimated error reduce monotonically
with mesh renement and to minimise the number of cycles required to achieve
the desired accuracy. Fig. 5.4 shows that the distance between neighbouring
h
h
|d| = h
l
marked face
l
h
h
"splithexahedron"
|d
|
0.25l
h
Before renement After renement
Figure 5.4: Node distances at a split face
nodes increases at the boundary between the rened regions and the rest of
the mesh. The ratio r between node distances before and after the face is split
is:
r =
h
2
+
l
2
16
h
2
, (5.2)
where h and l are the cell height and the cell length, respectively, see Fig. 5.4.
This ratio may become large for high aspect ratio cells where l >> h. Eqs. (4.42)
and (4.45) show that the FREE is dependent on the square of the distance
between neighbouring nodes. Taking that into account, it is possible to ap-
proximate the estimated solution error on the rened mesh before the rened
mesh and the solution on that mesh are known and before the error estimation
on the rened mesh is performed. The approximated estimated error on the
faces of the rened mesh created from a face of the parent mesh which should
become a split face of a split-hexahedron is:
e
afterRef
r
2
e
f
. (5.3)
where e
f
is the estimated error in the solution on the parent mesh and r is
dened in Eqn. (5.2). e
afterRef
is the approximated error on the rened mesh;
5.3 Adaptation Procedure 113
which is not a true estimated error because the rened mesh is not known at
this stage. It is an approximation of the estimated error which is used to detect
regions where split-hexahedra may have a large inuence on the accuracy. If:
e
afterRef
< E, (5.4)
then this is not considered a problematic region because it is unlikely to have
the estimated error in the solution on the rened mesh above the upper limit
E. If Eqn. (5.4) is not true, it is very likely to have the estimated error above
the required upper limit once the rened mesh and the solution on that mesh
are known. To prevent this from happening, the cell which would become
a split-hexahedron is marked for renement such that it does not become a
split-hexahedron. This process is shown in Fig. 5.5 and it is repeated until
marked face
(a) Faces selected after step 1.
afterRef
e
afterRef
e
afterRef
e afterRef
e
< E
< E
< E
> E
Marked face
(b) Checking of errors on faces
which will become split faces of
split-hexahedra
Marked face
(c) Final selection of cells for re-
nement
Figure 5.5: Additional splitting of cells
Eqn. (5.4) is satised for every face which may become a split face of the
split-hexahedron. By doing this it is possible to reduce the number of cycles
required to reach the required error level because the regions where split-
114 Mesh Adaptation
hexahedra may cause problems are treated in the current cycle instead of one
cycle after another.
The equations of continuum mechanics are coupled and non-linear, so the errors
in a given variable eld can have an impact on the accuracy of the solutions of the
other equations. The errors are therefore estimated for every eld and the selection
of cells for renement is performed for all error elds except the pressure. The error
is the pressure eld is closely related to the error in the velocity eld.
Mesh Renement Procedure
So far cells have been marked for renement in the directions required by the error
estimator. Before the rened mesh is generated it is necessary to check if it will
consist of cells types which are either a hexahedron or a split-hexahedron dened
above and shown in Fig. 5.1. In order to satisfy this requirement it is sometimes
necessary to split some additional cells or add some additional directions to cells
already marked for renement.
The combinations which are not allowed and their remedies are:
If the two neighbours which share a split face of a split-hexahedron need to
be split such that the split face changes, the split-hexahedron is split into two
new cells to ensure that the rened mesh consists only of hexahedra and split-
hexahedra, Fig. 5.6.
Selected cells Rened mesh
Figure 5.6: Consistency over a split face in 2D (dotted lines
represent the selected renement)
In any of the four neighbouring cells of a cross-split face of a split-hexahedron
should be split such that the cross-split face changes, the split-hexahedron
should be split into four cells as in Fig. 5.7.
5.3 Adaptation Procedure 115
Selected cells Rened mesh
Figure 5.7: Consistency over a cross-split face in 3D (dotted lines
represent the selected renement)
It may also happen that two neighbouring cells should be split such that their
shared face is cross-split. In such case both cells are split in two directions,
Fig. 5.8.
Selected cells Rened mesh
Figure 5.8: Treatment of incompatible cell splitting directions in
3D (dotted lines represent the selected renement)
This nal step is needed to ensure that the rened mesh can be rened again
by using the same rules. Otherwise the mesh after every cycle of renement might
require additional rules to treat new combinations and new cell types. It also serves
the purpose of preserving mesh quality by not allowing abrupt changes between the
rened and coarse regions.
5.3.2 Solution Mapping Between Meshes
In order to speed up the solution process it is advisable to re-use the solution on the
previous mesh by mapping it to the new mesh to minimise the computational time
during each cycle.
For properties calculated in the centre of the computational cell i.e. velocity,
pressure, mapping is performed using the method developed by Jasak [68] which
consists of the following steps:
1. For every node N in the rened mesh nd a cell P in the old mesh which
116 Mesh Adaptation
encloses it.
2. Find the distance vector between the node N and the centre of cell P using:
x
dist
= x
N
x
P
(5.5)
3. Calculate the on the rened mesh, thus:
N
=
P
+x
dist
()
P
(5.6)
where
P
is a nodal value on the old mesh and
N
is a nodal value on the
rened mesh.
Boundary conditions and their data are known before the analysis and are used
to set values and/or gradients at the boundaries for every cycle.
5.4 Examples
The procedure presented above has been tested on the set of cases described in Sec-
tion 4.5 with an additional case involving convection and diusion of a rectangular
temperature prole [151].
The performance of the adaptive renement algorithm is examined by monitoring
the maximum and average error reduction with mesh renement. It is also compared
with the error obtained by uniform renement.
5.4.1 Planar Jet
This test case was described in Section 4.5.1. The calculation was started on a (10
x 4) initial mesh, Fig. 4.4. The maximum allowed velocity error was set to:
E = 1 % (5.7)
of the maximum velocity magnitude |U
norm
| = 2.474m/s.
A solution of the desired accuracy was achieved after six cycles of adaptive
renement. Fig. 5.9 shows the resulting mesh after six cycles of renement. The
renement is concentrated in the region of high gradients where the jet enters the
domain, Fig. 4.5. Most of renement is in the cross-stream direction which is the
direction of high velocity variation due to diusion.
5.4 Examples 117
Figure 5.9: Mesh after 6 cycles of renement for the jet case (209
cells)
Planar Jet - Velocity Error
10
1
10
2
10
3
10
-1
10
0
10
1
10
2
no of cells
m
a
x
e
r
r
o
r
[
%
]
Exact error
Estimated error
(a) Maximum error
Planar Jet - Velocity Error
10
1
10
2
10
3
10
-1
10
0
10
1
no of cells
m
e
a
n
e
r
r
o
r
[
%
]
Exact error
Estimated error
(b) Mean error
Planar Jet - Velocity Error
10
1
10
2
10
3
10
4
10
5
10
-1
10
0
10
1
10
2
no of cells
m
a
x
e
r
r
o
r
[
%
]
Adaptive refinement
Uniform refinement
(c) A comparison of the maximum ve-
locity error for uniform and adaptive re-
nement
Figure 5.10: Variation of velocity errors with adaptive renement
for the jet case (|U
norm
| = 2.474m/s)
118 Mesh Adaptation
The reduction of error is monotonic for maximum and mean error, as can be seen
in Figs. 5.10(a) and 5.10(b). A drawback is the over-estimated error which produces
an over-rened mesh. Even though the error is over-estimated, the procedure is
still capable of producing an accurate solution with signicant saving in the number
cells. Fig. 5.10(c) shows the exact maximum velocity error for uniform and adaptive
renement, where the solution on the adapted mesh (209 cells) has a comparable
maximum error with the one on the uniform mesh (10240 cells), but the adapted
mesh has 45 times less cells than the uniform one.
(a) Exact error
(b) Estimated error (given as average of face errors)
Figure 5.11: Velocity errors after 6 cycles of renement for the jet
case [m/s] (209 cells)
5.4 Examples 119
Figs. 5.11(a) and 5.11(b) show the exact and the estimated error elds after 6
cycles of renement. The error is over-estimated in the bulk of the domain.
The distribution of estimated errors on faces is shown in Table 5.1. The distri-
% of maximum estimated error on a given mesh
Mesh 0-10 10-20 20-30 30-40 40-50 50-60 60-70 70-80 80-90 90-100
Starting 73.4 8.5 6.4 6.38 2.12 0 1.06 1.06 0 1.06
Final 25.5 17.3 15.4 14.9 11.5 6.06 4.11 1.73 1.94 1.51
Table 5.1: Estimated errors on the faces of the nal mesh with 209
cells (given as percentage of the maximum estimated
error on that mesh)
Figure 5.12: Estimated errors on the faces of the nal mesh with
209 cells (given as percentage of the maximum
estimated error on that mesh)
bution of error improves with mesh renement but most faces in the nal mesh still
have low error, Fig. 5.12. These are:
Faces located in the region of low velocity near the top left corner. The low
error there suggests that the starting mesh is too ne there.
Boundary faces. This happens because most boundaries are xed value bound-
aries on which the error is zero.
Faces perpendicular to the ow. The error is low there because the velocity
eld does not exhibit high gradients in the ow direction. The number of
120 Mesh Adaptation
these faces does not reduce relative to the total number of faces because their
number increases even with directional renement. These faces can only be
eliminated by using some coarsening procedure.
5.4.2 Stokes Stagnation Flow
The starting mesh for this case was a uniform (5 x 5) cells mesh, Fig. 5.13(a). The
description of the problem and its numerical setup is given in Section 4.5.2. The
target maximum velocity error in the solution was set to:
E = 0.1 % (5.8)
of the maximum velocity magnitude |U
norm
| = 1.107m/s. Two calculations were
performed in order to determine if the second step of the procedure for selecting cells,
described in Section 5.3.1, makes the error reduce monotonically with minimised
number of adaptation cycles. The calculation using the complete methodology is
presented rst, followed by the results of the calculation for the adaptation procedure
which does not use that step.
The maximum error was reduced below the desired level after four adaptation
cycles when the complete methodology was used. Meshes after every cycle are
presented in Figs. 5.13(a), 5.13(b), 5.13(c) and 5.13(d) where the main direction of
renement is in the vertical direction in which the estimated velocity error is high
because the second derivative of the y velocity component in the y direction is not
zero. The exact error, shown in Fig. 5.14(a), is almost equidistributed in the bulk
of the domain and is small near the bottom, top and right boundaries where the
velocity is xed.
The agreement between the exact and the estimated error in the nal adapted
solution, shown in Figs. 5.14(a) and 5.14(b), is poor and this undesired behaviour is
caused by the estimator and the averaging procedure, Eqn. (4.48), used for plotting
the estimated error eld. The estimated error is smaller on the right hand side of
the domain compared to the left hand side because the weighting factors used for
faces with high error, see Eqn. (4.48), are smaller due to smaller area of those faces
compared to the sum of areas of all cell faces, as shown in Fig. 5.16.
The graphs which show the reduction of exact and estimated errors in their max-
imum and mean values are presented in Figs. 5.15(a) and 5.15(b). The maximum
5.4 Examples 121
(a) Starting mesh (25
cells)
(b) Mesh after 2 cycles
(70 cells)
(c) Mesh after 3 cycles
(140 cells)
(d) Final mesh (280
cells)
Figure 5.13: Meshes for the creeping stagnation ow
122 Mesh Adaptation
(a) Exact error (b) Estimated error (given as average of
face errors)
Figure 5.14: Velocity errors after 4 cycles of renement for the
creeping stagnation ow [m/s]
estimated error is over-estimated by a factor of 3.5 such that the required max-
imum exact error is achieved after the third cycle on a mesh with 140 cells. The
estimated mean error does not tend to the exact one which is caused by the inconsis-
tency between the FREE and the truncation error for the surface normal gradient.
Fig. 5.15(c) shows that the maximum exact error after four cycles of renement on a
mesh with 280 cells is the same as the maximum error on a uniform mesh with 1600
cells. Even though the renement is not highly localised, the adapted solution re-
quired 17.5 % of the number of cells required on a uniform mesh. This was achieved
due to directional renement which occurs in the vertical direction for which the
second derivative of y velocity component is not zero.
% of maximum estimated error on a given mesh
Mesh 0-10 10-20 20-30 30-40 40-50 50-60 60-70 70-80 80-90 90-100
Starting 66.6 0 0 0 0 0 0 0 16.7 16.7
Final 54.4 0.659 0 0 0 0 0 2.31 0 42.6
The above table shows the distribution of estimated face errors on the starting and
the nal mesh. The distribution of error has improved because the percentage of
5.4 Examples 123
Stagnation - Velocity Error
10
1
10
2
10
3
10
-3
10
-2
10
-1
10
0
10
1
no of cells
m
a
x
e
r
r
o
r
[
%
]
Exact error
Estimated error
(a) Maximum error
Stagnation - Velocity Error
10
1
10
2
10
3
10
-3
10
-2
10
-1
10
0
no of cells
m
e
a
n
e
r
r
o
r
[
%
]
Exact error
Estimated error
(b) Mean error
Stagnation - Velocity Error
10
1
10
2
10
3
10
4
10
-3
10
-2
10
-1
10
0
no of cells
m
a
x
e
r
r
o
r
[
%
]
Adaptive refinement
Uniform refinement
(c) A comparison of the maximum ve-
locity error for uniform and adaptive re-
nement
Figure 5.15: Velocity error scaling with adaptive renement for
the creeping stagnation ow (|U
norm
| = 1.107m/s)
faces with low error has reduced and the percentage of faces with highest error which
correspond to the required error has increased but is not yet optimal because there
are still many faces with very small error. Fig. 5.16 shows the distribution of the
estimated face error on the nal mesh. There are three groups of faces which can
be identied:
Horizontal faces have error almost equal to the required error.
Vertical internal faces. The variation of velocity in the x direction is linear
which results in small estimated error there. This suggests that the starting
mesh is too ne in the x direction so the coarsening procedure which could
remove those faces would have a benecial inuence on the error distribution.
Boundary faces. The error on these faces is zero because the value of velocity
is known there.
124 Mesh Adaptation
Figure 5.16: Estimated errors on the faces of the nal mesh with
280 cells (given as percentage of the maximum
estimated error on that mesh)
The second calculation has produced the same nal mesh as in the previous case,
as expected, but it required six adaptation cycles instead of four.
Figs. 5.17(a), 5.17(b), 5.17(c), 5.17(d), 5.17(e) and 5.17(f) show the meshes for
all six cycles. The reason for the increased number of cycles are split-hexahedra
which appear after the second cycle which have the highest error, Figs. 5.19(a) and
5.19(b), and impair the reduction of error, Figs. 5.18(a) and 5.18(b). Split-hexahedra
do not appear in the rst calculation, meshes shown in Figs. 5.13(a), 5.13(b), 5.13(c)
and 5.13(d), because Eqn. (5.4) is not satised on faces which would become split
faces of split-hexahedra and thus cells which would become split-hexahedra are also
rened resulting in the reduced number of adaptation cycles.
5.4 Examples 125
(a) Starting mesh (25
cells)
(b) Mesh after 2 cycles
(62 cells)
(c) Mesh after 3 cycles
(132 cells)
(d) Mesh after 4 cycles
(276 cells)
(e) Mesh after 5 cycles
(278 cells)
(f) Final mesh (280 cells)
Figure 5.17: Meshes for the creeping stagnation ow (second
calculation)
126 Mesh Adaptation
Stagnation - Velocity Error
10
1
10
2
10
3
10
-3
10
-2
10
-1
10
0
10
1
no of cells
m
a
x
e
r
r
o
r
[
%
]
Exact error
Estimated error
(a) Maximum error
Stagnation - Velocity Error
10
1
10
2
10
3
10
-3
10
-2
10
-1
10
0
no of cells
m
e
a
n
e
r
r
o
r
[
%
]
Exact error
Estimated error
(b) Mean error
Figure 5.18: Variation of velocity errors with adaptive mesh
renement for the stagnation ow (Second
calculation) (|U
norm
| = 1.107m/s)
(a) Exact error (b) Estimated error
Figure 5.19: Velocity error elds after 2 cycles of adaptive
renement for the stagnation ow (Second
calculation) [m/s]
5.4 Examples 127
5.4.3 Convection Transport of Heat with a Distributed Heat
Source
This problem was described in Section 4.5.3. The adaptive calculation has been
started from a (5 x 5) mesh. The maximum temperature found in the eld is 1
o
C
and the maximum allowed error is set to:
E = 0.1 % (5.9)
of this.
The required accuracy could not be achieved eciently by using adaptive rene-
ment so it was stopped after 6 cycles. Figs. 5.22(a) and 5.22(b) show that the error
stops reducing eectively after the third cycle of adaptive renement when the rst
split-hexahedra appear in the mesh, see Fig. 5.20. This happens because the volume
Figure 5.20: Mesh after 3 cycles of renement for the convection
transport case
of split-hexahedron cells is four times larger than the volume of their neighbours thus
having a large impact on the source term discretisation, Eqn. (3.58). These dier-
ences in cell sizes cause unboundedness of the volume integral of the source term,
shown in Fig. 5.21(c), which results in the increased error at the locations where
this inuence is important, Fig. 5.21(a). The agreement between the exact and the
estimated temperature error, shown in Figs. 5.21(a) and 5.21(b) respectively, is con-
sidered satisfactory. The estimation of the exact error is very accurate during the
rst two cycles. The inaccuracy of the error estimation afterwards is attributed to
the unboundedness of the temperature gradient eld, shown in Fig. 5.21(d), which
is used for error estimation.
128 Mesh Adaptation
(a) Exact temperature error (
o
C) (b) Estimated temperature error (given
as average of face errors (
o
C)
(c) Volume integral of the source term
(
o
Cm
3
s
)
(d) Temperature gradient (
o
C/m)
Figure 5.21: Fields after 3 cycles of renement
5.4 Examples 129
Convective Transport - Temperature Error
10
1
10
2
10
3
10
4
10
5
10
-1
10
0
10
1
10
2
no of cells
m
a
x
e
r
r
o
r
[
%
]
Exact error
Estimated error
(a) Maximum error
Convective Transport - Temperature Error
10
1
10
2
10
3
10
4
10
5
10
-1
10
0
10
1
no of cells
m
e
a
n
e
r
r
o
r
[
%
]
Exact error
Estimated error
(b) Mean error
Figure 5.22: Variation of temperature errors with adaptive
renement for the convection transport case
(T
norm
= 1
o
C)
5.4.4 Convection and diusion of a Temperature Prole with-
out a Heat Source
This test case is a solution of the general transport equation for temperature without
the heat source. Fig. 5.23 shows the temperature eld which has high gradients near
the inlet which diminish by the inuence of diusion. The purpose of this case is to
test the error estimator and the renement procedure near strong features.
Figure 5.23: Temperature eld for the internal layer case [
o
C]
130 Mesh Adaptation
The analytical solution for this case is [151]:
T(x, y) = A
k=1
(
k
1k
(x) +
k
2k
(x))
k
(y), (5.10)
where
1k
(x),
2k
(x),
k
(y) and b
k
are:
1k
(x) = e
xPe
2
sinh(b
k
(1 x))
sinh(b
k
)
, (5.11)
2k
(x) = e
(x1)Pe
2
sinh(b
k
x)
sinh(b
k
)
, (5.12)
k
(y) = sin(ky), (5.13)
b
k
=
_
Pe
2
_
2
+ (k)
2
, (5.14)
and
k
and
k
are constants:
k
=
2
k
(cos(0.45k) cos(0.55k)), (5.15)
k
=
k
b
k
e
Pe
2
sinhb
k
Pe
2
+b
k
cosh(b
k
)
sinh(b
k
)
, (5.16)
where x and y are dimensionless variables dened as:
x =
X
L
y =
Y
L
L = 1m being a reference length. Peclet number Pe =
|U|L
2
, see
Fig. 6.9(b). The total force is calculated by integrating the pressure over all bound-
aries and the shear force over the walls. The vorticity = curl U is given in a
normalised form:
C
=
||D
U
avg
.
The values of C
p
, C
F
and C