Вы находитесь на странице: 1из 59

Presenter Name


Presenter Title
Meshing and CFDTitle
Presentation Accuracy
June XX, 2005

June 9, 2005

1
Acknowledgement

• The Major part of the materials in this lecture is


provided by

Dr. Sung-Eun Kim

with additional contributions from

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 U ,V ,W , k , ε , T ,...
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
Finite-Volume Method in FLUENT (2)
Equation Discretization

Gauss divergence theorem

c0

5
Finite-Volume Method in FLUENT (3)
Reconstruction of Face Value and Gradient

f Face Value (upwind )

c0 δ rc 0
φ f = φup + δ r ⋅ (∇φ )up

Face Gradient
(∇φ )c
(∇φ )c 0
f
1
c1 (∇φ ) f 1
[
= (∇φ )c0 + (∇φ )c1 ]
c0 2
Therefore “linear reconstruction” is actually
hinged on the calculation of the gradients!
6
Finite-Volume Method in FLUENT (4)
Cell-Gradient Calculation

(∇φ )c 0 ≅
1
Vc 0 ∑ f
φ f dA f Green-Gauss’
Theorem

C1
f f
C0
f

7
Case Study: Fully-Developed Laminar Flow
in a 2-D Channel (ReH = 400) (1)
• A coarse mesh (228-cell triangular mesh) was
systematically refined to verify the order of spatial
accuracy.
• L1-norms of the error in U-velocity were computed for
the three grids.

Coarse mesh medium mesh fine mesh


(228 cells) (912 cells) (3648 cells)

8
Case Study: Fully-Developed Laminar Flow
in a 2-D Channel (ReH = 400) (2)
• Note the grid-convergence of the solutions and the
reduction rate of the L1-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
– L1-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(∆x2) (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 = 1012).

11
Agenda
9 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 of Mesh Quality (2)
• Impact on accuracy
– Too rapid a change in cell size in regions of large gradients
degrades accuracy.
• Rule-of-thumb based on the old adage in FDM - “keep the growth
rate under 1.2”
• y+ adaptation of wall-adjacent cells should be avoided.
– Gross misalignment with the flow in region of large gradients
degrades accuracy.

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
• The steady-state solution
diverges after 73 iterations !

15
Case Study: Turbulent Flow Over a 2-D
Backward-Facing Step
• Measured by Vogel and Eaton
(1980) – ReH = 28,000 Triangular
• Shows the impact of cell growth
rate

30% Growth

40% Growth

16
Agenda

9 Introduction to finite volume method in


FLUENT
9 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
quad tri

∇φ δr ∆y
δr

0
14243 0
( )
φ f = φc + δ r ⋅ (∇φ )c + O δ r
2
φ f = φc + δ r ⋅ (∇φ )c + O δ r
0
142430
( )2

=0 ≠0
18
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
Quad Tri
mesh 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,
quad and hex meshes loose their advantage.

Contours of temperature for inviscid flow

quad
tri

T=1
T=1

U = V = 1.0 ,
U = V = 1.0 ,

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 (ReH = 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 (Lc) is four times the pipe
diameter.
• The inlet flow is a fully-developed laminar flow.
• Two Reynolds numbers (ReD = 50, 100) were
considered.
• Three different meshes were used.
– Quad mesh
– Coarse tri mesh
– Fine tri mesh

22
Case Study: Laminar Flow Through a Pipe
with Stenosis (2)
Comparison of predicted reattachment points
xa/LC

4.5
4
3.5
3
2.5
xa/Lc
2 Re =50
1.5 Re =100
1
0.5
0
Quad

Tr-fine
coarse

Exp.
Tri-

23
Case Study: Turbulent Flow Over a 2-D
Backward-Facing Step
• Measured by Vogel and Eaton (1980)
• ReH = 28,000
• Computed using four different mesh types of comparable
resolution

Structured Quad Pave

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
advantage over tri/tet meshes
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 wall-
dominated flows.
26
Case Study: Turbulent Flow in a Pipe
with 90o bend (ReD = 43,000)

Hex mesh Tet mesh


15,700 cells 440K cells

27
Case Study: Turbulent Flow in a Pipe
with 90o bend (ReD = 43,000) - (cont’d)
Realizable k-ε Axial velocity profile at θ = 60o

hex+SOU tet(CB)+SOU

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


Axial velocity contour at θ = 90o

28
Case Study: Turbulent Flow in a Pipe with
90o bend (ReD = 43,000) (cont’d)

Hex mesh Tet mesh


15,700 cells 440K cells

Hybrid mesh
(prism + tet)
400K cells

29
Case Study: Turbulent Flow in a Pipe with
90o bend (ReD = 43,000) (cont’d)
hex tet prism +
tet

Axial velocity contour at θ = 90o

Axial velocity profile at θ = 60o Axial velocity profile at θ = 75o

30
Case Study: Turbulent Flow in a Pipe
with 90o bend (ReD = 43,000) (cont’d)
• Pressure drop in the bend ∆C P ≡ (Pθ =0 − Pθ =90o ) 1
2 ρU 2
B
0.1

0.08

0.06

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 (ReD = 250)
on the verge of vortex-shedding
• (CD)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)

0.8
0.7
0.6
0.5
friction
Cd 0.4
pressure
0.3
total
0.2
0.1
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

9 Introduction to finite volume method in


FLUENT
9 Impact of mesh quality on CFD solutions
9 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)
• It’s important to start with a good
surface mesh that resolves large
curvature of underlying
geometry (e.g., leading edge of
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 under-
resolved 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

CD
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 Resolving Viscous
Approach Sublayer approach

O Wall-adjacent cells in log-law O Wall-adjacent cells at y+ ~ 1 or


region less.
30 ~ 50 ≤ y + ≤ 500
O At least 10 cells within the
O Most ideally aim at y+ = 40 ~ 100 inner layer (log-layer, buffer &
sublayers and 20 cells within
O At least 5 -6 cells inside BL
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 SWF
0.015 EWT
0.01
0.005
0
0 10 20 30 40 50 60
Near Wall Size, y+

41
Agenda

9 Introduction to finite volume method in


FLUENT
9 Impact of mesh (quality) on CFD solutions
9 Impact of cell topology on solution
accuracy
9 Impact of mesh resolution
‰ Improvements on spatial accuracy in the
FLUENT V6.2 solver

42
The Node-Based Gradient Option

• FLUENT offers two choices


for gradient calculation since
v6.1
– Cell-based (default)
– Node-based
• The node-based gradient
scheme is aimed at improving
spatial accuracy especially
for
– Tri and tet meshes
– Mesh with large or abrupt
cell size changes

43
Cell-Based vs. Node-Based Gradient
Schemes
Green-Gauss’
Theorem

Cell-based gradient Node-based gradient

c1
c0

The nodal values are “weighted


averages” of the surrounding cell-
44
center 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.
Cell-based gradient Node-based gradient

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 second-
order 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
ƒ Both the cell-based gradient and the node-based gradient
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 (ReH = 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

40.2
36.5

Exact Hex Tet Tet


v6.1 v6.2
53
Example: Heat Transfer in a Channel (3)
• Hybrid vs. Hex --- Wall heat flux predictions

45
40.2 40.8
36.5

Exact Hex Hybrid Hybrid


v6.1 v6.2
54
Example : Fully-Developed Pipe Flow

• Laminar flow, ReD = 103 (dp*/dx = -1.267)


• Segregated solver with full tet. mesh
• Node-based gradient without limiter

Grid size High-order error Old RC error


(cells) RC flux

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
cell-based
3.5
node-based
3 node-based +
HORC + SOU
2.5 node-based +
HORC+MUSCL CD Total
2
CDP
1.5 CDF
1
0.5
0
Hex tet R1 tet R2 tet R3 tet R4
57
Example: GAW-1 Airfoil
• Turbulent flow ReC = 6.0 x 106, α =12 deg.
• CD = 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 CD) predictions

Cell-based(6.1) Node-based, SOU Node-based, 3rd-


order MUSCL
2-D quad+tri 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

Вам также может понравиться