Deriving the heat diffusion equation was one of the most interesting things I learned about in my undergraduate degree. The fact that you can sit in your chair and discover something about how the world works with nothing more than your brain, a pen, and some paper astonishes me.

The heat diffusion equation descrbes how heat diffuses through objects in time and space. In this post I will be deriving the partial differential equation which is the 1-D heat diffusion equation.

The first thing we must consider is the system which we want to describe. This is a material in which heat diffuses. We want to be able to describe the transient nature of heat diffusion as well as the direction.

Consider a small 1-D control volume into which heat enters on one side and leaves on the other. Some heat will accumilate within the control volume over time.

We can therefore write a balance equation for this system:

For an infinitesimally small period of time , for a material with no internal heat generation or consumption we can say that:

(I will cover internal heat generation and consumption in another post)

So what is the amount of heat in? And what is the amount of heat out? Recall Fourier’s law for heat flux:

Where $q$ is the heat flux ($W/m^2$), $k$ is the thermal conductivity ($W/mK$) and $\frac{\partial T}{\partial x}$ is the temperature gradient in the $x$ direction at the point of the heat flux in question. Why the partial derivatives I hear you ask? This is because temperature is not solely a function of $x$, it is also a function of time because we want to describe the transient nature of heat diffusion.

Note the units of heat flux ($q$). These can be converted into an $amount \ of \ heat \ in/out$ by multiplying by time ($\delta t$) and area ($A$). The resulting unit will simply be in joules:

Whether this is heat in or heat out will depend on $\frac{\partial T}{\partial x}$ which will be either positive or negative, indicating the direction of heat transfer (remember, heat flows from across a temperature gradient!).

Now let us consider the temperature gradients at the beginning and end of our control volume. The temperature gradient in x at the beginning of our control volume will simply be $\frac{\partial T}{\partial x}$. The temperature gradient at the end of the control volume will be the temperature gradient at the beginning \textit{plus some change in the temperature gradient with x}. Let’s unpack that, what we are saying is that the temperature gradient itself will change across the control volume (the change in temperature with x is itself changing with x). The change in the temperature gradient is the second derivative of the temperature gradient itself:

Note that the units of this second derivative are Therefore the temperature gradient at the end is the temperature gradient at the beginning plus the change in the temperature gradient multiplied by some small change in $x$ (the size of our control volume):

We can now plug the temperature gradients for the inlet and the outlet into Fourier’s law to calculate the heat flux in and out, and subsequently multiply by area and time to find the total heat in and out, and subsequently the accumulation

So what is the accumulated heat term? Well the amount of heat that a material accumulates is proportional to the change in temperature it undergoes and its heat capacity. You might be familiar with this in the form of the equation $q=m \ c \Delta T$ where $m$ is mass, and $c$ is heat capacity. This can be rewritten as , and noting that the volume of our control volume is we see that:

.

This equation describes the amount of heat accumulated within a material given a specific change in temperature. Substituting this into the original energy balance, we obtain out full balance:

Note that area is not a factor in this equation and drops out. We can then collect terms:

Cancelling and collecting terms

Taking the limits as the right hand side of the above equation goes to zero we see a derivative appear and thus we get:

The constant terms on the left hand side can be grouped into a factor called the thermal diffusivity: $\alpha = \frac{k}{\rho c}$ which has units , and so the final 1-D heat diffusion equation with no heat generation is:

Okay, that wasn’t too difficult was it? We applied a balance equation, also known as conservation of energy, to our system and we ended up with aa second order partial differential equation describing how temperature changes in space and time.

How do we solve this equation though? By applying boundary conditions of course! Notice that this PDE is 2nd order in $x$ and 1st order in time. Therefore we need 2 spacial boundary conditions and 1 tempoeral boundayr condition (also known as an initial condition) to fully find a solution to this equation. The types of boundary conditions we apply to this equation will affect the types of solutions that we find.

We will explore these boundary condition in the next posts and see how changing them also changes the type of solution we find.