Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Heat Transfer

In this case-study, you’ll evaluate multiple techniques to determine the rate of heat transfer down the length of a rod heated at one end. You’ll be determining the temperature distribution in that rod as a function of time and distance using multiple techniques (assumed to be one-dimensional):

  • Experimental solution

  • Analytical solution

  • Two numerical solutions

You’ll need a few tools:

  • A basic understanding of the heat equation and an example solution,

  • Two numerical techniques to estimate the solution of the heat equation:

    • finite element (manual)

    • finite element (with software)

  • A safe, basic experimental setup available to you in your apartment with purchase of an item that’s less than $10.

    • With an ESP32 and one MAX6675 thermocouple amplifier with a thermocouple to collect temperature data from the experiment.

    • A small diameter brass or steel rod (available from the TA or Instructor)

1-D Heat Equation

The heat equation is a well-known partial differential equation that describes the distribution of heat in a given region over time subject to boundary conditions. We’ll solve for the temperature as a function of position and time given a constant heat flux at one end of the rod.

Analytical Solution

For a rod of length LL with a constant cross-sectional area AA and a constant thermal conductivity kk, the heat equation is given by:

∂T∂t=α∂2T∂x2\frac{\partial T}{\partial t} = \alpha \frac{\partial^2 T}{\partial x^2}

where α\alpha is the thermal diffusivity equal to k/ρCpk/\rho C_p where kk is the thermal conductivity, ρ\rho is the density, and CpC_p is the specific heat capacity.

The solution to that specific one-deminensional semi-infinite scenario for a constant heat flux is:

T(x,t)=T0+2qo′′(αt/π)0.5kexp⁡(−x24αt)−qo′′xkerfc(x2αt)(2)T(x,t) = T_0 + \frac{2q^{''}_o(\alpha t/\pi)^{0.5}}{k} \exp \left( \frac{-x^2}{4 \alpha t} \right) - \frac{q^{''}_o x}{k} erfc \left( \frac{x}{2 \sqrt{\alpha t}} \right) \tag{2}

where T0T_0 is the initial temperature of the rod, qo′′q^{''}_o is the constant heat flux at the end of the rod, and erfcerfc is the complementary error function.

The solution for a constant surface temperature is:

T(x,t)−Ti=(Ts−Ti)⋅[1−erf(x2αt)]qs′′(t)=k(Ts−Ti)παt\begin{align} T(x,t) - T_i = (T_s - T_i)\cdot \left[1 - erf \left( \frac{x}{2\sqrt{\alpha t}} \right) \right] \tag{3a}\\ q^{''}_s(t) = \frac{k(T_s - T_i)}{\sqrt{\pi \alpha t}} \tag{3b} \end{align}

where TsT_s is the surface temperature, TiT_i is the initial temperature, and qs′′q^{''}_s is the heat flux at the surface.

Task 1 Description:

Define two functions such that you can evaluate the temperature distribution in a rod as a function of time and distance using the above equations. The first function should be for a constant heat flux and the second function should be for a constant surface temperature. The material properties are not inputs to the function but are constants defined for tool steel or brass. Those two functions are then used to evaluate the temperature distribution in a rod as a function of time and distance for the two cases.

There should be two plots with each plot having multiple curves for the temperature as a function of distance for at least 3 but no more than 8 different times up to 10 seconds. The two plots should have a title, axis labels, and a legend.

Numerical Solution

This is the same scenario discussed in the Ansys lecture. Pieces of that lecture will be repeated here.

The above can be programmed and solved with odeint with python. An example scenario is given below.

This is the constant temperature scenario where the first section is at a given temperature and stays that way.

(200, 100)
<Figure size 640x480 with 1 Axes>

Euler method

The below is an alternate method whose accuracy can be dependent on the values of dt, alpha, and dx.

The numerical solution treats a finite section of the rod to have a constant temperature and properties. Discretization of Equation 1 for a similar 1-D scenario results in the following equations where 4b is for the last node furthest from the heat source and 4a is for all other nodes:

T[i+1,j]=T[i,j]+α⋅δt/δx2⋅(T[i,j+1]−2⋅T[i,j]+T[i,j−1])T[i+1,j]=T[i,j]+α⋅δt/δx2⋅(T[i,j−1]−2⋅T[i,j]+T[i,j−1])\begin{align} T[i+1,j] = T[i,j] + \alpha\cdot\delta t/\delta x^2\cdot(T[i,j+1]-2\cdot T[i,j]+T[i,j-1]) \tag{4a} \\ T[i+1,j] = T[i,j] + \alpha\cdot\delta t/\delta x^2\cdot(T[i,j-1]-2\cdot T[i,j]+T[i,j-1]) \tag{4b} \end{align}

where ii is the time index and jj is the spatial index. The initial condition is T[0,j]=T0T[0,j] = T_0 for all jj and the boundary condition is T[i,0]=T0T[i,0] = T_0 for all ii.

Task 2 Description:

Plot the temperature distribution in a rod as a function of time and distance using the above 1-D numerical equations (using the ). Use the same properties as in Task 1. The plots should have a title, axis labels, and a legend. Compare the numberical result to the analytical solution as a function of time for a given position.

Note that the above analytical solution is assuming an infinitely long rod. Therefore, make sure the numerical solution has a sufficiently long rod (typically twice as long as the distance where the temperature changers are occuring).

Comparison between the above two methods

Task 3 Description:

Compare the analytical and numerical result as a function of time for a given position along the rod (given a constant surface temperature). The plots should have a title, axis labels, and a legend. Also include an estimate of some measure of accuracy comparison whether that’s an r-squared value or other (like a mean absolute percent error).

Use of Software to Solve the Heat Equation: Ansys Workbench

Task 4 Description:

Use Ansys Workbench to obtain a plot of the temperature in the rod for one of the two above boundary conditions (constant surface temperature or constant heat flux).

Experimental results

Task 5 Description

Obtain experimental results with the ESP32, MAX6675, thermocouple, small diameter rod, and lighter. A rod is fitted with one thermocouple at 5-10 cm away from the flame. The rod is safely heated with the lighter at one end. The rod can be supported on a stand. The temperature is recorded with an ESP32 and the data is sent to a phone via bluetooth and then saved and plotted. Results are compared to the analytical and numerical solutions.

Example results are below.

Loading...
<Figure size 640x480 with 1 Axes>

Task 6: Document your Experience

Document your experience with the above tasks in a write-up according to the suggestions here.

Heat Transfer Project Rubric

TaskPointsSome criteria
Code Development10Analytical and numerical functions are generated to yield the temperature at any point along the rod and a given time are developed with python and are plotted.
Experimental Data15Experimental data is collected where the temperature upon exposure to a heat source is collected for a given time frame at a given distance. Data at multiple distances is recommended. Data can also be collected with different materials (copper, steel, or brass).
Comparison10A plot showing the experimental and modeling result for the temperature as a function of time
Writeup25Documentation is complete according to the Case Study Documentation. It’s important to show evidence (plot or plots) of the modeling and experimental results and discuss the implications.
Total60

Note the intent is to gain experience with the modeling and experimental process and to compare those results. The modeling and experimental results may not be perfect.