35
Semester Project Introduction to Structured Grid Generation for Aeronautics Jean-Eloi Lombard Interdisciplinary Aerodynamics Group (IAG) Swiss Institute of Technology Lausanne Supervisor : Dr. Peneloppe Leyland Assistant : Pierre Wilhelm September 27, 2011

Introduction to Structured Grid Generation for Aeronautics

Embed Size (px)

Citation preview

Page 1: Introduction to Structured Grid Generation for Aeronautics

Semester Project

Introduction to Structured GridGeneration for Aeronautics

Jean-Eloi LombardInterdisciplinary Aerodynamics Group (IAG)

Swiss Institute of Technology Lausanne

Supervisor : Dr. Peneloppe LeylandAssistant : Pierre Wilhelm

September 27, 2011

Page 2: Introduction to Structured Grid Generation for Aeronautics
Page 3: Introduction to Structured Grid Generation for Aeronautics

Contents

1 Introduction 11.1 Conservative equations in integral form, Navier-Stokes equations . . . . 11.2 Spatial Discretisation and different types of mesh : theory . . . . . . . 3

1.2.1 Finite volume method . . . . . . . . . . . . . . . . . . . . . . . 31.2.2 Structured mesh . . . . . . . . . . . . . . . . . . . . . . . . . . 51.2.3 Unstructured mesh . . . . . . . . . . . . . . . . . . . . . . . . . 71.2.4 Hybrid mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

1.3 Mesh generation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91.4 What is a good mesh? . . . . . . . . . . . . . . . . . . . . . . . . . . . 101.5 Why is good mesh needed? . . . . . . . . . . . . . . . . . . . . . . . . . 12

2 Applications 132.1 Generic Plane . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

2.1.1 Geometric particularities . . . . . . . . . . . . . . . . . . . . . . 132.1.2 Solving of particularities . . . . . . . . . . . . . . . . . . . . . . 132.1.3 Bunching particularities . . . . . . . . . . . . . . . . . . . . . . 13

2.2 Ray . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142.2.1 Geometric particularities . . . . . . . . . . . . . . . . . . . . . . 142.2.2 Solving of particularities . . . . . . . . . . . . . . . . . . . . . . 142.2.3 Bunching particularities . . . . . . . . . . . . . . . . . . . . . . 15

3 Computing and post-processing 163.1 Solver : NSMB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163.2 Generic Plane : results . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

3.2.1 Input parameters . . . . . . . . . . . . . . . . . . . . . . . . . . 173.2.2 Convergence analysis . . . . . . . . . . . . . . . . . . . . . . . . 183.2.3 Mesh feedback . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

3.3 Ray : results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213.3.1 Input Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . 213.3.2 Convergence Analysis . . . . . . . . . . . . . . . . . . . . . . . . 223.3.3 Mesh feedback . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

4 Lessons learned 25

5 Conclusion 25

A baspl++ 28

B Outputting blocking from ICEM and submitting it to NSMB 28

Page 4: Introduction to Structured Grid Generation for Aeronautics
Page 5: Introduction to Structured Grid Generation for Aeronautics

List of Figures

1 Cell centered a) and vertex centered b) control volumes. . . . . . . . . 42 Different Mesh Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 Mesh element geometries : hexahedra, tetrahedra, pyramid and wedge . 44 Two Dimensional structured hexahedral blocking around Ray. . . . . . 55 Different types of structured grids : a) non boundary conforming (carte-

sian) b) boundary conforming and c) chimera. . . . . . . . . . . . . . . 56 a) Real space and b) computational space . . . . . . . . . . . . . . . . 67 Mesh a) with hanging nodes and b) without. . . . . . . . . . . . . . . . 68 Two Dimensional unstructured mesh[18] generated by GambitTMaround

a Whitcomb supercritical airfoil . . . . . . . . . . . . . . . . . . . . . . 79 Two Dimensional Hybrid mesh[17] generated by CENTAURTMaround

a high-lift configuration with quadrilateral elements in the boundarylayer and triangular elements filling the rest of the domain . . . . . . . 8

10 Wrong edge association . . . . . . . . . . . . . . . . . . . . . . . . . . . 1011 a) Good quality and b) bad quality boundary layer meshes . . . . . . . 1012 a) Positive and b) negative hexahedral cell . . . . . . . . . . . . . . . . 1013 a) Gradual and b) abrupt node distribution . . . . . . . . . . . . . . . 1114 a) Low and b) high aspect ratio hexahedral cells . . . . . . . . . . . . . 1115 a) Normal and skewed hexahedral cells. . . . . . . . . . . . . . . . . . . 1116 a) Normal positive and b) deformed by small angles hexahedral cells. . 1117 Generic plane geometry . . . . . . . . . . . . . . . . . . . . . . . . . . . 1318 Ray geometry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1419 “Folded blocking” method used for the winglet . . . . . . . . . . . . . . 1520 Generic plane : NSMB Convergence with for a) inviscid flow and b)

viscous flow. Note : meshes are different . . . . . . . . . . . . . . . . . 1821 Generic plane : pressure distribution on wing-tip for two different meshes.

On top the original poor quality mesh with distinct discontinuities in thepressure isoline and on bottom a better mesh with fewer discontinuitiesin the pressure iso-lines. . . . . . . . . . . . . . . . . . . . . . . . . . . 18

22 Generic plane : Mach number on the surface of plane for a Navier-Stokes computation.a) first cell height of 1[mm] much to large for bound-ary layer at Mac 0.8, b) first cell height of 0.01[mm] also too large andc) first cell height of 0.001[mm] reasonable. . . . . . . . . . . . . . . . . 20

23 Ray : NSMB Convergence with for a) inviscid flow and b) viscous flow.Note : meshes are different . . . . . . . . . . . . . . . . . . . . . . . . . 22

24 Ray pressure distribution in [Pa] around nose : a) Euler and b) Navier-Stokes simulations both show low quality bunching in front of nose andabove leading edge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

25 Ray : Navier-stokes computation. Pressure gradient is displayed on thefuselage for checking node distribution and the tracer particles serve asan aide for appreciating flow around the body. . . . . . . . . . . . . . . 23

26 Ray : Navier-stokes computation. . . . . . . . . . . . . . . . . . . . . . 24

Page 6: Introduction to Structured Grid Generation for Aeronautics
Page 7: Introduction to Structured Grid Generation for Aeronautics

1 Introduction

Geometry Definition

Mesh Generation

Pre-processing

Solving Navier-Stokes equations

Post-processing

The Navier-Stokes equations having not yet beensolved analytically, bar for trivial geometries, com-putational fluid dynamics coupled with wind-tunneltesting remains the best approach to flow stud-ies. Despite the fact the fact that a thorough CFDstudy is a five step process : geometry definition,mesh generation, pre-processing, solving the govern-ing equations and finally post processing, the pur-pose of the present work is to focus on mesh gener-ation in the particular case of conformal structuredhexahedral cell based meshes and the feedback re-garding mesh quality obtained by solving the flow.After a brief theoretical introduction to the govern-ing equations of fluid mechanics, the finite volumemethod will be presented succinctly before delvinginto what has been show to improve mesh quality.Two geometric models, a generic plane and the ver-tical take-off and landing Ray are used as test casesto understand how mesh quality influences results.To that effect simple blocking strategy is outlinedbefore post-processing and convergence analysis arepresented.

1.1 Conservative equations in integral form, Navier-Stokesequations

The finite volume method is based on the integral forms of the Navier-Stokes andconservation equations. Integral form of conservation of the scalar quantity U reads :

∂t

∫Ω

U dΩ +

∮∂Ω

(U(v · n)− κρ∇U

ρ· n)

dS =

∫Ω

QV dΩ +

∮∂Ω

Qs · n dS (1)

with κ the thermal diffusivity coefficient, QV volume source, Qs surface source, v thevelocity of a given amount of U entering the control volume through the boundary.The two main reasons for the finite volume methods being used in CFD are :

1. in the absence of internal sources the the variation of U is only a function of thefluxes across the boundary ∂Ω of the control volume and completely independentof any internal flux.

2. remains valid in presence of shocks and contact discontinuities.

1

Page 8: Introduction to Structured Grid Generation for Aeronautics

The three conservation equations of fluid mechanics are mass, momentum and energyand for an arbitrary fixed volume Ω read :

∂t

∫Ω

ρ dΩ +

∮∂Ω

ρ(v · n) dS = 0 (2)

∂t

∫Ω

ρv dΩ +

∮∂Ω

ρv(v · n) dS =

∮∂ω

ρfe dΩ−∮

∂Ω

pn dS +

∮∂Ω

(τ · n) dS (3)

∂t

∫Ω

ρE dΩ +

∮∂Ω

ρH(v · n) dS =

∮∂Ω

k(∇T · n) dS +

∫Ω

(ρfe · v + qh) dΩ

+

∮∂Ω

(τ · v) · n dS (4)

where ρ is density, n a normal vector to ∂Ω, ρfe is the body force per unit-volume,τ is the viscous stress tensor, p is pressure, H enthalpy, k the thermal conductivitycoefficient,T absolute static temperature, and qh the time rate of heat transfer per unitmass.

It is custom to write the conservative laws in a single equation :

∂t

∫Ω

W dΩ +

∮∂Ω

(Fc − Fv) dS =

∫Ω

Q dΩ (5)

by introducing the vector of convective fluxes Fe

Fe =

ρV

ρuV + nxpρvV + nypρwV + nzpρHV q

with v =

uvw

n =

nx

ny

nz

where V := v ·n is contravariant velocity (velocity normal to the surface element dS)viscous fluxes Fv :

Fv =

0

nxτxx + nyτxy + nzτxz

nxτyx + nyτyy + nzτyz

nxτzx + nyτzy + nzτzz

nxΘx + nyΘy + nzΘz

with Θi the sum of viscous stress work and heat conduction :

Θx = uτxx + vτxy + wτxz + k∂T

∂x

Θy = uτyz + vτyy + wτyz + k∂T

∂y(6)

Θz = uτzx + vτzy + wτzz + k∂T

∂z

vector of conservative variables W :

W =

ρρuρvρwρE

2

Page 9: Introduction to Structured Grid Generation for Aeronautics

and the source term Q :

Q =

0

ρfe,x

ρfe,y

ρfe,z

ρfe · v + qh

For inviscid flow viscous forces are neglected yielding the Euler equations :

∂t

∫Ω

W dΩ +

∮∂Ω

Fc dS =

∫Ω

Q dΩ (7)

It is relevant to note that during a CFD study it is interesting to solve the flow at firstwith only the Euler equations so as to have feedback on mesh quality (especially kinksand smoothness issues) without having to invest heavily in time for a full Navier-Stokessolution. Furthermore sovler such as NSMB can start the Navier-Stokes computationwith the result of the Euler computation further saving time.

1.2 Spatial Discretisation and different types of mesh : theory

Solving the Navier-Stokes equations numerically relies on their spatial discretization(and temporal for non-stationary cases). The volume around the geometry is dividedinto smaller sub-volumes on each of which the discretized governing equations are com-puted. Discretization is achieved by one of the three methods that are finite element(partial differential equations are approximated by ordinary differential equations andthen integrated with Runge-Kutta or Euler methods) , finite differences (derivativesare approximated by difference quotients) and finite volume (based on integral form ofconservation laws over small control volumes). Each of these methods rely on a gridthat can be either structured, un-structured or hybrid.

1.2.1 Finite volume method

In the finite volume method the computational domain V is partitioned into N non-overlapping finite volume cells :

V =⋃

Vi with i = 1, . . . , N

and the average of state variable u over the volume of the cell i is :

ui =1

Vi

∫Vi

u dΩ

and with ni the set of cells sharing a common (partial or not) face with cell i theconservation law of state variable u over cell i reads, without sources :

|Vr|dui

dt+∑s∈ni

∫Vi∩Vs

f · n ds = 0

with f the flux vector of conservative quantity u and n the normal vector to the surfaceof Vi. The cells used in the finite volume method are simply an implementation of

3

Page 10: Introduction to Structured Grid Generation for Aeronautics

the concept of control volume and therefore do not necessarely correspond to the cellsdefined during mesh generation. Indeed the control volumes chosen for applying thefinite volume method are arbitrary but in practice they are usually taken as eitherbeing the same as the cells defined during meshing (cell centered) or centered aroundthe vertices of the grid (vertex centered). In (Fig. 1) an example of these two schemesis show for a two dimensional hexahedral mesh :

Vi

(a)

Vi

(b)

Figure 1 – Cell centered a) and vertex centered b) control volumes.

There exist three different types of meshes for generating the cells used in the finitevolume method :

Dierents Mesh Types

HybridUnstructuredStructured

Figure 2 – Different Mesh Types

each of which uses one or many basic geometric shapes as cells :

Figure 3 – Mesh element geometries : hexahedra, tetrahedra, pyramid andwedge

4

Page 11: Introduction to Structured Grid Generation for Aeronautics

1.2.2 Structured mesh

Figure 4 – Two Dimensional structured hexahedral blocking around Ray.

There exist three different types of structured meshes : cartesian, boundary fittingand chimera.

(a) (b) (c)

Figure 5 – Different types of structured grids : a) non boundary conforming(cartesian) b) boundary conforming and c) chimera.

For boundary fitting structured meshes a conformal map is applied to the compu-tational domain to fit the geometry (curvilinear grid). A map f : U → V is conformalin r0 if the local angle between curves intersecting in r0 are preserved. The determi-nant of the Jacobian of this map is rich in information : if it is positive then f locallyin r0 preserves orientation and if it is negative f reverses orientation. This is why thedeterminant of the Jacobian matrix (3x3x3 or 2x2x2 determinant in ICEM CFD) isused so often as an indicator of cell quality. Another important consequence of con-formal maps is that two adjacent points on the geometry correspond to two adjacentpoints in the computational domain. This order allows for :

1. quick access to adjacent cells by simply incrementing indices which is importantfor calculations of numerical operators

5

Page 12: Introduction to Structured Grid Generation for Aeronautics

y

x

(a)

η

ξ

(b)

Figure 6 – a) Real space and b) computational space

2. easy implementation of the boundary conditions

Generally three dimensional structured meshes are build with hexahedra which aregood for filling space (5 or 6 tetrahedra are required to fill a hexahedra) which allowsfor a smaller number of cells. The relative small size of the grid is even more importantfor complex flows given the user has a priori knowledge of the flow enabling him tolocally refine the grid only in the regions of complex flow and adequately align thehexahedra cells . For added flexibility in multiblock grids it is possible define non-conformal boundaries between two blocks introducing added interpolation error.

(a) (b)

Figure 7 – Mesh a) with hanging nodes and b) without.

The main drawbacks of structured grid generation are :

1. the time required (ranging from a couple of days to months)

2. requires an experienced user

3. is limited in the case of complex geometries (since user time required to do themesh explodes!)

Both models (generic plane and Ray) are meshed with a conformal structured hexa-hedra grid.

6

Page 13: Introduction to Structured Grid Generation for Aeronautics

1.2.3 Unstructured mesh

Figure 8 – Two Dimensional unstructured mesh[18] generated byGambitTMaround a Whitcomb supercritical airfoil

Unstructured grids methods generate a collection of hexahedra, tetrahedra, pyra-mids and prisms without a conformal map linking real and computational space (twoadjacent vertices in real space are not necessarily stored adjacently in computationalspace). Connectivity information is stored in the connectivity table. Generation ofan unstructured grid can be automated to a large degree which is the main advantagesince it requires little time (a few hours) and a less experienced user than for structuredgrids . The main drawbacks of automated unstructured grid generation methods are :

1. lack of precise control over the local refinement of the grid which implies a greateroverall number of cells (relative to a structured grid)

2. strong sensitivity to geometric imperfections of CAD model

3. more expensive in time and memory solvers (requires continuous access to theconnectivity table)

7

Page 14: Introduction to Structured Grid Generation for Aeronautics

1.2.4 Hybrid mesh

Figure 9 – Two Dimensional Hybrid mesh[17] generated byCENTAURTMaround a high-lift configuration with quadrilateral elementsin the boundary layer and triangular elements filling the rest of the domain

Hybrid meshes are designed to take advantage of both structured and unstructuredgrids by adding local structured grids in complex flow/geometry regions. The idea isto add structured hexahedral meshes were the flow gradients are important (vortices,wakes, mixing regions and boundary layers) to better capture the physics of theseregions while using unstructured grids with tetrahedral, prismatic and pyramidal cellsfor filling the far field. Similarly to the structured grid hybrid mesh generation requiresan a priori knowledge of the flow to adequately place the structured grids and issensitive to complex geometries. Computation time for the solver is in the order ofmagnitude of the unstructured solver since connectivity data must also be stored in adatabase.

8

Page 15: Introduction to Structured Grid Generation for Aeronautics

1.3 Mesh generation

Create bounding box

Check for negative

blocks

Split Blocks to fit geometry

(extend all splits)

Assign blocks to SOLID or

FLUID

Deform blocks to fit

geometry

Associate block vertices to

points of geometry

Associate block edges to

curves of geometry

Verify correct

associations

Create O-Grids around solid

for better boundary layer

resolution

Compute Pre-Mesh

Define Bunching

Test for negative

cells

Test for poor quality

cells

Export Pre-Mesh to

Solver

Mesh generation method used :

1. clean geometry by checking that all points andcurves on symmetry plane exactly on the sym-metry plane and simplify geometry as much aspossible in order to avoid the following :

+ small edges, sharp edges, sharp faces

+ small gaps

+ unconnected geometry entities

2. creating bounding box around geometry

3. block splitting (bounding box is split to fitshape of geometry) It is important to extendall splits to avoid hanging vertices.

4. assigning blocks to solid or fluid

5. deforming blocks to fit geometry

6. testing for negative blocks. If some nega-tive blocks are still present continue deformingthem until none are.

7. associating block vertices to points of geome-try

8. associating block edges to curves of geometry

9. testing for correct associations

10. creating O-Grid around SOLID for betterboundary layer resolution

11. defining node distribution laws (bunchingmust be copied to all parallel edges to avoidnon conformal mesh)

12. computing pre-mesh

13. computing Jacobian of conformal map (2x2x2or 3x3x3 determinant)

14. testing for cells with negative determinant.Return to step 5) for blocks with negative cells

15. testing for cells with determinant below 0.3and returning to step 11 for blocs containingsuch cells.

16. export to solver

9

Page 16: Introduction to Structured Grid Generation for Aeronautics

1.4 What is a good mesh?

Here is an overview of the main causes of poor mesh quality.

1. inappropriate edge projection

Figure 10 – Wrong edge association

2. inappropriate boundary layer mesh

(a) (b)

Figure 11 – a) Good quality and b) bad quality boundary layermeshes

3. no negative cells

(a) (b)

Figure 12 – a) Positive and b) negative hexahedral cell

10

Page 17: Introduction to Structured Grid Generation for Aeronautics

4. no discontinuities in size of two adjacent cells (should not exceed 20%)

(a) (b)

Figure 13 – a) Gradual and b) abrupt node distribution

5. low aspect ratios (high quality 2x2x2 determinant)

(a) (b)

Figure 14 – a) Low and b) high aspect ratio hexahedral cells

6. low skewness

skewness := max[(θmax − 90)/90, (90− θmin)/90]

where θmax and θmin are respectively largest and smallest angles.

(a) (b)

Figure 15 – a) Normal and skewed hexahedral cells.

7. avoiding small angles

(a) (b)Figure 16 – a) Normal positive and b) deformed by small angles hexa-hedral cells.

8. interpolation errors at non-conformal interfaces between two blocks

11

Page 18: Introduction to Structured Grid Generation for Aeronautics

1.5 Why is good mesh needed?

A good mesh is essential in CFD analysis because :

1. it minimizes numerical diffusion

2. avoids discretization error hence correct estimation of the fluxes from one cell toanother

3. accurate solution (ie accurately predicted physics) and/or faster convergence

4. avoids solver corrections implemented to reduce errors caused by non-orthogonalitywhich create non-physical solutions.

12

Page 19: Introduction to Structured Grid Generation for Aeronautics

2 Applications

Conformal structured hexahedral meshes were created for two simplified geometries ageneric plane and Ray,a civil VTOL aircraft.

2.1 Generic Plane

First a coarse grid with roughly 8.105 cells was generated and then refined to 2.106

cells for better boundary layer resolution and wing-tip mesh quality.

2.1.1 Geometric particularities

Figure 17 – Generic plane geometry

The geometry of this model can be found in the tutorial of ANSYS ICEM CFDTM.This trivial geometry is composed of a cigar shaped body without tail or engines anda tapered wing.

2.1.2 Solving of particularities

A simple blocking technique was used to define the solid by iterative splitting of thebounding block with :

1. three splits along the axis of the body fore and aft of wing and roughly at middleof wing for better shock resolution

2. internal O-grid in body for better capturing the rounded body shape

3. O-Grid for boundary layer

2.1.3 Bunching particularities

The following node distribution was used :

1. hyperbolic bunching for boundary layer O-grid

2. constant bunching on wing span-wise

3. double bi-geometric bunching on wing intrados and extrados (from leading edgeto shock and form shock to trailing-edge) to have better resolution of leadingedge, trailing edge and shock.

13

Page 20: Introduction to Structured Grid Generation for Aeronautics

2.2 Ray

A conformal hexahedral multi-block grid of roughly 1.107 points was generated.

2.2.1 Geometric particularities

Figure 18 – Ray geometry

In order to simplify the mesh generation certain simplifications are made to theoriginal geometry of the Ray :

1. the tail boom is removed to avoid triangle configuration between it and theintrados of the main body

2. propulsion propellers removed simply to avoid having two more O-Grids (timebased constraint) and fill extrapolated from rest of surface

3. fan-in-wing and slits replaced by simple smooth surface (no discontinuities withrest of wing structure) and mesh will still be relevant since purpose is to measurestability properties of Ray in level flight

Despite these simplifications certain challenging parts of the geometry remain:

1. the sharp edges at wing-tips were difficult to mesh

2. the winglet induced problems for the boundary layer O-grid because of the“folded blocking“ method used (Fig. 19).

The most problematic issue however came from a lack of geometry check prior tostarting the mesh. The points and curves of the geometry in the symmetry planeweren’t perfectly in the plane hence these small gaps produced negative cells.

2.2.2 Solving of particularities

For the H-O type topology of the Ray the following decisions are made for the blocking:

1. splits along x for nose, beginning and end of winglet and beginning and end oftail

14

Page 21: Introduction to Structured Grid Generation for Aeronautics

Wing Wing

Figure 19 – “Folded blocking” method used for the winglet

2. because of blended-wing design the splits along the z-axis were dictated by thetopology of tail : one split for bottom and top each, and two additional forintrados and extrados of horizontal stabilizer

3. the splits along y-axis were dictated by the topology of the tail and the winglet: two splits for the vertical stabilizer, one split for the limit of the horizontalstabilizer, two splits for the winglet

4. winglet blocking trick : the blocking for the winglet was first build in the planeof the wing and then folded up so that the blocking’s xz splits are stay normalto the surface of the wing and then winglet.

5. for the winglet an O-grid goes around whole wing and ”folds up” on winglet

6. internal O-grid to capture roundedness of wing (the “roundedness” can be seenin the geometry from the view from above)

7. 2 C-Grid around the plane to allow for little number of cells from far-field toviscidity of plane while maintaining freedom in blocking near the plane

8. O-Grid around body of plane for boundary layer resolution

The final blocking still presents weak points. The fact that we ”bend” the blocking tocover the winglet and add an O-Grid around the body for the boundary layer resultsin poor cell quality (ie strongly deformed cells) on extrados near winglet-wing inter-section. This issues was partially resolved by explicitly assigning curvature to edges inthis region in order to avoid negative cells. Also the wing-tip’s strong deformation ofboundary-layer O-Grid around it’s discontinuity in curvature resulted in poor qualitycells.

2.2.3 Bunching particularities

Regarding the bunching the following distributions are used :

1. hyperbolic distribution for boundary layer

2. bi-geometric distribution over wing surface span-wise for better nose resolutionon the one hand and better winglet resolution on the other

3. parabolic distribution on wing-tip of winglet and tail wing in order to avoid poorquality cells at boundary with wing

4. bi-geometric bunching on wing intrados and extrados to have better resolutionon leading and trailing edge and base of winglet

15

Page 22: Introduction to Structured Grid Generation for Aeronautics

3 Computing and post-processing

3.1 Solver : NSMB

The Navier Stokes Mutli-Block code (NSMB)[10], a parallelized structured multiblocksolver using the MemCom data base system, is used for computing the flow aroundthe generic plane and Ray. For the present work either the 1 eq. Spalart-Allmarasmodel or the Wilcox’s k−ω model are used to model turbulences, Sutherland’s modelfor viscosity, spatial discretization scheme used is fourth order central with standardmodel dissipation near walls and an implicit time integration scheme.

The convergence criterion used is the l2 − norm of the residual of density when itreaches ε of the residual of the first iteration where the residual at step n is computedas :

‖Residualn‖implicitl2 =

1∑i,j,k Vi,j,k

√√√√∑i,j,k

(R2

i,j,k

Vi,j,k

)

for an implicit time integration scheme with

R = ‖Residualn‖l2 =

√√√√∑i,j,k

[(∆ui,jk

∆ti,j,k

)2

Vi,j,k

]

where u is any component of the state vector. Computation is stopped when theresidue is reduced by ε orders of magnituder relative to that of the first iteration :

‖Residualn‖l2 < ε‖Residual1‖l2

with ε = 10−5 for the Ray and ε = 10−8 for the generic plane configuration.baspl++1 is used for viewing and post-processing the NSMB output. All figures

in this section are rendered with it’s most basic functions.

1baspl++ by SMR Engineering & Development (http://www.smr.ch) with a comprehensive tuto-rial : http://www.smr.ch/local/doc/baspl++/html/index.html

16

Page 23: Introduction to Structured Grid Generation for Aeronautics

3.2 Generic Plane : results

3.2.1 Input parameters

Despite the wealth of options offered by NSMB only the most basic parameters areset in order to focus on producing feedback for the grid. Cruise speeds, pressure,temperature and Reynolds number are however set to what is considered “normaloperation” for a generic plane (ie. transonic flight).

Input Parameter Valuegas constant 287

Reynolds number 1.107

Angle of Attack 0

Pressure 23800 [Pa]Mach 0.8

Viscosity model -Flow model insviscidTemperature 300 [K]

Table 1 – Generic plane : NSMB input parameters for the Euler computa-tion

Input Parameter Valuegas constant 287

Reynolds number 1.107

Angle of Attack 0

Pressure 23800 [Pa]Mach 0.8

Viscosity model SutherlandFlow model 1 eq. Spalart-AllmarasTemperature 300 [K]

Table 2 – Generic plane : NSMB input parameters for the Navier-Stokescomputation

17

Page 24: Introduction to Structured Grid Generation for Aeronautics

3.2.2 Convergence analysis

1e-10

1e-05

1

100000

1e+10

1e+15

0 500 1000 1500 2000 2500 3000 3500 4000 4500 5000

log(

Res

idua

ls)[

]

Iterations [ ]

Masspxpypz

Energy

(a)

1e-10

1e-09

1e-08

1e-07

1e-06

1e-05

1e-04

0.001

0.01

0.1

1

0 500 1000 1500 2000 2500 3000 3500 4000 4500 5000

log(

Res

idua

ls)[

]

Iterations [ ]

Masspxpypz

Energy

(b)

Figure 20 – Generic plane : NSMB Convergence with for a) inviscid flowand b) viscous flow. Note : meshes are different

The mesh was modified between the computation of the inviscid solution and thatof the viscous solution to correct the poor meshing of the wing-tip hence a partialexplanation in the radically different convergence properties of the Euler and Navier-Stokes computations. It would be interesting to understand the cause of the radicallydifferent convergence patterns between both simulations.

3.2.3 Mesh feedback

Figure 21 – Generic plane : pressure distribution on wing-tip for two dif-ferent meshes. On top the original poor quality mesh with distinct discon-tinuities in the pressure isoline and on bottom a better mesh with fewerdiscontinuities in the pressure iso-lines.

Viewing the pressure isolines is a good a posteriori indicator of mesh quality since,shocks left aside, pressure varies continuously over the surface of plane and hence anyjaggedness in the isolines indicates poor mesh quality (Fig. 21).

18

Page 25: Introduction to Structured Grid Generation for Aeronautics

If the height of the first cell from the surface of the plane is sufficiently small Machnumber vanishes. This graphic feedback allows for checking correct bunching of theboundary layer. Boundary layer thickness δ over a flat plate is given by Prandtl’sanalysis :

δ ∼√

vx

U∞

and the velocity gradients stream-wise and normal to the surface are related by :

∂u

∂y/∂u

∂x∼√Rex

hence an educated guess for appropriate cell aspect ratio in the boundary layer is givenby :

∆y

∆x∼ 1√

Rex

Hyperbolic node distribution is used in the boundary layer to avoid a disproportionateamount of nodes inside it where the spacing Si between the first edge extremity andnode i is given by :

Si =1 + tanh

(b(i−1)N−1

− b2

)tanh

(b2

)with :

A =

√s1

s2

and sinh(b) =b

(N − 1)√s1s2

where s1,2 are the user-defined node spacings at both extermities and N the numberof nodes.

19

Page 26: Introduction to Structured Grid Generation for Aeronautics

(a) (b)

(c)

Figure 22 – Generic plane : Mach number on the surface of plane for aNavier-Stokes computation.a) first cell height of 1[mm] much to large forboundary layer at Mac 0.8, b) first cell height of 0.01[mm] also too largeand c) first cell height of 0.001[mm] reasonable.

20

Page 27: Introduction to Structured Grid Generation for Aeronautics

3.3 Ray : results

3.3.1 Input Parameters

Both Euler and Navier-Stokes equations were solved for the Ray. The initial conditionsare meant to simulate stationary cruising at 3000 [m] in the Mach 0.2-0.3 range andread :

Input Parameter ValueReynolds number 1.88.107

Angle of Attack 5

Pressure 101325 [Pa]Mach 0.3

Viscosity model -Temperature 270 [K]

Table 3 – Euler simulation of the Ray : physical input parameters

Input Parameter ValueReynolds number 1.88.107

Angle of Attack 5

Pressure 90800 [Pa]Mach 0.206

Viscosity model SutherlandFlow model 1 eq. Spalart-AllmarasTemperature 270 [K]

Table 4 – Navier-Stokes simulation of the Ray : physical input parameters

Input Parameter ValueReynolds number 1.88.107

Angle of Attack 5

Pressure 90800 [Pa]Mach 0.206

Viscosity model SutherlandFlow model Wilcox’s k − ωTemperature 270 [K]

Table 5 – Navier-Stokes simulation of the Ray : physical input parameters

21

Page 28: Introduction to Structured Grid Generation for Aeronautics

3.3.2 Convergence Analysis

1e-06

1e-05

1e-04

0.001

0.01

0.1

1

10

100

1000

0 500 1000 1500 2000 2500

log(

Res

idua

ls)[

]

Iterations [ ]

Masspxpypz

Energy

(a)

1e-06

1e-05

1e-04

0.001

0.01

0.1

1

10

100

1000

0 500 1000 1500 2000 2500 3000

log(

Res

idua

ls)[

]

Iterations [ ]

Masspxpypz

Energy

(b)

Figure 23 – Ray : NSMB Convergence with for a) inviscid flow and b) vis-cous flow. Note : meshes are different

3.3.3 Mesh feedback

Pressure gradient is displayed on the fuselage for checking node distribution. Indeedincorrect bunching, generally too big a step between two adjacent cells results indiscontinuities. At subsonic flow rates the absence of chocks allows to disambiguatethe reason for such discontinuities.

(a) (b)

Figure 24 – Ray pressure distribution in [Pa] around nose : a) Euler and b)Navier-Stokes simulations both show low quality bunching in front of noseand above leading edge

22

Page 29: Introduction to Structured Grid Generation for Aeronautics

Figure 25 – Ray : Navier-stokes computation. Pressure gradient is displayedon the fuselage for checking node distribution and the tracer particles serveas an aide for appreciating flow around the body.

23

Page 30: Introduction to Structured Grid Generation for Aeronautics

Figure 26 – Ray : Navier-stokes computation.

24

Page 31: Introduction to Structured Grid Generation for Aeronautics

4 Lessons learned

Structured grid generation might be the best approach to solving complex flows butit comes at great cost. The amount of experience and time required for structuringa proper mesh strongly limit the situations where a structured grid is the optimaltool from a resource management perspective. One of the reasons for this complexityarises from the fact that for complex geometries it is non-trivial to reverse a process(removing or moving splits and O-grids). For this reason it is custom to start over amesh from scratch many times before obtaining decent results. This trial and errorapproach although time consuming is a great opportunity for understanding whatparameters influence mesh quality. Finally correct node distribution and choice gridsize have been found to depend vastly on the quality of the results desired for a givenapplication.

5 Conclusion

Computational fluid mechanics is a vast and complex subject that has merely beenskimmed by the work done during this project. The lessons learned regarding struc-tured mesh generation give insight into key points to keep in mind for high-qualitymesh generation. The results obtained regarding pressure distribution and Mach num-ber over the surfaces of the planes are not of engineering significance per se but offerinsight into the bias brought to physical solution by the mesh and the solver.

25

Page 32: Introduction to Structured Grid Generation for Aeronautics

References

[1] J. L. Anderson, S. Preiser, and E. L. Rubin. Conservation form of the equationsof hydrodynamics in curvilinear coordinate systems. Journal of ComputationalPhysics, 2(3):279 – 287, 1968.

[2] Thompson, Joe F.; Warsi, Z. U.A.; Mastin, C. Wayne Numerical grid generation:foundations and applications North-Holland, 1985

[3] S. K. Godunov and G. P. Prokopov. On the computation of conformal transfor-mations and the construction of difference meshes. USSR Computational Mathe-matics and Mathematical Physics, 7(5):89 – 124, 1967.

[4] A. Pope. Basic Wing and Airfoil Theory. McGraw-Hill Book Company, INC.,New York, Toronto, London, 1951.

[5] J.B. Vos, P. Leyland, V.van Kemenade, C. Gacherieu, N. Duquesne, P. Lotstedt,C. Weber, A. Ytterstrom, C. Saint Requier. NSMB Handbook 4.5 + Update for6.0 IMHEF-DGM-EPFL, Dept. of Aeronautics KTH, CERFACS Aerospatiale,Airbus France, SAAB. August 27, 2010

[6] J.B. Vos, P. Leyland, V.van Kemenade, C. Gacherieu, N. Duquesne, P. Lotstedt,C. Weber, A. Ytterstrom, C. Saint Requier. NSMB 5.99.6 User Guide IMHEF-DGM-EPFL, Dept. of Aeronautics KTH, CERFACS Aerospatiale, Airbus France,SAAB. July 10, 2008

[7] J. Blazek Computational Fluid Dynamics - Principles and Applications Elsevier,2001

[8] H. K. VERSTEEG and W. MALALASEKERA. An introduction to computationalfluid dynamics : The finite volume method. Him Longman Scientific &Technical,1995.

[9] C. Hirsch. The resolution of numerical schemes. In Numerical Computation ofInternal and External Flows (Second Edition), pages 411 – 412. Butterworth-Heinemann, Oxford, second edition edition, 2007.

[10] Navier Stokes multiblock calculations for high speed aerothermodynamicsAerothermodynamics for space vehicles, Proceedings of the 2nd European Sym-posium held in ESTEC, Noordwijk, The Netherlands, 21-25 November, 1994,Edited by J. J. Hunt, Published by European Space Agency (ESA) (Paris), 1995,p.57

[11] J. W. Demmel. Applied Numerical Linear Algebra. Society for Industrial andApplied Mathematics, 1997.

[12] J. E. Castillo, editor. Mathematical Aspects of Numerical Grid Generation. Soci-ety for Industrial and Applied Mathematics, 1991.

26

Page 33: Introduction to Structured Grid Generation for Aeronautics

[13] R. Eymard, T. Gallouet, and R. Herbin. Finite volume methods. In P. Ciarlet andJ. Lions, editors, Solution of Equation in [real]n (Part 3), Techniques of ScientificComputing (Part 3), volume 7 of Handbook of Numerical Analysis, pages 713 –1018. Elsevier, 2000.

[14] K.-J. Bathe. Finite Element Procedures in Engineering Analysis. Prentice-Hall,1982.

[15] W. Kwok and Z. Chen. A simple and effective mesh quality metric for hexahedraland wedge elements.

[16] V. D. Liseikin. A Computational Differential Geometry Approach to Grid Gen-eration. Springer, second edition, 2007.

[17] http://www.centaursoft.com

[18] http://www.dicat.unige.it/guerrero/2deuns.html

27

Page 34: Introduction to Structured Grid Generation for Aeronautics

A baspl++

Simply how to start baspl++ for post-processing your results :

1. connecting to pleaides : ssh pleiades2 - l USERNAME -X

2. cd to results

3. module load smr

4. export SMR_LICENSE=/home/merazzi/license/SMR_LICENSE-epfl (these twocommands can be added to a file that will execute at each login of pleiades2)

5. open your database in baspl++ : baspl++ -t -d NAME_OF_MEMCOM_DATABASE.db.mc/

B Outputting blocking from ICEM and submitting

it to NSMB

Simply how to export your structured grid from ICEM CFD

1. open .blk and .tin files in ICEM CFD

2. check for aa_mesh license

3. choose GENERIC as solver

4. define boundary conditions for NSMB (see NSMB user-manual)

5. S_IN -> 130

6. S_OUT -> 134

7. S_SYM -> 410

8. S_Body -> 420

9. S_Tail -> 421

10. export to empty folder (to make sure no files are lost) and upload to pleiades2

11. on pleiades2 add domesh.bash executable in same folder as blocking with nsmbtopo

and convmesh

12. execute domesh.bash NAME_OF_BLOCKING that creates a NAME_OF_BLOCKING.db.mcfile containing all the blocking information

13. add to a separate folder containing an input.dat file (contains all the inputparameters for NSMB) and a job.XXX file (contents the information for thecluster, number of cores to use, path of .db.mc file and file path in which resultswill be written)

14. navigate to said path and execute qsub NSMB_JOB_NAME, computation starts.

28

Page 35: Introduction to Structured Grid Generation for Aeronautics

15. returns 7 digit reference number

16. for checking starting time of simulation : showstart 7DIG_REF_NUMBER

17. for monitoring your usage : qstat -u USERNAM

29