The effect of thermal gradients on the performance of lithium-ion batteries