Thermal management of the permanent magnets in a totally enclosed axial flux permanent magnet synchronous machine