an introduction to mesh generation algorithms part 2...an introduction to mesh generation algorithms...

40
An Introduction to Mesh Generation An Introduction to Mesh Generation Algorithms Algorithms Part 2 Part 2 Meshing Generation Tutorial Instituto Tecnológico de Veracruz 21-25 April 2008 1 Part 2 Part 2 Fathi El-Yafi Project and Software Development Manager Engineering Simulation

Upload: others

Post on 11-Mar-2020

38 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: An Introduction to Mesh Generation Algorithms Part 2...An Introduction to Mesh Generation Algorithms Part 2 Instituto Tecnológico de Veracruz Meshing Generation Tutorial 21-25 April

An Introduction to Mesh Generation An Introduction to Mesh Generation AlgorithmsAlgorithms

Part 2Part 2

Meshing Generation TutorialInstituto Tecnológico de Veracruz 21-25 April 2008 1

Part 2Part 2

Fathi El-YafiProject and Software Development Manager

Engineering Simulation

Page 2: An Introduction to Mesh Generation Algorithms Part 2...An Introduction to Mesh Generation Algorithms Part 2 Instituto Tecnológico de Veracruz Meshing Generation Tutorial 21-25 April

Overview

� Remeshing

� Decimation

Adaptive Meshing:

Meshing Generation TutorialInstituto Tecnológico de Veracruz 21-25 April 2008 2

� Decimation

� Optimization

Page 3: An Introduction to Mesh Generation Algorithms Part 2...An Introduction to Mesh Generation Algorithms Part 2 Instituto Tecnológico de Veracruz Meshing Generation Tutorial 21-25 April

Finite Element Context

Objective:

2D Adaptive Mesh according to the specifications sizes imposed by the user

Adaptive Meshing

Meshing Generation TutorialInstituto Tecnológico de Veracruz 21-25 April 2008 3

Method:� Calculating the density of the mesh from a tree Quaternary� Nodal generation within each cell of the tree� Meshing by advancing front method according to a criterion of Delaunay

Page 4: An Introduction to Mesh Generation Algorithms Part 2...An Introduction to Mesh Generation Algorithms Part 2 Instituto Tecnológico de Veracruz Meshing Generation Tutorial 21-25 April

Quaternary Tree

Finite Element Context

Meshing Generation TutorialInstituto Tecnológico de Veracruz 21-25 April 2008 4

In computer science, a B+ tree (also known as a Quaternary Tree ) is a type of tree, which represents sorted data in a way that allows for efficient insertion, retrieval and removal of records, each of which is identified by a key. It is a dynamic, multilevel index, with maximum and minimum bounds on the number of keys in each index segment (usually called a block' or node'). In a B+ tree, in contrast to a B+ tree, all records are stored at the lowest level of the tree; only keys are stored in interior blocks.

Page 5: An Introduction to Mesh Generation Algorithms Part 2...An Introduction to Mesh Generation Algorithms Part 2 Instituto Tecnológico de Veracruz Meshing Generation Tutorial 21-25 April

Remeshing a Polygon

n points

?

Finite Element Context

Meshing Generation TutorialInstituto Tecnológico de Veracruz 21-25 April 2008 5

Possible Remeshing?

?

Page 6: An Introduction to Mesh Generation Algorithms Part 2...An Introduction to Mesh Generation Algorithms Part 2 Instituto Tecnológico de Veracruz Meshing Generation Tutorial 21-25 April

Principle

=

Finite Element Context

Meshing Generation TutorialInstituto Tecnológico de Veracruz 21-25 April 2008 6

=

=

Page 7: An Introduction to Mesh Generation Algorithms Part 2...An Introduction to Mesh Generation Algorithms Part 2 Instituto Tecnológico de Veracruz Meshing Generation Tutorial 21-25 April

Principle

n(n − 1)(n − 2)

n nodes lead to n-2 triangles

=

Finite Element Context

Meshing Generation TutorialInstituto Tecnológico de Veracruz 21-25 April 2008 7

Tn = n(n − 1)(n − 2)

6It shows that we can create Tn

different triangles

120845635201041

109876543

N=10, 1430 possible triangulations!

Page 8: An Introduction to Mesh Generation Algorithms Part 2...An Introduction to Mesh Generation Algorithms Part 2 Instituto Tecnológico de Veracruz Meshing Generation Tutorial 21-25 April

Adaptive Mesh

State of the Art

� Methods that use the surface parameterization:

� Appropriate Plane + transport functions

� Appropriate Plane + Metric: INRIA

Meshing Generation TutorialInstituto Tecnológico de Veracruz 21-25 April 2008 8

� Discrete Models:

Very Refined Initial Mesh + Simplifications

Reconstruction:

• Direct Method: Frontal Triangulation (R. Löhner)

• Remeshing: HDI (A. Rassineux)

Page 9: An Introduction to Mesh Generation Algorithms Part 2...An Introduction to Mesh Generation Algorithms Part 2 Instituto Tecnológico de Veracruz Meshing Generation Tutorial 21-25 April

Typical Examples

Adaptive Mesh

Meshing Generation TutorialInstituto Tecnológico de Veracruz 21-25 April 2008 9

Page 10: An Introduction to Mesh Generation Algorithms Part 2...An Introduction to Mesh Generation Algorithms Part 2 Instituto Tecnológico de Veracruz Meshing Generation Tutorial 21-25 April

Adaptive Meshing using Diffuse Interpolation

Objective:

Building an adaptive mesh of a 3D surface according to size map, using the initial mesh as only data

Initial Mesh

Adaptive Mesh

Meshing Generation TutorialInstituto Tecnológico de Veracruz 21-25 April 2008 10

Initial Mesh

Local geometric model

Diffuse Interpolation

Hermite type

Adaptive mesh

Remeshing Procedure

Page 11: An Introduction to Mesh Generation Algorithms Part 2...An Introduction to Mesh Generation Algorithms Part 2 Instituto Tecnológico de Veracruz Meshing Generation Tutorial 21-25 April

Remeshing

Adaptive Mesh

Meshing Generation TutorialInstituto Tecnológico de Veracruz 21-25 April 2008 11

Page 12: An Introduction to Mesh Generation Algorithms Part 2...An Introduction to Mesh Generation Algorithms Part 2 Instituto Tecnológico de Veracruz Meshing Generation Tutorial 21-25 April

Some Remeshing Tools

Edge splitting

Edge collapsing

Adaptive Mesh

Meshing Generation TutorialInstituto Tecnológico de Veracruz 21-25 April 2008 12

Swapping

Nodal Shifting

Node removing

Edge collapsing and nodal insertion

Page 13: An Introduction to Mesh Generation Algorithms Part 2...An Introduction to Mesh Generation Algorithms Part 2 Instituto Tecnológico de Veracruz Meshing Generation Tutorial 21-25 April

Remeshing

Adaptive Mesh

Meshing Generation TutorialInstituto Tecnológico de Veracruz 21-25 April 2008 13

Remeshing according to a size map

Simplification of a mesh (70%)

Page 14: An Introduction to Mesh Generation Algorithms Part 2...An Introduction to Mesh Generation Algorithms Part 2 Instituto Tecnológico de Veracruz Meshing Generation Tutorial 21-25 April

Remeshing

Adaptive Mesh

Meshing Generation TutorialInstituto Tecnológico de Veracruz 21-25 April 2008 14

Initial Mesh Intermediate Mesh Optimized Mesh

Page 15: An Introduction to Mesh Generation Algorithms Part 2...An Introduction to Mesh Generation Algorithms Part 2 Instituto Tecnológico de Veracruz Meshing Generation Tutorial 21-25 April

Surface Remeshing

Adaptive Mesh

Meshing Generation TutorialInstituto Tecnológico de Veracruz 21-25 April 2008 15

Initial Mesh

Optimized Mesh

Page 16: An Introduction to Mesh Generation Algorithms Part 2...An Introduction to Mesh Generation Algorithms Part 2 Instituto Tecnológico de Veracruz Meshing Generation Tutorial 21-25 April

Surface Remeshing

Reduction: 60%Reduction: 75%

Initial model

Adaptive Mesh

Meshing Generation TutorialInstituto Tecnológico de Veracruz 21-25 April 2008 16

Adapted to curvature

Page 17: An Introduction to Mesh Generation Algorithms Part 2...An Introduction to Mesh Generation Algorithms Part 2 Instituto Tecnológico de Veracruz Meshing Generation Tutorial 21-25 April

Surface Meshing

Adaptive Mesh

Meshing Generation TutorialInstituto Tecnológico de Veracruz 21-25 April 2008 17

Adapted to curvature

Simplified model

Page 18: An Introduction to Mesh Generation Algorithms Part 2...An Introduction to Mesh Generation Algorithms Part 2 Instituto Tecnológico de Veracruz Meshing Generation Tutorial 21-25 April

Simplified Curvature

In a plane 360iθ = °∑

ααααιιιι

Adaptive Mesh

Meshing Generation TutorialInstituto Tecnológico de Veracruz 21-25 April 2008 18

Θ1

Θ2

Of all the triangles 360iα ≥ °∑default angle = f (Gaussian Curvature)( ) =∆=−∑ θθα ii

Page 19: An Introduction to Mesh Generation Algorithms Part 2...An Introduction to Mesh Generation Algorithms Part 2 Instituto Tecnológico de Veracruz Meshing Generation Tutorial 21-25 April

Feature Lines Detection

Adaptive Mesh

Meshing Generation TutorialInstituto Tecnológico de Veracruz 21-25 April 2008 19

Page 20: An Introduction to Mesh Generation Algorithms Part 2...An Introduction to Mesh Generation Algorithms Part 2 Instituto Tecnológico de Veracruz Meshing Generation Tutorial 21-25 April

Feature Lines Detection

Adaptive Mesh

Meshing Generation TutorialInstituto Tecnológico de Veracruz 21-25 April 2008 20

� Curvature using Diffuse Interpolation Model

(a) (b)

� Identification of geometrical parameters (radius, axis)

� Detecting neighborhood

Page 21: An Introduction to Mesh Generation Algorithms Part 2...An Introduction to Mesh Generation Algorithms Part 2 Instituto Tecnológico de Veracruz Meshing Generation Tutorial 21-25 April

Principal Curvatures

� Segmentation into subsets

� Surface Identification

� Detection of Feature lines

Adaptive Mesh

Meshing Generation TutorialInstituto Tecnológico de Veracruz 21-25 April 2008 21

� Meshing

Page 22: An Introduction to Mesh Generation Algorithms Part 2...An Introduction to Mesh Generation Algorithms Part 2 Instituto Tecnológico de Veracruz Meshing Generation Tutorial 21-25 April

Example� Segmentation into subsets

� Surface Identification

� Detection of Feature lines

� Meshing

Adaptive Mesh

Meshing Generation TutorialInstituto Tecnológico de Veracruz 21-25 April 2008 22…

� Meshing

Page 23: An Introduction to Mesh Generation Algorithms Part 2...An Introduction to Mesh Generation Algorithms Part 2 Instituto Tecnológico de Veracruz Meshing Generation Tutorial 21-25 April

Main Steps

Adaptive Mesh

Meshing Generation TutorialInstituto Tecnológico de Veracruz 21-25 April 2008 23…

Page 24: An Introduction to Mesh Generation Algorithms Part 2...An Introduction to Mesh Generation Algorithms Part 2 Instituto Tecnológico de Veracruz Meshing Generation Tutorial 21-25 April

Adaptive Mesh

Meshing Generation TutorialInstituto Tecnológico de Veracruz 21-25 April 2008 24

Page 25: An Introduction to Mesh Generation Algorithms Part 2...An Introduction to Mesh Generation Algorithms Part 2 Instituto Tecnológico de Veracruz Meshing Generation Tutorial 21-25 April

Diffuse Model

z

y

αα TPyxyxyxyxfz =>=<= 22 ,,,,,1),(Local model

MLS Technique : Diffuse approximation

Minimisation of an interpolation criterion

Adaptive Mesh

Meshing Generation TutorialInstituto Tecnológico de Veracruz 21-25 April 2008 25

x

( ) ( )( )21

1 ),( iiT

ni

iix zxxpxxwJ −−×=∑

=

=αα

Page 26: An Introduction to Mesh Generation Algorithms Part 2...An Introduction to Mesh Generation Algorithms Part 2 Instituto Tecnológico de Veracruz Meshing Generation Tutorial 21-25 April

Moving Least Squares

( ) ( )2 21, , , , , ,T Tx y x xy y p x y p x< >= =� Polynomial Base

( )i n=

n = Total number of points ⇒ «standard» Least Squares

Adaptive Mesh

Meshing Generation TutorialInstituto Tecnológico de Veracruz 21-25 April 2008 26

( )( )2

1

( ) ( )i n

Tx i i

i

J p x x f x xα α=

=

= − − −∑

X

Z

R

� Select a neighbor V(x) around a point(x,y)

( )( )2

( )

( ) ( )Tx i i

i V x

J p x x f x xα α∈

= − − −∑

⇒ The approximation is local

Page 27: An Introduction to Mesh Generation Algorithms Part 2...An Introduction to Mesh Generation Algorithms Part 2 Instituto Tecnológico de Veracruz Meshing Generation Tutorial 21-25 April

Weighted Moving Least Squares

( ) ( )( )2( ) ( )TJ w x x p x x f x xα α= − − − −∑

Weight Function

Adaptive Mesh

Meshing Generation TutorialInstituto Tecnológico de Veracruz 21-25 April 2008 27

( ) ( )( )2

( )

( ) ( )Tx i i i

i V x

J w x x p x x f x xα α∈

= − − − −∑

/R d l

)l()-l(,x)w(x

w,x)w(x

ii

iii

xR

xxirefi

=+×=

=

avec

211 2

)(

Page 28: An Introduction to Mesh Generation Algorithms Part 2...An Introduction to Mesh Generation Algorithms Part 2 Instituto Tecnológico de Veracruz Meshing Generation Tutorial 21-25 April

Moving Least Squares Interpolation

( ) ( )( )2

( )

( ) ( )Tx i i i

i V x

J w x x p x x f x xα α∈

= − − − −∑

Adaptive Mesh

Meshing Generation TutorialInstituto Tecnológico de Veracruz 21-25 April 2008 28

[ ]

−→

),(1

),(),(

xxw

xxwxxw

i

ii

If w(x,xi)→→→→ ∞∞∞∞ ⇒⇒⇒⇒ interpolation at point xi

Page 29: An Introduction to Mesh Generation Algorithms Part 2...An Introduction to Mesh Generation Algorithms Part 2 Instituto Tecnológico de Veracruz Meshing Generation Tutorial 21-25 April

CAD-STL Face Per Face

Adaptive Mesh

Meshing Generation TutorialInstituto Tecnológico de Veracruz 21-25 April 2008 29

Page 30: An Introduction to Mesh Generation Algorithms Part 2...An Introduction to Mesh Generation Algorithms Part 2 Instituto Tecnológico de Veracruz Meshing Generation Tutorial 21-25 April

Finite Element Context

STL/Mesh/Adaptive Mesh

STL Mesh

Meshing Generation TutorialInstituto Tecnológico de Veracruz 21-25 April 2008 30

Mesh Face per Face Adaptive Mesh

Page 31: An Introduction to Mesh Generation Algorithms Part 2...An Introduction to Mesh Generation Algorithms Part 2 Instituto Tecnológico de Veracruz Meshing Generation Tutorial 21-25 April

STL/Adaptive Mesh

Adaptive Mesh

Adaptive Mesh

Meshing Generation TutorialInstituto Tecnológico de Veracruz 21-25 April 2008 31

STL Mesh

Page 32: An Introduction to Mesh Generation Algorithms Part 2...An Introduction to Mesh Generation Algorithms Part 2 Instituto Tecnológico de Veracruz Meshing Generation Tutorial 21-25 April

CAD/Adaptive Meshes

Adaptive Mesh

Meshing Generation TutorialInstituto Tecnológico de Veracruz 21-25 April 2008 32

Page 33: An Introduction to Mesh Generation Algorithms Part 2...An Introduction to Mesh Generation Algorithms Part 2 Instituto Tecnológico de Veracruz Meshing Generation Tutorial 21-25 April

Mesh Details

Adaptive Mesh

Meshing Generation TutorialInstituto Tecnológico de Veracruz 21-25 April 2008 33

Page 34: An Introduction to Mesh Generation Algorithms Part 2...An Introduction to Mesh Generation Algorithms Part 2 Instituto Tecnológico de Veracruz Meshing Generation Tutorial 21-25 April

Feature Lines

Adaptive Mesh

Meshing Generation TutorialInstituto Tecnológico de Veracruz 21-25 April 2008 34

Page 35: An Introduction to Mesh Generation Algorithms Part 2...An Introduction to Mesh Generation Algorithms Part 2 Instituto Tecnológico de Veracruz Meshing Generation Tutorial 21-25 April

Surface Remeshing

Adaptive Mesh

Meshing Generation TutorialInstituto Tecnológico de Veracruz 21-25 April 2008 35

Initial model Simplified model

Page 36: An Introduction to Mesh Generation Algorithms Part 2...An Introduction to Mesh Generation Algorithms Part 2 Instituto Tecnológico de Veracruz Meshing Generation Tutorial 21-25 April

Surface Remeshing

Adaptive Mesh

Meshing Generation TutorialInstituto Tecnológico de Veracruz 21-25 April 2008 36

Page 37: An Introduction to Mesh Generation Algorithms Part 2...An Introduction to Mesh Generation Algorithms Part 2 Instituto Tecnológico de Veracruz Meshing Generation Tutorial 21-25 April

Surface Remeshing

Adaptive Mesh

Adaptive Mesh

Meshing Generation TutorialInstituto Tecnológico de Veracruz 21-25 April 2008 37

Initial Mesh

Adaptive Mesh

Page 38: An Introduction to Mesh Generation Algorithms Part 2...An Introduction to Mesh Generation Algorithms Part 2 Instituto Tecnológico de Veracruz Meshing Generation Tutorial 21-25 April

Surface Remeshing

Adaptive Mesh

Meshing Generation TutorialInstituto Tecnológico de Veracruz 21-25 April 2008 38

Page 39: An Introduction to Mesh Generation Algorithms Part 2...An Introduction to Mesh Generation Algorithms Part 2 Instituto Tecnológico de Veracruz Meshing Generation Tutorial 21-25 April

Repairing Surface Mesh

Adaptive Mesh

Meshing Generation TutorialInstituto Tecnológico de Veracruz 21-25 April 2008 39

Page 40: An Introduction to Mesh Generation Algorithms Part 2...An Introduction to Mesh Generation Algorithms Part 2 Instituto Tecnológico de Veracruz Meshing Generation Tutorial 21-25 April

Demonstrations

Adaptive Mesh

Meshing Generation TutorialInstituto Tecnológico de Veracruz 21-25 April 2008 40