• No results found

ercoftac_best_practice_guide.pdf

N/A
N/A
Protected

Academic year: 2021

Share "ercoftac_best_practice_guide.pdf"

Copied!
94
0
0

Loading.... (view fulltext now)

Full text

(1)ERCOFTAC Special Interest Group on “Quality and Trust in Industrial CFD”. Best Practice Guidelines. Editors: Michael Casey and Torsten Wintergerste Fluid Dynamics Laboratory Sulzer Innotec [email protected] [email protected]. Version 1: January 2000. © ERCOFTAC 2000. page 1 of 94.

(2) © ERCOFTAC 2000. page 2 of 94.

(3) CONTENTS 1. 1.1. 1.2. 1.3. 1.4. 1.5. 2. 2.1. 2.2. 2.3. 2.4. 2.5. 3. 3.1. 3.2. 3.3. 3.4. 3.5. 3.6. 3.7. 3.8. 4. 4.1. 4.2. 4.3. 4.4. 4.5. 4.6. 4.7. 5. 5.1. 5.2. 5.3. 5.4. 5.5. 6. 6.1. 6.2.. INTRODUCTION PURPOSES OF THIS DOCUMENT SCOPE BACKGROUND TO THE PROBLEMS OF CFD BACKGROUND TO THIS DOCUMENT STRUCTURE OF THIS DOCUMENT SOURCE OF ERRORS AND UNCERTAINTIES IN CFD SIMULATIONS OVERVIEW OF CFD SIMULATIONS IMPORTANCE OF ERRORS AND UNCERTAINTIES IN ENGINEERING APPLICATIONS ERRORS AND UNCERTAINTIES CATEGORISATION OF ERRORS AND UNCERTAINTIES DEFINITIONS OF VERIFICATION, VALIDATION AND CALIBRATION NUMERICAL ERRORS, CONVERGENCE AND ROUND-OFF ERRORS GLOBAL SOLUTION ALGORITHM CONVERGENCE ERRORS ROUND-OFF ERRORS GRIDS AND GRID DESIGN SPATIAL DISCRETISATION ERRORS TEMPORAL DISCRETISATION ERRORS FOR TIME-DEPENDENT SIMULATIONS TYPES OF IMPLEMENTATION OF BOUNDARY CONDITIONS SPECIAL REMARKS ON THE FINITE-ELEMENT METHOD TURBULENCE MODELLING RANS EQUATIONS AND TURBULENCE MODELS CLASSES OF TURBULENCE MODELS NEAR-WALL MODELLING WEAKNESSES OF THE STANDARD K-ε MODEL WITH WALL FUNCTIONS INFLOW BOUNDARY CONDITIONS UNSTEADY FLOWS LAMINAR AND TRANSITIONAL FLOWS APPLICATION UNCERTAINTIES GEOMETRICAL UNCERTAINTIES BOUNDARY CONDITIONS INITIAL CONDITION AND INITIAL GUESS UNCERTAINTIES WITH REGARD TO STEADY FLOW, SYMMETRY, AND PERIODICITY PHYSICAL PROPERTIES USER ERRORS GENERAL COMMENTS CONTROL OF THE WORKING PROCESS. © ERCOFTAC 2000. 5 5 5 5 6 6 8 8 8 9 9 10 11 11 12 13 14 16 17 18 19 20 20 21 24 27 28 28 28 29 29 29 31 32 32 33 33 33 page 3 of 94.

(4) 6.3. 7.. TRAINING REQUIREMENTS FOR CFD USERS CODE ERRORS. 7.1. 7.2. 8.. 37 37. VALIDATION AND SENSITIVITY TESTS OF CFD MODELS. 39. SELECTION OF TEST CASES FOR VALIDATION DESIGN AND USE OF SENSITIVITY TESTS. 39 40. EXAMPLES OF APPLICATION OF BEST PRACTICE GUIDELINES. 9.1. 9.2. 9.3. 9.4. 9.5. 9.6. 9.7. 9.8. 9.9. 10.. 41. INTRODUCTION TO THE TEST CASES TEST CASE A : 2-D TRANSIENT SCALAR BUBBLE CONVECTING AT 45 DEGREES TEST CASE B : T-JUNCTION BETWEEN MAIN AND AUXILIARY PIPE TEST CASE C : NATURAL CONVECTION FLOW IN A SQUARE CAVITY TEST CASE D : SUDDEN PIPE EXPANSION TEST CASE E : TRANSONIC AIRFOIL RAE2822 TEST CASE F : ENGINE VALVE TEST CASE G : LOW SPEED CENTRIFUGAL COMPRESSOR (LSCC) TEST CASE H : TURBULENT FLOW IN A MODEL OUTLET PLENUM. 41 41 43 47 51 56 59 65 71. SUGGESTIONS AND NEED FOR FURTHER WORK. 10.1. 10.2. 10.3. 11.. 37. GUIDELINES FOR THE CODE DEVELOPER AND VENDOR GUIDELINES FOR THE CODE USER. 8.1. 8.2. 9.. 35. 77. REVISION OF BEST PRACTICE GUIDELINES EXTENSION OF THE BEST PRACTICE GUIDELINES APPLICATION PROCEDURES. 77 77 77. CHECKLIST OF BEST PRACTICE ADVICE FOR INDUSTRIAL CFD. 11.1. 11.2. 11.3. 11.4. 11.5. 11.6. 11.7. 11.8. 11.9. 11.10. 11.11. 11.12. 11.13. 11.14.. 78. GUIDELINES ON THE TRAINING OF CFD USERS GUIDELINES ON PROBLEM DEFINITION GUIDELINES ON SOLUTION STRATEGY GUIDELINES ON GLOBAL SOLUTION ALGORITHM GUIDELINES ON VALIDATION OF MODELS GUIDELINES ON TURBULENCE MODELLING GUIDELINES ON DEFINITION OF GEOMETRY GUIDELINES ON GRIDS AND GRID DESIGN GUIDELINES ON BOUNDARY CONDITIONS GUIDELINES ON THE SOLUTION OF DISCRETISED EQUATIONS USING A CFD CODE GUIDELINES ON ASSESSMENT OF ERRORS GUIDELINES ON INTERPRETATION GUIDELINES ON DOCUMENTATION GUIDELINES ON COMMUNICATION WITH CODE DEVELOPER. 78 78 78 79 79 80 82 82 83 86 88 89 89 89. 12.. ACKNOWLEDGEMENTS. 91. 13.. REFERENCES. 92. © ERCOFTAC 2000. page 4 of 94.

(5) 1. Introduction 1.1. Purposes of this document This document is intended as a practical guide giving best practice advice for achieving high-quality industrial Computational Fluid Dynamics (CFD) simulations using the Reynolds-averaged NavierStokes (RANS) equations. The advice given is primarily aimed at less experienced CFD users and is summarised as a checklist in chapter 11. The summary of best practice advice is also considered to be relevant for managers of scientific and engineering projects involving CFD simulations and for inspectors in regulatory bodies who have to examine submissions involving CFD simulations. It will also assist experienced CFD users, especially if they are moving to a new application area. The document also provides a useful compendium of relevant information on the most important issues relevant to the credibility of CFD simulations, especially with regard to the most common sources of errors and uncertainties in CFD. For each aspect considered, simple statements of advice are given which provide clear and generally accepted guidance for the user of CFD in industrial applications. The statements are understandable without elaborate mathematics, and are generally preceded by a short section providing a discussion of the issues involved, with references to texts where more detailed discussion of the issues may be found. A basic level of scientific or engineering knowledge is expected of the reader, and in particular some elementary knowledge of fluid dynamics and numerical methods is assumed (such as may be attained by reading one of the general texts given in the list of references in chapter 13).. 1.2. Scope These guidelines cannot hope to be exhaustive. They have been written and edited making use of extensive consultation with CFD code vendors, code developers, academic experts and code users and this gives the guidelines wide support. It is intended that they offer roughly those 20% of the most important general rules of advice that cover roughly 80% of the problems likely to be encountered. The document is not part of a formal quality assurance (QA) management system but it nevertheless addresses most of the issues that a formal QA system for CFD simulations would need to include. Users who follow the advice given can be expected to avoid the most common pitfalls in CFD simulations. The technical content of the guidelines is limited to single-phase, compressible and incompressible, steady and unsteady, turbulent and laminar flow with and without heat transfer. The guidelines do not cover combustion, two-phase flows, flows with radiation, non-Newtonian flows, supersonic and hypersonic flows with strong shocks and many other more complex flow situations. The guidance given is relevant to many mechanical, aeronautical, automotive, power, environmental, medical and process engineering applications. More detailed guidelines and application procedures are needed for the remaining specific problems and to extend these guidelines to more complex flows (see chapter 10).. 1.3. Background to the problems of CFD Over the last ten years CFD using the RANS equations has become a standard industrial simulation tool for the design, analysis, performance determination and investigation of engineering systems involving fluid flows. This development has been driven by the ready availability of robust in-house and commercial CFD software and by the massive increase in affordable computer speed and memory capacity, leading to a steady reduction in the costs of simulations compared to prototype and model experiments. Relatively few new technical developments in fluid flow modelling for industrial applications, in particular for turbulence modelling, have been made in this period. The fundamental problem of CFD simulations lies in the prediction of the effects of turbulence, which, using the words of Lamb [1895] of more than a hundred years ago, still remains “the main outstanding difficulty of our subject”. At a scientific level, turbulence is one of the great unsolved problems of nonlinear computational physics. To simulate turbulence directly by Direct Numerical Simulation (DNS) one needs to be able to capture the time and length scales of all the characteristic structures of the flow, from the energy-carrying large scales to the small dissipative scales. As these vary by several orders of magnitude, a typical spatial scale of 10-5 to 10-6 of the size of the computational domain in each co-ordinate direction has to be resolved. For engineering problems this is beyond the capacity of present or foreseeable computers, needing an increase of at least several orders of magnitude in computing power before it can become a general tool. Even on the largest possible computers, DNS © ERCOFTAC 2000. page 5 of 94.

(6) will remain a research tool for simple geometries at low Reynolds number for at least the next decade and probably longer. Large Eddy Simulation (LES), in which the large turbulent vortices are captured by the computational grid and the fine-scale turbulent motions are modelled by a so-called sub-grid model, is less intensive in computational resources and closer to engineering application. This is still unlikely to become a common engineering tool during the next ten years except, perhaps, for bluff body flows with low-frequency and large-scale oscillations (for example, external flows around buildings). In both academic and industrial circles there is little doubt that CFD on the basis of the RANS equations with a suitable turbulence model will form the basis of most engineering calculations for many years to come. Even when LES or DNS become practical, RANS solutions will still be used for the initial design explorations, just as simpler tools are used in design today, so that a way to deal with uncertainty arising from the turbulence modelling will still be needed. In addition to the physical difficulties of modelling the effects of turbulence, there are many other sources of error in CFD simulations (see chapter 2). A major issue is the accuracy of the numerical discretisation in CFD simulations on grids that are not good enough to produce grid independent solutions and this has led to extensive discussion of the credibility of many CFD simulations. The difficulties are amply demonstrated by the many CFD validation exercises involving blind test cases, where only sufficient information is made available to the participants to allow a CFD model to be set up and run, but the full test results are not available. The results of such exercises can be highly userdependent even when the same CFD software with the same models is being used. Recent examples are the ASME blind test case of the transonic compressor rotor NASA Rotor 37 (Strazisar and Denton [1995]), the EU-funded EMU Project on modelling of atmospheric dispersion near buildings (Hall and Cowan [1998]) and the ERCOFTAC workshop on draft tube flows (ERCOFTAC/IAHR [1999]). The greatest benefit arising from such validation exercises has often been to identify the many causes for differences in simulation results for what is nominally the same calculation, and to give insight into the range of results obtainable. One of the major causes of this problem is that for complex geometries in many industrial applications, the practical constraints on memory capacity and computer power lead to results that are not grid independent. The question naturally arises as to what are the best procedures to ensure that the results of a CFD simulation are accurate and credible. There are currently no standard best practice guidelines that can be used to achieve and to confirm that the best possible numerical accuracy has been achieved. There is an urgent need for such a code of best practice from the knowledge currently available to experienced industrial CFD users, code developers and academic experts to overcome this shortcoming.. 1.4. Background to this document The newly-formed ERCOFTAC Special Interest Group (SIG) on “Quality and Trust in Industrial CFD” has identified that the production of best practice guidelines would be of great value to many of its members. With funding obtained from its members, it has commissioned the Fluid Dynamics Laboratory of Sulzer Innotec to organise the writing and editing of the ERCOFTAC Best Practice Guidelines. The work has been fully supported by CFD users in many industrial companies, by academic experts and by many CFD code developers and code vendors (see acknowledgements in chapter 12). Following a survey of users to identify their needs, an initial version of the Best Practice Guidelines was produced by the Fluid Dynamics Laboratory of Sulzer Innotec during May 1999. The initial version was then reviewed and criticised by an invited panel of CFD experts at a workshop held in Zurich, Switzerland on 21 and 22 June 1999. Following the workshop an interim version was produced during July 1999. This was circulated in August 1999 to participants of the workshop and to members of the ERCOFTAC SIG on “Quality and Trust in Industrial CFD” for further editing. Following the feedback on this, a draft of the final version was prepared for the ERCOFTAC SIG meeting on October 27 1999 in Florence, Italy. Discussion of this with academic reviewers led to changes in chapter 4 of the final version of January 2000.. 1.5. Structure of this document The following structure has been adopted for the ERCOFTAC Best Practice Guidelines. Chapter 2 gives a general view of CFD, and provides a categorisation and description of the types of errors and. © ERCOFTAC 2000. page 6 of 94.

(7) uncertainties that can arise. This includes some definitions of terms, such as validation, verification, calibration, error and uncertainty. In the chapters 3 to 7 that follow, each of the different sources of error and uncertainty are examined and discussed and some guidelines on their effect and elimination are given. In view of the fact that the validation of models and the use of sensitivity tests are commonly accepted ways of dealing with some of the problems, an additional chapter on these issues has been added in chapter 8. The sections in the individual chapters overlap to a certain extent as similar issues often arise under different headings. Examples of the issues arising in the best practice guidelines as applied to some specific test cases are given in chapter 9. Suggestions for the revision and extension of the guidelines are given in chapter 10. A summary of the most important guidelines in the form of a checklist is provided as chapter 11, whereby this is an edited version of the guidelines in the earlier chapters organised roughly in the chronological order of the activities needed during a typical CFD simulation. Acknowledgements are given in chapter 12 and references in chapter 13.. © ERCOFTAC 2000. page 7 of 94.

(8) 2. Source of errors and uncertainties in CFD simulations 2.1. Overview of CFD simulations CFD makes use of computer simulation to obtain an approximate solution to the governing equations of fluid flow. The solution is always approximate because only discretised versions of the continuum transport equations for fluid flow and energy transfer can be solved numerically. Moreover, in turbulent flows, the effects of turbulence cannot be represented in a mathematically accurate sense, but are modelled by approximate theories. Because it is not exact, CFD is used together with more traditional techniques, such as flow measurement or analytical methods, for the investigation of fluid flows. A typical CFD calculation can be broken down into a number of important steps and activities, such as: •. Training of CFD users.. •. Problem definition.. •. Selection of solution strategy.. •. Choice of numerical procedure.. •. Validation of models.. •. Selection of turbulence model.. •. Definition of geometry.. •. Generation of computational grid.. •. Definition of boundary conditions and physical properties.. •. Definition of initial guess or initial condition in unsteady flows.. •. Solution of numerical equations.. •. Assessment of errors and solution accuracy.. •. Post-processing and visualisation of simulation results.. •. Analysis and interpretation of simulation results.. •. Documentation and archiving of results.. •. Communications with the code developer.. Errors and uncertainty can arise in almost all of these steps and these are discussed in the sections below.. 2.2. Importance of errors and uncertainties in engineering applications The requirement on the accuracy of a simulation depends to a large extent on the purpose of the analysis, and can vary from the need to know in which direction the flow is most likely to move, to accurate performance estimations for complex machines. Engineering flows are generally analysed with a view to identifying weak features of a design so that a component may be improved to provide economic gains from better product competitiveness and functionality. Even an inaccurate simulation can be of use in an engineering design, provided that the error bounds on the predicted parameter can be defined. For example, if the calculations show that the upper limit of a numerical quantity is far below an appropriate reference level of concern, then engineering decisions may be safely made. In the absence of quantitative accuracy the engineer often tends to examine the predicted flow-field in qualitative terms to assess global flow structures and trends (for example, incidence of flow onto blading, presence and extent of flow separations, existence of strong secondary flows, etc.). The details of the complex flow-fields provided by CFD, even when not perfectly accurate, are in this way an important source of insight into design improvements and also into the design of experiments and the most appropriate location of any instrumentation.. © ERCOFTAC 2000. page 8 of 94.

(9) Unfortunately, there are no standard ways of defining the error bounds on a CFD simulation. Nevertheless the CFD analyst should in the documentation of the results try to comment on the expected accuracy of the simulations.. 2.3. Errors and uncertainties The deficiencies or inaccuracies of CFD simulations can be related to a wide variety of errors and uncertainties. The recent publication of the AIAA Guide for the Verification and Validation of Computational Fluid Dynamics Simulations, (AIAA [1998]), provides useful definitions of error and uncertainty in CFD along the following lines: Error:. A recognisable deficiency that is not due to lack of knowledge.. Uncertainty:. A potential deficiency that is due to lack of knowledge.. These rather philosophical definitions can be made clearer by examples. Typical known errors are the round-off errors in a digital computer and the convergence error in an iterative numerical scheme. In these cases, the CFD analyst has a reasonable chance of estimating the likely magnitude of the error. Unacknowledged errors include mistakes and blunders, either in the input data or in the implementation of the code itself, and there are no methods to estimate their magnitude. Uncertainties arise because of incomplete knowledge of a physical characteristic, such as the turbulence structure at the inlet to a flow domain or because there is uncertainty in the validity of a particular flow model being used. An error is something that can be removed with appropriate care, effort and resources, whereas an uncertainty cannot be removed as it is rooted in lack of knowledge.. 2.4. Categorisation of errors and uncertainties The structure of this guideline makes use of a simple categorisation of errors and uncertainties given in a lecture by Ferreira and Scheuerer [1997] at the first European meeting of the ERCOFTAC SIG on “Quality and Trust in Industrial CFD” in Paris. Ferreira and Scheuerer suggested some clear and logical distinctions between types of errors occurring in a CFD computation, which with slight modification for the present purposes, are explained in the sections below and form the basis for the main chapters of this document.. 2.4.1. Model uncertainty These are the uncertainties due to the difference between the real flow and the exact solution of the model equations. This includes errors due to the fact that the exact governing flow equations are not solved but are replaced with a simplified model of reality. The most well-publicised errors in this category are the errors from turbulence modelling, but other model errors may occur. Examples would be the simplification of an equation of state of a real gas to that of an ideal gas, the assumption of incompressible flow when compressibility effects and strong heat transfer occur, the neglect of nonNewtonian viscous effects, or the simplification of a complex combustion process to a few simple equations. In short, the model errors and uncertainties can be described as the uncertainties which arise because we are in fact solving the wrong equations.. 2.4.2. Discretisation or numerical error These errors arise due to the difference between the exact solution of the modelled equations and a numerical solution with a limited resolution in time and space. For consistent discretisation schemes, the greater the number of grid cells, the closer the results will be to the exact solution of the modelled equations, but both the fineness and the distribution of the grid points affect the result. This type of error arises in all numerical methods and is related to the approximation of a continually varying parameter in space by some polynomial function for the variation across a grid cell. In first order schemes, for example, the parameter is taken as constant across a certain region. In short, discretisation errors arise because we do not find an exact solution to the equations we are trying to solve, but numerical approximations to them.. 2.4.3. Iteration or convergence error These errors occur due to the difference between a fully converged solution on a finite number of grid points and a solution that is not fully converged. The equations solved by CFD methods are usually iterative, and starting from an initial approximation to the flow solution, iterate to a final result. This. © ERCOFTAC 2000. page 9 of 94.

(10) should ideally satisfy the imposed boundary conditions and the equations in each grid cell and globally over the whole domain, but if the iterative process is incomplete then errors arise. In short, convergence errors arise because we are impatient or short of time or the numerical methods are inadequate and do not allow the solution algorithm to complete its progress to the final converged solution.. 2.4.4. Round-off errors Round-off errors are due to the fact that the difference between two values of a parameter is below the machine accuracy of the computer. This is caused by the limited number of computer digits available for storage of a given physical value.. 2.4.5. Application uncertainties Inaccuracy is also introduced because the application is complex and precise data needed for the simulation is not always available. Examples of this are uncertainties in the precise geometry, uncertain data or models that need to be specified as boundary conditions (such as turbulence properties at an inlet or a tabulated equation of state) and uncertainties as to whether the flow is likely to be steady or unsteady.. 2.4.6. User errors Many errors also arise from mistakes and carelessness of the user. Such errors generally decrease with increasing experience of the user, but in the nature of things cannot be completely eliminated as “to err is human”. This error is often described by the popular jibe “garbage in, garbage out”. Sometimes, however, garbage in does not lead to (terrible) garbage out because a genuine user error does not always have a significant effect on the results.. 2.4.7. Code errors Errors also occur due to bugs in the software, unintended programming errors in the implementation of models or compiler errors on the computer hardware being used. Such errors are often difficult to find, as CFD software is highly complex, typically involving hundreds of thousands of lines of code for a commercial product. Computers are very unforgiving. Even a relatively simple typing error that might easily be overlooked on this page, such as an “i” for a “j” in a single word, can have disastrous consequences when incorporated into a line of code.. 2.5. Definitions of verification, validation and calibration In discussions of CFD errors and uncertainties it is useful to make some clear distinctions between the meaning of the terms validation, verification and calibration. The definitions used in these guidelines follow closely the similar definitions given in the AIAA guide [1998], Roache [1998], Rizzi and Vos [1998] and Fisher and Rhodes [1996]: Verification:. Procedure to ensure that the program solves the equations correctly.. Validation:. Procedure to test the extent to which the model accurately represents reality.. Calibration:. Procedure to assess the ability of a CFD code to predict global quantities of interest for specific geometries of engineering design interest.. Calibration is sometimes also used to describe the process of adjusting the values of the coefficients of a turbulence model to provide better agreement with experimental data, but this is not its meaning in this document. In many industrial engineering cases, the distinction between validation and calibration becomes blurred.. © ERCOFTAC 2000. page 10 of 94.

(11) 3. Numerical errors, convergence and round-off errors The physical problem being solved by an analysis of the fluid flow can be mathematically described by the equations for conservation of mass, momentum and energy. These partial differential equations (PDEs) are based on the assumption that the fluid can be described as a continuous medium. The techniques used to solve the problem replace the PDEs by a set of algebraic equations by breaking down the physical domain into a large number of discrete control volumes, called elements or cells. Within these cells algebraic relationships describe how the flow variables, such as velocity, temperature or pressure, vary locally with the space co-ordinates. For instance, a quadratic variation across a cell results in a formally third order scheme, linear variation in a second order scheme and constant behaviour in a first order scheme, at least on regular Cartesian grids. The order indicates up to which term of a Taylor expansion series the discretised system of equations is consistent with the original set of PDEs. How the basic volume elements are defined mathematically is particular to the numerical method chosen. Examples of such methods are the finite-difference, finite-volume or finite-element methods, each of which has its own specific advantages and disadvantages. The discretisation in time follows a similar scheme to that in space but respects the fact that time exhibits a clearly distinct forward direction. Discretisation is probably the most crucial source of error for the accuracy of numerical fluid flow simulations and needs to be carefully analysed by the user of CFD-codes. However, other sources of error may be related to the method used to calculate the fluxes at the cell boundaries and to solve the resulting system of linear equations. As the numerical procedures are iterative the question of convergence needs additional attention.. 3.1. Global solution algorithm The discretised set of equations can be obtained with various solution procedures which include both pressure-based and density-based methods (for a review, see Ferziger and Peric [1972], Fletcher [1991], Patankar [1980] or Hirsch [1991]). The solution algorithms make use of numerous tuning parameters, such as artificial time-steps, under-relaxation, etc., to improve the convergence behaviour and robustness of the code. The field of application of a code and the modelling technique included influence the choice of the numerical method and the solution procedure. For example, computation of highly compressible supersonic and hypersonic flow fields often requires the use of a different solution technique than that used for an incompressible flow simulation. In principle, the solution of a well converged simulation is independent of the numerical method and the solution algorithm chosen, provided the grid is fine enough.. 3.1.1. Guidelines on global solution algorithm Check the adequacy of the solution procedure with respect to the physical properties of the flow by reference to the code user manual, for instance compressible or incompressible flow. ¾ As a first step in the simulation process, use the parameters that control convergence of the solution algorithm (e.g. relaxation parameters, damping factors or time steps) as suggested by the CFD-code vendor or developer. ¾ If it is necessary to change these parameters to aid convergence, do not change too many parameters in one step, as it then becomes difficult to analyse which of the changes have influenced the convergence. In case of persistent divergence check the advice given in the sections on boundary conditions, grid discretisation and convergence errors, before changing the solution algorithm. ¾ If a steady solution has been computed and there is reason to be unsure that the flow really is steady, then carry out an unsteady simulation with the available steady flow field as the initial condition, preferably with a small perturbation imposed. Examination of the time-development of the physical quantities in the locations of interest will identify whether the flow is steady or not.. ¾. © ERCOFTAC 2000. page 11 of 94.

(12) 3.2. Convergence errors Iterative algorithms are used both for steady state solution methods and for procedures to obtain an accurate intermediate solution at a given time step in transient methods. Progressively better estimates of the solution are generated as the iteration count proceeds. There is no convergence theory for the solution of the discrete RANS equations. Hence convergence cannot be enforced by theoretical means, but is based on empirical criteria. Driving all the residuals in all equations plus the residuals of the integral balances down to machine accuracy is the most generally accepted convergence criterion. This level of convergence is an ideal that, for practical reasons related to time constraints, is not used for most engineering computations. Instead the level of convergence is most commonly evaluated based on average values of the residuals as described below. However, some methods measure the normalised change in variable values between successive iterations, or on values of globally integrated parameters, such as lift coefficient or heat transfer coefficient, or on time/iteration signals of a physical quantity at a monitor point, which is located at a suitably chosen location in the flow domain. In some situations the iterative procedure will not converge, but either diverges or remains at a fixed and unacceptable level of error, or oscillates between alternative solutions. Careful selection and optimisation of control parameters (such as damping factors, relaxation factors, or time-steps) may be needed in these cases to ensure that a converged solution can be found wherever possible. A procedure which proved successful for one class of problems may not be successful for a different problem.. 3.2.1. Residuals Residuals are 3D fields associated with a conservation law, such as conservation of mass or momentum. They indicate how far the present approximate solution is away from exact cancellation of flux balances in each cell. Usually, the residuals are normalised by dividing by a reference value times a reference flux. The reference value may be one of the following: •. Maximum value of the related conserved quantity.. •. Average value of the related conserved quantity.. •. Range (i.e. maximum minus minimum) value of related conserved quantity.. •. Inlet flow of the related conserved quantity.. The reference flux may be: •. The local central finite difference of finite volume coefficient. •. Inlet mass flow rate of a related quantity. Convergence is usually monitored on the basis of one representative number, a so-called norm (usually a p-norm) characterising the residual level in the three-dimensional flow field. This single value may be: •. The maximum of the absolute values (p=∞).. •. The sum of absolute values (p=1). •. The square root of the sum of squared values (P=2).. The large number of variants makes it difficult to give precise statements how to judge convergence and at which residual level a solution may be considered converged. In principle, a solution is converged if the level of round-off error is reached. Special care is needed in defining equivalent levels of convergence if different codes are used for comparison purpose.. 3.2.2. Guidelines on convergence Carefully define solution-sensitive target quantities for the integrated global parameters of interest and select an acceptable level of convergence based on the rate of change of these target parameters (such as heat load, mass flow, lift, drag, and moment forces on a body). Convergence of a simulation should not be assessed purely in terms of the achievement of a particular level of residual error. ¾ For each class of problem you are interested in, carry out a test of the effect of converging to different levels of residual on the integrated parameter of interest (this can be a single calculation. ¾. © ERCOFTAC 2000. page 12 of 94.

(13) ¾ ¾. ¾. ¾ ¾. ¾. that is stopped and restarted at different residual levels). This test demonstrates at what level of residual the parameter of interest can be considered to have converged and identifies the level of residual that should be aimed at in similar simulations of this class of problem. Be aware that different codes have different definitions of residuals. Always check the convergence on global balances (conservation of mass, momentum and energy) where possible, such as the mass flow balance at inlets and outlets and at intermediate planes within the flow domain. Check the maxima and minima of all variables which may be limited by the code (for example k and ε which should always be positive), and the number of cells where any limitation on values is active. Check not only the residual itself but also the rate of change of the residual with increasing iteration count. Monitor the solution in at least one selected point in a sensitive area to see if the region has reached convergence, but be aware that this alone is insufficient as a criterion for convergence as the solution may be "stuck" far from convergence but appear converged if solution variables are unchanging. For calculations that are proving difficult to converge, the following advice may be helpful: • • • • • • • • • •. ¾. Use more robust numerical schemes during the first (transient) period of convergence and switch to more accurate numerical schemes as the convergence improves. Reduce parameters controlling convergence, such as the under-relaxation parameters or the CFL1 number. If the solution is heavily under-relaxed, increase the relaxation factors at the end to see if the solution holds. Check whether the grid quality in areas with large residual has any effect on the convergence rate. Look at the residual distribution and associated flow field for possible hints, e.g. regions with large residuals or unrealistic velocity levels. When the residuals stagnate at too high a value, try to further converge the problem with a double precision version of the flow solver. Check whether switching from a steady-state to a time-accurate calculation has any effect. Consider using a different initial condition for the calculation. Check the numerical and physical suitability of the boundary conditions. Examine the choice of variable on which the residual is based, for example density may be a perfectly reasonable choice for transonic flow calculations, but is certainly not for low speed subsonic flows.. Guidelines and recommendations to the code developers: • • • •. CFD codes should make available the maximum possible information to judge convergence. This includes residuals for every conserved quantity. The residuals should be dimensionless and the definitions of the residuals should be clearly defined in the handbook. The codes should supply information on the spatial distribution of residuals. To avoid the confusion of CFD users, CFD code developers should try to adopt one commonly accepted standard definition of the residual.. 3.3. Round-off errors In situations where the small arithmetical differences between two large numbers become relevant, cancellation due to round-off may lead to severe errors. To avoid a negative influence of round-off errors, it is common practice to calculate pressure relative to a reference value. Some codes also use a residual form of the governing equations to combat round-off errors. Examples where round-off errors are known to be of significance are: •. Low Reynolds number turbulence models with large exponential terms.. 1. The CFL number is generally defined as CFL=∆t (v+a) / ∆x, where ∆t is the time step, ∆x the local cell size, v the local velocity and a the sonic velocity. For incompressible flows computed with an incompressible solver, the CFL number is defined by CFL=∆t v / ∆x. © ERCOFTAC 2000. page 13 of 94.

(14) • • • • • •. Flows with density driven buoyant forces with small density and temperature differences. High aspect ratio grids with large area ratios on different sides of the grid. Conjugate heat transfer. Calculations of scalar diffusion with low concentrations of one species. Low Mach number flows with a density based solver. Flows with large hydrostatic pressure gradients.. 3.3.1. Guidelines on round off errors Check the influence of round-off errors by performing the same calculation with a single precision and a double precision version of the flow solver, and compare target parameters. ¾ Always use the 64-bit representation of real numbers (double precision on common UNIX workstations), where possible. ¾ Developers are recommended to use the 64-bit representation of real numbers (REAL*8 in FORTRAN) as the default settings for their CFD code.. ¾. 3.4. Grids and grid design The computational grid represents the geometry of the region of interest. The computational domain needs to be discretised using grid cells that should provide an adequate resolution of the geometrical and expected flow features. Two approaches exist to capture the geometrical details of the domain: •. A regular (and structured) grid is created that is large enough to incorporate the complete geometry. Regions extending over the boundary are then cut away. This may result in two different ways of representing curved domain surfaces: • By a sequence of steps, whereby the elements close to the surface keep their regular shape. • By a sequence of flat facets, of which at least the two ends lie on the geometrical surface. The boundary elements then have an irregular shape.. •. Body-fitted grids where the cell surfaces follow a curved domain surface as a sequence of flat facets. The cells are designed to keep a regular shape. In structured meshes the grid lines follow the surface. This type is most frequently used.. In the case of body-fitted grids the interior of the domain must be built up to satisfy the geometrical constraints imposed by the domain boundary. Several kinds of mesh topology are available: •. Structured grid: The points of a block are addressed by a triple of indices (ijk). The connectivity is straight-forward because cells adjacent to a given face are identified by the indices. Cell edges form continuous mesh lines which start and end on opposite block faces. Cells have a hexahedral shape.. •. Unstructured grid: Meshes are allowed to be assembled cell by cell freely without considering continuity of mesh lines. Hence, the connectivity information for each cell face needs to be stored in a table. The most typical cell shape is the tetrahedron, but any other form including hexahedral cells is possible. These grids may or may not have matching cell-faces. Special cases of unstructured grids are: • Block structured grid: For the sake of flexibility the mesh is assembled from a number of structured blocks attached to each other. Attachments may be regular, i.e. cell faces of adjacent blocks match, or arbitrary (general attachment without matching cell faces). • Chimera grid: Structured mesh blocks are placed freely in the domain to fit the geometrical boundaries and to satisfy resolution requirements. Blocks may overlap, and instead of attachments at block boundaries information between different blocks is transferred in the overlapping region. • Hybrid grid: These grids combine different element types, i.e tetrahedra, hexahedra, prisms and pyramids.. The grids must be fine enough to provide an adequate resolution of the important flow features, as well as geometrical features. This may be achieved by local grid refinement. Unstructured meshes are especially well suited for this purpose. If block structured grids are used local refinement results in block attachments with dissimilar number of grid lines. Some CFD codes provide algorithms to adapt the grid resolution locally according to numerical criteria from the flow solution, such as gradient information or other error estimators.. © ERCOFTAC 2000. page 14 of 94.

(15) The accuracy of the simulation usually increases with increasing number of cells, i.e. with decreasing cell size. However, due to limitations imposed by the increased computer storage and run-time some compromise in mesh size is nearly always inevitable. In addition to grid density, the quality of a mesh depends on various criteria such as the shape of the cells (aspect ratio, skewness, warp angle or included angle of adjacent faces), distances of cell faces from boundaries or spatial distribution of cell sizes. The introduction of special topological features such as O-grids or C-grids and care taken to locate block-interfaces in a sensible manner can help to improve the overall quality of a block-structured mesh. Unstructured meshing techniques may take advantage of prism layers with structured sub-meshes close to domain boundaries.. 3.4.1. Guidelines on grids and grid design ¾. ¾. ¾. ¾. ¾. ¾. ¾. ¾. ¾. ¾. ¾ ¾. Choose a suitable global topology of the mesh (for example, a scalable grid topology where the grid can be refined by parametric changes without degrading the grid quality) to help satisfy the specific code's requirements with regard to skewness, aspect ratio and expansion ratios, as outlined below. Ensure that the extent of the computational domain has been chosen to capture relevant flow and geometrical features, and if necessary examine the sensitivity of the calculation to the choice of computational domain. Assess which geometrical features can be omitted, for example, those that have dimensions below that of the local grid size. In areas where local detail is needed, then consider the use of local grid refinement to capture fine geometrical details. If grid refinement is used the additional grid points should lie on the original geometry and not simply be a linear interpolation of more grid points on the original coarse grid. The use of distributed losses or porosity might also be considered to take into account highly obstructed zones or fine detail of some obstructions (for example, porous filters and packings), whereby the code manual should be consulted for the interpretation of the turbulent fields obtained. Avoid highly skewed cells. For hexahedral cells or prisms the included angles between the grid lines should be optimised in such a way that the angles are approximately 90 degrees. Angles with less than 40 or more than 140 degrees often show a deterioration in the results or lead to numerical instabilities. Tetrahedra should tend to have their four angles equal. Avoid highly warped cells, that is cells with large deviations from co-planar faces. Warp angles (measured between the surface normals of triangular parts of the faces) greater than 75 degrees can lead to serious convergence problems and deterioration in the results. Avoid non-orthogonal cells near boundaries. The angle between the grid lines and the boundary of the computational domain (the wall or the inlet and outlet boundaries) should be close to 90 degrees. This requirement is stronger than the requirement given for the grid angles in the flow field far away from the domain boundaries. Avoid the use of tetrahedral elements in boundary layers. Prismatic or hexahedral cells are to be preferred because of their regular shape and their ability to adjust in accordance with the near-wall turbulence model requirements. Avoid aspect ratios that are too high. Away from boundaries, ensure that the aspect ratio (the ratio of the sides of the elements) is not too large. This aspect ratio should be typically not larger than 20 to 100 (depending on the flow solver) in important regions of the flow domain but may be larger in non-critical regions, whereby precise values should be supplied in the code manual. The accuracy and possible convergence difficulties in such cases depends greatly on the flow direction. Near walls this restriction may be relaxed and indeed it can be beneficial to have high aspect ratio in the boundary layers. Observe any specific requirements on mesh expansion ratios. The specific code's requirements for cell mesh stretching or expansion ratios (rates of change of cell size for adjacent cells) should be observed. The change in mesh spacing should be continuous and mesh size discontinuities be avoided, particularly in regions of large changes. Note that some codes offer automatic grid adaptation techniques, but that depending on the software being used these might not improve the grid quality (skewness, aspect ratio). Use a finer and more regular mesh in critical regions with high flow gradients or with large changes, such as shocks, regions with high shear, regions with significant changes in geometry or. © ERCOFTAC 2000. page 15 of 94.

(16) ¾ ¾ ¾. ¾. where suggested by error estimators. Make use of local refinement of the mesh in these regions, in accordance with the selected turbulence wall modelling. Ensure high geometric precision of the periodic grid interface when using periodic boundary conditions. Avoid the presence of arbitrary mesh coupling, non-matching cell faces, grid refinement interfaces or extended changes of element types in the critical regions of high flow gradients. Check that the assumptions made when setting up the grid with regard to critical regions of high flow gradients and large changes agree with the result of the computation, and rearrange grid points if found to be necessary. For each class of problem, make use of a grid dependency study to analyse the suitability of the mesh and to give an estimate of the numerical error in the simulation. Ideally, at least three significantly different grid resolutions should be used. Strictly, one should double the grid twice in each direction and then apply Richardson extrapolation (Roache [1997]) to be really sure. If this is not feasible, apply selective local refinement of the grid in critical flow regions of the domain to allow greater factors, or try to compare different order of spatial discretisations on the same mesh.. 3.5. Spatial discretisation errors Spatial discretisation errors are primarily concerned with the approximation of convective terms in the governing transport equations. Different numerical methods evaluate the fluxes at either the same grid locations as the transported quantities or somewhere in between (co-located or staggered grids). In both cases, an algebraic approximation of the spatial functions is required to calculate the gradients at these locations. This approximation is called the differencing scheme in finite volume or difference methods or the basis function in finite element methods. The accuracy of the scheme depends on the form of the algebraic relationship and on the number and location of participating grid points (sometimes known as the stencil). The spatial discretisation or truncation error equals the difference between the scheme and the exact formulation based on a Taylor expansion series. A formally second order scheme is consistent with the exact formulation up to the term with a power of two, a third order scheme also takes into account the next higher term. For some discretisation schemes, the formal order of accuracy is not preserved on irregular meshes, where it reduces by one, or even more on cells with discontinuous sizes. Reducing the cell size by introducing a finer grid has the biggest impact on the accuracy of the solution if higher order schemes are applied. Halving the elements in all directions using a third order scheme will reduce the numerical error by a factor of 8, while this factor is only 2 with a first order scheme. It should, however, be borne in mind that the order of a method has no direct connection to the accuracy of a solution on a given grid. For instance lower order upwind methods can yield better solutions on coarse grids than higher order schemes. However, the higher order central schemes will approach the exact solution faster when the grid is refined. If the solution of the physical problem considered is smooth, and exhibits only small gradients, even a first order scheme can do a good job, especially if the flow is oriented along the grid lines. A first order scheme is usually not at all suitable for general engineering applications involving complex flows with large gradients and thin boundary layers. The large truncation error introduced by the first order scheme is known as numerical viscosity or diffusivity as it gives rise to artificial diffusion fluxes, which may be much stronger than the real molecular or turbulent contributions. On the other hand, higher order schemes suffer from a different more obvious problem, namely the appearance of a characteristic wavy pattern with a wavelength of two cell sizes in the neighbourhood of steep gradients. These so-called wiggles are caused by dispersion, i.e. waves with different wave lengths are not transported with the same speed. Dispersion is most prominent in central differencing schemes for finite volume methods and quadratic basis function schemes for finite element methods. Higher order upwind schemes are less prone to it. In some cases these wiggles can be considered a benefit, as their size is an indicator of the mesh error. If necessary, this problem may be remedied using special (non-linear) monotone schemes, such as total variation diminishing (TVD) or shockcapturing schemes (Hirsch [1991]). Due to their capability to resolve steep gradients while avoiding dispersion effects they are frequently applied in supersonic flows with shock waves, and for the transport of scalar quantities with weak molecular diffusion.. © ERCOFTAC 2000. page 16 of 94.

(17) 3.5.1. Guidelines on spatial discretisation Avoid the use of first order schemes. The use of methods of higher order (at least second) is recommended for all transported quantities. ¾ First order schemes may be acceptable under the following circumstances. It may be necessary to use a first order scheme at the start of a calculation as it is likely to be more robust, but as convergence is approached a second order or higher scheme should be used. From a practical point of view it will sometimes be acceptable to use a first order scheme for the transported turbulence variables (which are often dominated by local production and dissipation). For large engineering calculations a second order scheme may be impractical because of the available computing resources. ¾ Try to give an estimate of the discretisation error in the simulation by applying a mesh refinement study (or if this is not possible by mesh coarsening) and by examining the effect of changes caused by the use of different order of spatial discretisations on the same mesh. ¾ If available in the code, make use of the calculation of an error estimator (which may be based on residuals, on the difference between two solutions of different order of accuracy or on wiggle size for a high order numerical scheme). ¾. 3.6. Temporal discretisation errors for time-dependent simulations Purely steady flow fields with the time-derivative equal to zero are only a special case of the timedependent equations; in general, fluid flows are transient. The sources for this time-dependent behaviour are: •. External transient or non-transient forces.. •. Transient boundary conditions, moving walls (e.g. the fluttering of an airfoil).. •. Vortex stretching, a three-dimensional phenomenon due to the non-linear term of the governing equations, which also gives rise to the fluctuating nature of turbulence.. •. Vortex shedding.. The computation of steady turbulent flow is the most common kind of simulation for the industrial use of CFD. In these cases the Reynolds-averaged flow is steady while the average turbulent quantities account for the time-dependence of the turbulent fluctuations. In this way, the RANS equations represent the temporal average of the flow. However, the RANS-equations also allow the time-dependent Reynolds-averaged flow fields to be computed, based on the assumption that the temporal average of the turbulent quantities is not affected by the global unsteadiness. This is physically realistic when the time scale of the turbulence is much smaller than the time scale of the mean unsteadiness. A limitation is, however, that the typical turbulence frequencies are much higher than typical externally imposed or internally generated mean-flow frequencies. If the turbulence and mean flow frequencies are in the same band, ensemble averaging loses its sense, and LES or DNS methods should be employed. A time-dependent simulation is always needed if the scale of eddies or vortices is large and is comparable to the dimensions of the geometry (e.g. the computation of a vortex-street behind bluff bodies like a car or a building). In some turbomachinery design applications special models involving averaging-techniques with mixing planes between the blade rows are used to remove the time dependence of the flow due to the relative motion of the blades. Such techniques allow the flow to be computed using common steady state solution methods. If an accurate spatial discretisation is applied, flows which are physically time-dependent will often fail to converge using a steady-state method. However, if integrated with a large time step, even physically unsteady flows can be converged to a steady state (for example, a cylinder in a cross flow). Very often convergence problems with a steady simulation can be interpreted as a hint that the flow is unsteady and a time-stepping scheme would be appropriate. On the other hand, symmetry boundary conditions may impose a steady flow, although it would be transient in reality. If the complete geometry including both sides of the symmetry plane were used the velocity field would oscillate perpetually. Averaging the solution over a long time interval would lead to a symmetrical field, which, however, may differ from the steady state solution obtained with flow symmetry actually imposed.. © ERCOFTAC 2000. page 17 of 94.

(18) The temporal discretisation scheme provides an approximation of the time derivative. Most CFD codes offer implicit first and second order schemes, which are most effective in terms of computer memory and stability requirements. Low-storage higher-order Runge-Kutta methods are also available. The order of the scheme and the choice of the time-step influence the size of the amplitude and the phase error, the two components of the temporal discretisation error. To improve time-accuracy self-adaptive time-stepping procedures (such as predictor-corrector methods) can be used. The choice of the time step depends on the time scales of the flow being analysed. If time steps are too large the simulation might fail to capture important flow and mimic unphysical steady behaviour. It is therefore advisable to start with relatively small time steps, and corresponding CFL number, even though this is not required from the point of view of numerical stability. Some CFD codes use a timestepping scheme for steady state simulations.. 3.6.1. Guidelines on temporal discretisation Second order accuracy is recommended in both space and time, as the overall solution accuracy is determined by the lower order component of the discretisation. For time dependent flows the time and space discretisation errors are strongly coupled. Hence finer grids, smaller time steps or higher order schemes are required (in both space and time). ¾ Check the influence of the order of the temporal discretisation by analysis of the frequency and time-development of a quantity of interest (e.g. the velocity in the main flow direction). ¾ Check the influence of the time-step on the results. ¾ Ensure that the time-step is adapted to the choice of the grid and the requested temporal size by resolving the frequency of the realistic flow and ensure that it complies with specific stability requirements. ¾. 3.7. Types of implementation of boundary conditions Two types of boundary conditions and combinations of them are most commonly encountered. The Dirichlet condition specifies the distribution of a physical quantity over the boundary at a given time step and the Neumann condition defines the distribution of its first derivative. Fluid flow boundary conditions are more complex than in simple pure heat conduction simulations due to the coupling of the velocity fields with the pressure distribution. Users have normally no control on the spatial discretisation in the neighbourhood of boundaries. The CFD code developer should ensure that the implementation in the boundary region retains the overall accuracy of the numerical scheme. There is common consent that good practice for outflow boundaries is to set the convective derivative normal to the boundary face equal to zero and to combine this with a stream-wise extrapolation of transported quantities. Outflow and inflow boundaries bring about the following difficulties: •. Non-physical reflection of outgoing information back into the domain (Giles [1990]).. •. Difficulties in providing information about the properties of the fluid which may inadvertently enter the domain from the outside, and some CFD codes prevent fluid from entering the domain through outflow boundaries.. •. Difficulties may also arise if open boundary conditions are placed in regions of high swirl, large curvatures or pressure gradients.. 3.7.1. Guidelines on the implementation of boundary conditions Ensure that appropriate boundary conditions are available for the case being considered. For swirling flows at an outlet consult the code manual to check that appropriate boundary conditions have been implemented (for example, radial equilibrium of pressure field instead of constant static pressure). Special non-reflecting boundary conditions are sometimes required for outflow and inflow boundaries where there are strong pressure gradients (Giles [1990]). ¾ Check whether the CFD code allows inflow at open boundary conditions. If inflow cannot be avoided at an open boundary then ensure that the transported properties of the incoming fluid including turbulence properties are properly modelled. ¾. © ERCOFTAC 2000. page 18 of 94.

(19) 3.8. Special remarks on the finite-element method The best practice guidelines are based mainly on the finite-volume method which is the most common numerical method in commercial CFD-codes of industrial interest. Nevertheless a non-negligible number of CFD-codes based on the finite-element method are used by the CFD-community and this section gives additional advice that is specific to these. In the finite-element method (FEM) the domain is broken into a set of discrete finite elements that are usually unstructured. Their special feature is that the Navier-Stokes equations are multiplied by a weight (or basis) function before they are integrated over the entire domain. The weight function is defined locally in each element and it can be of higher order. The approximation is substituted into a weighted integral of the conservation laws. The result is a set of non-linear algebraic equations. An advantage of the early finite-element methods was the ability to deal with complex geometries where the grids can be easily refined in the area of interest. It can also be shown that the finiteelement methods have optimal properties for certain types of equations. An additional advantage is the mathematical background, which allows the development of interesting numerical possibilities, such as error estimators based on the residuals, and the use of higher order schemes. The principal drawback is that one needs to calculate and store the basis functions for each type of element that might appear in the grid (even if it only appears once). Moreover, there might be some difficulties related to conservation when using weak formulations (global conservation would be satisfied but local conservation would not). In addition the matrices of the linearised equations are not as well structured as in finite volume methods and this makes it more difficult to find efficient solution algorithms, although these are evolving rapidly through the use of iterative methods with pre-conditioners. For further information on the finite-element methods in fluid mechanics see Girault and Raviart [1986], Oden et. al [1975] and Zienkiewicz and Taylor [1991]. Most of the guidelines on the numerical methods mentioned above are also valid for the finite-element method. Some aspects may be either more or less important with the finite-element method than with the finite-volume method. The main differences between the guidelines for finite element and finite volume simulations are described in the next section.. 3.8.1. Specific guidelines on finite-element methods in CFD ¾. ¾ ¾ ¾ ¾ ¾. The requirements for the quality of the mesh of a finite-element model are less stringent than those for finite volume methods (e.g. expansion rate, aspect ratio) but there might be problems of local conservation of conserved variables if the quality of the mesh is too low. The code manual should define any special requirements of the mesh. The distribution of elements needs to be able to resolve the flow variation. In particular, the grid lines should be roughly aligned with the flow direction near to walls. Be aware that the grid might affect the flow at the degrees of freedom located on sharp corners (more so than in finite volume methods). The shape of the elements should be acceptable. Minimise the mesh bandwidth. Finite-element computations need more computer memory than Finite-Volume methods on structured grids with same number of nodes. Accurate FEM solutions can be obtained with a minimal mesh by using a quadratic basis function.. © ERCOFTAC 2000. page 19 of 94.

(20) 4. Turbulence modelling Most flows of practical engineering interest are turbulent, and turbulent mixing then usually dominates the behaviour of the flow. Turbulence plays a crucial part in the determination of many relevant engineering parameters, such as frictional drag, heat transfer, flow separation, transition from laminar to turbulent flow, thickness of boundary layers, extent of secondary flows, and spreading of jets and wakes. The turbulent states which can be encountered across the whole range of industrially relevant flows are rich, complex and varied. After a century of intensive theoretical and experimental research, it is now accepted that no single turbulence model can span these states and that there is no generally valid universal model of turbulence. A bewildering number and variety of models have appeared over the years, as different developers have tried to introduce improvements to the models that are available. The extremely difficult nature of this endeavour caused Bradshaw [1994] to refer to turbulence as “the invention of the Devil on the seventh day of creation, when the Good Lord wasn't looking”. The available turbulence models can be roughly divided into three main categories, with the following subdivisions: •. Linear eddy viscosity models • Algebraic (or zero-equation) models • One-equation models (with ordinary and/or partial differential equations) • Two-equation models. •. Reynolds stress or second moment closure models • Full Reynolds stress transport models • Algebraic Reynolds stress models. •. Non-linear eddy viscosity models (NLEVM) • These can be sub-divided in the same way as linear eddy viscosity models (above) but are usually implemented as two-equation models • A certain sub-class of NLEVM are equivalent to algebraic Reynolds stress models. Within each of these categories there are a wide variety of different models and options available (see below). The choice of which turbulence model to use and the interpretation of its performance (i.e. establishing bounds on key predicted parameters) is a far-from-trivial matter. A set of application procedures is evidently required which documents the performance of various turbulence models across a broad class of flow regimes and for different applications. A full categorisation of this type is beyond the scope of the present guidelines. Instead the general features and broad limitations of different classes of model will be discussed and guidance will be given on the practical deployment of the turbulence model most commonly used in industrial practice, the standard k-ε model. A fuller introduction to the subject of turbulence and turbulence modelling can be obtained by consulting standard reference texts on the subject, such as Launder and Spalding [1972], Cebeci and Smith [1974], Rodi [1993], Tennekes and Lumley [1972], Menter et al. [1997], Wilcox [1998], Hanjalic [1994], Leschziner [1990] and Launder [1989].. 4.1. RANS equations and turbulence models Turbulent flows contain many unsteady eddies covering a range of sizes and time scales. For flows in industrial applications, the effects of turbulence are nearly always examined using the RANS equations. These are developed from the time-dependent three-dimensional Navier-Stokes equations which are averaged in such a manner that unsteady structures of small sizes in space and time are eliminated and become expressed by their mean effects on the flow through the so-called Reynolds or turbulent stresses. These stresses must be interpreted in terms of averaged variables in order to close the system of equations. This requires the construction of a mathematical model known as a turbulence model. If heat transfer is important, the time-dependent energy equation is averaged in a similar manner giving rise to turbulent heat fluxes which account for the transport of energy due to the action of the unre-. © ERCOFTAC 2000. page 20 of 94.

(21) solved turbulent motions. The turbulence model must be extended to include a representation of these energy fluxes in order to fully close the system of equations2. Because models are based on different assumptions, all available turbulence models have limitations which depend on the modelling strategy.. 4.2. Classes of turbulence models 4.2.1. Linear Eddy viscosity models The simplest turbulence modelling approach rests on the concept of a dynamic turbulent viscosity, µT. This relates the turbulent stresses appearing in the RANS equations to the averaged velocity gradients (i.e. the rate of strain) in direct analogy to the classical interpretation of viscous stresses in laminar flow by means of the fluid viscosity, µ. Thus for example, in a shear layer where the dominant velocity gradient is ∂u/∂y (u is the averaged velocity in the principal direction of flow and y is the crossstream co-ordinate) the turbulent shear stress is given as µT·∂u/∂y. The viscous analogy can be extended to the interpretation of the turbulent energy fluxes by the use of the so-called Reynolds extended analogy. A turbulent Prandtl number is introduced, PrT, so that the energy fluxes are related to time-averaged temperature gradients via a turbulent diffusivity of energy given as µT/(ρ·PrT). Unfortunately, unlike their viscous counterparts, the turbulent viscosity and turbulent Prandtl number are not fluid properties but functions of the state of turbulence. From dimensional considerations, µT/ρ is proportional to V·L, where V is a velocity scale and L is a length scale of the larger turbulent motions (called the mixing length in so-called mixing length models). Both the velocity scale V and the length scale L are determined by the state of turbulence, and, over the years, various prescriptions for V and L have been proposed.. 4.2.2. Algebraic (or zero-equation) models The simplest prescription of V and L is with the so called algebraic (or zero-equation) class of models. These assume that V and L can be related by algebraic equations to the local properties of the flow. This is fairly straightforward for simple flows but can often be difficult in geometrically complex configurations (see Cebeci and Smith [1974], Baldwin and Lomax [1978] and the discussion in Wilcox [1998]). For example, in a wake or free shear layer V is often taken as proportional to the velocity difference across the flow and L is taken as constant and proportional to the width of the layer. In a boundary layer close to the wall V is given as L·∂u/∂y (or L·Ω where Ω is the magnitude of the vorticity) and L is related to the wall-normal distance from the wall (y-direction). The outer part of the boundary layer is treated in a similar manner to a wake. The turbulent Prandtl number is given a constant value except very close to a wall where molecular effects become important. Algebraic models of turbulence have the virtue of simplicity and are widely used with considerable success for simple shear flows such as attached boundary layers, jets and wakes. For more complex flows where the state of turbulence is not locally determined but related to the upstream history of the flow, a more sophisticated prescription is required. Algebraic turbulence models are based on boundary layer concepts, like shear layer thickness, distance from a wall and velocity differences across the layer. These quantities cannot easily be computed in a Navier-Stokes method and introduce significant additional uncertainty into the computation, as the solutions are dependent on implementation details. This is the main reason why these models are not normally recommended for general applications of RANS methods.. 4.2.3. One-equation models The one-equation models attempt to improve on the zero-equation models by using an eddy viscosity that no longer depends purely on the local flow conditions but takes into account where the flow has come from, i.e. upon the flow history. The majority of approaches seek to determine V and L separately and then construct µT/ρ as the product of V and L. Almost without exception, V is identified with 2. If the transport of one or more scalar contaminants or species is important, the appropriate timedependant concentration equations are treated in a similar way to the energy equation. The turbulent mass fluxes which then arise are usually modelled following the same approach adopted for the energy fluxes. Thus, for the sake of simplicity and clarity, the text will focus on the treatment of the energy equation. © ERCOFTAC 2000. page 21 of 94.

(22) k1/2, where k is the kinetic energy per unit mass of fluid arising from the turbulent fluctuations in velocity around the averaged velocity. A transport equation for k can be derived from the Navier-Stokes equations and this is the single transport equation in the one-equation model. This is closed (i.e. reduced to a form involving only calculated variables) by introducing simple modelling assumptions thereby furnishing a prescription for the velocity scale V which accounts at least partially for non-local effects. In shear-layer type flows, and especially in regions close to a wall, it is often possible to algebraically prescribe L with reasonable confidence. In geometrically complex configurations the prescription of L is difficult because it depends on non-local quantities, such as the boundary layer thickness, displacement thickness, etc. and introduces similar uncertainties as in an algebraic turbulence model. Spalart and Allmaras [1992] have devised an alternative formulation of a one-equation model specifically for aerodynamic flows, which determines the turbulent viscosity directly from a single transport equation for µT and this model is proving quite successful for practical turbulent flows in external airfoil applications. The model is not well-suited for more general flows, as it leads to serious errors even for simple shear flows (round jet).. 4.2.4. Two-equation models For general applications, it is usual to solve two separate transport equations to determine V and L, giving rise to the name two-equation model. In combination with the transport equation for k, an additional transport equation is solved for a quantity which determines the length scale L. This class of models is the best known and the most widely used in industrial applications since it is the simplest level of closure which does not require geometry or flow regime dependent input. The most popular version of two equation models is the k-ε model, where ε is the rate at which turbulent energy is dissipated to smaller eddies (Launder and Spalding [1974]). This is included in almost every commercial and in-house code and is a de-facto standard in industrial applications. A modelled transport equation for ε is solved and then L is determined as Cµ k3/2/ε where Cµ is a constant. Several commercial codes also include variants of the standard k-ε model, which improve predictions under special circumstances as explained in 4.4.1 below. The second most widely used type of two equation model is the k-ω model, where ω is a frequency of the large eddies (Wilcox [1998]). A modelled transport equation for ω is solved and L is then determined from k1/2/ω. The k-ω model performs very well close to walls in boundary layer flows, particularly under strong adverse pressure gradients (hence its popularity in aerospace applications). However it is very sensitive to the free stream value of ω and unless great care is taken in setting this value, spurious results can be obtained in both boundary layer flows and free shear flows. The k-ε model is less sensitive to free stream values but is often inadequate in adverse pressure gradients. Many different variants are to be found in the literature to circumvent this problem. An interesting option has been proposed by Menter [1994a, 1994b] through a model which retains the properties of k-ω close to the wall and gradually blends into the k-ε model away from the wall. This model has been shown to eliminate the free stream sensitivity problem without sacrificing the k-ω near wall performance. The performance of two-equation turbulence models deteriorates when the turbulence structure is no longer close to local equilibrium. This occurs when the production of turbulence energy departs significantly from the rate at which it is dissipated at the small scales (i.e. ε), or equivalently when dimensionless strain rates (i.e. absolute value of the rate of strain times k/ε) become large. Various attempts have been made to modify two equation turbulence models to account for strong non-equilibrium effects. For example, the so-called SST (shear stress transport) variation of Menter's model [1993, 1996] leads to marked improvements in performance for non-equilibrium boundary layer regions such as those found behind shocks or close to separation. However, such modifications should not be viewed as a universal cure. For example SST is less able to deal with flow recovery following reattachment.. 4.2.5. Reynolds stress or second moment closure models The eddy viscosity models described above are based on the eddy viscosity concept and assume that the turbulent stresses are linearly related to the rate of strain by a scalar turbulent viscosity, and that the principal strain directions are aligned to the principal stress directions. This is reasonable for fairly © ERCOFTAC 2000. page 22 of 94.

References

Related documents