Automatic Resolution Control for the Finite Volume Method. Part 1: A-posteriori Error Estimates H. Jasak
Computational Dynamics Ltd. Hythe House, 200 Shepherds Bush Road London W6 7NY, England E-mail:
[email protected]
A.D. Gosman
Department of Mechanical Engineering Imperial College of Science, Technology and Medicine Exhibition Road London SW7 2BX, England
7th February 2000 Abstract
Automatic Resolution Control for the Finite Volume Method (FVM) shows signs of rapid development in recent years. The objective of the procedure is to obtain a numerical solution of prescribed accuracy with minimum eort in terms of time and computational resources. It consists of two parts: an a-posteriori error estimate and an appropriate modi cation of the spatial and temporal discretisation. In this paper, two new a-posteriori error estimates concentrating on the absolute error levels are presented. The rst, the Taylor Series Error Estimate, is based on Taylor series truncation error analysis and, unlike Richardson extrapolation, is capable of estimating the discretisation error from a single solution. In an attempt to overcome some de ciencies of the rst method, the Moment Error Estimate is derived using the balance condition in the transport equation for the higher moments of the variable. It slightly over-estimates the error, making it particularly useful in conjunction with the rst error estimate, as the two regularly bound the exact error. The error estimates are validated against the exact error on two test cases with analytical solutions.
Keywords:
Error estimation, Finite Volume, Taylor series analysis, higher moment balance
Corresponding
author, Tel: (+44) (0)207 471 6200, Fax: (+44) (0)207 471 6201
2
Nomenclature 1; 2; 3
{ principal vectors of inertia aN { matrix coecient corresponding to the neighbour N aP { central coecient e { solution error F { face mass ux fx { interpolation factor h { mesh size k { non-orthogonal part of the face area vector K0 { Bessel function L { linear part of the source term M { second geometric moment tensor m { second moment of N { centre of the neighbouring control volume P { centre of the control volume RP { right-hand-side of the algebraic equation S { source term S { point source intensity S { constant part of the source term S { face area vector T { time-scale u { velocity ut { eective transport velocity V { volume x { position vector
{ diusivity { orthogonal part of the face area vector { density { general tensorial property
1 Introduction
3
1 Introduction Numerical solutions of uid ow and heat transfer problems generally include three groups of errors [1]: Modelling errors, de ned as the dierence between the actual ow and the exact solution of the mathematical model which describes the behaviour of the system in terms of coupled partial dierential equations. For laminar incompressible ows, the mathematical model (Navier-Stokes equations) can be considered exact for engineering purposes, However, in turbulent, two-phase or reacting ows, the additional models do not always describe the underlying physical processes accurately and thus introduce potentially high modelling errors. The second group of errors originates from the method used to solve the mathematical model. Discretisation errors describe the dierence between the exact solution of the system of algebraic equations obtained by discretising the governing equations on a given grid and the (usually unknown) exact solution of the mathematical model. Discretisation errors depend on the accuracy of the equation discretisation method, as well as the discretisation of the solution domain. The system of algebraic equations constructed through discretisation is usually solved using an iterative solver. The dierence between the approximate and the exact solution of the system is described by the convergence errors. Errors caused by equation linearisation or incomplete convergence over the set of coupled equations are also included here. The convergence errors can typically be reduced to an arbitrary level. Early eorts in error detection for the Finite Volume Method (FVM) have been directed towards the problems with discontinuous solutions, like multiple shock structures in supersonic ows [2{4]. Here, the solution has some distinct features that can be recognised by large gradients in ow variables. Combinations of gradients of ow variables are called error indicators and do not provide information about the absolute error level. A relatively wide selection of error indicators and the associated re nement procedures has been reported to date [5{12]. In problems with smooth solutions, the error cannot be controlled by an error indicator as the presence of high gradients can be successfully recti ed with sucient mesh re nement. Additionally, re nement needs to be stopped when the desired accuracy is reached. Examples of error estimates that concentrate on the actual discretisation error rather than the regions of high gradients can be found in eg. [13{24]. The ultimate purpose of an a-posteriori error estimate is to control an errordriven adaptive re nement algorithm in order to automatically produce a solution of pre-speci ed numerical accuracy. A good error estimate therefore has the following properties: i) the error is given in terms of the absolute error value; ii) it provides reliable information about the distribution of the error; iii) works well on coarse meshes; iv) correct scaling with the order of discretisation and mesh size; v) it is based on the local solution and mesh information and is cheap to compute; vi) it is applicable to all degenerate forms of the transport equation
4
2 Finite Volume Discretisation
(elliptic, convection- or source-dominated problems); vii) it is asymptotically exact (i.e. it tends to the \exact" error faster than the solution tends to the exact solution); viii) it detects both the errors resulting from insucient mesh resolution and the discretisation errors from other sources (eg. mesh quality, numerical diusion); and ix) modestly over-estimates the actual error. Some of these properties are very dicult to achieve and some are even contradictive; the two error estimates presented in this paper should be seen as a compromise between the requirements suggested above. In this paper, we shall address the issue of a-posteriori error estimation for the FVM. In order to understand the basics of the proposed error estimates, a short outline of the second-order accurate FV discretisation on arbitrarily unstructured meshes will be given [25]. Using this as a basis, two novel a-posteriori error estimates will be derived, namely the Taylor Series Error Estimate, based on the Taylor series truncation error analysis (Section 3.2) and the Moment Error Estimate, based on the higher moment balance (Section 4). The error estimates will be validated on two test cases with analytical solutions in Section 5, thus allowing us to compare the estimated and exact error levels. In order to somewhat simplify the derivation of the error estimates and provide a complete picture of their accuracy, the rest of this paper will concentrate only on the spatial component of the error. The extension of both error estimates to transient ows is relatively straightforward, but, as this should be accompanied by several illustrative examples, will be described in a separate paper.
2 Finite Volume Discretisation The discretisation error depends on the applied discretisation method and it is therefore necessary to examine the basis of the discretisation to be able to correctly estimate the error. A short outline of the FV discretisation on arbitrarily unstructured meshes [25] will therefore be given before we examine the options on error estimation. N
z
S
y
x &&&&&&&&&&&&&&&&&&&&&& &&&&&&&&&&&&&&&&&&&&&& &&&&&&&&&&&&&&&&&&&&&& &&&&&&&&&&&&&&&&&&&&&& &&&&&&&&&&&&&&&&&&&&&& &&&&&&&&&&&&&&&&&&&&&& &&&&&&&&&&&&&&&&&&&&&& &&&&&&&&&&&&&&&&&&&&&& f &&&&&&&&&&&&&&&&&&&&&& &&&&&&&&&&&&&&&&&&&&&& &&&&&&&&&&&&&&&&&&&&&& &&&&&&&&&&&&&&&&&&&&&& P &&&&&&&&&&&&&&&&&&&&&& &&&&&&&&&&&&&&&&&&&&&& &&&&&&&&&&&&&&&&&&&&&& &&&&&&&&&&&&&&&&&&&&&& &&&&&&&&&&&&&&&&&&&&&& &&&&&&&&&&&&&&&&&&&&&&
Figure 1:
Control volume.
5
2 Finite Volume Discretisation
Consider the standard form of a steady-state transport equation for a general tensorial property :
r:(u) ? r:( r) = S ();
(1)
where, for convenience, the source term is linearised in the following way:
S () = S ? L :
(2)
In shortest terms, the FV discretisation uses the integral form of the above equation:
Z
VP
r:(u) dV ?
Z
VP
r:( r) dV =
Z
VP
S () dV
(3)
over the Control Volume (CV) around the point P , located in its centre, Fig. 1. In order to obtain a second-order accurate approximation of the integrals in Eqn. (3), a linear variation of around P is assumed:
(x; t) = P + (x ? xP ):(r)P ;
(4)
P = (xP ); (r)P = r(xP ):
(5)
where This is the major source of numerical errors. If a better solution is needed, CVs should be subdivided such that the assumption of the linear variation becomes acceptable. When Eqn. (4) is used to evaluate the integrals in Eqn. (3), the following form of the discretised transport equation is obtained:
X f
Ff ?
X f
( )f S:(r)f = S VP ? L VP P ;
(6)
where f represents the cell face (and face interpolate) and S is the outwardpointing face area vector between cells P and N . The face values of and r are calculated as follows:
f = fxP + (1 ? fx)N ;
(7)
S:(r)f = jj N j?dj P + k:(r)f ;
(8)
where P and N are the points around the face f , fx is the interpolation factor, and and k represent the non-orthogonal decomposition [25] of the face area vector S such that
S = + k:
(9)
F in Eqn. (6) is the face mass ux: F = f uf :S;
(10)
6
3 Taylor Series Truncation Error Analysis
which satis es the mass continuity constraint (if any). The cell centred gradients of are calculated using the generalised Gauss' theorem:
Z
V
r dV =
I
@V
dS ;
or, in its second-order accurate discretised form: X (r)P = V1 S f : P f
(11) (12)
Combining Eqs. (6), (7), (8), (10) and (12), an algebraic equation is obtained for each CV: X aP P + aN N = RP ; (13) N
thus creating a system of algebraic equations: [A] [] = [R]; (14) where [A] is a sparse matrix, [] is the vector of -s for all CVs and R is the right-hand side vector. For more details on the discretisation practice the user is referred to [25].
3 Taylor Series Truncation Error Analysis The rst group of error estimates is based on the analysis of the numerical solution in terms of the Taylor series expansion, where the discretisation process is considered as a truncation of the in nite series. The truncated form of the Taylor expansion at the point P is used to describe the variation of the solution over the CV surrounding it (see Eqn. (4)). The complete solution is created as a union of these locally de ned \shape functions". Consider the Taylor series expansion in space of a function around P : (x) = P + (x ? xP ):(r)P + 21 (x ? xP )2 : (rr)P + 3!1 (x ? xP )3 :: (rrr)P (15) ::: (rr + : : : + n1! (x ? xP )n |{z} | {z::r} )P + : : : n n
The expression (x ? xP )n in Eqn. (15) and consequent equations in this study represents the nth tensorial product of the vector (x ? xP ) with itself, producing an nth rank tensor. The operator \|{z} ::: " is the inner product of two n
nth rank tensors, creating a scalar. A pth order accurate discretisation method describes the local variation of with the rst p terms of the Taylor series. The discretisation error can therefore also be expressed as an (in nite) series in higher derivatives of : e(x) = (x) ? (x) =
1 1 X
(x ? xP )n |{z} :: (rr | {z::r} )P ; n ! n=p n n
(16)
7
3.1 Richardson Extrapolation
where (x) is the (usually unknown) exact solution. The error estimate is the average e in the CV:
Z 2 1 3 X 1 1 4 ::r} )P 5 dV (x ? xP )n |{z} :: (rr et () = V | {z n ! P VP n=p n n 1 0 1 Z X 1 1 @ (x ? xP )n |{z} (17) ::r} )P A dV : :: (rr V {z | n ! P n=p VP n n If the exact solution (x) is smooth and the CV is small, contributions from
higher terms of the expansion in Eqn. (17) will decrease rapidly with increasing n. Thus, the error estimate uses only the rst term of the expansion, which after some re-arrangements reads:
Z : et () = V1 p1! (x ? xP )p dV |{z} :: r ::: (rr ) P | {z } P VP p
p
(18)
If the mesh is too coarse (i.e. the solution cannot be considered smooth on the mesh resolution scale), the contribution of higher-order terms can be signi cant and Eqn. (18) under-estimates the actual error. For second order accurate FV discretisation, the prescribed spatial variation of over the CV is linear, Eqn. (4), and the error estimate is:
Z
et () = V1 21 (x ? xP )2 dV : (rr)P = 2V1 jM : (rr)P j ; (19) P P VP where M in Eqn. (19) is the second geometric moment tensor for the CV: M=
Z
VP
(x ? xP )2 dV:
(20)
The error from Eqn. (19) can be estimated in several ways. The rst is the well-established Richardson extrapolation [15,17,21,23,24] which uses numerical solutions from two meshes with dierent spacing. The new error estimate, presented in Section 3.2 estimates the error from a single solution by directly evaluating Eqn. (19).
3.1 Richardson Extrapolation
The basic idea of Richardson extrapolation is to obtain an approximation of the leading term in the truncation error from suitably weighted solutions on two meshes with dierent cell size [26,27]. The spatial variation of the exact solution on two meshes with spacing h1 and h2 can be symbolically written as [26]: (x) = (x; h1 ) + hp1 C (x) + O(x; hq1 ); (x) = (x; h2 ) + hp2 C (x) + O(x; hq2 );
(21) (22)
8
3.2 Taylor Series Error Estimate
where (x; hi ) is the approximate solution on the mesh with spacing hi , hpi C (x) is the leading term of the truncation error, h = h(x) is the local linear mesh size:
p
h = 3 VP ; (23) p is the order of accuracy of the method, and O(x; hqi ) is the rest of the truncation error. From Eqs. (21) and (22), C (x) can be approximated as: ? (x; h1 ) : (24) C (x) = (x; hh2p) ? hp2 1 The estimate of C (x), Eqn. (24), can be used to improve the ne mesh solution (x; h2 ) using Eqn. (22). The improved (qth order accurate) solution is then used to estimate the error in (x; h2 ) (i.e. on the ne mesh!): e () = j(x; h ) + hp C (x) ? (x; h )j = j(x; h2 ) ? (x; h1 )j ; (25) t
2
( hh12 )p ? 1
2
2
or for second-order accurate discretisation: et () = j(x; hh21) ?2 (x; h1 )j : ( h2 ) ? 1
(26)
It is instructive to analyse the interaction between Richardson extrapolation and the general form of the Taylor series error estimate, Eqn. (19), starting with the simple form: a hexahedral CV aligned with the global coordinate system, Fig. 2. The calculation of M in Eqn. (19) is now straightforward:
M = VP
12
2 x2 4 0 0
3
0 0 y2 0 5 : 0 z 2
The error estimate, Eqn. (19), simpli es to:
(27)
1 x2 @ 2 + y2 @ 2 + z 2 @ 2 : (28) et () = 24 @x2 P @y2 P @z 2 P As (rr)P is independent of the mesh, jM : (rr)P j scales quadratically with h. Richardson extrapolation uses this property to estimate the error, assuming that the magnitude of each term in M individually scales with h2 . This
is valid only for geometrically similar CVs; if this is not the case, Richardson extrapolation looses accuracy. Richardson extrapolation requires two solutions on meshes with dierent spacing, which is not always feasible in industrial applications. It also underestimates the solution error, particularly on coarse meshes; once the solution is smooth on both meshes, its accuracy rapidly improves.
3.2 Taylor Series Error Estimate
It is possible to obtain an estimate of the error from a single-mesh solution, a novel approach to the Taylor series error estimation. The terms in Eqn. (19)
9
3.2 Taylor Series Error Estimate
2 1 S0
∆y
3
S1
∆z ∆x
y z x
Figure 2:
Hexahedral CV aligned with the coordinate system.
are approximated from the available solution and the mesh geometry, giving the new Taylor Series Error Estimate (TSEE). The task of creating a single-mesh truncation error estimate can be divided into two parts: estimating the second gradient of in P and evaluating the M tensor for the CV. The (rr)P is calculated from the available solution using Gauss' theorem twice. This, in fact, only provides the average second gradient, whereas Eqn. (19) requires the value in the centroid of the CV. As a consequence, the estimate will be accurate only if the solution is smooth relative to the mesh size. The calculation of M for CVs in an arbitrarily unstructured mesh follows the work of Helf and Kuster [28]. Using the Gauss' theorem, the volume integral in Eqn. (20) is reduced to a set of geometric moment integrals over the faces and nally to integrals over the edges. The terms of M are assembled in the local coordinate system: Z Z M = (xx) dV = 31 r:[x (xx)] dV VZP VP XZ 1 =3 (dS:x) (xx) = 31 (dS:x) (xx): (29) @VP f Sf Further, assuming that the faces are at, dS:x reduces to a constant for every point on the face. It follows:
Z
Sf
(dS:x) (xx) = S^:xf
Z
Sf
(xx) dA:
(30)
Repeating the procedure once again, the second geometric moments for the face reduces to a sum of integrals over the face edges, which are easily calculated. Having in mind the limited accuracy of (rr)P , it would be wise to produce a simpler estimate of M, knowing that this simpli cation does not signi cantly degrade the overall accuracy of the error estimate. If the orientation of the coordinate system were chosen to coincide with the principal geometric axes of inertia for the CV, M would be reduced to diagonal terms only; M : (rr)P calculated in that coordinate system, reduces to only three terms, similar to Eqn. (28). Vectors 1, 2 and 3 in Fig. 2 represent the principal vectors of inertia for the CV. For a hexahedral cell of arbitrary orientation, they can be
10
4 Moment Error Estimate
approximated from the face area vectors of the opposite face pairs. Thus, for example, 1 is approximated with (Fig. 2):
1 = jSS00 j + jSS11j jS02j +VPjS1 j
(31)
and the error estimate, Eqn. (19), simpli es to: (32) et () = 241V j1:(1:(rr)P ) + 2:(2:(rr)P ) + 3:(3:(rr)P )j: P The o-diagonal terms in M are neglected but at least the cell aspect ratio is taken into account. This principle can be extended to general polyhedral shapes by introducing an \orientation vector", de ned as the ratio of cell volume and the average cell surface in the given direction. We can, of course go even further: if it is assumed that the CV is not distorted in any way, the product scales with the square of the characteristic linear size of the CV, Eqn. (23) and the magnitude of (rr)P and the error is: 1 h2 p(rr) : (rr) ; (33) et () = 24 P P This further reduces the accuracy of the estimate as the information on the shape of the CV is lost. Having in mind the situations of mesh alignment to ow gradients and high cell aspect ratios regularly used in industrial CFD, Eqn. (32) will be used as a good balance of accuracy and computational cost.
4 Moment Error Estimate The second novel error estimate will be derived from using an interesting property of the exact solution: if the original transport equation is satis ed in its dierential form, all transport equations for higher moments of are also satis ed. A similar idea has been suggested in [16], but never fully developed. At this stage, we shall limit ourselves to the second moment of : m = 21 2 : (34) The transport equation for m , derived from Eqs. (3) and (34), reads:
r:(um ) ? r:( rm ) = S () ? (r:r):
(35)
As stated before, the FV discretisation produces a solution which satis es Eqn. (3) over each CV in the integral form. This solution is, however, of limited accuracy: there is no guarantee that Eqn. (35) will also be satis ed. The imbalance in the integral form of Eqn. (35) depends on the local discretisation error:
rP =
Z r:(um ) ? r:( rm ) ? S () + (r:r) dV: VP
(36)
The cell centre values of m are calculated from the known values of using Eqn. (34). The convection, diusion and source terms are assembled following
4.1 Normalisation of the Moment Error Estimate
11
the discretisation practice outlined in Section 2. On boundaries, m is calculated consistently with the prescribed boundary conditions. The same principle is used on vector (tensor) transport equations, where the second moment is de ned as the inner product of the tensor with itself and the cell imbalance is constructed as before. Unlike the TSEE, the MEE always produces a scalar error. For vectors and tensors, the estimate corresponds to the error in the magnitude (norm) of the variable.
4.1 Normalisation of the Moment Error Estimate
The dimensions of rP in Eqn. (36) are []2 [L]3 =[T ], i.e. it does not correspond to the absolute error in . In order to obtain the absolute error magnitude, a suitable normalisation practice is required. Eqn. (36) shows that rP represents the volume integrated imbalance in the transport equation for m . The normalisation is based on the local transport conditions: ut = juj + h ; (37)
where h is calculated using Eqn. (23). The characteristic time-scale T is then:
2 T = uh = juj hh + : t
(38)
The combination of Eqs. (38) and (36) gives the nal form of the Moment Error Estimate (MEE), with the same dimensions as :
s
em() = 2 jrVP j T : P
(39)
The MEE is cheap to compute and its behaviour on coarse meshes, as will be shown later, is signi cantly better than that of the TSEE. The main disadvantage of this method is its relative inaccuracy on very ne meshes. This is caused by the fact that the balance equation for m uses not only the value but also the gradient of , which, for zero estimated error, should also be exact.
5 Numerical Examples In order to examine the accuracy of the two novel error estimates, two numerical examples with analytical solutions will be presented. Although the selected cases do not represent \real" ow situations, they provide an useful insight into the accuracy and scaling properties of the new error estimates.
5.1 Point Source in Cross-Flow
Consider the case of convection-diusion of a passive scalar from a xed strength point source in a uniform velocity eld. The 2-D analytical solution can be found in [29]: px2 2 ! U x U + y e( 21 ) : S 1 (40) (x; y) = 2 K0 2
12
5.1 Point Source in Cross-Flow
Here, x and y are the spatial coordinates; the origin of the coordinate system is located at the source, with the x coordinate pointing in the direction of the velocity vector; S = 16:67 []=s is the strength of the source, = 0:05 m2=s is the eective diusion, U1 = 1 m=s is the x-component of the velocity and K0 is the modi ed Bessel function of the second kind and zero order. In order to avoid the singularity, the point source is located outside of the computational domain. The problem will be solved on a series of uniformly re ned meshes. Two situations of mesh-to- ow alignment will be presented: a uniform orthogonal mesh aligned with the ow and a non-uniform non-aligned non-orthogonal mesh.
5.1.1 Mesh Aligned with the Flow
The test setup for this situation is given in Fig. 3. The size or the domain is 4 1 m, 0:05 m downstream of the source. The analytical solution is prescribed on xed value boundaries. Meshes used in this comparison range from 50 to 51520 CVs. U
Point source
Computational domain
Fixed value boundaries
Figure 3:
Zero gradient
Point source in cross- ow: mesh aligned with the ow.
Fig. 4 shows the exact solution on the 80 41 CVs. The distribution of the exact and estimated errors is given in Fig. 5. Two parts of the exact error can be recognised. The region of the highest exact error corresponds to the highest estimated error. This error has been accurately detected by both error estimates. Downstream, the exact error is still large, but the estimates do not pick up its source, as the error is transported from upstream: this non-local error cannot be detected by the error estimate. As the mechanism of error transport is not fully understood, we shall assume that the error source only creates a local error. The results in the present study show that this simpli cation does not seriously degrade the accuracy of error estimation. Fig. 6 shows the reduction of the mean and maximum error with the number of CVs. It is expected that the error reduces with the square of the mesh size, following the second order accuracy of the method. In two spatial dimensions, the number of computational points quadruples if the mesh spacing is halved in each direction. The slope of the curve in Fig. 6(a) should therefore be ?1. Fig. 6 also illustrates the usefulness of the proposed pair of error estimates. On coarse meshes, the MEE shows superior accuracy, whereas the TSEE under-predicts the error level. This is a consequence of the inaccuracy in the calculation of the second gradient tensor. The average of the two estimates shows remarkable accuracy on all meshes.
13
5.1 Point Source in Cross-Flow
0.39
15.72
31.05
Figure 4:
0.000000
0.069005
46.39
61.72
77.05
Aligned mesh: exact solution.
0.138010
0.207015
0.276020
0.345025
(a) Exact error magnitude.
0.000000
0.018090
0.036180
0.054271
0.072361
0.090451
(b) Taylor Series Error estimate.
0.000000
0.230963
0.461926
0.692889
0.923852
1.154815
(c) Moment Error estimate. Figure 5:
Aligned mesh: exact and estimated errors.
14
5.1 Point Source in Cross-Flow
1
2
10
10
0 1
10
-1
max error
mean error
10 10
Exact Taylor Moment Avg estimate
-2
10
-3
10
Exact Taylor Moment Avg estimate
-1
10
-4
10
0
10
-2
0
10
1
10
2
3
4
10 10 no of cells
10
5
10
10
0
10
(a) Mean error.
1
10
2
3
10 10 no of cells
4
10
5
10
(b) Maximum error.
Figure 6:
Aligned mesh: scaling of the error.
5.1.2 Non-Orthogonal Non-Aligned Mesh U
Figure 7:
Point source
Point source in cross- ow: non-orthogonal non-aligned mesh.
Let us now consider the eects of mesh-to- ow (mis)alignment and non-orthogonality on the accuracy of the solution. In the rst instance, second-order Central Differencing (CD) will be used for the convection term. The test setup for this situation is given in Fig. 7. The dimensions of the domain are 3 1:41 m, with the same diusion coecient and relative position to the source as in the previous case. The boundary conditions corresponding to the analytical solution are prescribed on all boundaries. The exact solution on the 40 40 CVs mesh is shown in Fig. 8, with the exact and estimated error distribution given in Fig. 9. Both error estimates pick up the error source well. The scaling of the exact and estimated error with the mesh size is shown in Fig. 10. In the case of mean error, both estimates show comparable accuracy. The TSEE slightly under-estimates the error, whereas the MEE again looses accuracy on very ne meshes. Discretisation errors introduced by mesh distortion did not noticeably change the rate of error reduction with mesh re nement. In order to introduce more numerical diusion, the Upwind Dierencing (UD) is used for the convection term. The scaling of the mean and maximum error is shown is Fig. 11. The slope of the curve is now closer to ? 21 , compared with ?1 in Fig. 10. It can also be seen that both mean and maximum error are much higher than with the CD, illustrating the importance of second-order
15
5.1 Point Source in Cross-Flow
2.29
16.47
Figure 8:
0.000000
0.129918
30.64
44.82
58.99
73.17
Non-aligned mesh: exact solution.
0.259836
0.389754
0.519671
0.649589
(a) Exact error magnitude.
0.000000
0.041652
0.083303
0.124955
0.166607
0.208259
(b) Taylor Series Error estimate.
0.000000
0.148584
0.297167
0.445751
0.594334
0.742918
(c) Moment Error estimate. Figure 9:
Non-aligned mesh: exact and estimated errors.
16
5.1 Point Source in Cross-Flow
0
1
10
10
-1 0
10 max error
mean error
10
-2
10
Exact Taylor Moment Avg estimate
-3
10
-4
10
Exact Taylor Moment Avg estimate
-1
10
-2
1
10
2
10
3
10 no of cells
4
10
10
5
1
10
10
(a) Mean error. Figure 10:
2
10
3
10 no of cells
4
10
5
10
(b) Maximum error. Non-aligned mesh: scaling of the error.
0
1
10
10
-1 0
10 max error
mean error
10
-2
10
Exact Taylor Moment Avg estimate
-3
10
-4
10
Exact Taylor Moment Avg estimate
-1
10
-2
1
10
2
10
3
10 no of cells
4
10
(a) Mean error with UD. Figure 11:
5
10
10
1
10
2
10
3
10 no of cells
4
10
(b) Maximum error with UD.
Non-aligned mesh: scaling of the error with UD.
5
10
17
5.2 Point Jet
convection discretisation in this test case. Error estimates, however, do not follow the scaling behaviour of the error. Numerical diusion smears the gradients, thus producing the picture of a smoothly varying eld, which complicates the estimation of the error: in eect, the quality of the solution is so bad that accurate error estimation is not possible. It should be noted that the MEE shows slightly slower error reduction with re nement. This is, however, a very severe test for error estimates, with a combination of poor mesh quality, high discretisation errors and steep gradients in the solution.
5.2 Point Jet
In order to test the behaviour of error estimates on a uid ow situation, a point jet in 2-D will be considered. The test setup consists of an in nitely fast jet from an in nitely thin point ori ce entering a large domain. The amount of momentum introduced by the jet is nite and equal to Mj . The analytical solution for this problem can be found in [30]. For the coordinate system located at the mouth of the ori ce with i pointing in the direction of the jet, the exact velocity vector at (x; y) is:
u = ui + vj;
where
(41)
A x? 13 sech2 x? 32 y ; u= B ?B2 y 2 ? 4 1 2 2 ? v = ? 3 A x 3 tanh x 3 B + 3 x 3 y sech2 x? 23 By ;
9
1 3
A = 2 Mj ; 48 2 13 B= M j
(42) (43) (44) (45)
and Mj = U02 D is the momentum carried by the jet. In order to avoid problems with the singularity at the ori ce, the computational domain is located downstream from the jet. The domain is 4 1 m in size, 0:5 m downstream of the ori ce, aligned with the main direction of the
ow, Fig. 12. Fig. 13 shows the exact solution on the 80 41 CVs. To simplify the discussion, only the magnitude of the estimated and exact error will be presented. The magnitude of the exact error is given in Fig. 14(a). The region of highest error is associated with the high gradients in the vicinity of the source. In the rest of the domain, the errors are relatively low. The new error estimates, Fig. 14, pinpoint the regions of high error well. A slight anomaly in the error distribution for the MEE in Fig. 14(c) has been traced to the lower order of accuracy associated with xed value boundaries, where the face compensation of fourth-order terms of the MEE is lost. The terms in question are large on the inlet side of the domain because of high gradients in u.
18
6 Summary Point jet U = 0
Computational domain
U = infinity
Fixed value boundaries
Figure 12:
Outlet boundary
Point jet: test setup.
Let us now consider the scaling of the mean and maximum error, shown in Fig. 15. Several details should be noted: on very ne meshes, the exact solution does not follow the expected error scaling. Here, the error is extremely low in large regions of the mesh and further re nement has no eect. At the same time, the error is still large in the vicinity of the jet and the bulk of the error comes from this region. The scaling of the mean error is in uenced by this feature. Although it shows remarkable accuracy on coarse meshes, the MEE overestimates both the mean and maximum error. Its error reduction rate is lower than for other methods because of the accuracy problems at the inlet boundary. The TSEE, on the other hand, consistently under-estimates the error. In spite of that, the pair of estimates do a remarkably good job, both in bounding the exact error and in terms of absolute accuracy of the average estimated error.
6 Summary Automatic Resolution Control relies on an a-posteriori error estimate for the information about the distribution of the discretisation error. Its eectiveness therefore depends on the quality of the selected estimate. This paper deals with the issue of error estimation, thus setting a foundation for the overall adaptive procedure which will be described in the following paper. Initially, some properties of a good error estimate have been outlined, together with the dierence between error indicators and error estimates. Two novel error estimates have then been proposed, namely the Taylor Series Error Estimate (TSEE), based on the truncation error analysis and the Moment Error Estimate (MEE). Unlike the more popular Richardson extrapolation, the TSEE uses only a single solution in order to estimate the error. Although the TSEE seems to be a straightforward way of estimating the discretisation error, it suers from several de ciencies. It uses an estimate of the second gradient of the transported variable and its scalar product with the geometric moment tensor of the CV. Although the error can be calculated on a cell-by-cell basis, the error estimate is still considered to be relatively expensive as it requires a product of two second rank tensors. A simple and cheaper approximate procedure of comparable accuracy is proposed and tested on two model problems. The TSEE typically
19
6 Summary
0.05
0.57
1.08
Figure 13:
0.000000
0.003322
1.59
2.10
2.61
Point jet: exact solution.
0.006644
0.009966
0.013287
0.016609
(a) Exact error magnitude.
0.000000
0.000902
0.001805
0.002707
0.003610
0.004512
(b) Taylor Series Error estimate.
0.000000
0.018389
0.036777
0.055166
0.073554
0.091943
(c) Moment Error estimate. Figure 14:
Point jet: exact and estimated errors.
20
REFERENCES
0
0
10
10
-1 -1
10
-2
max error
mean error
10 10
Exact Taylor Moment Avg estimate
-3
10
-4
10
Exact Taylor Moment Avg estimate
-3
10
-5
10
-2
10
-4
0
10
1
10
2
3
10 10 no of cells
4
10
(a) Mean error. Figure 15:
5
10
10
0
10
1
10
2
3
10 10 no of cells
4
10
5
10
(b) Maximum error. Point jet: scaling of the error.
under-estimates the error, which has been demonstrated in the presented test cases. This is a consequence of the fact that the double Gauss' theorem is used to calculate the second gradient, giving the average value of the gradient over the nearest neighbours, rather than the cell-centre value. The MEE does not follow the traditional truncation error analysis: instead, it relies on the fact that the exact solution of the transport equation for a general variable also satis es the transport equations for all higher moments of . It is therefore possible to examine the imbalance in higher moments over every CV in order to estimate the discretisation error. The imbalance is then normalised in an appropriate way in order to obtain the absolute error magnitude in . Unlike the TSEE, the MEE consistently over-estimates the error. Its accuracy is better, but its real potential can be seen when two estimates are used together. As the presented test cases show, two error estimates bound the error and their average estimates its absolute magnitude with reasonable accuracy. Accurate error estimation is a basis for an eective adaptive re nement procedure, which will be described and tested in the following paper [31].
References
[1] Lilek, Z . and Peric, M.: \A fourth-order Finite Volume method with colocated variable arrangement", Computers and Fluids, 24(3):239{252, 1995. [2] Berger, M. J. and Oliger, J.: \Adaptive mesh re nement for hyperbolic partial dierential equations", J. Comp. Physics, 53:484{512, 1984. [3] Berger, M. J. and Collela, P.: \Local adaptive mesh re nement for shock hydrodynamics", J. Comp. Physics, 82:64{84, 1989. [4] Berger, M.J. and Jameson, A: \An adaptive multigrid method for the Euler equations", Lecture Notes in Physics, 218:92{97, 1985. [5] Dwyer, H.A.: \Grid adaptation for problems in uid dynamics", AIAA Journal, 22(12):1705{1712, December 1984.
REFERENCES
21
[6] Speares, W. and Toro, E.F.: \A high resolution algorithm for time dependent shock dominated problems with adaptive mesh re nement", Z. Flugwiss. Weltraumforsch., 19:267{281, 1995. [7] Lohner, R.: \An adaptive Finite Element scheme for transient problems in CFD", Comp. Meth. Appl. Mech. Engineering, 61:323{338, 1987. [8] Ramakrishnan, R., Bey, K.S., and Thornton, E.A.: \Adaptive quadrilateral and triangular Finite Element scheme for compressible ows", AIAA Journal, 28(1):51{59, January 1990. [9] Berger, M.J. and Jameson, A: \Automatic adaptive grid re nement for the Euler equations", AIAA Journal, 23(4):561{568, 1985. [10] Catharell, D.C.: \A solution-adaptive-grid procedure for transonic ow around airfoils", Technical Report 88020, Royal Aerospace Establishment, 1988. [11] Speares, W. and Toro, E.F.: \A high-resolution algorithm for timedependent shock dominated problems with adaptive mesh re nement", Zeitschrift fur Flugwissenschaften und Weltraumforschung, 19(4):267{281, 1995. [12] Sonar, T., Hannemann, V., and Hempel, D.: \Dynamic adaptivity and residual control in unsteady compressible ow computation", Mathematical and Computer Modelling, 20(10-11):201{213, 1994. [13] McGuirk, J.J., Taylor, A.M.P.K., and Whitelaw, J.H.: \The assessment of numerical diusion in the upwind-dierence calculations of turbulent recirculating ows", In Bradbury, L.J.S., Durst, F., Launder, B.E., Schmidt, F.W., and Whitelaw, J.H., editors, Selected papers from the Third International Symposium on Turbulent Shear Flows, volume 3 of Turbulent Shear Flows, pages 206{224, The University of California, Davis, September 9-11 1981. [14] Tattersall, P. and McGuirk, J.J.: \Evaluation of numerical diusion eects in viscous ow calculations", Computers and Fluids, 23(1):177{209, 1994. [15] Chen, W.L., Lien, F.S., and Leschziner, M.Z.: \A local grid re nement scheme within a multiblock structured-grid strategy for general ows", In 6th Int. Symp. on CFD, Lake Tahoe, USA, September 1995. [16] Haworth, D.C., El Tahry, S.H., and Huebler, M.S.: \A global approach to error estimation and physical diagnostics in multidimensional uid dynamics", Int. J. Numer. Meth. Fluids, 17(1):75{97, 1993. [17] Muzaferija, S. and Gosman, D.: \Finite-volume CFD procedure and adaptive error control strategy for grids of arbitrary topology", J. Comp. Physics, 138(2):766{787, 1997. [18] Ait-Ali-Yahia, D., Habashi, W.G., Tam, A., Vallet, M.-G., and Fortin, M.: \A directionally adaptive methodology using an edge-based error estimate on quadrilateral grids", Int. J. Num. Meth. Fluids, 23:673{690, 1996.
REFERENCES
22
[19] Dompierre, J., Vallet, M.-G., Fortin, M., Bourgault, Y., and Habashi, W.G.: \Anisotropic mesh adaptation: Towards a solver and user independent CFD": AIAA Paper 97-0861, 1997. [20] Habashi, W.G., Dompierre, J., and Bourgault, Y.: \Certi able computational uid dynamics through mesh optimisation", AIAA Journal, 36(5), May 1998. [21] Caruso, S., Ferziger, J.H., and Oliger, J.: \Adaptive grid techniques for elliptic ow problems", Technical Report TF-23, Thermosc. Div. Stanford University, 1985. [22] Moukalled, F. and Acharya, S.: \A local adaptive grid procedure for incompressible ows with multigridding and equidistribution concepts", Int. J. Numer. Meth. Fluids, 13(9):1085{1111, 1991. [23] Thompson, M.C. and Ferziger, J.H.: \An adaptive multigrid technique for the incompressible Navier-Stokes equations", J. Comp. Physics, 82:94{121, 1989. [24] Ferziger, J.H. and Peric, M.: \Further discussion of numerical error in CFD", Int. J. Num. Meth. Fluid, 23:1{12, 1996. [25] Jasak, H.: Error analysis and estimation in the Finite Volume method with applications to uid ows, PhD thesis, Imperial College, University of London, 1996. [26] Muzaferija, S.: Adaptive Finite Volume method for ow prediction using unstructured meshes and multigrid approach, PhD thesis, Imperial College, University of London, 1994. [27] Ferziger, J.H. and Peric, M.: Computational methods for uid dynamics: Springer Verlag, Berlin-New York, 1995. [28] Helf, C. and Kuster, U.: \A Finite Volume method with arbitrary polygonal control volumes and high order reconstruction for the Euler equations", In Wagner, S., Hirschel, E.H., Periaux, J., and Piva, R., editors, Computational Fluid Dynamics, pages 234{238. John Wiley and Sons, September 1994. [29] Hinze, J.O.: Turbulence: McGraw-Hill, 1975. [30] Panton, R.L.: Incompressible ow: John Wiley and Sons, 1984. [31] Jasak, H. and Gosman, A.D.: \Automatic resolution control for the Finite Volume Method. Part 2: Adaptive mesh re nement", To be published.