prev

next

out of 4

Published on

22-Sep-2016View

216Download

3

Transcript

EEE TRANSACTIONS ON MAGNETICS, VOL. 27, NO. 5, SEF'TEMBER 1991 4197 AUTOMATIC MESH GENERATION BASED ON EXPERT-SYSTEM-METHODS K. Reichert, J. Skoczylas, T. Tarnhuvud Department of Electrical MachineJ, Swiss Federal Institute of Technology (ETH), CH-8092 Zurich, Switzerland A h s t r n r i - In this paper the mesh generation process for two- dimensional problems is discussed. A new mesh generator based on expert-system methods i s presented. For every corner of a closed polygon the corner-angle conditions are analysed and dif- ferent types of mesh primitives are generated. In every step of the mesh generation the conflict with the existing mesh is recognized and an optimal action wil l be chosen. Thus, any area surrounded by a polygon even wi th a very sophisticated contour can be suc- cessfuly covered with a basis mesh. This mesh is further improved by side-swapping and node-shifting algorithms, both optimizing the shape of the elements and the location o f the nodes. Problem- oriented adaptive mesh refinement algorithms provide further op- t imization according t o suitable criteria. INTRODUCTION Any CAD-System produces a set of geometry primitives such as points, lines, arcs, circles, ... specifying the material interfaces and the boundaries of a device. The finite element mesh has t o be f i t ted t o this geometry in an optimal sense. This requires a powerful mesh generator and also methods for optimizing and for refining an existing mesh in order t o achieve higher accuracy. Thus, the ful l mesh generation process consists of the following tasks: Mesh generation Mesh optimization 0 Adaptive mesh refinement Before going into detail in the following sections, some definitions o f the mesh primitives must be given (see fig. 1): Node - the common point of some mesh-elements or two node-chains. Node-chain - The line joining two nodes, both lying on the interface boundary between two types of materials or on a geometric boundary. Edge - The line joining two nodes of the actual polygon considered for meshing. At the beginning of the mesh gen- eration the edges are identical with the node-chains. during the generation they are identical with the element sides. Polygon - A closed contour of edges defining the actual area t o be meshed, i.e. t o be covered with finite elements. Element - finite element: triangle or quadrangle, determined by nodes and edges. Corner - an area between two edges with a common node as a corner point. MESH GENERATION The basis for the finite element mesh generation are node-chains being often irregularly distributed on the geometry. As the shape of the devices may be of great complexity, having many corners I Figure 1: hlesli prirnit ives with roundings, long and straight edges and any sharp curvatures, the distribution of nodes can be strongly nonuniform. The mesh generator must therefore be flexible and robust enough t o handle any sophisticated geometry and produce an optimal mesh. This mesh should have the following features: 0 The number of elements should be as small as possible for a desired accuracy of the solution. 0 The triangles should differ as l i t t le as possible from equilat- ' erals. This provides the required high quality of the approx- ima t ion. A constant decay of the elements density should be provided to bridge the gap between areas wi th course density of node- chains and areas with high density. ~ _ _ _ _ ~ ~ Basic functions The meshing problem t o be solved within irregular polygons can be formulated in general as follows: 0 Gitwn: A polygon wi th 77 edges o f lenght ~!(i). n nodes wi th coordinates r(z) ,y(z) , and 17 corner angles ~ ( i ) (see Fig 2). To bc d e t e r m i n e d : An optimal sequence of single genera- t ion actions f rom all possible actions, satisfying the following conditions: the new polygon resulting f rom the generation o f a sin- gle element should be more uniform, i.e. approaching the shape o f a circle, the number of edges should decrease, the area o f the element being created should be as small as possible, elements growth should be uniform, elements should be as equilateral as possible. This problem IS being solved by means o f E r y c r t - S y . ~ / r n ~ Alrfhods. The mesh generation process is controlled by a series o f " r d c s ' ' of the following type IF ( " rond i / io7 i" k ) THEN " m c s h g c i i c i u l i o t i u c t ~ o t i " k 0018-9464/91$01.00 0 1991 IEEE I 4198 The general structure of such a " r i i / c " k i s as follows: set init ial conditions for the search o f an optimal triangle t o be generated DO for all the n corners of the actual polygon: - IF "condition for rule I; at corner i" THEN * create new triangles by means o f the lcfh action * write new node ( i f defined ) and new triangle 1: modify the pointer vector z v ( i ) determining the * set new conditions at the new edges. a t the ith corner and at adjacent edges, datas into the finite element data structure. new sequence o f edges, - END IF ENDDO n Figure 2: FE-mesh geiierat i on in ail i rregular polygon. The following "cot~diiions" have to be implemented in the mesh generation process: Corner angle condi t ions: The angle a(i) of the ill1 corner and all angles o f the triangles being generated in this corner should satisfy specified angle conditions. The purpose of this criteria is to avoid very slender triangles and t o select optimal ones in the process. Alin.im.tim conditions: From all possible actions those generating triangles wi th minimum area and minimum length of edges should be selected. Thus, the mesh grows uniformly from those parts of the polygon with the most dense seg- mentation by node-chains. Afi77i7nt~rn grourth co~tdc i ions: Since many actions of the type "cut-off element" are possible at the same time, there exists the problem t o select the most favourable one. The rat io of the areas of the new triangle being cutted- off and the last triangle has t o be l imited, thus ensuring a smooth growth of the mesh. )Yoit - i t l l c r f r r c i t c c c o ~ t d i i i o i ~ ~ ~ : be created if: A new triangle can not - i t wil l cover any other existing triangle, - it wil l cross any edge of existing triangles or the bound- ary of the polygon, below a certain l imit (see Fig. 3). - it 's distance t o any edge of the actual polygon wil l be IEEE TRANSACTIONS ON MAGNETICS, VOL. 27, NO. 5, SEPTEMBER 1991 new edges Figure 3: Non- in t erferencc roridit ions. N o t - la.si ~ a c i i r i t y conditions: In order t o avoid the mesh generation activity expanding f rom just one edge of the actual polygon, every new edge is being inactivated as long as other actions at old active edges are possible. In case there is no solution action possible all edges o f the polygon are reactivated. From the experience wi th the algorithms, the following actions of mesh generation are considered t o be necessary t o achieve an optimal generation process (see Fig. 4): Cut-off one corner by generating one triangle Cut-off one corner by generating two triangles Cut-off two corners by generating three triangles Generating one equilateral triangle Generating one right-angled triangle Generating two triangles Fig. 4 gives more details on these actions including their specific if -conditions. a) Cut-off one corner by generating one triangle "If- Condif ions ": 30" < a , < 115". 30" < P t , P > + i - Minimum area F,, 1, > ~ l , , ~ or 1 ,+1 > xl, b) Cut-off one corner by generating two triangles (y, "If- Coiiditions ": -. I 70" < a,tl < 125" 150" < Q,, a , + z < "Dcs igtc ": P, on diagonal o f rhombus: c = 0 . 7 f l z c) Cut-off two corners by generating three triangles "11- ( IO7Ldl t107ZS "1 210". I+ 1 4199 DO WHILE 71 > '{ and triangles may be generated without violat- tng the interference conditions Cut-off all corners by generating three triangles ( action c) ) Cut-off triangles ( action a) ) at the new corners Generate a new triangle ( action d). e) or f ) ) Cut-off triangles ( action b) ) wi th minimal area 1; as long as the condition F, < 1 81; i s true END DO EFE TRANSACTIONS ON MAGNETICS, VOL. 27, NO. 5, SEPTEMBER 1991 d) Generating one equilateral triangle "If- Cotid i / i o i i .S ": 119- < n,. a,,, < 295", Minimum of l , , "Ursigi i": equilateral triangle e) Generating one right-angled triangle "If- Colldl l lol ls " I,,,, > 31",,,, and I , 5 I . a i-1 f ) Generating two triangles "If- Coiidafioizs " 129" < a, < 295". Minimum o f I , , go" < a$+, < 140", " D C S lqll'l equal-sided triangle on I , . cut-off-triangle I', - Pa Figurr 4: The i ~c l i o i i s of tircsli gencrn(ioii. The angles conditions for the above specified actions have been determined more or less heuristically. T h e a l g o r i t h m for a u t o m a t i c - mesh g e n e r a t i o n ill i r r e g u l a r polygons All functions of the mesh generation shown above have to be integrated hierarchically in an expert decision process, consisting of three phases ~ _ _ _ - _. _-___ -_ Preparation phase ~~ The purpose of this phase is t o equalize the corners of the init ial Dolveon and t o eliminate acute corners . ,., Cut-off all triangles with ( I , i 110" and I , ;. 4 I , , 41, (action a) Fig 4 ) Cut-off all close to right-angled corners by generating two triangles (action b) Fig 4 ) Cut-off all triangles (action b) ) with minimal area 1; as long as the following conditions are true I,,,", ' I,,,,,, or I , , > I., < 1 81 ; Final generation phase At the end of the main phase of the mesh generation there may be sti l l more than three edges of the polygon left free due t o the interference conditions. The meshing is continued by means of the action "cut-off triangle" in an optimal sequence as long as n is greater than three. DO WHILE 71 > 3 Cut-off triangles ( action a) ) not violating interface con- ditions with minimal weighted area n , / , / , + l s i ~ ~ o , and c l , < 0 111 "J Increase o , , , ~ , in steps of 10" from 110" unti l o,,,,, 2 179'' if no more actions of mesh generation are possible due t o if - co i id i f i o~ l s . END DO The remaining three edges determine the last triangle. The final phase of mesh generation is always successful. An optimization phase as wil l be described in the next section ends the mesh gen- eration. In case of very complex polygons with a highly non-uniform node- chain distribution the mesh generation procedure wil l have diffi- culties t o avoid slender elements, especially when cutting-off trian- gles. The local decay of the mesh density must also be optimized. The mesh optimization wil l be achieved in two steps: z i d r -st iwppii)~/: Pairs of triangles sharing a common side and having the same material properties are tested for swapping, using the circle criterion 111 (see Fig. 5) due to the "if- condition" 11' < ]EEE TRANSACTIONS ON MAGNETICS, VOL. 27, NO. 5, SEPTEMBER 1991 4200 no swapping swap Figure 5: Sitlc-swapping conditions. which are specific for each quantity t o be calculated. Based on a solution of the field quantities ( potential ...) at the nodes of the init ial mesh a-posteriori adaptive mesh refinement is performed in two steps: The mesh is first refined globally according t o an error cri- teria which corresponds to the global error in the solution. 121, 131 141, The resulting mesh serves as / J ~ I . F I C 71rcsh for the postprocessing calculations where new meshes are gen- erated. After having reached the accuracy of the global solution re- quired the postsprocessing calculations follow. Here, the problem-oriented local mesh refinement wil l be executed t o determine specific field quantities with the accuracy required. The basic idea of this approach i s to refine the mesh adap- tively but only locally, e.g. along the path of integration for the force calculation. Thus, for different quantities differ- ent /u iy< / i i ) r .s / i ( .s will result according t o the property of the quantity and the error criteria used. W i th this strategy the number of elements and the computation t ime can be reduced considerably without affecting the accuracy 13). This process i s shown in the figure 6 Geometry User Initial mesh L=l I Refinement I Basic mesh I Local Refinements Target meshes EXAMPLES FOR T H E N E W MESH GENERAT1O.N PROCESS The mesh generation procedure has been applied t o a large number of field calculation problems A typical example is given in figure 7 REFEREN-CES [I] Cendes Z.J., Shetiton D., Shahnasser H. Magnetic field com- putation using Delunay triangulation and complementary fi- nite element method, IEEE Trans. on Magnetics, Vol.l\nAG- 19. pp. 2551-2554, 1983. 121 131 141 Pinchuk A.R., Silvester P.P.. Error estimation for automatic adaptive finite element mesh generation, IEEE Trans. on Magnetics, Vol.MAG-21. pp. 2551-2554, 1985. Tsrnhuvud T.. Reichert K.. Skoczylas J., Problem-oriented adaptive mesh generation for accurate finite-element calcula- t ion, IEEE Trans. Magnetics, Vol.MAG-24, No. l . , pp. 779ff. Jan. 1990 Penman J.. Grieve M.D. Self-adaptive mesh generation technique for the finite-element method, IEE Proceedings. vo1.134. pp. 634-649, 1987.