Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Finite Volume Methods For Non-Orthogonal Meshes

Download as pdf or txt
Download as pdf or txt
You are on page 1of 32

Chapter 5

Finite Volume Methods for


Non-Orthogonal Meshes
For most fluid mechanics problems of interest to Engineers the geometry of the problem can not be
represented by a Cartesian mesh. Instead it is common for the boundaries to be curved in space. The
Cartesian finite volume methods described in Chapters 2 and 4 must be extended to a non-orthogonal
mesh to allow non-rectangular geometries to be accurately modelled.
A structured mesh is topologically rectangular, but may be deformed in space such that it is no longer

Cartesian. Such a mesh may still be orthogonal, with the intersections of the mesh lines being at
,
but such a mesh can be difficult to generate, and so a completely general mesh will be non-orthogonal
with no restriction on the angles of the intersections of the mesh lines.
In this chapter the finite volume discretisation of the transport equation on a non-orthogonal mesh is
discussed in five parts. First there is a description of the geometry of the mesh, which is followed by
the discretisation of the Diffusion terms of the transport equation. The advective terms will then be
discretised and the boundary conditions described. Finally the solution of the NavierStokes equations
on a non-orthogonal mesh will be described, using the SIMPLE scheme discussed in Chapter 4. The
method used to discretise the equations is similar to that described by Jones[72] and Peric[129, 43].

5.1

The Geometry of a Non-Orthogonal Mesh

The calculation of the geometric properties of a non-orthogonal mesh is non-trivial, and so it deserves
discussion before discretising a PDE upon the mesh. Both two and three dimensional meshes are discussed, the simplifications arising from the use of a two-dimensional mesh warranting their separate
discussion.
A non-orthogonal regular two-dimensional mesh is shown in Figure 5.1, with the mesh being shown
in both computational and physical space. In computational space the coordinate space is represented
by the  
 axes, whilst in physical space the   axis system is used, with there being a one to
one mapping between the two coordinate systems.
For a finite volume discretisation the mesh is defined by the cell vertex points. From these points we
wish to find the cell centre, the centre of the cell faces, the area vectors of the cell faces, and the cell
volume.
For the code used in this study the cell centre and the centre of the cell faces were approximated by
115

CHAPTER 5. NON-ORTHOGONAL MESHES






116

  










 
 0(



0 (  ( ( )
'
 
    '

/
/    
&


 -    &

,.-
 
,
 % 
$%
(

( (
$
( ) ) )



) ) ) *

'
   "' !
   !
&
    &!

 "! % !
$%
) *$ * * 

*

*
+
 * '

'
! ! '

'#
!
!  ! !

#
&
&

! ! 2!   &

&#
!

! %
#% #
$ %
$%
 +$ + + 
* $



+ + + 0

0
#  # #


# # # /
/
# # #
# # ,1+ ,


Figure 5.1: Two Dimensional grid in computational space (top) and physical space (bottom).
the average of the cell vertex values. Whilst this doesnt give the geometric centroid of the cell it was
considered a reasonable approximation.
For two dimensional cells the cell face area vectors can be calculated as the cross product of the cell
face and the vector normal in the direction of a third (fictitious) axis. Thus for the east face for the
cell in Figure 5.2 the cell face vector is
35468794;:6=<>4? 6
(5.1)

and so the face area is
In component form this becomes

@ 6 7A354 6CBEDGF
H 6JI
H 6LK
7

3 6
<C3  M6 F

(5.2)

(5.3)

The volume of the cell, N , can be easily calculated as half the magnitude of the cross product of the
cell diagonals, the volume of the cell in Figure 5.2 being
7PO 4;:6V<>4?LWYX B 4;:.WZ<[4?J6\X F
QSR
R
N
(5.4)
RUT
T
R
It is prudent to use the magnitude of the volume to prevent the inadvertent calculation of negative
volumes.
For a three dimensional mesh the cell face areas are found as half the cross product of the face diagonals, so for the cell face in Figure 5.3 the face area is given by
@ 7 O
BE_ X F
Q
(5.5)
T^]

CHAPTER 5. NON-ORTHOGONAL MESHES

117

ne

nw

Ae
P
y
se

sw
x

Figure 5.2: The geometry of a two-dimensional cell.

a
b

An
xn

x
z

Figure 5.3: The geometry of a three-dimensional cell, and the calculation of the area of one face of
the cell.
The volume of the cell can be calculated by integrating the face area over the surface of the cell using
the Gauss divergence theorem. The volume of the cell is thus
@ :
F 4 :
7 O R a
R
` R :
N
(5.6)
R
R
R
@ :
4;:
is the vector area of the face b found with Equation (5.5), and
is the centroid of the face
where
b .

5.2

The Discretisation of the Diffusion Terms on a Non-Orthogonal


Mesh

To discretise the diffusion equation on a non-orthogonal mesh we need to find an approximation for
the diffusive flux across a face of a mesh volume in a manner similar to that used in Section 2.2. For
our example we will take the eastern face of a cell, but the process can be applied to any face of the
volume. The geometry of the face in physical space is shown in Figure 5.4 along with the geometry
in computational space.
From Ficks law the diffusive flux is given by

cCdfe
(5.7)

d b
@ :
H :g7ih @ :;h
where b is the direction normal to the surface. If
is the area vector of the face, and
is

CHAPTER 5. NON-ORTHOGONAL MESHES

118

NE

11

A12

E
P

SE

W
S

Figure 5.4: The area vectors of the eastern face of a two-dimensional mesh.
the magnitude of the face area, then the total flux across the face is approximated by

H : cjdfe F
d b

H :

(5.8)

is easily calculated from the mesh geometry as was described in the previous section,
The area
c
:
and is a given property, so all that remains is to approximate the derivative kMl . We can readily apk
proximate the derivatives in the computational axes  or using centred difference approximations.
Unfortunately for a non-orthogonal mesh the face normal is not necessarily in the direction of any of
the mesh axes   or , but it can be approximated using the derivatives in the mesh axes by use of
the chain rule
dfe 7 d  dfe
d  d
e
d dfe F
(5.9)
d b
d b d nm d b d Zm d b d
As was mentioned, the derivatives of e in computational space can be approximated by centred difference approximations, which for the east face of the cell may be written as

dfe
d 
dfe
d 
dfe
d

<

eqp
o

:16 <
e

o
o

exw

6=<

er 
e
e
y

?J6

O
s

o
o

noting that for a unit cell in computational space,

O
s
3

et
T

ez p

ez
T


m
7 3
A

The mesh transformation terms can be calculated from


and the contravariant basis vectors
~ O 7
d 
4
d
~ Q 7
d 
4
d
~ ` 7
d
4
d

<

etup
m

<

<

e
v
<

e{

7}|~M2J

e
vp
e{ p

(5.10)

7 F

a dot product of the cell face unit normal

(5.11)

CHAPTER 5. NON-ORTHOGONAL MESHES

with

119

d 
d b
d 
d b
d
d b

d  F
4 V
d

d  F
4 V
d

7
d

and with the unit normal being given by

d F
4 V

@ :
F
h @ :h
7

(5.12)

e2

(5.13)

e1

e2

e1

~ ~
~ O ~ Q
Figure 5.5: The covariant O  Q and contravariant 
basis vectors for the eastern face of a cell in
a two-dimensional mesh.
~ O ~ Q ~ `
Unfortunately the contravariant basis vectors  
(shown in Figure 5.5) which are normal to the

 mesh surfaces are unknown. However, an approximation to the covariant basis vectors, which
are tangential to the  
 surfaces
4
~
7
d
O

d 4
~ Q 7
d

(5.14)
d 4
~ ` 7
d

d
can be readily calculated from the mesh geometry. Thus we wish to estimate the contravariant basis
vectors from their covariant counterparts.
By considering a parallelepiped formed at the east face of a cell by the covariant vectors (Figure 5.6),
we can approximate the contravariant vectors from the ratio of the face areas to the volume of the
@
parallelepiped. Thus
O
~ O 7
d 
4

@N Q
d
o
~ Q 7
d 
(5.15)
4

@N `
d
o
~ ` 7
F
d
4
d
o
N
The face areas are easily calculated by taking the cross products of the~ covariant basis vectors, whilst
the volume is calculated from the dot product of the normal area and O ,
@
~ Q B ~ `
O 7

@ Q 7
~ ` B ~
O

@ ` 7
~ B ~ Q
(5.16)
O@

7
O F~ F
O
N

CHAPTER 5. NON-ORTHOGONAL MESHES


@
O

120

is equivalent to the cell face normal previously denoted as

@ :

Figure 5.6: The parallelepiped formed at the east face of a cell by the covariant vectors.
Substituting the approximations in Equation (5.15) into (5.12) gives
@
@
O
O
7
F @
d 
h O h
d b
@N Q @
O
7
F @
d 
h O h
(5.17)
d b
@N ` @
O
7
F @
d
h O h
d b
N
@
@ :
O
where
has been substituted for
. One final simplification
h @ O ish available from Equation (5.8)
where it is seen that the derivatives multiplied by the face area
are required.
Substituting into

Equation (5.17) gives the expressions for the geometric diffusion coefficients for the east face (or
@ F@
face 1),
O
O
O 7


@ NF@ Q
O
Q 7
(5.18)


@ NF@ `
O
` 7


N
where
Q dfe
` dfe F
h @ : h d
e 7
O dfe

(5.19)
d b
d  m
d  m
d
Similar expressions can be derived for the north and top faces (faces 2 and 3) of the cell, and the
derivatives normal to these faces can be approximated as
O
O
O
@ O O d
e
O O dfe R
O Q d
e R
O ` dfe R
7
R
R
R
R
R 

R
R d b O
d  RR m
d  RR m
d RR
Q
Q
Q
@ Q Q d
e
Q O dfe R
QQ d
e R
Q` dfe R
7
R
R
R
R
R 
(5.20)
Q

R
R d b
d  RR m
d  RR m
d RR
`
`
`
@ ` ` d
e
` O dfe R
`Q d
e R
`` dfe R
7
R
R
R
R
R 
`

R
R d b
d  RR m
d  RR m
d RR
@ 

where b is the
is the  area of the  face, the geometric diffusion
 normal of the  face,
@  F @ 
coefficients
are given by
 7



(5.21)
N

CHAPTER 5. NON-ORTHOGONAL MESHES

121

and the following approximations are used for the derivatives in computational space
O
<
dfe R
R
e p
e r 
d  RR
o
O
<
<
X
O
dfe R
s e t
R
e tup
e v
e vp 
T
d  RR
m
o
O
<
<
X
O
dfe R
s ez
R
ez p
e{
e{ p 
R
T
d R
m
o

dfe
d 

dfe
d 

dfe
d

R
R

RQ
R

RQ
R
R
R

s
o

d
e
d 

R`
R
R

R`

R
R

R
o

e p
T

ez

<

etup
m

<

et8

er 

ez

O
s

<

`
R

ep
T

et

d
e
d 

d
e
d

O
s

e t
<

(5.23)

eqz t
m

ez p
m

ez t
m

e r

(5.22)

<

e{

<

<

eq{ t

<

e
<

e v

<

ez
ez v




(5.24)

@ geometric
The areas and cell
diffusion coefficients are properties of the faces of the cell. Thus there
O
located at both the east and west faces
are area vectors
@  of the cell, with the areas in both cases
O
being defined pointing
out of the cell. The area terms
for the east face of the cell are the
@ O
negative of the
areas of the west face of the cell . The geometric diffusion coefficient is always
positive, and is the same for the face regardless of whether the face is being considered the east face
of cell of the west face of cell .
For the implementation of the non-orthogonal mesh solver the face geometric properties for the high
@ Q  cell
@ `  (the east,
side faces@ of each
Q:  north and
`:  top faces) are calculated and@ stored.
Q?  These properties are
6O
:
6O
WO 

 w


denoted
and . The values for the low faces
are then taken from
the high faces of the neighbouring cells.
Using the approximations for the derivatives normal to the cell faces, the diffusive term in the transport
c X
equation (Equation (2.1))
e 
(5.25)
T
can be discretised and factorised into a linear system
@
e 
where the individual equations can be expanded as

r e r
p e p
e
t e
m
m tup e tup m t
m z t ez t m z v
m z p ez p m z
m
m

v e v

m
t
e
m
t
e z v
q
{
ez m
{
m
t

(5.26)

z5eqz
m1
v p e vp
m
e{ t
m
p eq{ p
m

{ge{
m 
v

e v

{ v e{ v
{ e{ 

(5.27)

CHAPTER 5. NON-ORTHOGONAL MESHES

and where the equation coefficients are given by


Q O <
Q? O
` O <
` O X

7
O
6O O
s :
p

w
y 
Q? O m
` O <
` O X

7
WO O m< s O T Q: O <

w
y 
`Q <
Q ` X

7
O T 6O Q <
OQ m
:Q Q
W
s
t

w
y 

T
Q ? Q m< O
`Q <
Q ` X

7
OQ <
WO Q m
s 6
v

w
y 
T

`
`
`
`

Q
`
Q ? ` X
m

7
O
O <
WO
: <
s 6
z


w
` ` m< O T 6O ` <
Q` <
Q ? ` X

7
O` m
W
:
s
{


y
T WOO
` `
` `
m Q? Q

7
6O O
:Q Q
r

w
y 
Q
Q
m
m
m
m
m

7
O
O
: O X
s 6
tup


Q: O X

7
< O T WO Q m
s
t


Q? O X

7
< O T 6O Q m
s
vp


Q? O X

7
O T OQ m
s W
v


`Q X

7
O T Q ` m
s :
z t

w 
`Q X

7
< O T Q ? ` m
s
z v
w 
T
Q ` m
`Q X

7
< O
s :
{ t
y 
T

Q
`
`Q X
m

7
O
s ?
{ v

y 
` O X

7
O T 6O ` m
s
z p
w 
` O X

7
< O T WO ` m
s
z
w 
T
`
` O X

7
<O
O m
s 6
{ p

y 
` O X F

7
O T O` m
s W
{

y
T
m
For a two dimensional system the slightly more manageable discretisation is

r e r
p e p
e
t e t
v e v

m
m tup e tup m
t e mt
vp e vp
v
m
m
m
m
with the equation coefficients
Q O <
Q? O X

7
O
6OO
s :
p


T
Q
Q? O X
m

7
WOO < s O
: O <

Q: Q

7
O
OQ <
OQ X
6
W
s
t


Q? Q m < O T 6O Q <

7
WO Q X
s
v


T WO O
Q: Q
Q ? Q

7
6OO
r


m Q: O X m

7
O m 6O Q
s
tup


Q O X

7
<O T WO Q m
:
s
t


Q? O X

7
<O T 6O Q m
s
vp


Q? O X F

7
O T OQ m
s W
v

T
m

122

(5.28)

e v 

(5.29)

(5.30)

The computational molecule for the Cartesian equations given in Section 2.2 contained 5 points for
the two-dimensional mesh, and 7 points in three-dimensions. With the addition of the extra terms for
the non-orthogonal diffusion these molecules have expanded to 9 and 19 members in two- and threedimensions respectively. To allow the use of the linear solvers developed for Cartesian meshes, the
system
 L  can be calculated using a deferred correction scheme, with the extra diffusive terms from the
terms being absorbed into the source term of the equation. Thus the system in Equation (5.26)

can be rewritten as
@
e
e 
(5.31)
@
m
with
containing the orthogonal components, and the non-orthogonal components. For a three

CHAPTER 5. NON-ORTHOGONAL MESHES

123

dimensional system the equation coefficients are

7
6OO
p

7
WOO

7
:QQ
t


Q? Q

7
v


``

7
z
w 
``

7
{
y 
Q : Q
Q? Q
` `
``

7
6OO
WO O
r

w
y 
m ` O < m ` O X m
7
O m Q O < m Q? O

s :
p

w
y 
T
Q O <
Q? O m
` O <
` O X
7
<O

:
s

w
y 
T
Q
Q

`
Q
Q` X
7
<
O

O <
WO m
s 6
t

w
y 
` Q <
Q` X
7
< O T 6O Q <

WO Q m
s
v

w
y 
Q ` <
Q? ` X
7
O T 6O ` <

O` m
W
:
s
z


Q? ` X
7
<O T 6O ` <

WO ` m
:Q ` <
s
{


m
7

 T
(5.32)
r

Q: O X
7
O

O6 Q
s
t=p


7
<O T WO Q m

:Q O X
s
t8


Q? O X
7
< O T 6O Q m

s
v1p


Q? O X
7
O T WO Q m

s
v


` Q X
7
O T :Q ` m

s
z t
w 
` Q X
7
< O T Q ? ` m

s
z v

w 
T

Q
`
` Q X
m
7
< O

s :
{ t

y 
` Q X
7
O T Q ? ` m

s
{ v
y 
` O X
7
O T 6O ` m

s
z p

w 
T
`
` O X
m
7
<O

O
s W
z


w
` O X
7
< O T 6O ` m

s
{ p
y 
` O X
7

O T WO ` m
s
{
y 
T
m
whilst for a two dimensional system the terms for the third axis are dropped and the equations are

7
6O O
p

7
WO O


Q : Q

7
t


Q ? Q

7
v


Q ? Q

7
6O O
WO O
:QQ
r


Q
Q
m
m
m
7
O

O <
? O X
s :
p


Q? O X
7
<O T Q: O <


T
7
(5.33)

O
6O Q <
WO Q X
s
t


T
Q
Q
7
< O

O <
WO X
s 6
v


7

 T
r

7
O

OQ
:Q O X
s 6
tup


T
7
< O

WO Q m
:Q O X
s
t


Q? O X
7
<O T 6O Q m

s
vp


Q? O X F
7
O T WO Q m

s
v

T
m
@ U F @ 
7
For an orthogonal mesh the dot product
is only non-zero when
. Thus for such a mesh

CHAPTER 5. NON-ORTHOGONAL MESHES

124


the geometric diffusion coefficients
are only non-zero for
reduce to the rather more manageable system of
O
@ O O dfe
OO d
e R
7
R
R
R

R
R d b O
d  RR
Q
@ Q Q dfe
QQ d
e R
7
R
R
R
Q

R
R d b
d  RR
`
@ ` ` dfe
`` d
e R
7
R
R
R
`

R
R d b
d RR

, and Equations (5.20) to (5.24)




(5.34)

with

dfe
d 

dfe
d
For such a system

dfe
d 
R

RQ
R
R

R`
R

<

ep

<

et
ez

<

er 

(5.35)

er 

(5.36)

e r

(5.37)

, and the discretised equation can be written as,


@
e 

(5.38)

where the equation coefficients for a two dimensional discretisation are given by

7
6O O
p

7
WO O


Q : Q

7
t


Q ? Q

7
v


Q: Q
Q ? Q

7
6O O
WO O
r


m
m
m
whilst for a three dimensional discretisation they become,

7
6OO
p

7
WOO

7
:QQ
t


Q? Q

7
v


``

7
z
w 
``

7
{
y 
Q : Q
Q? Q
` `
`` F

7
6OO
WO O
r

w
y
m
m
m
m
m
For an orthogonal mesh that is Cartesian, the geometric diffusion coefficients
are
3 F3
OO 7


6 

3 F 3
QQ 7


: 

3 F3
`` 7




w
and the equations reduce to those given in Section 2.2.

U

(5.39)

(5.40)

for the above system

(5.41)

CHAPTER 5. NON-ORTHOGONAL MESHES

5.3

125

The Discretisation of the Advective and Source Terms on a


Non-Orthogonal Grid

It now only remains to discretise the advection and source terms to complete the discretisation of the
transport equation on a non-orthogonal mesh. The source terms are treated in an identical manner to
that used for a Cartesian mesh, with the cell centre value being taken as the average for the cell as a
whole, and so the integral for the source over the cell is approximated as

F
r N
N
(5.42)
o
The advective fluxes in the transport equation

T

X


(5.43)

are approximated in the same manner as was used with the Cartesian discretisations given in Section 2.2, with the face value of e being interpolated on the regular mesh in computational space. The
only difference between the Cartesian and non-orthogonal geometry discretisation
is theH calculation
H
of the
, where is the area
face mass flux. For the Cartesian mesh the mass flux is calculated as
and is the velocity normal to the face. For the non-orthogonal mesh the mass flux is instead calculated from the dot product of the velocity and the face area normal, and so all velocity components
must be interpolated to the faces. The mass flux for east, north and top faces are then given by,
7
6 F @ 6O O X
6

T :
F @ :Q Q X 
7
:
(5.44)

T F @ `` X F 
7
w
w w

T
For a Cartesian mesh these expressions reduce to
6 H 6
7
6
7
: H : 
:
7
V H 
w
V w w 

(5.45)

which were the expressions given in Equation (2.17).


The full discretisation of the transport equation on a non-orthogonal mesh can now be given. By
approximating the advective fluxes with the central difference scheme, which was described for a
Cartesian mesh in Section 2.2.3, the steady transport equation can be discretised as
@
7 F
e
e
(5.46)
m
@
For a discretisation of the two-dimensional transport equation the individual coefficients of the

CHAPTER 5. NON-ORTHOGONAL MESHES

and

126

arrays are,

<

<
7

<
7

<
7

<
7

<

<

7
7

v
r

6OO
WOO m <
:QQ
Q? Q m <
``
w
`` m <
y

T
r N
O
s
< O T
s
O T
s
<O T
s
 T

O
s
< O T
s
< O T
s
O T
s
T

O
Q
O
Q
O
Q
O
Q
O
Q
O
Q

6



:

?


w 
y 

Q: O <
Q? O

Q? O
:Q O <

6O Q <
WO Q

Q6O <
WO Q

X
m

6V< W
m

:5< ?X 
(5.47)

X

X

X



6O Q
:Q O X


Q
Q: O X
m
7
WO


Q? O X
7
6O Q m


Q? O X F
7
WO Q m

m
For a discretisation of the three dimensional transport equation the equation coefficients are given by

t=p

t
8

v1p

CHAPTER 5. NON-ORTHOGONAL MESHES

<
7

<
7

<
7

<
7

<
7

<
7

<

7
7

{
7
r

tup
t

vp
v
z t
z v
{ t
{ v
z p
z
{ p
{

6O O
WO O m <
:Q Q
Q ? Q m <
` `
w
` ` m <
y

r
N 
O
s
<O T
s
O T
s
<O T
s
O T
s
< O T
s
 T

O
s
<O T
s
< O T
s
O T
s
O T
s
< O T
s
< O T
s
O T
s
O T
s
< O T
s
< O T
s
O T
s
T

O
Q
O
Q
O
Q
O
Q
O
Q
O
Q

m
T
m

:Q O <
Q: O <
6O Q <
6O Q <
6O ` <
6O ` <
6O Q
WO Q
6O Q
WO Q
:Q `
Q? `
:Q `
Q? `

6O ` m
WO ` m
6O ` m
WO ` m

6



:
?

w 
y 

127




t
v
m
m
6 < W
m:
m
Q? O
` O <

Q? O m
` O <

` Q <
WO Q m

` Q <
WO Q m

WO ` m
:Q ` <

Q : ` <
WO ` m

m
Q: O X


Q: O X


Q? O X


Q? O X


`Q X
w 
`Q X
w 
`Q X
y 
`Q X
y 
` O X
w 
` O X
w 
` O X
y 
` O X F
y

< m ?
` O
y
` O
y
`Q
y
`Q
y
Q? `
Q? `
X

X
w < y X 


X

X

X

X

X


(5.48)

m
These systems may be compared to the equivalent systems given in Equations (2.25) and (2.26) for a
discretisation upon a Cartesian mesh. The system is solved using a deferred correction scheme, with
the array being multiplied by the previous iterations value of the e field and absorbed into the right

hand side, so that at any given iteration system being solved by the linear solver is
@
7<
e
eq 
(5.49)

where e is the previous iterations solution.


7 
For an orthogonal mesh
, and so the two and three dimensional transport equations reduce to

@
7}
e

(5.50)

CHAPTER 5. NON-ORTHOGONAL MESHES

128

where the coefficients for a two-dimensional discretisation are

7
<
O 6
6O O
Q 
p

7
<

<
O W
WO O
Q

7
<
O :
:Q Q
Q
t


Q ? Q m < O ?

7
<
Q
v


` `

7
<
O
Q w 
z
w
` ` m <O

7
<
Q y 
{
y

7
<

X
6 < W
: < ? X 
r

t
v
T p
T
m
m
m
m
m
7

r N
and for a three dimensional discretisation, the equation coefficients are given by

7
<
O 6
6O O
Q 
p

7
<
WO O m < QO W

7
<
O :
:Q Q
Q
t


Q ? Q m <O ?

7
<
Q
v


` `

7
<
O
Q w 
z
w
` ` m <O

7
<
Q y 
{
y

7
<

X
r
p

t
v
z
{
T
m
m
m
m
m
<
<
6
W
:
?

w < y X 

T
m
m
7
F m

r N

5.4

(5.51)

(5.52)

Boundary Conditions for a Non-Orthogonal Mesh

The boundary conditions for a discretisation on a non-orthogonal mesh are similar to those for a
Cartesian mesh, except for Neumann boundaries which have extra cross derivative components in the
calculation of the gradient normal to the boundary.
Considering the case for an eastern boundary, as illustrated in Figure 5.7, a Dirichlet boundary condition where the value of the scalar is specified at the boundary as
7
e
e
y 
(5.53)
results in an equation for the boundary node of the form
7}
<
e p
ey
e r 

(5.54)

which can be substituted into the equation for point given in Equations (5.27) and (5.29).
For Neumann boundary conditions the gradient normal to the face is specified,

dfe
d b

ey

(5.55)

The normal gradient is given in Equation (5.20) above, and this is substituted into the system at the
boundary nodes. The non-orthogonal terms involving cross-derivatives at the faces are normally
solved using the deferred correction scheme as was given in Equation (5.31), and so at any iteration
the boundary gradient may not be as specified by Equation (5.55), but for a fully converged solution
the boundary condition will apply.
For discontinuities in the boundary conditions, such as a step change in the specified boundary value
for Dirichlet boundaries along a face, a change from Neumann to Dirichlet boundaries on a face, or a

CHAPTER 5. NON-ORTHOGONAL MESHES

129

E
P
b

Figure 5.7: The boundary of a non-orthogonal mesh.


corner of the mesh, the central difference approximation for the cross derivatives in the mesh (such as
those given in the second and third equations in Equation (5.10)) will be in error, and instead of using
central differences, one sided differences should be used as appropriate.

5.5

The Solution of the NavierStokes Equations on a Non-Orthogonal


Mesh

For solving the NavierStokes equations on a non-orthogonal mesh there are three more issues to consider. The first concerns the discretisation of the pressure term in the momentum equations, the other
terms in the equation being treated in the same manner as their counterparts in the generic transport
equation. The second issue is the pressure-velocity coupling and the generation of an equation for the
pressure correction. And finally the interpolation scheme used to calculated the velocity at the cell
faces needs to be formulated.

5.5.1

Evaluation of the Pressure Gradient Term

The pressure force on a cell can be approximated by the integral of the pressure over the faces of
the cell, the pressure force on each face acting normal to that face. The pressure at the face can be
approximated by an interpolation of the values at the centre of the cells on either side of the face. Thus
the value at the eastern face can be approximated as,
r
p F
6
m
(5.56)
o
@ OO
6
The area of the eastern face is given above as
, and so the pressure force on the eastern face is

approximated by
p
OO r
6u7< @ 6

(5.57)
m
the negative sign being due to the pressure force acting inwards on the cell, whilst the face area is
defined pointing outwards.
Integrating over the six faces of the cell gives the pressure force on the
@
@
cell as
7
< O
OO
WO O
p X
X
Q @ 6 r
r
Q : Q T m X m @ Q? Q T m X
r
t
r
v
(5.58)
m @ ` ` T m X m @ ` ` T
m X F
z
{
w T r
y T r
m
m
m
m

CHAPTER 5. NON-ORTHOGONAL MESHES

130

This can be
factorised to
@
@ QQ
@
@
@ ``
7
< O @ 6OO
WO O
:

t
v Q ? Q
z ` `
{
Q p
w
@m
@ Q Q m @ QQ m @ ``
@ m` ` GF y
(5.59)
< O m @ 6O O
WO O
:
?
Q r
w
y
m
m
m
m
m
The sum of the areas on the second line of Equation (5.59) will be zero for a closed volume, and the
expression reduces to
@ O O
@ Q Q
@
@
@ ` ` F
7
< O @ 6O O
W
:

t
v Q? Q
z ` `
{
Q5 p
(5.60)
w
y
m
m
m
m
m
The individual Cartesian components of this force can then be added to the source term for each
component of the momentum equation.

5.5.2

Interpolation of the Face Velocities

The velocity interpolation at the faces is performed in an identical manner to the method used for
Cartesian meshes, described in Section 4.2.2. The method, attributed to Rhie and Chow[139], interpolates the sum of the velocities and pressure forces, rather than interpolating the velocities alone.
The equation for the conservation of momentum at the point can be written in vector form as,

a @
a
<
: :
F 7 <

: :
r
(5.61)


r
r
r y

@ F
is the sum of pressure forces on the faces of

where r is the velocity vector


at
the
point
,

: : : :
the cell centred at , and r is the diagonal element of the system of linear equations
y
.
Such an equation exists for each cell in the domain, and with RhieChow interpolation it is assumed
that a similar equation can be approximated at the faces of a cell. Thus for the eastern face of a cell
there is an equation of the form,

a
@ F

6V<
: :

7 <
6
6 
(5.62)
6
6
:
:

r
r
r y
with similar equations being able to be written for the north and top faces of the cell. The left hand
side of equation (5.62) at the face of the cell is assumed to be equal to a linear interpolation of the left
hand sides of the equations for the and cells on either side of the face,

a @
@

6<
7
6V<
F
F

6
6

6 
(5.63)

r
r

X6
where an O overbar T signifies a linear interpolation of the values at the and cell centres. The
value of \ at the eastern face in the left hand side of Equation (5.63) can be approximated by a linear
interpolation, and so an expression for the velocity at the eastern face is

a @
@
M
a

6u7
6
<
F
F
F

6
6

6
(5.64)

m
r
r
The sum of the pressure
forces at the eastern face is approximated by

@ F
@
@
@ Q Q

< @ Q? Q < @ Q?JQ


O @ QQ

6OO
:
6 7 6O O p <
s 6 t
r
tup
v
v p


m
m
@ ` `

O @ ``
< @ ``
< @ ` `

s w z
w z p
y {
y { p 
m
m

(5.65)

CHAPTER 5. NON-ORTHOGONAL MESHES

131

@ Q Q
@ Q Q
6
6
where
is the face area
for the cell . The pressure forces on the cells and are given
by Equation (5.60), and so all the terms in Equation (5.64) are defined and the face velocity can be
calculated. The velocities for the north and top faces can be interpolated using similar expressions,
and so the face mass fluxes can be calculated using Equation (5.44),
@ O O F 6
7
6
@ 6


Q Q F :
7
:
@ :
(5.66)


` ` F F
7
w
w

5.5.3

The Non-Orthogonal Pressure Correction Equation

The coupling of the velocity and pressure equations on a non-orthogonal mesh is performed in an
identical manner to that described in Section 4.2.1 for Cartesian systems. The discretisation of the
NavierStokes has been described above, as has the method used for interpolating the velocity to the
cell faces. The only remaining task is the derivation of the pressure and velocity corrections.
As was described in Section 4.2.1 the SIMPLE coupling scheme involves the calculation of an initial
estimate of the velocity field, G , from which the face velocities are interpolated. The generated field
will not generally satisfy the continuity equation, and so a pressure correction is then calculated,
which when added to the momentum equations results in a velocity correction which which satisfies
the continuity equation.

form of
The initial calculation of the velocity field is with an equation of the
a
aM @ F

: : 7

r r


m :
m

(5.67)

where b signifies a summation of the neighbouring cells, whilst is a summation over the cell faces.
The solution to this equation will not generally satisfy the continuity equation. We therefore wish to
add the velocity correction generated from a pressure correction , such that the resulting velocity
field
satisfies the continuity equation.
m
and
Substituting

m into the momentum Equation (5.67)@ gives


m

a
a

X
:
Y
X
7
:
:

X F

r
(5.68)
T r m r m :
T m
T
m
m
Approximating the off-diagonal terms in the momentum equation by Equation (5.67) as
a
a
:
: :
:
: X

:
:

T^ m

o
and then subtracting the momentum Equation (5.67) gives

7 a. @
r r


or

a.

(5.69)

(5.70)

(5.71)

The correction velocities for the east, north and top faces of the
are then found by interpolation as
cell

6
6 
6

r

7
:

: 

:
(5.72)

7
F

w
w
r
w

CHAPTER 5. NON-ORTHOGONAL MESHES

132

Following the derivation of Rhie and Chow[139] the cross derivative terms at the faces are ignored,
since for near-orthogonal meshes they are small, and the field vanishes for a converged solution.
Therefore the expressions for the face velocity corrections can be written as

<
@ O O
7
r
6

6 p
6



r

<
@ Q Q

7
:
: t

r
:


(5.73)

r
<

@ ` `
F
7
z

w
w

r w
The discretised continuity equation can be written as
6 < W
: < ?
w < y 7  F

m
m

7

@
velocity from the
Substituting in
, where is the
7 interpolated
m
is the mass flux correction
defined as
,
and
rearranging
gives

<
<
<
@ OO F @ OO
@ Q Q F @ Q Q
< @ WOO F @ WOO

< @ Q ? Q F @ Q ? Q
6
6 p
:
: t
r
r

r
6
W
:

r
r
r
m
<
@ ` ` F @ ` ` <
@
@


`
`

`
`
F
r <
r
z
{ 7 W< 6
?V<

w
w
y
y
r w
r y
m
m

(5.74)
velocity field, and

<
r
v
?
r
:
y < w F
m
(5.75)

This can be factorised as


7







r r
p p

t t
v v

z z
{ {

(5.76)
m
m
m
m
m
m
@
@
where
6O O F 6O O
7

6
p

r @
@
WO O F WO O
7


@ Q Q r F @ Q Q
:
:
7

:
t

@ Q Q r F @ Q Q
?
?
7

?
v

(5.77)
@ ` ` r F @ ` `
7

w
w

z

@ ` ` r F @ w ` `
7

y
y

{

r y
7
<

X
r
p

t
v
z
{ 
T
m
m
m
m
m
7

W < 6
? < :
y < wX F
T
m
m
This system can be solved for the pressure correction , which is then used to correct the velocities
to satisfy the continuity equation, the velocity and pressure fields being updated by
7

7
S
(5.78)
G m F

m
Aside from the use of velocity vectors at cell faces, rather than single Cartesian components of velocity, and the use of area vectors rather than the magnitudes of the cell face areas, the system is identical
to Equation (4.23) derived for a Cartesian system in Section 4.2.1.

CHAPTER 5. NON-ORTHOGONAL MESHES

5.6

133

Examples of Non-Orthogonal Problems

To test the implementation of the non-orthogonal differencing schemes the code was used to solve
three test problems. The first models two-dimensional conduction in a skew domain. For the geometry
chosen a Cartesian finite difference solution was easily calculated that could be used as a comparison
for the solution calculated using the non-orthogonal finite volume discretisation.
The second problem modelled the two-dimensional driven cavity flow described in Section 4.4.1. The
flow was solved for a square cavity, with one solution being generated on a square mesh, and the other
on a non-orthogonal mesh that fitted the cavity. As the mesh is refined the solutions calculated on the
Cartesian and non-orthogonal meshes should both converge towards the benchmark solution provided
by Ghia et al[50].
The final test case was the driven cavity flow provided as a benchmark test case by Demirdzic, Lilek
and Peric[36]. This problem models a driven flow in a skew cavity, similar in shape to the domain
used in the conduction test.

5.6.1

Conduction in a Skew Domain

To test the discretisation of the diffusion terms of the transport equation, and the implementation of
Dirichlet and Neumann boundary conditions, the initial problem modelled was one of steady state
conduction in a skew domain. The geometry of the problem is given in Figure 5.8 along with the two
sets of boundary conditions used.

 

Dirichlet Boundaries

d b

7 

7


d b

Neumann Boundaries

Figure 5.8: The steady state conduction in a skew domain problem, showing the problem geometry
and the two
conditions modelled. The cavity is of unit length and height, with the side walls
 boundary

angled at
.

CHAPTER 5. NON-ORTHOGONAL MESHES

134

The
with the lid of the domain being set to
7first
problem applies Dirichlet conditions on all 7 boundaries,

e
, whilst the other three boundaries are set to e
. The second
7test
imposed
7  Dirichlet conditions
on the top and bottom boundaries of the domain, with values of e
and e
respectively, whilst
: 7 
the two side boundaries had a zero flux Neumann boundary condition imposed, l
, with b being

the direction normal to the surface.


To provide a benchmark solution, the problem was also modelled using a finite difference discretisation on a Cartesian mesh. The two types of meshes that were used are shown in Figure 5.9, with
the Cartesian mesh used by the finite difference solver being on the left, whilst the boundary fitted
non-orthogonal mesh used by the finite volume solver is shown on the right.

Figure 5.9: The meshes used for the skew conduction problem. On the left the Cartesian mesh used
by the finite difference code. On the right the non-orthogonal mesh used by the finite volume code.
The solutions calculated by the two methods are
in Figures 5.10 and 5.11, the Cartesian fiQ
shown
nite difference solutions being calculated
on
a
mesh,
whilst the non-orthogonal finite volume
Q
solutions are calculated on a
mesh. The contours of the two solutions look similar for both the
Neumann and Dirichlet problems.

Figure 5.10: The calculated temperature field for the skew conduction with Dirichlet boundaries. On
the left the solution calculated with the finite difference code, on the right that calculated with the
finite volume code.

Figure 5.11: The calculated temperature field for the skew conduction with Neumann boundaries. On
the left the solution calculated with the finite difference code, on the right that calculated with the
finite volume code.

CHAPTER 5. NON-ORTHOGONAL MESHES

135

x Q
To better compare the two methods, the temperature profiles for each problem, calculated on
meshes, are given in Figures 5.12 and 5.13. Figure 5.12 shows the temperature profile across the domain along the horizontal centreline (ie: midway up the domain) calculated for the Dirichlet boundary
condition problem. The finite volume solution is shown as a solid line, with that calculated using the
finite difference scheme being given by the crosses. As can be seen the two solutions agree quite well.
Similarly Figure 5.13 shows the solution for the Neumann boundary conditions along the centreline
running up the centre of the cavity. Again the two methods are in excellent agreement with each other.
0.14
Non-Orthogonal Finite Volume
Cartesian Finite Difference
0.12

0.1

0.08

Scalar

0.06

0.04

0.02

0
0.5

0.6

0.7

0.8

0.9

1
x

1.1

1.2

1.3

1.4

1.5

Figure 5.12: The calculated temperature profile along the horizontal centreline of the Dirichlet skew
conduction problem.
Finally, the convergence of the solutions calculated by the two methods as the mesh is refined are
shown in Figures 5.14 and 5.15. For the Dirichlet problem, the temperature at the centre of the domain
is plotted as a function of the cell size, whilst for the Neumann problem the temperature at the midheight of the left wall is plotted. For both problems the two solutions converge as the mesh is refined.
No ranking of the relative accuracy of the two schemes can be made, since for the Neumann problem
the finite volume solution is the more accurate, whilst for the Dirichlet problem the reverse is true.
To summarise, for the problems tested the non-orthogonal finite volume scheme gives a solution that
is comparable in accuracy to that generated by a Cartesian finite difference method. As the mesh is
refined the solutions given by both schemes converge to a common solution.

CHAPTER 5. NON-ORTHOGONAL MESHES

136

1
Non-Orthogonal Finite Volume
Cartesian Finite Difference

0.8

0.6
Scalar

0.4

0.2

0
0

0.2

0.4

0.6

0.8

Figure 5.13: The calculated temperature profile along the vertical centreline of the Neumann skew
conduction problem.

0.114
Non-Orthogonal Finite Volume
Cartesian Finite Difference
0.113

Scalar Value at Centre

0.112

0.111

0.11

0.109

0.108

0.107
0

0.01

0.02

0.03

0.04

0.05

0.06

0.07

Grid Size

Figure 5.14: The convergence of the solutions calculated with the finite difference and finite volume
solvers as the mesh is refined. The temperature
in the centre of the domain for the Dirichlet problem
3
is plotted as a function of the grid size .

CHAPTER 5. NON-ORTHOGONAL MESHES

137

0.252

Scalar Value at Centre of Side Wall

0.25

0.248

0.246

0.244

0.242

0.24

0.238
Non-Orthogonal Finite Volume
Cartesian Finite Difference
0.236
0

0.01

0.02

0.03

0.04

0.05

0.06

0.07

Grid Size

Figure 5.15: The convergence of the solutions calculated with the finite difference and finite volume
solvers as the mesh is refined. The wall temperature
at the mid-height of the domain for the Neumann
3
problem is plotted as a function of the grid size .

CHAPTER 5. NON-ORTHOGONAL MESHES

5.6.2

138

Driven Cavity Flow with a Distorted Mesh

The second problem that was modelled was the Driven Cavity flow for a square domain, previously
encountered in Section 4.4.1. For this flow there exist a number of benchmark solutions, and a number
of solutions for the flow were calculated in the test described in Chapter 4.

"

"

"

"

Figure 5.16: The driven cavity problem.


To test the non-orthogonal discretisations used in the flow solver, the problem was modelled on a
distorted mesh, as shown in Figure 5.17. Solutions were also calculated on a Cartesian mesh for
comparison, and the benchmark solution of Ghia, Ghia and Shin[50] was also used as a test of the
solution. Flow was modelled on a range of meshes, for a flow with a Reynolds number of 1000.
Solutions were calculated using the MSOU and FOU differencing schemes.

Figure 5.17: The meshes used for the driven cavity problem. On the left the Cartesian mesh, on the
right the distorted non-orthogonal mesh.

Q
The solution for a flow calculated on an
non-orthogonal mesh using the MSOU differencing
scheme
is
shown
in
Figure
5.18,
with
contour
plots
of the streamfunction , the magnitude of velocity

h h
,
and
the
and
components
of
velocity
being
given.
Contour levels are identical to those used in

Section 4.4.1 and the paper of Ghia et al.

CHAPTER 5. NON-ORTHOGONAL MESHES

139

For the bulk of the flow the agreement between the Cartesian and non-orthogonal solutions is extremely good, with the contours in Figure 5.18 overlaying those given in Figure 4.5. However the
recirculation bubbles in the lower left and right corners of the cavity are incorrectly resolved, with the
reattachment points being incorrectly located. This problem occurs with solutions calculated using
the FOU, MSOU and QUICK differencing schemes, and the Author is uncertain if this is due to the
approximations used in the non-orthogonal discretisation, or is a mesh dependent error that would
disappear with mesh refinement.
The velocities on the vertical and horizontal centrelines are shown in Figures 5.19 and 5.20, calculated
using the non-orthogonal meshes using the MSOU differencing scheme. Solutions are given for a
range of mesh densities, with the solutions being compared with the benchmark velocities of Ghia et
al. As with the Cartesian case the calculated velocities converge to the benchmark solution, giving an
excellent agreement with the finer mesh solutions.
Finally the velocity fields calculated using the Cartesian and non-orthogonal meshes are compared in
Figure 5.21. For each mesh size used, the Cartesian velocity fields were interpolated onto the distorted
mesh using bicubic interpolation, with the RMS error between the Cartesian and non-orthogonal
solutions being calculated.
The error between the two solutions velocity fields is plotted as a function
3
of the mean cell size for solutions calculated using the FOU and MSOU differencing schemes. As
the mesh is refined the RMS error decreases and the two solutions converge. The error between the
MSOU solutions seems larger than those between the FOU solutions. However, as the mesh is refined
the MSOU error reduces at a faster rate than that of the FOU solutions.

CHAPTER 5. NON-ORTHOGONAL MESHES

140

Q
Figure 5.18: The solution field for the driven cavity calculated on a
cell distorted mesh,
for a Reynolds number of 1000 using MSOU differencing. From
h h left
to right, top to bottom, the fields shown are the streamF function,
velocity
velocity and veloc<  magnitude
,
F 
 

ity. Streamfunction
contours
are
at
intervals
for
,
with
further contours
at
 F
 `  s  






and
. Velocity contours are at
intervals between
. The
solution should be compared with those given in Figures 4.4 and 4.5.

CHAPTER 5. NON-ORTHOGONAL MESHES

141

0.8

0.6
y

0.4
15x15
27x27
39x39

0.2

51x51
69x69
81x81
Ghia

0
-0.4

-0.2

0.2
0.4
U velocity

0.6

0.8

Figure 5.19: The profile of the velocity along the vertical centreline calculated on the distorted
mesh at a Reynolds number of 1000 using MSOU differencing. Calculated data compared with the
benchmark of Ghia, Ghia and Shin[50].

0.4
15x15
0.3

27x27
39x39

0.2

51x51
69x69

0.1

81x81
Ghia

0
y

-0.1
-0.2
-0.3
-0.4
-0.5
-0.6
0

0.2

0.4

0.6

0.8

V velocity

Figure 5.20: The profile of the velocity along the horizontal centreline calculated on the distorted
mesh at a Reynolds number of 1000 using MSOU differencing. Calculated data compared with the
benchmark of Ghia, Ghia and Shin[50].

CHAPTER 5. NON-ORTHOGONAL MESHES

142

0.025
FOU U Velocity
FOU V Velocity
MSOU U Velocity
MSOU V Velocity

0.02

RMS Error

0.015

0.01

0.005

0
0

0.02

0.04

0.06

0.08

0.1

dx

Figure 5.21: The RMS error between


the solutions calculated
on a Cartesian and distorted mesh, as

3
a function of average mesh size . Errors given for and velocity fields, for solutions calculated
with FOU and MSOU differencing schemes.

CHAPTER 5. NON-ORTHOGONAL MESHES

5.6.3

143

Driven Cavity Flow in a Skew Cavity

As a final test, the non-orthogonal code was compared to the benchmark solution given by Demirdzic,
Lilek and Peric[36] for a driven cavity flow in a skew cavity. The geometry of the
is given in
7 problem
7
Figure
5.22,
and
solutions
were
obtained
for
a
cavity
with
unit
length
walls
(
),
a
wall
angle



of
, at a Reynolds number of
, using the QUICK differencing scheme.

,
,

,
,

,
,

"

"

,
"

,
,

"

, 
,




 
$
$

Figure 5.22: The skew driven cavity problem.

Figure 5.23: The mesh used for the calculation of the skew driven cavity flow field.

B x
The solution field calculated using a mesh of
points is shown in Figure 5.24, with contour

plots of streamfunction, velocity magnitude, and the and components of velocity being given. The
contour levels used are identical to those used by Demirdzic et al in their paper, and the agreement
between the published and calculated solutions is excellent.
The velocities calculated on the vertical and horizontal centrelines are plotted in Figure 5.26, with
the solutions being given for a number of meshes. They are compared with the benchmark values of
Demirdzic et al, and again the agreement is excellent on the finer meshes. In addition the errors in the
coarser mesh solutions show the same trends as the coarse mesh solutions of Demirdzic et al.

CHAPTER 5. NON-ORTHOGONAL MESHES

144

Figure 5.24: The solution field for the skew driven cavity, calculated at a Reynolds number of 1000
using QUICK differencing.
From left to right, top to bottom, the fields shown are the
stream function,
h h
 F 
velocity magnitude
,
velocity
and
velocity.
Streamfunction
contours
are
at
intervals
<  F

 F 1

 F 1
 F

between
and
,
and
at
intervals
between
and
.
Velocity
contours
are
at

intervals between
.

0.8

0.7

0.6

0.5

0.4

0.3

0.2

19x19
35x35
67x67

0.1

131x131
Demirdzic
0
-0.2

-0.1

0.1

0.2

0.3

0.4
0.5
U velocity

0.6

0.7

0.8

0.9

1.1

Figure 5.25: The profile of the velocity along the centreline for the skew driven cavity, calculated
for a Reynolds number of 1000 using QUICK differencing. Calculated data compared with the benchmark of Demirdzic et al[36].

CHAPTER 5. NON-ORTHOGONAL MESHES

145

0.08
19x19
0.06

35x35
67x67
131x131
Demirdzic

V velocity

0.04

0.02

-0.02

-0.04

-0.06
0.3

0.4

0.5

0.6

0.7

0.8
x

0.9

1.1

1.2

1.3

1.4

Figure 5.26: The profile of the velocity along the centreline for the skew driven cavity, calculated
for a Reynolds number of 1000 using QUICK differencing. Calculated data compared with the benchmark of Demirdzic et al[36].

CHAPTER 5. NON-ORTHOGONAL MESHES

5.7

146

Conclusions

The finite volume discretisations given in Chapter 2, and the SIMPLE pressurevelocity coupling
scheme described in Chapter 4 have been extended from Cartesian meshes to structured non-orthogonal
meshes. The discretisation of the diffusion terms in the transport equation has been derived, whilst
the discretisation of the advective terms is handled in an identical manner to the discretisations on
Cartesian meshes described in Chapter 2. The pressurevelocity coupling scheme was then adapted
to non-orthogonal meshes, with the pressure correction equation being re-derived.
The switch from a Cartesian to a non-orthogonal mesh complicates the calculation of the geometric
properties of the mesh, such as face areas and cell volumes, and so the techniques used for calculating
these values is described in Section 5.1. In addition, the switch from an orthogonal to a non-orthogonal
mesh increases the number of terms in the linear equations generated by the finite volume discretisation,

with the number of terms increasing from to for two-dimensional discretisations, and from
to
in discretisations on three-dimensional meshes. A deferred correction scheme that allows the
use of the linear solvers developed in Chapter 3 is described and used.
Finally, to test the code it was used to solve three benchmark problems. The first, a two-dimensional
conduction problem, tested the discretisation and implementation of the diffusion terms in the transport equation, and the implementation of the Neumann and Dirichlet boundary conditions. The second
and third problems modelled two-dimensional driven cavity flows, with the results being compared
against published benchmarks. In all cases the agreement between the non-orthogonal code and the
benchmarks is excellent, with convergence being demonstrated to occur with refinement of the mesh.

You might also like