Consider heat flowing into a metal, with the temperature a scalar field, represented by a function of position, \(\vec{r}\), and time, \(t\), so \(T(\vec{r}, t)\).
Then the heat in a small volume, \(V\), is
\[Q = \int_V \rho c_{\rm p} T(\vec{r}, t) \difp{3}{\vec{r}}\]
The rate at which heat transfers from one volume to another depends on the temperature gradient, the area of the contact, and the metal’s thermal conductivity.
For a boundary of area \(A\),
\[\frac{\dif{Q}}{\dif{t}} = \int_A k \dif{\vec{\sigma}} \cdot \nabla T(\vec{r}, t)\]
with \(\dif{\vec{\sigma}}\) the normal vector to the area, \(\dif{A}\).
Applying the divergence theorem,
\[\begin{split}\begin{aligned}
\frac{\dif{Q}}{\dif{t}} &= \int_V \nabla \cdot [k \nabla T(\vec{r}, t)] \difp{3}{\vec{r}} \\
&= \int_V k \nabla^2 T(\vec{r}, t) \difp{3}{\vec{r}}
\end{aligned}\end{split}\]
Then equating the expressions for \(\frac{\dif{Q}}{\dif{t}}\), and assuming \(\rho\) and \(c_{\rm p}\) are constant,
\[\begin{split}\begin{aligned}
\frac{\dif{Q}}{\dif{t}} &= \int_V \nabla \cdot [k \nabla T(\vec{r}, t) ] \difp{3}{\vec{r}} \\
&= \int_{V} k \nabla^2 T(\vec{r}, t) \difp{3}{\vec{r}} \\
\nabla^2 T(\vec{r}, t) &= \frac{\rho c_{\rm p}}{k} \frac{\partial T(\vec{r},t)}{\partial t}
\end{aligned}\end{split}\]