Electrochemical analysis and thermal performance of lithium ion batteries