mesh generation methods over plane and curved surfaces - CiteSeerX

37 downloads 0 Views 222KB Size Report
Quadrics and surfaces of revolution are transformed from the real space into a ... surfaces to generate a mesh in a parametric plane and, later, transform it in the ...
MESH GENERATION METHODS OVER PLANE AND CURVED SURFACES

Alejandro Díaz-Morcillo, Agustín Bernal-Ros and Luis Nuño Departamento de Comunicaciones, Universidad Politécnica de Valencia Camino de Vera s/n, 46071 Valencia (Spain) Tel.: +34 96 387 78 22, Fax: +34 96 387 73 09 E-mail: [email protected]

Abstract. In this paper, a set of mesh generation methods over plane and curved surfaces is presented. The surfaces can be plane, just defined by their boundary (as cylinders or cones), quadrics, surfaces of revolution or a combination of these by means of a multiblock definition. The basic method for plane surfaces and those defined by their boundary is based on a advancing front / algebraic combined technique for two dimensions. Quadrics and surfaces of revolution are transformed from the real space into a parametric plane, in which the previous basic method can be applied and, later, the inverse transformation is done to obtain the final mesh. Keywords. Surface mesh generation, Advancing front, Transfinite interpolation, Multiblock methods, Structured and unstructured meshes, Ruled, quadric and revolution surfaces Introduction The mesh generation is a main part of the finite element analysis, and the solution obtained with the finite element method depends strongly on the quality of the mesh. A good meshing method must generate a correct mesh, i.e., boundary conforming, without holes, without free edges and without intersecting elements, and containing as few badly shaped elements as possible. There are a large variety of meshing methods in two and three dimensions. In a simple classification we can refer advancing front [1-3], Delaunay-Voronoï [4-7], and quadtree/octree [8,9] methods, which are able to generate unstructured meshes of arbitrary geometries. Structured meshes can be obtained by means of transfinite mapping methods [10,11] or solving a partial differential equation system [12]. A descriptive review of these methods can be found in [13]. Concerning the surface mesh generation, a general method for surface patches can be found in [14], and more specific methods in [15]. The aim of this paper is the description of a basic method for meshing plane surfaces or those defined by their boundary, and two methods for quadrics and surfaces of revolution, respectively, which use the method for plane surfaces to generate a mesh in a parametric plane and, later, transform it in the final mesh. Although the set of methods for plane or curved surfaces presented is of wide application, we will use examples of domains corresponding to electromagnetic problems in closed boundaries, concretely in transmission lines (2D) and electromagnetic cavities (3D). Concerning the type of mesh, these methods can generate triangular or quadrilateral elements, and, therefore, it is possible to generate triangular meshes and quadrilateral/triangular hybrid meshes. Triangular meshes are created as a result of the breakdown of quadrilateral elements in two triangles. Two criteria can be applied for this splitting: the shortest diagonal or the biggest angle criterion. Better results are obtained with the last one and, consequently, it has been implemented here.

Plane Surfaces The mesh generation method for plane surfaces is based on an advancing front / algebraic combined technique and is the base for the meshing methods for more complex surfaces as quadrics or surfaces of revolution. In its basic form, it is able to mesh quadrilateral domains, i.e., areas defined by four lines. Nevertheless, a modification of the method has been developed in order to allow the meshing of triangular areas. In that case, the triangle is transformed in a quadrilateral by “cutting” a corner of the triangle, that is, generating an edge and a triangular element in one corner, and obtaining the mesh of the rest of the domain by means of the method for quadrilateral areas. Fig. 1 shows the evolution of the basic method for a simple example. Starting from one side of the quadrilateral, the mesh progresses until the domain is completely discretized. In each step of the method, if the new quadrilateral can be meshed with an algebraic method, i.e., the number of divisions or edges in its opposite sides is the same, a transfinite mapping method [10] is used. If it is impossible, a set of inner nodes and edges joining these nodes are generated in order to split the quadrilateral in two smaller quadrilaterals, one of them with, at least, one side with just one division. Fig.2 shows an example of this splitting. The front advances in the direction where the two opposite sides have a bigger difference in number of divisions. In order to assure the convergence in the number of divisions of the two lateral opposite sides of the quadrilateral along the algorithm evolution, the excess of divisions in a lateral side must be distributed between the two new quadrilaterals (c1 and c2). The method applies recursively with each one of these quadrilaterals. Each branch of the recursive algorithm finishes when the quadrilateral has two opposite sides with one division (in that case, only edges and elements are generated, as Fig. 3 shows), or when the quadrilateral can not be broken down in two quadrilaterals. This last situation occurs when two sides sharing a vertex have just one division. These quadrilaterals require a specific management according to the number of divisions in their two other sides. The mesh quality becomes worse when the number of divisions of these sides increases. Fortunately, it is very unusual to reach situations with a great difference in the number of divisions. Fig. 4 shows the meshing patterns for this type of quadrilaterals.

a)

b)

c)

Figure 1. Mesh generation method for quadrilateral areas

The number of inner nodes generated at each step is a weighted average of the number of nodes in each side in the direction of the front. This weighting depends on the distance (in number of lateral divisions) from the front to the upper and bottom side. In order to transfer the irregularity of the boundary to the mesh and obtain boundary conforming meshes of curved quadrilateral domains, the inner nodes are created by means of a linear interpolator based on a transfinite mapping [10]. As we have commented before, this method requires the same number of divisions in the opposite sides of the quadrilateral. Fig. 1 describes how to achieve this condition in a single case. It is necessary to perform a temporary discretization of the two opposite sides by modifying their number of divisions in order to have the same number of nodes on them. These temporary nodes are generated by means of an uniform interpolation along both sides. Fig. 1.b shows the inner nodes and the mesh progress at that step.

c2

c1 Figure 2. Splitting of a generic quadrilateral

Figure 3. Meshing patterns for quadrilaterals with two opposite sides with one division

Figure 4. Meshing patterns for quadrilateral with two consecutive sides with one division

Next, the framework of the algorithm is described:

1.

Triangular or quadrilateral area? Triangular area → go to step 2. Quadrilateral area → go to step 3. 2. Generate a triangular element in a corner of the area. The remaining area is considered as a quadrilateral area. 3. Has the quadrilateral the same number of edges in opposite sides? Yes → apply the algebraic mesh generator. End. Not → continue. 4. Has the quadrilateral two opposite sides with one division? Yes → generate edges and elements using the meshing patterns of figure 3. End of this branch. Not → continue. 5. Has the quadrilateral two consecutive sides with one division? Yes → generate the mesh using the meshing patterns of figure 4. End of this branch. Not → continue. 6. Generate the front line. 7. Calculate the number of nodes over the front line 8. Generate the nodes and edges over the front line. 9. Go to step 3 for quadrilateral 1 10. Go to step 3 for quadrilateral 2 With the mesh generators for quadrilateral and triangular areas and a multiblock approach [16] it is possible to mesh arbitrary domains. Fig. 5 shows an example of the definition of complex domains starting from quadrilateral areas, and the resulting mesh. The figure represents a pair of cables enclosed in a hollow metallic cylinder.

Figure 5. Multiblock mesh generation of complex domains

Surfaces Defined by their Boundary We consider a surface defined by their boundary if the surface is not plane, and the unique information given when we create the surface is the boundary, not a equation. Although different surfaces could fit to that boundary lines, in order to mesh these surfaces, we look for one that adjust to the boundary lines, following the shape given by the boundary. The mesh of this kind of surfaces can be obtained using the same method which has been described previously for plane surfaces, that uses the interpolator to create the inner nodes. When the lines are curved the interpolator follows the curvature of the lines. If two lines of the boundary are straight lines then the discretization is the ruled surface

that fits to the other lines. Among these surfaces we can mention well known geometric shapes like cones, cylinders or other ruled surfaces. Figure 6 shows the mesh for a surface of this last type.

Figure 6. Meshing of a ruled surface

Note that when we talk about the lines of the boundary, we are thinking in boundaries of only three or four lines. In the cases of more sides some of them must be linked and considered like only one line Fig. 7 shows an example of compound line. L4 l42

l41



• L3

L1 •

L2



Figure 7. Quadrilateral area with single and compound lines

Quadric Surfaces The number of coefficients of the general equation for quadrics can be reduced for those surfaces with some symmetries. Also the equation can be expressed in a simplified way if the surface is placed in the origin of coordinates and he axis of the surface is located over one of the co-ordinate axis. We are going to use these properties to simplify the creation of the surface with the program. Among the reduced quadrics we choose for our study those that could be useful in electromagnetic problems. They are the ellipsoid, the parabolic form, the hyperbolic form and the sphere like a special case of ellipsoid, but very important. Immediately afterwards the equations for these surfaces, centred and oriented, are shown. Sphere : x 2 + y 2 + z 2 = R2

x2 y2 z2 + + =1 a 2 b 2 c2 x 2 y2 Parabolic form : 2 + 2 = c ⋅ z a b x2 y2 z2 Hyperbolic form : 2 − 2 − 2 = 1 a b c Ellipsoid :

One of the objectives of the method is to have a total control over the discretization, in the sense that we want to be able to do the mesh with a higher density in some zones, but lower in others. The method is focused to define in the first step the lines, which can be discretized independently ones from others. These lines are taken as the base to build the surfaces using them to create the boundary of the mentioned surfaces. If no more specifications are indicated, we have a surface defined by boundary, but when the lines are curves that fit to a quadric, and we really want that quadric, the information must be completed with the necessary data in each case. For the sphere it is necessary only the centre, and for the others quadrics, besides the centre, we need the axis and the points in the axis that cut the quadric (a, b, c). With all these data the surface is completely defined in the space. Because of the complexity of meshing directly the surface with variation in three dimensions, and in order to profit the method developed for plane surfaces, we look for a solution passing through the transformation of the problem in three dimensions to another in two dimensions. The first step in this transformation is to move the surface to the origin of co-ordinates and rotate it to orient the axis of the surface over the axis of co-ordinates, because the surface could be in any point of the space. The next step is to transform the surface from the real space into a parametric plane whose co-ordinates are angular in such a way that the surface defined with three cartesian co-ordinates, now is defined with two angular coordinates. The transformations used are detailed immediately afterwards.

R = x 2 + y 2 + z 2  u = a cos z R  Sphere v = a cos x   R ⋅ sin( u)   ( ) ( )  x = R ⋅ sin u ⋅ cos v  y = R ⋅ sin( u) ⋅ sin(v )  z = R ⋅ cos(u)

( )

( )

u = a cos z c   x  v = a cos a ⋅ sin( u) Ellipsoid   x = a ⋅ sin( u) ⋅ cos(v )  ( ) ( )  y = b ⋅ sin u ⋅ sin v z = c ⋅ cos( u)  

u = z  v = a cos x a⋅u Parabolic form    x = a ⋅ u ⋅ cos(v )  ( )  y = b ⋅ u ⋅ sin v z = u 2 

(

)

( )

u = a cosh z c   x  v = a cosh a ⋅ sinh( u) Hyperbolic form    x = a ⋅ sinh( u) ⋅ cos( v )  ( ) ( )  y = b ⋅ sinh u ⋅ sin v z = c ⋅ cosh( u)  

The transformation process begins with the lines of the boundary that have been discretized previously, and more exactly with the nodes created over the lines, given in cartesian co-ordinates. As result of the information about the surface, the co-ordinates of the nodes can be transformed to angular co-ordinates. After that, the surface is placed in a parametric plane with two co-ordinates (u, v).

Over the surface reduced to the parametric plane the method for plane surfaces described before can be applied. The new nodes, edges and faces of the mesh over the parametric plane are obtained by means of the method for plane surfaces. In Fig. 8.a we can see the mesh in the plane. Although the faces seem irregular, we must notice that coordinates are angles and, for example, the longest edge in the top triangle is the same point in the space. Because of the division of the surface in angles we are going to get a more suitable result thanks to the properties of surfaces, where the angle follows better the shape of the surface than the rectangular co-ordinates. The following step will be obviously to invert the transformation and get the cartesian co-ordinates from the angular co-ordinates using the equations shown before. As result we have the surface in three dimensions (Fig. 8.b).

a)

b)

Figure 8. a) Angular mesh in parametric plane (ellipsoid), b) Real mesh (ellipsoid) The last step would be, if it is necessary, to undo the first movement and rotation applied to the surface and replace the surface in the point of the space where it had been defined before the meshing. Better results (more uniform meshes) are obtained meshing in angular co-ordinates than meshing, for example, the projection of the surface over a plane in a direct way. Although this last method is the simplest and would be useful for surfaces nearly parallel to a plane, usually the results are poor (see Fig. 9)

a)

b)

Figure 9. Sphere mesh: a) With parametric plane, b) With projection plane

Surfaces of Revolution Another kind of surface that deserves our attention are the surfaces of revolution. These surfaces are formed when a line is rotated a certain angle taken an axis as reference. An example of revolution surface is a circular cylinder, that is, the revolution of a straight line. We have treated in a special way this kind of surfaces to facilitate their definition and improve their meshing. In the mesh generation the proceeding method is similar to that used in quadric surfaces, that is, the transformation of co-ordinates. But in this case we are not going to look for the transformation of the surface from three coordinates to two co-ordinates. Instead of that, we are going to do the transformation to a parametric surface although this one is not contained in a plane. The objective is to get a parametric surface where we can apply the method for surfaces defined by their boundary with suitable results. First of all we have the base line , that we consider placed in angle zero. There is another line with the same shape that the first one and parallel to it, but placed in a defined angle alpha. The transformation consists on creating the parametric surface using the following variables: the angle of rotation, the radius, that is, the distance between the line and the axis of rotation, and the projection of the line over the axis of rotation. The first step is to place the initial line from an arbitrary situation in the space in a plane that must have one of the co-ordinates equal to zero (to use that co-ordinate as angle). We get this condition with a movement plus a rotation if it is necessary, in order to placed the line over the plane x=0, y=0, or z=0, and the rotation axis over a co-ordinate axis. The lines of the real surface in different angles are always parallel. If the initial and final lines are joined by lines with the same radius and the same projection over the axis for all the angles those lines are obviously straight. We have seen before that this kind of surface formed by two straight lines and two curved lines could be meshed like a surface defined by their boundary. So we mesh this parametric surface dividing the angle of rotation in a uniform way. Thus, the final discretization will be uniform. In order to undo the transformation, the first operation is to invert the movement and the rotation only in the variables radius and projection, and, finally, to apply to each node a spin in cartesian co-ordinates of the corresponding angle. An example of this type of meshing is shown in Fig. 10.

a)

b)

Figure 10. Meshing of surface of revolution: a) In the parametric surface, b) In the real space

Multiblock Definition More complex surfaces, composed of the basic four types commented above, can be meshed with a multiblock definition of the surface. As an example of this mesh generation, a microwave cavity composed of one circular

cylindrical surface, two circular conical surfaces and two plane covers has been discretized. The resulting mesh is shown in figure 11.

Figure 11. Mesh of a cylindrical-conical microwave cavity

Computational Cost In order to evaluate the computational cost of the previous meshing methods, a set of mesh generations for plane surfaces (or defined by their boundary), quadrics and surfaces of revolution was realised in an HP-700 workstation. For plane surfaces, a square area was used, and a spherical cap for quadrics and surfaces of revolution. The mesh type for all cases was triangular (i.e., only triangular faces). The results are presented in Fig. 12. It can be observed a quasi-linear performance in the case of plane surfaces. For quadrics and surfaces of revolution the computational cost is bigger.

25

B 20

CPU time (s)

C 15

A 10

5

0 0

1

2

3

4 5 Number of faces

6

7

8

9 4

x 10

Figure 12. Meshing time for different methods: A) Plane surface, B) Quadric, C) Revolution

For the regression curve t = An , where t is the CPU time and n is the number of faces in the mesh, we obtained: Method for plane surfaces: A=2.75e-5, B=1.16, r=0.966 Method for quadric surfaces: A=7.96e-5, B=1.32, r=1.18 Method for surfaces of revolution: A=6.2e-5, B=1.32, r=0.998 where r is the correlation coefficient. B

Conclusions A basic mesh generation method based on an advancing front / algebraic technique for generalized quadrilateral and triangular domains over plane surfaces has been presented. More complex domains can be discretized by means of a breakdown in areas topologically similar to triangles or quadrilaterals. Due to the use of transfinite interpolation, it is possible to use this method to discretize surfaces just defined by their boundary. For surfaces defined by their boundary and their equation it is necessary a more complex method. Here we have presented two methods for quadrics and surfaces of revolution based on the previous basic method. These methods transform the real surface in a plane surface (for quadrics) or in a surface defined just by their boundary (for surfaces of revolution), generate the mesh over that surfaces by means of the basic method, and invert the first transformation in order to obtain the final mesh over the real surface. Besides, a multiblock definition can be used for meshing combination of the four surfaces studied here. To sum up, the general algorithm can be described as follows: 1. Identify the kind of surface. 2.1. If plane surface or defined by boundary: 2.1.1. Apply the method for plane surfaces. 2.1.2. End. 2.2. If quadric surface: 2.2.1. Translate the surface to the origin and their axes over the co-ordinate axes. 2.2.2. Apply a transformation over the surface boundary to place it in a plane. 2.2.3. Mesh the surface in that plane using the method for plane surfaces. 2.2.4. Undo the transformation, translation and rotation. 2.2.5. End. 2.3. If revolution surface: 2.3.1. Translate the surface to the origin and its axis over one of the co-ordinate axes. 2.3.2. Transform the surface boundary in a boundary with two straight lines. 2.2.3. Apply the method for plane surfaces. 2.2.4. Undo the transformation, translation and rotation. 2.2.5. End. The tests realised for several types of plane, ruled, quadric and revolution surfaces show a high quality in the final mesh, obtaining little improvements with a posteriori refinement techniques as node reposition. The method for plane surfaces does not need an element overlapping control, while classical advancing front methods spend time in this control or in the choice of the suitable node. Due to it, its computational cost is reduced, with a quasi-linear performance. The methods for quadrics and surfaces of revolution have higher computational costs due to the transformations from real to parametric surface and the inverse transformation. References [1] Möller P., Hansbo P., “On Advancing Front Mesh Generation in Three Dimensions”, International Journal for Numerical Methods in Engineering, vol. 38, pp. 3551-3569, 1995 [2] Rassineux A., “3D Mesh Adaption. Optimization of Tetrahedral Meshes by Advancing Front Technique”, Computer Methods in Applied Mechanics and Engineering, vol. 141, pp. 335-354, 1997 [3] Hassan O., Morgan K., “Unstructured Tetrahedral Mesh Generation for Three-Dimensional Viscous Flows”, International Journal for Numerical Methods in Engineering, vol. 39, pp. 549-567, 1996 [4] Aurenhammer F., “Voronoi Diagrams - A Survey of a Fundamental Geometric Data Structure”, ACM Computing Surveys, vol. 23, n. 3, pp. 345-405, 1991

[5] Cavendish J.C., Field D.A., Frey W.H., ”An Approach to Automatic Three-Dimensional Finite Element Mesh Generation”, International Journal for Numerical Methods in Engineering, vol. 21, pp. 329-347, 1985 [6] Zheng Y., Lewis R.W., Gethin D.T., “Three-Dimensional Unstructured Mesh Generation. Part 1. Fundamental Aspects of Triangulation and Point Creation”, Computer Methods in Applied Mechanics and Engineering, vol. 134, pp. 249-268, 1996 [7] Loze M.K., Saunders R., “Two Simple Algorithms for Constructing a Two-Dimensional Constrained Delaunay Triangulation”, Applied Numerical Mathematics, vol. 11, pp. 403-318, 1993 [8] Baehmann P.L., Wittchen S.L., Shephard M.S., Grice K.R., Yerry M.A., “Robust, Geometrically Based, Automatic Two-Dimensional Mesh Generation”, International Journal for Numerical Methods in Engineering, vol. 24, pp. 1043-1078, 1987 [9] Yerry M.A., Shephard M.S., “Automatic Three-Dimensional Mesh Generation by the Modified-Octree Technique”, International Journal for Numerical Methods in Engineering, vol. 20, pp. 1965-1990, 1984 [10] Haber R., Shephard M.S., Abel J.F., Greenberg D.P., “A General Two-Dimensional, Graphical Finite Element Preprocessor Utilizing Discrete Transfinite Mappings”, International Journal for Numerical Methods in Engineering, vol. 17, pp. 1015-1044, 1981 [11] Haber R., Abel J.F., “Discrete Transfinite Mappings and Meshing of Three-Dimensional Surfaces Using Interactive Computer Graphics”, International Journal for Numerical Methods in Engineering, vol. 18, pp. 4166, 1982 [12] Thompson J.F., “Structured and Unstructured Grid Generation”, Critical Reviews in Biomedical Engineering, vol. 20, n. 1, pp. 73-120, 1992 [13] George P.L., Automatic Mesh Generation. Application to Finite Element Methods, Ed. John Wiley & Sons Masson, 1991 [14] Zheng Y., Lewis R.W., Gethin D.T., “Three-Dimensional Unstructured Mesh Generation : Part 2. Surface Meshes”, Computer Methods in Applied Mechanics and Engineering, vol. 134, pp. 269-284, 1996 [15] Lo S.H., “Finite Element Mesh Generation over Curved Surfaces”, Computers & Structures, vol. 29, n. 5. pp. 731-742, 1988 [16] Shaw J.A., Weatherill N.P., “Automatic Topology Generation for Multiblock Grids”, Applied Mathematics and Computation, vol. 52, pp. 355-388, 1992