Slide 1

Slide 1 text

Talk 2.08 Grid generation and adaptive refinement Goran Rakić, student Faculty of Mathematics, Belgrade Wednesday, 09/03/2008 Summer Academy 2008 Numerical Methods in Engineering Herceg Novi, Montenegro

Slide 2

Slide 2 text

● The solution of PDE can be simplified by a well-constructed grid. ● Grid which is not well suited to the problem can lead to instability or lack of convergence

Slide 3

Slide 3 text

No content

Slide 4

Slide 4 text

Logical and physical domain

Slide 5

Slide 5 text

Requirements for transformation ● Jacobian of the transformation should be non-zero to preserve properties of hosted equations (one to one mapping) where Jacobian matrix is: ● Smooth, orthogonal grids (or grids without small angles) usually result in the smallest error.

Slide 6

Slide 6 text

Additional requirements ● Grid spacing in physical domain should correlate with expected numerical error

Slide 7

Slide 7 text

Continuum and discrete grids ● Evaluating continumm boundary conforming transformation in discrete points of logical space gives discrete grid in physical space

Slide 8

Slide 8 text

Quick overview ● Structured grids ● Unstructured grids ● Special grids (multiblock, adaptive,...)

Slide 9

Slide 9 text

Algebraic methods ● Known functions are used in one, two, or three dimensions for transformation ● Interpolation between pair of boundaries ● If boundaries are given as data points, approximation must be used to fit function to data points first.

Slide 10

Slide 10 text

Bilinear maps ● Combining normalization and translation for transforming any quadralateral physical domain to rectangle to create bilinear maps ● One dimension:

Slide 11

Slide 11 text

Bilinear maps in two dimensions ● Two dimensions (vector form):

Slide 12

Slide 12 text

Special coordinate systems ● Polar, Spherical and Cylindrical ● Parabolic Cylinder coordinates ● Elliptic Cylinder coordinates ● ... ● And not to forgot, Cartesian grids ...where we all start from

Slide 13

Slide 13 text

Transfinite interpolation (TFI) ● Rapid computation (compare to PDE methods) ● Easy to control point locations ● Using Lagrange polynomials for blending: ξ, ξ-1, η, η-1

Slide 14

Slide 14 text

No content

Slide 15

Slide 15 text

Boundary parametrization... done

Slide 16

Slide 16 text

Let's fix ξ and let η go from 0..1: Now add ξ direction: Hmm, something is wrong when moving both ξ and η: Left boundary ξ = 1, right boundary

Slide 17

Slide 17 text

Ta da!

Slide 18

Slide 18 text

TFI examples (1/2)

Slide 19

Slide 19 text

TFI examples (2/2) 1 0 1

Slide 20

Slide 20 text

Topology of a hole ● Transformation preserves holes ● But with little magic...

Slide 21

Slide 21 text

No content

Slide 22

Slide 22 text

PDE methods for grid generation ● Algebraic methods (affine trans., bilinear, TFI) defining a grid geometrically ● PDE methods defining requirements for grid mathematically

Slide 23

Slide 23 text

PDE methods for grid generation ● We have to construct system of PDEs whose solutions are boundary conforming grid coordinate lines with specified line spacing ● Solving the system gives grid ● For large grids the computing time is considerable

Slide 24

Slide 24 text

Thompson's Elliptic PDE grid ● ξ = F(x,y) and η = G(x,y) are unknowns in Poisson eq with condition so x,y boundaries are mapped to boundaries of computational domain where P and Q defines grid point spacing ● Then instead solving ξ and η we change independent and dependent variables

Slide 25

Slide 25 text

Thompson's Elliptic PDE grid ● The system is solved on uniform grid in computational domain which gives coordinate lines in physical domain

Slide 26

Slide 26 text

Example copied from the book

Slide 27

Slide 27 text

Example copied from the book Boundary:

Slide 28

Slide 28 text

PDE methods for grid generation ● Hyperbolic – when wall boundaries are well defined, but far field boundary is left ● Can be used to smooth out metric discontinuities in the TFI

Slide 29

Slide 29 text

This slide is intentionally left blank.

Slide 30

Slide 30 text

Unstructured grids ● Field is in rapid expansion ● Faster to generate on complex domains ● Easy local refinement ● Complex data structure (link matrix or else) ● Can be generated more automatically even on complex domains, compared to structured grids

Slide 31

Slide 31 text

Delaunay triangulation ● Simple criteria to connect points to form conforming, non intersecting unstructured grid

Slide 32

Slide 32 text

Delaunay triangulation algorithm ● Nice incremental algorithm ● Introduce new point, locally break triangulation and then retriangulate affected part ● Flipping algorithm:

Slide 33

Slide 33 text

Point generation?

Slide 34

Slide 34 text

Advancing front generation ● Construct a grid from boundary informations ● Connect boundary points to create edges (called “front”) ● Select any edge in front and create its perpendicular bisector. On a bisector pick a point at the distance d inside the domain ● In that point, create a circle of radius r, order any points inside circle by distance from center and for each create triangles with edge vertices ● Pick up the first triangle that is not intersecting edges, and update front (connect, remove edges)

Slide 35

Slide 35 text

No content

Slide 36

Slide 36 text

Overlapping (Chimera-) grids ● Built using partially overlapping blocks ● Boundary conditions are exchanged between domains using interpolation ● Can combine structured and unstructured sub-grids

Slide 37

Slide 37 text

No content

Slide 38

Slide 38 text

Adaptive grid refinement ● We want to reduce error without unnecessary computational costs ● Regions of rapid variations of solution needs better resolution ● Using AGR we can discretize huge domains (astrophysics) and/or domains with non-uniform variations across regions of interest ● Save both memory and CPU time ● Trivial to implement for unstructured grids

Slide 39

Slide 39 text

Moving grids ● Solution adaptive methods for time-depended PDEs where regions of “rapid variations” moves in time (like Burgers' flow equation) ● Let grid points move with “whatever fronts are present” keeping number of grid points constant

Slide 40

Slide 40 text

Moving grids math ● Transform PDEs to include time changing grid transformation ● When discretized, time depending grid points are also unknowns so one has to find both so more equations must be added.

Slide 41

Slide 41 text

Moving grids math (cont.) ● New equations should connect grid points changing position with equidistribution principle of error in computed PDE solution ● Having an error-monitor function we want it to be equal over average on all grid sections ● They also must prevent rapid grid movement

Slide 42

Slide 42 text

Moving grid example without any real number-crunching shown

Slide 43

Slide 43 text

Cheating the “Summary” question ● No method that fits all ● In structured domains, algebraic methods are preferred for speed and simplicity ● Usually implemented in multi disciplinary software packages that goes with CAD interface, surface editing and visualization tools ● Multi-block