Lecture 6
Lecture 6
Presented by
Dr. Hesham M. Khalil
COURSE AGENDA
• Introduction
• Conservation Laws of Fluid Motion
• Turbulence
• Finite Volume Method for Diffusion Problems
• Finite Volume Method for Convection-Diffusion Problems
• Solution Algorithm for Pressure-Velocity Coupling in Steady Flows
• Solution of Discretized Equations
• Finite Volume Method for Unsteady Flow
• Implementation of Boundary Conditions
𝜕𝜌𝜙
+ 𝑑𝑖𝑣(𝜌𝜙𝐮) = 𝑑𝑖𝑣(Γ 𝑔𝑟𝑎𝑑𝜙) + 𝑆𝜙
𝜕𝑡
Rate of increase of Net rate of flow of 𝜙 Rate of increase of 𝜙 due Rate of increase of 𝜙
=
𝜙 of fluid element + out of fluid element to diffusion
+ due to sources
𝑑𝑖𝑣 Γ 𝑔𝑟𝑎𝑑𝜙 + 𝑆𝜙 = 0
The control volume integration, which forms the key step of the finite volume method that distinguishes it
from all other CFD techniques, yields the following form:
𝑑 𝑑𝜙
𝑑𝑖𝑣 Γ 𝑔𝑟𝑎𝑑𝜙 + 𝑆 = 0 Γ +𝑆 = 0
𝑑𝑥 𝑑𝑥
• Step 2: Discretisation
The key step of the finite volume method is the integration of the governing equation (or equations)
over a control volume to yield a discretised equation at its nodal point P.
𝑑 𝑑𝜙 𝑑𝜙 𝑑𝜙
න Γ 𝑑𝑉 + න 𝑆𝑑𝑉 = Γ𝐴 − Γ𝐴 ҧ
+ 𝑆∆𝑉 =0
𝑑𝑥 𝑑𝑥 𝑑𝑥 𝑒
𝑑𝑥 𝑤
∆𝑉 ∆𝑉
THE FINITE VOLUME METHOD FOR DIFFUSION PROBLEMS
Finite volume method for one dimensional steady state diffusion
• Step 2: Discretisation
• In order to derive useful forms of the discretised equations, the interface diffusion coefficient Γ
𝑑𝜙
and the gradient at east (𝑒) and west (𝑤) are required.
𝑑𝑥
• Following well-established practice, the values of the property 𝜙 and the diffusion coefficient are
defined and evaluated at nodal points.
• To calculate gradients (and hence fluxes) at the control volume faces an approximate distribution
of properties between nodal points is used.
• Linear approximations seem to be the obvious and simplest way of calculating interface values and
the gradients. This practice is called central differencing.
THE FINITE VOLUME METHOD FOR DIFFUSION PROBLEMS
Finite volume method for one dimensional steady state diffusion
• Step 2: Discretisation
Γ𝑊 + Γ𝑃
Γ𝑤 =
2
Γ𝑃 + Γ𝐸
Γ𝑒 =
2
𝑑∅ ∅𝐸 − ∅𝑃
Γ𝐴 = Γ𝑒 𝐴𝑒
𝑑𝑥 𝑒
𝛿𝑥𝑃𝐸
𝑑∅ ∅𝑃 − ∅𝑊
Γ𝐴 = Γ𝑤 𝐴𝑤
𝑑𝑥 𝑤
𝛿𝑥𝑊𝑃
THE FINITE VOLUME METHOD FOR DIFFUSION PROBLEMS
Finite volume method for one dimensional steady state diffusion
• Step 2: Discretisation
• In practical situations, as illustrated later, the source term S may be a function of the dependent
variable.
• In such cases the finite volume method approximates the source term by means of a linear form:
ҧ
𝑆∆𝑉 = 𝑆𝑢 + 𝑆𝑝 ∅𝑃
THE FINITE VOLUME METHOD FOR DIFFUSION PROBLEMS
Finite volume method for one dimensional steady state diffusion
• Step 2: Discretisation
∅𝐸 − ∅ 𝑃 ∅𝑃 − ∅ 𝑊
Γ𝑒 𝐴𝑒 − Γ𝑤 𝐴𝑤 + 𝑆𝑢 + 𝑆𝑝 ∅𝑃 = 0
𝛿𝑥𝑃𝐸 𝛿𝑥𝑊𝑃
Γ𝑒 Γ𝑤 Γ𝑤 Γ𝑒
𝐴𝑒 + 𝐴𝑤 − 𝑆𝑝 ∅𝑃 = 𝐴𝑤 ∅𝑊 + 𝐴𝑒 ∅𝐸 + 𝑆𝑢
𝛿𝑥𝑃𝐸 𝛿𝑥𝑊𝑃 𝛿𝑥𝑊𝑃 𝛿𝑥𝑃𝐸
𝑎𝑃 ∅𝑃 = 𝑎𝑊 ∅𝑊 + 𝑎𝐸 ∅𝐸 + 𝑆𝑢
THE FINITE VOLUME METHOD FOR DIFFUSION PROBLEMS
Finite volume method for one dimensional steady state diffusion
• Step 2: Discretisation
𝑎𝑃 ∅𝑃 = 𝑎𝑊 ∅𝑊 + 𝑎𝐸 ∅𝐸 + 𝑆𝑢
𝑎𝑃 𝑎𝑊 𝑎𝐸
Γ𝑒 Γ𝑤 Γ𝑤 Γ𝑒
𝐴 + 𝐴 − 𝑆𝑝 𝐴 𝐴
𝛿𝑥𝑃𝐸 𝑒 𝛿𝑥𝑊𝑃 𝑤 𝛿𝑥𝑊𝑃 𝑤 𝛿𝑥𝑃𝐸 𝑒
𝑆𝑢 + 𝑆𝑝 ∅𝑃 = 0
THE FINITE VOLUME METHOD FOR DIFFUSION PROBLEMS
Finite volume method for one dimensional steady state diffusion
• Discretised equations must be set up at each of the nodal points in order to solve a problem.
• For control volumes that are adjacent to the domain boundaries the general discretised equation
is modified to incorporate boundary conditions.
• The resulting system of linear algebraic equations is then solved to obtain the distribution of the
property ∅ at nodal points.
THE FINITE VOLUME METHOD FOR DIFFUSION PROBLEMS
Worked example: one dimensional steady state diffusion
• Consider the problem of source-free heat conduction in an insulated rod whose ends are
maintained at constant temperatures of 100°C and 500°C respectively. The one-dimensional
problem is governed by
𝑑 𝑑𝑇
𝑘 =0
𝑑𝑥 𝑑𝑥
• Calculate the steady state temperature distribution in the rod. Thermal conductivity 𝑘 equals
1000 W/m.K, cross-sectional area A is 10 × 10−3 m2.
THE FINITE VOLUME METHOD FOR DIFFUSION PROBLEMS
Worked example: one dimensional steady state diffusion
• Solution :
• Let us divide the length of the rod into five equal control volumes. This gives 𝛿𝑥 = 0.1 m.
• The grid consists of five nodes. For each one of nodes 2, 3 and 4 temperature values to the
east and west are available as nodal values. Consequently, discretised equations that can be
readily written for control volumes surrounding these nodes:
THE FINITE VOLUME METHOD FOR DIFFUSION PROBLEMS
Worked example: one dimensional steady state diffusion
• Solution :
𝑘𝑒 𝑘𝑤 𝑘𝑤 𝑘𝑒
𝐴 + 𝐴 − 𝑆𝑝 𝑇𝑃 = 𝐴 𝑇 + 𝐴 𝑇
𝛿𝑥𝑃𝐸 𝑒 𝛿𝑥𝑊𝑃 𝑤 𝛿𝑥𝑊𝑃 𝑤 𝑊 𝛿𝑥𝑃𝐸 𝑒 𝐸
𝑎𝑃 𝑇𝑃 = 𝑎𝑊 𝑇𝑊 + 𝑎𝐸 𝑇𝐸
THE FINITE VOLUME METHOD FOR DIFFUSION PROBLEMS
Worked example: one dimensional steady state diffusion
• Solution :
• The thermal conductivity ( 𝑘𝑒 = 𝑘𝑤 = 𝑘), node spacing (𝛿𝑥) and cross-sectional area (𝐴𝑒 =
𝐴𝑤 = 𝐴) are constants. Therefore the discretised equation for nodal points 2, 3 and 4 is
𝑎𝑃 𝑇𝑃 = 𝑎𝑊 𝑇𝑊 + 𝑎𝐸 𝑇𝐸
𝑎𝑃 𝑎𝑊 𝑎𝐸
𝑘 𝑘
𝑎𝑊 + 𝑎𝐸 𝐴 𝐴
𝛿𝑥 𝛿𝑥
• 𝑆𝑢 and 𝑆𝑃 are zero in this case since there is no source term in the governing equation.
THE FINITE VOLUME METHOD FOR DIFFUSION PROBLEMS
Worked example: one dimensional steady state diffusion
• Solution :
• Nodes 1 and 5 are boundary nodes, and therefore require special attention. Integration of
equation over the control volume surrounding point 1 gives
𝑑 𝑑𝑇 𝑇𝐸 − 𝑇𝑃 𝑇𝑃 − 𝑇𝐴
𝑘 =0 𝑘𝐴 − 𝑘𝐴 =0
𝑑𝑥 𝑑𝑥 𝛿𝑥 Τ
𝛿𝑥 2
THE FINITE VOLUME METHOD FOR DIFFUSION PROBLEMS
Worked example: one dimensional steady state diffusion
• Solution :
𝑇𝐸 − 𝑇𝑃 𝑇𝑃 − 𝑇𝐴
𝑘𝐴 − 𝑘𝐴 =0
𝛿𝑥 𝛿𝑥 Τ2
• This expression shows that the flux through control volume boundary A has been approximated
by assuming a linear relationship between temperatures at boundary point A and node P. We can
rearrange the previous equation as follows:
𝑘 2𝑘 𝑘 2𝑘
𝐴 + 𝐴 𝑇𝑃 = 0. 𝑇𝑊 + 𝐴 𝑇𝐸 + 𝐴 𝑇𝐴
𝛿𝑥 𝛿𝑥 𝛿𝑥 𝛿𝑥
Compared with :
Γ𝑒 Γ𝑤 Γ𝑤 Γ𝑒
𝐴𝑒 + 𝐴𝑤 − 𝑆𝑝 ∅𝑃 = 𝐴𝑤 ∅𝑊 + 𝐴𝑒 ∅𝐸 + 𝑆𝑢
𝛿𝑥𝑃𝐸 𝛿𝑥𝑊𝑃 𝛿𝑥𝑊𝑃 𝛿𝑥𝑃𝐸
THE FINITE VOLUME METHOD FOR DIFFUSION PROBLEMS
Worked example: one dimensional steady state diffusion
• Solution :
• It can be easily identified that the fixed temperature boundary condition enters the calculation as a
2𝑘 2𝑘
source term 𝑆𝑢 + 𝑆𝑝 𝑇𝑃 with 𝑆𝑢 = 𝛿𝑥
𝐴 𝑇𝐴 and 𝑆𝑝 = − 𝛿𝑥 𝐴, and that the link to the (west)
𝑎𝑃 𝑇𝑃 = 𝑎𝑊 𝑇𝑊 + 𝑎𝐸 𝑇𝐸 + 𝑆𝑢
𝑎𝑊 𝑎𝐸 𝑎𝑃 𝑆𝑃 𝑆𝑢
𝑘 2𝑘 2𝑘
0 𝐴 𝑎𝑊 + 𝑎𝐸 − 𝑆𝑃 − 𝐴 𝐴𝑇
𝛿𝑥 𝛿𝑥 𝛿𝑥 𝐴
THE FINITE VOLUME METHOD FOR DIFFUSION PROBLEMS
Worked example: one dimensional steady state diffusion
• Solution :
𝑇𝐵 − 𝑇𝑃 𝑇𝑃 − 𝑇𝑤
𝑘𝐴 − 𝑘𝐴 =0
𝛿𝑥/2 𝛿𝑥
THE FINITE VOLUME METHOD FOR DIFFUSION PROBLEMS
Worked example: one dimensional steady state diffusion
• Solution :
• As before we assume a linear temperature distribution between node P and boundary point B to
approximate the heat flux through the control volume boundary. Previous equation can be
rearranged as
𝑘 2𝑘 𝑘 2𝑘
𝐴 + 𝐴 𝑇𝑃 = 𝐴 𝑇𝑊 + 0. 𝑇𝐸 + 𝐴 𝑇𝐵
𝛿𝑥 𝛿𝑥 𝛿𝑥 𝛿𝑥
THE FINITE VOLUME METHOD FOR DIFFUSION PROBLEMS
Worked example: one dimensional steady state diffusion
• Solution :
𝑎𝑃 𝑇𝑃 = 𝑎𝑊 𝑇𝑊 + 𝑎𝐸 𝑇𝐸 + 𝑆𝑢
𝑎𝑊 𝑎𝐸 𝑎𝑃 𝑆𝑃 𝑆𝑢
𝑘 2𝑘 2𝑘
𝐴 0 𝑎𝑊 + 𝑎𝐸 − 𝑆𝑃 − 𝐴 𝐴𝑇
𝛿𝑥 𝛿𝑥 𝛿𝑥 𝐵
• The discretisation process has yielded one equation for each of the nodal points 1 to 5.
𝑘
• Substitution of numerical values gives 𝛿𝑥
𝐴 = 100, and the coefficients of each discretised equation
• Solution :
THE FINITE VOLUME METHOD FOR DIFFUSION PROBLEMS
Worked example: one dimensional steady state diffusion
• Solution :
• Solution :
• The above set of equations yields the steady state temperature distribution of the given situation.
• For simple problems involving a small number of nodes the resulting matrix equation can easily
be solved with a software package such as MATLAB .
• For 𝑇𝐴 = 100 and 𝑇𝐵 = 500 the solution can be obtained :
THE FINITE VOLUME METHOD FOR DIFFUSION PROBLEMS
Worked example: one dimensional steady state diffusion
• The methodology used in deriving discretised equations in the one dimensional case can be easily
extended to two-dimensional problems.
• To illustrate the technique let us consider the two-dimensional steady state diffusion equation given
by
𝜕 𝜕∅ 𝜕 𝜕∅
Γ + Γ + 𝑆∅ = 0
𝜕𝑥 𝜕𝑥 𝜕𝑦 𝜕𝑦
THE FINITE VOLUME METHOD FOR DIFFUSION PROBLEMS
Finite volume method for two-dimensional diffusion problems
THE FINITE VOLUME METHOD FOR DIFFUSION PROBLEMS
Finite volume method for two-dimensional diffusion problems
𝜕 𝜕𝜙 𝜕 𝜕𝜙
න Γ 𝑑𝑥. 𝑑𝑦 + න Γ 𝑑𝑥. 𝑑𝑦 + න 𝑆∅ 𝑑𝑉 = 0
𝜕𝑥 𝜕𝑥 𝜕𝑦 𝜕𝑦
∆𝑉 ∆𝑉 ∆𝑉
THE FINITE VOLUME METHOD FOR DIFFUSION PROBLEMS
Finite volume method for two-dimensional diffusion problems
𝜕∅ 𝜕∅
Γ𝑒 𝐴𝑒 − Γ𝑤 𝐴𝑤
𝜕𝑥 𝑒
𝜕𝑥 𝑤
𝜕∅ 𝜕∅
+ Γ𝑛 𝐴𝑛 − Γ𝑠 𝐴𝑠 ҧ
+ 𝑆∆𝑉 =0
𝜕𝑦 𝑛
𝜕𝑦 𝑠
THE FINITE VOLUME METHOD FOR DIFFUSION PROBLEMS
Finite volume method for two-dimensional diffusion problems
• As before, this equation represents the balance of the generation of φ in a control volume and the
fluxes through its cell faces.
𝜕∅ ∅𝑃 − ∅𝑊
Γ𝑤 𝐴𝑤 = Γ𝑤 𝐴𝑤
𝜕𝑥 𝑤
𝛿𝑥𝑊𝑃
𝜕∅ ∅𝐸 − ∅𝑃
Γ𝑒 𝐴𝑒 = Γ𝑒 𝐴𝑒
𝜕𝑥 𝑒
𝛿𝑥𝑃𝐸
THE FINITE VOLUME METHOD FOR DIFFUSION PROBLEMS
Finite volume method for two-dimensional diffusion problems
𝜕∅ ∅𝑃 − ∅𝑆
Γ𝑠 𝐴𝑠 = Γ𝑠 𝐴𝑠
𝜕𝑦 𝑠
𝛿𝑦𝑆𝑃
𝜕∅ ∅ 𝑁 − ∅𝑃
Γ𝑛 𝐴𝑛 = Γ𝑛 𝐴𝑛
𝜕𝑦 𝑛
𝛿𝑦𝑃𝑁
THE FINITE VOLUME METHOD FOR DIFFUSION PROBLEMS
Finite volume method for two-dimensional diffusion problems
∅𝐸 − ∅ 𝑃 ∅𝑃 − ∅ 𝑊
Γ𝑒 𝐴𝑒 − Γ𝑤 𝐴𝑤
𝛿𝑥𝑃𝐸 𝛿𝑥𝑊𝑃
∅𝑁 − ∅𝑃 ∅𝑃 − ∅𝑆
+Γ𝑛 𝐴𝑛 − Γ𝑠 𝐴𝑠
𝛿𝑦𝑃𝑁 𝛿𝑦𝑆𝑃
ҧ
+𝑆∆𝑉 =0
Γ𝑤 𝐴𝑤 Γ𝑒 𝐴𝑒 Γ𝑠 𝐴𝑠 Γ𝑛 𝐴𝑛
+ + + − 𝑆𝑃 ∅𝑃
𝛿𝑥𝑊𝑃 𝛿𝑥𝑃𝐸 𝛿𝑦𝑆𝑃 𝛿𝑦𝑃𝑁
Γ𝑤 𝐴𝑤 Γ𝑒 𝐴𝑒 Γ𝑠 𝐴𝑠 Γ𝑛 𝐴𝑛
= ∅ + ∅ + ∅ + ∅ + 𝑆𝑢
𝛿𝑥𝑊𝑃 𝑊 𝛿𝑥𝑃𝐸 𝐸 𝛿𝑦𝑆𝑃 𝑆 𝛿𝑦𝑃𝑁 𝑁
• Equation is now cast in the general discretised equation form for interior nodes:
𝑎𝑃 ∅𝑃 = 𝑎𝑊 ∅𝑊 + 𝑎𝐸 ∅𝐸 + 𝑎𝑆 ∅𝑆 + 𝑎𝑁 ∅𝑁 + 𝑆𝑢
𝑎𝑊 𝑎𝐸 𝑎𝑆 𝑎𝑁 𝑎𝑃
Γ𝑤 𝐴𝑤 Γ𝑒 𝐴𝑒 Γ𝑠 𝐴𝑠 Γ𝑛 𝐴𝑛
𝑎𝑊 + 𝑎𝐸 + 𝑎𝑆 + 𝑎𝑁 − 𝑆𝑃
𝛿𝑥𝑊𝑃 𝛿𝑥𝑃𝐸 𝛿𝑦𝑆𝑃 𝛿𝑦𝑃𝑁
THE FINITE VOLUME METHOD FOR DIFFUSION PROBLEMS
Finite volume method for two-dimensional diffusion problems
𝜕 𝜕∅ 𝜕 𝜕∅ 𝜕 𝜕∅
Γ + Γ + Γ + 𝑆∅ = 0
𝜕𝑥 𝜕𝑥 𝜕𝑦 𝜕𝑦 𝜕𝑧 𝜕𝑧
• Now a three-dimensional grid is used to sub-divide the domain. A typical control volume is
shown in Figure
THE FINITE VOLUME METHOD FOR DIFFUSION PROBLEMS
Finite volume method for three-dimensional diffusion problems
T).
𝜕∅ 𝜕∅
Γ𝑒 𝐴𝑒 − Γ𝑤 𝐴𝑤
𝜕𝑥 𝑒
𝜕𝑥 𝑤
𝜕∅ 𝜕∅
+ Γ𝑛 𝐴𝑛 − Γ𝑠 𝐴𝑠
𝜕𝑦 𝑛
𝜕𝑦 𝑠
𝜕∅ 𝜕∅
+ Γ𝑡 𝐴𝑡 − Γ𝑏 𝐴𝑏 ҧ
+ 𝑆∆𝑉 =0
𝜕𝑧 𝑡
𝜕𝑧 𝑏
THE FINITE VOLUME METHOD FOR DIFFUSION PROBLEMS
Finite volume method for three-dimensional diffusion problems
• Following the procedure developed for one- and two-dimensional cases the discretised form of
equation is obtained:
∅𝐸 − ∅𝑃 ∅𝑃 − ∅𝑊
Γ𝑒 𝐴𝑒 − Γ𝑤 𝐴𝑤
𝛿𝑥𝑃𝐸 𝛿𝑥𝑊𝑃
∅𝑁 − ∅ 𝑃 ∅𝑃 − ∅𝑆
+ Γ𝑛 𝐴𝑛 − Γ𝑠 𝐴𝑠
𝛿𝑦𝑃𝑁 𝛿𝑦𝑆𝑃
∅ 𝑇 − ∅𝑃 ∅𝑃 − ∅𝐵
+ Γ𝑡 𝐴𝑡 − Γ𝑏 𝐴𝑏
𝛿𝑧𝑃𝑇 𝛿𝑦𝐵𝑃
+ 𝑆𝑢 + 𝑆𝑝 ∅𝑃 = 0
THE FINITE VOLUME METHOD FOR DIFFUSION PROBLEMS
Finite volume method for three-dimensional diffusion problems
• As before, this can be rearranged to give the discretised equation for interior nodes:
𝑎𝑊 𝑎𝐸 𝑎𝑆 𝑎𝑁 𝑎𝐵 𝑎𝑇 𝑎𝑃
Γ𝑤 𝐴𝑤 Γ𝑒 𝐴𝑒 Γ𝑠 𝐴𝑠 Γ𝑛 𝐴𝑛 Γ𝑏 𝐴𝑏 Γ𝑡 𝐴𝑡 𝑎𝑊 + 𝑎𝐸
𝛿𝑥𝑊𝑃 𝛿𝑥𝑃𝐸 𝛿𝑦𝑆𝑃 𝛿𝑦𝑃𝑁 𝛿𝑧𝐵𝑃 𝛿𝑧𝑃𝑇 + 𝑎𝑆 + 𝑎𝑁 + 𝑎𝐵 + 𝑎𝑇 − 𝑆𝑃
CONSERVATION LAWS OF FLUID MOTION
ASSIGNMENT NO. 3