Solution (source code)

= Solution

Distinguish electrical <current density> $\mathbf J_e$ from <heat flux> $\mathbf J_Q$. Uniform current across the circular section gives
$$
J_e=\frac{I}{\pi a^2},\qquad E=\frac{J_e}{\sigma}
$$
by <Ohm's law>. The <local Joule heating rate> is electrical <work> per unit <volume (thermodynamics)> and time:
$$
\boxed{H=\mathbf J_e\cdot\mathbf E=\frac{J_e^2}{\sigma}
=\frac{I^2}{\sigma\pi^2a^4}.}
$$
For a segment of length $\ell$, integration gives $H\pi a^2\ell=I^2\ell/(\sigma\pi a^2)=I^2R$, confirming the usual resistor <power>. The model takes <electrical conductivity> constant and ignores temperature-induced current redistribution.