Polyhedral Mesh Generation
Total Page:16
File Type:pdf, Size:1020Kb
POLYHEDRAL MESH GENERATION W. Oaks1, S. Paoletti2 adapco Ltd, 60 Broadhollow Road, Melville 11747 New York, USA [email protected], [email protected] ABSTRACT A new methodology to generate a hex-dominant mesh is presented. From a closed surface and an initial all-hex mesh that contains the closed surface, the proposed algorithm generates, by intersection, a new mostly-hex mesh that includes polyhedra located at the boundary of the geometrical domain. The polyhedra may be used as cells if the field simulation solver supports them or be decomposed into hexahedra and pyramids using a generalized mid-point-subdivision technique. This methodology is currently used to provide hex-dominant automatic mesh generation in the preprocessor pro*am of the CFD code STAR-CD. Keywords: mesh generation, polyhedra, hexahedra, mid-point-subdivision, computational geometry. 1. INTRODUCTION to create a mesh that satisfies the boundary constraint, while the second family does not require a quadrilateral In the past decade automatic mesh generation has received surface mesh. Its creation becomes part of the generation significant attention from researchers both in academia and process. in the industry with the result of considerable advances in The first family of methodologies such as spatial twist understanding the underlying topological and geometrical continuum STC and related whisker weaving [1], properties of meshes. hexahedral advancing-front [2], rely on a proof of existence Most of the practical methodologies that have been [3],[4] for combinatorial hexahedral meshes whose only developed rely on using simplical cells such as triangles in requirement is an even number of quadrilaterals on the 2D and tetrahedra in 3D, due to the availability of relatively boundary surface. robust algorithms for such shapes. Although the methods of the first family have provided an Nevertheless, in the industry, users of finite volume and enormous improvement in understanding the topological finite element technologies in 3D tend to prefer hexahedral properties of hexahedral meshes, their application to real- cells because in many cases hexahedra can better capture life geometries has been limited by the mainly topological the characteristics of the solution and because a larger nature of the algorithms and by problems in ’closing’ the number of tetrahedral (arguably 3 to 5 times) is needed to mesh i.e. in generating the last cells. In fact for several achieve an equivalent accuracy in the solution. As a result, simple closed configurations of quadrilaterals, which truly automatic unstructured hexahedral mesh generation is should admit a hexahedral mesh, there is no known valid one of the most desired, and not completely fulfilled, mesh. features in a mesh generator. The second family of methodologies includes those based Several methodologies have been proposed to on medial surface [5],[6] and the so-called grid-based automatically create an unstructured hexahedral mesh. methods [7],[8],[9],[10]. These methodologies can be ideally divided into two The medial surface technique creates a two-dimensional families: the first one starts the generation from a given skeleton of a three-dimensional volume as the locus of all closed surface tessellated with quadrilaterals and attempts inscribed spheres of maximal diameter. The medial surface accommodate the solution of the PDE's. In fact all current is then used to decompose the volume into parts meshable FV methods use polyhedra. It happens to be that these by existing techniques. polyhedra are hexahedra, prisms, pyramids or tetrahedra. The so-called grid methods start covering the domain with Here we propose the use of the polyhedra that result from a Cartesian hexahedral grid and removing from it the cells the intersection of an initial all-hex mesh that cover the that either are outside the domain or are closer than a whole domain of interest with a triangulated boundary specified distance to the boundary. The boundary of this surface. The result of the intersection or 'trimming' is the ‘initial mesh’ is made by quadrilaterals that can be extruded set of hexahedra of the initial mesh which lie totally inside up to the surface, generating an isomorphic hexahedral the boundary surface plus a set of polyhedra generated by mesh on the boundary. the intersection of the 'surface-related' hexahedra with the surface itself. One of the problems of the medial-surface-based algorithms is the abundance of degeneracies in the medial The method has a certain resemblance with the grid-method surface leading to considerable topological complexity. proposed in [7]. In fact it would create the same internal hexahedral structure, while the hexahedral buffer, which in The grid-based methods are relatively simple and robust. Schneiders’ method is created using an isomorphic One limitation lies in the representation of the extrusion of the boundary faces of the interior mesh, here is discontinuities (edges and corners) of the boundary surface. replaced by the polyhedra created by the intersection. Since In fact it would be difficult for a mesh generated with such polyhedra with an arbitrary number of faces and arbitrary method to match a corner in the surface with an arbitrary node valence (here valence is defined as the number of number of sharp edges attached to it. A carefully hand- edges sharing a node) may represent arbitrary sharp edges made initial mesh could overcome the limitation, but this and corners on the surface, the problem of a correct would also undermine the automatic character of the mesh representation of the surface features which may affects generation. Schneiders’ method is eliminated. 1.1 Motivations On the one hand the direct usage of polyhedra as cells requires a solver able to handle them so that STAR-CD list The all-hex methods just mentioned, although very of acceptable cell shapes has been extended to include a promising, may present some limitations when applied to certain number of simple polyhedra. the most extreme geometrical cases that can be encountered in the industry-related Computational Fluid Dynamics On the other hand, if an extension of the mid-point- (CFD) and Stress Analysis (SA) simulations. Hex- subdivision [11] is applied to the whole new mesh dominant algorithms have been proposed in an attempt to (including the polyhedra), as explained later, the result is a overcome the problem. The hex-dominant algorithms use set of hexahedra and a much smaller set of pyramids. one (or more) all-hex method but, when the all-hex method As a result, the proposed methodology has the potential to fails or in regions that are likely too complex for such generate meshes for all the solvers that accept hexahedra method, then create more tractable shapes (typically and pyramids, i.e. the majority of Finite Elements (FE) and tetrahedra, prisms and pyramids). FV programs. In this paper we present a different approach to generate a hex-dominant mesh. If the constraint of using only 2. THE INITIAL MESH hexahedra is released, it becomes acceptable to generate a hex-dominant mesh using any kind of shape or more The initial mesh is a hexahedral mesh that must cover the generally a polyhedron, provided that the overwhelming whole domain of interest. The initial mesh may be majority of the mesh is still composed of hexahedra. structured or unstructured. Trivial ways to create the initial mesh include: 1.2 Polyhedra in the framework of Finite • Cartesian mesh generation Volume and Finite Element methods • Cylindrical mesh generation (if the domain to be Meshing may be defined as the process of breaking up a meshed presents an axis of symmetry). geometrical domain into smaller and geometrically simpler sub-domains (the cells) which should allow the solution of • Trans Finite Interpolation [12]. the discretized partial differential equations (PDE) that describe the behaviors of the fields involved in the physics Moreover any combination of such techniques may be used of the phenomenon. to mesh different parts of the domain. In CFD one of the most popular ways of solving the Euler We found that unmodified initial grids may lead to the or Navier-Stokes equations is the Finite Volume (FV) generation of very small cells when the surface is close to method, which is based on the concepts of cell faces and one or more nodes of the cells. To overcome this difficulty flux through those faces. The method itself does not depend we perform an adjustment procedure on the nodes of the on the shape of the cells if the cell faces can be correctly initial grid. defined. In this case a (convex) polyhedron may be used to We propose two different simple methods of accomplishing • Curvature of the closest boundary the task: • Interactive user input 1. Projecting the nodes of the initial mesh onto the surface when they are close to the surface. Here A cell can be marked by one of the above criteria and split close means that the distance is smaller than a into 8 cells. All the information related to the cell neighbors specified small fraction of the cell size. is automatically updated. Other interesting improvements are under evaluation. For examples it would be useful to 2. Moving the nodes of the initial mesh away from automatically create a roughly body-fitted initial mesh. the surface when they are initially close to the surface. 2.1 Basic Methodology To move a node far from the surface, first we find the We may consider the core of the polyhedral mesh vector from the node to its projection onto the surface, and generation as an intersection operation between two b-rep then we move the node in the opposite direction up to a solids: the triangulated boundary surface S and the initial specified distance from the surface hexahedral cell C, whose faces, without loss of generality, Another reason to move the mesh nodes close to the surface can be triangulated in a unique manner choosing a point on onto the surface or away from the surface is that the each face (the face centroid) and connecting it to the four adjustment modifies the topology of the final mesh.