Automated Hexahedral Mesh Generation by Virtual ... - CiteSeerX

0 downloads 0 Views 107KB Size Report
attached to four quadrilateral elements on a surface. A row of ... to that element face as shown in Figure 4. ... nodes will have two edges that have a type termed “side. .... so that their cross product is congruent with the normal of the plane.
Automated Hexahedral Mesh Generation by Virtual Decomposition David R. White, Lai Mingwu, Steven E. Benzley, Brigham Young University Gregory D. Sjaardema* Sandia National Laboratories

ABSTRACT Mapping and sweeping mesh generating algorithms are some of the most common methods used for the creation of hexahedral meshes. These algorithms quickly generate high quality elements; however, they typically require manual decomposition of the geometry into regular primitive pieces. Two CUBIT meshing facilitators, volume submapping and n-surface sweeping, have been designed to greatly reduce the need for manual decomposition and the propagation of these cuts throughout the model, while generating high-quality hexahedral elements. This paper will focus on the implementation and capabilities of volume submapping while briefly discussing n-surface sweeping. Volume submapping uses pseudo or virtual geometry to decompose complex volumes into “mappable sub-volumes.” Mappable regions are generally limited to volumes that can be parameterized into logical hexahedrals. To decompose volumes into mappable “subvolumes”, the mesh connectivity of the surfaces bounding the solid is used to parameterize the surface nodes in a local integer “i-j-k” space. This parameterization provides the information for decomposition of the volume by the creation of virtual surfaces inside the volume. The virtual surfaces separate the volume into mappable “sub-volumes”. Because the virtual surfaces have no underlying geometry, the resulting hexahedral mesh can be smoothed to eliminate the “sharpness” of the decomposition surfaces or to increase the conformity of the mesh to the original geometry. This process reduces the need for manual geometry decomposition, a time consuming and often difficult manual task. This process is not generally applicable to all geometries. However, the process, does reduce the need for manual decomposition of a large class of realistic solid models with the benefits of reduced time and complexity of the meshing process. Current work in the n-surface sweeping development involves improving the CUBIT sweep tool to allow multiple source surfaces to be projected to a single target surface. The n-surface sweeping is based on existing CUBIT features.

*

This work was performed at Sandia National Laboratories supported by the US Dept. of Energy under contract number DE--AC04--94AL85000.

1. INTRODUCTION Since the wide spread acceptance of the finite element method, many researchers have been investigating ways to further automate the mesh generation process to improve accuracy and productivity, while lowering the skill level required to achieve acceptable results. While no one algorithm has been developed to quickly generate a high quality mesh on all general geometries, research continues to improve the meshing tools that currently exist. Extrusion of a two dimensional (2D) mesh into a general third dimension, called “sweeping,”1 and three dimensional (3D) mapping transformations2 are some of the most widely used tools that perform “semi-automated” mesh generation. These algorithms are termed “semi-automated” because, unless the geometry is conformable to the algorithms, manual pre-processing of the geometry is necessary. For the mapping algorithms, the geometry must “logically” fit the polyhedral primitive for which the algorithm was designed3. Therefore, if the geometry does not fit the “logical” polyhedral, the geometry must either be decomposed into several mappable pieces, or initially created out of mappable pieces. Unlike the mapping algorithms, sweeping algorithms are not limited by any “logical” geometry. They are however limited to solids that have some general third dimension, common to the whole geometry, through which surface mesh may be extruded or swept. In this sense, these two well used algorithms are still only “semi-automated” mesh generators. In recent years, research in these algorithms has mainly been aimed at the automation of the pre-processing of the geometry 4. Automation of this process has potentially very high payoffs. In either the building or decomposing of the geometry, the process often tends to be tedious. In addition, it also leads to altering more of the original topology than intended due to propagation of the decomposition. An example of this is shown in Figure 1, where the singular solid model must be decomposed from, or recreated out of several mappable or sweepable pieces. Two techniques are presented in this paper which greatly

Figure 1 Example of Propagation of the Decomposition Process

reduced the pre-processing of the geometry into acceptable forms. These techniques are volume submapping and n-surface sweeping.

Volume Submapping is an enhanced 3D mapping technique which uses pseudodecomposition of volumes into volume mappable sub-regions. For more reliability and robustness the decomposition is based on the connectivity of the surface mesh. The connectivity is utilized by parameterizing the nodes on the surface mesh into a cartesian, integer “i-j-k” space, local to the volume. From the node parameterization, “virtual surfaces,” created by “meshed webs” with no geometry, can be specified which separate the volume into volume mappable “sub-volumes.” The virtual surface separates the solid into two sections. The process then continues recursively until all sub-volumes are mappable. Once the sub-volumes are decomposed, three-dimensional standard mapping procedures are applied 2. Because no real geometry is created to decompose the solid model, global smoothing can be utilized to reduce the “sharpness” of the dissection. An example of a volume submapped mesh is shown in Figure 2 (left).

Figure 2 Hexahedral Meshes Generated by Volume Submapping (left) and N-Surface Sweeping (right).

N-surface sweeping is an improved sweeping algorithm in CUBIT that provides the capability to extrude a surface mesh from multiple sources. The algorithm combines the surfaces automatically so that the volume can be swept, layer by layer to the target surface. An example of a n-surface swept mesh is shown in Figure 2 (right). This paper discusses the implementation and theory of volume submapping along with a brief discussion of n-surface sweeping. First volume submapping and its implementation will be discussed, followed by n-surface sweeping. 2. VOLUME SUBMAPPING Volume submapping has been developed as a meshing tool that, for many geometries, reduces the need for manual decomposition of 3D CAD data. While it is not general for all solid models, its purpose is to act as a tool to simplify and speed up the meshing process of non-periodic, “logically” blocky bodies. In this section, the algorithm as it is implemented in CUBIT5 will be explained. The algorithm consists of two major

processes: “i-j-k” parameterization and pseudo-decomposition; these processes are defined below. First some definitions of terminology as they are used in this paper are given. 2.1 Definitions In this paper the terms: parameterization, classification, “i-j-k” space, and traversal are used. Their specific meanings relative to this paper must be defined. •

• •



“i-j-k” Space: A local, cartesian coordinate system relative to the solid model being meshed. Each node is assigned an integer position relative to some arbitrary origin node. This origin node is assigned to have coordinate (0, 0, 0). Parameterization: The process of assigning the nodes of the volume individual coordinates in “i-j-k” space. Traversal: The changing from one constant to another in “i-j-k” space. Traversals can be made between planes or nodes. The “i-j-k” coordinates of nodes along an edge will constantly increase or decrease in the “i,” “j,” or “k” direction until a vertex where a direction change occurs. At this point a traversal is made. In other words, if the nodes where changing in “i,” they now may be changing in “j”, depending of the type of traversal made. In planes a traversal is made when one plane changes to another, depending also on the traversal type. Traversal types are defined and explained below in section 2.2. Classification: Determination of the type of traversals made between either planes or nodes. For plane traversals, the edges over which the traversal is made are classified rather than the planes themselves.

These definitions will be used throughout the discussion of volume submapping. The processes for “i-j-k” parameterization and node and edge classification are explained below. 2.2 “i-j-k” Parameterization The parameterization is based on a local integer “i-j-k” cartesian coordinate system. The coordinate system is local to the solid model that is being evaluated. The parameterization is needed to identify in a robust manner where the pseudo-decomposition should occur and then finally when mappable sub-volumes are created, create the internal elements. Therefore, each node’s relative “i-j-k” position on the model must be determined. The method for determining this is discussed in this section. Three basic requirements for “i-jk” parameterization in volume submapping are: 1. Every volume has at least 6 identifiable surfaces that have a constant “i”, “j” or “k” value. 2. All bounding surfaces are mapped based on a quadrilateral type mapping primitive. This surface mesh then has a regular, predictable mesh connectivity from which the volume can be parameterized into a local “i-j-k” space. 3. Every volume must have at least “eight logical corners.”1

The predictability of the surface mesh that results from the above requirements coupled with traversals allow parameterization of the volume into “i-j-k” space. In volume submapping two types of “i-j-k” traversals are used: plane and node traversals. Plane

traversals are used for the parameterization of the volume into local integer “i-j-k” space. Node traversals are used primarily in the creation of virtual surfaces for the pseudodecomposition of the volumes; however, they are not used in the parameterization process. Because both node and plane traversals share similar terminology, they are both discussed in this section. The terminology of the types of classifications for both plane and node traversals are as follows (see Figure 3). •





End ( nominally π/2, 90° ): An end traversal for a node is an element node at which only one face element is inserted. A row of quadrilateral elements on a surface will terminate here. For a plane traversal, it is an edge that emanates from convex, 3 valent nodes and can terminate at any non-4 valent node. Corner ( nominally 3π/2, , 270°): A corner traversal for a node is an element node at which three quadrilateral elements are attached on a surface. For a plane traversal, it is an edge, or set of edges that emanate from 3, 5 and 6 valent nodes. It is typically a concave region for either a surface or volume. Reversal ( nominally 2π, , 360°): A reversal traversal for a node is an element node which is attached to four quadrilateral elements on a surface. A row of elements reverses direction here. For a plane traversal, it is an edge that can emanate from 6 valent nodes. This portion of volume submapping is still in development and will not be discussed in detail.

C o rn er E d g e E n d E d g es

E nd N ode

R e v er sa l E d g e C o rn er N o d e

R e v er sa l N o d e

Figure 3 Example of End, Corner and Reversal Edge and Node Types

The following two sections will describe plane and node traversals in more detail. 2.2.1 Plane Traversals Plane traversals are key to the parameterization of the volume into “i-j-k” space. The parameterization process moves from plane to plane assigning the nodes their “i-j-k” coordinates. This process relies on knowing the name or “type” of the plane. Plane nomenclature is based on the normal of the plane, as taken in a counter-clockwise direction. In other words, in a “K” plane, the nodes on the plane only vary in “i” and “j” such that if the boundary of the plane was followed in a counter-clockwise direction, following the “right hand rule,” it would yield a normal in the “+k” direction. Similarly if the normal was in the “-k” direction the plane would be labeled “neg. K.” The type of a new plane is determined by the traversal made from the previously visited plane. Plane traversals depend on three things:

• • •

The type of edge over which the traversal is made. The plane type from which the traversal is made (i.e. “K,” “neg. K,” “I,”...). The direction in which the edge is going in “i-j-k” space (i.e. “+i”, “+j”, “-k”,...).

In order to classify the planes using the plane traversals, the edges must first be classified by visiting the vertices of the volume and classifying the edges that emanate from them. The vertices are 3, 5, and 6 valent nodes, meaning 3, 5, or 6 edges emanate from them. The basic logic for classifying the edges will be discussed below. The 3 edges emanating from a 3 valent node are either all end or all corner type. The type is determined by taking the dot product of an element face’s normal and the edge ‘normal’ to that element face as shown in Figure 4. If the dot product is positive, the configuration is concave and the edge types are all corner. Similarly the opposite is true if the dot product is negative (i.e. the edges are all of type end).

V e c to r C r e a t e d fr o m E le m e n t F a c e N o r m a l

C o n v e x , 3 V a len t N o d e O r ie n t a tio n , D o t P r o d u c t is N e g a tiv e C o n c a v e , 3 V a le n t N o d e O r ie n t a tio n , D o t P r o d u c t is P o s it iv e V e c to r C r e a te d fr o m E d g e L e a v in g th e 3 V a le n t N o d e

Figure 4 Example of 3 Valent Node Differentiation

Two types of classifications may result from 5 valent nodes. However, in contrast to the 3 valent nodes, there is no simple test that can classify all 5 emanating edges. Also, 5 valent nodes will have two edges that have a type termed “side.” A side type of traversal means that no plane id change is made. In other words in going from one plane to the next, the plane type remains constant. With 5 valent nodes, two methods can be used to classify the emanating edges. The first method uses a “classification logic” based on the fact that an edge type is constant for the length of an edge. The classification relies on some of the edges already being classified by other 3, 5 or 6 valent vertices. With some of the edges classified and their traversal types known, the rest of the edges can be classified. For example, in Figure 5 (left), a 5 valent node is shown with two edges classified to be of type end two 3 valent nodes. From this information, the edge between the two ends, is set to be of type corner, while the other two are of type side. This type of configuration is termed “normal,” where going around the edges the types are: end-corner-end-side-side. If the configuration is move to be “inside out” it is termed “reversed.” The types around a “reversed” configurations are: corner-end-corner-side-side. An example of the reversed configuration is shown in Figure 5 (right). Classification logic is based on and limited to these two types of configurations for 5 valent nodes. If no information can be obtained the second method must be used.

COR NER

END COR NER

END

END

COR NER

S ID E S ID E

S ID E N o r m a l C o n f ig u r a tio n

S ID E

R e v e r s e d C o n f ig u r a tio n

Figure 5 Example of Normal and Reversed, 5 Valent Edge Classifications

The second method relies on dot products of element faces and edges. This method is less robust than the logical method unless the volume is relatively blocky near the 5 valent node. In practice most 5 valent nodes can be resolved by classification logic because of the frequency of the 3 valent nodes on the volume. But in some cases the second method may have to be used. There appear to be only three basic, non-degenerate 6-valent configurations shown in Figure 6.

Tw o CO R N ER , Tw o EN D , and T w o S ID E T y p es o f E d g es

A lt e r n a t i n g E d g e T y p e s B etw een C O R N E R and E N D O n e R E V E R S A L , T w o E N D , an d T h ree S ID E T yp es o f E d ges

Figure 6 Three Basic 6 Valent Edge Configurations

Once the edges of the volume have been classified to their correct edge types, the plane changes are based on traversal logic that follows the “right hand rule.” End traversal logic for plane changes are shown in Figure 7 (left). This figure only shows the traversals along edges that have nodes whose “i-j-k” coordinates are increasing in the indicated “i,” “j” or “k” direction. To get the negative directions, simply traverse opposite the arrows in the diagram. For example, if the current plane is “K,” the dividing edge is of type end, and the “i” coordinate of the nodes on the edge is increasing with respect to the “new” plane (decreasing with respect to the current plane), then the “new” plane according to the plane change diagrams would be “J.” These plane change diagrams are also useful for a corner type traversal because it is simply an end traversal in a clockwise direction rather than the traditional counter-clockwise direction. An illustration of these two examples, edges decreasing and corner type traversals is shown in Figure 7 (right).

“K”

“neg. J” “J”

+i Edge “neg. K”

“neg. J”

+i

Plane changes at “end” type traversals.

+i -j +j -i

-k -j

+j

+j Edge

-i

“neg. K”

+k Edge

“I”

“neg. J”

“Corner Traversal” “End Traversal” -k

+i

“J”

“I”

“K”

-k +k

“K”

+k

-i +i -j

-k

“I”

-j

“neg. I” +k

+j -i

i j

“neg. J”

“neg. I”

k

“K”

Figure 7 Plane Change Diagrams for End Edge Traversals (left) and Example of Plane Change and Node Traversals (right).

2.2.2 Node Traversals Figure 7 (right) gives an example of node traversals. It also shows how the surface loops

are ordered counter-clockwise so that following the “right-hand rule,” the surface normals are directed out of the solid. The node traversal logic for a “K” plane is defined in Table 1. This table shows that given a current direction (i.e. +i, +j,...), and knowing the type of traversal made, the new direction is found by “i-j-k” space “logic”. In Table 1, the columns under the traversal types are the new directions that result from this “i-j-k” space logic. This table can also easily be transformed to be used by all of the planes. For example, if you are on a “neg. K” plane, simply switch the traversal results of types end and corner, INPUT STATE

END

CORNER

REVERSAL

+i +j -i -j

+j -i -j +i

-j +i +j -i

-i -j +i +j

Table 1 Node Traversals for the “K” Plane.

just as in the plane traversals. For other planes such as “I” and “J,” replace the coordinates with the analogous ones for the plane “K.” For example, to use the traversals for plane “I”, everywhere there is an “i” in the table replace it with a “j” and same thing with “j” and “k.” 2.2.3 The Parameterization Process Once the edges have been classified, an arbitrary plane is designated as the “K” plane. This plane is found by going to one of the end nodes (a node with a valency of 3 that has end type edges emanating from it), and assigning coordinates to each of the three nodes attached to it. The nodes attached in the “K” plane, including the end node, are assigned so that their cross product is congruent with the normal of the plane. The third node is then either in the “+k” direction if it lies in the same direction as the “K” plane’s normal, or “-k” if it is opposite.

After these initial nodes have been assigned “i-j-k” coordinates, the rest of the nodes in this “K” plane may be parameterized. To do this, the nodes of the surface are gathered and parameterized in an “advancing front” type method, where once a node has been assigned coordinates, the adjoining attached mesh nodes are collected to be operated on in the next layer. The parameterization of the nodes is based on one of two pieces of given information: 1. If three nodes of an element face are known then the fourth can be derived. 2. If two nodes connected to the node in question have been classified and do not all lie on the same element face, then the “middle” node can be derived.

Examples of these cases are shown in Figure 8. After this, the other planes attached to the initial “K” plane are classified in a similar way.

(1 , 1 , 0 )

(? , ? , 0 )

(1 , 0 , 0 )

(0 , 1 , 0 ) (0 , 0 , 0 ) (2 , 5 , 6 ) (? , ? , 6 )

(2 , 4 , 6 ) (2 , 3 , 6 )

Figure 8 Two Methods for Classifying Surface Nodes

When moving from one plane to the next, the new plane’s type (i.e. “K”, “neg. K,”...) must be determined by the “dividing edge” and plane traversal logic. The new plane’s type is important so that a starting node on the new plane can be derived. Once this first node, a node just off the dividing edge called the start node, has been set, the “advancing front” method of parameterization for the rest of the nodes on the plane can be used. This process continues from plane to plane until all of the planes and their nodes have been parameterized into “i-j-k” space. Once this is done, the nodes are connected in “i-j-k” space. Meaning, each mesh node now knows its own position in the local “i-j-k” space but also from the connectivity of the mesh it knows the positions of its neighbors relative to itself. 2.3 Pseudo-Decomposition of the Volume After the surface nodes have been defined in “i-j-k” space, the process of decomposing the volume into mappable sub-volumes begins. Identifying where the volume should be decomposed, along with the creation of the virtual surfaces, the separation of the volume into sub-volumes, and the recursive nature of the algorithm are discussed in this section.

Based on the assumption that all boundary surfaces have been meshed by a quadrilateral primitive based mapping algorithm, generalities where “good” dissections occur, can be made (see section 2.2). The basic generalization is that areas of concavities in the volume are characterized by starting at higher valent surface nodes. These nodes typically have valences of 5 or 6. Because research is still continuing in the areas of 6 valent nodes and internal voids, the rest of the paper will refer only to 5 valent nodes. Once the 5 valent nodes have been identified, a node loop is defined that encircles the volume on a constant “i-j-k” plane. An example of such a loop is shown in Figure 9. As shown in this example, a 5 valent node is at the start and end of the node loop. The connectivity of the loop is followed in the shortest path to finish the loop. This is

O ppo site N o de F or P la ne D eter m ination C ut N od e

D ir ec tio na l N o de fo r L oo p D ire c tion

Figure 9 Dissection Loop Creation

accomplished through “i-j-k” node traversals and the knowledge that each node carries about their neighbors relative “i-j-k” positions. Once this process is complete, a virtual surface can be created from the node loop. The virtual surface does not have any underlying geometry but is made up of a web of nodes which are in the interior of the volume. This web acts as a boundary between two separable “sub-volumes” which can be either further decomposed or meshed. In the case where there is a hole going entirely through the volume, another virtual surface will need to be created before two separate sub-volumes can be created. Like the bounding surfaces of the volume, the virtual surface must be meshed based on the quadrilateral mapping primitive in order for the earlier mentioned assumptions to remain true (see section 2.2). In volume submapping’s implementation in CUBIT, surface submapping is used1 . The “i-j-k” parameterization, and the cutting plane (the plane that the node loop lies on), are used to automatically pseudo-decompose normally unmappable regions into regions that are mappable by a quadrilateral based mapping primitive algorithm. Once the virtual surface is created, the volume may be separated into two distinct subvolumes. The nodes are reconnected in “i-j-k” space so that each node only knows the relative “i-j-k” position about the nodes that are in the same sub-volume. Also the new

nodes created in the virtual surface are classified and connected. This reconnection allows the sub-volumes to be treated as separate entities. The sub-volumes are then resent through the algorithm until all sub-volumes are volume mappable (i.e. there are no higher valent nodes). Volume submapping is complete when all sub-volumes have been meshed. An example of an all hexahedral mesh created by volume submapping is shown in Figure 10. This process produces the generally well formed hexahedral elements

Figure 10 Example of Hexahedral Mesh Generated by Volume Submapping.

characteristic to mapping algorithms. While doing so, it also preserves the speed of the mapping algorithm because volume submapping is not a calculation intensive algorithm. While it is not general for all geometries, it does mesh a large number of the problems encountered. 3. N-SURFACE SWEEPING Current research into the sweeping algorithm is similar to volume submapping in that it is centered on automation of the geometry pre-processing. The algorithm has been improved so that instead of traditional sweeping algorithms having one source and one target surface, multiple source surfaces may be used. While the source surfaces must be connected research is continuing so that the surfaces do not need to be connected. The main advantage of this tool are that the source and target surface can be meshed by any surface meshing algorithm, while only the sides are limited to a quadrilateral based mapping primitive. This provides that volumes with complex surfaces, periodic or non-, can be meshed as long as they have some common third dimension through which they can be swept. As this tool develops into its full potential it will solve many non-trivial meshing problems. 4. CONCLUSION

Two new tools have been created to facilitate the creation of finite element meshes; they are volume submapping and n-surface sweeping. These tools improve on already existing meshing algorithms to make them more automated. Volume submapping uses virtual decomposition to pre-process the geometry into subvolumes that can be quickly meshed by standard mapping transformations. Volume submapping maintains the high element quality characteristic to mapping algorithms while making the process more than “semi-automated.” N-surface sweeping provides additional capabilities to current sweeping methods by facilitating more than one source face. Research is continuing in the area of having the source faces non-connecting. 5. REFERENCES 1

2

3

4

5

Whiteley, Mark, et al., “Two and Three-Quarter Dimensional Meshing Facilitators”, Presented at Third International Meshing Roundtable 1994. Cook, W. A. and Oaks, W. R., 1983, “Mapping Methods for Generating Three-Dimensional Meshing”, Computers in Mechanical Engineering, Vol. 1, 67-72. Blacker, T. D., Stephenson M. B., 1989, “Using Conjoint Meshing Primitives to Generate Quadrilateral and Hexahedral Elements in Irregular Regions”, Proc. ASME Computers in Engineering Conference. Blacker, T. D., et al., 1988, “Automated Quadrilateral Mesh generation: A Knowledge System Approach”, ASME Paper No. 88-WA/CIE-4. Blacker, T. D., et al., 1994, “CUBIT Mesh Generation Environment Users Manual Vol. 1”, SAND94-1100, Sandia National Laboratories, Albuquerque, NM.

Suggest Documents