The ability to transfer heat is called the thermal conductance, but we always use the reciprocal value: the heat resistance. The thermal resistance (Rth) is measured in °C/W. If the Rth of a heatsink is 1°C/W, the temperature will rise 1°C per Watt power dissipation. So:
R=T/P
Doesn't this folmula look familiar? Yep, if you replace T with V and P with I, you get the formula for electrical resistance. This anology makes it very easy to calculate the heak sink you need: replace all heat producers with current sources and temperatures with voltages. Take a look at the diagram below.
This diagram shows transistor T6 of the lab power supply, a 2N3055 producing 60W at its junction. (The junction is the silicon chip inside the transistor.) The thermal resistance from junction to case is 1.5°C/W. The ambient temperature is 25°C. Resistor RTHC-A is the thermal resistance of the heatsink. This is the resistance we want to calculate.
The maximum junction temperature of the 2N3055 is 200°C. The 'temperature drop' across RTHJ-C is 60W∙1.5°C/W = 90°C. That leaves 200 - 90 - 25 = 85°C for the heatsink. So RTHC-A = 85°C/60W = 1.4°C/W.
Let's now calculate the heatsink for T3, a TIP41A. The maximum junction temperature is 150°C. The datasheet says: when you keep the case temperature to 25°C, the transistor can dissipate 65W. This means that RTHJ-C = 125°C/65W = 1,9°C/W. The transistor dissipates 4.1W, so the total resistance from junction to ambient may not exceed 125°C/4.1W = 30.5°C/W. So the thermal resistance of the heatsink should not exceed 30.5 - 1.9 = 28.6°C/W. A very small heatsink will suffice.
Important notes:
When you attach a heatsink to a transistor, there will always be air pockets between the two metal plates. And air is a bad heat conductor. To reduce the thermal resistance between the transistor case and the heatsink, you should use special heat conducting paste (heatsink compound).
Bear in mind that one of the pins (base, collector or emitter) will be internally connecteded to the metal case of a transistor. If you want to mount two transistors on one heatsink, make sure you don't create shortcuts. For example, both the TIP41A and the 2N3055 have their collectors connected to the case. In our lab supply, both collectors are connected anyway, so you can mount these transistors on the same heatsink. But obviously, this is not always the case! Fortunately, you can buy insulators to put between the transistor and the heatsink. Note however that this will introduce extra thermal resistance!
In some catalogs you may find thermal resistances measured in K/W (Kelvin per Watt). This is the same as °C/W: 1K/W = 1°C/W.