Fundamentals of Convective Heat Transfer

Week-10 (Live Session)

Durga Prasad Pydi

2025-09-27

Basics of Finite Difference Method

Consider a second order differential equations as follows

Aϕxx+Bϕxy+Cϕyy+Dϕx+Eϕy+Fϕ=G(x,y) A \phi_{xx}+B \phi_{xy}+C \phi_{yy} + D \phi_{x} + E \phi_{y}+F \phi = G(x,y) B24AC=0parabolicB24AC<0ellipticequilibrium problemsB24AC>0hyperbolictime marching problems \begin{align} B^{2}-4AC = 0 & & \text{parabolic} \\ B^{2}-4AC < 0 & & \text{elliptic} & & \text{equilibrium problems} \\ B^{2}-4AC > 0 & & \text{hyperbolic} & & \text{time marching problems} \end{align}

Taylor Series expansion

f(x+Δx)=f(x)+Δxfx+Δx22!2fx2+Δx33!3fx3+ f(x+\Delta x) = f(x)+\Delta x \frac{ \partial f }{ \partial x } +\frac{\Delta x^{2}}{2!} \frac{ \partial^{2} f }{ \partial x^{2} } + \frac{\Delta x^{3}}{3!}\frac{ \partial^{3} f }{ \partial x^{3} } +\dots

First-order forward difference:

Ti,jx=Ti+1,jTi,jΔx+O(Δx) \frac{ \partial T_{i,j} }{ \partial x }=\frac{T_{i+1,j}-T_{i,j}}{\Delta x}+O(\Delta x)

First-order backward difference: Ti,jx=Ti,jTi1,jΔx+O(Δx) \frac{ \partial T_{i,j} }{ \partial x }=\frac{T_{i,j}-T_{i-1,j}}{\Delta x}+O(\Delta x)

Second-order central difference: 2Ti,jx2=Ti+1,j2Ti,j+Ti1,jΔx2+O(Δx2) \frac{ \partial^{2} T_{i,j} }{ \partial x^{2} }=\frac{T_{i+1,j}-2T_{i,j}+T_{i-1,j}}{\Delta x^{2}}+O(\Delta x^{2})

Problem - 1D Unsteady Heat Conduction with volumetric heat generation term

Discretise the below equation with first order backward time and second-order central differencing in spatial domain

Tt=α2Tx2+qρcp \frac{ \partial T }{ \partial t } = \alpha \frac{ \partial^{2} T }{ \partial x^{2} } + \frac{q'''}{\rho c_{p}}

Solution

Checker boarding problem

Which of the following is the reason for checker boarding problem?

The major reason for checker boarding problem is the decoupling due to central differencing in both continuity and momentum equations. The central differencing allows for oscillating solutions, where both continuity and momentum equations will be satisfied while it is not physically possible.

Staggered grid allows to couple these two, so even if one of them is not physical, the solver looks for other solutions and will eventually converges to a physically consistent solution

Discretising the advection term

Advection term uϕx\frac{ \partial u \phi }{ \partial x } needs to be discretised on a 1D grid point ii

(uϕ)x=(ui+12.ϕi+12ui12.ϕi12)Δxui+12.ϕi+12=ϕi.ui+12+|ui+12|2+ϕi+1.ui+12|ui+12|2upwind scheme=ui+12.ϕi+ϕi+12+|ui+12|.ϕiϕi+12=ui+12.ϕi+ϕi+12central difference=r(upwind)+(1r)(central)=ui+12.ϕi+ϕi+12+r|ui+12|.ϕiϕi+12ui12.ϕi12=ui12.ϕi+ϕi12+r|ui12|.ϕi1ϕi2 \begin{align} \frac{ \partial (u \phi) }{ \partial x } & = \frac{\left( u_{i+\frac{1}{2}} .\phi_{i+\frac{1}{2}}-u_{i-\frac{1}{2}}.\phi_{i-\frac{1}{2}}\right)}{\Delta x} \\ u_{i+\frac{1}{2}}.\phi_{i+\frac{1}{2}} & =\phi_{i}. \frac{ u_{i+\frac{1}{2}}+|u_{i+\frac{1}{2}}|}{2}+\phi_{i+1}.\frac{ u_{i+\frac{1}{2}}-|u_{i+\frac{1}{2}}|}{2} & & \text{upwind scheme} \\ &=u_{i+\frac{1}{2}} .\frac{\phi_{i}+\phi_{i+1}}{2}+|u_{i+\frac{1}{2}}|. \frac{\phi_{i}-\phi_{i+1}}{2} \\ & =u_{i+\frac{1}{2}} .\frac{\phi_{i}+\phi_{i+1}}{2} & & \text{central difference} \\ & = r (\text{upwind}) + (1-r) (\text{central}) \\ & =u_{i+\frac{1}{2}}.\frac{\phi_{i}+\phi_{i+1}}{2}+r |u_{i+\frac{1}{2}}| .\frac{\phi_{i}-\phi_{i+1}}{2} \\ u_{i-\frac{1}{2}}.\phi_{i-\frac{1}{2}} &= u_{i-\frac{1}{2}} .\frac{\phi_{i}+\phi_{i-1}}{2}+r |u_{i-\frac{1}{2}}|. \frac{\phi_{i-1}-\phi_{i}}{2} \end{align}

where ui+12=ui+ui+12u_{i+\frac{1}{2}}=\frac{u_{i}+u_{i+1}}{2} and ui12=ui+ui12u_{i-\frac{1}{2}}=\frac{u_{i}+u_{i-1}}{2}

Problem - Marker and cell algorithm (MAC)

Under MAC algorithm, which of the following statements are true?

MAC algorithm:

  1. Discretise DuDt=pρ+ν2u\frac{Du}{Dt}=- \frac{\nabla p}{\rho}+\nu \nabla^{2}u
  2. Taking pp from previous time step solve the above equation to get ũ\tilde{u} (predicted velocity)
  3. Compute actual velocity u=ũ+kpu=\tilde{u}+k p', by solving .u=.ũ+kp=0\nabla.u=\nabla.\tilde{u}+k\nabla p'=0
  4. Update pressure values as pn+1=pn+pp^{n+1}=p^{n}+p' where pn=pp^{n}=p .

To accelerate convergence, the value of kk need to be reduced. Similarly, increasing kk can lead to a stable convergence

Boundary Conditions

Flow

  1. Prescribed velocity: ui=ubu_{i}=u_{b}
  2. Outflow: ub=uiu_{b}=u_{i}
  3. No Slip: ub=0u_{b}=0

Temperature

  1. Prescribed Temperature: Ti=TbT_{i}=T_{b}
  2. Adiabatic: Tb=TiT_{b}=T_{i}
  3. Convection: Ti=hintTi1+hextTbhint+hextT_{i}= \frac{h_{int}T_{i-1}+h_{ext}T_{b}}{h_{int}+h_{ext}}

Problems

Couette Flow

Consider the fully developed flow between two parallel plates as shown in the figure below. Write down the governing equation for the flow (along yy direction). Discretise the governing equation using finite difference scheme and obtain the solution for velocity as a function of yy.

Governing equation:

d2udy2=0 \frac{d^{2}u}{dy^{2}}=0

Boundary conditions:

u(y=0)=0u(y=d)=U \begin{align} u(y=0) & =0 \\ u(y=d) & =U \end{align}

Consider d=1,U=1d=1,U=1

Solution

Channel flow (parallel plates)

Consider the same problem as before except for U=0U=0 and there is a constant pressure gradient of 1Pa/m, the viscosity of the fluid to be 1kg / m.s and the separation between the plates to be 1m. (The problem is meant to illustrate the application of techniques presented in the lecture videos, hence the little emphasis was given to the values of the properties. Student is advised to attempt the solution with more realistic values when needed)

Governing equation:

μd2udy2dpdx=0 \mu\frac{ d^{2}u}{dy^{2}}-\frac{dp}{dx}=0

Boundary conditions:

u(y=0)=0u(y=1)=0 \begin{align} u(y=0) & =0 \\ u(y=1) & =0 \end{align}

Solution

Steady Diffusion

Consider a square slab of length 1m and thermal conductivity of 1 W/m.K with boundary conditions as specified in the figure below. If the initial temperature throughout the domain is 300K. Derive the discrete equations for the problem and solve for temperature profile as a function of space.

Solution

Advection - Diffusion (upwind scheme)

Consider a square slab of length 1m and thermal conductivity of 1 W/m.K (assume α=1m2/s\alpha=1 m^{2} / s) with boundary conditions as specified in the figure below. If the initial temperature throughout the domain is 300K. However, unlike the previous problem assume there is a constant velocity field throughout the domain given by u=1î+2ĵ\vec{u}=1 \hat{i}+2\hat{j} m/s. Derive the discrete equations for the problem and solve for temperature profile as a function of space. Use the upwind scheme to solve the problem.

Solution

Advection - Diffusion (central scheme)

Consider a square slab of length 1m and thermal conductivity of 1 W/m.K (assume α=1m2/s\alpha=1 m^{2} / s) with boundary conditions as specified in the figure below. If the initial temperature throughout the domain is 300K. However, unlike the previous problem assume there is a constant velocity field throughout the domain given by u=1î+2ĵ\vec{u}=1 \hat{i}+2\hat{j} m/s. Derive the discrete equations for the problem and solve for temperature profile as a function of space. Use the central scheme to solve the problem.

Solution

Thank You

Go to Home