Theme 3 Finite Volume Method (FVM)
Theme 3 Finite Volume Method (FVM)
Theme 3 Finite Volume Method (FVM)
Overview
→ Basic Methodology
→ Discretization of the Domain
→ Integrate the DE over the CV’s
→ Approximate the Integral
→ Assembling the Discrete System
→ Solve Iteratively or Simultaneously
→ Diffusion and Convective Problems
→ Central Difference, Upwind & QUICK Methods
Use integration
→ Staggered Arrangement
→ Pressure-Velocity Coupled Problems
The problem starts with the format of the momentum and energy equations.
∂ ∂vx
∂t
(vx ) ✔ vx ∂x
1
MKM 411 – Computational Fluid Dynamics (CFD) Theme 3
DT
Energy Equation: ρc = Φ + k∇2 T + ġ
Dt
2 2 2
∂T ∂T ∂T ∂T ∂ T ∂ T ∂ T
ρc ( +u +v + w ) = Φ + k( + + 2 ) + ġ
∂t ∂x ∂y ∂z ∂x2 ∂y2 ∂z
∂u 2 ∂v 2 ∂w 2 ∂v ∂u 2 ∂w ∂v 2 ∂u ∂w 2
Φ = 2μ [( ∂x ) + (∂y) + ( ∂z ) ] + μ [∂x + ∂y
] + μ [ ∂y
+ ∂z
] + μ [ ∂z + ∂x
]
∂u ∂u ∂u
Let’s see if we can write: div(uu) = u ∂x + v ∂y + w ∂z
⃗⃗) = ( ∂ ⃗i +
div(uu) = ∇ ∙ (u2⃗i + uvj⃗ + uwk
∂ ⃗ ∂
j + ∂z ⃗⃗k) ∙ (u2⃗i + uvj⃗ + uwk ⃗⃗) = ∂ (u2 ) + ∂ (uv) + ∂ (uw)
∂x ∂y ∂x ∂y ∂z
∂u ∂u ∂v ∂w ∂u ∂u ∂v ∂w ∂u ∂u ∂u
= 2u ∂x + (v ∂y + u ∂y) + (u ∂z + w ∂z ) = (u ∂x + u ∂y + u ∂z ) + (u ∂x + v ∂y + w ∂z )
∂u ∂v ∂w ∂u ∂u ∂u ∂u ∂u ∂u
= u ( ∂x + + ∂z ) + (u ∂x + v ∂y + w ∂z ) = (u ∂x + v ∂y + w ∂z ) ✔
⏟ ∂y
Continuity
for incompressible
=0
For Constant Properties We usually keep the div/∇ in the equation for this section of work
Du ∂p
x- momentum in the CFD textbook: ρ Dt = - ∂x
+ μ div(grad u) + SMx
Du ∂p
x-momentum as already determined: ρ =- + μ∇2 u + ρfx Laplacian derivative: ∇2 u
Dt ∂x
2 2 2
∂ ∂ ⃗ ∂ ⃗⃗ ∂u ∂u ⃗ ∂u ⃗⃗ ∂ u ∂ u ∂ u
div(grad u) = ∇ ∙ (∇u) = ∇2 u = (∂x ⃗i + ∂y
j + ∂z k ) ∙ ( ∂x ⃗i + ∂y
j + ∂z k ) = ∂x2
+ ∂y2
+ ∂z2
= ∇2 u ✔
For FVM, we only work with incompressible, constant property, and Newtonian fluids.
Continuity: div(u) = 0 ∂u ∂v ∂w
∂x
+ ∂y + ∂z = 0 ✔
⃗ ⃗ ⃗⃗
u = ui + vj + wk
For FVM, we only work with incompressible, constant property, and Newtonian fluids.
Therefore, the Navier-Stokes equation is valid for momentum Source term
Du ∂p
x- momentum in the CFD textbook: ρ Dt = - ∂x
+ μ div(grad u) + SMx
We already had:
2 2 2
∂u ∂u ∂u ∂u ∂p ∂ u ∂ u ∂ u Du ∂p
ρ ( ∂t + u ∂x + v ∂y + w ∂z ) = - ∂x
+ ρfx + μ ( ∂x2 + ∂y2
+ ∂z2
) ← ρ Dt = - ∂x
+ μ∇2 u + ρfx
2
MKM 411 – Computational Fluid Dynamics (CFD) Theme 3
For Constant Properties We usually keep the div/∇ in the equation for this section of work
Du ∂p
x- momentum in the CFD textbook: ρ =- + μ div(grad u) + SMx
Dt ∂x
Du ∂p
x-momentum as already determined: ρ Dt = - ∂x
+ μ∇2 u + ρfx Laplacian derivative: ∇2 u
2 2 2
∂ ∂ ⃗ ∂ ∂u ∂u ⃗ ∂u ∂ u ∂ u ∂ u
div(grad u) = ∇ ∙ (∇u) = ∇2 u = (∂x ⃗i + ∂y
j + ∂z ⃗⃗k) ∙ ( ∂x ⃗i + ∂y
j + ∂z ⃗⃗k) = ∂x2
+ ∂y2
+ ∂z2
= ∇2 u ✔
Du ∂p
ρ Dt
=- ∂x
+ μ div(grad u) + SMx
Du ∂t
We can write: = + div(uu)
Dt ∂x
⃗⃗) = ( ∂ ⃗i +
div(uu) = ∇ ∙ (u2⃗i + uvj⃗ + uwk
∂ ⃗ ∂
j + ⃗⃗k) ∙ (u2⃗i + uvj⃗ + uwk⃗⃗) = ∂ (u2 ) + ∂ (uv) + ∂ (uw)
∂x ∂y ∂z ∂x ∂y ∂z
∂u ∂u ∂v ∂w ∂u ∂u ∂v ∂w ∂u ∂u ∂u
= 2u ∂x + (v ∂y + u ∂y) + (u ∂z + w ∂z ) = (u ∂x + u ∂y + u ∂z ) + (u ∂x + v ∂y + w ∂z )
∂u ∂v ∂w ∂u ∂u ∂u ∂u ∂u ∂u
= u ( ∂x + + ) + (u ∂x + v ∂y + w ∂z ) = (u ∂x + v ∂y + w ∂z ) ✔
⏟ ∂y ∂z
Continuity
for incompressible
=0
Du ∂p ∂u ∂p
x-momentum: ρ Dt = - ∂x
+ μ div(grad u) + SMx or ρ ( ∂t + div(uu)) = - ∂x
+ μ div(grad u) + SMx
x-momentum as already determined:
2 2 2
Du ∂p ∂u ∂u ∂u ∂u ∂p ∂ u ∂ u ∂ u
ρ =- + ρfx + μ∇2 u → ρ( +u +v +w ) =- + ρfx + μ ( + + )
Dt ∂x ∂t ∂x ∂y ∂z ∂x ∂x2 ∂y2 ∂z2
Dv ∂p ∂v ∂p
y-momentum: ρ Dt = - ∂y
+ μ div(grad v) + SMy or ρ ( ∂t + div(vu)) = - ∂y
+ μ div(grad v) + SMy
y-momentum as already determined:
2 2 2
Dv ∂p ∂v ∂v ∂v ∂v ∂p ∂ v ∂ v ∂ v
ρ Dt = - ∂y
+ ρfy + μ∇2 v → ρ ( ∂t + u ∂x + v ∂y + w ∂z ) = - ∂y
+ ρfy + μ (∂x2 + ∂y2
+ ∂z2
)
Dw ∂p ∂w ∂p
z-momentum: ρ =- + μ div(grad w) + SMz or ρ ( + div(wu)) = - + μ div(grad w) + SMz
Dt ∂z ∂t ∂z
We only consider steady cases in FVM in MKM 411, therefore, for steady, incompressible, constant
property, and Newtonian fluids:
x-momentum:
∂p
New form for FVM: ρ div(uu) = - ∂x
+ μ div(grad u) + SMx
2 2 2
∂u ∂u ∂u ∂p ∂ u ∂ u ∂ u
Previous form: ρ (u ∂x + v ∂y + w ∂z ) = - ∂x
+ ρfx + μ ( ∂x2 + ∂y2
+ ∂z2
)
3
MKM 411 – Computational Fluid Dynamics (CFD) Theme 3
y-momentum:
∂p
New form for FVM: ρ div(vu) = - ∂y
+ μ div(grad v) + SMy
2 2 2
∂v ∂v ∂v ∂p ∂ v ∂ v ∂ v
Previous form: ρ (u ∂x + v ∂y + w ∂z ) = - ∂y
+ ρfy + μ (∂x2 + ∂y2
+ ∂z2
)
z-momentum:
∂p
New form for FVM: ρ div(wu) = - + μ div(grad w) + SMz
∂z
2 2 2
∂w ∂w ∂w ∂p ∂ w ∂ w ∂ w
Previous form: ρ (u ∂x + v ∂y + w ∂z
) =- ∂z
+ ρfz + μ ( ∂x2 + ∂y2
+ ∂z2
)
DT
We already had: ρc Dt = Φ + k∇2 T + ġ
DT ∂T
ρc Dt = k div(grad T) + Φ + Si or ρc (∂t + div(Tu)) = k div(grad T) + Φ + Si
⃗⃗) = ( ∂ ⃗i +
div(Tu) = ∇ ∙ (Tui⃗ + Tvj⃗ + Twk
∂ ⃗ ∂ ⃗⃗
j + ∂z k ) ∙ (Tui⃗ + Tvj⃗ + Twk⃗⃗) = ∂ (Tu) + ∂ (Tv) +
∂
(Tw)
∂x ∂y ∂x ∂y ∂z
∂T ∂u ∂T ∂v ∂T ∂w ∂u ∂v ∂w ∂T ∂T ∂T
= (u +T ) + (v + T ) + (w + T ) = (T + T + T ) + (u + v + w )
∂x ∂x ∂y ∂y ∂z ∂z ∂x ∂y ∂z ∂x ∂y ∂z
∂u ∂v ∂w ∂T ∂T ∂T ∂T ∂T ∂T
= T( + + ) + (u + v + w ) = (u + v + w ) ✔
⏟∂x ∂y ∂z ∂x ∂y ∂z ∂x ∂y ∂z
Continuity
for incompressible
=0
∂T
ρc (∂t + div(Tu)) = k div(grad T) + Φ + Si
We only consider steady cases in FVM in MKM 411, therefore, for steady, incompressible, constant
property, and Newtonian fluids:
ρc(div(Tu)) = k div(grad T) + Φ + Si
z-momentum: ρ div(wu) = -
∂p
+ μ div(grad w) + SMz ė g
∂z
4
MKM 411 – Computational Fluid Dynamics (CFD) Theme 3
Dimensions Description
One
Dimensional
2. Finding the Governing Differential Equations and Simplifying them for the Problem (CVs)
∂T
General equation: ρc (∂t + div(Tu)) = div(k grad T) + Φ + Si
Simplifying the equation for steady one-dimensional heat conduction without heat generation:
d dT
ρc(0 + 0) = ∇ ∙ (k ∇ T) + 0 + 0 → dx
(k dx) =0 ∇ →
d
dx
and one-dimensional ∴ k∇T → k
dT
dx
5
MKM 411 – Computational Fluid Dynamics (CFD) Theme 3
d dT
∫ (k ) dV = 0
∆V dx dx
4. Applying the Divergence Theorem for Changing the Integral Over the Volume of the Surface
∫V ∇ ∙ Φ dV = ∮A n
⃗⃗ Φ dA (Divergence theorem) V → A
d dT
∫∆V dx (k dx) dV = 0 We usually omit n
⃗⃗ because we use rectangular shapes in MKM 411
dT
Φ = (k dx)
d dT dT
∫∆V dx (k dx) dV = ∮A (k dx) ⃗n⃗ dA = 0
6
MKM 411 – Computational Fluid Dynamics (CFD) Theme 3
Example 4.1
Source-free → no heat generation
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
sketched in the Figure. Calculate the steady state
temperature distribution in the rod. The thermal conductivity, k, equals 1000 W/m/K, the cross-
-3
sectional area, A, is 10 × 10 m2 .
Solution
d dT
Energy Equation: ρc(div(Tu)) = k div(grad T) + Φ + Si → (k ) =0 No convection ∴ no div(Tu)
dx dx
Let us divide the length of the rod into five equal control volumes
There will be 5 nodes, 5 CVs, 5 equations, and 5 unknowns
Nodes 1 and 5 are boundary nodes; boundary nodes have at least one less node than internal nodes
7
MKM 411 – Computational Fluid Dynamics (CFD) Theme 3
d dT
Simplified equation: dx
(k dx) =0
d dT dT dT
General equation that works for all nodes: ∫ΔV dx (k dx) dV = (kA dx) - (kA dx) =0
e w
dT dT dT TE - TP dT TP - TW
(kA ) - (kA ) =0 → (kA ) = ke Ae and (kA ) = kw Aw
dx e dx w dx e δxPE dx w δxWP
k kw k k
After rearranging: (δxe Ae + A ) TP
δxWP w
= (δxw Aw ) TW + (δxe Ae ) TE
PE WP PE
The thermal conductivity (ke = kw = k), node spacing (δx), and cross-sectional area (Ae = Aw = A)
are constants. Therefore, the discretised equation for nodal points 2, 3, and 4 is aP TP = aWTW + aE TE
aW aE aP
k k
A A aW + aE
δx δx
δx/2 at boundary
dT dT
(kA dx) - (kA dx) =0
e w
TE - TP TP - TA k 2k k 2k
→ kA ( ) - kA ( ) =0 → ( A+ A) TP = 0 ∙ TW + ( A) TE + ( A) TA TA is known
δx e δx/2 δx δx δx δx
w
Source term
Equation for boundary node 1: aP TP = aW TW + aE TE + Su
aW aE aP Su
kA 2kA 2kA
0 aW + aE + T
δx δx δx A
δx/2 at boundary
8
MKM 411 – Computational Fluid Dynamics (CFD) Theme 3
dT dT
(kA dx) - (kA dx) =0
e w
TB - TP TP - TW k 2k k 2k
→ kA ( ) - kA ( ) =0 → ( A+ A) TP = ( A) TW + 0 ∙ TE + ( A) TB TB is known
δx/2 δx w δx δx δx δx
e
aW aE aP Su
kA 2kA 2kA
0 aW + aE + T
δx δx δx B
Node aW aE Su aP
1 0 100 200TA 300
2 100 100 0 200
3 100 100 0 200
4 100 100 0 200
5 100 0 200TB 300
T1 140 If more temperature values are required, the problem needs to be divided into more
T2 220 control volumes.
Numerical solution: T3 = 300 A smaller Δx is usually better (more accurate), but the computation time will be more.
The numerical solution has now been found; the analytical solution needs to be found
T4 380 next.
[T5 ] [460]
k can be taken out because it is a constant
d dT d dT dT
Analytical solution: dx
(k dx) =0 → ( )
dx dx
=0 → (dx) = C1 → T(x) = C1 x + C 2
9
MKM 411 – Computational Fluid Dynamics (CFD) Theme 3
TE + TP
Ae Te = ? → Ae Te = ∆y ( )
2
The Central Difference Scheme applies in FVM because the assumption is that the
CV is small enough that the centre of the cell is equal to the average of the cell.
d dT d dT dT dT
(k ) =0 → ∫ΔV dx (k dx) dV = (kA dx) - (kA dx) =0
dx dx e w
dT TE - TP dT TP - TW
If A is constant: (kA dx) = ke A Δx
and (kA dx) = kw A Δx
e w
If k is constant: kw = ke = k
If k is changing with temperature: use the Central Difference Scheme (average from nodal values)
kP + kW kP + kE
→ kw = 2
and ke = 2
10
MKM 411 – Computational Fluid Dynamics (CFD) Theme 3
dϕ dϕ dϕ ϕE - ϕP
(ΓA dx ) = Γe Ae ( dx ) → (ΓA dx ) = Γe Ae ( δxPE
)
e e e
dϕ dϕ dϕ ϕP - ϕW
(ΓA dx ) = Γw Aw ( dx ) → (ΓA dx ) = Γw Aw (δxWP
)
w w w
ΓP + ΓE ΓW + ΓP
Γe = 2
and Γw = 2
← This part will be different for an Upwind Scheme
An Tn = ? → An = ∆x × ⏟t = ∆x and Tn = ?
1
The thickness (t) is usually 1 4 internal nodes = a length of 4Δx
∫ΔV D.E. dV Incorrect integration impacts the final answer greatly; there are four different cases of differential equations
ϕ can be T, u, v, w. P
F can be x, y, z
11
MKM 411 – Computational Fluid Dynamics (CFD) Theme 3
∂ϕ d d
2. ∂F
⇒ dx
(ϕ) ⇒ like dx (u) Take ϕ out
d
∫ΔV dx (u) dV = (Au)e - (Au)w
d
If ϕ = uT and F = x → ∫ΔV dx (uT) dV = (AuT)e - (AuT)w = Ae ue Te - Aw uw Tw
∂ϕ uE + uP T +T uW + uP T +T
Central Difference Scheme → = Δy ( ) ( E P) - Δy ( ) ( W P)
∂F 2 2 2 2
3. ϕ
∫ΔV T dV = TP ΔV The Central Difference Scheme applies in FVM because the assumption is that the CV is small enough
that the centre of the cell is equal to the average of the cell.
∫ΔV u dV = uP ΔV
∫ΔV v dV = vP ΔV
For any unknowns at the face, we can choose one of the following:
1. Central Differencing Scheme (CDS)
2. Upwind Differencing Scheme (UDS) Will be told in a test/exam which method to use
3. Flux-Blending Technique (FBT)
4. QUICK Scheme
d dϕ dϕ dϕ
∫∆V dx (Γ dx ) dV + ∫∆V S dV = (ΓA dx ) - (ΓA dx ) + S̅ ΔV = 0
e w
dT dT
(kA dx) - (kA dx) + 200TP ΔV + 1000ΔV = 0
e w
d dT
Like: ∇ ∙ (k∇T) + ė g = 0 or for 1D dx
(k dx) + ė g = 0
12
MKM 411 – Computational Fluid Dynamics (CFD) Theme 3
Step 2: Discretisation
(Integration of the governing equation to yield a
discretised equation)
div(Γ grad ϕ) + Sϕ = 0
↓
1D
d dϕ dϕ dϕ
∫ (Γ ) dV + ∫ S dV = (ΓA ) - (ΓA ) + S̅ ΔV = 0
∆V dx dx ∆V dx e dx w
dϕ dϕ dϕ ϕE - ϕP
(ΓA ) = Γe Ae ( ) → (ΓA ) = Γe Ae ( )
dx e dx e dx e δxPE
dϕ dϕ dϕ ϕP - ϕW
(ΓA dx ) = Γw Aw ( dx ) → (ΓA dx ) = Γw Aw ( δxWP
)
w w w
dϕ dϕ ϕE - ϕP ϕP - ϕW
(ΓA dx ) - (ΓA dx ) + S̅ ΔV = 0 → Γe Ae ( δxPE
) - Γw Aw (δxWP
) + S̅ ΔV = 0
e w
Γ Γw Γ Γ
This can be rearranged as: (δxe Ae + A
δxWP w
- Sp ) ϕP = (δxw Aw ) ϕW + (δxe Ae ) ϕE + Su
PE WP PE
aP ϕP = aW ϕW + aE ϕE + Su
aW aE aP
Γw Γe
A A aW + aE - Sp
δxWP w δxPE e
In a uniform grid, linearly interpolated values for Γe and Γw are given (using the Central Difference
Scheme) as
ΓW + ΓP ΓP + ΓE
Γw = 2
and Γe = 2
dϕ ϕP - ϕW dϕ ϕE - ϕP
(ΓA ) = Γw Aw ( ) and (ΓA ) = Γe Ae ( ) Remember @ the boundary one side has a length of δx/2
dx w δxWP dx e δxPE
aW aE aP
Γw Γe
A A aW + aE - Sp
δxWP w δxPE e
dϕ dϕ
(ΓA ) - (ΓA ) + S̅ ΔV = 0
dx e dx w
dϕ dϕ dϕ ϕE - ϕP
(ΓA dx ) = Γe Ae ( dx ) → (ΓA dx ) = Γe Ae ( δxPE
)
e e e
dϕ dϕ dϕ ϕP - ϕW
(ΓA dx ) = Γw Aw ( dx ) → (ΓA dx ) = Γw Aw ( δxWP
)
w w w
Example 4.2
The figure alongside shows a large plate of thickness L = 2 cm with
constant thermal conductivity k = 0.5 W/mK and uniform heat
generation q = 1000 kW/m3 . (q → ė g ) ė g is written as q in the textbook
This is a large plate with a small thickness value ∴ the 1D assumption is valid
Assuming that the dimensions in the y- and z-directions are so large that
temperature gradients are significant in the x-direction only, calculate
the steady state temperature distribution. Compare the numerical result
with the analytical solution.
Solution
Steady: (Solid, Steady, and 1D)
d dT d dT
Energy Equation: ρc(div(Tu)) = k div(grad T) + Φ + Si → (k ) + ė g = 0 → (k ) +q=0
dx dx dx dx
d dT
∫∆V dx (k dx) dV + ∫∆V q dV = 0
dT dT
The general equation: [(kA dx) - (kA dx) ] + q∆V = 0
e w
The general equation is obtained exactly after integration
Therefore, the discretised equation for nodal points 2, 3, and 4 is (2, 3, and 4 have nodes before and after)
TE - TP T -T ke A kw A ke A kw A
[ke A ( ) - kw A ( P W )] + qAδx = 0 → ( + ) TP = ( ) TW + ( ) TE + qAδx
δx δx δx δx δx δx
A will get cancelled out
Equation for nodes 2, 3, and 4: aP TP = aW TW + aE TE + Su The equation will apply even if there are 1000 nodes
aW aE aP Sp Su
kA kA
aW + aE - Sp 0 qAδx
δx δx
TE - TP TP - TA
[ke A ( δx
) - kA A ( )] + qAδx = 0
δx/2
aW aE aP Sp Su
kA 2kA 2kA
0 aW + aE - Sp - qAδx + T
δx δx δx A
There is more than one source term for node 1 because the value for TA is known
15
MKM 411 – Computational Fluid Dynamics (CFD) Theme 3
TB - TP TP - TW
[kB A ( ) - kw A ( δx
)] + qAδx = 0
δx/2
aW aE aP Sp Su
kA 2kA 2kA
0 aW + aE - Sp - qAδx + T
δx δx δx B
There is more than one source term for node 5 because the value for TB is known
Node aW aE Su Sp aP = aW + aE - Sp
1 0 125 4000 + 250TA - 250 375
2 125 125 4000 0 250
3 125 125 4000 0 250
4 125 125 4000 0 250
5 125 0 4000 + 250TB - 250 375
[A][T] = [C]
Example 4.3
The cylindrical fin (alongside) has a uniform cross-sectional
area A. Calculate the temperature distribution along the fin.
heat conduction
convection
⏞
d dT
Heat transfer equation: dx
(kA dx) - ⏞
hP(T - T∞ ) = 0
P is the fin perimeter
As seen in the equation above, there is no heat generation
T - T∞ cosh[n(L - x)]
Analytical solution: TB - T∞
= cosh(nL)
A fin is added to a surface to improve heat transfer; an insulated endpoint is not practical in real life application but is used in this example
for simplicity purposes.
16
MKM 411 – Computational Fluid Dynamics (CFD) Theme 3
Solution
Now, FVM:
d dT
dx
(kA dx) - hP(T - T∞ ) = 0
d dT
∫∆V (dx) dV - ∫∆V n2 (T - T∞ ) dV = 0 Assume CDS (average)
dx
dT dT
[( A ) -
dx e
(A ) ]
dx w
- [n2 (TP - T∞ ) A δx] = 0
TE - TP TP - TW
For internal nodes: [( ) - ( )] - [n2 (TP - T∞ )δx] = 0 1 General Equation for internal nodes
δx δx
1 1 1 1 2 2
The internal node equation can be re-arranged as: ( + )T = ( ) TW + ( ) TE + n
⏟ δxT∞ - n
⏟ δxTP
δx δx P δx δx
Su Sp
aW aE aP Sp Su
1 1
aW + aE - Sp - n2 δx n2 δxT∞
δx δx
aW aE aP Sp Su
1 2 2
0 aW + aE - Sp - n2 δx - n2 δxT∞ + T
δx δx δx B
17
MKM 411 – Computational Fluid Dynamics (CFD) Theme 3
aW aE aP Sp Su
1
0 aW + aE - Sp - n2 δx n2 δxT∞
δx
hP
L = 1 m, = 25 m-2
kA
Node aW aE Su Sp aP = aW + aE - Sp
1 0 5 100 + 10TB - 15 20
2 5 5 100 -5 15
3 5 5 100 -5 15
4 5 5 100 -5 15
5 5 0 100 -5 10
20 -5 0 0 0 T1 1100 T1 64.22
-5 15 -5 0 0 T2 100 T2 36.91
0 -5 15 -5 0 T3 = 100 → T3 = 26.50
0 0 -5 15 -5 T4 100 T4 22.60
[ 0 0 0 -5 10 [T5 ]
] [ 100 ] [T5 ] [21.30]
For the numerical solution:
For 5 CVs (5 nodes): δx = 0.2 m
For 10 CVs (10 nodes): δx = 0.1 m (this matches the exact solution)
∴ The solution is more accurate with more CVs
heat conduction
convection
⏞
d dT
Heat transfer equation: dx
(kA dx) - ⏞
hP(T - T∞ ) = 0
P is the fin perimeter
18
MKM 411 – Computational Fluid Dynamics (CFD) Theme 3
The equation for boundary node 5 is easier than that of boundary node 1 due to the insulated end having a temperature gradient of 0
on the east face
For a convection boundary condition: Now we have convection; TA > 20°C at the boundary
T -T T5 - T4
→ A
( Δx/25
) - ( Δx
) - [n2 (TP - T∞ )Δx] = 0 Now we have 5 equations, but 6 unknowns
e w There is no temperature value @ A
Therefore, we need one extra equation: A boundary condition equation for convection can be used
2kT5
dT T -T ( - T∞ )
q̇ e = h(TA - T∞ ) = - k( ) → h(TA - T∞ ) = - k ( A 5) → TA = ∆x
2k
dx e Δx/2 (h + )
∆x
T -T T5 - T4
A
( Δx/25
) - ( Δx
) - [n2 (TP - T∞ )Δx] = 0 The 6 unknowns can now be solved for
e w
Governing Equations
Continuity: div(u) = 0
ρfx
∂p
x-momentum: ρ div(uu) = - ∂x
+ μ div(grad u) + SMx
ρfy
∂p These equations will be on the formula sheet.
y-momentum: ρ div(vu) = - ∂y
+ μ div(grad v) + SMy
These equations used the divergence theorem
ρfz for the surface integral.
∂p
z-momentum: ρ div(wu) = - + μ div(grad w) + SMz
∂z ė g
Energy Equation: ρc(div(Tu)) = k div(grad T) + Φ + Si
∂ ∂ ∂
Continuity: div(u) = 0 → ∇∙u=0 → u = ui⃗ + vj⃗ + wk
⃗⃗ → ∇∙u= ∂x
(u) + ∂y
(v) + ∂z
(w)
∂p ∂
x-momentum: ρ div(uu) = - ∂x
+ μ div(grad u) + SMx → 𝜌∇ ∙ (uu) = - ∂x
(p) + μ∇ ∙ (∇u) + SMx
∂ ∂ ∂ ∂ ∂ ∂u ∂ ∂u ∂ ∂u
ρ (∂x (uu) + ∂y
(uv) + ∂z
(uw)) =- ∂x
(p) + μ (∂x ( ∂x ) + ( )
∂y ∂y
+ ( ))
∂z ∂z
+ SMx
19
MKM 411 – Computational Fluid Dynamics (CFD) Theme 3
Aw Tw = ? → Aw = ∆y × ⏟t = ∆y and Tw = ?
1
The thickness (t) is usually 1
An Tn = ? → An = ∆x × ⏟t = ∆x and Tn = ?
1
The thickness (t) is usually 1 4 internal nodes = a length of 4Δx
20
MKM 411 – Computational Fluid Dynamics (CFD) Theme 3
dT TThe node after the face in the x-direction - TThe node before the face in the x-direction
( ) =
dx face ∆x
dT TP - TW
(dx) = ∆x
w
dT dT
Ae (dx) = ? → Ae = ∆y × ⏟t = ∆y and (dx) = ?
e e
1
The thickness (t) is usually 1
dT TThe node after the face in the x-direction - TThe node before the face in the x-direction
(dx) = ∆x
face
dT TE - TP
(dx) = ∆x
e
∂T ∂T
As (∂y) = ? → As = ∆x × ⏟t = ∆x and (∂y) = ?
s 1 s
The thickness (t) is usually 1
∂T TThe node after the face in the y-direction - TThe node before the face in the y-direction
(∂y) = ∆y
face
∂T TP - TS
As ( ) = ∆x ( )
∂y s ∆y
∂T ∂T
An ( ) = ? → An = ∆x × ⏟t = ∆x and ( ) =?
∂y n ∂x n
1
The thickness (t) is usually 1
∂T TThe node after the face in the y-direction - TThe node before the face in the y-direction
(∂y) = ∆y
face
∂T TN - TP
An (∂y) = ∆x ( ∆y
)
n
∂ϕ ϕP - ϕW
Flux across the west face = Γw Aw ∂x | = Γw Aw ( δxWP
)
w
∂ϕ ϕE - ϕP
Flux across the east face = Γe Ae ∂x | = Γe Ae ( δx )
e PE
∂ϕ ϕP - ϕS These equations apply for all internal nodes
Flux across the south face = Γs As ∂y | = Γs As ( δy )
s SP
∂ϕ ϕN - ϕP
Flux across the north face = Γn An ∂y | = Γn An ( δyPN
)
n
21
MKM 411 – Computational Fluid Dynamics (CFD) Theme 3
∂ϕ ∂ϕ ∂ϕ ∂ϕ
[Γe Ae ( ∂x ) - Γw Aw ( ∂x ) ] + [Γn An ( ∂y ) - Γs As ( ∂y ) ] + S̅ ΔV = 0
e w n s
Ae = Aw = Δy
An = As = Δx
∂ϕ ∂ϕ ∂ϕ ∂ϕ
[Γe Ae ( ∂x ) - Γw Aw ( ∂x ) ] + [Γn An ( ∂y ) - Γs As ( ∂y ) ] + S̅ ΔV = 0
e w n s
ϕE - ϕP ϕP - ϕW ϕN - ϕP ϕP - ϕS
→ Γe Ae ( δxPE
) - Γw Aw ( δxWP
) + Γn An ( δyPN
) - Γs As ( δySP
) + S̅ ΔV = 0
ϕE - ϕP ϕP - ϕW ϕN - ϕP ϕP - ϕS
→ Γe Ae ( ) - Γw Aw ( ) + Γn An ( ) - Γs As ( ) + S̅ ΔV = 0
δx δx δy δy
aW aE aS aN aP
Γw Aw Γe Ae Γs As Γn An
aW + aE + aS + aN - Sp
δxWP δxPE δySP δyPN
The results of the process above show that the 1D and 2D cases yield similar results
∂ ∂T ∂ ∂T ∂ ∂T
For Example: ∂x
(k ∂x) + ∂y
(k ∂y) + ∂z
(k ∂z) + ė g = 0
∂ϕ ∂ϕ ∂ϕ ∂ϕ ∂ϕ ∂ϕ
[Γe Ae ( ∂x ) - Γw Aw ( ∂x ) ] + [Γn An ( ∂y ) - Γs As ( ∂y ) ] + [Γt At ( ∂z ) - Γb Ab ( ∂z ) ] + S̅ ΔV = 0
e w n s t b
ϕE - ϕP ϕP - ϕW ϕ -ϕ ϕ -ϕ
[Γe Ae ( δx
) - Γw Aw (
δx
)] + [Γn An ( Nδy P ) - Γs As ( P S )]
δy
ϕT - ϕP ϕP - ϕB
+ [Γt At ( δz
) - Γb Ab ( δz
)] + (Su + Sp ϕP ) = 0
aW aE aS aN aB aT aP
Γw Aw Γe Ae Γs As Γn An Γb Ab Γt At
aW + aE + aS + aN + aB + aT - Sp
δxWP δxPE δySP δyPN δxBP δxPT
aP ϕP = ∑ anb ϕnb + Su
aP = ∑ anb - Sp
22
MKM 411 – Computational Fluid Dynamics (CFD) Theme 3
Dimension aW aE aS aN aB aT
Γw Aw Γe Ae
1D - - - -
δxWP δxPE
Γw Aw Γe Ae Γs As Γn An
2D - -
δxWP δxPE δySP δyPN
Γw Aw Γe Ae Γs As Γn An Γb Ab Γt At
3D
δxWP δxPE δySP δyPN δxBP δxPT
The results of the process above show that the 1D, 2D, and 3D cases yield the same results
∂ ∂ϕ ∂ ∂ϕ
∫∆V ∂x
(Γ ∂x ) dx ∙ dy + ∫∆V ∂y
(Γ ∂y ) dx ∙ dy + ∫∆V Sϕ dV = 0
∂ϕ ∂ϕ
[Γe Ae ( ∂x ) - Γw Aw ( ∂x ) ]
e w
The 3rd step is to integrate the differential equation(s) over the CVs
∫ΔV D.E. dV Incorrect integration impacts the final answer greatly; there are four different cases of differential equations
ϕ can be T, u, v, w. P
h can be x, y, z
∂ϕ d d
2. ∂h
⇒ dx
(ϕ) ⇒ like dx (u) Take ϕ out
d
∫ΔV dx (u) dV = (Au)e - (Au)w
d
If ϕ = v and h = y → ∫ΔV dy (v) dV = (Av)n - (Av)s
d
If ϕ = uT and h = x → ∫ΔV dx (uT) dV = (AuT)e - (AuT)w
3. ϕ ∫ΔV ϕ dV = ? ϕ can be T, u, v, w. P
The Central Difference Scheme applies in FVM because the assumption is that the CV is small enough
∫ΔV T dV = TP ΔV that the centre of the cell is equal to the average of the cell.
Central Differencing is not a good scheme when there is convection
∫ΔV u dV = uP ΔV
∫ΔV v dV = vP ΔV
23
MKM 411 – Computational Fluid Dynamics (CFD) Theme 3
Aw Tw = ? → Aw = ∆y × ⏟t = ∆y and Tw = ?
1
The thickness (t) is usually 1
dT TThe node after the face in the x-direction - TThe node before the face in the x-direction
(dx) = ∆x
face
dT TP - TW
( ) =
dx w ∆x
Write the equivalent of the expressions in terms of nodal values and Δx and Δy. Use the Central
dT
Difference Method when needed. An Tn = ?, An (dy) = ?, As vs = ?
n
24
MKM 411 – Computational Fluid Dynamics (CFD) Theme 3
Solution
TP + TN
An Tn = ∆x ( 2
)
dT TN - TP
An (dy) = ∆x ( ∆y
)
n
vP + vs
As vs = ∆x ( 2
)
Integration over the continuity equation: Velocity does not necessarily move in the positive direction
d(ρu)
dx
=0 → (ρuA)e - (ρuA)w = 0
25
MKM 411 – Computational Fluid Dynamics (CFD) Theme 3
Γ Γe Γw
D = A De = A and Dw = A
δx δx e δx w
∂ϕ ∂ϕ
Convection-diffusion equation: (ρuAϕ)e - (ρuAϕ)w = (ΓA ) - (ΓA )
∂x e ∂x w
ϕE - ϕP ϕP - ϕW
(ρuAϕ)e - (ρuAϕ)w = (ΓA ) - (ΓA )
δx e δx w
Γ Γw
Fe = (ρuA)e Fw = (ρuA)w De = δxe Ae Dw = A
δx w
The Central Differencing Scheme: Used to make sure that all equations have nodal terms and not face terms
ϕe = (ϕP + ϕE )/2 and ϕw = (ϕW + ϕP )/2
Fe Fw
2
(ϕP + ϕE ) - 2
(ϕW + ϕP ) = De (ϕE - ϕP ) - Dw (ϕP - ϕW)
Fw Fe Fw Fe
This can be re-arranged to give: [(Dw - ) + (De + )] ϕP = (Dw + ) ϕW + (De - ) ϕE
2 2 2 2
aP ϕP = aW ϕW + aE ϕE
aP ϕP = aW ϕW + aE ϕE
aW aE aP
Fw Fe
Dw + De - aW + aE + (Fe - Fw )
2 2
Example
Consider the following energy equation in 2D
If the velocity field is: The velocity is not unknown in this instance – it is given
The velocity vector is 2D; the
u(u, v) = 2i⃗ + 3j⃗ velocity field is not a function
of x and y
By applying the Finite Volume Method (FVM), find the general
algebraic equation for internal nodes. Use the Central Difference
Scheme where needed. Assume the fluid is incompressible, and k, c are constants. Δx ≠ Δy
26
MKM 411 – Computational Fluid Dynamics (CFD) Theme 3
Solution
What should we do first? We have the velocity field, therefore, we should check the continuity
equation:
∂u ∂v ∂(2) ∂(3)
∂x
+ ∂y
=0 → ∂x
+ ∂y
=0 → 0-0=0✔
∂ ∂ ∂ ∂T ∂ ∂T
ρc(∇ ∙ (Tu)) = k∇ ∙ (∇T) → ρc (∂x (uT) + ∂y
(vT)) = k (∂x (∂x) + ( ))
∂y ∂y
∂ ∂ ∂ ∂T ∂ ∂T
→ ∫ ρc (∂x (uT) + ∂y
(vT)) dV = ∫ k (∂x (∂x) + ( )) dV
∂y ∂y
Example
Consider the following energy equation in 2D
If the velocity field is: The velocity is not unknown in this instance – it is given
Solution
What should we do first? We have the velocity field, therefore, we should check the continuity
equation:
∂u ∂v ∂(2x + y) ∂(x - 2y)
∂x
+ ∂y
=0 → ∂x
+ ∂y
=0 → 2-2=0✔
∂ ∂ ∂ ∂T ∂ ∂T
ρc(∇ ∙ (Tu)) = k∇ ∙ (∇T) → ρc ( (uT) + (vT)) = k( ( ) + ( ))
∂x ∂y ∂x ∂x ∂y ∂y
∂ ∂ ∂ ∂T ∂ ∂T
→ ∫ ρc (∂x (uT) + ∂y
(vT)) dV = ∫ k (∂x (∂x) + ( )) dV
∂y ∂y
27
MKM 411 – Computational Fluid Dynamics (CFD) Theme 3
ue = (2x + y)e
Ae = Aw = ∆y
uw = (2x + y)w
u(u, v) = (2x + y)i⃗ + (x - 2y)j⃗ →
vn = (x - 2y)n
An = As = ∆x
vs = (x - 2y)s
ρc(∆yue Te - ∆yuw Tw + ∆xvn Tn - ∆xvs Ts )
∂T ∂T ∂T ∂T
= k (∆y ( ) - ∆y ( ) + ∆x ( ) - ∆x ( ) )
∂x e ∂x w ∂y n ∂y s
TE + TP T +T T +T TS + TP
→ ρc (∆yue - ∆yuw W P + ∆xvn N P - ∆xvs )
2 2 2 2
TE - TP TP - TW TN - TP TP - TS
= k (∆y ( ) - ∆y ( ) + ∆x ( ) - ∆x ( ))
∆x ∆x ∆y ∆y
TE + TP TW + TP TN + TP TS + TP
ρc (∆yue 2
- ∆yuw 2
+ ∆xvn 2
- ∆xvs 2
)
TE - TP TP - TW TN - TP TP - TS
ue = ?, uw = ?, vn = ?, vs = ?
= k (∆y ( ∆x
) - ∆y ( ∆x
) + ∆x ( ∆y
) - ∆x ( ∆y
))
TE + TP TW + TP TN + TP TS + TP
ρc∆x ((2x + y)e 2
- (2x + y)w 2
+ (x - 2y)n 2
- (x - 2y)s 2
) = k(TE + TW + TN + TS - 4TP )
aP TP = aW TW + aE TE + aN TN + aS TS
Example
Solution
∂ ∂ ∂ ∂T ∂ ∂T
ρc(∇ ∙ (Tu)) = k∇ ∙ (∇T) → ρc (∂x (uT) + ∂y
(vT)) = k (∂x (∂x) + ( ))
∂y ∂y
∂ ∂ ∂ ∂T ∂ ∂T
→ ∫ ρc (∂x (uT) + ∂y
(vT)) dV = ∫ k (∂x (∂x) + ( )) dV
∂y ∂y
ue = ?, uw = ?, vn = ?, vs = ?
uE + uP uW + uP vN + vP vS + vP
ue = 2
, uw = 2
, vn = 2
, vs = 2
Example
By applying the Finite Volume Method (FVM) and the Central
Difference Scheme, where needed, find the algebraic equation
for the energy equation for nodes 1 and 3.
Solution
∂T
Energy equation for incompressible with constant properties: ρc ( + ∇ ∙ (Tu)) = k∇ ∙ (∇T) + Φ + ė gen
∂t
∂ ∂ ∂ ∂T ∂ ∂T ∂v
2D with the given Φ: ρc (∂x (uT) + ∂y
(vT)) = k (∂x (∂x) + ( ))
∂y ∂y
+ μ ∂y + B(Tv) + D
∂ ∂ ∂ ∂T ∂ ∂T ∂v
∫ ρc (∂x (uT) + ∂y
(vT)) dV = ∫ k (∂x (∂x) + ( )) dV
∂y ∂y
+ ∫ (μ ∂y + B(Tv) + D) dV
29
MKM 411 – Computational Fluid Dynamics (CFD) Theme 3
Node 1
uair = 4 cos θ m/s It is very important the write the information of the specific node
∂T
∂T ( ) = 0 because
Tw = Tair = 30°C, uw = 4 cos θ m/s, ( ) = 0, vs = 0 ∂y s
∂y s of the insulation
at the south face
ρc((AuT)e - (AuT)w + (AvT)n - (AvT)s )
∂T ∂T ∂T ∂T
= k ((A ∂x) - (A ∂x) + (A ∂y) - (A ∂y) ) Assume
∂T
≠
∂T
n
e w n s ∂x ∂y
e
+ μ((Av)n - (Av)s ) + B(TP vP )∆V + D∆V
w
Insulation does not mean that the temperature at the face is zero s
uE + uP T +T vN + vP T +T
ρc (∆y ( ) ( E P) - ∆y(4 cos θ)(30) + ∆x ( ) ( N P) - ∆x(0)Ts )
2 2 2 2
TE - TP TP - TW TN - TP vN + vP
= k (∆y ( ∆x
) - ∆y ( ∆x/2
) + ∆x ( ∆y
) - ∆x(0)) + μ∆x (( 2
) - (0)) + B(TP vP )∆x∆y + D∆x∆y
u2 + u1 T +T v4 + v1 T +T
ρc (∆y ( 2
) ( 2 2 1) - ∆y(4 cos θ)(30) + ∆x ( 2
) ( 2 2 1 ))
T2 - T1 1 T - 30 T4 - T1 v4 + v1
= k (∆y ( ∆x
) - ∆y ( ∆x/2 ) + ∆x ( ∆y
)) + μ∆x ( 2
) + B(T1 v1 )∆x∆y + D∆x∆y
Face e is important: T = 0
Must switch face terms to nodal terms
uW + uP T +T vS + vP T +T
ρc (∆y(0)Te - ∆y ( ) ( W P) + ∆x(- 4 sin θ)(30) - ∆x ( ) ( S P ))
2 2 2 2
ET -T
P TP - TW N P T -T TP - TS vP + vS
= k (∆y ( ∆x/2 ) - ∆y ( ∆x
) + ∆x ( ∆y/2 ) - ∆x ( ∆y
)) + μ∆x (- 4 sin θ - 2
) + B(TP vP )∆x∆y + D∆x∆y
u4 + u3 T +T v2 + v3 T +T
ρc (- ∆y ( 2
) ( 4 2 3) + ∆x(- 4 sin θ)(30) - ∆x ( 2
) ( 2 2 3 ))
0 - T3 T3 - T4 30 - T3 T3 - T2 v3 + v2
= k (∆y ( ) - ∆y ( ) + ∆x ( ) - ∆x ( )) + μ∆x (- 4 sin θ - ) + B(T3 v3 )∆x∆y + D∆x∆y
∆x/2 ∆x ∆y/2 ∆y 2
30