2. What are the important flow physics involved?
(1) Heat transfer, radiation
(2) Steady/unsteady
(3) Incompressible/compressible
(4) Single/multi-phase
(5) Laminar/turbulent/transitional
• This will effect which equations are solved, and their form
Practical CFD –Flow Physics
3. • What is the area of primary interest (flow domain)?
– Is there a limitation on computational resources (memory, disk
space, CPU time)
– Simplification possible?
(1)Use symmetry planes
(2)Reduction from 3D to 2D
(3)Use of porosity to simplify complex obstructions
(4)Use cylindrical coordinates in 2D?
Practical CFD -Geometry
4. Are the inlet and outlet boundaries well defined?
• Move outlet boundary as far away from region of interest as possible
• Check whether upstream obstacles (outside flow domain) have significant effect on inlet
boundary and flow through the domain
• Concerned about effects of unknown inlet boundaries?
– Conduct sensitivity analysis to see effect of inlet boundary conditions on flow in domain
may need more information about inlet boundary
Practical CFD –Boundaries
5. • Grid must be fine enough to provide adequate resolution of
the important flow and geometrical features
• Where should elements be concentrated?
– Areas with high flow gradients (boundary layers etc.)
– Areas with significant changes in geometry
– Ideal grids are isotropic and finely spaced
Practical CFD –Mesh Quality
6. Use “Inflation Layers” at walls to resolve the boundary layer properly. Put at least 10 nodes within boundary layer for good resolution.
Practical CFD –Mesh Quality
8. Avoid
• Highly skewed/warped elements
• Elements with high aspect ratios (ratio of the
sides of an element)
• Mesh with high expansion ratio
Leads to inaccuracy and/or numerical
instabilities
Skewness < 0.9
Aspect ratio < 400
Cell transition < 1.2
Practical CFD –Mesh Quality
9. Expansion factor (ratio of size of any two adjacent cells) normally between 1.0 and 1.2, but can be as high as 1.5
Practical CFD –Mesh Quality
11. • Conduct a grid independence study
– Halve the grid spacing in each direction
– Compare the coarse and fine-grid simulations
– No change means grid independence
– Normally halve grid spacing twice for a thorough grid-independence study
• Check solution and change mesh where appropriate to improve mesh quality
• Use Automatic Mesh Adaptation (ANSYS Fluent)
• Automatic mesh refinement or coarsening in locations where solution variables
change rapidly
Practical CFD –Mesh Quality
12.
13. • Since near-wall conditions are often predictable, wall functions can be used to determine the near-wall
profiles rather than using a fine mesh to actually resolve the profile
• In ANSYS Fluent the variable Yplus reports the location of the first vertex adjacent to the wall
Practical CFD Wall Functions
14. • Logarithmic-based wall functions
– each wall-adjacent vertex should be located within the log-law layer: y+ ≈ 20-200
• Resolved wall treatment
– each wall-adjacent vertex should be within the viscous sublayer : y+ ≈ 1 with a minimum of 10 nodes
in boundary layer
– Possible only with the automatic wall treatment available with ω- based turbulence models, e.g. SST,
which switches between wall function and low-Re wall treatment as the mesh is refined
• Scalable wall functions (k-ε models)
– the mesh is shifted virtually to y+ = 11.067, the point of transition from linear to logarithmic behaviour
– Further refinement of the mesh near the wall has no effect
Practical CFD Wall Functions
15. • In some situations, such as boundary layer separation, logarithmic-based wall functions do not correctly
predict the boundary layer profile
– logarithmic-based wall functions should not be used
– resolving the boundary layer can provide accurate results
Practical CFD Wall Functions
16. • Has the solution converged? What is the convergence criterion?
• Use monitoring points to track changes in variables with iteration (or time step)
• Place monitoring points where the largest changes in variables with iteration (or times step) are likely to
occur
(1) Areas with high gradients
(2) Close to or at outlet
Practical CFD -Convergence
20. • If time is not an issue and convergence rate is good, converge to as small a residual as possible
• Are there numerical issues?
– Reduce under-relaxation factors/false time-step
– Use a more robust numerical scheme (lower-order discretisation, say 1storder), at least
initially
– Use a more accurate numerical scheme (higher-order discretisation) as convergence is
approached
– Try double precision if residuals stagnate at high values
• You can change settings after a run and the initial guess for the new run will be the results of the
previous
Practical CFD -Convergence
21. • If you still have problems with convergence after considering validity of boundary conditions and
physical models AND checking numerical issues
poor mesh quality is likely cause
• Plot the residuals through flow domain, and check grid quality in areas with large residuals
Practical CFD -Convergence
22. • Problems with convergence in a steady-state problem? Is the flow actually unsteady?
– For transient calculations, finer grids mean that smaller time steps or higher order
discretisation schemes are required
Practical CFD -Convergence
24. • Waste of time
• Waste of resource
– Capital cost of computing equipment
– Software license, salary of CFD specialists
– Maintenance of computing equipment, information resource, ...
• Potential catastrophic failure
• The industry has performed a review of sources of error and developed guidelines:
Consequence of inaccurate CFD
25. • Error: a recognizable deficiency in a CFD model that is not caused by a lack of
knowledge
– Numerical error
– Coding error
– User error
• Uncertainty: a potential deficiency in a CFD model that is caused by lack of
knowledge
– Input uncertainty
– Physical model uncertainty
Definitions of error and uncertainty
26. • Roundoff error: arise because of the computational representation of real numbers by means of a finite
number of significant digits
• Can be managed by:
– Using double precision
– Avoid subtraction of almost equal-sized large numbers or addition of numbers with very large
difference in magnitude
• ROE——Digits
• 7 digits——Single precision
• 15 digits——Double precision
Numerical error
Example :
A simple arithmetic
operation performed
with a computer
in a single precision
using seven significant
digits
27. • Iterative convergence error: arises when an iterative solver is used to solve the governing
equation
– Assessed using normed residuals –residuals give an indication of how well the governing
equations are satisfied
– The residuals are normalized so that the same convergence criterion can be applied to
different flow situations
• Discretization error: arise as a consequence of the approximation introduced during the
discretization of the continuous problem
– This can be managed by a careful mesh design
– Can in principle be made arbitrarily small be progressive reduction of the time step and
resolution
Numerical error
28. Balancing the error
As the mesh or time step size
decreases,
the discretization error decreases !
but the round-off error increase!
29. • Domain geometry:
– Discrepancy between CAD design intent and manufactured part (due to manufactured tolerance for
example)
– Effect of roughness
– Actual geometry represented by a finite number of straight edges and arcs –limited accuracy
• Boundary conditions
– Difficult to get flow variables such as velocity, temperature, species with a high degree of confidence
– Choice of type and location of open boundaries can be a challenge
• Fluid properties
– Assumption of constant fluid property is often an approximation. Need to carefully assess its
legitimacy
Input uncertainty
30. • Limited accuracy or lack of validity of submodels
– Often submodels such as turbulence are applied in condition which differ from well
tested/validated conditions
– K-ε often used in conditions wildly different to those for which the constants have been
identified
• Sometimes need to use a substandard model because:
– No other model exists
– Other models are computationally too expensive –eg. wall function vs resolving the entire
boundary layer profile
Physical model uncertainty
31. • Limited accuracy or lack of validity of simplifying assumptions:
• Many assumptions are made in a CFD simulation:
– Steady vs transient
– 2D vs 3D
– Incompressible vs compressible
– Adiabatic vs heat transfer across boundaries
– etc...
• In some cases, these assumptions are not straight forward and can produce incorrect results
– Eg. symmetric geometry which leads to unsymmetrical flows
– Steady flow assumption when the flow is not steady
Physical model uncertainty
32. • Verification: determining that a model implementation accurately represents the developer
conceptual description of the model and the solution to the model. “Solving the equations right”
• Validation: the process of determining the degree to which a model is an accurate
representation of the real world. “Solving the right equations”
Verification & Validation
33. • Involves quantifying the error:
– Roundoff error can be assessed by comparing results with single precision
(7 significant figures) or double precision (15 significant figures)
– Iterative or convergence error can be quantified by investigating the effect of
the stopping convergence threshold on quantities of interest such as
pressure drop, mass flow rate, etc...
– Discretization error is quantified by a systematic refinement of the space
and time mesh. We should aim to demonstrate monotonic reduction of the
discretization error
Verification
34. • Quantification of the input uncertainty
– Input uncertainty can be quantified by performing a sensitivity analysis –i.e.
performs a large number of CFD analysis with a range of possible input and
assess how the quantity of interest is affected.
– Physical modelling uncertainty requires comparison with high-quality
experimental results
Validation
35. • Good reporting of CFD is essential to be able to reproduce the results
• The report should include enough information on inputs and results
• Input documentation
– Description of problem & purpose of CFD simulation
– Code chosen & hardware
– Schematic of the computational domain with key dimensions, inlets, outlets
– Boundary conditions + justification
– Initial conditions
– Fluid properties
– Modelling option selection: laminar/turbulent, turbulence model, near wall treatment
– Grid design: detail of spatial and temporal mesh
– Solution algorithm choice –particularly non-default choices
– Iterative convergence criteria choice
– Summary of special “trick” needed for successful simulation
Reporting & Documentation
36. • Warning: high quality presentation of results not the same as high-quality results
• Before drawing conclusions from the CFD simulation, it is important to discuss:
– Verification –discuss effect of stopping criteria, mesh
– Quantify effect of input uncertainty
– Validation study
– Additional confidence that the simulation is reliable based on common fluid
engineering sense
Reporting & Documentation
37. • Fluid flows from high to low pressure (in pressure driven flows)
• Static pressure decreases when velocity increases
• Friction losses cause a decrease of total pressure in direction of the flow
• Fluid velocity decreases near walls (boundary layer)
• Flow should be eventually become fully developed in confined geometries
• Boundary layers rapidly separate under an adverse pressure gradient
• Flow usually separate at corners
• If flow separates, there will be recirculation
• Pressures are higher at the outside of a bend (or curved streamline) and lower at the inside due to centrifugal forces
• Pressure increases with depth in a liquid due to gravity
• Heat flows from hot to cold
• Hot fluid rises and cold fluid sinks due to buoyancy
• Turbulence is generated in regions of high shear
Simple things to check in CFD simulations