No, I was not aware of it. But as far as I can tell that only does the calculation using the ideal gas equation. The whole point if my implementation was to take into account the real gas corrections.

]]>https://github.com/eianlei/trimix-fill ]]>

I was aware of that. My mistake was that I assumed that Z would remain higher than unity even when gas is decompressed, in which case we would still get more volume out of a given n, even at ambient pressure.

]]>I think you forget that you don’t breath gas at the cylinder pressure but at ambient pressure. And the volume you get out after the regulator reduced the pressure is proportional to n, not to the volume it occupied in the cylinder.

]]>Thanks for the prompt reply and clarification. I understand that for a given cylinder volume at a given pressure, Z>1 would result in a lower n value, i.e. fewer gas molecules in the cylinder compared to an ideal gas. However, I still wonder if that necessarily translates to a shortage when it comes to the quantity of interest since a diver ultimately cares about having a tidal volume of gas available, not so much about how many molecules go into producing it. In other words, while having fewer gas molecules in a cylinder certainly seems like a disadvantage, a gas with Z>1 would be in the same time more ‘efficient’ than an ideal gas at producing the volumes a diver needs by the virtue of its greater molar volume. Does that make sense?

]]>I agree that from the name that would be the suggestion. But let me quote from the Subsurface source code (file gas-model.c):

`/*`

* Z = pV/nRT

*

So a value of Z>1 means that for the same amount of gas (n) at fixed pressure (p ) you end up with a larger volume (V), i.e. you compressed it less.