Think of all the moving parts in a engine: It already costs power to move Pistons, valves, shafts and belts due to friction. The dependency between RPM and this power is not linear, if you increase the RPM by a factor of 2, the power usually increases by a factor larger than 2.
The aggregates consume power, too, and it's also said that the transmission train steals 10-20% of the engine power.
So, if the engine isn't burning fuel, this all brakes the car.
I don't have numbers, nor do I have estimates of the braking power caused by this effects. It also heavily depends on construction and design of the entire engine and drive train.
Braking power of a gasoline engines
I'd say you can estimate the braking power due to compression:
Let's assume there's an absolute vacuum in the intake manifold of a gasoline engine and see what happens during the four strokes:
- (Intake) The piston moves down, working against the ambient air pressure in the crankcase. This costs a certain amount of energy.
- (Compression) The piston moves up, and since the ambient pressure pushes from below, the engine gains energy back.
- (Combustion) This is the inverse of the second stroke, so it cancels out the energy gain from that stroke.
- (Exhaust) While the piston is in the lower position, the exhaust valve opens, and air streams in from the exhaust system. While the piston moves up, this air is expelled again. However, the difference in pressure above and below the piston is not that high, so there is no significant energy loss or gain.
So finally, the total energy "lost" is the energy needed to move the piston down once against the ambient pressure.
This energy is just
E=p*V where p is ambient pressure and V is the displaced volume.
At 1000RPM, a motor does 16.6 revs per second, or 8.3 intake strokes (per cylinder)
So a 1L motor would invest 8.3*1013hPa*1L=1688J per second, or 1688 Watt, or 2.2hp into compression. At 6000RPM, it would be 13.2hp. This is the "braking power" due to compression.
This is the estimated upper limit of braking power: In reality, there is no absolute vacuum, since the throttle isn't fully closed. This reduced the braking power a lot, Further more:
If I had more information about the pressure in the cylinder during the first stroke, I could do a better estimation.
Braking power of a diesel engine
What I wrote above about compression above doesn't apply to a diesel, since it doesn't have a throttle, so there's always ambient-like pressure in the cylinder in the first stroke. The energy balance is zero.
However, trucks have special engine brakes:
Exhaust brakes restrict the exhaust pipe, so the engine has to invest energy to blow out the exhaust against the pressure that builds up in the exhaust. The math is about the same as above, one just has to replace the pressure by the average pressure in the exhaust. When the pressure is five times the ambient pressure, braking power is also five times the value calculated above. Since I don't know the pressure, I can't calculate it.
Jake brakes release the pressure in the cylinder after the second stroke by opening a valve. So the engine doesn't gain back the energy it invested into the compression before.
From the physics side, there are two formulas to describe this:
When you compress air, it becomes hot, and hot air generates more pressure. This makes the formula to calculate the energy spent for compression (and lost by venting) a little complex:
E=p1*V1/(K-1) * (1- ( V1/V2)^(K-1))
p1 is ambient pressure,
V1 is the volume before compression (or just the displacement),
V2 the volume after compression (in the order of 1/20 to 1/30 of
K is a constant of about 1.3.
Let's take 1/30 and the 1l motor at 1000RPM again, and the power is about 5000W or 6.1hp.
Let's assume the heat generated during compression is dissipated to the cylinder and piston, so the temperature stays constant. In this case, the formula is less complex, with the same meaning of the parameters as above:
Using the same conditions as above, this gives 2860W or 3.8hp.
In reality, the air in the cylinder dissipates some of the heat, so the truth is somewhere between the both formulas.