This action might not be possible to undo. Are you sure you want to continue?

1 Introduction

« Why use computational ‡uid dynamics (CFD)?

– Analytical solution may be: (1) tedious; (2) too complicated; and/or (3) not

possible (due to geometry or boundary conditions).

– Experiments may be unfeasible.

– Empirical correlations may not be available.

« The key idea of any numerical method is to “discretize" the governing di¤erential

equation(s) ÷ algebraic equations that may be solved by one of several methods.

« The …rst step in CFD is to discretize the calculation domain, i.e. the region in which

the solution is desired. For example, a regular shaped domain can be discretized with

a line-by-line mesh, with nodes located at the intersection of the mesh (or grid) lines.

« The domain has been discretized with a set of distinct nodes, i.e. we are no longer

concerned with the domain as a continuum, but with the values of unknowns at each

node (similar to experimental measurement).

« The techniques used to discretize the governing di¤erential equation depend upon the

method used:

1. Finite Di¤erence (FD)

– original method

– common technique presented in numerical methods courses to solve Laplace’s

equation, and in undergraduate heat transfer texts (e.g. Incropera and De-

Witt (Sections 4.4–4.5))

– straightforward application of Taylor’s series approximations to the deriva-

tives in the governing equation(s)

– limited by geometry

Eng9977 - Computational Fluid Dynamics 2

2. Finite Elements (FE)

– discretize the domain with elements of varying shape (well suited to irregular

geometries)

– can be quite complex to derive

– Galerkin method of weighted residuals

– origins in stress analysis

3. Finite Volume (FV)

– developed in the context of heat transfer and ‡uid ‡ow

– discretization based on the application of conservation principles (e.g. 1st

Law) to control volumes constructed around the nodes in a mesh

– physically meaningful

– limited by geometry

– The di¤erential form of the governing equation is not required!

4. Finite Volume Element (FVE) or Control Volume Finite Element (CVFE)

– use the advantageous features of …nite volume and …nite element methods

– suitable for irregular geometries

– possess the physically meaningful interpretations present in FV methods

5. Boundary Elements (BE)

– only the boundary of a domain is discretized

– Useful (and very e¢cient) when only information on the boundary of the

domain is required (e.g. free surface ‡ows).

– highly mathematical

2 One-Dimensional Heat Conduction

2.1 Governing Equation

« Consider one-dimensional, steady state conduction heat transfer, which is governed

by the following equation:

d

dr

_

/

dT

dr

_

+ _ ¡ = 0 (1)

2.2 Domain discretization

« A one-dimensional problem (e.g. a plane wall with sources) can be discretized with a

series of nodes as shown below.

Eng9977 - Computational Fluid Dynamics 3

« Control volumes are de…ned for each node by placing control volume faces in between

each node. The control volume faces do not have to be mid way between the nodes.

« Focusing attention on only three nodes in this domain, and in particular a node 1, and

its two neighbour nodes, 1 (east) and \ (west), allows the de…nition of nomenclature

that will be used in the derivation of the discretized form of the governing equation.

« Note:

– c and n indicate the east and west faces of the cv.

– cr is the spacing between nodes, and cr

e

is not necessarily equal to cr

w

, i.e. the

nodal distribution may be nonuniform.

– r is the width of the control volume (cv)

– For convenience in the folllowing derivations, the cv faces are placed midway

between the nodes, therefore, r = (cr

e

+ cr

w

),2.

2.3 Conservation Equation

« Two methods may be used to derive the conservation equation that will be applied

to the control volume that is constructed around node 1:

1. Integrate the governing equation over the cv from the n face to the c face:

_

e

w

d

dr

_

/

dT

dr

_

dr +

_

e

w

_ ¡ dr = 0 (2)

/

e

dT

dr

¸

¸

¸

¸

e

÷/

w

dT

dr

¸

¸

¸

¸

w

+ _ ¡r = 0 (3)

2. Apply the 1st Law to the cv around node 1:

_

_

Rate of heat

conducted

in the n face

_

_

+

_

_

Rate of heat

generation

within the cv

_

_

÷

_

_

Rate of heat

conducted

out the c face

_

_

= 0 (4)

¡

w

+ _ ¡\ ÷¡

e

= 0 (5)

Using Fourier’s Law:

÷/

w

¹

dT

dr

¸

¸

¸

¸

w

+ _ ¡¹r + /

e

¹

dT

dr

¸

¸

¸

¸

e

= 0 (6)

or

/

e

dT

dr

¸

¸

¸

¸

e

÷/

w

dT

dr

¸

¸

¸

¸

w

+ _ ¡r = 0 (7)

Eng9977 - Computational Fluid Dynamics 4

« Note:

1. Both methods give exactly the same equation.

2. Method one integrates the di¤erential equation, which governs conservation in a

di¤erential cv, over a …nite cv. Since the derivation of the di¤erential equation

is based on the balance on a cv, by integrating this equation we are taking a

backwards step.

3. Method two applies conservation of energy to a …nite cv. We did not need the

di¤erential form of the governing equation. The FV method is based on the

application of conservation laws (energy, mass, momentum) to …nite cv’s.

2.4 Pro…le Assumptions

« The conservation equation must be written in terms of the unknown nodal temper-

atures (i.e. an algebraic form of the conservation equation), therefore, an expression

for dT,dr is required (i.e. a pro…le assumption for T, or how T is assumed to vary

between nodes).

« Step pro…le, or prevailing assumption:

– simplest

– The value at a node is assumed to prevail over the cv associated with that node.

– This method is unsatisfactory for T, since dT,dr is unde…ned at cv faces.

– This assumption is suitable for _ ¡.

« Piecewise linear pro…le:

– second simplest

– Temperature is assumed to vary linearly between two nodes, with discontinuous

changes in slope at the nodes.

– This pro…le is suitable for T, as dT,dr will be de…ned at cv faces.

Eng9977 - Computational Fluid Dynamics 5

– exact for 1D, no source

– as accurate as a parabola if cv faces are located midway between nodes

– The temperature gradients at the c and n faces are:

dT

dr

¸

¸

¸

¸

e

=

T

E

÷T

P

cr

e

;

dT

dr

¸

¸

¸

¸

w

=

T

P

÷T

W

cr

w

(8)

2.5 Discretized Equation

« Substitution of Eq. (8) into Eq. (7) gives:

/

e

(T

E

÷T

P

)

cr

e

÷/

w

(T

P

÷T

W

)

cr

w

+ _ ¡r = 0

or

_

/

e

cr

e

+

/

w

cr

w

_

T

P

=

/

e

cr

e

T

E

+

/

w

cr

w

T

W

+ _ ¡r

« which may be rewritten in the following standard form:

a

P

T

P

= a

E

T

E

+ a

W

T

W

+ / (9)

where

a

E

=

/

e

cr

e

(10)

a

W

=

/

w

cr

w

(11)

a

P

=

/

e

cr

e

+

/

w

cr

w

= a

E

+ a

W

=

a

nb

(12)

/ = _ ¡r (13)

where the subscript :/ indicates all the neighbour nodes of node 1.

« This is the discretized form of the governing equation for each control volume in the

calculation domain (i.e. one such equation exists for each node in the domain).

2.6 Boundary Conditions

« The following discretization exists at the left side (or boundary) of the one-dimensional

domain:

Eng9977 - Computational Fluid Dynamics 6

« Applying the 1st Law to the cv for node 1 gives:

¡

B

+ _ ¡\ ÷¡

e

= 0 (14)

« A discretized form of this equation, that can be written in the standard form (i.e.

similar to Eq. (9)) is desired.

« Consider the following three boundary conditions:

1. Speci…ed temperature, i.e. T

P

is known (T

Pspec

):

a

P

= 1 (15)

a

E

= 0 (16)

a

W

= 0 (17)

/ = T

Pspec

(18)

2. Speci…ed boundary heat ‡ux, i.e. ¡

00

B

is known:

– using a piecewise linear pro…le for T

¡

00

B

+ /

e

(T

E

÷T

P

)

cr

e

+ _ ¡r = 0 (19)

– This equation can be written in the standard form when:

a

P

=

/

e

cr

e

= a

E

+ a

W

(20)

a

E

=

/

e

cr

e

(21)

a

W

= 0 (22)

/ = _ ¡r + ¡

00

B

(23)

3. Boundary heat ‡ux ¡

00

B

is speci…ed by a heat transfer coe¢cient / and ‡uid

temperature, T

f

(both known):

¡

00

B

= /(T

f

÷T

P

) (24)

– Note: this equation is written assuming heat transfer in the positive r di-

rection.

Eng9977 - Computational Fluid Dynamics 7

– Substituting Eq. (24) into Eq. (19) and writing the result in the standard

form gives:

a

P

=

/

e

cr

e

+ / = a

E

+ a

W

+ / (25)

a

E

=

/

e

cr

e

(26)

a

W

= 0 (27)

/ = _ ¡r + /T

f

(28)

« Note: the third boundary condition can be used to simulate the others.

1. The speci…ed temperature boundary condition results when:

/ = · (29)

T

f

= T

Pspec

2. The speci…ed ‡ux boundary condition results when:

/ = 1,· (30)

T

f

= ¡

00

B

·

2.7 Interface Conductivity

« When a cv face is common to two control volumes, the ‡ux across the face must be

represented by the same expression in the discretization used for the two cv’s. This

is very important for a conservation law based method, otherwise a violation of that

law could exist, e.g. energy could be created or destroyed.

« Consider the cv face between nodes 1 and 1, then ¡

e

= ÷/

e

¹

dT

dx

[

e

at the c face for

the 1 cv must be equal to the amount of heat entering the cv for node 1 (¡

w

when

it is considered as node 1).

« The piecewise linear pro…le for T ensures this consistency of ‡uxes, but problems may

arise when a nonuniform thermal conductivity exists.

« If the thermal conductivity varies throughout the domain (e.g. a function of temper-

ature), values of thermal conductivity will be available at the nodes.

« A temptation may be to assume the nodal values prevail over the associated cv, e.g.

the rate of heat transfer leaving the 1 cv and going to the 1 cv is:

÷/

P

¹

dT

dr

¸

¸

¸

¸

e

= ÷/

P

¹

(T

E

÷T

P

)

cr

e

which would not be the same as the rate of heat transfer entering the 1 cv: ÷/

E

¹

(T

E

T

P

)

xe

« An interface conductivity, /

e

, must be de…ned:

1. The arithmetic mean would seem the obvious choice (it isn’t).

/

e

=

/

P

+ /

E

2

(31)

Eng9977 - Computational Fluid Dynamics 8

2. The harmonic mean is a much better (although less obvious) choice.

/

e

=

2/

P

/

E

/

P

+ /

E

(32)

« Consider the following two cases:

1. If /

E

= 0, i.e. the material in the 1 cv is a perfect insulator, then there should

be no heat ‡ux across the cv face. The harmonic mean gives /

e

= 0 (no ‡ux),

but the arithmetic mean gives /

e

= /

P

,2 and will give a false heat ‡ux across

the cv face.

2. /

P

/

E

, e.g. 1 is copper, and 1 is asbestos. The harmonic mean gives

/

e

= 2/

E

and the arithmetic mean gives /

e

= (/

P

+ /

E

),2. Which is correct?

– The harmonic mean is correct, because there will be negligible thermal resis-

tance in 1, and the temperature drop will occur in 1, therefore, /

P

should

not be included in /

e

.

– The 2 arises in /

e

since all of the temperature drop will occur in cr

e

,2,

but the equations use ¡

e

= ÷/

e

¹(T

E

÷ T

P

),cr

e

, the half is automatically

incorporated in /

e

.

« To simulate a composite slab, locate the cv faces at the material interfaces, and use

the harmonic mean to handle abrupt changes in thermal conductivity.

« Where does the harmonic mean come from? Consider a control volume face placed

midway between nodes 1 and 1.

« Using the resistance analogy, the ‡ux across the cv face is:

¡

00

e

=

T

P

÷T

E

xe

2k

P

+

xe

2k

E

=

T

1

th

¹

(33)

then

1

th

¹ = cr

e

/

E

+ /

P

2/

E

/

P

=

cr

e

/

e

(34)

which means the e¤ective (or interface) conductivity is:

/

e

=

2/

P

/

E

/

P

+ /

E

(35)

i.e. the harmonic mean.

Eng9977 - Computational Fluid Dynamics 9

2.8 Solution of the Discretized Equations

2.8.1 The Discretized Equations

« The discretized form of the governing equation for one-dimensional, steady state heat

conduction in Cartesian co-ordinates has been derived.

« For the one-dimensional case, at a node i:

a

P

i

T

i

= a

E

i

T

i+1

+ a

W

i

T

i1

+ /

i

(36)

« The result is : (i.e. number of nodes) simultaneous linear algebraic equations, which

when solved give a temperature distribution throughout the calculation domain.

2.8.2 Matrix Inversion

« For the one-dimensional case, the set of algebraic equations can be written in the

following form:

_

¸

¸

¸

¸

¸

¸

_

¸

¸

¸

¸

¸

¸

_

a

P

1

÷a

E

1

0 0 0 0

÷a

W

2

a

P

2

÷a

E

2

0 0 0

0 ÷a

W

3

a

P

3

÷a

E

3

0 0

0 0 ÷a

W

4

a

P

4

÷a

E

4

0

0 0 0 ÷a

W

5

a

P

5

÷a

E

5

0 0 0 0 ÷a

W

6

a

P

6

_

¸

¸

¸

¸

¸

¸

_

¸

¸

¸

¸

¸

¸

_

_

¸

¸

¸

¸

¸

¸

_

¸

¸

¸

¸

¸

¸

_

T

1

T

2

T

3

T

4

T

5

T

6

_

¸

¸

¸

¸

¸

¸

_

¸

¸

¸

¸

¸

¸

_

=

_

¸

¸

¸

¸

¸

¸

_

¸

¸

¸

¸

¸

¸

_

/

1

/

2

/

3

/

4

/

5

/

6

_

¸

¸

¸

¸

¸

¸

_

¸

¸

¸

¸

¸

¸

_

« Note: the coe¢cient matrix is tridiagonal

« The temperature distribution is found by determining the inverse of the coe¢cient

matrix:

[¹][T] = [1]

[T] = [¹]

1

[1]

« This is a direct solution method. Such methods become very expensive for two-

and three-dimensional applications, due to the sparse matrices that arise in multi-

dimensional problems ÷ iterative methods.

2.8.3 Gauss-Seidel

« The standard forms of the discretized equations can be rewritten as:

a

P

T

P

=

nb

a

nb

T

nb

+ /

and T

P

can be evaluated as follows:

T

P

=

nb

a

nb

T

nb

+ /

a

P

(37)

« Each node is visited in turn to update T

P

, and the most current neighbour values are

used in the RHS of Eq. (37). Iteration continues until convergence has been reached.

« This method can be slow to converge, and may diverge under certain situations.

Eng9977 - Computational Fluid Dynamics 10

2.8.4 TriDiagional Matrix Algorithm (TDMA)

« A TDMA takes advantage of the tridiagonal nature of the coe¢cient matrix.

« The discretized equation for a node i in a one-dimensional formulation is:

a

P

i

T

i

= a

E

i

T

i+1

+ a

W

i

T

i1

+ /

i

(38)

« At node 1, a

W

1

= 0, therefore:

a

P

1

T

1

= a

E

1

T

2

+ /

1

(39)

i.e. T

1

can be expressed as a function T

2

.

« At node 2:

a

P

2

T

2

= a

E

2

T

3

+ a

W

2

T

1

+ /

2

(40)

but T

1

= )(T

2

), therefore, T

2

= )(T

3

).

« Each nodal value of T

i

can be written as a function of T

i+1

, i.e. a functional relation

can be de…ned as:

T

i

= 1

i

T

i+1

+ Q

i

(41)

« At node i ÷1 then:

T

i1

= 1

i1

T

i

+ Q

i1

(42)

Substituting Eq. (42) into Eq. (38) gives:

a

P

i

T

i

= a

E

i

T

i+1

+ a

W

i

(1

i1

T

i

+ Q

i1

) + /

i

(43)

which can be rearranged in the form of Eq. (41) to give:

1

i

=

a

E

i

a

P

i

÷a

W

i

1

i1

(44)

Q

i

=

/

i

+ a

W

i

Q

i1

a

P

i

÷a

W

i

1

i1

(45)

« Equations (44) and (45) are recursion relations which give 1

i

and Q

i

as functions of

1

i1

and Q

i1

.

« The following series of steps are used in a TDMA:

1. At node 1, evaluate:

1

1

= a

E

1

,a

P

1

; Q

1

= /

1

,a

P

1

(46)

2. Step from node 2 ÷ (: ÷1) evaluating 1

i

and Q

i

at each node using Eqs. (44)

and (45).

3. At node ::

1

n

= 0 (47)

Q

n

=

/

n

+ a

Wn

Q

n1

a

Pn

÷a

Wn

1

n1

(48)

therefore, at node :, T

n

= Q

n

.

Eng9977 - Computational Fluid Dynamics 11

4. Step backwards, (: ÷1) ÷1, using:

T

i

= 1

i

T

i+1

+ Q

i

(49)

to give a value for T

i

at each node.

« The TDMA is a direct solution method for a line in a mesh.

2.9 Solution Algorithm

« The solution algorithm followed by a numerical heat transfer program is as follows:

1. DATA

– de…ne inputs

– problem dependent

– input the number of nodes, :, all /’s, T

1

’s, and properties required to specify

a problem

2. GRID

– de…ne grid (domain discretization)

– problem dependent

– set up the (uniform or nonuniform) grid by specifying the r

i

co-ordinates of

each node

– all r and cr terms are de…ned later in COEFF

3. GAMSOR

– de…ne thermophysical properties and sources

– problem dependent

– de…ne the thermal conductivities and source terms at each node in the mesh

4. COEFF

– evaluate coe¢cients in the discretized equations (including boundary condi-

tions)

– problem independent

– evaluate the coe¢cients a

P

, a

E

, a

W

and / for each node

– use the harmonic mean for interface conductivities

– evaluate coe¢cients for boundary nodes using the convection boundary con-

dition

– most e¢cient if all internal nodes (i = 2 ÷ (: ÷1)) are included in a loop,

and separate sections are used for the boundary nodes (note: the duplications

that are present when programming)

5. SOLVE

– solve the set of simultaneous linear algebraic equations

– problem independent

Eng9977 - Computational Fluid Dynamics 12

3 A Two-Dimensional Finite Volume Method

3.1 Discretization

« The formulation of the one-dimensional FV method can be extended to develop the

discretized equations for steady-state, two-dimensional heat conduction in Cartesian

co-ordinates.

« Consider a rectangular calculation domain, discretized by a line by line mesh. Control

volumes are constructed around each node in the mesh.

« Consider the control volume around a node 1 within the mesh, as shown below.

« Note:

– cr and cj are the grid spacings in the r and j directions, respectively.

– r and j are the r and j extents of the cv for node 1.

Eng9977 - Computational Fluid Dynamics 13

– Assume the cv faces are placed midway between the nodes, and the mesh may

be nonuniform.

3.1.1 Conservation Equation

« Applying the 1st Law to the cv about node 1 gives:

¡

w

+ ¡

s

+ _ ¡\ = ¡

e

+ ¡

n

(50)

« i.e.

_

_

Rate of heat

conducted

in to the cv

_

_

+

_

_

Rate of heat

generation

within the cv

_

_

=

_

_

Rate of heat

conducted

out of the cv

_

_

(51)

« Writing all heat transfer rates in the positive r and j directions:

÷/

w

¹

w

0T

0r

¸

¸

¸

¸

w

÷/

s

¹

s

0T

0j

¸

¸

¸

¸

s

+ _ ¡\ = ÷/

e

¹

e

0T

0r

¸

¸

¸

¸

e

÷/

n

¹

n

0T

0j

¸

¸

¸

¸

¸

n

(52)

3.2 Discretized Equations

« Assuming a piecewise linear pro…le for T, a stepwise pro…le for _ ¡, the harmonic mean

for interface conductivities, and unit depth of the domain Eq. (52) can be written as

follows:

÷/

w

j

(T

P

÷T

W

)

cr

w

÷/

s

r

(T

P

÷T

S

)

cj

s

+ _ ¡rj =

÷/

e

j

(T

E

÷T

P

)

cr

e

÷/

n

r

(T

N

÷T

P

)

cj

n

This equation can be written in the following standard form:

a

P

T

P

= a

E

T

E

+ a

N

T

N

+ a

W

T

W

+ a

S

T

S

+ / (53)

where

a

E

=

/

e

j

cr

e

(54)

a

N

=

/

n

r

cj

n

(55)

a

W

=

/

w

j

cr

w

(56)

a

S

=

/

s

r

cj

s

(57)

a

P

= a

E

+ a

N

+ a

W

+ a

S

(58)

/ = _ ¡rj (59)

Eng9977 - Computational Fluid Dynamics 14

3.3 Boundary Conditions

« Only the convection boundary condition will be considered, since the other boundary

conditions can be simulated by manipulating / and T

f

.

« Consider the top (t) surface of a two-dimensional calculation domain.

« Applying the 1st Law to the 1 cv:

¡

w

+ ¡

s

÷¡

e

÷¡

conv

+ _ ¡\ = 0 (60)

substituting expressions for the heat transfer rates gives:

÷/

w

¹

w

0T

0r

¸

¸

¸

¸

w

÷/

s

¹

s

0T

0j

¸

¸

¸

¸

s

+ /

e

¹

e

0T

0r

¸

¸

¸

¸

e

÷/

t

¹

conv

(T

P

÷T

t

1

) + _ ¡rj = 0 (61)

« Using a piecewise linear pro…le for T in the derivatives, and stepwise pro…les for T

and _ ¡ in the convection and source terms, respectively, Eq. (61) can be written as

follows:

÷/

w

j

(T

P

÷T

W

)

cr

w

÷/

s

r

(T

P

÷T

S

)

cj

s

+/

e

j

(T

E

÷T

P

)

cr

e

÷/

t

r

_

T

P

÷T

t

1

_

+ _ ¡rj = 0

« This equation can be written in the standard form:

a

P

T

P

= a

E

T

E

+ a

W

T

W

+ a

S

T

S

+ / (62)

Eng9977 - Computational Fluid Dynamics 15

where

a

E

=

/

e

j

cr

e

(63)

a

W

=

/

w

j

cr

w

(64)

a

S

=

/

s

r

cj

s

(65)

a

P

= a

E

+ a

W

+ a

S

+ /

t

r (66)

/ = _ ¡rj + /

t

rT

t

1

(67)

« Consider node 1 at the top (t) right (r) corner of a rectangular domain:

« Applying the 1st Law to the 1 cv:

¡

w

+ ¡

s

÷¡

t

conv

÷¡

r

conv

+ _ ¡\ = 0 (68)

« Using a piecewise linear pro…le for T in the conduction terms, and prevailing assump-

tions for T and _ ¡ in the convection and source terms, respectively:

÷/

w

j

(T

P

÷T

W

)

cr

w

÷/

s

r

(T

P

÷T

S

)

cj

s

÷/

t

(T

P

÷T

t

1

)r

÷/

r

(T

P

÷T

r

1

)j + _ ¡rj = 0

« Rewriting this equation in the standard form:

a

P

T

P

= a

W

T

W

+ a

S

T

S

+ / (69)

where

a

W

=

/

w

j

cr

w

(70)

a

S

=

/

s

r

cj

s

(71)

a

P

= a

W

+ a

S

+ /

t

r + /

r

j (72)

/ = _ ¡rj + /

t

rT

t

1

+ /

r

jT

r

1

(73)

Eng9977 - Computational Fluid Dynamics 16

3.4 Solution of the Discretized Equations

3.4.1 The Discretized Equations

« The discretized forms of the governing equations for two-dimensional, steady state

heat conduction problems in Cartesian co-ordinates have been derived.

« For node (i, ,):

a

P

i;j

T

i;j

= a

E

i;j

T

i+1;j

+ a

N

i;j

T

i;j+1

+ a

W

i;j

T

i1;j

+ a

S

i;j

T

i;j1

+ /

i;j

(74)

« The result is : : (i.e. number of nodes) simultaneous linear algebraic equations,

which when solved give a temperature distribution throughout the calculation domain.

3.4.2 Solution Algorithm

« The solution algorithm followed by a numerical heat transfer program is as follows:

1. DATA

– de…ne inputs

– problem dependent

– input the number of nodes, : and :, in the r and j directions, all /’s, T

1

’s,

and properties required to specify a problem

2. GRID

– de…ne grid (discretization)

– problem dependent

– set up the (uniform or nonuniform) grid by specifying the r(i, ,) and j(i, ,)

co-ordinates of each (i, ,) node

– all r, j, cr, and cj terms are de…ned later in COEFF

3. GAMSOR

– de…ne thermophysical properties and sources

– problem dependent

– de…ne the thermal conductivities and source terms at each node in the mesh

4. COEFF

– evaluate coe¢cients (including boundary conditions)

– problem independent

– evaluate the coe¢cients a

P

, a

E

, a

N

, a

W

, a

S

, and / for each node

– use the harmonic mean for interface conductivities

– evaluate coe¢cients for boundary nodes using the convection boundary con-

dition

– most e¢cient if all internal nodes (i = 2 ÷ (: ÷1) and , = 2 ÷ (:÷1))

are included in a loop, and separate loops are used for the boundaries (note:

the duplications that are present when programming)

5. SOLVE

– solve the set of simultaneous linear algebraic equations

Eng9977 - Computational Fluid Dynamics 17

– A TDMA can be used along each line in the mesh. The o¤ line terms are

evaluated with available values of temperature and lumped into the /

i

term.

Iterations are required, because the o¤ line terms are not correct until a

converged solution has been obtained

4 Some Details

4.1 Nonlinearities

« The coe¢cients of the discretized equations are dependent on the thermophysical

properties of the material in which heat is being conducted. These properties, e.g.

thermal conductivity, may be functions of temperature. Therefore, the coe¢cients

and the temperature solution obtained from them will be incorrect until the correct

temperature …eld (and properties) have been calculated. A nonlinearity has been

introduced due to the nonuniform thermal conductivity.

« Another possible nonlinearity is that a source (or sink) may be dependent on temper-

ature. This dependence may be ignored, but that will slow convergence to a solution.

The source term may be linearized in a fashion to promote convergence.

4.1.1 Temperature Dependent Properties

« Consider the case of heat conduction where the thermal conductivity, /, is a linear

function of T:

/ = /

o

+ , (T ÷T

o

)

« The previously derived coe¢cients may be used, where the thermal conductivity is

evaluated at each node, and the harmonic mean is used to determine the interface

conductivity. However, since the nodal values determined for / will be incorrect

unless the correct T …eld is obtained an iterative solution technique is required.

« The original solution algorithm is:

– DATA

GRID

GAMSOR

COEFF

SOLVE

« To account for a T dependence of /, modify the algorithm as follows:

– DATA

GRID

For i=1,#

+ GAMSOR

COEFF

SOLVE

End

Eng9977 - Computational Fluid Dynamics 18

« The information in DATA and GRID will never change so those routines are visited

once to set up the problem.

« A loop will be performed on GAMSOR (update nodal /’s based on the current nodal

T’s), COEFF (evaluate coe¢cients with latest available properties), and SOLVE (solve

the current set of discretized equations).

« The loop is repeated until a converged solution is obtained.

« This algorithm can be used in one- and two-dimensions.

4.1.2 Source Term Linearization

« It is quite feasible that a source term will be dependent on temperature (e.g. chemical

reaction where the reaction rate is a function of temperature). The source term can

be taken as a constant evaluated with the currently available nodal T’s. But if we

are creating a linear equation for T, why not create a linear function for the source

term? This will accelerate the convergence.

« So, de…ne the source term _ ¡ as a linear function of temperature:

_ ¡ = o

C

+ o

P

T (75)

« This de…nition of _ ¡ will modify the a

P

and / coe¢cients of the discretized equations.

For example the one-dimensional equations would become:

a

P

T

P

= a

E

T

E

+ a

W

T

W

+ /

where

a

E

=

/

e

cr

e

a

W

=

/

w

cr

w

a

P

= a

E

+ a

W

÷o

P

r (76)

/ = o

C

r (77)

« The modi…ed two-dimensional equations will be shown later.

« If o

C

and o

P

themselves are not functions of T, the original solution algorithm is

used. If they are a function of T then the algorithm shown for nonlinear / would be

used.

4.2 Discretization

« Thus far we have assumed (for convenience) that control volume faces are placed

midway between nodes:

Eng9977 - Computational Fluid Dynamics 19

« Note: If the grid is nonuniform the node associated with a control volume will not

be located at the geometric center of the control volume. Why is this an issue?

Remember that properties (e.g. /) and source terms are evaluated using the nodal

temperatures. Is that nodal value a good representation of a value prevailing over

the volume if it is not evaluated using a centroidal value?

« To avoid this problem, the calculation domain can be discretized with a set of volumes,

and the nodes can be placed at the geometric center of each volume:

« This discretization gives a better approximation for values assumed to prevail over a

volume.

« However, if piecewise linear pro…les are used for T, and cv faces are midway between

nodes, the gradient between two nodes is the same as that for a parabolic function

between the nodes, i.e. the method we have developed would give the exact solution

for a one-dimensional, steady uniform source, uniform / problem! If cv faces are not

midway between nodes we do not get this accuracy.

« Given that modern commercial codes are based on …nite element discretizations, I do

not believe that volumes are constructed …rst, also, given the potential for skewed

Eng9977 - Computational Fluid Dynamics 20

nonuniform meshes it is impossible to place cv faces midway between nodes, so this

is a non-issue.

« If the cv faces are not midway between nodes this would a¤ect how the interface

thermal conductivity is calculated:

– Consider the case where the cv face is not midway between nodes:

– The heat ‡ux at the c face is:

¡

e

=

/

e

(T

P

÷T

E

)

(cr)

e

– If the cv face is the interface between two materials having di¤erent thermal

conductivities, /

P

and /

E

, then the resistance analogy can be used to give:

¡

e

=

(T

P

÷T

E

)

(cr)

e

,/

P

+ (cr)

e+

,/

E

– De…ning the length ratio:

)

e

=

(cr)

e+

(cr)

e

– then:

/

e

=

_

1 ÷)

e

/

P

+

)

e

/

E

_

1

(78)

– If the cv face is midway between nodes 1 and 1, )

e

= 0.5 and:

/

e

=

2/

P

/

E

/

P

+ /

E

as before.

Eng9977 - Computational Fluid Dynamics 21

4.3 Golden Rules

« To aid in the development of a discretization method it would be helpful to have some

guiding principles. Any e¤ective discretization should give the same solution with a

suitably re…ned grid. However, since we are using a consersative method (i.e. based

on conservation principles) it would be useful to specify that any discretization used

would guarantee: (1) physically realistic behaviour; and (2) overall balance.

« Physical realism would require that a solution on even a coarse grid would be physically

realistic. For example, consider one-dimensional heat conduction with no source. The

temperature should decrease between two nodes.

« Since the method is based on conservation laws applied to individual control volumes,

when all of these control volumes are added to give the total calculation domain

volume, conservation must be maintained. This would imply that we would have to

guarantee the consistency of ‡uxes between control volumes.

« These guiding principles help to de…ne the following four rules:

1. Consistency at control volume faces

– When a cv face is common to two control volumes, the ‡ux across it must be

represented by the same expression in the discretization equation for each of

the control volumes.

– The use of the piecewise linear pro…le for T and the interface thermal con-

ductivity help provide this consistency.

2. Positive coe¢cients

– All a

P

and a

nb

coe¢cients should be positive. Actually they should all be

of the same sign, positive is more conventional than negative. If the sign

of a

p

is not the same as a particular a

nb

then an increase in T

nb

leads to a

decrease in T

P

. This is not physically realistic.

3. Negative o

P

Eng9977 - Computational Fluid Dynamics 22

– The source term has been linearized as follows:

_ ¡ = o

C

+ o

P

T

and the a

P

coe¢cient is:

a

P

= a

E

+ a

W

÷o

P

r

– Obviously if o

P

0 it is possible for a

P

< 0 which would violate Rule 2 and

lead to unrealistic solutions.

– Also, if o

P

0, an increase in T would increase _ ¡, which would increase

T and the system would become unstable. Physically, whatever you are

simulating would melt. This is not physically realistic.

4. Sum of the neighbour coe¢cients

– When the the solutions T and T +c are both satisfy the governing di¤erential

equations (which they do for Laplace’s equation), it is required that:

a

P

=

a

nb

– This would guarantee that if the boundary temperatures were increased by

a constant, all other temperatures would increase by the same constant, i.e.

physical realism.

5 Transient Problems

« Thus far the discretization method has been applied to steady state situations only.

What changes are required to simulate transient situations?

« Consider one-dimensional transient heat conduction with nonuniform / and no source

term:

0

0r

_

/

0T

0r

_

= jc

0T

0t

(79)

« Time is a one-way co-ordinate, i.e. current temperatures are only functions of previous

values. This will allow a time marching procedure, i.e. given the values at a previous

time t what are the values at the new time t + t. Use the superscript

o

to denote

values at time t, i.e. T

o

P

, T

o

E

and T

o

W

, and no superscript to designate values at time

t + t, (T

P

, T

E

, T

W

).

« To derive the discretization equation integrate the di¤erential equation over a control

volume (from n to c faces).

_

t+t

t

_

e

w

0

0r

_

/

0T

0r

_

drdt = jc

_

e

w

_

t+t

t

0T

0t

dtdr (80)

where the order of the integration depends on the nature of the term.

« For the transient term assume the nodal value prevails over the control volume:

jc

_

e

w

_

t+t

t

0T

0t

dtdr = jcr(T

P

÷T

o

P

) (81)

Eng9977 - Computational Fluid Dynamics 23

« Using the practices developed for steady state problems:

_

t+t

t

_

e

w

0

0r

_

/

0T

0r

_

drdt =

_

t+t

t

_

/

e

(T

E

÷T

P

)

cr

e

÷/

w

(T

P

÷T

W

)

cr

w

_

dt (82)

« How do T

P

, T

E

and T

W

vary with time from t to t + t? De…ne:

_

t+t

t

T

P

dt = [)T

P

+ (1 ÷)) T

o

P

] t (83)

where ) is a weighting factor between 0 and 1.

« The discretized equation can bewritten as:

)

_

/

e

(T

E

÷T

P

)

cr

e

÷/

w

(T

P

÷T

W

)

cr

w

_

+(1 ÷))

_

/

e

(T

o

E

÷T

o

P

)

cr

e

÷/

w

(T

o

P

÷T

o

W

)

cr

w

_

= jc

r

t

(T

P

÷T

o

P

)

which can be rearranged into something that looks like our standard form:

a

P

T

P

= a

E

[)T

E

+ (1 ÷)) T

o

E

]+a

W

[)T

W

+ (1 ÷)) T

o

W

]+[a

o

P

÷(1 ÷)) a

E

÷(1 ÷)) a

W

] T

o

P

(84)

where

a

E

=

/

e

cr

e

(85)

a

W

=

/

w

cr

w

(86)

a

o

P

= jc

r

t

(87)

a

P

= )a

E

+ )a

W

+ a

o

P

(88)

5.1 Explicit, Crank-Nicolson and Fully Implicit Schemes

« The type of time integration scheme is de…ned by the value of the weighting function

).

« Explicit scheme () = 0)

– The explicit scheme assumes that the old value (T

o

P

) prevails over the entire time

step except at t + t

« Fully implicit scheme () = 1)

– The fully implicit scheme assumes the value suddenly drops to the new value

(T

P

) which then prevails over the entire time step

« Crank-Nicolson scheme () = 0.5)

– The Crank-Nicolson scheme assumes that a linear variation of T

P

during the

time step. This would seem to be the sensible one.

Eng9977 - Computational Fluid Dynamics 24

« For the explict scheme the discretized equation becomes:

a

P

T

P

= a

E

T

o

E

+ a

W

T

o

W

+ (a

o

P

÷a

E

÷a

W

) T

o

P

i.e. T

P

is not related to T

E

and T

W

at the new time step, but can be calculated

explicitly from previous values.

« PROBLEM: Remember Rule 2 requiring positive coe¢cients. Note that the coe¢-

cient multiplying T

o

P

can become negative (T

o

P

is considered a neighbour node of T

P

in the time direction). To guarantee positive coe¢cients the time step would have to

be small.

a

o

P

a

E

+ a

W

jc

r

t

/

e

cr

e

+

/

w

cr

w

Assume, for convenience, /

e

= /

w

= / and cr

e

= cr

w

= r:

jc

r

t

2/

r

t <

jc (r)

2

2/

(89)

« If this time step is exceeded, physically unrealistic solutions can arise due to the

negative coe¢cient on T

o

P

. Note: as a grid is re…ned for a more accurate solution the

time step must be reduced.

« The Crank-Nicolson scheme is de…ned as unconditionally stable, which means that it

will give a solution, but not necessarily a physically realistic one. For this scheme

the coe¢cient multiplying T

o

P

is a

o

P

÷(a

E

+ a

W

) ,2. Again there is the potential for

a negative coe¢cient on T

o

P

, which can lead to unrealistic solutions.

« The only way to guarantee the coe¢cient multiplying T

o

P

is positive (i.e. satisfy Rule

2) is to set ) = 1, i.e. use the fully implicit scheme. Note: for small time steps the

Crank-Nicolson scheme is more accurate.

Eng9977 - Computational Fluid Dynamics 25

6 Discretization Equations for Heat Conduction

« We are now ready to write the discretization equations for transient heat conduction

in materials with nonuniform properties and source terms.

6.1 One-Dimension

« The governing equation for transient one-dimensional heat conduction in materials

with nonuniform properties and source terms is:

0

0r

_

/

0T

0r

_

+ _ ¡ = jc

0T

0t

(90)

« Using all of the approximations developed the discretized equations for one-dimensional

conduction are:

a

P

T

P

= a

E

T

E

+ a

W

T

W

+ / (91)

where

a

E

=

/

e

cr

e

(92)

a

W

=

/

w

cr

w

(93)

a

o

P

= jc

r

t

(94)

/ = o

C

r + a

o

P

T

o

P

(95)

a

P

= a

E

+ a

W

+ a

o

P

÷o

P

r (96)

6.2 Two-Dimensions

« The governing equation for transient two-dimensional heat conduction in materials

with nonuniform properties and source terms is:

0

0r

_

/

0T

0r

_

+

0

0j

_

/

0T

0j

_

+ _ ¡ = jc

0T

0t

(97)

« Using all of the approximations developed the discretized equations for two-dimensional

conduction are:

a

P

T

P

= a

E

T

E

+ a

N

T

N

+ a

W

T

W

+ a

S

T

S

+ / (98)

where

a

E

=

/

e

j

cr

e

(99)

a

N

=

/

n

r

cj

n

(100)

a

W

=

/

w

j

cr

w

(101)

a

S

=

/

s

r

cj

s

(102)

a

o

P

= jc

rj

t

(103)

/ = o

C

rj + a

o

P

T

o

P

(104)

a

P

= a

E

+ a

N

+ a

W

+ a

S

+ a

o

P

÷o

P

rj (105)

Eng9977 - Computational Fluid Dynamics 26

6.3 Solution Algorithms

6.3.1 Steady-State, No Nonlinearities

« This is the simplest case as no iterations or time stepping is required. The solution

algorithm is:

– DATA

GRID

GAMSOR

COEFF

SOLVE

6.3.2 Steady-State, Temperature Dependent Properties

« To account for a T dependence of / (or other properties such as o

C

or o

P

), modify

the steady-state algorithm as follows:

– DATA

GRID

For i=1,#

+ GAMSOR

COEFF

SOLVE

End

« The properties would be updated in GAMSOR. The loop is completed # times until

convergence (see discussion below).

6.3.3 Transient, No Nonlinearities

« To simulate transient problems, a time stepping procedure is required. The algorithm

would be:

– DATA

GRID

GAMSOR

For t=t

init

: t : t

end

+ COEFF

SOLVE

End

« Note: no iterations are required per time step as the properties are not functions of

T.

Eng9977 - Computational Fluid Dynamics 27

6.3.4 Transient, Temperature Dependent Properties

« To account for a T dependence of / (or other properties such as o

C

or o

P

), modify

the transient algorithm as follows:

– DATA

GRID

For t=t

init

: t : t

end

+ For i=1,#

GAMSOR

COEFF

SOLVE

End

End

« Note: iterations are required at each time step to update the temperature dependent

properties and coe¢cients. The iterations continue until convergence (see discussion

below).

6.4 Convergence

« The residual of the discretized equation for each node can be evaluated as follows:

1 =

¸

¸

¸a

P

T

P

÷

a

nb

T

nb

÷/

¸

¸

¸ (106)

« If the discretization gives an exact approximation of the governing equation and the

exact answer for T is used the residual would be zero. If an approximate solution for

T is used 1 0. The magnitude of 1 is an indication of how close the approximate

solution is to the "correct" solution. In an iterative solution algorithm "correct"

implies converged as the discretized equation is an approximation to the governing

equation, so even if the exact answer is used there will still be a residual.

« How can the residual be used?

1. To terminate the iterations in algorithms with temperature dependent properties.

– During each iteration the residual would be evaluated at all nodes in the

mesh.

– The iterations would terminate when the sum of all residuals (or mean, or

maximum) is below a certain threshold.

– The threshold would be determined by performing test runs to determine

how many iterations are required to obtain a suitably converged solution.

This information would then be correlated with the size of the residuals.

2. To terminate iterations in an iterative solver

– The TDMA gives a solution for all unknowns along a line. The one-

dimensional application of the TDMA is not iterative. The two-dimensional

TDMA is iterative, however, as it is used to solve along lines in the mesh,

Eng9977 - Computational Fluid Dynamics 28

with o¤-line terms evaluated with latest available values. Each line is visited

in turn (both i and j lines). One iteration of the solver consists of a sweep of

all mesh lines in the domain. The iterations are continued until a suitably

converged solution is obtained. The term "suitably converged" would have

di¤erent interpretations depending on the algorithm used.

(a) Steady-State or Transient, No Nonlinearities: In this algorithm the prop-

erties are not functions of temperature, and the coe¢cients are evaluated

once. The TDMA is then used to solve the equations to convergence.

Iterations in the TDMA would stop when the sum of all residuals (or

mean, or maximum) is below a certain threshold (as in (1) above).

(b) Steady-State or Transient, Temperature Dependent Properties: In this

algorithm the properties are temperature dependent, therefore, the co-

e¢cients are not correct until a converged solution is obtained. Here

it would be wasteful to solve the equations (with incorrect coe¢cients)

to convergence. A faster solution can be obtained by solving the equa-

tons until the residuals (or mean, or maximum) is a fraction of that at

the beginning of the iterations. In other words, evaluate the residuals

before the iterations begin in the TDMA (i.e. with new coe¢cients and

old solution), then evaluate the residuals during each iteration of the

TDMA. Evaluate the ratio (current residuals)/(initial residuals) and

compare this ratio to some threshold. When the ratio is below a thresh-

old stop the iterations in the TDMA and begin another iteration in the

iterative solution algorithm. To determine when to stop the iterations

in the solution algorithm compare the current residuals (or mean, or

maximum) in the TDMA to a threshold (as in (1) above). Note: there

are two thresholds here, a ratio and a magnitude.

6.5 Under-relaxation

« In an iterative solution algorithm the coe¢cients change between iterations. The

new coe¢cients depend on the new solution …eld for T. Depending on the quality

of the initial guess …eld for T, grid re…nement and magnitude of the coe¢cients there

may be a large change in T between iterations. This would lead to a large change in

coe¢cients, and another large change of T, etc. The solution may diverge. To counter

this possibility of divergence the change in T between iterations can be controlled.

« The two-dimensional TDMA is iterative, and large changes in T between solver iter-

ations can also lead to divergence.

« The standard form of our discretized equation is:

a

P

T

P

=

a

nb

T

nb

+ /

which can be rearranged to:

T

P

=

a

nb

T

nb

+ /

a

P

« Add and subtract T

P

, the value from the previous iteration, on the right side of the

equation:

T

P

= T

P

+

_

a

nb

T

nb

+ /

a

P

÷T

P

_

Eng9977 - Computational Fluid Dynamics 29

« The bracketed terms are the change in T

P

in the current iteration. The change can

be modi…ed by using the relaxation parameter c:

T

P

= T

P

+ c

_

a

nb

T

nb

+ /

a

P

÷T

P

_

where the change is reduced for c < 1 (under-relaxation) and the change is increased

for c 1 (over-relaxation). This equation can be rearranged to look like our standard

form:

a

P

c

T

P

=

a

nb

T

nb

+ / + (1 ÷c)

a

P

c

T

P

(107)

« Note: when the solution is converged T

P

= T

P

and we get the original discretization

equation.

« Modi…cation of the coe¢cients in the discretized equations as shown will slow down

changes in T

P

and help promote stability for iterative algorithms and solvers. There

is an optimum value of c that will give the quickest solution, however, the actual

value can vary between problems. Generally you will …nd a range of c below which

the solution takes too long, and above which the solution becomes unstable.

7 Equations

7.1 General Scalar Transport Equation

« The equation governing the transport of a scalar c can be written as:

0 (jc)

0t

+

\ (jnc) =

\

\c + o (108)

« The …rst term is the unsteady or transient term. The second term is the convection

term, i.e. transport due to bulk ‡uid motion. The third term is the di¤usion term,

i.e. transport due to a gradient driven process. The fourth term is the source or

generation term. This general form of the scalar transport equation can be used to

model many equations of natural processes.

7.2 Mass Conservation

« The mass conservation or continuity equation can be written as:

0j

0t

+

0(jn)

0r

+

0(j·)

0j

+

0(jn)

0.

= 0

« or in vector form

0j

0t

+

\ (jn) = 0 (109)

« The general scalar transport equation models this equation if j = 1, c = j (in the

continuity equation), and = o = 0.

Eng9977 - Computational Fluid Dynamics 30

7.3 Momentum Equations

« The rmometum (or r component of the Navier-Stokes) equation is:

0 (jn)

0t

+

0(jnn)

0r

+

0(j·n)

0j

+

0(jnn)

0.

= ÷

0j

0r

+ 2

0

0r

_

j

0n

0r

_

÷

2

3

0

0r

_

j

_

0n

0r

+

0·

0j

+

0n

0.

__

+

0

0j

_

j

_

0·

0r

+

0n

0j

__

+

0

0.

_

j

_

0n

0.

+

0n

0r

__

+ jq

x

« Expanding the right side of the equation:

0 (jn)

0t

+

0(jnn)

0r

+

0(j·n)

0j

+

0(jnn)

0.

= ÷

0j

0r

+

0

0r

_

j

0n

0r

_

+

0

0j

_

j

0n

0j

_

+

0

0.

_

j

0n

0.

_

÷

2

3

0

0r

_

j

_

0n

0r

+

0·

0j

+

0n

0.

__

+

0

0r

_

j

0n

0r

_

+

0

0j

_

j

0·

0r

_

+

0

0.

_

j

0n

0r

_

+ jq

x

« Which can be written as:

0 (jn)

0t

+

0(jnn)

0r

+

0(j·n)

0j

+

0(jnn)

0.

= ÷

0j

0r

+

0

0r

_

j

0n

0r

_

+

0

0j

_

j

0n

0j

_

+

0

0.

_

j

0n

0.

_

+o

u

or in vector form

0 (jn)

0t

+

\ (jnn) =

\ j

\n + o

u

÷

0j

0r

(110)

where o

u

contains all stress terms not included in the di¤usion term:

o

u

= ÷

2

3

0

0r

_

j

_

0n

0r

+

0·

0j

+

0n

0.

__

+

0

0r

_

j

0n

0r

_

+

0

0j

_

j

0·

0r

_

+

0

0.

_

j

0n

0r

_

+jq

x

« The general scalar transport equation models this equation if c = n, and = j and

o = o

u

÷

@p

@x

.

« Note: o

u

simpli…es to a more familiar form when j is uniform:

o

u

=

1

3

j

0

0r

_

0n

0r

+

0·

0j

+

0n

0.

_

+ jq

x

=

1

3

j

0

0r

_

\ n

_

+ jq

x

and if the ‡uid is incompressible:

o

u

= jq

x

7.4 Energy Equation

« The energy equation can be written as:

0 (jc

p

T)

0t

+

\ (jc

p

nT) =

\ /

\T + (111)

where is the viscous dissipation term:

= j

_

2

_

0n

0r

_

2

+ 2

_

0·

0j

_

2

+ 2

_

0n

0.

_

2

+

_

0·

0r

+

0n

0j

_

2

+

_

0n

0j

+

0·

0.

_

2

+

_

0n

0.

+

0n

0r

_

2

_

÷

2

3

j

_

0n

0r

+

0·

0j

+

0n

0.

_

2

Eng9977 - Computational Fluid Dynamics 31

« This equation has the same form as the general scalar transport equation when c = T,

j = jc

p

, = / and o = .

« Note: the viscous dissipation term causes frictional heating, and is signi…cant with

large velcoity gradients (i.e a vehicle travelling at very high speeds). Usually it is

neglected. The validity of neglecting will be proven later when the nondimensional

form of the energy equation is presented.

7.5 Summary

« The equations that govern heat transfer and ‡uid ‡ow can be cast in the form of a

general scalar transport equation. If a discretization method can be developed for

the general scalar transport equation we will have a method that can be applied to

all of the equations of interest.

8 General Discretization Procedure

« De…ne a convection di¤usion ‡ux

J:

J = jnc ÷

\c (112)

« The general scalar transport equation can be written as:

0 (jc)

0t

+

\

J = o (113)

and for steady state:

\

J = o (114)

« This is a very simple form of the governing equation for convection di¤usion processes.

If this equation is integrated over a volume:

_

V

\

Jd\ =

_

V

od\ (115)

« Using Gauss’ divergence theorem:

_

V

\

Jd\ =

_

s

J :d: (116)

which converts the volume integral of the divergence of

J into the integral of the ‡ux

**J across the surface of the volume. The normal : is perpendicular to the surface :
**

and points out of the control volume. In e¤ect this equation determines the net rate

of transport of c out of a control volume. So the volume integral of the governing

equation has become.

_

s

J :d: =

_

V

od\ (117)

i.e. net rate of transport out equals the rate of generation (for steady state).

Eng9977 - Computational Fluid Dynamics 32

« Let’s look at this in the context of a one-dimensional situation. Apply the equation

to the control volume shown below:

« In a one-dimensional situation the area of the control volume faces can be set to 1,

and the ‡ux is uniform over the control volume face. The normal points out of the

control volume. The ‡ux

J is de…ned in the positive r direction. Then the integrated

equation becomes:

J

e

÷J

w

= or (118)

where the source term has been assumed uniform over the control volume to perform

the integral (i.e. stepwise pro…le). Note: the negative sign on J

w

arises because the

normals always point out of the control volume, and the ‡uxes are always de…ned in

the positive r direction.

« The ‡uxes on the east and west faces are:

J

e

= j

e

n

e

c

e

÷

e

dc

dr

¸

¸

¸

¸

e

(119)

J

w

= j

w

n

w

c

w

÷

w

dc

dr

¸

¸

¸

¸

w

(120)

« So:

j

e

n

e

c

e

÷

e

dc

dr

¸

¸

¸

¸

e

÷j

w

n

w

c

w

+

w

dc

dr

¸

¸

¸

¸

w

= or (121)

« To de…ne an algebraic approximation to this equation we need pro…le assumptions for

c. Since we haven’t considered convection yet, let’s assume there is no ‡uid ‡ow, so

n

e

= n

w

= 0, and the process will reduce to a di¤usion process:

÷

e

dc

dr

¸

¸

¸

¸

e

+

w

dc

dr

¸

¸

¸

¸

w

= or (122)

« Assume a piecewise linear pro…le for c between two nodes, then:

dc

dr

¸

¸

¸

¸

e

=

c

E

÷c

P

cr

e

;

dc

dr

¸

¸

¸

¸

w

=

c

P

÷c

W

cr

w

(123)

« and

÷

e

c

E

÷c

P

cr

e

+

w

c

P

÷c

W

cr

w

= or (124)

Eng9977 - Computational Fluid Dynamics 33

« which can be rearranged into the following general form:

a

P

c

P

= a

E

c

E

+ a

W

c

W

+ / (125)

where

a

E

=

e

cr

e

(126)

a

W

=

w

cr

w

(127)

a

P

=

e

cr

e

+

w

cr

w

= a

E

+ a

W

=

a

nb

(128)

/ = or (129)

« Compare this to our previous derivation of the discretized equation for steady one-

dimensional heat conduction (set c = T, = / and o = _ ¡). We have derived

a discretized form of the equation that governs any di¤usion process (steady state,

one-dimensional), i.e.:

d

dr

_

dc

dr

_

+ o = 0 (130)

« Next we look at the convection terms.

9 Convection and Di¤usion

« Convection arises due to a ‡uid ‡ow. In the following derivations the ‡uid ‡ow …eld

will be assumed known.

« We have studied the di¤usion, source and transient terms in the context of conduction

heat transfer.

« The equations governing ‡uid ‡ow have been cast in the form of a general convection-

di¤usion scalar transport equation. You will …nd that convection and di¤usion are

strongly linked as the relative magnitudes of convection and di¤usion have a signi…cant

e¤ect on how we should model both the convection and di¤usion terms.

9.1 One-Dimensional Convection and Di¤usion

« Consider steady, one-dimensional convection and di¤usion transport of a scalar c in

the absence of any source terms. The equation governing the transport of c can be

written as:

dJ

dr

= 0 (131)

where J is the convection-di¤usion ‡ux of c in the r direction:

J = jnc ÷

dc

dr

(132)

Eng9977 - Computational Fluid Dynamics 34

« The ‡uid ‡ow must satisfy mass conservation (or the continuity equation):

d (jn)

dr

= 0 (133)

i.e. the mass ‡ux, jn, is constant.

« Using our standard nomenclature for discretization of a one-dimensional domain:

« The governing equation can be inegrated over the control volume:

_

s

J :d: = 0 (134)

« As before, in a one-dimensional situation the area of the control volume faces can be

set to 1, and the ‡ux is uniform over the control volume face. The normal points out

of the control volume. Then the integrated equation becomes:

J

e

÷J

w

= 0 (135)

« The ‡uxes on the east and west faces are:

J

e

= j

e

n

e

c

e

÷

e

dc

dr

¸

¸

¸

¸

e

J

w

= j

w

n

w

c

w

÷

w

dc

dr

¸

¸

¸

¸

w

« So:

j

e

n

e

c

e

÷

e

dc

dr

¸

¸

¸

¸

e

÷j

w

n

w

c

w

+

w

dc

dr

¸

¸

¸

¸

w

= 0 (136)

« Assume a piecewise linear pro…le for c between two nodes to de…ne the di¤usion terms:

dc

dr

¸

¸

¸

¸

e

=

c

E

÷c

P

cr

e

;

dc

dr

¸

¸

¸

¸

w

=

c

P

÷c

W

cr

w

« The continuity equation de…nes j

e

n

e

= j

w

n

w

. How are the interface values of c

e

and

c

w

to be evaluated?

Eng9977 - Computational Fluid Dynamics 35

9.1.1 Piecewise Linear Convection Approximation

« Let’s try the seemingly sensible assumption of a piecewise linear approximation. If

we assume (for convenience) that the cv faces are midway between the nodes:

c

e

=

c

E

+ c

P

2

c

w

=

c

P

+ c

W

2

« Then the discretized equation can be written as:

j

e

n

e

c

E

+ c

P

2

÷

e

c

E

÷c

P

cr

e

÷j

w

n

w

c

P

+ c

W

2

+

w

c

P

÷c

W

cr

w

= 0

which can be rearranged into the following general form:

a

P

c

P

= a

E

c

E

+ a

W

c

W

(137)

where

a

E

=

e

cr

e

÷

j

e

n

e

2

(138)

a

W

=

w

cr

w

+

j

w

n

w

2

(139)

a

P

=

e

cr

e

+

j

e

n

e

2

+

w

cr

w

÷

j

w

n

w

2

= a

E

+ a

W

+ (j

e

n

e

÷j

w

n

w

) (140)

« From the continuity equation (j

e

n

e

÷j

w

n

w

) = 0, therefore, Rule 4 is satis…ed since

a

P

= a

E

+ a

W

.

« The ‡ow may be from left to right (positive n by our convention) or right to left

(negative n). It is possible that either a

E

or a

W

can be less than zero, which would

violate Rule 2 (all positive coe¢cients). This would lead to unrealistice solutions.

Assuming

e

=

w

= , and cr

e

= cr

w

= cr, this would occur when:

jn(cr,2)

1 (141)

« Note: this expression has the same form as the Reynolds number: Re = jn1,j. It is

the measure of the relative strengths of convection to di¤usion. For a general scalar

variable c we use the Peclet number:

1c =

jn1

(142)

where 1 is characteristic dimension.

« This would limit the method to low grid Peclet numbers.

« The method derived above is what results from a central-di¤erence (or Taylor’s se-

ries based) method. All codes based on a central-di¤erence formulation su¤er this

problem. The problem arises mathematical but it really stems from the fact that

the piecewise linear pro…le is not a good approximation of the behaviour of c in the

presence of a ‡uid ‡ow.

Eng9977 - Computational Fluid Dynamics 36

9.1.2 Exact Solution

« The governing equation can be solved analytically if is assumed constant (jn is

constant from continuity). Consider a domain 0 _ r _ 1, with boundary conditions:

c(r = 0) = c

0

c(r = 1) = c

L

The solution is:

c ÷c

0

c

L

÷c

0

=

exp(1c (r,1)) ÷1

exp(1c) ÷1

(143)

« Plotting this solution for various values of 1c:

« Note:

– The behaviour of c is linear for 1c = 0 only (i.e. no ‡ow, pure di¤usion, as

should be expected)

– As 1c is increased the solution diverges strongly from the linear behaviour.

– For 1c ¸ 1 the upstream value of c would give a good approximation of c at

1,2. Also note that the gradient dc,dr ~ 0 at 1,2.

9.1.3 Upwind Scheme

« One of the …rst attempts to model the upwind nature of the convection term was to

use an upwind scheme. In this scheme a piecewise linear approximation was used for

the di¤usion terms, and the upwind value of c was used to de…ne the interface value

of c.

« Since the ‡ow can be left or right, the upwind scheme would imply c

e

= c

P

when

(jn)

e

0, and c

e

= c

E

when (jn)

e

< 0, and vice versa for the west interface.

Assuming ‡ow in the positive r direction, the discretized equation can be written as:

j

e

n

e

c

P

÷

e

c

E

÷c

P

cr

e

÷j

w

n

w

c

W

+

w

c

P

÷c

W

cr

w

= 0

Eng9977 - Computational Fluid Dynamics 37

If the ‡ow is in the negative r direction:

j

e

n

e

c

E

÷

e

c

E

÷c

P

cr

e

÷j

w

n

w

c

P

+

w

c

P

÷c

W

cr

w

= 0

« Both equations can be written in a single form if we de…ne |¹, 1| to mean the

maximum of ¹ and 1, then:

j

e

n

e

c

e

= c

P

| (jn)

e

, 0| ÷c

E

| ÷(jn)

e

, 0|

j

w

n

w

c

w

= c

W

| (jn)

w

, 0| ÷c

P

| ÷(jn)

w

, 0|

« So the discretized equation can bewritten as:

(c

P

| (jn)

e

, 0| ÷c

E

| ÷(jn)

e

, 0|) ÷

e

c

E

÷c

P

cr

e

÷(c

W

| (jn)

w

, 0| ÷c

P

| ÷(jn)

w

, 0|) +

w

c

P

÷c

W

cr

w

= 0

which can be rearranged into the standard form:

a

P

c

P

= a

E

c

E

+ a

W

c

W

where

a

E

=

e

cr

e

+| ÷(jn)

e

, 0| (144)

a

W

=

w

cr

w

+| (jn)

w

, 0| (145)

a

P

=

e

cr

e

+| (jn)

e

, 0| +

w

cr

w

÷| (jn)

w

, 0|

= a

E

+ a

W

+ (j

e

n

e

÷j

w

n

w

) (146)

« Note:

– None of the coe¢cients can be negative, therefore, Rule 2 is satis…ed, and realistic

solutions will arise.

– Rule 4 is satis…ed.

– The upwind scheme is a very straightforward approximation to the exact solution.

Since it uses piecewise linear approximation to the di¤usion term it will overes-

timate di¤usion gradients for high 1c number ‡ows. Remember dc,dr ~ 0 at

1,2 for 1c ¸1. It will also overestimate the in‡uence of the upstream nodal c

on the interface value of c for low 1c ‡ows.

9.1.4 Exponential Scheme

« What happens if the exact solution is used to evaluate the convection-di¤usion ‡ux

at a control volume face? Consider the exact solution applied between nodes 1 and

1. The domain would be 0 _ r _ cr

e

, and the boundary conditions would be:

c(r = 0) = c

P

c(r = cr

e

) = c

E

Eng9977 - Computational Fluid Dynamics 38

The solution is:

c ÷c

P

c

E

÷c

P

=

exp(1c

e

(r,cr

e

)) ÷1

exp(1c

e

) ÷1

(147)

where:

1c

e

=

j

e

n

e

cr

e

e

(148)

« Evaluating the convection-di¤usion ‡ux at the c face:

J

e

= j

e

n

e

c

e

÷

e

dc

dr

¸

¸

¸

¸

e

J

e

= j

e

n

e

_

c

P

+ (c

E

÷c

P

)

_

exp(1c

e

(r

e

,cr

e

)) ÷1

exp(1c

e

) ÷1

__

÷

e

_

(c

E

÷c

P

)

1c

e

cr

e

_

exp(1c

e

(r

e

,cr

e

))

exp(1c

e

) ÷1

__

= j

e

n

e

_

c

P

+

c

P

÷c

E

exp(1c

e

) ÷1

_

(149)

« Similarly, on the west face:

J

w

= j

w

n

w

_

c

W

+

c

W

÷c

P

exp(1c

w

) ÷1

_

(150)

« Note: these expressions for the ‡uxes at the east and west cv faces are not dependent

on the location of the face between the relevant nodes!

« The discretized equation can be written as:

j

e

n

e

_

c

P

+

c

P

÷c

E

exp(1c

e

) ÷1

_

÷j

w

n

w

_

c

W

+

c

W

÷c

P

exp(1c

w

) ÷1

_

= 0

which can be written in the standard form:

a

P

c

P

= a

E

c

E

+ a

W

c

W

where

a

E

=

j

e

n

e

exp(1c

e

) ÷1

(151)

a

W

=

j

w

n

w

exp(1c

w

)

exp(1c

w

) ÷1

(152)

a

P

=

j

e

n

e

exp(1c

e

)

exp (1c

e

) ÷1

+

j

w

n

w

exp(1c

w

) ÷1

= a

E

+ a

W

+ (j

e

n

e

÷j

w

n

w

) (153)

« If these coe¢cients are used to simulate the steady, one-dimensional, no source, uni-

form problem the solution returned will be the analytical solution for any number

of nodes.

« This scheme is not exact for multi-dimensions or in problems with a source term, so

two approximations were developed to allow quicker computations.

Eng9977 - Computational Fluid Dynamics 39

9.1.5 Hybrid Scheme

« The hybrid scheme is a simple approximation to the behaviour of the coe¢cients using

the exponential scheme. First, consider the behaviour of the coe¢cient a

E

, or its

dimensionless form a

E

, (

e

,cr

e

) for the exponential scheme:

a

E

e

,cr

e

=

1c

e

exp(1c

e

) ÷1

« For ‡ow in the positive r direction 1c

e

0, the 1 node would be the downstream

neighbour, and its in‡uence decreases as 1c

e

increases. For ‡ow in the negative r

direction 1c

e

< 0, the 1 node would be the upstream neighbour, and its in‡uence

increases as [1c

e

[ increases.

« The hybrid scheme uses three straight lines to approximate the exact solution:

– For 1c

e

< ÷2:

a

E

e

,cr

e

= ÷1c

e

(154)

– For ÷2 _ 1c

e

_ 2, the tangent to the curve at 1c

e

= 0 is used:

a

E

e

,cr

e

= 1 ÷

1c

e

2

(155)

– For 1c

e

2:

a

E

e

,cr

e

= 0 (156)

« These three functions can be combined as follows:

a

E

=

e

cr

e

| ÷1c

e

, 1 ÷

1c

e

2

, 0|

or:

a

E

= | ÷j

e

n

e

,

e

cr

e

÷

j

e

n

e

2

, 0| (157)

Eng9977 - Computational Fluid Dynamics 40

« Using the hybrid scheme, the discretized equation is:

a

P

c

P

= a

E

c

E

+ a

W

c

W

where

a

E

= | ÷j

e

n

e

,

e

cr

e

÷

j

e

n

e

2

, 0| (158)

a

W

= |j

w

n

w

,

w

cr

w

+

j

w

n

w

2

, 0| (159)

a

P

= a

E

+ a

W

+ (j

e

n

e

÷j

w

n

w

) (160)

« Note:

– Once again the discretization does not depend on the location of the cv faces

between nodes.

– Rules 2 and 4 are satis…ed.

– It behaves like the central-di¤erence scheme for ÷2 _ 1c _ 2.

– For [1c[ 2 it behaves like an upwind scheme where the di¤usion term is set to

zero.

– It is a hybrid of the central-di¤erence and upwind schemes.

9.1.6 Power Law

« A better approximation to the exact solution can be obtained by using a curve to

approximate the behaviour of a

E

in the region of 1c

e

~ 0. The power law scheme

can be de…ned as follows:

– For 1c

e

< ÷10:

a

E

e

,cr

e

= ÷1c

e

(161)

– For ÷10 _ 1c

e

_ 0:

a

E

e

,cr

e

= (1 + 0.11c

e

)

5

÷1c

e

(162)

For 0 < 1c

e

_ 10:

a

E

e

,cr

e

= (1 ÷0.11c

e

)

5

(163)

– For 1c

e

10:

a

E

e

,cr

e

= 0 (164)

« These four functions can be combined as follows:

a

E

=

e

cr

e

|0,

_

1 ÷

0.1 [j

e

n

e

[

e

,cr

e

_

5

| +|0, ÷j

e

n

e

| (165)

Eng9977 - Computational Fluid Dynamics 41

9.1.7 Comparison of the Five Schemes

« Consider the case where c

E

= 1, c

W

= 0,

e

=

w

= , cr

e

= cr

w

= cr, therefore,

1c

e

= 1c

w

= 1c. The …ve schemes would give the following values for c

P

as a

function of 1c:

« Note:

– All schemes give realistic values except for the central-di¤erence scheme. The

central-di¤erence scheme could be made to work by re…ning the grid such that

the grid Peclet number [1c[ < 2, however, that is usually not feasible.

– The power law and exponential scheme give pretty much the same result.

– The hybrid scheme approximates the exponential scheme fairly well, except in

the transition regions.

– the upwind scheme smears the solution at high grid Peclet numbers as it overes-

timates the di¤usion term.

9.2 Transient, One-Dimensional Convection and Di¤usion

« Consider the more general case of transient, one-dimensional convection di¤usion in

the presence of a source term. The governing equation is:

0 (jc)

0t

+

0J

0r

= o (166)

where J is the convection-di¤usion ‡ux of c in the r direction:

J = jnc ÷

dc

dr

« The domain discretization is:

Eng9977 - Computational Fluid Dynamics 42

« Integrating the governing equation over a control volume r and time step t:

_

e

w

_

t+t

t

0 (jc)

0t

dtdr +

_

t+t

t

_

e

w

0J

0r

drdt =

_

t+t

t

_

e

w

odrdt (167)

where the order of the integration depends on the nature of the term.

« For the transient term assume the nodal value prevails over the control volume:

_

e

w

_

t+t

t

0 (jc)

0t

dtdr = r(j

P

c

P

÷j

o

c

o

P

)

where the superscript

o

indicates the value at time t.

« Using fully implicit time integration, the integral of the ‡ux term is:

_

t+t

t

_

e

w

0J

0r

drdt =

_

t+t

t

(J

e

÷J

w

) dt = (J

e

÷J

w

) t

where J

e

and J

w

are evaluated at the new time t + t.

« The source term is linearized as o = o

C

+o

P

c

P

, the nodal value is assumed to prevail

over the control volume, and fully implicit time integration is used:

_

t+t

t

_

e

w

odrdt = (o

C

+ o

P

c

P

) rt

« So the integrated equation can be written as:

(j

P

c

P

÷j

o

P

c

o

P

)

r

t

+ (J

e

÷J

w

) = (o

C

+ o

P

c

P

) r (168)

« Using the exponential scheme:

(j

P

c

P

÷j

o

P

c

o

P

)

r

t

+ j

e

n

e

_

c

P

+

c

P

÷c

E

exp(1c

e

) ÷1

_

÷j

w

n

w

_

c

W

+

c

W

÷c

P

exp(1c

w

) ÷1

_

= (o

C

+ o

P

c

P

) r

Eng9977 - Computational Fluid Dynamics 43

« To clean things up, use the following from the steady state derivations:

a

E

=

j

e

n

e

exp(1c

e

) ÷1

a

W

=

j

w

n

w

exp(1c

w

)

exp(1c

w

) ÷1

a

P

=

j

e

n

e

exp(1c

e

)

exp (1c

e

) ÷1

+

j

w

n

w

exp(1c

w

) ÷1

= a

E

+ a

W

+ (j

e

n

e

÷j

w

n

w

)

« Then:

(j

P

c

P

÷j

o

P

c

o

P

)

r

t

+(a

E

+ a

W

+ (j

e

n

e

÷j

w

n

w

)) c

P

= a

E

c

E

+a

W

c

W

+(o

C

+ o

P

c

P

) r

or

_

j

P

r

t

+ j

e

n

e

÷j

w

n

w

_

c

P

+ (a

E

+ a

W

÷o

P

r) c

P

(169)

= a

E

c

E

+ a

W

c

W

+ o

C

r + j

o

P

c

o

P

r

t

« This sort of looks like our usual standard form, but there are extra terms on the left.

Hmmm...Remember there is a ‡uid ‡ow, which must satisfy the continuity equation

(in one-dimension):

0j

0t

+

0 (jn)

0r

= 0 (170)

« Integrating the continuity equation over the volume r and time step t:

_

e

w

_

t+t

t

0j

0t

dtdr +

_

t+t

t

_

e

w

0 (jn)

0r

drdt = 0 (171)

« Assuming the nodal value of j prevails over the control volume when integrating the

transient term, and using fully implicit time integration for the mass ‡ux term:

(j

P

÷j

o

P

)

r

t

+ j

e

n

e

÷j

w

n

w

= 0 (172)

« Multiply this equation by c

P

and subtract the result from Eq.(169):

_

a

E

+ a

W

÷o

P

r + j

o

P

r

t

_

c

P

= a

E

c

E

+ a

W

c

W

+ o

C

r + j

o

P

c

o

P

r

t

(173)

which can be rearranged into the standard form:

a

P

c

P

= a

E

c

E

+ a

W

c

W

+ /

where

a

E

=

j

e

n

e

exp(1c

e

) ÷1

(174)

a

W

=

j

w

n

w

exp(1c

w

)

exp(1c

w

) ÷1

(175)

a

o

P

= j

o

P

r

t

(176)

/ = o

C

r + a

o

P

c

o

P

(177)

a

P

= a

E

+ a

W

+ a

o

P

÷o

P

r

Eng9977 - Computational Fluid Dynamics 44

« Note: Comparing these coe¢cients to those for steady convection and di¤usion using

the exponential scheme, it is very easy to develop the discretized equations for upwind,

hybrid and power law schemes.

9.3 Transient, Two-Dimensional Convection and Di¤usion

« Consider the transient, two-dimensional convection-di¤usion transport of the general

scalar dependent variable c. The governing equation is:

0 (jc)

0t

+

\ (jnc) =

\

\c + o (178)

which can be written as:

0 (jc)

0t

+

\

J = o (179)

where

J is the convection di¤usion ‡ux vector:

J = jnc ÷

\c (180)

« Integrating the governing equation over the volume \ and the time interval t:

_

V

_

t+t

t

0 (jc)

0t

dtd\ +

_

t+t

t

_

V

\

Jd\ dt =

_

t+t

t

_

V

od\ dt (181)

« Using Gauss’ divergence theorem:

_

V

\

Jd\ =

_

s

J :d:

gives:

_

V

_

t+t

t

0 (jc)

0t

dtd\ +

_

t+t

t

_

s

J :d:dt =

_

t+t

t

_

V

od\ dt (182)

« Using the domain discretization shown below:

Eng9977 - Computational Fluid Dynamics 45

« The convection-di¤usion ‡uxes are de…ned in the positive co-ordinate directions:

J

e

= j

e

n

e

c

e

÷

e

dc

dr

¸

¸

¸

¸

e

J

n

= j

n

·

n

c

n

÷

n

dc

dj

¸

¸

¸

¸

n

J

w

= j

w

n

w

c

w

÷

w

dc

dr

¸

¸

¸

¸

w

J

s

= j

s

·

s

c

s

÷

s

dc

dj

¸

¸

¸

¸

s

« Using the exponential scheme to evaluate the convection-di¤usion ‡uxes:

J

e

= j

e

n

e

_

c

P

+

c

P

÷c

E

exp(1c

e

) ÷1

_

J

n

= j

n

·

n

_

c

P

+

c

P

÷c

N

exp(1c

n

) ÷1

_

J

w

= j

w

n

w

_

c

W

+

c

W

÷c

P

exp(1c

w

) ÷1

_

J

s

= j

s

·

s

_

c

S

+

c

S

÷c

P

exp(1c

s

) ÷1

_

« As in the one-dimensional derivation assume the nodal value prevails over the control

volume in the transient term, the source term is linearized as o = o

C

+ o

P

c

P

where

the nodal value is assumed to prevail over the control volume, and fully implicit time

integration is used for the source term and ‡ux terms. The resulting integrated form

of the governing equation is:

rj

t

(j

P

c

P

÷j

o

P

c

o

P

) +J

e

j +J

n

r÷J

w

j ÷J

s

r = (o

C

+ o

P

c

P

) rj (183)

« Substituting in the mess that is the J’s:

rj

t

(j

P

c

P

÷j

o

P

c

o

P

) + j

e

n

e

_

c

P

+

c

P

÷c

E

exp(1c

e

) ÷1

_

j

+j

n

·

n

_

c

P

+

c

P

÷c

N

exp(1c

n

) ÷1

_

r ÷j

w

n

w

_

c

W

+

c

W

÷c

P

exp(1c

w

) ÷1

_

j

÷j

s

·

s

_

c

S

+

c

S

÷c

P

exp(1c

s

) ÷1

_

r = (o

C

+ o

P

c

P

) rj (184)

« Integrating the continuity equation over the volume and time step (prevailing assump-

tion for the volume integral of the transient term, fully implicit time integration for

the mass ‡ux terms):

0j

0t

+

0(jn)

0r

+

0(j·)

0j

= 0

_

V

_

t+t

t

0j

0t

dtd\ +

_

t+t

t

_

V

0(jn)

0r

+

0(j·)

0j

d\ dt = 0

rj

t

(j

P

÷j

o

P

) + j

e

n

e

j + j

n

·

n

r ÷j

w

n

w

j ÷j

s

·

s

r = 0 (185)

Eng9977 - Computational Fluid Dynamics 46

« Multiply this equation by c

P

and subtract the result from Eq. (184) the resulting

mess can be written in the standard form:

a

P

c

P

= a

E

c

E

+ a

N

c

N

+ a

W

c

W

+ a

S

c

S

+ / (186)

where

a

E

=

j

e

n

e

j

exp(1c

e

) ÷1

(187)

a

N

=

j

n

·

n

r

exp(1c

n

) ÷1

(188)

a

W

=

j

w

n

w

exp(1c

w

) j

exp(1c

w

) ÷1

(189)

a

S

=

j

s

·

s

exp(1c

s

) r

exp(1c

s

) ÷1

(190)

a

o

P

= j

o

P

rj

t

(191)

/ = o

C

rj + a

o

P

c

o

P

(192)

a

P

= a

E

+ a

N

+ a

W

+ a

S

+ a

o

P

÷o

P

rj

9.4 Transient, Three-Dimensional Convection and Di¤usion

« Observing the patterns in the one- and two-dimensional formulations, the discretized

equation for transient, three-dimensional convection-di¤usion transport of the scalar

variable c is:

a

P

c

P

= a

E

c

E

+ a

N

c

N

+ a

W

c

W

+ a

S

c

S

+ a

T

c

T

+ a

B

c

B

+ / (193)

where

a

E

=

j

e

n

e

j.

exp(1c

e

) ÷1

(194)

a

N

=

j

n

·

n

r.

exp(1c

n

) ÷1

(195)

a

W

=

j

w

n

w

exp(1c

w

) j.

exp(1c

w

) ÷1

(196)

a

S

=

j

s

·

s

exp(1c

s

) r.

exp(1c

s

) ÷1

(197)

a

T

=

j

t

n

t

rj

exp(1c

t

) ÷1

(198)

a

B

=

j

b

n

b

exp(1c

b

) rj

exp(1c

b

) ÷1

(199)

a

o

P

= j

o

P

rj.

t

(200)

/ = o

C

rj. + a

o

P

c

o

P

(201)

a

P

= a

E

+ a

N

+ a

W

+ a

S

+ a

T

+ a

B

+ a

o

P

÷o

P

rj.

Eng9977 - Computational Fluid Dynamics 47

9.5 False Di¤usion

« False di¤usion is a multidimensional phenomenon in which sharp changes in a trans-

ported scalar can be unrealistically smeared over a …nite distance.

« Consider the case where two parallel streams of equal velocity but unequal temper-

ature come in to contact. If the di¤usion coe¢cient, , is nonzero a mixing layer

forms in which the temperature gradually changes from the higher to lower value.

The thickness of the mixing layer will grow in the downstream direction.

« If the di¤usion coe¢cient is zero, no mixing-layer forms, and the temperature dis-

continuity would be maintained downstream. If a simulation of such a situation

yields a mixing-layer when = 0 the numerical method is inducing numerical or false

di¤usion.

« Will an upwind scheme induce false di¤usion? Consider the situation below, where

‡ow is aligned with the grid lines. Hot and cold streams are separated by the dashed

line, which would be control volume faces.

« Since = 0, and there is no ‡ow in the j direction, the a

N

and a

S

coe¢cients would be

zero. The a

E

coe¢cient of the dowstream node would also be zero, so the discretized

equation would reduce to:

c

P

= c

W

and the temperature discontinuity would be maintained.

Eng9977 - Computational Fluid Dynamics 48

« Consider uniform ‡ow at 45

**to the grid lines. For convenience, set r = j. For
**

‡ow at 45

**to this uniform mesh the velocity components are the same in the r and j
**

directions. This results in a

E

= a

N

= 0 for the downstream neighbours, and a

W

= a

S

for the upstream neighbours. Since a

P

=

a

nb

:

c

P

=

1

2

(c

W

+ c

S

)

i.e. smearing. This smearing is illustrated below where the bottom boundary was set

to 0 and the left boundary was set to 100. The smearing caused by the false di¤usion

is quite evident. If there was no false di¤usion, the temperature would be 100 and 0

above and below the diagonal, respectively.

« Note:

– False di¤usion exist when the ‡ow is oblique to the grid lines, and there is a

nonzero gradient of the dependent variable normal to the ‡ow.

– The amount of false di¤usion can be reduced by reducing r and j, and/or

orienting the grid such that the grid is aligned with the ‡ow direction. Neither

remedy may be feasible, especially for ‡ow in complex domains.

– Realistically, there is a real di¤usion coe¢cient, so it is only necessary to make

the false di¤usion small relative to the real di¤usion.

– The basic cause of false di¤usion is treating the ‡ow across a control volume

face as locally one-dimensional. So...schemes were developed to incoporate the

multi-dimensional nature of the ‡ow, i.e. some type of upwinding along the local

‡ow direction, not along global axes.

Eng9977 - Computational Fluid Dynamics 49

10 Viscous Fluid Flow

10.1 Governing Equations

« The equations governing viscous ‡uid ‡ow are the Navier-Stokes:

0 (jn)

0t

+

\ (jnn) =

\ j

\n + o

u

÷

0j

0r

(202)

0 (j·)

0t

+

\ (jn·) =

\ j

\· + o

v

÷

0j

0j

(203)

0 (jn)

0t

+

\ (jnn) =

\ j

\n + o

w

÷

0j

0.

(204)

and continuity equation:

0j

0t

+

\ (jn) = 0 (205)

« The governing equation for the convection and di¤usion transport of a general scalar

dependent variable is:

0 (jc)

0t

+

\ (jnc) =

\

\c + o (206)

As discussed earlier, the Navier-Stokes equations can be modelled by this general

convection-di¤usion equation with the appropriate interpretation of c, and o.

« The dependent variables for a three-dimensional viscous ‡uid ‡ow simulation are n,

·, n and j. The three Navier-Stokes equations are used as equations for the veloc-

ity components. An equation for pressure is derived from the continuity equation.

The appropriate pressure gradient in the momentum equations is evaluated from the

pressure …eld obtained from the continuity equation. When a correct (or converged)

solution is obtained the pressure …eld will satisfy the discretized continuity equation

and the velocity …eld obtained from the momentum equations will also satisfy mass

conservation.

« We have developed suitable techniques to solve a convection di¤usion equation. It

would, therefore, seem that we can solve the Navier-Stokes equations. All that is

needed is an evaluation of the appropriate pressure gradient.

« There are issues!

10.2 Issues

10.2.1 The Pressure Gradient

« Consider one-dimensional ‡ow in the r direction. The r momentum equation is:

0 (jn)

0t

+

0 (jn(n))

0r

=

0

0r

_

j

0n

0r

_

+ o

u

÷

0j

0r

(207)

which can be written in the following form:

0 (jn)

0t

+

0J

0r

= o (208)

Eng9977 - Computational Fluid Dynamics 50

where J is the convection-di¤usion ‡ux of n in the r direction:

J = jn(n) ÷j

dn

dr

(209)

« Note: the similarity with the general convection-di¤usion equation.

0 (jc)

0t

+

0J

0r

= o

where J is the convection-di¤usion ‡ux of c in the r direction:

J = jnc ÷

dc

dr

« Using our usual one-dimensional domain discretization:

the governing equation is integrated over a control volume r and time step t:

_

e

w

_

t+t

t

0 (jn)

0t

dtdr +

_

t+t

t

_

e

w

0J

0r

drdt =

_

t+t

t

_

e

w

o

u

drdt ÷

_

t+t

t

_

e

w

0j

0r

drdt

where the order of the integration depends on the nature of the term.

« The only di¤erence from the previous derivation is the pressure gradient term. Using

a fully implicit time integration:

÷

_

t+t

t

_

e

w

0j

0r

drdt = ÷(j

e

÷j

w

) t = (j

w

÷j

e

) t (210)

« So...we need cv face values for j. Let’s assume a piecewise linear assumption for

the behaviour of j between nodes. For convenience, assume the cv faces are midway

between the nodes:

j

w

÷j

e

=

j

W

+ j

P

2

÷

j

P

+ j

E

2

=

j

W

÷j

E

2

(211)

« This means that j

P

would not appear in the discretized r momentum equation for

node 1. Further, the discretized equation would contain the di¤erence in pressure

between alternate nodes, rather than adjacent nodes. What does that imply? This

would lead to a decrease in accuracy of the solution (i.e. a coarser discretization is

being used). More importantly, the physically unrealistic pressure …eld:

Eng9977 - Computational Fluid Dynamics 51

would be perceived as a uniform pressure …eld in the discretized momentum equation!

« In two-dimensions, the checkerboard pressure …eld:

would be perceived as uniform!

« BIG PROBLEM! A numerical method cannot allow this. For example, if such a

…eld arose in an iterative solution algorithm, there would be nothing in the method

to destroy this unrealistic solution. Also, if a truly uniform pressure …eld did arise,

it could be corrupted by a checkerboard solution that would not be corrected by the

algorithm.

10.2.2 The Continuity Equation

« A discretized form of the continuity equation will be obtained by integrating the

continuity equation over a control volume.

« Considering one-dimensional incompressible ‡ow, the continuity equation is:

0n

0r

= 0 (212)

« Using the standard one-dimensional domain discretization:

Eng9977 - Computational Fluid Dynamics 52

the continuity equation can be integrated over the volume r:

_

e

w

0n

0r

dr = n

e

÷n

w

(213)

« Assuming the cv faces are midway between nodes, and a piecewise linear behaviour

of n between the nodes:

n

e

÷n

w

=

n

P

+ n

E

2

÷

n

W

+ n

P

2

=

n

E

÷n

W

2

(214)

« So...e¤ectively a coarser discretization is being used AND a physically unrealistic

oscillatory velocity …eld would be perceived as uniform! ANOTHER BIG PROBLEM!

10.3 A Solution: Grid Staggering

« It would be nice if all dependent variables were stored at the same nodal points in

the calculation domain, however, this is not necessary. This realization gives rise to

a potential solution to the two issues raised above. What if the storage of velocity

components and pressure were staggered?

« In this …gure of a two-dimensional domain discretization, the arrows indicate storage

locations for n and ·, and other dependent variables and properties (e.g. j, T, /, j

and j) would be stored at ·, i.e the main grid points.

« Di¤erent control volumes would be used to derive the discretized forms of the mo-

mentum and contnuity equations.

« Note:

– For the continuity control volume, the velocities required to determine the mass

‡ow rates in and out of the control volume are located at the control volume

faces. Therefore, the di¤erence of adjacent velocity component values would be

used in the discretized continuity equation. An oscillatory velocity …eld would

NOT be perceived as uniform.

Eng9977 - Computational Fluid Dynamics 53

– For the r momentum equation the pressure gradient (0j,0r) would be evalu-

ated using pressures stored at the control volume faces, therefore, an oscillatory

pressure …eld would NOT be perceived as uniform.

– For the j momentum equation the pressure gradient (0j,0j) would be evalu-

ated using pressures stored at the control volume faces, therefore, an oscillatory

pressure …eld would NOT be perceived as uniform.

– Grid staggering eliminates the potential for physically unrealistic oscillatory so-

lution …elds. It does, however, add some complexity to a code due to geometric

information, indexing and interpolation issues.

10.4 Form of the Momentum Equations

« As discussed, the momentum equations have the same form as the general convection-

di¤usion equation, therefore, the coe¢cients of the discretized equations can be de-

rived as before. A di¤erent labelling will be used, however, due to the grid staggering.

« Consider the contol volume for n

e

shown below:

The control volume is staggered relative to a main grid control volume. It is staggered

in the r direction only.

« The discretized form of the r momentum equation for this control volume can be

obtained by following the procedures presented for the equation for c. The resulting

equation may be written as follows:

a

e

n

e

=

a

nb

n

nb

+ / + (j

P

÷j

E

) j (215)

« Note: the pressure gradient term is not lumped into the source term and included in

the coe¢cient /.

« Similarly, for the control volume for ·

n

:

Eng9977 - Computational Fluid Dynamics 54

« The discretized j momentum equation can be written as:

a

n

·

n

=

a

nb

·

nb

+ / + (j

P

÷j

N

) r (216)

10.5 SIMPLE and its Variants

« The Semi-Implicit Method for Pressure Linked Equations (SIMPLE) is a solution al-

gorithm developed to simulate ‡uid ‡ows. Two variants are SIMPLER (SIMPLE

Revised) and SIMPLEC (SIMPLE Consistent) which were developed to address lim-

itations of the original SIMPLE algorithm.

« The algorithm is based on the use of pressure and velocity corrections.

10.5.1 Pressure and Velocity Corrections

« The solution of the momentum equations requires a pressure …eld. The resulting

velocity …eld will only satisfy continuity if the correct pressure …eld is used. Indicating

a guessed or incorrect …eld by the superscript

, the momentum equations can be

written as:

a

e

n

e

=

a

nb

n

nb

+ / + (j

P

÷j

E

) j (217)

a

n

·

n

=

a

nb

·

nb

+ / + (j

P

÷j

N

) r (218)

« The aim is to improve the guessed pressure …eld so that the resulting starred velocity

…eld will get closer to satisfying continuity.

« Propose that the correct pressure is obtained as follows:

j = j

+ j

0

(219)

where j

0

is a pressure correction.

Eng9977 - Computational Fluid Dynamics 55

« De…ne the velocity corrections:

n = n

+ n

0

(220)

· = ·

+ ·

0

(221)

« Subtract Eq. (217) from Eq. (215):

a

e

n

0

e

=

a

nb

n

0

nb

+

_

j

0

P

÷j

0

E

_

j (222)

« For now, let’s drop the

a

nb

n

0

nb

term, therefore:

a

e

n

0

e

=

_

j

0

P

÷j

0

E

_

j

or

n

0

e

= d

e

_

j

0

P

÷j

0

E

_

(223)

where

d

e

=

j

a

e

(224)

« This allows the de…nition of a velocity correction formula:

n

e

= n

e

+ d

e

_

j

0

P

÷j

0

E

_

(225)

indicating that n

e

can be "corrected" or improved by pressure corrections.

« A similar equation can be obtained for the j component of velocity:

·

n

= ·

n

+ d

n

_

j

0

P

÷j

0

N

_

(226)

where

d

n

=

r

a

n

(227)

10.5.2 A Pressure Correction Equation

« Let’s discretize the continuity equation. Consider two-dimensional ‡ow in which j

does not depend directly on j. The continuity equation is:

0j

0t

+

0(jn)

0r

+

0(j·)

0j

= 0

« Using the main grid control volume shown below:

Eng9977 - Computational Fluid Dynamics 56

the governing equation will be integrated over the control volume \ and time step

t:

_

V

_

t+t

t

0j

0t

dtd\ +

_

t+t

t

_

V

0(jn)

0r

+

0(j·)

0j

d\ dt = 0 (228)

« Assuming (as before) the nodal value prevails over \ in the transient term, use of

Gauss’ divergence theorem, and fully implicit time integration of the mass ‡ux terms:

(j

P

÷j

o

P

)

rj

t

+ [(jn)

e

÷(jn)

w

] j + [(j·)

n

÷(j·)

s

] r = 0 (229)

« Substituting Eqs. (225) and (226) for the velocity components the resulting equation

can be written as a pressure correction equation:

a

P

j

0

P

= a

E

j

0

E

+ a

N

j

0

N

+ a

W

j

0

W

+ a

S

j

0

S

+ / (230)

where

a

E

= j

e

d

e

j (231)

a

N

= j

n

d

n

r (232)

a

W

= j

w

d

w

j (233)

a

N

= j

n

d

n

r (234)

a

P

= a

E

+ a

N

+ a

W

+ a

S

(235)

/ = (j

o

P

÷j

P

)

rj

t

+ [(jn

)

w

÷(jn

)

e

] j + [(j·

)

s

÷(j·

)

n

] r (236)

« Note: / is really the negative of the discretized continuity equation written in terms

of the starred velocity components. Therefore, if / is zero, the starred velocity …eld

with the available value of (j

o

P

÷j

P

) satis…es continuity and there will be no need of

a pressure correction. The / term is e¤ectively a "mass source" which the pressure

corrections try to destroy.

Eng9977 - Computational Fluid Dynamics 57

10.5.3 SIMPLE

« The SIMPLE is a solution algorithm based on the pressure correction equation derived

above.

1. Guess the pressure …eld, j

.

2. Solve the momentum equations (217) and (218) to give n

and ·

.

3. Solve the pressure correction equation (230) to give j

0

.

4. Update the pressure …eld using Eq. (219), i.e. add j

0

to j

.

5. Update the velocity components using Eqs. (225) and (226).

6. Solve the discretization equations for other c’s that in‡uence the ‡ow properties

or source terms (e.g. T, and turbulence properties). Note: if a particular c

does not in‡uence the ‡ow properties it is more e¢cient to evaluate it after a

converged ‡ow …eld solution has been obtained.

7. Using the corrected pressure j obtained in step (4) as a new guessed pressure

j

**, return to step (2) and repeat steps (2) to (7) until a converged solution is
**

obtained.

« Note:

– Omission of the

a

nb

n

0

nb

leads to a simpler pressure correction equation. If

included, each :/ would have to be expressed in terms of its pressure corrections,

which would bring in the neighbours of neighbours. In e¤ect the whole solution

…eld would be required for each nodal equation. this is not feasible.

– The use of Semi-Implicit in SIMPLE re‡ects the omission of

a

nb

n

0

nb

. Since

this term is neglected the in‡uence of all neighbouring nodes is omitted and the

method is not truly implicit.

– Does the omission of

a

nb

n

0

nb

cause any error in the …nal converged solution

…eld? No. In the …nal iteration, we have new j

, n

and ·

**…elds after step
**

(2). Since we have the converged solution, the / term evaluated using n

and ·

**would be practically zero, therefore, the pressure correction j
**

0

obtained in step

(3) would be zero. That means the current j

, n

and ·

…eld is correct as

both momentum and continuity are satis…ed. Since / is e¤ectively zero in this

iteration, solution of the j

0

equation is not required, therefore, the form of the

j

0

equation has no in‡uence on the …nal converged solution. All of this means

that omission of the

a

nb

n

0

nb

term does not in‡uence the …nal solution.

– Since / is a mass source term, it should be zero, so a good way to monitor

convergence is to watch this term, and insure it is small in all control volumes.

– The rate of convergence of the algorithm is in‡uenced by how many terms are

neglected in the pressure correction equation. SIMPLE is actually prone to

divergence unless some under-relaxation is used. The momentum equations

would be relaxed as described earlier using c. The pressure correction is also

relaxed as:

j = j

+ c

p

j

0

(237)

where 0 _ c

p

_ 1, i.e. a fraction of the pressure correction is used. Typical

values used are c - 0.5 and c

p

- 0.8.

Eng9977 - Computational Fluid Dynamics 58

– A useful feature of SIMPLE is that the velocity …eld is corrected such that it

satis…es mass conservation during each iteration. The algorithm converges with

a series of continuity satisfying velocity …elds. So, other c equations solved in

step (6) would use a continuity satisfying velocity …eld.

10.5.4 Boundary Conditions for the j

0

Equation

« There are two typical boundary conditions at the boundary of a ‡uid ‡ow calculation

domain:

1. The pressure at the boundary is known (and the velocity is unknown).

– If the pressure at a boundary is known, i.e. j

= j

spec

, then the pressure

correction is set to zero at that location. This is equaivalent to the speci…ed

temperature boundary condition in heat conduction.

2. The velocity normal to the boundary is known (and the pressure is unknown).

– If the grid is de…ned so that the domain boundary coincides with a main

grid control volume face:

then the velocity n

e

would be known. In the derivation of the j

0

equation

for this node, the mass ‡ow rate across the boundary would be evaluated

in terms of the known value of n

e

, not n

0

e

and n

e

, therefore, j

0

E

would not

appear and a

E

would be zero.

10.6 SIMPLER

« It was found that neglect of the

a

nb

n

0

nb

in the derivation of j

0

equation led to exager-

ated pressure corrections, and this necessitated the under-relaxation of the pressure

correction (j = j

+ c

p

j

0

). Under-relaxation is necessary to prevent divergence, but

slows convergence. The SIMPLER algorithm was developed to address this issue.

« SIMPLER emplys a pressure correction equation AND a pressure equation. Although

it requires the solution of another discretized equation it has been proven to be more

e¢cient than SIMPLE.

Eng9977 - Computational Fluid Dynamics 59

« The discretized momentum equation Eq. (215) can be rewritten as:

n

e

=

a

nb

n

nb

+ /

a

e

+ d

e

(j

P

÷j

E

) (238)

« De…ne a pseudo-velocity:

^ n

e

=

a

nb

n

nb

+ /

a

e

(239)

« Then Eq. (238) can be rewritten as:

n

e

= ^ n

e

+ d

e

(j

P

÷j

E

) (240)

similarly

·

n

= ^ ·

n

+ d

n

(j

P

÷j

N

) (241)

« Comparison of Eqs. (240) and (241) with Eqs. (225) and (226) illustrates that the

continuity equation can be discretized using the same procedure as for the derivation

of the j

0

equation and the result would be:

a

P

j

P

= a

E

j

E

+ a

N

j

N

+ a

W

j

W

+ a

S

j

S

+ / (242)

where

a

E

= j

e

d

e

j

a

N

= j

n

d

n

r

a

W

= j

w

d

w

j

a

N

= j

n

d

n

r

a

P

= a

E

+ a

N

+ a

W

+ a

S

/ = (j

o

P

÷j

P

)

rj

t

+ [(j^ n)

w

÷(j^ n)

e

] j + [(j^ ·)

s

÷(j^ ·)

n

] r (243)

Actually, the coe¢cients are the same as for Eq. (230) except for / where ^ n and ^ ·

replace n

and ·

.

« One BIG di¤erence between the pressure and pressure correction equations: NO ap-

proximations were used in the derivation of the pressure equation. This means that

if the correct velocity …eld was used to calculate the psuedo-velocities, the pressure

equation would give the correct pressure …eld directly.

« The SIMPLER algorithm is:

1. Guess the velocity …eld n and ·.

2. Evaluate the coe¢cients for the momentum equations, and evaluate the pseudo

velocities ^ n and ^ · using equations like Eq. (239). Use the available values of n

and · to perform the

a

nb

n

nb

and

a

nb

·

nb

summations.

3. Evaluate the coe¢cients in and solve the pressure equation, Eq. (242).

4. Treat the pressure …eld found in step (3) as j

**and solve the momentum equations
**

to get n

and ·

.

Eng9977 - Computational Fluid Dynamics 60

5. Evaluate the mass source term, Eq. (236) and solve the j

0

equation, Eq. (230).

Note: the other coe¢cients are available from step (3).

6. Correct the velocity …eld using Eqs. (225) and (226). Note: DO NOT correct

pressure.

7. Solve the discretized equation for other c’s if required.

8. Return to step (2) and repeat steps (2) to (8) until convergence.

« Note:

– A guessed pressure …eld plays an important role in SIMPLE. SIMPLER does not

use a guessed pressure …eld, instead it obtains a pressure …eld from the velcoity

…eld.

– If the given velocity …eld is correct, then the SIMPLER pressure equation would

give the correct pressure …eld and the solution is complete. If the correct velocity

…eld and a guessed (wrong) pressure …eld were input to SIMPLE, the situation

would at …rst deteriorate. The guessed pressure would give starred velocities

di¤erent from the correct velocities. The approximations in the pressure cor-

rection equation would produce incorrect velocity and pressure …elds at the end

of the …rst iteration. Convergence would take many iterations, even though we

had the correct velocity …eld at the start.

– The boundary conditions used for the pressure equation are similar to those used

for the pressure correction equation.

– SIMPLER converges faster than SIMPLE, but more work is required per itera-

tion (solution of the pressure equation and evaluation of the pseudo-velocities),

however, the reduction in solution algorithm iterations leads to a faster numerical

method.

10.7 SIMPLEC

« The SIMPLE algorithm is developed by neglecting the

a

nb

n

0

nb

term in the velocity

correction equation, Eq. (222):

a

e

n

0

e

=

a

nb

n

0

nb

+

_

j

0

P

÷j

0

E

_

j

But is that really feasible? Wouldn’t

a

nb

n

0

nb

and a

e

n

0

e

be of the same order of

magnitude? Remember a

P

= a

E

+ a

N

+ a

W

+ a

S

, and the velocity corrections will

be approximately the same size.

« The SIMPLEC (SIMPLE-Consistent) algorithm tkes this into account by subtracting

a

nb

n

0

e

from each side of the equation:

_

a

e

÷

a

nb

_

n

0

e

=

a

nb

_

n

0

nb

÷n

0

e

_

+

_

j

0

P

÷j

0

E

_

j (244)

« Since n

0

nb

and n

0

e

will have approximately the same magnitude it is justi…able to drop

the …rst term on the right side of the equation, therefore:

_

a

e

÷

a

nb

_

n

0

e

=

_

j

0

P

÷j

0

E

_

j

Eng9977 - Computational Fluid Dynamics 61

or

n

0

e

= d

e

_

j

0

P

÷j

0

E

_

(245)

where

d

e

=

j

(a

e

÷

a

nb

)

(246)

« Comparison of Eq. (246) with Eq. (224) for SIMPLE shows that the only di¤erence

is in the denominator of d

e

. Therefore, the same velocity correction formulae can be

used:

n

e

= n

e

+ d

e

_

j

0

P

÷j

0

E

_

(247)

·

n

= ·

n

+ d

n

_

j

0

P

÷j

0

N

_

(248)

where

d

n

=

r

(a

e

÷

a

nb

)

(249)

These equations illustrate that n

e

and ·

n

can be "corrected" or improved by pressure

corrections.

« A pressure correction equation is derived following the same procedure as for SIMPLE.

The resulting equation and coe¢cients are the same except for the de…nition of the d

terms, Eqs. (246) and (249). The equations are repeated below:

a

P

j

0

P

= a

E

j

0

E

+ a

N

j

0

N

+ a

W

j

0

W

+ a

S

j

0

S

+ / (250)

where

a

E

= j

e

d

e

j

a

N

= j

n

d

n

r

a

W

= j

w

d

w

j

a

N

= j

n

d

n

r

a

P

= a

E

+ a

N

+ a

W

+ a

S

/ = (j

o

P

÷j

P

)

rj

t

+ [(jn

)

w

÷(jn

)

e

] j + [(j·

)

s

÷(j·

)

n

] r

« The SIMPLEC algorithm follows the same steps as for the SIMPLE algorithm, except

no relaxation is required on the correction of pressure. The algorithm is repeated

here:

1. Guess the pressure …eld, j

.

2. Solve the momentum equations (217) and (218) to give n

and ·

.

3. Solve the pressure correction equation (250) to give j

0

.

4. Update the pressure …eld using Eq. (219), i.e. add j

0

to j

.

5. Update the velocity components using Eqs. (247) and (248).

Eng9977 - Computational Fluid Dynamics 62

6. Solve the discretization equations for other c’s that in‡uence the ‡ow properties

or source terms (e.g. T, and turbulence properties). Note: if a particular c

does not in‡uence the ‡ow properties it is more e¢cient to evaluate it after a

converged ‡ow …eld solution has been obtained.

7. Using the corrected pressure j obtained in step (4) as a new guessed pressure

j

**, return to step (2) and repeat steps (2) to (7) until a converged solution is
**

obtained.

« Note:

– The more consistent derivation of the pressure-correction equation for SIMPLEC

does not produce large changes in j

0

, therefore, the changes in j do not have to

be relaxed.

– A typical value for c used to under-relax the momentum equations is 0.7.

– Similar to SIMPLE, however, SIMPLEC is based on a guessed pressure …eld

and it will destroy an input correct velocity …eld if the guessed presure …eld is

incorrect.

– The SIMPLEC algorithm is more stable than SIMPLE and does not require

pressure relaxation, therefore it is faster. SIMPLEC is faster than SIMPLER,

because it does not require solution of a pressure equation at each iteration.

So...a very simple rethink in 1984-ish of SIMPLE (from 1969-ish) led to a far

more e¢cient and stable algorithm. It took …fteen years as everyone had the

same mindset. Patankar and Spalding invented SIMPLE, Raithby and Patankar

worked together in the mid-70s, then Raithby and his group (CFX-Tasc‡ow)

developed SIMPLEC. Most others were followers of these research groups.

« Boundary conditions for the pressure-correction equation in SIMPLEC are similar to

those used in SIMPLE.

Eng9977 - Computational Fluid Dynamics 63

11 Non-Dimensional Governing Equations

11.1 Introduction

« Thus far, all governing equations have been written in dimensional form, therefore,

an individual simulation applies for a speci…c combination of geometry and property

parameters. An in…nite number of runs would be required to determine the behaviour

of a ‡uid ‡ow given how each parameter can be modi…ed.

« A more general solution can be obtained if the governing equations are written in

non-dimensional form. This would allow for parametric studies of ‡uid ‡ows based

on the Reynolds number for example.

« The following subsections discuss the non-dimensionalization of the governing equa-

tions for viscous ‡uid ‡ow, and then presents an order of magnitude analysis that

illustrates how some terms in the governing equations can be neglected.

11.2 Flow Over Flat Surfaces

11.2.1 Non-Dimensional form of the Equations of Motion

« Consider a two-dimensional, steady state, incompressible ‡ow of a constant property,

Newtonian ‡uid, with freestream velocity n

1

, past a ‡at plate of length 1.

« The governing equations for this ‡ow are the continuity equation:

0n

0r

+

0·

0j

= 0 (251)

and the Navier-Stokes equations:

jn

0n

0r

+ j·

0n

0j

= ÷

0j

0r

+ j

_

0

2

n

0r

2

+

0

2

n

0j

2

_

(252)

jn

0·

0r

+ j·

0·

0j

= ÷

0j

0j

+ j

_

0

2

·

0r

2

+

0

2

·

0j

2

_

(253)

« De…ne the following non-dimensional variables:

r

= r,1 n

= n,n

1

j

= j,jn

2

1

j

= j,1 ·

= ·,n

1

Eng9977 - Computational Fluid Dynamics 64

« Substitution of these non-dimensional variables into Eq. (251) results in the following

form of the continuity equation:

n

1

1

0n

0r

+

n

1

1

0·

0j

= 0 (254)

which can be written in the following non-dimensional form:

0n

0r

+

0·

0j

= 0 (255)

« Substitution of the non-dimensional variables into the r-component of the Navier-

Stokes equations, Eq. (252), gives:

jn

2

1

1

n

0n

0r

+

jn

2

1

1

·

0n

0j

= ÷

jn

2

1

1

0j

0r

+

jn

1

1

2

_

0

2

n

0r

2

+

0

2

n

0j

2

_

(256)

Multiplying this equation by 1,jn

2

1

gives:

n

0n

0r

+ ·

0n

0j

= ÷

0j

0r

+

j

jn

1

1

_

0

2

n

0r

2

+

0

2

n

0j

2

_

(257)

But 1c

L

= jn

1

1,j, therefore, the non-dimensional form of the r-component of the

Navier-Stokes equations can be written as:

n

0n

0r

+ ·

0n

0j

= ÷

0j

0r

+

1

1c

L

_

0

2

n

0r

2

+

0

2

n

0j

2

_

(258)

« Similarly, the non-dimensional form of the j-component of the Navier-Stokes equations

is:

n

0·

0r

+ ·

0·

0j

= ÷

0j

0j

+

1

1c

L

_

0

2

·

0r

2

+

0

2

·

0j

2

_

(259)

« Equations (255), (258), and (259) are the non-dimensional forms of the equations that

govern the steady state, two-dimensional, incompressible ‡ow of a constant property,

Newtonian ‡uid, with freestream velocity n

1

, past a ‡at plate of length 1.

« Note: the only parameter in these equations is the Reynolds number, therefore, 1c

should appear as a parameter in the solutions for the hydrodynamic boundary layer

on a ‡at plate.

11.2.2 Order of Magnitude Analysis for a Boundary Layer Flow

« Consider the order of magnitude of the non-dimensional variables that appear in Eqs.

(255), (258), and (259):

O(r

) = 1 O(n

) = 1 O(·

) =?

O(j

) = c,1 = c

¸1 O(j

) =? O(1c

L

) =?

Eng9977 - Computational Fluid Dynamics 65

« Now, consider the order of magnitude of each term in Eqs. (255), (258), and (259):

0n

0r

+

0·

0j

= 0

n

0n

0r

+ ·

0n

0j

= ÷

0j

0r

+

1

1c

L

_

0

2

n

0r

2

+

0

2

n

0j

2

_

n

0·

0r

+ ·

0·

0j

= ÷

0j

0j

+

1

1c

L

_

0

2

·

0r

2

+

0

2

·

0j

2

_

« Note:

1. From the continuity equation O(·

) = c

**¸ 1 (since both terms must be of the
**

same magnitude).

2. For the viscous terms to be the same order as the inertia terms in the r-

component of the Navier-Stokes equations O(1c

L

) = 1,c

2

¸1.

3. For the pressure term to be the same order as the inertia terms in the r-

component of the Navier-Stokes equations (to prevent in…nite accelerations)

O(j

) = 1.

« The non-dimensional forms of the equations governing the ‡ow in the boundary layer

are:

0n

0r

+

0·

0j

= 0 (260)

n

0n

0r

+ ·

0n

0j

= ÷

0j

0r

+

1

1c

L

_

0

2

n

0j

2

_

(261)

0 = ÷

0j

0j

(262)

Eng9977 - Computational Fluid Dynamics 66

« Or in dimensional form:

0n

0r

+

0·

0j

= 0 (263)

jn

0n

0r

+ j·

0n

0j

= ÷

0j

0r

+ j

_

0

2

n

0j

2

_

(264)

0 = ÷

0j

0j

(265)

« One term has been eliminated from the r-component of the Navier-Stokes equations.

« The j-component of the Navier-Stokes equations has been reduced to a hydrostatic

pressure distribution.

« By performing the order of magnitude analysis one equation has been simpli…ed, and

the number of equations that must be solved has been reduced by one.

11.2.3 Non-Dimensional form of the Energy Equation

« Consider a two-dimensional, steady state, incompressible ‡ow of a constant property,

Newtonian ‡uid at freestream temperature T

1

and velocity n

1

past a ‡at plate of

length 1, maintained at a constant temperature T

s

.

« The energy equation may be written as:

jc

p

n

0T

0r

+ jc

p

·

0T

0j

= /

_

0

2

T

0r

2

+

0

2

T

0j

2

_

+ j (266)

where

= 2

_

0n

0r

_

2

+ 2

_

0·

0j

_

2

+

_

0n

0j

+

0·

0r

_

2

(267)

« De…ne the following non-dimensional variables

r

= r,1 n

= n,n

1

0 = (T ÷T

s

),(T

1

÷T

s

)

j

= j,1 ·

= ·,n

1

« Substituting these non-dimensional variables into Eqs. (266) and (267) gives:

jc

p

n

1

(T

1

÷T

s

)

1

_

n

00

0r

+ ·

00

0j

_

=

/(T

1

÷T

s

)

1

2

_

0

2

0

0r

2

+

0

2

0

0j

2

_

+

jn

2

1

1

2

(268)

where

= 2

_

0n

0r

_

2

+ 2

_

0·

0j

_

2

+

_

0n

0j

+

0·

0r

_

2

(269)

Eng9977 - Computational Fluid Dynamics 67

« Simplifying Eq. (268):

n

00

0r

+ ·

00

0j

=

/

jc

p

n

1

1

_

0

2

0

0r

2

+

0

2

0

0j

2

_

+

jn

1

jc

p

1(T

1

÷T

s

)

« But

/

jc

p

n

1

1

=

/

jc

p

n

1

1

_

j

j

_

=

_

/

jc

p

__

j

jn

1

1

_

=

1

1r1c

L

=

1

1c

jn

1

jc

p

1(T

1

÷T

s

)

=

jn

1

jc

p

1(T

1

÷T

s

)

_

n

1

n

1

_

=

_

n

2

1

c

p

(T

1

÷T

s

)

__

j

jn

1

1

_

= ÷

_

n

2

1

c

p

(T

s

÷T

1

)

__

j

jn

1

1

_

= ÷

1c

1c

L

« Note:

Reynolds # = 1c

L

=

jn

1

1

j

·

inertia forces

viscous forces

Prandtl # = 1r =

jc

p

/

=

i

c

·

rate of di¤usion of momentum

rate of di¤usion of thermal energy

Peclet # = 1c = 1r1c

L

·

convective transport of thermal energy

conductive transport of thermal energy

Eckert # = 1c =

n

2

1

c

p

(T

s

÷T

1

)

·

kinetic energy/unit volume of ‡ow

thermal energy/unit volume of ‡ow

« The non-dimensional form of the energy equation can be written as follows:

n

00

0r

+ ·

00

0j

=

1

1c

_

0

2

0

0r

2

+

0

2

0

0j

2

_

÷

1c

1c

L

(270)

« Note: the only parameters in the thermal problem are 1r, 1c

L

, and 1c.

11.2.4 Order of Magnitude Analysis for a Thermal Boundary Layer

« Similar to the analysis of the hydrodynamic boundary layer, consider the order of

magnitude of each term in Eq. (270):

O(r

) = 1 O(n

) = 1 O(1c) =?

O(j

) = c

T

,1 = c

T

¸1 O(·

) = c

¸1 O(1r) =?

O(0) = 1 O(1c

L

) = 1,c

2

O(1c) =?

Eng9977 - Computational Fluid Dynamics 68

« Expanding all terms of the non-dimensional form of the energy equation:

n

00

0r

+·

00

0j

=

1

1c

_

0

2

0

0r

2

+

0

2

0

0j

2

_

÷

1c

1c

L

_

2

_

0n

0r

_

2

+ 2

_

0·

0j

_

2

+

_

0n

0j

+

0·

0r

_

2

_

« Note:

1. For the conduction terms to be of the same order as the convection terms

O(1,1c) = c

2

T

. This is sensible, since O(1c

L

) = 1,c

2

, and O(1r) - 1 for

most common ‡uids.

2. For any of the viscous dissipation terms to be of the same order as the remainder

of the equation, the only possibility is for O(1c) - 1, then the (0n

,0j

)

2

term

will remain

« The non-dimensional form of the energy equation for the thermodynamic boundary

layer on a ‡at plate (steady state, constant property, Newtonian ‡uid, incompressible

‡ow) is:

n

00

0r

+ ·

00

0j

=

1

1c

0

2

0

0j

2

÷

1c

1c

L

_

0n

0j

_

2

(271)

But 1c _ 1 only at high velocities,

e.g. for air, (c

p

- 1000 J/kg

o

C, (T

s

÷ T

1

) - 100

o

C ÷ n

1

- 316 m/s for 1c =

n

2

1

,(c

p

(T

s

÷T

1

)) = 1. The speed of sound at 300K is 347 m/s.

therefore, at low velocities, viscous dissipation is negligible. Viscous dissipation is very

important at high velocities, e.g. the space shuttle, and SR-71 Blackbird spy plane.

Viscous dissipation gives rise to frictional heating.

« Neglecting viscous dissipation, the equation governing the thermal boundary layer on

a ‡at plate for steady, two-dimensional, incompressible ‡ow of a constant property,

Newtonian ‡uid is:

jc

p

n

0T

0r

+ jc

p

·

0T

0j

= /

0

2

T

0j

2

(272)

or

n

0T

0r

+ ·

0T

0j

= c

0

2

T

0j

2

(273)

11.2.5 Skin Friction and Heat Transfer Coe¢cients

« We would be interested in the frictional drag due to the hydrodynamic boundary

layer. The frictional drag is due to the shear stress at the plate surface, i.e.:

t

s

= j

0n

0j

¸

¸

¸

¸

y=0

Eng9977 - Computational Fluid Dynamics 69

« The shear stress is often written in terms of a skin friction coe¢cient, C

f

:

t

s

= C

f

jn

2

1

2

(274)

« Since the velocity gradient 0n,0j at j = 0 varies with r, the skin friction coe¢cient

will also be a function of r. Further, the non-dimensional Navier-Stokes equations,

Eqs. (258) and (259) illustrate that the only parameters that would in‡uence the

solution for the velocity gradient at the wall (i.e. j = 0) are 1c and 0j,0r. But, the

pressure gradient is only a function of r, and it is determined by the geometry of the

‡ow, therefore, for ‡ows of di¤erent ‡uids past the same geometry, only the Reynolds

number and position on the body should in‡uence the skin friction coe¢cient:

C

f

= C

f

(r, 1c

x

) (275)

« To solve for C

f

we need the velocity distribution in the boundary layer, therefore, we

need to solve Eqs. (263) and (264).

« The heat ‡ux at the surface of the plate exposed to the convection environment, ¡

00

s

,

can be written as follows:

¡

00

s

= /(T

s

÷T

1

) = ÷/

0T

0j

¸

¸

¸

¸

y=0

(276)

Heat is transferred from the wall to the ‡uid by conduction (since the molecules of

‡uid next to the wall have zero velocity relative to the plate).

« The heat transfer coe¢cient is de…ned as follows:

/ =

÷/

@T

@y

¸

¸

¸

y=0

T

s

÷T

1

(277)

To determine / we need the temperature gradient at the wall, i.e. the temperature

distribution, therefore, we need to solve the energy equation for the boundary layer,

i.e. Eq. (272), which will require a prior solution for the hydrodynamic boundary layer.

« The non-dimensional form of the energy equation, Eq. (271), illustrates that the only

non-dimensional parameters that should appear in the thermal boundary layer solu-

tion are r

, j

, 1c (or 1c and 1r), and 1c.

« Instead of working with the heat transfer coe¢cent, it is common to use a non-

dimensional variable called the Nusselt number (·n):

·n

L

=

/1

/

·

Actual heat transfer in the presence of ‡ow

Heat transfer if only conduction occurs

or locally:

·n

x

=

/r

/

(278)

« Since only 1r, 1c, and 1c are the parameters of the ‡ow:

/ = /(1r, 1c, 1c) (279)

·n = ·n(1r, 1c, 1c) (280)

Eng9977 - Computational Fluid Dynamics 70

« If 1c is small, / and ·n are only functions of 1r and 1c and:

/ = /(1r, 1c) (281)

·n = ·n(1r, 1c) (282)

11.3 Natural Convection

« Natural (or free) convection occurs when a body force acts on a ‡uid in which there

are density gradients ÷ buoyancy forces.

« Fluid velocities in natural convection are much smaller than for forced convection,

therefore, the heat transfer coe¢cients are much smaller. Natural convection often is

the largest resistance in multi-mode heat transfer analyses.

« In general, ‡uid density decreases with increasing temperature (0j,0T < 0), therefore,

‡uids rise when heated.

« The presence of a density gradient, however, does not guarantee the presence of natural

convection.

If T

2

is su¢ciently larger than T

1

, the buoyancy forces become large enough to over-

come the viscous forces, and an unstable ‡uid recirculation develops. When T

1

T

2

,

the ‡ow is stable as the lower density ‡uid is above the higher density ‡uid, and the

‡ow is thermally strati…ed.

« If a vertical ‡at plate possessing a uniform temperature T

s

is placed in an in…nite

quiescent medium at temperature T

1

, where T

s

T

1

, the ‡uid near the plate will

be heated and begin to rise. This ‡uid motion will entrain ‡uid from the quiescent

region, and lead to formation of a boundary layer.

Eng9977 - Computational Fluid Dynamics 71

« The velocity of the ‡uid at the plate and at j = · is zero.

« The boundary layer will initially be laminar, but instabilities in the ‡ow will eventually

overcome the damping e¤ects of viscosity, and the ‡ow will go through a transition

to a turbulent boundary layer (with the expected increase in heat transfer rates).

« The equations governing the ‡uid motion are the continuity, Navier-Stokes and energy

equations. The equations reduce to the same form as those used for a forced convection

boundary layer on a ‡at plate, except for a modi…cation in the momentum equation.

« Consider steady, two-dimensional natural convection of a constant property New-

tonian ‡uid driven by a constant temperature (T

s

T

1

) vertical ‡at plate. The r

momentum equation is:

n

0n

0r

+ ·

0n

0j

= ÷

1

j

0j

0r

÷q + i

0

2

n

0j

2

(283)

The ‡ow is assumed incompressible, however, a variable density must be accounted

for in a buoyancy force term (Boussinesq approximation).

« The ‡at plate boundary layer approximation illustrated that pressure is constant in

the j direction, therefore, the r pressure gradient inside the boundary layer is the r

pressure gradient (hydrostatic) in the quiescent portion of the ‡uid.

0j

0r

= ÷j

1

q (284)

« Substituting Eq. (284) into Eq. (283) gives:

n

0n

0r

+ ·

0n

0j

=

q

j

(j

1

÷j) + i

0

2

n

0j

2

(285)

The …rst term on the RHS is the buoyancy force term. De…ning the volume coe¢cient

of expansion, ,:

, = ÷

1

j

_

0j

0T

_

p

Eng9977 - Computational Fluid Dynamics 72

which can be expressed in the following approximate form:

, - ÷

1

j

_

j

1

÷j

T

1

÷T

_

then

j

1

÷j - j,(T ÷T

1

) (286)

and the buoyancy force term can be replaced, to give the following form of the r

momentum equation:

n

0n

0r

+ ·

0n

0j

= q,(T ÷T

1

) + i

0

2

n

0j

2

(287)

The dependence of the buoyancy force on the temperature di¤erence is now shown

explicitly in the momentum equation.

« The equations that must be solved for the natural convection boundary layer are the

following forms of the continuity, r momentum, and energy equations.

0n

0r

+

0·

0j

= 0 (288)

n

0n

0r

+ ·

0n

0j

= q,(T ÷T

1

) + i

0

2

n

0j

2

(289)

n

0T

0r

+ ·

0T

0j

= c

0

2

T

0j

2

(290)

Note: the energy and momentum equations must be solved simultaneously, due to the

coupling through the buoyancy force term.

« Using the following nondimensional variables:

r

=

r

1

j

=

j

1

n

=

n

n

o

·

=

·

n

o

0 =

T ÷T

1

T

s

÷T

1

where n

o

is an arbitrary reference velocity, the r momentum and energy equations

can be written in the following nondimensional forms:

n

0n

0r

+ ·

0n

0j

=

q,(T

s

÷T

1

)1

n

2

o

0 +

1

1c

L

0

2

n

0j

2

(291)

n

00

0r

+ ·

00

0j

=

1

1c

L

1r

0

2

0

0j

2

(292)

« The dimensionless parameter on the RHS of the momentum equation can be written

in a more convenient form (without n

o

), by multiplying it by 1c

2

L

. The result is the

Grashof number, Gr

L

:

Gr

L

=

q,(T

s

÷T

1

)1

n

2

o

_

n

o

1

i

_

2

=

q,(T

s

÷T

1

)1

3

i

2

(293)

Eng9977 - Computational Fluid Dynamics 73

« The Grashof number is the ratio of buoyancy forces to viscous forces, and it plays a

role similar to the Reynolds number in forced convection.

« From the nondimensional form of the governing equations we should expect:

·n

L

= )(Gr

L

, 1c

L

, 1r) (294)

This would be true when forced and free convection are of similar magnitude, i.e.

Gr

L

,1c

2

L

- 1. When Gr

L

,1c

2

L

¸ 1 natural convection dominates and ·n

L

=

)(Gr

L

, 1r). When Gr

L

,1c

2

L

¸1 forced convection dominates and ·n

L

= )(1c

L

, 1r).

12 Test Problems

12.1 Two-Dimensional Convection Di¤usion

12.1.1 Square Enclosure, Recirculating Flow

« This is a test problem involving the convection-di¤usion transport of a scalar in a

recirculating ‡ow, for which an analytical solution is available. The problem is illus-

trated schematically below, in which a square enclosure is located with its center at

the origin of the Cartesian co-ordinate system r, j. The dimensions of the square are

2 by 2.

« The recirculating velocity …eld is de…ned as:

n = ¹

_

j ÷j

3

_ _

2r

2

÷r

4

÷1

_

(295)

· = ÷¹

_

r ÷r

3

_ _

2j

2

÷j

4

÷1

_

(296)

where ¹

**is a free parameter to be speci…ed.
**

« The following temperature …eld is proposed as a solution to this problem:

T = 1

_

1 ÷r

2

_ _

1 ÷j

2

_

(297)

where 1

**is a free parameter speci…ed by the user.
**

« For steady state conditions, negligible viscous dissipation, and a constant proerty

Newtonian ‡uid, the temperature distribution in the ‡uid is governed by the following

form of the energy equation:

j

_

n

0T

0r

+ ·

0T

0j

_

=

_

0

2

T

0r

2

+

0

2

T

0j

2

_

+ o

(298)

Eng9977 - Computational Fluid Dynamics 74

where o

= o,c

p

and = /,c

p

.

« When Eqs. (295) to (297) are substituted into Eq. (298), the following expression for

the source term o

is obtained:

o

= 21

¦j¹

_

j

_

1 ÷r

2

_ _

r ÷r

3

_ _

2j

2

÷j

4

÷1

_

÷r

_

1 ÷j

2

_ _

j ÷j

3

_ _

2r

2

÷r

4

÷1

_¸

+

__

1 ÷j

2

_

+

_

1 ÷r

2

_¸

¦ (299)

« If j = = 1

**= 1 the temperature is a maximum of one at the center of the domain,
**

and zero on all boundaries.

« With T = 0 on all boundaries the maximum and the recirculating velocity …eld as

de…ned above, the problem has symmetry planes as shown, and advantage can bet

taken of this to solve in the calculation domain: 0 _ r _ 1, 0 _ j _ 1. The paramter

that would be varied is ¹

.

« The numerical solution would be compared with the analytical solution, Eq. (297).

12.2 Two-Dimensional Fluid Flow

12.2.1 Square Driven Cavity

« In this problem, the steady, two-dimensional, laminar recirculation of an incompress-

ible Newtonian ‡uid contained in a square enclosure is considered. The motion of

the ‡uid is driven by a sliding lid.

« A square enclosure of dimension 1 has its lower left corner located at the origin of

a Cartesain co-ordinate system (r, j). All walls are …xed except for the lid, which

moves in the r direction with constant velocity n

w

.

« The equations which describe this problem are the r and j momentum and contnuity

equations. Using the following non-dimensionalization:

r

= r,1 n

= n,n

w

j

= j,jn

2

w

j

= j,1 ·

= ·,n

w

Re

w

= jn

w

1,j

the governing equations may be written in the following non-dimensional forms:

Continuity:

0n

0r

+

0·

0j

= 0 (300)

Eng9977 - Computational Fluid Dynamics 75

r momentum:

n

0n

0r

+ ·

0n

0j

= ÷

0j

0r

+

1

1c

w

_

0

2

n

0r

2

+

0

2

n

0j

2

_

(301)

j momentum:

n

0·

0r

+ ·

0·

0j

= ÷

0j

0j

+

1

1c

w

_

0

2

·

0r

2

+

0

2

·

0j

2

_

(302)

with boundary conditions:

·

**= 0 on all walls (303)
**

n

= 1, j

= 1, 0 < r

< 1 (304)

= 0 on other walls (305)

« Note: there are singularities at the upper corners. If n

**= 1 that would imply that
**

there would be mass ‡ow in and out of the domain due to the discretization of the

boundaries, unless the code is modi…ed. The other interpretation is that the n

at

the upper corner nodes is set to zero.

« Numerical solutions are compared with experimental ‡ow visualizations and other

numerical results.

12.3 Two-Dimensional Natural Convection

« The simulation of two-dimensional natural convection in a square enclosure is a stan-

dard test problem used to evaluate the e¤ectiveness of numerical methods in the

solution of coupled ‡uid ‡ow and heat transfer problems.

« In this problem, steady, two-dimensional, laminar natural convection of a Newtonian

‡uid contained in a square enclosure is considered. The problem is illustrated

schematically below.

« The origin of the Cartesian co-ordinate system is located at the lower left corner of

a square enclosure of dimension 1. The acceleration due to gravity q is directed in

the negative j direction. The vertical side walls, at r = 0 and 1, are maintained at

hot and cold temperatures, T

H

and T

C

, respectively. The two horizontal walls are

considered to be adiabatic, i.e. perfectly insulated.

Eng9977 - Computational Fluid Dynamics 76

« The standard Boussinesq approximation is used in the analysis of this problem, i.e.

the mass density is considered to be constant in all terms except the buoyancy term,

in which it is assumed to decrease linearly with temperature:

j = j

C

[1 ÷, (T ÷T

C

)] (306)

where , is the thermal volumetric expansion coe¢cient, and j

C

is the density of the

‡uid at the reference temperature T

C

. All other thermophysical properties of the

‡uid are considered to be constant.

« The equations which govern this problem are the r and j momentum, continuity and

energy equations. Using the following non-dimensional variables:

r

= r,1 n

= n1,c j

= j1

2

,jc

2

c = (T ÷T

C

) , (T

H

÷T

C

) Pr = i,c

j

= j,1 ·

= ·1,c c = /,jc

p

1a = ,qT1

3

,ci

the governing equations may be written in the following non-dimensional forms:

Continuity:

0n

0r

+

0·

0j

= 0 (307)

r momentum:

n

0n

0r

+ ·

0n

0j

= ÷

0j

0r

+ Pr

_

0

2

n

0r

2

+

0

2

n

0j

2

_

(308)

j momentum:

n

0·

0r

+ ·

0·

0j

= ÷

0j

0j

+ Pr

_

0

2

·

0r

2

+

0

2

·

0j

2

_

+ 1a Pr c (309)

Energy:

n

0c

0r

+ ·

0c

0j

=

0

2

c

0r

2

+

0

2

c

0j

2

(310)

with boundary conditions:

·

= n

= 0 on all walls

c = 1, r

= 0

= 0, r

= 1

0c

0j

= 0, j

= 0, 1

« It should be noted that the j momentum equation has a source term which involves

c, and thus provides for coupling of the ‡uid and heat transfer problems.

« The output of this problem can be condensed to the evaluation of a local Nusselt

number that can be evaluated on the hot wall:

·n =

÷/ (0T,dr)

x=0

(T

H

÷T

C

)

_

1

/

_

=

_

0c

0r

_

x

=0

(311)

Eng9977 - Computational Fluid Dynamics 77

and the average Nusselt number on the hot wall is:

·n

av

=

1

_

0

_

0c

0r

_

x

=0

dj

(312)

« Since the total amount of heat transferred from the hot wall to the ‡uid must be the

same as the amount absorbed by the cold wall from the ‡uid, and because the hot

and cold walls have the same areas, the average Nusselt numbers on both walls should

be the same. This can be used as validation of the overall conservative property of

the method.

« Numerical results are compared with experimental visualizations and available nu-

merical simulations.

12.4 General Info for Validation of Codes

« Perform initial checks on coarse grids to minimize execution times.

« Verify the overall balance is satis…ed for any number of grid points. We have developed

a method that should be conservative, i.e. all energy must be accounted for. So if

heat is generated in a calculation domain, that same amount of heat must leave the

domain under steady state conditions. If a mass ‡ow enters a domain, the same

amount must leave the domain for steady state conditions. If not, the code is not

delivering conservation and there is probably a mismatch in the ‡uxes between control

volumes.

« Check that the converged solution is independent of the initial guess value and the

relaxation factors (if used).

« Interchange the r,j and . directions and examine the resulting solutions.

« If the problem has a line or plane of symmetry, it can be solved using the whole

domain or partial domain, and the solutions compared. They should be the same for

the same spatial and time discretization.

« It is useful to see if the numerical solutions obey the principal of superposition for

problems to which it is applicable (e.g. heat conduction).

« Limiting behaviour provides useful tests. A 3D code should demonstrate 2D solutions

when properly set up for 2D problems. A duct ‡ow simulation should deliver a fully

developed solution in the far downstream region.

« Quantitative checks can be made with analytical solutions, other numerical solutions

and experimental data.

« A means of constructing exact solutions is as follows:

– Propose a distribution of c;

– De…ne values for any required thermophysical properties and parameters (e.g.

Reynolds number);

Eng9977 - Computational Fluid Dynamics 78

– Substitute your proposed c, properties and parameters into the governing di¤er-

ential equation to determine an expression for the source term o.

– Use this derived expression for o in the numerical code to regenerate c.

– Compare the calculated c with the proposed c-…eld.

13 Miscellaneous Info

13.1 Iterations and time Stepping

« Two roles of iterations:

– The governing equations are, in general, nonlinear and interlinked. The dis-

cretization procedure produces a set of nominally linear and decoupled equa-

tions. The nonlinearity and interlinkage is handled by iterative re-evaluation of

of coe¢cients and repeating until convergence.

– The nominally linear equations are solved by an iterative method (e.g. the line-

by-line method we have used) as opposed to a direct method.

« There is no basic di¤erence between solving a steady state problem and performing

one time step in an unsteady problem. As in a steady state problem, a number of

iterations must be performed per time step.

« The solution of an unsteady problem seems to involve an e¤ort equivalent to solving

a succession of steady state problems. But...

– The number of iterations required within a time step are usually only a few,

because the value of c at a time t is a good guess for the value at time t + t.

– When a solution is solved as a limiting solution of an unsteady problem, the

time steps are like iterations and the unsteady term provides a kind of under-

relaxation. Remember...

a

P

c

P

=

a

nb

c

nb

+ /

a

o

P

= j

o

P

\

t

/ = o

C

\ + a

o

P

c

o

P

a

P

=

a

nb

+ a

o

P

÷o

P

\

– And if t is small, a

o

P

is large, therefore, c

P;new

- c

P;old

since the a

o

P

dominates.

This will slow down changes in c

P

, i.e. it is a form of under-relaxation.

13.2 Source Term Linearization

« We have linearized the source term as follows:

o = o

C

+ o

P

c (313)

where o

P

< 0.

Eng9977 - Computational Fluid Dynamics 79

« Linearizing the source in this manner allows for the in‡uence of c to be explicitly

included in the source term and leads to faster convergence. The goal is to make the

line of o = o

C

+ o

P

c approach as close as possible to the true o-c curve.

Taylor’s series approximation is a means of obtaining the values for o

C

and o

P

.

o = o

+

do

dc

(c ÷c

) +

= o

÷c

do

dc

¸

¸

¸

¸

+ c

do

dc

¸

¸

¸

¸

= o

C

+ o

P

c

« For example:

o = 4 ÷5c

3

=

_

4 ÷15c

2

_

÷

_

15c

2

_

c

Note: you must also ensure that:

lim

!

(o

C

+ o

P

c) = o

« And here is a numerical trick..You can use the source term to speci…y a value of c

anywhere in the calculation domain. If you set;

o

C

= 10

30

c

spec

o

P

= ÷10

30

the other terms in the discretized equation become negligible and the discretized

equation reduces to c = ÷(o

C

,o

P

) c

spec

.

Eng9977 - Computational Fluid Dynamics 80

13.3 Property Tricks

« The harmonic mean allow the solution of conjugate problems in a neat manner. Con-

sider ‡uid ‡ow in the domain shown below.

De…ne the control volume faces such that they are at the interface between the ‡uid

and solid wall. The real value of j is used in the ‡uid and j = · in the solid. This

will prevent any "‡uid ‡ow" in the solid wall. The energy equation would be solved

using the real property values in the ‡uid and the wall.

« What about a conduction problem in a very simple calculation domain shown below.

There is no need to discretize the actual calculation domain to obtain a solution.

Use the very simple domain to the right, match control volume faces with the actual

calculation domain, and use the source trick above to specify wall temperatures, or

set / = · to simulate insulated surfaces.

- New Microsoft Office Word Document.docx
- Tutorial
- l
- a3 Solution w13
- Answer 2 c Ass 2
- Appendix
- New Microsoft Office Excel Worksheet
- New Microsoft Office Word Document systems biology
- sys bio ass 2
- Leonard Bp 1995
- Timetable
- Timetabletime table
- Handout Eqs
- Handout Eqs
- Propability
- Darve_cme104_matlab
- Assignment 1
- Computational Modeling
- MembraneDiffusion Nature 457 SWHell
- Biophysics Flyer Updated1[3]
- computational fluid dynamics
- Allen,Tildesley, Computer Simulation of Liquids,1991

Sign up to vote on this title

UsefulNot useful- cfd 4
- WED
- Tips and Tricks Sweeping
- What They Didn't Teach You in Engineering School About Heat Transfer
- Shell and Tube Heat Exchanger Design Using Cfd Tools
- 179897.pdf
- 11_jbps_blocken
- Solving Vessel Equations a Better Way
- 36esp.pdf
- Weg Electric Motor
- CFD - Workshop Brochure
- Chapt2B_stream Pollution Advection-dispersion Equation
- Scalar
- PO.102 EWEA Forecasting Workshop 2013
- Statement of Purpose
- Scalar
- gate 2014
- Cfd Equations
- CFD With Excel
- Complex dymnamics
- Ijcmesm Proof
- Finite Element Analysis.docx
- artn0817
- GATE 2014
- Heat ExChangers Selection
- Maximum Minimum Problems
- Challenges in GT CFD - Lapworth - RR Lec 2008
- Blade Profile Optimization of Kaplan Turbine Using CFD Analysis
- A followingcarinfluences cyclistdragCFDsimulationsandwind.pdf
- Problem Explanation - 09-24-2010
- Notes

Are you sure?

This action might not be possible to undo. Are you sure you want to continue?

We've moved you to where you read on your other device.

Get the full title to continue

Get the full title to continue reading from where you left off, or restart the preview.