I heard that the diffuser allows the compressed air after the inlet spike to "spread out". What does this mean? If this means expansion, wouldn't it be beneficial to have it compressed before entering the compression chamber, so why would it spread out?
Generally, a compressor cannot work efficiently at supersonic speed due to the shockwaves, the role of the inlet cone and diffuser is to slow the air below Mach 1. There is a similar need for a ramjet, so that the combustion can occur within the engine and produce thrust.
The cone position and diffuser geometry are adjusted according to the airspeed. The overall shape of the diffuser is diverging.
From Bernoulli's principle, the diffuser decreases velocity and increases pressure according to:
$\frac 1 \rho \; dp = - \mathrm V\;d \mathrm V$ where $\rho$ is air density.
Look at this video: Converging Diverging Nozzles for more details about how pressure and velocity are affected in a nozzle / a diffuser. Here is a summary:
The J58 is turbojet within a ramjet. The forward section of the engine has a complex role. It adapts to a large range of speed (0 to Mach 3.2) and altitude (0 to 85,000 ft), and modifies the airflow to work either as turbojet, or as a ramjet, depending on the airspeed.
Simplified adjustment of the airflow (source).
Actual mechanism used at different airspeed ranges in the J58: (Source)
Actually, the task of the diffusor was to create thrust. Sounds strange? Then read on!
At supersonic speed the spike ahead of the inlet will create a cascade of ever-steeper shocks in order to slow down and compress the air. Inside, the cross section narrows down further until the flow is decelerated to below Mach 1 in a final, straight shock. This is the point of the smallest cross section, called the throat. Falling to subsonic speed fundamentally changes the behavior of the flow: When before, at supersonic speed, it would slow down in a narrowing cross-sectional profile, it now needs a widening cross-sectional profile to slow down further. As it slows down, the kinetic energy of the flow is converted to pressure, so at the compressor face the flow is only Mach 0.4 fast, but has almost 40 times ambient pressure. Note that this is about the pressure ratio of modern jet engines like the F120 or the GE90 and way above the pressure ratios of 1950's-era turbo compressors.
By moving the cone, the position of the throat is adjusted such that the intake works over the full flight speed range. From subsonic to Mach 3.2 the capture area increases by 112% while the throat width is narrowed to 54% of its subsonic value.
The diffusor is needed to slow down the subsonic region of the intake flow. At the same time it is filled with high-pressure air which pushes at its walls. The pressure acting on the projection area in flight direction is contributing the majority of the total thrust of the J58. The job of the engine is to suck away the air in the diffusor and to eventually accelerate it back to flight speed and above. Without the engine, the same pressure would be acting on the rear wall of the diffusor and would cause massive drag - the engine had to pump all that air away to avoid this to happen.
I think the claim of 80% thrust made on this page is not quite true, but it illustrates the point.
At Mach 3.2 cruise the inlet system itself actually provided 80 percent of the thrust and the engine only 20 percent, making the J58 in reality a turbo-ramjet engine.
A little down, it presents us with more credible numbers:
At Mach 3, the inlet itself produces 54% of total thrust through pressure recovery, the engine contributing only 17% and the ejector system 29%. The compression ratio at cruise is 40 to 1.
Also, the reason to call it a turbo-ramjet is actually a different one, as given on this page:
The SR-71's Pratt & Whitney J58 engines were rather unusual. They could convert in flight from being largely a turbojet to being largely a compressor-assisted ramjet. At high speeds (above Mach 2.4), the engine used variable geometry vanes to direct excess air through 6 bypass pipes from downstream of the fourth compressor stage into the afterburner. 80% of the SR-71's thrust at high speed was generated in this way, giving much higher thrust, improving specific impulse by 10-15%, and permitting continuous operation at Mach 3.2. The name coined for this configuration is turbo-ramjet.
Please note that all the diagrams which show air flowing from the diffusor directly to the afterburner don't get it quite right: Some air was needed for cooling, but also the first four stages of the compressor were still involved, and the remainder of the turbo machinery also had to be working at Mach 3.2 to supply the compressor with torque. The J-58 took compressed air from the compressor at stage 4 and piped it directly into the flow aft of the turbine. This cooled the exhaust stream that entered the afterburner, so the starting temperature there was lower and the density higher, which increases efficiency and thrust. See the thick black tubes in the J58 picture below (source) - those piped the compressed air to the afterburner.
All supersonic intakes use this principle: See below for a breakdown of thrust contributions inside the Concorde's Olympus 593 engine and nacelle:
Concorde nacelle cross section and thrust breakdown (picture source)
The reason for the diffuser is this....the spike slows the air down to subsonic around Mach .8 . The diffuser further slows the air to around Mach .4 before entering the engine inlet. It’s the same concept as a pressurized water hose going from 1/2” size to 2”. Allowing the air to expand slows it down but it maintains pressure by sheer volume. I was a jet engine mechanic for 10 years (not on the SR) and love discussing this incredible engine system. I am happy to share any info that I have learned about this .