Hi,
A basic electronics formula: P = V x I
In your case this means:
P = power (generated heat) = voltage x current.
Current:
* There is current flow from base to emitter
* And there is current flow from collector to emitter
Voltage:
* bae current is from base to emitter, thus you need to calculate with V_BE
* collectir current is to emitter, too. Thus you need to calculate with V_CE.
Power:
* P_B = I_B x V_BE
* P_C = I_C x V_CE
Total power = P_B + P_C
Now you know the generated ammount of heat.
*****
This heat needs to be spread to the surrounding air.
Every electronic device comes with a datasheet. It contains the information about dissipated power and expectable rise of temperature.
This is true for a heatsink, too.
It's important to read both datasheets, of bjt and the heatsink.
R_th is the thermal resistance. It shows how much the temperature rises when it has to dissipate power. = delta_t / power.
*****
Example:
Maybe you calculate the power of your transistor to be 20W.
And maybe you want max temperature rise of 80°C which is 80K.
Then r_th needs to be 80K/20W = 4K/W or less. (From junction via heatsink to ambient)
This is a huge heatsink.
This is physics, you can't avoid this.
Klaus