Rotating electric machine thermal study