Introduction
Oil and gas companies need to be efficient and technologically robust in handling stocks or inventories, with planning and delivery capabilities that can meet a demand fluctuation. The industry will witness a surge in demand as travel resumes. Resources are now being diverted towards asset handling that maximize dollar value and minimize costs or losses.
One of the goals of digitization is to enable the safety of employees, especially through remote inspection of inventories. With an aim of achieving zero loss for the reconciliation of materials in an oil and gas terminal, companies are investing in tools that enable automation of data capture at various storage points and integrate this with the ERP system. Temperature related errors while measuring tanks, can often result in incorrect volumes being shipped. These unaccounted losses can run into thousands of dollars every year for oil companies. Since inventories of oil and gas hydrocarbons come in multiple units of measure (UoM), having an ERP system that captures these quantities and the associated quality parameters is imperative. Subsequently, all compliance and financial reports will carry the quantity conversion vulnerabilities, if the ERP system has any.
As such, these conversions are governed by industry-wide standards that encourage uniformity of practice and nomenclature within the petroleum industry. The purpose of this document is to highlight the variation in the usage of these standards and common problems encountered due to incorrect mapping within the ERP system.
Hydrocarbons
I would like to begin by focusing on organic compounds - the presence of hydrogen only, to meet the valency of carbon in organic compounds results in the formation of hydrocarbons. We are all aware of the process of fractional distillation a crude is subjected to in a refinery to produce useful petrochemicals.
Observe how the carbon number changes as we go down the chart:
With increasing carbon number, the energy required to break the chemical bonds and separate the molecules from each other increases. Under such a force, as the molecules move away from each other, the occupied volume changes. With stable conditions of thermodynamics, it is easier to change the volume of lighter compounds that have lower carbon numbers than those with higher numbers. Also, as the chains get longer, the density of such a compound goes up. Hence, it is safe to conclude that the energy required to move the molecules away from each other increases with density. Consequently, the impact of a certain change in temperature or pressure is far more on the volume of lighter products, than on heavier.
Consider a location having an ambient temperature of 75 °F, and measured volume of 42,000 barrels. With other thermodynamic conditions kept as constant, as the temperature drops to 60 °F, the distance between the molecules contracts and the volume decreases to less than 42,000 barrels.
In an IT System, the term volumes or quantities has far reaching impacts on inventory, cost and valuation. Reflecting the right inventories or transaction volumes in a snapshot, is of utmost importance if one is to make the appropriate use of an IT system. Any IT system using computational algorithms must be able to calculate and report such volumes under different variables of temperature, pressure, density, etc.. Furthermore, it should be able to process the need for such calculations based on whether the material in question is a hydrocarbon or not. SAP S/4HANA Oil & Gas (and SAP S/4HANA Cloud for oil and gas hydrocarbon management, extended edition) provides a quantity conversion interface (QCI) that performs these conversions for a hydrocarbon at different temperatures and quality parameters. The interface is also capable of accepting external values from documents such as bill of lading (BoL) or inspection reports.
Physical Measurement Standards
A quantity is a physical property that can be measured or calculated (from measurements of related quantities). Results from measurements are the quantity values and are expressed by a number and a unit. But, not all physical properties can be measured or calculated in such a way.
A UoM is a positive quantity value selected by convention. UoMs for quantities are agreed on internationally and catalogued in the International System of Units (a.k.a. SI).
UoMs are defined per dimension, e.g.,
- Quantity Tank Capacity has dimension Volume
- Quantity Gross Volume has dimension Volume
- Quantity Net Standard Volume has dimension Volume
Unit of Measure System: SI
This is a Coherent system where Mass = Volume × Density (1 kg = 1 m³ × 1 kg/m³). Conversion factors for SI units are 1 for quantity equations. Only units are allowed with inter-conversion factors that are multiples of 10 (1 m = 100 cm, 1 km = 1000 m)
Unit of Measure System: Imperial + U.S.
They are partially coherent systems where mass = Volume × Density
We need conversion factors to convert between units that belong to the three systems:
- API (American Petroleum Institute) MPMS Chapter 15 – Guidelines for the Use of the International System of Units (SI) in the Petroleum and Allied Industries
- API MPMS Chapter 11.5 – Annex D - ASTM D1250-08(13)e1
- Petroleum Measurement Tables Volume XI/XII - ASTM D1250-80: Table 1
- IEEE/ASTM SI 10TM – American National Standard for the Use of the International System of Units (SI): The Modern Metric System (2002)
- NIST – Guide for the Use of the International System of Units (SI) - Special Publication 811 – 2008
- BIPM – Le Système international d’unités (SI) – 2006
Similarly, based on the history of measurement standards followed in a certain geography, there are several calculation models:
- API MPMS Chapter 12
- EN ISO 4267 Part 3.
- DIN 51650-06
- Business practice models – linear DCF (Density Correction Factor) model
Added complexity must be considered (e.g., LPG vapor space calculations, sediment & water calculations, alcohol % calculations, different base conversion unit sets, etc.) such that at the time of document publication.
The purpose below is to introduce the reader to the use of different standards and its importance within the IT system. The below list is not exhaustive and is provided solely for guidance,
Standards - Temperature and Pressure Corrections
- API MPMS Chapter 11.1 – 2004 - ASTM D1250-04
- API MPMS Chapter 11.1 – 1980 - ASTM D1250-80 (including 1984 and 1988 revisions)
- API MPMS Chapter 11.2.4 - GPA TP-27
- DIN 51757-11
- DIN 51757-94
Standards - Conversions between Mass and Weight
- API MPMS Chapter 11.5, Part 1, 2 and 3 - ASTM D1250-08(13)e1
- Petroleum Measurement Tables Volume XI/XII - ASTM D1250-80: Tables 8, 26, 56
- Petroleum Measurement Tables 1952 - Historical Edition – ASTM D1250-52: Table 11
- DIN 51757-11a.
- DIN 51757-94
Challenges
The real challenge for Oil & Gas consultants is to identify the right quantity conversion standard that proposes quantities in different UoMs and at the same time, is also acceptable to the internal and external stakeholders. The problem is amplified when conversion rulesets can vary by product type and geography of operations as highlighted in the charts above. There is no one-size fits all approach. It is also common for companies to negotiate the standards of measure with their counterparties e.g., companies may agree to use an older standard instead of its latest release, for inspection and subsequent billing quantities.
Whenever there is a material movement or a stocktaking activity, third- party inspectors are engaged to measure the quantities. Companies can assign a third-party inspector to record a tank gauge. The IT systems that record these measurements, also convert the measured values into different UoMs based on international standards.
Through a commodity exchange floor, the commodity prices are proposed by standard publications in different UoMs. Price times quantity equals value and has a big impact on the books of account. Also, reporting the book inventory accurately is important as this impacts stocktaking and inventory valuation. The expectation of our clients is that the ERP solution will support this and thereby achieve a certain level of automation and validation when reporting in different UoMs.
The expectation of clients from the ERP solution is at least two-fold–
- Act as a gatekeeper for values proposed by the external system
- Propose the right quantities in alternate UoMs to report the right Inventory, in accordance with an internationally accepted measurement standard
Whether SAP for Oil & Gas runs on SAP NetWeaver or SAP S/4HANA ABAP stack, the following QCI components run there:
- QCI - Calculation example (DIN51650 model w/o rounding,) - can be modified via BAdI technology. This is to test the implementation of QCI without an external or add-on subscription.
- QCI - ABAP interface
- QCI - OS Interface (Operating System); “C” executables and frame programs are displayed at the operating system (OS)
As per SAP Note 954553, SAP will provide, as a courtesy, theoretical examples, without guarantees as to merchantability, quality or fitness of purpose and with no support, of the C++ source coding for such an interface program in a different note. An SAP Certified integration solution based on ABAP can be used directly, but with full supplier support.
There are presently two popular applications available for calculating the conversions as per the international standards, which can be used by the QCI:
- SAP Certified integration ABAP solutions https://www.quantityware.com/support/certified-consultants/ (also is configured within SAP Model Company, the licenses have to be bought separately)
- 3rd party source codes in C++ https://flowcal.com/api-standards/
Conclusion
In the journey of digitization, the QCI can help expose some of the quantity conversion blind spots.
The QCI is an integral part of the SAP S/4HANA Oil & Gas solution. It is a critical part of the oil & gas platform, without which, bulk goods movements cannot be executed, and these bulk goods movements are the ‘life blood’ of business. In all business processes, from exploration and production, through midstream and downstream supply chain handling, all the way to service station delivery, quantity values in several units of measures at standard conditions (which may vary from country-to-country, or even state-to-state) need to be calculated and cross-checked for various movement documents.
Owing to the fact that detailed knowledge of the QCI and its architecture is often understated, it is recommended to network with qualified Consultants before an existing implementation becomes extremely difficult to reverse.
References
https://www.quantityware.com/
https://www.astm.org/DATABASE.CART/HISTORICAL/D1250-08.htm
https://www.din.de/en/getting-involved/standards-committees/nmp/publications/wdc-beuth:din21:1363221...
https://physics.nist.gov/cuu/pdf/sp811.pdf