Professional Documents
Culture Documents
Considering the total time that a user of a CFD code spends on his/her simulation
and applying “best practice”, which statement is correct?
A) Grid generation is the most time-consuming part
B) Turbulence modeling is the most time-consuming part
C) Postprocessing is the most time-consuming part
LEARNING OUTCOMES FOR MODULE 4
Ferziger, J.H., Peric, M., 2002. Computational methods for fluid dynamics. Third Edition.
Springer.
→0
Finite difference method (FDM)
First derivative of u(x) in point x is defined as:
→0
Truncation error
The error in the approximation tends to zero like the first power of x and is therefore
called “first order” in x.
Finite difference method (FDM)
Application of this concept in 1D can yield different expressions:
First order forward diff.
(first order accuracy)
First order backward diff.
(first order accuracy)
Central difference
(second order accuracy)
Excellent overview of the finite difference method (incl. finite volume method) can be
found in:
Hirsch, C. 2007. Numerical computation of internal & external flows. The fundamentals of
computational fluid dynamics. Second Edition. Elsevier.
Finite difference method (FDM)
Difference formulae generally can loose at least one order of accuracy (and sometimes
even two) on general non-uniform grids. Guidelines for non-uniform grids (Hirsch 2007):
• Smoothly varying grids with size variation between consecutive cells that is of
second order in the grid size.
2.5
monotonic
2.0
convergence
1.5
non-monotonic
1.0 convergence
0.5
1 10 100 1000 10000 100000 1000000
number of control volumes
Grid convergence, discretization error and Richardson extrapolation
(Ferziger & Peric 1996)
Derivation will be made from the viewpoint of finite-difference analysis, but it can just as
well be applied for control-volume analysis.
Let: be the exact solution of the differential or integral equations represented by
h be the exact solution of the discretized equations (Lh) for a grid with reference
spacing h
Φ Φ 0
0
For sufficiently fine grids, the truncation error (and hence also the discretization error) at
any point in the grid is proportional to the leading term in the Taylor series:
where depends on the derivatives of the variable at the given point (gradients in
the flow) but is independent of h
p is the order of the discretization scheme
H represents the higher order terms.
Grid convergence, discretization error and Richardson extrapolation
where depends on the derivatives of the variable at the given point (gradients in
the flow) but is independent of h
p is the order of the discretization scheme
H represents the higher order terms.
Discretization error is small when grid spacing is small
Discretization error is small when flow gradients are small
Higher grid resolution in areas of large flow gradients
Structured grid
Grid convergence, discretization error and Richardson extrapolation
Consider three different grids with grid spacing: h, 2h, 4h, and solutions h , 2h and 4h in
a given point or cell:
The exponent p (order of the scheme) and the discretization error on grid h, h, can be
estimated by:
2 2 1
Grid convergence, discretization error and Richardson extrapolation
2 2 1
Estimate of exact solution is then given by “Richardson extrapolation”:
Φ 3.5
grid-independent
3.0 solution
variable value
2.5
monotonic
2.0
convergence
1.5
non-monotonic
1.0 convergence
0.5
1 10 100 1000 10000 100000 1000000
number of control volumes
Grid convergence, discretization error and Richardson extrapolation
Three important comments:
• If the refinement ratio) is different from 2, the factor 2 in the equations must be replaced
by that ratio.
2 2 1
• The exponent p as calculated is the correct order of the scheme. This means that it is
the rate at which the error is reduced when the grid is refined. It can differ from the
formal or theoretical order of the scheme (as defined by the leading term in the
truncation error).
• p can only be calculated when grid convergence is monotonic. Therefore, the grids
must be sufficiently fine.
Uniform reporting of grid-convergence studies (Roache, 1997)
Uniform reporting of grid-convergence studies (Roache, 1997)
Estimates by formulae on previous slides are approximate and do not constitute bounds
on the discretization error Grid Convergence Indicator (GCI) to quantify the
discretization error in a CFD simulation:
Fs = safety factor
3 for studies with two grids
1.25 for “scrupulously performed grid convergence studies with three or more
grid solutions to determine the observed order of convergence p”.
Uniform reporting of grid-convergence studies (Roache, 1997)
Example: natural cross-ventilation of an isolated building model
Building & Environment Best Paper Award 2012
Uniform reporting of grid-convergence studies (Roache, 1997)
Example: natural cross-ventilation of an isolated building model
(a) Coarse grid A with 144,696 cells; (b) Middle grid B with 314,080 cells; (c) Fine grid C with 575,247 cells.
Uniform reporting of grid-convergence studies (Roache, 1997)
Example: natural cross-ventilation of an isolated building model