Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to CFD (Pisa, 30/09/2005) 1 AN INTRODUCTION TO COMPUTATIONAL FLUID DYNAMICS Shuisheng He School of Engineering The Robert Gordon University.

Similar presentations


Presentation on theme: "Introduction to CFD (Pisa, 30/09/2005) 1 AN INTRODUCTION TO COMPUTATIONAL FLUID DYNAMICS Shuisheng He School of Engineering The Robert Gordon University."— Presentation transcript:

1 Introduction to CFD (Pisa, 30/09/2005) 1 AN INTRODUCTION TO COMPUTATIONAL FLUID DYNAMICS Shuisheng He School of Engineering The Robert Gordon University

2 Introduction to CFD (Pisa, 30/09/2005)2 OBJECTIVES The lecture aims to convey the following information/ message to the students: What is CFD What is CFD The main issues involved in CFD, including those of The main issues involved in CFD, including those of –Numerical methods –Turbulence modelling The limitations of CFD and the important role of validation and expertise in CFD The limitations of CFD and the important role of validation and expertise in CFD

3 Introduction to CFD (Pisa, 30/09/2005)3 OUTLINE OF LECTURE 1. Introduction –What is CFD –What can & cannot CFD do –What does CFD involve … 2. Issues on numerical methods –Mesh generation –Discretization of equation –Solution of discretized equations 3. Turbulence modelling –Why are turbulence models needed? –What are available? –What model should I use? 4. Demonstration –Use of Fluent

4 Introduction to CFD (Pisa, 30/09/2005) 4 1. INTRODUCTION

5 Introduction to CFD (Pisa, 30/09/2005)5 What is CFD? Computational fluid dynamics (CFD): Computational fluid dynamics (CFD): –CFD is the analysis, by means of computer- based simulations, of systems involving fluid flow, heat transfer and associated phenomena such as chemical reactions. CFD involves... CFD involves...

6 Introduction to CFD (Pisa, 30/09/2005)6 What does CFD involve? Specification of the problem Specification of the problem Development of the physical model Development of the physical model Development of the mathematical model Development of the mathematical model –Governing equations –Boundary conditions –Turbulence modelling Mesh generation Mesh generation Discretization of the governing equations Discretization of the governing equations Solution of discretized equations Solution of discretized equations Post processing Post processing Interpretation of the results Interpretation of the results

7 Introduction to CFD (Pisa, 30/09/2005)7 An example Initiation of the problem Initiation of the problem –DP Offshore Ltd is keen to know what (forces ) caused the damage they recently experienced with their offshore pipelines. Development of the physical model Development of the physical model –After a few meetings with the company, we have finally agreed a specification of the problem (For me, it defines the physical model of the problem to be solved): Tidal current: 10 to 20m/s Waves (unsteady): -5m/s to +5m/s Diameters: 150~200mm Gap above sea bed: 10mm Depth of sea: 500m ~ 1000m

8 Introduction to CFD (Pisa, 30/09/2005)8 An example (cont.) Development of the mathematical model Development of the mathematical model –Governing equations Equations: momentum, thermal (x), multiphase (x), … Equations: momentum, thermal (x), multiphase (x), … Phase 1: 2D, steady; Phase 2: unsteady, …, Phase 1: 2D, steady; Phase 2: unsteady, …, The flow is turbulent! The flow is turbulent! –Boundary conditions Decide the computational domain Decide the computational domain Specify boundary conditions Specify boundary conditions 10D Inlet: Flat inlet profiles V=25m/s Turbulence=5% Smooth wall Symmetry Outlet: fully developed zero gradient 10D 20D Flow

9 Introduction to CFD (Pisa, 30/09/2005)9 An example (cont.) Development of the mathematical model (cont.) Development of the mathematical model (cont.) –Turbulence model Initially, a standard 2-eq k-ε turbulence model is chosen for use. Initially, a standard 2-eq k-ε turbulence model is chosen for use. Later, to improve simulation of the transition, separation & stagnation region, I would like to consider using a RNG or a low-Re model Later, to improve simulation of the transition, separation & stagnation region, I would like to consider using a RNG or a low-Re model Mesh generation Mesh generation –Finer mesh near the wall but not too close to wall –Finer mesh behind the pipe

10 Introduction to CFD (Pisa, 30/09/2005)10 An example (cont.) Discretization of the equations Discretization of the equations –Start with 1 st order, for easy convergence –Start with 1 st order upwind, for easy convergence –Consider to use for velocities, later. –Consider to use QUICK for velocities, later. –There is no reason for not using the default. –There is no reason for not using the default SIMPLER for pressure. Solver Solver –Use Uncoupled rather than method –Use Uncoupled rather than coupled method –Use default setup on but very likely, this will need to be changed later –Use default setup on under-relaxation, but very likely, this will need to be changed later –Convergence criterion: choose initially: check if this is ok by checking if makes any difference. Iteration –Start iteration Failed –Plot velocity or other variable to assist identifying the reason(s) –Potential changes in: relaxation factors, mesh, initial guess, numerical schemes, etc. Converged solution –Eventually, solution converged.

11 Introduction to CFD (Pisa, 30/09/2005)11 An example (cont.) Post processing Post processing Interpretation of results Interpretation of results Force vector: (1 0 0) pressure viscous total pressure viscous total zone name force force force coefficient coefficient coefficient n n n pipe net

12 Introduction to CFD (Pisa, 30/09/2005)12 CFD road map Specify the problem Select turbulence model Generate Mesh Discretize equations Solve discretized equations Post processing Pre-processor Solver Post-processor

13 Introduction to CFD (Pisa, 30/09/2005)13 Why CFD? Continuity and Navier-Stokes equations for incompressible fluids: Continuity and Navier-Stokes equations for incompressible fluids:

14 Introduction to CFD (Pisa, 30/09/2005)14 Why CFD? (cont.) Analytical solutions are available for only very few problems. Analytical solutions are available for only very few problems. Experiment combined with empirical correlations have traditionally been the main tool - an expensive one. Experiment combined with empirical correlations have traditionally been the main tool - an expensive one. CFD potentially provides an unlimited power for solving any flow problems CFD potentially provides an unlimited power for solving any flow problems Flow in a pipe For laminar flow: For turbulent flow: Important conclusion: There is no analytical solution even for a very simple application, such as, a turbulent flow in a pipe. ? Or

15 Introduction to CFD (Pisa, 30/09/2005)15 CFD applications Aerospace Aerospace Automobile industry Automobile industry Engine design and performance Engine design and performance The energy sector The energy sector Oil and gas Oil and gas Biofluids Biofluids Many other sectors Many other sectors

16 Introduction to CFD (Pisa, 30/09/2005)16 CFD applications (cont.) As a design tool, CFD can be used to perform quick evaluation of design plans and carry out parametric investigation of these designs. As a design tool, CFD can be used to perform quick evaluation of design plans and carry out parametric investigation of these designs. As a research tool, CFD can provide detailed information about the flow and thermal field and turbulence, far beyond these provided by experiments. As a research tool, CFD can provide detailed information about the flow and thermal field and turbulence, far beyond these provided by experiments.

17 Introduction to CFD (Pisa, 30/09/2005)17 What can CFD do? Flows problems in complex geometries Flows problems in complex geometries Heat transfer Heat transfer Combustions Combustions Chemical reactions Chemical reactions Multiphase flows Multiphase flows Non-Newtonian fluid flow Non-Newtonian fluid flow Unsteady flows Unsteady flows Shock waves Shock waves

18 Introduction to CFD (Pisa, 30/09/2005)18 What can’t CFD do? CFD is still struggling to predict even the simplest flows reliably, for example, – –A jet impinging on a wall – –Heat transfer in a vertical pipe – –Flow over a pipe – –Combustion in an engine Important conclusions: – –Validation is of vital importance to CFD. – –Use of CFD requires more expertise than many other areas CFD solutions beyond validation are often sought and expertise plays an important role here.

19 Introduction to CFD (Pisa, 30/09/2005)19 Validation of CFD modelling Errors involved in CFD results Discretization errors Discretization errors –Depending on ‘schemes’ used. Use of higher order schemes will normally help to reduce such errors –Also depending on mesh size – reducing mesh size will normally help to reduce such errors. Iteration errors Iteration errors –For converged solutions, such errors are relatively small. Turbulence modelling Turbulence modelling –Some turbulence models are proved to produce good results for certain flows –Some models are better than others under certain conditions –But no turbulence model can claim to work well for all flows Physical problem vs mathematical model Physical problem vs mathematical model –Approximation in boundary conditions –Use of a 2D model to simplify calculation –Simplification in the treatment of properties

20 Introduction to CFD (Pisa, 30/09/2005)20 Validation of CFD modelling (cont.) CFD results always need validation. They can be CFD results always need validation. They can be –Compared with experiments –Compared with analytical solutions –Checked by intuition/common sense –Compared with other codes (only for coding validation!)

21 Introduction to CFD (Pisa, 30/09/2005)21 Commercial CFD packages Phoenix Phoenix Fluent Fluent Star-CD Star-CD CFX (FLOW3D) CFX (FLOW3D) Many others Many others Computer design tools – integrating CFD into a design package Computer design tools – integrating CFD into a design package

22 Introduction to CFD (Pisa, 30/09/2005)22 How to use a CFD package? Specify the problem Specify the problem Generate Mesh Generate Mesh Select equations to solve Select equations to solve Select turbulence models Select turbulence models Define boundary conditions Define boundary conditions Select numerical methods Select numerical methods Iterate – solve equations Iterate – solve equations Fail – calculation does not converge or converges too slowly Fail – calculation does not converge or converges too slowly Improve model: Improve model: –Physical model –Mesh –Better initial guess –Numerical methods (e.g., solver, convection scheme) –Under-relaxations Post processing Post processing Interpretation of results – Always question the results Interpretation of results – Always question the results

23 Introduction to CFD (Pisa, 30/09/2005)23 How to use a CFD package? (cont.) Important issues involved in using CFD: Important issues involved in using CFD: –Mesh independence check –Selection of an appropriate turbulence model –Validation of the solution based on a simplified problem (which contains the important features similar to your problem) –Careful interpretation of your results

24 Introduction to CFD (Pisa, 30/09/2005)24 How to use a CFD package? (cont.) The commercial packages are so user friendly and robust, why do we still need CFD experts? The commercial packages are so user friendly and robust, why do we still need CFD experts? Because they can provide: –Appropriate interpretation of the results and knowledge on the limitations of CFD –More accurate results (by choosing the right turbulence model & numerical methods) –Ability to obtain results (at all) for complex problems –Speed: both in terms of the time used to generate the model and the computing time

25 Introduction to CFD (Pisa, 30/09/2005)25 Basic CFD strategies Finite difference (FD) Finite difference (FD) –Starting from the differential form of the equations –The computational domain is covered by a grid –At each grid point, the differential equations (partial derivatives) are approximated using nodal values –Only used in structured grids and normally straightforward –Disadvantage: conservation is not always guaranteed –Disadvantage: Restricted to simple geometries. Finite Volume (FV) Finite Volume (FV) Finite element (FE) Finite element (FE)

26 Introduction to CFD (Pisa, 30/09/2005)26 Basic CFD strategies (cont.) Finite difference (FD) Finite difference (FD) Finite Volume (FV) Finite Volume (FV) –Starting from the integral form of the governing equations –The solution domain is covered by control volumes (CV) –The conservation equations are applied to each CV –The FV can accommodate any type of grid and suitable for complex geometries –The method is conservative (as long as surface integrals are the same for CVs sharing the boundary) – Most widely used method in CFD –Disadvantage: more difficult to implement higher than 2 nd order methods in 3D. Finite element (FE) Finite element (FE)

27 Introduction to CFD (Pisa, 30/09/2005)27 Basic CFD strategies (cont.) Finite difference (FD) Finite difference (FD) Finite Volume (FV) Finite Volume (FV) Finite element (FE) Finite element (FE) –The domain is broken into a set of discrete volumes: finite elements –The equations are multiplied by a weight function before they are integrated over the entire domain. –The solution is to search a set of non-linear algebraic equations for the computational domain. –Advantage: FE can easily deal with complex geometries. –Disadvantage: since unstructured in nature, the resultant matrices of linearized equations are difficult to find efficient solution methods. –Not often used in CFD

28 Introduction to CFD (Pisa, 30/09/2005) ISSUES IN NUMERICAL METHODS

29 Introduction to CFD (Pisa, 30/09/2005)29 Mesh generation Why do we care? 50% time spent on mesh generation 50% time spent on mesh generation Convergence depends on mesh Convergence depends on mesh Accuracy depends on mesh Accuracy depends on mesh Main topics Structured/unstructured mesh Structured/unstructured mesh Multi-block Multi-block body fitted body fitted Adaptive mesh generation Adaptive mesh generation Specify the problem Select turbulence model Generate Mesh Discretize equations Solve discretized equations Post processing CFD Road Map

30 Introduction to CFD (Pisa, 30/09/2005)30 - MESH GENERATION - Computational domain and mesh structure - MESH GENERATION - Computational domain and mesh structure Carefully select your computational domain Carefully select your computational domain The mesh needs The mesh needs –to be able to resolve the boundary layer –to be appropriate for the Reynolds number –to suit the turbulence models selected –to be able to model the complex geometry

31 Introduction to CFD (Pisa, 30/09/2005)31 - MESH GENERATION - Structure/unstructured mesh - MESH GENERATION - Structure/unstructured mesh Structured grid Structured grid –A structured grid means that the volume elements (quadrilateral in 2D) are well ordered and a simple scheme (e.g., i-j-k indices) can be used to label elements and identify neighbours. Unstructured grid Unstructured grid –In unstructured grids, volume elements (triangular or quadrilateral in 2D) can be joined in any manner, and special lists must be kept to identify neighbouring elements

32 Introduction to CFD (Pisa, 30/09/2005)32 - MESH GENERATION - Structure/unstructured mesh - MESH GENERATION - Structure/unstructured mesh Structured grid Structured grid Advantages: –Economical in terms of both memory & computing time –Easy to code/more efficient solvers available –The user has full control in grid generation –Easy in post processing Disadvantages –Difficult to deal with complex geometries Unstructured grid Unstructured grid –Advantages/disadvantages: opposite to above points!

33 Introduction to CFD (Pisa, 30/09/2005)33 - MESH GENERATION - Multi-Block and Overset Mesh - MESH GENERATION - Multi-Block and Overset Mesh

34 Introduction to CFD (Pisa, 30/09/2005)34 - MESH GENERATION - Body fitted mesh - transformation - MESH GENERATION - Body fitted mesh - transformation Regular mesh Body fitted mesh

35 Introduction to CFD (Pisa, 30/09/2005)35 - MESH GENERATION - Adaptive mesh generation - MESH GENERATION - Adaptive mesh generation Adaptive mesh generation Adaptive mesh generation –The mesh is modified according to the solution of the flow Two types of adaptive methods Two types of adaptive methods –Local mesh refinement –Mesh re-distribution Dynamic adaptive method Dynamic adaptive method –Mesh refinement/redistribution are automatically carried out during iterations Demonstration – flow past a cylinder

36 Introduction to CFD (Pisa, 30/09/2005)36 Equation discretization Relevant issues Convergence strongly depends on numerical methods used. Convergence strongly depends on numerical methods used. Accuracy – discretization errors Accuracy – discretization errors Main topics Staggered/collocated variable arrangement Staggered/collocated variable arrangement Convection schemes Convection schemes –Accuracy –Artificial diffusion –Boundedness –Choice of many schemes Pressure-velocity link Pressure-velocity link Linearization of source terms Linearization of source terms Boundary conditions Boundary conditions Specify problem Select turbulence model Generate Mesh Discretize equations Solve discretized equations Post processing CFD Road Map

37 Introduction to CFD (Pisa, 30/09/2005)37 - EQUATION DISCRETIZATION - Staggered/collocated variable arrangement - EQUATION DISCRETIZATION - Staggered/collocated variable arrangement Collocated variable arrangement Collocated variable arrangement –All variables are defined at nodes Staggered variable arrangement Staggered variable arrangement –Velocities are defined at the faces and scalars are defined as the nodes U,V,P,T U V P,T Collocated Arrangement Staggered Arrangement

38 Introduction to CFD (Pisa, 30/09/2005)38 - EQUATION DISCRETIZATION - Staggered/collocated variable arrangement - EQUATION DISCRETIZATION - Staggered/collocated variable arrangement The problem: The problem: –Unless special measures are taken, the collocated arrangement often results in oscillations –The reason is the weak coupling between velocity & pressure Staggered variable arrangement Staggered variable arrangement –Almost always been used between 60’s and early 80’s –Still most often used method for Cartesian grids –Disadvantage: difficult to treat complex geometry Collocated variable arrangement Collocated variable arrangement –Methods have been developed to over-come oscillations in the 80’s and such methods are often being used since. –Used for non-orthogonal, unstructured grids, or, for multigrid solution methods

39 Introduction to CFD (Pisa, 30/09/2005)39 - EQUATION DISCRETIZATION - Convection schemes - EQUATION DISCRETIZATION - Convection schemes The problem To discretize the equations, convections on CV faces need to be calculated from variables stored on nodal locations To discretize the equations, convections on CV faces need to be calculated from variables stored on nodal locations When the 2 nd order-accurate linear interpolation is used to calculate the convection on the CV faces, undesirable oscillation may occur. When the 2 nd order-accurate linear interpolation is used to calculate the convection on the CV faces, undesirable oscillation may occur. Development/use of appropriate convection schemes have been a very important issue in CFD Development/use of appropriate convection schemes have been a very important issue in CFD There are no best schemes. A choice of schemes is normally available in commercial CFD packages to be chosen by the user. There are no best schemes. A choice of schemes is normally available in commercial CFD packages to be chosen by the user.

40 Introduction to CFD (Pisa, 30/09/2005)40 - EQUATION DISCRETIZATION - Convection schemes (cont.) - EQUATION DISCRETIZATION - Convection schemes (cont.) The requirements for convection schemes: Accuracy: Schemes can be 1 st, 2 nd, 3 rd...-order accurate. Accuracy: Schemes can be 1 st, 2 nd, 3 rd...-order accurate. Conservativeness: Schemes should preserve conservativeness on the CV faces Conservativeness: Schemes should preserve conservativeness on the CV faces Boundedness: Schemes should not produce over-/under- shootings Boundedness: Schemes should not produce over-/under- shootings Transportiveness: Schemes should recognize the flow direction Transportiveness: Schemes should recognize the flow direction

41 Introduction to CFD (Pisa, 30/09/2005)41 - EQUATION DISCRETIZATION - Convection schemes (cont.) - EQUATION DISCRETIZATION - Convection schemes (cont.) Examples of convection schemes 1 st order schemes: 1 st order schemes: –Upwind scheme (UW): most often used scheme! –Power law scheme –Skewed upwind Higher order schemes Higher order schemes –Central differencing scheme (CDS) – 2 nd order –Quadratic Upwind Interpolation for Convective Kinematics (QUICK) – 3 rd order and very often used scheme Bounded higher-order schemes Bounded higher-order schemes –Total Variation Diminishing (TVD) – a group of schemes –SMART

42 Introduction to CFD (Pisa, 30/09/2005)42 - EQUATION DISCRETIZATION - Pressure-velocity link - EQUATION DISCRETIZATION - Pressure-velocity link The problem The problem –The pressure appears in the momentum equation as the driving force for the flow. But for incompressible flows, there is no transport equation for the pressure. –In stead, the continuity equation will be satisfied if the appropriate pressure field is used in the momentum equations –The non-linear nature of and the coupling between, the various equations also pose problems that need care. The remedy The remedy –Iterative guess-and-correct methods have been proposed – see next slide.

43 Introduction to CFD (Pisa, 30/09/2005)43 - EQUATION DISCRETIZATION - Pressure-velocity link (cont.) - EQUATION DISCRETIZATION - Pressure-velocity link (cont.) Most widely used methods SIMPLE (Semi-implicit method for pressure-linked equations) SIMPLE (Semi-implicit method for pressure-linked equations) –A basic guess-and-correct procedure SIMPLER (SIMPLE-Revised): used as default in many commercial codes SIMPLER (SIMPLE-Revised): used as default in many commercial codes –Solve an extra equation for pressure correction (30% more effort than SIMPLE). This is normally better than SIMPLE. SIMPLEC (SIMPLE-Consistent): Generally better than SIMPLE. SIMPLEC (SIMPLE-Consistent): Generally better than SIMPLE. PISO (Pressure Implicit with Splitting of Operators) PISO (Pressure Implicit with Splitting of Operators) –Initially developed for unsteady flow –Involves two correction stages

44 Introduction to CFD (Pisa, 30/09/2005)44 - EQUATION DISCRETIZATION - Linearization of source terms - EQUATION DISCRETIZATION - Linearization of source terms This slide is only relevant to those who develops CFD codes. This slide is only relevant to those who develops CFD codes. The treatment of source terms requires skills which can significantly increase the stability and convergence speed of the iteration. The treatment of source terms requires skills which can significantly increase the stability and convergence speed of the iteration. The basic rule is that the source term should be linearizated and the linear part can the be solved directly. The basic rule is that the source term should be linearizated and the linear part can the be solved directly. An important rule is that only those of linearization which result in a negative gradient can be solved directly An important rule is that only those of linearization which result in a negative gradient can be solved directly

45 Introduction to CFD (Pisa, 30/09/2005)45 - EQUATION DISCRETIZATION - Boundary conditions - EQUATION DISCRETIZATION - Boundary conditions Specification of boundary conditions (BC) is a very important part of CFD modelling Specification of boundary conditions (BC) is a very important part of CFD modelling –In most cases, this is straightforward but, in some cases, it can be very difficult..., Typical boundary conditions: Typical boundary conditions: –Inlet boundary conditions –Outlet boundary conditions –Wall boundary conditions –Symmetry boundary conditions –Periodic boundary conditions

46 Introduction to CFD (Pisa, 30/09/2005)46 Solution of discretized equations Relevant issues Cost/speed Cost/speed Stability/Convergence Stability/Convergence Main topics Solver – solution of the discretized equation system Solver – solution of the discretized equation system Convergence criteria Convergence criteria Under-relaxation Under-relaxation Solution of coupled equations Solution of coupled equations Unsteady flow solvers Unsteady flow solvers Specify problem Select turbulence model Generate Mesh Discretize equations Solve discretized equations Post processing CFD Road Map

47 Introduction to CFD (Pisa, 30/09/2005)47 - SOLUTION OF DISCRETIZED EQUATIONS - Solvers - SOLUTION OF DISCRETIZED EQUATIONS - Solvers Discretized Equations – large linearized sparse matrix Discretized Equations – large linearized sparse matrix AWASAPANAE ΦNΦNΦNΦN ΦSΦSΦSΦS ΦpΦpΦpΦp ΦNΦNΦNΦN ΦNΦNΦNΦN Qp = *

48 Introduction to CFD (Pisa, 30/09/2005)48 - SOLUTION OF DISCRETIZED EQUATIONS - Solvers (cont.) - SOLUTION OF DISCRETIZED EQUATIONS - Solvers (cont.) The discretized governing equations are always sparse, non-linear but linearizated, algebraic equation systems The discretized governing equations are always sparse, non-linear but linearizated, algebraic equation systems The ‘matrix’ from structured mesh is regular and easier to solve. The ‘matrix’ from structured mesh is regular and easier to solve. A non-structured mesh results in an irregular matrix. A non-structured mesh results in an irregular matrix. Number of equations = number of nodes Number of equations = number of nodes Number of molecules in each line: Number of molecules in each line: –Upwind, CDS for 1D results in a tridiagonal matrix –QUICK for 1D results in a penta-diagonal matrix –2D problems involves 5 & more molecules –3D problems involves 7 & more molecules

49 Introduction to CFD (Pisa, 30/09/2005)49 - SOLUTION OF DISCRETIZED EQUATIONS - Solvers (cont.) - SOLUTION OF DISCRETIZED EQUATIONS - Solvers (cont.) Direct methods Direct methods –Gauss elimination: –Tridiagonal Matrix Algorithm (TDMA): Indirect methods Indirect methods –Basic methods: Jacobi Jacobi Gauss-Seidel Gauss-Seidel Successive over-relaxation (SOR) Successive over-relaxation (SOR) –ADI-TDMA –Strongly implicit procedure (SIP) –Conjugate Gradient Methods (CGM) –Multigrid Methods Very expensive! Very effective method used for tridiagonal matrix Simple and probably most often used Simple and probably most often used method Used for more ‘complex’ problems Effective method for more ‘complex’ problems

50 Introduction to CFD (Pisa, 30/09/2005)50 - SOLUTION OF DISCRETIZED EQUATIONS - Convergence criteria - SOLUTION OF DISCRETIZED EQUATIONS - Convergence criteria Two basic methods: Two basic methods: –Changes between any two iterations are less than a given level –Residuals in the transport equations are less than a given value Criteria can be specified using absolute or relative values Criteria can be specified using absolute or relative values

51 Introduction to CFD (Pisa, 30/09/2005)51 - SOLUTION OF DISCRETIZED EQUATIONS - Under-relaxation - SOLUTION OF DISCRETIZED EQUATIONS - Under-relaxation Under almost all circumstances, iterations will not converge unless under-relaxation is used, because Under almost all circumstances, iterations will not converge unless under-relaxation is used, because –The governing equations are very non-linear –And the equations are closely coupled Under-relaxation ( α ): Under-relaxation ( α ): Different variables often require different levels of under- relaxation Different variables often require different levels of under- relaxation Iteration diverged? Relaxation is the first thing to look at Iteration diverged? Relaxation is the first thing to look at

52 Introduction to CFD (Pisa, 30/09/2005)52 - SOLUTION OF DISCRETIZED EQUATIONS - Solution of coupled equations - SOLUTION OF DISCRETIZED EQUATIONS - Solution of coupled equations Governing equations for flow/heat transfer are almost always coupled Governing equations for flow/heat transfer are almost always coupled –The primary variable of one equation also appear in equations for other variables Simultaneous solution – Method 1 Simultaneous solution – Method 1 –Used when equations are linear and tightly coupled –Can be very expensive Sequential solution – Method 2 Sequential solution – Method 2 –Solve equations one by one - temporarily treat other variables as known –Iterations include Inner cycles: Solve each equation Inner cycles: Solve each equation Outer cycles: cycle between equations Outer cycles: cycle between equations

53 Introduction to CFD (Pisa, 30/09/2005)53 - SOLUTION OF DISCRETIZED EQUATIONS - Unsteady flow solvers - SOLUTION OF DISCRETIZED EQUATIONS - Unsteady flow solvers Explicit method Explicit method –use only the values of the variable Φ from last time step. –Conditionally stable, first order Implicit method Implicit method –Mainly use the values of the variable Φ from the current time step –Unconditionally stable, first order Crank-Nicolson method Crank-Nicolson method –Use a mixture of values of the variable Φ at the last and current steps –Unconditionally stable, second order Predictor-Corrector method Predictor-Corrector method –Predictor: Explicit method –Corrector: (Pseudo-) Crank-Nicolson method

54 Introduction to CFD (Pisa, 30/09/2005) Turbulence modelling

55 Introduction to CFD (Pisa, 30/09/2005)55 Turbulence modelling Turbulence models These are semi-empirical mathematical models introduced to CFD to describe the turbulence in the flow These are semi-empirical mathematical models introduced to CFD to describe the turbulence in the flow Main topics Three levels of CFD simulations Three levels of CFD simulations Classification of turbulence models Classification of turbulence models Examples of popular models Examples of popular models Special considerations Special considerations General remarks about turbulence modelling General remarks about turbulence modelling Specify the problem Select turbulence model Generate Mesh Discretize equations Solve discretized equations Post processing CFD Road Map

56 Introduction to CFD (Pisa, 30/09/2005)56 The governing equations Continuity and Navier-Stokes equations for incompressible fluids: Continuity and Navier-Stokes equations for incompressible fluids:

57 Introduction to CFD (Pisa, 30/09/2005)57 The Reynolds averaged Navier-Stokes Equation The Reynolds averaged Navier-Stokes equations (RANS): NOTES: The extra terms, Reynolds (turbulent) shear stresses, have the effect of mixing, similar to molecular mixing (diffusion) These terms need to be modelled

58 Introduction to CFD (Pisa, 30/09/2005)58 The three level simulations Direct Numerical Simulations (DNS) Direct Numerical Simulations (DNS) –DNS directly solves the NS equations –There is no ‘modelling’ in it, so the solution can be considered as the true representation of the flow. –It always solves the unsteady form –It can only be used for very simple flows at the moment due to its huge requirement on computer power. Large Eddy Simulations (LES) Large Eddy Simulations (LES) –LES directly solves the NS flow for ‘large eddies’ but uses models to simulate the ‘small scale’ flows –The solution is again always in unsteady form –LES can only be used for relatively simple flows Reynolds Averaged Navier-Stokes approach (RANS) Reynolds Averaged Navier-Stokes approach (RANS) –Turbulence models are used to simulate the effect of turbulence –RANS has been widely used in designs and research since the 70’s –Almost all commercial CFD packages are RANS based.

59 Introduction to CFD (Pisa, 30/09/2005)59 Classification of turbulence models Eddy viscosity turbulence models Eddy viscosity turbulence models –Model Reynolds stresses as a product of velocity gradient and an eddy viscosity –Solve 0 to 2 transport equations for turbulence Reynolds stress turbulence models Reynolds stress turbulence models –Solve the transport equations of the Reynolds stresses –Solve 7 transport equations for turbulence

60 Introduction to CFD (Pisa, 30/09/2005)60 Classification of turbulence models Eddy viscosity turbulence models Eddy viscosity turbulence models –The key issue is to model the eddy viscosity ν t Three types of eddy viscosity models Three types of eddy viscosity models –Algebraic models (e.g., mixing length model) –One-equation models: solve one transport equation (normally one for turbulence kinetic energy, k) –Two equation models: solve two transport equations K-ε, k-ω, k- τ models K-ε, k-ω, k- τ models

61 Introduction to CFD (Pisa, 30/09/2005)61 An example of the two-equation model Jones and Launder (1972) k-ε two equation model Eddy viscosity Turbulence kinetic energy Dissipation rate Closure coefficients

62 Introduction to CFD (Pisa, 30/09/2005)62 An example of the Reynolds stress model The Launder-Reece-Rodi (1975) Reynolds stress model Reynolds-stress tensor (six independent equations) Dissipation rate Pressure-strain correlation Auxiliary relations Closure coefficients [Launder (1992)]

63 Introduction to CFD (Pisa, 30/09/2005)63 Special turbulence models ‘Standard’ models and wall functions ‘Standard’ models and wall functions –Standard turbulence models are designed only for the core region. Wall Functions are used to bridge the near-wall region for a wall shear flow. –Standard models are used beyond roughly y + =50. Low-Reynolds number (LRN) turbulence model Low-Reynolds number (LRN) turbulence model –LRN models are designed to be used in the near-wall region as well as the core region. –LRN models are much more expensive – they require much finer grid than used for standard models Two-layer models Two-layer models –In some cases, separate models are used for the wall and core regions –The wall region model can be a ‘simpler’ model, such as, one-equation model –This practice can be more economical than using LRN models. Other special models Other special models –Realizable models –Non-linear eddy viscosity models –Renormalized Group (RNG) models

64 Introduction to CFD (Pisa, 30/09/2005)64 What model should I use? Algebraic models Algebraic models –Main models used until early 70’s, and still in use. –Advantages: simple –Disadvantages: lack of generality, ν t vanishes when du/dy=0, etc. Two-equation models (especially k-ε models) Two-equation models (especially k-ε models) –Most widely used models, standard model in commercial packages –Advantages: best compromise between cost and capability –Disadvantages: no account of individual components of turbulent stresses; ν t vanishes when du/dy=0. Reynolds shear stress models Reynolds shear stress models –Only recently been included in commercial CFD codes; and still not widely used yet. –Advantages: –Advantages: provide the potential of modelling more complex flows –Disadvantages: –Disadvantages: have to solve up to 7 more differential equations

65 Introduction to CFD (Pisa, 30/09/2005)65 General remarks on turbulence models There are no generically best models. There are no generically best models. Near wall treatment is generally a very important issue. Near wall treatment is generally a very important issue. A good mesh is important to get good accurate results. A good mesh is important to get good accurate results. Different models may have different requirement on the mesh. Different models may have different requirement on the mesh. Expertise/validation are of great importance to CFD. Expertise/validation are of great importance to CFD.

66 Introduction to CFD (Pisa, 30/09/2005)66 References Numerical Heat Transfer and Fluid Flow Numerical Heat Transfer and Fluid Flow –S.V. Patankar, 1980, Hemisphere Publishing Corporation, Taylor & Francis Group, New York. An Introduction to Computational Fluid Dynamics An Introduction to Computational Fluid Dynamics –H.K. Versteeg & W. Malalasekera, 1995, Longman group Limited, London Computational Methods for Fluid Dynamics Computational Methods for Fluid Dynamics –J.H. Ferziger & M. Peric, 1996, Springer-Verlag, Berlin. Computational Fluid Dynamics Computational Fluid Dynamics –J.D. Anderson, Jr, 1995, McGraw-Hill, Singapore


Download ppt "Introduction to CFD (Pisa, 30/09/2005) 1 AN INTRODUCTION TO COMPUTATIONAL FLUID DYNAMICS Shuisheng He School of Engineering The Robert Gordon University."

Similar presentations


Ads by Google