Spirit flow-x Function Reference

Page 1
Function Reference
Certified flow calculations
Flow and batch calculations
Worksheet functions
Page 2
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
Page 3
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
Page 4
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
Page 5
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
Page 6
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
Page 7
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.
Page 8
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
Page 9
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.
Page 10
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.
Page 11
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
Page 12
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.
Function
Temperature correction
Pressure correction
Input
Output
ASTM-IP Petroleum Measurement Tables 1952 - American Edition
API_Table23 (1952)
Table 23 - Specific Gravity Reduction to 60 °F
SG (T)
SG (60°F)
API_Table24 (1952)
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_Table5 (1980)
API 11.1:1980 Tables 5A, 5B and 5D
API 11.2.1:1984
°API (T, P)
°API (60°F, Pe)
API_Table6 (1980)
API 11.1:1980 Tables 6A, 6B and 6D
API 11.2.1:1984
°API (60°F, Pe)
°API (T, P)
API_Table23 (1980)
API 11.1:1980 Tables 23A and 23B
API 11.2.1:1984
RD (T, P)
RD (60°F, Pe)
API_Table24 (1980)
API 11.1:1980 Tables 24A and 24B
API 11.2.1:1984
RD (60°F, Pe)
RD (T, P)
API_Table53 (1980)
API 11.1:1980 Tables 53A, 53B and 53D
API 11.2.1M:1984
Density (T, P)
Density (15°C, Pe)
API_Table54 (1980)
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_Table5 (2004)
API 11.1:2004
API 11.1:2004
°API (T, P)
°API (60°F, 0 psig)
API_Table6 (2004)
API 11.1:2004
API 11.1:2004
°API (60°F, 0 psig)
°API (T, P)
API_Table23 (2004)
API 11.1:2004
API 11.1:2004
RD (T, P)
RD (60°F, 0 psig)
API_Table24 (2004)
API 11.1:2004
API 11.1:2004
RD (60°F, 0 psig)
RD (T, P)
API_Table53 (2004)
API 11.1:2004
API 11.1:2004
Density (T, P)
Density (15°C, 0 bar(g))
API_Table54 (2004)
API 11.1:2004
API 11.1:2004
Density (15°C, 0 bar(g))
Density (T, P)
API_Table59 (2004)
API 11.1:2004
API 11.1:2004
Density (T, P)
Density (20°C, 0 bar(g))
API_Table60 (2004)
API 11.1:2004
API 11.1:2004
Density (20°C, 0 bar(g))
Density (T, P)
API_Table6C (2004)
API 11.1:2004
Not applicable
Thermal expansion coefficient at 60°F
Ctl
NGL and LPG (API 11.2.4)
API_Table23E
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)
Page 13
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/m3]
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/m3]
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
Page 14
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/m3]
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)
Page 15
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
Page 16
2-16 Flow-X─ Function Reference
Introduction - API Petroleum Measurement Tables
This page is left blank intentionally.
Page 17
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
Page 18
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.
Page 19
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
Page 20
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 21
Flow-X─ Function Reference
3-21
Flow-X General functions - fx3CellSelection
When cell C 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 B when cell B is healthy and ‘Auto switchback’ is enabled Select cell A when cell C and cell B fail and cell A is healthy
Range type = ‘Hi Hi Hi’
When cell A is currently selected
Select cell B when cell A value fails and 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 is healthy and ‘Auto switchback’ is enabled Select cell A when cell B fails and cell A is healthy Select cell C when cell B and A fail and cell C is healthy
When cell C is currently selected
Select cell A when cell A is healthy and ‘Auto switchback’ is enabled Select cell B when cell B is healthy and cell A fails and ‘Auto switchback’ is enabled Select cell A when cell C fails and cell A is healthy Select cell B when cell C and A fail and cell B is healthy
Page 22
3-22 Flow-X─ Function Reference
Flow-X General functions - fxAGA10_M
fxAGA10_M
The function calculates the speed of sound of a gas at the specified conditions of temperature and pressure using the formulae presented in the American Gas Association Report No 10.
Compliance
AGA Report No. 10 - Speed of Sound in Natural Gas and Other Related Hydrocarbon Gases, January 2003
Boundaries
The AGA-10 calculation has defined uncertainty bounds for gas mixtures that lie within the 'Normal range'. Also an 'Expanded range' of gas mixtures is defined for which the AGA-10 calculation has a higher uncertainty. Using the AGA-10 calculation for gas mixtures that lie outside the 'Expanded range' is not recommended. The AGA-10 standard specifies the same limits as the AGA-8 standard. Refer to the fxAGA8 function for details on the actual limit values used by this function to set output ‘Range’.
Function inputs and outputs
Function inputs
Remark
EU
SW tag
Range
Default
Name
Optional tag name, tag description and tag group
Pressure
Observed pressure
bar(a)
0..2000
Temperature
Observed temperature
°C -
200..+400
Composition
Standard composition as defined in section 'Standard gas composition.
mol/mol
COMP
0..1
neo-Pentane mode
Determines what to do when component neo­Pentane is larger than zero 1: Add to i-Pentane 2: Add to n-Pentane 3: Neglect
-
NEOC5_MODE
1
Function outputs
Remark
EU
SW tag
Alam
Fallback
Status
0: Normal 1: Input argument out of range 2: Calculation error 3: No convergence 4: Mole fractions do not add up to 1.0 +- 0.0001
STS FIOOR CALCERR NOCONV COMPOOR Speed of sound
m/s
SOS 0
Range
0: In Normal Range
All inputs are within the 'Normal Range'
1: In Extended Range
One or more inputs within the 'Extended Range, but none of the inputs outside the Extended rang (outputs values have higher uncertainty)
RANGE
OOR
0
Page 23
Flow-X─ Function Reference
3-23
Flow-X General functions - fxAGA10_M
2: Out of Range
One or more inputs outside the 'Extended Range' (using the AGA10 calculation is not recommended in this case)
Calculations
Calculations are as documented in the standard.
Page 24
3-24 Flow-X─ Function Reference
Flow-X General functions - fxAGA10ex_M
fxAGA10ex_M
The extended AGA 10 function provides an extensive set of gas properties at the specified conditions of temperature and pressure using the formulae presented in the American Gas Association Report No 10.
Compliance
AGA Report No. 10 - Speed of Sound in Natural Gas and Other Related Hydrocarbon Gases, January 2003
Boundaries
The AGA-10 calculation has defined uncertainty bounds for gas mixtures that lie within the 'Normal range'. Also an 'Expanded range' of gas mixtures is defined for which the AGA-10 calculation has a higher uncertainty. Using the AGA-10 calculation for gas mixtures that lie outside the 'Expanded range' is not recommended. The AGA-10 standard specifies the same limits as the AGA-8 standard. Refer to the fxAGA8 function for details on the actual limit values used by this function to set output ‘Range’.
Function inputs and outputs
Function inputs
Remark
EU
SW tag
Range
Default
Name
Optional tag name, tag description and tag group
Pressure
Observed pressure
bar(a)
0..2000
Temperature
Observed temperature
°C -
200..+400
Composition
Standard composition as defined in section 'Standard gas composition.
mol/mol
COMP
0..1
neo-Pentane mode
Determines what to do when component neo­Pentane is larger than zero 1: Add to i-Pentane 2: Add to n-Pentane 3: Neglect
-
NEOC5_MODE
1
Function outputs
Remark
EU
SW tag
Alam
Fall back
Status
0: Normal 1: Input argument out of range 2: Calculation error 3: No convergence 4: Mole fractions do not add up to 1.0 +-
0.0001
STS FIOOR CALCERR NOCONV COMPOOR
Molecular weight
kg/kmol
MOLMASS
Molar density at base conditions
mol/m3
MOLDENSB
Molar density at flowing conditions
mol/m3
MOLDENSF
Mass density at base conditions
kg/m3
MASSDENSB
Mass density at flowing conditions
kg/m3
MASSDENSF
Page 25
Flow-X─ Function Reference
3-25
Flow-X General functions - fxAGA10ex_M
Ideal gas relative density
- IRD
Real gas relative density
- RRD Velocity of sound
m/s
SOS
Compressibility at base conditions
- ZB
Compressibility at flowing conditions
- ZF Supercompressibility
- FPV
Ideal gas specific enthalpy
kJ/kg
MASSH0
Real gas specific enthalpy
kJ/kg
MASSH
Real gas specific entropy
kJ/kg/K
MASSS
Ideal gas isobaric heat capacity
kJ/kg/K
MASSCP0
Real gas isobaric heat capacity
kJ/kg/K
MASSCP
Real gas isochoric heat capacity
kJ/kg/K
MASSCV
Ideal gas isobaric heat capacity
kJ/kmol/K
MOLCP0
Real gas isobaric heat capacity
kJ/kmol/K
MOLCP
Real gas isochoric heat capacity
kJ/kmol/K
MOLCV Ratio of specific heats
- CPCV
Isentropic exponent
- KAPPA
Critical flow factor
- CRITC
Ideal gas specific enthalpy
kJ/kmol
MOLH0
Real gas specific enthalpy
kJ/kmol
MOLH
Isentropic perfect gas critical flow factor
- CI
Isentropic real gas critical flow factor
- CRI
Range
0: In Normal Range
All inputs are within the 'Normal Range'
1: In Extended Range
One or more inputs within the 'Extended Range, but none of the inputs outside the Extended rang (outputs values have higher uncertainty)
2: Out of Range
One or more inputs outside the 'Extended Range' (using the AGA10
RANGE
OOR
0
Page 26
3-26 Flow-X─ Function Reference
Flow-X General functions - fxAGA10ex_M
calculation is not recommended in this case)
Calculations
Calculations are as documented in the standard.
Page 27
Flow-X─ Function Reference
3-27
Flow-X General functions - fxAGA3_C
fxAGA3_C
Description
The function calculates the mass flow rate for Orifice pressure differential flow devices according to the AGA-3 standard for orifice meters with flange taps.
Compliance
AGA Report No. 3 - Orifice Metering Measurement of fluid flow by means of pressure
differential devices, 1992
API Manual of Petroleum Measurement Standards, Chapter 14 Natural Gas Fluids
Measurement, Section 3 - Concentric Square-edged Orifice Meters 1992.
Function
Function inputs
Remark
EU
SW tag
Range
Default
Name
Optional tag name, tag description and tag group
Differential Pressure
Differential pressure over the primary flow device measured at the up- and downstream pressure tappings, which need to be in the positions as specified in the standard
inH2O @ 60°F
0..1000
0
Pressure
Down- or upstream pressure value of the fluid at metering conditions
psia 0..30000
0
Temperature
Down- or upstream temperature of the fluid at metering conditions
°F -
400..200 0
0 Density
Down or upstream density of the fluid at metering conditions
lbm/ft3
0..200
0
Dynamic Viscosity
Dynamic viscosity of the fluid
lbm/ft.s
DYNVI S
0..10
6.9e-6
Isentropic Exponent
Also referred to as (kappa). For an ideal gas this coefficient is equal to the ratio of the specific heat capacity at constant pressure to the specific heat at constant volume. This ratio is commonly used when the real value is unknown.
-
KAPPA
0..10
1.3
Pipe Diameter
Internal diameter of the pipe at reference temperature
inches
PIPEDI AM
0..100
0
Pipe Expansion factor
The thermal expansion coefficient of the pipe material
1/°F
PIPEE XPF
0..1
6.2e-6
Pipe Reference temperature
The reference temperature that corresponds to the 'Pipe diameter' input value
°F
PIPER EFT -400..200 0
68 Orifice Diameter
Orifice diameter at reference temperature
inches
ORIFD IAM
0..100
0
Orifice Expansion factor
The thermal expansion coefficient of the orifice material Typical values are:
1/°F
ORIFE XPF
0..1
9.25e-6
Orifice Reference Temperature
The reference temperature that corresponds to the 'Orifice diameter' input value
°F
ORIFR EFT -400..200 0
68
Page 28
3-28 Flow-X─ Function Reference
Flow-X General functions - fxAGA3_C
Pressure Location
1: Upstream tapping
Input 'Pressure' represents the pressure at the upstream pressure tapping (p1). Since the absolute pressure is usually measured at the upstream tapping this is the most common setting.
2: Downstream tapping
Input 'Pressure' represents the pressure at the downstream tapping (p2).
-
PRESL OC
1
Temperature Location
1: Upstream tapping
Input 'Temperature' represents the upstream temperature (t1).
2: Downstream tapping
Input 'Temperature represents the temperature at the downstream tapping (t2).
3: Recovered pressure
Input 'Temperature' represents the downstream temperature at a location Where the pressure has fully recovered (t3). Since temperature measurement is usually downstream of the flow device this is the most common setting.
-
TEMP LOC
3
Temperature Correction
1: Use (1-)/
Isentropic expansion using (1-)/ as the temperature referral exponent
2: Use temperature exponent
Isentropic expansion using input 'Temperature Exponent' as the temperature referral exponent [-]
-
TEMP COR
1
Temperature Exponent
To correct the temperature from down- to upstream conditions (or vice versa) the formula (-1)/ (isentropic expansion) will be used when the input value is set to 0, else the input value will be used. For more details refer to section 'Temperature correction'.
TEMP EXP
0
Page 29
Flow-X─ Function Reference
3-29
Flow-X General functions - fxAGA3_C
Density Location
This parameter specifies if and how the density should be corrected from downstream to upstream conditions. 1: Upstream tapping
Input 'Density' represents the density at the upstream pressure tapping (1).
2: Downstream tapping
Input 'Density' represents the density at the downstream tapping (2).
3: Recovered pressure
Input 'Density' represents the density downstream at a location Where the pressure has fully recovered (3).
-
DENSL OC
0
Density Exponent.
This factor is used when density correction is enabled. The formula 1/ will be used when the input value is set to 0, else the input value will be used. For more details refer to section function 'ISO5167- Orifice' 'Density correction'.
-
DENSE XP
0 Fluid
The type of fluid being measured 1: Gas 2: Liquid For liquid the expansion factor is set to 1, i.e. the fluid is considered to be incompressible.
-
FLUID
0
Drain hole
When input is > 0 then an additional correction on the orifice diameter will be applied to account for the drain hole, as explained further on.
in
DRAIN
0.. 100
0
Fpwl
Local Gravitational Correction Factor for Deadweight Calibrators used to calibrate differential and static pressure Instruments.
Directly applied on the calculated mass flow rate within each iteration.
-
FPWL
0.9..1.1
1
Function outputs
Remark
EU
SW tag
Alarm
Fallback
Status
0: Normal 1: Input argument out of range 2: Calculation error 3: No convergence
STS FIOOR CALCERR NOVONV
Mass flow rate
The calculated mass flow rate
klbm/hr
MASSR
0 Beta ratio
Orifice to pipe diameter
-
BETA
0
Page 30
3-30 Flow-X─ Function Reference
Flow-X General functions - fxAGA3_C
ratio at upstream temperature
Orifice diameter
At the upstream temperature
inches
ORIFUP
0 Pipe diameter
At the upstream temperature
inches
PIPEUP
0
Upstream pressure
Pressure at upstream tapping (p1)
psia
PRESUP
0
Pressure at downstream tapping
Pressure at downstream tapping (p2)
psia
PRESDN
0 Recovered downstream pressure
Fully recovered downstream pressure (p3)
psia
PRESREC
0 Upstream temperature
Temperature at upstream tapping (t1)
°F
TEMPUP
0
Temperature at downstream tapping
Temperature at downstream tapping (t2)
°F
TEMPDN
0
Downstream Temperature
'Fully recovered' downstream temperature (t3)
°F
TEMPREC
0 Upstream density
Density at upstream tapping (1)
lbm/ft3
DENSUP
0
Density at downstream tapping
Pressure at downstream tapping (2)
lbm/ft3
DENSDN
0 Downstream density
'Fully recovered' downstream density (3)
lbm/ft3
DENSREV
0
Reynolds number
The pipe Reynolds number, i.e. the Reynolds number upstream of the orifice and not the one within the device throat itself)
-
REYN
0
Discharge coefficient
- DISCF
0 Expansion Factor
- EXPFAC
0 Velocity of Approach
- VOA 0
Pressure out of range
0: Pressure is in valid range 1: Pressure is out of valid range
-
PRESOOR
PRESOOR
0
Reynolds out of range
0: Reynolds number is in valid range 1: Reynolds number is out of valid range
-
REYNOO R
REYNOO R
0
Diameter out of range
0: Device and pipe diameter and Beta ratio in valid range 1: Device diameter, pipe diameter and/or Beta ratio out of valid range
-
DIAMOO R
DIAMOO R
0
Calculations
The calculations are in accordance with the standard.
Page 31
Flow-X─ Function Reference
3-31
Flow-X General functions - fxAGA3_C
Pressure correction
The relation between the pressure at the upstream tapping p
1
and the pressure at the
downstream tapping (p2) is as following:
1000
12
units
Kppp
The relation between the pressure at the upstream tapping and the downstream tapping is
as following:
LOSS
ppp
13
 
unitsLOSS
Kpp
2
2
1
1
4
1
1
E
EC
Where:
p1
Pressure at upstream tapping
psia
p2
Pressure at downstream tapping
psia
p3
Fully recovered downstream pressure
psia
p
Differential pressure
inH20 @ 60°F
p
LOSS
Pressure loss over the meter
psi
C
Discharge coefficient as calculated by the standard
-
α
Flow coefficient
-
β
Diameter ratio at the upstream pressure and temperature
-
E
Velocity of approach factor
-
K
units
Unit conversion factor to convert a value expressed in 'inH2O @60°F' to the corresponding expressed in 'psi' (conversion as specified in section 'Unit Types')
-
Temperature correction
When input 'Temperature correction' is set to 1, then an isentropic expansion based on the
isentropic coefficient is applied:
67.45967.459
1
1
2
21
 
 
p
p
tt
67.45967.459
1
1
3
31
 
 
p
p
tt
Page 32
3-32 Flow-X─ Function Reference
Flow-X General functions - fxAGA3_C
When input 'Temperature correction' is set to 2, then an isentropic expansion based on
input 'Temperature exponent' is applied:
67.45967.459
1
2
21
 
 
TE
K
p
p
tt
67.45967.459
1
3
31
 
 
TE
K
p
p
tt
Where:
t1
Upstream temperature
°F
t2
Temperature at the downstream tapping
°F
t3
Temperature at the fully recovered downstream pressure
°F
p1
Upstream pressure
psia
p2
Pressure at the downstream tapping
psia
p3
Fully recovered downstream pressure
psia
Isentropic exponent
-
KTE
Temperature exponent
-
Density correction
When input 'Density exponent' = 0, then the following isentropic corrections are applied
(depending on the type of Density Correction)
1
2
1
21
 
 
p
p
1
3
1
31
 
 
p
p
Else the value of input 'Density Exponent' is used
DE
K
p
p
 
 
2
1
21
DE
K
p
p
 
 
3
1
31
Where:
1
Upstream density
lbm/ft3
2
Density at the downstream tapping
lbm/ft3
3
Density at the fully recovered downstream pressure
lbm/ft3
p1
Upstream pressure
psia
p2
Pressure at the downstream tapping
psia
p3
Fully recovered downstream pressure
psia
Isentropic exponent
-
KDE
Density exponent
-
Page 33
Flow-X─ Function Reference
3-33
Flow-X General functions - fxAGA5_C
fxAGA5_C
The AGA 5 standard defines methods to calculate the mass and volume based calorific values at 60°F and 14.73 psia for a natural gas based on known molar fractions of the non-hydrocarbon gas components.
Compliance
A.G.A. Transmission Measurement Committee Report No. 5 (Fuel gas Energy Metering) 1981 A.G.A. Transmission Measurement Committee Report No. 5 (Fuel gas Energy Metering) 1996
(Reprinted 1999)
Function inputs
Remark
EU
SW tag
Range
Default
Name
Optional tag name, tag description and tag group
Composition
Standard composition as defined in section 'Standard gas composition. Only the following components are considered by the calculation: N2 Nitrogen CO2 Carbon dioxide H2O Water H2S Hydrogen sulfide H2 Hydrogen CO Carbon monoxide O2 Oxygen He Helium
Sum of these fractions may not exceed 1
molar fraction
COMP
0..1
0
Specific Gravity
Molar Mass Ratio, i.e. ratio of the molar mass of the gas and of the molar mass of air (specified in AGA-5 as 28.9644 kg/kmol (lbm/lbmol))
-
SG
0..1
0
Function outputs
Remark
EU
SW tag
Alarm
Fallback
Status
0: Normal 1: Input argument out of range 2: Calculation error
STS FIOOR CALCERR
Calorific value mass
Mass based calorific value
Btu/lbm
CV_MASS
0
Calorific value volume
Volume calorific value at 60°F and 14.73 psia
Btu/scf
CV_VOL
0
Calculations
The Energy to Mass ratio is calculated according to Section III of the standard, which contains the calculation procedure for the gas mass to energy conversion. The equations based on the 'by volume' fractional values are used (and not the equations based on the 'by weight' values). The Energy to Volume ratio is calculated according to Section II of the standard, which contains the calculation procedure for the gas volume to energy conversion.
Page 34
3-34 Flow-X─ Function Reference
Flow-X General functions - fxAGA8_C
fxAGA8_C
The compressibility and density of a gas are calculated from the composition, temperature and pressure in accordance with the ‘Detail Characterization’ method outlined in the AGA-8 standard, with the input and output values in US Customary units.
Compliance
AGA Report No. 8, Second edition November 1992 - 2nd printing July 1994 API MPMS 14.2, Second edition November 1992 - 2nd printing July 1994 ISO 12213 Natural gas Calculation of compression factor Part 2: Calculation using
molar-composition analysis, 1997
Boundaries
The AGA-8 calculation has defined uncertainty bounds for gas mixtures that lie within the 'Normal range'. Also an 'Expanded range' of gas mixtures is defined for which the AGA-8 calculation has a higher uncertainty. Using the AGA-8 calculation for gas mixtures that lie outside the 'Expanded range' is not recommended.
Input value
Normal Range
Expanded Range
EU
Pressure
0 .. 20000
0 .. 20000
psia
Temperature
-200 .. +400
-200 .. +400
°F
Mole fraction of Methane
0.45 .. 1.00
0.00 .. 1.00
-
Mole fraction of Ethane
0.00 .. 0.10
0.00 .. 1.00
-
Mole fraction of Propane
0.00 .. 0.04
0.00 .. 0.12
-
Mole fraction of Butanes
0.00 .. 0.01
0.00 .. 0.06
-
Mole fraction of Pentanes
0.00 .. 0.003
0.00 .. 0.04
-
Mole fraction of Hexanes Plus
0.00 .. 0.002
*
-
Mole fraction of Carbon monoxide
0.00 .. 0.03
0.00 .. 0.03
-
Mole fraction of Carbon dioxide
0.00 .. 0.30
0.00 .. 1.00
-
Mole fraction of Nitrogen
0.00 .. 0.50
0.00 .. 1.00
-
Mole fraction of Helium
0.00 .. 0.002
0.00 .. 0.03
-
Mole fraction of Argon
0.00 .. 0.00
0.00 .. 0.01
-
Mole fraction of Oxygen
0.00 .. 0.00
0.00 .. 0.21
-
Mole fraction of Hydrogen Sulphide
0.00 .. 0.0002
0.00 .. 1.00
-
Mole fraction of Hydrogen
0.00 .. 0.10
0.00 .. 1.00
-
Mole fraction of Water
0.00 .. 0.0005
*
-
* For these components the dew point temperature is the upper limit. Limit check is ignored for reason of simplicity.
Page 35
Flow-X─ Function Reference
3-35
Flow-X General functions - fxAGA8_C
Function inputs and outputs
Function inputs
Remark
EU
SW tag
Range
Default
Name
Optional tag name, tag description and tag group
Pressure
Pressure value
psia 0..40000
1.01325
Temperature
Temperature value
°F -250..+800
0
Composition
Standard composition as defined in section 'Standard gas composition.
mol/mol
COMP
0..1
0
neo-Pentane mode
Determines what to do when component neo-Pentane is larger than zero 1: Add to i-Pentane 2: Add to n-Pentane 3: Neglect
-
NEOC5_MODE
1
Function outputs
Remark
EU
SW tag
Alarm
Fallback
Status
0: Normal 1: Input argument out of range 2: Calculation error 3: No convergence 4: Mole fractions do not add up to 1.0 +- 0.0001
STS FIOOR CALCERR NOCONV COMPERR
Compressibility factor
- Z 1 Mass Density
lb/ft3
MASDENS
0
Mole Density
lbmol/ ft3
MOLDENS
0
Molar Mass
lb/lbm ol
MOLMASS
0
Range
0: In Normal Range
All inputs are within the 'Normal Range'
1: In Extended Range
One or more inputs within the 'Extended Range, but none of the inputs outside the Extended rang (outputs values have higher uncertainty)
2: Out of Range
One or more inputs outside the 'Extended Range' (using the AGA8 calculation is not recommended in this case)
RANGE
OOR
0
Calculations
The calculations are as documented in the standard.
Page 36
3-36 Flow-X─ Function Reference
Flow-X General functions - fxAGA8_M
fxAGA8_M
The compressibility and density of a gas are calculated from its composition, temperature and pressure in accordance with the ‘Detail Characterization’ method outlined in the AGA8 standard, with the input and output values in metric units.
Compliance
AGA Report No. 8, Second edition November 1992 - 2nd printing July 1994 API MPMS 14.2, Second edition November 1992 - 2nd printing July 1994 ISO 12213 Natural gas Calculation of compression factor Part 2: Calculation using
molar-composition analysis, 1997
Boundaries
The AGA-8 calculation has defined uncertainty bounds for gas mixtures that lie within the 'Normal range'. Also an 'Expanded range' of gas mixtures is defined for which the AGA-8 calculation has a higher uncertainty. Using the AGA-8 calculation for gas mixtures that lie outside the 'Expanded range' is not recommended.
Input value
Normal Range
Expanded Range
EU
Pressure
0 .. 1379
0 .. 1379
bar(a)
Temperature
-129 .. +204
-129 .. +204
°C
Mole fraction of Methane
0.45 .. 1.00
0.00 .. 1.00
-
Mole fraction of Ethane
0.00 .. 0.10
0.00 .. 1.00
-
Mole fraction of Propane
0.00 .. 0.04
0.00 .. 0.12
-
Mole fraction of Butanes
0.00 .. 0.01
0.00 .. 0.06
-
Mole fraction of Pentanes
0.00 .. 0.003
0.00 .. 0.04
-
Mole fraction of Hexanes Plus
0.00 .. 0.002
*
-
Mole fraction of Carbon monoxide
0.00 .. 0.03
0.00 .. 0.03
-
Mole fraction of Carbon dioxide
0.00 .. 0.30
0.00 .. 1.00
-
Mole fraction of Nitrogen
0.00 .. 0.50
0.00 .. 1.00
-
Mole fraction of Helium
0.00 .. 0.002
0.00 .. 0.03
-
Mole fraction of Argon
0.00 .. 0.00
0.00 .. 0.01
-
Mole fraction of Oxygen
0.00 .. 0.00
0.00 .. 0.21
-
Mole fraction of Hydrogen Sulphide
0.00 .. 0.0002
0.00 .. 1.00
-
Mole fraction of Hydrogen
0.00 .. 0.10
0.00 .. 1.00
-
Mole fraction of Water
0.00 .. 0.0005
*
-
* For these components the dew point temperature is the upper limit. Limit check is ignored for reason of simplicity.
Page 37
Flow-X─ Function Reference
3-37
Flow-X General functions - fxAGA8_M
Function inputs and outputs
Function inputs
Remark
EU
SW tag
Range
Default
Name
Optional tag name, tag description and tag group
Pressure
Pressure value
bar(a)
0..2800
1.01325
Temperature
Temperature value
°C -150..+450
0
Composition
Standard composition as defined in section 'Standard gas composition.
mol/mol
COMP
0..1
0
neo-Pentane mode
Determines what to do when component neo­Pentane is larger than zero 1: Add to i-Pentane 2: Add to n-Pentane 3: Neglect
-
NEOC5_MODE
1
Function outputs
Remark
EU
SW tag
Alarm
Fallback
Status
0: Normal 1: Input argument out of range 2: Calculation error 3: No convergence 4: Mole fractions do not add up to 1.0 +- 0.0001
STS FIOOR CALCERR NOCONV COMPERR Compressibility factor
- Z 1 Mass Density
kg/m3
MASDENS
0
Mole Density
kmol/m3
MOLDENS
0
Molar Mass
kg/kmol
MOLMASS
0
Range
0: In Normal Range
All inputs are within the 'Normal Range'
1: In Extended Range
One or more inputs within the 'Extended Range, but none of the inputs outside the Extended rang (outputs values have higher uncertainty)
2: Out of Range
One or more inputs outside the 'Extended Range' (using the AGA8 calculation is not recommended in this case
RANGE
OOR
0
Calculations
The calculations are as documented in the standard.
Page 38
3-38 Flow-X─ Function Reference
Flow-X General functions - fxAGA8_Gross
fxAGA8_Gross
Description
This function calculates the compressibility factor in accordance with the AGA-8 Gross Characterization Method. Although the AGA-8 Gross Method is based on the Standard GERG Virial Equation Of State (SGERG) there are slight differences in the results.
Two different methods are specified by the standard. Method 1 takes the Pressure, Temperature, Specific Gravity (Relative Density), Carbon Dioxide content and Gross Heating Value (GHV) as inputs. Method 2 takes the same inputs except for the Nitrogen content instead of GHV.
Compliance
AGA 8, Second edition November 1992 - 2nd printing July 1994
AGA Report No. 8, Second edition November 1992 - 2nd printing July 1994 API MPMS 14.2, Second edition November 1992 - 2nd printing July 1994
Boundaries
The AGA8 standard recommends using the Gross Characterization Method only when input conditions lie within the following range. For conditions outside this range the standard recommends to use the Detailed Characterization Method.
Input value
Normal Range
EU
Temperature
32..130
°F
Pressure
0 .. 1200
psia
Gross heating value
475 .. 1210
Btu/ft3
Relative density
0.554 .. 0.87
-
Carbon dioxide
0.00 .. 0.30
mol/mol
Nitrogen
0.00 .. 0.50
mol/mol
Function inputs and outputs
Function inputs
Remark
EU
Range
Default
Name
Optional tag name, tag description and tag group
Temperature
Observed temperature
°F
-250..+800
60
Pressure
Observed pressure
psia
0..40000
Relative density
Relative density at the corresponding reference temperature and pressure
-
0..2 0 RD reference temperature
Reference temperature for relative density
°F
-250 ..+800
60
RD reference pressure
Reference pressure for relative density
psia
0..40000
14.73
Gross heating value
Gross heating value at the corresponding reference temperature and pressure
Btu/ft3
0..2500
0
GHV reference temperature
Reference temperature for gross heating value
°F
-250 ..+800
60
GHV reference pressure
Reference pressure for gross heating value
psia
0..40000
14.73 Nitrogen
Nitrogen (N2) fraction
mol/mol
0..1
0
Carbon dioxide
Carbon dioxide (CO2) fraction
mol/mol
0..1
0
Method
Gross Characterization Method: 1: GHV, Relative Density, CO2 2: Relative Density, CO2, N2
Note: For Method 1 input ‘Nitrogen’ is not
- 0
Page 39
Flow-X─ Function Reference
3-39
Flow-X General functions - fxAGA8_Gross
used, while for Method 2 inputs ‘Gross heating value’, ‘GHV reference temperature’ and ‘GHV reference pressure’ are not used.
Function outputs
Remark
EU
SW tag
Alarm
Fallback
Status
0: Normal 1: Input argument out of range 2: Calculation error 3: No convergence
STS FIOOR CALCERR NOCONV
Compressibility factor
- 1
Molar mass
lb/ lbmo l
0 Density
Density at observed pressure and temperature
lb/ft3 0
Range
0: In Normal Range
All components are within the range that is recommended by the standard
1: Out of Range
One or more inputs are outside the recommended range
RANGE
0
Calculations
The calculations are in accordance with the standard.
Page 40
3-40 Flow-X─ Function Reference
Flow-X General functions - fxAPI_Dens15C_1952
fxAPI_Dens15C_1952
Density (T, P) <--> Density (15°C, equilibrium pressure)
This function converts a density value at the observed temperature and pressure to the density at 15°C and the equilibrium pressure (typically 0 barg) or vice versa. The temperature conversion is according to ASTM-IP Petroleum Measurements Tables 1952 (Also known as API-1952 tables) Table 54.
Note: this function is a combination of the API 1952 Tables and API 11.2.1M. For the calculation from observed to standard conditions an iterative calculation is required. The rounding and truncating of input and intermediate values is implemented such that the example calculations as specified in both standards are exactly reproduced.
Compliance
ASTM-IP Petroleum Measurement Tables, Metric Edition, Metric Units of Measurement,
1952
API MPMS 11.2.1M - Compressibility Factors for Hydrocarbons: 638 - 1074 Kilograms per
Cubic Meter Range - First Edition, August 1984
Function inputs
Remark
EU
SW tag
Range
Default
Name
Optional tag name, tag description and tag group
Observed Density
Depending on the conversion method this is the Density either at the observed temperature and observed pressure or at 15 °C and the equilibrium pressure
kg/m3
0..1300
0
Observed temperature
°C -
100..200
15 Observed pressure
bar(g)
-1..150
0
API 11.2.1 rounding
0: Disabled
The calculation of the compressibility factor F is performed with full precision
1: Enabled
API-MPMS 11.2.1 rounding and truncating rules are applied. The compressibility factor F is rounded to 3 decimal places as specified in the standard.
-
API1121R ND
0
Equilibrium pressure
The equilibrium pressure is considered to be 0 bar(g) for liquids which have an equilibrium pressure less than atmospheric pressure (in
bar(g)
EQUIPRES
0..150
0
Page 41
Flow-X─ Function Reference
3-41
Flow-X General functions - fxAPI_Dens15C_1952
compliance with API MPMS
12.2 par. 12.2.5.4).
Conversion method
1: From observed to standard conditions 2: From standard to observed conditions
CONVERS ION
1
Function outputs
Remark
EU
SW tag
Alarm
Fallback
Status
0: Normal 1: Input argument out of range 2: Calculation error 3: No convergence
-
STS FIOOR CALCERR NOCONV
1
Output Density
Depending on the conversion method this is the Density either at 15 °C and the equilibrium pressure or at the observed temperature and observed pressure
kg/m3
DENS
0
CTL
Volume correction factor for temperature.
-
CTL 1
CPL
Volume correction factor for pressure Value will be rounded according to input 'API 11.2.1 rounding'
-
CPL 1 CTPL
Combined volume correction factor CTPL = CTL * CPL
-
CTPL 1
F
Compressibility factor
- F
0
CTL calc out of range
With respect to the standard used for the calculation of CTL the combination of input values is: 0: In Range 1: Out of Range
CTLOOR
0
CPL calc out of range
With respect to the standard used for the calculation of CPL the combination of input values is: 0: In Range 1: Out of Range
CPLOOR
0
Calculations
The calculations depend on the conversion method.
Conversion method 1: from observed to standard conditions. The function performs the following iterative algorithm to calculate the Density at standard conditions:
1. At the start of the iteration the initial value for Density at [15 C, equilibrium
pressure] is set to the Observed Density. The initial CPL value is set to 1.
2. The CTL value is determined from the Density at [15 C, equilibrium pressure]
according to API 1952 Table 54.
3. The Density at [15 C, equilibrium pressure] is calculated from the Observed
Density, the new CTL value and the CPL value from the previous iteration.
4. The compressibility factor is calculated according to API MPMS 11.2.1M from the
density at [15 C, equilibrium pressure] and the 'Observed temperature'. If API
11.2.1M rounding is enabled then the density and temperature are rounded and
Page 42
3-42 Flow-X─ Function Reference
Flow-X General functions - fxAPI_Dens15C_1952
the calculations are performed in accordance with the rounding and truncating rules of the standard.
5. The CPL value is calculated from the compressibility factor and the 'Observed
pressure' and 'Equilibrium pressure' input values.
6. The Density at [15C, equilibrium pressure] is calculated by dividing the Observed
Density by the CTL and the new CPL value.
7. Steps 2 through 6 are repeated taking the Density value from step 7 as the start
value for the next iteration until the absolute difference between two consecutive Density values is 0.0001.
Conversion method 2: from standard to observed conditions. The function performs straightforward calculations to determine the Density at observed conditions:
1. The CTL value is calculated according to API 1952 Table 54
2. The compressibility factor is calculated according to API MPMS 11.2.1M from
the input density and temperature'. If API 11.2.1M rounding is enabled then the input density and temperature are rounded and the calculations are performed in accordance with the rounding and truncating rules of the standard.
3. The CPL value is calculated from the compressibility factor and the 'Observed
pressure' and 'Equilibrium pressure' input values.
4. The output Density (at observed temperature and pressure) is calculated from
the input Density and the CTL and the CPL values.
Page 43
Flow-X─ Function Reference
3-43
Flow-X General functions - fxAPI_Dens15C_1980
fxAPI_Dens15C_1980
Description
Density (T, P) <--> Density (15°C, equilibrium pressure)
This function converts a density value at the observed temperature and pressure to the density value at 15°C and the equilibrium pressure (typically 0 bar(g)) or vice versa. The temperature conversion is according to API-2540, Tables 53A/54A (Generalized Crude Oils) and 53B/54B (Refined Oil Products) and API MPMS 11.1 Chapter XIV Table 53D/54D: 1984 (Lubricating Oils), while the volume correction for pressure according to API MPMS 11.2.1M. An iterative calculation needs to be applied to convert the observed density to the value at base conditions.
Note: this function is a combination of API2540 and API 11.2.1M. For the calculation from observed to standard conditions an iterative calculation is required. The rounding and truncating of input and intermediate values is implemented such that the example calculations as specified in both standards are exactly reproduced.
Compliance
API MPMS 11.1 Volume X (API Standard 2540) - Table 53A - Generalized Crude Oils,
Correction of Observed Density to Density at 15°C - First Edition, August 1980
API MPMS 11.1 Volume X (API Standard 2540) - Table 54A - Generalized Crude Oils,
Correction of Volume to 15°C against Density at 15°C- First Edition, August 1980
API MPMS 11.1 Volume X (API Standard 2540) - Table 53B - Generalized Products,
Correction of Observed Density to Density at 15°C - First Edition, August 1980
API MPMS 11.1 Volume X (API Standard 2540) - Table 54B - Generalized Products,
Correction of Volume to 15°C against Density at 15°F - First Edition, August 1980
API MPMS 11.1 Volume XIV - Table 53D - Generalized Lubricating Oils, Correction of
Observed Density to Density at 15°C - January 1982
API MPMS 11.1 Volume XIV - Table 54D - Generalized Lubricating Oils, Correction of Volume
to 15°C against Density at 15°F - January 1982
API MPMS 11.2.1M - Compressibility Factors for Hydrocarbons: 638 - 1074 Kilograms per
Cubic Meter Range - First Edition, August 1984
Page 44
3-44 Flow-X─ Function Reference
Flow-X General functions - fxAPI_Dens15C_1980
Function inputs
Remark
EU
SW tag
Range
Default
Name
Optional tag name, tag description and tag group
Input density
Meaning depends on the input 'Conversion method'. 'Conversion method' = 1
Density at the observed temperature and pressure
'Conversion method' = 2
Density at 15 °C and the equilibrium pressure.
kg/m3
0..1300
0
Observed temperature
°C -100..200
15
Observed pressure
bar(g)
-1..150
0
Product
1: A - Crude Oil 2: B - Auto select
Selection based on density at 15 °C
3: B - Gasoline 4: B - Transition Area 5: B - Jet Fuels 6: B - Fuel Oil 7: D - Lubricating Oil
PRDTYP
1
API 2540 rounding
0: Disabled
The calculations are performed with full precision and the final CTL value is rounded as specified by input 'CTL decimal places'
1: Enabled for computational value
API-2540 rounding and truncating rules are applied and, in case of conversion method 2 (standard to observed), the computational value for CTL as specified in Table 54 is used, meaning that the CTL value has: 4 decimal places if CTL >=1 5 decimal places if CTL <
1.
2: Enabled for table value
API-2540 rounding and truncating rules are applied and, in case of conversion method 2 (standard to observed), the table value for CTL as specified in Table 54 meaning that the CTL value has 4 decimal places
API2540RND
-
0
Page 45
Flow-X─ Function Reference
3-45
Flow-X General functions - fxAPI_Dens15C_1980
in all cases
3: Enabled with 5 decimal places
API-2540 rounding and truncating rules are applied, and, in case of conversion method 2 (standard to observed), the CTL value has 5 decimal places in all cases.
Note: although not strictly in accordance with the standard, this option is more commonly used than option 'Enabled for computational value'
Note: for conversion type 1
‘From observed to standard conditions’ the CTL factor is
rounded to 6 decimal places
when input ‘API 2540 rounding’
> 0, as in accordance with table
53.
Hydrometer correction
Only applies for conversion method
‘1: From observed to standard conditions’
0: Disabled 1: Enabled
-
HYDROCOR
0
API 11.2.1M rounding
0: Disabled
The calculation of the compressibility factor F is performed with full precision.
1: Enabled
API-MPMS 11.2.1M rounding and truncating rules are applied. The compressibility factor F is rounded to 3 decimal places as specified in the standard.
-
API1121RND
0
Equilibrium pressure
The equilibrium pressure is considered to be 0 bar(g) for liquids which have an equilibrium pressure less than atmospheric pressure (in compliance with API MPMS 12.2 par. 12.2.5.4)
bar(g)
EQUIPRES
0..150
0
Conversion method
1: From observed to standard conditions 2: From standard to observed conditions
CONVERSIO N
1
Page 46
3-46 Flow-X─ Function Reference
Flow-X General functions - fxAPI_Dens15C_1980
Function outputs
Remark
EU
SW tag
Alarm
Fallback
Status
0: Normal 1: Input argument out of range 2: Calculation error 3: No convergence
-
STS FIOOR CALCERR NOCONV
1
Output density
Meaning depends on the input 'Conversion method'. 'Conversion method' = 1
Density at 15 °C and the equilibrium pressure.
'Conversion method' = 2
Density at the observed temperature and pressure
kg/m3
DENS
0
CTL
Volume correction factor for temperature. Value will be rounded according to input 'API2540 rounding''
-
CTL 1
CPL
Volume correction factor for pressure Value will be rounded according to input 'API 11.2.1M rounding''
-
CPL 1 CTPL
Combined volume correction factor CTPL = CTL * CPL
-
CTPL 1 K0
Actual value of constant K0 used for CTL calculation
-
K0 0
K1
Actual value of constant K1 used for CTL calculation
-
K1 0
K2
Actual value of constant K2 used for CTL calculation
-
K2 0 Alpha
Thermal expansion factor
1/°C
ALPHA
0 F
Compressibility factor
- F
0
Product
When input 'Product' is 'B - Auto select', then the output is set to the actual selected product of tables 53B/54B (enumerative value as defined for input 'Product'), else the output is set equal to input 'Product'.
-
PRDCUR
0 CTL calc out of range
With respect to the standard used for the calculation of CTL the combination of input values is: 0: In Range 1: Out of Range
CTLOOR
0
CPL calc out of range
With respect to the standard used for the calculation of CPL the combination of input values is: 0: In Range 1: Out of Range
CPLOOR
0
Calculations
The calculations depend on the conversion method.
Conversion method 1: from observed to standard conditions. The function performs the following iterative algorithm to calculate the density at reference conditions:
Page 47
Flow-X─ Function Reference
3-47
Flow-X General functions - fxAPI_Dens15C_1980
1. First the inputs are rounded in accordance with the API2540 standard, provided
that API2540 rounding is enabled.
2. The hydrometer correction on the input density is applied, provided that this
correction is enabled
3. At the start of the iteration the density at [15 C, equilibrium pressure] is set
equal to the observed density and the initial CPL value is set to 1.
4. When the type of product is set to ‘B – Auto select’ (automatic selection of the
refined product range) the K0, K1 and K2 factors are determined based on the density at [15 C, equilibrium pressure]. The Transition area is only taken in consideration in the 2nd iteration loop, as specified in the standard.
5. The Alpha factor is calculated according from the density at [15 C, equilibrium
pressure] and the K0, K1 and K2 factor. If API2540 rounding is enabled, then the intermediate results are rounded or truncated as specified API-2540 Table 53.
6. The CTL value is calculated according to API-2540 Table 53 from the Alpha factor
and the differential temperature (= observed temperature – 15°C). If API2540 rounding is enabled, then the intermediate results are rounded or truncated as specified API-2540 Table 53.
7. Depending on the type of API2540 rounding the calculated CTL value is rounded
to 6 decimal places or not rounded at all.
8. The density at [15 C, equilibrium pressure] is calculated by dividing the observed
density by the new CTL value and the CPL value from the previous iteration.
9. The compressibility factor is calculated according to API MPMS 11.2.1M from the
density at [15 C, equilibrium pressure] and the 'Observed temperature'. If API
11.2.1M rounding is enabled then the density and temperature are rounded and the calculations are performed in accordance with the rounding and truncating rules of the standard.
10. The CPL value is calculated from the compressibility factor and the 'Observed
pressure' and 'Equilibrium pressure' input values.
11. The density at [15C, equilibrium pressure] is calculated by dividing the observed
density by CTL and the new CPL value.
12. If API2540 rounding is enabled then the density at [15C, equilibrium pressure]
value is rounded to 3 decimal places as specified in the standard.
13. Steps 4 through 12 are repeated taking the density value from step 12 as the
starting value until the absolute difference between two consecutive density values is either 0.05 (or 0.07 for the transition area) or 0.000001, depending of API2540 rounding being enabled or not.
14. For refined products the entire iteration loop is repeated if the density at [15C,
equilibrium pressure] appears to be in a different product region than the observed input density. This is required because a different product region means different K0, K1 and K2 factors.
15. When API2540 rounding is enabled, the final density at [15C, equilibrium
pressure] is rounded to 1 decimal place.
Conversion method 2: from standard to observed conditions. The function performs straightforward calculations to determine the density at observed conditions:
1. First the inputs are rounded in accordance with the API2540 standard, provided
that API2540 rounding is enabled.
2. When the type of product is set to ‘B – Auto select’ (automatic selection of the
refined product range) the K0, K1 and K2 factors are determined based on the input density
3. The Alpha factor is calculated according from the input density and the K0, K1
and K2 factor. If API2540 rounding is enabled, then the intermediate results are rounded or truncated as specified API-2540 Table 54.
Page 48
3-48 Flow-X─ Function Reference
Flow-X General functions - fxAPI_Dens15C_1980
4. The CTL value is calculated according to API-2540 Table 54 from the Alpha factor
and the differential temperature (= observed temperature – 15°C If API2540 rounding is enabled, then the intermediate results are rounded or truncated as specified API-2540 Table 54.
5. Depending on the type of API2540 rounding the calculated CTL value is rounded
to 4 or 5 decimal places or not rounded at all.
6. The compressibility factor is calculated according to API MPMS 11.2.1M from the
input density and temperature'. If API 11.2.1M rounding is enabled then the input density and temperature are rounded and the calculations are performed in accordance with the rounding and truncating rules of the standard.
7. The CPL value is calculated from the compressibility factor and the 'Observed
pressure' and 'Equilibrium pressure' input values.
8. The density at [15C, equilibrium pressure] is calculated by multiplying the input
density by the CTL and the CPL values.
Page 49
Flow-X─ Function Reference
4-49
Flow-X General functions - fx2CellSelection
Chapter 4 - 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
Page 50
4-50 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.
Page 51
Flow-X─ Function Reference
4-51
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
Page 52
4-52 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 53
Flow-X─ Function Reference
4-53
Flow-X General functions - fx3CellSelection
When cell C 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 B when cell B is healthy and ‘Auto switchback’ is enabled Select cell A when cell C and cell B fail and cell A is healthy
Range type = ‘Hi Hi Hi’
When cell A is currently selected
Select cell B when cell A value fails and 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 is healthy and ‘Auto switchback’ is enabled Select cell A when cell B fails and cell A is healthy Select cell C when cell B and A fail and cell C is healthy
When cell C is currently selected
Select cell A when cell A is healthy and ‘Auto switchback’ is enabled Select cell B when cell B is healthy and cell A fails and ‘Auto switchback’ is enabled Select cell A when cell C fails and cell A is healthy Select cell B when cell C and A fail and cell B is healthy
Page 54
4-54 Flow-X─ Function Reference
Flow-X General functions - fxAGA10_M
fxAGA10_M
The function calculates the speed of sound of a gas at the specified conditions of temperature and pressure using the formulae presented in the American Gas Association Report No 10.
Compliance
AGA Report No. 10 - Speed of Sound in Natural Gas and Other Related Hydrocarbon Gases, January 2003
Boundaries
The AGA-10 calculation has defined uncertainty bounds for gas mixtures that lie within the 'Normal range'. Also an 'Expanded range' of gas mixtures is defined for which the AGA-10 calculation has a higher uncertainty. Using the AGA-10 calculation for gas mixtures that lie outside the 'Expanded range' is not recommended. The AGA-10 standard specifies the same limits as the AGA-8 standard. Refer to the fxAGA8 function for
details on the actual limit values used by this function to set output ‘Range’.
Function inputs and outputs
Function inputs
Remark
EU
SW tag
Range
Default
Name
Optional tag name, tag description and tag group
Pressure
Observed pressure
bar(a)
0..2000
Temperature
Observed temperature
°C -
200..+400
Composition
Standard composition as defined in section 'Standard gas composition.
mol/mol
COMP
0..1
neo-Pentane mode
Determines what to do when component neo­Pentane is larger than zero 1: Add to i-Pentane 2: Add to n-Pentane 3: Neglect
-
NEOC5_MODE
1
Function outputs
Remark
EU
SW tag
Alam
Fallback
Status
0: Normal 1: Input argument out of range 2: Calculation error 3: No convergence 4: Mole fractions do not add up to
1.0 +- 0.0001
STS FIOOR CALCERR NOCONV COMPOOR
Speed of sound
m/s
SOS 0
Range
0: In Normal Range
All inputs are within the 'Normal Range'
1: In Extended Range
One or more inputs within the 'Extended Range, but none of the inputs outside the Extended rang (outputs
RANGE
OOR
0
Page 55
Flow-X─ Function Reference
4-55
Flow-X General functions - fxAGA10_M
values have higher uncertainty)
2: Out of Range
One or more inputs outside the 'Extended Range' (using the AGA10 calculation is not recommended in this case)
Calculations
Calculations are as documented in the standard.
Page 56
4-56 Flow-X─ Function Reference
Flow-X General functions - fxAGA10ex_M
fxAGA10ex_M
The extended AGA 10 function provides an extensive set of gas properties at the specified conditions of temperature and pressure using the formulae presented in the American Gas Association Report No 10.
Compliance
AGA Report No. 10 - Speed of Sound in Natural Gas and Other Related Hydrocarbon Gases, January 2003
Boundaries
The AGA-10 calculation has defined uncertainty bounds for gas mixtures that lie within the 'Normal range'. Also an 'Expanded range' of gas mixtures is defined for which the AGA-10 calculation has a higher uncertainty. Using the AGA-10 calculation for gas mixtures that lie outside the 'Expanded range' is not recommended. The AGA-10 standard specifies the same limits as the AGA-8 standard. Refer to the fxAGA8 function for
details on the actual limit values used by this function to set output ‘Range’.
Function inputs and outputs
Function inputs
Remark
EU
SW tag
Range
Default
Name
Optional tag name, tag description and tag group
Pressure
Observed pressure
bar(a)
0..2000
Temperature
Observed temperature
°C -
200..+400
Composition
Standard composition as defined in section 'Standard gas composition.
mol/mol
COMP
0..1
neo-Pentane mode
Determines what to do when component neo­Pentane is larger than zero 1: Add to i-Pentane 2: Add to n-Pentane 3: Neglect
-
NEOC5_MODE
1
Function outputs
Remark
EU
SW tag
Alam
Fall back
Status
0: Normal 1: Input argument out of range 2: Calculation error 3: No convergence 4: Mole fractions do not add up to 1.0 +-
0.0001
STS FIOOR CALCERR NOCONV COMPOOR
Molecular weight
kg/kmol
MOLMASS
Molar density at base conditions
mol/m3
MOLDENSB
Molar density at flowing conditions
mol/m3
MOLDENSF
Mass density at base conditions
kg/m3
MASSDENSB
Mass density at flowing conditions
kg/m3
MASSDENSF
Page 57
Flow-X─ Function Reference
4-57
Flow-X General functions - fxAGA10ex_M
Ideal gas relative density
- IRD
Real gas relative density
- RRD Velocity of sound
m/s
SOS
Compressibility at base conditions
- ZB
Compressibility at flowing conditions
- ZF Supercompressibility
- FPV
Ideal gas specific enthalpy
kJ/kg
MASSH0
Real gas specific enthalpy
kJ/kg
MASSH
Real gas specific entropy
kJ/kg/K
MASSS
Ideal gas isobaric heat capacity
kJ/kg/K
MASSCP0
Real gas isobaric heat capacity
kJ/kg/K
MASSCP
Real gas isochoric heat capacity
kJ/kg/K
MASSCV
Ideal gas isobaric heat capacity
kJ/kmol/K
MOLCP0
Real gas isobaric heat capacity
kJ/kmol/K
MOLCP
Real gas isochoric heat capacity
kJ/kmol/K
MOLCV Ratio of specific heats
- CPCV
Isentropic exponent
- KAPPA
Critical flow factor
- CRITC
Ideal gas specific enthalpy
kJ/kmol
MOLH0
Real gas specific enthalpy
kJ/kmol
MOLH
Isentropic perfect gas critical flow factor
- CI
Isentropic real gas critical flow factor
- CRI
Range
0: In Normal Range
All inputs are within the 'Normal Range'
1: In Extended Range
One or more inputs within the 'Extended Range, but none of the inputs outside the Extended rang (outputs values have higher uncertainty)
2: Out of Range
One or more inputs outside the 'Extended Range' (using the AGA10
RANGE
OOR
0
Page 58
4-58 Flow-X─ Function Reference
Flow-X General functions - fxAGA10ex_M
calculation is not recommended in this case)
Calculations
Calculations are as documented in the standard.
Page 59
Flow-X─ Function Reference
4-59
Flow-X General functions - fxAGA3_C
fxAGA3_C
Description
The function calculates the mass flow rate for Orifice pressure differential flow devices according to the AGA-3 standard for orifice meters with flange taps.
Compliance
AGA Report No. 3 - Orifice Metering Measurement of fluid flow by means of pressure
differential devices, 1992
API Manual of Petroleum Measurement Standards, Chapter 14 Natural Gas Fluids
Measurement, Section 3 - Concentric Square-edged Orifice Meters 1992.
Function
Function inputs
Remark
EU
SW tag
Range
Default
Name
Optional tag name, tag description and tag group
Differential Pressure
Differential pressure over the primary flow device measured at the up- and downstream pressure tappings, which need to be in the positions as specified in the standard
inH2O @ 60°F
0..1000
0
Pressure
Down- or upstream pressure value of the fluid at metering conditions
psia 0..30000
0
Temperature
Down- or upstream temperature of the fluid at metering conditions
°F -
400..200 0
0 Density
Down or upstream density of the fluid at metering conditions
lbm/ft3
0..200
0
Dynamic Viscosity
Dynamic viscosity of the fluid
lbm/ft.s
DYNVI S
0..10
6.9e-6
Isentropic Exponent
Also referred to as (kappa). For an ideal gas this coefficient is equal to the ratio of the specific heat capacity at constant pressure to the specific heat at constant volume. This ratio is commonly used when the real value is unknown.
-
KAPPA
0..10
1.3
Pipe Diameter
Internal diameter of the pipe at reference temperature
inches
PIPEDI AM
0..100
0
Pipe Expansion factor
The thermal expansion coefficient of the pipe material
1/°F
PIPEE XPF
0..1
6.2e-6
Pipe Reference temperature
The reference temperature that corresponds to the 'Pipe diameter' input value
°F
PIPER EFT -400..200 0
68 Orifice Diameter
Orifice diameter at reference temperature
inches
ORIFD IAM
0..100
0
Orifice Expansion factor
The thermal expansion coefficient of the orifice material Typical values are:
1/°F
ORIFE XPF
0..1
9.25e-6
Orifice Reference Temperature
The reference temperature that corresponds to the 'Orifice diameter' input value
°F
ORIFR EFT -400..200 0
68
Page 60
4-60 Flow-X─ Function Reference
Flow-X General functions - fxAGA3_C
Pressure Location
1: Upstream tapping
Input 'Pressure' represents the pressure at the upstream pressure tapping (p1). Since the absolute pressure is usually measured at the upstream tapping this is the most common setting.
2: Downstream tapping
Input 'Pressure' represents the pressure at the downstream tapping (p2).
-
PRESL OC
1
Temperature Location
1: Upstream tapping
Input 'Temperature' represents the upstream temperature (t1).
2: Downstream tapping
Input 'Temperature represents the temperature at the downstream tapping (t2).
3: Recovered pressure
Input 'Temperature' represents the downstream temperature at a location Where the pressure has fully recovered (t3). Since temperature measurement is usually downstream of the flow device this is the most common setting.
-
TEMP LOC
3
Temperature Correction
1: Use (1-)/
Isentropic expansion using (1­)/ as the temperature referral exponent
2: Use temperature exponent
Isentropic expansion using input 'Temperature Exponent' as the temperature referral exponent [-]
-
TEMP COR
1 Temperature Exponent
To correct the temperature from down- to upstream conditions (or vice versa) the formula (-1)/ (isentropic expansion) will be used when the input value is set to 0, else the input value will be used. For more details refer to section 'Temperature correction'.
TEMP EXP
0
Page 61
Flow-X─ Function Reference
4-61
Flow-X General functions - fxAGA3_C
Density Location
This parameter specifies if and how the density should be corrected from downstream to upstream conditions. 1: Upstream tapping
Input 'Density' represents the density at the upstream pressure tapping (1).
2: Downstream tapping
Input 'Density' represents the density at the downstream tapping (2).
3: Recovered pressure
Input 'Density' represents the density downstream at a location Where the pressure has fully recovered (3).
-
DENSL OC
0
Density Exponent.
This factor is used when density correction is enabled. The formula 1/ will be used when the input value is set to 0, else the input value will be used. For more details refer to section function 'ISO5167- Orifice' 'Density correction'.
-
DENSE XP
0 Fluid
The type of fluid being measured 1: Gas 2: Liquid For liquid the expansion factor is set to 1, i.e. the fluid is considered to be incompressible.
-
FLUID
0
Drain hole
When input is > 0 then an additional correction on the orifice diameter will be applied to account for the drain hole, as explained further on.
in
DRAIN
0.. 100
0
Fpwl
Local Gravitational Correction Factor for Deadweight Calibrators used to calibrate differential and static pressure Instruments.
Directly applied on the calculated mass flow rate within each iteration.
-
FPWL
0.9..1.1
1
Function outputs
Remark
EU
SW tag
Alarm
Fallback
Status
0: Normal 1: Input argument out of range 2: Calculation error 3: No convergence
STS FIOOR CALCERR NOVONV
Mass flow rate
The calculated mass flow rate
klbm/h r
MASSR
0 Beta ratio
Orifice to pipe diameter ratio at upstream temperature
-
BETA
0 Orifice
At the upstream
inches
ORIFUP
0
Page 62
4-62 Flow-X─ Function Reference
Flow-X General functions - fxAGA3_C
diameter
temperature
Pipe diameter
At the upstream temperature
inches
PIPEUP
0 Upstream pressure
Pressure at upstream tapping (p1)
psia
PRESUP
0
Pressure at downstream tapping
Pressure at downstream tapping (p2)
psia
PRESDN
0
Recovered downstream pressure
Fully recovered downstream pressure (p3)
psia
PRESREC
0 Upstream temperature
Temperature at upstream tapping (t1)
°F
TEMPUP
0
Temperature at downstream tapping
Temperature at downstream tapping (t2)
°F
TEMPDN
0
Downstream Temperature
'Fully recovered' downstream temperature (t3)
°F
TEMPREC
0 Upstream density
Density at upstream tapping (1)
lbm/ft 3
DENSUP
0
Density at downstream tapping
Pressure at downstream tapping (2)
lbm/ft 3
DENSDN
0 Downstream density
'Fully recovered' downstream density (3)
lbm/ft 3
DENSREV
0
Reynolds number
The pipe Reynolds number, i.e. the Reynolds number upstream of the orifice and not the one within the device throat itself)
-
REYN
0
Discharge coefficient
- DISCF
0 Expansion Factor
- EXPFAC
0
Velocity of Approach
- VOA 0
Pressure out of range
0: Pressure is in valid range 1: Pressure is out of valid range
-
PRESOOR
PRESOOR
0
Reynolds out of range
0: Reynolds number is in valid range 1: Reynolds number is out of valid range
-
REYNOOR
REYNOOR
0
Diameter out of range
0: Device and pipe diameter and Beta ratio in valid range 1: Device diameter, pipe diameter and/or Beta ratio out of valid range
-
DIAMOOR
DIAMOO R
0
Calculations
The calculations are in accordance with the standard.
Page 63
Flow-X─ Function Reference
4-63
Flow-X General functions - fxAGA3_C
Pressure correction
The relation between the pressure at the upstream tapping p
1
and the pressure at the
downstream tapping (p2) is as following:
1000
12
units
Kppp
The relation between the pressure at the upstream tapping and the downstream tapping is
as following:
LOSS
ppp
13
 
unitsLOSS
Kpp
2
2
1
1
4
1
1
E
EC
Where:
p1
Pressure at upstream tapping
psia
p2
Pressure at downstream tapping
psia
p3
Fully recovered downstream pressure
psia
p
Differential pressure
inH20 @ 60°F
p
LOSS
Pressure loss over the meter
psi
C
Discharge coefficient as calculated by the standard
-
α
Flow coefficient
-
β
Diameter ratio at the upstream pressure and temperature
-
E
Velocity of approach factor
-
K
units
Unit conversion factor to convert a value expressed in 'inH2O @60°F' to the corresponding expressed in 'psi' (conversion as specified in section 'Unit Types')
-
Temperature correction
When input 'Temperature correction' is set to 1, then an isentropic expansion based on the
isentropic coefficient is applied:
67.45967.459
1
1
2
21
 
 
p
p
tt
Page 64
4-64 Flow-X─ Function Reference
Flow-X General functions - fxAGA3_C
67.45967.459
1
1
3
31
 
 
p
p
tt
When input 'Temperature correction' is set to 2, then an isentropic expansion based on
input 'Temperature exponent' is applied:
67.45967.459
1
2
21
 
 
TE
K
p
p
tt
67.45967.459
1
3
31
 
 
TE
K
p
p
tt
Where:
t1
Upstream temperature
°F
t2
Temperature at the downstream tapping
°F
t3
Temperature at the fully recovered downstream pressure
°F
p1
Upstream pressure
psia
p2
Pressure at the downstream tapping
psia
p3
Fully recovered downstream pressure
psia  Isentropic exponent
-
KTE
Temperature exponent
-
Density correction
When input 'Density exponent' = 0, then the following isentropic corrections are applied
(depending on the type of Density Correction)
1
2
1
21
 
 
p
p
1
3
1
31
 
 
p
p
Else the value of input 'Density Exponent' is used
DE
K
p
p
 
 
2
1
21
DE
K
p
p
 
 
3
1
31
Where:
1
Upstream density
lbm/ft3
2
Density at the downstream tapping
lbm/ft3
3
Density at the fully recovered downstream pressure
lbm/ft3
p1
Upstream pressure
psia
p2
Pressure at the downstream tapping
psia
p3
Fully recovered downstream pressure
psia
Isentropic exponent
-
KDE
Density exponent
-
Page 65
Flow-X─ Function Reference
4-65
Flow-X General functions - fxAGA5_C
fxAGA5_C
The AGA 5 standard defines methods to calculate the mass and volume based calorific values at 60°F and 14.73 psia for a natural gas based on known molar fractions of the non-hydrocarbon gas components.
Compliance
A.G.A. Transmission Measurement Committee Report No. 5 (Fuel gas Energy Metering) 1981 A.G.A. Transmission Measurement Committee Report No. 5 (Fuel gas Energy Metering) 1996
(Reprinted 1999)
Function inputs
Remark
EU
SW tag
Range
Default
Name
Optional tag name, tag description and tag group
Composition
Standard composition as defined in section 'Standard gas composition. Only the following components are considered by the calculation: N2 Nitrogen CO2 Carbon dioxide H2O Water H2S Hydrogen sulfide H2 Hydrogen CO Carbon monoxide O2 Oxygen He Helium
Sum of these fractions may not exceed 1
molar fraction
COMP
0..1
0
Specific Gravity
Molar Mass Ratio, i.e. ratio of the molar mass of the gas and of the molar mass of air (specified in AGA-5 as 28.9644 kg/kmol (lbm/lbmol))
-
SG
0..1
0
Function outputs
Remark
EU
SW tag
Alarm
Fallback
Status
0: Normal 1: Input argument out of range 2: Calculation error
STS FIOOR CALCERR
Calorific value mass
Mass based calorific value
Btu/lbm
CV_MASS
0
Calorific value volume
Volume calorific value at 60°F and 14.73 psia
Btu/scf
CV_VOL
0
Calculations
The Energy to Mass ratio is calculated according to Section III of the standard, which contains the calculation procedure for the gas mass to energy conversion. The equations based on the 'by volume' fractional values are used (and not the equations based on the 'by weight' values). The Energy to Volume ratio is calculated according to Section II of the standard, which contains the calculation procedure for the gas volume to energy conversion.
Page 66
4-66 Flow-X─ Function Reference
Flow-X General functions - fxAGA8_C
fxAGA8_C
The compressibility and density of a gas are calculated from the composition, temperature and pressure in accordance with the ‘Detail Characterization’ method outlined in the AGA-8 standard, with the input and output values in US Customary units.
Compliance
AGA Report No. 8, Second edition November 1992 - 2nd printing July 1994 API MPMS 14.2, Second edition November 1992 - 2nd printing July 1994 ISO 12213 Natural gas Calculation of compression factor Part 2: Calculation using
molar-composition analysis, 1997
Boundaries
The AGA-8 calculation has defined uncertainty bounds for gas mixtures that lie within the 'Normal range'. Also an 'Expanded range' of gas mixtures is defined for which the AGA-8 calculation has a higher uncertainty. Using the AGA-8 calculation for gas mixtures that lie outside the 'Expanded range' is not recommended.
Input value
Normal Range
Expanded Range
EU
Pressure
0 .. 20000
0 .. 20000
psia
Temperature
-200 .. +400
-200 .. +400
°F
Mole fraction of Methane
0.45 .. 1.00
0.00 .. 1.00
-
Mole fraction of Ethane
0.00 .. 0.10
0.00 .. 1.00
-
Mole fraction of Propane
0.00 .. 0.04
0.00 .. 0.12
-
Mole fraction of Butanes
0.00 .. 0.01
0.00 .. 0.06
-
Mole fraction of Pentanes
0.00 .. 0.003
0.00 .. 0.04
-
Mole fraction of Hexanes Plus
0.00 .. 0.002
*
-
Mole fraction of Carbon monoxide
0.00 .. 0.03
0.00 .. 0.03
-
Mole fraction of Carbon dioxide
0.00 .. 0.30
0.00 .. 1.00
-
Mole fraction of Nitrogen
0.00 .. 0.50
0.00 .. 1.00
-
Mole fraction of Helium
0.00 .. 0.002
0.00 .. 0.03
-
Mole fraction of Argon
0.00 .. 0.00
0.00 .. 0.01
-
Mole fraction of Oxygen
0.00 .. 0.00
0.00 .. 0.21
-
Mole fraction of Hydrogen Sulphide
0.00 .. 0.0002
0.00 .. 1.00
-
Mole fraction of Hydrogen
0.00 .. 0.10
0.00 .. 1.00
-
Mole fraction of Water
0.00 .. 0.0005
*
-
* For these components the dew point temperature is the upper limit. Limit check is ignored for reason of simplicity.
Page 67
Flow-X─ Function Reference
4-67
Flow-X General functions - fxAGA8_C
Function inputs and outputs
Function inputs
Remark
EU
SW tag
Range
Default
Name
Optional tag name, tag description and tag group
Pressure
Pressure value
psia 0..40000
1.01325
Temperature
Temperature value
°F -250..+800
0
Composition
Standard composition as defined in section 'Standard gas composition.
mol/mol
COMP
0..1
0
neo-Pentane mode
Determines what to do when component neo-Pentane is larger than zero 1: Add to i-Pentane 2: Add to n-Pentane 3: Neglect
-
NEOC5_M ODE
1
Function outputs
Remark
EU
SW tag
Alarm
Fallback
Status
0: Normal 1: Input argument out of range 2: Calculation error 3: No convergence 4: Mole fractions do not add up to 1.0 +- 0.0001
STS FIOOR CALCERR NOCONV COMPERR
Compressibility factor
- Z 1 Mass Density
lb/ft3
MASDENS
0
Mole Density
lbmol/ ft3
MOLDENS
0 Molar Mass
lb/lbm ol
MOLMASS
0
Range
0: In Normal Range
All inputs are within the 'Normal Range'
1: In Extended Range
One or more inputs within the 'Extended Range, but none of the inputs outside the Extended rang (outputs values have higher uncertainty)
2: Out of Range
One or more inputs outside the 'Extended Range' (using the AGA8 calculation is not recommended in this case)
RANGE
OOR
0
Calculations
The calculations are as documented in the standard.
Page 68
4-68 Flow-X─ Function Reference
Flow-X General functions - fxAGA8_M
fxAGA8_M
The compressibility and density of a gas are calculated from its composition, temperature and pressure in accordance with the ‘Detail Characterization’ method outlined in the AGA8 standard, with the input and output values in metric units.
Compliance
AGA Report No. 8, Second edition November 1992 - 2nd printing July 1994 API MPMS 14.2, Second edition November 1992 - 2nd printing July 1994 ISO 12213 Natural gas Calculation of compression factor Part 2: Calculation using
molar-composition analysis, 1997
Boundaries
The AGA-8 calculation has defined uncertainty bounds for gas mixtures that lie within the 'Normal range'. Also an 'Expanded range' of gas mixtures is defined for which the AGA-8 calculation has a higher uncertainty. Using the AGA-8 calculation for gas mixtures that lie outside the 'Expanded range' is not recommended.
Input value
Normal Range
Expanded Range
EU
Pressure
0 .. 1379
0 .. 1379
bar(a)
Temperature
-129 .. +204
-129 .. +204
°C
Mole fraction of Methane
0.45 .. 1.00
0.00 .. 1.00
-
Mole fraction of Ethane
0.00 .. 0.10
0.00 .. 1.00
-
Mole fraction of Propane
0.00 .. 0.04
0.00 .. 0.12
-
Mole fraction of Butanes
0.00 .. 0.01
0.00 .. 0.06
-
Mole fraction of Pentanes
0.00 .. 0.003
0.00 .. 0.04
-
Mole fraction of Hexanes Plus
0.00 .. 0.002
*
-
Mole fraction of Carbon monoxide
0.00 .. 0.03
0.00 .. 0.03
-
Mole fraction of Carbon dioxide
0.00 .. 0.30
0.00 .. 1.00
-
Mole fraction of Nitrogen
0.00 .. 0.50
0.00 .. 1.00
-
Mole fraction of Helium
0.00 .. 0.002
0.00 .. 0.03
-
Mole fraction of Argon
0.00 .. 0.00
0.00 .. 0.01
-
Mole fraction of Oxygen
0.00 .. 0.00
0.00 .. 0.21
-
Mole fraction of Hydrogen Sulphide
0.00 .. 0.0002
0.00 .. 1.00
-
Mole fraction of Hydrogen
0.00 .. 0.10
0.00 .. 1.00
-
Mole fraction of Water
0.00 .. 0.0005
*
-
* For these components the dew point temperature is the upper limit. Limit check is ignored for reason of simplicity.
Page 69
Flow-X─ Function Reference
4-69
Flow-X General functions - fxAGA8_M
Function inputs and outputs
Function inputs
Remark
EU
SW tag
Range
Default
Name
Optional tag name, tag description and tag group
Pressure
Pressure value
bar(a)
0..2800
1.01325
Temperature
Temperature value
°C -150..+450
0
Composition
Standard composition as defined in section 'Standard gas composition.
mol/mol
COMP
0..1
0
neo-Pentane mode
Determines what to do when component neo­Pentane is larger than zero 1: Add to i-Pentane 2: Add to n-Pentane 3: Neglect
-
NEOC5_MODE
1
Function outputs
Remark
EU
SW tag
Alarm
Fallback
Status
0: Normal 1: Input argument out of range 2: Calculation error 3: No convergence 4: Mole fractions do not add up to 1.0 +- 0.0001
STS FIOOR CALCERR NOCONV COMPERR Compressibility factor
- Z 1 Mass Density
kg/m3
MASDENS
0
Mole Density
kmol/m3
MOLDENS
0
Molar Mass
kg/kmol
MOLMASS
0
Range
0: In Normal Range
All inputs are within the 'Normal Range'
1: In Extended Range
One or more inputs within the 'Extended Range, but none of the inputs outside the Extended rang (outputs values have higher uncertainty)
2: Out of Range
One or more inputs outside the 'Extended Range' (using the AGA8 calculation is not recommended in this case
RANGE
OOR
0
Calculations
The calculations are as documented in the standard.
Page 70
4-70 Flow-X─ Function Reference
Flow-X General functions - fxAGA8_Gross
fxAGA8_Gross
Description
This function calculates the compressibility factor in accordance with the AGA-8 Gross Characterization Method. Although the AGA-8 Gross Method is based on the Standard GERG Virial Equation Of State (SGERG) there are slight differences in the results.
Two different methods are specified by the standard. Method 1 takes the Pressure, Temperature, Specific Gravity (Relative Density), Carbon Dioxide content and Gross Heating Value (GHV) as inputs. Method 2 takes the same inputs except for the Nitrogen content instead of GHV.
Compliance
AGA 8, Second edition November 1992 - 2nd printing July 1994
AGA Report No. 8, Second edition November 1992 - 2nd printing July 1994 API MPMS 14.2, Second edition November 1992 - 2nd printing July 1994
Boundaries
The AGA8 standard recommends using the Gross Characterization Method only when input conditions lie within the following range. For conditions outside this range the standard recommends to use the Detailed Characterization Method.
Input value
Normal Range
EU
Temperature
32..130
°F
Pressure
0 .. 1200
psia
Gross heating value
475 .. 1210
Btu/ft3
Relative density
0.554 .. 0.87
-
Carbon dioxide
0.00 .. 0.30
mol/mol
Nitrogen
0.00 .. 0.50
mol/mol
Function inputs and outputs
Function inputs
Remark
EU
Range
Default
Name
Optional tag name, tag description and tag group
Temperature
Observed temperature
°F
-250..+800
60
Pressure
Observed pressure
psia
0..40000
Relative density
Relative density at the corresponding reference temperature and pressure
-
0..2
0
RD reference temperature
Reference temperature for relative density
°F
-250 ..+800
60
RD reference pressure
Reference pressure for relative density
psia
0..40000
14.73
Gross heating value
Gross heating value at the corresponding reference temperature and pressure
Btu/ft3
0..2500
0
GHV reference temperature
Reference temperature for gross heating value
°F
-250 ..+800
60
GHV reference pressure
Reference pressure for gross heating value
psia
0..40000
14.73 Nitrogen
Nitrogen (N2) fraction
mol/mol
0..1
0
Carbon dioxide
Carbon dioxide (CO2) fraction
mol/mol
0..1
0
Method
Gross Characterization Method: 1: GHV, Relative Density, CO2 2: Relative Density, CO2, N2
- 0
Page 71
Flow-X─ Function Reference
4-71
Flow-X General functions - fxAGA8_Gross
Note: For Method 1 input ‘Nitrogen’ is not used, while for Method 2 inputs ‘Gross heating value’, ‘GHV reference temperature’ and ‘GHV reference pressure’ are not used.
Function outputs
Remark
EU
SW tag
Alarm
Fallbac k
Status
0: Normal 1: Input argument out of range 2: Calculation error 3: No convergence
STS FIOOR CALCERR NOCONV
Compressibility factor
- 1
Molar mass
lb/ lbmo l
0 Density
Density at observed pressure and temperature
lb/ft3 0
Range
0: In Normal Range
All components are within the range that is recommended by the standard
1: Out of Range
One or more inputs are outside the recommended range
RANG E
0
Calculations
The calculations are in accordance with the standard.
Page 72
4-72 Flow-X─ Function Reference
Flow-X General functions - fxAPI_Dens15C_1952
fxAPI_Dens15C_1952
Density (T, P) <--> Density (15°C, equilibrium pressure)
This function converts a density value at the observed temperature and pressure to the density at 15°C and the equilibrium pressure (typically 0 barg) or vice versa. The temperature conversion is according to ASTM-IP Petroleum Measurements Tables 1952 (Also known as API-1952 tables) Table 54.
Note: this function is a combination of the API 1952 Tables and API 11.2.1M. For the calculation from observed to standard conditions an iterative calculation is required. The rounding and truncating of input and intermediate values is implemented such that the example calculations as specified in both standards are exactly reproduced.
Compliance
ASTM-IP Petroleum Measurement Tables, Metric Edition, Metric Units of Measurement,
1952
API MPMS 11.2.1M - Compressibility Factors for Hydrocarbons: 638 - 1074 Kilograms per
Cubic Meter Range - First Edition, August 1984
Function inputs
Remark
EU
SW tag
Range
Default
Name
Optional tag name, tag description and tag group
Observed Density
Depending on the conversion method this is the Density either at the observed temperature and observed pressure or at 15 °C and the equilibrium pressure
kg/m3
0..1300
0
Observed temperature
°C -
100..200
15 Observed pressure
bar(g)
-1..150
0
API 11.2.1 rounding
0: Disabled
The calculation of the compressibility factor F is performed with full precision
1: Enabled
API-MPMS 11.2.1 rounding and truncating rules are applied. The compressibility factor F is rounded to 3 decimal places as specified in the standard.
-
API1121R ND
0
Equilibrium pressure
The equilibrium pressure is considered to be 0 bar(g) for liquids which have an equilibrium pressure less than atmospheric pressure (in compliance with API MPMS
12.2 par. 12.2.5.4).
bar(g)
EQUIPRES
0..150
0
Page 73
Flow-X─ Function Reference
4-73
Flow-X General functions - fxAPI_Dens15C_1952
Conversion method
1: From observed to standard conditions 2: From standard to observed conditions
CONVERS ION
1
Function outputs
Remark
EU
SW tag
Alarm
Fallback
Status
0: Normal 1: Input argument out of range 2: Calculation error 3: No convergence
-
STS FIOOR CALCERR NOCONV
1
Output Density
Depending on the conversion method this is the Density either at 15 °C and the equilibrium pressure or at the observed temperature and observed pressure
kg/m3
DENS
0
CTL
Volume correction factor for temperature.
-
CTL 1
CPL
Volume correction factor for pressure Value will be rounded according to input 'API 11.2.1 rounding'
-
CPL 1 CTPL
Combined volume correction factor CTPL = CTL * CPL
-
CTPL 1
F
Compressibility factor
- F
0
CTL calc out of range
With respect to the standard used for the calculation of CTL the combination of input values is: 0: In Range 1: Out of Range
CTLOOR
0
CPL calc out of range
With respect to the standard used for the calculation of CPL the combination of input values is: 0: In Range 1: Out of Range
CPLOOR
0
Calculations
The calculations depend on the conversion method.
Conversion method 1: from observed to standard conditions. The function performs the following iterative algorithm to calculate the Density at standard conditions:
1. At the start of the iteration the initial value for Density at [15 C, equilibrium
pressure] is set to the Observed Density. The initial CPL value is set to 1.
2. The CTL value is determined from the Density at [15 C, equilibrium pressure]
according to API 1952 Table 54.
3. The Density at [15 C, equilibrium pressure] is calculated from the Observed
Density, the new CTL value and the CPL value from the previous iteration.
4. The compressibility factor is calculated according to API MPMS 11.2.1M from the
density at [15 C, equilibrium pressure] and the 'Observed temperature'. If API
11.2.1M rounding is enabled then the density and temperature are rounded and the calculations are performed in accordance with the rounding and truncating rules of the standard.
Page 74
4-74 Flow-X─ Function Reference
Flow-X General functions - fxAPI_Dens15C_1952
5. The CPL value is calculated from the compressibility factor and the 'Observed
pressure' and 'Equilibrium pressure' input values.
6. The Density at [15C, equilibrium pressure] is calculated by dividing the Observed
Density by the CTL and the new CPL value.
7. Steps 2 through 6 are repeated taking the Density value from step 7 as the start
value for the next iteration until the absolute difference between two consecutive Density values is 0.0001.
Conversion method 2: from standard to observed conditions. The function performs straightforward calculations to determine the Density at observed conditions:
5. The CTL value is calculated according to API 1952 Table 54
6. The compressibility factor is calculated according to API MPMS 11.2.1M from
the input density and temperature'. If API 11.2.1M rounding is enabled then the input density and temperature are rounded and the calculations are performed in accordance with the rounding and truncating rules of the standard.
7. The CPL value is calculated from the compressibility factor and the 'Observed
pressure' and 'Equilibrium pressure' input values.
8. The output Density (at observed temperature and pressure) is calculated from
the input Density and the CTL and the CPL values.
Page 75
Flow-X─ Function Reference
4-75
Flow-X General functions - fxAPI_Dens15C_1980
fxAPI_Dens15C_1980
Description
Density (T, P) <--> Density (15°C, equilibrium pressure)
This function converts a density value at the observed temperature and pressure to the density value at 15°C and the equilibrium pressure (typically 0 bar(g)) or vice versa. The temperature conversion is according to API-2540, Tables 53A/54A (Generalized Crude Oils) and 53B/54B (Refined Oil Products) and API MPMS 11.1 Chapter XIV Table 53D/54D: 1984 (Lubricating Oils), while the volume correction for pressure according to API MPMS 11.2.1M. An iterative calculation needs to be applied to convert the observed density to the value at base conditions.
Note: this function is a combination of API2540 and API 11.2.1M. For the calculation from observed to standard conditions an iterative calculation is required. The rounding and truncating of input and intermediate values is implemented such that the example calculations as specified in both standards are exactly reproduced.
Compliance
API MPMS 11.1 Volume X (API Standard 2540) - Table 53A - Generalized Crude Oils,
Correction of Observed Density to Density at 15°C - First Edition, August 1980
API MPMS 11.1 Volume X (API Standard 2540) - Table 54A - Generalized Crude Oils,
Correction of Volume to 15°C against Density at 15°C- First Edition, August 1980
API MPMS 11.1 Volume X (API Standard 2540) - Table 53B - Generalized Products,
Correction of Observed Density to Density at 15°C - First Edition, August 1980
API MPMS 11.1 Volume X (API Standard 2540) - Table 54B - Generalized Products,
Correction of Volume to 15°C against Density at 15°F - First Edition, August 1980
API MPMS 11.1 Volume XIV - Table 53D - Generalized Lubricating Oils, Correction of
Observed Density to Density at 15°C - January 1982
API MPMS 11.1 Volume XIV - Table 54D - Generalized Lubricating Oils, Correction of Volume
to 15°C against Density at 15°F - January 1982
API MPMS 11.2.1M - Compressibility Factors for Hydrocarbons: 638 - 1074 Kilograms per
Cubic Meter Range - First Edition, August 1984
Page 76
4-76 Flow-X─ Function Reference
Flow-X General functions - fxAPI_Dens15C_1980
Function inputs
Remark
EU
SW tag
Range
Default
Name
Optional tag name, tag description and tag group
Input density
Meaning depends on the input 'Conversion method'. 'Conversion method' = 1
Density at the observed temperature and pressure
'Conversion method' = 2
Density at 15 °C and the equilibrium pressure.
kg/m3
0..1300
0
Observed temperature
°C -100..200
15
Observed pressure
bar(g)
-1..150
0
Product
1: A - Crude Oil 2: B - Auto select
Selection based on density at 15 °C
3: B - Gasoline 4: B - Transition Area 5: B - Jet Fuels 6: B - Fuel Oil 7: D - Lubricating Oil
PRDTYP
1
API 2540 rounding
0: Disabled
The calculations are performed with full precision and the final CTL value is rounded as specified by input 'CTL decimal places'
1: Enabled for computational value
API-2540 rounding and truncating rules are applied and, in case of conversion method 2 (standard to observed), the computational value for CTL as specified in Table 54 is used, meaning that the CTL value has: 4 decimal places if CTL >=1 5 decimal places if CTL < 1.
2: Enabled for table value
API-2540 rounding and truncating rules are applied and, in case of conversion method 2 (standard to observed), the table value for CTL as specified in Table 54 meaning that the CTL value has 4 decimal places in all cases
3: Enabled with 5 decimal places
API-2540 rounding and truncating rules are applied,
API2540RND
-
0
Page 77
Flow-X─ Function Reference
4-77
Flow-X General functions - fxAPI_Dens15C_1980
and, in case of conversion method 2 (standard to observed), the CTL value has 5 decimal places in all cases.
Note: although not strictly in accordance with the standard, this option is more commonly used than option 'Enabled for computational value'
Note: for conversion type 1
‘From observed to standard conditions’ the CTL factor is
rounded to 6 decimal places
when input ‘API 2540 rounding’
> 0, as in accordance with table
53.
Hydrometer correction
Only applies for conversion method
‘1: From observed to standard conditions’
0: Disabled 1: Enabled
-
HYDROCOR
0
API 11.2.1M rounding
0: Disabled
The calculation of the compressibility factor F is performed with full precision.
1: Enabled
API-MPMS 11.2.1M rounding and truncating rules are applied. The compressibility factor F is rounded to 3 decimal places as specified in the standard.
-
API1121RND
0
Equilibrium pressure
The equilibrium pressure is considered to be 0 bar(g) for liquids which have an equilibrium pressure less than atmospheric pressure (in compliance with API MPMS 12.2 par. 12.2.5.4)
bar(g)
EQUIPRES
0..150
0
Conversion method
1: From observed to standard conditions 2: From standard to observed conditions
CONVERSIO N
1
Function outputs
Remark
EU
SW tag
Alarm
Fallback
Status
0: Normal 1: Input argument out of range 2: Calculation error 3: No convergence
-
STS FIOOR CALCERR NOCONV
1
Output density
Meaning depends on the input 'Conversion method'. 'Conversion method' = 1
Density at 15 °C and the equilibrium pressure.
kg/m3
DENS
0
Page 78
4-78 Flow-X─ Function Reference
Flow-X General functions - fxAPI_Dens15C_1980
'Conversion method' = 2
Density at the observed temperature and pressure
CTL
Volume correction factor for temperature. Value will be rounded according to input 'API2540 rounding''
-
CTL 1
CPL
Volume correction factor for pressure Value will be rounded according to input 'API 11.2.1M rounding''
-
CPL 1 CTPL
Combined volume correction factor CTPL = CTL * CPL
-
CTPL 1 K0
Actual value of constant K0 used for CTL calculation
-
K0 0
K1
Actual value of constant K1 used for CTL calculation
-
K1 0
K2
Actual value of constant K2 used for CTL calculation
-
K2 0 Alpha
Thermal expansion factor
1/°C
ALPHA
0 F
Compressibility factor
- F
0
Product
When input 'Product' is 'B - Auto select', then the output is set to the actual selected product of tables 53B/54B (enumerative value as defined for input 'Product'), else the output is set equal to input 'Product'.
-
PRDCUR
0 CTL calc out of range
With respect to the standard used for the calculation of CTL the combination of input values is: 0: In Range 1: Out of Range
CTLOOR
0
CPL calc out of range
With respect to the standard used for the calculation of CPL the combination of input values is: 0: In Range 1: Out of Range
CPLOOR
0
Calculations
The calculations depend on the conversion method.
Conversion method 1: from observed to standard conditions. The function performs the following iterative algorithm to calculate the density at reference conditions:
1. First the inputs are rounded in accordance with the API2540 standard, provided
that API2540 rounding is enabled.
2. The hydrometer correction on the input density is applied, provided that this
correction is enabled
3. At the start of the iteration the density at [15 C, equilibrium pressure] is set
equal to the observed density and the initial CPL value is set to 1.
4. When the type of product is set to ‘B – Auto select’ (automatic selection of the
refined product range) the K0, K1 and K2 factors are determined based on the density at [15 C, equilibrium pressure]. The Transition area is only taken in consideration in the 2nd iteration loop, as specified in the standard.
Page 79
Flow-X─ Function Reference
4-79
Flow-X General functions - fxAPI_Dens15C_1980
5. The Alpha factor is calculated according from the density at [15 C, equilibrium
pressure] and the K0, K1 and K2 factor. If API2540 rounding is enabled, then the intermediate results are rounded or truncated as specified API-2540 Table 53.
6. The CTL value is calculated according to API-2540 Table 53 from the Alpha factor
and the differential temperature (= observed temperature – 15°C). If API2540 rounding is enabled, then the intermediate results are rounded or truncated as specified API-2540 Table 53.
7. Depending on the type of API2540 rounding the calculated CTL value is rounded
to 6 decimal places or not rounded at all.
8. The density at [15 C, equilibrium pressure] is calculated by dividing the observed
density by the new CTL value and the CPL value from the previous iteration.
9. The compressibility factor is calculated according to API MPMS 11.2.1M from the
density at [15 C, equilibrium pressure] and the 'Observed temperature'. If API
11.2.1M rounding is enabled then the density and temperature are rounded and the calculations are performed in accordance with the rounding and truncating rules of the standard.
10. The CPL value is calculated from the compressibility factor and the 'Observed
pressure' and 'Equilibrium pressure' input values.
11. The density at [15C, equilibrium pressure] is calculated by dividing the observed
density by CTL and the new CPL value.
12. If API2540 rounding is enabled then the density at [15C, equilibrium pressure]
value is rounded to 3 decimal places as specified in the standard.
13. Steps 4 through 12 are repeated taking the density value from step 12 as the
starting value until the absolute difference between two consecutive density values is either 0.05 (or 0.07 for the transition area) or 0.000001, depending of API2540 rounding being enabled or not.
14. For refined products the entire iteration loop is repeated if the density at [15C,
equilibrium pressure] appears to be in a different product region than the observed input density. This is required because a different product region means different K0, K1 and K2 factors.
15. When API2540 rounding is enabled, the final density at [15C, equilibrium
pressure] is rounded to 1 decimal place.
Conversion method 2: from standard to observed conditions. The function performs straightforward calculations to determine the density at observed conditions:
9. First the inputs are rounded in accordance with the API2540 standard, provided
that API2540 rounding is enabled.
10. When the type of product is set to ‘B – Auto select’ (automatic selection of the
refined product range) the K0, K1 and K2 factors are determined based on the input density
11. The Alpha factor is calculated according from the input density and the K0, K1
and K2 factor. If API2540 rounding is enabled, then the intermediate results are rounded or truncated as specified API-2540 Table 54.
12. The CTL value is calculated according to API-2540 Table 54 from the Alpha factor
and the differential temperature (= observed temperature – 15°C If API2540 rounding is enabled, then the intermediate results are rounded or truncated as specified API-2540 Table 54.
13. Depending on the type of API2540 rounding the calculated CTL value is rounded
to 4 or 5 decimal places or not rounded at all.
14. The compressibility factor is calculated according to API MPMS 11.2.1M from the
input density and temperature'. If API 11.2.1M rounding is enabled then the input density and temperature are rounded and the calculations are performed in accordance with the rounding and truncating rules of the standard.
Page 80
4-80 Flow-X─ Function Reference
Flow-X General functions - fxAPI_Dens15C_1980
15. The CPL value is calculated from the compressibility factor and the 'Observed
pressure' and 'Equilibrium pressure' input values.
16. The density at [15C, equilibrium pressure] is calculated by multiplying the input
density by the CTL and the CPL values.
Page 81
Flow-X─ Function Reference
4-81
Flow-X General functions - fxAPI_Dens15C_NGL_LPG
fxAPI_Dens15C_NGL_LPG
Description
Density (T, P) <--> Density (15°C, Pe)
This function converts the density value at the observed temperature and pressure to the density value at 15°C and the equilibrium pressure or vice versa. The temperature correction is according to API MPMS 11.2.4:2007 (GPA TP-27), while the pressure correction is according to API MPMS 11.2.2M:1984. The calculation of the equilibrium pressure is according to GPA TP-15 (API MPMS 11.2.2 Addendum:1994).
Compliance
API MPMS 11.2.4: Temperature Correction for the Volume of NGL and LPG Tables 23E, 24E,
53E, 54E, 59E & 60E, September 2007
GPA TP-27: Temperature Correction for the Volume of NGL and LPG Tables 23E, 24E, 53E,
54E, 59E & 60E, September 2007
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 11.2.5: A Simplified Vapor Pressure Correlation for Commercial NGLs, September
2007
GPA TP-15: A Simplified Vapor Pressure Correlation for Commercial NGLs, September 2007
(also covers GPA TP-15 1988)
API MPMS 11.2.2 Addendum : Compressibility Factors for Hydrocarbons: Correlation of
Vapor Pressure for Commercial Natural Gas Liquids (same as GPA TP-15:1988)
Function inputs
Name
Remark
EU
SW tag
Range
Default
Name
Optional tag name, tag description and tag group
Input density
Depending on the conversion method this represents the density either at the observed temperature and pressure or at 15 °C and the equilibrium pressure
- 0..750
0
Observed temperature
Temperature at which the density is observed
°C -100..150
15
Observed pressure
Pressure at which the density is observed
bar(a)
-1..200
0
API 11.2.4 rounding
0: Disabled
The calculations are performed with full precision and the output values are not rounded
1: Enabled
The related values are rounded as defined in the standard
API1124RND
0
API 11.2.2M rounding
0: Disabled
The calculations are performed with full precision and the output
API1122RND
0
Page 82
4-82 Flow-X─ Function Reference
Flow-X General functions - fxAPI_Dens15C_NGL_LPG
values are not rounded
1: Enabled
The related values are rounded as defined in the standard
Equilibrium pressure mode
1: Use Input
The value of input 'Equilibrium pressure value' is used for the calculation of CPL
2: GPA TP-15
The equilibrium pressure is calculated in accordance with GPA TP-15
EQUIPMODE
2
Equilibrium pressure value
Only used when input 'Equilibrium pressure mode' is set to 'Use input'. The value will be used for the calculation of the CPL
bar(a)
EQUIPINP
0
GPA TP-15 rounding
Only used when 'Equilibrium pressure mode is set to 'GPA TP­15' 0: Disabled
Full precision (no rounding and truncating applied)
1: Enabled
Rounding as defined in ' GPA TP15:1988 / API MPMS
11.2.2 Addendum':1994
-
TP15RND
0
P100 Correlation
Only used when 'Equilibrium pressure mode is set to 'GPA TP­15' 0: Disabled
The standard correlation is commonly used for pure products such as propane, butane and natural gasoline. It only requires the relative density and the temperature to calculate the vapor pressure
1: Enabled
The improved correlation requires the vapor pressure at 100°F (37.8 °C). This method is better suited for varied NGL mixes Where different product mixes could have the same specific gravity but different equilibrium pressures.
-
P100CORR
0
Vapor pressure at 100°F
Only used when 'Equilibrium pressure mode is set to 'GPA TP­15' and the P100 correlation is enabled.
bar(a)
EQUIP100F
0..200
0
Conversion method
1: From observed to standard conditions 2: From standard to observed conditions
CONVMETH
1
Page 83
Flow-X─ Function Reference
4-83
Flow-X General functions - fxAPI_Dens15C_NGL_LPG
Function outputs
Name
Remark
EU
SW tag
Alarm
Fallb ack
Status
0: Normal 1: Input argument out of range 2: Calculation error 3: No convergence
-
STS FIOOR CALCERR NOCONV
1
Output density
Depending on the conversion method this represents the density either at 15 °C and the equilibrium pressure or the observed temperature and pressure
kg/m3
DENS
0 CTL
Volume correction factor for temperature. Value will be rounded according to input 'API 11.2.4 rounding'
-
CTL 1
CPL
Volume correction factor for pressure Value will be rounded according to input 'API 11.2.2M rounding'
-
CPL 1
CTPL
Combined volume correction factor CTPL = CTL * CPL
-
CTPL 1
F
Compressibility factor The output value will be either rounded or not depending input 'API rounding'
1/bar
F 0
Equilibrium pressure
The equilibrium pressure calculated by GPA TP-15 Will be set to 0 when equilibrium pressure is below atmospheric pressure
bar(a)
EQUIPC UR
0
CTL calc out of range
With respect to the API 11.2.4 standard the combination of input values is:
0: In Range 1: Out of Range
The following range checks apply:
Conversion method 1: observed -> standard
0.21 <= RD <= 0.74
with RD = Input density /
999.016/CPL
-46 <= T <= 93 °C Table 23E reference fluid
ranges
Conversion method 1: standard -> observed
351.7 <= Input density <=
687.8 kg/m3
-46 <= T <= 93 °C Table 23E reference fluid
ranges
CTLOOR
0
Page 84
4-84 Flow-X─ Function Reference
Flow-X General functions - fxAPI_Dens15C_NGL_LPG
CPL calc out of range
With respect to API 11.2.2M the combination of input values is: 0: In Range 1: Out of Range
The following range checks apply:
350 <= Density 15 °C <= 637
kg/m3
-46 °C <= T <= 60 °C
CPLOOR
0
GPA TP-15 out of range
Only set when the GPA TP-15 calculation is enabled With respect to the GPA TP-15 standard the combination of input values is:
0: In Range 1: Out of Range
The following range checks apply: For lower range:
0.350 <= RD60 < 0.425 -50 to (695.51*RD60 -
155.51) °F
Higher range:
0.425 <= RD60 <= 0.676 -50 to 140 °F
with RD60 being the relative density at 60°F
-
TP15OO R
0
Calculations
The calculations depend on the conversion method.
Conversion method 1: from observed to standard conditions. The function performs the following iterative algorithm to calculate the density at 15 °C and the equilibrium pressure.
1. When API 11.2.4 rounding is enabled, the input density and temperature values
are rounded in accordance with the standard
2. At the start of the iteration the density at [15 C, equilibrium pressure] is set
equal to the observed density and the CPL value is set to 1.
3. First the density corrected for pressure is calculated by dividing the observed
density by the CPL value.
4. The relative density corrected for pressure is calculated from the density
corrected for pressure
5. The relative density at [60 F, equilibrium pressure] is calculated from the relative
density corrected for pressure and the observed temperature according to Table 23E
6. The relative density at [15 C, equilibrium pressure] is calculated from the
relative density at [60 F, equilibrium pressure] converted to 15 C according to Table 24E
7. The density at [15 C, equilibrium pressure] is calculated from the relative density
at [15 C, equilibrium pressure]
8. The CTL value is calculated by dividing the density corrected for pressure by the
density at [15 C, equilibrium pressure]
Page 85
Flow-X─ Function Reference
4-85
Flow-X General functions - fxAPI_Dens15C_NGL_LPG
9. Depending on the value of input 'Equilibrium pressure mode', either value of
input 'Equilibrium pressure value' is used or the equilibrium pressure (vapor pressure) is calculated according to GPA TP-15. Whether the GPA TP-15 rounding and truncation rules are applied is dictated by input ‘GPA-TP15 rounding’
10. The compressibility factor F is calculated according to API MPMS 11.2.2M from
the density at [15 C, equilibrium pressure] and the 'Observed temperature', with, depending on input API 11.2.2M, rounding and truncation according to the standard.
11. The CPL value is calculated from the compressibility factor, the equilibrium
pressure and the 'Observed pressure' input value.
12. The new value for density at [15C, equilibrium pressure] is calculated by dividing
the observed density by the CTL and CPL values.
13. Steps 3 though 12 are repeated taking the density value from step 12 as the
staring value until the absolute difference between two consecutive density values is less than the convergence limit.
To avoid convergence problems different convergence limits are applied, depending on the whether API 11.2.2M and/or GPA TP-15 rounding is applied:
If API 11.2.2M rounding is enabled -> Limit = 0.05 kg/m3 else if GPA TP-15 rounding is enabled -> Limit = 0.005 kg/m3 else -> Limit = 0.00001 kg/m3
14. If API 11.2.4 rounding is enabled, then the density at [15C, equilibrium pressure]
is rounded to 0.1
Conversion method 2: from standard to observed conditions. The function performs straightforward calculations to determine the density at observed conditions:
1. When API 11.2.4 rounding is enabled, the input density and temperature values
are rounded in accordance with the standard
2. The CTL value and the relative density at [60 F, equilibrium pressure] are
calculated according to API MPMS 11.2.4 (GPA TP-27) Table 60E from the density at [15 C, equilibrium pressure] and the 'Observed temperature'.
3. Depending on the value of input 'Equilibrium pressure mode', either value of
input 'Equilibrium pressure value' is used or the equilibrium pressure (vapor pressure) is calculated according to GPA TP-15.
4. The compressibility factor is calculated according to API MPMS 11.2.2M from the
density at [15 C, equilibrium pressure] and the 'Observed temperature'.
5. The CPL value is calculated from the compressibility factor, the equilibrium
pressure and the 'Observed pressure' input value.
6. If API 11.2.4 rounding is enabled, then the CTL value is rounded at [60F,
equilibrium pressure] is rounded to 0.00001
7. The density at the observed conditions is calculated by multiplying the density at
[15 C, equilibrium pressure] by the CTL value and the CPL value.
Page 86
4-86 Flow-X─ Function Reference
Flow-X General functions - fxAPI_Dens20C_NGL_LPG
fxAPI_Dens20C_NGL_LPG
Description
Density (T, P) <--> Density (20°C, Pe)
This function converts the density value at the observed temperature and pressure to the density value at 20°C and the equilibrium pressure or vice versa. The temperature correction is according to API MPMS 11.2.4:2007 (GPA TP-27), while the pressure correction is according to API MPMS 11.2.2M:1984. The calculation of the equilibrium pressure is according to GPA TP-15 (API MPMS 11.2.2 Addendum:1994).
Compliance
API MPMS 11.2.4: Temperature Correction for the Volume of NGL and LPG Tables 23E, 24E,
53E, 54E, 59E & 60E, September 2007
GPA TP-27: Temperature Correction for the Volume of NGL and LPG Tables 23E, 24E, 53E,
54E, 59E & 60E, September 2007
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 11.2.5: A Simplified Vapor Pressure Correlation for Commercial NGLs, September
2007
GPA TP-15: A Simplified Vapor Pressure Correlation for Commercial NGLs, September 2007
(also covers GPA TP-15 1988)
API MPMS 11.2.2 Addendum : Compressibility Factors for Hydrocarbons: Correlation of
Vapor Pressure for Commercial Natural Gas Liquids (same as GPA TP-15:1988)
Function inputs
Name
Remark
EU
SW tag
Range
Default
Name
Optional tag name, tag description and tag group
Input density
Depending on the conversion method this represents the density either at the observed temperature and pressure or at 20 °C and the equilibrium pressure
kg/m3
0..750
0
Observed temperature
Temperature at which the density is observed
°C -100..150
20
Observed pressure
Pressure at which the density is observed
bar(a)
-1..200
0
API 11.2.4 rounding
0: Disabled
The calculations are performed with full precision and the output values are not rounded
1: Enabled
The related values are rounded as defined in the standard
API1124RND
0
API 11.2.2M rounding
0: Disabled
The calculations are performed with full
API1122RND
0
Page 87
Flow-X─ Function Reference
4-87
Flow-X General functions - fxAPI_Dens20C_NGL_LPG
precision and the output values are not rounded
1: Enabled
The related values are rounded as defined in the standard
Equilibrium pressure mode
1: Use Input
The value of input 'Equilibrium pressure value' is used for the calculation of CPL
2: GPA TP-15
The equilibrium pressure is calculated in accordance with GPA TP-15
EQUIPMODE
2
Equilibrium pressure value
Only used when input 'Equilibrium pressure mode' is set to 0. The value will be used for the calculation of the CPL
bar(a)
EQUIPINP
0
GPA TP-15 rounding
0: Disabled
Full precision (no rounding and truncating applied)
1: Enabled
Rounding as defined in ' GPA TP15:1988 / API MPMS 11.2.2 Addendum':1994
-
TP15RND
0
P100 Correlation
0: Disabled
The standard correlation is commonly used for pure products such as propane, butane and natural gasoline. It only requires the relative density and the temperature to calculate the vapor pressure
1: Enabled
The improved correlation requires the vapor pressure at 100°F (37.8 °C). This method is better suited for varied NGL mixes Where different product mixes could have the same specific gravity but different equilibrium pressures.
-
P100CORR
0
Vapor pressure at 100°F
bar(a)
EQUIP100F
0..200
0
Conversion method
1: From observed to standard conditions 2: From standard to observed conditions
CONVMETH
1
Page 88
4-88 Flow-X─ Function Reference
Flow-X General functions - fxAPI_Dens20C_NGL_LPG
Function outputs
Name
Remark
EU
SW tag
Alarm
Fallback
Status
0: Normal 1: Input argument out of range
Outputs will be set to fallback values
2: Calculation error
Outputs will be set to fallback values
3: No convergence within 15 iterations
Outputs will be set to values of last iteration
-
STS FIOOR
CALC
NOCONV
1
Output density
Depending on the conversion method this represents the density either at 20 °C and the equilibrium pressure or the observed temperature and pressure
kg/m3
DENS
0 CTL
Volume correction factor for temperature. Value will be rounded according to input 'API 11.2.4 rounding'
-
CTL 1
CPL
Volume correction factor for pressure Value will be rounded according to input 'API
11.2.2M rounding'
-
CPL 1
CTPL
Combined volume correction factor CTPL = CTL * CPL
-
CTPL 1
F
Compressibility factor The output value will be either rounded or not depending input 'API rounding'
1/bar
F 0
Equilibrium pressure
The equilibrium pressure calculated by GPA TP-15 Will be set to 0 when equilibrium pressure is below atmospheric pressure
bar(a)
EQUIPCUR
0
CTL calc out of range
With respect to the API
11.2.4 standard the combination of input values is:
0: In Range 1: Out of Range
The following range checks apply:
Conversion method 1: observed -> standard
0.21 <= RD <= 0.74
with RD = Input
CTLOOR
0
Page 89
Flow-X─ Function Reference
4-89
Flow-X General functions - fxAPI_Dens20C_NGL_LPG
density / 999.016/CPL
-46 <= T <= 93 °C Table 23E reference
fluid ranges
Conversion method 1: standard -> observed
331.7 <= Input
density <= 683.6 kg/m3
-46 <= T <= 93 °C Table 23E reference
fluid ranges
CPL calc out of range
With respect to API 11.2.2M the combination of input values is: 0: In Range 1: Out of Range
The following range checks apply:
350 <= Density 15 °C
<= 637 kg/m3
-46 °C <= T <= 60 °C
CPLOOR
0
GPA TP-15 out of range
Only set when the GPA TP-15 calculation is enabled With respect to the GPA TP­15 standard the combination of input values is:
0: In Range 1: Out of Range
The following range checks apply: For lower range:
0.350 <= RD60 <
0.425
-50 to (695.51*RD60
- 155.51) °F
Higher range:
0.425 <= RD60 <=
0.676
-50 to 140 °F
with RD60 being the relative density at 60°F
-
TP15OOR
0
Calculations
The calculations depend on the conversion method.
Conversion method 1: from observed to standard conditions. The function performs the following iterative algorithm to calculate the density at 20 °C and the equilibrium pressure.
Page 90
4-90 Flow-X─ Function Reference
Flow-X General functions - fxAPI_Dens20C_NGL_LPG
1. When API 11.2.4 rounding is enabled, the input density and temperature values
are rounded in accordance with the standard
2. At the start of the iteration the density at [20 C, equilibrium pressure] is set
equal to the observed density and the CPL value is set to 1.
3. First the density corrected for pressure is calculated by dividing the observed
density by the CPL value.
4. The relative density corrected for pressure is calculated from the density
corrected for pressure
5. The relative density at [60 F, equilibrium pressure] is calculated from the relative
density corrected for pressure and the observed temperature according to Table 23E
6. The relative density at [20 C, equilibrium pressure] is calculated from the
relative density at [60 F, equilibrium pressure] converted to 20 C according to Table 24E
7. The density at [20 C, equilibrium pressure] is calculated from the relative density
at [20 C, equilibrium pressure]
8. The CTL value is calculated by dividing the density corrected for pressure by the
density at [20 C, equilibrium pressure]
9. Depending on the value of input 'Equilibrium pressure mode', either value of
input 'Equilibrium pressure value' is used or the equilibrium pressure (vapor pressure) is calculated according to GPA TP-15. Whether the GPA TP-15 rounding and truncation rules are applied is dictated by input ‘GPA-TP15 rounding’
10. API 11.2.2M requires the density at [15 C, equilibrium pressure]. For this
purpose the relative density at [15 C, equilibrium pressure] is calculated according to Table 24E from the relative density at [60 F, equilibrium pressure] and at 15 C. This relative density value is then converted to the density at [15 C, equilibrium pressure].
11. The compressibility factor F is calculated according to API MPMS 11.2.2M from
the density at [15 C, equilibrium pressure] and the 'Observed temperature', with, depending on input API 11.2.2M, rounding and truncation according to the standard.
12. The CPL value is calculated from the compressibility factor, the equilibrium
pressure and the 'Observed pressure' input value.
13. The new value for density at [20C, equilibrium pressure] is calculated by dividing
the observed density by the CTL and CPL values.
14. Steps 2 though 6 are repeated taking the density value from step 6 as the staring
value until the absolute difference between two consecutive density values is less than the convergence limit. To avoid convergence problems different convergence limits are applied, depending on the whether API 11.2.2M and/or GPA TP-15 rounding is applied:
If API 11.2.2M rounding is enabled -> Limit = 0.05 kg/m3 else if GPA TP-15 rounding is enabled -> Limit = 0.005 kg/m3 else -> Limit = 0.00001 kg/m3
15. If API 11.2.4 rounding is enabled, then the density at [20C, equilibrium pressure]
is rounded to 0.1
Conversion method 2: from standard to observed conditions. The function performs straightforward calculations to determine the density at observed conditions:
1. When API 11.2.4 rounding is enabled, the input density and temperature values
are rounded in accordance with the standard
Page 91
Flow-X─ Function Reference
4-91
Flow-X General functions - fxAPI_Dens20C_NGL_LPG
2. The CTL value and the relative density at [60 F, equilibrium pressure] are
calculated according to API MPMS 11.2.4 (GPA TP-27) Table 54 from the density at [20 C, equilibrium pressure] and the 'Observed temperature'.
3. Depending on the value of input 'Equilibrium pressure mode', either value of
input 'Equilibrium pressure value' is used or the equilibrium pressure (vapor pressure) is calculated according to GPA TP-15.
4. API 11.2.2M requires the density at [15 C, equilibrium pressure]. For this
purpose the relative density at [15 C, equilibrium pressure] is calculated according to Table 24E from the relative density at [60 F, equilibrium pressure] and at 15 C. This relative density value is then converted to the density at [15 C, equilibrium pressure].
5. The compressibility factor is calculated according to API MPMS 11.2.2M from the
density at [15 C, equilibrium pressure] and the 'Observed temperature'.
6. The CPL value is calculated from the compressibility factor, the equilibrium
pressure and the 'Observed pressure' input value.
7. If API 11.2.4 rounding is enabled, then the CTL value is rounded at [60F,
equilibrium pressure] is rounded to 0.00001
8. The density at the observed conditions is calculated by multiplying the input
density by the CTL value and the CPL value.
Page 92
4-92 Flow-X─ Function Reference
Flow-X General functions - fxAPI_Gravity60F_1952
fxAPI_Gravity60F_1952
°API (T, P) <--> °API (60°F, equilibrium pressure)
This function calculates the API gravity value at the observed temperature and pressure to the API gravity value at 60°F and the equilibrium pressure (typically 0 psig) or vice versa.
The volume correction for temperature is according to 1952 API Table 5 and 6, while the volume correction for pressure is according to API MPMS 11.2.1.
Note: this function is a combination of the API 1952 Tables and API 11.2.1. For the calculation from observed to standard conditions an iterative calculation is required. The rounding and truncating of input and intermediate values is implemented such that the example calculations as specified in both standards are exactly reproduced.
Compliance
ASTM-IP Petroleum Measurement Tables, American Edition, United States Units of
Measurement, 1952
API MPMS 11.2.1 - Compressibility Factors for Hydrocarbons: 0 - 90°API Gravity Range - First
Edition, August 1984
Function inputs and outputs
Function inputs
Remark
EU
SW tag
Range
Default
Name
Optional tag name, tag description and tag group
Input API gravity
Depending of the conversion method this represents the API gravity at either the observed temperature and pressure or at 60 °F and the equilibrium pressure
°API -20..120
0
Observed temperature
Temperature at which the API gravity is observed
°F -100..400
60
Observed pressure
Pressure at which the API gravity is observed
psig -10..2000
0
API 11.2.1 rounding
0: Disabled
The calculation of the compressibility factor F is performed with full precision
1: Enabled
API-MPMS 11.2.1 rounding and truncating rules are applied. The compressibility factor F is rounded to 3 decimal places as specified in the standard.
-
API1121 RND
0
Equilibrium pressure
The equilibrium pressure is considered to be 0 psig for liquids which have an equilibrium pressure less than atmospheric pressure (in compliance with API MPMS 12.2 par. 12.2.5.4)
psig
EQUIPRE S
0..2000
0
Conversion
1: From observed to standard
CONVER
1
Page 93
Flow-X─ Function Reference
4-93
Flow-X General functions - fxAPI_Gravity60F_1952
method
conditions 2: From standard to observed conditions
SION
Function outputs
Remark
EU
SW tag
Alarm
Fallback
Status
0: Normal 1: Input argument out of range 2: Calculation error 3: No convergence
-
STS FIOOR CALC NOCONV
1
Output API gravity
Depending of the conversion method this represents the API gravity at either at 60 °F and the equilibrium pressure or the observed temperature and pressure
°API
API 0
CTL
Volume correction factor for temperature.
-
CTL 1
CPL
Volume correction factor for pressure Value will be rounded according to input 'API 11.2.1 rounding'''
-
CPL 1
CTPL
Combined volume correction factor CTPL = CTL * CPL
-
CTPL 1 F
Compressibility factor
- F
0
CTL calc out of range
With respect to the standard used for the calculation of CTL the combination of input values is: 0: In Range 1: Out of Range
CTLOOR
0
CPL calc out of range
With respect to the standard used for the calculation of CPL the combination of input values is: 0: In Range 1: Out of Range
CPLOOR
0
Calculations
The calculations depend on the conversion method.
Conversion method 1: from observed to standard conditions. The function performs the following iterative algorithm to calculate the API Gravity at standard conditions:
1. At the start of the iteration the initial value for API Gravity at [60 F, equilibrium
pressure] is set to the Observed API Gravity. The initial CPL value is set to 1.
2. The CTL value is determined from the API Gravity at [60 F, equilibrium pressure]
according to API 1952 Table 6.
3. The API Gravity at [60 F, equilibrium pressure] is calculated from the Observed
API gravity, the new CTL value and the CPL value from the previous iteration.
4. Because API 11.2.1 requires the API gravity value at 60 F, the API gravity at [60
F, equilibrium pressure] is calculated from the API gravity at [60 F, equilibrium pressure].
5. The compressibility factor is calculated according to API MPMS 11.2.1 from the
API gravity at [60 F, equilibrium pressure] and the 'Observed temperature'. If API
11.2.1 rounding is enabled then the API gravity and temperature are rounded and the calculations are performed in accordance with the rounding and truncating rules of the standard.
Page 94
4-94 Flow-X─ Function Reference
Flow-X General functions - fxAPI_Gravity60F_1952
6. The CPL value is calculated from the compressibility factor and the 'Observed
pressure' and 'Equilibrium pressure' input values.
7. The API Gravity at [60F, equilibrium pressure] is calculated by dividing the
Observed API Gravity by the CTL and the new CPL value.
8. Steps 2 through 7 are repeated taking the API gravity value from step 7 as the
start value for the next iteration until the absolute difference between two consecutive API gravity values is 0.01.
Conversion method 2: from standard to observed conditions. The function performs straightforward calculations to determine the API Gravity at observed conditions:
2. The CTL value is calculated according to API 1952 Table 6
3. Because API 11.2.1 requires the API gravity value at 60 F, the API gravity at 60
F is calculated from the 'Input API Gravity'.
4. The compressibility factor is calculated according to API MPMS 11.2.1 from the
API gravity and the 'Observed temperature'. If API 11.2.1 rounding is enabled then the input density and temperature are rounded and the calculations are performed in accordance with the rounding and truncating rules of the standard.
5. The CPL value is calculated from the compressibility factor and the 'Observed
pressure' and 'Equilibrium pressure' input values.
6. The output API Gravity (at observed temperature and pressure) is calculated
from the input API Gravity and the CTL and the CPL values.
Page 95
Flow-X─ Function Reference
4-95
Flow-X General functions - fxAPI_Gravity60F_1980
fxAPI_Gravity60F_1980
°API (T, P) <--> °API (60°F, equilibrium pressure)
This function calculates the API gravity value at the observed temperature and pressure to the API gravity value at 60°F and the equilibrium pressure (typically 0 psig) or vice versa. The volume correction for temperature is according to API-2540, Tables 5/6A (Generalized Crude Oils) and 5/6B (Refined Oil Products) and API MPMS 11.1 Chapter XIII Table 5D: 1984 (Lubricating Oils), while the volume correction for pressure according to API MPMS 11.2.1.
Note: this function is a combination of API2540 and API 11.2.1. For the calculation from observed to standard conditions an iterative calculation is required. The rounding and truncating of input and intermediate values is implemented such that the example calculations as specified in both standards are exactly reproduced.
Compliance
API MPMS 11.1 Volume X (API Standard 2540) - Table 5A - Generalized Crude Oils,
Correction of Observed API Gravity to API Gravity at 60°F - First Edition, August 1980
API MPMS 11.1 Volume X (API Standard 2540) - Table 5B - Generalized Products, Correction
of Observed API Gravity to API Gravity at 60°F- First Edition, August 1980
API MPMS 11.1 Volume XIII - Table 5D - Generalized Lubricating Oils, Correction of
Observed API Gravity to API Gravity at 60°F - January 1982
API MPMS 11.1 Volume X (API Standard 2540) - Table 6A - Generalized Crude Oils,
Correction of Volume to 60°F against API Gravity at 60°F - First Edition, August 1980
API MPMS 11.1 Volume X (API Standard 2540) - Table 6B - Generalized Products, Correction
of Volume to 60°F against API Gravity at 60°F - First Edition, August 1980
API MPMS 11.1 Volume XIII - Table 6D - Generalized Lubricating Oils, Correction of Volume
to 60°F against API Gravity at 60°F F - January 1982
API MPMS 11.2.1 - Compressibility Factors for Hydrocarbons: 0 - 90°API Gravity Range - First
Edition, August 1984
Function inputs and outputs
Function inputs
Remark
EU
SW tag
Range
Default
Name
Optional tag name, tag description and tag group
Input API gravity
Depending of the conversion method this represents the API gravity at either the observed temperature and pressure or at 60 °F and the equilibrium pressure
°API -20..120
0
Observed temperature
Temperature at which the API gravity is observed
°F -50..400
60
Observed pressure
Pressure at which the API gravity is observed
psig -10..2000
0
Product
1: A - Crude Oil 2: B - Auto select Selection based on °API at 60 °F 3: B - Gasoline 4: B - Transition Area 5: B - Jet Fuels 6: B - Fuel Oil 7: D - Lubricating Oil
PRDTYP
-
1
Page 96
4-96 Flow-X─ Function Reference
Flow-X General functions - fxAPI_Gravity60F_1980
API-2540 rounding
0: Disabled
The calculations are performed with full precision and the final CTL value is rounded as specified by input 'CTL decimal places'
1: Enabled for computational value
API-2540 rounding and truncating rules are applied and, in case of conversion method 2 (standard to observed), the computational value for CTL as specified in Table 6 is used, meaning that the CTL value has: 4 decimal places if CTL >=1 5 decimal places if CTL < 1.
2: Enabled for table value
API-2540 rounding and truncating rules are applied and, in case of conversion method 2 (standard to observed), the table value for CTL as specified in Table 6 meaning that the CTL value has 4 decimal places in all cases
3: Enabled with 5 decimal places
API-2540 rounding and truncating rules are applied, and, in case of conversion method 2 (standard to observed), the CTL value has 5 decimal places in all cases.
Note: although not strictly in accordance with the standard, this option is more commonly used than option 'Enabled for computational value' Note: for conversion type 1
‘From observed to standard conditions’ the CTL factor is
rounded to 6 decimal places
when input ‘API 2540 rounding’
> 0, as in accordance with table
5.
API254 0RND
-
0
Hydrometer correction
Only applies for conversion method
‘1: From observed to standard conditions’
0: Disabled 1: Enabled
-
HYDRO COR
0
API 11.2.1 rounding
0: Disabled
The calculation of the compressibility factor F is performed with full precision
1: Enabled
API-MPMS 11.2.1 rounding and
-
API112 1RND
0
Page 97
Flow-X─ Function Reference
4-97
Flow-X General functions - fxAPI_Gravity60F_1980
truncating rules are applied. The compressibility factor F is rounded to 3 decimal places as specified in the standard.
Equilibrium pressure
The equilibrium pressure is considered to be 0 psig for liquids which have an equilibrium pressure less than atmospheric pressure (in compliance with API MPMS 12.2 par.
12.2.5.4)
psig
EQUIPR ES
0..2000
0
Conversion method
1: From observed to standard conditions 2: From standard to observed conditions
CONVE RSION
1
Function outputs
Remark
EU
SW tag
Alarm
Fallback
Status
0: Normal 1: Input argument out of range 2: Calculation error 3: No convergence
-
STS FIOOR CALC NOCONV
1
Output API gravity
Depending of the conversion method this represents the API gravity at either at 60 °F and the equilibrium pressure or the observed temperature and pressure
°API
API 0
CTL
Volume correction factor for temperature. Value will be rounded according to input 'API2540 rounding'
-
CTL 1
CPL
Volume correction factor for pressure Value will be rounded according to input 'API 11.2.1 rounding'''
-
CPL 1 CTPL
Combined volume correction factor CTPL = CTL * CPL
-
CTPL 1 K0
Actual value of constant K0 used for CTL calculation
-
K0 0
K1
Actual value of constant K1 used for CTL calculation
-
K1 0
K2
Actual value of constant K2 used for CTL calculation
-
K2 0 Alpha
Thermal expansion factor
1/°F
ALPHA
0 F
Compressibility factor
- F
0
Product
When input 'Product' is 'B - Auto select', then the output is set to the actual selected product of table 5B / 6B (enumerative value as defined for input 'Product'), else the output is set equal to input 'Product'.
-
PRDCUR
0
CTL calc out of range
With respect to the standard used for the calculation of CTL the combination of input values is: 0: In Range 1: Out of Range
CTLOOR
0
CPL calc out of
With respect to the standard used
0
Page 98
4-98 Flow-X─ Function Reference
Flow-X General functions - fxAPI_Gravity60F_1980
range
for the calculation of CPL the combination of input values is: 0: In Range 1: Out of Range
CPLOOR
Calculations
The calculations depend on the conversion method.
Conversion method 1: from observed to standard conditions. The function performs the following iterative algorithm to calculate the API gravity at standard conditions:
1. First the inputs are rounded in accordance with the API2540 standard, provided
that API2540 rounding is enabled.
2. The observed density [kg/m3] is calculated from the observed API gravity
3. The hydrometer correction on the observed density is applied, provided that this
correction is enabled
4. At the start of the iteration the initial value for density and API gravity at [60 F,
equilibrium pressure] is set to respectively the observed density and the observed API gravity. The initial CPL value is set to 1.
5. When the type of product is set to ‘B – Auto select’ (automatic selection of the
refined product range) the K0, K1 and K2 factors are determined based on the API gravity at [60 F, equilibrium pressure]. The Transition area is only taken in consideration in the 2nd iteration loop, as specified in the standard.
6. The Alpha factor is calculated according from the density at [60 C, equilibrium
pressure] and the K0, K1 and K2 factor. If API2540 rounding is enabled, then the intermediate results are rounded or truncated as specified API-2540 Table 5.
7. The CTL value is calculated according to API-2540 Table 5 from the Alpha factor
and the differential temperature (= observed temperature – 60°F). If API2540 rounding is enabled, then the intermediate results are rounded or truncated as specified API-2540 Table 5.
8. Depending on the type of API2540 rounding the calculated CTL value is rounded
to 6 decimal places or not rounded at all.
9. The density at [60 F, equilibrium pressure] is calculated by dividing the observed
density by the new CTL value and the CPL value from the previous iteration.
10. The API gravity at [60 F, equilibrium pressure] is calculated from the density at
[60 F, equilibrium pressure]
11. The compressibility factor is calculated according to API MPMS 11.2.1 from the
API gravity at [60 F, equilibrium pressure] and the 'Observed temperature'. If API
11.2.1 rounding is enabled then the API gravity and temperature are rounded and the calculations are performed in accordance with the rounding and truncating rules of the standard.
12. The CPL value is calculated from the compressibility factor and the 'Observed
pressure' and 'Equilibrium pressure' input values.
13. The density at [60F, equilibrium pressure] is calculated by dividing the observed
density by CTL and the new CPL value.
14. If API2540 rounding is enabled then the density at [60F, equilibrium pressure]
value is rounded to 3 decimal places as specified in the standard.
15. The API gravity at [60 F, equilibrium pressure] is calculated from the density at
[60 F, equilibrium pressure]
16. If API2540 rounding is enabled then the API gravity at [60F, equilibrium
pressure] value is rounded to 1 decimal place as specified in the standard.
17. Steps 5 through 16 are repeated taking the density value from step 14 as the
start value for the next iteration until the absolute difference between two
Page 99
Flow-X─ Function Reference
4-99
Flow-X General functions - fxAPI_Gravity60F_1980
consecutive density values is either 0.05 (or 0.07 for the transition area) or
0.000001, depending of API2540 rounding being enabled or not.
18. For refined products the entire iteration loop is repeated if the API gravity at
[60F, equilibrium pressure] appears to be in a different product region than the observed API gravity. This is required because a different product region means different K0, K1 and K2 factors.
Conversion method 2: from standard to observed conditions. The function performs straightforward calculations to determine the API gravity at observed conditions:
1. First the inputs are rounded in accordance with the API2540 standard, provided
that API2540 rounding is enabled.
2. The density at [60F, equilibrium pressure] is calculated from the input API
gravity
3. When the type of product is set to ‘B – Auto select’ (automatic selection of the
refined product range) the K0, K1 and K2 factors are determined based on the input API gravity
4. The Alpha factor is calculated according from the density at [60F, equilibrium
pressure] and the K0, K1 and K2 factor. If API2540 rounding is enabled, then the intermediate results are rounded or truncated as specified API-2540 Table 6.
5. The CTL value is calculated according to API-2540 Table 6 from the Alpha factor
and the differential temperature (= observed temperature – 60°F). If API2540 rounding is enabled, then the intermediate results are rounded or truncated as specified API-2540 Table 6.
6. Depending on the type of API2540 rounding the calculated CTL value is rounded
to 4 or 5 decimal places or not rounded at all.
7. The compressibility factor is calculated according to API MPMS 11.2.1 from the
input density and temperature'. If API 11.2.1 rounding is enabled then the input density and temperature are rounded and the calculations are performed in accordance with the rounding and truncating rules of the standard.
8. The CPL value is calculated from the compressibility factor and the 'Observed
pressure' and 'Equilibrium pressure' input values.
9. The API gravity at observed temperature and pressure is calculated from the
input API gravity and the CTL and the CPL values.
Page 100
4-100 Flow-X─ Function Reference
Flow-X General functions - fxAPI_MPMS_11_2_1
fxAPI_MPMS_11_2_1
The API MPMS 11.2.1 standard consists of a printed table that contains compressibility factors to correct hydrocarbon volumes under pressure to the corresponding volumes at the equilibrium pressure for the metered temperature. The table contains compressibility factors related to meter temperature and API gravity at 60°F. From the compressibility factor the volume correction for pressure is calculated according to API MPMS
12.2.
Compliance
API MPMS 11.2.1 - Compressibility Factors for Hydrocarbons: 0 - 90°API Gravity Range - First
Edition, August 1984
API MPMS 12.2 - Calculation of Liquid Petroleum Quantities Measured by Turbine or
Displacement Meters
Boundaries
API MPMS 11.2.1 defines the following limits on the input values:
0 to 90 °API -20 to +200 °F 0 to 1500 psig.
API Rounding
The actual standard is the printed table. It also includes the 'Calculation Procedure' to obtain the table values based on the rounding and truncating of all input, intermediate and output values. The function provides the option to either output the table value (including the full API rounding and truncating requirements) or to perform the calculation procedure without any rounding and truncating being applied.
Name
Remark
EU
SW tag
Range
Default
Name
Optional tag name, tag description and tag group
API60
API gravity at 60°F
°API 0..120
0
Observed Temperature
°F -50..400
60 Observed Pressure
psig -10..2000
0
Equilibrium Pressure
The equilibrium pressure is considered to be 0 psig for liquids which have an equilibrium pressure less than atmospheric pressure (in compliance with API MPMS 12.2 par. 12.2.5.4)
psig
EQUIPRES
0..2000
0
API 11.2.1 rounding
0: Disabled
The calculation of the compressibility factor F is performed with full precision.
1: Enabled
API-MPMS 11.2.1 rounding and truncating rules are applied. The compressibility factor F is rounded to 3 decimal places as specified in the standard.
APIROUND
-
0
Loading...