Which way are heat sinks supposed to be mounted? With the fins around the component, or facing outside?
Electrical Engineering Stack Exchange is a question and answer site for electronics and electrical engineering professionals, students, and enthusiasts. It only takes a minute to sign up.Sign up to join this community
For a non-forced-air cooling regime, the fins are best positioned so that they are vertical. The air can then naturally rise and these convection currents flow along the fins and provide better cooling.
As for inside the heatsink or outside the heatsink, personally I don't think it matters.
As paul said: both ways, whatever is more favourable because of thermal or mechanical reasons.
I just want to add:
Note the long hole in the heat sink. It is there for mounting the regulator as shown in in your 2nd picture but rotated 180° around the axis of the screw. Then the pins can be bent 90° backwards going through the heat sink. That way the heat sink can be fixed at the PCB with the same screw that fixes the regulator to the heat sink and the pins can be soldered through-hole to the PCB (see picture below).