unstructured mesh generation issues in unstructured mesh generation by gopal shevare ppts are based...

Download UNSTRUCTURED MESH GENERATION Issues in Unstructured Mesh Generation by Gopal Shevare ppts are based on Lecture notes by T J Barth (1994)

If you can't read please download the document

Upload: warren-vidler

Post on 14-Dec-2015

224 views

Category:

Documents


2 download

TRANSCRIPT

  • Slide 1

UNSTRUCTURED MESH GENERATION Issues in Unstructured Mesh Generation by Gopal Shevare ppts are based on Lecture notes by T J Barth (1994) Slide 2 UNSTRUCTURED MESH GENERATION Un-structured Grid Unstructured Grids and Application of Graph Theory Delaunay Triangulation and Voronoi diagrams Methods of Delaunay Triangulations Method of Non- Triangulation CONTENTS Slide 3 UNSTRUCTURED MESH GENERATION Grid Generation is the gateway for CAE. Grids connects various simulations for designing a products Make grid generation easy and user friendly. If possible make it redundant Grid generation now encompasses each and everything from creating / importing geometry to export a single file that any solver may need irrespective what simulation code is simulating (Boundary Fitted Coordinate) BFC system is not grid generation! Grid generation has become interdisciplinary area where in CAGD, Computational Geometry, CFD, Computer Graphics experts contribute to make a package User may require execution of around 60 to 100 tasks before grid gets ready Present day simulations use millions of grid points Grids are a commodity. There is an ISO format for grids Grid Generation Present Status Slide 4 UNSTRUCTURED MESH GENERATION Classification of Grids CartesianStructuredUnstructured Mono-block BFC Multi-BlockTriangulation /Tetrahedral Quadrilaterals Hexahedral Hybrid Quad tree / oct -tree Patched GridsOverlapping GridsBFC+ Triangulation Triangulation+ Quadrilaterals Triangulation+ Cartesian Adaptive Gridsmore points where solution changes rapidly Surface grid generationgrids on curved surface Elliptic Grid Generation systemsgrids produced by solving elliptic PDEs Orthogonal systemsgrids lines are orthogonal to each other Moving gridsgrid points move with time Composite overset gridmultiple grids overlapping Cartesian Adaptive Gridsgrid lines along x, y and z axes Hybrid gridsmore than one the of grids coexisting Slide 5 UNSTRUCTURED MESH GENERATION Transform a given two- dimensional domain in to a rectangle (and three-dimensional domain in to a box) by a suitable affine transformation. Structured Grid Mould arbitrary shaped physical domain (x, y, z) in to a rectangular shaped computational domain ( , , ) ? Find three functions f, g and h such that = f (x, y, z), = g (x, y, z), and = h(x,y,z). Lines corresponding to constant values of = i = i, = j = j, and = k = k for i = 1 to i max, j = 1 to j max and k = 1, k max in (x, y, z) plane are grid lines in (x,y, z) plane and intersection of these points gives (a) grid points (i, j) and also (b) quadrilateral cells. = f (x, y) and = g (x, y). Slide 6 UNSTRUCTURED MESH GENERATION Why Triangulation ? Triangles only quadrilaterals only polygons Mixture of triangles And quadrilaterals Theory of triagulations is highly developed Higher dimensions pose no problems Triangle is the polytope in 2D Simple to deal with in 2D And also on surfaces Easy to use in numerical calculations Why Triangulation & Tetrahedrons Slide 7 UNSTRUCTURED MESH GENERATION View #2 Fill a given domain with simple shapes such as triangles, quadrilaterals, etc. so that the given domain is fully covered. Emphasis is on cells (triangles in the present case); there are grid points but no continuous lines or what can be called as grid lines. Unstructured Grids tv1v1 v2v2 v3v3 Remarks 1275Good triangle 2215area < 0 3237overlap 4584degenerate edge 5267duplicate edge? 64910continuum? 1 2 3 4 5,8 6 7 9 10 Structure imposed on grid points Slide 8 UNSTRUCTURED MESH GENERATION Graphs and Meshes Graph theory directly affects the algorithms in unstructured grids However they do not depend on the method of generating triangles Planar graph graph without self loop or parallel edges Most important graph theory result is Euler formula which relates no of vertices, edges and faces of polyhedron (closed surface) N(f) = n(e) n(v) + 2Euler formula The polyhedron is flattened to 2D space one face is at infinity 3 1 1 2 2 3 4 4 Zeus Numerix 25 th Jan -2006 Unstructured Meshes and Graphs Slide 9 UNSTRUCTURED MESH GENERATION Now there are two types of edges Internal edges : shared by two faces Boundary edges : shared by only one face Edges for the face at infinity (boundary edges) (you may consider that face at infinity is absent) Edges binding regions, (holes) embedded in the domain (not a part of the domain) Euler formula becomes n(f) + n(v) = n(e) + 1 - n(h)Eqn. (1) But no of edges and no of faces are related to each other 2 n(e) interior + n(e) boundary max d(f) = i n(f) i =3 No of pointers from edges to triangles No of pointers from triangles to edges Eqn. (2) Unstructured Meshes and Graphs Slide 10 UNSTRUCTURED MESH GENERATION Subtracting 2 time Eqn (1) from Eqn (3) n(f) = 2 n(v) - n(e) boundary -2 + 2n(h) No of faces is approx. 2 times no of vertices Substituting for n(f) in Eqn. (1) n(e) = 3 n(v) - n(e) boundary - n(e) - 3 + 3n(h) No of edges is approx. 3 time no of vertices! What can happen if n(f) 2 n(v) - n(e) boundary -2 + 2n(h)or n(e) 3 n(v) - n(e) boundary - n(e) - 3 + 3n(h) Unstructured Meshes and Graphs Slide 11 UNSTRUCTURED MESH GENERATION Basic Definitions Dirichlet Tessellation (Also called Voronoi Regions) The Dirchlet tessellation of a set of points is the pattern of convex regions, each being closer to some Point P in the point set than any other point in the set The edges of Voronoi polygons comprise the diagram. The idea of Voronoi regions naturally extends to 3D point edge Slide 12 UNSTRUCTURED MESH GENERATION Basic Definitions - Duality Duality of Graph Let G be a planer graph of vertices, edges and cells then G Dual the D ual graph of G exhibits the following properties: If an edge separates two faces f i and f j in G, then the edge, G Dual connects two vertices associated with faces f i and f j G Dual can be formed by (a)Medium segments, (b)Centroid segments, (c)Dirichlet tessellation Face in G vertex in G Dual corresponds to Face in G Face in G Dual corresponds to vertex in G Vertex in G Edge in G Edge in G Dual corresponds to edge in G Slide 13 UNSTRUCTURED MESH GENERATION Triangulation Definition : The triangulation of a point set is defined as the dual of the Voronoi diagram of the set. In 2D triangulation is formed by connecting if and only if their Voronoi regions a common border If no four or more points are cocircular, then vertices of the Voronoi are circumcentres of triangles. triangle Voronoi diagram Slide 14 UNSTRUCTURED MESH GENERATION Let use define N 0 = n(v),N 1 = n(e),N 2 = n(f),N 3 = n( ) Verticesedgesfacesvolume Generalised Euler formula is d (-1) k N k = 0 (Euler formula in R d ); by definition N -1 = 1 k = -1 For the surface of polyhedron in 3D, -1 + N 0 N 1 + N 2 1 = 0orN(f) + N(v) = N(e) +2 For polyhedral volumes n(f) + n(v) = n(e) + n( ) Like 2D case this formula does not take care of boundary effects because it is valid for four-dimensional polytope Unstructured Meshes and Graphs Slide 15 UNSTRUCTURED MESH GENERATION Geometric data :(x, y) coordinates of vertices Connectivity data : Vertex basedv-v, v-e, v-f Edge basede-v, e-e, e-f Face basedf-v, f-e, f-f All 9 relations are not stored because Large RAM is required Consistency checks must be carried out on relations Only some relations are stored. All the remaining relations are derived from the stored relations The stored connectivity relations are called data structures: Some well-known data structures:Finite element data structure. Edge structure. Out-degree structure. Quad-edge structure. Winged-edge data structure. Data Structures Slide 16 UNSTRUCTURED MESH GENERATION Data Structures Storing of Structured grids in unique Edges in 3D are always formed by (i+1, j, k) and (i, j, k) etc. Faces are always formed by (i, j, k), (i+1, j, k), (I, j+1, k) and (i+1, j+1, k) How to Store Unstructured Meshes? Collection of ensure does not ensure edges are connected Collection of faces does not ensure faces form a 3D cell and that faces not intersecting. Slide 17 UNSTRUCTURED MESH GENERATION Data Structures Standard FE data structure T i V l, V m, V n Sequence of vertices matters f-v connectivity Naturally extend to 3D Extensively used in EFM of solids and fluids Edge structure E i F i, F j For planar meshes Edge is list of pair of vertices Ideal for FVM Out-degree structure V l V m, V n, V o But this is not v-v connectivity Max three out degree required Quad-edge structure E i-1/2 E i+1/2, E j, E k Edges are stored as a pair of directed edges Stores vertex at the origin Stores previous and next edge Slide 18 UNSTRUCTURED MESH GENERATION Graph Operations on Unstructured Grids Planar Graph with Minimum Out-Degree Theorem: Every planar graph has a 3 bounded orientation; i.e. each edge of a planar graph can be assigned a direction such that the maximum number of edges pointing outward from any vertex is less than three Proof. Find a vertex such that incident boundary edges that connected to at most maximum two. Other boundary vertices and any number of interior edges. Such a vertex is called reducible vertex. It can be proved that at least two vertices always exit The two edges connected to boundary vertices are directed outward All the remaining edges are directed inward The directed edges are removed from the graph The process is repeated on the remaining graph Slide 19 UNSTRUCTURED MESH GENERATION Planar Graph with Minimum Out-Degree : Graphically explained Unstructured Meshes and Graphs Slide 20 UNSTRUCTURED MESH GENERATION Graph Ordering Techniques Ordering can have a large influence on CPU time and RAM requirements. Vertices close to each other should be stored close to each other Most of the grid generation algorithms produce poor ordering If a Boolean matrix of size [N x N] matrix stores connectivity of vertices such that (i,j) th entry is 1 if i th and j th vertices are connected, many 1s should be lying close to diagonal of the matrix 11 11 111 111 11 11 1 111 111 111 11 111 11 1111 1111 11111 11 111 11 1 Ordered to minimize bandwidthAs obtained form the algorithm Unstructured Meshes and Graphs Slide 21 UNSTRUCTURED MESH GENERATION A typical unstructured mesh Entries of Non-zero Laplacian Laplacian of reordered mesh Cuthill-McKee algorithm Slide 22 UNSTRUCTURED MESH GENERATION Graph Ordering Techniques Rosen Algorithm Step I: Determine the band width and choose a pair of vertices (say i and j) such that i < j Step II: If increasing i or decreasing j reduces band width then (increase i or decrease j and goto Step I) Step III: If increasing i and decreasing j does not change the band width then (increase I or decrease j and goto Step I) Comments Produces good ordering but is very expensive especially for large graphs Unstructured Meshes and Graphs Slide 23 UNSTRUCTURED MESH GENERATION Graph Ordering Techniques Cuthill-McKee Algorithm Step I: Find the vertex with lowest degree Step II: Find all the neighbouring vertices incident on root. Step III: Order the neghbouring vertices by increasing degree Step IV: Choose the neighbour with lowest degree if not previously not ordered. Step V: Continue with Step II till all vertices are ordered. Comments Very efficient Recommended in LD decomposition of matrices by reverse renumbering Unstructured Meshes and Graphs Slide 24 UNSTRUCTURED MESH GENERATION Graph Partitioning Graph partitioning is required for load balancing in parallel computing on unstructured grids Requirements Each processor should get as per its capability Communication between processors should be minimum. Communication graph This is graph in which vertices are processors and edge indicates that they need to share some information between. The colours in the graph show communication cycles 1 4 2 3 1 3 2 4 Mesh partitioned Communication graph Communication cycles 1 st cycle: 1-4 & 2-3 2 nd cycle: 1-2, 3-4 3 rd cycle: 1-3 Unstructured Meshes and Graphs Slide 25 UNSTRUCTURED MESH GENERATION Graph Partitioning Vizings theorem Any graph of maximum degree (i.e. number of edges incident on vertex) can be coloured with using n colours such that UNSTRUCTURED MESH GENERATION Every triangle is considered for inserting a point; its pdf is calculated using barycentric coordinates of triangle : Li = (A1*L1 + A2*L2 + A3*L3), where (A1/A, A2/A, A3/A) are called barycentric coordinates such that (A1/A + A2/A + A3/A) = 1 A point is accepted for insertion if the following two conditions are met (i) pdf point > (minimum of pdf of the vertices) (ii) pdf point > (minimum of pdf defined at the neighbouring points) Use the circumcircle criteria to create triangle A1A1 A3A3 A2A2 Non- methods of triangulation Graded Triangulation (Automatic triangulation)