computational fluid dynamics me880 01.pdf

33
Computational Fluid Dynamics Course code - ME880 Instructor: Kuldhir Singh Bhati

Upload: abdul-hakeem-semar-kamaluddin

Post on 01-Nov-2014

25 views

Category:

Documents


0 download

DESCRIPTION

CFD

TRANSCRIPT

Page 1: Computational Fluid Dynamics ME880 01.pdf

Computational Fluid Dynamics

Course code - ME880

Instructor: Kuldhir Singh Bhati

Page 2: Computational Fluid Dynamics ME880 01.pdf

1995 Edition2012 Reprint

“This CFD book is truly for beginners....Absolutely no prior knowledge of CFDis assumed on your part-only your desireto learn something is taken for granted....It is not state-of-art treatment of themodern, sophisticated CFD of today.”

“This book is in part the product of theauthors experience in teaching a week short course titled ‘Introduction to CFD’for ten years at the Von Karman Institutefor Fluid Dynamics at Sint-Genesius-RodeBelgium.”

Page 3: Computational Fluid Dynamics ME880 01.pdf

All the mathematical sciences are founded on relations between physical laws and laws of numbers,

so that the aim of exact sciences is to reduce the problems of nature to

the determination of quantities by operations with numbers.

-James Clerk Maxwell, 1856

Page 4: Computational Fluid Dynamics ME880 01.pdf

Commonly used methods in CFD:

1. Finite Difference Method (FDM)2. Finite Volume Method (FVM)3. Finite Element Method (FEM)4. Boundary Element Method (BEM)5. Immersed Boundary Methods (IBM)6. Boundary Integral Method (BIM)7. Spectral Volume Method8. Spectral element Method

Page 5: Computational Fluid Dynamics ME880 01.pdf

Early development of CFD in 1960-70s was driven by the need of Aerospace industry.

Man always wanted to fly faster and higher (low drag).

Experimental facilities (wind tunnels) were not available for all flight regimes.

CFD was able to calculate complete 3-D flow field for complete aircraft.

However theory and experiment hold own importance and will never be replaced by CFD.

Page 6: Computational Fluid Dynamics ME880 01.pdf

Governing Equations

CFD is based on fundamental governing equations of fluid dynamics i.e. mass,momentum and energy conservation.

Depending on type of model applied to flow field (Control volume/control mass, Lagrangian/Eulerian), particular mathematical form of governing equation appears.

CFD algorithms based on these different form of governing equation (conservative – non-conservative, integral – differential) behave differently in terms of accuracy and stability.

These algorithm solve governing equations (G.E.) subjected to appropriate boundary conditions.

Page 7: Computational Fluid Dynamics ME880 01.pdf

Models of Flow

Solid body in translation motion – velocity of all parts SAMEFluid in motion – velocity may be DIFFERENT.

BIG QUESTION of HOUR is:“How to visualize moving fluid so as to apply physical principles to it?”‘Models of flow’ help us in visualizing flow & applying physical laws to it

FOUR models for continuum fluid:Finite Control Volume (FCV) – closed volume drawn within finite region of flow.Fluid only in this region is analyzed. Leads to integral form of G.E.1. FCV fixed – conservative form2. FCV moving – non-conservative form

Infinitesimal Fluid Element (IFE) – differential fluid element but large enough to form continuum. Give differential form of G.E.3. IFE fixed – conservative form4. IFE moving – non-conservative form

5. Statistical Model – Microscopic approach.

Page 8: Computational Fluid Dynamics ME880 01.pdf
Page 9: Computational Fluid Dynamics ME880 01.pdf

Substantial Derivative

Consider general unsteady flow field:

u=u(x,y,z,t)v=v(x,y,z,t)w=w(x,y,z,t)ρ= ρ(x,y,z,t)

When fluid element move from 1 to 2change in density by Taylor series is given as:

2 1 2 1 2 1 2 1 2 11 1 11

( ) ( ) ( ) ( )x x y y z z t tx y z tρ ρ ρ ρρ ρ

⎛ ⎞∂ ∂ ∂ ∂⎛ ⎞ ⎛ ⎞ ⎛ ⎞= + − + − + − + − +⎜ ⎟⎜ ⎟ ⎜ ⎟ ⎜ ⎟∂ ∂ ∂ ∂⎝ ⎠ ⎝ ⎠ ⎝ ⎠⎝ ⎠

Higher order terms of ∆x ∆y,∆y ∆z, ∆z ∆x, ∆x ∆t etc. neglected

- It, apart from , is frequently used in governing equations of fluid flow..V∇

Page 10: Computational Fluid Dynamics ME880 01.pdf

2 1 2 1 2 1 2 1

2 1 2 1 2 1 2 1

2 1 2 1 2 1 2 1

t t t t t t t t

x x y y z zLim Lim Lim Limt t x t t y t t z t t tρ ρ ρ ρ ρ ρ

→ → → →

− − − −∂ ∂ ∂ ∂= + + +

− ∂ − ∂ − ∂ − ∂

Average rate of change of density when fluid move from 1 to 2

Instantaneous rate change of density as fluid move through point 1

D u v wDt x y z tρ ρ ρ ρ ρ∂ ∂ ∂ ∂= + + +

∂ ∂ ∂ ∂

D u v wDt x y z t

∂ ∂ ∂ ∂≡ + + +

∂ ∂ ∂ ∂

Substantial / Total / Material derivative operator in Cartesian coordinates

Local derivativeConvective derivative

Page 11: Computational Fluid Dynamics ME880 01.pdf

( . )D VDt tρ ρ ρ∂≡ + ∇∂

Coordinate independent form:

ρ∇ Vector represents “spatial variation of ρ” along direction of maximum change of ρ

.V ρ∇ represents change of ρ, particle experience as it moves with velocity V

Using nabla or del vector operator :

ˆˆ ˆi j kx y z∂ ∂ ∂

∇ ≡ + +∂ ∂ ∂

e.g. Grasshopper moving in field of colorful flowers and changing its color.

Page 12: Computational Fluid Dynamics ME880 01.pdf

Divergence of velocity

Mass of FCV remain same but its volume and hence density changes with time as it moves in space.

( ).V t dSυΔ = Δ

displacement

Area vector

Total change in volume of C.V. over a period of time ∆t, ( ).s

V t dSυΔ = Δ∫∫As ∆t is constant for complete C.V., .

s

V dSt

υΔ=

Δ ∫∫

Page 13: Computational Fluid Dynamics ME880 01.pdf

when ∆t 0, .s

DV dSDt

υ= ∫∫Material/Substantial derivative

Let C.V. shrunk to very small volume δV, such that is constant within δV

Applying Gauss Divergence Theorem,

( . )v

DV dVDt

υ= ∇∫∫∫

.υ∇

( ) ( . )D V VDtδ υ δ= ∇

1 ( ). D VV Dt

δυδ

∇ =

Divergence of velocity means time rate of change of volume per unit volume of fluid.In general, this will be constant within δV if volume of C.V. tend to zero.

Page 14: Computational Fluid Dynamics ME880 01.pdf

Continuity Equation

Conservation of Mass(Physical Law)

Model of flow Continuity Equation(Various Mathematical forms)

1. FCV fixed in space: Net mass flow rate going OUT of C.V.=Time rate of decrease of mass inside

.s v

dS dVt

ρυ ρ∂= −

∂∫∫ ∫∫∫

. 0v s

dV dSt

ρ ρυ∂+ =

∂ ∫∫∫ ∫∫

Integral, conservative form of continuity equation.

Page 15: Computational Fluid Dynamics ME880 01.pdf

2. FCV moving in space:

v

dV constρ =∫∫∫V is changing as C.V. moves in space with time.But mass remains same.

0v

D dVDt

ρ =∫∫∫

Integral, non-conservative form of continuity equation.

Page 16: Computational Fluid Dynamics ME880 01.pdf

3. IFE fixed in space (in Cartesian coordinate):

There is mass flow across the element.

By Net OUTFLOW in x-direction =

( )u dxdydzxρ∂∂

Similarly and in y & zdirections respectively.

( )v dxdydzyρ∂∂

( )w dxdydzzρ∂∂

m Aρ υ=

Page 17: Computational Fluid Dynamics ME880 01.pdf

( ) ( ) ( ) 0u v wt x y zρ ρ ρ ρ⎡ ⎤∂ ∂ ∂ ∂+ + + =⎢ ⎥∂ ∂ ∂ ∂⎣ ⎦

Since volume of element don’t change with time,

In Coordinate independent form,

Net mass flow rate going OUT of I.E.=Time rate of decrease of mass inside

Using same mass conservation principle,

( ) ( ) ( ) ( )u v w dxdydz dxdydzx y z tρ ρ ρ ρ

⎡ ⎤∂ ∂ ∂ ∂+ + = −⎢ ⎥∂ ∂ ∂ ∂⎣ ⎦

.( ) 0tρ ρυ∂+∇ =

Differential, conservative form of continuity equation.

Page 18: Computational Fluid Dynamics ME880 01.pdf

4. IFE moving in space (in Cartesian coordinate):

This has fixed mass but its volume and shape will be changing as it moves in space.

( , , , )m x y z t Vδ ρ δ=

( ) ( ) 0D m D D VVDt Dt Dtδ ρ δδ ρ= + =

1 ( ) 0D D VDt V Dtρ δρ

δ⎡ ⎤+ =⎢ ⎥⎣ ⎦

. 0DDtρ ρ υ+ ∇ =

Differential, non-conservative form of continuity equation.

Page 19: Computational Fluid Dynamics ME880 01.pdf

All forms are same mathematically

FCV to IFE (fixed in space):

. 0v s

dV dSt

ρ ρυ∂+ =

∂ ∫∫∫ ∫∫Since volume of FCV don’t change with time,

. 0v s

dV dStρ ρυ∂

+ =∂∫∫∫ ∫∫

Using Gauss Divergence Theorem,

.( ) 0v

dVtρ ρυ∂⎡ ⎤+∇ =⎢ ⎥∂⎣ ⎦∫∫∫

FCV is drawn arbitrary in space. So integrand has to be zero at every point within FCV

.( ) 0tρ ρυ∂+∇ =

Page 20: Computational Fluid Dynamics ME880 01.pdf

IFE (fixed in space) to IFE (moving in space):

.( ) 0tρ ρυ∂+∇ =

∂Expanding divergence term,

. . 0tρ υ ρ ρ υ∂+ ∇ + ∇ =

∂Substantial derivative

. 0DDtρ ρ υ+ ∇ =

In integral equation, separate consideration need NOT be given to account for discontinuities in flow like shock wave. Hence these eq. are more fundamental.

Differential form of G.E. assume flow properties are differentiable, hence continuous.

Page 21: Computational Fluid Dynamics ME880 01.pdf

Momentum Equation

Applying Newton II law to our fourth model of flow.

(Other models lead to other form of momentum equation analogous to continuity equation.)

Fx=maxFy=mayFz=maz

1. Long range force or Body force=ρfx(dxdydz)

2. Short range force orSurface Force due to:

a) Pressure b) Shear & Normal stresses

Consider only this eq

Page 22: Computational Fluid Dynamics ME880 01.pdf

denotes stress in j direction exerted on plane perpendicular to i axis.ijτDirections are as per convention that positive increase in velocities occur in positive directions of axes, which result in tugging and dragging action on faces.

Balancing forces in x-direction,

yxxx zxx x x

p dxdydz f dxdydz F max x y z

ττ τ ρ∂⎡ ⎤∂ ∂∂

− + + + + = =⎢ ⎥∂ ∂ ∂ ∂⎣ ⎦

m=ρdxdydz

As we are considering moving fluid element model, ax=Du/DtThis gives

yxxx zxx

Du p fDt x x y z

ττ τρ ρ∂∂ ∂∂

= − + + + +∂ ∂ ∂ ∂

This is Navier Stokes eq in non-conservative, scalar form.

Similar equations can be written for y & z directions.

Page 23: Computational Fluid Dynamics ME880 01.pdf

.( ) .( )Du u u uDt t t

ρ ρρ ρυ ρ υ∂ ∂⎛ ⎞= − +∇ +∇⎜ ⎟∂ ∂⎝ ⎠

0 (by continuity eq of 3rd model)

Substituting this in momentum eq we obtain its conservative form,

( ) .( ) yxxx zxx

u pu ft x x y z

ττ τρ ρ υ ρ∂∂ ∂∂ ∂

+∇ = − + + + +∂ ∂ ∂ ∂ ∂

Newton found that shear stress is proportional to velocity gradients for some fluids. Such fluid are called Newtonian fluids.

Physical significance of Normal stress:Normal stresses causes time rate of change of volume of fluid element andhence are related to velocity gradients (physical meaning of divergence of velocity).

From definition of substantial derivative and differentiation,

( ). .( ) .( )Du u uu u u uDt t t t

ρ ρρ ρ ρυ ρ υ ρυ∂ ∂ ∂⎛ ⎞= + ∇ = − +∇ − ∇⎜ ⎟∂ ∂ ∂⎝ ⎠

Page 24: Computational Fluid Dynamics ME880 01.pdf

Energy Equation

We again uses moving IFE model and apply 1st law of thermodynamics to it.

Rate change of Energy of element

= Net heat flux IN – Rate of work done BY element

= Net heat flux IN + Rate of work done ON element

1. Rate of work done by forces ON element :

Work done by body force acting in x-direction = uFbx = uρfxdxdydz

(This is positive because velocities are considered to be positive axes direction.Hence forces in positive direction do positive work, while forces in negative direction do negative work.)

Page 25: Computational Fluid Dynamics ME880 01.pdf

( )( ) ( )( ) yxxx zxx

uu uup uf dxdydzx x y z

ττ τ ρ∂⎛ ⎞∂ ∂∂

− + + + +⎜ ⎟∂ ∂ ∂ ∂⎝ ⎠

Rate at which work is done by surface forces acting in x-direction,

Page 26: Computational Fluid Dynamics ME880 01.pdf

Rate at which work is done by surface forces acting in y-direction,

( ) ( ) ( )( ) xy yy zyy

v v vvp vf dxdydzy x y z

τ τ τρ

∂ ∂ ∂⎛ ⎞∂− + + + +⎜ ⎟∂ ∂ ∂ ∂⎝ ⎠

( )( ) ( )( ) yzxz zzz

ww wwp wf dxdydzz x y z

ττ τ ρ∂⎛ ⎞∂ ∂∂

− + + + +⎜ ⎟∂ ∂ ∂ ∂⎝ ⎠

Rate at which work is done by surface forces acting in z-direction,

Total rate of doing work on fluid element,.( )pυ∇

( )( ) ( )( ) ( ) ( ) yxxx zxuu uup vp wpx y z x y z

ττ τ∂⎡⎛ ⎞ ∂ ∂∂ ∂ ∂= − + + + + +⎢⎜ ⎟∂ ∂ ∂ ∂ ∂ ∂⎝ ⎠⎣

( ) ( ) ( ) ( )( ) ( ) .xy yy zy yzxz zzv v v ww w f dxdydzx y z x y zτ τ τ ττ τ ρ υ

∂ ∂ ∂ ∂ ⎤∂ ∂+ + + + + + + ⎥∂ ∂ ∂ ∂ ∂ ∂ ⎦

Page 27: Computational Fluid Dynamics ME880 01.pdf

2. Net heat flux IN :

= Volumetric Heat generation + Heat flow through boundaries into the element.

(energy stored will be accounted by change in total energy of fluid element)

Volumetric Heat generation rate = gQ dxdydzρ

Net heat transfer in x-direction due to thermal conduction =

x xx x

q qq q dx dydz dxdydzx x

⎡ ∂ ⎤ ∂⎛ ⎞− + = −⎜ ⎟⎢ ⎥∂ ∂⎝ ⎠⎣ ⎦

Given by Fourier law of heat conductionNet Heat flow IN to the element

yx zg

qq qQ dxdydzx y z

ρ⎡ ∂ ⎤⎛ ⎞∂ ∂

= − + +⎢ ⎥⎜ ⎟∂ ∂ ∂⎝ ⎠⎣ ⎦

.( )gQ k T dxdydzρ⎡ ⎤= +∇ ∇⎣ ⎦

Page 28: Computational Fluid Dynamics ME880 01.pdf

3. Rate change of Kinetic Energy + Internal energy of element :2

2D e dxdydzDt

υρ⎡ ⎤

= +⎢ ⎥⎣ ⎦

Substituting all three expressions in 1st law, we get

per unit mass

This is Non- conservative form of energy equation in terms of total energy.

2 ( )( ) ( ).( ) .( )2

yxxx zxg

uu uD e Q k T pDt x y z

ττ τυρ ρ υ∂⎛ ⎞ ∂ ∂

+ = +∇ ∇ −∇ + + +⎜ ⎟ ∂ ∂ ∂⎝ ⎠

( ) ( ) ( ) ( )( ) ( ) .xy yy zy yzxz zzv v v ww w fx y z x y zτ τ τ ττ τ ρ υ

∂ ∂ ∂ ∂∂ ∂+ + + + + + +

∂ ∂ ∂ ∂ ∂ ∂

Page 29: Computational Fluid Dynamics ME880 01.pdf

2( / 2) . yx xy yy zyxx zxD p u vDt x y z x y z

τ τ τ ττ τυρ υ∂ ∂ ∂ ∂⎛ ⎞ ⎛ ⎞∂ ∂

= − ∇ + + + + + +⎜ ⎟ ⎜ ⎟∂ ∂ ∂ ∂ ∂ ∂⎝ ⎠ ⎝ ⎠

Subtracting it from previous and using complementary nature of shear stresses we get;

This is Non- conservative form of energy eq in terms of internal energy.(Conservative form of energy eq can be obtained using similar approach as thatfollowed in momentum eq. section)

.( ) .g xx yy zzDe u v wQ k T pDt x y z

ρ ρ υ τ τ τ∂ ∂ ∂= +∇ ∇ − ∇ + + +

∂ ∂ ∂

yx zx zyu v u w v wy x z x z y

τ τ τ⎛ ⎞ ⎛ ⎞∂ ∂ ∂ ∂ ∂ ∂⎛ ⎞+ + + + + +⎜ ⎟ ⎜ ⎟⎜ ⎟∂ ∂ ∂ ∂ ∂ ∂⎝ ⎠⎝ ⎠ ⎝ ⎠

Multiplying non-conservative form of momentum eq with respective velocities and adding them up we get;

.yzxz zzw fx y z

ττ τ ρ υ∂⎛ ⎞∂ ∂

+ + + +⎜ ⎟∂ ∂ ∂⎝ ⎠

Page 30: Computational Fluid Dynamics ME880 01.pdf

This can further be written in terms of flow field variables alone i.e. u,v,w,T,ρ, using Stokes relations for shear stress;

2 . 232 . 232 . 23

xx

yy

zz

uxvywz

τ μ υ μ

τ μ υ μ

τ μ υ μ

∂= − ∇ +

∂∂

= − ∇ +∂∂

= − ∇ +∂

yx

zx

yz

v ux yu wz x

w vy z

τ μ

τ μ

τ μ

⎡ ⎤∂ ∂= +⎢ ⎥∂ ∂⎣ ⎦

∂ ∂⎡ ⎤= +⎢ ⎥∂ ∂⎣ ⎦⎡ ⎤∂ ∂

= +⎢ ⎥∂ ∂⎣ ⎦

Continuity, momentum & energy eqs combined together are known as Navier-Stokes (N-S) equations.

If we neglect effect of dissipative viscous forces and thermal conduction, we get invicid form of N-S equations; popularly known as Euler equation.

. 0DDtρ ρ υ+ ∇ =

D p fDtυρ ρ= −∇ +

2

.( ) .2 g

D e Q p fDt

υρ ρ υ ρ υ⎛ ⎞

+ = −∇ +⎜ ⎟⎝ ⎠

(In non-conservative form)

Page 31: Computational Fluid Dynamics ME880 01.pdf

N-S eqs are coupled quasi-linear PDEs. These represent flow flied around any object in universe. Uniqueness of flow is dictated by boundary conditions.

Boundary conditions:1. Velocities:No-slip: u=v=w=0Free slip: Vin=0

2. Temperature:Constant wall temperature T=Tw

Constant Heat flux w

w

qTn k

∂= −

0 for adiabatic

Pressure and density falls out as a part of solution.

Other boundary conditions: Inflow and Outflow boundary conditions.

Page 32: Computational Fluid Dynamics ME880 01.pdf

Conservative form“The distinction CFD places between conservation and non-conservation forms is anoutgrowth of the realities of numerical solutions-it is relevant to CFD only.”

Conservative form (also known as divergence form) provide computer programming convenience, as SINGLE expression can represent all eqs.

U F G H Jt x y z

∂ ∂ ∂ ∂+ + + =

∂ ∂ ∂ ∂

Conservative form was obtained from IFE fixed in space, hencefluxes (represented by F,G,H) appear as dependent variable in eqs.

e.g. for continuity eq., F=ρu=mass flux in x-directionfor momentum eq, F=ρu2=momentum flux in x-direction

Source termFlux variablee.g. ρ, ρu etc.

“Because the conservation form uses flux variables as the dependent variables and because the changes in these flux variables are small across a shock wave, the numerical quality of a shock capturing method will be enhanced by the use of the conservation form.”

Page 33: Computational Fluid Dynamics ME880 01.pdf

[(Time dependent) Solution of steady flow problems can be obtained by pseudo time stepping where steady state is approached at large time.

However steady flow solution can also be obtained by marching in spatial direction,subjected to mathematical nature of G.E. For such case transient term is set to zero.]

Shock capturing method:N-S eqs solved without special consideration of oblique shock eqs. Location of shockis unknown. Solution neither give exact location of shock due to grid refinement limits.

Shock fitting method:Exact location of shock is known a priori. Combination with shock capturing method givegood solution.