The power consumed by a CPU (which equals heat dissipated) is given by P = CV2F, where C is capacitance, V is voltage and F is clock speed. If my data (collected on a single CPU, an i5-9300H) is correct, C scales quadratically with F*, and V scales linearly with F*. That would imply that P scales to the fourth power of F... which probably explains why even the best of processors can't go any faster than 5 GHz stock. Even then, you'd need some really good liquid cooling to see such high clock speeds under load.
*The "multiplier" mentioned represents the clock speed. Multiply by 99.8 MHz (the average bus frequency for the CPU tested) to get the actual clock speed.
Edit: But I really think I'm wrong in saying that power scales to the 4th power of clock speed. This chart came from the same data set, and it definitely shows that power grows quadratically with clock speed, not to the 4th power.
Out of curiosity, why not use power = VI? That's a much simpler measurement and doesn't care about those pesky frequency-dependent things like capacitance.
It would be so easy if I were able to read the current going through the CPU. Unfortunately, my CPU only gives me its power consumption, voltage and clock frequency. I think there is a sensor for current, since it's possible to set the maximum current the CPU is allowed to draw, but the program I'm using doesn't show it. I then have to derive capacitance from there, which is where the confusion between power being either quadratic or quartic with respect to clock frequency starts. After looking at the data again, it turns out that voltage actually scales exponentially with clock frequency, but it's so close to being a straight line that I'm assuming that it's linear.
Also, I'm not really concerned about power consumption, I'm more concerned about the heat dissipated by a processor over a range of clock frequencies, given a fixed workload. I need the clock frequency to predict what happens if I were to, say, overclock this processor. (Which I can't, but a man can dream)