# Meshing and CFD Accuracy - ICM

Meshing and CFD Accuracy - ICM

Presenter Name

Presenter Title

Presentation Title

June XX, 2005

Meshing and CFD Accuracy

June 9, 2005

1

Acknowledgement

• The Major part of the materials in this lecture is

provided by

Dr. Sung-Eun Kim

Dr. Tiberiu Barbat

Dr. Peter Spicka

2

Agenda

An overview of the finite-volume method

in FLUENT

Impact of mesh quality on CFD solutions

Impact of cell topology on solution

accuracy

Impact of mesh resolution

Further improvement on spatial accuracy

in the FLUENT V6.2 solver

3

Finite-Volume Method in FLUENT (1)

• Co-located (cell-centered)

formulation

• Locally and globally

conservative

• Can handle arbitrary convex

polyhedral cells

• Second-order accurate in space

and time

– Diffusion terms are discretized with

second-order central differencing

scheme

– Convection terms are discretized

with second-order upwind, QUICK,

or central differencing schemes

(first-order upwind and power-law

are still available).

4

U, V,

W,

k,

ε,

T,...

Finite-Volume Method in FLUENT (2)

Equation Discretization

Gauss divergence theorem

f

c 0

5

Finite-Volume Method in FLUENT (3)

Reconstruction of Face Value and Gradient

c 0

f

δr c0

Face Value (upwind )

φ

f

= φ + δr

up

( ∇φ

) up

( ∇φ )

c 0

c 0

( ∇φ )

c 1

f

c 1

1

2

[ ]

( ∇φ

) = ( ∇φ

) + ( ∇φ

)

f

c

0

c

1

Therefore “linear reconstruction” is actually

hinged on the calculation of the gradients!

6

Finite-Volume Method in FLUENT (4)

∑f

( ∇φ

) ≅ φ

f

dA

f

c0

1

V

c0

Green-Gauss’

Theorem

f

C 0

f

f

C 1

7

Case Study: Fully-Developed Laminar Flow

in a 2-D Channel (Re H = 400) (1)

• A coarse mesh (228-cell triangular mesh) was

systematically refined to verify the order of spatial

accuracy.

• L 1 -norms of the error in U-velocity were computed for

the three grids.

Coarse mesh

(228 cells)

medium mesh

(912 cells)

fine mesh

(3648 cells)

8

Case Study: Fully-Developed Laminar Flow

in a 2-D Channel (Re H = 400) (2)

• Note the grid-convergence of the solutions and the

reduction rate of the L 1 -norm error.

Axial velocity vs. y

L1-norm vs. cell size

9

Case Study: Taylor’s Vortex Array (1)

• Represents an periodic array of

2-D laminar vortices decaying

with time (Re = 1)

• Solved in a domain [2π x 2π]

with periodic boundaries on

systematically refined triangular

meshes

• Comparison with the analytical

solution

– L 1 -norm of the error in U-velocity

at t* = 0.32

– Evolution of total kinetic energy

10

Case Study: Taylor’s Vortex Array (2)

• Note that the error drops as O(∆x 2 ) (slope is 2 on the log-plot).

• The total kinetic energy agrees well with the exact solution for

Re = 1.

• No appreciable loss in kinetic energy for very small viscosity

(Re = 10 12 ).

11

Agenda

Introduction to the finite-volume method

in FLUENT

Impact of mesh quality on CFD solutions

Impact of cell topology on solution

accuracy

Impact of mesh resolution

Further improvement on spatial accuracy

in the FLUENT 6.2 solver

12

Impact of Mesh Quality (1)

• Quality measures

– Skewness

– Change in cell-size (growth rate)

– Aspect ratio

– Alignment with the flow

• Impact on convergence

– Highly skewed cells harm convergence, often leading to

solution divergence due to large source terms.

– Quite frequently, solution diverges because of just a few

problematic cells.

– Highly stretched cells make the equations stiff, delaying

convergence considerably.

13

• Impact on accuracy

Impact of Mesh Quality (2)

– Too rapid a change in cell size in regions of large gradients

• Rule-of-thumb based on the old adage in FDM - “keep the growth

rate under 1.2”

– Gross misalignment with the flow in region of large gradients

14

Case Study: Windshield De-icing

• Turbulent flow and unsteady heat

transfer prediction with melting

model

• Computed using a hybrid mesh

(tet + prisms) with a total of

112,000 cells

- “Only” 7 (seven) cells above

recommended 0.95 limit

diverges after 73 iterations !

15

Case Study: Turbulent Flow Over a 2-D

Backward-Facing Step

• Measured by Vogel and Eaton

(1980) – Re H = 28,000

• Shows the impact of cell growth

rate

Triangular

30% Growth

40% Growth

16

Agenda

Introduction to finite volume method in

FLUENT

Impact of mesh quality on CFD solutions

Impact of cell topology on solution

accuracy

Impact of mesh resolution

Further improvement on spatial accuracy

in the FLUENT V6.2 solver

17

Impact of cell topology on accuracy (1)

• Tri and tet meshes have inherently larger truncation

error than quad and hex which are aligned with the flow

direction and the gradients of the transported variables

(e.g., boundary layer, jets, mixing layer, wakes)

Truncation errors for quad and tri cells in the boundary layer

tri

δ r

∇φ

δ r

∆y

( ) ( )

2

∇φ

O δ

φ

f

= φc

+

14243

+ δ r ⋅

r

0 c0

= 0

18

( ) ( )

2

∇φ

O δ

φ

f

= φc

+

14243

+ δ r ⋅

r

0 c0

≠0

Impact of cell topology on accuracy (2)

• In thin shear layers (e.g., boundary layers, free shear

layers), tri or tet meshes are more prone to numerical

diffusion than quad and hex meshes that are aligned

with the flow.

U=0.1

mesh

Tri

mesh

U=1.0

Contours of axial velocity magnitude for an inviscid co-flow jet

19

Impact of cell topology on accuracy (3)

• For complex flows without dominant flow direction,

Contours of temperature for inviscid flow

T = 1

tri

U = V = 1.0 ,

U = V = 1.0 ,

T = 1

U = V = 1.0 ,

T = 0

U = V = 1.0 ,

T = 0

20

Case Study: Recirculating Flow in a Cavity

• 3-D laminar flow driven by a moving lid (Re H = 100)

• Comparison among FLUENT results for hex (198K

cells) and tet (224K cells) mesh

21

Case Study: Laminar Flow Through a Pipe

with Stenosis (1)

• The stenosis has an axisymmetric constriction of

sinusoidal shape.

– The length of the constriction (L c ) is four times the pipe

diameter.

• The inlet flow is a fully-developed laminar flow.

• Two Reynolds numbers (Re D = 50, 100) were

considered.

• Three different meshes were used.

– Coarse tri mesh

– Fine tri mesh

22

Case Study: Laminar Flow Through a Pipe

with Stenosis (2)

Comparison of predicted reattachment points

x a /L C

xa/Lc

4.5

4

3.5

3

2.5

2

1.5

1

0.5

0

Re =50

Re =100

Tricoarse

Tr-fine

Exp.

23

Case Study: Turbulent Flow Over a 2-D

Backward-Facing Step

• Measured by Vogel and Eaton (1980)

• Re H = 28,000

• Computed using four different mesh types of comparable

resolution

Structured

Tri w BL

Tri

24

Case Study: Turbulent Flow Over a 2D

Backward-Facing Step (2)

• Impact of Mesh Type

25

Impact of cell topology on accuracy (4)

• Although structured quad and hex

meshes are favorable from the

accuracy viewpoint, their overall

diminishes for many industrial and

practical applications.

– Complex geometry and flow structure

• Difficulty of meshing in hex

• No dominant flow direction

– For turbulent flows, numerical diffusion is

overwhelmed by physical diffusion.

• The accuracy gap can be further

reduced by using:

– Hybrid grids

– Boundary layer (prism) mesh for walldominated

flows.

26

Case Study: Turbulent Flow in a Pipe

with 90 o bend (Re D = 43,000)

Hex mesh

15,700 cells

Tet mesh

440K cells

27

Case Study: Turbulent Flow in a Pipe

with 90 o bend (Re D = 43,000) - (cont’d)

Realizable k-ε

Axial velocity profile at θ = 60 o

hex+SOU

tet(CB)+SOU

tet (NB)+SOU tet (NB)+MUSCL

Axial velocity contour at θ = 90 o

28

Case Study: Turbulent Flow in a Pipe with

90 o bend (Re D = 43,000) (cont’d)

Hex mesh

15,700 cells

Tet mesh

440K cells

Hybrid mesh

(prism + tet)

400K cells

29

Case Study: Turbulent Flow in a Pipe with

90 o bend (Re D = 43,000) (cont’d)

hex tet prism +

tet

Axial velocity contour at θ = 90 o

Axial velocity profile at θ = 60 o

Axial velocity profile at θ = 75 o

30

Case Study: Turbulent Flow in a Pipe

with 90 o bend (Re D = 43,000) (cont’d)

• Pressure drop in the bend

0.1

0.08

0.06

∆ C

P

( )

1 2

P P o ρU

− θ = 0 θ = 90 2 B

0.04

dCp

0.02

0

hex tet prism+tet

dCp 0.081 0.048 0.071

31

Case Study: Drag on a Sphere (1)

• Steady laminar flow (Re D = 250)

on the verge of vortex-shedding

• (C D ) exp = 0.70 ~ 0.72 with

frictional and form drag being

comparable in magnitude

• Three different meshes were

used with the near-wall mesh

resolutions kept comparable

(0.003 D)

– 970K-cell hex mesh

– 1.6M-cell tet mesh

– 1.1M-cell hybrid (prism + tet)

mesh

32

Case Study: Drag on a Sphere (2)

Cd

0.8

0.7

0.6

0.5

0.4

0.3

0.2

0.1

friction

pressure

total

0

hex tet hybrid exp.

33

Case Study: Windshield De-icing

Hex mesh: 283,000 cells Tet mesh: 317,000 cells Hybrid mesh (prism + tet):

54,000 cells

34

Case Study: Windshield De-icing

• Comparison in terms of the

percentage of the windshield

surface cleared of ice

– Note the time needed to melt

90% of the windshield

surface

– The prediction using hex

mesh is considered as a

reference prediction.

• The coarse hybrid mesh

gives a reasonable prediction

with much fewer cells.

• Pure tet mesh overpredicts

the melting by ~10%

35

Agenda

Introduction to finite volume method in

FLUENT

Impact of mesh quality on CFD solutions

Impact of cell topology on solution

accuracy

Impact of mesh resolution

Further improvement on spatial accuracy in

the FLUENT V6.2 solver

36

Impact of Mesh Resolution

General guidelines (1)

surface mesh that resolves large

curvature of underlying

an airfoil, A-pillar, side-view

mirror, bend)

• Determine cell height and

growth rate such that the

resulting mesh resolves the

width of shear layers.

– At an absolute minimum, 4 - 5 cells

across the shear layer are needed.

– Remember the FDM adage for the

growth rate (“keep it under 1.2”)

37

Impact of Mesh Resolution

General guidelines (2)

• Don’t discount flow

structures away from wall

(e.g., tip-vortex, near-wake).

• Remember that underresolved

upstream flow

affects the prediction

downstream.

38

Impact of Mesh Resolution

General guidelines (3)

• When tackling a new application, it is a good practice to

first study the grid-dependency of the solutions and

establish a best-practice meshing strategy.

3.7E-03

Coarse

3.5E-03

Medium

C D

Fine

3.3E-03

Richardson extrapolated

3.1E-03

0.0E+00 1.0E+05 2.0E+05 3.0E+05

# of cells

39

Impact of Mesh Resolution

A Guideline for Near-Wall Resolution (1)

Wall Function

Approach

Resolving Viscous

Sublayer approach

region

+

30 ~ 50 ≤ y ≤ 500

Most ideally aim at y+ = 40 ~ 100

At least 5 -6 cells inside BL

Wall-adjacent cells at y + ~ 1 or

less.

At least 10 cells within the

inner layer (log-layer, buffer &

sublayers and 20 cells within

BL.

40

Impact of Mesh Resolution

A Guideline for Near-Wall Resolution (2)

• Take advantage of the enhanced wall treatment (EWT).

– Predictions are less sensitive to y + than with standard wall

functions

Fully-developed turbulent flow in a pipe (Re = 110,000)

0.035

0.03

Friction factor, f

0.025

0.02

0.015

0.01

0.005

SWF

EWT

0

0 10 20 30 40 50 60

Near Wall Size, y+

41

Agenda

Introduction to finite volume method in

FLUENT

Impact of mesh (quality) on CFD solutions

Impact of cell topology on solution

accuracy

Impact of mesh resolution

Improvements on spatial accuracy in the

FLUENT V6.2 solver

42

• FLUENT offers two choices

v6.1

– Cell-based (default)

– Node-based

scheme is aimed at improving

spatial accuracy especially

for

– Tri and tet meshes

– Mesh with large or abrupt

cell size changes

43

Schemes

Green-Gauss’

Theorem

c1

c0

44

The nodal values are “weighted

averages” of the surrounding cellcenter

values

Case Study: Inviscid Subsonic Flow Over

a 2-D Bump (Ma = 0.5)

• Entropy increase is an useful indicator for numerical

dissipation.

• Node-based gradient reduces the entropy increase by

more than one order-of-magnitude.

Contours of non-dimensional entropy production

45

Spatial Accuracy- discretization scheme

for convection terms in V6.2

Segregated Solver (1)

• MUSCL scheme

– High-order (locally third order) convection discretization

scheme modified for the unstructured meshes

– Based on blending of central differencing (CD) and secondorder

upwind (SOU) and is adapted to unstructured meshes

– More accurate predictions of secondary flows, vortices, and

force/moment

• Bounded Central differencing (BCD) scheme

– An alternative scheme to CD scheme which often yields

spurious (unphysical) oscillations

– Substantially more accurate than the SOU scheme

– Available for LES and detached eddy simulation (DES) only

46

Spatial Accuracy Improvements in V6.2

Segregated Solver (2)

• Second-order reconstructed convective flux

• mainly benefits tet meshes and poor-quality meshes

• Resulting in better resolution of boundary layers / shear

layers

• More accurate prediction of secondary flows, swirls,

vortices, pressure drop, and force/moment

• Little impact on solution robustness

schemes benefit from using the more accurate flux

• Default for the segregated solver in 6.2

-- The coupled solvers have long adopted an equivalent

implementation for the convective flux

• Node-based pressure gradient on cell faces

– Yields more accurate prediction of form (pressure) drag

47

Bounded Central Differencing

Example: Inviscid Vortex

• Conservation of kinetic energy

in an inviscid flow

Taylor’s vortex flow – 2-D

periodic array of vortices

Evolution of total kinetic energy

48

Example: CD vs. BCD

Martinuzzi and

Tropea (1993)

49

Spatial Accuracy Improvements in V6.2

Coupled Solver

• MUSCL scheme

– Essentially the same MUSCL scheme as used in the

segregated solver

– Implemented in a slightly different context from the

segregated solver

• Low-diffusion convection flux scheme

– Second-order spatially accurate

– For coupled solver only (BCD is not unavailable for

coupled solver)

– Available for LES and DES only

50

Spatial Accuracy Improvements in V6.2

Areas of impact

• Areas where we see the most impact

– Drag, Lift, and Moment (external aerodynamics and

turbomachinery)

– Secondary Flows and Vortices

– Pressure drop

– Heat transfer

– Noise/Aeroacoustics

– In-Cylinder Flow Modeling

– Mixing

• The benefits are especially significant for the

tetrahedral/triangular unstructured meshes

51

Example: Heat Transfer in a Channel (1)

• Laminar flow (Re H = 700,

Pr = 0.7)

• Heat transfer at

conducing walls

predicted using

– Hex mesh (160K cells)

– Tet mesh(440K cells)

– Hybrid mesh (360K cells)

52

Example: Heat Transfer in a Channel (2)

• Tet vs. Hex --- Wall Heat Flux predictions

52.6

48

36.5

40.2

Exact Hex Tet

v6.1

53

Tet

v6.2

Example: Heat Transfer in a Channel (3)

• Hybrid vs. Hex --- Wall heat flux predictions

36.5

40.2

45

40.8

Exact Hex Hybrid

v6.1

54

Hybrid

v6.2

Example : Fully-Developed Pipe Flow

• Laminar flow, Re D = 10 3 (dp*/dx = -1.267)

• Segregated solver with full tet. mesh

Grid size

(cells)

High-order

RC

error

Old RC

flux

error

1301

1.493

17.8%

1.8457

45.7%

10408

1.332

5.14%

1.6204

27.9%

83264

1.2772

0.813%

1.4379

13.5%

666112

1.2700

0.245%

1.3715

8.13%

55

Example: Turbulent Flow Past an Ellipsoid

• Drag predictions on an ellipsoidal body using different

meshes

– Very low profile (form) drag

– Hybrid mesh with 500K cells

56

Example: Turbulent Flow Past an Ellipsoid

(continued)

• Hybrid mesh (tet mesh +10 prism layers)

4

3.5

3

2.5

2

1.5

1

cell-based

node-based

node-based +

HORC + SOU

node-based +

HORC+MUSCL

CD Total

CDP

CDF

0.5

0

Hex

tet R1 tet R2 tet R3 tet R4

57

Example: GAW-1 Airfoil

• Turbulent flow Re C = 6.0 x 10 6 , α =12 deg.

• C D = 0.0248 from experiment (NASA TN D-7428)

• Coupled implicit solver with RNG k-ε model

• Comparson of 6.1 vs 6.2

Drag coefficient (10 x C D

) predictions

Cell-based(6.1)

Node-based, SOU

Node-based, 3 rd -

order MUSCL

0.263 (+6.1%)

0.238 (-4.0%)

3-D hex-wedge

0.262 (+5.7%)

0.235 (-5.2%)

3-D hex-tet

0.410(+65.3%)

0.293 (+18.3%)

0.279 (+12.5%)

58

Summary

• Mesh (still) impacts convergence and accuracy of CFD solutions

significantly

• The FLUENT discretization guarantees second-order accuracy for

all types of elements, including tri- and tet-meshes

• Quad and hex cells enjoy inherently smaller truncation error when

the meshes are aligned with flow (e.g., boundary layers)

• In complex flows, however, accuracy gap between quad/hex and

tri/tet becomes much narrower

• The accuracy with unstructured meshes can be significantly

improved by using the hybrid and BL meshing capability in

Gambit/FLUENT

• Second-order convective fluxes reconstruction, MUSCL scheme,

and bounded central differencing in FLUENT V6.2, together with

node-based gradient scheme have been shown to further

enhance the solver’s spatial accuracy, especially for the

unstructured meshes

59

More magazines by this user
Similar magazines