The current density in a wire of radius ‘a′ varies with radial distance ‘r′ as J=kr2 , where k is a constant .