30
Fast Adaptive Hybrid Mesh Generation Based on Quad-tree Decomposition Mohamed Ebeida ([email protected]) Mechanical and Aeronautical Eng. Dept – UCDavis Bay Area Scientific Computing Day 2008 March 29, 2008

Fast Adaptive Hybrid Mesh Generation Based on Quad-tree Decomposition Mohamed Ebeida ([email protected]) Mechanical and Aeronautical Eng. Dept –UCDavis

Embed Size (px)

Citation preview

Page 1: Fast Adaptive Hybrid Mesh Generation Based on Quad-tree Decomposition Mohamed Ebeida (msebeida@ucdavis.edu) Mechanical and Aeronautical Eng. Dept –UCDavis

Fast Adaptive Hybrid Mesh Generation Based on Quad-tree Decomposition

Mohamed Ebeida ([email protected])Mechanical and Aeronautical Eng. Dept –UCDavis

Bay Area Scientific Computing Day 2008March 29, 2008

Page 2: Fast Adaptive Hybrid Mesh Generation Based on Quad-tree Decomposition Mohamed Ebeida (msebeida@ucdavis.edu) Mechanical and Aeronautical Eng. Dept –UCDavis

MotivationStructured Grids

• Relatively simple geometries• Algebraic – Elliptic –

Hyperbolic methods• Line relaxation

solvers • Structured Multigrid

solvers • Adaptation using quad-tree or

oct-tree decomp (FEM)• Grid quality

Unstructured Grids

• Complex geometries • Delaunay point insertion

algorithms / advancing front• re-triangulation mesh points

can move • Agglomeration Multigrid

solvers• Adaptation using quad-tree or

oct-tree (FEM)• Grid quality

Page 3: Fast Adaptive Hybrid Mesh Generation Based on Quad-tree Decomposition Mohamed Ebeida (msebeida@ucdavis.edu) Mechanical and Aeronautical Eng. Dept –UCDavis

Overlapping grid system on space shuttle (Slotnick, Kandula and Buning 1994)

• Sophisticated Multiblock and Overlapping Structured Grid Techniques are required for Complex Geometries

Motivation

Page 4: Fast Adaptive Hybrid Mesh Generation Based on Quad-tree Decomposition Mohamed Ebeida (msebeida@ucdavis.edu) Mechanical and Aeronautical Eng. Dept –UCDavis

Motivation• Multigrid solvers

– Multigrid techniques enable optimal O(N) solution complexity

– Based on sequence of coarse and fine meshes– Originally developed for structured grids

Page 5: Fast Adaptive Hybrid Mesh Generation Based on Quad-tree Decomposition Mohamed Ebeida (msebeida@ucdavis.edu) Mechanical and Aeronautical Eng. Dept –UCDavis

• Agglomeration Multigrid solvers for unstructured meshes

Motivation

Page 6: Fast Adaptive Hybrid Mesh Generation Based on Quad-tree Decomposition Mohamed Ebeida (msebeida@ucdavis.edu) Mechanical and Aeronautical Eng. Dept –UCDavis

Quad-tree decomposition• Fast• Adaptive• Grid Quality• Line solvers• Hanging

nodes• Multigrid• Complex

geometries

Page 7: Fast Adaptive Hybrid Mesh Generation Based on Quad-tree Decomposition Mohamed Ebeida (msebeida@ucdavis.edu) Mechanical and Aeronautical Eng. Dept –UCDavis

Our Goals

• A fast technique • Quality• Complex geometries• Adaptive (geometries – solution variables)• Multigrid• Line relaxation solvers• No hanging nodes• Simple optimization steps (3D)• Parallelizable

Page 8: Fast Adaptive Hybrid Mesh Generation Based on Quad-tree Decomposition Mohamed Ebeida (msebeida@ucdavis.edu) Mechanical and Aeronautical Eng. Dept –UCDavis

Spatial Decomposition

Page 9: Fast Adaptive Hybrid Mesh Generation Based on Quad-tree Decomposition Mohamed Ebeida (msebeida@ucdavis.edu) Mechanical and Aeronautical Eng. Dept –UCDavis

Strategy

Algorithm

Algorithm 1

Adaptive grid based on the geometries

Algorithm 2

Adaptive grid based on the Simulation

Page 10: Fast Adaptive Hybrid Mesh Generation Based on Quad-tree Decomposition Mohamed Ebeida (msebeida@ucdavis.edu) Mechanical and Aeronautical Eng. Dept –UCDavis

Algorithm 1 - Geometries

• Start with a coarse Cartesian grid with aspect ratio = 1.0

• Dim: 30x30

Sp = 2.0

256 points

Page 11: Fast Adaptive Hybrid Mesh Generation Based on Quad-tree Decomposition Mohamed Ebeida (msebeida@ucdavis.edu) Mechanical and Aeronautical Eng. Dept –UCDavis

Algorithm 1 - Geometries

• Perform successive refinements till you reach a level that resolves the curvature of the geometries of the domain

Page 12: Fast Adaptive Hybrid Mesh Generation Based on Quad-tree Decomposition Mohamed Ebeida (msebeida@ucdavis.edu) Mechanical and Aeronautical Eng. Dept –UCDavis

Algorithm 1 - Geometries

• Level of refinements depend on the curvature of each shape

Page 13: Fast Adaptive Hybrid Mesh Generation Based on Quad-tree Decomposition Mohamed Ebeida (msebeida@ucdavis.edu) Mechanical and Aeronautical Eng. Dept –UCDavis

Algorithm 1 - Geometries

• Define a buffer zone and delete any element with a node in that zone

Page 14: Fast Adaptive Hybrid Mesh Generation Based on Quad-tree Decomposition Mohamed Ebeida (msebeida@ucdavis.edu) Mechanical and Aeronautical Eng. Dept –UCDavis

Algorithm 1 - Geometries

• Project nodes on the edge of the buffer zone orthogonally to the geometry

Page 15: Fast Adaptive Hybrid Mesh Generation Based on Quad-tree Decomposition Mohamed Ebeida (msebeida@ucdavis.edu) Mechanical and Aeronautical Eng. Dept –UCDavis

Algorithm 1 - Geometries

• Move nodes on the edge of the buffer zone orthogonally to the geometry to adjust B.L. elements

Page 16: Fast Adaptive Hybrid Mesh Generation Based on Quad-tree Decomposition Mohamed Ebeida (msebeida@ucdavis.edu) Mechanical and Aeronautical Eng. Dept –UCDavis

Algorithm 1 - Geometries

Page 17: Fast Adaptive Hybrid Mesh Generation Based on Quad-tree Decomposition Mohamed Ebeida (msebeida@ucdavis.edu) Mechanical and Aeronautical Eng. Dept –UCDavis

Another way !• Increase the width of the buffer zone and create

boundary elements explicitly better bounds!

Page 18: Fast Adaptive Hybrid Mesh Generation Based on Quad-tree Decomposition Mohamed Ebeida (msebeida@ucdavis.edu) Mechanical and Aeronautical Eng. Dept –UCDavis
Page 19: Fast Adaptive Hybrid Mesh Generation Based on Quad-tree Decomposition Mohamed Ebeida (msebeida@ucdavis.edu) Mechanical and Aeronautical Eng. Dept –UCDavis

Algorithm 1 - Geometries

• Final mesh

22416 pts

22064 elem.

Quad dom. 94.86%

Min edge length

7.6 x 10

Max A.R. = 64

-6

Page 20: Fast Adaptive Hybrid Mesh Generation Based on Quad-tree Decomposition Mohamed Ebeida (msebeida@ucdavis.edu) Mechanical and Aeronautical Eng. Dept –UCDavis

Complex geometries

Page 21: Fast Adaptive Hybrid Mesh Generation Based on Quad-tree Decomposition Mohamed Ebeida (msebeida@ucdavis.edu) Mechanical and Aeronautical Eng. Dept –UCDavis

Testing Algorithm 1 output

Page 22: Fast Adaptive Hybrid Mesh Generation Based on Quad-tree Decomposition Mohamed Ebeida (msebeida@ucdavis.edu) Mechanical and Aeronautical Eng. Dept –UCDavis

Algorithm 2 – Simulation based

• Use the output of Algorithm 1 as a base mesh for the spatial decomposition

• Run the simulation for n time steps (unsteady) or n iterations (steady)

• Perform Spatial decomposition on the base mesh based on a level set function.

• Map the variables from the grid used in the last simulation

Page 23: Fast Adaptive Hybrid Mesh Generation Based on Quad-tree Decomposition Mohamed Ebeida (msebeida@ucdavis.edu) Mechanical and Aeronautical Eng. Dept –UCDavis

How about transition elements?• In order to ensure quality, transition

element has to advance one step per spatial decomposition level

x

x

Page 24: Fast Adaptive Hybrid Mesh Generation Based on Quad-tree Decomposition Mohamed Ebeida (msebeida@ucdavis.edu) Mechanical and Aeronautical Eng. Dept –UCDavis

Results

Page 25: Fast Adaptive Hybrid Mesh Generation Based on Quad-tree Decomposition Mohamed Ebeida (msebeida@ucdavis.edu) Mechanical and Aeronautical Eng. Dept –UCDavis
Page 26: Fast Adaptive Hybrid Mesh Generation Based on Quad-tree Decomposition Mohamed Ebeida (msebeida@ucdavis.edu) Mechanical and Aeronautical Eng. Dept –UCDavis

Multigrid Levels

• Spatial decomposition allows us to generate prolongation and restriction operators easily

• How about the elements of each grid level?

We already have them

Page 27: Fast Adaptive Hybrid Mesh Generation Based on Quad-tree Decomposition Mohamed Ebeida (msebeida@ucdavis.edu) Mechanical and Aeronautical Eng. Dept –UCDavis

Multigrid Levels

Page 28: Fast Adaptive Hybrid Mesh Generation Based on Quad-tree Decomposition Mohamed Ebeida (msebeida@ucdavis.edu) Mechanical and Aeronautical Eng. Dept –UCDavis

Multigrid Results

• For elliptic equations, the application of Multigrid is straight forward once we have the grid levels.

• For convection diffusion equations, line solvers are crucial for good results

Page 29: Fast Adaptive Hybrid Mesh Generation Based on Quad-tree Decomposition Mohamed Ebeida (msebeida@ucdavis.edu) Mechanical and Aeronautical Eng. Dept –UCDavis

Checking our Goals

• A fast technique • Quality • Complex geometries• Adaptive with a starting coarse grid• Multigrid• Line relaxation solvers• No hanging nodes• Simple optimization steps (3D)• Parallelizable

Page 30: Fast Adaptive Hybrid Mesh Generation Based on Quad-tree Decomposition Mohamed Ebeida (msebeida@ucdavis.edu) Mechanical and Aeronautical Eng. Dept –UCDavis

Thank you!