02 FVM For Steady State Diffusion
02 FVM For Steady State Diffusion
Mathematically,
𝜕 𝜌𝜙
+ div 𝜌𝜙𝐮 = div Γ grad 𝜙 + 𝑆𝜙
𝜕𝑡
Equation of steady state diffusion
div Γ grad 𝜙 + 𝑆𝜙 = 0
න 𝐧 ⋅ Γ grad 𝜙 𝑑𝐴 + න 𝑆𝜙 𝑑𝑉 = 0 න ∇ ⋅ 𝜙 𝑑𝑉 = න 𝜙 ⋅ 𝒏 𝑑𝐴
𝑉 𝑆
𝐴 𝐶𝑉
ҧ
𝑛𝑖 ⋅ Γ grad 𝜙 𝑖 𝛢𝑖 + 𝑆∆𝑉 =0
ϕB = constant
ϕA = constant
P E
A B
W w e
𝑑 𝑑𝜙
Γ +𝑆 =0
𝑑𝑥 𝑑𝑥
Control volume Nodal Points
W w e E
P
Δx = δxwe
34
Finite Volume Method:
1-D Steady State Diffusion
Step 2: Integrate over Control Volume
𝑑 𝑑𝜙
Γ +𝑆 =0
𝑑𝑥 𝑑𝑥
𝑑 𝑑𝜙
න Γ 𝑑𝑉 + න 𝑆 𝑑𝑉 = 0
𝑑𝑥 𝑑𝑥
∆𝑉 ∆𝑉
𝑑𝜙
න 𝒏⋅ Γ 𝑑𝐴 + න 𝑆𝑑𝑉 = 0
∆𝐴 𝑑𝑥 Δ𝑉 𝑒
𝑑 𝑑𝜙
න Γ𝛢 𝑑𝑥 + න 𝑆𝑑𝑉 = 0
𝑑𝜙 𝑤 𝑑𝑥 𝑑𝑥 Δ𝑉
𝑛𝑖 ⋅ Γ ҧ
𝛢𝑖 + 𝑆∆𝑉 =0
𝑑𝑥 𝑖
𝑑𝜙 𝑑𝜙
Γ𝐴 − Γ𝐴 ҧ
+ 𝑆∆𝑉 =0
𝑑𝑥 𝑒
𝑑𝑥 𝑤
35
Finite Volume Method:
1-D Steady State Diffusion
The values of the property 𝜙 and the diffusion
coefficient are defined and evaluated at nodal points
The interface diffusion coefficient Γ and the gradient 𝜙
𝑑𝜙/𝑑𝑥 at east (e) and west (w) are required.
Step 3: Make linear profile assumption between
cell centroids for ϕ.
W w P e E
𝑑𝜙 𝜙𝐸 − 𝜙𝑃 x
Γ𝐴 = Γ𝑒 𝐴𝑒 Central
𝑑𝑥 𝑒
𝛿𝑥𝑃𝐸
Differencing
𝑑𝜙 𝜙𝑃 − 𝜙𝑊 Scheme
𝜙
Γ𝐴 = Γ𝑤 𝐴𝑤
𝑑𝑥 𝑤
𝛿𝑥𝑊𝑃
In a uniform grid linearly interpolated values of Γ
Γ𝑊 + Γ𝑃 Γ𝑃 + Γ𝐸
Γ𝑤 = Γ𝑒 = W w P e E
2 2 x 36
Finite Volume Method:
1-D Steady State Diffusion
Treatment of the source term
Often, the source term S is a function of the dependent variable 𝜙 itself.
In such cases the finite volume method approximates the source term by
means of a linear form
𝑆ҧ = 𝑆𝑢 + 𝑆𝑝 𝜙𝑃
Profile assumptions for 𝜙 and S need not be the same.
Substitution gives
𝜙𝐸 − 𝜙𝑃 𝜙𝑃 − 𝜙𝑊
Γ𝑒 𝐴𝑒 − Γ𝑤 𝐴𝑤 + 𝑆𝑢 + 𝑆𝑝 𝜙𝑃 ∆𝑉 = 0
𝛿𝑥𝑃𝐸 𝛿𝑥𝑊𝑃
Γ𝑒 Γ𝑤 Γ𝑤 Γ𝑒
𝐴𝑒 + 𝐴𝑤 − 𝑆𝑝 ∆𝑉 𝜙𝑃 = 𝐴𝑤 𝜙𝑊 + 𝐴𝑒 𝜙𝐸 + 𝑆𝑢 ∆𝑉
𝛿𝑥𝑃𝐸 𝛿𝑥𝑊𝑃 𝛿𝑥𝑊𝑃 𝛿𝑥𝑃𝐸
𝑎𝑃 𝜙𝑃 = 𝑎𝑊 𝜙𝑊 + 𝑎𝐸 𝜙𝐸 + 𝑆𝑢 ∆𝑉
where Γ𝑤 Γe
𝑎𝑊 = 𝐴 𝑎𝐸 = 𝐴 𝑎𝑃 = 𝑎𝑊 + 𝑎𝐸 − 𝑆𝑝 ∆𝑉
𝛿𝑥𝑊𝑃 𝑤 𝛿𝑥𝑃𝐸 𝑒 37
Finite Volume Method:
1-D Steady State Diffusion
Step 4: Solution of equations
𝑎𝑃 𝜙𝑃 = 𝑎𝑊 𝜙𝑊 + 𝑎𝐸 𝜙𝐸 + 𝑆𝑢 ∆𝑉
Approximate, but
physically realistic
𝜙
Exact
Unrealistic
x
39
Basic Rules
Rule 1: Consistency at control-volume faces
When a face is common to two adjacent control volumes, the flux
across it must be represented by the same expression in the
discretization equations for the two control volumes.
W w P e E W P E EE
x x
40
Basic Rules
Rule 2: Positive coefficients
All coefficients (aP and neighbor coefficients anb) must always be
positive.
Solution:
𝑑 𝑑𝑇
𝑘 =0
𝑑𝑥 𝑑𝑥
𝑘 𝑘 𝑘 𝑘
𝐴 + 𝐴 𝑇𝑃 = 𝐴 𝑇𝑊 + 𝐴 𝑇𝐸
𝛿𝑥 𝛿𝑥 𝛿𝑥 𝛿𝑥
𝑘 𝑘
Discretized equation for nodal points 2, 3 and 4 is 𝑎𝑊 = 𝐴, 𝑎𝐸 = 𝐴
𝛿𝑥 𝛿𝑥
𝑎𝑃 𝑇𝑃 = 𝑎𝑊 𝑇𝑊 + 𝑎𝐸 𝑇𝐸 𝑎𝑃 = 𝑎𝑊 + 𝑎 𝐸
45
Example: 1-D Steady State Diffusion
For control volume surrounding point 1 TA 1 2
𝑇𝐸 − 𝑇𝑃 𝑇𝑃 − 𝑇𝐴
𝑘𝐴 − 𝑘𝐴 =0 δx/2 δx
𝛿𝑥 𝛿𝑥Τ2
𝑘 2𝑘 𝑘 2𝑘
𝐴+ 𝐴 𝑇𝑃 = 0. 𝑇𝑊 + 𝐴 𝑇𝐸 + 𝐴 𝑇𝐴
𝛿𝑥 𝛿𝑥 𝛿𝑥 𝛿𝑥
The fixed temperature boundary condition enters the calculation as a source
term 𝑆ҧ = 𝑆𝑢 + 𝑆𝑃 𝑇𝑃 with 𝑆𝑢 ∆𝑉 = 2𝑘𝐴Τ𝛿𝑥 𝑇𝐴 and 𝑆𝑝 ∆𝑉 = − 2𝑘𝐴Τ𝛿𝑥
𝑎𝑃 𝑇𝑃 = 𝑎𝑊 𝑇𝑊 + 𝑎𝐸 𝑇𝐸 + 𝑆𝑢 ∆𝑉
𝑘
𝑎𝑊 = 0, 𝑎𝐸 = 𝐴 𝑎𝑃 = 𝑎𝑊 + 𝑎𝐸 − 𝑆𝑝 ∆𝑉
𝛿𝑥 4 TB
5
Similarly, for boundary node 5
δx δx/2
𝑎𝑃 𝑇𝑃 = 𝑎𝑊 𝑇𝑊 + 𝑎𝐸 𝑇𝐸 + 𝑆𝑢 ∆𝑉
𝑘
𝑎𝑊 = 𝐴, 𝑎𝐸 = 0, 𝑎𝑃 = 𝑎𝑊 + 𝑎𝐸 − 𝑆𝑝 ∆𝑉
𝛿𝑥 46
Example: 1-D Steady State Diffusion
The resulting set of algebraic
equations is
47
Example: 1-D Steady State Diffusion
• MATLAB / Python Code of Example 4-1
48
Finite Difference & Finite Volume Method
𝑑2 𝜙
Consider 1D diffusion equation: Γ 2 +𝑆 =0
𝑑𝑥
𝜙𝐴 1 2 3 4 𝜙𝐵 𝜙𝐴 1 2 3 4 5 𝜙𝐵
𝑖−1 𝑖 𝑖+1 Δx W w P e E Δx
From Taylor series Integrating over control volume P
𝑒
𝑑2 𝜙 𝜙𝑖−1 − 2𝜙𝑖 + 𝜙𝑖+1 𝑑 𝑑𝜙
= න Γ𝛢 𝑑𝑥 + න 𝑆𝑑𝑉 = 0
𝑑𝑥 2 𝑖
∆𝑥 2 𝑤 𝑑𝑥 𝑑𝑥 Δ𝑉
For node 2 𝑑𝜙 𝑑𝜙
Γ𝐴 − Γ𝐴 ҧ
+ 𝑆∆𝑉 =0
𝑑𝑥 𝑑𝑥
𝑑2 𝜙 𝜙1 − 2𝜙2 + 𝜙3 𝑒 𝑤
Γ =Γ 𝜙𝐸 − 𝜙𝑃 𝜙𝑃 − 𝜙𝑊
𝑑𝑥 2 ∆𝑥 2
2 Γ𝑒 𝐴𝑒 − Γ𝑤 𝐴𝑤
𝛿𝑥 𝛿𝑥
𝑆2 = 𝑆 𝜙2
+ ഥ𝑆∆𝑉 = 0
2Γ Γ Γ 2Γ Γ Γ
𝜙 = 𝜙 + 𝜙3 + 𝑆2 𝜙2 = 𝜙1 + 𝜙3 + ഥ𝑆∆𝑥 2
∆𝑥 2 2 ∆𝑥 2 1 ∆𝑥 2
∆𝑥 ∆𝑥 ∆𝑥
49
Finite Difference & Finite Volume Method
Let 𝜙 be temperature and Γ is thermal conductivity k, with no source
Data: 𝑘 = 250 𝑊/𝑚. 𝐾 and ∆𝑥 = 0.1𝑚 𝑇𝐴 = 100℃ 𝑇𝐵 = 25℃ 𝑆 = 0
2𝑇1 = 𝑇2 + 𝑇𝐴 3𝑇1 = 𝑇2 + 2𝑇𝐴
2𝑇2 = 𝑇1 + 𝑇3 2𝑇2 = 𝑇1 + 𝑇3
2𝑇3 = 𝑇2 + 𝑇4
2𝑇3 = 𝑇2 + 𝑇4
2𝑇4 = 𝑇3 + 𝑇5
2𝑇4 = 𝑇3 + 𝑇𝐵 3𝑇5 = 𝑇4 + 2𝑇𝐵
3 −1 0 0 0 𝑇1 200
2 −1 0 0 𝑇1 100 −1 2 −1 0 0 𝑇2 0
−1 2 −1 0 𝑇2 0 0 −1 2 −1 0 𝑇3 = 0
=
0 −1 2 −1 𝑇3 0 0 0 −1 2 −1 𝑇4 0
0 0 −1 2 𝑇4 25 0 0 0 −1 3 𝑇5 50
50
Example 2:
1-D Steady State Diffusion with Sources
Figure 4.6 shows 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°C and
200°C respectively.
𝑑 𝑑𝑇
𝑘 +𝑞 =0
𝑑𝑥 𝑑𝑥
𝑑 𝑑𝑇
න 𝑘 𝑑𝑉 + න 𝑞 𝑑𝑉 = 0
𝑑𝑥 𝑑𝑥
∆𝑉 ∆𝑉
𝑒
𝑑 𝑑𝜙
න 𝑘𝛢 𝑑𝑥 + න 𝑞𝑑𝑉 = 0
𝑤 𝑑𝑥 𝑑𝑥 Δ𝑉
𝑑𝑇 𝑑𝑇
Γ𝐴 − Γ𝐴 + 𝑞∆𝑉 = 0 ҧ
𝑆∆𝑉 = 𝑞∆𝑉
𝑑𝑥 𝑒
𝑑𝑥 𝑤
𝑇𝐸 − 𝑇𝑃 𝑇𝑃 − 𝑇𝑊
𝑘𝑒 𝐴 − 𝑘𝑤 𝐴 + 𝑞𝐴𝛿𝑥 = 0
𝛿𝑥 𝛿𝑥
53
Example 2:
1-D Steady State Diffusion with Sources
Node 2, 3 and 4
𝑘 𝑒 𝐴 𝑘𝑤 𝐴 𝑘𝑤 𝐴 𝑘𝑒 𝐴
+ 𝑇𝑃 = 𝑇𝑊 + 𝑇𝐸 + 𝑞𝐴𝛿𝑥
𝛿𝑥 𝛿𝑥 𝛿𝑥 𝛿𝑥
Node 1
𝑇𝐸 − 𝑇𝑃 𝑇𝑃 − 𝑇𝐴
𝑘𝑒 𝐴 − 𝑘𝐴 𝐴 + 𝑞𝐴𝛿𝑥 = 0 𝑎𝑃 𝑇𝑃 = 𝑎𝑊 𝑇𝑊 + 𝑎𝐸 𝑇𝐸 + 𝑆𝑢 ∆𝑉
𝛿𝑥 𝛿𝑥/2
Node 5
𝑇𝐵 − 𝑇𝑃 𝑇𝑃 − 𝑇𝑊
𝑘𝐵 𝐴 − 𝑘𝑤 𝐴 + 𝑞𝐴𝛿𝑥 = 0
𝛿𝑥/2 𝛿𝑥
55
Example 2:
1-D Steady State Diffusion with Sources
56
Example 3:
1-D Steady State Diffusion with Sources
Shown in Figure 4.9 is a cylindrical fin with uniform cross sectional area
A. The base is at a temperature of 100°C (TB) and the end is insulated.
The fin is exposed to an ambient temperature of 20°C.
One dimensional heat transfer in this
situation is governed by
d d𝑇
𝑘𝐴 − ℎ𝑃 𝑇 − 𝑇∞ = 0
d𝑥 d𝑥
d d𝑇
− 𝑛2 𝑇 − 𝑇∞ = 0 where 𝑛2 = ℎ𝑃Τ 𝑘𝐴
d𝑥 d𝑥
d d𝑇
න d𝑉 − න 𝑛2 𝑇 − 𝑇∞ 𝑑𝑉 = 0
∆𝑉 d𝑥 d𝑥 Δ𝑉
d𝑇 d𝑇
𝐴 − 𝐴 − 𝑛2 𝑇𝑃 − 𝑇∞ 𝐴𝛿𝑥 = 0
d𝑥 𝑒
d𝑥 𝑤
𝑇𝐸 − 𝑇𝑃 𝑇𝑃 − 𝑇𝑊
− − 𝑛2 𝑇𝑃 − 𝑇∞ 𝛿𝑥 = 0
𝛿𝑥 𝛿𝑥
1 1 1 1
+ 𝑇𝑃 = 𝑇𝑊 + 𝑇𝐸 + 𝑛2 𝛿𝑥𝑇∞ − 𝑛2 𝛿𝑥𝑇𝑃
𝛿𝑥 𝛿𝑥 𝛿𝑥 𝛿𝑥
58
Example 3:
1-D Steady State Diffusion with Sources
For nodal points 2, 3 and 4 is
1 1 1 1
+ 𝑇𝑃 = 𝑇𝑊 + 𝑇𝐸 + 𝑛2 𝛿𝑥𝑇∞ − 𝑛2 𝛿𝑥𝑇𝑃
𝛿𝑥 𝛿𝑥 𝛿𝑥 𝛿𝑥
1 1 2
1 1
+ + 𝑛 𝛿𝑥 𝑇𝑃 = 𝑇𝑊 + 𝑇𝐸 + 𝑛2 𝛿𝑥𝑇∞
𝛿𝑥 𝛿𝑥 𝛿𝑥 𝛿𝑥
𝑎𝑃 𝑇𝑃 = 𝑎𝑊 𝑇𝑊 + 𝑎𝐸 𝑇𝐸 + 𝑆𝑢 ∆𝑉
𝑎𝑊 𝑎𝐸 𝑎𝑃 𝑆𝑃 ∆𝑥 𝑆𝑢 ∆𝑥
1 1
𝑎𝑊 + 𝑎𝐸 − 𝑆𝑃 ∆𝑉 −𝑛2 𝛿𝑥 𝑛2 𝛿𝑥𝑇∞
𝛿𝑥 𝛿𝑥
59
Example 3:
1-D Steady State Diffusion with Sources
For nodal point 1 𝑇𝐸 − 𝑇𝑃 𝑇𝑃 − 𝑇𝐵
− − 𝑛2 𝑇𝑃 − 𝑇∞ 𝛿𝑥 = 0
𝛿𝑥 𝛿𝑥Τ2
2 1 2 1
+ + 𝑛2 𝛿𝑥 𝑇𝑃 = 𝑇𝐵 + 𝑇𝐸 + 𝑛2 𝛿𝑥𝑇∞
𝛿𝑥 𝛿𝑥 𝛿𝑥 𝛿𝑥
𝑎𝑊 𝑎𝐸 𝑎𝑃 𝑆𝑃 ∆𝑥 𝑆𝑢 ∆𝑥
1 2 2
2
0 𝑎𝑊 + 𝑎𝐸 − 𝑆𝑃 ∆𝑉 −𝑛2 𝛿𝑥 − 𝑛 𝛿𝑥𝑇∞ + 𝑇𝐵
𝛿𝑥 𝛿𝑥 𝛿𝑥
61
Effect of Grid
If the rod length sub-
divided into 10 control
volumes instead of 5.