Lehrstuhl Informatik V Scientific Computing I Module 7: Grid Generation Michael Bader Winter 2009/2010 Michael Bader: Scientific Computing I Module 7: Grid Generation, Winter 2009/2010 1
Lehrstuhl Informatik V Grid Generation and Refinement Numerical treatment of PDE • requires approximate description of the computational domain • discretization of the domain: • point discretization (finite differences) • cell discretization (finite elements/volumes) • main tasks: generating and refining grids or meshes; x i,j+1 x i−1,j x i,j x i+1,j x i,j−1 h y h y h x h x Michael Bader: Scientific Computing I Module 7: Grid Generation, Winter 2009/2010 2
Lehrstuhl Informatik V Grid Generation – Objectives Objectives: • accuracy : accurate (and dense) enough to catch the essential physical phenomena • boundary approximation : sufficiently detailed to represent boundaries and boundary conditions • computational efficiency : small overhead for handling of data structures, no loss of performance on supercomputers • numerical adequacy : features with a negative impact on numerical efficiency should be avoided (angles, distortions) Michael Bader: Scientific Computing I Module 7: Grid Generation, Winter 2009/2010 3
Lehrstuhl Informatik V Structured Grids • construction of points or elements follows regular process • geometric (coordinates) and topological information (neighbour relations) can be derived (i.e. are not stored) • memory addresses can be easily computed Michael Bader: Scientific Computing I Module 7: Grid Generation, Winter 2009/2010 4
Lehrstuhl Informatik V Unstructured Grids • (almost) no restrictions, maximum flexibilty • completely irregular generation, even random choice is possible • explicit storage of basic geometric and topological information • usually complicated data structures Michael Bader: Scientific Computing I Module 7: Grid Generation, Winter 2009/2010 5
Lehrstuhl Informatik V Grid Manipulations grid generation : • initial placement of grid points or elements grid adaption : • need for (additional) grid points often becomes clear only during the computations • requires possibilities of both refinement and coarsening grid partitioning : • standard parallelization techniques are based on some decomposition of the underlying domain Michael Bader: Scientific Computing I Module 7: Grid Generation, Winter 2009/2010 6
Lehrstuhl Informatik V Grid Operations Typical Operations on the Grid: • numbering of the nodes/cells • for traversal/processing of the grid • for storing the grid • for partitioning the grid • identify the neighbours of a node/cell • neighbouring/adjacent nodes/cells/edges • due to typical discretization techniques Michael Bader: Scientific Computing I Module 7: Grid Generation, Winter 2009/2010 7
Lehrstuhl Informatik V Regular Structured Grids • rectangular/ cartesian grids: rectangles (2D) or cuboids (3D) • triangular meshes: triangles (2D) or tetrahedra (3D) • row-major or column-major traversal and storage h y h x Michael Bader: Scientific Computing I Module 7: Grid Generation, Winter 2009/2010 8
Lehrstuhl Informatik V Transformed Structured Grids • transformation of the unit square to the computational domain • regular grid is transformed likewise (ξ(0),η(1)) (0,1) (1,1) (ξ(1),η(1)) (0,0) (1,0) (ξ(1),η(0)) (ξ(0),η(0)) Variants: • algebraic : interpolation-based • PDE-based : solve system of PDEs to obtain ξ ( x , y ) and η ( x , y ) Michael Bader: Scientific Computing I Module 7: Grid Generation, Winter 2009/2010 9
Lehrstuhl Informatik V Composite Structured Grids • subdivide (complicated) domain into subdomains of simpler form • and use regular meshs on each subdomain • at interfaces: • conforming at interface (“glue” required?) • overlapping grids ( chimera grids) Michael Bader: Scientific Computing I Module 7: Grid Generation, Winter 2009/2010 10
Lehrstuhl Informatik V Block Structured Grids • subdivision into logically rectangular subdomains (with logically rectangular local grids) • subdomains fit together in an unstructured way, but continuity is ensured (coinciding grid points) • popular in computational fluid dynamics Michael Bader: Scientific Computing I Module 7: Grid Generation, Winter 2009/2010 11
Lehrstuhl Informatik V Delaunay Triangulation • assume: grid points are already obtained – how to define elements? • based on Voronoi diagrams • Voronoi region around each given grid point: V i = { P : � P − P i � < � P − P j � ∀ j � = i } V 3 P P 3 2 V 1 P V P 1 2 4 V 4 P P 6 5 V 5 V 6 Michael Bader: Scientific Computing I Module 7: Grid Generation, Winter 2009/2010 12
Lehrstuhl Informatik V Delaunay Triangulation (2) Algorithm 1. Voronoi region around each given grid point: V i = { P : � P − P i � < � P − P j � ∀ j � = i } 2. connect points that are located in adjacent Voronoi regions 3. leads to set of disjoint triangles (tetrahedra in 3D) Applications: • closely related to FEM, typically triangles/tetrahedra • very widespread Michael Bader: Scientific Computing I Module 7: Grid Generation, Winter 2009/2010 13
Lehrstuhl Informatik V Point Generation how do we get the grid points? • start with a regular grid and refine/modify • boundary-based: • start with some boundary point distribution, • generate Delaunay triangulation, • and subdivide (following suitable rules) • if helpful, add point or lines sources (singularities, bound. layers) • Advancing Front methods Michael Bader: Scientific Computing I Module 7: Grid Generation, Winter 2009/2010 14
Lehrstuhl Informatik V Advancing Front Methods • advance a front step-by-step towards interior • starting from the boundary ( starting front ) P P P P 1 1 P P 2 2 Michael Bader: Scientific Computing I Module 7: Grid Generation, Winter 2009/2010 15
Lehrstuhl Informatik V Advancing Front Methods (2) Advancing algorithm: 1. choose an edge on the current front, say PQ 2. create a new point R at equal distance d from P and Q 3. determine all grid points lying within a circle around R, radius r 4. order these points w.r.t. distance from R 5. for all points, form triangles with P and Q; select one of these triangles 6. add triangle to grid (unless: intersections, . . . ) 7. update triangulation and front line: add new cell, update edges Michael Bader: Scientific Computing I Module 7: Grid Generation, Winter 2009/2010 16
Lehrstuhl Informatik V Adaptive Grids Characterization of adaptive grids: • size of grid cells varies considerably • to locally improve accuracy • sometimes requirement from numerics Challenge for structured grids: • efficient storage/traversal • retrieve structural information (neighbours, etc.) Michael Bader: Scientific Computing I Module 7: Grid Generation, Winter 2009/2010 17
Lehrstuhl Informatik V Block Adaptive Grids • retain regular structure • refinement of entire blocks • similar to block structured grids • efficient storage and processing • but limited w.r.t. adaptivity Michael Bader: Scientific Computing I Module 7: Grid Generation, Winter 2009/2010 18
Lehrstuhl Informatik V Recursively Structured Adaptive Grids • based on recursive subdivision of parent cell(s) • leads to tree structures • quadtree/octree or substructuring of triangles: • efficient storage; flexible adaptivity • but complicated processing (recursive algorithms) Michael Bader: Scientific Computing I Module 7: Grid Generation, Winter 2009/2010 19
Recommend
More recommend