Thermal Analysis of Electric Machines