Professional Documents
Culture Documents
ANSYS CFD
15.0 Release
ANSYS Confidential
Introduction
Lecture Theme:
The accuracy of CFD results can be affected by different types of errors. By
understanding the cause of each different error type, best practices can be developed
to minimize them. Meshing plays a significant role in the effort to minimize errors.
Learning Aims:
Learning Objectives:
You will understand the causes of error in the solution and how to build the mesh and
perform the simulation in a manner that will minimize errors
Introduction
2
Error Types
October 29, 2014
Summary
When undertaking a CFD model, consideration should be given to the purpose of the
work:
Introduction
3
Error Types
October 29, 2014
Summary
Round-off errors
Iteration errors
Solution errors
Difference between converged solution on current grid and exact solution of model
equations
Exact solution Solution on infinitely fine grid
Model errors
Difference between exact solution of model equations and reality (data or analytic
solution)
Introduction
Error Types
October 29, 2014
Summary
Round-Off Error
Inaccuracies caused by machine round-off:
Error Types
October 29, 2014
Summary
(Residual)
Isentropic Efficiency
Relative error:
0.18% 0.01%
Iteration errors:
Difference between
converged solution and
solution at iteration n
Convergence
criterion
Rmax=10-2 Rmax=10-3
Iteration 35 Iteration 59
Rmax=10-4
Iteration 132
Iteration Number
Introduction
6
Error Types
October 29, 2014
Summary
Head rise
Efficiency
Mass flow rate
Error Types
October 29, 2014
Summary
Discretization Error
All discrete methods have solution errors:
Difference between solution on a given grid and exact solution on an infinitely fine grid
e=
h
f h f ex
Error Types
October 29, 2014
Summary
Compared Grids:
50 50 800 800
SST turbulence model
Target quantities:
Heat transfer
Maximum Nusselt number
Discretization schemes:
D= 26.5mm or 101.6mm
Error Types
October 29, 2014
Summary
2nd order
200
Nu_max
190
180
170
160
150
-3.47E-17
0.005
0.01
0.015
1/N_Cells
Introduction
10
Error Types
October 29, 2014
Summary
Model Errors
Inadequacies of (empirical) mathematical models:
Discrepancies between data and calculations remain, even after all numerical
errors have become insignificant!
Introduction
11
Error Types
October 29, 2014
Summary
RNG
KW
Nu*
SKE
RNG
SKE
KW
RNG
Model error
KW
Introduction
12
Error Types
October 29, 2014
Summary
Systematic Errors
Discrepancies remain
Systematic errors:
Approximations of:
Geometry
Component vs. machine
Boundary conditions
Fluid and material properties,
Error Types
October 29, 2014
Summary
Discretization errors
Round-off errors Poor CFD results
Convergence difficulties Non-reliable CFD results
Non-scalable meshes Inconsistent CFD results on mesh refinement
Introduction
14
Error Types
October 29, 2014
Summary
1.ACCURACY
2. EFFICIENCY
3. EASINESS TO GENERATE
Time available
- Faster Tet-dominant mesh
vs crafted Hex/hybrid mesh
with lower cell count
Error Types
October 29, 2014
Summary
Introduction
16
Error Types
October 29, 2014
ANSYS Confidential
Summary
Bad
Introduction
17
Good
Error Types
October 29, 2014
Summary
Mesh Quality
A good mesh depends on :
Good
Not Good
Introduction
18
Error Types
October 29, 2014
Summary
Mesh Quality
Grid generation:
Scalable grids
Skewness < 0.95 (accuracy, convergence)
Bad cells
No Bad cells
Grid refinement:
19
Error Types
October 29, 2014
Adaption
Best Practices for Meshing
ANSYS Confidential
Summary
Mesh Quality
Avoid sudden changes in mesh density
Not good
Introduction
20
Good
Error Types
Summary
Quad/Hex aligned with the flow are more accurate than Tri with
the same interval size
U=0.1
Hex
mesh
Tri
mesh
U=1.0
Contours of axial velocity magnitude for an inviscid co-flow jet
Introduction
21
Error Types
October 29, 2014
Summary
U = V = 1.0 ,T = 1
U = V = 1.0 , T = 1
qua
d
U = V = 1.0 ,
tri
U = V = 1.0 , T = 0
T=0
Introduction
22
Error Types
October 29, 2014
Summary
Summary
Try to understand application and physics of the application
Distinguish between numerical, model and other errors
Document and defend assumptions
Geometry
Boundary conditions
Flow regime (laminar, turbulent, steady-state, unsteady-state, )
Model selection (turbulence, )
Error Types
October 29, 2014
Summary
Resources
ERCOFTAC SIG: Quantification of Uncertainty in CFD
Roache, P.J., Verification and Validation in Computational Science and Engineering,
Hermosa Publishers, 1998
Introduction
24
Error Types
October 29, 2014
Summary
Appendix
25
ANSYS Confidential
Convergence difficulties
Bad physic description
Diffuse solution
User must
ANSYS Confidential
27
difference between a
mesh with cells failing
the quality criteria and
a good mesh
Unphysical values in
vicinity of poor quality
cells
ANSYS Confidential
Mesh 1
(max,avg)CSKEW=(0.912,0.291)
(max,avg)CAR=(62.731,7.402)
VzMIN-90ft/min
VzMAX600ft/min
Mesh 2
(max,avg)CSKEW=(0.801,0.287)
(max,avg)CAR=(8.153,1.298)
28
VzMIN-100ft/min
VzMAX400ft/min
ANSYS Confidential
29
Element Quality
Aspect Ratio
Jacobean Ration
Warping Factor
Parallel Deviation
Maximum Corner Angle
Skewness
Orthogonal Quality
On cell
Ai fi
| Ai || f i |
Ai ci
| Ai || ci |
On face
A
c1
f1
c3
f3
f2
A1
c2
e1
e2
e3
A2
A2
A3
A3
Ai ei
For the face it is computed as the minimum of
computed for each edge I
| Ai || ei |
computed for each face i
Where Ai is the face normal vector and fi is a vector from the centroid of the cell to the centroid of that face,
and ci is a vector from the centroid of the cell to the centroid of the adjacent cell, where ei is the vector from
the centroid of the face to the centroid of the edge
ANSYS Confidential
0
Worst
1
Perfect
2.
e min
Skewness = max max e ,
e
180 e
Actual cell
max
min
Circumsphere
ANSYS Confidential
0
Perfect
1
Worst
Mesh Quality
Mesh quality recommendations
Low Orthogonal Quality or high skewness values are not recommended
Generally try to keep minimum orthogonal quality > 0.1, or maximum skewness < 0.95. However
these values may be different depending on the physics and the location of the cell
Fluent reports negative cell volumes if the mesh contains degenerate cells
Skewness mesh metrics spectrum
32
ANSYS Confidential
Aspect Ratio
2-D:
3-D
Area ratio
Radius ratio of circumscribed / inscribed circle
Limitation for some iterative solvers
A < 10 100
(CFX: < 1000)
Large aspect ratio are accepted where there is
no strong transverse gradient (boundary
layer ...)
33
ANSYS Confidential
Smoothness
Checked in solver
Recommendation:
Available in Adapt/Volume
3D : i = Vi / Vnb
34
ANSYS Confidential
Elements: Hex
Pro:
Con:
36
ANSYS Confidential
Elements: Tet
Pro:
Con:
37
hex
Poor shear layer element
No streamline orientation
Quantity must (and can) make up for
quality
2013 ANSYS, Inc.
ANSYS Confidential
Elements: Prism
Pro:
38
ANSYS Confidential
Elements: Pyramid
Use in hybrid grids
Transition element between hex and tet
Polyhedral grids
ANSYS Fluent:
Generate base types
Convert
39
ANSYS Confidential
Recommendations
1st Option Hex grid
ANSYS Confidential
Grid Optimization
Truncation errors source of discretisation errors
Minimize truncation errors minimize discretisation errors
Truncation error Difference between analog and discrete representation
f i +1 f i 1
f
+ i
=
x
h
h2 3 f
+
3
6 x i
h
i-2
41
ANSYS Confidential
i-1
h
i
i+1
i+2
(Residual)
42
ANSYS Confidential
2D Compressor cascade
2nd order
Rmax = 1 10-3
Rmax = 1 10-4
Rmax = 1 10-5
ANSYS Confidential
Isentropic Efficiency
Relative error:
0.18%
0.01%
Convergence criterion
Rmax=10-2
Rmax=10-3
Rmax=10-4
Iteration 35
Iteration 59
Iteration 132
Iteration Number
44
ANSYS Confidential
45
0.1
0.2
0.3
0.4
0.5
Xs / L
0.6
ANSYS Confidential
0.7
0.8
0.9
Error
Grid
46
1st order
2nd order
1st order
2nd order
50 50
190.175
176.981
22.1 %
13.6 %
100 100
170.230
163.793
9.3 %
5.1 %
200 200
162.664
159.761
4.4 %
2.6 %
400 400
159.646
158.296
2.3 %
1.4 %
800 800
157.808
157.168
1.1%
0.7 %
155.751
155.777
ANSYS Confidential