Baobab:
There is a thread running in the Tech Log section that goes into this in some detail. However, I wouldn't recommend it for a clear answer.
Does the compression ratio affect the thermal efficiency by increasing the D variable in the Work formula W=F D and thus the work or there is something more to it? cos as far as i have understood the compression ratio provides merely an indication of how far the piston can travel, while i am having an hard time relating it to the pressure increase within the cylinder barrel - although i do understand that the higher up the TDC the more the fuel air mixture is squeezed.
You are on the right track but the 'D' in your formula is the 'stroke' length which is independent of compression ratio. Note that you increase the CR without increasing the stroke length by simply having a smaller combustion chamber. Thus you increase the compression during the stroke, but the stroke length itself remains the same (if you did change the stroke length you would also be changing the engine capacity).
The work formula you used can be restated as W = PΔV, which is more useful in this instance.