lecture_1.0

29
Module 1 Governing Equations 1

Upload: shaheen-s-ratnani

Post on 13-May-2017

214 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Lecture_1.0

Module 1 Governing Equations

1

Page 2: Lecture_1.0

Lecture 1.0Orientation to the Course

2

Page 3: Lecture_1.0

CFD for Turbomachinery• Turbomachinery is an important application area for engineers.

• Solution to turbomachinery problems require a thoroughunderstanding of fluid mechanics, thermo dynamics and otherallied subjects like gas dynamics and heat transfer.

• Traditionally the turbomachinery problems are broadly groupedas the analysis type or the design type.

• For the past two decades, CFD techniques are being widely usedto solve these problems and analyze the solutions.

• A number of CFD codes, available both in-house andcommercial, are currently used for the analysis rather than forthe design. It is expected that this limitation soon fades away.

• However, a student at post-graduate level is often encounteredwith a situation where there is no comprehensive study materialreadily available in this important area. 3

Page 4: Lecture_1.0

• It is the authors’ experience and the feed-back received (from theacademic as well as industrial participants of several short termcourses) that prompted them to prepare this material.

• With a good back ground in the areas related to thermal sciencesand engineering and with programming skills, one can ventureto develop an in-house code. One such code, developed by theauthors is demonstrated with examples in the last module of thisnotes.

• The course is thus expected to be helpful also for advancedstudents who would like to either develop their own code or usecommercial codes with an insight to the code.

• Thus, if one wants to develop a CFD code, the authors believethat the course material provides the required domainknowledge. 4

Page 5: Lecture_1.0

Basics of CFD Analysis• The following eleven generic steps highlight the essentials of a

CFD code. An orientation of these steps is given in this lecture.

1 Problem statement Available information and the expected outcome

2 Mathematical model Governing differential equations, initial and boundary conditions

3 Geometry model Geometry model defined by the physics of the problem

4 Mesh generation Methodology of generating nodes/cells and time instants

5 Space discretization Knowledge of discretization models for space derivatives/systems

6 Time discretization ODE solvers along with their stability constraints.

7 Algebraic solver Direct or iterative solvers and handling of large discrete data

8 Implementation Software code may be written to implement the solution method.

9 Simulation run Stopping criteria for the iterative processes; parametric study

10 Verification Model validation / adjustment as required

11 Post processing Analysis of data and presentation5

Page 6: Lecture_1.0

6

Problem Statement and Expected Outcome

• The statement of the turbomachinery problem typically describesthe physics and specifies the data that is necessary to formulatethe problem mathematically and solve it numerically.

• The numerical solution should lead to estimate the expectedengineering information, which may also form a part of theproblem statement.

• It is important to prepare a physical model from the descriptionavailable in the problem statement.

• Introductory lectures of Module 1 give the basics required forformulating the mathematical problem from the given physics inthe problem statement.

Page 7: Lecture_1.0

7

Mathematical Model

• The fluid properties and scales for all the physical variablesshould be chosen suitable to describe fluid motion in the domain.

• The description of fluid motion may be identified asinviscid/viscous, laminar/turbulent, incompressible/compressible(subsonic/transonic/supersonic) etc. based on the flowconditions.

• The governing differential equations, written in the chosencoordinate system as described in Module 1, should be selectedaccording to the statement of the problem.

• The generalized equations for coding can be written in thefollowing form for a general variable Φ

Page 8: Lecture_1.0

8

Mathematical Model (contd.)

(1.0.1)

Net rate of decrease of due to

Rate of increase of convection across the boundaries

Rate of increase of due to Net rate of creation of

diffusion across the boundaries

Page 9: Lecture_1.0

The Governing Equations in the Integral Form

(1.0.2)

or in the differential form as

(1.0.3)

where some possible physical quantities of Φ, ΓΦ and SΦ aregiven in the Table 1.0.1. Here ΓΦ is called the exchangecoefficient and SΦ is the source term.

t CV t A

t A t CV

dV dt n u dAdtt

n grad dAdt S dVdt

j

j j j

uS

t x x x

9

Page 10: Lecture_1.0

Φ ΓΦ (exch. Coef.) SΦ1 0 0

ui μ - ∂p/∂xi + ρ Bi + Sui

h k/Cp Q’’’

T k/Cp Q’’’/Cp

10

Table 1.0.1: Possible physical quantities

Page 11: Lecture_1.0

11

Mathematical Model (contd.)Initial and Boundary conditions

• The initial conditions specify the state of the fluid at time t=0. Itis essential to specify the initial condition for any initial valueproblem.

• The boundary conditions are generally specified at the inletand exit boundaries of the domain and on the solid walls.

• On the solid walls, flow tangency condition has to be specifiedfor inviscid flows and no-slip condition has to be specified forviscous flows.

• For turbomachinery flows, periodic or cyclic boundaryconditions may be specified on the periodic or cyclic boundariesto reduce computational effort. The various types of boundaryconditions for turbomachinery problems are discussed inModule 1.

Page 12: Lecture_1.0

12

Mathematical Model (contd.)Initial and Boundary conditions

• When a time-marching iterative method is used, an initialsolution needs to be guessed. The better the initial guess, thefaster the convergence.

• In turbomachinery problems it is better to specify the initialsolution which gives the flow directions as accurately aspossible, apart from satisfying the governing equations.

• It may be even desirable to solve a set of lower order equationsby using analytical or relatively simple numerical methods toobtain an initial guess.

Page 13: Lecture_1.0

13

Geometric Model

• Selection of appropriate coordinate reference frames, scales forthe geometry, simplifications needed, if any, to idealize thegeometry are some of the steps to be carried out.

• The geometric model is given in the form of a statement/table ofcoordinates or drawings.

• This step can also be accomplished by importing the same fromthe already developed CAD files.

• Module 2 suggests the techniques by which it can be built.

Page 14: Lecture_1.0

14

Mesh Generation

• Usually it is not possible nor advisable to generate a single grid(mesh) for the entire geometrically complex computationaldomain. A multi block approach is therefore followed.

• The physical solution in a particular block will depend on thepreceding neighboring blocks and will influence the succeedingneighboring blocks.

• A data structure is therefore required for exchange ofinformation between the blocks. These data structures will alsobe helpful for communicating the data among multipleprocessors, if used.

Page 15: Lecture_1.0

15

Mesh Generation (contd.)

• Continuity of the variable and its gradient should be satisfiedacross the interface between two blocks which are exchangingthe information.

• Automatic grid generation techniques for structured orunstructured meshes are given in Module 3.

• The grid or mesh that has been generated normally consists oftriangles or quadrilaterals in two dimensions, and tetrahedra,hexahedra, prisms or pyramids in three dimensions. Some ofthese elements are shown in Module 3.

Page 16: Lecture_1.0

16

Mesh Generation (contd.)

• In structured grids, each grid point (vertex, node) is uniquelyidentified by the indices and the corresponding coordinates. Thegrid cells are quadrilaterals in 2-D and hexahedra in 3-D . If thegrid is body-fitted, it could be curvilinear.

• In unstructured grids, the cells as well as nodal points have noparticular ordering, i.e., neighboring cells or grid points cannotbe directly identified by their indices.

• The grid cells may be triangles in 2D and tetrahedra in 3D.However, they may consist of a mix of quadrilaterals andtriangles in 2D and of hexahedra, tetrahedra, prisms andpyramids in 3D.

Page 17: Lecture_1.0

17

Mesh Generation (contd.)

• Such type of hybrid or mixed grids are widely used in order toresolve the near-wall boundary layer and other features thatrequire clustered meshes.

• Regardless of the method used, it is essential that theimplementation of the numerical schemes on the discretizedgoverning equations is carried out on the chosen type of grid.

• Further the results need to be validated with available data oneither the same physical model or a similar one.

• The details of grid independence and adaptation are alsopresented in Module 3.

Page 18: Lecture_1.0

18

Space Discretization

• Among the three popular methods for discretization, the finitedifference, finite volume and finite element, several numericalschemes exist to perform spatial discretization.

• For example, viscous fluxes are discretized using centralaveraging scheme on a structured grid. On unstructured andmixed grids, the same viscous flux is discretized using Gelerkinmethodology or modified gradient averaging methodology forboth finite volume and finite element methods.

• Some of the finite difference and finite volume methodsdeveloped for elliptic, parabolic and hyperbolic type equationsare described in Module 4.

Page 19: Lecture_1.0

19

Temporal discretization

• Two important temporal discretization schemes are explicit andimplicit methods.

• The most popular and widely used explicit methods are the Eulerand multistage Runge-Kutta schemes. These schemes advancehe solution in time. These methods however are restricted by thestability constraints.

• The methods are described in Module 4

• Local time stepping schemes with maximum permissible timestep are used to accelerate the convergence when the interest isto obtain only the steady state solution.

Page 20: Lecture_1.0

20

Algebraic Solvers• In implicit schemes the algebraic equations obtained at each grid

point form a system of linear equations. The final system issolved using either direct or iterative methods.

• A variety of schemes exist for discretizing the convective fluxes.They are central schemes, artificial dissipation schemes, matrixdissipation schemes etc.

• Other advanced upwind spatial discretization schemes whichdistinguish upstream and downstream influences are flux vectorsplitting, flux difference splitting, total variation diminishing(TVD) and fluctuation splitting schemes etc.

• The Advanced Upstream Splitting method, implemented in anin-house code on an unstructured finite volume mesh, along withthe other schemes are discussed in Module 5.

Page 21: Lecture_1.0

21

Iterative Solver

• Direct methods are not preferred for large systems, especially forthree-dimensional problems, as they require high computationaleffort.

• For structured grids, iterative methods like Alternating DirectionImplicit (ADI) scheme, line Jacobi, Lower-Upper (LU)successive over relaxation and triangular decomposition schemesmay be employed.

• On the unstructured grids, implicit iterative methods based onGauss-Siedel relaxation schemes are popular. Conjugate gradientor generalized minimal residual methods are also used.

• Some of these schemes are discussed in Module 5.

Page 22: Lecture_1.0

22

Implementation

• In the cases where the source terms become dominant (thishappens especially with turbulence models) the flow variableschange rapidly in space and time.

• The changes due to strong source term happen at much smallertime scales than those of the flow equations. This increases thestiffness (the ratio of the largest to smallest Eigen value of theJacobian Matrix) of the governing equations significantly.

• In such cases one has to reduce the time step considerably inorder to stabilize the time integration.

• The time step on structured or unstructured grids maybe eitherlocal time step or global time step. If time accuracy is importantthe global time step, which is the minimum of all local timesteps of all control volumes, can be used.

Page 23: Lecture_1.0

23

Implementation (contd.)

• For steady state problems it is sufficient to use local time step.Further it is possible to accelerate the scheme using the largestpossible time step for each control volume. This is calledacceleration technique of local time stepping.

• When a time-marching iterative method is used, an initialsolution needs to be guessed. The better the initial guess, thefaster the convergence.

• In turbomachinery problems it is better to specify the initialsolution which gives the flow directions as accurately aspossible, apart from satisfying the governing equations. It maybe even desirable to solve a set of lower order equations by usinganalytical or relatively simple numerical methods to obtain aninitial guess.

Page 24: Lecture_1.0

24

Implementation (contd.)

• Several acceleration techniques such as enthalpy damping,residual smoothing, multigrid, preconditioning exist in theliterature.

• The above steps are implemented through a computer code. Thecode may be a serial or a parallel one with standard interface.

• The important steps involved in the coding are: reading the inputdata; formulating the algebraic equations for the nodal pointsgenerated in the computational domain in accordance with thegoverning equations, the boundary conditions and the numericalscheme; and solving the set of equations.

Page 25: Lecture_1.0

25

Simulation Runs

• The developed code needs to be executed for different numericalvalues of the parameters that enter the problem. For each set ofinput data, the solution should be converged.

• For iterative solvers, the criterion should be evolved to stop theiterations after reaching a chosen accuracy level.

• Grid independence studies need to be also carried out.

Page 26: Lecture_1.0

26

Verification (Validation)

• Having obtained the solution, it should be verified against abenchmark.

• Normally benchmark solutions are not available for all classes ofproblems. It is especially true for turbomachinery. In such casescomparison with experimental data may be made.

• Even when experimental data is not available, a benchmarkproblem resembling closest to the problem at hand should besolved with methodology (physical modeling, meshing andnumerical schemes) adopted and the results must be compared.

• The accuracy of these comparisons give an indication of thecredibility of the method used.

Page 27: Lecture_1.0

27

Post Processing

• From the solution, all process variables, that enter the problem,are available as numerical data. These variables may be directlyplotted as a function of independent variables such as space andtime.

• Also certain functions (for e.g. lift and drag coefficients, skinfriction factor, heat transfer coefficients etc.) may be defined andestimated as per the problem statement. They may also beplotted as required.

• Module 6 demonstrates the above steps implemented forproblems useful for turbomachinery applications.

Page 28: Lecture_1.0

28

Acknowledgement

The material presented in the following lectures is influenced bythe scholarly articles/books listed in the Bibliography. Some ofthe references may not have been listed by oversight. Theauthors gratefully acknowledge all the sources.

Page 29: Lecture_1.0

END OF LECTURE 1.0

29