introduction to cfd

62
INTRODUCTION TO CFD ARVIND DESHPANDE

Upload: parabajinkya0070

Post on 21-Jan-2015

4.592 views

Category:

Technology


15 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Introduction to cfd

INTRODUCTION TO CFD

ARVIND DESHPANDE

Page 2: Introduction to cfd

3/7/2012 Arvind Deshpande (VJTI) 2

Introduction

Computational Fluid Dynamics or CFD is theanalysis of systems involving fluid flow, heattransfer and associated phenomena such aschemical reactions by means of computer basedsimulation.

A tool for solving PDE’s

3 fundamental principles:

Mass is conserved (Continuity equation);

Newton’s second law (Navier-Stokes Eqn);

Energy is conserved (Bernoulli’s Equation)

Page 3: Introduction to cfd

3/7/2012 Arvind Deshpande (VJTI) 3

Introduction

Governing equations - PDE’s or integral

equations

Analytical and experimental approach (Old)

“A theory is something nobody believes except the person proposing the theory and an experiment is something everybody believes except the person doing the experiment”

--Albert Einstein

Page 4: Introduction to cfd

3/7/2012 Arvind Deshpande (VJTI) 4

Numerical Solutions (New)

Computers can only do the following:

Add, Subtract, Multiply and Divide

Perform simple logical operations

Display colours on the screen

What is Discretization?

Analytical Solution : Continuous

Numerical Solution : Discrete

Page 5: Introduction to cfd

3/7/2012 Arvind Deshpande (VJTI) 5

Introduction

CFD - Science of determining a numerical solution to the

governing equations of fluid flow whilst advancing the

solution through space or time to obtain a numerical

description of the complete flow field of interest.

It is very important to know velocity, pressure and

temperature fields in a large no. of applications

involving fluids i.e liquids and gases. The

performance of devices such as turbo machinery

and heat exchangers is determined entirely by the

pattern of fluid motion within them.

Page 6: Introduction to cfd

3/7/2012 Arvind Deshpande (VJTI) 6

Why CFD?

Growth in complexity of unsolved engineering problems

Need for quick solutions of moderate accuracy

Absence of analytical solutions

The prohibitive costs involved in performing even scaled

laboratory experiments

Efficient solution algorithms

Developments in computers in terms of speed and

storage

Serial/parallel/web computing

Sophisticated pre and post processing facilities

Page 7: Introduction to cfd

3/7/2012 Arvind Deshpande (VJTI) 7

Procedure

1. Virtual model

2. The flow region or calculation domain is divided into alarge number of finite volumes or cells

3. Partial differential equations are discretized using awide range of techniques: finite difference, finitevolume or finite element

4. Algebraic equations gathered into matrices which aresolved by an iterative procedure

5. Numerical solution gives the values of the dependentvariables at discrete locations

6. Chemical reaction, Multiphase flow, mixing, phasechange, mechanical movement

Page 8: Introduction to cfd

3/7/2012 Arvind Deshpande (VJTI) 8

Page 9: Introduction to cfd

3/7/2012 Arvind Deshpande (VJTI) 9

CFD - Third approach in fluid dynamics

CFD today is equal partner with pure theory andpure experiment in the analysis and solution of fluiddynamic problems.

It nicely and synergistically complements the othertwo approaches of pure theory and pure experiment,but it will never replace either of these approaches.

CFD carry out numerical experiments.

Numerical experiments carried out in parallel withphysical experiments in the laboratory cansometimes be used to help interpret physicalexperiment.

Page 10: Introduction to cfd

3/7/2012 Arvind Deshpande (VJTI) 10

Advantages of CFD

It complements experimental and theoretical fluid dynamicsby providing an alternative cost effective means of simulatingreal flows.

Insight

Better visualization and enhanced understanding of designs.

Foresight

Testing many variations until you arrive at an optimal resultbefore physical prototyping and testing. Practically unlimitedlevel of detail of results at virtually no added expense.

Efficiency

Compression of design and development cycle.

Page 11: Introduction to cfd

3/7/2012 Arvind Deshpande (VJTI) 11

Advantages of CFD

The simulation results in prediction of the flow fields and

engineering parameters, which are very useful in the Design

and Optimization of processes and equipments.

Substantial reduction of lead times and costs of new designs

Ability to study systems where controlled experiments are

difficult or impossible to perform (e.g. very large systems)

Ability to study systems under hazardous conditions at and

beyond their normal performance limits (e.g. safety studies

and accident scenarios)

CFD is slowly becoming part and parcel of Computer Aided

Engineering (CAE)

Page 12: Introduction to cfd

3/7/2012 Arvind Deshpande (VJTI) 12

Why do we use CFD ?

Complements actual

engineering testing

Reduces engineering testing

costs

Provides comprehensive data

not easily obtainable from

experimental tests.

Reduces the product-to-market

time and costs

Helps understand defects,

problems and issues in

product/process

Page 13: Introduction to cfd

3/7/2012 Arvind Deshpande (VJTI) 13

Benefits of CFD

Reduce System Cost

Improve Performance

Understand

Problems

Reduce Design Time

& Cost

Page 14: Introduction to cfd

3/7/2012 Arvind Deshpande (VJTI) 14

HOW IT DIFFERS FROM STRESS

ANALYSIS? Stress analysis is generally check for safe working of the design,

Very rarely the performance of the system depends on the stress levels

The governing equations are linear Ease of solution

Not much dependencies on the grid or mesh

Need of auxiliary physics and models for CFD Turbulence

Reactions

Multiple phases their transformations

Confined domains

Conservation of only energy, against conservation of mass, forces and energy

CFD problems are, in general, more difficult to solve. Hence CFD was lagging behind structural mechanics.

Page 15: Introduction to cfd

3/7/2012 Arvind Deshpande (VJTI) 15

Applications of CFD

Aerodynamics of aircraft : lift and drag

Automotive : External flow over the body of a vehicle or internal flow through the engine, combustion, Engine cooling

Turbo machinery: Turbines, pumps , compressors etc.

Flow and heat transfer in thermal power plants andnuclear power reactors

HVAC

Manufacturing – Casting simulation, injection mouldingof plastics

Marine engineering: loads on off-shore structures

Hydrodynamics of ships, submarines, torpedo etc.

Page 16: Introduction to cfd

3/7/2012 Arvind Deshpande (VJTI) 16

Applications of CFD

Electrical and electronic engineering: cooling of equipment liketransformers, Computers, microcircuits, Semiconductor processing,Optical fibre manufacturing

Chemical process engineering: mixing and separation, chemical reactors, polymer molding

Transport of slurries in process industries

Environmental engineering: External and internal environment ofbuildings, wind loading, Investigating the effects of fire and smoke,distribution of pollutants and effluents in air or water,

Hydrology and oceanography: flows in rivers, oceans

Meteorology: weather prediction

Enhanced oil recovery from rock formations

Geophysical flows: atmospheric convection and ground watermovement

Biomedical engineering: Flow in arteries, blood vessels,heart, nasal cavity, Inhalers

Page 17: Introduction to cfd

3/7/2012 Arvind Deshpande (VJTI) 17

Pressure distribution on a pickup van with

pathlines

Page 18: Introduction to cfd

3/7/2012 Arvind Deshpande (VJTI) 18

Streamlines on a Submarine with the

surface colored with Pressure

Page 19: Introduction to cfd

3/7/2012 Arvind Deshpande (VJTI) 19

Aerospace applications

Page 20: Introduction to cfd

3/7/2012 Arvind Deshpande (VJTI) 20

Aerospace applications

Page 21: Introduction to cfd

3/7/2012 Arvind Deshpande (VJTI) 21

Automotive applications

Evaporating diesel fuel inside an

autothermal reformer mixing chamber

Page 22: Introduction to cfd

3/7/2012 Arvind Deshpande (VJTI) 22

Temperature

distribution in

IC Engine

Page 23: Introduction to cfd

3/7/2012 Arvind Deshpande (VJTI) 23

Surface pressure distribution in an

automotive engine cooling jacket.

Page 24: Introduction to cfd

3/7/2012 Arvind Deshpande (VJTI) 24

Cooling of transformers

Page 25: Introduction to cfd

3/7/2012 Arvind Deshpande (VJTI) 25

Flow pathlines and temperature distribution in a

fan-cooled computer cabinet.

Page 26: Introduction to cfd

3/7/2012 Arvind Deshpande (VJTI) 26

FLOW IN LUNGS-Inhaling and exhaling of air

Page 27: Introduction to cfd

3/7/2012 Arvind Deshpande (VJTI) 27

Applications in Chemical Engg.

Page 28: Introduction to cfd

3/7/2012 Arvind Deshpande (VJTI) 28

Biomedical applications

Page 29: Introduction to cfd

29

Flow through the turbine

draft tube

runner

distributor

rotating blades

Page 30: Introduction to cfd

30

Computed flow in the runner

Page 31: Introduction to cfd

3/7/2012 Arvind Deshpande (VJTI) 31

Computed flow in the draft tube

Page 32: Introduction to cfd

3/7/2012 Arvind Deshpande (VJTI) 32

Some more applications

Page 33: Introduction to cfd

3/7/2012 Arvind Deshpande (VJTI) 33

Some more applications

Page 34: Introduction to cfd

3/7/2012 Arvind Deshpande (VJTI) 34

Some more applications

Fluid flows around the spinnaker and

main sail of a racing yacht design

Vortical structures generated by an

aircraft landing gear

Temperatures on flame surface

modeled using LES and state-of the-

art combustion models

Pressure distribution

on an F1 car

Page 35: Introduction to cfd

3/7/2012 Arvind Deshpande (VJTI) 35

CFD USAGE & GROWTH

Extrapolation of Published estimates

Estimated annual

expenditure on CFD analysis

Worldwide:

1 Billion USD

India:

Rs 50 Cr

15 %

40 %

17 %15 %

Projected Growth Rate

60 %

18 %

Page 36: Introduction to cfd

3/7/2012 Arvind Deshpande (VJTI) 36

National Scenario in CFD

Educational / Research Institutes – IIT’s, IISc, BARC

Industry –

NAL, BHEL, SAIL, GTRE, Cummins, Mahindra, Birla

group

GE, TCS

The number of companies adopting CFD is increasing in

a major way in India each year

CFD is the fastest growing sector of the CAD/CAM/CAE

market with a projected 40-50% growth each year in

CFD in India

Page 37: Introduction to cfd

3/7/2012 Arvind Deshpande (VJTI) 37

National Scenario in CFD

The demand for CFD is spurred by:

Indian companies wanting to improve quality and compete globally

CFD is predominantly used in Automotive Industry, Power Generation Industry and Chemical & Petrochemical Industry

MNC Engineering centers located in India and bringing their design/analysis work here and serving overseas clients

Working on all aspects of design, analysis and performance improvement using CFD

Indian Science and Defence Labs enhancing their CFD research

Defense labs like DRDO, NAL - Application of CFD to high-speed propulsion systems etc.

Non defence labs - Focusing on materials and chemicals areas

Students knowledgeable in CFD are being produced by only a handful of Institutes in India today

The mismatch between the demand and availability of students is growing each year at a large rate

Page 38: Introduction to cfd

3/7/2012 Arvind Deshpande (VJTI) 38

Methodology in CFD

Pre processor Geometry generation

Geometry cleanup

Meshing

Solver Problem specification

Additional models

Numerical computation

Post Processor Line and Contour data

Average Values

Report Generation

Pre Processor

Solver

Post Processor

Page 39: Introduction to cfd

3/7/2012 Arvind Deshpande (VJTI) 39

1. Pre-processor

Definition of the geometry of the region of interest: the computationaldomain

Creating regions of fluid flow, solid regions and surface boundary names

Grid generation – the sub-division of the domain into a number of smaller,non-overlapping sub-domains: a grid (or mesh) of cells (or control volumesor elements)

Accuracy of a solution, calculation time and cost in terms of necessarycomputer hardware are dependent on the fineness of the grid.

Over 50% of time spent in industry on a CFD project is devoted to thedefinition of domain geometry and grid generation.

Selection of the physical and chemical phenomena that need to bemodeled.

Definition of fluid properties.

Specification of appropriate boundary conditions at cells which coincide withor touch the domain boundary

Page 40: Introduction to cfd

3/7/2012 Arvind Deshpande (VJTI) 40

2. Solver

• CFD is the art of replacing the differentialequation governing the Fluid Flow, with a setof algebraic equations (the process is calleddiscretization), which in turn can be solvedwith the aid of a digital computer to get an

approximate solution.

Page 41: Introduction to cfd

3/7/2012 Arvind Deshpande (VJTI) 41

Finite difference method

Domain including the boundary of the physicalproblem is covered by a grid or mesh

At each of the interior grid point the originalDifferential Equations are replaced by equivalentfinite difference approximations

Truncated Taylor series expansions are often usedto generate finite difference approximations ofderivatives of in terms of point samples of ateach grid point and its immediate neighbours

Most popular during the early days of CFD

FDM has the most formal foundation because, its inherent straightforwardness and simplicity.

Page 42: Introduction to cfd

3/7/2012 Arvind Deshpande (VJTI) 42

Finite Element Method

The solution domain is discretized into number of small subregions (i.e. Finite Elements).

Select an approximating function known as interpolationpolynomial to represent the variation of the dependent variableover the elements.

The piecewise approximating functions for are substituted intothe equation it will not hold exactly and a residual is defined tomeasure the errors.

The integration of the governing differential equation (oftenPDEs) with suitable weighting Function, over each elements toproduce a set of algebraic equations-one equation for eachelement.

The set of algebraic equations are then solved to get theapproximate solution of the problem.

Structural Design, Vibration Analysis, Fluid Dynamics, HeatTransfer and Magnetohydrodynamics

Page 43: Introduction to cfd

3/7/2012 Arvind Deshpande (VJTI) 43

Finite volume method

FLUENT, PHOENICS, and STAR-CD

Integration of the governing equations of fluid flow overall the (finite) control volumes of the solution domain.This is equivalent to applying a basic conservation law(e.g. for mass or momentum) to each control volume.

Discretisation involves the substitution of a variety offinite – difference – type approximations for the terms inthe integrated equation representing flow process suchas convection, diffusion and sources. This converts theintegral equations into a system of algebraic equations.

Solution of the algebraic equations by an iterativemethod.

Page 44: Introduction to cfd

3/7/2012 Arvind Deshpande (VJTI) 44

Rate of change of in the

control volume with respect to

time

=Net flux of due to

convection into the

control volume

+

Net flux of due to

diffusion into the

control volume

+

Net rate of creation

of inside the

control volume

Page 45: Introduction to cfd

3/7/2012 Arvind Deshpande (VJTI) 45

3.Post-processor

Versatile data visualization tools.

Domain geometry and grid display

Vector plots showing the direction and magnitude of the flow.

Line and shaded contour plots

2D and 3D surface plots

Particle tracking

View manipulation (translation, rotation, scaling etc.)

Visualization of the variation of scalar variables (variables whichhave only magnitude, not direction, such as temperature, pressureand speed) through the domain.

Quantitative numerical calculations.

Charts showing graphical plots of variables

Hardcopy output

Animation for dynamic result display

Data export facilities for further manipulation external to the code

Page 46: Introduction to cfd

3/7/2012 Arvind Deshpande (VJTI) 46

Page 47: Introduction to cfd

3/7/2012 Arvind Deshpande (VJTI) 47

Problem solving with CFD

Convergence – The property of a numerical method to produce a solution which approaches the exact solution as the grid spacing, is reduced to zero.

Consistency - The property of a numerical method to produce system of algebraic equations solution which are equivalent to original governing equations as the grid spacing, is reduced to zero.

Stability - associated with damping of errors as the numerical method proceeds. If a technique is not stable, even round off errors in the initial data can cause wild oscillations or divergence.

Page 48: Introduction to cfd

3/7/2012 Arvind Deshpande (VJTI) 48

Problem solving with CFD

Conservativeness – Local conservation of fluidproperty for each control volume. It also ensuresglobal conservation of fluid property for the entiredomain.

Boundedness – In a linear problem, without sourcesthe solution is bounded by the maximum andminimum boundary values of the flow variables.Similar to stability.

Transportiveness – Numerical schemes mustaccount for the directionality of influencing in termsof the relative strength of diffusion to convection.

Page 49: Introduction to cfd

3/7/2012 Arvind Deshpande (VJTI) 49

Problem solving with CFD

Convergence of iterative process – Residuals

(measure of overall conservation of the flow

properties) are very small.

Good initial grid design relies largely on an insight

into the expected properties of the flow.

Background in the fluid dynamics of the problem

and experience of meshing similar problems helps.

Grid independence study - A procedure of

successive refinement of initially coarse grid until

certain key results do not change.

Page 50: Introduction to cfd

3/7/2012 Arvind Deshpande (VJTI) 50

Problem solving with CFD

CFD is no substitute for experimental work, but a very powerful problemsolving tool.

Comparison with experimental test work

High end – Velocity measurements by hot wire or laser Doppleranemometer

Static pressure or temperature measurements with static pitot tubetraverse can also be useful.

Comparison with previous experience

Comparison with analytical solutions of similar but simpler flows.

Comparison with closely related problems reported in the literature e.gASME

Main outcome of any CFD exercise is improved understanding of thebehaviour of the system.

Main ingredients for success in CFD are experience and a thoroughunderstanding of the physics of the fluid flows and fundamentals of thenumerical algorithms.

Page 51: Introduction to cfd

3/7/2012 Arvind Deshpande (VJTI) 51

CFD – A Big Picture

CFD (computational fluid dynamics) is not a CFD software.

Commercial software are purely a set of tools which can be used to solvethe fluid mechanics problem numerically on a computer.

Commercial CFD codes may be extremely powerful, but their operation stillrequires a high level of skill and understanding from the operator to obtainmeaningful results in complex situations.

Users of CFD must know fundamentals of fluid dynamics, heat transfer,turbulence, chemical reactions and numerical solution algorithms. Theymust have adequate knowledge of the physics of the problem.

In CFD, the user is responsible for correctly choosing the tools. He mustnote that that CFD solution for a problem gets generated due the sequentialusage of chosen tools from the collection of tools available in the software.

The user of CFD must get familiarized with all possible tools before hestarts using them. Best solutions are possible if correct tools are chosen inthe correct sequence.

The quality of the results depends on the background of the user, quality of

the tools and the capability of the computer.

Page 52: Introduction to cfd

3/7/2012 Arvind Deshpande (VJTI) 52

Identification and formulation of flow

problem User must decide the physical and chemical phenomenon that needed

to be considered

e.g. 2-D or 3-D

Incompressible or compressible

Laminar or turbulent

Single phase or 2 phase

Steady or unsteady

To make right choices require good modeling skills

Assumptions are required to reduce the complexity to a manageable level while preserving the important features of the problem.

Appropriateness of the simplifications introduced partly governs quality of information generated by CFD

Engineers need CFD codes that produce physically realistic results with good accuracy in simulations with finite grid.

Page 53: Introduction to cfd

3/7/2012 Arvind Deshpande (VJTI) 53

Verification and Validation

Verification and validation increase our confidence in thesimulation

No computer software can be proved to have no errors.

We can state that software is wrong if evidence to this effect can becollected

Verification is solving the chosen equations right

Numerical techniques for verification involves finding out sources oferror in spatial & temporal discretisation, iterative convergence, androunding off errors

Checking out if time steps adequate for all situations

Validation is Solving the right equation

Is the simulation matching with experimental data

Experimental data helps validation of similar simulations

Scientific literature

Page 54: Introduction to cfd

3/7/2012 Arvind Deshpande (VJTI) 54

What basics do you need to do develop a

successful student of CFD ?

Develop a thorough understanding of the

fundamentals of Fluid Mechanics, Heat Transfer

and CFD

Get exposure to the physics and solution

algorithms

Develop good programming skills

Page 55: Introduction to cfd

3/7/2012 Arvind Deshpande (VJTI) 55

WHAT IS IMPORTANT?

CFD

Numerical

Methods

Mathematics

Fluid Mechanics, Heat Transfer

Page 56: Introduction to cfd

3/7/2012 Arvind Deshpande (VJTI) 56

WHAT IS IMPORTANT?

Focus of the technology

Fundamentals

Domain knowledge

Numerical modeling and its limitations

Long time investment

Software tools will follow

Learning the tool just acquiring the skills

Tools will facilitate the solution process

Keep on changing

Can be learnt is short span

Page 57: Introduction to cfd

3/7/2012 Arvind Deshpande (VJTI) 57

Career Opportunities in CFD – An

Overview CFD offers career opportunities in different areas based on the

specific interest and skill set of the students Code development

Development of various modules of CFD software

Can be for general purpose software or for codes for specific application

Application of CFD software For solving industrial problems in diverse areas

Testing & Validation of CFD codes Usually for QA of multipurpose commercial software

Documentation for CFD codes Writing technical documents like user guides for commercial CFD

codes

In industry, opportunities in CFD application are relatively more than those in development, testing and documentation

Page 58: Introduction to cfd

3/7/2012 Arvind Deshpande (VJTI) 58

Conclusions

• CFD is a powerful tool to solve complex flows in

engineering systems. However:

• Extreme care should be taken while:

Generating geometry and grids,

Choosing flow model,

Boundary conditions

Material properties

Convergence criteria (grid independence)

Unless proper inputs are given and solution is

checked, the solution we get may not be the real

solution!!-It will be GIGO

Page 59: Introduction to cfd

Syllabus1 Introduction: Definition and overview of CFD, need, Advantages of CFD,

Applications of CFD, CFD methodology, Convergence, consistency, stability,

iterative convergence, grid independence, Verification and validation

2

2 Governing equations of mass, momentum and energy : Derivation,

Discussion of physical meanings and Presentation of forms particularly suitable to

CFD, Boundary Conditions – Dirichlet, Neumann, Robbins, initial conditions,

mathematical behavior of partial differential equations – Elliptic, parabolic &

hyperbolic equations, impact on CFD

6

3 Discretisation methods – Introduction to Finite Difference Method, Finite Volume

Method, Finite Element Method

Finite Difference method – Introduction to finite differences, difference equation,

Solution of discretised equations, Tri Diagonal Matrix Algorithm, explicit and

implicit approach, Errors and analysis of stability, Von-Neumann stability method,

CFL condition

6

4 Grid Generation: Structured and Unstructured Grids, General transformations of

the equations, body fitted coordinate systems, Algebraic and Elliptic Methods, O-

type, C- type and H-type structured grid generation multi block structured grids,

adaptive grids

4

Page 60: Introduction to cfd

Syllabus

5 Finite volume method for diffusion problems (Conduction): Steady state one

dimensional and two dimensional heat conduction with or without heat generation,

dealing with Dirichlet, Neumann, and Robins type boundary conditions, Multi-solid

heat conduction, Non-linear Heat Conduction, Unsteady heat conduction- Explicit,

Crank-Nicolson , Implicit schemes

6

6 Finite volume method for advection-diffusion problems (Convection-

conduction): Steady One-dimensional and Two Dimensional Convection-

Diffusion, Advection schemes-Central, first order upwind, hybrid, power law,

Second order upwind, QUICK etc., Properties of advection schemes –

Conservativeness, boundedness, transportiveness, False diffusion, unsteady

advection - diffusion

6

7 Solution algorithms for pressure velocity coupling in steady flows:

Staggered grids, SIMPLE, SIMPLER, SIMPLEC, PISO algorithms, unsteady flows

6

8 Turbulence modeling : Turbulence, its effect on governing equations, turbulence

models – k-ε , RSM, ASM, LES etc.

4

9 Post processing – xy plots, contour plots, vector plots, streamline plots etc. 2

Page 61: Introduction to cfd

3/7/2012 Arvind Deshpande (VJTI) 61

Reference

1) An Introduction to Computational Fluid Dynamics, The Finite Volume Method

H K Versteeg and W Malalasekera, Pearson Education, 2008.

2) Numerical Heat Transfer and Fluid Flow –

S V Patankar, Taylor & Francis, 1980.

A standard text on the details of numerical method

3) Computational Fluid Dynamics, The basics with applications

John.D.Anderson, JR.,Mcgraw-Hill International edition, 1995

4) Computational Fluid Flow and Heat Transfer

K.Muralidhar and T.Sundararajan, Narosa, 2007

5) Computational methods for fluid dynamics

Ferziger and Peric, Springer, 2004

6) Introduction to Computational Fluid Dynamics

A.W. Date, Cambridge, 2005. Web Sites

www.cfd-online.com

Page 62: Introduction to cfd

3/7/2012 Arvind Deshpande (VJTI) 62

Thank You

Hope You Enjoyed the

Tour of

Colorful / Computational

Fluid Dynamics!