a general purpose adaptivity driver for fe software

20
SOFTWARE—PRACTICE AND EXPERIENCE Softw. Pract. Exper. 2003; 33:1097–1116 (DOI: 10.1002/spe.536) A general purpose adaptivity driver for FE software Jens M¨ uller and Jan G. Korvink ,† IMTEK, Institute for Microsystem Technology, Albert Ludwigs University, Georges-Koehler-Allee 103, D-79085 Freiburg, Germany SUMMARY This paper describes a tool that serves as an automatic mesh adaptivity driver program for general purpose finite element (FE) software packages. Many commercially available FE programs lack a feature to control the numerical solution’s accuracy properly. Our tool implements a mesh adaptive method that, in conjunction with separate finite element software, allows one to fully automatically improve the quality of the numerical solution up to a user specified accuracy. We demonstrate the use of the package with selected computational examples performed with a commercial FE package, ANSYS, and with our FE program FEMEngine. Copyright c 2003 John Wiley & Sons, Ltd. KEY WORDS: finite element software; numerical simulation; mesh adaptivity driver; error control 1. INTRODUCTION About three decades have passed since high performance commercial finite element software entered the market. Most engineering disciplines, among them mechanical, electrical, structural and MEMS (Micro Electro Mechanical Systems) engineering, benefit from readily available simulation results of commercial finite element (FE) tools [1–3]. In fact, design and development of products in the above disciplines would be unthinkable without these simulation tools. The number of the physical phenomena covered by commercial FE software is high and ranges from solid mechanics through electromechanics to fluid-mechanics, and also the coupling of the different fields is fully taken into account. Some software packages include features that also cover numerical methods that are secondary to the FE core, such as topology optimization or model order reduction. Other tools, such as [4], are designed in an object-oriented fashion such as to guarantee a flexible extensibility in a range of directions. To our knowledge none of the above available programs allows the user to perform reliable control of the accuracy of the numerical solutions which they produce. Correspondence to: Jan G. Korvink, IMTEK, Institute for Microsystem Technology, Albert Ludwigs University, Georges-Koehler-Allee 103, D-79085 Freiburg, Germany. E-mail: [email protected] Published online 25 June 2003 Copyright c 2003 John Wiley & Sons, Ltd. Received 28 June 2002 Revised 28 October 2002 Accepted 19 March 2003

Upload: jens-mueller

Post on 06-Jul-2016

213 views

Category:

Documents


1 download

TRANSCRIPT

SOFTWARE—PRACTICE AND EXPERIENCESoftw. Pract. Exper. 2003; 33:1097–1116 (DOI: 10.1002/spe.536)

A general purpose adaptivitydriver for FE software

Jens Muller and Jan G. Korvink∗,†

IMTEK, Institute for Microsystem Technology, Albert Ludwigs University, Georges-Koehler-Allee 103,D-79085 Freiburg, Germany

SUMMARY

This paper describes a tool that serves as an automatic mesh adaptivity driver program for generalpurpose finite element (FE) software packages. Many commercially available FE programs lack a featureto control the numerical solution’s accuracy properly. Our tool implements a mesh adaptive method that, inconjunction with separate finite element software, allows one to fully automatically improve the quality ofthe numerical solution up to a user specified accuracy. We demonstrate the use of the package with selectedcomputational examples performed with a commercial FE package, ANSYS, and with our FE programFEMEngine. Copyright c© 2003 John Wiley & Sons, Ltd.

KEY WORDS: finite element software; numerical simulation; mesh adaptivity driver; error control

1. INTRODUCTION

About three decades have passed since high performance commercial finite element software enteredthe market. Most engineering disciplines, among them mechanical, electrical, structural and MEMS(Micro Electro Mechanical Systems) engineering, benefit from readily available simulation resultsof commercial finite element (FE) tools [1–3]. In fact, design and development of products in theabove disciplines would be unthinkable without these simulation tools. The number of the physicalphenomena covered by commercial FE software is high and ranges from solid mechanics throughelectromechanics to fluid-mechanics, and also the coupling of the different fields is fully taken intoaccount. Some software packages include features that also cover numerical methods that are secondaryto the FE core, such as topology optimization or model order reduction. Other tools, such as [4],are designed in an object-oriented fashion such as to guarantee a flexible extensibility in a range ofdirections. To our knowledge none of the above available programs allows the user to perform reliablecontrol of the accuracy of the numerical solutions which they produce.

∗Correspondence to: Jan G. Korvink, IMTEK, Institute for Microsystem Technology, Albert Ludwigs University,Georges-Koehler-Allee 103, D-79085 Freiburg, Germany.†E-mail: [email protected]

Published online 25 June 2003Copyright c© 2003 John Wiley & Sons, Ltd.

Received 28 June 2002Revised 28 October 2002Accepted 19 March 2003

1098 J. MULLER AND J. G. KORVINK

Although it is, in general, not possible to directly compute the error that is introduced by thediscretization of the simulation domain, methods known as a posteriori error estimation provide lowerand upper bounds of the true error. These bounds are locally computable, which means that they givea measure of the distribution of the numerical error over the whole simulation domain. In turn, thisdistribution can be used to improve the solution’s quality by locally refining the computational grid.However, a better solution could also be obtained by globally choosing a denser grid; this method wouldbe expensive in terms of memory requirements and computational time: too many nodes would beintroduced into the domain at locations where they are of no use to improve the solution. Alternatively,adaptively introducing new nodes in regions where high errors are sought to be eliminated turnsout to be an efficient method in both reducing the discretization error and in saving computationalresources.

Although there are a couple of finite element method (FEM) tools in the public domain that offermesh adaptivity, they either lack the feature to use the adaptivity as a stand-alone program [5,6], or theyare limited to a certain class of physical problems [7]. The Diffpack FE toolbox [8,9] is a widely usedand probably the most elaborate commercial software that offers the possibility to use mesh adaptiveprocedures during the simulation process. The package’s design and architecture is object-orientedand allows one to specify different local error measures as well as various refinement strategies andmesh splitting techniques for structured and unstructured meshes. Error measures that are suggestedare simple, such as geometrical element data or the solution field’s gradient. More elaborate errorestimation techniques in Diffpack suggest using the error indicator of Zienkiewicz and Zhu, whichwas proposed in an early stage of the development of FE-adaptivity [10]. For more general problems[11,12] this error measure is insufficient, as for example for the plate equations in which higher orderfield derivatives are required to set up the error estimator [13,14].

In our tool we have implemented a residual a posteriori error estimator together with a maximumrefinement strategy and a recursive geometrical split pattern for simplicial meshes both in two andthree dimensions. The performance of this driver tool is demonstrated together with the commercialprogram ANSYS [1] and our in-house tool FEMEngine [15], the latter especially designed to meet therequirements of MEMS developers.

In summary, this paper describes a new software tool that extends existing FE programs by a mesh-adaptivity capability. We show, through carefully constructed two-dimensional (2D) examples thatpermit analytical solution, that the adaptive algorithm does indeed refine the mesh in regions wherethe local error is largest, and that it does result in more accurate global solutions. In addition, we willclearly demonstrate that in these cases the mesh is not refined where the absolute measure of accuracyvanishes. In this sense we demonstrate that the method is efficient and that it does not introduceredundant refinement.

To limit these claims we note that a number of additional factors influence the performanceof element-based error estimation. In particular, the mesh splitting method used can introducediscretization inaccuracies by producing new elements with ‘bad’ shape. We will demonstrate thatthe splitting method we have adopted maintains a mesh within quality bounds.

We also claim that, by using our tool, the analyst can now expect to obtain a good meshautomatically. That is, given an acceptable error margin, the refinement process will stop when theerror can be guaranteed. Again, we will demonstrate this with an analytically solvable problem forwhich we have access to an absolute error. Experience with a more general simulation, coupled withplausibility arguments, will strengthen our claim for the general case.

Copyright c© 2003 John Wiley & Sons, Ltd. Softw. Pract. Exper. 2003; 33:1097–1116

A GENERAL PURPOSE ADAPTIVITY DRIVER FOR FE SOFTWARE 1099

We also claim that the method is applicable to the most frequently used FE polytopes and theirdiscretized partial differential equations. To support this claim, we have selected combinations ofvarying difficulty: the 2D and 3D Poisson equation based on linear triangle and tetrahedron polytopes,and the multi-layer plate equation based on high-order multi-DOF (degree of freedom) per nodeArgyris triangles.

Finally, we claim that our approach has potential utility for the finite element analysis community.We note the fact that users of established FEM tools have large investments in effort in training,verification examples, and existing computational geometries. Furthermore, these established toolsmay not lend themselves to modification or extension to include adaptive meshing, or their developersmay not be able to justify the cost of such an extension. In particular, then, this paper demonstrates thatour tool provides such users with automatic accuracy control over their computations without losingthe invested effort.

2. FINITE ELEMENTS AND DISCRETIZATION ERRORS

The FEM is applicable where geometry and material arrangements are too complex so that thepartial differential equations describing the physical phenomena cannot be solved analytically. To thisend, the strong form of the partial differential equations (PDEs) is transformed into a weak form.We demonstrate this with an example [16]. A Poisson-type partial differential equation, subject toboundary conditions (BCs),

−∇κ∇� = f (1)

describes heat transfer or the Gauss-law of electrostatics, for example. Here κ is the thermalconductivity or the dielectric permittivity and � is the temperature or the electrostatic potential, f is aheat source or a charge distribution, respectively. The weak form is obtained by multiplying both sidesof (1) with a test function δ� and partially integrating over the simulation domain �:∫

κ∇�∇δ� =∫

f δ� +∫

∂�therm

gδ� (2)

The symbol g represents the natural or flux boundary conditions on a specified part of the domainboundary ∂�therm. By transforming the differential equation into the weak form we have reduced thedifferentiability requirements, hence the name. The weak form, however, has a significant advantageover the strong form, that is, different materials can be included in the computation without specifyingany field connectivity conditions at the material interfaces. In an abstract manner the problem can beexpressed in terms of a bilinear form where one searches for a function � that satisfies (2) togetherwith the essential or (Dirichlet) BCs for any variation δ� that belongs to the infinite dimensional space

X = {� ∈ H 1(�),� = 0 on ∂�ess} (3)

This space consists of functions that belong to a Sobolev function space H 1(�), which includesall vanishing essential BCs. The widely used Galerkin FEM expresses that both the field � andδ� be approximated in the same space, namely in a finite-dimensional subspace of H 1(�), whichincludes the essential BCs. This subspace is usually spanned by low-order polynomials. Together witha geometrical domain decomposition scheme into simplices, quadrilaterals, etc., these are known as

Copyright c© 2003 John Wiley & Sons, Ltd. Softw. Pract. Exper. 2003; 33:1097–1116

1100 J. MULLER AND J. G. KORVINK

the finite elements. And, in turn, computing the numerical solution with the aid of these objects is alsoknown as the discrete problem and forms the numerical basis of any FE-tool.

The drawback with the numerical solution �h obtained in this way is the fact that it is only anapproximation of the ‘true’ solution � and thus an error εh is inevitably introduced: εh = � − �h,also known as the discretization error. Reducing this error at a minimum of computational cost is themain goal of our adaptive finite element software. As the true solution � is, in general, unknown, theerror εh, too is unknown. This difficulty is overcome by a method that is denoted as a posteriori errorestimation [10,11,13,17,18,19]: the error is estimated after the approximated solution is computed.The estimation of the discretization error can be expressed as the inequality

|‖� − �h‖| ≤( ∑

T ∈ S

η2T (�h)

)1/2

(4)

where the sum ranges over the whole set of elements T present in the domain decomposition S.The norm |‖ · ‖| is called the energy norm. Inequality (4) therefore expresses the fact that energy isthe physical value the discretization error is measured in. The energy (and therefore the energy norm)depends upon the particular (elliptic) PDE that is being solved. The terms ηT (�h) denote the localelement error estimators and only depend on the given data and the computed solution and thereforecan be directly computed. Our method of estimating the error is also known as residual error estimationsince the residual of the strong form of the PDE (1) is involved in the calculation. Error estimationas stated in (4) is not restricted to Poisson-type problems (1). Our tool also covers more generalerror estimation ranging from Poisson-type problems through membrane mechanical problems to thecoupling of the electrical, mechanical and temperature fields. The error estimator gets a more prominentmeaning as it can be proved that it is bounded from above, in other words, the estimated error is nottoo far away from the true error, see for example [13,20]. In this regard the error estimation method weuse within our driver module represents the currently most accurate and reliable way to obtain betterFE simulation results at a minimum of computational effort.

3. THE ADAPTIVE ALGORITHM

The adaptivity algorithm is based on the following three modules:

• error estimation,• refinement strategy,• split pattern.

The first component was described in the first section and is used to locally determine the quality ofthe simulation results computed by the FE tool. In general, the solution’s quality could be improvedby globally choosing a denser grid, which means that new elements and nodes would be introduced inregions where the solution is already highly accurate. In general, this is too costly and for complex solidstructures could exceed the limits of available computational resources. The availability of local errormeasures allows us to use a denser grid only where high error values are present, or equivalently, wherethe computed solution’s quality is poor. Therefore, a refinement strategy is required in order to decidewhich of the elements shall be refined. We have implemented a maximum refinement strategy [13],outlined in Figure 1.

Copyright c© 2003 John Wiley & Sons, Ltd. Softw. Pract. Exper. 2003; 33:1097–1116

A GENERAL PURPOSE ADAPTIVITY DRIVER FOR FE SOFTWARE 1101

refinement strategy:for all elements in the mesh do

if γ × ηT ≥ maxT ∈ Mesh {ηT } thenmark element T for refinement

end ifend for

Figure 1. Maximum refinement strategy.

1 2 3 4

5

10

15

20

Estimated ElementEnergy Error

Number of Elements

[10 J]-3

max

Marked for refinement

Element Error Distribution

Scaled Element Error DistributionScaling Parameter: = 3

T

T*

Figure 2. Element error distribution and maximum refinement strategy.

The heuristic parameter γ is greater than 1, so that, when the product with an element error exceedsthe maximum element error in the mesh, it causes the element T to be marked for splitting. So, lowvalues of γ will result in a relatively high number of elements to be marked for refinement whereashigher values of γ will leave the mesh rather unchanged. In practice, values of γ ∈ [2, 3] have provento be reasonable. Since the acceptable error is controlled elsewhere, the effect of γ is simply to governthe speed of the adaptivity process and the redundancy of the refinement. Figure 2 shows the elementerror distribution and its scaling by a value γ = 3 for a maximum refinement strategy. The values aretaken from the micro thruster simulation example described in Section 5. The elements falling in theshaded area are marked for refinement.

In our scheme the mesh splitting process for triangular and tetrahedral meshes can be represented asa forest of binary trees; each pair of sibling elements stem from a single parent as shown in Figure 3:

(a) Initial mesh of two elements. Each element is the root of a binary tree. The mesh is a forest ofsuch roots.

Copyright c© 2003 John Wiley & Sons, Ltd. Softw. Pract. Exper. 2003; 33:1097–1116

1102 J. MULLER AND J. G. KORVINK

2

1

1

forest of roots

1

23

4

21

forest of roots

3 4

2D

3D

(a) (b)

(c) (d)

2D

3D

45

90

60

90

Figure 3. Effect of splitting simplices: triangles and tetrahedrons.

(b) The mesh of (a) after element ② is refined. The tree shows elements ③ and ④ as the immediatedescendants of ② in the binary tree.

(c) If the edge to be split during the refinement of an element does not coincide with the meshboundary, a hanging node is introduced, here marked by an open circle.

(d) Illustration of the effect of triangle splitting on angles for different triangle shapes. The largestangle is indicated by a filled arc at the corner, the smallest by an open arc. Bansch has shownthat the angle sizes remain bounded for a non-recursive 2D and 3D algorithm [21].

We use a recursive algorithm for simplicial meshes that in two dimensions was first proposed by[22] and equipped with additional results by [23]. The 3D algorithm is based on the work of [24,25].The 2D and 3D algorithm is shown in Figure 4.

According to this algorithm simplicial elements are bisected along their common refinement edgegiven that this edge is tagged to be the refinement edge of all neighbours (both neighbours in the 2Dcase). Figure 5 depicts the splitting scenario on a pathological 2D geometry so as to point out therecursive character of the algorithm.

The mesh in Figure 5 consists of four elements for which the darkly shaded triangle is marked to besplit. Compatibility of refinement edges is either given in case the edge is the longest edge of both itsneighbours or the edge is part of the domain boundary. According to the numbering in the right-handside sketch new nodes and edges (and hereby elements) are introduced beginning with the splitting ofthe boundary edge and then backtracking until compatibility is achieved for the splitting of the original

Copyright c© 2003 John Wiley & Sons, Ltd. Softw. Pract. Exper. 2003; 33:1097–1116

A GENERAL PURPOSE ADAPTIVITY DRIVER FOR FE SOFTWARE 1103

recursiveRefine(element):for all elements at the refinement edge do

repeatif neighbour has non-compatible refinement edge then

recursiveRefine(neighbour)end if

until (all neighbours have a compatible refinement edge)end forsplit all elements along the common refinement edge

Figure 4. Recursive splitting algorithm for simplicial meshes.

1

2

3

4

Figure 5. Recursive bisection algorithm for triangular meshes (four triangles).

element. It has been proved [23,24] that during a repeated refinement process of this kind only a finitenumber of similarity classes of simplices occur, hereby avoiding small angles within the simpliceswhich are undesired for FE computations and which deteriorate the accuracy of the approximatesolution, see for example general FE literature [16,20,26]. In addition, the bisectioning algorithmavoids hanging nodes on edges as they might be introduced if a triangle was bisected without alsosplitting its neighbour, see Figure 3(c). Such hanging nodes are inadmissible for FE triangulations [20].

The three methods of error estimation, refinement strategies and split patterns, are combined into theoverall adaptive algorithm as outlined in Figure 6.

The error tolerance that is prescribed by the user might be some part of the total error computed onthe initial mesh or its value might be associated with some secondary fields that are computed by theFE-program, such as the elastic energy, or the entropy production, etc.

Figure 7 shows the domain geometry of Figure 5 after 10 mesh refinement steps. The refinement iscarried out while a Laplace equation is solved on the domain for a set of BCs. Major refinement occursin the lower left corner of the domain and is due to the specification of a single nodal boundary value onthe corner point. The graph on the right shows the maximum and the minimum angles of all triangles

Copyright c© 2003 John Wiley & Sons, Ltd. Softw. Pract. Exper. 2003; 33:1097–1116

1104 J. MULLER AND J. G. KORVINK

adapt:start with initial mesh S0set k = 0repeat

run FE-tool: solve the FE-problem using mesh Skcalculate error estimator ηT for each element T in Skapply (refinementStrategy)apply (recursiveRefine) for each element marked by the refinementStrategygenerate mesh Sk+1set k = k + 1

until∑

T ∈ SkηT ≤ Predefined error tolerance

Figure 6. General adaptive algorithm.

2 4 6 8 10

0.5

1

1.5

2

Min Angle

Max Angle

Angle (Rad)

Refinement steps

CornerSingularity

Figure 7. Refinement of the patch of Figure 5 and minimal/maximal angles.

present in the mesh. After an initial oscillation both the upper and lower bounds remain constant duringthe succeeding refinement cycles.

In the 3D geometry the situation is similar, yet slightly more complicated. First, the number ofneighbours at a given refinement edge is no longer restricted to two: arbitrarily many tetrahedrons mayshare a common refinement edge, see Figure 8. Additionally, certain requirements have to be met forthe initial domain decomposition in order to assure that the recursion terminates. An initial embeddingof six tetrahedra into a cube assures that the recursive algorithm shown in Figure 4 does terminate [24].Figure 9 shows an initial mesh on an elbow-shaped domain that meets the above requirements andwhich is used to perform a thermal FE analysis. The right figure shows the recursively refined meshafter nine adaptivity cycles. The mesh is most dense in the vicinity of the re-entrant corner where thetemperature field is singular, similarly to the 2D example in Section 5 of this paper.

The algorithm assures that by locally reducing the discretization error an accurate solution for lowcomputational effort can be achieved. It would be ideal to claim that the process is optimal, i.e., thatthe accuracy achieved is maximal and the computational effort to do so minimal. We are not able to

Copyright c© 2003 John Wiley & Sons, Ltd. Softw. Pract. Exper. 2003; 33:1097–1116

A GENERAL PURPOSE ADAPTIVITY DRIVER FOR FE SOFTWARE 1105

Figure 8. Edge neighbour situation for simplices in two and three dimensions.

18 Elements 1176 Elements

Figure 9. 3D mesh refinement.

make such a strong statement, but the following points will show that a high level of efficiency can bededuced:

(1) The element based error estimator correctly predicts the local error in a computed solution.(2) The refinement strategy correctly marks elements whose discretization contribute to the error of

the computed solution. Moreover, heuristic arguments [19,27,28] suggest that by adopting thismethod an equidistribution of the element error estimators can be achieved.

(3) Splitting an element into smaller elements increases the local accuracy of the computed solution.(4) Iterative refinement avoids over-refinement.

Copyright c© 2003 John Wiley & Sons, Ltd. Softw. Pract. Exper. 2003; 33:1097–1116

1106 J. MULLER AND J. G. KORVINK

TemperatureTemperature

FEMEngineFEMEnginep p

Figure 10. Refinement in the vicinity of a corner singularity. Left: initial mesh,right: mesh after 12 refinement cycles.

Statement (1) is strongly supported by [13] which provides a proof on the error bounds. In Section 5we will use an analytically solved example to further demonstrate the effectiveness and reliability ofthe error estimator. Statement (2) is straightforwardly demonstrated by the discussion of Figure 1.Statement (3) is fundamental to FE analysis, see for example [16]. In essence, any increase in the sizeof the approximation space yields equal or more accuracy. Statement (4) is supported by the followingargument: suppose that, based on the value of an estimated element error, we could calculate the idealelement diameter h. Then we could subdivide each element into small elements that each conform tothis geometrical bound once and for all, and the refinement process would then terminate after onlyone cycle. The following counter example shows that this is, in general, not possible. We consider aDirichlet problem for the Laplace equation, illustrated in Figure 10. It is well known that the solutioncontains a singularity a point p. The effect of the singularity is that the parameter h depends on thedistance measured from p: the closer to p, the smaller h. This behaviour of h is not deducible fromthe error estimator alone; it computes its value based only on the domain bounded by the edges ofthe element E and not on the neighbourhood of E. Hence we have to iteratively compute the bestmesh.

4. SOFTWARE ARCHITECTURE AND IMPLEMENTATION

We have chosen an object oriented architecture and implementation (C++) for the method so as toguarantee flexibility and extensibility in a variety of directions. The notation for documenting theclasses and their relationships as well as the description of object interaction are taken from [29].A straight line represents an association between classes. In C++ this means that in one class there isa reference to an object or an object is instantiated by its value from the other class and vice versa.The full bullet represents the fact that one class ‘has’ an object of the other class, in the Boochterminology also known as aggregation. In C++ two classes are related by aggregation if one class

Copyright c© 2003 John Wiley & Sons, Ltd. Softw. Pract. Exper. 2003; 33:1097–1116

A GENERAL PURPOSE ADAPTIVITY DRIVER FOR FE SOFTWARE 1107

Figure 11. Major classes and their relations within the driver software system.

has stored an object of the other class by instance. The third relationship is illustrated by an emptybullet and stands for the fact that one class uses another class. The class being used usually serves as aparameter of an operation of the other class.

Figure 11 depicts the relationship between the major high level objects which set up the driverprogram. The FE tool is represented by a class itself and is constructed according to its type and itsspecific options. The FE tool is associated with the PDE whereas the class ErrorEstimator uses theclass PDE. Each element then uses an error estimator based on the PDE’s numerical solution that isgenerated by the FE tool class. The error estimator, of course, cannot be set up without knowledge of thePDE it corresponds to; it therefore uses the same PDE as the finite element application. The refinementstrategy and the split pattern classes associated with the mesh operate on the latter in such a way that itis modified.

Below this high level structure there are a number of classes required to meet the demands that arisefrom engineering practice. Among them are:

• material properties and their values;• type and dimension of elements;• definition of domain and surface subregions;• boundary condition types and values;• field variable types (temperature, mechanical displacement, electrostatic potential, etc.).

The description of how these classes are related and how instances of them interact would exceed thescope of this article [30]. The data structures of the Mesh-class, however, are of great importance, sincethey enable a fast modification. Figure 12 shows the class Mesh and the relationship to its constituents.

The elements are arranged in a list of binary trees. Here, we take into consideration that the meshis unstructured from a geometrical point of view. However, each element is a binary tree thanks tothe inheritance relationship. Therefore the geometrical split pattern is applied to the data structure in anatural way since each element is the root of another binary tree. Data that are common to all elementswithin the tree structure (such as material properties) can be easily accessed through their definition inthe base class.

Copyright c© 2003 John Wiley & Sons, Ltd. Softw. Pract. Exper. 2003; 33:1097–1116

1108 J. MULLER AND J. G. KORVINK

Figure 12. Class hierarchy and class relationship between major mesh constituents. The arrow denotes aninheritance relationship according to the Booch notation. Other polytopes are easily handled.

Figure 13. Tree structure for two selected roots of the mesh in Figures 7 and 5.

The example in Figure 13 shows the tree structure of elements for the mesh in Figure 7 up to the sixthrefinement level. The depth of the tree is always equal to or higher than the refinement cycle number,as can be easily seen from tree 1. Forests of tree structures as presented in this example, and in whichthe depth of the trees differs significantly, are typical for problems that feature strong singularities.

Although some of the aggregation relationships appear to be redundant (a triangle for exampleis fully defined by its three edges), the direct instantiations of objects within the containing classallow quick runtime access by passing these objects inline. The complementary relationship of edgesand triangles on the one hand and edges and tetrahedrons on the other hand is required to directlyaccess geometrical neighbours during the splitting algorithm. Therefore, edges have to be instantiated

Copyright c© 2003 John Wiley & Sons, Ltd. Softw. Pract. Exper. 2003; 33:1097–1116

A GENERAL PURPOSE ADAPTIVITY DRIVER FOR FE SOFTWARE 1109

independently from the other constituents within the mesh class, hereby ensuring that neighbouringrelationships can be properly set for each of the edge objects. The overhead is minimal and linear inthe number of polytopes.

Compared with typical application-specific FE programs, this is a fairly rich data structure, since itcontains more geometrical entities. Two arguments support our decision to do so: (1) the current costand availability of memory; (2) the need for generality. The first argument can be illustrated as follows.2D meshes are planar graphs and hence described adequately by the Euler–Poincare formula [31]

ν + f − e = const

where ν is the number of vertices, f is the number of faces (i.e. triangles) and e is the number of edgesin the mesh. Typically we have

O(ν) < O(f ) < O(e)

and for connected triangles in a large mesh

3ν � e, e � 3/2f, 2ν � f

Thus the size of the data for a general representation is bounded by βν, β � 6. Clearly this is asmall, linear relationship. In contrast, available memory is growing at a rate of about 2 every 18 months(Gordon Moore’s law [32]) or even faster [33].

We have routinely constructed meshes of O(106) elements, for which we require 500 MB ofmemory for the data representation. Clearly, memory is not a limiting factor. What we gain is moregenerality, the topic of argument (2). Modern FE technology requires a separation of polytopes, thefamily of element shapes, from the position of the DOF variables. For example, the discretization oftechnologically important PDEs require face and edge DOFs, multiple vertex DOFs and DOFs in theinterior of elements. Also important are mixed meshes with neighbouring elements of various types,such as plates, shells and vector elements.

Since we target commercial general purpose FE solvers, which can arbitrarily combine FE familiesin a single mesh, software engineering requirements demand that we are able to cover the general casein an efficient manner.

The dynamic behaviour of our tool is depicted in Figure 14. Our adaptivity tool, as a driver,starts the FE package and those modules necessary to perform an accuracy controlled adaptive cycle.This involves the direct start up of the FE program on the system-level (usually the FE programrun performs the execution of a command file) and the instantiation of all objects relevant for anadaptivity process. These objects are grouped around and within the high-level objects PDE, mesh andits constituents, the elements. The objects are constructed by parsing the command file that is also usedby the FE package.

As soon as the FE tool has rendered its service by calculating the numerical solution, the nodal(and element) values are passed to the mesh and its constituents. The FE tool at this stage is not requiredand therefore can be destroyed. The error estimator object is instantiated to calculate each element’serror values. It calls the elements for the computed solution field values and the geometrical elements.The latter also contains information about material data. By also calling the PDE the error estimatorcan be set up according to (4). Information about the physical problem and the corresponding fields,the differential operators involved and the material properties associated with the elements hereby arecorrectly exchanged.

Copyright c© 2003 John Wiley & Sons, Ltd. Softw. Pract. Exper. 2003; 33:1097–1116

1110 J. MULLER AND J. G. KORVINK

Figure 14. Interaction diagram of the major objects used during a simulation run cycle. The lifetime of each objectis highlighted by an empty thicker bar.

The refinement strategy is then instantiated. Based on the information dispatched by the errorestimator the mesh’s elements are assigned for refinement. The error estimation and refinement strategyclasses are then destroyed. Ready for modification on behalf of the split pattern, the old mesh is alsodestroyed and at the same time, new elements are created on the basis of the element’s labels assignedby the split pattern. The newly created elements form a new mesh. Together with the persistent PDEobject a new FE tool can be instantiated to again calculate a numerical solution.

This cycle of mesh creation and destruction together with restarts of the FE package continues untilthe error estimator object passes the message that the desired accuracy is achieved and the process canbe halted.

Copyright c© 2003 John Wiley & Sons, Ltd. Softw. Pract. Exper. 2003; 33:1097–1116

A GENERAL PURPOSE ADAPTIVITY DRIVER FOR FE SOFTWARE 1111

absolute adaptive

absolute uniform

estimated error

Number of Elements

Log(Energy Norm of Error)

Temperature

FEMEngine

FEMEngine

FEMEnginex=1y=1

x,y=0

294 Elements

300 Elements

50 100 150 200 250 300

-6

-5

-4

-3

-2

-1

Temperature

Temperature

same errordifferent mesh size

Figure 15. Uniform and adaptive thermal FE analysis for an L-shaped domain.

5. EVALUATION AND SIMULATION EXAMPLES

We demonstrate the performance of our driver on selected examples from microsystem technology(MEMS). The first example is more general and serves to demonstrate the efficiency and reliabilityof the error estimator. For an L-shaped polygon, as depicted in Figure 15, the solution of the Laplaceequation is sought, with Dirichlet BCs � = 0 on the bottom at y = 0; and on the upper right boundary� = 1 at x = 1.

The analytical solution that coincides with the weak solution can be obtained via the well knownSchwarz–Christoffel transformation [34], that numerically is carried out by the tool matlab [35].We compare the absolute (i.e. exact) error � − �h for two different situations during the refinementprocess. In the first case the approximate solution �h is obtained by successive adaptive refinementaccording to the algorithms described earlier in this article. In the second case the approximate solutionis obtained by an FE analysis on meshes where all elements are of the same size and in each step

Copyright c© 2003 John Wiley & Sons, Ltd. Softw. Pract. Exper. 2003; 33:1097–1116

1112 J. MULLER AND J. G. KORVINK

2 4 6 8 10 12

5

10

15

20

Estimated Energy Error [10 J]

Refinement Cycles

-3

1

MN

MX

X

Y

Z

0

46.65193.303

139.954186.605

233.257279.908

326.56373.211

419.862

MAY 24 200216:57:21

PLOT NO. 1

NODAL SOLUTION

STEP=1SUB =1TIME=1TEMP (AVG)SMX =419.862

1

MN

MX

X

Y

Z

0

90.095180.191

270.286360.381

450.477540.572

630.668720.763

810.858

MAY 24 200216:37:41

PLOT NO. 1

NODAL SOLUTION

STEP=1SUB =1TIME=1TEMP (AVG)SMX =810.858

Z

1

MN

MX

X

Y

Z

0

97.517195.033

292.55390.066

487.583585.099

682.616780.132

877.649

MAY 24 200217:03:53

PLOT NO. 1

NODAL SOLUTION

STEP=1SUB =1TIME=1TEMP (AVG)SMX =877.649

Z

fuel

Si

DielectricsStep 0 Step 5

Step 12

Error Tolerance

Figure 16. Application to a thermal analysis with the commercial tool ANSYS. The error is reduced below apredefined limit (gray) during 12 refinement cycles.

the number of elements is uniformly increased. On the left side in Figure 15 the final meshes ofboth procedures are shown, together with the isothermal lines of the approximated temperature field.The initial mesh is the same in both cases. In the graph on the bottom right the absolute errors arecompared for different mesh sizes. For meshes that feature the same number of elements, the absoluteerror of the approximate fields are considerably higher for the uniform mesh. The estimated erroraccording to inequality (4) is also shown in the graph. The horizontal arrow in the figure demonstratesthe high level of efficiency of the adaptive method in the sense that a more accurate solution can beobtained with a smaller mesh and hence a smaller amount of computational effort.

The next example considers the thermal analysis of a micro-thruster device, depicted in Figure 16.The device is designed to deliver either an impulse-bit thrust or pressure waves within a sub-millimetrevolume of silicon, by producing a high amount of energy from an ignitable substance contained withinthe microsystem. The microthruster solid fuel is ignited by passing an electric current through apolysilicon resistor embedded in a dielectric membrane. After the ignition phase, sustained combustiontakes place and forms a high-pressure, high-temperature gas mixture. Under the pressure of the gas the

Copyright c© 2003 John Wiley & Sons, Ltd. Softw. Pract. Exper. 2003; 33:1097–1116

A GENERAL PURPOSE ADAPTIVITY DRIVER FOR FE SOFTWARE 1113

Figure 17. Application to a mechanical plate analysis (exaggerated vertical displacement) with the in-house FEprogram FEMEngine. The error is reduced below a predefined limit (gray) during seven refinement cycles.

membrane ruptures, and an impulse is imparted to the carrier frame as the gas escapes from the tank.In Figure 16 the different materials making up the device are separated by white lines.

In our FE simulation we consider the stationary heat distribution after the initial ignition. The FEcomputations are performed by the package ANSYS. The three graphics show the isothermal lines andthe underlying mesh, which for clarity has been omitted on a part of the geometry. The simulation startswith a coarse mesh and iteratively continues until the predefined error tolerance is achieved. The highesterrors occur in the heater region such that major refinement takes place right there. The estimated errorin each refinement cycle is displayed in the lower right part of Figure 16. The predefined error toleranceis marked by the gray region and is reached after the 12th refinement step.

The second example demonstrates the behaviour of the driver software together with our in-houseFE tool FEMEngine. We perform a mechanical plate analysis for a composite bi-material membranesubject to a pressure difference in the vertical direction [14,36]. Membrane-like structures of thiskind are often used in fluidic micro-pump devices. The centre region of the membrane consists ofa mechanically stiffer material. Figure 17 shows the exaggerated deflection of the membrane afterdifferent refinement steps. Starting with a coarse mesh consisting of 16 elements, the error bound is

Copyright c© 2003 John Wiley & Sons, Ltd. Softw. Pract. Exper. 2003; 33:1097–1116

1114 J. MULLER AND J. G. KORVINK

reached after six refinement steps. Major refinement occurs at the material interfaces where elementerrors are highest. In both of the above described simulation problems common FE computations wouldhave been performed using a mesh with an arbitrary density of nodes, usually depending on a maximumelement size that is defined for the FE package’s mesh generator.

Then, it is assumed that the solution’s accuracy could be improved by globally refining thatmesh. In the sense of this paper’s first example we should note that in that case the computationaleffort would be higher when compared with the adaptive refinement process. Although for morecomplicated geometries the analytical solutions are unknown, the efficiency and the reliability of ouralgorithm assures that better approximate solutions can be obtained at smaller computational expenses.Additionally, our tool allows us to specify a tolerance that can be achieved during the refinementprocess.

6. CONCLUSIONS

In this paper we presented a tool that provides a driving mechanism for general purpose FE softwarepackages. The solution quality produced by the FE programs are automatically improved by performingmesh adaptive techniques up to a user-specified accuracy. At the same time the computational resourcesare kept as low as possible. Since, in general, most commercially available FE programs lack a featureto control the accuracy of the numerical solutions, our tool represents a significant enrichment for thedesign and engineering software world.

We use a posteriori residual error estimation to reliably determine the distribution of the numericaldiscretization errors. A maximum refinement strategy is implemented to determine whether certainregions have to be refined in order to obtain a better solution during the next step of the iterativeadaptive process. The splitting of the mesh constituents is performed with a recursive algorithm,thereby assuring mesh regularity in terms of the minimum angle present in the mesh and to preventthe introduction of hanging nodes. The methods are combined within an object oriented framework,hereby ensuring flexibility and extensibility in a wide range of directions.

The most significant future work will involve the extension of the driver tool to more generalproblem domains. Among them are nonlinear problems which represent a fundamental issue inengineering design and analysis. Other important areas of application of our concept are time-dependent phenomena, hereby allowing for dynamic system behaviour. These problems require thatthose errors introduced by the time discretization scheme be estimated consistently along with thosecaused by the spatial discretization [37,38]. Besides the splitting of mesh constituents it seems advisoryto also implement coarsening algorithms [39]. This de-refinement might become necessary in domainregions where the numerical solution becomes stable within a certain time range. The binary tree datastructure arrangement of our mesh constituents then allows quick access and easy handling in eitherdirection within the tree structure.

ACKNOWLEDGEMENTS

This work was partially supported by the Deutsche Forschungsgemeinschaft (DFG) and by an operating grantfrom the University of Freiburg, which is acknowledged here. The authors also wish to thank the anonymousreviewers for their constructive comments.

Copyright c© 2003 John Wiley & Sons, Ltd. Softw. Pract. Exper. 2003; 33:1097–1116

A GENERAL PURPOSE ADAPTIVITY DRIVER FOR FE SOFTWARE 1115

REFERENCES

1. Welcome to ANSYS.com—Open and flexible simulation software solutions for every phase of product design.http://www.ansys.com.

2. ABAQUS. http://www.abaqus.com.3. MACRO Industries—Home. http://www.macroindustries.com/website/index.htm.4. Finite element and numerical methods with object oriented programming in C++—for constrained optimization, variational

methods, and matrix computation. http://www.vector-space.com.5. UG. http://cox.iwr.uni-heidelberg.de/∼ug.6. Bastian P, Birken K, Johannsen K, Lang S, Neuss N, Rentz-Reichert H, Wieners C. UG—a flexible software toolbox for

solving partial differential equations. Computing and Visualization in Science 1997; 1:27–40.7. The virtual album of fluid flow: Introduction. http://www.featflow.de/album/introduction.html.8. Numerical objects: Software for finite element analysis and partial differential equations. http://www.nobjects.com.9. Langtangen HP. Computational Partial Differential Equations Numerical Methods and Diffpack Programming. Springer:

Berlin, 1999.10. Zienkiewicz OC, Zhu JZ. A simple error estimator and adaptive procedure for practical engineering analysis. International

Journal of Numerical Methods in Engineering 1987; 24:337–357.11. Ainsworth M, Oden JT. A Posteriori Error Estimation in Finite Element Analysis. Wiley: New York, 2000.12. Bansch E. Adaptive finite element techniques for the Navier–Stokes equations and other transient problems. Adaptive

Finite and Boundary Element Methods, Brebbia CA et al. (eds.). Computational Mechanics Publications: Southampton,1993; 47–76.

13. Verfurth R. A Review of A Posteriori Error Estimation and Adaptive Mesh Refinement Techniques. Wiley-Teubner:Chichester, 1996.

14. Muller J, Korvink JG. Automatic accuracy control for large aspect ratio multi-layer MEMS simulation. ProceedingsEurosensors XIV, Copenhagen, 1999; 277–278.

15. Taschini S, Emmenegger M, Baltes H, Korvink JG. Smart enumeration in C++: Virtual construction, message dispatchingand tables. Software—Practice and Experience 1999; 29(11):67–76.

16. Strang G, Fix G. An Analysis of the Finite Element Method. Wellesley: Cambridge, 1997.17. Babuska I, Zienkiewicz OC, Gago JP, Oliveira ERdeA (eds.). Accuracy Estimates and Adaptive Refinements in Finite

Element Computations. Wiley: New York, 1986.18. Bank RE, Weiser A. Some a posteriori error estimators for elliptic partial differential equations. Mathematical Computing

1985; 44:283–301.19. Babuska I, Reinboldt WC. Error estimates for adaptive finite element computations. SIAM Journal of Numerical Analysis

1978; 15:736–754.20. Braess D. Finite Elements: Theory, Fast Solvers, and Applications in Solid Mechanics. Cambridge University Press:

Cambridge, U.K., 2001.21. Bansch E. Local mesh refinement in 2 and 3 dimensions. Impact of Computers on Science and Engineering 1991; 3:181–

191.22. Rivara MC. Algorithms for refining triangular grids suitable for adaptive and multigrid techniques. International Journal

of Numerical Methods in Engineering 1984; 20:745–756.23. Mitchell W. A comparison of adaptive refinement techniques for elliptic problems. ACM Transactions on Mathematical

Software 1989; 15:326–347.24. Kossaczky I. A recursive approach to local mesh refinement in two and three dimensions. Journal of Computers and

Applied Mathematics 1994; 55:275–288.25. Maubach JM. Local bisection refinement for n-simplicial grids generated by reflection. SIAM Journal of Scientific

Computing 1995; 16:210–227.26. Reddy BD. Introductory Functional Analysis: With Applications to Boundary Value Problems and Finite Elements (Texts

in Applied Mathematics, vol. 27). Springer: Berlin, 1997.27. Babuska I, Reinboldt WC. A posteriori error estimates for the finite element method. International Journal of Numerical

Methods in Engineering 1978; 12:1597–1615.28. Reinboldt WC. On a theory of mesh-refinement processes. SIAM Journal of Numerical Analysis 1980; 17:766–778.29. Booch G. Object-Oriented Analysis and Design. Addison-Wesley: Reading, MA, 1994.30. Muller J. Accurate FE-simulation of three-dimensional microstructures. PhD Dissertation, University of Freiburg,

Germany, 2001.31. Docarmo MP. Differential Geometry of Curves and Surfaces. Prentice-Hall: New York, 1976.32. Moore GE. Cramming more components onto integrated circuits. Electronics 1965; 38:114–117.33. Hennessy JL, Patterson DA, Goldberg D. Computer Architecture: A Quantitative Approach. Morgan Kaufmann: San

Francisco, CA, 2002.

Copyright c© 2003 John Wiley & Sons, Ltd. Softw. Pract. Exper. 2003; 33:1097–1116

1116 J. MULLER AND J. G. KORVINK

34. Christoffel EB. Sul problema delle temperature stazonarie e la rappresentazione di una data super cie. Annali diMathematica Pura ed Applicata 1868; 1:89–103.

35. The MathWorks: Developers of MATLAB and Simulink for Technical Computing. http://www.mathworks.com/.36. Taschini S, Muller J, Greiner A, Emmenegger M, Baltes H, Korvink JG. Accurate modeling and simulation of thermo-

mechanical microsystem dynamics. Computer Modeling in Engineering and Sciences 2000; 1:31–44.37. Eriksson K, Johnson C. Adaptive finite element methods for parabolic problems. I: A linear model problem. SIAM Journal

of Numerical Analysis 1991; 28(1):43–77.38. Eriksson K, Johnson C. Adaptive finite element methods for parabolic problems. IV: Nonlinear problems. SIAM Journal of

Numerical Analysis 1995; 32(6):1729-–1749.39. Schmidt A, Siebert KG. Adaptive finite element methods: Numerical aspects of parabolic free boundary problems. Lecture

Notes, Summer School, Jyvaskyla, 1996.

Copyright c© 2003 John Wiley & Sons, Ltd. Softw. Pract. Exper. 2003; 33:1097–1116