chapter 8: finite volume method for unsteady flowsopencourses.emu.edu.tr/file.php/27/chapter_8.pdf1...

19
1 Chapter 8: Finite Volume Method for Unsteady Flows Ib hi S i Ibrahim Sezai Department of Mechanical Engineering Eastern Mediterranean University Spring 2008-2009 8.1 Introduction The conservation law for the transport of a scalar in an unsteady flow has the general form ( ) ( ) ( ) div div grad S φ ρφ ρφ φ + = Γ + u (8.1) by replacing the volume integrals of the convective and diffusive terms with surface integrals as before (see section 2.5) and changing the order of integration in the rate of change term we obtain: ( ) ( ) ( ) div div grad S t φ ρφ ρφ φ + Γ + u Δ Δ I. Sezai – Eastern Mediterranean University ME555 : Computational Fluid Dynamics 2 ( ) ( ) ( ) t t t t CV t t A t t t t t A t CV dt dV n dA dt t n grad dA dt S dVdt φ ρφ ρφ φ + Δ + Δ + = ⋅Γ + ∫∫ u (8.2)

Upload: others

Post on 20-Jun-2020

49 views

Category:

Documents


7 download

TRANSCRIPT

Page 1: Chapter 8: Finite Volume Method for Unsteady Flowsopencourses.emu.edu.tr/file.php/27/Chapter_8.pdf1 Chapter 8: Finite Volume Method for Unsteady Flows Ib hi S iIbrahim Sezai Department

1

Chapter 8: Finite Volume Method for Unsteady Flows

Ib hi S iIbrahim SezaiDepartment of Mechanical Engineering

Eastern Mediterranean University

Spring 2008-2009

8.1 IntroductionThe conservation law for the transport of a scalar in an unsteady flow has the general form

( ) ( ) ( )div div grad Sφρφ ρ φ φ∂+ = Γ +u (8.1)

by replacing the volume integrals of the convective and diffusive terms with surface integrals as before (see section 2.5) and changing the order of integration in the rate of change term we obtain:

( ) ( ) ( )div div grad St φρφ ρ φ φ+ Γ +∂

u ( )

Δ Δ⎛ ⎞ ⎛ ⎞

I. Sezai – Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 2

( ) ( )

( )

t t t t

CV t t At t t t

t A t CV

dt dV n dA dtt

n grad dA dt S dVdtφ

ρφ ρ φ

φ

+Δ +Δ

+Δ +Δ

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

⎛ ⎞= ⋅ Γ +⎜ ⎟

⎝ ⎠

∫ ∫ ∫ ∫

∫ ∫ ∫ ∫

u(8.2)

Page 2: Chapter 8: Finite Volume Method for Unsteady Flowsopencourses.emu.edu.tr/file.php/27/Chapter_8.pdf1 Chapter 8: Finite Volume Method for Unsteady Flows Ib hi S iIbrahim Sezai Department

2

IntroductionUnsteady one-dimensional heat conduction is governed by the equation

In addition to usual variables we have c, the specific heat of material

T Tc k St x x

ρ ∂ ∂ ∂⎛ ⎞= +⎜ ⎟∂ ∂ ∂⎝ ⎠(8.3)

(J/kg/K).

Consider the one-dimensional control volume in Figure 8.1. Integration of equation (8.3) over the control volume and over a time interval from t to t+Δt gives

t t t t t tΔ Δ Δ⎛ ⎞

I. Sezai – Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 3

This may be written as

t t t t t t

t CV t CV t CV

T Tc dVdt k dVdt sdVdtt x x

ρ+Δ +Δ +Δ∂ ∂ ∂⎛ ⎞= +⎜ ⎟∂ ∂ ∂⎝ ⎠∫ ∫ ∫ ∫ ∫ ∫ (8.4)

e t t t t t t

e ww t t t

T T Tc dt dV kA kA dt S Vdtt x x

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

∫ ∫ ∫ ∫ (8.5)

The left hand side can be written as

I ti (8 6) i t ‘ ’ f t t t t ti

( )0t t

P PCV t

Tc dt dV c T T Vt

ρ ρ+Δ⎡ ⎤∂

= − Δ⎢ ⎥∂⎣ ⎦∫ ∫ (8.6)

In equation(8.6) superscript ‘o’ refers to temperatures at time t.Temperatures at time level t+Δt are not superscriptedEqn(8.6) could also be obtained by substituting

0P PT TT

t t−∂

=∂ Δ

I. Sezai – Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 4

So, first order (backward) differencing scheme has been used. If we apply central differencing to rhs of eqn (8.5),

(8.7)( )0

t t t tP WE P

P P e wPE WPt t

T TT Tc T T V k A k A dt S Vdtx x

ρ+Δ +Δ⎡ ⎤⎛ ⎞⎛ ⎞ −−

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

Page 3: Chapter 8: Finite Volume Method for Unsteady Flowsopencourses.emu.edu.tr/file.php/27/Chapter_8.pdf1 Chapter 8: Finite Volume Method for Unsteady Flows Ib hi S iIbrahim Sezai Department

3

To calculate the integrals we have to make an assumption about the variation of TP, TE and TW with time, we could use temperatures

at time t, orat time t+Δt

or combination of both.Integral of temperature TP with respect to time can be written

as;

Hence

0(1 )t t

T P P Pt

I T dt T T tθ θ+Δ

⎡ ⎤= = + − Δ⎣ ⎦∫ (8.8)

I. Sezai – Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 5

Hence

θ = a weighting parameter between zero and one.( )0 0

0 1/ 2 112T P P P PI T t T T t T t

θ

Δ + Δ Δ

Using formula (8.8) for TW and TE in equation (8.7), and dividing by AΔt throughout, we have

( ) ( )0e E P w P WP P k T T k T TT Tc xρ θδ δ

⎡ ⎤− −⎛ ⎞−Δ = −⎢ ⎥⎜ ⎟Δ⎝ ⎠

which may be re-arranged to give

(8.9)

( ) ( ) ( )0 0 0 0

1

PE WP

e E P w P W

PE WP

t x xk T T k T T

S xx x

ρδ δ

θδ δ

⎢ ⎥⎜ ⎟Δ⎝ ⎠ ⎣ ⎦⎡ ⎤− −⎢ ⎥+ − − + Δ⎢ ⎥⎣ ⎦

( ) ( )0 0k k k kx⎡ ⎤⎛ ⎞Δ ⎡ ⎤ ⎡ ⎤⎢ ⎥

I. Sezai – Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 6

(8.10)

( ) ( )

( ) ( )

0 0

0

1 1

1 1

e w e wP E E W W

PE WP PE WP

e wP

PE WP

k k k kxc T T T T Tt x x x x

k kxc T S xt x x

ρ θ θ θ θ θδ δ δ δ

ρ θ θδ δ

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

+ − − − − + Δ⎢ ⎥Δ⎣ ⎦

Page 4: Chapter 8: Finite Volume Method for Unsteady Flowsopencourses.emu.edu.tr/file.php/27/Chapter_8.pdf1 Chapter 8: Finite Volume Method for Unsteady Flows Ib hi S iIbrahim Sezai Department

4

Now we identify the coefficients of TW and TE as aW and aE and write equation (8.10) in familiar standard form:

( ) ( )( ) ( )

0 0

0 0

1 11 1

p P W W W E E E

P W E P

a T a T T a T Ta a a T bθ θ θ θ

θ θ⎡ ⎤ ⎡ ⎤= + − + + −⎣ ⎦ ⎣ ⎦⎡ ⎤+ − − − − +⎣ ⎦

(8.11)

where

and

with

⎣ ⎦

( ) 0P W E Pa a a aθ= + +

0P

xa ct

ρ Δ=

Δ

W Ea a bk k

I. Sezai – Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 7

For θ = 0 explicit scheme0 < θ < 1 implicit scheme, for θ = 0.5 Crank-Nicolson schemeθ = 1 Fully implicit scheme

w e

WP PE

k k S xx xδ δ

Δ

8.2.1 Explicit schemeIn the explicit scheme the source term is linearized as b=Su+SpTp

0. Now the substitution of θ = 0 into (8.11) gives the explicit discretisation of the unsteady conductive heat transfer equation:

(8.12)( )0 0 0 0P P W W E E P W E P P ua T a T a T a a a S T S⎡ ⎤= + + − + − +⎣ ⎦

where

and

0P Pa a=

0P

xa ct

ρ Δ=

ΔW Ea a

k k

I. Sezai – Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 8

The right hand side of eqn (8.12) only contains values at the old time step so the left hand side can be calculated by forward marching in time. The scheme is based on backward differencing, and is of first order accurate.

w e

WP PE

k kx xδ δ

Page 5: Chapter 8: Finite Volume Method for Unsteady Flowsopencourses.emu.edu.tr/file.php/27/Chapter_8.pdf1 Chapter 8: Finite Volume Method for Unsteady Flows Ib hi S iIbrahim Sezai Department

5

All coefficients should be positive aP0- aW - aE >0

or if k = const. and δxPE= δxWP=Δx this condition can be written as

Or

This inequality sets a stringent maximum limit to the

2x kct x

ρ Δ>

Δ Δ(8.13a)

(8.13b)( )2

2x

t ck

ρΔ

Δ <

I. Sezai – Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 9

q y gtime step size and represents a serious limitation for the explicit scheme.

Not recommended for the explicit scheme problems.

8.2.2 Crank – Nicolson schemeThe Crank – Nicolson method results from setting θ = ½ in eqn. (8.11). Now the discretised unsteady heat conduction equation is

0 00 0W W WE E ET T aT T aa T a a a T b

⎡ ⎤ ⎡ ⎤+ + ⎡ ⎤= + + − − +⎢ ⎥ ⎢ ⎥ ⎢ ⎥ (8 14)

Where

And

2 2 2 2p P W E P Pa T a a a T b= + + − − +⎢ ⎥ ⎢ ⎥ ⎢ ⎥⎣ ⎦⎣ ⎦⎣ ⎦

( ) 01 12 2P W E P Pa a a a S= + + −

0P

xa ct

ρ Δ=

Δ

(8.14)

I. Sezai – Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 10

012

W E

w eu P P

WP PE

a a bk k S S Tx xδ δ

+

Page 6: Chapter 8: Finite Volume Method for Unsteady Flowsopencourses.emu.edu.tr/file.php/27/Chapter_8.pdf1 Chapter 8: Finite Volume Method for Unsteady Flows Ib hi S iIbrahim Sezai Department

6

Schemes with ½ ≤ θ ≤ 1 are unconditionally stable for all values of time step Δt.However, for physically realistic results all coefficients should be positive, then, coefficients of TP

0 should be positive, or⎛ ⎞

Which leads to

This time step limitation is only slightly less restrictive than (8.13) associated with the explicit method

2xt ck

ρ ΔΔ <

0

2W E

Pa aa +⎛ ⎞> ⎜ ⎟

⎝ ⎠

(8.15)

I. Sezai – Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 11

associated with the explicit methodThe method is based on central differencing Second order

accurate in timeIs more accurate than explicit method

The fully implicit schemeWhen θ =1 we obtain the fully implicit scheme. The source term is linearized as b=Su+SPTP. The discretised equation is

where

0 0p P W W E E P P ua T a T a T a T S= + + + (8.16)

where

and

with

0P P W E Pa a a a S= + + −

0P

xa ct

ρ Δ=

Δ W E

w e

WP PE

a ak kx xδ δ

I. Sezai – Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 12

Both sides of the equation contains temperatures at the new time step, and a system of algebraic equations must be solved at each time levelis unconditionally stable for any Δtis only first order accurate in timesmall time steps are needed to ensure accuracy of results

Page 7: Chapter 8: Finite Volume Method for Unsteady Flowsopencourses.emu.edu.tr/file.php/27/Chapter_8.pdf1 Chapter 8: Finite Volume Method for Unsteady Flows Ib hi S iIbrahim Sezai Department

7

8.3 Illustrative examplesExample 8.1

A thin plate is initially at a uniform temperature of 200 ºC. At a certain time t=0 the temperature of the east side of the plate is suddenly reduced to 0ºC. The other surface is insulated. Use the explicit finite volume method in conjunction with a suitable time step size to calculate the transient temperature distribution of the slab and compare it with the analytical solution at time (i) t = 40s, (ii) t = 80s and (iii) t = 120 R l l h i l l i i i i l h li i120s. Recalculate the numerical solution using a time step size equal to the limit given by (8.13) for t = 40s and compare the results with the analytical solution. The data are: plate thickness L=2cm, thermal conductivity k = 10 W/m/K and ρc = 10 x 106 J/m3/K.

Solution: the one–dimensional transient heat conduction eqn is

T Tc k St x x

ρ ∂ ∂ ∂⎛ ⎞= +⎜ ⎟∂ ∂ ∂⎝ ⎠ (8.17)

I. Sezai – Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 13

The initial and boundary conditions:

( )

200 at 0

0 at 0, 0

0 at , 0

T tT x tt

T x L t

= =∂

= = >∂= = >

The analytical solution is given in Ozisik (1985) as

( ) ( )1

2

1

( , ) 4 ( 1) exp cos200 2 1

n

n nn

T x t t xn

αλ λπ

+∞

=

−= −

−∑ (8.18)

The numerical solution with the explicit method is generated by dividing the domain width L into five equal control volumes with Δx = 0.004m. The resulting one-dimensional

(2 1) /2n

nWhere and k cLπλ α ρ−

= =

I. Sezai – Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 14

grid is shown in Figure 8.2.

Page 8: Chapter 8: Finite Volume Method for Unsteady Flowsopencourses.emu.edu.tr/file.php/27/Chapter_8.pdf1 Chapter 8: Finite Volume Method for Unsteady Flows Ib hi S iIbrahim Sezai Department

8

The time step for the explicit method is subject to the condition that

( )2c xρ Δ

I. Sezai – Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 15

( )

( )26

210 10 0.004

2 108

c xt

k

t

t s

ρ ΔΔ <

×Δ <

×Δ <

I. Sezai – Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 16

Page 9: Chapter 8: Finite Volume Method for Unsteady Flowsopencourses.emu.edu.tr/file.php/27/Chapter_8.pdf1 Chapter 8: Finite Volume Method for Unsteady Flows Ib hi S iIbrahim Sezai Department

9

I. Sezai – Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 17

Example 8.2 solve the problem of Example 8.1 again using the fully implicit method and compare the explicit and implicit method solutions for a time step of 8 s.

I. Sezai – Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 18

Page 10: Chapter 8: Finite Volume Method for Unsteady Flowsopencourses.emu.edu.tr/file.php/27/Chapter_8.pdf1 Chapter 8: Finite Volume Method for Unsteady Flows Ib hi S iIbrahim Sezai Department

10

I. Sezai – Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 19

I. Sezai – Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 20

Page 11: Chapter 8: Finite Volume Method for Unsteady Flowsopencourses.emu.edu.tr/file.php/27/Chapter_8.pdf1 Chapter 8: Finite Volume Method for Unsteady Flows Ib hi S iIbrahim Sezai Department

11

8.4 Implicit Method for Two-and Three- dimensional Problems

Transient diffusion equation in three-dimensional is governed by

A th di i l t l l i id d f th

c k k k St x x y y z zφ φ φ φρ

⎛ ⎞∂ ∂ ∂ ∂ ∂ ∂ ∂⎛ ⎞ ⎛ ⎞= + + +⎜ ⎟⎜ ⎟ ⎜ ⎟∂ ∂ ∂ ∂ ∂ ∂ ∂⎝ ⎠ ⎝ ⎠⎝ ⎠(8.27)

A three dimensional control volume is considered for the discretisation. The resulting equation is

where

0 0P P W W E E S S N N B B T T

P P u

a a a a a a a

a S

φ φ φ φ φ φ φ

φ

= + + + + +

+ +(8.28)

0P W E S N B T P Pa a a a a a a a S= + + + + + + −

I. Sezai – Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 21

S = (Su + SPφP) is the linearized source

P W E S N B T P Pa a a a a a a a S

0P

Va ct

ρ Δ=

Δ

A summary of the relevant neighbour coefficients is given below

1

W E S N B T

w w e e

WP PE

a a a a a aA AD

x xδ δΓ Γ

− − − −

The following values for the volume and cell face areas apply in three cases:

2

3

w w e e s s n n

WP PE SP PN

w w e e s s n n b b t t

WP PE SP PN BP PT

A A A ADx x y yA A A A A AD

x x y y z z

δ δ δ δ

δ δ δ δ δ δ

Γ Γ Γ Γ− −

Γ Γ Γ Γ Γ Γ

1 2 3D D D

I. Sezai – Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 22

1w e

n s

b t

V x x y x y zA A y y zA A x x zA A x y

Δ Δ Δ Δ Δ Δ Δ= Δ Δ Δ= − Δ Δ Δ= − − Δ Δ

Page 12: Chapter 8: Finite Volume Method for Unsteady Flowsopencourses.emu.edu.tr/file.php/27/Chapter_8.pdf1 Chapter 8: Finite Volume Method for Unsteady Flows Ib hi S iIbrahim Sezai Department

12

8.5 Discretisation of transient convection-diffusion equation

The unsteady transport of a property φ is given by

( ) ( ) ( )div div grad St φρφ ρ φ φ∂

+ = Γ +∂

u (8.29)

Here, we quote the implicit/hybrid difference form of the transient convection-diffusion equations.

Transient three-dimensional convection-diffusion of a general property φ in a velocity field u is governed by

( ) ( ) ( ) ( )u v wρφ ρ φ ρ φ ρ φ∂ ∂ ∂ ∂

I. Sezai – Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 23

( ) ( ) ( ) ( )u v wt x y z

Sx x y y z z φ

ρφ ρ φ ρ φ ρ φ

φ φ φ

∂ ∂ ∂ ∂+ + +

∂ ∂ ∂ ∂⎛ ⎞∂ ∂ ∂ ∂ ∂ ∂⎛ ⎞ ⎛ ⎞= Γ + Γ + Γ +⎜ ⎟⎜ ⎟ ⎜ ⎟∂ ∂ ∂ ∂ ∂ ∂⎝ ⎠ ⎝ ⎠⎝ ⎠ (8.30)

The fully implicit discretisation equation is

0 0

P P W W E E S S N N B B T Ta a a a a a a

a S

φ φ φ φ φ φ φ

φ

= + + + + +

+ +(8.31)

where

with

d

0P W E S N B T P Pa a a a a a a a F S= + + + + + + + Δ −

P P ua Sφ+ +

0P

Va ct

ρ Δ=

Δ

I. Sezai – Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 24

and

The neighbour coefficients of this equation for the hybrid differencing scheme are as follows:

u P PS V S S φΔ = +

Page 13: Chapter 8: Finite Volume Method for Unsteady Flowsopencourses.emu.edu.tr/file.php/27/Chapter_8.pdf1 Chapter 8: Finite Volume Method for Unsteady Flows Ib hi S iIbrahim Sezai Department

13

One-dimensional flow Two-dimensional flow Three-dimensional flow

max , ,0 max , ,0 max , ,02 2 2

0 0

w w wW w w w w w w

e e

F F Fa F D F D F D

F FF D F D

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

⎜ ⎟ ⎜ ⎟⎢ ⎥ ⎢ ⎥ 0eFF D⎡ ⎤⎛ ⎞⎜ ⎟⎢ ⎥max , ,0 max , ,0 ma

2 2e e

E e e e ea F D F D⎛ ⎞ ⎛ ⎞− − − −⎜ ⎟ ⎜ ⎟⎢ ⎥ ⎢ ⎥⎝ ⎠ ⎝ ⎠⎣ ⎦ ⎣ ⎦x , ,0

2

max , ,0 max , ,02 2

max , ,0 max , ,02 2

ee e

s sS s s s s

n nN n n n n

F D

F Fa F D F D

F Fa F D F D

F

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

⎡ ⎤⎛ ⎞

I. Sezai – Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 25

max , ,02

max , ,02

bB b b

tT t t

Fa F D

Fa F D

F

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

Δ e w e w n s e w n s t bF F F F F F F F F F F F− − + − − + − + −

In the above expressions the values of F and D are calculated with the following formulae:

( ) ( ) ( ) ( ) ( ) ( )b

Face w e s n b tF u A u A v A v A w A w Aρ ρ ρ ρ ρ ρ

The volumes and cell areas given in section 8.4 apply here as well.

Other schemes such as linear upwind or QUICK may be

( ) ( ) ( ) ( ) ( ) ( )w e s n b tw e s n b t

w w e e s s n n b b t t

WP PE SP PN BP PT

F u A u A v A v A w A w AA A A A A AD

x x y y z z

ρ ρ ρ ρ ρ ρ

δ δ δ δ δ δΓ Γ Γ Γ Γ Γ

I. Sezai – Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 26

Other schemes such as linear upwind or QUICK may be incorporated into these equations by substituting the appropriate expression for the coefficients as will be demonstrated in the following example

Page 14: Chapter 8: Finite Volume Method for Unsteady Flowsopencourses.emu.edu.tr/file.php/27/Chapter_8.pdf1 Chapter 8: Finite Volume Method for Unsteady Flows Ib hi S iIbrahim Sezai Department

14

8.6 Worked example of transient convection-diffusion using QUICK differencing

Example 8.3 consider convection and diffusion in the one-dimensional domain sketched in Figure 8.7. Calculate the transient temperature field if the initial temperature is zero everywhere and the boundary conditions are φ=0 at x=0 and ∂φ /∂x=0 at x=L. the data are L=1.5m, u=2m/s, ρ=1.0kg/m3 and Γ=0.03kg/m/s.L 1.5m, u 2m/s, ρ 1.0kg/m and Γ 0.03kg/m/s.

the source distribution defined by Figure 8.8 applies at times t>0 with a= 200 b=100 x = 0 6m x = 0 2m Write a computer program to

I. Sezai – Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 27

a=-200, b=100, x1= 0.6m, x2= 0.2m. Write a computer program to calculate the transient temperature distribution until it reaches a steady state using the implicit method for time integration and the Hayase et al variant of the QUICK scheme for the convective and diffusive terms and compare this result with the analytical steady state solution

Solution convection-diffusion of a property φ subjected to a distributed source term is governed by

( ) ( )uS

ρφ ρ φ φ∂ ∂ ∂ ∂⎛ ⎞+ = Γ +⎜ ⎟∂ ∂ ∂ ∂⎝ ⎠ (8 32)

I. Sezai – Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 28

We use a 45 point grid to subdivide the domain and perform all calculations with a computer program. It is convenient to use the Hayase et alformulation of QUICK (see section 5.9.3)since it gives a tri-diagonal system of equations which can be solved iteratively with the TDMA (see section 7.2).

t x x x⎜ ⎟∂ ∂ ∂ ∂⎝ ⎠ (8.32)

Page 15: Chapter 8: Finite Volume Method for Unsteady Flowsopencourses.emu.edu.tr/file.php/27/Chapter_8.pdf1 Chapter 8: Finite Volume Method for Unsteady Flows Ib hi S iIbrahim Sezai Department

15

The velocity is u=2.0m/s and the cell width is Δx=0.0333 so F=ρu=2.0and D=Γ/δx=0.9 everywhere. The Hayase et al formulation gives φ at cell faces by means of the following formulae:

( )1 3 2e P E P Wφ φ φ φ φ= + − − (8.33)

The implicit discretisation equation at a general node with Hayase’s et al QUICK scheme is given by

( )

( )81 3 28

e P E P W

w W P W WW

φ φ φ φ φ

φ φ φ φ φ= + − −

( )01P P xρ φ φ− Δ ⎡ ⎤

(8.34)

I. Sezai – Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 29

( ) ( )

( )( ) ( )

1 3 28

1 3 28

P Pe P E P W

w W P W WW

e E P w P W

xF

t

F

D D

ρ φ φφ φ φ φ

φ φ φ φ

φ φ φ φ

⎡ ⎤+ + − −⎢ ⎥Δ ⎣ ⎦⎡ ⎤− + − −⎢ ⎥⎣ ⎦

= − − − (8.35)

A time step Δt=0.01 is selected, which is well within stability limit for explicit schemes

Start with an initial field of φ P0 =0 at all nodes.

Solve iteratively for φ values until a converged solution is obtained

I. Sezai – Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 30

is obtainedSet φ P

0 φ P and proceed to the next time levelTo monitor whether steady state reached:

if φ P- φ P0 < ε steady state , ε may be 10-9

Page 16: Chapter 8: Finite Volume Method for Unsteady Flowsopencourses.emu.edu.tr/file.php/27/Chapter_8.pdf1 Chapter 8: Finite Volume Method for Unsteady Flows Ib hi S iIbrahim Sezai Department

16

The Analytical SolutionUnder the given boundary conditions the solution to the problem is as follows:

(8.41)( )01 2 2

2

( ) 1Px ax C C e PxP

L n x n n x n

φ

π π π π∞

= + − +

⎡ ⎤⎡ ⎤⎛ ⎞ ⎛ ⎞ ⎛ ⎞ ⎛ ⎞ ⎛ ⎞

with

and

2

1

sin cosnn

L n x n n x na P PL L L Lnπ π π π

π=

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

( )2

202 2

1; cosn

PLPLn

au a nP C n Pe LP e

ρ ππ∞

=

⎡ ⎤⎛ ⎞= = + +⎢ ⎥⎜ ⎟Γ ⎝ ⎠⎢ ⎥⎣ ⎦∑

220

1 2 2 na nC C a P

LPπ∞ ⎡ ⎤⎛ ⎞= − + + +⎢ ⎥⎜ ⎟

⎝ ⎠⎢ ⎥⎣ ⎦∑

I. Sezai – Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 31

and

1n LP = ⎝ ⎠⎢ ⎥⎣ ⎦∑

( )( )

( ) ( )

1 2 1 10

1 2 1 21 12 2

2 2

2

2 cos cosn

x x ax b bxa

La x x b n x xn x ax bLa a

n x L x Lππ

π

+ + +=

⎧ ⎫⎡ ⎤+ + +⎛ ⎞ ⎛ ⎞⎛ ⎞+⎪ ⎪⎛ ⎞= − +⎢ ⎥⎨ ⎬⎜ ⎟ ⎜ ⎟⎜ ⎟⎜ ⎟⎝ ⎠ ⎢ ⎥⎝ ⎠⎝ ⎠ ⎝ ⎠⎪ ⎪⎣ ⎦⎩ ⎭

The analytical and numerical steady state solutions are compared in Figure 8.9. as can be seen the use of the QUICK scheme and a fine grid for spatial discretisation ensure near-perfect agreement

I. Sezai – Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 32

Page 17: Chapter 8: Finite Volume Method for Unsteady Flowsopencourses.emu.edu.tr/file.php/27/Chapter_8.pdf1 Chapter 8: Finite Volume Method for Unsteady Flows Ib hi S iIbrahim Sezai Department

17

8.7 Solution procedures for unsteady flow calculations8.7.1 Transient SIMPLE

The continuity equation in a transient two-dimensional flow is given by

Th i t t d f f thi t di i l l i

(8.42)( ) ( ) 0u v

t x yρ ρρ ∂ ∂∂

+ + =∂ ∂ ∂

The integrated form of this eqn over a two-dimensional scalar c.v. is

The equivalent of pressure correction equation (5.32) for a two-dimensional transient flow will take the form

(8.43)( ) ( ) ( ) ( ) ( )0

0P P

e w n sV uA uA uA uA

tρ ρ

ρ ρ ρ ρ−

⎡ ⎤ ⎡ ⎤Δ + − + − =⎣ ⎦ ⎣ ⎦Δ

b′ ′ ′ ′ ′+ + + +

I. Sezai – Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 33

(8.44)P P W W E E S S N Na p a p a p a p a p b′ ′ ′ ′ ′= + + + +

( ) ( ) ( ) ( )* * * *

( ) ( ) ( ) ( )

( )

E e W w N n S s

P w e s noP P

w e s n

a Ad a Ad a Ad a Ada a a a a

Vb u A u A v A v At

ρ ρ ρ ρ

ρ ρρ ρ ρ ρ

= = = == + + +

− Δ= − + − +

Δ

With neighbour coefficients

( ) ( ) ( ) ( )1, 1, , 1 , 1I J I J I J I Ja a a a

dA dA dA dAρ ρ ρ ρ− + − +

A higher order differencing scheme may also be used for time derivative

A second order accurate scheme with respect to time is

( ) ( ) ( ) ( ), 1, , , !i J i J I j I jdA dA dA dAρ ρ ρ ρ

+ +

( )1T∂

I. Sezai – Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 34

Tn and Tn-1 are known from previous time steps they are treated as source terms and are placed on the rhs of the eqn.

( )1 11 3 42

n n nT T T Tt t

+ −∂= − +

∂ Δ(8.45)

Page 18: Chapter 8: Finite Volume Method for Unsteady Flowsopencourses.emu.edu.tr/file.php/27/Chapter_8.pdf1 Chapter 8: Finite Volume Method for Unsteady Flows Ib hi S iIbrahim Sezai Department

18

I. Sezai – Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 35

8.8 Steady state calculations using the pseudo-transient approach

It was mentioned in chapter 6 that under-relaxation is necessary to stabilize the iterative process of obtaining steady state solutions. The under-relaxed form of the two-dimensional u-momentum equation for example takes thedimensional u-momentum equation, for example, takes the form

Compare this with the transient (implicit) u-momentum ti

(8.46)( ) ( ), , ( 1), 1, , , , ,1i J i J n

i J nb nb I J I J i J i J u i Ju u

a au a u p p A b uα

α α−

⎡ ⎤= + − + + −⎢ ⎥

⎣ ⎦∑

I. Sezai – Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 36

equation

(8.47)( )0 0, , 0

, , 1, , , , ,i J i J

i J i J nb nb I J I J i J i J i J

V Va u a u p p A b u

t tρ ρ

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

Page 19: Chapter 8: Finite Volume Method for Unsteady Flowsopencourses.emu.edu.tr/file.php/27/Chapter_8.pdf1 Chapter 8: Finite Volume Method for Unsteady Flows Ib hi S iIbrahim Sezai Department

19

In equation (8.46) the superscript n-1 indicates the previous iteration and in equation(8.47) superscript 0 represents the previous time level. We immediately note a clear analogy between transient calculations and under-relaxation inbetween transient calculations and under-relaxation in steady state calculations. It can be easily deduced that

This formula shows that it is possible to achieve the effects f d l d it ti t d t t l l ti f

(8.48)( )0

, ,1 i J i Ju

u

a Vt

ρα

αΔ

− =Δ

I. Sezai – Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 37

of under-relaxed iterative steady state calculations from a given initial field by means of a pseudo-transient computation starting from the same initial field by taking a step size that satisfies (8.48).