New Bug Reports/Feature Requests

Linus Torvalds torvalds at linux-foundation.org
Tue Feb 23 15:46:44 PST 2016


On Tue, Feb 23, 2016 at 2:18 PM, Richard Houser <rick at divinesymphony.net> wrote:
> In my classes back in Michigan, and during checkout dives I witnessed as a
> bystander in Ohio and Florida, instructors with at least 5 different shops
> (SSI/PADI/NAUI) have explicitly reminded students that when doing their
> logs, air capacity in an AL80 is 77cuft, NOT 80.

That's complete bullshit. Sorry. That's an oversimplification of the
problem, and it's an over-simplification to the point of just being
wrong.

The fact is, it depends on the exact manufacturer, but also people are
entirely confused about what "true capacity" is.

For example, a Luxfer AL80 (which is just about the most common one
out there) is a 11.1L bottle ("wet volume", aka "metric size", aka
"not completely buggered and screwed up idiotic imperial units").

That's the only _real_ "true capacity". The wet volume of the cylinder
is the *actual* volume of the cylinder, with no idiotic "air at
rpessure and temperature" effects.

And guess what? When you look at what we translate "AL80" into, that's
*exactly* what we give:

    cylinder vol=11.097l workpressure=206.843bar

so our cylinder calculations are 100% correct. We never actually use
"80" in any calculations, except to initialize that metric volume that
we got right.

So we actually use a 11.1 liter volume (and the "workpressure" is
actually immaterial for everything, the _only_ use for that is for the
crazy imperial conversion).

Now, where does that "true capacity" come from? It's some fairly BS
measure that comes from how idiotic the imperial cylinder measurements
are to begin with, and involves a test of how much air you can
actually get out of the cylinder. The difference to actual 80 cuft
seems to come from a few places:

 (a) when you empty a cylinder, it ends up not empty (as in a vacuum),
but full of air at 1 atm.

     So even if there was 80 cuft of air in the cylinder, you won't
get all out of *out* of the cylinder, there will be that 11.1L
(roughly 0.4 cuft) remaining in the bottle.

     It's somewhat unclear whether people use absolute pressure or
gauge pressure for the working pressure, so that 0.4 cuft is actually
debatable, but the "naive" math model (which is what I'd expect the
cylinder sizing to be, considering all the other things going on)
would give you a 0.4 cuft deficit.

So that accounts for part of it, but only 0.4 cuft. Where did the rest go?

 (b) air is not actually entirely compressible.

     This is a fairly small factor at 3000psi, but it's a factor.
HOWEVER. The rule for cylinder sizing is that the stated cylinder size
is basically the "theoretical" size, not the real size.

     As seen before, we actually use the correct _real_ size for a
Luxfer AL80 bottle. Don't believe me? Go look at the Luxfer data
sheets, it really is 11.1 liter wet size. And just turn Subsurface
into metric mode, and you really will see 11.1 liter, not 80 cuft.

So that's another small part of it, but at 3000 psi it's probably not
noticeable. We're (again) talking about fractions of cuft. It gets
much more noticeable with HP cylinders.

 (c) I suspect that the defining *test* for "true capacity" is
somewhat misleading in itself.

     I don't have any hard data for this, but I think that what the
true capacity test does is let the air out and measure it. Which,
thanks to bernoulli's law will actually measure colder air than is in
the cylinder (air cools down when it expands), which in turn by boyle
will shrink the air (colder air is denser).

So when you measure the amount of air coming out of a cylinder, you
are inherently also measuring the effects of a temperature
differential.

In other words, there are several causes of confusion here.

But what you should take away from this is:

 - there's a hell of a lot of confusion about imperial cylinder sizes

 - the people who wrote the code in subsurface do actually know what
they are talking about, to the point where I can pretty much guarantee
that we know _better_ than your poor scuba instructors who just "know"
that the "actual size" of a cylinder isn't the one stamped on it, but
have little idea why.

   Don't get me wrong: I'm not trying to call out the scuba
instructors. They are right, its' just that things are more
complicated, and imperial sizes are laughably crap.

   Dirk actually has a math major, I have just a strong minor in math,
and both of us kind of know the physics. We've actually *cared* about
this issue, because it keeps coming up.

 - subsurface actually does get the calculations right, in that we
only ever use the metric wet volume (11.1l) for real calculations, and
we actually do take both the "cylinder still contains air" _and_ the
"air isn't actually perfectly compressible" into account when we do
our SAC rate calculations.

 - however, subsurface cannot take the temperature differential into
account, so I'm not claiming our math is perfect either. Our math is
_good_, but in the end, you will have to understand that the
temperature of the cylinder, and the temperature of the air coming out
of it does actually matter. It's a real issue. Some of the pressure
drop when you dive literally comes from the cylinder cooling down
under water. We've all seen pressures drop from 3100 psi ("nice
overfill") on the boat in the tropics to 2800psi within minutes of
jumping in the water. That's about 10% right there. There are smaller
effects from the smaller temperature changes while under water, and
there is also the bernoulli effect when just letting the air out (in
order to breathe it).

In short: we pretty much account for everything _but_ the temperature
drop. The temperature drop you will generally see as a much higher SAC
rate at the start of the dive: subsurface will blame _you_, not the
temperature.

Sadly, the tempoerature drop is not only likely the biggest effect,
it's also the one that we simply cannot account for. We could *try* to
estimate how quickly a cylinder cools down as you jump in the water,
but it would depend on things like "did you go down immediately, or
were you lollygagging on the surface waiting for your buddies?" So we
don't really even try.

Anyway, the primary take-away from all this really should be:

IMPERIAL CYLINDER SIZES ARE CRAZY.

Just don't use them. Use the metric ones. That's what subsurface uses
for any calculation anyway.

But if you want to take something else from this thing, please let it
be that subsurface actually does quite a competent job. When we
compute the metric size, we do the trivial ideal gas with no
corrections thing, but that's because that is how imperial cylinder
sizes are defined. But when we compute actual air use, we take the
physical compressivity at a particular pressure into account, and we
obviously also take the "remaining air" into account, so things like
the "you can't actually get all the air out" is not an issue, because
we've done the SAC rate calculations using the air that remains in the
cylinder.

We don't compensate for temperature, and you really can't. You should
just generally be aware of it. Colder water will make your SAC-rate
higher: mostly because you just actually tend to use more air (your
body will work at keeping your temperature up), but partially because
the air you breathe will be denser, so you'll have a higher effective
SAC-rate _purely_ from temperature effects too.

Sadly, the temperature effects often dominate.

             Linus


More information about the subsurface mailing list