A Simple Error Estimator and Adaptive Procedure For Practical Engineering Analysis
A Simple Error Estimator and Adaptive Procedure For Practical Engineering Analysis
24,
337-357 (1987)
A SIMPLE ERROR ESTIMATOR AND ADAPTIVE PROCEDURE FOR PRACTICAL ENGINEERING ANALYSIS
0.C . ZIENKIEWICZ AND J. Z . ZHU
Department of C i d Engineering, Lniuersity of Swunseu, Swunsea, SA2 8PP U . K .
SUMMARY
A new error estimator is presented which is not only reasonably accurate but whose evaluation is
computationally so simple that it can be readily implemented in existing finite element codes. The estimator allows the global energy norm error to be well estimated and also gives a good evaluation of local errors. It can thus be combined with a full adaptive process of refinement or, more simply, provide guidance for mesh redesign which allows the user to obtain a desired accuracy with one or two trials. When combined with an automatic mesh generator a very efficient guidance process to analysis is available. Estimates other than the energy norm have successfully been applied giving, for instance, a predetermined accuracy of stresses.
INTRODUCTION The subject of error estimates for finite element solutions and a consequent adaptive analysis, in which the approximation is successively refined to reach predetermined standards of accuracy, is central to the effective use of finite element codes for practical, engineering, analysis. Much of the pioneering mathematical work1- is being today translated to engineering usage. A recent survey of such work shows the principal directions of this effort. However, many difficulties remain and these are responsible for the fact that to this date almost no commercially available codes include provisions for error estimating or adaptivity. The two main problems are
(1) the cost of computations associated with error estimation and the difficulty of implementing such computations into an existing code structure (2) the virtual impossibility of embracing a fully adaptive structure into an existing code structure.
This paper concentrates on a new process for providing a simple error estimator which overcomes problem (1).By coupling the error estimator with an automatic mesh generator (such as is already featured in many practical codes) many of the difficultiesof problem (2)can be bypassed and a fully or partially automated process can be made available within an existing code structure. Two main directions of refining a finite element solution exist. The first is the simple reduction of the subdivision size (h-refinement), which is a natural way for most en& meers. The second refinement process increases the order of polynomial trial function approximation in a predefined element subdivision (p-refinement). This last procedure has particular advantages in many (elliptic)situations when combined with a hierarchic formulation. We have discussed these in detail e l ~ e w h e r e showing the relative ease of ~-~ obtaining error estimates, fast convergence and possibilities of iterative solutions of refinement
338
0. C . ZIEN'KIEWICZ A N D J. 2. ZHU
equations. However, the efficiency here involves generally abandoning a standard finite element structure. For this reason in the present paper we shall concentrate on an efficient h-refinement process.
Lu - q = STDSu- q = 0
in a domain R, with prescribed displacement
(1)
u = U on the boundary
and prescribed traction
r,
Tt
(24
CDSu = f
with
on the boundary
r = ruurt
G
as
(3)
(4)
(5)
we obtain the approximating equations by a standard Galerkin process (or equivalently by minimizing the potential energy) to obtain'
Ku-f=O
where
K=
Ic2
(SN)TD(SN) dR
f = jnNTqdC2 + j r t K T t d r
and the stresses are calculated as
8 = (DSN)ii (7) The approximate solution i , 6 differs from the exact values u,(s and the difference is the error. Thus, for displacements
for stresses elc.
339
A pointwise definition of errors, as given in equations (Sa) and (Sb) is generally difficult to specify, and various integral measures are more conveniently adopted. One of the most common of such measures is the energy norm written for a general problem as
A more direct measure is the so called L, norm, which can be associated with the errors in any quantity. Thus for the displacement u the L , norm of the error e is
the latter expression differing from the energy norm only by the weighting D. Although all the norms written above are defined on the whole domain, we note that the square of each can be obtained by summing element contributions. Thus
where i represents an element contribution and rn the total element number. Indeed for an optimal mesh we shall generally try to make the contributions to this square of the norm equal for all element^.'^.'^ Although the absolute value of the energy (or indeed the L,) norm has little physical meaning, the relative percentage error, e.g.
340
and indeed similarly in element subdomains. We have, in some of the examples given later, used this measure in the element subdomains as its interpretation in engineering terms is most evident.
jnNT(n*- 6) dQ = 0
On substitution of equations (16) and (17) this yields
3" = A - ' j n N T D S N d R i i
where
A=
ln
NTNdO
and again in Figure 1 we show such smoothed stresses. At this stage we should note that the calculation of such stress projections is very simple if a 'lumped form of the matrix A is used-and in particular if both integrals of (18) are obtained by nodal q ~ a d r a t u r e . ' ~ , '
U=E -
du
dx
Figure 1 . The nature of approximation L the error in stress (e,) for a one-dimensional problem and linear shape functions o
It is intuitively obvious that c* is in fact a better approximation than to estimate the error e, (namely equation (Sb)), i.e. put
e,=c*--6
to evaluate the various crror norms. This process is easily implemented into any code as these generally already evaluate the appropriate b* and 6 quantities. In Figure 1 we show the value of e , corresponding to a linear interpolation of u. In the case illustrated it is easy to show that in .fact the approximation of equation (19) is a good one and convergent to the exact error. The proof is simple:
(a) It is well known that the approximation of equation (6) yields exact nodal values of u in the one-dimensional case.16 (b) The projection evaluates an approximation to the first derivative at nodes which is one order higher than the linear approximation (provided that the modulus E, the one-dimensional equivalent of D, is constant).
Thus expression (1 9) is true at least to U(h)and the estimate converges here to the correct error. Extension of this proof to two and three dimensions follows similar reasoning and indeed the procedure is valid not only for lincar but also for higher order approximating shape functions N. We shall show its effectiveness in later examples. Most of the previously used error estimates involve in the energy norm the evaluation of integrals including interelement stress discontinuities. For instance the estimators derived in References 1-9 for bilinear elements ( p = 1) are of the form
m
c2 =
i= 1
E?
dI) with Ii being the element interface, r the residual of the equation (l),J the inter-element traction jump, and
i= 1
1 (C,
rn
I Q , r z dQ + C,
c ---h? 24K
c,=- hi
24 K
( K = E/(1 - v) for plane stress elasticity problems with linear shape function^^*^). Such estimators are more complex to evaluate than the present one, as they require explicit determination of the interelement traction jumps and an integration along element interfaces. However, the present simple form is approximatly equivalent to these earlier forms. Indeed for the bilinear element this equivalence has been demonstrated by Rank,17 and an outline of his proof is given in the Appendix. The effectivity index of any error estimator is the ratio of the predicted to correct error values. Thus
where the superscript 0 refers to predicted values. Predicted values of percentage error are obtained as (22) Finally an empirical correction multiplying factor to our estimates has been found useful. This depends on the elements used and is 1.1 for bilinear elements, 1.3 for linear triangles, 1.6 for
OYI
~ o l l ~ l l z / ~ l l+ ollel12))2 ~l12
342
biquadratic 9-node isoparametric elements and 1.4 for quadratic triangles. In the subsequent examples we show both corrected and uncorrected values with O* and q* referring to the latter. The new error estimator was first presented in Reference 18 by the authors. REFINEMENT STRATEGY The refinement strategy will of course depend on the nature of the criteria on accuracy which we wish to satisfy. A very common requirement is to specify the achievement of a certain minimum percentage error in the energy (or L,) norm. We thus require that after the final analysis is complcted the condition that
VGq
(23)
be satisfied for the whole domain, where is the maximum permissible error. If we assume that the error is equally distributed between elements the requirement (23) can be translated into our placing a limit on the error in each element. Thus for each element we require that, given that rn is the total number of elements,
Ilell,~iiC(ll~l12lle112)/~11/2=~ + m
(24)
As the error is in fact computed for each element we can readily check where refinement is necessary. Indeed the ratio
defines the elements to be refined, and its value can, assuming a certain rate of convergence, decide the degree of subdivision or element size needed. For instance if the current element size is hi,and we assume the rate of convergence of the error to be O(hP)(in the area covered by the element) then the predicted element size should bet
h= hi/l!/p,
for
t i >1
(26)
Generally we shall assume that p is equal lo the polynomial order of the trial function used, though of course this simple convergence rule is not valid near singularities. The predicted element size distribution can be achieved in any manner practicable. In some of the examples we shall simply use a successive subdivision; in others a completely new mesh is generated using the requirement (26) and it will be seen that this can lead to the achievement of the final solution in a single trial. The criterion of achieving a globally acceptable energy norm percentage error gives little direct information about the stresses. A very logical criterion is to insist that within each element the stress deviation evaluated locally by the expression (1 5) should be below a certain minimum. This minimum can be selected a priori as a fraction say of maximum permissible stress or it can be fixed as a percentage of the mean c value in the whole problem. Whichever is applicable the requirement is similar to that of equation (24) with
Agi
9 Agpermissihle
(27)
343
Again if we specify
Ci as
the expression (26) can be used to guide the refinement. However, the satisfaction of such a local criterion will be more demanding, as we shall show later.
EXAMPLES
The procedures for evaluating the errors and comparison with 'cxact' crror values are illustrated in a series of examples. In these the 'cxact' solution is provided either analytically or by using an extremely fine subdivision. Uilineur quudriluterals (4-node isoparametric elements) are used in cxamples presented in Figures 2-5; Biquadratic quudrilaterals (Y-node isoparametric elements) are used in Figures 6-9: and, finally, linear and quadratic triangles (3- and 6-node elements) are used in Figures 10-18. In all these examples the global effectivity indices are given for various subdivisions as well as local ones in two cases. The reader can observe the excellent prediction of error and convergence of the effectivity indices to unity with refinement. In all the examples using quadrilaterals the refinement strategy allowed only a halving of the mesh at each step to avoid excessive constraints. This type of strategy leads to a good refinement but is not economical.
MESH 3 , 4 0 0 0 0 F
Figure 2. Bilinear elements: cantilever beam-plane stress. E = lo5, v = 0.3. Analysis and error estimates for uniform subdivision. q: actual percentage error in energy norm. 1":predictcd percentage error in energy norm. q*: predicted percentage error using corrective factor. Beffectivity index. U* effectivity index using corrective facior. Suffix 'L' indicatcs use of thc I,, norm
344
.SI 0.90 0.78 0.81 0.80 0.80 0.80 0.81 0.83 0.77
Figure 3. Local effectivity indices for problem 1 Figure 2 (meshes 1-3) [O* energy norm] (in the L, norm the results arc very similar)
In the examples in which triangular elements are used we proceeded to impose directly the element spacing required by equation (26), having access to an excellent new mesh generator recently developed.'g Figures 10-16 show attempts to achieve a final accuracy of 5 per cent in one step of refinement. Though this target is not completely reached, it is reasonably approximated. Figure 17 shows the distribution of Aoi for the problem of Figure 12 (mesh 1) as well as the maximum value of <. Figure 18 shows the refinement now using the A o criterion, there the max ( has now been reduced to values below 3. CONCLUDING REMARKS The error estimator introduced in this paper and the simple refinement strategy suggested are applicable to problems other than stress analysis alone. The method can be used for almost any linear finite element discretization and currently work is in progress in developing a non-linear methodology. The original applications of the adaptive process here suggested were made in the context of optimization, where it is logical to impose a tolerance in such quantities as stresses which govern the design. Clearly the main objective of adding a certain degree of measured confidence to results of finite element analysis is now being made easier. To achieve a given accuracy with the least effort, mesh gcncration procedures are essential. Indeed these should be capable of designing a mesh from the specification of element size distribution. Such a mesh generator can be devised for triangles in two dimensions, as shown
345
ul
-b
MESH 3 (514 0 0 F 1
of mesh refinement
341
MESH l ( 2 5 2 D.O.F.)
MESH 2 (572 D O F )
150
_-
50
0
Ln
0 Ln
348
289 D 0 F
Figure 8 Biquadratic elements perforated tension bar in plane stress
in Reference 19, and generalization to three dimensions following similar lines is in progress. However, such a mesh generator for quadrilateral (or brick) type elements does not exist-and would appear to be difficult to construct. For this reason we feel that the use of triangles (or tetrahedra) with either linear or quadratic basis functions may become more popular in the future. A final remark concerns the meaning of the error estimates. These always concern thc actual stresses computed by such expressions as equation (7) though in practical codes the results which are generally given in the output are those of stresses to which some form of averaging or projection was applied. The error computed with such strcsses is invariably lower and in this sense the error estimates given here are on the safe side. (This remark of course applies with equal validity to all the other estimator forms quoted in References 1-10) Below we show, for the example of Figure 2, the ratio of the true error in energy evaluated on the basis of e m = c - t 3 a n d that derived on the basis of smoothed (projected) stresses ed = c - c*.Thus, defining
we have mesh 1(10elements): ct = 1*4 mesh 2(40 elements): x = 2.1 mesh 3(160elements): a = 2 3 If our concern is mainly with the stresses it is evident that these are, if averaged, estimated with much better precision than indicated by error estimators (with the factor being close to two on the error). However this remark does not apply to thc encrgy norm evaluated from displacements directly. The current work shows that error cstimates of the form derived here are equally useful in non-linear applications and, indeed, similar procedures applied to hyperbolic problems have been shown to be very effective. In the latter problem a directionally orientated mesh refinement was effectively used and extension of such rcfinemeiit to problems of structural mechanics is in progress.
ACKNOWLEDGEMENT
J. Z. Zhu wishes to thank the Chinese Government for his scholarship and the U.K. SERC for more recent support of this work (Grant No. GR/D/4915.2).
MESH 3 ( 8 3 4 D.O.F.)
I-qqqW]
Figure 9. Biquadratic elements: plane strain analysis of a dam with perforation; water loading only
i
MESH 1 (108 D.O.F.1
20
(a) ORIGINAL MESH
mesh gencration to achievc 5 per cent accuracy: thick circular cylinder under internal pressure (plane strain)
E m
2.80 1.70 2.38 0.62 0.87
MESH 1 ( 9 4 D.O.F.)
mesh generation to achieve 5 per cent accuracy: thick circular cylinder under internal pressure (plane strain)
p=l
+t
IMESH 1 (108 D 0.F.) P =1.0
20
I
(a) ORIGINAL MESH
mesh generation to achie've 5 per cent accuracy: thick cylinder under diametral load Figure 12. Linear triangle-automatic
(bJPREDlCTE0 MESH
I
MESH 1 (94 D 0 F 1
352
MESH 1 ( 9 8 D.O.F.)
automatic mesh gcncration to achicvc 5 per cent accuracy: L-shaped region in plane stress
us
( a ) ORIGINAL MESH
MESH 2 ( 3 4 4 D 0 Fl
mesh generation to achieve 5 per cent accuracy: L-shaped region in plane stress
MESH 1 (7280 0 F 1
rq-q
q
e
Figure 16. Quadratic triangle-automatic
q o q'
% ENERGY NORM ERROR - EXACT ENERGY NORM ERROR - ESTIMATE e- EFFICTIVITY INDICES
mesh generation to achieve 5 per cent accuracy plane strain analysis of a dam with perforation water loading only
Figure 17. Thedistrihution o f h i of Figure 11. The numhers ahovc are A G x 10: A ~ max. AG, = 0.2 max. ti= 15.3
354
f y1.S
APPENDIX Instead of presenting the results here in the general form, we shall discuss the equivalence of the error estimators by means of the model equation
- K A u = f, in 0
(29)
355
K-=f, dn
8U
on
K
rI
with
v = (ox, uyjT=
-
grad u
and constant f and K values. We shall consider bilinear finite element approximation and, for simplicity, a square mesh with side length h of each element (Figure 19). The error estimator (20) in element i is now of the form
as r here turns out to be zero, because of the use of bilinear functions. The error estimator (10) with (19) in element i has the form
. c
(33) where (34) The smoothed nodal values 57* are the averaged nodal values of G. Considering the continuity of CX and O we see immediately that, for example, at node 3 of element 1 of Figure 19 ,
(u,* - Ox)3 = 3 J 3 ( u x )
and
(u: - OJ3 = +J3(t.,,)
This shows that the difference of v* and G can be represented by the jumps. Thus, by taking into account the appropriate signs of the jumps at nodes 1 to 4 of the element, equation (33) can be rewritten as
llellf = ~ ( J ~ A J J:AJ,) ,
h2
where
Jx
= ( - Jl(Ux),
J,(u,),
JdUA
J,(uJ,
J4(u,)lT
JY=(-Ji(~,),
-Jz(u,),
J4(~y))~
A = ln,NTN dQ
and niis a square element of side length 2. Evaluating (36) and noting that
(J1-
J , -J 3
+ JA2 2 0,
(J1+
J,
=
J,
- J,)2
20
12J,J,I d Jj
+Jz,
j,k
1,2,3,4
356
Noting that jumps are linear functions along the element edges, the numerical approximation of equation (32) yields the following expression:
therefore ileil < J 3 & 43 and the equivalence of the two error estimator holds. If A is lumped or diagonalized in the evaluation of (36), we have
--&<
This perhaps gives an indication why some upward correction of the estimators may be needed. The above discussion has shown the equivalence of error estimators (20) and (10) for a two-dimensional squarc mesh. For general bilinear elements the equivalence of the error estimators follows from the fact that in this case E~ and ilelli differ from (32) and (33) only by constants which depend on the Jacobian of the mapping. As long as the Jacobian is bounded, i.e. there exist two constants C , , Cz 2 C > 0, such that
REFERENCES 1. I. Babuska and W. C. Rheinboldt, Error estimates for adaptive finite element computations, S I A M J . Num. Analysis, 15, (4) (1978). 2. T. Babuska and W. C. Rheinboldt, Adaptive approaches and reliability estimates in finite element analysis, Comp. Meth. Appl. M ~ l z Eng., 17/18, 519-540 11979). . 3. I. Babuska, A. Peano, R. Riccioni, A. Pasini and L. SordeHa, Adaptive approximations in finite element structural analysis. I S M ES, Bergamo, Italy, 1978. 4. 0. C. Zienkiewicz, D. W. Kelly, J. Gago and I. Babuska, Hierarchical finite element approaches, error estimates and adaptive refinement. in J. Whiteman (ed.), Muthemutics qf Finite Elements and Applicarions ( IV ) . Academic Press, 1982, pp. 313-346. 5. 0. C. Zienkiewicz, J. P. De S. R. Gago and D. W. Kelly, The hierarchical concept in finite element analysis, Computers & Structures, 16, (1-4), 53-65 (1983). 6. D. W. Kelly, J. P. De S. R.Gago, 0.C . Zienkiewicz and I. Babuska, A posteriori crror analysis and adaptive processes in the finite element method: part I-error analysis, Int. j . numer. rnefhods m y . . 19, 1593-1619 (1983). 7. J. P. De S. R. Gago, D. W. Kelly, 0. C. Zienkicwicz and I. Babuska, A posteriori error analysis and adaptive processes in the finite element method part 11-adaptive mesh refinement, Int. j . numer. meihods eng.. 19, 1621-1656 (1983). 8. 0. C. Zienkiewicz and A. W. Craig, A posteriori error estimation and adaptive mesh rcfinement in finite element method, in David F. Griffiths(ed.)The M a h n n t i c u l Basis o Finite Element Meihods. Clarendon Press, Oxford, 1984. f
357
9. A. W. Craig, J . Z. Zhu and 0. C. Zienkiewic7, A posteriori error estimation, adaptive mesh refinement and multi-grid methods using hierarchical finite element bases, in J. R . Whiteman, Matlzematics of Finite Elentents and Applications ( V ) ,Acadcmic Press, 1985. pp. 587-594. 10. I. Rabuska, 0. C. Zienkiewicz. 1. Gago and E. R. de A. Oliveira (eds). Accuracy Estimates and Adnptiw Refinement in Finite Element Chmpiitations, Wiley, 1986. 11. 0. C . Zienkiewicz, The Finite Elenient Method, 3rd edn, McGraw-Hill, 1977. 12. E. R. de Arantes E. Oliveira, Optimisation of finite element solutions, Proc. 3rd Cot$ Matrix Methods in Structural Anolvsiq, Wright-Patterson A. F. Base, Ohio, 1971. 13. I. Babuska and W. C. Rheinboldt, Analysis of optimal finite element method in R, Math. Comp., 30, (1979). 14. 0. C. Zienkiewicz, J. P. Vilotte, S. Toyoshima and S. Nakazawa, Iterative method for constrained and mixed approximation An inexpciisive improvcment of F.E.M. performance. Comp. Meth. Appl. Mech. Eng.. 51,3-29 (1985). 15. 0. C. ZienkiewicL. Li Xi-Kui and S. Nakazawa, Iterative solution of mixcd problcms and the stress recovery procedures, (ommzlnzcations in Applied Numerical Methods, 1, 3 -9 (1985). 16. P. Tong, Exact solutions of certain problems by the finite element method, A.I.A.A. J., 7, 179-180 (1969). 17. E. Rank, -private communication, 1985. 18. 0.C. Zienkiewicz. A. W. Craig, J. Z. Zhu and R. H. Gallagher. Adaptive analysis refinement and shape optimization: some new possihilities, lnr. Symp. on T ~Optimum Shape, General Motors, September 1985. P 19. J. Perairc, M. Vahdati. K. Morgan and 0. C. Zienkiewicz, Adaptive remeshing for compressible flaw computations, Insl. Num. Meth. in Eng.. University Collcgc, Swansea, C R / K 5 4 4 / 8 6 , 1986 (to be published).