Hacker News new | ask | show | jobs
by fuzzfactor 52 days ago
I'm glad you're here :)

This is the kind of top engineering tech info that you sometimes get on HN, but much more often in the field of software than the less-abstract types of projects being built.

I like to build laboratories that use research instruments and techniques to get engineers and traders the results they need.

I've seen a few misconceptions with more discussion of the oil crisis appearing lately and figured I would add something sooner or later myself.

Anyway I was the early adopter of digital densitometry all those decades ago, and this is one of those rare times when you see API it has nothing to do with software, it means the American Petroleum Institute :)

But turns out their gravity scale is far more abstract than most people imagine.

>We use this unit of measure because it magnifies the differences in densities vs. using conventional units of measure.

Exactly. I've had research people stumble over this.

Well for oils & fuels going in & out of the refinery, they naturally can be quite consistent but always have significant variations in density with each batch and this is normal. API gravity is an excellent measure of density for this reason above all, it depends completely on density (not viscosity at all [0]) and you want these everyday minor differences (in the same feedstock or product stream) to have their numerical density reading show more easily-noticeable meaningful variation than you get from plain kg/m3 or specific gravity numbers. Plus actually end up with two significant figures being adequate most of the time in the real world, and more memorable across a wider range compared to 3 or 4 figures using conventional units.

Now how did the API gravity number end up getting bigger when the density is less? What's up with that?

It's a physical workflow thing. Density of liquids has been measured using simple glass hydrometers since like forever. Same kind used by beermakers to estimate alcohol content based on density, using hydrometers calibrated against liquids having known specific gravity.

IOW, the lighter the density, the deeper the hydrometer sinks, then you take a reading from the unsubmerged portion of the stem. If the scale is calibrated in density or specific gravity, you read increasing numbers starting from the top of the calibrated glass stem. For oils & fuels you also need to know the temperature that the gravity reading was recorded at, so there's also a thermometer in the test sample along with the hydrometer. And people always read a thermometer from bottom-to-top as they count the little graduations in between numbered major divisions. "Everybody knows" the biggest numbers are at the top of the glassware, without any training. But as mentioned, you read a specific gravity hydrometer from top-to-bottom, where the smallest marked numbers are at the top of the glassware. Plus major divisions are fewer and further between than a thermometer. Ruh-roh. For busy people it's too easy to take both readings from bottom-to-top and get wildly or subtly incorrect results. But that's how you are supposed to read (the exact same glasssware) when calibrated using the API scale, which is mathematically inverted and expanded.

So you get °API where 10.0 is the gravity of water, and 100 is less density than you normally get without it being a pressurized product like LPG. 100 is not the limit, and negative °API is also meaningful but anything below 10 and it's usually the kind of tar or asphalt that sinks even in fresh water.

But that's not abstract enough yet. "Specific" gravity however, is basically a unitless number since it is always relative to something else, usually water. Which you are supposed to specify whether the reference material is water or not but it's so seldom documented that the only professional approach is to assume so without question. Provided that's as decent an assumption as it usually is, then for hydrocarbons the recorded specific gravity is supposed to also specify what temperatures both the test material and reference material values were obtained at. This qualification is not nearly as documented as often as it should be, then you pretty much have to assume it's 60 Fahrenheit for oils & fuels plus the reference water too. Looks like being unitless is supposed to carry a lot more metadata that it doesn't always show up with. Oh well. In petroleum it's still pretty strict about 60 F though, but the 15 C crowd has been on the rise for decades, from what I can tell it's because there is no metric integer equal to 60 F :\

The cool thing about specific gravity being unitless is that (considering temperature) you can use any accurate units of measure for weight and volume when taking raw density readings in the field. Grams, pounds, stones, liters, gallons, etc in any combination of weight per volume. Just has to be consistent between the test sample and reference material. So everything cancels and you get the same numerical rating from anywhere in the world at any time over the centuries. Once grams came along, and were standardized equal to one mL of water (under conditions!!) then it just so happens that specific gravity closely resembles the numerical density when the density is expressed in units of grams/mL. In these nearly-ideal metric units though the deceptively similar values are still significantly different from true specific gravity, and the differences often completely neglected along with the buoyancy of air. Which can have obvious significance if you're talking about a ship as big as a blimp.

So the density that the product actually behaves with in the real world, is imagined as if it were handled in a vacuum instead, while being held at some ideal well-known temperature, then converted to a unitless number, before being inverted and scaled to numerically better match the application.

Making the °API "almost like a bogus phenomenon", while still being based strictly on density, rather than °API being as much of a physical property itself.

But it works so much better than the real numbers the physical property is measured in, and the hydrometer does the same thing either way :)

Any more abstraction and the workflow could have gotten worse not better, you've got to stop as soon as you can or you could end up with no trail leading back to the underlying solution needed ;)

With digital densitometry you're not supposed to still need a plain old glass hydrometer, and naturally it's not so simple :0 Don't get me started on that ;)

[0] Although someone familiar with a particular oil field may accomplish some pretty good estimation of API gravity as a result of long term correlation between apparent visual thickness and measured density over the years.