-
Notifications
You must be signed in to change notification settings - Fork 387
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add VolumeUnit.OilBarrel and FlowUnit.OilBarrelsPerDay #187
Conversation
First off, thanks for the PR. I am not familiar with this unit myself, but OilBarrel seems maybe a bit ambiguous? it seems similar to #179, where the PR had units Tote and Drum.
A couple of examples showing a variety of conversions with barrels: From this, I could be swayed to let OilBarrel be defined per-application instead of in Units.NET, however, I have not found any conflicting definitions on Oil Barrel volume, so it might be that if we call this On a sidenote, I saw some Drum and Tote unit code were still left in source code although that should have been removed in #179, but this PR will clean that up. The build server always regenerates the code before creating the nuget anyway, so it was never shipped. |
Seeing the Drum and Tote diffs show up after I ran GenerateUnits.bat confused me for a bit, but I eventually figured out what was going on. I can assure you that bbl is very much a standard in a market that generates countless billions $USD. Yes, many of our international customers use m3 which our software certainly supports. However, much of the academic equations that are involved in various scientific analysis use bbl and bbl/d. Some more examples: Even this javascript library supports it: http://mathjs.org/docs/datatypes/units.html We use this library in our UI. (Note though, they have made the unfortunate mistake of labeling beer barrels as 'bbl'. That should be 'bl' and oil barrels 'bbl'. There are many references out there to confirm this). I'm happy to change the enum to UsOilBarrel, but in my opinion, that would be redundant. As you indicated, there is no other definition of OilBarrel in the energy industry. Regarding the conversion depending upon density and temperature. This comes into play when you are paying money for a particular amount of energy. When you start moving farther up stream (trading, financials), they like to try to normalize things so that different oil supplies with different energy potentials can look the "same" on the books. So, for example, oil with less energy potential gets scaled down on its volume, contrary to physical reality. But these industries are not actually dealing with real-world volumes. Truthfully, they should be using a unit like BTU or joules. FWIW natural gas delivery amounts are often expressed in BTU. True to form though there are many conversions that attempt to convert a volume of natural gas into a BTU equivalent. But I digress -- It really is irrelevant when talking about units of measure. A physical volume of oil always has an unambiguous conversion to any other volume of unit. The unit conversions are unambiguous and universally adopted in the industry. Companies would literally be sued (at worst) or lose business (at best) if they deviated from such. And yeah, it used to happen all the time -- but that is ancient history. |
Google agrees: https://www.google.com/search?btnG=1&pws=0&q=1+oil+barrel+to+m3 There is only one "Oil Barrel" |
Nice read :-) 👍 |
My pleasure, and thanks for providing this library. |
Add VolumeUnit.OilBarrel and FlowUnit.OilBarrelsPerDay #187
Nuget 3.42.0 is out. |
https://en.wikipedia.org/wiki/Barrel_(unit)#Oil_barrel