skip to content
Aymen Hafeez

Heat conduction in a symmetric, finite rod

/ 7 min read

Table of Contents

Consider the following 1-D metal bar

Heat conduction diagram 1

Heat flow in one dimension can be generalised by Fourier’s law, which states that heat will flow down a negative temperature gradient,

q=kdTdx, q = -k\frac{\text{d} T}{\text{d} x},

where kk is thermal conductivity.

For a system with symmetric, finite geometry we can set the following spatial and temporal boundary conditions:

  • when x=0, T=T1x = 0, \ T = T_1; when x=L, T=T1x = L, \ T = T_1
  • when t=0, T=T0t = 0, \ T = T_0
Heat conduction diagram 2

We can derive a 1-D heat transfer equation by doing a balance over a small control volume in a short period of time δt\delta t:

Heat conduction diagram 3 HEAT INHEAT OUT=Accumulated HEAT \text{HEAT IN} - \text{HEAT OUT} = \text{Accumulated HEAT} kTxAδt[k(Tx+2Tx2δx)]Aδt=ρcpΔTV -k\frac{\partial T}{\partial x}A\delta t - \left[-k\left(\frac{\partial T}{\partial x} + \frac{\partial^2T}{\partial x^2}\delta x\right)\right]A\delta t = \rho c_p \Delta TV

The volume, VV, can be rewritten as AδxA\delta x,

kTxAδt[k(Tx+2Tx2δx)]Aδt=ρAδxcpΔT -k\frac{\partial T}{\partial x}A\delta t - \left[-k\left(\frac{\partial T}{\partial x} + \frac{\partial^2T}{\partial x^2}\delta x\right)\right]A\delta t = \rho A \delta x c_p \Delta T

and after some manipulation we get

k2Tx2=ρcpΔTδt k \frac{\partial^2T}{\partial x^2} = \rho c_p \frac{\Delta T}{\delta t}

Taking the limit as the right hand side goes to zero,

k2Tx2=ρcpTt k \frac{\partial^2T}{\partial x^2} = \rho c_p \frac{\partial T}{\partial t} Tt=kρcp2Tx2 \frac{\partial T}{\partial t} = \frac{k}{\rho c_p}\frac{\partial^2T}{\partial x^2}

We can define thermal diffusivity α=kρcp\alpha = \frac{k}{\rho c_p}, and so we get the 1-D heat transfer equation with no internal heat generation:

2Tx2=1αTt \frac{\partial^2 T}{\partial x^2} = \frac{1}{\alpha} \frac{\partial T}{\partial t}

In order to solve this we need to non-dimensionalise the variables involved. Let us define the following dimensionless variables:

T^=TT1T0T1 \hat{T} = \frac{T - T_1}{T_0 - T_1} z=xL z = \frac{x}{L} τ=αL2t \tau = \frac{\alpha}{L^2} t

To write the heat equation in terms of the dimensionless variables we need to rewrite the original variables and their derivatives in terms of the dimensionless variables.

T=T^(T0T1)+T1;  δT=(T0T1)δT^ T = \hat{T}(T_0 - T_1) + T_1; \ \ \delta T = (T_0 - T_1)\delta \hat{T} x=Lz;  δx=Lδz x = Lz; \ \ \delta x = L \delta z t=L2ατ;  δt=L2αδτ t = \frac{L^2}{\alpha} \tau ; \ \ \delta t = \frac{L^2}{\alpha} \delta \tau

Finding the first order partial derivative:

Tt=limδt0(δTδt)=limδτ0((T0T1)δT^L2αδτ)=α(ToT1)L2T^τ \frac{\partial T}{\partial t} = \lim_{\delta t \to 0} \left(\frac{\delta T}{\delta t}\right) = \lim_{\delta \tau \to 0} \left(\frac{(T_0 - T_1)\delta \hat{T}}{\frac{L^2}{\alpha}\delta \tau}\right) = \frac{\alpha(T_o - T_1)}{L^2} \frac{\partial \hat{T}}{\partial \tau}

The first order derivative with respect to xx can be found as

Tx=limδx0(δTδx)=limδx0((T0T1)δT^Lδz)=(T0T1)LT^z \frac{\partial T}{\partial x} = \lim_{\delta x \to 0} \left(\frac{\delta T}{\delta x}\right) = \lim_{\delta x \to 0} \left(\frac{(T_0 - T_1)\delta \hat{T}}{L\delta z}\right) = \frac{(T_0 - T_1)}{L} \frac{\partial \hat{T}}{\partial z}

And so the second order derivative is

2Tx2=limδx0(Txx+δxTxxδx)=limδx0((T0T1)L(T^zz+δzT^zz)Lδx)=(T0T1)L22T^z2\begin{equation*} \begin{aligned} \frac{\partial^2 T}{\partial x^2} &= \lim_{\delta x \to 0} \left(\frac{\frac{\partial T}{\partial x}|_{x+\delta x} - \frac{\partial T}{\partial x}|_x}{\delta x}\right) = \lim_{\delta x \to 0} \left(\frac{\frac{(T_0 - T_1)}{L}\left(\frac{\partial \hat{T}}{\partial z}|_{z+\delta z} - \frac{\partial \hat{T}}{\partial z}|_z\right)}{L\delta x}\right) = \frac{(T_0 - T_1)}{L^2}\frac{\partial^2 \hat{T}}{\partial z^2} \end{aligned} \end{equation*}

Substituting this back into the original heat equation gives

(T0T1)L22T^z2=1αα(T0T1)L2T^τ \frac{(T_0 - T_1)}{L^2}\frac{\partial^2 \hat{T}}{\partial z^2} = \frac{1}{\alpha} \frac{\alpha(T_0 - T_1)}{L^2}\frac{\partial \hat{T}}{\partial \tau} 2T^z2=T^τ \boxed{\frac{\partial^2 \hat{T}}{\partial z^2} = \frac{\partial \hat{T}}{\partial \tau}}

Now, we must re-write the boundary conditions in terms of the non-dimensional variables. At the ends of the rods TT is always T1T_1, and so, the two spatial boundary conditions collapse to just one:

T^z=0,1=0 \hat{T}|_{z=0,1} = 0

Just before t=0t=0 the rod is at a uniform temperature, T0T_0, until the temperature of the ends of the rod is raised to T1T_1. And so the temporal boundary condition becomes

T^τ=0=1 \hat{T}|_{\tau=0} = 1

In order to now solve the differential equation derived above let us assume the solution is of the form

T^(z,τ)=Z(z)Θ(τ) \hat{T}(z, \tau) = Z(z)\Theta(\tau)

To substitute this into the non-dimensionalised 1-D heat equation we must first take the derivatives of the above

2T^z2=2(Z(z))z2Θ(τ)=ZΘ \frac{\partial^2 \hat{T}}{\partial z^2} = \frac{\partial^2(Z(z))}{\partial z^2}\Theta(\tau) = Z''\Theta T^τ=Z(z)(Θ(τ))τ=Z(z)d(Θ(τ))dτ=ZΘ \frac{\partial \hat{T}}{\partial \tau} = Z(z) \frac{\partial(\Theta(\tau))}{\partial \tau} = Z(z)\frac{\text{d} (\Theta(\tau))}{\text{d} \tau} = Z \Theta'

And so, we have

ZΘ=ZΘ Z\Theta' = Z''\Theta

For the sake of later convenience let the above equal a constant λ2-\lambda^2,

ΘΘ=ZZ=λ2 \frac{\Theta'}{\Theta} = \frac{Z''}{Z} = -\lambda^2

We can now integrate both sides of the above by separation of variables:

ΘΘ=λ2dτlnΘ=λ2τ+CΘ=Aeλ2τ\begin{equation*} \begin{aligned} \int \frac{\Theta'}{\Theta} &= \int \lambda^2 \text{d} \tau \\ \ln \Theta &= -\lambda^2 \tau + C \\ \Theta &= Ae^{-\lambda^2\tau} \end{aligned} \end{equation*}

Using the temporal boundary condition, T^=1\hat{T} = 1 when τ=0\tau = 0, we get that A=1A = 1.

For the ZZ terms we have

ZZ=λ2\frac{Z''}{Z} = -\lambda^2 Z+Zλ2=0Z'' + Z\lambda^2 = 0

This is a general form with the general solution Z=C1sin(λz)+C2cos(λz)Z = C_1\sin(\lambda z) + C_2\cos(\lambda z). We can find the constants by applying the spatial boundary conditions to the solution.

z=0T^=0  C2=0 z = 0 \Rightarrow \hat{T} = 0 \ \therefore \ C_2 = 0

For C1C_1 we have that when z=1z = 1, T^=0\hat{T} = 0, and so, C1sin(λ)=0C_1\sin(\lambda) = 0 which means that λ=nπ\lambda = n\pi for n=1,2,3,n = 1, 2, 3, \dots. Using the principle of superposition the overall solution must be the sum of the individual solutions,

Z=n=1Cnsin(nπz) Z = \sum_{n=1}^\infty C_n\sin(n\pi z)

And so, multiplying the two functions together gives the solution,

T^=ZΘ=n=1Cnen2π2τsin(nπz) \hat{T} = Z\Theta = \sum_{n=1}^\infty C_n e^{-n^2\pi^2\tau}\sin(n\pi z)

In order to find the constants C1,C2,C3,C_1, C_2, C_3, \dots, we need to use the temporal boundary condition:

T^τ=0=1=n=1Cnsin(nπz) \hat{T}|_{\tau=0} = 1 = \sum_{n=1}^\infty C_n\sin(n\pi z)

Because the sin\sin function is orthogonal we can use the property

01sin(mπz)sin(nπz) dz=0, \int_0^1 \sin(m\pi z)\sin(n\pi z) \ \text{d} z = 0,

unless n=mn = m. We can multiply both sides of the equation where the temporal boundary condition was applied by sin(mπz)\sin(m\pi z) for m=1,2,3,m = 1, 2, 3, \dots, and integrate both sides over zz from 00 to 11.

01sin(mπz)dz=01sin(mπz)n=1Cnsin(nπz)dz=n=1Cn01sin(mπz)sin(nπz)dz\begin{equation*} \begin{aligned} \int_0^1 \sin(m\pi z) \text{d} z &= \int_0^1 \sin(m\pi z)\sum_{n=1}^\infty C_n\sin(n\pi z) \text{d} z \\ &= \sum_{n=1}^\infty C_n\int_0^1 \sin(m\pi z)\sin(n\pi z) \text{d} z \end{aligned} \end{equation*}

And so, we only get left with the terms where n=mn = m, giving the following expression for the unknown coefficient:

Cn=01sin(nπz)01sin2(nπz) C_n = \frac{\int_0^1 \sin(n\pi z)}{\int_0^1 \sin^2(n\pi z)}

Using the identity sin2(x)=12(1cos(2x))\sin^2(x) = \frac{1}{2}(1 - \cos(2x)), we can evaluate the integral in the denominator as

01sin2(nπz) dz=12011cos(2nπz) dz=[z2sin(2nπz)2nπ]01=12\begin{equation*} \begin{aligned} \int_0^1 \sin^2(n\pi z) \ \text{d} z &= \frac{1}{2}\int_0^1 1 - \cos(2n\pi z) \ \text{d} z \\ &= \left[\frac{z}{2} - \frac{\sin(2n\pi z)}{2n\pi}\right]_0^1 \\ & = \frac{1}{2} \end{aligned} \end{equation*}

The coefficient is, therefore,

Cn=201sin(nπz) dz=2[cos(nπz)nπ]=2nπ(1(1)n)\begin{equation*} \begin{aligned} C_n &= 2\int_0^1 \sin(n\pi z) \ \text{d} z \\ &= 2\left[-\frac{\cos(n\pi z)}{n\pi}\right] \\ &= \frac{2}{n\pi}(1 - (-1)^n) \end{aligned} \end{equation*}

The coefficient is only non-zero for odd values of nn, i.e. C1=4π,C2=0,C3=43π,C4=0,C5=45πC_1 = \frac{4}{\pi}, C_2 = 0, C_3 = \frac{4}{3\pi}, C_4 = 0, C_5 = \frac{4}{5\pi} \dots. Substituting the coefficient back into the solution we got earlier we have

T^=n=12nπ(1(1)n)en2π2τsin(nπz) \hat{T} = \sum_{n=1}^\infty \frac{2}{n\pi}(1-(-1)^n) e^{-n^2\pi^2\tau} \sin(n\pi z) T^=4π(eπ2τsin(πz)+13e9π2τsin(3πz)+15e25π2τsin(5πz)+) \hat{T} = \frac{4}{\pi}\left(e^{-\pi^2\tau}\sin(\pi z) + \frac{1}{3}e^{-9\pi^2\tau}\sin(3\pi z) + \frac{1}{5}e^{-25\pi^2\tau}\sin(5\pi z) + \dots \right)

And so, finally, we can convert from the dimensionless variables back to the original form, giving an expression for the temperature TT at a distance xx along the bar at a given time tt:

T=T1+(T0T1)n=12nπ(1(1)n)en2π2tsin(nπz) T = T_1 + (T_0 - T_1)\sum_{n=1}^\infty \frac{2}{n\pi}(1-(-1)^n) e^{-n^2\pi^2t} \sin(n\pi z) T=T1+(T0T1)4π(eαπ2L2tsin(πxL)+13eα9π2L2tsin(3πxL)+15e25απ2L2tsin(5πxL)+) T = T_1 + (T_0 - T_1)\frac{4}{\pi}\left(e^{-\alpha\frac{\pi^2}{L^2}t}\sin\left(\frac{\pi x}{L}\right) + \frac{1}{3}e^{-\alpha\frac{9\pi^2}{L^2}t}\sin\left(\frac{3\pi x}{L}\right) + \frac{1}{5}e^{-25\alpha\frac{\pi^2}{L^2}t}\sin\left(\frac{5\pi x}{L}\right) + \dots\right)

We can see that for x=0x = 0 every term in the series is 00 so we have T=T1T = T_1, as expected. Furthermore, we can see that as tt \to \infty the temperature all along the rod goes to T1T_1. As time increases the higher frequency terms become more and more trivial as the terms exponentially decay faster. And so, the approximation using just the first few terms of the series becomes more and more accurate as time increases. However, at earlier values of time using just the first few terms of the series still gives a poor approximation for TT. Much of this post was referenced from my lecture notes which are based on Bird, Stewart and Lightfoot’s ‘Transport Phenomena’, so see that for more on mechanisms of energy transfer.

References:

Bird, R., Lightfoot, E. and Stewart, W., 2007. Transport phenomena. New York: Wiley.