• CFD, Fluid Flow, FEA, Heat/Mass Transfer
  • +91 987-11-19-383
  • amod.cfd@gmail.com

CFD: a complex mix of Physics, Engineering and Art! Results need validation and sanity checks!

Validation and Verification of CFD Results

The word "Computational" in the phrase "Computational Fluid Dynamics" is simply an adjective to "Fluid Dynamics". Hence, while dealing with aspects of CFD tool or process, it is vitally important to keep the physical understanding of fluid dynamics uppermost in user's mind as CFD has to do with physical problems. -- Adapted from John D. Anderson, Jr (Computational Fluid Dynamics - The Basics with Applications).

Any numerical simulation process is not just "Meshing, setting Boundary Conditions, Running Solver and Making Colourful Contour / Vector Plots". The results ultimately needs to be converted into a set of inputs for a robust design of the component of system. The sound knowledge of "underlying fluid mechanics principles and operating conditions of the problem set-up" are more important than just knowing how to use the software. Some of the requirements which will help a "CFD practitioners" take correct design decisions based on CFD results are:

  1. Basic of Fluid Mechanics such as Bernoulli's Equation and actual physics behind this principle
  2. Fluid Mass Conservation and Momentum Conservation with underlying mathematics
  3. Shear stress formulation on fluid flow, Empirical Calculations, Experimental Data
  4. Flow behaviour such as Developing Flow, Developed Flow, No Slip Condition, Separation and Re-attachment
  5. Complete theoretical and experimental behaviour of following flow conditions:
    • Flow inside a circular duct
    • Flow over a circular cylinder
    • Flow over a flat plate
    • Flow between two parallel plates
    • Natural Convection in an enclosed cavity

Though the industrial flow configurations are far from being closer to these simple geometries, the fundamental ideas contained in them are indispensable to a good understanding of modern computation methods. The methods and results arrived at are important not only for these simple flows but also for the extension of our fundamental knowledge of turbulent flows in general. Methods for dealing with turbulent flows for any industrial applications could be devised only on the basis of the detailed experimental results obtained for them.

For example, according to measurements performed by H. Kirsten, the entrance length of a turbulent flow in a pipe is about 50 to 100 diameters. This knowledge is very important in deciding the inlet boundary condition for any industrial internal flow configuration.

CFD: Computational or 'Colourful' Fluid Dynamics?

CFD is a great tool when used with appropriate procedure and guidelines because of its inherent nature of multi-disciplinary science leading to technically unlimited potential and applications. Yet, "CFD is not a panacea of all the Flow and Heat Transfer problems without experience-base insight". Any result must be looked at by an experienced engineer in that field and must go through an "order-of-magnitude-check" before accepting the results.

  • CFD simulations are capable of predicting good qualitative results (trends). It will not make decisions for design engineers but certainly help them take more informed judgment. When no information is available about flow structure in a system, CFD is certainly an economical start into detail analysis of the performance of the system.
  • Even inaccurate CFD results, so long it is ensured mathematically physical, possesses many features which make it very useful:
    • The sheer capability of detailed visualization is rich in information.
    • CFD results give an insight which is not possible by experiments and other theoretical means.
    • Trends are usually reliable and leads to right direction in terms of design evaluations.
  • In many cases, quantitative information is predicted with sufficient accuracy to justify engineering design changes on commercial plant. CFD can even predict more useful information than testing because the measurement point (typically based on user experience) may not be at appropriate location.
  • Historical knowledge obtained from plant operation is a great validation tool for such numerical (or virtual) simulation results.
  • Notwithstanding the limitations mentioned above, CFD models drastically reduce implementation of "Design Modifications and Scale-up of a System"
  • CFD can be also used early in the design stage for performance evaluation, for optimization and enhancement during the development stage and for diagnostics in the later stage of the produce development cycle.
Excerts from H. Schilchting

All methods for the calculation of turbulent boundary layers are approximate ones and are based on the integral forms of the momentum and energy equations. Since, however, no general expressions for shear and dissipation in turbulent flow can be deduced by purely theoretical considerations, it is necessary to make additional suitable assumptions. These can only be obtained from the results of systematic measurements and, consequently, the calculation of turbulent boundary layers is semi-empirical.

While the usage of CFD simulations in industry is on rise at rapid pace, the credibility of results of any such calculation is still an area of concern. Most organizations using such codes, over time have evolved their own best practice guidelines to minimize the chances of "critical errors". There are many such guidelines issued by ERCOFTAC and AIAA. Following diagram summarizes classifications used to designate the types of error which needs to be addressed when CFD simulations are used to make design decisions beyond extant know-how of the company.

CFD, cfdyna.com

Sources of Errors

When a numerical model ia created to get a solution,a 'model' is created and not a exact copy or a 'replica'!  That is, there is an inevitable deviation "between the real flow and the model" and "between numerical solution of governing PDEs and the exact solution" of the model. As per AIAA:

Error: A recognisable deficiency that is not due to lack of knowledge. For example, common known errors are the round-off errors in a computers and the convergence error in an iterative numerical scheme. CFD analyst should be capable of estimating the likely magnitude of the error. It may also arise due to mistakes in input (such as material property variation with temperature).

Uncertainty: A potential deficiency that is due to lack of knowledge. Uncertainties arise because of incomplete knowledge of a physical characteristic, such as the turbulence structure at inlet to a flow domain or because there is uncertainty in the validity of a particular flow model being used. Uncertainty cannot be removed as it is rooted in lack of knowledge (wither physics of the flow or the behaviour of numerical codes).

Verification: It is the procedure intended to ensure that the program solves the equations correctly. As per AIAA, G-077-1998: the process of determining if a simulation accurately represents the conceptual model. A verified simulation does not make any claim relating to the representation of the real world by the simulation. In other words: "it solves the equation right"

Validation: This procedure is intended to test the extent to which the model accurately represents reality. As per AIAA, G-077-1998: it is the process of determining how accurately a simulation represents the real world. In other words: "it solves the right equations"

Accuracy: This is the measure of the similarity of a simulation to the physical flow it is expected to represent.

Calibration: This procedure to assess the ability of a CFD code to predict global quantities of interest for specific geometries of engineering design interest.

Types of errors

  1. Numerical Errors / Discretization Error: It is difference between "exact solution of the conservation equations" and the "exact solution of the algebraic set of discretized equations". Due to discretization of curved or circular edges (tessellated boundaries), the area is reduced as compared to the curved boundaries. If a velocity boundary condition is being used, it needs to be scaled up in the ratio of reduction in area. Remedy: Grid Convergence Study
  2. Modeling Errors: Defined as the difference between the actual flow and the exact solution of the mathematical model. This error arises due to: assumptions made in deriving the transport equation, simplification of the geometry of the solution domain. Remedy: These errors are not known a priori, they can only be evaluated by comparing solutions in which the discretization and convergence errors are negligible with accurate experimental data
  3. Iteration Errors: It is difference between 'iterative' and 'exact solution' of discretized algebraic equation. Remedy: Exploiting the solver control parameters to get a convergence for different levels of residual such as 1E-03, 1E-04, 1E-05
  4. User Error and Application Uncertainties: Wrong selection of turbulence model, insufficient Information about BC setting, poor quality grid generation and boundary layer resolution. Remedy: These can be minimized through experience, Best Practice Guidelines (BPG) and optimization of resources. For example, the mesh of a circular cross-section seems to capture the circumference well. However, a closer look reveals that cross-section area of discretized face is lower than that of a circle.

    O-grid Circle

    Chordal Deviation

    Thus, inlet velocity calculated based on known mass flow rate and area of a circle needs to be adjusted to account for reduction in actual area of the meshed surface.

Steps to check and increase accuracy of CFD results

  • Step-01: use of monitor points - use monitor points relevant to the simulation physics to check if simulation is proceeding "as expected". The term "as expected" has been to emphasize the fact that one should always have some idea what he is expecting from a CFD simulation!
  • Step-02: compatibility of wall function and area-averaged y+ value - each type of wall function developed has certain requirement on boundary layer resolutions. Ensure that the area-averaged values on all the walls fall in that range - area-averaged because it is not always possible to maintain the y+ in a certain range for every location of the walls.
  • Step-03: sensitivity to mesh size - you have chosen a particular mesh size on walls and in the fluid region based on some reference or past experience or even due to constraints on available hardware (machine RAM size and CPU speed). It is advisable to first check the effect of element sizes on a mesh coarser by two times the baseline mesh.

    MESH CONVERGENCE STUDY: The formal method of establishing mesh convergence requires a curve of a critical result parameter (typically some kind of coefficient such as skin friction coefficient) in a specific location, to be plotted against some measure of mesh density. At least three convergence runs will be required to plot a curve which can then be used to indicate how convergence is achieved or how far away the most refined mesh is from full convergence. However, if two runs of different mesh density give the same result, (mesh) convergence must already have been achieved and no mesh convergence curve is necessary.

    Define target variables (usually scalars like Force, Drag Coefficient, Heat Flux, HTC, MAX Temperature, etc). Check the variation in target variable (e.g. mass flow rate at any plane) for various refinements of mesh, keep ITERATION ERROR limit constant say 0.00001

  • Step-04: Effect of inlet boundary condition say effect of turbulence values at inlet - most of the time the turbulence value specified at inlet face is a guess, say tubulence viscosity ratio = 5 and turbulent intensity = 10. Do we know where these values have come from? Check if the results are affected with these values are doubled or halved. Ideal situation would be to have the turbulence level based on measurements but it is not always the case.

    In addition to the turbulence parameter, the inlet velocity profile itself is very important to study the accuracy of CFD result for a particular application. One should check the effect of velocity profile as per power-law such as u = UMEAN*(y/d)1/n, where n = 6, 7, 8, … depending upon Re value. These sensitivity studies are particularly important in cases where separation and reattachment are likely to occur. For Example, in case of a flow over Backward Facing Step, there is decreases in location of reattachment length as the turbulence intensity increases and is sensitive to TI value specified at inlet.

  • Step-05: effect of temperature dependent material properties - this is important espcially when the temperature gradients are 'large' or the change in pressure is such that it can lead to 'significant' change in density of gas. The value of 'large' and 'significant' used here changes across the applications, a value of 10% is considered to be 'significant'.
  • Step-06: extraction of quantitative values and interpretation of results - sometimes the way area-averaged or surface integrals are calculated, they need to be interpreted appropriately. For example, even in case of a constant area duct with water as incompressible constant property fluid, the change in static pressure between inlet and outlet will not be same as change in total pressure.
    • Why? As the area is same and fluid is incompressible, the expected changed in dynamic head (velocity pressure) is zero!
    • The explaination lies in the way area-averaged or mass-averaged dynamic head is calculated at outlet where flow is not uniform whereas the specified velocity field at inlet is uniform.

Best Practice Guidelines (BPG): A Quality Assurance Approach

There is no unique method or approach to CFD simulations universally applicable to all industries and all types of flow and heat trasfer problems. Hence, specific to applications and industry, best practice guidelines have been evoloved by the users as well as the software vendors. These guidelines are also called "quality assurance method" becuase they remove user-dependecies and make the simulation deterministic to large extent.

What equations are used by programs?

An understanding of how the program evaluates quantitative information such as wall shear stress, heat flux, heat transfer coefficient...is also important to identify the source of error. The wall shear stress is strongly dependent on the turbulence modeling and wall functions used. The information related to tubulence modeling can be access on the this page.

Heat flux and surface heat transfer coefficient is one of the critical output from a thermal simulation. Understanding of the temperature field near the wall and how its gradient is used to calculate the heat transfer rate is important to identify source of errors. Heat transfer at walls is a combination of "heat diffusion due to conduction" and "heat diffusion due to mixing or convection". This is expressed as described below. Here, T is 'local' time-averaged value. α is thermal diffusivity defined as k/ρCp, εh is eddy diffusivity of heat - analogous to eddy diffusivity of momentum.

Heat Flux calculation

Prt = εmh is the turbulent Prandtl number defined as ratio of eddy diffusivity of momentum and eddy diffusivity of heat. Note that ε here is eddy diffusivity and not the turbulent eddy dissipation rate. Analogous to wall function for momentum, the wall function (available in textbooks) for temperature is described below and the equation used to calculate heat flux is also explained.

  Wall functions for temperature

The wall function definition used in ANSYS CFX is:

  Wall functions for temperature in CFX

In ANSYS FLUENT, the laws-of-the-wall for mean velocity and temperature are based on the wall unit y* rather than y+. The definition of y* uses u* instead of u+ where y* = ρCμ1/4k1/2y/μ and u* = ρCμ1/4k1/2W. These two quantities are approximately equal in equilibrium turbulent boundary layers. κ is von Karman constant in the equation given below.

  Wall functions for temperature - FLUENT

The steps followed in calculation of temperature or heat flux are as follows:

Step-1: Molecular Prandtl number is calculated based on specified fluid properties: Pr = μ / Cp / k where k is thermal conductivity (not turbulent kinetic energy though k used in law of wall for temperature above is TKE)


Step-2: For the calculated molecular Prandtl number, thermal sub-layer thickness is estimated which is nothing but the intersection of the linear and logarithmic profiles


Step-3: Depending upon (momentum) boundary layer height, y* is calculated at the centroid of the near wall cell. As mentioned above, in FLUENT, the laws-of-the-wall for mean velocity and temperature are based on the wall unit y* rather than y+.


Step-4: Once y* is calculated, velocity at the centroid of the near wall cell is calculated as per law-of-wall for velocity. Thus, Pr, y* and u(yP) are calculated and stored now. Temperaure at near wall cell is, T(yP) still not known.


Step-5: T(yP) is known by solution of of energy equations in the interior domain. For specified wall temperature boundary condition, heat flux is calculated from the linear equation arising from the law-of-the-wall.

Wall functions for temperature - heat flux calculation

Contact us
Disclaimers and Policies

The content on CFDyna.com is being constantly refined and improvised with on-the-job experience, testing, and training. Examples might be simplified to improve insight into the physics and basic understanding. Linked pages, articles, references, and examples are constantly reviewed to reduce errors, but we cannot warrant full correctness of all content.