You are on page 1of 104

NAME 363: Computational Fluid Dynamics

Finite Volume Method (FVM)

Prepared by
Dr. Md. Shahjada Tarafder

Department of Naval Architecture and Marine Engineering


Bangladesh University of Engineering Technology
Dhaka 100

Prepared by: Dr. Md. Shahjada Tarafder Page 1


Lecture Plan
Lectures Topics to be covered Class Test
1st week Introduction. Governing equations of fluid flow.
nd
2 week Green’s theorem, Boundary integral methods and its application to radiation
and diffraction problems,
Class Test 1
Finite difference method
3rd week Discretization schemes, grid generation, Transformation of physical domain
into computational domain
4th week Finite volume methods Class Test 2
5th week Steady diffusion problems
th
6 week Steady convection-diffusion problems
th
7 week Solution algorithms for pressure-velocity coupling in steady flows Class Test 4
Finite volume method for unsteady flows
th
8 week Free surface flow, free surface computation with linear and fully nonlinear
conditions.
9th week Numerical treatment of fluid-body interface, turbulence modeling.
10 week Flow visualization and frictional resistance computation for double body Class Test 4
th

flows using Navier-Stokes equations


11th week CFD application to free surface flow past ship shape objects using Reynolds
Averaged Navier Stokes Equation (RANSE)
12th week Discretization schemes: Finite Element Method
13th week Discretization schemes: Spectral Method
14th week

Materials Distribution for Term Final Exam


Internal No. Topics Page No.
Book Klaus A Hoffman and Steve T. Chiang: Computational Fluid
Dynamics Volume I
1. Chapter 2: Finite difference formulations 29-54
2. Chapter 9: Grid Generation-Structured grids 358-368
Book Sastry-Introductory methods of numerical analysis (2012)
3. Chapter 10: The Finite element method & Interpolation 387-421
Book John D. Anderson: Fundamentals of Aerodynamics
4. Boundary element method: Source and vortex panel methods
5. Chapter 4: Incompressible flow over airfoils 218-227

External Book Versteeg, H. K. and Malalasekera, W.: An introduction to computational fluid


dynamics: The finite volume method, 1st Edition, Longman Scientific and
Technical, 1995.
Contents:
1. Chapter 2: Conservation laws of fluid motion and boundary 10-26
conditions
2. Chapter 4: The finite volume method for diffusion Problems 85-102

Prepared by: Dr. Md. Shahjada Tarafder Page 2


3. Chapter 5: The finite volume method for convection-diffusion 103-134
problems
4 Chapter 7: Solution of discretized equations 162-165
5 Chapter 8: The Finite volume method for unsteady flows 168-182
6 Chapter 11: Methods for dealing with complex geometries 318-356

References:
a) Klaus A Hoffman and Steve T. Chiang (2000): Computational Fluid Dynamics, Volume I, Fourth
Edition, A publication of Engineering Education System, Wichita, USA.
b) John D. Anderson Jr. (2021): Fundamentals of Aerodynamics, Fifth Edition, The McGraw-Hill
Companies, Inc., USA
c) Versteeg, H. K. and Malalasekera, W. (2007): An introduction to computational fluid dynamics:
The finite volume method, 2nd Edition, Pearson Education Limited, India.

Course Objective:
• To introduce the student to widely used techniques in the numerical solution of fluid dynamics
equations
• To develop a clear understanding of how computational methods, algorithms and boundary
condition chosen affect the approximate solution
• To place CFD in the context of a useful design tool for shipbuilding industry and a vital research
tool for fluid-structure interaction of ships
• To develop practical expertise in solving CFD problems with a commercial CFD code, ANSYS
CFX and
• To develop an awareness of the power and limitations of CFD.

Course Outcomes: After completion of this course the student should be able:
• To be familiar with the differential equations for flow phenomena and numerical methods for their
solution
• To use and develop flow simulation software for the most important classes of flows in
engineering and science
• To analyze different mathematical models and computational methods for flow simulations
critically
• To undertake flow computations using current best practice for model and method selection, and
assessment of the quality of results obtained.

Prepared by: Dr. Md. Shahjada Tarafder Page 3


Course Objectives: The primary objectives of the course are as follows:
• Introduction to computational modeling and numerical methods – Finite Difference Method;
Finite Volume Method & Finite Element Methods.
• Exposing participants to the fundamentals of computational fluid dynamics (CFD) and coupled
problems.
• Providing the participants with the state-of-the-art knowledge on computational methods used in
solution of CFD equations.
• Developing a clear understanding of how computational methods, algorithms and boundary
condition chosen affect the approximate solution.
• How computational treatment differs if CFD is coupled with solid mechanics. Introduce
participants to inter and multi-disciplinary problems.
• Introducing the participants to the new computational approaches such as iso-geometric and scan-
based methods, implementation and verification issues

Course Outcomes: After successfully completing this course, the students should be able to:
• To understand the theoretical basis of CFD
• To develop a CFD model for “real world” engineering problems
• To address complex problems using CFD with the specific focus on developing practical skills in
using a commercial CFD package, ANSYS CFX
• To interpret computational results and to write a report conveying the result of the computational
analysis.

Course Outcomes: The students will be able


• To formulate and solve computational problems arising in the flow of fluids
• To assess the accuracy of a numerical solution by comparison to known solutions of simple test
problems and by mesh refinement studies.
• To predict forces on the airfoils, ship hulls etc.
• To interpret computational results and to write a report conveying the result of the computational
analysis

Pre-requisite courses: Numerical Analysis, Mechanics of Water Waves

Prepared by: Dr. Md. Shahjada Tarafder Page 4


Computational Fluid Dynamics (CFD)

(a) Computational Fluid dynamics (CFD): Fluid flows are governed by the partial differential equations
(PDE) based on the conservation laws of mass, momentum and energy. Computational Fluid Dynamics
(CFD) is the art of replacing such PDE systems by a set of algebraic equations which can be solved
using digital computers.
Source: Lecture note-Kuzmin

(b) Computational Fluid dynamics (CFD): CFD is a science that with the help of digital computers
produces quantitative predictions of fluid flows based on the conservation laws (conservation of mass,
momentum and energy) of governing equation of fluid motion. These predictions normally occur under
those conditions defined in terms of flow geometry, the physical properties of a fluid and the boundary
and initial condition of a flow field. The prediction generally concerns sets of valves of the flow variable
such as velocity. Pressure or temperature at selected locations in the domain and for selected times. It
may also evaluate the overall behavior of the flow. Such as the flow rate or the hydrodynamic force
acting on an object in the flow. During the post four decades, different types of numerical methods have
been developed to simulate the fluid flows involving a wide range of applications. The numerical
methods include

• Finite difference method


• Finite element method
• Finite volume method and
• Spectral method

The CFD predictions are never completed exact. Because many sources of error are involved in the
predictions, one has to be very careful in interpreting the results produced by CFD techniques. The
most common sources of error are:

• Discretization error
• Input data error and
• Modeling error.
Source: Fluid Mechanics by Kundu

(c) Computational fluid dynamics (CFD): CFD is a branch of fluid mechanics that uses numerical
analysis and data structures to analyze and solve problems that involve fluid flows. Computers are used
to perform the calculations required to simulate the free-stream flow of the fluid, and the interaction of
the fluid (liquids and gases) with surfaces defined by boundary conditions. With high-

Prepared by: Dr. Md. Shahjada Tarafder Page 5


speed supercomputers, better solutions can be achieved, and are often required to solve the largest and
most complex problems. Ongoing research yields software that improves the accuracy and speed of
complex simulation scenarios such as transonic or turbulent flows. Initial validation of such software
is typically performed using experimental apparatus such as wind tunnels. In addition, previously
performed analytical or empirical analysis of a particular problem can be used for comparison. A final
validation is often performed using full-scale testing, such as flight tests.

CFD is applied to a wide range of research and engineering problems in many fields of study and
industries, including aerodynamics and aerospace analysis, weather simulation, natural science
and environmental engineering, industrial system design and analysis, biological engineering, fluid
flows and heat transfer, and engine and combustion analysis.
Source: Wikipedia

Governing Equations of Fluid Flows

Conservation form

Equation of continuity 
+ div (  u ) = 0
t
x-momentum equation ( u) p
+ div (  uu ) = − + div (  grad u ) + S Mx
t x
y-momentum equation  (  v) p
+ div (  vu ) = − + div (  grad v) + S My
t x
z-momentum equation  (  w) p
+ div(  wu ) = − + div(  grad w) + S Mz
t z
Energy equation ( i)
+ div(  iu ) = − p div u + div (k grad T ) +  + Si
t

Prepared by: Dr. Md. Shahjada Tarafder Page 6


Finite Volume Method
General Transport Equation

 (  ) 𝜕(𝜌𝜙)
+ div (  u ) = div (grad ) + S + ∇ ∙ (𝜌𝜙𝒖) = ∇ ∙ (Γ∇𝜙) + 𝑆𝛷 (1)
t 𝜕𝑡

In words

Rate of increase of  of Net rate of flow of  Rate of increase of  Rate of increase of 


=
fluid element of fluid element due to diffusion due to sources

Eq. (1) is the so-called transport equation for property . The rate of change term and the rate of convective
term on the left-hand side and the diffusive term and the source term respectively on the right-hand side.

Eq. (1) is used as the starting point for computational procedures in finite volume method. By setting 
equal to 1, u, v, w and i and selecting appropriate values for the diffusion coefficient and source terms we
obtain each of the five partial differential equations for mass momentum, and energy conservation.

The key step of the finite volume method which is to be developed, is the integration of over a three-
dimensional control volume CV yielding

(  )

CV
t
dV +  div(  u ) dV =  div(grad ) dV +  S dV
CV CV CV

Gauss-divergence theorem

   a dV =  n  a dA
CV A

(  )
CV t dV + A n  ( u) dA = A n  (grad ) dA + CV S dV
The product n(u) expresses the flux component of property  due to fluid flow along the outward normal
vector n so the second term on the left-hand side of Eq. (2), the convective term is the net rate of decrease
of the fluid property  of the fluid element due to convection.
In steady state problem

 n  ( u) dA =  n  (grad ) dA +  S dV
A A CV

In time-dependent problem, it is necessary to integrate with respect time t over a small interval t, this
yields the most general integrated form of the transport equation:

 
 t  CV
t
 (  ) dV  dt +   n  ( u ) dAdt =   n  (grad ) dAdt +   S dVdt
 t A t A t CV
(2)

Prepared by: Dr. Md. Shahjada Tarafder Page 7


Finite Volume Method for Diffusion Problem
Steady diffusion problem
Deleting the transient and convective terms the steady diffusion equation can be derived from Eq. 1 as

div(grad ) + S = 0 (1)
  ( ) + S = 0
         
i + j + k i +j +k  + S = 0
 x y z   x y z 
           
   +    +    + S = 0
x  x  y  y  z  z 

One-dimensional Steady diffusion problem


Consider the steady state diffusion of a property  in a one-dimensional domain defined as shown in Fig.
1. Now the equation for one-dimensional problem is governed by
d d
( )+S = 0 (2)
dx dx
with the boundary conditions  = A at A and  = B at A

Fig. 1 Fig. 2

Step 1: Mesh generation


The first step of the finite volume method is to divide the domain into discrete the control volume as shown
in Fig 2. The boundaries of control volumes are positioned mid-way between adjacent nodes. Thus, each
node is surrounded by a control volume or cell. It is in common practice to set up control volumes near the
edge of the domain in such a way that the physical boundaries coincide with control volume boundaries.

Step 2: Discretization
The key step of the finite volume method is the integration of the governing equation over a control volume
to yield a discretized equation at it nodal point P.
d d
 dx ( dx ) dV +  S dV = 0
V V

Applying above equation at node P

Prepared by: Dr. Md. Shahjada Tarafder Page 8


d d
( ) e − ( ) w

V
dx
x 
dx  x  A + S dV = 0
V

d d
 ( dx )  A −  ( dx )
V
e
V
w  A+  S dV = 0
V

d d
( A ) e − (A ) w + S V = 0
dx dx
The source term S may be a function of the dependent variable  and the finite volume method approximates
the source term by means of a linear form as:

S V = SU + SPP

  −    − 
e Ae  E P  −  w Aw  P W  + SU + S PP = 0
  xPE    xWP 
This can be re-arranged as

 e Ae  w Aw   A   A 
 + − S P  P =  w w  W +  e e  E + SU
  xPE  xWP    xWP    xPE 
The above equation can be written as
aP P = aW W + aE E + SU (3)

Where
aW aE ap
 w Aw  e Ae
aW + aE − S P
 xWP  xPE

Eq. (3) is the discretized form of the governing equation for the boundary value problem as defined in Eq.

Steps 3: Solutions of equations


The general discretized equation is to be modified to incorporate the boundary conditions. The resulting
system of linear algebraic equations are then solved to obtain the distribution of the property  at nodal
points.

Prob. 4.1
Consider the problem of source-free heat conduction in an insulated rod of 0.5 m in length and ends are
maintained at constant temperatures of 100 0C and 500 0C respectively. The dimensional problem is
𝑑 𝑑𝑇
governed by 𝑑𝑥 (𝑘 𝑑𝑥) = 0. Calculate the steady state temperature distribution in the rod by dividing the

Prepared by: Dr. Md. Shahjada Tarafder Page 9


domain into five control volumes and also compare the result with the analytical solutions. Thermal
conductivity equals 1000 W/m/K and cross-sectional area A is 10× 10-3 m2.

Solution:
d  dT 
 = 0 with TA = 100 C and TB = 500 C
0 0
k
dx  dx 
Let us divide the length of the rod into five equal control volumes as shown in Fig. below giving x = 0.1
m.

The discretized equation for the governing equation of steady state heat flow can be expressed as

aP TP = aW TW + aE TE

The thermal conductivity k, node spacing x and cross-sectional area A are constants and thus results

kw Aw ke Ae kA 1000 10 10−3


= = = = 100
 xWP  xPE  x 0.1

Applying the discretized equation at node 2, 3 and 4 respectively, we get

At node 2 200 T2 = 100 T1 + 100 T3


At node 3 200 T3 = 100 T2 + 100 T4
At node 4 200 T4 = 100 T3 + 100 T5

At node 1:
𝑑 𝑑𝑇 𝑑𝑇 𝑑𝑇
(𝑘 ) = 0 (𝑘 𝐴 ) − (𝑘 𝐴 ) = 0
𝑑𝑥 𝑑𝑥 𝑑𝑥 𝑒 𝑑𝑥 𝑤
𝑑 𝑑𝑇 𝑘𝐴 𝑘𝐴
∫ (𝑘 ) 𝛿𝑥 𝛿𝐴 = 0 (𝑇2 − 𝑇1 ) − (𝑇 − 𝑇𝐴 ) = 0
𝑑𝑥 𝑑𝑥 𝛿𝑥 𝛿𝑥/2 1
𝐶𝑉

Prepared by: Dr. Md. Shahjada Tarafder Page 10


𝑑𝑇 𝑑𝑇
(𝑘 ) − (𝑘 )
𝑑𝑥 𝑒 𝑑𝑥 𝑤 300 𝑇1 = 100𝑇2 + 200𝑇𝐴
∫ 𝛿𝑥 𝛿𝐴 = 0
𝛿𝑥
𝐶𝑉

At node 5:
d dT dT dT
(k )+S = 0 (kA ) e − (kA )w = 0
dx dx dx dx
d dT  kA   kA 
 dx (k dx )  x  A = 0
CV
  (TB − T5 ) − 
x/ 2 x 
 (T5 − T4 ) = 0
dT dT
(k )e − (k ) w
 dx dx  x  A = 0 300 𝑇5 = 100𝑇4 + 200𝑇𝐵
CV
x

The resulting system of equations can be expressed into a matrix form as

 300 −100 0 0 0   T1   200TA 


 −100 200 −100
 0 0  T2   0 
 0 −100 200 −100 0  T3  =  0 
    
 0 0 −100 200 −100  T4   0 
 0 0 0 −100 300  T5   200TB 

After matrix solution by Gaussian elimination

 T1  140 
T   220 
 2  
T3  =  300 
   
T4   380 
T5   460 
Analytical solution:
d
(k
dT
)=0 T = TA at x = 0, B = 100k
Applying boundary conditions
dx dx T = TB at x = 0.5, A = 800k
Integrating Now
d dT
 dx (k dx ) dx = 0 kT = 800k x+100k

Prepared by: Dr. Md. Shahjada Tarafder Page 11


(k
dT
)= A
T = 800x+100
dx
Integrating again
kT = Ax + B

Prob. 4.2
Consider a large plate of thickness L = 2 cm with constant thermal conductivity k = 0.5 W/m/K and uniform
heat generation q = 1000 KW/m3. The faces A and B are at temperatures of 100 0C and 200 0C respectively.
Assume that the dimensions in the y- and z-directions are so large that temperature gradients are significant
in the x-direction only and the area in they-z plane A is 1.00 m2. Calculate the steady state temperature
distribution by dividing the domain into five control volumes. The governing equation for the steady state
𝑑 𝑑𝑇
temperature distribution is given by (𝑘 ) + 𝑞 = 0.
𝑑𝑥 𝑑𝑥

Prepared by: Dr. Md. Shahjada Tarafder Page 12


Solution:
d  dT 
 + q = 0 with TA = 100 C and TB = 200 C
0 0
k
dx  dx 
The domain is divided into five control volumes as shown in Fig. giving x = 0.004 m and a unit area is
considered in the y–z plane.

(a) Mesh Generation

(b) Discretization of governing equations

d dT (1)
(k )+q =0
dx dx
Integrating over a control volume dV
d dT
 dx (k dx ) dV +  q dV = 0
CV CV

The second integral is computed by using Mid-point integration formula and above equation can be written
as
dT dT
(kA )e − (kA ) w + q V = 0
dx dx
ke A k A
(TE − TP ) − w (TP − TW ) + qA  x = 0
x x
The above equation can be re-arranged as
 ke A kw A  kw A ke A
  x +  x − 0  TP =  x TW +  x TE + qA  x
 
Since kw = ke = k , this equation is written in the general form as
aPTP = aW TW + aETE + Su (2)

where

aW aE aP SP Su
kA kA aW + aE − S P 0 qA  x
x x

At node 1:

Prepared by: Dr. Md. Shahjada Tarafder Page 13


dT dT
(kA )e − (kA ) w + q V = 0
dx dx
ke A k A
(TE − TP ) − w (TP − TA ) + qA  x = 0
x x/2
 ke A kw A  ke A kw A
  x +  x / 2  TP = 0  TW +  x TE + qA  x +  x / 2 TA
 
The above equation can be re-arranged as
aPTP = aW TW + aETE + Su (3)

where
aW aE aP SP Su
kA 2 kA 2kA
0 aW + aE − S P − qA  x + T
x x x A

At node 5:
dT dT
(kA )e − (kA ) w + q V = 0
dx dx
ke A k A
(TB − TP ) − w (TP − TW ) + qA  x = 0
x/2 x
 k w A ke A  kw A ke A
  x +  x / 2  TP =  x TW + 0  TE + qA  x +  x / 2 TB
 
The above equation can be re-arranged as
aPTP = aW TW + aETE + Su (4)
aPT5 = 125 T4 + Su
where

aW aE aP SP Su
kA 2kA 2kA
0 aW + aE − S P − qA  x + T
x x x B
Now
K = 0.5 W K/m q = 1000103 W/m3 A = 1 m2 x = 0.004 m

kA 0.5  1
= = 125 and q A  x = 1000  103  1 0.004 = 4000 W
 x 0.004

Prepared by: Dr. Md. Shahjada Tarafder Page 14


The equations at node 1, 2, 3, 4, and 5 can be written into a matrix form as
 375 −125 0 0 0   T1   29000 
 −125 250 −125
 0 0  T2   4000 
 0 −125 250 −125 0  T3  =  4000 
    
 0 0 −125 250 −125 T4   4000 
 0 0 0 −125 375  T5  54000 

The solution of above set of equations is


 T1  150 
T   218 
 2  
T3  =  254 
   
T4   258 
T5   230 

Analytical solution:

T − T q 
T =  B A + ( L − x)  x + TA
 L 2k 

Prepared by: Dr. Md. Shahjada Tarafder Page 15


Prob. 4.3
Consider a cylindrical fin of unit length and with uniform cross-section area A. The base is at a temperature
of 100 0C (TB) and the end is insulated. The fin is exposed to an ambient temperature of 20 0C. One-
𝑑 𝑑𝑇
dimensional heat transfer in this situation is governed by 𝑑𝑥
(𝑘𝐴 𝑑𝑥) − ℎ𝑃(𝑇 − 𝑇∞ ) = 0. Calculate the
𝑇−𝑇∞
temperature distribution along the fin and compare the result with the analytical solution 𝑇𝐵 −𝑇∞
=
𝑐𝑜𝑠ℎ 𝑛(𝐿−𝑥) ℎ𝑃
𝐶𝑜𝑠ℎ 𝑛𝐿
where 𝑛2 = 𝑘𝐴 and L is the length of the fin. Data L = 1.0 m, hP/(KA) = 25/m2 (note that KA
is constant)

Solution:

d  dT 
 kA  − hP(T − T  ) = 0 with TB = 100 C and T = 20 C
0 0

dx  dx 
We use a uniform grid and divide the length into five control volumes so that x = 0.2 m. The grid is
shown in below:

The governing equation can be written as


d  dT  2
  − n (T− T ) = 0 Where n 2 = hP/ kA
dx  dx 
Integration of the above equation over a control volume gives

d  dT 
 dx  dx  dV −  n (T− T ) dV = 0
2

CV CV

Prepared by: Dr. Md. Shahjada Tarafder Page 16


The first integral of the above equation is treated as in before and the second integral due to the source
term in the equation is evaluated by assuming that the integrand is locally constant within each control
volume:

 dT   dT 
 − A  − n (TP − T ) A  x = 0
2
A
 dx e  dx  w
TE − TP TP − TW
− − n 2 (TP − T )  x = 0
x x
This can be re-arranged as

1 1 1 1
  x +  x  TP =  x TW +  x TE + n T  x − n  x TP
2 2

1 1  1 1
  x +  x + n  x  TP =  x TW +  x TE + n T  x
2 2

This can be written in the general form as


aPTP = aW TW + aETE + Su

Where
aW aE aP SP Su
1 1
aW + aE − S P −n2  x n2  x T
x x

Next, we apply the boundary conditions at nodal points 1 and 5.

At node 5:
 dT   dT 
 −  − n (TP − T )  x = 0
2

 dx e  dx  w
 TP − TW 
0 −  x  − n (TP − T )  x = 0
2

 
 1   1 
  x + n  x  TP =   x  TW + 0  TE + n  x T
2 2

This can be re-arranged as

aPTP = aW TW + aETE + Su

Where
aW aE aP SP Su
1
0 aW + aE − S P −n2  x n2  x T
x

At node 1:

Prepared by: Dr. Md. Shahjada Tarafder Page 17


 dT   dT 
 −  − n (TP − T )  x = 0
2

 dx e  dx w
 TE − TP Tp − TB  2
 − − n (TP − T )  x = 0
 x  x / 2 
1 1  1  TB
  x +  x / 2 + n  x  TP = 0  TW +   x  TE + n  x T +  x / 2
2 2

This can be re-arranged as


aPTP = aW TW + aETE + Su

Where
aW aE aP SP Su
1 2 2 TB
0 aW + aE − S P −n2  x − n 2  x T +
x x x

Now

L =1.0 m x = 0.2 m A = 1m2 ℎ𝑃


𝑛2 = = 25
𝑘𝐴

The equations at node 1, 2, 3, 4 and 5 can be written into a matrix form as

 20 −5 0 0 0   T1  1100 
 −5 15 −5 0
 0  T2   100 
 0 −5 15 −5 0  T3  =  100 
    
0 0 −5 15 −5 T4   100 
 0 0 0 −5 10  T5   100 

The solution of above set of equations is

 T1   64.22 
T   36.91
 2  
T3  =  26.50 
   
T4   22.60 
T5   21.30 

Prepared by: Dr. Md. Shahjada Tarafder Page 18


4.4 Finite volume method for two-dimensional diffusion problems

Consider the two-dimensional steady state diffusion equation given by


       
  +   + S = 0
x  x  y  y 
Integrating over a control volume
       
 x   x  dx dy +  y   y dx dy +  S dV = 0
CV CV CV

Noting that Ae = Aw = y and An = As = x. Applying above equation at node P, we obtain


           
 A  −  A  +  A  −  A  + S V = 0
 x e  x  w  y n  y  s

e Ae  A  A A
(E − P ) − w w (P − W ) + n n (N − P ) − s s (P − S ) + Su + SPP = 0
 xPE  xWP  yPN  ySP

This equation can be re-arranged as


e Ae  A  A A
(E − P ) − w w (P − W ) + n n (N − P ) − s s (P − S ) + Su + SPP = 0
 xPE  xWP  yPN  ySP

Prepared by: Dr. Md. Shahjada Tarafder Page 19


This equation can be re-arranged as

  w Aw e Ae  n An  s As   A A  A A
 + + + − S P  P = w w W + e e E + n n N + s s S + Su
  xWP  xPE  yPN  ySP   xWP  xPE  yPN  ySP
This can be written in the general form as
aPP = aW W + aEE + aNN + aSS + Su
aPP =  anb nb + Su
Where
aW aE aN aS aP
 w Aw  e Ae  n An  s As
aW + aE + aN + aS − S P
 xWP  xPE  yPN  ySP

4.4 Finite volume method for three-dimensional diffusion problems


Consider the three-dimensional steady state diffusion equation given by
           
  +   +   + S = 0
x  x  y  y  z  z 
A cell containing node P now has six neighbouring nodes identified as west, east, south, north, bottom
and top (W, E, S, N, B, T). Integration of Equation (4.58) over the control volume gives

                 
 A  −  A  +  A  −  A  +  A  −  A  + S V = 0
 x e  x  w  y n  y  s  z t  z b

Prepared by: Dr. Md. Shahjada Tarafder Page 20


 e Ae  A  A  A
(E − P ) − w w (P − W ) + n n (N − P ) − s s (P − S )
 xPE  xWP  yPN  ySP
t At  A
+ (T − P ) − b b (P − B ) + Su + S PP = 0
 z PT  yBP

The discretized equation for interior nodes can finally be written as:

aPP = aW W + aEE + aN N + aSS + aT T + aBB + Su


aPP =  anb nb + Su

Where
aW aE aN aS aT aB aP
 w Aw  e Ae  n An  s As t At  b Ab
aW + aE + aN + aS + aB + aT − S P
 xWP  xPE  yPN  ySP  z PT  z BP

Prepared by: Dr. Md. Shahjada Tarafder Page 21


The finite Volume Method for Convection-Diffusion Problems
The steady convection–diffusion equation can be derived from the transport equation for a general property
by deleting the transient term

 ( u) =  (grad ) + S (1)

Steady one-dimensional convection and diffusion


The steady convection and diffusion of a property  in a given one-dimensional flow field u is governed
by
d d d
( u  ) = ( )
dx dx dx
The flow must also satisfy the equation of continuity,
d
(  u) = 0
dx

Step 1: Mesh Generation


Consider the one-dimensional control volume and use the notation introduced as shown in Fig. below:

Step 2: Discretization of governing equations

Discretization of momentum equation


d d d
 dx (  u  ) dV =  dx ( dx ) dV
CV CV

Applying above equation at node P


d d
( ) e − ( ) w
(  u  )e − (  u  ) w

CV
x
dAdx = 
CV
dx
x
dx dAdx

d   d 
(  uA  )e − (  uA  )w =  A  −  A 
 dx e  dx  w
 A   A 
(  uA  )e − (  uA  )w =   (E − P ) −   (P − W )
  xPE e   xWP  w

Prepared by: Dr. Md. Shahjada Tarafder Page 22



Let F =  u , D= and Ae = Aw = A
x
Fee − Fww = De (E − P ) − Dw (P − W )

Discretization of equation of continuity


d
 dx (  u) dV = 0
CV

(  u)e − (  u) w

CV
x
dA dx = 0

(  uA )e − (  uA )w = 0
Fe − Fw = 0
In order to solve above equation we need to calculate the transported property  at e and w faces. Schemes
for this purpose are assessed in the following sections.

The central differencing scheme


Linear interpolation scheme is used to compute the cell face values for the convective terms on the left-
hand side of above momentum equation.
 = k0 + k1 ( x − xP )  − P  x
e = P + E
x 2
At x = xP : k0 = P 1
e = (E + P )
E − P 2
At x = xE : k1 =
xE − xP
E − P
 = P + ( x − xP )
xE − xP
For a uniform grid we can write the cell face values of property  as

P + E  + P
e = and w = W
2 2
Substitution of the above expressions into the convection terms of momentum equation yields

Fee − Fww = De (E − P ) − Dw (P − W )


  +    + 
Fe  P E  − Fw  W P  = De (E − P ) − Dw (P − W )
 2   2 
This can be rearranged to give
 Fw   Fe   Fw   Fe 
 Dw + 2  +  De + 2  P =  Dw + 2  W +  De − 2  E
       
 Fw   Fe    Fw   Fe 
 Dw + 2  +  De − 2  + ( Fe − Fw ) P =  Dw + 2  W +  De − 2  E
        

Prepared by: Dr. Md. Shahjada Tarafder Page 23


aP P = aW W + aE E

Where
aW aE ap
 Fw   Fe 
 Dw + 2   De − 2  aW + aE + ( Fe − Fw )
   

Exam. 5.1: Central differencing scheme


𝑑 𝑑 𝑑𝜙
Consider the one-dimensional steady convection and diffusion problem governed by 𝑑𝑥 (𝜌𝑢𝜙) = 𝑑𝑥 (Γ 𝑑𝑥 )
with 𝜙0 = 1 𝑎𝑡 𝑥 = 0 𝑎𝑛𝑑 𝜙𝐿 = 0 𝑎𝑡 𝑥 = 1. Using five equally spaced cells and the central differencing
scheme for convection and diffusion, calculate distribution of as a function of x for
(i) u = 0.1 m/s,  = 1.0 kg/m3 and  = 0.1 kg/m-s.
(ii) u = 2.5 m/s,  = 1.0 kg/m3 and  = 0.1 kg/m-s.
and compare the result with the analytical solution.
 − 0 eux /  − 1
=
L − 0 euL/  − 1

Solution:
d
( u ) =    with  = 1 at x = 0 and  = 0 at x = 1
d d
dx dx  dx 

Node 2, 3, and 4:
Using central differencing scheme, the discretization of governing equation can be expressed

aP P = aW W + aE E

Where
aW aE ap
 Fw   Fe 
 Dw + 2   De − 2  aW + aE + ( Fe − Fw )
   

Prepared by: Dr. Md. Shahjada Tarafder Page 24


The discretization equation and its coefficients apply at internal nodal points 2, 3 and 4, but control volumes
1 and 5 need special treatment since they are adjacent to the domain boundaries.

Node 1:
d
( u ) =   
d d
dx dx  dx 
d d  d 
 dx ( u ) dAdx =  dx   dx dAdx
CV CV  
d d
( uA )e − ( uA )w =  A  −  A 
 dx e  dx  w
A A 
( uA )e − ( uA )w =   (E − P ) −   (P − A )
  x e   x / 2 A
Fe
(P + E ) − FA A = De (E − P ) − DA (P − A )
2

Node 5:
d   d 
( uA )e − ( uA )w =  A  −  A 
 dx e  dx  w
 A   A 
( uA )e − ( uA )w =  (B − P ) −   (P − W )
  x / 2 e   x w
Fw
FB B − (P + W ) = DB (B − P ) − Dw (P − W )
2

Now u = 0.1 m/s, F = u = 0.1, D = /x = 0.1/0.2 = 0.5, A = 1 and B = 0.

Prepared by: Dr. Md. Shahjada Tarafder Page 25


Now the equations at node 1, 2, 3, 4, and 5 can be summarized as

Prepared by: Dr. Md. Shahjada Tarafder Page 26


The upwind differencing scheme
One of the major inadequacies of the central differencing scheme is its inability to identify flow direction.
The value of property  at a west cell face is always influenced by both P and W in central differencing.
In a strongly convective flow from west to east, the above treatment is unsuitable because the west cell face
should receive much stronger influencing from node W than from node P. The governing equation is

d
( u ) =   
d d
dx dx  dx 
The discretization of governing equations is
Fee − Fww = De (E − P ) − Dw (P − W )
(  uA )e − (  uA )w = 0

When the flow is in the positive direction, uw>0, ue >0 (Fw>0, Fe >0), the upwind scheme sets
w = W and e = P
and the discretized equation becomes
FeP − FwW = De (E − P ) − Dw (P − W )
This can be rearranged as
( Dw + De + Fe )P = ( Dw + Fw )W + DeE
( Dw + Fw ) + De + (Fe − Fw )P = (Dw + Fw )W + DeE
When the flow is in the negative direction, uw <0, ue<0 (Fw<0, Fe<0), the scheme takes
w = P and e = E

Now the discretized equation becomes


FeE − FwP = De (E − P ) − Dw (P − W )
This can be rearranged as
 Dw + ( De − Fe ) + ( Fe − Fw )P = DwW + ( De − Fe )E
Identifying the coefficients of W and E as aW and aE, Eq. ( ) and ( ) can be written in the usual general
form

Prepared by: Dr. Md. Shahjada Tarafder Page 27


aP P = aW W + aE E

With
aW aE ap
Fw  0, Fe  0 ( Dw + Fw ) De
aW + aE + ( Fe − Fw )
Fw  0, Fe  0 Dw ( De − Fe )
A form of notation for aW and aE coefficients of the upwind differencing method that covers both flow
directions is given below:
aW aE
Dw + max ( Fw ,0 ) De + max(0, − Fe )

Exam. 5.2: Upwind differencing scheme


𝑑 𝑑 𝑑𝜙
Consider the one-dimensional steady convection and diffusion problem governed by (𝜌𝑢𝜙) = (Γ )
𝑑𝑥 𝑑𝑥 𝑑𝑥
with 𝜙0 = 1 𝑎𝑡 𝑥 = 0 𝑎𝑛𝑑 𝜙𝐿 = 0 𝑎𝑡 𝑥 = 1. Using five equally spaced cells and the central differencing
scheme for convection and diffusion, calculate distribution of as a function of x for u = 0.1 m/s,  = 1.0
kg/m3 and  = 0.1 kg/m-s.

Solution:
d
( u ) =    with  = 1 at x = 0 and  = 0 at x = 1
d d
dx dx  dx 
The steady one-dimensional convection and diffusion problem is governed by

The discretization of above equation can be expressed as


d   d 
( uA )e − ( uA )w =  A  −  A 
 dx e  dx  w
Fee − Fww = De (E − P ) − Dw (P − W )

F = Fe = Fw =  u and D = De = Dw =
x

Prepared by: Dr. Md. Shahjada Tarafder Page 28


Node 1:
d   d 
( uA )e − ( uA ) A =  A  −  A 
 dx e  dx  A
FeP − FAA = De (E − P ) − DA (P − A )

Node 5:
FBB − FW W = DB (B − P ) − Dw (P − W )

FA = FB = F and DA = DB = 2
x

Prepared by: Dr. Md. Shahjada Tarafder Page 29


The hybrid differencing scheme
The central differencing scheme, which is second-order accurate, is employed for small Peclet numbers
(Pe<2) and the upwind scheme, which is first-order accurate but accounts for transportiveness, is employed
for large Peclet numbers (Pe  2).

The hybrid differencing scheme uses piecewise formulae based on the local Peclet number to evaluate the
net flux through each control volume face. The Peclet number is evaluated at the face of the control volume.
For a west face,

Fw ( u)w
Pew = =
D w  w /  xWP
The steady one-dimensional convection and diffusion problem is governed by
d d d
( u  ) = ( )
dx dx dx
The discretized equation for one-dimensional convection and diffusion problem becomes
Fee − Fww = De (E − P ) − Dw (P − W )
Fee + De (P − E ) = Fww + Dw (W − P )

Now the flux through the face w


 D   +  D 
Fww + Dw (W − P ) == Fw w + w (W − P ) = Fw  W P + w (W − P )
 Fw   2 Fw 
And the flux through the face e
 +  D 
Fee + De (P − E ) = Fe  P E + e (P − E ) 
 2 Fe 
The hybrid differencing formula for the net flux per unit area through the west face (w) is as follows:

1 1 
qw = Fw  (W + P ) + (W − P ) 
2 Pew 
for −2  Pew  2
1  2  1 2  
= Fw  1 +  W + 1 −  P 
 2  Pew  2  Pew  
Flux through the area Aw

qw = Fw AwW Upwind differencing for Pew  2

qw = Fw AwP Central differencing for Pew  −2


It can be easily seen that for low Peclet numbers this is equivalent to using central differencing for the
convection and diffusion terms, but when |Pe| > 2 it is equivalent to upwinding for convection and setting
the diffusion to zero.

Prepared by: Dr. Md. Shahjada Tarafder Page 30


The general form of the discretized equation is
aP P = aW W + aE E
After some re-arrangement it is easy to verify that the neighbor co-efficient for the hybrid differencing
scheme for steady one-dimensional diffusion can be written as follows:

aW aE
  F     F  
max  Fw ,  Dw + w  ,0 max − Fe ,  De − e  ,0
  2     2 

Exam. 5.3: Hybrid differencing scheme


𝑑 𝑑 𝑑𝜙
Consider the one-dimensional steady convection and diffusion problem governed by 𝑑𝑥 (𝜌𝑢𝜙) = 𝑑𝑥 (Γ 𝑑𝑥 )
with 𝜙0 = 1 𝑎𝑡 𝑥 = 0 𝑎𝑛𝑑 𝜙𝐿 = 0 𝑎𝑡 𝑥 = 1. Using five equally spaced cells and the central differencing
scheme for convection and diffusion, calculate distribution of  as a function of x for u = 2.5 m/s,  = 1.0
kg/m3 and  = 0.1 kg/m-s.

Solution:
d
( u ) =    with  = 1 at x = 0 and  = 0 at x = 1
d d
dx dx  dx 

The steady one-dimensional convection and diffusion problem is governed by

The discretization of above equation can be expressed as


d   d 
( uA )e − ( uA )w =  A  −  A 
 dx e  dx  w
Fee − Fww = De (E − P ) − Dw (P − W )

F = Fe = Fw =  u and D = De = Dw = = 0.5
x
Peclet number

Prepared by: Dr. Md. Shahjada Tarafder Page 31


F u 1.0  2.5
Pew = Pee = = = =5
D x/ 0.5
Since the cell Peclet number Pe is greater than 2 the hybrid scheme uses the upwind expression for the
convective terms and sets the diffusion to zero.

Node 1:
d   d 
( uA )e − ( uA )w =  A  −  A 
 dx e  dx  A
FeP − FAA = 0 − DA (P − A )

Node 5:
d   d 
( uA )e − ( uA )w =  A  −  A 
 dx  B  dx  w
FBP − FwW = DB (B − P ) − 0

It can be seen that the diffusive flux at the boundary is entered on the right-hand side and the convective
fluxes are given by means of the upwind method. We note that FA = FB = F and DB = 2Γ/δx = 2D so the
discretized equation can be written as
aP P = aW W + aE E + Su
aP = aW + aE + ( Fe − Fw ) − S P

Prepared by: Dr. Md. Shahjada Tarafder Page 32


Quadratic upwind differencing scheme: The QUICK scheme
d d d
( u  ) = ( )
dx dx dx

Fee − Fww = De (E − P ) − Dw (P − W )


The face value of dependent variable  is obtained from a quadratic function passing through two
bracketing nodes (on each side of the face) and a node on the upstream side.

Prepared by: Dr. Md. Shahjada Tarafder Page 33


The value of  at the cell face e reduces to
6 3 1
e = P + E − W
8 8 8
Similarly
6 3 1
w = W + P − WW
8 8 8

Prepared by: Dr. Md. Shahjada Tarafder Page 34


The discretized equation for one-dimensional convection and diffusion problem becomes
6 3 1  6 3 1 
Fe  P + E − W  − Fw  W + P − WW  = De (E − P ) − Dw (P − W )
8 8 8  8 8 8 
This can be re-arranged to give
 3 6   6 1   3  1
 D − F + D + F  = D + F + F  + D − F  − FwWW
8   8   8 
w w e e P w w e W e e E
8 8 8

aP P = aW W + aE E + aWW WW

With
aW aE aWW ap
6 1 3 1
Dw + Fw + Fe De − Fe Fw aW + aE + aWW + ( Fe − Fw )
8 8 8 8

For uw  0 and ue  0 , the flux across through the boundary is given by


6 3 1
w = P + W − E
8 8 8
6 3 1
e = E + P − EE
8 8 8

aW aE aWW ap
3 6 1 1
Dw + Fw De − Fe − Fw Fe aW + aE + aEE + ( Fe − Fw )
8 8 8 8

Exam. 5.4: QUICK interpolation scheme


𝑑 𝑑 𝑑𝜙
Consider the one-dimensional steady convection and diffusion problem governed by 𝑑𝑥 (𝜌𝑢𝜙) = 𝑑𝑥 (Γ 𝑑𝑥 )
with 𝜙0 = 1 𝑎𝑡 𝑥 = 0 𝑎𝑛𝑑 𝜙𝐿 = 0 𝑎𝑡 𝑥 = 1. Using five equally spaced cells and the central differencing
scheme for convection and diffusion, calculate distribution of as a function of x for u = 0.2 m/s,  = 1.0
kg/m3 and  = 0.1 kg/m-s.

Solution:
The steady one-dimensional convection and diffusion problem is governed by

Prepared by: Dr. Md. Shahjada Tarafder Page 35


d d d
(  u  ) = ( )
dx dx dx
with
 = 1 at x = 0
 = 0 at x = 1

The discretization of above equation can be expressed as


d   d 
( uA )e − ( uA )w =  A  −  A 
 dx e  dx  w
Fee − Fww = De (E − P ) − Dw (P − W )
 0.1
F = Fe = Fw =  u = 0.2 and D = De = Dw = = = 0.5
 x 0.2
Linear extrapolation:
 P − 0  A −  0
=
x x / 2
 P − 0 = 2( A − 0 )
0 = 2 A −  P

Quadratic interpolation
( x) = k0 + k1 x + k2 x 2

U at x = xU

 = C at x = xC
 at x = x
 D D


= k1 + 2k2 x
x

Applying the boundary conditions as stated above, we obtain


( x − xU )( x − xC ) ( x − xU )( x − xD )
( x) = U + (D − U ) + (C − U )
( xD − xU )( xD − xC ) ( xC − xU )( xC − xD )
For the case of a uniform grid, the value of  at the cell face f reduces to

Prepared by: Dr. Md. Shahjada Tarafder Page 36


C + D D − 2C + U 6 3 1
f = − = C + D − U
2 8 8 8 8
Lagrange interpolation:
𝑛
𝑥 − 𝑥𝑀
𝐿𝑁 = ∏
𝑥𝑁 − 𝑥𝑀
𝑀=1 𝑀≠𝑁

( x − xC )( x − xD ) ( x − xU )( x − xD ) ( x − xU )( x − xC )
( x) = U + C + D
( xU − xC )( xU − xD ) ( xC − xU )( xC − xD ) ( xD − xU )( xD − xC )

Solution:
The linearly extrapolated value at the mirror node is given by
0 = 2 A − P

The dependent variable e at the east face of control volume 1:


6 3 1
e = P + E − ( 2 A − P )
8 8 8
7 3 2
= P + E −  A
8 8 8

Now the diffusive flux through the west boundary is given by


 DA
 = ( 9P − 8A − E )
x A 3

Node 1:
The discretized equation at node 1 is
d   d 
( uA )e − ( uA ) A =  A  −  A 
 dx e  dx  A
7 3 2  D
Fe  P + E − A  − FAA = De (E − P ) − A ( 9P − 8A − E )
8 8 8  3
7 3 2  D
Fe  1 + 2 − A  − FAA = De (2 − 1 ) − A ( 91 − 8A − 2 )
8 8 8  3

Node 5:
Now the diffusive flux through the west boundary is given by
 DB
 = (8B − 9P + W )
x B 3
The discretized equation at node 1 is
d   d 
( uA )B − ( uA )w =  A  −  A 
 dx  B  dx  w

Prepared by: Dr. Md. Shahjada Tarafder Page 37


6 3 1  D
FBB − Fw  W + P − WW  = B (8B − 9P + W ) − Dw (P − W )
8 8 8  3

Node 2:
6 3 1  7 3 2 
Fe  P + E − W  − Fw  W + P − A  = De (E − P ) − Dw (P − W )
8 8 8  8 8 8 

Node 3-4:

Prepared by: Dr. Md. Shahjada Tarafder Page 38


Prepared by: Dr. Md. Shahjada Tarafder Page 39
Solution Algorithms for Pressure-Velocity Coupling in Steady Flows

Laminar Steady Flow


Let us consider the equations governing two-dimensional steady flow:

   u   u  p
( uu ) + (  vu ) =    +    − + Su
x-momentum equation (1)
x y x  x  y  y  x
   v   v  p
( uv ) + (  vv ) =    +    − + Sv
y-momentum equation (2)
x y x  x  y  y  y
continuity equation  
( u ) + (  v ) = 0 (3)
x y

The solution of Eq. (1)–(3) presents us with two new problems:

• The convective terms of the momentum equations contain non-linear quantities: for example, the

first term of equation (6.1) is the x-derivative of u 2 .

• All three equations are intricately coupled because every velocity component appears in each
momentum equation and in the continuity equation. The most complex issue to resolve is the role
played by the pressure. It appears in both momentum equations, but there is evidently no (transport
or other) equation for the pressure.

If the pressure gradient is known, the process of obtaining discretized equations for velocities from the
momentum equations is exactly the same as that for any other scalar, and the schemes explained before are
applicable.

In general-purpose flow computations we also wish to calculate the pressure field as part of the solution, so
its gradient is not normally known beforehand. If the flow is compressible the continuity equation may be
used as the transport equation for density and, in addition to Eq. 1-3, the energy equation is the transport
equation for temperature.

Both the problems associated with the non-linearities in the equation set and the pressure–velocity linkage
can be resolved by adopting an iterative solution strategy such as the SIMPLE algorithm of Patankar and
Spalding (1972).

The Co-located grid


The finite volume method starts always with the discretization of the flow domain and of the relevant
transport equations. First, we need to decide where to store the velocities.

Prepared by: Dr. Md. Shahjada Tarafder Page 40


If velocities and pressures are both defined at the nodes of an ordinary control volume a highly non-uniform
pressure field can act like a uniform field in the discretized momentum equations. This can be demonstrated
with the simple two-dimensional situation shown in Fig. below,, where a uniform grid is used for simplicity.
Let us assume that we have somehow obtained a highly irregular ‘checker-board’ pressure field with values
as shown in Fig. below

Fig. Co-located grid


The discretization of u and v momentum equation at P can be expressed as
aPuP =  anbunb + y ( pw − pe ) + bu (4)

aP vP =  anbvnb + x ( ps − pn ) + bv (5)

If the pressures are e and w are obtained by linear interpolation the pressure gradient term p / x in the u-
momentum equation is given by
p p − p
= e w
=
( pE + pP ) / 2 − ( pP + pW ) / 2 p − p
= E W
(6)
x x x 2 x
p pn − ps pN − pS (7)
= =
y y 2 y

The pressure at the central node (P) does not appear in Eq. (6) and (7). Substituting the appropriate values
from the ‘checker-board’ pressure field in Fig. 1 into Eq. (4)–(5) we find that all the discretized gradients
are zero at all the nodal points even though the pressure field exhibits spatial oscillations in both directions.
As a result, this pressure field would give the same (zero) momentum source in the discretized equations
as a uniform pressure field. This behaviour is obviously non-physical.

A remedy for this problem is to use a staggered grid for velocity components. The idea is to evaluate scalar
variables, such as pressure, density, temperature etc. at ordinary nodal points but to calculate velocity
components on staggered grids centred around the cell faces.

Prepared by: Dr. Md. Shahjada Tarafder Page 41


A further advantage of the staggered grid arrangement is that it generates velocities at exactly the locations
where they are required for the scalar transport–convection–diffusion – computations. Hence, no
interpolation is needed to calculate velocities at the scalar cell faces.

The Staggered Grid Method


Let us consider a typical staggered mesh arrangement as shown in Fig. below where the main cell and the
staggered cell are distinguished. The pressure is stored at centroid of the main cells. The velocity
components are stored on the faces of the main cells as shown, and are associated with the staggered cells.
The u velocity is stored on the e and w faces and the v velocity is stored on the n and s faces. Scalars such
as enthalpy or species mass fraction are stored at the centroids of the cell P.

Momentum equation : Applied at the faces of the element (e, w, n, s)


Continuity equation : Applied at the centre of the cell (P)

The u- momentum and v-momentum equations may be written at face e and w as


aeue =  anbunb + y ( pP − pE ) + be (8)

an vn =  anb vnb + x ( pP − pN ) + bn (9)

Similarly,
𝑎𝑤 𝑢𝑤 = ∑ 𝑎𝑛𝑏 𝑢𝑛𝑏 + 𝛥𝑦(𝑝𝑊 − 𝑝𝑃 ) + 𝑏𝑤

Prepared by: Dr. Md. Shahjada Tarafder Page 42


𝑎𝑛 𝑣𝑠 = ∑ 𝑎𝑛𝑏 𝑣𝑛𝑏 + 𝛥𝑥(𝑝𝑆 − 𝑝𝑃 ) + 𝑏𝑠

The cell P is used to discretize the continuity equation as before:


 
( u ) + (  v ) = 0
x y
 
 x (  u ) dV +  y (  v ) dV = 0
(  u )e − (  u ) w (  v) n − (  v) s
 x
dA dx + 
y
dA dy = 0

( u )e y − ( u )w y + ( v )n x − ( u )s x = 0 (10)

The SIMPLE Algorithm


To initiate the SIMPLE calculation, a pressure field p* is guessed. Discretized momentum Eqs. (8) and (9)
are solved using the guessed pressure field to yield velocity components u* and v* as follows:

e e 
a u* = a u + y p − p + b
nb nb ( P E ) e
(11)

ae vn* = a 
v
nb nb + x ( p

P − pN )+b
n
(12)

The coefficients are as follows

Scheme aw ae
Central differencing DW + FW / 2 DE − FE / 2
Upwind differencing DW + max ( FW ,0 ) DE + max ( 0, − FE )
Hybrid differencing max  FW , ( DW + FW / 2 ) ,0 max − FE , ( DE − FE / 2 ) ,0

 A 
 A 
DW =   , FW =  u
*
( )W D =   , FN =  v
*
( )
  y N
N
  x W ’
N

Similar expressions may be written for u w* *


and vs . Now we define the correction p as the difference
between correct pressure field p and the guessed pressure field p*, so that
p = p* + p (13)

Similarly, we define velocity corrections u′ and v′ to relate the correct velocities u and v to the guessed
velocities u* and v*:

Prepared by: Dr. Md. Shahjada Tarafder Page 43


u = u* + u (14)
v = v + v
*
(15)

Subtraction of Eq. (11) and (12) from Eq. (8) and (9) respectively gives
ae (ue − ue* ) =  anb (unb − u nb ) + y ( pP − pP ) − ( pE − pE ) 

(16)

an (vn − vn* ) =  anb (vnb − v nb ) + x ( pP − pP ) − ( pN − pN ) 



(17)

Using correction formulae (13)–(15) Eq. (16) and (17) can be rewritten as follows:
aeue =  anbunb
 + y( pP − pE ) (18)

an vn =  anb vnb


 + x( pP − pN ) (19)

At this point an approximation is introduced:  anbunb and  anb vnb


 are dropped to simplify Eq. (18) and
(9) for the velocity corrections. Omission of these terms is the main approximation of the SIMPLE
algorithm. We obtain
u   d ( p − p )
e e P E
(20)

vn  d n ( pP − pN ) (21)

y x
Where d e = and dn =
ae an
Eq. (14) and (15) gives
ue = ue + de ( pP − pE ) (20)

vn = vn + dn ( pP − pN ) (21)

Similarly,

𝑢𝑤 = 𝑢𝑤 ∗
+ 𝑑𝑤 (𝑝𝑊 − 𝑝𝑃′ )
𝑣𝑠 = 𝑣𝑠∗ + 𝑑𝑠 (𝑝𝑆′ − 𝑝𝑃′ )

Now from continuity equation Eq. (10) we obtain


eue y − wuw y + n vn x − s vs x = 0
Substituting Eq. (20) and (21) into above equation we obtain
e ue + de ( pP − pE )  y − w uw + d w ( pW − pP )  y +
n vn + dn ( pP − pN )  x − s vs + d s ( pS − pP )  x = 0
Rearranging
euey + e de ( pP − pE )y −  wuw y −  w d w ( pW − pP )y +
n vnx + n d n ( pP − pN )x −  s vsx −  s d s ( pS − pP )x = 0

Prepared by: Dr. Md. Shahjada Tarafder Page 44


Identifying the co-efficient of p  we obtain

 wdwy + e de y + n dn x + s d s x  pP = ( wd wy ) pW + ( e de y ) pE +


( n dn x ) pN + ( s d s x ) pS + wuw y − euey + s vsx − nvnx
Eq. (10) can be written into a simplified form as
aP pP =  anb pnb
 +b

Where
aW aE aN aS ap b

w d w y e de y  n d n x  s d s x aW + aE + aN + aS wuw y − euey + svsx − nvnx

Prepared by: Dr. Md. Shahjada Tarafder Page 45


The Co-located or Non-Staggered Grid Method
Co-located or non-staggered methods store pressure and velocity at the cell centroid. Thus u, v and p are
stored at the cell centroid P as shown in Fig. below:

The discretization of the u-momentum equation for the cell P follows the principles outlined in previous
chapters and yields the following discrete equation:
aPuP =  anbunb + bPu + ( pw − pe )
Here, a unit area of cross section y = 1 has been assumed. The neighbors nb for this co-located
arrangement include the velocities at the points E and W. The pressure at the faces e and w are not known
since the pressure is stored at the cell centroid.

Fig. Control volume for velocity interpolations

Adopting a linear interpolation, and a uniform mesh, we may write


 p + pP pP + pE 
aPuP =  anbunb + bPu +  W −
 2 2 
 p − pE 
aPuP =  anbunb + bPu +  W 
 2 
Similarly, for uE

Prepared by: Dr. Md. Shahjada Tarafder Page 46


 p − pEE 
aE uE =  anbunb + bEu +  P 
 2 
We see that the u-momentum equation at point P does not involve the pressure at the point P; it only
involves pressures at cells on either side. Thus, the u-momentum equation can support a checker boarded
solution for pressure.

Dividing above two equations by their respective center coefficients aP and aE, we have

uP =
a u + bPu
nb nb
+
1  pW − pE 
aP aP  2 

1  pW − pE 
= uˆP +
aP  2 

Similarly, for uE
 p − pEE 
aE uE =  anbunb + bEu +  P 
 2 

=
a u + bEu
nb nb
+
1  pP − pEE 
uE  
aE aE  2 
1  pP − pEE 
= uˆE +  
aE  2 
Where

uˆP =
a u + bPu
nb nb

aP

uˆE =
a u + bEu
nb nb

aE
Co-located formulations prevent checker boarding by devising interpolation procedures which express the
face velocities ue and uw in terms of adjacent pressure values rather than alternate pressure values.
Furthermore, the face velocity ue is not defined purely as a linear interpolation of the two adjacent cell
values; an additional term, called the added dissipation prevents velocity checker-boarding. The discrete
one-dimensional momentum equations for cells P and E yield
1  pW − pE 
uP = uˆP +
aP  2 

 p − pE 
= uˆP + d P  W 
 2 
Similarly, for uE

Prepared by: Dr. Md. Shahjada Tarafder Page 47


1  pP − pEE 
uE = uˆ E +  
aE  2 
 p − pEE 
= uˆ E + d P  P 
 2 
Writing the continuity equation for cell P we have
eue − wuw = 0
Unit cross-sectional area is assumed as before. If we interpolate ue linearly we get
uP + uE uˆP + uˆE  p − pE   pP − pEE 
ue = = + dP  W  + dE  
2 2  2   4 
A similar expression may be written for uw. This type of interpolation is sometimes referred to as momentum
interpolation in the literature. It is also sometimes referred to as an added dissipation scheme.

Prob. 6.1
Consider the steady, one-dimensional frictionless and incompressible fluid flow through a duct with
constant cross-sectional area. Referring to the staggered grid as shown in Fig. below calculate the pressure
p at nodes A, B , C and the velocities u at the backward staggered nodes at 2, 3 and 4. Density  = 1.0 kg/m3
and multiplier d = 1.0, duct area A = constant, u1 = 10 m/s and pressure pD = 0 pa. Assume guess values
𝑢2∗ = 8.0 𝑚/𝑠, 𝑢3∗ = 11.0 𝑚/𝑠 and 𝑢4∗ = 7.0 𝑚/𝑠

Solution: The equations for one-dimensional flow is governed by

 p d2y
(  uu ) = − + Su =2
x x dx 2

( u ) = 0 dy
= 2x + A
x dx
with u1 = 10 m / s at inlet y = x 2 + Ax + B
and pD = 0 at outlet y = 0 at x = 0 B = 0

The discretization of u-momentum and continuity equations at node P of original cell can be expressed as
aPuP =  anbunb + y ( pw − pe ) + bu

Prepared by: Dr. Md. Shahjada Tarafder Page 48


( u )e y − ( u )w y = 0
If u-momentum equation is applied at w and e faces of original cell we obtain
awuw =  anbunb + Aw ( PW − PP ) + bw
aeue =  anbunb + Ae ( PP − PE ) + be

Moreover, from SIMPLE algorithm


ue = de ( PP − PE ) and uw = d w ( PW − PP )
ue = ue* + ue = ue* + de ( PP − PE ) and uw = uw* + uw = uw* + d w ( PW − PP )
Ae Aw
de = and d w =
ae aw
aP pP = aW pW + aE pE + b

where
aW aE aP b

(  dA)w (  dA)e aW + aE ( u A) − ( u A)

w

e

Given data:
Density  = 1 kg/m3, Duct area A = constant, d = 1.0
Boundary conditions: u1 = 10 m/s and PD = 0 pa
Initial guess velocity: u2*= 8 m/s, u3*= 11 m/s, u4*= 7 m/s

Pressure correction at node B:


aP pP = aW pW + aE pE + b
aW = (  dA)w = (  dA)2 = 11 A = 1.0 A
aE = (  dA)e = (  dA)3 = 11 A = 1.0 A
aP = aW + aE = 2.0 A
(
b = u A ) − ( u A) = ( u A) − ( u A)
w

e

2

3
= (1.0  8.0  A) − (1.0 11.0  A) = −3.0 A

The discretized pressure correction equation at node B is


2.0 A pB = 1.0 A pA + 1.0 A pC − 3.0 A
2.0 pB = 1.0 pA + 1.0 pC − 3.0

Prepared by: Dr. Md. Shahjada Tarafder Page 49


Pressure correction at node C:
aP pP = aW pW + aE pE + b
aW = (  dA)w = (  dA)3 = 11 A = 1.0 A
aE = (  dA)e = (  dA)4 = 11 A = 1.0 A
aP = aW + aE = 2.0 A
(
b = u A ) − ( u A) = ( u A) − ( u A)
w

e

3

4
= (1.0 11.0  A) − (1.0  7.0  A) = 4.0 A
The discretized pressure correction equation at node C is
2.0 A pC = 1.0 A pB + 1.0 A pD + 4.0 A
2.0 pC = 1.0 pB + 1.0 pD + 4.0

Pressure correction at node A:


( u )e y − ( u )w y = 0
e ue + de ( pP − pE )  y − w uw + d w ( pW − pP )  y = 0

(
(  dA)w + (  dA)e  pP = (  dA)w pW + (  dA )e pE +  u * A ) − ( u A)
w
*
e

We cut the link to the west boundary side by setting the relevant coefficient, aW to zero and introduce the
appropriate flux, in this case the mass flow rate into the control volume through the boundary side, as a
source term b.
aW = (  dA)w = 0.0
aE = (  dA)e = (  dA)2 = 11 A = 1.0 A
aP = aW + aE = 1.0 A
(
b = u* A ) − ( u A) + ( uA)
w
*
e bundary

= 0 − (  u A ) + (  uA ) = − (1.0  8.0  A ) + (1.0  10.0  A ) = 2.0 A


*
1
2

Note that the given velocity at node 1 has been used in the calculation of the additional source contribution
to b. Using above we obtain the discretized pressure correction equation at node A
1.0 A pA = 0 + 1.0 A pB + 2.0 A
pA = pB + 2.0

Pressure correction at node D:


The boundary condition at node D is fixed pressure pD = 0. Since we know the pressure we do not need a
pressure correction: hence at node D we have

Prepared by: Dr. Md. Shahjada Tarafder Page 50


pD = p* + pD = 0
pD = 0

The pressure correction equations can be written in matrix form as:


 1 −1 0   pA   2 
 −1 2 −1  p  = −3
  B  
 0 −1 2   pC   4 

The matrix solution is given by


PA = 4.0, PB = 2.0, PC = 3.0
We obtain the corrected velocities by the following equation
ue = ue + de ( pP − pE )

Velocity at node 2: u2 = u2 + d2 ( pA − pB ) = 8.0 + 1.0   4.0 − 2.0 = 10.0 m/s

Velocity at node 3: u3 = u3 + d3 ( pB − pC ) = 11.0 + 1.0   2.0 − 3.0 = 10.0 m/s

Velocity at node 4: u4 = u4 + d4 ( pC − pD ) = 7.0 + 1.0  3.0 − 0 = 10.0 m/s

Prob. 6.2
Consider the steady, one-dimensional flow of a frictionless and constant density fluid through a two-
dimensional nozzle as shown in Fig. (a). Calculate the pressures at the nodes B, C and D and velocities at
nodes at 1, 2, 3 and 4 using SIMPLE algorithm of forward staggered grid arrangement given in Fig. (b).
The stagnation point is given in the inlet and the static pressure is specified at the exit.

Given data:
The density of the fluid  = 1 kg/m3
Nozzle length L = 2.0 m and grid spacing x = L / 4 = 0.5 m
Cross-sectional area at the inlet AA = 0.5 m2 and at the exit AE = 0.1m2
Boundary conditions: At the inlet, the flow entering the nozzle is drawn from a large plenum chamber
and the fluid has zero momentum and the stagnation pressure at inlet p0 = 10 Pa. The static pressure
at exit is pE = 0 Pa.
Initial velocity field: To generate the initial velocity fields guess a mass flow rate m = 1.0 kg / s and
u = m /  A m/s.

Prepared by: Dr. Md. Shahjada Tarafder Page 51


Initial pressure field: To generate a starting field of guessed pressures assume a linear pressure
variation between nodes A and E. The sectional areas and pressures at node 1, 2, 3 and at B, C and D
can be calculated by
x 0.25
A1 = A0 − ( A0 − AL ) = 0.5 − (0.5 − 0.1) = 0.45
L 2
x 0.5
AB = A0 − ( A0 − AL ) = 0.5 − (0.5 − 0.1) = 0.4
L 2
x 0.5
pB = p0 − (p 0 − pL ) = 10.0 − (10.0 − 0.0) = 7.5
L 2
Thus P0 = PA = 10.0Pa , PB = 7.5Pa , PC = 5.0 Pa , PD = 2.5Pa and PE = 0.0 Pa
Analytical Solutions for ideal fluid flow: The exact solution to this steady, one-dimensional,
incompressible, frictionless flow problem can be obtained using Bernoulli’s equation:
1 1
p0 = pN +  u N2 = pN +  m 2 / (  AN2 )
2 2
From the problem data we have p0 = 10 Pa,  = 1 kg/m3 and N = E, so AN = AE = 0.1 m2, which yields
𝑚̇ = (𝜌𝐴𝑢)𝐸 = 0.44721kg/s. The nodal pressures and velocities are given in the table below.

Prepared by: Dr. Md. Shahjada Tarafder Page 52


Boundary Value Problem
The governing equations for steady, one-dimensional, incompressible, frictionless equations through the
planar nozzle are as follows:

du dp
 uA = −A
dx dx

d
(  uA) = 0
dx

with stagnation pressure p = 10 Pa at inlet and p = 0 at outlet

 = 1 kg / m3 , Ainlet = 0.5m 2 Aoutlet = 0.1 m2


Stagnation pressure pinlet = 10 pa and poutlet = 0

Discretized momentum equation


The discretized forms of momentum and continuity equations are
p
(  uA)e ue − (  uA) w uw = V
x
where p = pw − pe

SIMPLE Algorithm:
In standard notation the discretized momentum equation for this one-dimensional problem can be written
as
aPuP = aW uW + aEuE + Su
If we use the upwind differencing scheme the coefficients may be obtained as

Prepared by: Dr. Md. Shahjada Tarafder Page 53


aW = Dw + max( Fw ,0)
aE = De + max(0, − Fe )
aW = aW + aE + (Fe − Fw )
Fw and Fe are the mass flow rate at face w and e and can be calculated using average velocities. The
source term Su contains the pressure gradient integrated over the control volume:
p p 1
Su = V = V = p ( Aw + Ae )
x x 2

In summary the coefficients of the discretized u-equations are given by


Fw =  uw Aw and Fe =  ue Ae
aW = Fw
aE = 0
aP = aW + aE + Fe − Fw
1
Su = p ( Aw + Ae ) = pAP
2
The parameter d required in the pressure correction equations is calculated at this stage from
Aav (A w + Ae )
d= =
aP 2 aP
Pressure correction equation
The discretized form of the continuity equation in this one-dimensional geometry is
( uA)e − ( uA) w = 0
The corresponding pressure correction equation is
aP pP = aW pW + aE pE + b
where aW = (  dA)w , aE = (  dA)e and b = Fw − Fe
In the SIMPLE algorithm the pressure corrections p are used to compute the velocity corrections u and
the corrected pressure and velocity fields using
u = d ( pw − pe )
p = p  + p
u = u + u

Solution:
Mass flow rate at inlet, 𝑚̇ = 𝜌𝐴𝑢 = 1.0 𝑘𝑔/𝑠 and
the initial guess velocities at node 1, 2, 3, and 4 are
u1 = m / (  A1 ) = 1.0 / (1 0.45) = 2.22222 m / s

Prepared by: Dr. Md. Shahjada Tarafder Page 54


u2 = m / (  A2 ) = 1.0 / (1 0.35) = 2.85714 m / s
u3 = m / (  A3 ) = 1.0 / (1 0.25) = 4.00000 m / s
u4 = m / (  A4 ) = 1.0 / (1 0.15) = 6.66666 m / s

Velocity at node 2:
aPuP = aW uW + aE uE + Su
A W = Fw = ( uA) w = 1 [(u1 + u 2 ) / 2]  0.4
= 1 [(2.2222 + 2.8571) / 2]  0.4 = 1.01587

A E = Fe = ( uA)e = 1 [(u 2 + u 3 ) / 2]  0.3


= 1 [(2.8571 + 4.0) / 2]  0.3 = 1.02857

Upwind differencing scheme


aW aE ap
Fw  0, Fe  0 ( Dw + Fw ) De
aW + aE + ( Fe − Fw )
Fw  0, Fe  0 Dw ( De − Fe )
Now

aW = Fw
aE = 0
aP = aW + aE + Fe − Fw = 1.01587 + 0 + (1.02857 − 1.01587)
= 1.02857
Su = p  A2 = ( pB − pC ) A2 = (7.5 − 5.0)  0.35 = 0.875
The discretized momentum equation at node 2 is
1.02857u2 = 1.01587u1 + 0.875
We also calculate the parameter d at node 2 for later use in the pressure correction equation
d = A2 / aP = 0.35 /1.02857 = 0.34027

Velocity at node 3:
aPuP = aW uW + aE uE + Su
The discretized momentum equation at node 3 is
1.06666u3 = 1.02857u2 + 0.625 and

Prepared by: Dr. Md. Shahjada Tarafder Page 55


d3 = A3 / aP = 0.25 /1.06666 = 0.23437
Next, we come to momentum control volumes 1 and 4, which need special treatment because they both
contain a boundary face.

Velocity at node 1:
aPuP = aW uW + aE uE + Su
The stagnation pressure p0 = 10 pa is given in a plenum chamber upstream from the inlet where the fluid

is at rest. Denote the velocity at A by uA and use Bernoulli’s equation to express the static pressure at A,
which is needed in the source term Su, in terms of p0 and uA:
1
p A = p0 − (  u A2 )
2
From the equation of continuity
u A = u1 A1 / AA
Combining above two equations
2
1 A 
p A = p0 −  u12  1 
2  AA 
The discretized u-momentum equation for control volume 1 using upwind scheme can be expressed as
Feu1 − Fwu A = ( p A − pB ) A1
Fw =  u A AA =  u1 A1
Substituting
 1 
Feu1 − Fw (u1 A1 / AA ) =  p0 − u12 ( A1 / AA )2 − pB  A1
 2 
 1 
 Fe − Fw ( A1 / AA ) + Fw ( A1 / AA )2  u1 =  p0 − pB  A1
2 
1
AP = Fe − Fw ( A1 / AA ) + Fw ( A1 / AA ) 2
2
The third term is an extra contribution arising from our choice to specify the stagnation pressure at inlet. In
this calculation we have chosen to place the negative contribution to coefficient a1 on the right-hand side.
Hence
1
[𝐹𝑒 + 𝐹𝑤 (𝐴1 /𝐴𝐴 )2 ] 𝑢1 = [𝑝0 − 𝑝𝐵 ]𝐴1 + 𝐹𝑤 (𝐴1 /𝐴𝐴 )𝑢1𝑜𝑙𝑑
2
This is termed the deferred correction approach and can be effective in stabilizing the iterative process if
the initial velocity field is based on a very poor guess.

Now we calculate

Prepared by: Dr. Md. Shahjada Tarafder Page 56


u A = u1 A1 / AA = 2.22222  0.45 / 0.5 = 2.0
Fw = u A AA = u1 A1 = 1.0  2.0  0.5 = 1.0
The exit mass flux Fe is computed in the same way as for the internal nodes:
Fe = ( uA)e = 1.0  (u1 + u2 ) / 2  0.4 = 1.01587
aW = 0
aE = 0
1
aP = Fe − Fw + ( A1 / AA ) 2 = 1.01587 + 1.0  0.5  (0.45 / 0.5) 2 = 1.42087
2
In the source term we apply p0 = 10 pa and the initial velocity u1old = 2.22222 m / s
1
Su = ( p0 − pB ) A1 + + Fw ( A1 / AA ) 2 u1old
2
= (1.0 − 7.5)  0.45 + 1.0  (0.45 / 0.5)  2.22222 = 3.125

The discretized pressure correction equation at node 1 is


1.42087u1 = 3.125
The parameter d at node 1 is
d1 = A1 / aP = 0.45 /1.4209 = 0.31670

Velocity at node 4:
aPuP = aW uW + aE uE + Su
Fw = ( uA)w = 1.0  (u3 + u4 ) / 2  0.2 = 1.06666
At the east boundary of momentum control volume 4 we have a fixed pressure, but we do not have two
velocities that straddle the east boundary. To compute the mass flux across this boundary we impose
Continuity:
Fe = ( uA)4
At the first iteration we can use the assumed mass flow rate, so we set Fe=1.0 kg/s. Thus,
aW = Fw = 1.06666
aE = 0
aP = aW + aE + Fe − Fw = 1.06666 + 0 + (1.0 − 1.06666) = 1.0
Su = p  Aav = ( pD − pB ) A4 = (2.5 − 0.0)  0.15 = 0.375

The discretized pressure correction equation at node 4 is

Prepared by: Dr. Md. Shahjada Tarafder Page 57


1.0 u4 = 1.0666 u3 + 0.375
The parameter d at node 4 is
d 4 = A4 / aP = 0.15 /1.0 = 0.15

To summarize, the u-momentum equations using upwind differencing are as follows:


1.42087u1 = 3.125
1.02857u2 = 1.01587u1 + 0.875
1.06666u3 = 1.02857u2 + 0.625
1.0 u4 = 1.0666 u3 + 0.375

Solutions of momentum equations:


u1 = 2.19935 u2 = 3.02289 u3 = 3.50087 u4 = 4.10926

The d values are as follows


d1 = 0.31670 d2 = 0.34027 d3 = 0.23437 d 4 = 1.50

Pressure correction equation


Pressure at node B:
aP pP = aW pW + aE pE + b
aW = (  dA)1 = 1.0  0.3167  0.45 = 0.14251
aE = (  dA)2 = 1.0  0.34027  0.35 = 0.11909
Fw = (  u  A)1 = 1.0  2.199352  0.45 = 0.98971
Fe = (  u  A)2 = 1.0  2.022894  0.35 = 1.05801
aP = aW + aE = 0.14251 + 0.11909 = 0.26161
b = Fw − Fe = 0.98971 −1.05801 = −0.06830

The pressure correction equation at node B is


0.26161 pB = 0.14251 pA + 0.11909 pC − 0.06830

Pressure at node C and D:


0.17769 pC = 0.11909 pB + 0.058593 pD + 0.18279

Prepared by: Dr. Md. Shahjada Tarafder Page 58


0.081093 pD = 0.058593 pC + 0.02249 pE + 0.25882

Pressure at node A and E:


Nodes are A and E are boundary nodes so they need special treatment. The pressure corrections are set to
zero for both nodes:
PA = 0
PE = 0

Substitution of p′A = 0.0 and p′E = 0.0 into the pressure correction equations for internal nodes B, C and D
yields the following system of equations:
0.26161 pB = 0.11909 pC − 0.06830
0.17769 pC = 0.11909 pB + 0.058593 pD + 0.18279
0.081093 pD = 0.058593 pC + 0.25882

Solutions of pressure correction equations:

pA = 0.0 pB = 1.63935 pC = 4.17461 pD = 6.20805 pE = 0.0

Corrected nodal pressures are now calculated using these pressure corrections:
pB = pC + pB = 7.5 + 1.63935 = 9.13935
pC = pC + pC = 5.0 + 4.17461 = 9.17461
pD = pD + pD = 2.5 + 6.20805 = 8.70805 Corrected velocities at the end of the first iteration are
u1 = u1 + d1 ( pA − pB ) = 2.19935 + 0.31670  0.0 − 1.63935 = 1.68015
u2 = u2 + d2 ( pB − pC ) = 3.02289 + 0.34027  1.6395 − 4.17461 = 2.16020
u3 = u3 + d3 ( pC − pD ) = 3.5087 + 0.23437  4.17461 − 6.20805 = 3.02428
u4 = u4 + d4 ( pD − pE ) = 4.10926 + 0.15  6.20805 − 0.0 = 5.04047

We can also calculate the corrected nodal pressure at A using Eq. ( ):


2
1 A  1
p A = p0 −  u12  1  = 10 − 1.0  (1.68015  0.45 / 0.5)2 = 8.85671
2  AA  2

First, we check whether the velocity field satisfies continuity. The mass flow rates uA calculated at u-
nodes are

Prepared by: Dr. Md. Shahjada Tarafder Page 59


Continuity check
Node 1 2 3 4
 uA 0.75607 0.75607 0.75607 0.75607

The exact mass flow rate from Bernoulli’s equation is 0.44721 kg/s, so the error in the computed mass flow
rate is +69%. This is not a problem, because we would not expect the solution after one iteration to be
accurate.

Prepared by: Dr. Md. Shahjada Tarafder Page 60


Solution of Discretized Equations
Ex. 7.2
Consider a two-dimensional plate of thickness 1 cm as shown in Fig. below. The thermal conductivity of
the plate material is k =1000 W/m-K. The west boundary receives a steady heat flux of 500 kW/m2 and the
south and east boundaries are insulated. If the north boundary is maintained at a temperature of 100°C, use
a uniform grid with x = y = 0.1 m, find the discretized equation for nodes 1, 2, 3 and 4.

The problem of steady state heat flow is


governed by
  T    T 
k + k =0
x  x  y  y 
with the boundary conditions
q = 500 KW/m2 at west boundary
q = 0 KW/m2 at east boundary
T = 1000C at north boundary
q = 0 at south boundary

Solution:

The two-dimensional steady state heat transfer in the plate is governed by


  T    T 
k + k =0
x  x  y  y 
 T   T   T   T 
 kA  −  kA  +  kA  −  kA  =0
 x e  x w  y n  y s
This can be written in discretized form as
aPTP = aW TW + aETE + aN TN + aSTS

where
k k k k
aW = Aw aE = Ae aS = As aN = An aP = aW + aE + aS + aN
x x y y

The values of the neighboring co-efficient are


1000
aW = aE = aS = aN =  (0.1 0.01) = 10
0.1

All nodes except 6 and 7 are adjacent to boundaries. At a boundary node the discretized equation takes
the form

Prepared by: Dr. Md. Shahjada Tarafder Page 61


aPTP = aW TW + aETE + aN TN + aSTS + Su
aP = aW + aE + aS + aN − S P

The boundary conditions are incorporated into the discretized equations by setting the relevant coefficient
to zero and by the inclusion of source terms through Su and Sp.

At node 6:
40T6 = 10T2 + 10T5 + 10T7 + 10T10

At node 7:
40T7 = 10T3 + 10T6 + 10T8 + 10T11

At node 1:
 T   T 
 kA  + qw Aw +  k  + qs As = 0
 x e  y n
 KA   KA 
  (TE − TP ) + bw +   (TN − TP ) + bs = 0
  x e   x n
 KA   KA    KA   KA 
  +   TP =   TE +   TN + bw + bs
  x  e   x  n    x e   x n
( aE + aN ) TP = 0  TW + aETE + aN TN + 0  TS + bw + bs

aW = 0
bW = qw  Aw = 500 103  (0.1 0.01) = 500
South is an insulated boundary; no flux enters the control volume through the south boundary:
aS = 0
bS = 0

Total source
Su = bW + bS = 500
SP = 0

The discretized equation at node 1 is


20T1 = 10T2 + 10T5 + 500

Prepared by: Dr. Md. Shahjada Tarafder Page 62


At node 4:
 T   T   T 
 kA  + qw Aw +  k  −k  =0
 x e  y n  y  s
 KA   KA   KA 
  (TE − TP ) + bw +   (Tn − TP ) −   (TP − TS ) = 0
  x e   y / 2 n   y s

West is a constant flux boundary


aW = 0
bW = qw  Aw = 500 103  (0.1 0.01) = 500
North is a constant temperature boundary
aN = 0
2k
bN = An 100 = 2000
y
2k
S PN = − An = −20
y

Total source
Su = bW + bN = 500 + 2000 = 2500
SP = −20
Now we have
aP = aS + aE − S P = 10 + 10 + 20 = 40
Su = 2500

The discretized equation at node 4 is


40T4 = 10T3 + 10T8 + 2500

The coefficients and the source term of the discretization equation for all points are summarized in Table
below:

Prepared by: Dr. Md. Shahjada Tarafder Page 63


Prepared by: Dr. Md. Shahjada Tarafder Page 64
The Finite Volume Method for Unsteady Flows
The conservation law for the transport of a scalar in an unsteady flow has the general form
 (  )
+ div (  u ) = div (grad ) + S
t

One-dimensional unsteady heat conduction: One dimensional unsteady heat conduction problem is
governed by the equation

T   T 
c = k +S
t x  x 
Analyticals solution from Separation of variable method
T = T ( x, t ) = ax + bt + c

Integrating over a control volume and a time interval from t to t + t


t +t
T t +t
  T  t +t

  c t
dVdt =    k  dVdt +   S dVdt
t CV t CV x  x  t CV

Applying above equation at node P


 T   T 
k  −k 
t +t
TP − T 0 t +t
 x e  x  w t +t

   c P
dV dt =   dAdx dt +  S V dt
t CV t t CV x t

 T   T 
k  −k 
t +t
TP − TP0 t +t
 x e  x  w t +t

   c dV dt =   dAdx dt +  S V dt
t CV t t CV x t
t +t 
T −T  T   T  
0
 c P P V t =   kA  −  kA   dt + S V t
t t  x e  x  w 
t +t k A 
 c (TP − TP0 ) V =   e (TE − TP ) − w (TP − TW )  dt + S V t
k A
t   xPE  xWP 

In order to evaluate the integration, we need to assume about the variation of TP, TE and TW. We may
generalize the approach by means of weighting parameter  between 0 and 1.

Prepared by: Dr. Md. Shahjada Tarafder Page 65


TP =  TP + (1 −  )TP0 Interpolated values
=T P
0
if  = 0 Explicit method

=
1
2
(
TP + TP0 if  =
1
2
) Crank − Nicolson method

= TP if  = 1 Im plicit method
Now
t +t t +t
I P =  TP dt =   TP + (1 −  )TP0  dt
t t

 0 1/2 1
IP TP0 t 1
(
TP + TP0 t ) TP t
2
Using above formula and dividing by A t throughout we have
TP − TP0  k k 
c x =   e (TE − TP ) − w (TP − TW )  +
t   xPE  xWP 
 k k 
+ (1 −  )  e (TE0 − TP0 ) − w (TP0 − TW0 )  + S x
  xPE  xWP 
 x  ke kw   kw k
  c +   +   TP =  TW + (1 −  ) TW0  + e  TE + (1 −  ) TE0 
 t   xPE  xWP    xWP  xPE
 x k k 
+   c − (1 −  ) e − (1 −  ) w  TP0 + S x
 t  xPE  xWP 
aP TP = aW  TW + (1 −  )TW0  + aE  TE + (1 −  )TE0 
+ aP0 − (1 −  )aW − (1 −  )aE  TP0 + b
where
aW aE aP b
kw ke x
c +  ( aW + aE ) S x
 xWP  xPE t

Case 1:  = 0 for Explicit scheme


aP TP = aW TW0 + aE TE0 + aP0 − (aW + aE − SP  TP0 + Su

Case 2:  = 1/2 for Crank-Nicolson scheme


 TW + TW0   TE + TE0   0 (aE + aW )  0
aP TP = aW   + aE   +  aP − (aW −  TP + Su
 2   2   2 
Case 3:  = 1 for fully implicit scheme
aP TP = aW TW + aE TE + aP0 TP0 + Su

Prepared by: Dr. Md. Shahjada Tarafder Page 66


One-dimensional unsteady heat conduction

T   T 
c = k +S
t x  x 

Integrating over a control volume and a time interval from t to t + t


t +t
T t +t
  T  t +t

  c t
dVdt =    k  dVdt +   S dVdt
t CV t CV x  x  t CV

 T   T 
k  −k 
t +t
TP − T 0
 x e  x  w
t +t t +t

   c t dV dt =   dAdx dt +  S V dt
P

t CV t CV x t

t +t 
TP − TP0  T   T  
c V t =   kA  −  kA   dt + S V t
t t  x e  x  w 
t +t k A 
 c (TP − TP0 ) V =   e (TE − TP ) − w (TP − TW )  dt + S V t
k A
t   xPE  xWP 
In order to evaluate the integration an assumption is required for the variation of T P, TE and TW inside the
integral. This approach can be generalized by means of weighting parameter  between 0 and 1.

T =  TP + (1 −  )TP0
= TP0 if  = 0 Explicit method

TE =  TE + (1 −  )TE0
= TE0 if  = 0

TW =  TW + (1 −  )TW0
= TW0 if  = 0

Explicit scheme
kA k A 
 c(TP − TP0 )V =  e (TE0 − TP0 ) − w (TP0 − TW0 )  t + S A x t
  xPE  xWP 

Prepared by: Dr. Md. Shahjada Tarafder Page 67


Substituting V = A x and then dividing by A t throughout above equation
x k k
c (TP − TP0 ) = e (TE0 − TP0 ) − w (TP0 − TW0 ) + S x
t  xPE  xWP

aP (TP − TP0 ) = aE (TE0 − TP0 ) − aW (TP0 − TW0 ) + Su + SPTP

aPTP = aW TW0 + aE TE0 +  aP − (aW + aE − SP ) TP0 + Su

Fully Implicit Scheme


In order to evaluate the integration an assumption is required for the variation of TP, TE and TW inside the
integral. This approach can be generalized by means of weighting parameter  between 0 and 1.
TP (t ) =  TP + (1 −  )TP0
= TP if  = 1

TE =  TE + (1 −  )TE0
= TE if  = 1

TW =  TW + (1 −  )TW0
= TW if  = 1

aP TP = aW TW + aE TE + aP0 TP0 + Su

Cranck-Nicolson Scheme

TP =  TP + (1 −  )TP0

=
1
2
(TP + TP0 ) if  =
1
2

TE =  TE + (1 −  )TE0

=
1
2
(TE + TE0 ) if  =
1
2

TW =  TW + (1 −  )TW0

=
1
2
(TW + TW0 ) if  =
1
2
 T + T0   TE + TE0   0 (aE + aW )  0
aP TP = aW  W W +
 Ea  +  aP − (aW −  TP + Su
 2   2   2 

Prepared by: Dr. Md. Shahjada Tarafder Page 68


Example 8.1
The problem for one-dimensional heat conduction equation for a thin plate is governed by

T   T  Analytical solution by Separation of Variables


c = k 
t x  x  Techniques:

with the initial conditions T = T ( x, t )


T = 200 at t = 0 = T ( x)  T (t )
T T ( x)
and the boundary conditions =  T (t )
x x
T T T (t)
= 0 at x = 0, t  0
x = T ( x) 
T = 0 at x = L, t  0
t t

The thin plate is initially at uniform temperature of 2000C and at a certain time t = 0, the temperature of the
east side of the plate is suddenly reduced to 00C. The other surface is insulated. Calculate the transient
(unsteady) temperature distribution of the slab using Explicit or Fully Implicit Scheme of Finite Volume
Method with a time step size t = 40s. Given: plate thickness L = 3 cm, thermal conductivity k = 10 W/m-K
and c = 10  10-6 J/m3/K. To generate the grid divide the domain width L into five equal control volumes
with x = 1 cm.

Numerical Solution by Explicit Scheme:


The one-dimensional equation is discretized as
aPTP = aW TW0 + aE TE0 +  aP − (aW + aE − SP ) TP0 + Su
where
aW aE aP b
kw ke x
c S x
 xWP  xPE t

The numerical solution with the explicit method is generated by dividing the domain width L into five
equal control volumes with x =0.004 m. The resulting one-dimensional grid is shown in Fig. below:

Prepared by: Dr. Md. Shahjada Tarafder Page 69


T = 200 at t =0
T = T = T = T40 = T50 = 200
1
0
2
0
3
0

T
= 0 at x = 0, t  0
x
T = 0 at x = L, t  0

At node 1:
T   T 
c = k 
t x  x 
t +t
T t +t
  T 
   c dVdt =   k  dVdt
t CV t t CV x  x 

Applying equation at node P

(𝑇𝑃 − 𝑇𝑃0 ) 𝑡+𝛥𝑡


𝜕𝑇 𝜕𝑇
𝜌𝑐 ∆𝑡 𝛥𝑉 = ∫ [(𝑘𝐴 )𝑒 − (𝑘𝐴 )𝑤 ] 𝑑𝑡
𝛥𝑡 𝑡 𝜕𝑥 𝜕𝑥

x  k  
c ( )
TP − TP0 =   (TE − TP ) − 0 
0 0

t   x  e 
 x   k  0  x  k   0
 c  TP =   TE +   c −   TP
 t    x e  t   x e 
aPTP = aE TE0 +  aP − aE ) TP0

At node 2-4:
TP − TP0 t +t
 T T 
c t V =  (kA )e − (kA ) w  dt
t t  x x 
x  k  0   k  0 
c
t
( )
TP − TP0 =   (TE − TP )  − 
0
 (TP − TW ) 
0

 x e   x  w 
 x   k  0  k  0  x  k   k   0
 c  TP =   TW +   TE +   c −  −   TP
 t   x  w  x e  t  x  w  x e 
aPTP = aW TW0 + aE TE0 +  aP − (aW + aE ) TP0

At node 5:

Prepared by: Dr. Md. Shahjada Tarafder Page 70


TP − TP0 t +t
 T T 
c V =  (kA )e − (kA ) w  dt
t t  x x 
x  k  0   k  0 
c
t
( TP − TP0 ) =   (TB − TP )  −   (TP − TW ) 
0

 x / 2 e   x  w 
 x   k  0  x  k   k   0  k 
 c  TP =   TW +   c −  −   TP +   TB
 t   x  w  t  x  w  x / 2 e   x / 2 e
aPTP = aW TW0 +  aP − (aW + 2aE ) TP0 + Su

Let us select t =2 s. Substituting numerical values we have


k 10
= = 2500
x 0.04

x 0.004
c = 10  106  = 20000
t 2

After substitution of numerical values and some simplification the discretization equations for the
various nodes are

Node 1: 200TP = 25TE0 + 175TP0 200T1 = 25T20 + 175T10


Node2-4: 200TP = 25TW0 + 25TE0 + 150TP0 200T2 = 25T10 + 25T30 + 150T20
200T3 = 25T20 + 25T40 + 150T30
200T4 = 25T30 + 25T50 + 150T40
Node 5: 200TP = 25TW0 + 17525TP0 200T5 = 25T40 + 125T50

Solution

For t = 2sec : T11 = 200, T21 = 200, T31 = 200, T41 = 200, T51 = 200

Prepared by: Dr. Md. Shahjada Tarafder Page 71


Numerical Solution by Implicit Scheme:
T   T 
c = k 
t x  x 
T   T 
  c t dVdt =  x  k x  dVdt
 
The one-dimensional equation is discretized as

TP − TP0 t +t t +t


 T T 
c  t
t V =   ( kA ) − ( kA ) w dt
t x x 
e
t 

Node 1:
x  k  
c ( TP − TP0 ) =   (TE − TP ) − 0 
t   x  e 
 x  k    k  x 0
c +   TP =   TE +  c TP
 t   x e    x e t
aP TP = aE TE + Su

Node 2-4:
x  k    k  
c
t
( )
TP − TP0 =   (TE − TP )  −   (TP − TW ) 
 x e   x  w 
 x  k   k    k   k  x 0
 c +  +   TP =   TW +   TE +  c TP
 t  x  w  x e   x  w  x e t
aP TP = aW TW + aE TE + aP0 TP0
aP TP = aW TW + aE TE + Su

At node 5:
TP − TP0 t +t
 T T 
c V =  (kA )e − (kA ) w  dt
t t  x x 
x  k    k  
c
t
( )
TP − TP0 =   (TB − TP )  −   (TP − TW ) 
 x / 2 e   x  w 
 x  k   k    k  x 0  k 
 c +  +   TP =   TW +  c TP +   TB
 t  x  w  x / 2 e   x  w t  x / 2 e
aP TP = aW TW + Su
where
aW aE aP b
kw ke x
c + aW + aE S x
 xWP  xPE t

Prepared by: Dr. Md. Shahjada Tarafder Page 72


Let us select t =2 s. Substituting numerical values we have
k 10
= = 2500
x 0.04
x 0.004
c = 10  106  = 20000
t 2

After substitution of numerical values and some simplification the discretization equations for the
various nodes are

Node 1: aP TP = aE TE + Su 225TP = 25TE + 200TP0


225T1 − 25T2 = 200T10
Node2-4: aP TP = aW TW + aE TE + aP0 TP0 250TP = 25TW + 25TE + 200TP0
−25T1 + 250T2 − 25T3 = 200T20
−25T2 + 250T3 − 25T4 = 200T30
−25T3 + 250T4 − 25T5 = 200T40
Node 5: aP TP = aW TW + Su 275TPP = 25TW + 200TP0 + 50TB
−25T4 + 275T5 = 50  0 + 200T50

Solution
For t = 40sec : T1 = 187.38, T2 = 176.28, T3 = 150.04, T4 = 103.69, T5 = 37.51

Prepared by: Dr. Md. Shahjada Tarafder Page 73


Transient SIMPLE Algorithm

  
+ ( u ) + (  v ) = 0
t x y
The equation of continuity is applied at the centre of the cell, P
t +t
 t +t
 t +t

  t dVdt +   x ( )
 u dVdt +   y (  v ) dVdt = 0
t CV t CV t CV
t +t t +t
( P − P0 ) V = t ( uA)e − ( uA)w  dt + t ( uA)n − ( uA)s  dt
Fully implicit scheme
uP =  uP + (1 −  )u0P = uP if  = 1
( P )
−  P0 V = ( uA)e − ( uA)w  t + ( uA)n − (  uA)s  t

SIMPLE algorithm with staggered grid arrangement


The momentum equation is applied at the faces (e, w, n and s) of the cell.

aP pP = aW pW + aE pE + aS pS + aN pN + b


aW = (  dA)w aS = (  dA)s
aE = (  dA)e aN = (  dA)n
aP = aW + aE + aS + aN
(
b =  u  A ) − ( u A) + ( u A) − ( u A)
w

e

s

n

Prepared by: Dr. Md. Shahjada Tarafder Page 74


Methods for Dealing with Complex Geometries
Techniques of solving fluid flow equations shown in earlier chapters were based on discretization
procedures using the Cartesian co-ordinate system. However, many engineering problems involve
complex geometries that do not fit exactly in Cartesian co-ordinates or one of the other systems. CFD
methods for complex geometries are classified into two groups:

(i) Structured curvilinear grid arrangements and


(ii) Unstructured grid arrangements.

Fig. Cartesian grid in two-dimensional flow

A Cartesian grid is an example of a structured method. In a structured grid arrangement:

• Grid points are placed at the intersections of co-ordinates lines


• Interior grid points have a fixed number of neighbouring grid points
• Grid points can be mapped into a matrix; their location in the grid structure and in the matrix is
given by indices (I, J in two dimensions and I, J, K in three dimensions)

Structured curvilinear or body-fitted grids


Structured curvilinear grids or body-fitted grids are based on mapping of the flow domain onto a
computational domain with a simple shape. These techniques can deal effectively with flows such as the
above half-cylinder problem. Unfortunately, it proves to be quite difficult to find viable mappings when the
geometry becomes very complex. In these cases, it is often advantageous to be able to sub-divide the flow
domain into several different sub-regions or blocks, each of which is meshed separately and joined up
correctly with its neighbours. This leads to so-called block-structured grids, which are considerably more
flexible than Cartesian or body-fitted meshes.

Prepared by: Dr. Md. Shahjada Tarafder Page 75


Types of structured curvilinear or body-fitted grids
For the most complex geometries it may be necessary to use many blocks, and the logical extension of this
idea is the unstructured grid, where each mesh cell is a block. This gives unlimited geometric flexibility
and allows the most efficient use of computing resources for complex flows, so this technique is now widely
used in industrial CFD

There are two types of body-fitted co-ordinate system:


(i) Orthogonal curvilinear co-ordinates and
(ii) Non-orthogonal co-ordinates.

In an orthogonal mesh the grid lines are perpendicular at intersections. Fig. (a) shows an example of an
orthogonal curvilinear mesh for the calculation of flow around an aerofoil and Fig. (b) presents a non-
orthogonal body-fitted grid for the half-cylinder problem.

(a) Orthogonal curvilinear grid (b) Non-orthogonal curvilinear grid

In both types of body-fitted grid all the domain boundaries coincide with co-ordinate lines, so geometrical
details can be incorporated accurately without the need for stepwise approximations.

Unstructured grids
The advantage of unstructured grid arrangement is that no implicit structure of co-ordinate lines is imposed
by the grid – hence the name unstructured – and the mesh can be easily concentrated where necessary
without wasting computer storage. Moreover, control volumes may have any shape, and there are no
restrictions on the number of adjacent cells meeting at a point (2D) or along a line (3D). In practical,
triangles or quadrilaterals are most often used for 2D problems and tetrahedral or hexahedral elements in
3D ones.

Prepared by: Dr. Md. Shahjada Tarafder Page 76


Fig. Unstructured grid arrangement with triangular elements.

Discretization in unstructured grids


There are two ways of defining control volumes in unstructured meshes:

(i) Cell-centred control volumes and


(ii) Cell-vertex control volumes.

In the cell-centred method the nodes are placed at the centroid of the control volume, as shown in Fig. (a).
In the vertex-vertex method the nodes are placed on the vertices of the grid.

Cell-centred control volumes Cell-vertex control volumes

Discretization in Unstructured Grids for the Cell-Centred Method


The discretization in unstructured meshes can be developed from the integral form of the conservation
equation:

Prepared by: Dr. Md. Shahjada Tarafder Page 77


(  ) (1)

CV
 t
dV +  div(  u ) dV =  div(grad ) dV +  S dV
CV CV CV

Application of Gauss’s theorem to above equation gives

 (2)
 (  dV ) + A n  ( u) dA = A n  (grad ) dA + CV S dV
t CV

The surface integration must be carried out over the bounding surface A of the control volume CV. The
physical interpretation of n  u is the component of the vector u in the direction of the outward unit vector
n normal to infinitesimal surface element dA. Some simple 2D examples of different shapes of control
volumes are shown in Fig. below:

For steady flows:


  n  (  u ) dA =   n  (grad ) dA +  S dV
A Ai A Ai
(3)
CV

Determination of Surface Integral for Two-dimensional Elements


To evaluate the control surface integrations, we need expressions for flux vectors (ρφu) and (Γ grad φ) as
well as geometric quantities ni and Ai. A typical cell-centred arrangement is shown in Fig. below along
with the notations we will use to describe the discretization procedure.

Fig. (a) Cell-centred control volume arrangement Fig. (b) A face of a control volume and the
normal unit vector

Prepared by: Dr. Md. Shahjada Tarafder Page 78


In this figure point P is the centroid of the control volume for which we develop the discretization process.
Point A is the centroid of the adjacent control volume and eξ is a unit vector along the line joining P and A.
The unit vectors n and eη are the outward normal vector and tangent vector to face i respectively. Consider
the control volume face shown in Fig. above. The area of the face is given by

Ai = (x b − x a ) 2 + (y b − ya ) 2 = (x) 2 + (y) 2


Ai = ix + jy
The normal unit vector to the surface is defined by
y x
n= i− j
Ai Ai

Discretization of the diffusion term


The diffusion term of Eq. (3) has been written as a sum over all the surface elements that make up the
bounding surface of a control volume:
  n  (grad ) dA
A Ai

The area integration for each of the elements is approximated by using the central differencing method
along line PA.
   A − P 
 n  (grad ) dA = n  (grad ) A =  n A   
Ai
i i i
 
 Ai (4)

 is the distance between the centroid A and P and the approximation is only correct if the mesh is fully
orthogonal. Generally, in unstructured meshes the lines connecting centroid P and A are not parallel to the
unit normal vector ni as shown in Fig. (a). This is known as mesh skewness or non-orthogonality.

The flux calculation Eq. (4) has to be corrected by adding a contribution arising from non-orthogonality.
There are different ways to correct the flux but the most common form is to introduce a term known as
cross-diffusion, which is treated as a source term when the discretized equation is assembled.

Now an expression for the cross-diffusion term is developed by introducing co-ordinates  along the line
joining P and A, and  along the face of the control volume. Thus, the term  can be expressed in terms
of (x, y) coordinates or (n, ) coordinates as follows:
   
 = i+ j = n + e (5)
x y n 
The normal unit vector n and the two other unit vectors e and e in the directions of  and  respectively
can be calculated from stored x- and y-co-ordinates of control volume nodes and vertices as follows
y x y −y x −x
n= i− j = b a i− b a j
Ai Ai  

Prepared by: Dr. Md. Shahjada Tarafder Page 79


x A − xP y − yP
e = i+ A j
 
x − xa y − ya
e = b i+ b j
 

Evaluation of cross-diffusion term:


Before developing an expression for the cross-diffusion term, we note that the central difference on the
right-hand side of Equation (11.8) is of course only actually an approximation of  /  , whereas the left-
hand side actually requires n   =  / n . If the mesh is orthogonal  /  =  / n and the central
difference approximation is correct, but if the mesh is nonorthogonal ∂φ/∂ξ may be very different from
∂/∂n.

If the angle between the n and  directions is denoted by :

Prepared by: Dr. Md. Shahjada Tarafder Page 80


 
n  e = cos  (6)
n n
 
e  e = sin  (7)
 
The magnitude of the component of grad  in the direction of  is just  which is also equal to the
sum of the two projections (6) and (7).
   (8)
= cos  − sin 
 n 
From above equation
𝜕𝜙 𝜕𝜙 1 𝜕𝜙
= + 𝑡𝑎𝑛 𝜃
𝜕𝑛 𝜕𝜉 𝑐𝑜𝑠 𝜃 𝜕𝜂

Thus, the normal component of the diffusive flux required in equation Eq. (4):
  1 
n  = = + tan  (9)
n  cos  
The two gradients of the transported quantity on the right-hand side of expression (11.16) may both be
approximated using central differencing:
  A − P
= (10)
 
 b − a
= (11)
 

In the literature  and  are called the direct gradient and cross-diffusion respectively. Substitution
of central difference approximations (10) and (11) into equation (9) yields
 A n. ( grad ) dA =
A

 A − P Ai b − a
n  Ai = + Ai tan 
 cos  
It is straightforward from the figure to see that
1 1 n. n
= = and
cos  n. e n. e
sin  e . e
tan  = =
cos  n. e

Thus, above equation can written into vector form as follows:

 A − P n  n  − e e
n  Ai = Ai − b a  n Ai (12)
 n e  n e

Prepared by: Dr. Md. Shahjada Tarafder Page 81


Direct gradient term Cross-diffusion term

The factors n.n Ai/n and ee Ai/n.e can be calculated from the grid geometry. In summary, for
unstructured grids the diffusion flux through each control volume face is evaluated as follows:

n  grad Ai = Di (A − P ) + SD−cross,i (13)


 nn
Di = Ai
 n e
e  en b − a
S D −cross ,i = − Ai
n e 

Discretization of the convective term


The convective term of Eq. (2) and (3) is
  n  (  u ) dA
A Ai

The convective flux parameter Fi which is equal to the mass flow rate normal to the surface element:
Fi =  n  (  u ) dA = n   u A
Ai
i

The convective flux of transported quantity across the control surface in terms of the product as Fi i:
  n  (  u ) dA =  F 
A Ai A
i i

Treatment of source terms


The source term in Eq. (2) and (3) is treated in the same way as we did in Cartesian coordinates

 S dV =S V
CV

Assembly of discretized equations


The diffusion flux through a face is
Di (A − P ) + SD−cross ,i
Using a TVD scheme for convective flux and treating the TVD contribution as deferred correction as
outlined in Chapter 5, the convective flux through a face is
Fi U + (r )(D − U ) / 2
The source term for the volume is
Su + S PP
When these are substituted into steady flow Eq. (3)

  F 
A
i U + (r )(D − U ) / 2 =   Di ( A − P ) + S D −cross ,i  + ( Su + S PP )
A

Prepared by: Dr. Md. Shahjada Tarafder Page 82


Exam 11.1
Consider the heat conduction through a 2-D hexagonal ring. The governing equation for the heat flow is
given by div(k grad T ) = 0 and the geometry of 2-D hexagonal ring and the boundary conditions are
specified in the figure below:

The problem of heat condition is governed by with the boundary conditions


div(k grad T ) = 0 TAC = 500°C TCK = 500°C,
TBE = 400°C TEH = 200°C
TBJ = 200°C TFG = 500°C
TGI = 500°C
And Edges AD and DF are insulated (zero-flux) boundaries.

The thermal conductivity of the material is k = 50 W / m − K . Determine the discretized equation for
nodes 1, 2, 3, 5 and 6.

Solution:
To demonstrate the method a triangular mesh is chosen with equilateral triangle, which has the advantage
that it is an orthogonal unstructured grid. Since the normal vector to any face lies exactly along the lines
joining centroid, we do not need to calculate the cross-diffusion term arising from non-orthogonality.

Due to the symmetry of the problem domain and the boundary conditions only a quarter of the problem is
required in the calculation.

However, we would not be able to use equilateral triangles everywhere, so it is more convenient to consider
one half of the geometry and used symmetry boundary conditions across line HI and KJ.

Prepared by: Dr. Md. Shahjada Tarafder Page 83


The governing equation of heat conduction is

div(k grad T ) = 0
   (k  T) dV = 0
Applying Gauss-divergence formula, we obtain

 k  T n dA = 0
T
 k n dA = 0
k
 n (TP − TN ) dA = 0

The discretized equation for each triangular control volume can be written as:
k Ai
A n
(Tnb − TP ) = 0

k Ai k Ai
Let Di = =
n 
 DT =  D T
A
i P
A
i nb

The final discretized equation has the following form:


aPTP =  anb Tnb
A

Where aP = a nb − SP
The area of all control volume faces is
Ai =  = 2 10−2 m2
and the distance between two nodes (0, 23/3) and (1, 13/3) is
2
 = 10−2 m
3

Node 1:
Flux through any face is
k Ai
Di (TN − TP ) = (TN − TP )

Flux through face AB is
(T2 − TP )
k −2
2 10−2 = k 3(T2 − TP )
2 / 3 10

Prepared by: Dr. Md. Shahjada Tarafder Page 84


Flux through face BC is
(T8 − TP )
k −2
2 10−2 = k 3(T8 − TP )
2 / 3 10

Face AC is a boundary, so the flux through this face is introduced as a source term using the unstructured
mesh equivalent of the half-cell approximation first introduced in section 4.3:

Flux through AC is
(TAC − TP )
k −2
2 10−2 = 2k 3(TAC − TP )
(1/ 3) 10

Summation of fluxes through all three faces gives


k 3(T2 − TP ) + k 3(T2 − TP ) + 2k 3(TAC − TP ) = 0

This can be simplified to


4T1 = T2 + T8 + 1000

Coefficients connecting any neighbour node are given by


k Ai k
ai = Di = = 2 10−2 = k 3
 (2 / 3) 10 −2

Node 2:
a1 = k 3 , a3 = k 3 and the face AD is an insulated boundary. Flux through the boundary AD is zero
(insulated boundary), so
Su = 0
SP = 0
aP = a1 + a3 − S P
After simplification the discretized equation for node 2 is
2T2 = T1 + T3

Node 3:
TBE = 4000 C and a2 = k 3, a4 = k 3 . Flux through BE is

Prepared by: Dr. Md. Shahjada Tarafder Page 85


(TBE − TP )
k −2
2 10−2 = 2k 3(TBE − TP )
(1/ 3) 10
Su = 2k 3 TBE
SP = −2k 3
a P = a4 + a 6 − SP = (1 + 1 + 2) k 3

The discretized equation for node 3 is


4T3 = T2 + T4 + 800

Node 4:
The discretized equation for node 4 is
2T4 = T5 + T3

Node 5:
Flux through FG is
(TFG − TP )
k −2
2 10−2 = 2k 3(TFG − TP )
(1/ 3) 10
Su = 2k 3 TFG
SP = −2k 3
a P = a4 + a 6 − SP = (1 + 1 + 2)k 3

The discretized equation for node 5 is


4T5 = T4 + T6 + 1000

Node 6 and 8:
The discretized equation for node 6 is
4T6 = T5 + T7 + 400

The discretized equation for node 8 is


4T8 = T1 + T9 + 400

Node 7:
Flux through GI is

Prepared by: Dr. Md. Shahjada Tarafder Page 86


(TGI − TP )
k −2
2 10−2 = 2k 3(TGI − TP )
(1/ 3) 10
Su = 2k 3 TGI
SP = −2k 3
a P = a4 + a 6 − SP = (1 + 2)k 3
The discretized equation for node 7 is
3T7 = T6 + 1000

Node 9:
The discretized equation for node 7 is
3T9 = T8 + 1000

Summarizing the discretized equations:


4T1 = T2 + T8 + 1000
2T2 = T1 + T3
4T3 = T2 + T4 + 800
2T4 = T5 + T3
4T5 = T4 + T6 + 1000
4T6 = T5 + T7 + 400
3T7 = T6 + 1000
4T8 = T1 + T9 + 400
3T9 = T8 + 1000

Prepared by: Dr. Md. Shahjada Tarafder Page 87


Two-dimensional problem
Consider the computation of the heat transfer in a trapezoidal plate with a constant heat source q all
over the plate. At three sides the temperature T is prescribed and at the fourth side the heat flux is given
equal to zero. The problem of heat conduction of the plate is given by
 2T  2T
−k 2 − k 2 =  q
x y
with the boundary conditions prescribed as shown in Fig. 1

Fig. 2 CV definition for trapezoidal


plate
Fig. 1 Configuration of trapezoidal plate
heat conduction

For the discretization employ a grid with only two control volumes (CVs) as illustrated in Fig. 2. The
required coordinates for the distinguished points for both Cvs are indicated in Table 1 below:

Table 1. Coordinates of distinguished points for discretized trapezoidal plate

Prepared by: Dr. Md. Shahjada Tarafder Page 88


Solution:

Fig. 1 Notation of neighboring control volumes Fig. 2 Quadrilateral control volume

Fig. 3 Discretized trapezoidal plate

(a) Surface area

 Se = (6 − 5)2 + (0 − 4)2 = 14  Sn = (5 − 2)2 + (4 − 4)2 = 3


 Sw = (2 − 0)2 + (4 − 0)2 = 2 5  Ss = (0 − 6)2 + (0 − 0)2 = 6

(b) Unit normal vector

Prepared by: Dr. Md. Shahjada Tarafder Page 89


→ →
ab = (2 − 0)i + (4 − 0) j = 2i + 4 j bc = (5 − 2)i + (4 − 4) j = 3i + 0 j
→ i j → i j
wn = − = −4i + 2 j nn = − = 0i + 3 j
2 4 3 0
4 2 2 1 0 3
nˆw = − i+ j=− i+ j nˆn = i+ j = 0i + j
20 20 5 5 9 9

→ →
cd = (6 − 5)i + (0 − 4) j = i − 4 j da = (0 − 6)i + (0 − 0) j = −6i + 0 j
→ i j → i j
en = − = 4i + j sn = − = 0i + 6 j
1 −4 −6 0
4 1 nˆs = 0i + j
nˆe = i+ j
17 17
(c) Discretization of governing differential equation
 2T  2T
−k 2 − k 2 =  q
x y
  2T  2T 
−  k 2 + k 2  dV =   q dV
 x y 
− kT dV =   q dV
Denoting the unit normal vector nˆe = ne i + ne j and then applying Gauss divergence theorem in the left
x y

part of above equation we get


− kT  nˆe dS =  q dV
T T
 T T  T = i+ j=A
−k   ne + ne  dS =   q dV x y
 x y  x y

Gauss divergence theorem:


 T T 
−k    ne + ne  dS =   q dV    T dV =   AdV = A  n dS
C S x y 

x y

V V S
Applying the midpoint rule we get
Fe + Fw + Fn + Fs =   q  V

East face:

 4 T 1 T   4 TE − TP 1 Tne − Tse 
Fe = −k   +  e
dS = − k  +   Se
S  17 x
e 17 y   17  x 17  y 

Prepared by: Dr. Md. Shahjada Tarafder Page 90


= De (TE − TP ) + N e (Tne − Tse )
17
=− (TE − TP ) − 0.5 ( 20 − 0 )
9
17
= − (TE − TP ) − 10
9
West face:
 2 T 1 T 
Fw = −k   − +  dSw
S  5
w x 5 y 
5
For the west side 𝑇 = 16 𝑦 3 . The equation of the line passing through the points (0, 0) and (2, 4) on the
west boundary is
4−0
y= x = 2x
2−0
5 3 5 40 3
T= y = (2 x)3 = x
16 16 16
T 120 2
= x
x 16
T 15 2
= y
x 16
2 4
 2 120 1 15 2 
Fw = −2   − + y dx dy
0 0 5 16 
2
5 x
= 60

South face:
 T T   TP − TS 
Fs = −k   0  − 1 =   ( xse − xsw )
y 
dS k
x  yP − yS
s
S 
s 
T −0
= 2 P  (6 − 0)
 2−0 
= 6TP

North face:
 T   T −T 
Fn = −k   dSn = −k  N P  ( xne − xnw )
S  y 
s  y N − yP 

Prepared by: Dr. Md. Shahjada Tarafder Page 91


 20 − TP 
= −2   (5 − 2)
 4−2 
= 3TP − 60
Similarly, for CV2:
17
Fe = 0, Fw = (TP − TW ), Fs = 6TP , Fn = 3TP − 60
9
Volume calculation
1
V = (5 − 2) + (6 − 0)  4 = 18
2
The cross product of the diagonal vector is
i j k
( )
→ →
ac  bd = xne − xsw yne − ysw 0
xse − xnw yse − xnw 0
1 → → 1 xne − xsw yne − ysw 1 4 −4
 V = ac  bd = = = 18
2 2 xse − xnw yse − xnw 2 5 4
The discretized equation for CV1 results
 Fc =   q  V
c

Fe + Fw + Fn + Fs =   q  V
17
− (T2 − T1 ) − 10 + 6T1 + 3T1 − 60 = 8  18
9
98 17
T1 − T2 = 154
9 9
For CV 2
Fe + Fw + Fn + Fs =   q  V
17
0+ (T2 − T1 ) − 10 + 6T2 + 3T2 − 60 = 8  18
9
98 17
T2 − T1 = 194
9 9
After solving we get
T1 = 17.77
T2 = 20.90

Prepared by: Dr. Md. Shahjada Tarafder Page 92


(d) General transformation of equations from physical plane to computational plane
Since along the normal direction in general there are not nodal points, the normal derivative has to be
expressed by derivatives along other suitable directions. For this we use the coordinates  and  defined
according to Fig. 3.

The direction  is determined by the connecting line between points P and E, and the direction  is
determined by the direction of the CV face. Note that  and  , because of a distortion of the grid, can
deviate from the directions  and  which are defined by the connecting lines of P with the CV face
centers e and n.

Fig. 3 Approximation of diffusive flues for non-Cartesian control volumes


A coordinate transformation from (x, y) to ( ,  ) results for the normal derivative in the following
representation:
 T T  k  y x  T  x y  T 
k  nex + ne  =  ne − ne  +  ne − ne   
 x y  J  
y
    x
 y y x
 
With the Jacobi determinant
x y y x
J= −
   
The metric quantities can be approximated according to
x xE − xP x xne − xse
= and =
  E −  P   Se
This results for the Jacobi determinant in the approximation as

Prepared by: Dr. Md. Shahjada Tarafder Page 93


xE − xP y y xne − xse xE − xP yne − yse yE − yP xne − xse
J= − = −
 E −  P    Se  E −  P  Se  E −  P  Se

=
(x E
− xP )( yne − yse ) − ( yE − yP )( xne − xse )
( E
−  P )  Se

1
=
(  E −  P )  Se
J ( xE − xP )( yne − yse ) − ( yE − yP )( xne − xse )
The derivatives of T with respect to  and  can be approximated as
T TE − TP T Tne − Tse
= and =
  E −  P   Se
dSe = ( xne − xse ) i + ( yne − yse ) j
^

^
The vector normal to dSe is
 i j
dSn = − = − ( yne − yse ) i + ( xne − xse ) j
xne − xse yne − yse
^
The unit vectors tangential and normal to dSe are

tˆe =
(xne − xse ) ( yne − yse )
i+ j
 Se  Se
( y − y ) (x − x )
nˆe = − ne se i + ne se j = ne i + ne j
 Se  Se x y

Where
(y − yse ) (x − x )
ne = − ; ne = ne se and  Se = (x − xse ) + ( yne − yse )
ne 2 2
x
 Se  Se y ne

Now
 T T 
k  ne +
y 
ne
 x
x y

k  y x  T  x y  T 
=  ne − ne  + ne − ne   
J       
x
 y y x
 

Prepared by: Dr. Md. Shahjada Tarafder Page 94


=
(
k  E −  P  Se )
 yne − yse x − xse
ne − ne
 TE − TP
 n 
( xE − xP )( yne − yse ) − ( yE − yP )( xne − xse )   Se  Se e x y
 E − P

+
(
k  E −  P  Se )
 xE − xP y − yP  Tne − Tse
ne − E
 n 
( xE − xP )( yne − yse ) − ( yE − yP )( xne − xse )   E −  P  E −  P e   Se y x

Putting the value of ne and ne we obtained


x y

 T T 
k  ne + ne  = De (TE − TP ) + Ne (Tne − Tse )
 x y x y

Where
(x − x ) + ( y − y )
2 2

De = −k ne se ne se

(x ne
− xse )( y − y ) − ( y − y
E P ne se )( x E
− xP )
(x − x ) + ( y − y )
2 2

= −k ne se ne se

(x ne
− xse )( y − y ) − ( y − y
E P ne se )( x E
− xP )
(5 − 6) + ( 4 − 0)
2 2

= −2.0
( 5 − 6 )( 2 − 2 ) − ( 4 − 0 ) 
31 13 
− 
 4 4
17

9
And

Ne = k
( y − y )( x − x ) + ( x − x )( y − y )
ne se E P ne se E P

( y − y )( x − x ) − ( x − x )( y − y )
ne se E P ne se E P

=k
( y − y )( x − x ) + ( x − x )( x − x )
ne se E P ne se E P

( y − y )( x − x ) − ( x − x )( y − y )
ne se E P ne se E P

= 2.0
( 4 − 0 )( 2 − 2 ) + ( 5 − 6 )( 31 / 4 − 13 / 4 )
( 4 − 0 )( 31 / 4 − 13 / 4 ) − ( 5 − 6 )( 2 − 2 )
1
=−
2

Prepared by: Dr. Md. Shahjada Tarafder Page 95


Grid Generation

In order to numerically solve the governing partial differential equations (PDEs) of fluid mechanics,
approximations to the partial differentials are introduced. These approximations convert the partial
derivatives to finite difference expressions, which are used to rewrite the PDEs as algebraic equations. The
approximate algebraic equations, referred to as finite difference equations (FDEs), are subsequently solved
at discrete points within the domain of interest. Therefore, as set of grid points within the domain, as well
as the boundaries, of the domain, must be specified.

Typically, the computation domain is selected to be rectangular in shape where the interior grid points are
distributed along grid lines. Therefore, the grid points can be identified easily with reference to the
appropriate grid lines. This type grid is known as the structured grid. A second category of grid system may
be constructed where the grids points can be associated with orderly defined grid lines. This type of grid
systems is known as the unstructured gird.

The majority of the physical domains of interest are nonrectangular. Therefore, imposing a rectangular
computational domain on such a physical domain will require some sort of interpolation for the
implementation of the boundary conditions. Since the boundary conditions have a dominant influence on
the solutions of the equation, such an interpolation causes inaccuracies at the place of the greatest
sensitivity. In addition, unequal grid spacing near the boundaries creates further complications with the
FDEs since approximations with unequal step sizes must be used. This form of the FDE changes from node
to node, creating cumbersome programming details.

To overcome these difficulties, a transformation from physical pace to computation space is introduced.
This transformation is accomplished by specifying a generalized coordinate system which will map the
nonrectangular grid system in the physical space to a rectangular uniform grid spacing in the computation
space.

Fig. A typical 2D domain for the symmetric Fig. Computational domain with constant step sizes
blunt body problem.

Prepared by: Dr. Md. Shahjada Tarafder Page 96


In order to eliminate the difficulty associated with the unequal step sizes used in the FDEs, the physical
domain is transformed into a rectangular, constant step-size, computation domain.
Transformation of Governing Partial Differential Equations
Now consider a model PDE, such as
u u
+ =0
x y
This equation is to be transformed from physical space to computational space. Now define the following
relations between the physical and computational spaces:
 = ( x, y )
 = ( x, y )

And

x = x(, ) and y = y(, )


From the chain rule of differential calculus
    
= +
x x  x 
  
= x + x
x  

Similarly,
  
=  y + y
y  
Now
u u
+ =0
x y
 u u   u u 
  x  + x   +    y  +  y   = 0
   

(  x +  y ) u + ( x +  y ) 
u
=0

This is the equation which will be solved in the computational domain. Also note that the transformation
derivatives 𝜉𝑥 , 𝜉𝑦 , 𝜂𝑥 𝑎𝑛𝑑 𝜂𝑦 must be obtained from the functional relations.

Prepared by: Dr. Md. Shahjada Tarafder Page 97


Matrics and Jacobian Transformation
 = ( x, y ) and  = ( x, y )
d  =  x dx +  y dy

d  = x dx +  y dy

 d   x  y   dx 
 d  =    y   dy 
   x

Reversing the role of independent variables

x = x(, ) and y = y (, )


dx = x d  + xd 

dy = y d  + yd 

 dx   x x   d  
 dy  =  y y   d 
   
𝑎 𝑎12
−1
[𝐴] = [𝑎11 𝑎22 ]
x  y   x x  21

 =
 x  y   y y  𝐴𝑑𝑗 𝐴 1 𝐴11 𝐴21
𝐴−1 = = [ ]
|𝐴| |𝐴| 𝐴12 𝐴22

From which

 x = J y 𝐴11 = 𝑦𝜂 𝐴12 = −𝑦𝜉

 y = − J x 𝐴21 = −𝑥𝜂 𝐴22 = 𝑥𝜉

x = − J y x  y  1  y − x 
 =
 y = J x  x  y  A  − y x 

J=
1 x y   y − x 
  =J 
x y − y x y 
 x  − y x 

The actual values of the matrics or Jacobian could be negative.

Prepared by: Dr. Md. Shahjada Tarafder Page 98


Algebraic Grid Generation Technique
An algebraic is used to relate the grid points in the computational domain to those of the physical domain.
This objective is met by using an interpolation scheme between the specified boundary grid pints ot generate
the interior grid points.

(a) Physical domain (b) Rectangular computational domian

The following algebraic relations will transform this physical domain into a rectangular domain:

=x
y
=
yt

yt represents the upper boundary and can be expressed as

H 2 − H1
yt = H1 + x
L
Thus, the algebraic relations can finally be written as

=x At x = 0 and y = H1,  = 0 and  = 1


=
y At x = L and y = H 2 ,  = L and  = 1
H − H1
H1 + 2 x
L

These can be rearranged as

Prepared by: Dr. Md. Shahjada Tarafder Page 99


x=
 H − H1 
y =  H1 + 2 x 
 L 
The equal grid spacing in the computational domain is produced as follows:

L
 =
IM − 1
1
 =
JM − 1
A computation domain is constructed for a 1713 grid system. The values of  and  are known at each
grid within this domain. The grid system generated for a physical domain defined by

L = 4, H1 = 2 and H2 = 4.
IM  JM = 17  13
L 4
 = = = 0.25
IM − 1 17 − 1
1 1
 = = = 0.083
JM − 1 13 − 1
 x = 1.0
y = 0

x =
( H 2 − H1 ) y / L
 H1 + ( H 2 − H1 ) x / L 
2

H 2 − H1 
=−
L H1 + ( H 2 − H1 )  / L

1
y =
H1 + ( H 2 − H1 ) x / L
1
=
H1 + ( H 2 − H1 )  / L

1
J=
x y − y x

Prepared by: Dr. Md. Shahjada Tarafder Page 100


Comparison of Analytical and Numerical Calculations
Two-point second central difference Scheme

xi , j +1 − xi , j −1
x =
2
Three point forward second order approximations

−3xi ,1 + 4 xi ,2 − xi ,3
x =
2
A comparison of the metric evaluated numerically and analytically and the error introduced in the
numerical computations is shown in below:

Grid Generation Techniques

(i) Partial Differential Equation Techniques

(ii) Elliptic Grid Generators

(iii) Hyperbolic Grid Generation Techniques

Matrix Inversion
𝐴𝑋 = 𝐵

𝑋 = 𝐴−1 𝐵

𝑎11 𝑎12 𝑎13 𝑏1 𝐴11 𝐴21 𝐴31


𝐴𝑑𝑗 𝐴 1
[𝐴] = [𝑎21 𝑎22 𝑎23 ] 𝐵 = [𝑏2 ] and 𝐴−1 = |𝐴|
= |𝐴| [𝐴12 𝐴22 𝐴32 ]
𝑎31 𝑎32 𝑎33 𝑏3 𝐴13 𝐴23 𝐴33

𝑎22 𝑎23 𝑎21 𝑎23 𝑎21 𝑎22


𝐴11 = [𝑎 𝑎33 ] 𝐴12 = − [𝑎 𝑎33 ] 𝐴13 = [𝑎 𝑎32 ]
32 31 31

𝑎12 𝑎13 𝑎11 𝑎13 𝑎11 𝑎12


𝐴21 = − [𝑎 𝑎33 ] 𝐴22 = [𝑎 𝑎33 ] 𝐴23 = − [𝑎 𝑎32 ]
32 31 31

𝑎11 𝑎13 𝑎11 𝑎13 𝑎11 𝑎12


𝐴31 = [𝑎 𝑎33 ] 𝐴32 = − [𝑎 𝑎33 ] 𝐴33 = [𝑎 𝑎22 ]
32 31 21

Prepared by: Dr. Md. Shahjada Tarafder Page 101


Example 1

Solution:

  ( k T ) = 0
  T    T 
k + k =0
x  x  y  y 
 T   T   T   T 
 kA  −  kA  +  kA  −  kA  =0
 x e  x w  y n  y s

Element 1: Dirichlet boundary condition, T = 320

 T   T   T   T 
 kA  −  kA  +  kA  −  kA  =0
 x e  x  w  y  n  y  s
 kA   kA   kA 
  (T2 − T1 ) −   (T1 − Tbw ) +   (T4 − T1 ) − 0 = 0
  x 1− 2   x  21−1   y 1− 4
 kA   kA   kA    kA   kA   kA 
  +  +   T1 =   T2 +   T4 +   Tbw
  x 1− 2   x 21−1   y 1− 4    x 1−2   y 1− 4   x 21−1
0.667  3 10−3 + 2 10−3 + 110−3  T1 = 2 10 −3 T2 + 110 −3 T4 + 2 10 −3  320
0.005 T1 = 0.002 T2 + 0.001 T4 + 0.64

This can be written in discretized form as

aPTP = aW TW + aETE + aN TN + aSTS

Prepared by: Dr. Md. Shahjada Tarafder Page 102


where
k k k k
aW = Aw aE = Ae aS = As aN = An aP = aW + aE + aS + aN
x x y y

Interpolation for thermal conductivity (k):


A linear interpolation will result in the formula:
 f = g f  F + (1 − g f )C
dCf
gf =
dCf + d fF

An approximate value for f can also be computed as

 f = g F  F + g C C

Where g F and gC could be the basis of weighting factor in the respective volumes such that
VC VF
gF = , gC = = 1 − gF
VC + VF VC + VF
V1 0.01
g e1 = = = 0.333
V1 + V2 0.01 + 0.02
V2 0.02
ge 2 = = = 0.40
V1 + V2 0.01 + 0.02
The values of thermal conductivity (k) at the element faces
k1 k2 10−3  102
k1−2 = =  3  10−3
(1 − ge1 ) k1 + ge 2k2 (1 − 0.333)  10 + 0.333  10
−3 2

Element 2: Neumann boundary condition

 T   T   T   T 
 kA  −  kA  +  kA  −  kA  =0
 x e  x  w  y n  y  s
 kA   kA   kA 
  (T3 − T2 ) −   (T2 − T1 ) +   (T5 − T2 ) + qs As = 0
  x  2 −3   x 1− 2   y  2 −5
 kA   kA   kA    kA   kA   kA 
  +  +   T2 =   T1 +   T3 +   T5 + bs
  x  2−3   x 1− 2   y 2−5    x 1− 2   x  2 −3   y  2 −5
0.4 102 + 0.667  3 10−3 + 2 102  T2 = 0.667  3 10 −3 T1 + 0.4 10 2 T3 + 2 10 2 T5 + 100  0.2
240.002 T2 = 0.002 T1 + 40 T3 + 200 T5 + 20
Element 7: Mixed boundary condition

Prepared by: Dr. Md. Shahjada Tarafder Page 103


 T   T   T   T 
 kA  −  kA  +  kA  −  kA  =0
 x e  x  w  y n  y  s
 kA   kA   T   kA 
  (T8 − T7 ) −   (T7 − T19 ) +  kA  −   (T7 − T4 ) = 0
  x  7 −8   x 7 −19  y n   y 4−7
The mixed boundary condition refers to the situation where information at the boundary is given via a
convective transfer coefficient (h) and a surrounding temperature (T) as

 T   Tb − TP 
 kA  = ( kA ) b  = h (T − Tb ) A b
 y n   yb 
From which an equation of Tb can be obtained as

ℎ∞ 𝑇∞ + (𝑘/𝛿𝑦)𝑏 𝑇𝑃
𝑇𝑏 =
ℎ∞ + (𝑘/𝛿𝑦)𝑏
Substituting the value of Tb the flux equation is transformed to
 T 
 kA  = h (T − Tb ) A b
 y n
 h T + ( k /  y )b 
= h T −    ( T − TP ) A b
 h + (k /  y )b 
 h T + T (k /  y )b − h T − ( k /  y)b 
= h      ( T − TP ) A b
 h + (k /  y )b 
 T ( k /  y )b − ( k /  y )b 
= h    ( T − TP ) A b
 h + (k /  y )b 
= − R e q TP + R e q T

h (k /  y)b h (k /  y7−18 ) 20  (10−3 / 0.05)


Where, R e q = =  18 =  0.1 = 0.001998
h + (k /  y)b h + (k18 /  y7−18 ) 20 + (10−3 / 0.05)
Now the equation for element 7 becomes

 kA   kA   kA 
  (T8 − T7 ) −   (T7 − T19 ) − R e q T7 + R e q T −   (T7 − T4 ) = 0
  x 7 −8   x 7 −19   y 4−7

 kA   kA   kA    kA   kA   kA 
  +   +   + R e q  T7 =   T4 +   T8 +   T19 − R e q T
  x 7−19   x 7−8   y 4−7    y  4 −7   x  7 −8   x 7−19

2 10−3 + 0.667  3 10−3 + 0.001998 + 110−3  T7 = 0.001 T4 + 0.002T8 + 2 10−3  320 − 0.001998  300

0.006998T7 = 0.001 T4 + 0.002T8 + 1, 2394

Prepared by: Dr. Md. Shahjada Tarafder Page 104

You might also like