04 2D Steady State Diffusion
04 2D Steady State Diffusion
𝜕𝜙 𝜕𝜙
𝑛𝑖 ⋅ Γ 𝐴 𝑖 + 𝑛𝑖 ⋅ Γ ҧ
𝐴𝑖 + 𝑆∆𝑉 =0
𝜕𝑥 𝑖
𝜕𝑦 𝑖
91
Finite Volume Method:
2-D Steady State Diffusion
𝜕 𝜕𝜙 𝜕 𝜕𝜙 N
Γ + Γ + 𝑆𝜙 = 0
𝜕𝑥 𝜕𝑥 𝜕𝑦 𝜕𝑦
n A
n δyPN
In addition to the east (E) and W Aw P Ae E
e Δy
west (W) neighbours, a general w
grid node P now also has north A δySP
s s
(N) and south (S) neighbours
S
δxWP δxPE
𝜕 𝜕𝜙 𝜕 𝜕𝜙 Δx
න Γ 𝑑𝑉 + න Γ 𝑑𝑉 + න 𝑆𝜙 𝑑𝑉 = 0
𝜕𝑥 𝜕𝑥 𝜕𝑦 𝜕𝑦
∆𝑉 ∆𝑉 ∆𝑉
𝑛 𝑒 𝑛 𝑒
𝜕 𝜕𝜙 𝜕 𝜕𝜙
නන Γ 𝑑𝑥. 𝑑𝑦 + න න Γ 𝑑𝑥. 𝑑𝑦 + න 𝑆𝜙 𝑑𝑉 = 0
𝜕𝑥 𝜕𝑥 𝜕𝑦 𝜕𝑦
𝑠 𝑤 𝑠 𝑤 ∆𝑉
𝑒 𝑛 𝑛 𝑒
𝜕𝜙 𝜕𝜙
Γ න 𝑑𝑦 + Γ ҧ
න 𝑑𝑥 + 𝑆∆𝑉 =0
𝜕𝑥 𝑤
𝜕𝑦 𝑠 𝑤
𝑠 92
Finite Volume Method:
2-D Steady State Diffusion
𝜕𝜙 𝜕𝜙 𝜕𝜙 𝜕𝜙
Γ𝑒 𝐴𝑒 − Γ𝑤 𝐴𝑤 + Γ𝑛 𝐴𝑛 − Γ𝑠 𝐴𝑠 ҧ
+ 𝑆∆𝑉 =0
𝜕𝑥 𝑒
𝜕𝑥 𝑤
𝜕𝑦 𝑛
𝜕𝑦 𝑠
𝐴𝑒 = 𝐴𝑤 = ∆𝑦 and 𝐴𝑛 = 𝐴𝑥 = ∆𝑥
𝜕𝜙 𝜙𝑃 − 𝜙𝑊
Flux across the west face = Γ𝑤 𝐴𝑤 ቤ = Γ𝑤 𝐴𝑤
𝜕𝑥 𝑤 𝛿𝑥𝑊𝑃
𝜕𝜙 𝜙𝐸 − 𝜙𝑃
Flux across the east face = Γ𝑒 𝐴𝑒 ቤ = Γ𝑒 𝐴𝑒
𝜕𝑥 𝛿𝑥𝑃𝐸 An δyPN
𝑒
𝜕𝜙 𝜙 − 𝜙𝑆 Aw Ae
Flux across the south face = Γ𝑠 𝐴𝑠 ቤ = Γ𝑠 𝐴𝑠 𝑃
𝜕𝑦 𝑠 𝛿𝑦𝑆𝑃
𝜕𝜙 𝜙𝑁 − 𝜙𝑃
As δySP
Flux across the north face= Γ𝑛 𝐴𝑛 ቤ = Γ𝑛 𝐴𝑛
𝜕𝑦 𝑛 𝛿𝑦𝑃𝑁
By substituting the expressions of fluxes into equation δxWP δxPE
𝜙𝐸 − 𝜙𝑃 𝜙𝑃 − 𝜙𝑊
Γ𝑒 𝐴𝑒 − Γ𝑤 𝐴𝑤 +
𝛿𝑥𝑃𝐸 𝛿𝑥𝑊𝑃
𝜙𝑁 − 𝜙𝑃 𝜙𝑃 − 𝜙𝑆
Γ𝑛 𝐴𝑛 − Γ𝑠 𝐴𝑠 + 𝑆𝑢 + 𝑆𝑝 𝜙𝑃 ∆𝑉 = 0
𝛿𝑦𝑃𝑁 𝛿𝑦𝑆𝑃 93
Finite Volume Method:
2-D Steady State Diffusion
This equation can be rearranged as
Γ𝑤 𝐴𝑤 Γ𝑒 𝐴𝑒 Γ𝑠 𝐴𝑠 Γ𝑛 𝐴𝑛
+ + + − 𝑆𝑝 ∆𝑉 𝜙𝑃
𝛿𝑥𝑊𝑃 𝛿𝑥𝑃𝐸 𝛿𝑦𝑆𝑃 𝛿𝑦𝑃𝑁
Γ𝑤 𝐴𝑤 Γ𝑒 𝐴𝑒 Γ𝑠 𝐴𝑠 Γ𝑛 𝐴𝑛
= 𝜙 + 𝜙 + 𝜙 + 𝜙 + 𝑆𝑢 ∆𝑉
𝛿𝑥𝑊𝑃 𝑊 𝛿𝑥𝑃𝐸 𝐸 𝛿𝑦𝑆𝑃 𝑆 𝛿𝑦𝑃𝑁 𝑁
𝑎𝑃 𝜙𝑃 = 𝑎𝑊 𝜙𝑊 + 𝑎𝐸 𝜙𝐸 + 𝑎𝑆 𝜙𝑆 + 𝑎𝑁 𝜙𝑁 + 𝑆𝑢 ∆𝑉
with 𝑎𝑃 = 𝑎𝑊 + 𝑎𝐸 + 𝑎𝑆 + 𝑎𝑁 − 𝑆𝑝 ∆𝑉
Γ𝑤 𝐴𝑤 Γ𝑒 𝐴𝑒 Γ𝑠 𝐴𝑠 Γ𝑛 𝐴𝑛
𝑎𝑊 = 𝑎𝐸 = 𝑎𝑆 = 𝑎𝑁 =
𝛿𝑥𝑊𝑃 𝛿𝑥𝑃𝐸 𝛿𝑦𝑆𝑃 𝛿𝑦𝑃𝑁
94
Von Neumann Boundary Conditions
In this case, a flux (or normal gradient to the face) for the quantity 𝜙 is
specified at the boundary N
𝜕𝜙 𝜕𝜙
Γ𝑒 𝐴𝑒 − Γ𝑤 𝐴𝑤 + n
𝜕𝑥 𝜕𝑥 A δxb
𝑒 𝑤 P E Δy
𝑞𝑏
w e
𝜕𝜙 𝜕𝜙 s
Γ𝑛 𝐴𝑛 − Γ𝑠 𝐴𝑠 ҧ
+ 𝑆∆𝑉 =0
𝜕𝑦 𝑛
𝜕𝑦 𝑠 Δx
S
𝜙𝐸 − 𝜙𝑃 𝜙𝑁 − 𝜙𝑃 𝜙𝑃 − 𝜙𝑆
Γ𝑒 𝐴𝑒 − 𝑞𝑏 𝐴𝑤 + Γ𝑛 𝐴𝑛 − Γ𝑠 𝐴𝑠 + 𝑆𝑢 + 𝑆𝑝 𝜙𝑃 ∆𝑉 = 0
𝛿𝑥 𝛿𝑦 𝛿𝑦
𝑎𝑃 𝜙𝑃 = 𝑎𝑊 𝜙𝑊 + 𝑎𝐸 𝜙𝐸 + 𝑎𝑆 𝜙𝑆 + 𝑎𝑁 𝜙𝑁 + 𝑏
with 𝑎𝑃 = 𝑎𝐸 + 𝑎𝑆 + 𝑎𝑁 − 𝑆𝑝 ∆𝑉
Γ𝑒 𝐴𝑒 Γ𝑠 𝐴𝑠 Γ𝑛 𝐴𝑛
𝑎𝑊 = 0 𝑎𝐸 = 𝑎𝑆 = 𝑎𝑁 = 𝑏 = 𝑞𝑏 𝐴𝑤 + 𝑆𝑢 ∆𝑉
𝛿𝑥𝑃𝐸 𝛿𝑦𝑆𝑃 𝛿𝑦𝑃𝑁 95
Von Neumann Boundary Conditions
If both 𝑞𝑏 and 𝑆𝑢 are zero, then 𝜙𝑃 will be bounded by its neighbors.
Otherwise, 𝜙𝑃 can exceed (or fall below) the neighbor values of 𝜙 ,
which is admissible.
𝑞𝑏 + Γ𝑏 Τ𝛿𝑥𝑏 𝜙𝑃
𝜙𝑏 =
Γ𝑏 Τ𝛿𝑥𝑏
96
Example: 2-D Steady State Diffusion
A two-dimensional plate of
thickness 1 cm is shown.
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.
101
Example: 2-D Steady State Diffusion
102
Example: 2-D Steady State Diffusion
Application of the TDMA to two-dimensional problems
𝑎𝑃 𝜙𝑃 = 𝑎𝑊 𝜙𝑊 + 𝑎𝐸 𝜙𝐸 + 𝑎𝑆 𝜙𝑆 + 𝑎𝑁 𝜙𝑁 + 𝑏
−𝑎𝑆 𝜙𝑆 + 𝑎𝑃 𝜙𝑃 − 𝑎𝑁 𝜙𝑁 = 𝑎𝑊 𝜙𝑊 + 𝑎𝐸 𝜙𝐸 + 𝑏
103
Example: 2-D Steady State Diffusion
Application of the TDMA to two-dimensional problems
All west coefficients are zero at points 1, 2, 3 and 4
East values (points 5, 6, 7 and 8) are required for the evaluation of C
They are unknown at this stage and are assumed to be zero as an initial guess
104
Example: 2-D Steady State Diffusion
For line 1: 𝜙𝑗 = 𝐴𝑗 𝜙𝑛+1 + 𝐶𝑗′
105
Example: 2-D Steady State Diffusion
For line 2: For line 3:
227.7
106
Example: 2-D Steady State Diffusion
107
Mixed Boundary Condition
The mixed boundary condition refers to the situation where information
at the boundary is given via a convection transfer coefficient (ℎ∞ ) and
a surrounding value for 𝜙∞ as
ℎ∞ 𝐴 𝜙∞ − 𝜙𝑏
N
For the boundary control volume
Δx
𝜙𝑏 − 𝜙𝑃 ℎ∞
𝑘𝐴 = ℎ∞ 𝐴 𝜙∞ − 𝜙𝑏 P 𝜙𝑏
𝛿𝑥𝑏 W
Δy
𝜙∞
δxb
ℎ∞ 𝜙∞ + 𝑘Τ𝛿𝑥𝑏 𝜙𝑃 ℎ∞ 𝛿𝑥𝑏 Τ𝑘 𝜙∞ + 𝜙𝑃
𝜙𝑏 = =
ℎ∞ + 𝑘Τ𝛿𝑥𝑏 1 + ℎ∞ 𝛿𝑥𝑏 Τ𝑘 S
ℎ∞ 𝜙∞ + 𝑘Τ𝛿𝑥𝑏 𝜙𝑃
ℎ∞ 𝐴 𝜙∞ − 𝜙𝑏 ℎ∞ 𝐴 𝜙∞ −
ℎ∞ + 𝑘Τ𝛿𝑥𝑏
ℎ∞ 𝜙∞ + 𝑘Τ𝛿𝑥𝑏 𝜙∞ − ℎ∞ 𝜙∞ − 𝑘Τ𝛿𝑥𝑏 𝜙𝑃
= ℎ∞ 𝐴
ℎ∞ + 𝑘Τ𝛿𝑥𝑏
𝜙𝑏 − 𝜙𝑃 ℎ∞ 𝑘Τ𝛿𝑥𝑏
𝑘𝐴 = 𝐴 𝜙∞ − 𝜙𝑃 = 𝑅𝑒𝑞 𝐴 𝜙∞ − 𝜙𝑃
𝛿𝑥𝑏 ℎ∞ + 𝑘Τ𝛿𝑥𝑏
108
Mixed Boundary Condition
The discretization equation for the boundary control volume P.
𝑎𝑃 𝜙𝑃 = 𝑎𝑊 𝜙𝑊 + 𝑎𝑁 𝜙𝑁 + 𝑎𝑆 𝜙𝑆 + 𝑏
𝑘 𝑘 𝑘
𝑎𝐸 = 0 𝑎𝑊 = 𝐴 𝑎𝑁 = 𝐴 𝑎𝑆 = 𝐴
𝛿𝑥 𝛿𝑦 𝛿𝑦
N
𝑎𝑃 = 𝑎𝐸 + 𝑎𝑊 + 𝑎𝑁 + 𝑎𝑆 − 𝑆𝑝 ∆𝑥∆𝑦 Δx
ℎ∞
𝑏 = 𝑅𝑒𝑞 ∆𝑦𝜙∞ + 𝑆𝑢 ∆𝑥∆𝑦 W P 𝜙𝑏 𝜙∞
ℎ∞ 𝑘Τ𝛿𝑥𝑏 ℎ∞ Δy δxb
𝑅𝑒𝑞 = =
Τ
ℎ∞ + 𝑘 𝛿𝑥𝑏 1 + ℎ∞ 𝛿𝑥𝑏 Τ𝑘
S
𝑎𝑃 > ∑𝑎𝑛𝑏 for the boundary cell 𝑃 if 𝑆 = 0.
Thus, mixed boundaries are like Dirichlet boundaries
in that the boundary condition helps ensure that the
Scarborough criterion is met
The cell value 𝜙𝑃 is bounded by its neighbor values and the external value, 𝜙∞
The boundary value, 𝜙𝑏 , may be computed once a solution has been obtained.
It is bounded by 𝜙𝑃 and 𝜙∞ as shown on previous slide
109
Finite Volume Method:
3-D Steady State Diffusion
𝜕 𝜕𝜙 𝜕 𝜕𝜙 𝜕 𝜕𝜙
Γ + Γ + Γ + 𝑆𝜙 = 0
𝜕𝑥 𝜕𝑥 𝜕𝑦 𝜕𝑦 𝜕𝑧 𝜕𝑧
𝜕𝜙 𝜕𝜙
Γ𝑒 𝐴𝑒 − Γ𝑤 𝐴𝑤
𝜕𝑥 𝑒
𝜕𝑥 𝑤
𝜕𝜙 𝜕𝜙
+ Γ𝑛 𝐴𝑛 − Γ𝑠 𝐴𝑠
𝜕𝑦 𝑛
𝜕𝑦 𝑠
𝜕𝜙 𝜕𝜙
+ Γ𝑡 𝐴𝑡 − Γ𝑏 𝐴𝑏 ҧ
+ 𝑆∆𝑉 =0
𝜕𝑧 𝑡
𝜕𝑧 𝑏
𝜙𝐸 − 𝜙𝑃 𝜙𝑃 − 𝜙𝑊 𝜙𝑁 − 𝜙𝑃 𝜙𝑃 − 𝜙𝑆
Γ𝑒 𝐴𝑒 − Γ𝑤 𝐴𝑤 + Γ𝑛 𝐴𝑛 − Γ𝑠 𝐴𝑠
𝛿𝑥𝑃𝐸 𝛿𝑥𝑊𝑃 𝛿𝑦𝑃𝑁 𝛿𝑦𝑆𝑃
𝜙 𝑇 − 𝜙𝑃 𝜙𝑃 − 𝜙𝐵
+ Γ𝑡 𝐴𝑡 − Γ𝑏 𝐴𝑏 + 𝑆𝑢 + 𝑆𝑝 𝜙𝑃 ∆𝑉 = 0
𝛿𝑧𝑃𝑇 𝛿𝑧𝐵𝑃
𝑎𝑃 𝜙𝑃 = 𝑎𝑊 𝜙𝑊 + 𝑎𝐸 𝜙𝐸 + 𝑎𝑆 𝜙𝑆 + 𝑎𝑁 𝜙𝑁 + 𝑎𝐵 𝜙𝐵 + 𝑎 𝑇 𝜙 𝑇 + 𝑏
110
Finite Volume Method:
3-D Steady State Diffusion
111
Finite Volume Method:
Steady State Diffusion
𝑎𝑃 𝜙𝑃 = ∑𝑎𝑛𝑏 𝜙𝑛𝑏 + 𝑆𝑢
𝑎𝑊 , 𝑎𝐸 in one dimension
𝑎𝑊 , 𝑎𝐸 , 𝑎𝑆 , 𝑎𝑁 , 𝑎𝐵 , 𝑎 𝑇 in three dimension
𝑎𝑃 = ∑𝑎𝑛𝑏 − 𝑆𝑝
112
Assignment
• You are provided with a Python code for the solution of
Example 7-2 by finite volume method using central difference
discretization scheme by incorporating the functions of
Guass-Seidal iterative scheme and
TDMA line-by-line technique as discussed in class.
• Replace one of the insulted boundaries with mixed boundary
condition with h = 200 W/(m2.°C), and T∞= 20°C and derive
the discretized algebraic equations and values of coefficients.
• Modify the code accordingly to compute the temperatures for
Δx = Δy = 0.1 and Δx = Δy = 0.05
• Also compute the boundary temperature at boundary with
mixed boundary condition.
114
Assignment
Temperature 100 °C
Consider a non-uniform grid as shown in figure.
The location of control volume faces are given as
follows:
Insulated
0.000
116