Note that this gives you how much energy is required to go from one state to another. How you go from one state to the other matters. This isn't some sort of "absolute" energy. I'm not completely sure how to quantify that, though, after I finish my stat. thermo. class next semester, I should know.

boyntonstu wrote:Thus if 1.0 m3 of ambient air is very slowly compressed into a 5-liter bottle at 200 bars (20 MPa)

I'm going to be pedantic and say that's not quite right.

Don't confuse bar and atmospheres. While roughly equivalent, they are not identical.
At the same time, don't forget to use absolute pressure, not gauge pressure.

If I'm being really pedantic, then I also need to mention compressibility factor.
Boyle's law is only valid for ideal gases. Real gases do not compress according to the perfect P<sub>1</sub>V<sub>1</sub> = P<sub>2</sub>V<sub>2</sub> behaviour. They compress according to P<sub>1</sub>V<sub>1</sub>Z<sub>2</sub> = P<sub>2</sub>V<sub>2</sub>Z<sub>1</sub>, where Z is the compressibility factor for the given temperature and pressure. While it is normally approximately 1, sometimes you can't make that assumption.

It can make quite some difference when high pressure or temperature changes are involved.
I spent ages wrestling around trying to incorporate it into Apocalypse, where it proved to be a bigger factor than I was expecting. It shifted around the projected muzzle velocities for 3vo by several m/s.

It can be fudge factored out by messing with the valve coefficient, but that's not an ideal solution.