What is the effect of Mach number on efficiency, thrust and specific fuel consumption of a ramjet engine?
The thrust of a ramjet depends on the dynamic pressure of the airframe since this determines how high the pressure inside the ramjet can become. Thrust grows therefore initially with the square of speed.
The efficiency of heat engines depends on the temperature and pressure ratio of their cycle, and again speed helps to improve that. The specific thermodynamic process of ramjets is the Joule cycle (in the US called Brayton cycle).
Why this doesn't grow indefinitely has to do with nonlinearities at high temperature. Once gas temperatures exceed 2000 to 4000K, Oxygen starts to dissociate, depending on pressure. Nitrogen follows beyond 8000K. Now the combustion heat will not be converted into a further temperature increase but will be wasted in the dissociation of air. As this limit is approached, less margin for heating is left and the SFC drops. The optimum with current technology is at approximately Mach 2.4.
A possible remedy is to slow down the air less, so the maximum heat inside the combustion chamber can be restricted. However, the flame propagation speed of conventional hydrocarbons puts a firm and low limit to that. The higher speed simply means that mixing, evaporation and burning will happen mostly once the air-fuel mixture has left the engine. Here you need to switch to hydrogen and a supersonic ram jet, but that will bring a host of new problems.