grid generation and adaptive refinement
DESCRIPTION
Summer Academy 2008, Numerical Methods in Engineering, Herceg Novi, MontenegroTRANSCRIPT
![Page 1: Grid generation and adaptive refinement](https://reader033.vdocument.in/reader033/viewer/2022052412/558ca149d8b42a1f6d8b4700/html5/thumbnails/1.jpg)
Talk 2.08
Grid generationand adaptive refinement
Goran Rakić, studentFaculty of Mathematics, Belgrade
Wednesday, 09/03/2008
Summer Academy 2008Numerical Methods in EngineeringHerceg Novi, Montenegro
![Page 2: Grid generation and adaptive refinement](https://reader033.vdocument.in/reader033/viewer/2022052412/558ca149d8b42a1f6d8b4700/html5/thumbnails/2.jpg)
● 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
![Page 3: Grid generation and adaptive refinement](https://reader033.vdocument.in/reader033/viewer/2022052412/558ca149d8b42a1f6d8b4700/html5/thumbnails/3.jpg)
![Page 4: Grid generation and adaptive refinement](https://reader033.vdocument.in/reader033/viewer/2022052412/558ca149d8b42a1f6d8b4700/html5/thumbnails/4.jpg)
Logical and physical domain
![Page 5: Grid generation and adaptive refinement](https://reader033.vdocument.in/reader033/viewer/2022052412/558ca149d8b42a1f6d8b4700/html5/thumbnails/5.jpg)
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.
![Page 6: Grid generation and adaptive refinement](https://reader033.vdocument.in/reader033/viewer/2022052412/558ca149d8b42a1f6d8b4700/html5/thumbnails/6.jpg)
Additional requirements
● Grid spacing in physical domain should correlate with expected numerical error
![Page 7: Grid generation and adaptive refinement](https://reader033.vdocument.in/reader033/viewer/2022052412/558ca149d8b42a1f6d8b4700/html5/thumbnails/7.jpg)
Continuum and discrete grids
● Evaluating continumm boundary conforming transformation in discrete points of logical space gives discrete grid in physical space
![Page 8: Grid generation and adaptive refinement](https://reader033.vdocument.in/reader033/viewer/2022052412/558ca149d8b42a1f6d8b4700/html5/thumbnails/8.jpg)
Quick overview
● Structured grids
● Unstructured grids
● Special grids (multiblock, adaptive,...)
![Page 9: Grid generation and adaptive refinement](https://reader033.vdocument.in/reader033/viewer/2022052412/558ca149d8b42a1f6d8b4700/html5/thumbnails/9.jpg)
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.
![Page 10: Grid generation and adaptive refinement](https://reader033.vdocument.in/reader033/viewer/2022052412/558ca149d8b42a1f6d8b4700/html5/thumbnails/10.jpg)
Bilinear maps
● Combining normalization and translation for transforming any quadralateral physical domain to rectangle to create bilinear maps
● One dimension:
![Page 11: Grid generation and adaptive refinement](https://reader033.vdocument.in/reader033/viewer/2022052412/558ca149d8b42a1f6d8b4700/html5/thumbnails/11.jpg)
Bilinear maps in two dimensions
● Two dimensions (vector form):
![Page 12: Grid generation and adaptive refinement](https://reader033.vdocument.in/reader033/viewer/2022052412/558ca149d8b42a1f6d8b4700/html5/thumbnails/12.jpg)
Special coordinate systems
● Polar, Spherical and Cylindrical● Parabolic Cylinder coordinates● Elliptic Cylinder coordinates● ...● And not to forgot, Cartesian grids
...where we all start from
![Page 13: Grid generation and adaptive refinement](https://reader033.vdocument.in/reader033/viewer/2022052412/558ca149d8b42a1f6d8b4700/html5/thumbnails/13.jpg)
Transfinite interpolation (TFI)
● Rapid computation (compare to PDE methods)● Easy to control point locations● Using Lagrange polynomials for blending:
ξ, ξ-1, η, η-1
![Page 14: Grid generation and adaptive refinement](https://reader033.vdocument.in/reader033/viewer/2022052412/558ca149d8b42a1f6d8b4700/html5/thumbnails/14.jpg)
![Page 15: Grid generation and adaptive refinement](https://reader033.vdocument.in/reader033/viewer/2022052412/558ca149d8b42a1f6d8b4700/html5/thumbnails/15.jpg)
Boundary parametrization... done
![Page 16: Grid generation and adaptive refinement](https://reader033.vdocument.in/reader033/viewer/2022052412/558ca149d8b42a1f6d8b4700/html5/thumbnails/16.jpg)
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
![Page 17: Grid generation and adaptive refinement](https://reader033.vdocument.in/reader033/viewer/2022052412/558ca149d8b42a1f6d8b4700/html5/thumbnails/17.jpg)
Ta da!
![Page 18: Grid generation and adaptive refinement](https://reader033.vdocument.in/reader033/viewer/2022052412/558ca149d8b42a1f6d8b4700/html5/thumbnails/18.jpg)
TFI examples (1/2)
![Page 19: Grid generation and adaptive refinement](https://reader033.vdocument.in/reader033/viewer/2022052412/558ca149d8b42a1f6d8b4700/html5/thumbnails/19.jpg)
TFI examples (2/2)
1
0 1
![Page 20: Grid generation and adaptive refinement](https://reader033.vdocument.in/reader033/viewer/2022052412/558ca149d8b42a1f6d8b4700/html5/thumbnails/20.jpg)
Topology of a hole
● Transformation preserves holes● But with little magic...
![Page 21: Grid generation and adaptive refinement](https://reader033.vdocument.in/reader033/viewer/2022052412/558ca149d8b42a1f6d8b4700/html5/thumbnails/21.jpg)
![Page 22: Grid generation and adaptive refinement](https://reader033.vdocument.in/reader033/viewer/2022052412/558ca149d8b42a1f6d8b4700/html5/thumbnails/22.jpg)
PDE methods for grid generation
● Algebraic methods (affine trans., bilinear, TFI)defining a grid geometrically
● PDE methodsdefining requirements for grid mathematically
![Page 23: Grid generation and adaptive refinement](https://reader033.vdocument.in/reader033/viewer/2022052412/558ca149d8b42a1f6d8b4700/html5/thumbnails/23.jpg)
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
![Page 24: Grid generation and adaptive refinement](https://reader033.vdocument.in/reader033/viewer/2022052412/558ca149d8b42a1f6d8b4700/html5/thumbnails/24.jpg)
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
![Page 25: Grid generation and adaptive refinement](https://reader033.vdocument.in/reader033/viewer/2022052412/558ca149d8b42a1f6d8b4700/html5/thumbnails/25.jpg)
Thompson's Elliptic PDE grid
● The system is solved on uniform grid in computational domain which gives coordinate lines in physical domain
![Page 26: Grid generation and adaptive refinement](https://reader033.vdocument.in/reader033/viewer/2022052412/558ca149d8b42a1f6d8b4700/html5/thumbnails/26.jpg)
Example copied from the book
![Page 27: Grid generation and adaptive refinement](https://reader033.vdocument.in/reader033/viewer/2022052412/558ca149d8b42a1f6d8b4700/html5/thumbnails/27.jpg)
Example copied from the book
Boundary:
![Page 28: Grid generation and adaptive refinement](https://reader033.vdocument.in/reader033/viewer/2022052412/558ca149d8b42a1f6d8b4700/html5/thumbnails/28.jpg)
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
![Page 29: Grid generation and adaptive refinement](https://reader033.vdocument.in/reader033/viewer/2022052412/558ca149d8b42a1f6d8b4700/html5/thumbnails/29.jpg)
This slide is intentionally left blank.
![Page 30: Grid generation and adaptive refinement](https://reader033.vdocument.in/reader033/viewer/2022052412/558ca149d8b42a1f6d8b4700/html5/thumbnails/30.jpg)
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
![Page 31: Grid generation and adaptive refinement](https://reader033.vdocument.in/reader033/viewer/2022052412/558ca149d8b42a1f6d8b4700/html5/thumbnails/31.jpg)
Delaunay triangulation
● Simple criteria to connect points to form conforming, non intersecting unstructured grid
![Page 32: Grid generation and adaptive refinement](https://reader033.vdocument.in/reader033/viewer/2022052412/558ca149d8b42a1f6d8b4700/html5/thumbnails/32.jpg)
Delaunay triangulation algorithm
● Nice incremental algorithm● Introduce new point, locally break triangulation
and then retriangulate affected part
● Flipping algorithm:
![Page 33: Grid generation and adaptive refinement](https://reader033.vdocument.in/reader033/viewer/2022052412/558ca149d8b42a1f6d8b4700/html5/thumbnails/33.jpg)
Point generation?
![Page 34: Grid generation and adaptive refinement](https://reader033.vdocument.in/reader033/viewer/2022052412/558ca149d8b42a1f6d8b4700/html5/thumbnails/34.jpg)
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)
![Page 35: Grid generation and adaptive refinement](https://reader033.vdocument.in/reader033/viewer/2022052412/558ca149d8b42a1f6d8b4700/html5/thumbnails/35.jpg)
![Page 36: Grid generation and adaptive refinement](https://reader033.vdocument.in/reader033/viewer/2022052412/558ca149d8b42a1f6d8b4700/html5/thumbnails/36.jpg)
Overlapping (Chimera-) grids
● Built using partially overlapping blocks● Boundary conditions are exchanged between
domains using interpolation● Can combine structured and unstructured
sub-grids
![Page 37: Grid generation and adaptive refinement](https://reader033.vdocument.in/reader033/viewer/2022052412/558ca149d8b42a1f6d8b4700/html5/thumbnails/37.jpg)
![Page 38: Grid generation and adaptive refinement](https://reader033.vdocument.in/reader033/viewer/2022052412/558ca149d8b42a1f6d8b4700/html5/thumbnails/38.jpg)
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
![Page 39: Grid generation and adaptive refinement](https://reader033.vdocument.in/reader033/viewer/2022052412/558ca149d8b42a1f6d8b4700/html5/thumbnails/39.jpg)
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
![Page 40: Grid generation and adaptive refinement](https://reader033.vdocument.in/reader033/viewer/2022052412/558ca149d8b42a1f6d8b4700/html5/thumbnails/40.jpg)
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.
![Page 41: Grid generation and adaptive refinement](https://reader033.vdocument.in/reader033/viewer/2022052412/558ca149d8b42a1f6d8b4700/html5/thumbnails/41.jpg)
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
![Page 42: Grid generation and adaptive refinement](https://reader033.vdocument.in/reader033/viewer/2022052412/558ca149d8b42a1f6d8b4700/html5/thumbnails/42.jpg)
Moving grid example without any real number-crunching shown
![Page 43: Grid generation and adaptive refinement](https://reader033.vdocument.in/reader033/viewer/2022052412/558ca149d8b42a1f6d8b4700/html5/thumbnails/43.jpg)
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