CFD Grid Post Processing 2006
CFD Grid Post Processing 2006
2
Introduction
• The numerical solution of partial differential equations
requires some discretization of the field into a collection of
points or elemental volumes (cells)
• The differential equations are approximated by a set of
algebraic equations on this collection, which can be solved
to produce a set of discrete values that approximate the
solution of the PDE over the field
• Grid generation is the process of determining the
coordinate transformation that maps the body-fitted non-
uniform non-orthogonal physical space x,y,z,t into the
transformed uniform orthogonal computational space,
, , , .
• Post-processing is the process to examine and analyze the
flow field solutions, including contours, vectors,
streamlines, Iso-surfaces, animations, and CFD Uncertainty
Analysis.
3
Choice of grid
• Simple/regular geometries (e.g. pipe, circular cylinder): the grid lines
usually follow the coordinate directions.
• Complex geometries (Stepwise Approximation)
1. Using Regular Grids to approximate solution domains with inclined
or curved boundaries by staircase-like steps.
2. Problems:
(1). Number of grid points (or CVs) per grid line is not constant,
special arrays have to be created
(2). Steps at the boundary introduce errors into solutions
(3). Not recommended except local grid refinement near the
wall is possible.
5
Choice of grid, cont’d
• Chimera grid (examples):
CFDSHIP-IOWA
6
Choice of grid, cont’d
• Chimera grid (examples):
7
Choice of grid, cont’d
• Complex geometries (Boundary-Fitted Non-Orthogonal Grids)
1. Types:
(1). Structured
(2). Block-structured
(3). Unstructured
2. Advantages:
(1). Can be adapted to any geometry
(2). Boundary conditions are easy to apply
(3). Grid spacing can be made smaller in regions of strong variable
variation.
3. Disadvantages:
(1). The transformed equations contain more terms thereby
increasing both the difficulty of programming and the cost of
solving the equations
(2). The grid non-orthogonality may cause unphysical solutions.
8
Choice of grid, cont’d
• Complex geometries (Boundary-Fitted Non-Orthogonal Grids)
Block-structured
structured With matching interface
Unstructured
Block-structured
Without matching interface
9
Grid generation
• Conformal mapping: based on complex variable theory, which is
limited to two dimensions.
• Algebraic methods:
1. 1D: polynomials, Trigonometric functions, Logarithmic
functions
2. 2D: Orthogonal one-dimensional transformation, normalizing
transformation, connection functions
3. 3D: Stacked two-dimensional transformations, superelliptical
boundaries
• Differential equation methods:
Step 1: Determine the grid point distribution on the boundaries
of the physical space.
Step 2:Assume the interior grid point is specified by a differential
equation that satisfies the grid point distributions specified on
the boundaries and yields an acceptable interior grid point
distribution.
• Commercial software (Gridgen, Gambit, etc.)
10
Grid generation (examples)
Orthogonal one-dimensional
transformation
12
Grid generation (Gridgen, 2D pipe)
• Geometry: two-dimensional axisymmetric circular pipe
• Creation of connectors: ―connectors‖‖create‖‖2 points
connectors‖‖input x,y,z of the two points‖‖Done‖.
• Dimension of connectors:
―Connectors‖‖modify‖‖Redimension‖‖40‖‖Done‖.
(0,0.5) • Repeat the procedure to create C2, C3,
C3 (1,0.5)
and C4
C4 C2
(0,0) C1 (1,0)
13
Grid generation (Gridgen, 2D pipe, cont’d)
• Creation of Domain: ―domain‖‖create‖‖structured‖‖Assemble
edges‖‖Specify edges one by one‖‖Done‖.
• Redistribution of grid points: Boundary layer requires grid refinement
near the wall surface. ―select connectors (C2,
C4)‖‖modify‖‖redistribute‖‖grid spacing(start+end)‖ with
distribution function
• For turbulent flow, the first grid spacing near the wall, i.e. ―matching
point‖, could have different values when different turbulent models
applied (near wall or wall function).
Grid may be used for laminar flow Grid may be used for turbulent flow
14
Grid generation (3D NACA12 foil)
• Geometry: two-dimensional NACA12 airfoil with 60 degree angle of
attack
• Creation of geometry: unlike the pipe, we have to import the database
for NACA12 into Gridgen and create connectors based on that (only
half of the geometry shape was imported due to symmetry).
―input‖‖database‖‖import the geometry data‖
―connector‖‖create‖‖on DB entities‖‖delete database‖
• Creation of connectors C1 (line), C2(line), C3(half circle)
C3
Half of airfoil surface
C2
C1
15
Grid generation (3D NACA12 airfoil, cont’d)
• Redimensions of the four connectors and create domain
• Redistribute the grid distribution for all connectors. Especially
refine the grid near the airfoil surface and the leading and
trailing edges
16
Grid generation (3D NACA12 airfoil, cont’d)
• Duplicate the other half of the domain:
―domain‖‖modify‖‖mirror respect to y=0‖‖Done‖.
• Rotate the whole domain with angle of attack 60 degrees:
―domain‖‖modify‖‖rotate‖‖using z-principle axis‖‖enter rotation
angle:-60‖‖Done‖.
17
Grid generation (3D NACA12 airfoil, cont’d)
• Create 3D block: ―blocks‖‖create‖‖extrude from domains‖specify
‖translate distance and direction‖‖Run N‖―Done‖.
• Split the 3D block to be four blocks: ―block‖‖modify‖‖split‖‖in
direction‖‖ =?‖‖Done‖.
• Specify boundary conditions and export Grid and BCS.
Block 1
Block 1
Block 2
Block 2
Block 4 Block 4
Block 3 Block 3
3D before split After split (2D view) After split (3D view)
18
Systematic grid generation for CFD UA
• CFD UA analysis requires a series of meshes with uniform grid
refinement ratio, usually start from the fine mesh to generate coarser
grids.
• A tool is developed to automate this process, i.e., each fine grid block
is input into the tool and a series of three, 1D interpolation is
performed to yield a medium grid block with the desired non-integer
grid refinement ratio.
• 1D interpolation is the same for all three directions.
Consider 1D line segment with N1 and N2 1 N1 1 / rG
points for the fine and medium grids, respectively.
step 1: compute the fine grid size at each grid node: x x x
1i 1i 1i 1
20
Post-Processing (visualization, XY plots)
22
Post-Processing (NACA12, 2D contour plots, vorticity)
• Define and compute new variable: ―Data‖‖Alter‖‖Specify
equations‖‖vorticity in x,y plane: v10‖‖compute‖‖OK‖.
23
Post-Processing (NACA12, 2D contour plot)
• Extract 2D slice from 3D geometry: ―Data‖‖Extract‖‖Slice
from plane‖‖z=0.5‖‖extract‖
24
Post-Processing (NACA12, 2D contour plots)
• 2D contour plots on z=0.5 plane (vorticity and eddy
viscosity)
25
Post-Processing (NACA12, 2D contour plots)
• 2D contour plots on z=0.5 plane (pressure and
streamwise velocity)
26
Post-Processing (2D velocity vectors)
• 2D velocity vectors on z=0.5 plane: turn off ―contour‖
and activate ―vector‖, specify the vector variables.
Zoom in
27
Post-Processing (3D Iso-surface plots, cont’d)
• 3D Iso-surface plots: pressure, p=constant
• 3D Iso-surface plots: vorticity magnitude
2 2 2
x y z
• 3D Iso-surface plots: 2 criterion
Second eigenvalue of
1 2
p
2
• 3D Iso-surface plots: Q criterion
1
Q ij ij S ij S ij ij ui , j u j ,i 2
2
S ij ui , j u j ,i 2
28
Post-Processing (3D Iso-surface plots)
• 3D Iso-surface plots: used to define the coherent vortical structures,
including pressure, voriticity magnitude, Q criterion, 2, etc.
Q=0.4
31
Other Post-Processing techniques
• Fast Fourier Transform
1. A signal can be viewed from two different standpoints:
the time domain and the frequency domain
2. The time domain is the trace on an signal (forces,
velocity, pressure, etc.) where the vertical deflection is the
signals amplitude, and the horizontal deflection is the time
variable
3. The frequency domain is like the trace on a spectrum
analyzer, where the deflection is the frequency variable and
the vertical deflection is the signals amplitude at that
frequency.
4. We can go between the above two domains using (Fast)
Fourier Transform
• Phase averaging (next two slides)
32
Other Post-Processing techniques (cont’d)
• Phase averaging
Assumption: the signal should have a coherent dominant
frequency.
Steps:
1. a filter is first used to smooth the data and remove the high
frequency noise that can cause errors in determining the peaks.
2. once the number of peaks determined, zero phase value
is assigned at each maximum value.
3. Phase averaging is implemented using the triple decomposition.
z t z t z t z' t z t z' t
N 1
lim
lim 1 T z t z t n
z t z t dt N n 0
T T 0
34
References and books
• User Manual for GridGen
• User Manual for Tecplot
• Numerical recipes:
http://www.library.cornell.edu/nr/
• Sung J. & Yoo J. Y., ―Three Dimensional Phase
Averaging of Time Resolved PIV measurement
data‖, Measurement of Science and Technology,
Volume 12, 2001, pp. 655-662.
• Joe D. Hoffman, ―Numerical Methods for
Engineers and Scientists‖, McGraw-Hill, Inc. 1992.
• Y. Dubief and F. Delcayre, ―On Coherent-vortex
Identification in Turbulence‖, Journal of
Turbulence, Vol. 1, 2000, pp. 1-20.
35