me747 lecture 3 - chainarongchainarong.me.engr.tu.ac.th/documents/me747 cfd/me747 lecture 3.pdf ·...

32
ME 747 Introduction to computational fluid dynamics By Chainarong Chaktranond Lecture 3 Overviews of governing equations for fluid flow and heat transfer

Upload: duongngoc

Post on 29-Aug-2019

227 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: ME747 Lecture 3 - Chainarongchainarong.me.engr.tu.ac.th/documents/ME747 CFD/ME747 Lecture 3.pdf · Chainarong Chaktranond, Thammasat University 3 Contents Ordinary differential equations

ME 747 Introduction to computational

fluid dynamics

By Chainarong Chaktranond

Lecture 3

Overviews of governing equations for fluid

flow and heat transfer

Page 2: ME747 Lecture 3 - Chainarongchainarong.me.engr.tu.ac.th/documents/ME747 CFD/ME747 Lecture 3.pdf · Chainarong Chaktranond, Thammasat University 3 Contents Ordinary differential equations

2Chainarong Chaktranond, Thammasat University

Lecture schedule

5. Introduction to solve engineering problems with finite-different method

- Taylor series expansion, Approximation of the second derivative, Initial condition and

Boundary conditions

6 – 7

4. Introduction to numerical methods

- Finite different method, Finite volume method, Finite element method, etc.

5

3. Overviews of governing equations for flow and heat transfer

-Elliptic, Parabolic and Hyperbolic equations

4

2. Introduction to Fortran programming

- Basic commands in Fortran programming

2 - 3

1.Overviews of computational fluid dynamics

- Overviews and importance of heat transfer in real applications1

TopicsSession

Page 3: ME747 Lecture 3 - Chainarongchainarong.me.engr.tu.ac.th/documents/ME747 CFD/ME747 Lecture 3.pdf · Chainarong Chaktranond, Thammasat University 3 Contents Ordinary differential equations

3Chainarong Chaktranond, Thammasat University

Contents

Ordinary differential equations (ODEs)

Partial differential equations (PDEs)

Page 4: ME747 Lecture 3 - Chainarongchainarong.me.engr.tu.ac.th/documents/ME747 CFD/ME747 Lecture 3.pdf · Chainarong Chaktranond, Thammasat University 3 Contents Ordinary differential equations

4Chainarong Chaktranond, Thammasat University

Ordinary differential equations (ODEs)

Classification for ordinary differential equations

Boundary valueInitial value

NonlinearLinear

System equationSingle equations

Higher orderFirst order

Page 5: ME747 Lecture 3 - Chainarongchainarong.me.engr.tu.ac.th/documents/ME747 CFD/ME747 Lecture 3.pdf · Chainarong Chaktranond, Thammasat University 3 Contents Ordinary differential equations

5Chainarong Chaktranond, Thammasat University

สมการอันดับ (n th order equation)

( )1, , ,...,n ny f x y y y −′=

สามารถลดอยูในระบบของสมการอันดับหนึ่ง โดยนิยาม

1y y=

1jjy y −= 1, 2,..., 1j n= −ซึ่ง

ดงันั้น1j jy y +′ = 1, 2,..., 1j n= −ซึ่ง

( )1 2, , ,...,n ny f x y y y′ =

Page 6: ME747 Lecture 3 - Chainarongchainarong.me.engr.tu.ac.th/documents/ME747 CFD/ME747 Lecture 3.pdf · Chainarong Chaktranond, Thammasat University 3 Contents Ordinary differential equations

6Chainarong Chaktranond, Thammasat University

Initial value problems

First-order ordinary differential equation

( ),dy f y tdt

= ( ) 00y y=

เราตองการหาคา ( )y t สําหรับ 0 ft t< ≤

สําหรับ numerical method ที่เวลา 1n nt t t+ = + Δ สําหรับ 0 nt t≤ ≤

( )1 1n ny y t+ +=คา y ณ เวลาถดัไปหาไดจาก

Page 7: ME747 Lecture 3 - Chainarongchainarong.me.engr.tu.ac.th/documents/ME747 CFD/ME747 Lecture 3.pdf · Chainarong Chaktranond, Thammasat University 3 Contents Ordinary differential equations

7Chainarong Chaktranond, Thammasat University

Taylors series methods

2 3

1 ...2 6n n n n nh hy y hy y y+ ′ ′′ ′′′= + + + +

ที่ซึ่ง h t= Δ

( ),n n ny f y t′ =( ),dy f y tdt

=จากสมการ

หาคําตอบที่เวลา 1nt + รอบคําตอบทีเ่วลา nt

ดงันั้นคาํตอบสมการอันดับหนึ่ง

( )1 ,n n n ny y hf y t+ = +

Page 8: ME747 Lecture 3 - Chainarongchainarong.me.engr.tu.ac.th/documents/ME747 CFD/ME747 Lecture 3.pdf · Chainarong Chaktranond, Thammasat University 3 Contents Ordinary differential equations

8Chainarong Chaktranond, Thammasat University

Equation forms

Hyperbolic problems (waves):

Quantum mechanics: Wave-function(position,time)

Elliptic (steady state) problems:

Electrostatic or Gravitational Potential: Potential(position)

Parabolic (time-dependent) problems:

Heat flow: Temperature(position, time)

Diffusion: Concentration(position, time)

Many problems combine features of above

Fluid flow: Velocity,Pressure,Density(position,time)

Elasticity: Stress,Strain(position,time)

Page 9: ME747 Lecture 3 - Chainarongchainarong.me.engr.tu.ac.th/documents/ME747 CFD/ME747 Lecture 3.pdf · Chainarong Chaktranond, Thammasat University 3 Contents Ordinary differential equations

9Chainarong Chaktranond, Thammasat University

Elliptic Type

Parabolic Type

Hyperbolic Type

different mathematical and physical behaviors

Fluid flow equations

Time : first-derivative (second-derivative for wave eqn)

Space: first- and second-derivatives

System of coupled equations for several variables

Classification of PDEs

Page 10: ME747 Lecture 3 - Chainarongchainarong.me.engr.tu.ac.th/documents/ME747 CFD/ME747 Lecture 3.pdf · Chainarong Chaktranond, Thammasat University 3 Contents Ordinary differential equations

10Chainarong Chaktranond, Thammasat University

0xuc

tu

=∂∂

+∂∂

0xuu

tu

=∂∂

+∂∂

Classification of PDEs

First-order linear wave equation (advection eq.)

Propagation of wave with speed c

Advection of passive scalar with speed c

First-order nonlinear wave equation (inviscid Burgers’s equation)

Page 11: ME747 Lecture 3 - Chainarongchainarong.me.engr.tu.ac.th/documents/ME747 CFD/ME747 Lecture 3.pdf · Chainarong Chaktranond, Thammasat University 3 Contents Ordinary differential equations

11Chainarong Chaktranond, Thammasat University

2

2

xu

xuu

tu

∂∂

=∂∂

+∂∂ α

2

2

xT

xTu

tT

∂∂

=∂∂

+∂∂ α

Classification of PDEs

Advection-diffusion equation (linear)

Burger’s equation (nonlinear)

Page 12: ME747 Lecture 3 - Chainarongchainarong.me.engr.tu.ac.th/documents/ME747 CFD/ME747 Lecture 3.pdf · Chainarong Chaktranond, Thammasat University 3 Contents Ordinary differential equations

12Chainarong Chaktranond, Thammasat University

0x

uxuu

tu

3

3

=∂∂

+∂∂

+∂∂ Nonlinear

dispersive wave

⎪⎩

⎪⎨⎧

==

∂∂

+∂∂

=∇Poisson :

Laplace : ),(

0f

0fyxf

yu

xuu 2

2

2

22

Korteweg-de Vries (KdV) equation

Laplace and Poisson’s equations

Other Common PDEs

Page 13: ME747 Lecture 3 - Chainarongchainarong.me.engr.tu.ac.th/documents/ME747 CFD/ME747 Lecture 3.pdf · Chainarong Chaktranond, Thammasat University 3 Contents Ordinary differential equations

13Chainarong Chaktranond, Thammasat University

Time-dependent harmonic waves

Propagation of acoustic waves

0ukyu

xu 2

2

2

2

2

=+∂∂

+∂∂

⎪⎩

⎪⎨⎧

<

>=

∂∂

+∂∂

hyperbolic :

elliptic :

0y

0y0

yu

xuy 2

2

2

2Mixed-type

Other Common PDEs

Helmholtz equation

Tricomi equation

Page 14: ME747 Lecture 3 - Chainarongchainarong.me.engr.tu.ac.th/documents/ME747 CFD/ME747 Lecture 3.pdf · Chainarong Chaktranond, Thammasat University 3 Contents Ordinary differential equations

14Chainarong Chaktranond, Thammasat University

0x

uctu

2

22

2

2

=∂∂

−∂∂

2

2

xT

tT

∂∂

=∂∂ α

Other Common PDEs

Wave equation

Fourier equation (Heat equation)

Page 15: ME747 Lecture 3 - Chainarongchainarong.me.engr.tu.ac.th/documents/ME747 CFD/ME747 Lecture 3.pdf · Chainarong Chaktranond, Thammasat University 3 Contents Ordinary differential equations

15Chainarong Chaktranond, Thammasat University

⎪⎪⎪⎪

⎪⎪⎪⎪

⎟⎟⎠

⎞⎜⎜⎝

⎛∂∂

+∂∂

+∂∂

−=∂∂

+∂∂

+∂∂

⎟⎟⎠

⎞⎜⎜⎝

⎛∂∂

+∂∂

+∂∂

−=∂∂

+∂∂

+∂∂

=∂∂

+∂∂

2

2

2

2

2

2

2

2

yv

xv

yp1

yvv

xvu

tv

yu

xu

xp1

yuv

xuu

tu

0yv

xu

νρ

νρ

Navier-Stokes Equations

Navier-Stokes equation

Primitive variables

Page 16: ME747 Lecture 3 - Chainarongchainarong.me.engr.tu.ac.th/documents/ME747 CFD/ME747 Lecture 3.pdf · Chainarong Chaktranond, Thammasat University 3 Contents Ordinary differential equations

16Chainarong Chaktranond, Thammasat University

⎪⎪⎩

⎪⎪⎨

⎟⎟⎠

⎞⎜⎜⎝

⎛∂∂

+∂∂

=∂∂

+∂∂

+∂∂

−=∇

2

2

2

2

2

yxyv

xu

tωωνωωω

ωψ

Navier-Stokes equation

Vorticity / stream function formulation

Navier-Stokes Equations

Page 17: ME747 Lecture 3 - Chainarongchainarong.me.engr.tu.ac.th/documents/ME747 CFD/ME747 Lecture 3.pdf · Chainarong Chaktranond, Thammasat University 3 Contents Ordinary differential equations

17Chainarong Chaktranond, Thammasat University

One real (double) root, one characteristic direction (typically t = const)

The solution is marching in time (or spatially) with given initial

conditions

The solution will be modified by the boundary conditions (time-dependent,

in general) during the propagation

Any change in boundary conditions at t1 will not affect solution at t < t1,

but will change the solution after t = t1

Parabolic PDEs

Page 18: ME747 Lecture 3 - Chainarongchainarong.me.engr.tu.ac.th/documents/ME747 CFD/ME747 Lecture 3.pdf · Chainarong Chaktranond, Thammasat University 3 Contents Ordinary differential equations

18Chainarong Chaktranond, Thammasat University

0GFuyuE

xuD

yuC

yxuB

xuA 2

22

2

2

=++∂∂

+∂∂

+∂∂

+∂∂

∂+

∂∂

⎪⎩

⎪⎨

>−=−<−

hyperbolic:parabolic:elliptic:

tionClassifica0AC4B0AC4B0AC4B

2

2

2

Linear second-order PDE in two independent variables (x,y), (x,t), etc.

A, B, C, …, G are constant coefficients (may be generalized)

General 2nd order partial differential equations

Page 19: ME747 Lecture 3 - Chainarongchainarong.me.engr.tu.ac.th/documents/ME747 CFD/ME747 Lecture 3.pdf · Chainarong Chaktranond, Thammasat University 3 Contents Ordinary differential equations

19Chainarong Chaktranond, Thammasat University

The classification depends only on the highest-order derivatives (independent of D, E, F, G)

For nonlinear problems [A,B,C = f(x,y,u)],

Physical processes are independent of coordinates

Introduction of simpler flow categories (approximations) may change the equation type

0GFuEuDuCuBuAu yxyyxyxx =++++++

Steady-state : parabolic → elliptic

Boundary-layer : elliptic → parabolic

Classification of PDEs

Page 20: ME747 Lecture 3 - Chainarongchainarong.me.engr.tu.ac.th/documents/ME747 CFD/ME747 Lecture 3.pdf · Chainarong Chaktranond, Thammasat University 3 Contents Ordinary differential equations

20Chainarong Chaktranond, Thammasat University

0GFuEuDuCuBuAu yxyyxyxx =++++++

⎪⎪⎩

⎪⎪⎨

−=∂∂

−∂∂

=∂∂

+∂∂

order)(second

order)-(first 22

0x

ct

0x

ut

22

2

φφ

φφAdvection equation

Wave equation

Classification of PDEs

General form of second-order PDEs (2 variables)

(1) Hyperbolic PDEs (Propagation)

Page 21: ME747 Lecture 3 - Chainarongchainarong.me.engr.tu.ac.th/documents/ME747 CFD/ME747 Lecture 3.pdf · Chainarong Chaktranond, Thammasat University 3 Contents Ordinary differential equations

21Chainarong Chaktranond, Thammasat University

0GFuEuDuCuBuAu yxyyxyxx =++++++

⎪⎪⎩

⎪⎪⎨

∂∂

=∂∂

∂∂

=∂∂

+∂∂

2

2

2

2

xt

x

νx

ut

φαφ

φφφBurger’s equation

Fourier equation

Diffusion /

dispersion

Classification of PDEs

(2) Parabolic PDEs (Time- or space-marching)

General form of second-order PDEs (2 variables)

Page 22: ME747 Lecture 3 - Chainarongchainarong.me.engr.tu.ac.th/documents/ME747 CFD/ME747 Lecture 3.pdf · Chainarong Chaktranond, Thammasat University 3 Contents Ordinary differential equations

22Chainarong Chaktranond, Thammasat University

0GFuEuDuCuBuAu yxyyxyxx =++++++

⎪⎪⎪⎪

⎪⎪⎪⎪

=+∂∂

+∂∂

=∂∂

+∂∂

=∂∂

+∂∂

0cyx

yxfyx

0yx

22

2

2

2

2

2

2

2

2

2

2

2

φφφ

φφ

φφ

),(

Laplace equation

Possion’s equation

Helmholtz equation

(3) Elliptic PDEs (Diffusion, equilibrium problems)

General form of second-order PDEs (2 variables)

Classification of PDEs

Page 23: ME747 Lecture 3 - Chainarongchainarong.me.engr.tu.ac.th/documents/ME747 CFD/ME747 Lecture 3.pdf · Chainarong Chaktranond, Thammasat University 3 Contents Ordinary differential equations

23Chainarong Chaktranond, Thammasat University

0GFuEuDuCuBuAu yxyyxyxx =++++++

⎩⎨⎧

><

=∂∂

+∂∂

−supersonic :subsonic :

)(1M1M

0ns

M1 2

2

2

22 φφ

Steady, compressible potential flow

Classification of PDEs

(4) Mixed-type PDEs

General form of second-order PDEs (2 variables)

Page 24: ME747 Lecture 3 - Chainarongchainarong.me.engr.tu.ac.th/documents/ME747 CFD/ME747 Lecture 3.pdf · Chainarong Chaktranond, Thammasat University 3 Contents Ordinary differential equations

24Chainarong Chaktranond, Thammasat University

0GFuEuDuCuBuAu yxyyxyxx =++++++

Navier-Stokes Equations

⎪⎪⎪⎪

⎪⎪⎪⎪

⎟⎟⎠

⎞⎜⎜⎝

⎛∂∂

+∂∂

+∂∂

−=∂∂

+∂∂

+∂∂

⎟⎟⎠

⎞⎜⎜⎝

⎛∂∂

+∂∂

+∂∂

−=∂∂

+∂∂

+∂∂

=∂∂

+∂∂

2

2

2

2

2

2

2

2

yv

xv

yp1

yvv

xvu

tv

yu

xu

xp1

yuv

xuu

tu

0yv

xu

νρ

νρ

(5) System of Coupled PDEs

Classification of PDEs

General form of second-order PDEs (2 variables)

Page 25: ME747 Lecture 3 - Chainarongchainarong.me.engr.tu.ac.th/documents/ME747 CFD/ME747 Lecture 3.pdf · Chainarong Chaktranond, Thammasat University 3 Contents Ordinary differential equations

25Chainarong Chaktranond, Thammasat University

Boundary Value Problems

Elliptic PDE

“Jury” Problem (every juror must agree on the same verdict)

The entire solution is passed on a jury requiring satisfaction of all boundary conditions and all internal requirements

Usually “steady-state”

Equilibrium Problems

Page 26: ME747 Lecture 3 - Chainarongchainarong.me.engr.tu.ac.th/documents/ME747 CFD/ME747 Lecture 3.pdf · Chainarong Chaktranond, Thammasat University 3 Contents Ordinary differential equations

26Chainarong Chaktranond, Thammasat University

Initial Value Problems

Hyperbolic or Parabolic

“Marching” problems

Unsteady, transient, steady shock, boundary-layer (space-marching), …

The solution marched out from the initial state guided and modified in transient by the side boundary conditions

Parabolic – marching in certain direction, equilibrium in the other directions

Propagation Problems

Page 27: ME747 Lecture 3 - Chainarongchainarong.me.engr.tu.ac.th/documents/ME747 CFD/ME747 Lecture 3.pdf · Chainarong Chaktranond, Thammasat University 3 Contents Ordinary differential equations

27Chainarong Chaktranond, Thammasat University

R

∂R

s

n

Boundary and Initial Conditions

Initial conditions: starting point for propagation problems

Boundary conditions: specified on domain boundaries to provide the interior

solution in computational domain

(i) Dirichlet condition: on u f R= ∂

(ii) Neumann condition: or on u uf g Rn s∂ ∂

= = ∂∂ ∂

Page 28: ME747 Lecture 3 - Chainarongchainarong.me.engr.tu.ac.th/documents/ME747 CFD/ME747 Lecture 3.pdf · Chainarong Chaktranond, Thammasat University 3 Contents Ordinary differential equations

28Chainarong Chaktranond, Thammasat University

⎪⎩

⎪⎨⎧

===

====

⎩⎨⎧

=

=

=+++

)(

)( ),(

0

SuQP

TuQRuPthen

uQuP

let

HCuBuAu

xyxy

yyyxxx

y

x

yyxyxx

dydxu

dydQu

dxdyu

dxdPu

dyudxudyQdxQdQ

dyudxudyPdxPdP

xyyyxyxx

yyxyyx

xyxxyx

−=−=⇒

⎪⎩

⎪⎨⎧

+=+=

+=+=

;

Second-Order PDEs

Second-order PDE in two variables

Express every derivative in terms of uxy

Page 29: ME747 Lecture 3 - Chainarongchainarong.me.engr.tu.ac.th/documents/ME747 CFD/ME747 Lecture 3.pdf · Chainarong Chaktranond, Thammasat University 3 Contents Ordinary differential equations

29Chainarong Chaktranond, Thammasat University

0=⎥⎦

⎤⎢⎣

⎡−+⎟

⎠⎞

⎜⎝⎛−++⎟⎟

⎞⎜⎜⎝

⎛+⎟

⎠⎞

⎜⎝⎛=

+++

dydxCB

dxdyAuH

dydQC

dxdPA

HCuBuAu

xy

yyxyxx

0 then

00 Choose2

=+⎟⎟⎠

⎞⎜⎜⎝

⎛+⎟

⎠⎞

⎜⎝⎛

=+⎟⎠⎞

⎜⎝⎛−⎟

⎠⎞

⎜⎝⎛⇔=−+⎟

⎠⎞

⎜⎝⎛−

HdydQC

dxdPA

CdxdyB

dxdyA

dydxCB

dxdyA

involves only total

differentials

Second-Order PDEs

Eliminate the dependence on partial derivatives

Page 30: ME747 Lecture 3 - Chainarongchainarong.me.engr.tu.ac.th/documents/ME747 CFD/ME747 Lecture 3.pdf · Chainarong Chaktranond, Thammasat University 3 Contents Ordinary differential equations

30Chainarong Chaktranond, Thammasat University

A2AC4BB

dxdy 0C

dxdyB

dxdyA

22−±

=⇒=+⎟⎠⎞

⎜⎝⎛−⎟

⎠⎞

⎜⎝⎛

⎪⎪

⎪⎪

<−

=−

>−

)directions npropagatio the identify(cannot rootscomplex two ,04 :Elliptic

istics)(characterroot real one ,04 :Parabolic istics)(character roots real two ,04 :Hyperbolic

2

2

2

ACBACBACB

Characteristic Equation

Characteristic equation for second-order PDE

Classification of second-order PDEs

Page 31: ME747 Lecture 3 - Chainarongchainarong.me.engr.tu.ac.th/documents/ME747 CFD/ME747 Lecture 3.pdf · Chainarong Chaktranond, Thammasat University 3 Contents Ordinary differential equations

31Chainarong Chaktranond, Thammasat University

Two real roots, two characteristic directions

Two propagation (marching) directions

Domain of dependence

Domain of influence

(ux,uy,vx,vy) are not uniquely defined along the characteristic lines, discontinuity may occur

Boundary conditions must be specified according to the characteristics

Hyperbolic PDEs

Page 32: ME747 Lecture 3 - Chainarongchainarong.me.engr.tu.ac.th/documents/ME747 CFD/ME747 Lecture 3.pdf · Chainarong Chaktranond, Thammasat University 3 Contents Ordinary differential equations

32Chainarong Chaktranond, Thammasat University

The derivatives (ux,uy,vx,vy) can always be uniquely determined at every point in the solution domain

No marching or propagation direction !

Boundary conditions needed on all boundaries

The solution will be continuous (smooth) in the entire solution domain

Jury problem - all boundary conditions must be satisfied simultaneously

Elliptic PDEs