# Evolution of Temperature in Time and Space in an Infinite Bar

An infinitely long, uniform bar is perfectly insulated and one end is kept at a constant temperature ($$T_s$$). How does its temperature evolve in time and space?

Because the bar's cross-section is negligible W.R.T. its length, we can treat this as a quasi-$$\text{1D}$$ problem and Fourier's equation applies. We're looking for a function $$T(x,t)$$ that satisfies:

$$\partial_t T=\alpha \partial_{xx} T$$

and any boundary/initial conditions.

In addition we assume the bar's initial ($$t=0$$) temperature is $$T_i$$.

My question is inspired by this PSE question. It was initially framed for a constant heat flux $$\mathbf{q}$$ at $$x=0$$ but somewhat later the OP seems to have settled for the simpler case I presented above.

For a bar of finite length $$L$$ this becomes a fairly banal BVP (a second BC was used where the heat conduction at $$x=L$$ is $$0$$) with initial condition, and with solution of the form:

$$\boxed{T(x,t)=T_s+\displaystyle\sum_{n=1}^{\infty} B_n\exp\Big({-\alpha \Big(\frac{\pi n }{2L}\Big)^2 t}\Big)\cos\Big(\frac{\pi n x}{2L}\Big)}$$ For $$n=1,2,3,...$$ Determine the coefficients $$B_n$$ with the Fourier series: $$B_n=\frac{2}{L}\int_0^LT_i\cos\Big(\frac{\pi n x}{2L}\Big)\mathrm{d}x$$

For a very long bar, i.e. $$L\to \infty$$, this tends to the question the OP asked.

At one point he then declared in the comments that he'd found the answer to his question on a page titled '2.2. Transient Conduction in Semi-Infinite Slab' (find the link provided by G.Smith in the comments). It's a very poor quality resource that posits the solution without any derivation whatsoever as being:

$$\boxed{\frac{T(x,t)-T_s}{T_i-T_s}=\mathrm{erf}\Big(\frac{x}{2\sqrt{\alpha t}}\Big)}$$

This looks like an extremely neat solution to a complex problem (at least to me) and I haven't the slightest idea how it was arrived at or whether it is even correct. The equation is dimensionally consistent, always a good sign of course.

On way forward could be to compare the solution for the the finite bar and the web page's solution for ever increasing values of $$L$$ and see if they converge. But that seems like an awful amount of work.

So my question really is: 'does anyone have a(n) idea(s) on how to tackle the $$L=\infty$$ problem?'

This page does confirm the validity of the $$\mathrm{erf}$$ solution.

• To check the answer, just substitute it into the differential equation and BCs, and see if it satisfies them. This is a so-called similarity solution or boundary layer solution applicable to a case in which there is no identifiable length scale. The way of solving a problem like this is to start with de-dimensionalizing the differential equation and BCs, to there point that there is a length scale that can be cancelled by combining two of the dimensionless independent variables into a single similarity variable. See Bird et al, Transport Phenomena. Mar 26, 2021 at 17:26
• Ah. The LHS and the group $\frac{x}{\sqrt{\alpha t}}$ are indeed dimensionless groups.
– Gert
Mar 26, 2021 at 17:33
• You’ve linked to a file on a C drive. Mar 26, 2021 at 17:46
• @G.Smith Thanks! There seems to be no way to link this as a web page. I've provided the full title, so it will be easy to Google.
– Gert
Mar 26, 2021 at 17:58

With thanks to 'Chet' in the comments it appears this problem (at least without convection) isn't really hard.

$$\partial_t T=\alpha \partial_{xx}T$$ Boundary conditions: $$T(x,0)=T_i$$

$$T(0,t)=T_s$$

Introduce a Similarity Variable $$\eta$$:

$$\eta=\frac{x}{2\sqrt{\alpha t}}$$ This transforms the original PDE into an ODE: $$\frac{\mathrm{d}^2T(\eta)}{\mathrm{d}\eta^2}=-2\eta \frac{\mathrm{d}T(\eta)}{\mathrm{d}\eta}\tag{1}$$ Transform also the boundary conditions: $$T(x,0)=T_i\to T(\eta\to \infty)=T_i$$ $$T(0,t)=T_s\to T(\eta=0)=T_s$$ This then solves to: $$\frac{T(x,t)-T_s}{T_i-T_s}=\mathrm{erf}(\eta)$$ $$\boxed{\frac{T(x,t)-T_s}{T_i-T_s}=\mathrm{erf}\Big(\frac{x}{2\sqrt{\alpha t}}\Big)}$$

Solving $$(1)$$ -

Substitute $$z=T'(\eta)$$ and $$z'=T''(\eta)$$, so that:

$$z'=-2\eta z$$ $$\frac{\mathrm{d}z}{z}=-2\eta$$ $$\ln z=-\eta^2+c$$ $$z=c_1\exp{(-\eta^2)}$$ $$T'(\eta)=c_1\exp{(-\eta^2)}$$ Integrate again: $$T(\eta)=c_1\int \exp{(-\eta^2)}+c_2$$

Apply the BC and IV to determine $$c_1$$ and $$c_2$$.