Академический Документы
Профессиональный Документы
Культура Документы
•
Presenter Title
Meshing and CFDTitle
Presentation Accuracy
June XX, 2005
June 9, 2005
1
Acknowledgement
2
Agenda
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
c0
5
Finite-Volume Method in FLUENT (3)
Reconstruction of Face Value and Gradient
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.
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.
9
Case Study: Taylor’s Vortex Array (1)
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
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
19
Impact of cell topology on accuracy (3)
• For complex flows without dominant flow direction,
quad and hex meshes loose their advantage.
quad
tri
T=1
T=1
U = V = 1.0 ,
U = V = 1.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
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)
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
28
Case Study: Turbulent Flow in a Pipe with
90o bend (ReD = 43,000) (cont’d)
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
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
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
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
42
The Node-Based Gradient Option
43
Cell-Based vs. Node-Based Gradient
Schemes
Green-Gauss’
Theorem
c1
c0
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
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
50
Spatial Accuracy Improvements in V6.2
Areas of impact
51
Example: Heat Transfer in a Channel (1)
52
Example: Heat Transfer in a Channel (2)
• Tet vs. Hex --- Wall Heat Flux predictions
52.6
48
40.2
36.5
45
40.2 40.8
36.5
55
Example: Turbulent Flow Past an Ellipsoid
56
Example: Turbulent Flow Past an Ellipsoid
(continued)
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