grid postprocessing cfd

Upload: ghada-orabi

Post on 03-Apr-2018

239 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/28/2019 Grid Postprocessing Cfd

    1/35

    Grid Generation and Post-Processing for Computational

    Tao Xing and Fred Stern

  • 7/28/2019 Grid Postprocessing Cfd

    2/35

    lin

    1. Introduction2. Choice of grid

    2.1. Sim le eometries

    2.2. Complex geometries3. Grid generation3.1. Conformal mapping3.2. Algebraic methods3.3. Differential equation methods

    3.4. Commercial software3.5. Systematic gri generation or CFD UA

    4. Post-processing4.1. UA (details in Introduction to CFD)

    . .4.3. Calculation of integral variables4.4. Visualization

    2

    .

  • 7/28/2019 Grid Postprocessing Cfd

    3/35

  • 7/28/2019 Grid Postprocessing Cfd

    4/35

    Choice of grid . . ,

    usually follow the coordinate directions.

    Complex geometries (Stepwise Approximation)

    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 thewall is possible.

    4An example of a grid using stepwise approximation of an Inclined boundary

  • 7/28/2019 Grid Postprocessing Cfd

    5/35

    Choice of grid, contd Complex geometries (Overlapping Chimera grid)

    1. Definition: Use of a set of grids to cover irregular solutiondomains

    . van ages:

    (1). Reduce substantially the time and efforts to generate a grid,especially for 3D configurations with increasing geometric

    (2). It allows without additional difficulty calculation of flows

    around moving bodies.

    (1). The programming and coupling of the grids can be

    complicated

    .(3). Interpolation process may introduce errors or convergence

    problems if the solution exhibits strong variation near the

    5

    .

  • 7/28/2019 Grid Postprocessing Cfd

    6/35

    Choice of grid, contd

    -

    6

    erent gr str ut on approac es

  • 7/28/2019 Grid Postprocessing Cfd

    7/35

    Choice of grid, contd

    7

  • 7/28/2019 Grid Postprocessing Cfd

    8/35

    Choice of grid, contd 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 e uations contain more terms thereb

    increasing both the difficulty of programming and the cost ofsolving the equations

    (2). The grid non-orthogonality may cause unphysical solutions.

    8

  • 7/28/2019 Grid Postprocessing Cfd

    9/35

    Choice of grid, contd Complex geometries (Boundary-Fitted Non-Orthogonal Grids)

    structuredBlock-structured

    With matchin interface

    Unstructured

    Block-structured

    Without matching interface

    9

  • 7/28/2019 Grid Postprocessing Cfd

    10/35

    Grid generation Conformal mapping: based on complex variable theory, which islimited to two dimensions.

    Algebraic methods:. , ,

    functions2. 2D: Orthogonal one-dimensional transformation, normalizing

    ,3. 3D: Stacked two-dimensional transformations, superelliptical

    boundaries Differential e uation methods:

    Step 1: Determine the grid point distribution on the boundariesof the physical space.

    Step 2:Assume the interior grid point is specified by a differential

    equa on a sa s es e gr po n s r u ons spec e onthe boundaries and yields an acceptable interior grid pointdistribution.

    Commercial software Grid en Gambit etc.

    10

  • 7/28/2019 Grid Postprocessing Cfd

    11/35

    Grid generation (examples)

    Orthogonal one-dimensional

    transformation

    11

    Superelliptical transformations: (a)

    symmetric; (b) centerbody; (c) asymmetric

  • 7/28/2019 Grid Postprocessing Cfd

    12/35

    Grid generation (commercial software, gridgen)

    Commercial software GRIDGEN will be used to illustrate

    typical grid generation procedure

    12

  • 7/28/2019 Grid Postprocessing Cfd

    13/35

    Grid generation (Gridgen, 2D pipe)-

    Creation of connectors: connectorscreate2 pointsconnectorsinput x,y,z of the two pointsDone.

    Dimension of connectors: .

    (0,0.5) (1,0.5) Repeat the procedure to create C2, C3,and C4

    C2

    C3

    C4

    (0,0) (1,0)C1

    13

  • 7/28/2019 Grid Postprocessing Cfd

    14/35

    Grid generation (Gridgen, 2D pipe, contd)

    edgesSpecify edges one by oneDone.

    Redistribution of grid points: Boundary layer requires grid refinementnear the wall surface. select connectors (C2, mo y re str ute gr spac ng start+en w t

    distribution function For turbulent flow, the first grid spacing near the wall, i.e. matching

    oint could have different values when different turbulent modelsapplied (near wall or wall function).

    r may e use or am nar ow Grid may be used for turbulent flow

    14

  • 7/28/2019 Grid Postprocessing Cfd

    15/35

    Grid generation (3D NACA12 foil)-

    attack Creation of geometry: unlike the pipe, we have to import the database

    for NACA12 into Gridgen and create connectors based on that (onlya o e geome ry s ape was mpor e ue o symme ry .

    inputdatabaseimport the geometry dataconnectorcreateon DB entitiesdelete database

    , ,

    Half of airfoil surface

    C2

    C3

    Half of airfoil surface

    15

  • 7/28/2019 Grid Postprocessing Cfd

    16/35

    Grid generation (3D NACA12 airfoil, contd) 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 andtrai ing e ges

    16

  • 7/28/2019 Grid Postprocessing Cfd

    17/35

    Grid generation (3D NACA12 airfoil, contd)

    Duplicate the other half of the domain: uplicate the other half of the domain:respect to y=0Done.

    Rotate the whole domain with angle of attack 60 degrees:domainmodifyrotateusing z-principle axisenter rotationangle:-60Done.

    17

  • 7/28/2019 Grid Postprocessing Cfd

    18/35

    Grid generation (3D NACA12 airfoil, contd)

    translate distance and directionRun NDone. Split the 3D block to be four blocks:blockmodifysplitin

    direction =?Done. pec y oun ary con ons an expor r an .

    Block 1Block 1

    Block 2

    Block 4Block 2

    Block 4

    Block 3 Block 3

    18

    3D before split After split (2D view) After split (3D view)

  • 7/28/2019 Grid Postprocessing Cfd

    19/35

    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 coarsergrids.

    , . .,is input into the tool and a series of three, 1D interpolation isperformed to yield a medium grid block with the desired non-integergrid refinement ratio.

    n erpo a on s e same or a ree rec ons.Consider 1D line segment with and

    points for the fine and medium grids, respectively.

    1N ( )2 11 1 / GN N r= +

    step 2: compute the medium grid distribution:

    11 1 1i i ix x x

    =

    12 2 2i i ix x x

    = +

    where from the first step is interpolated at location

    step 3: The medium grid distribution is scaled so that the fine and

    2 1i iG

    1ix 2ix

    2ix

    19

    medium grid line segments are the same (i.e., )

    step4: The procedure is repeated until it converges

    2 12 1N N

    x x=

  • 7/28/2019 Grid Postprocessing Cfd

    20/35

    Post-Processing ,

    factor, and uncertainties (for details, CFD Lecture 1, introductionto CFD).

    MPI functions required to combine data from different blocks ifpara e compu a on use

    Calculation of derived variables (vorticity, shear stress) Calculation of integral variables (forces, lift/drag coefficients)

    ,spectra

    Visualization1. XY lots time/iterative histor of residuals and forces, wave

    elevation)2. 2D contour plots (pressure, velocity, vorticity, eddy viscosity)3. 2D velocity vectors

    4. 3D Iso-surface plots (pressure, vorticity magnitude, Q criterion)5. Streamlines, Pathlines, streaklines6. Animations

    20

    er ec n ques: as our er rans orm , ase averag ng

  • 7/28/2019 Grid Postprocessing Cfd

    21/35

    Post-Processing (visualization, XY plots)

    NACA12 with 60o angle of attack(CFDSHIP-IOWA, DES)

    Wave profile of surface-piercing

    ACA24, Re=1.52e6, Fr=0.37

    21

    (CFDSHIP-IOWA, DES)

  • 7/28/2019 Grid Postprocessing Cfd

    22/35

    Post-Processing (visualization, Tecplot)

    Different colors illustrate different blocks (6)

    22

    Re=10^5, DES, NACA12 with angle of attack 60 degrees

  • 7/28/2019 Grid Postprocessing Cfd

    23/35

    Post-Processing (NACA12, 2D contour plots, vorticity)

    e ne an compu e new var a e: a a er pec yequationsvorticity in x,y plane: v10computeOK.

    23

  • 7/28/2019 Grid Postprocessing Cfd

    24/35

    Post-Processing (NACA12, 2D contour plot)

    x rac s ce rom geome ry: a a x rac cefrom planez=0.5extract

    24

  • 7/28/2019 Grid Postprocessing Cfd

    25/35

    Post-Processing (NACA12, 2D contour plots)

    2D contour plots on z=0.5 plane (vorticity and eddyviscosity)

    Vorticity z Eddy viscosity

    25

  • 7/28/2019 Grid Postprocessing Cfd

    26/35

    Post-Processing (NACA12, 2D contour plots)

    2D contour plots on z=0.5 plane (pressure andstreamwise velocity)

    Pressure Streamwise velocity

    26

  • 7/28/2019 Grid Postprocessing Cfd

    27/35

    Post-Processing (2D velocity vectors)

    2D velocity vectors on z=0.5 plane: turn off contourand activate vector, specify the vector variables.

    Zoom in

    27

  • 7/28/2019 Grid Postprocessing Cfd

    28/35

    Post-Processing (3D Iso-surface plots, contd)

    3D Iso-surface plots: pressure, p=constant 3D Iso-surface plots: vorticity magnitude

    3D Iso-surface plots: 2 criterion

    2 2 2

    x y z = + +

    Second eigenvalue of

    3D Iso-surface plots: Q criterion

    21

    2p

    ( )ijijijij SSQ =2

    12,, ijjiij uu =

    2,, ijjiij uuS +=

    28

  • 7/28/2019 Grid Postprocessing Cfd

    29/35

    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.

    29

    Iso-surface of vorticity magnitude

  • 7/28/2019 Grid Postprocessing Cfd

    30/35

    Post-Processing (streamlines)

    ream nes :

    30

    Streaklines and pathlines (not shown here)

  • 7/28/2019 Grid Postprocessing Cfd

    31/35

    Post-Processing (Animations)

    Animations (3D): animations can be created by saving CFDsolutions with or without skipping certain number of time stepsand playing the saved frames in a continuous sequence.

    Animations are important tools to study time-dependent

    developments of vortical/turbulent structures and their interactions

    Q=0.4

    31

  • 7/28/2019 Grid Postprocessing Cfd

    32/35

    Other Post-Processing techniques

    Fast Fourier Transform

    1. A signal can be viewed from two different standpoints:

    2. The time domain is the trace on an signal (forces,velocity, pressure, etc.) where the vertical deflection is the

    ,variable

    3. The frequency domain is like the trace on a spectrum,

    the vertical deflection is the signals amplitude at thatfrequency.

    .

    Fourier Transform

    Phase averaging (next two slides)

    32

  • 7/28/2019 Grid Postprocessing Cfd

    33/35

    Other Post-Processing techniques (contd)

    Phase averagingAssumption: the signal should have a coherent dominantfrequency. 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

    s ass gne a eac max mum va ue.3. Phase averaging is implemented using the triple decomposition.

    ( ) ( ) ( ) ( ) ( ) ( )' '

    z t z t z t z t z t z t= + + = + 1N

    ( ) ( )0

    lim 1 Tz t z t dt

    T T=

    ( ) ( )

    0n

    z t z t nN

    =

    = +

    random fluctuating component

    organ ze osc at ng component

    ( )'z t( )z t mean component z t

    33

    s e me per o o e om nan requency

    is the phase average associated with the coherent structures

    ( )z t

  • 7/28/2019 Grid Postprocessing Cfd

    34/35

    Other Post-Processing techniques (contd)

    FFT of wave elevation

    time histories at one point

    Original, phase averaged,and random fluctuations

    of the wave elevation at

    34

    one point

  • 7/28/2019 Grid Postprocessing Cfd

    35/35

    References and books

    User Manual for GridGen User Manual for Tecplot Numerical recipes:

    http://www.library.cornell.edu/nr/

    Averaging of Time Resolved PIV measurementdata, Measurement of Science and Technology,

    Volume 12, 2001, pp. 655-662. Joe D. Hoffman, Numerical Methods for

    Engineers and Scientists, McGraw-Hill, Inc. 1992. . Dubief and F. Delca re On Coherent-vortex

    Identification in Turbulence, Journal ofTurbulence, Vol. 1, 2000, pp. 1-20.

    35