Grid Generation

==What is a Mesh/Grid?==
A collection of discrete points, or nodes, distributed throughout a volume with specified connectivity between points.
(note: Meshless discretizations does not require connectivity (not in general use))
: “The determination of a proper grid for the flow over or through a given geometric shape is a serious matter – one that is by no means trivial.” - John D. Anderson, Computational...
==Terminology==
*Cell - computational control volume
*Node - grid point, cell corners
*Cell Center - position in the center of the cell
*Face - cell boundary
*Zone - group of cells
*Domain - region containing all cells
===Mesh Types===
*Structured
**Cartesian - Grid lines are aligned with the Cartesian coordinate system
**Curvilinear/Boundary-fitted - Grid lines curve in space
*Unstructured
**Homogeneous - All one cell type
**Mixed Element/Hybrid - Mixed cell types
==Structured Grids==
===Advantages===
*Very fast
===Disadvantages===
===Uses===
===Grid Stretching===
*Required to capture solution gradients
*Required to capture grid features
*Issues
**Too much stretching leads to solution errors
**Stretching can extend into low gradient regions
====Geometric Stretching====
*Instead of evenly subdividing the boundary surface, specify a geometric stretching factor, k
*If s is the distance along a boundary:
:\Delta s_j=k\Delta s_{j-1}
:\Delta s_j=k^{j-1}\Delta s_1
:s_j = s_1 + \Delta s_1 \frac{k^{j-1}-1}{k-1} = s_1 + \left(s_{jmax} - s_1\right)\frac{k^{j-1}-1}{k^{jmax-1}-1}
*More sophisticated stretching methods are usually employed (i.e. hyperbolic tangent stretching)
===Elliptic Grid Generation===
:Grid transformations can be defined by an elliptical PDE like:
:\xi_{xx}+\xi_{yy}=0
:\eta_{xx}+\eta_{yy}=0
===Mixed Topologies===
:Multiple methods for how to deal with gridding spaces where no one grid type is best
====Compromise====
*Use a single grid strategy for the entire system.
====Multi-Block====
*Use a single grid strategy for the entire system
====Overset Grids====
*Grid each component using the best grid strategy for the component topology
*Combine the individual grids using overset technologies
===Quality===
:Quality affects the accuracy of the solution.
:Three measures of quality
====Skewness====
:Skewness is based on the deviation from a normalized equilateral angle.
====Smoothness====
:The change in spacing should be gradual:
:\text{stretching} = \text{abs} \frac{\Delta x_i - \Delta x_{x-1}}{\Delta x_i}
====Aspect Ratio====
:Aspect ratio is a measure of the largest cell dimension relative to the smallest cell dimension. High aspect ratios can be acceptable in the boundary layer, but detrimental in the "inviscid" regions.
:The aspect ratio for non-rectangular cells can be calculated using the following method:
:*Bisect opposite sides of the cell
:*Construct rectangles through midpoints and perpendicular to each line
:*Divide the larger side by the smaller side for each and use the largest value
===Design Guidelines===
*More cells/nodes can improve accuracy, but higher cost in memory and time
**Don't underestimate the value of fast turn-around
**Use stretching to cluster cells in regions where gradients are large
*Cell counts of the order:
**1E4 are relatively small problems.
**1E5 are intermediate size problems.
**1E6 are large. Such problems can be efficiently run using multiple CPUs, but mesh generation and post-processing may become slow.
**1E7 are huge and should be avoided if possible; however, they are common in aerospace and automotive applications.
**1E8 and more are DoD style applications.
===Sources of Error===
*Mesh too coarse
*High skewness
*Large jumps in volume between adjacent cells
*Large aspect ratios (away from boundary layer)
*Interpolation errors for multi-block grids
*Inappropriate boundary layer mesh
==Unstructured Grids==
===Advantages===
*Can conform to extremely detailed geometries
*Software is becoming more automated
*Much easier to perform grid adaptation
===Disadvantages===
*Current flow solvers are restricted to 2nd order or less
===Uses===
*Best for complex geometries, but run times can be slow
*Typically unstructured grids are triangles on surfaces with prisms extruded, transitioning into pyramids, and finally to tets
==Hybrid Grids==