Effect of particle and heat sources on impurity transport in tokamak plasmas