three-dimensional automatic adaptive mesh generation

4
1700 EEE TRANSACTIONS ON MAG"TCS, VOL. 28, N0.2, MARCH 1992 THREE-DIMENSIONAL AUTOMATIC ADAPTIVE MESH GENERATION N.A.Golias , TD.Tsiboukis Department of Electrical Engineering Aristotelian University of Thessaloniki Thessaloniki, 54006 Greece Abstract-A new technique for 3-dimensional mesh refinement and adaptive mesh generation is presented in this paper. Aprocedure for relini? 3 dimensional tetrahedral meshes, based on Delauney criteria, is develo ed. AddiBonal nodes are inserted on an existin mesh and the tetrahedra roduceIare transformed, so that an optimum mesh is 6rmed. Solution of a probrem with an initial coarse mesh is followed by successive refinements. Furthermore a-posteriori error analysis is em- ployed to estimate local errors and reline the mesh at those regions. A criterion of error estimation, the discontinuity of normal field gradient on common interfaces is pro osed. Several dimerent exam les using the proposed technique a d presenEd to illustrate the usefuleness orthe method. I. INTRODUCTION It is inherent in computed systems that the computational cost should be proportional to the amount of real physical changes taking place in the system. Adaptive refinement is a technique for realizing the above principle, obtaining maximum accuracy with the minimum of com- putational cost. This is accomplished by refining the mesh in those re- gions that present higher errors. A-posteriori error analysis is employed for estimating the local errors and refining the mesh in these regions. 2D Adaptive mesh refinement has been very much employed in the finite element method. Although still a lot of research seems to be needed in this area it has been implemented in various cases[1,2,3,4,5,6,8]. On the other hand 3-dimensional refinement has not yet been employed, and this is due mainly to the great difficulty of refin- ing a 3-dimensional mesh. One has to deal with tetrahedra in 3 dimen- sions and not triangles. Triangles are easy to represent and manipulate while tetrahedra are complicated and their presentation on a 2-dimen- sional graphic screen is not very clear even when their number is small. Beginning with an initial coarse mesh that does nothing more than specify the problem geometry, refinement should follow in those regions that present the highest error in the approximation procedure. The prob- lem is to find the regions that present the highest error and refine them. The need of an efficient criterion for estimating the error is obvious. The discontinuity of normal gradient component on the interface of two re- gions having CO continuity is used as a criterion for local error estima- tion. It is to be noted that the above procedure is completely automatic. The program decides which elements are to be refined and refinement follows completely automatically. This procedure is repeated until cer- tain criteria for convergence are satisfied. II. QUALITY FACTOR OF A TETRAHEDRON With each tetrahedron is associated a number, tetrahedron's quality factor, showing how much the tetrahedron under consideration reseni- bles an equilateral tetrahedron (a tetrahedron with equal edges). The quality factor is a number between 0 and 1. Tetrahedra with quali fac- tor near 1 are nearly equilateral while tetrahedra with low quality xctor look like thin slices (degenerated tetrahedra). Quality factor is defined as the ratio of 3 times the radius r of the inscribed sphere to the radius R of the circumscribed sphere. Q=3-L R Tetrahedra with high quality factor exhibit better approximation and convergence characteristics than thin degenerated tetrahedra. Tetrahe- dra of low quality factor deteriorate system's performance, resulting even in divergence of the iterative techniques of solving linear systems. While the above formula (1) offers a fairly good picture of a tetrahe- dron's quality factor it is very costly computationally (about 200 floating operations for calculating a tetrahedron's quality factor). Due to in- creased complexity of 3-D tetrahedral meshes quality factor is used ex- cessively in topological transformations (referred to in the next paragraphs) and a less costly implementation has to be used. A new for- mula for estimating the quality factor of a tetrahedron is proposed by the authors' as, the ratio of the tetrahedron's volume to the volume of a cube with side the tetrahedron's longest side Manuscript received July 7, 199; 001 8-9464/92$03.O0 Q=n3 12 v (2) L , , X where V is the tetrahedron's volume and Lmax is the tetrahedron's longest edge. This formula of tetrahedron's quality, although not very rigorous since tetrahedra having the same volume have in general differ- ent qualities, however it works well offering the advantage of reducing the calculating effort by a factor of 20 times in comparison with the first formula. The quality of the whole tetrahedral mesh is estimated by intro- ducing two numbers, the mean quality factor Qm and the joint quality factor Qj, defined as follows : 13) \-I (4) where NEL is the number of tetrahedral elements of the mesh and Qi is the quality factor of tetrahedron i. 111. INSERTING NEW NODES Insertion of new nodes on an existing mesh can be performed in three different ways : a) in the interior of a tetrahedron (usualty its ba- rycenter) dividing it, in this way, to 4 new tetrahedra, b) on the ba- lycenter of an external face or on the common face between two adjacent tetrahedra, having as a result to triple the number of tetrahedra em- ployed, c) on the midside of an edge thus refining all the tetrahedra that have this edge in common, doubling the number of tetrahedra involved, as is shown in Fig.la,lb,lc respectively. Fig.1 Insertion of New Nodes The combination of the above techniques can be used for the inser- tion of new nodes on the system. It is obvious that edge refinement is the more general of the three since it allows new nodes to be placed on ex- ternal edges and boundaries while this can not be done by the others. Further from the application of the above techniques it is observed that 0 1992 IEEE

Upload: td

Post on 22-Sep-2016

215 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Three-dimensional automatic adaptive mesh generation

1700 E E E TRANSACTIONS ON MAG"TCS, VOL. 28, N0.2, MARCH 1992

THREE-DIMENSIONAL AUTOMATIC ADAPTIVE MESH GENERATION

N.A.Golias , TD.Tsiboukis Department of Electrical Engineering Aristotelian University of Thessaloniki

Thessaloniki, 54006 Greece

Abstract-A new technique for 3-dimensional mesh refinement and adaptive mesh generation is presented in this paper. Aprocedure for relini? 3 dimensional tetrahedral meshes, based on Delauney criteria, is develo ed. AddiBonal nodes are inserted on an existin mesh and the tetrahedra roduceIare transformed, so that an optimum mesh is 6rmed. Solution of a probrem with an initial coarse mesh is followed by successive refinements. Furthermore a-posteriori error analysis is em- ployed to estimate local errors and reline the mesh at those regions. A criterion of error estimation, the discontinuity of normal field gradient on common interfaces is pro osed. Several dimerent exam les using the proposed technique a d presenEd to illustrate the usefuleness orthe method.

I. INTRODUCTION It is inherent in computed systems that the computational cost

should be proportional to the amount of real physical changes taking place in the system. Adaptive refinement is a technique for realizing the above principle, obtaining maximum accuracy with the minimum of com- putational cost. This is accomplished by refining the mesh in those re- gions that present higher errors. A-posteriori error analysis is employed for estimating the local errors and refining the mesh in these regions.

2D Adaptive mesh refinement has been very much employed in the finite element method. Although still a lot of research seems to be needed in this area it has been implemented in various cases[1,2,3,4,5,6,8]. On the other hand 3-dimensional refinement has not yet been employed, and this is due mainly to the great difficulty of refin- ing a 3-dimensional mesh. One has to deal with tetrahedra in 3 dimen- sions and not triangles. Triangles are easy to represent and manipulate while tetrahedra are complicated and their presentation on a 2-dimen- sional graphic screen is not very clear even when their number is small.

Beginning with an initial coarse mesh that does nothing more than specify the problem geometry, refinement should follow in those regions that present the highest error in the approximation procedure. The prob- lem is to find the regions that present the highest error and refine them. The need of an efficient criterion for estimating the error is obvious. The discontinuity of normal gradient component on the interface of two re- gions having CO continuity is used as a criterion for local error estima- tion.

It is to be noted that the above procedure is completely automatic. The program decides which elements are to be refined and refinement follows completely automatically. This procedure is repeated until cer- tain criteria for convergence are satisfied.

I I . QUALITY FACTOR OF A TETRAHEDRON With each tetrahedron is associated a number, tetrahedron's quality

factor, showing how much the tetrahedron under consideration reseni- bles an equilateral tetrahedron (a tetrahedron with equal edges). The quality factor is a number between 0 and 1. Tetrahedra with quali fac- tor near 1 are nearly equilateral while tetrahedra with low quality xctor look like thin slices (degenerated tetrahedra). Quality factor is defined as the ratio of 3 times the radius r of the inscribed sphere to the radius R of the circumscribed sphere.

Q = 3 - L R Tetrahedra with high quality factor exhibit better approximation and

convergence characteristics than thin degenerated tetrahedra. Tetrahe- dra of low quality factor deteriorate system's performance, resulting even in divergence of the iterative techniques of solving linear systems.

While the above formula (1) offers a fairly good picture of a tetrahe- dron's quality factor it is very costly computationally (about 200 floating operations for calculating a tetrahedron's quality factor). Due to in- creased complexity of 3-D tetrahedral meshes quality factor is used ex- cessively in topological transformations (referred to in the next paragraphs) and a less costly implementation has to be used. A new for- mula for estimating the quality factor of a tetrahedron is proposed by the authors' as, the ratio of the tetrahedron's volume to the volume of a cube with side the tetrahedron's longest side Manuscript received July 7, 199;

001 8-9464/92$03.O0

Q=n3 12 v (2) L,,X

where V is the tetrahedron's volume and Lmax is the tetrahedron's longest edge. This formula of tetrahedron's quality, although not very rigorous since tetrahedra having the same volume have in general differ- ent qualities, however it works well offering the advantage of reducing the calculating effort by a factor of 20 times in comparison with the first formula. The quality of the whole tetrahedral mesh is estimated by intro- ducing two numbers, the mean quality factor Qm and the joint quality factor Qj, defined as follows :

13) \-I

(4)

where NEL is the number of tetrahedral elements of the mesh and Qi is the quality factor of tetrahedron i.

111. INSERTING NEW NODES Insertion of new nodes on an existing mesh can be performed in

three different ways : a) in the interior of a tetrahedron (usualty its ba- rycenter) dividing it, in this way, to 4 new tetrahedra, b) on the ba- lycenter of an external face or on the common face between two adjacent tetrahedra, having as a result to triple the number of tetrahedra em- ployed, c) on the midside of an edge thus refining all the tetrahedra that have this edge in common, doubling the number of tetrahedra involved, as is shown in Fig.la,lb,lc respectively.

Fig. 1 Insertion of New Nodes The combination of the above techniques can be used for the inser-

tion of new nodes on the system. It is obvious that edge refinement is the more general of the three since it allows new nodes to be placed on ex- ternal edges and boundaries while this can not be done by the others. Further from the application of the above techniques it is observed that

0 1992 IEEE

Page 2: Three-dimensional automatic adaptive mesh generation

1701

employing edge division (inserting nodes on niidsides of edges) leads to better results in view of mesh quality. The new tetrahedra produced have a much better quality factor than the ones produced when nodes are in- serted on faces or the interior of tetrahedra. In the following analysis placement of nodes on the midside of edges is adopted as the onlyway to insert new nodes on the existing mesh.

IV. TOPOLOGICAL IMPROVEMENT OF QUALITY FACTOR

time a change takes place. A value of 0 means that node is internal, 1 that node lies on an external surface, 2 that node lies on an external edge and 3 that node lies on a junction of two or more external edges as is shown in Table.1.

Table.1 Node Position in Mesh

I Insertion of new nodes on the existing mesh and division of the exist-

ing tetrahedra has as a result to produce misshaped elements (tetrahe- dra of low quality factor Q). After one or two subdivisions have been made the new formed tetrahedra are of low quality, breaking down all system performance, and no further subdivision is possible. The dete- rioration of element quality may be forbidding in letting further refine- ments since the possibility of forming overlapping tetrahedra (tetrahedra that share common space in 3D) is increased. Therefore a technique for improving quality factor should be applied.

Clearly the exchange of diagonals, the 2-dimensional technique based on circle criterion, cannot be applied in three dimensions since it destroys the boundaryof the tetrahedra[7]. )%change of diagonals can be employed only in the case when the two faces lie on the same surface, as is the case on adjacent external faces lying on the same planar surface. Exchange can be performed as is shown in Fig.2a. Modification must also be performed in a patch of elements, in a way that it does not destroy the external boundary. A technique of transforming 2 tetrahedra to 3 and vice versa is presented here. It is a property of Delauney mesh that no node lies on the interior of a tetrahedron's circumsphere. This property of a Delauney mesh is referred to as the SPHERE criterion.

Two tetrahedra that have a common face and do not satisfy the sphere criterion can be transformed to 3 tetrahedra. On the opposite 3 tetrahedra that have a common edge can be transformed into 2 tetrahe- dra which satisfy the sphere criterion as is shown in Fig.2b. A little atten- tion must be paid here since the exchange is valid only'if the edge produced is in the interior space of the two tetrahedra. So a check has to be made as to where this edge belongs.

Fig.2 Topological Delauney Transformations a) Exchanging external faces

b) Transforming 2 to 3 & 3 to 2

It has to be noted that sometimes this local topological transforma- tion results on local quality factor decreased. The new tetrahedra formed have a joint quality factor worse than the initial. It IS a mistake to cancel the topological transformation and go back to the initial state of better quality factor, since the initial situation does not satisfy the Delauney Sphere criterion and what we get is not a Delauney tessellation. Al- though the second state has a lower quality factor it satisfies the Delau- ney criterion and the tetrahedra can be transformed again and improve overall quality factor, resulting finally in a Delauney Tessellation.

V. NODE R E W T I O N It is further possible to increase element quality factor by node relax-

ation. The technique proposed is an extension of the 2-dimensional node relaxation technique although a little more complicated. In order node relaxation to be applied, distinction of internal and external nodes should be made. For this reason a variable is kept for each node to indi- cate node's positioning in the mesh and is updated automatically every

I 0 : INTERNAL NODE 1 I 1 : SURFACE NODE I ti 2:EDGE NODE I

Node relaxation is applied to internal nodes and surface nodes. Edge or Corner nodes are not moved. The application of node relaxation on surface nodes is analogous to the 2-dimensional technique although more complicated since nodes on the same surface must be recognized and processed 181.

Consider all the nodes connected to node k. These nodes form a polyhedron. The joint quality factor of the tetrahedra that form this polyhedron can be increased if node k is moved to a suitable position. To find this position by an analytic technique is computationally not effi- cient. One must find the direction node k has to be moved in order to in- crease quality factor. This direction can be found by a random (trial and error) Monte Carlo technique which is so computationally costly that is forbidding to implement. Things could be much easier if we had an indi- cation of this direction a-priori. Indeed there is an alternative to this dif- ficult task. Assume 1,2,3, ..., n are the vertices of the polyhedron. Then the coordinates of the point where node k must be moved are:

The above thought becomes reasonable when the tetrahedra that form the polyhedron surrounding the node under consideration have al- ready a very good quality factor (are nearly equilateral). In this case the above point is the polyhedron's barycenter and tetrahedra formed are nearly equilateral.

But in case this ideal situation does not hold no one can guarantee that moving the node towards this new position will increase quality fac- tor. Further this point, may be outside the polyhedron's internal space. Moving the node in this position results in misshapen and overlapping tetrahedra, destroying the mesh.

A good point to start with is to use the above position to show the direction towards which the node has to be moved. This does not guaran- tee that quality will increase towards this direction and so a check has to be done to see if quality is actually increased and only then move the node. A check has also to be made to insure that node remains on the in- terior space of the polyhedron and no overlapping tetrahedra are formed. This procedure is applied more than once until the nodes con- verge to their new positions. Usually 10 iterations are enough for the nodes of the system to converge. We observe that during every iteration the overall quality factor can only increase resulting in a better mesh. The better the mesh, the closer we come to the ideal situation with equi- lateral tetrahedra and the point the node is moved is indeed the point we are looking for.

Once node relaxation has been applied and equilibrium has resulted in our system a new sweep of the Delauney algorithm is applied so that system overall quality factor is maximized. This cycle of node relaxation and Delauney stabilization IS repeated until convergence has been at- tained. Usually 5 or 10 iterations are enough for equilibrium to be at- tained.

,

VI. A-POSTERIORI LOCAL ERROR ESTIMATION A-posteriori error analysis is employed for estimating local errors.

Finite element solution is made by approximating an unknown continu- ous quantity by a piecewise CO continuous one. Scalar potential f conti- nuity on the common face between two adjacent tetrahedra has as a result continuous parallel (Vf .to) component and discontinuous normal one (Vf .no) to this interface. The exact solution presupposes both Vf components to be continuous. Ci continuity is not preserved across ele-

Page 3: Three-dimensional automatic adaptive mesh generation

1702 ment interfaces. It is concluded that approximating the continuous quan- tity f by a piecewise CO continuous one has as a result discontinuous nor- mal Vf component across element interfaces. The larger the discontinuity, the larger is the error in the approximation. So the discon- tinuity of the normal components of the field gradient Vf on the inter- face between two adjacent elements can be used as an error estimator suitable for adaptive refinement.

Consider two neighboring tetrahedral elements e and f with a com- mon face. Assuming that no is the unit vector normal to the common face a parameter E1 (Error Indicator) is defined as follows.

E I = J I (V f (e ) -V f ( f ) ) . no I2dS (6)

where Vf Vf (f) are the field gradients of tetrahedra e,f respec- tivelyand Sef the face area.

An error indicator has been found but it is referred to faces of te- trahedra. This error indicator must be weighted on an edge by edge basis or on an element basis. If Edge Error Indicators are obtained then edges with greater Error Indicators are refined. If Element Error Indicators are obtained then elements with greater erron are refined. Once an ele- ment is decided to be refined, its largest side is found and refined. By weighting the sides of the tetrahedron one can favor external sides, sides lying on the boundary, obtaining a higher quality mesh. The number of new nodes inserted in each cycle is determined by the system user. Usually the number should be such so that the refined mesh has about 1.5 or 2 times the number of tetrahedra of the previous mesh.

VII. ADAPTIVE REFINEMENT ALGORITHM This procedure of refinement, topological transformation and node

relaxation, is repeated until it is decided that certain termination condi- tions are satisfied, i.e. the solution has attained a respectable accuracy or computer resources have been fully exploited. The flow diagram of the adaptive refinement algorithm is shown in Fig.3.

SRf

I rnon1.F.M D E F I N I T I O N VORM I N I ' I I A l . MI'S11 I

S A T I S I' 181) 1 I J I T - - -

(NI>--1

Fig.3 Adaptive refinement flow chart

VIII. APPLICATIONS In order to test the algorithm developed, i t has been first applied to

generate a uniform tetrahedral mesh in a cube. The results are presented on Fig.4, while on Graph.1 the Mesh Qualities are presented. Our refine- ment results in very good meshes with typical quality factors of 0.7-0.8.

Next, current flow determination in the conductor of Fig.5 is exam- ined. This model problem has been chosen due to abrupt field variation near edge AB. An initial mesh is formed for this problem consisting of 18 tetrahedra and 16 nodes shown in FigSa. We obesrve the curvature of fieldlines on the conductors corner resulting in overrefinement in that region as would be expected. The higher rate of convergence of the adap- tive refinement versus the uniform can be seen i n the results presented in Graph.2.

Finally, the application to the problem of two conductors' junction, used in metal welding, is presented. It is directly obvious from the meshes presented in Figd that this problem is verydifficult to solve with- out adaptive mesh generation. Refinement near the conductors' junction is obvious since it is in this region that abrupt field variation appears.

IX. CONCLUSION A new technique for 3-dimensional adaptive mesh generation is de-

veloped and applied successfully. A new method of refining and stabiliz- ing 3-dimensional meshes is presented. In addition a criterion for

a-posteriori error analysis inthree dimensions is proposed, allowing adaptive refinement to be performed at regions of high error. All the process is fully automatic requiring no intervention of the user.

REFERENCES 111 Z.J.Cendes,D.N.Shenton,"Adaptive mesh refinement in the finite ele- ment computation of magnetic fields",IEEETrans. on Mag. Vol-21 NOS,

[2] J.Peraire,M.Vahdati,K.Morgan and O.C.Zienkiewicz,"Finite Element Euler Computations in Three Dimensions", 1nt.J.Numer. Meth. Eng.,

[3] A.M.Pinchuk and P.P.Silvester,"Error estimation for automatic adap- tive finite element mesh generation",IEEE Trans.onMag.,Vol-21, No.6,

[4] M.S.Shepard,"Automatic and adaptive mesh generation",IEEE Trans. on Mag.,Vol-21,1985,pp.2484-2489. [SI J.Penman and M.D. Grieve,"Self-adaptive mesh generation technique for the finite element method",IEE Proceedings Vol-134, Pt.A, No.8,

j6] A.Raizer,G.Meunier and J.L.Coulomb,"An approach for automatic adaptive mesh refinement in finite element computation of magnetic fields",IEEE Transon Mag.,Vol-ZS, No.4,1989,pp.2965-2967. [7] D.N.Shenton,Z.J.Cendes,"Three-dimensional finite element mesh generation using delaunay tesselation",IEEE Tramon Mag.,Vol-21, No.6,November 1985. [8] N.A.Golias, T.D.Tsiboukis, "Adaptive mesh refinement in 2-D finite element applications",International Journal of Numerical Modeling, Electronic Devices and Fields (1991).

1 9 8 5 , ~ ~ . 181 1-1816.

26,1988,~~.2135-2159.

1985 ,pp. 255 1-2554.

1987,pp.634-650.

Fig.4 Uniform refinement for a cube

a) 6, tetrahedra b) 1998 tetrahedra

Quality

0.77 0.7Ql

0.06 o.077 600 ' 1000 IS00 2000

Number of Tetrahedra

Graph.1 Quality of cube meshes

2600

Page 4: Three-dimensional automatic adaptive mesh generation

1703

Fig.3 Adaptive mesh refinement of T-conductor a) Initial mesh with 18 tetrahedra. Adaptive mesh with 1314 te-

trahedra a) external view b) whole mesh d) Equipotentials

lop(error)

1 , .. .

-1.6 ADAPTIVE REFINEMENT c

- I . O L i - 2 0 200 400 600 800 1000 1200 1400

Number 01 Tetrahedra

Graph.2 Error in functional of T-conductor

Fig.6 Adaptive mesh refinement of conductors’ junction a) Initial mesh with 36 tetrahedra b) Mesh with 965 tetrahedra c)

Adaptive mesh with 3026 tetrahedra with enlarge view of the con- ductos’ junction d) Equipotentials

Quality 0.8

0 500 1000 1500 2000 2500 3000 3500 Number of Tetrahedra

Graph.3 Quality factors of conductors’ junction meshes