Question about Subsurface gas consumption calculation

47 views
Skip to first unread message

Eldar Selimbegovic

unread,
Oct 26, 2025, 11:16:30 PM (11 days ago) Oct 26
to Subsurface Divelog

Hey everyone,
I noticed something odd with Subsurface’s gas consumption calculation.

I used 80 bar from a 15L tank — by my math, that’s 80 × 15 = 1200 liters of gas.
But Subsurface shows 1060 liters of gas used instead.

Does anyone know why there’s a difference? Is there something in the gas consumption formula that explains this?

Thanks for any help or explanations appreciate itScreenshot 2025-10-27 at 03.26.53.pngScreenshot 2025-10-27 at 03.27.02.png

Michael Keller

unread,
Oct 26, 2025, 11:25:58 PM (11 days ago) Oct 26
to subsurfac...@googlegroups.com

Hi Eldar.


On 27/10/2025 15:29, Eldar Selimbegovic wrote:

I used 80 bar from a 15L tank — by my math, that’s 80 × 15 = 1200 liters of gas.
But Subsurface shows 1060 liters of gas used instead.

Does anyone know why there’s a difference? Is there something in the gas consumption formula that explains this?


Subsurface takes gas incompressibility into account when doing gas calculations:

https://subsurface-divelog.org/subsurface-user-manual/?lang=en#_subsurface_appears_to_miscalculate_gas_consumption_and_sac


Ngā mihi

  Michael Keller

Eldar Selimbegovic

unread,
Oct 27, 2025, 1:17:03 PM (11 days ago) Oct 27
to subsurfac...@googlegroups.com
its still wrong with that calculation with incompressibility its 15*((209-129)/1.013)=1184.6 Liters but its showing 1060 Liters somehow its weird
 is there any explanation, thanks for replying

--
You received this message because you are subscribed to the Google Groups "Subsurface Divelog" group.
To unsubscribe from this group and stop receiving emails from it, send an email to subsurface-dive...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/subsurface-divelog/03295339-a2d3-4236-997c-36986e3adf1f%40042.ch.

Linus Torvalds

unread,
Oct 27, 2025, 4:54:55 PM (11 days ago) Oct 27
to subsurfac...@googlegroups.com
On Mon, 27 Oct 2025 at 10:17, Eldar Selimbegovic
<selimbeg...@gmail.com> wrote:
>
> its still wrong with that calculation with incompressibility its 15*((209-129)/1.013)=1184.6

That isn't compressibility. That 1.013 is the difference between BAR
and ATM, but it's still doing the same simplified "ideal gas" law
calculation.

The compressibility issue is that 200 bar of air is *not* twice as
much as 100 bar of air in the same tank, because air isn't perfectly
compressible.

So no, you can't actually do that "209-129" calculation AT ALL. It's
fundamentally wrong and non-physical.

Yes, it's what they teach you when you become a diver, because it
gives a rough estimate of how much air you used, but any time you just
take the difference between two pressures, you're not doing proper
math, you are just doing rough estimates.

So the *proper* way to do it is to calculate how much gas you have at
209 bar - taking the compressibility into account at that pressure -
and then calculate how much gas you have at 129 bar (also with
compressibility), and then subtract those two numbers.

Because of compressibility issues, you actually have less gas than you
think at 209 bar.

It's not generally a huge difference, but subsurface (in the desktop
version) does help you see the actual numbers it if you really care.

When you go to the equipment tag, you can hover over the "Start press"
and "End press." numbers, and you should see a context popup that
shows you how many liters those are, and a "Z value". That Z value is
the compressibility factor, and when you subtract the two "how many
liters" numbers, you get how many liters you actually used.

(Side note: careful about rounding. The "how many liters" numbers are
rounded, so you don't see the full precision, so when you subtract
those two numbers the end result can then be off by 1).

So for air, at about 208 bar, the compressibility factor is something
like 1.045, while at 129 bar it's pretty much exactly 1. That's
basically how far away from an ideal gas it is: 1 means "ideal gas
behavior", while above 1 means "starting to be incompressible".

You'll see values just under 1 too, which is because the gases in air
are just slightly polar, so they actually to a tiny tiny degree like
being pressed together. But to a very close approximation, you can
treat air as an ideal gas up to about 100 bar, and you'll see Z-values
very close to 1 (ie 0.99x kinds of Z-values).

But at 200 bar, the incompressibility really does become noticeable,
and that Z=1.045 means that you actually have 4.5% less air than you
think you do.

(There is also a temperature dependence, but that really can be
ignored for diving purposes: it becomes noticeable only at much colder
or hotter temperatures, and you'd have to be diving inside ice - not
just under it - or in superheated boiling water to see any real effect
from that)

If you care deeply, go to

https://en.wikipedia.org/wiki/Compressibility_factor

and see the "Compressibility factor for air (experimental values)"
table. Use the 300K line for temperature.

And if you care even more deeply than that, you can actually see the
calculations subsurface uses. Because subsurface actually takes the
real gas mix into account. Even that does matter. Only a tiny bit, but
enough for the numbers to be noticeable.

The compressibility of pure oxygen is actually different from the
compressibility of regular air. And subsurface does it at *THAT* level
of precision.

I am almost certain that no other dive log comes even close to what
subsurface does, unless they copied the subsurface code.

And no, if you do it by hand and think it's an ideal gas, you simply
won't get the right value. You can easily be off by 10% or more.

Linus
Reply all
Reply to author
Forward
0 new messages