Spirit flow-x Function Reference

Type
Function Reference
Function Reference
Certified flow calculations
Flow and batch calculations
Worksheet functions
Product
Flow-X Function Reference
Reference number
01-0110-1
Revision
A.6
Date
April 2015
Authors
J.C.H.M. van Dal
Disclaimer
Spirit IT has taken care in the preparation of this book, but makes no expressed or implied warranty of
any kind and assumes no responsibility for errors or omissions. No liability is assumed for incidental or
consequential damages in connection with or arising out of the issue of the information or programs
contained herein.
Special note
The information contained in this document is the property of Spirit IT B.V., and may not be reproduced
(wholly or in part) used or disclosed without the prior consent of Spirit IT B.V. and then on condition only
that this notice is included in any reproduction or disclosure. The copyright and the foregoing restriction
on copying, use and disclosure extent to all media in which this information may be embodied including
magnetic storage.
Printed in the Netherlands.
Copyright© 2008-2015 Spirit IT B.V., Eindhoven, the Netherlands. All rights reserved.
®Flow-X is a registered trademark of Spirit Holding B.V.
®Microsoft Windows is a registered trademark of Microsoft Corporation.
®Microsoft Excel is a registered trademark of Microsoft Corporation.
Visit Spirit on the Web: http://www.spiritIT.com
Spirit Innovative Technologies
Prof. dr. Dorgelolaan 20
5613 AM Eindhoven
The Netherlands
Flow-X─ Function Reference
1-3
Table of contents
Chapter 1 - Document Control ---------------------------------------------------------------------------------- 1-7
Revision Coding -------------------------------------------------------------------------------------------- 1-7
Revision History -------------------------------------------------------------------------------------------- 1-7
Chapter 2 - Introduction ------------------------------------------------------------------------------------------ 2-9
Flow-X Function Library ---------------------------------------------------------------------------------- 2-9
API Petroleum Measurement Tables ----------------------------------------------------------------- 2-9
History--------------------------------------------------------------------------------------------------------------------- 2-9
Volume correction for pressure ----------------------------------------------------------------------------------- 2-10
NGL and LPG tables -------------------------------------------------------------------------------------------------- 2-10
Overview of hydrocarbon liquid conversion standards ------------------------------------------------------ 2-11
Overview of the functions ------------------------------------------------------------------------------------------ 2-12
Hydrometer Correction ---------------------------------------------------------------------------------------------- 2-13
API-2540 Boundaries ------------------------------------------------------------------------------------------------ 2-13
Chapter 3 - Flow-X General functions------------------------------------------------------------------------- 3-17
fx2CellSelection ------------------------------------------------------------------------------------------ 3-17
fx3CellSelection ------------------------------------------------------------------------------------------ 3-19
fxAGA10_M ---------------------------------------------------------------------------------------------- 3-22
fxAGA10ex_M ------------------------------------------------------------------------------------------- 3-24
fxAGA3_C-------------------------------------------------------------------------------------------------- 3-27
fxAGA5_C-------------------------------------------------------------------------------------------------- 3-33
fxAGA8_C-------------------------------------------------------------------------------------------------- 3-34
fxAGA8_M ------------------------------------------------------------------------------------------------ 3-36
fxAGA8_Gross -------------------------------------------------------------------------------------------- 3-38
fxAPI_Dens15C_1952 ----------------------------------------------------------------------------------- 3-40
fxAPI_Dens15C_1980 ----------------------------------------------------------------------------------- 3-43
Chapter 4 - Flow-X General functions------------------------------------------------------------------------- 4-49
fx2CellSelection ------------------------------------------------------------------------------------------ 4-49
fx3CellSelection ------------------------------------------------------------------------------------------ 4-51
fxAGA10_M ---------------------------------------------------------------------------------------------- 4-54
fxAGA10ex_M ------------------------------------------------------------------------------------------- 4-56
fxAGA3_C-------------------------------------------------------------------------------------------------- 4-59
fxAGA5_C-------------------------------------------------------------------------------------------------- 4-65
fxAGA8_C-------------------------------------------------------------------------------------------------- 4-66
fxAGA8_M ------------------------------------------------------------------------------------------------ 4-68
fxAGA8_Gross -------------------------------------------------------------------------------------------- 4-70
fxAPI_Dens15C_1952 ----------------------------------------------------------------------------------- 4-72
fxAPI_Dens15C_1980 ----------------------------------------------------------------------------------- 4-75
fxAPI_Dens15C_NGL_LPG ----------------------------------------------------------------------------- 4-81
fxAPI_Dens20C_NGL_LPG ----------------------------------------------------------------------------- 4-86
fxAPI_Gravity60F_1952 -------------------------------------------------------------------------------- 4-92
fxAPI_Gravity60F_1980 -------------------------------------------------------------------------------- 4-95
fxAPI_MPMS_11_2_1 --------------------------------------------------------------------------------- 4-100
fxAPI_MPMS_11_2_1M ------------------------------------------------------------------------------- 4-102
fxAPI_MPMS_11_2_2 --------------------------------------------------------------------------------- 4-104
fxAPI_MPMS_11_2_2M ------------------------------------------------------------------------------- 4-106
fxAPI_MPMS_11_3_2_1 ------------------------------------------------------------------------------ 4-108
fxAPI_MPMS_11_3_3_2 ------------------------------------------------------------------------------ 4-109
fxAPI_RD60F_1980 ------------------------------------------------------------------------------------- 4-111
fxAPI_SG60F_1952 ------------------------------------------------------------------------------------- 4-117
1-4
Flow-X─ Function Reference
fxAPI_RD60F_NGL_LPG ------------------------------------------------------------------------------- 4-120
fxAPI_Table5_1952 ------------------------------------------------------------------------------------ 4-125
fxAPI_Table5_1980 ------------------------------------------------------------------------------------ 4-126
fxAPI_Table5_2004 ------------------------------------------------------------------------------------ 4-128
fxAPI_Table6_1952 ------------------------------------------------------------------------------------ 4-130
fxAPI_Table6_1980 ------------------------------------------------------------------------------------ 4-131
fxAPI_Table6_2004 ------------------------------------------------------------------------------------ 4-133
fxAPI_Table23_1952 ----------------------------------------------------------------------------------- 4-135
fxAPI_Table23_1980 ----------------------------------------------------------------------------------- 4-136
fxAPI_Table23_2004 ----------------------------------------------------------------------------------- 4-138
fxAPI_Table23E ----------------------------------------------------------------------------------------- 4-140
fxAPI_Table24_1952 ----------------------------------------------------------------------------------- 4-141
fxAPI_Table24_1980 ----------------------------------------------------------------------------------- 4-142
fxAPI_Table24_2004 ----------------------------------------------------------------------------------- 4-144
fxAPI_Table24E ----------------------------------------------------------------------------------------- 4-146
fxAPI_Table53_1952 ----------------------------------------------------------------------------------- 4-147
fxAPI_Table53_1980 ----------------------------------------------------------------------------------- 4-148
fxAPI_Table53_2004 ----------------------------------------------------------------------------------- 4-150
fxAPI_Table53E ----------------------------------------------------------------------------------------- 4-152
fxAPI_Table54_1952 ----------------------------------------------------------------------------------- 4-153
fxAPI_Table54_1980 ----------------------------------------------------------------------------------- 4-154
fxAPI_Table54_2004 ----------------------------------------------------------------------------------- 4-156
fxAPI_Table54E ----------------------------------------------------------------------------------------- 4-158
fxAPI_Table59_2004 ----------------------------------------------------------------------------------- 4-159
fxAPI_Table59E ----------------------------------------------------------------------------------------- 4-161
fxAPI_Table60_2004 ----------------------------------------------------------------------------------- 4-162
fxAPI_Table60E ----------------------------------------------------------------------------------------- 4-164
fxASTM_D1550_RD60 --------------------------------------------------------------------------------- 4-165
fxASTM_D1550_Ctl ------------------------------------------------------------------------------------ 4-167
fxASTM_D1555_Dens60F----------------------------------------------------------------------------- 4-168
fxASTM_D1555_Ctl ------------------------------------------------------------------------------------ 4-171
fxBatchFWA ---------------------------------------------------------------------------------------------- 4-173
fxBatchHistData----------------------------------------------------------------------------------------- 4-174
fxBatchLatch --------------------------------------------------------------------------------------------- 4-175
fxBatchMax ---------------------------------------------------------------------------------------------- 4-176
fxBatchMin ----------------------------------------------------------------------------------------------- 4-177
fxBatchTotal --------------------------------------------------------------------------------------------- 4-178
fxBatchTWA --------------------------------------------------------------------------------------------- 4-179
fxBatchWatch ------------------------------------------------------------------------------------------- 4-180
fxConvertUnit ------------------------------------------------------------------------------------------- 4-181
fxDeviationAlarm --------------------------------------------------------------------------------------- 4-182
NIST1045 ------------------------------------------------------------------------------------------------- 4-183
fxEthylene_IUPAC_C ----------------------------------------------------------------------------------- 4-184
fxEthylene_IUPAC_M ---------------------------------------------------------------------------------- 4-185
fxGasViscosity_2004 ----------------------------------------------------------------------------------- 4-186
fxGenerateReport -------------------------------------------------------------------------------------- 4-188
fxGERG2008_Gas --------------------------------------------------------------------------------------- 4-189
fxGERG2008_Flash ------------------------------------------------------------------------------------- 4-191
fxGPA_TP15---------------------------------------------------------------------------------------------- 4-193
fxGPA2172_96_C --------------------------------------------------------------------------------------- 4-195
fxGPA2172_96_M -------------------------------------------------------------------------------------- 4-198
fxGPA2172_09_C --------------------------------------------------------------------------------------- 4-201
fxGPA2172_09_M -------------------------------------------------------------------------------------- 4-204
fxIAPWS_IF97_C ---------------------------------------------------------------------------------------- 4-207
fxIAPWS_IF97_M --------------------------------------------------------------------------------------- 4-210
fxIndex ---------------------------------------------------------------------------------------------------- 4-213
Flow-X─ Function Reference
1-5
fxInterpolationCurve ---------------------------------------------------------------------------------- 4-214
fxISO5167_ISA1932Nozzle --------------------------------------------------------------------------- 4-216
fxISO5167_LongRadiusNozzle ----------------------------------------------------------------------- 4-219
fxISO5167_Orifice -------------------------------------------------------------------------------------- 4-222
fxISO5167_Venturi ------------------------------------------------------------------------------------- 4-229
fxISO5167_VenturiNozzle ---------------------------------------------------------------------------- 4-233
fxISO6976_1983_M ------------------------------------------------------------------------------------ 4-237
fxISO6976_1995_M ------------------------------------------------------------------------------------ 4-238
fxISO6976ex_1995_M --------------------------------------------------------------------------------- 4-240
fxKeypadFallback --------------------------------------------------------------------------------------- 4-244
fxKeypadFallbackArray -------------------------------------------------------------------------------- 4-245
fxLatch ---------------------------------------------------------------------------------------------------- 4-246
fxLimitAlarm --------------------------------------------------------------------------------------------- 4-247
fxMR113 -------------------------------------------------------------------------------------------------- 4-248
fxName --------------------------------------------------------------------------------------------------- 4-249
fxNX19_1962 -------------------------------------------------------------------------------------------- 4-250
fxNX19_M ------------------------------------------------------------------------------------------------ 4-252
fxPeriodFWA--------------------------------------------------------------------------------------------- 4-254
fxPeriodLatch -------------------------------------------------------------------------------------------- 4-255
fxPeriodMax --------------------------------------------------------------------------------------------- 4-256
fxPeriodMin---------------------------------------------------------------------------------------------- 4-257
fxPeriodTotal -------------------------------------------------------------------------------------------- 4-258
fxPeriodTWA -------------------------------------------------------------------------------------------- 4-260
fxPeriodWatch ------------------------------------------------------------------------------------------ 4-261
fxPID ------------------------------------------------------------------------------------------------------- 4-262
fxROCAlarm ---------------------------------------------------------------------------------------------- 4-269
fxSarasota_C --------------------------------------------------------------------------------------------- 4-269
fxSarasota_M -------------------------------------------------------------------------------------------- 4-271
fxSetOnChange ----------------------------------------------------------------------------------------- 4-273
fxSetOnCondition--------------------------------------------------------------------------------------- 4-273
fxSetOnEvent -------------------------------------------------------------------------------------------- 4-274
fxSetIndexOnChange ---------------------------------------------------------------------------------- 4-274
fxSetIndexOnCondition ------------------------------------------------------------------------------- 4-275
fxSetIndexOnEvent ------------------------------------------------------------------------------------- 4-276
fxSGERG_C ----------------------------------------------------------------------------------------------- 4-277
fxSGERG_M ---------------------------------------------------------------------------------------------- 4-279
fxSolartron_Gas_C ------------------------------------------------------------------------------------- 4-281
fxSolartron_Gas_M ------------------------------------------------------------------------------------ 4-284
fxSolartron_Liquid _C---------------------------------------------------------------------------------- 4-287
fxSolartron_Liquid_M --------------------------------------------------------------------------------- 4-290
fxSolartron_SG ------------------------------------------------------------------------------------------ 4-294
fxStatusAlarm ------------------------------------------------------------------------------------------- 4-295
fxTag ------------------------------------------------------------------------------------------------------- 4-295
fxTimer ---------------------------------------------------------------------------------------------------- 4-297
fxTotalizerDelta ----------------------------------------------------------------------------------------- 4-298
fxTotalizerRate ------------------------------------------------------------------------------------------ 4-300
fxUGC_C -------------------------------------------------------------------------------------------------- 4-302
fxUGC_M ------------------------------------------------------------------------------------------------- 4-304
fxWatchUpdate ----------------------------------------------------------------------------------------- 4-306
fxVCone_C ----------------------------------------------------------------------------------------------- 4-307
fxVCone_M ---------------------------------------------------------------------------------------------- 4-311
Chapter 5 - Flow-X IO Functions ----------------------------------------------------------------------------- 5-315
fxAnalogInput ------------------------------------------------------------------------------------------- 5-315
fxAnalogOutput ----------------------------------------------------------------------------------------- 5-316
fxSetAnalogOutput ------------------------------------------------------------------------------------- 5-316
1-6
Flow-X─ Function Reference
fxDigitalInput -------------------------------------------------------------------------------------------- 5-317
fxDigitalOutput ----------------------------------------------------------------------------------------- 5-318
fxSetDigitalOutput ------------------------------------------------------------------------------------- 5-319
fxFrequencyOutput ------------------------------------------------------------------------------------ 5-319
fxSetFrequencyOutput -------------------------------------------------------------------------------- 5-320
fxDoubleChronometry -------------------------------------------------------------------------------- 5-321
fxPulseInput --------------------------------------------------------------------------------------------- 5-324
fxResetPulseInputErrors ------------------------------------------------------------------------------ 5-327
fxPulseOutput ------------------------------------------------------------------------------------------- 5-328
fxSetPulseOutput --------------------------------------------------------------------------------------- 5-329
fxPT100Input -------------------------------------------------------------------------------------------- 5-329
fxRTDInput ----------------------------------------------------------------------------------------------- 5-330
fxPT100Table -------------------------------------------------------------------------------------------- 5-330
fxTimePeriodInput ------------------------------------------------------------------------------------- 5-332
Chapter 6 - Reference ------------------------------------------------------------------------------------------- 6-333
Unit Types ------------------------------------------------------------------------------------------------ 6-333
Terminology --------------------------------------------------------------------------------------------- 6-347
Standard composition --------------------------------------------------------------------------------- 6-348
Flow-X─ Function Reference
1-7
Document Control - Revision Coding
Chapter 1 - Document Control
Revision Coding
Our documents are supplied with a revision code. This code has the following format:
<major revision letter>.<minor revision number>. Initially, the document has revision code A.0. When
in the next release of the document minor changes were implemented, the minor revision number
increases. When major changes have been implemented, the major revision number increments.
Example document:
A.0 First revision
A.1 Second revision with minor changes implemented
A.2 Third revision, with other minor changes
B.0 Fourth revision, with (a) major change(s).
The revision coding will be modified for each new release of a document.
All software packages and software modules or components will be provided with a version number.
This number consists of three parts: A release number, a major revision number and a minor revision
number separated by decimal points. A release number identifies the generation number of the
software, the major number refers to the main functionality of the program, seen from the user's point
of view, while the minor revision number identify a new software version.
Example program:
1.01.001 Initial release
1.01.002 Minor change
1.02.001 Major change
2.01.001 Family change
Revision History
Revision A.0
Author : J.C.H.M. van Dal
Date : April 2009
Initial, release
Revision A.1
Author : J.C.H.M. van Dal
Date : June 2010
Added IUPAC Ethylene and IAWS-IF97 functions
Revision A.2
Author : I. Fiers
Date : Aug 2012
Updated and corrected IO functions, moved to separate chapter.
1-8
Flow-X─ Function Reference
Document Control - Revision History
Revision A.3
Author : H. Rutjes
Date : March 2013
Updated incorrect page-header in TOC.
Removed PPRV output from fxPeriodLatch(..) function.
Revision A.4
Author : J.C.H.M. van Dal
Date : July 2014
Added extended ISO6976 function that takes all 55 components of the standard
Added GERG2004 and GERG2008 functions
Revision A.5
Author : J.C.H.M. van Dal
Date : February 2015
Minor editorial changes
Revision A.6
Author : J.C.H.M. van Dal
Date : April 2015
Added new natural gas viscosity calculation
Added C11 C21 components to the extended ISO6976 functions
Added “Quarter circle” and “Conical entrance” orifice calculations
Revision A.7
Author : J.C.H.M. van Dal
Date : September 2015
Added GSSSD method MR 113-03 function
Flow-X─ Function Reference
2-9
Introduction - Flow-X Function Library
Chapter 2 - Introduction
This document describes the spreadsheet functions for the Flow-X series of flow computers. It also
provides background information on related standards and calculation methods used in the industry for
quality and quantity measurement of hydrocarbon and other type of fluids.
The document serves as a reference manual for application engineers who have in-depth knowledge of
the configuration software used for programming the Flow-X products.
Flow-X Function Library
The Flow-X series of flow computer uses Microsoft Excel as its configuration environment. Each Flow-X
application consists of a single Excel workbook that contains one or more worksheets.
Flow-X functions are configured as regular Excel functions. By using the output of one function as an
input (argument) in another function a complete calculation scheme can be made. Functions can be
defined on multiple sheets in order to organize the application.
API Petroleum Measurement Tables
History
The first version of the API Petroleum Measurement Tables was published in 1952. In those days
measurement readings were taken manually and the tables were used to convert the observed density
or gravity at the observed temperature to the value at the reference temperature. So the table values
were the actual standard.
The 1952 Tables consists of 58 tables containing all kind of correction and conversion factors used in
the measurement of hydrocarbon liquids. Each table deals with a particular conversion of units,
correction of density, or correction of volume. The 1952 tables that have to do with the conversion of
density and volume are: 5, 6, 23, 24, 53 and 54.
Table 5, 6, 23 and 24 convert density or volume to or from to a reference temperature of 60°F, while
tables 53 and 54 refer to 15°C.
In 1980 a complete new set of tables was published together with computer routines to allow
electronic devices to automatically calculate the volume conversion factors and API gravity / (relative)
density at the reference temperature. Back then most electronic devices were not capable of
performing double-precision floating point calculations, so the standard prescribed all kind of rounding
and truncating rules to make sure that the calculations would always provide the same result. For the
1980 version the calculation procedures are the standard rather than the table values.
In the 1980 version, which is also referred to as API-2540, the tables are divided into 3 product groups
and a letter designation was used to distinguish between the sub-tables. "A" was used for crude oil, "B"
for refined products and "C" for special applications. The 1980 tables, however, did not cover the LPGs
and NGLs density ranges and the 1952 Tables were left valid for these products. Furthermore, the
lubricating oil tables (designated as "D") were not complete at the time of the printing in 1980 and
were released two years later. As opposed to the A, B and C tables no implementation procedures were
defined for the D tables.
In 1988 the Institute of Petroleum released its Paper No. 3 with tables 59 and 60 that are based on a
reference temperature of 20°C.
This resulted in the following Petroleum Measurement Tables dealing with the conversion of volume
and density to and from a reference temperature.
2-10
Flow-X─ Function Reference
Introduction - API Petroleum Measurement Tables
Number
Title
5
API Gravity Reduction to 60°F
6
Reduction of Volume to 60°F Against API Gravity at 60°F
23
Reduction of Observed Specific Gravity to Specific Gravity 60/60°F
24
Reduction of Volume to 60o F Against Specific Gravity 60/60°F
53
Reduction of Observed Density to Density at 15°C
54
Reduction of Volume to 15°C Against Density at 15°C
59
Reduction of Observed Density to Density at 20°C
60
Reduction of Volume to 20°C Against Density at 20°C
In 2004 the API MPMS 11.1 1980 tables were superseded by a new set of tables primarily for the
following reasons:
API 11.1:2004 includes the correction for both temperature and pressure in one and the
same algorithm
Taken into account the progress in electronics (and for other reasons) the complex
truncating and rounding rules were abandoned. Instead the calculation procedures use
double-precision floating point math. The input and output values are still rounded in order
to obtain consistent results.
The convergence methods for the correction of observed density to base density have been
improved.
On-line density measurement by densitometers became common practice, requiring the
pressure and temperature correction to be incorporated in one ands the same procedure
The tables are extended in both temperature and density to cover lower temperatures and
higher densities.
The previous standard used a significant digit format which resulted in 4 or 5 decimal places
depending on whether the observed temperature was above or below the reference
temperature. The new standard prescribes 5 decimal places if or both cases.
The IP paper No. 3 tables were added to accommodate conversion to 20°C.
Tables for lubricating oils including the implementation procedures are now part of the standard.
Volume correction for pressure
The API MPMS 11.1:1980 Tables only cover the correction for temperature. The correction for pressure
was published in API MPMS standards 11.2.1 and 11.2.2.
The correction for pressure is to the atmospheric pressure or, for products within the lower density
range, to the equilibrium vapor pressure.
To calculate the equilibrium vapor pressure an Addendum was added to API MPMS 11.2.2. This
addendum is also known as GPA TP-15 (1988). In September 2007 the addendum was replaced by a
new API standard 11.2.5 and at the same time GPA TP-15 (1988) was updated with a new 2007
revision.
NGL and LPG tables
For NGL and LPG products volume correction tables 24E and 23E (at 60 °F) were published in GPA TP-25
(1988), so the letter 'E" was used to distinguish the tables from the related API MPMS A, B, C and D
tables.
GPA TP-25 has been superseded by GPA TP-27 / API MPMS 11.2.4 (2007), which includes tables 53E,
54E, 59E and 60E to convert to 15°C and 20°C as well. All text from TP-25 is included without technical
change, so TP-25 is still viable for conversion to and from 60 °F.
Flow-X─ Function Reference
2-11
Introduction - API Petroleum Measurement Tables
Overview of hydrocarbon liquid conversion standards
ASTM-IP Petroleum Measurement Tables, Historical Edition, 1952
API MPMS Chapter 11.1 - 1980* (Temperature VCFs for Generalized Crude Oils, Refined
Products, and Lubricating Oils): Historical; Published in 14 separate volumes
Also known as
API Standard 2540 (API-2540)
ASTM D1250
IP 200
In 1982 chapters XIII and XIV were published containing tables 5D, 6D, 53D and
54D for lubricating oils.
API MPMS Chapter 11.1 - 2004 (Temperature & Pressure VCFs for Generalized Crude Oils,
Refined Products and Lube Oils)
API MPMS Chapter 11.2.1- 1984 (Compressibility Factors for Hydrocarbons: 0-90°API):
Historical: now incorporated into Chapter 11.1-2004
API MPMS Chapter 11.2.1M- 1984 (Compressibility Factors for Hydrocarbons: 638-1074
kg/m3): Historical: now incorporated into Chapter 11.1-2004
API MPMS Chapter 11.2.2 - 1984 (Compressibility Factors for Hydrocarbons: 0.350-0.637
Relative Density and 50°F to 140°F)
API MPMS Chapter 11.2.2M - 1986 (Compressibility Factors for Hydrocarbons: 350-637
kg/m3 Density (15°C) and 46°C to 60°C)
API MPMS Chapter 11.2.2A - 1984 (Addendum to Correlation of Vapor Pressure Correction
for NGL): Superseded by Chapter 11.2.5
API Publication/GPA TP-25/ASTM Publication (Temperature Correction for the volume of
Light Hydrocarbons Tables 24E and 23E: Superseded by API MPMS Chapter 11.2.4
GPA TP-25 was published in 1998 and replaced the 1952 tables 23, 24 for Light Hydrocarbon
Liquids and GPA Technical Publication TP-16, which were previously used for volumetric
measurement of LPG.
API MPMS Chapter 11.2.4 - 2007 / GPA TP-27 / ASTM Publication (Temperature Correction
for the Volume of NGL and LPG Tables 23E, 24E, 53E, 54E, 59E, 60E): Supersedes GPA TP-
25
API MPMS Chapter 11.2.5 - 2007 / GPA TP-15 / ASTM Publication (A Simplified Vapor
Pressure Correlation for Commercial NGLs): Supersedes Addendum to Chapter 11.2.2
(11.2.2A)
IP No. 3 - 1988 (Energy Institute (formerly Institute of Petroleum), Petroleum Measurement
Paper No 3 Computer Implementation Procedures for Correcting Densities and Volumes to
20 C. Superseded by IP No.3 - 1997
IP No. 3 - 1997 (Energy Institute (formerly Institute of Petroleum), Petroleum Measurement
Paper No 3 Computer Implementation Procedures for Correcting Densities and Volumes to
20 C. Supersedes IP No.3 - 1988
ISO 91-1 - 1982 Petroleum measurement tables Part 1: Tables based on reference
temperatures of 15 °C and 60 °F. Superseded by ISO 91-1 1992.
ISO 91-1 - 1992 Petroleum measurement tables Part 1: Tables based on reference
temperatures of 15 °C and 60 °F. Supersedes ISO 91-1 1982.
ISO 91-2 - 1991 Petroleum measurement tables Part 2: Tables based on reference
temperatures of 20 °C
OIML R 63 - 1994 Petroleum measurement tables
2-12
Flow-X─ Function Reference
Introduction - API Petroleum Measurement Tables
Overview of the functions
The following table lists the volume conversion functions for hydrocarbon liquids as provided by the
Flow-X series of flow computer.
Temperature
correction
Pressure
correction
Input
Output
ASTM-IP Petroleum Measurement Tables 1952 - American Edition
Table 23 - Specific Gravity Reduction to
60 °F
SG (T)
SG (60°F)
Table 24 - Volume Reduction to 60 °F
SG (60°F)
Ctl
Crude Oils, Refined Products and Lubricating Oils (API MPMS 11.1:1980 / API-2540)
API 11.1:1980
Tables 5A, 5B and
5D
API 11.2.1:1984
°API (T, P)
°API (60°F, Pe)
API 11.1:1980
Tables 6A, 6B and
6D
API 11.2.1:1984
°API (60°F, Pe)
°API (T, P)
API 11.1:1980
Tables 23A and
23B
API 11.2.1:1984
RD (T, P)
RD (60°F, Pe)
API 11.1:1980
Tables 24A and
24B
API 11.2.1:1984
RD (60°F, Pe)
RD (T, P)
API 11.1:1980
Tables 53A, 53B
and 53D
API 11.2.1M:1984
Density (T, P)
Density (15°C, Pe)
API 11.1:1980
Tables 54A, 54B
and 54D
API 11.2.1M:1984
Density (15°C, Pe)
Density (T, P)
Crude Oils, Refined Products and Lubricating Oils (API MPMS 11.1:2004)
API 11.1:2004
API 11.1:2004
°API (T, P)
°API (60°F, 0 psig)
API 11.1:2004
API 11.1:2004
°API (60°F, 0 psig)
°API (T, P)
API 11.1:2004
API 11.1:2004
RD (T, P)
RD (60°F, 0 psig)
API 11.1:2004
API 11.1:2004
RD (60°F, 0 psig)
RD (T, P)
API 11.1:2004
API 11.1:2004
Density (T, P)
Density (15°C, 0
bar(g))
API 11.1:2004
API 11.1:2004
Density (15°C, 0
bar(g))
Density (T, P)
API 11.1:2004
API 11.1:2004
Density (T, P)
Density (20°C, 0
bar(g))
API 11.1:2004
API 11.1:2004
Density (20°C, 0
bar(g))
Density (T, P)
API 11.1:2004
Not applicable
Thermal
expansion
coefficient at 60°F
Ctl
NGL and LPG (API 11.2.4)
API 11.2.4: 2007
Table 23E
API 11.2.2:1986
GPA TP-15:1988
GPA TP-15:2007
RD (T, P)
RD (60°F, Pe)
Flow-X─ Function Reference
2-13
Introduction - API Petroleum Measurement Tables
API_Table24E
API 11.2.4: 2007
Table 24E
API 11.2.2:1986
GPA TP-15
RD (60°F, Pe)
RD (T, P)
API_Table53E
API 11.2.4: 2007
Table 53E
API 11.2.2:1986
GPA TP-15
Density (T, P)
Density (15°C, Pe)
API_Table54E
API 11.2.4: 2007
Table 53E
API 11.2.2:1986
GPA TP-15
Density (15°C, Pe)
Density (T, P)
API_Table59E
API 11.2.4: 2007
Table 59E
API 11.2.2M:1986
GPA TP-15
Density (T, P)
Density (20°C, Pe)
API_Table60E
API 11.2.4: 2007
Table 60E
API 11.2.2M:1986
GPA TP-15
Density (20°C, Pe)
Density (T, P)
Hydrometer Correction
The API MPMS 11.1 1980 Standard (API-2540) assumes that the API gravity or relative density is
observed with a glass hydrometer. Therefore a correction may be applied for the change of volume of
the glass hydrometer with temperature.
The hydrometer correction applies for tables 5A, 5B, 23A, 23B, 53A and 53B.
The 2004 standard does not include a correction for a glass hydrometer.
API-2540 Boundaries
API MPMS 11.1:1980 (API 2540) is based on published data that lie within the so-called 'Data' range.
The other table values were obtained from extrapolation and lie within the 'Extrapolated' range. It is
recommended not to use API-2540 outside the 'Data' and 'Extrapolated' ranges.
For the lubricating oil tables no difference is made between data that is table values that are based on
published data and table values that are determined by extrapolation.
Range
API Gravity
[API]
Relative
Density
[-]
Density
[kg/m
3
]
Temperature
[F]
Temperature
[C]
Data Range
0 .. 40
40 .. 50
50 .. 55
1.0760 .. 0.8250
0.8250 .. 0.7795
0.7795 .. 0.7585
1075.0 ..
824.0
824.0 .. 778.5
778.5 .. 758.0
0 .. 250
0 .. 200
0 .. 150
-18..120
-18..90
-18..60
Extrapolate
d Range
0 .. 40
40 .. 50
50 .. 55
55 .. 100
1.0760 .. 0.8250
0.8250 .. 0.7795
0.7795 .. 0.7585
0.7585 .. 0.6110
1075.0 ..
824.0
824.0 .. 778.5
778.5 .. 758.0
758.0 .. 610.5
250 .. 300
200 .. 250
150 .. 200
0 .. 200
120..150
90..125
60..95
-18..95
Applies for:
Table 5A
Table 6A
Table 23A
Table 24A
Table 53A
Table 54A
Table 5A
Table 6A
Table 23A
Table 24A
Table 53A
Table 54A
Range
API
Gravity
[°API]
Relative
Density
[-]
Density
[kg/m
3
]
Temperature
[°F]
Temperature
[°C]
Data Range
0 .. 40
40 .. 50
50 .. 85
1.0760 .. 0.8250
0.8250 .. 0.7795
0.7795 .. 0.6535
1075.0 ..
824.0
824.0 .. 778.5
778.5 .. 653.0
0 .. 250
0 .. 200
0 .. 150
-18..120
-18..90
-18..60
Extrapolated
Range
0 .. 40
40 .. 50
50 .. 85
1.0760 .. 0.8250
0.8250 .. 0.7795
0.7795 .. 0.6535
1075.0 ..
824.0
824.0 .. 778.5
778.5 .. 653.0
250 .. 300
200 .. 250
150 .. 200
120..150
90..125
60..95
2-14
Flow-X─ Function Reference
Introduction - API Petroleum Measurement Tables
Applies for:
Table 5B
Table 6B
Table 23B
Table 24B
Table 53B
Table 54B
Table 5B
Table 6B
Table 23B
Table 24B
Table 53B
Table 54B
Range
API
Gravity
[°API]
Relative
Density
[-]
Density
[kg/m
3
]
Temperature
[°F]
Temperature
[°C]
Data Range
-10..45
0.8..1.165
800..1164
0 .. 300
-20..+150
Applies for:
Table 5D
Table 6D
Table 23D*
Table 24D*
Table 53D
Table 54D
Table 5D
Table 6D
Table 23D*
Table 24D*
Table 53D
Table 54D
* Values derived from Table 5D/6D
API-2540 - Rounding and truncating rules
For each table API Standard 2540 specifies an explicit 'Calculation Procedure' that includes the rounding
and truncating of all the input, intermediate and output values. The 'Calculation Procedure' is
considered to be the standard rather than the table values or a set of equations.
The function provides the option to either apply the full API rounding and truncating requirements or
to perform the calculation procedure without any rounding and truncating being applied.
For tables 6A, 6B, 24A, 24B and 54A and 54B the standard makes a distinction between computational
and table values for the calculated VCF. The table values are always rounded to 4 decimal places,
Whereas the computational values has 4 decimal places when the VFC >=1 and 5 decimal places when
the VCF < 1.
When API rounding is enabled the convergence limit is set to the limit value as specified in the
standard. When the API rounding is disabled the convergence limit is set to 0.00001 kg/m3 to obtain
highest precision.
API-11.1:2004 Limits
Range
Density
Temperature
Pressure
Crude Oil
610.6..1163.5 kg/m3 @ 60°F
100..-10 API @ 60°F
0.61120..1.16464 RD @ 60°F
611.16..1163.79 kg/m3 @ 15°C
606.12..1161.15 kg/m3 @ 20°C
-58..302 °F
-50..150 °C
0..1500 psig
0..103.4 bar(g)
Refined products
610.6..1163.5 kg/m3 @ 60°F
100..-10 API @ 60°F
0.61120..1.16464 RD @ 60°F
611.16..1163.86 kg/m3 @ 15°C
606.12..1160.62 kg/m3 @ 20°C
-58..302 °F
-50..150 °C
0..1500 psig
0..103.4 bar(g)
Lubricating oils
800.9..1163.5 kg/m3 @ 60°F
45..-10 API @ 60°F
0.80168..1.1646 RD @ 60°F
801.25..1163.85 kg/m3 @ 15°C
798.11..1160.71 kg/m3 @ 20°C
-58..302 °F
-50..150 °C
0..1500 psig
0..103.4 bar(g)
Flow-X─ Function Reference
2-15
Introduction - API Petroleum Measurement Tables
API constants in US customary units
For the tables in US customary units the following constants apply (both for the 1980 and the 2004
tables):
Product
API Table
K0
K1
K2
Crude oil
A
341.0957
0.0
0.0
Gasoline
B
192.4571
0.2438
0.0
Transition area
B
1489.0670
0.0
-0.00186840
Jet fuels
B
330.3010
0.0
0.0
Fuel oils
B
103.8720
0.2701
0.0
Lubricating oils
D
0.0
0.34878
0.0
API constants in metric units
For the tables in metric units the following constants apply (both for the 1980 and the 2004 tables):
Product
API Table
K0
K1
K2
Crude oil
A
613.9723
0.0
0.0
Gasoline
B
346.4228
0.4388
0.0
Transition area
B
2680.3206
0.0
-0.00336312
Jet fuels
B
594.5418
0.0
0.0
Fuel oils
B
186.9696
0.4862
0.0
Lubricating oils
D
0.0
0.6278
0.0
2-16
Flow-X─ Function Reference
Introduction - API Petroleum Measurement Tables
This page is left blank intentionally.
Flow-X─ Function Reference
3-17
Flow-X General functions - fx2CellSelection
Chapter 3 - Flow-X General functions
This chapter lists all available Flow-X functions in alphabetical order.
fx2CellSelection
Description
The function selects between 2 input cells (e.g. differential pressure cells) based on the actual
measured value and the failure status of each cell.
The function can handle the following type of cell range configurations:
Lo Hi
Hi Hi
Where ‘Lo’ means low range, ‘Mid’ mid range and ‘Hi’ high range.
Function
Function inputs
Remark
EU
SW tag
Range
Default
Name
Cell A value
Input value as percentage
of span of cell A
Cell A status
Input status of cell A
0: Normal
<> 0 : Failure
Cell B value
Input value as percentage
of span of cell B
Cell B status
Input status of cell B
0: Normal
<> 0 : Failure
Range type
For a description of the
functionality refer to
adjacent section ‘Logic’
1: Lo Hi
Cell A at low range
Cell B at high range
2: Hi Hi
Cell A and B at same
range
RNGTYP
Auto switchback
For a description of the
functionality refer to
adjacent section ‘Logic’
0: Disabled
1: Enabled
Switch-up
percentage
Switch-up value expressed
as percentage of span of
the lower range
-
SWUPPERC
0..100
95
Switch-down
percentage
Switch-down value
expressed as percentage of
span of the lower range
-
SWDNPERC
0..100
90
3-18
Flow-X─ Function Reference
Flow-X General functions - fx2CellSelection
Function
outputs
Remark
EU
SW tag
Alarm
Fallback
Status
0: Normal
1: Input argument out of range
STS
FIOOR
Selected cell
number
1: Cell 1
2: Cell 2
SELNR
1
Selected cell
status
0: Normal
1: Failure
SELSTS
0
Logic
The function will switch from one cell to another at the following conditions:
Range type = ‘Lo Hi
When cell A is currently selected
Select cell B when cell A value is above or equal to the switch-up percentage of its range and
cell B is healthy.
Select cell B when cell A fails while cell B is healthy
When cell B is currently selected
Select cell A when cell A value is below or equal to the switch-down percentage of its range
and cell A is healthy
Select cell A when cell B fails and cell A is healthy
Range type = ‘Hi Hi
When cell A is currently selected
Select cell B when cell A value fails and cell B is healthy
When cell B is currently selected
Select cell A when cell A is healthy and ‘Auto switchback’ is enabled
Select cell A when cell B fails and cell A is healthy.
Flow-X─ Function Reference
3-19
Flow-X General functions - fx3CellSelection
fx3CellSelection
Description
The function selects between 3 input cells (typically differential pressure cells) based on the actual
measured value and the failure status of each cell.
The function can handle the following type of cell range configurations:
Lo Mid Hi
Lo Hi Hi
Hi Hi Hi
Where ‘Lo’ means low range, ‘Mid’ mid range and ‘Hi’ high range.
Function
Function inputs
Remark
EU
SW tag
Range
Default
Name
Cell A value
Input value as percentage of span
of cell A
Cell A status
Input status of cell A
0: Normal
<> 0 : Failure
Cell B value
Input value as percentage of span
of cell B
Cell B status
Input status of cell B
0: Normal
<> 0 : Failure
Cell C value
Input value as percentage of span
of cell C
Cell C status
Input status of cell C
0: Normal
<> 0 : Failure
Range type
For a description of the
functionality refer to adjacent
section ‘Logic’
1: Lo Mid Hi
Cell A at low range
Cell B at mid range
Cell C at high range
2: Lo Hi Hi
Cell A at low range
Cell B and C at high range
3: Hi Hi Hi
Cell A, B and C at same
range
RNGTYP
Auto
switchback
For a description of the
functionality refer to adjacent
section ‘Logic’
0: Disabled
1: Enabled
Switch-up
percentage
Switch-up value expressed as
percentage of span of the lower
range
Does not apply for selection type
‘Hi Hi Hi’
-
SWUPPERC
0..100
95
Switch-down
percentage
Switch-down value expressed as
percentage of span of the lower
range
Does not apply for selection type
‘Hi Hi Hi’
-
SWDNPERC
0..100
90
3-20
Flow-X─ Function Reference
Flow-X General functions - fx3CellSelection
Function
outputs
Remark
EU
SW tag
Alarm
Fallback
Status
0: Normal
1: Input argument out of range
STS
FIOOR
Selected cell
number
1: Cell 1
2: Cell 2
3: Cell 3
SELNR
1
Selected cell
status
0: Normal
1: Failure
SELSTS
0
Logic
The function will switch from one cell to another at the following conditions:
Range type = ‘Lo Mid Hi’
When cell A is currently selected
Select cell B when cell A value is above or equal to the switch-up percentage of its range and
cell B is healthy.
Select cell B when cell A fails while cell B is healthy
Select cell C when cell A and cell B fail and cell C is healthy
When cell B is currently selected
Select cell C when cell B value is above or equal to the switch-up percentage of its range and
cell C is healthy
Select cell A when cell A value is below or equal to the switch-down percentage of its range
and cell A is healthy
Select cell A when cell B fails while cell A is healthy
Select cell C when cell B and cell A fail and cell C is healthy
When cell C is currently selected
Select cell B when cell B value is below or equal to the switch-down percentage of its range
and cell B is healthy
Select cell B when cell C fails while cell B is healthy
Select cell A when cell C and cell B fail and cell A is healthy
Range type = ‘Lo Hi Hi’
When cell A is currently selected
Select cell B when cell A value is above or equal to the switch-up percentage of its range and
cell B is healthy.
Select cell C when cell A value is above or equal to the switch-up percentage of its range and
cell B fails and cell C is healthy.
Select cell B when cell A fails while cell B is healthy
Select cell C when cell A and cell B fail and cell C is healthy
When cell B is currently selected
Select cell A when cell A value is below or equal to the switch-down percentage of its range
and cell A is healthy
Select cell C when cell B fails while cell C is healthy
Select cell A when cell B and cell C fail and cell A is healthy
  • Page 1 1
  • Page 2 2
  • Page 3 3
  • Page 4 4
  • Page 5 5
  • Page 6 6
  • Page 7 7
  • Page 8 8
  • Page 9 9
  • Page 10 10
  • Page 11 11
  • Page 12 12
  • Page 13 13
  • Page 14 14
  • Page 15 15
  • Page 16 16
  • Page 17 17
  • Page 18 18
  • Page 19 19
  • Page 20 20
  • Page 21 21
  • Page 22 22
  • Page 23 23
  • Page 24 24
  • Page 25 25
  • Page 26 26
  • Page 27 27
  • Page 28 28
  • Page 29 29
  • Page 30 30
  • Page 31 31
  • Page 32 32
  • Page 33 33
  • Page 34 34
  • Page 35 35
  • Page 36 36
  • Page 37 37
  • Page 38 38
  • Page 39 39
  • Page 40 40
  • Page 41 41
  • Page 42 42
  • Page 43 43
  • Page 44 44
  • Page 45 45
  • Page 46 46
  • Page 47 47
  • Page 48 48
  • Page 49 49
  • Page 50 50
  • Page 51 51
  • Page 52 52
  • Page 53 53
  • Page 54 54
  • Page 55 55
  • Page 56 56
  • Page 57 57
  • Page 58 58
  • Page 59 59
  • Page 60 60
  • Page 61 61
  • Page 62 62
  • Page 63 63
  • Page 64 64
  • Page 65 65
  • Page 66 66
  • Page 67 67
  • Page 68 68
  • Page 69 69
  • Page 70 70
  • Page 71 71
  • Page 72 72
  • Page 73 73
  • Page 74 74
  • Page 75 75
  • Page 76 76
  • Page 77 77
  • Page 78 78
  • Page 79 79
  • Page 80 80
  • Page 81 81
  • Page 82 82
  • Page 83 83
  • Page 84 84
  • Page 85 85
  • Page 86 86
  • Page 87 87
  • Page 88 88
  • Page 89 89
  • Page 90 90
  • Page 91 91
  • Page 92 92
  • Page 93 93
  • Page 94 94
  • Page 95 95
  • Page 96 96
  • Page 97 97
  • Page 98 98
  • Page 99 99
  • Page 100 100
  • Page 101 101
  • Page 102 102
  • Page 103 103
  • Page 104 104
  • Page 105 105
  • Page 106 106
  • Page 107 107
  • Page 108 108
  • Page 109 109
  • Page 110 110
  • Page 111 111
  • Page 112 112
  • Page 113 113
  • Page 114 114
  • Page 115 115
  • Page 116 116
  • Page 117 117
  • Page 118 118
  • Page 119 119
  • Page 120 120
  • Page 121 121
  • Page 122 122
  • Page 123 123
  • Page 124 124
  • Page 125 125
  • Page 126 126
  • Page 127 127
  • Page 128 128
  • Page 129 129
  • Page 130 130
  • Page 131 131
  • Page 132 132
  • Page 133 133
  • Page 134 134
  • Page 135 135
  • Page 136 136
  • Page 137 137
  • Page 138 138
  • Page 139 139
  • Page 140 140
  • Page 141 141
  • Page 142 142
  • Page 143 143
  • Page 144 144
  • Page 145 145
  • Page 146 146
  • Page 147 147
  • Page 148 148
  • Page 149 149
  • Page 150 150
  • Page 151 151
  • Page 152 152
  • Page 153 153
  • Page 154 154
  • Page 155 155
  • Page 156 156
  • Page 157 157
  • Page 158 158
  • Page 159 159
  • Page 160 160
  • Page 161 161
  • Page 162 162
  • Page 163 163
  • Page 164 164
  • Page 165 165
  • Page 166 166
  • Page 167 167
  • Page 168 168
  • Page 169 169
  • Page 170 170
  • Page 171 171
  • Page 172 172
  • Page 173 173
  • Page 174 174
  • Page 175 175
  • Page 176 176
  • Page 177 177
  • Page 178 178
  • Page 179 179
  • Page 180 180
  • Page 181 181
  • Page 182 182
  • Page 183 183
  • Page 184 184
  • Page 185 185
  • Page 186 186
  • Page 187 187
  • Page 188 188
  • Page 189 189
  • Page 190 190
  • Page 191 191
  • Page 192 192
  • Page 193 193
  • Page 194 194
  • Page 195 195
  • Page 196 196
  • Page 197 197
  • Page 198 198
  • Page 199 199
  • Page 200 200
  • Page 201 201
  • Page 202 202
  • Page 203 203
  • Page 204 204
  • Page 205 205
  • Page 206 206
  • Page 207 207
  • Page 208 208
  • Page 209 209
  • Page 210 210
  • Page 211 211
  • Page 212 212
  • Page 213 213
  • Page 214 214
  • Page 215 215
  • Page 216 216
  • Page 217 217
  • Page 218 218
  • Page 219 219
  • Page 220 220
  • Page 221 221
  • Page 222 222
  • Page 223 223
  • Page 224 224
  • Page 225 225
  • Page 226 226
  • Page 227 227
  • Page 228 228
  • Page 229 229
  • Page 230 230
  • Page 231 231
  • Page 232 232
  • Page 233 233
  • Page 234 234
  • Page 235 235
  • Page 236 236
  • Page 237 237
  • Page 238 238
  • Page 239 239
  • Page 240 240
  • Page 241 241
  • Page 242 242
  • Page 243 243
  • Page 244 244
  • Page 245 245
  • Page 246 246
  • Page 247 247
  • Page 248 248
  • Page 249 249
  • Page 250 250
  • Page 251 251
  • Page 252 252
  • Page 253 253
  • Page 254 254
  • Page 255 255
  • Page 256 256
  • Page 257 257
  • Page 258 258
  • Page 259 259
  • Page 260 260
  • Page 261 261
  • Page 262 262
  • Page 263 263
  • Page 264 264
  • Page 265 265
  • Page 266 266
  • Page 267 267
  • Page 268 268
  • Page 269 269
  • Page 270 270
  • Page 271 271
  • Page 272 272
  • Page 273 273
  • Page 274 274
  • Page 275 275
  • Page 276 276
  • Page 277 277
  • Page 278 278
  • Page 279 279
  • Page 280 280
  • Page 281 281
  • Page 282 282
  • Page 283 283
  • Page 284 284
  • Page 285 285
  • Page 286 286
  • Page 287 287
  • Page 288 288
  • Page 289 289
  • Page 290 290
  • Page 291 291
  • Page 292 292
  • Page 293 293
  • Page 294 294
  • Page 295 295
  • Page 296 296
  • Page 297 297
  • Page 298 298
  • Page 299 299
  • Page 300 300
  • Page 301 301
  • Page 302 302
  • Page 303 303
  • Page 304 304
  • Page 305 305
  • Page 306 306
  • Page 307 307
  • Page 308 308
  • Page 309 309
  • Page 310 310
  • Page 311 311
  • Page 312 312
  • Page 313 313
  • Page 314 314
  • Page 315 315
  • Page 316 316
  • Page 317 317
  • Page 318 318
  • Page 319 319
  • Page 320 320
  • Page 321 321
  • Page 322 322
  • Page 323 323
  • Page 324 324
  • Page 325 325
  • Page 326 326
  • Page 327 327
  • Page 328 328
  • Page 329 329
  • Page 330 330
  • Page 331 331
  • Page 332 332
  • Page 333 333
  • Page 334 334
  • Page 335 335
  • Page 336 336
  • Page 337 337
  • Page 338 338
  • Page 339 339
  • Page 340 340
  • Page 341 341
  • Page 342 342
  • Page 343 343
  • Page 344 344
  • Page 345 345
  • Page 346 346
  • Page 347 347
  • Page 348 348
  • Page 349 349
  • Page 350 350

Spirit flow-x Function Reference

Type
Function Reference

Ask a question and I''ll find the answer in the document

Finding information in a document is now easier with AI