Joule heating induced by vortex motion in a type-II superconductor