A Combined Electromagnetic and Thermal Approach to the Design of Electrical Machines