The recent article on compressed-gas (as in state of matter, not fuel) powered vehicles got me to thinking about "how do you measure how much energy is stored in a compressed tank of gas?"
Incidentally, it's not possible to have a single answer to this, because the answer depends on how you extract the stored energy!
For illustration I looked at a piston that would compress from a volume of 1 cubic meter to 0.1 cubic meters, or expand, and some various situations. I'll save the details and just put in the summary.
If the "starting" pressure is 101325 kPa and temperature is 288.15 K (standard conditions), there are two basic ways to compress.
Adiabatic compression will require 383 kJ of pressure work, and the pressure will rise 25.119 times and the temperature will rise 2.512 times.
Isothermal compression, however, will require only 233 kJ, with a pressure rise of 10.000 times and temperature stays the same (ratio = 1.000). If we let the adiabatically-compressed gas equalize thermally, it will also be at 10.000 pressure ratio and 1.000 temperature ratio. So how much energy is stored in the chamber? If you look at either internal energy or enthalpy, the final states have the same value for both; however, those final states are the same as for the initial condition: internal energy is simply mass*cv*T and enthalpy is internal energy + pressure*volume; so in either case the initial and final conditions have the same internal energy and internal enthalpy (because P*V is constant if temperature is constant). (The disturbing thing is I cannot remember, for the life of me, what state variable captures the stored energy in the compressed cylinder. In both cases, though, the entropy of the compressed gas is lower, so this is likely the state variable which captures the change)
So, how much energy is stored? That's measured by extracting it: Adiabatic expansion will result in 152 kJ of pressure work, while isothermal will result in the same 233 kJ.
Regardless of how we got to the compressed state (10x pressure, same temperature), there are two amounts of work that can be obtained from the cylinder - so which has stored more energy?
Note though that the isothermal case requires heat transfer to and from the environment; in compression there is heat transfer to the environment while in expansion there is transfer from the environment; this means that some of the work done in compression is lost to the environment, so not all of it is "stored" in the compressed gas. When it expands isothermally, some energy is pulled from the environment to increase the available work; essentially the isothermal case "stores" some of the energy in the environment as well as the working cylinder.
Now, the adiabatic case is different; all the energy is stored and is available; the only catch is when the system is allowed to reach thermal equilibrium (for instance, stored for a long time). (Note that if the compression is adiabatic, without any heat transfer, the work available from expansion will also be 383 kJ).
That said, the entire process appears to be 100% efficient storage with a pure isothermal process and about 40% efficient with adiabatic compression, thermal equilibrium, and adiabatic expansion. Real processes will always be somewhere between these bounds, and slightly lower, because of friction and because all compression and expansion processes are neither truly isothermal nor adiabatic.
Interesting to think about either way, though.