chapter 8 - fvm for transient problems

37
1 Chapter 8: The Finite Volume Method for Transient Problems Presented by: Prof. Ir. Dr. Shahrir Abdullah Dr. Wan Mohd Faizal Wan Mahmood Dept. of Mechanical & Materials Engineering Universiti Kebangsaan Malaysia KKKJ4164 COMPUTATIONAL FLUID DYNAMICS

Upload: ibrahim-jkmb

Post on 26-Oct-2014

80 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Chapter 8 - FVM for Transient Problems

1

Chapter 8: The Finite Volume Method for Transient Problems Presented by: Prof. Ir. Dr. Shahrir Abdullah Dr. Wan Mohd Faizal Wan Mahmood Dept. of Mechanical & Materials Engineering Universiti Kebangsaan Malaysia

KKKJ4164 COMPUTATIONAL FLUID DYNAMICS

Page 2: Chapter 8 - FVM for Transient Problems

2

FVM for Transient Problems Transient 1-D Diffusion Problems Implicit Method for 2-D and 3-D Problems Transient Convective-Diffusion Problems

Contents

Page 3: Chapter 8 - FVM for Transient Problems

3

FVM for Transient Problems • The equation for the unsteady convection-diffusion problems is:

( ) ( ) ( ) φφφρρφ St

+∇Γ⋅∇=⋅∇+∂∂ u (1)

• Integrating throughout a finite volume produces:

( ) ( )

( ) dtdVSdtdA

dtdAdtdVt

tt

t

tt

t

tt

t

tt

t

∫ ∫∫ ∫

∫ ∫∫ ∫∆+∆+

∆+∆+

+

∇Γ⋅=

⋅+

∂∂

CVCS

CSCV

φφ

φρρφ

n

un

(2)

Page 4: Chapter 8 - FVM for Transient Problems

4

FVM for Transient Problems or, in alternative form as

( ) ( )

( ) dtdVSdtdA

dtdAdVdtt

tt

t

tt

t

tt

t

tt

t

∫ ∫∫ ∫

∫ ∫∫ ∫∆+∆+

∆+∆+

+

∇Γ⋅=

⋅+

∂∂

CVCS

CSCV

φφ

φρρφ

n

un

• For 1D cases without generation/source term, the equation reduces to:

( ) ( )

∂∂

Γ∂∂

=∂∂

+∂∂

xxu

xtφφρρφ

In addition, a 1D flow also has to follow the flow continuity principle:

( ) 0=∂∂

+∂∂ u

xtρρ

Page 5: Chapter 8 - FVM for Transient Problems

5

Transient 1-D Diffusion Problems

• An unsteady 1-D diffusion problem, e.g. heat conduction, may be modelled using the following equation:

SxTk

xtTc +

∂∂

∂∂

=∂∂ρ (3)

Control Volume around Node P

Page 6: Chapter 8 - FVM for Transient Problems

6

Transient 1-D Diffusion Problems • Integration throughout a finite volume produces:

dtdVSdtdVxTk

xdtdV

tTc

tt

t

tt

t

tt

t∫ ∫∫ ∫∫ ∫∆+∆+∆+

+

∂∂

∂∂

=∂∂

CVCVCV

ρ (4)

or, in alternative form as

∫∫∫ ∫∆+∆+∆+

∆+

∂∂

∂∂

=

∂∂ tt

t

tt

t we

e

w

tt

t

dtVSdtxTkA

xTkAdVdt

tTcρ (5)

• The left-hand side can be written as:

( ) VTTcdVdttTc PP

tt

t

∆−=∂∂

∫ ∫∆+

0

CV

ρρ (6)

Page 7: Chapter 8 - FVM for Transient Problems

7

Transient 1-D Diffusion Problems • Hence, Eq. (5) becomes:

( ) ∫∫∆+∆+

∆+

−−

−=∆−

tt

t

tt

t WP

WPw

PE

PEePP dtVSdt

xTTAk

xTTAkVTTc

δδρ 0 (7)

• The integration of the right hand side term is arranged to have a weighting parameter θ:

( )[ ] tTTdtTI PP

tt

tPT ∆−+== ∫

∆+01 θθ (8)

where

θ = 0 : tTI PT ∆= 0

θ = ½ : ( ) tTTI PPT ∆+= 021

θ = 1 : tTI PT ∆=

Page 8: Chapter 8 - FVM for Transient Problems

8

Transient 1-D Diffusion Problems • Eq. (7) can be rearranged to be:

( )[ ] ( )[ ]

( ) ( ) xSTxk

xk

txc

TTxkTT

xk

Txk

xk

txc

PWP

w

PE

e

WWWP

wEE

PE

e

PWP

w

PE

e

∆+

−−−−

∆∆

+

−++−+=

++

∆∆

0

00

11

11

δθ

δθρ

θθδ

θθδ

δδθρ

(9)

• Hence, the general equation is:

( )[ ] ( )[ ]

( ) ( )[ ] bTaaaTTaTTaTa

PEWP

EEEWWWPP

+−−−−+

−++−+=00

00

11

11

θθ

θθθθ (10)

Page 9: Chapter 8 - FVM for Transient Problems

9

Transient 1-D Diffusion Problems

where ( ) 0PEWP aaaa ++= θ , t

xcaP ∆∆

= ρ0 and

aW aE b

WP

w

xk

δ PE

e

xk

δ xS ∆

• The type of scheme is dependent on the value of θ:

θ = 0 : Explicit scheme

0 < θ ≤ 1 : Implicit scheme

θ = ½ : Crank-Nicolson scheme

θ = 1 : Fully implicit scheme

Page 10: Chapter 8 - FVM for Transient Problems

10

Transient 1-D Diffusion Problems Explicit Scheme

• The source term is linearised to become 0PPu TSSb += .

• By taking θ = 0, thus

( )[ ] uPPEWPEEWWPP STSaaaTaTaTa +−+−++= 0000 (11)

where 0PP aa = , t

xcaP ∆∆

= ρ0 and

aW aE

WP

w

xk

δ PE

e

xk

δ

Page 11: Chapter 8 - FVM for Transient Problems

11

Transient 1-D Diffusion Problems • This scheme needs the following condition to produce a stable and

oscillation-free solution as mentioned in Chapter 5, i.e.:

( )

kxct

xk

txc

2or2 2∆

<∆∆

>∆∆ ρρ (12)

Crank-Nicolson Scheme

• By taking θ = ½, thus

bTaaaTTaTTaTa PEW

PEE

EWW

WPP +

−−+

++

+= 00

00

2222 (13)

Page 12: Chapter 8 - FVM for Transient Problems

12

Transient 1-D Diffusion Problems

where ( ) pPEWP Saaaa 210

21 −++= , t

xcaP ∆∆

= ρ0 and

aW aE b

WP

w

xk

δ PE

e

xk

δ 021

Ppu TSS +

• This scheme needs the following condition to produce a stable and

oscillation-free solution as mentioned in Chapter 5, i.e.:

( )

kxct

2∆<∆ ρ (14)

Page 13: Chapter 8 - FVM for Transient Problems

13

Transient 1-D Diffusion Problems Fully Implicit Scheme

• By taking θ = 1, thus

uPPEEWWPP STaTaTaTa +++= 00 (15)

where pEWPP Saaaa −++= 0 , txcaP ∆

∆= ρ0 and

aW aE

WP

w

xk

δ PE

e

xk

δ

• This scheme is always stable.

Page 14: Chapter 8 - FVM for Transient Problems

14

Transient 1-D Diffusion Problems Example 1

A thin plate having a thickness of L = 2 cm and a uniform initial temperature of 200°C. At time t = 0, the temperature at its left side drops to 0°C instantly, whereas the other surface is insulated. By using a grid of 5 nodes and appropriate timestep, use an explicit scheme to obtain the following times:

(a) t = 40 s, (b) t = 80 s, (c) t = 120 s.

and compare each case with the analytical solutions. Repeat the question using a timestep sufficient to fulfil the requirement for stability at t = 40 s. Given that the coefficient for heat conductance k = 10 W/m⋅K and ρc = 10 × 106 J/m3⋅K.

Page 15: Chapter 8 - FVM for Transient Problems

15

Transient 1-D Diffusion Problems

The analytical solution for this problems is

( ) ( ) ( ) ( )c

kL

nxtn

txTn

nnn

n

ραπλλαλ

π=

−=−

−−

= ∑∞

=

+

212cosexp

1214

200),(

1

21

Page 16: Chapter 8 - FVM for Transient Problems

16

Transient 1-D Diffusion Problems

Solution

The governing equation for this problems is:

∂∂

∂∂

=∂∂

xTk

xtTcρ

Thus, the general equation is:

( )[ ] uPEWPEEWWPP STaaaTaTaTa +−−++= 0000

where txcaa PP ∆

∆== ρ0 and

Page 17: Chapter 8 - FVM for Transient Problems

17

Transient 1-D Diffusion Problems

Nod aW aE Su

1 0 k/∆x 0

2, 3, 4 k/∆x k/∆x 0

5 k/∆x 0 ( )02BB TT

xk

−∆

Determination of time step:

( ) ( )( ) s8102

004.010102

262

=∆

<∆kxct ρ

Page 18: Chapter 8 - FVM for Transient Problems

18

Transient 1-D Diffusion Problems For ∆t = 2s:

200002004.010102500

004.010 6 =×=

∆∆

==∆ t

xcx

k ρ

Hence, the discreet equations are:

Nod 1: 00 17525200 PEP TTT += Nod 2, 3, 4: 000 1502525200 PEWP TTTT ++= Nod 5: 00 12525200 PWP TTT +=

Page 19: Chapter 8 - FVM for Transient Problems

19

Transient 1-D Diffusion Problems

Page 20: Chapter 8 - FVM for Transient Problems

20

Transient 1-D Diffusion Problems

Page 21: Chapter 8 - FVM for Transient Problems

21

Transient 1-D Diffusion Problems

Page 22: Chapter 8 - FVM for Transient Problems

22

Transient 1-D Diffusion Problems

Page 23: Chapter 8 - FVM for Transient Problems

23

Transient 1-D Diffusion Problems

Page 24: Chapter 8 - FVM for Transient Problems

24

Transient 1-D Diffusion Problems Example 2

Repeat Example 7.1 using the fully implicit scheme and compare it with the explicit scheme and the implicit scheme with the stime step of 8 s.

Solution

The general equation for the implicit is:

( )[ ] uPEWPEEWWPP STaaaTaTaTa +−−++= 00

where pPEWP Saaaa −++= 0 , txcaP ∆

∆= ρ0 and

Page 25: Chapter 8 - FVM for Transient Problems

25

Transient 1-D Diffusion Problems

Nod aW aE Sp Su

1 0 k/∆x 0 0

2, 3, 4 k/∆x k/∆x 0 0

5 k/∆x 0 xk

∆−

2 BT

xk

∆2

For ∆t = 2s:

200002004.01010

22500

004.010 6 =×=

∆==

∆ kxc

xk ρ

Page 26: Chapter 8 - FVM for Transient Problems

26

Transient 1-D Diffusion Problems Hence, the discreet equations are:

Nod 1: 020025225 PEP TTT += Nod 2, 3, 4: 02002525250 PEWP TTTT ++= Nod 5: BPWP TTTT 5020025275 0 ++=

Page 27: Chapter 8 - FVM for Transient Problems

27

Transient 1-D Diffusion Problems

Page 28: Chapter 8 - FVM for Transient Problems

28

Transient 1-D Diffusion Problems

Page 29: Chapter 8 - FVM for Transient Problems

29

Implicit Method for 2-D and 3-D Problems • For general CFD problems, the fully implicit scheme is the best

alternative.

• The 3-D equation for diffusion problem is:

Sz

kzy

kyx

kxt

c +

∂∂

∂∂

+

∂∂

∂∂

+

∂∂

∂∂

=∂∂ φφφφρ (16)

• Hence, the general equation is:

uPPTTBBNNSSEEWWPP Saaaaaaaa +++++++= 00φφφφφφφφ (17)

where pPTBNSEWP Saaaaaaaa −++++++= 0 , txcaP ∆

∆= ρ0 ,

Page 30: Chapter 8 - FVM for Transient Problems

30

Implicit Method for 2-D and 3-D Problems aW aE aS aN aB aT

1D WP

ww

xAk

δ PE

ee

xAk

δ

2D WP

ww

xAk

δ PE

ee

xAk

δ SP

ss

yAk

δ PN

nn

yAk

δ

3D WP

ww

xAk

δ PE

ee

xAk

δ SP

ss

yAk

δ PN

nn

yAk

δ BP

bb

zAk

δ PT

tt

zAk

δ

∆V Aw = Ae An = As Ab = At

1D ∆x 1

2D ∆x ∆y ∆y ∆x

3D ∆x ∆y ∆z ∆y ∆z ∆x ∆z ∆x ∆y

Page 31: Chapter 8 - FVM for Transient Problems

31

Transient Convective-Diffusion Problems • The typical equation of the unsteady convection-diffusion problems is:

( ) ( ) ( ) ( )

φφφφ

φρφρφρρφ

Szzyyxx

zw

yv

xu

t

+

∂∂

Γ∂∂

+

∂∂

Γ∂∂

+

∂∂

Γ∂∂

=

∂∂

+∂

∂+

∂∂

+∂∂

(18)

• By using the implicit scheme, the general equation is:

uPPTTBBNNSSEEWWPP Saaaaaaaa +++++++= 00φφφφφφφφ (19)

Page 32: Chapter 8 - FVM for Transient Problems

32

Transient Convective-Diffusion Problems where

pPTBNSEWP SFaaaaaaaa −∆+++++++= 0 ,

txa PP ∆

∆= 00 ρ , Ppu SSVS φ+=∆ .

If the hybrid differencing scheme is used:

1D 2D 3D

aW

+ 0,

2,max w

wwF

DF

+ 0,

2,max w

wwF

DF

+ 0,

2,max w

wwF

DF

aE

−− 0,

2,max e

eeF

DF

−− 0,

2,max e

eeF

DF

−− 0,

2,max e

eeF

DF

Page 33: Chapter 8 - FVM for Transient Problems

33

Transient Convective-Diffusion Problems

aS

+ 0,

2,max s

ssF

DF

+ 0,

2,max s

ssF

DF

aN

−− 0,

2,max n

nnF

DF

−− 0,

2,max n

nnF

DF

aB

+ 0,

2,max b

bbF

DF

aT

−− 0,

2,max t

ttF

DF

∆F ( )we FF − ( ) ( )snwe FFFF −+− ( ) ( )( )bt

snwe

FFFFFF

−+−+−

Page 34: Chapter 8 - FVM for Transient Problems

34

Transient Convective-Diffusion Problems

And, the formula for F and D are:

Face w e s n b t

F ( ) ww Auρ ( ) ee Auρ ( ) ss Avρ ( ) nn Avρ ( ) bb Awρ ( ) tt Awρ

D WP

ww

xA

δΓ

PE

ee

xA

δΓ

SP

ss

yA

δΓ

PN

nn

yA

δΓ

BP

bb

zA

δΓ

PT

tt

zA

δΓ

Page 35: Chapter 8 - FVM for Transient Problems

35

Transient Convective-Diffusion Problems Case Study

Consider a 1-D convection-diffusion problem with the boundary condition as followed:

Other data include L = 1.5 m, u = 2 m/s, ρ = 1.0 kg/m3, and Γ = 0.03 kg/m⋅s. Given that the source term is a time-dependent function as shown below for t > 0:

Page 36: Chapter 8 - FVM for Transient Problems

36

Transient Convective-Diffusion Problems

where a = −200, b = 100, x1 = 0.6, x2 = 0.2. Obtain the temperature distribution until it reaches the steady state condition using the explicit and hybrid schemes. Use appropriate time step and number of node.

Page 37: Chapter 8 - FVM for Transient Problems

37

Thank You

Questions/Comments are welcomed