My iMac mid 2011 started heating up about a year ago to the point that the hard drive broke and had to be replaced.
I managed to replace the hard drive and I also replaced the power supply module as I had suspected this was the problem. I then reinstalled the correct operating system with no problem however I noticed it started heating up again.
I then got an application which showed the heat sensors and the rpm of the fans and noticed that one of the fans, the CPU fan, was saying 0 rpm. I took my iMac apart and checked the the connections of the cpu fan with a multi meter and noticed that when one of the connections was in contact with the heat sink it started to work again.
I assume that this connection is ground and had become disconnected to the PCB and so because the heat sink is grounded this makes the fan work when in contact. I then soldered this connection and the fan works fine ever since.
After all this, fixing the fan has made the temperature cooler than what is was before but it is still hot. The Secondary T2 heat sink reaches 66 degrees after about half an hour of usage and the upper left side of the iMac gets very hot to touch. From looking at the stats application it looks as though it is the AC/DC power module which heats up because the 'T2 AC/DC Sec heat sink' and the power supply temperature sensors get to around 60 degrees which is not normal and all the other temperature sensors are normal temperatures.
I have no idea how to fix this so any help would be appreciated.