judd kaiser ansys inc. judd.kaiser@ansys
Post on 15-Feb-2022
24 Views
Preview:
TRANSCRIPT
© 2005 ANSYS, Inc. 1 ANSYS, Inc. Proprietary
CFD Best Practice Guidelines:A process to understand CFD results and
establish Simulation versus Reality
CFD Best Practice Guidelines:A process to understand CFD results and
establish Simulation versus Reality
Judd KaiserANSYS Inc.
judd.kaiser@ansys.com
© 2005 ANSYS Inc.2July, 2005
OverviewOverview
• Definition of sources of error in CFD• Best practice guidelines• Validation example:
– Impinging jet• Demonstration example:
– Cavitation in fuel injection system
© 2005 ANSYS Inc.3July, 2005
Sources of ErrorSources of Error
• Numerical errors– Round-off error– Iteration error– Solution error
• Spatial discretization• Temporal discretization
• Model errors• Application uncertainties• User errors• Software errors
Software error?
Model error?…
User error?
Numerical Error?…
© 2005 ANSYS Inc.4July, 2005
Numerical: Round-Off ErrorNumerical: Round-Off Error
• Error due to machine round-off• Procedure:
– Define target variables– Calculate with single-precision version– Calculate with double-precision version
• Check:– Compare target variables– Grid aspect ratio – Large differences in length scales– Large variable range
© 2005 ANSYS Inc.5July, 2005
Numerical : Iteration ErrorNumerical : Iteration Error
• Error due to level of convergence– Differences between current and ‘infinitely
converged’ solution, on same mesh• Procedure:
– Define target variables (head rise, efficiency, ...)– Plot target variables vs convergence
• Check:– Adequate convergence: when target variables
become independent of convergence criterion– For global balances, monotonic convergence
© 2005 ANSYS Inc.6July, 2005
Iteration ErrorIteration Error
Rmax=10-3
Iteration 36
Rmax=10-4
Iteration 57
Rmax=10-5
Iteration 103
Relative error: 0.22% 0.02%
Targ
et V
aria
ble
Convergence criterion
© 2005 ANSYS Inc.7July, 2005
Quality : Solution ErrorQuality : Solution Error
• Error due to mesh resolution • Difference between current and “infinitely fine”
mesh• Procedure:
– Minimize by using 2nd order numerics– 1st order numerics: error is ½ when grid nodes x 2– 2nd order numerics: error is ¼ when grid nodes x 2
• Check:– Error indicator: solution differences between two
different numerics schemes, same mesh (easy)– Error level: solution differences between two
different meshes, same numerics scheme (hard)
© 2005 ANSYS Inc.8July, 2005
Test Case VAL01Test Case VAL01
• Impinging jet flow with heat transfer
• 2-D, axisymmetric• Grids:
– 50 × 50 800 × 800• ANSYS CFX• SST turbulence model• Discretization schemes:
– Upwind differencing– Upwind differencing +
second order correction• Target quantity:
– Heat transfer– Maximum Nusselt
number
© 2005 ANSYS Inc.9July, 2005
Solution Error ExampleSolution Error Example
150
160
170
180
190
200
0 0.005 0.01 0.015 0.02
1/N
Nu_
maxScheme 1 Scheme 2
© 2005 ANSYS Inc.10July, 2005
Error EstimationError Estimation
• Richardson extrapolation– Error estimated using:
( )1 2p
f fEr 1
−=−
1
2
f : Fine grid solutionf : Coarse grid solutionr: Refinement ratiop: Truncation error order
• Practically:– Grids must be in the
asymptotic range– Use three different mesh
densities to confirm trends
© 2005 ANSYS Inc.11July, 2005
Model ErrorsModel Errors
• Model errors remain, even after all numerical errors have become insignificant
• Inadequacies of mathematical models:– Base equations (Euler, RANS, steady,
unsteady…)– Turbulence models– Multi-phase flow models, …
• Difference between good data and calculations• Check only after numerical errors have been
quantified
© 2005 ANSYS Inc.12July, 2005
Model Error: ExampleModel Error: Example
0
50
100
150
200
250
0,000 0,050 0,100 0,150
Experiment
1st order, Grid 1x
1st order, Grid 2x
1st order, Grid 4x
1st order, Grid 8x
1st order, Grid 16x
© 2005 ANSYS Inc.13July, 2005
Application UncertaintyApplication Uncertainty
• Systematic errors:– Approximations of geometry– Component vs. machine– Approximation of boundary conditions
• Turbulence quantities• Profiles vs. constant values
– Approximation of unsteady-state flow behaviour– Fluid and material properties– Setup error– Uncertainty in comparison data
• Discrepancies remain, even if numerical and model errors are insignificant
© 2005 ANSYS Inc.14July, 2005
User ErrorsUser Errors
• Examples:– Geometry oversimplification– Poor geometry, mesh generation– Incorrect boundary conditions (locations, values)– Selection of incorrect models– Incorrect solver parameters– Acceptance of non-converged solutions
• Avoidance:– Training, documentation– Solve relevant validation cases– Process management: adhere to best practice
guidelines– Increasingly, software automation
© 2005 ANSYS Inc.15July, 2005
Software errorsSoftware errors
• Examples:– Coding bugs– Errors in interface or documentation– Incorrect support information
• Avoidance:– Automated testing– Validation and verification cases– QA guidelines
© 2005 ANSYS Inc.16July, 2005
Demonstration exampleDemonstration example
• The original presentation included a summary of a CFD study performed by Robert Bosch, involving cavitation in a diesel fuel injector
• All images and data were property of Robert Bosch, and have been removed from this presentation
© 2005 ANSYS Inc.17July, 2005
CFD SimulationCFD Simulation
• Multiphase model– Homogeneous model– Cavitation: Rayleigh-Plesset model– Isothermal
• Turbulence model– SST model with automatic wall treatment– Detached Eddy Simulation (DES)
© 2005 ANSYS Inc.18July, 2005
Simulation TimelineSimulation Timeline
• Validation• Throttle Flow
– 2-D steady state simulation– 3-D steady state and transient simulation– 3-D DES simulation
© 2005 ANSYS Inc.19July, 2005
5
6
7
8
9
10
11
12
0 20 40 60 80Pressure Drop [bar]
Mas
s Fl
ow [g
/s]
Data Coarse grid Medium grid Fine grid
Validation: Circular ThrottleValidation: Circular Throttle
dgap = 0.424 mm
din/out = 1.0 mm
© 2005 ANSYS Inc.20July, 2005
• 2D steady state: Over-simplification• 3-D simulation:
– Steady state: Cavitation inside the throttle– Transient: Same as steady state
• Need to resolve the large scale turbulence– LES: works well for free shear layer but
computationally expensive in the wall layer– DES model: hybrid of RANS in the near field
and LES in the free shear layer
Summary of RANSSummary of RANS
© 2005 ANSYS Inc.21July, 2005
OverviewOverview
• Definition of sources of error in CFD• Best practice guidelines• Validation example:
– Impinging jet• Demonstration example:
– Cavitation in fuel injection system
• References:– Roach, P.J., Verification and Validation in
Computational Science and Engineering, Hermosa, 1998
– ERCOFTAC Best Practice Guidelines• www.ercoftac.org
top related