CM eXL FR-EN B 102017
CM eXL FR-EN B 102017
CM eXL FR-EN B 102017
A B B M E A S U R E M E N T & A N A LY T I C S | F U N C T I O N R E F E R E N C E M A N U A L
SpiritIT eXLerate
Measurement supervisory software
—
SpiritIT eXLerate Introduction For more information
interfaces
This document describes the spreadsheet functions All publications of Spirit IT eXLerate are available for
for SpiritIT eXLerate. It also provides background free download from:
information on related standards and calculation
methods used in the industry for quality and
quantity measurement of hydrocarbon and other
type of fluids.
Contents
1 Introduction ................................................................ 4 fxASTM_D1550_Ctl ................................................................ 77
Spirit IT Function Library .........................................................4 fxASTM_D1555_Dens60F ..................................................... 78
API Petroleum Measurement Tables ...................................4 fxASTM_D1555_Ctl ................................................................ 80
fxBatchFWA ............................................................................ 81
2 Spirit IT general functions ......................................... 8 fxBatchHistData .................................................................... 82
fx2CellSelection ........................................................................8 fxBatchLatch .......................................................................... 83
fx3CellSelection ........................................................................9 fxBatchMax ............................................................................. 84
fxAGA10_M .............................................................................. 11 fxBatchMin .............................................................................. 85
fxAGA10ex_M .......................................................................... 12 fxBatchTotal ........................................................................... 86
fxAGA3_C ................................................................................. 13 fxBatchTWA ............................................................................ 87
fxAGA5_C ................................................................................. 16 fxBatchWatch ......................................................................... 88
fxAGA8_C ................................................................................. 17 fxConvertUnit ......................................................................... 89
fxAGA8_M ................................................................................ 18 fxDeviationAlarm ................................................................... 90
fxAGA8_Gross ......................................................................... 19 NIST1045 ................................................................................. 91
fxAPI_Dens15C_1952 ............................................................ 20 fxEthylene_IUPAC_C ............................................................. 92
fxAPI_Dens15C_1980 ............................................................. 22 fxEthylene_IUPAC_M ............................................................ 93
fxAPI_Dens15C_NGL_LPG.....................................................25 fxGasViscosity_2004 ............................................................ 94
fxAPI_Dens20C_NGL_LPG ................................................... 28 fxGenerateReport ................................................................. 95
fxAPI_Gravity60F_1952 ......................................................... 31 fxGERG2008_Gas .................................................................. 96
fxAPI_Gravity60F_1980.........................................................33 fxGERG2008_Flash ................................................................ 97
fxAPI_MPMS_11_2_1 .............................................................. 36 fxGPA_TP15 ............................................................................. 98
fxAPI_MPMS_11_2_1M ........................................................... 37 fxGPA2172_96_C .................................................................... 99
fxAPI_MPMS_11_2_2.............................................................. 38 fxGPA2172_96_M.................................................................. 101
fxAPI_MPMS_11_2_2M .......................................................... 39 fxGPA2172_09_C .................................................................. 103
fxAPI_MPMS_11_3_2_1 .......................................................... 40 fxGPA2172_09_M ................................................................. 105
fxAPI_MPMS_11_3_3_2 .......................................................... 41 fxIAPWS_IF97_C ................................................................... 107
fxAPI_RD60F_1980................................................................ 42 fxIAPWS_IF97_M .................................................................. 108
fxAPI_SG60F_1952 ................................................................ 45 fxIndex ................................................................................... 109
fxAPI_RD60F_NGL_LPG ........................................................47 fxInterpolationCurve .......................................................... 110
fxAPI_Table5_1952 ................................................................ 50 fxISO5167_ISA1932Nozzle ................................................... 111
fxAPI_Table5_1980................................................................. 51 fxISO5167_LongRadiusNozzle ........................................... 113
fxAPI_Table5_2004 ................................................................52 fxISO5167_Orifice ................................................................. 115
fxAPI_Table6_1952 .................................................................53 fxISO5167_Venturi ................................................................119
fxAPI_Table6_1980 ............................................................... 54 fxISO5167_VenturiNozzle.................................................... 121
fxAPI_Table6_2004 ............................................................... 55 fxISO6976_1983_M .............................................................. 123
fxAPI_Table23_1952 .............................................................. 56 fxISO6976_1995_M .............................................................. 124
fxAPI_Table23_1980............................................................... 57 fxISO6976ex_1995_M ......................................................... 125
fxAPI_Table23_2004 ............................................................. 58 fxKeypadFallback .................................................................127
fxAPI_Table23E ...................................................................... 59 fxKeypadFallbackArray ...................................................... 128
fxAPI_Table24_1952 .............................................................. 60 fxLatch ................................................................................... 129
fxAPI_Table24_1980 .............................................................. 61 fxLimitAlarm ......................................................................... 130
fxAPI_Table24_2004 ..............................................................62 fxMR113 ................................................................................... 131
fxAPI_Table24E ...................................................................... 63 fxName .................................................................................. 132
fxAPI_Table53_1952 .............................................................. 64 fxNX19_1962 ......................................................................... 133
fxAPI_Table53_1980 ............................................................. 65 fxNX19_M .............................................................................. 134
fxAPI_Table53_2004 ............................................................. 66 fxPeriodFWA ......................................................................... 135
fxAPI_Table53E .......................................................................67 fxPeriodLatch ....................................................................... 136
fxAPI_Table54_1952.............................................................. 68 fxPeriodMax...........................................................................137
fxAPI_Table54_1980 ............................................................. 69 fxPeriodMin .......................................................................... 138
fxAPI_Table54_2004 ............................................................. 70 fxPeriodTotal........................................................................ 139
fxAPI_Table54E ....................................................................... 71 fxPeriodTWA ......................................................................... 140
fxAPI_Table59_2004 .............................................................. 72 fxPeriodWatch ......................................................................141
fxAPI_Table59E ....................................................................... 73 fxPID ....................................................................................... 142
fxAPI_Table60_2004..............................................................74 fxROCAlarm .......................................................................... 145
fxAPI_Table60E....................................................................... 75 fxSarasota_C ........................................................................ 146
fxASTM_D1550_RD60............................................................76 fxSarasota_M ....................................................................... 147
IT
SPIRIT EXLERATE | FUNCTION REFERENCE MANUAL | CM/EXL/FR -EN 3
1 Introduction
Spirit IT Function Library This resulted in the following Petroleum Measurement Tables
dealing with the conversion of volume and density to and from a
The Spirit IT products are based on Microsoft Excel. The Spirit IT reference temperature.
functions are configured as regular Excel functions. By using the
output of one function as an input (argument) in another Number Title
function a complete calculation scheme can be made. Functions 5 API Gravity Reduction to 60°F
can be defined on multiple sheets in order to organize the 6 Reduction of Volume to 60°F Against API Gravity at 60°F
23 Reduction of Observed Specific Gravity to Specific Gravity
application. 60/60°F
24 Reduction of Volume to 60o F Against Specific Gravity 60/60°F
API Petroleum Measurement Tables 53
54
Reduction of Observed Density to Density at 15°C
Reduction of Volume to 15°C Against Density at 15°C
59 Reduction of Observed Density to Density at 20°C
History
60 Reduction of Volume to 20°C Against Density at 20°C
The first version of the API Petroleum Measurement Tables was
published in 1952. In those days measurement readings were
In 2004 the API MPMS 11.1 1980 tables were superseded by a new
taken manually and the tables were used to convert the
set of tables primarily for the following reasons:
observed density or gravity at the observed temperature to the
API 11.1:2004 includes the correction for both temperature
value at the reference temperature. So the table values were the
and pressure in one and the same algorithm
actual standard.
Taken into account the progress in electronics (and for other
reasons) the complex truncating and rounding rules were
The 1952 Tables consists of 58 tables containing all kind of
abandoned. Instead the calculation procedures use double-
correction and conversion factors used in the measurement of
precision floating point math. The input and output values are
hydrocarbon liquids. Each table deals with a particular
still rounded in order to obtain consistent results.
conversion of units, correction of density, or correction of
The convergence methods for the correction of observed
volume. The 1952 tables that have to do with the conversion of
density to base density have been improved.
density and volume are: 5, 6, 23, 24, 53 and 54.
On-line density measurement by densitometers became
Table 5, 6, 23 and 24 convert density or volume to or from to a
common practice, requiring the pressure and temperature
reference temperature of 60°F, while tables 53 and 54 refer to
correction to be incorporated in one ands the same procedure
15°C.
The tables are extended in both temperature and density to
cover lower temperatures and higher densities.
In 1980 a complete new set of tables was published together
The previous standard used a significant digit format which
with computer routines to allow electronic devices to
resulted in 4 or 5 decimal places depending on whether the
automatically calculate the volume conversion factors and API
observed temperature was above or below the reference
gravity / (relative) density at the reference temperature. Back
temperature. The new standard prescribes 5 decimal places if
then most electronic devices were not capable of performing
or both cases.
double-precision floating point calculations, so the standard
The IP paper No. 3 tables were added to accommodate
prescribed all kind of rounding and truncating rules to make sure
conversion to 20°C.
that the calculations would always provide the same result. For
the 1980 version the calculation procedures are the standard
rather than the table values. Tables for lubricating oils including the implementation
procedures are now part of the standard.
In the 1980 version, which is also referred to as API-2540, the
tables are divided into 3 product groups and a letter designation Volume correction for pressure
was used to distinguish between the sub-tables. "A" was used The API MPMS 11.1:1980 Tables only cover the correction for
for crude oil, "B" for refined products and "C" for special temperature. The correction for pressure was published in API
applications. The 1980 tables, however, did not cover the LPGs MPMS standards 11.2.1 and 11.2.2.
and NGLs density ranges and the 1952 Tables were left valid for The correction for pressure is to the atmospheric pressure or,
these products. Furthermore, the lubricating oil tables for products within the lower density range, to the equilibrium
(designated as "D") were not complete at the time of the vapor pressure.
printing in 1980 and were released two years later. As opposed To calculate the equilibrium vapor pressure an Addendum was
to the A, B and C tables no implementation procedures were added to API MPMS 11.2.2. This addendum is also known as GPA
defined for the D tables. TP-15 (1988). In September 2007 the addendum was replaced by
In 1988 the Institute of Petroleum released its Paper No. 3 with a new API standard 11.2.5 and at the same time GPA TP-15 (1988)
tables 59 and 60 that are based on a reference temperature of was updated with a new 2007 revision.
20°C.
IT
SPIRIT EXLERATE | FUNCTION REFERENCE MANUAL | CM/EXL/FR -EN 5
NGL and LPG tables Implementation Procedures for Correcting Densities and
For NGL and LPG products volume correction tables 24E and 23E Volumes to 20 C. Superseded by IP No.3 - 1997
(at 60 °F) were published in GPA TP-25 (1988), so the letter 'E" IP No. 3 - 1997 (Energy Institute (formerly Institute of
was used to distinguish the tables from the related API MPMS A, Petroleum), Petroleum Measurement Paper No 3 Computer
B, C and D tables. Implementation Procedures for Correcting Densities and
GPA TP-25 has been superseded by GPA TP-27 / API MPMS 11.2.4 Volumes to 20 C. Supersedes IP No.3 - 1988
(2007), which includes tables 53E, 54E, 59E and 60E to convert to ISO 91-1 - 1982 Petroleum measurement tables Part 1: Tables
15°C and 20°C as well. All text from TP-25 is included without based on reference temperatures of 15 °C and 60 °F.
technical change, so TP-25 is still viable for conversion to and Superseded by ISO 91-1 1992.
from 60 °F. ISO 91-1 - 1992 Petroleum measurement tables Part 1: Tables
based on reference temperatures of 15 °C and 60 °F.
Overview of hydrocarbon liquid conversion standards Supersedes ISO 91-1 1982.
ASTM-IP Petroleum Measurement Tables, Historical Edition, ISO 91-2 - 1991 Petroleum measurement tables Part 2: Tables
1952 based on reference temperatures of 20 °C
API MPMS Chapter 11.1 - 1980* (Temperature VCFs for OIML R 63 - 1994 Petroleum measurement tables
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
IT
6 SPIRIT EXLERATE | FUNCTION REFERENCE MANUAL | CM/EXL/FR -EN
Range API Gravity [°API] Relative Density [-] Density [kg/m3] Temperature [°F] Temperature [°C]
Data Range 0 .. 40 1.0760 .. 0.8250 1075.0 .. 824.0 0 .. 250 -18..120
40 .. 50 0.8250 .. 0.7795 824.0 .. 778.5 0 .. 200 -18..90
50 .. 55 0.7795 .. 0.7585 778.5 .. 758.0 0 .. 150 -18..60
Extrapolated Range 0 .. 40 1.0760 .. 0.8250 1075.0 .. 824.0 250 .. 300 120..150
40 .. 50 0.8250 .. 0.7795 824.0 .. 778.5 200 .. 250 90..125
50 .. 55 0.7795 .. 0.7585 778.5 .. 758.0 150 .. 200 60..95
55 .. 100 0.7585 .. 0.6110 758.0 .. 610.5 0 .. 200 -18..95
Applies for: Table 5A Table 23A Table 53A Table 5A Table 53A
Table 6A Table 24A Table 54A Table 6A Table 54A
Table 23A
Table 24A
IT
SPIRIT EXLERATE | FUNCTION REFERENCE MANUAL | CM/EXL/FR -EN 7
Range API Gravity [°API] Relative Density [-] Density [kg/m3] Temperature [°F] Temperature [°C]
Data Range 0 .. 40 1.0760 .. 0.8250 1075.0 .. 824.0 0 .. 250 -18..120
40 .. 50 0.8250 .. 0.7795 824.0 .. 778.5 0 .. 200 -18..90
50 .. 85 0.7795 .. 0.6535 778.5 .. 653.0 0 .. 150 -18..60
Extrapolated Range 0 .. 40 1.0760 .. 0.8250 1075.0 .. 824.0 250 .. 300 120..150
40 .. 50 0.8250 .. 0.7795 824.0 .. 778.5 200 .. 250 90..125
50 .. 85 0.7795 .. 0.6535 778.5 .. 653.0 150 .. 200 60..95
Applies for: Table 5B Table 23B Table 53B Table 5B Table 53B
Table 6B Table 24B Table 54B Table 6B Table 54B
Table 23B
Table 24B
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 23D* Table 53D Table 5D Table 53D
Table 6D Table 24D* Table 54D Table 6D Table 54D
Table 23D*
Table 24D*
* Values derived from Table 5D/6D
API-2540 - Rounding and truncating rules For tables 6A, 6B, 24A, 24B and 54A and 54B the standard makes
For each table API Standard 2540 specifies an explicit a distinction between computational and table values for the
'Calculation Procedure' that includes the rounding and calculated VCF. The table values are always rounded to 4 decimal
truncating of all the input, intermediate and output values. The places, whereas the computational values has 4 decimal places
'Calculation Procedure' is considered to be the standard rather when the VFC >=1 and 5 decimal places when the VCF < 1.
than the table values or a set of equations.
When API rounding is enabled the convergence limit is set to the
The function provides the option to either apply the full API limit value as specified in the standard. When the API rounding is
rounding and truncating requirements or to perform the disabled the convergence limit is set to 0.00001 kg/m3 to obtain
calculation procedure without any rounding and truncating highest precision.
being applied.
API-11.1:2004 Limits
Range Density Temperature Pressure
Crude Oil 610.6..1163.5 kg/m3 @ 60°F -58..302 °F 0..1500 psig
100..-10 API @ 60°F -50..150 °C 0..103.4 bar(g)
0.61120..1.16464 RD @ 60°F
611.16..1163.79 kg/m3 @ 15°C
606.12..1161.15 kg/m3 @ 20°C
Refined products 610.6..1163.5 kg/m3 @ 60°F -58..302 °F 0..1500 psig
100..-10 API @ 60°F -50..150 °C 0..103.4 bar(g)
0.61120..1.16464 RD @ 60°F
611.16..1163.86 kg/m3 @ 15°C
606.12..1160.62 kg/m3 @ 20°C
Lubricating oils 800.9..1163.5 kg/m3 @ 60°F -58..302 °F 0..1500 psig
45..-10 API @ 60°F -50..150 °C 0..103.4 bar(g)
0.80168..1.1646 RD @ 60°F
801.25..1163.85 kg/m3 @ 15°C
798.11..1160.71 kg/m3 @ 20°C
fx2CellSelection
The function selects between 2 input cells (e.g. differential The function can handle the following type of cell range
pressure cells) based on the actual measured value and the configurations:
failure status of each cell. 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’ RNGTYP
1: Lo Hi
Cell A at low range
Cell B at high range
2: Hi Hi
Cell A and B at same range
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
fx3CellSelection
The function selects between 3 input cells (typically differential The function can handle the following type of cell range
pressure cells) based on the actual measured value and the configurations:
failure status of each cell. 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’ RNGTYP
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
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
Does not apply for selection type ‘Hi Hi Hi’
Switch-down percentage Switch-down value expressed as percentage of span of the lower range - SWDNPERC 0..100 90
Does not apply for selection type ‘Hi Hi Hi’
Select cell C when cell A and cell B fail and cell C is healthy
fxAGA10_M
The function calculates the speed of sound of a gas at the Boundaries
specified conditions of temperature and pressure using the The AGA-10 calculation has defined uncertainty bounds for gas
formulae presented in the American Gas Association Report No mixtures that lie within the 'Normal range'. Also an 'Expanded
10. range' of gas mixtures is defined for which the AGA-10
calculation has a higher uncertainty. Using the AGA-10
Compliance calculation for gas mixtures that lie outside the 'Expanded range'
AGA Report No. 10 - Speed of Sound in Natural Gas and Other is not recommended.
Related Hydrocarbon Gases, January 2003. 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’.
Calculations
Calculations are as documented in the standard.
IT
12 SPIRIT EXLERATE | FUNCTION REFERENCE MANUAL | CM/EXL/FR -EN
fxAGA10ex_M
The extended AGA 10 function provides an extensive set of gas Boundaries
properties at the specified conditions of temperature and The AGA-10 calculation has defined uncertainty bounds for gas
pressure using the formulae presented in the American Gas mixtures that lie within the 'Normal range'. Also an 'Expanded
Association Report No 10. range' of gas mixtures is defined for which the AGA-10
calculation has a higher uncertainty. Using the AGA-10
Compliance calculation for gas mixtures that lie outside the 'Expanded range'
AGA Report No. 10 - Speed of Sound in Natural Gas and Other is not recommended.
Related Hydrocarbon Gases, January 2003 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’.
Calculations
Calculations are as documented in the standard.
IT
SPIRIT EXLERATE | FUNCTION REFERENCE MANUAL | CM/EXL/FR -EN 13
fxAGA3_C
The function calculates the mass flow rate for Orifice pressure Compliance
differential flow devices according to the AGA-3 standard for AGA Report No. 3 - Orifice Metering Measurement of fluid flow
orifice meters with flange taps. 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 inH2O @ 60°F 0..1000 0
downstream pressure tappings, which need to be in the positions as
specified in the standard
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..2000 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 DYNVIS 0..10 6.9e-6
Isentropic Exponent Also referred to as (kappa). For an ideal gas this coefficient is equal to - KAPPA 0..10 1.3
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.
Pipe Diameter Internal diameter of the pipe at reference temperature inches PIPEDIAM 0..100 0
Pipe Expansion factor The thermal expansion coefficient of the pipe material 1/°F PIPEEXPF 0..1 6.2e-6
Pipe Reference The reference temperature that corresponds to the 'Pipe diameter' input °F PIPEREFT -400..2000 68
temperature value
Orifice Diameter Orifice diameter at reference temperature inches ORIFDIAM 0..100 0
Orifice Expansion factor The thermal expansion coefficient of the orifice material 1/°F ORIFEXPF 0..1 9.25e-6
Typical values are:
Orifice Reference The reference temperature that corresponds to the 'Orifice diameter' input °F ORIFREFT -400..2000 68
Temperature value
Pressure Location 1: Upstream tapping - PRESLOC 1
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).
Temperature Location 1: Upstream tapping - TEMPLOC 3
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.
Temperature Correction 1: Use (1-)/ - TEMPCOR 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 [-]
Temperature Exponent To correct the temperature from down- to upstream conditions (or vice TEMPEXP 0
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'.
Density Location This parameter specifies if and how the density should be corrected from - DENSLOC 0
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).
Density Exponent. This factor is used when density correction is enabled. The formula 1/ will - DENSEXP 0
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'.
IT
14 SPIRIT EXLERATE | FUNCTION REFERENCE MANUAL | CM/EXL/FR -EN
Calculations Where:
The calculations are in accordance with the standard. p1 Pressure at upstream tapping psia
p2 Pressure at downstream tapping psia
p3 Fully recovered downstream pressure psia
Pressure correction p Differential pressure inH20 @ 60°F
The relation between the pressure at the upstream tapping p1 pLOSS Pressure loss over the meter psi
and the pressure at the downstream tapping (p2) is as C Discharge coefficient as calculated by the -
standard
following: α Flow coefficient -
p K units β Diameter ratio at the upstream pressure and -
p 2 p1 temperature
1000 E Velocity of approach factor -
Kunits Unit conversion factor to convert a value -
The relation between the pressure at the upstream tapping
expressed in 'inH2O @60°F' to the corresponding
and the downstream tapping is as following: expressed in 'psi' (conversion as specified in
p 3 p1 p LOSS section 'Unit Types')
1 p K
2
Temperature correction
p LOSS
1 2 units When input 'Temperature correction' is set to 1, then an
isentropic expansion based on the isentropic coefficient is
CE applied:
1
E
1 4
IT
SPIRIT EXLERATE | FUNCTION REFERENCE MANUAL | CM/EXL/FR -EN 15
1
p
t 1 t 2 459.67 2 459.67
p1
1
p
t 1 t 3 459.67 3 459.67
p1
When input 'Temperature correction' is set to 2, then an
isentropic expansion based on input 'Temperature exponent'
KTE
p2
is applied: t 1 t 2 459.67
p 459.67
1
KTE
p
t 1 t 3 459.67 3 459.67
p1
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 1
p p
1 2 1 1 3 1
p2 p3
Else the value of input 'Density Exponent' is used
K DE K DE
p p
1 2 1 1 3 1
p2 p3
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 -
IT
16 SPIRIT EXLERATE | FUNCTION REFERENCE MANUAL | CM/EXL/FR -EN
fxAGA5_C
The AGA 5 standard defines methods to calculate the mass and Compliance
volume based calorific values at 60°F and 14.73 psia for a natural A.G.A. Transmission Measurement Committee Report No. 5
gas based on known molar fractions of the non-hydrocarbon gas (Fuel gas Energy Metering) 1981
components. A.G.A. Transmission Measurement Committee Report No. 5
(Fuel gas Energy Metering) 1996 (Reprinted 1999)
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.
IT
SPIRIT EXLERATE | FUNCTION REFERENCE MANUAL | CM/EXL/FR -EN 17
fxAGA8_C
The compressibility and density of a gas are calculated from the Input value Normal Range Expanded EU
Range
composition, temperature and pressure in accordance with the
Pressure 0 .. 20000 0 .. 20000 psia
‘Detail Characterization’ method outlined in the AGA-8 standard, Temperature -200 .. +400 -200 .. +400 °F
with the input and output values in US Customary units. 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 -
Compliance
Mole fraction of Butanes 0.00 .. 0.01 0.00 .. 0.06 -
AGA Report No. 8, Second edition November 1992 - 2nd Mole fraction of Pentanes 0.00 .. 0.003 0.00 .. 0.04 -
printing July 1994 Mole fraction of Hexanes Plus 0.00 .. 0.002 * -
API MPMS 14.2, Second edition November 1992 - 2nd printing 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 -
July 1994
Mole fraction of Nitrogen 0.00 .. 0.50 0.00 .. 1.00 -
ISO 12213 Natural gas — Calculation of compression factor — Mole fraction of Helium 0.00 .. 0.002 0.00 .. 0.03 -
Part 2: Calculation using molar-composition analysis, 1997 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 -
Boundaries Mole fraction of Hydrogen 0.00 .. 0.10 0.00 .. 1.00 -
The AGA-8 calculation has defined uncertainty bounds for gas Mole fraction of Water 0.00 .. 0.0005 * -
mixtures that lie within the 'Normal range'. Also an 'Expanded * For these components the dew point temperature is the upper limit. Limit check
range' of gas mixtures is defined for which the AGA-8 calculation is ignored for reason of simplicity.
Calculations
The calculations are as documented in the standard.
IT
18 SPIRIT EXLERATE | FUNCTION REFERENCE MANUAL | CM/EXL/FR -EN
fxAGA8_M
The compressibility and density of a gas are calculated from its Input value Normal Range Expanded EU
Range
composition, temperature and pressure in accordance with the
Pressure 0 .. 1379 0 .. 1379 bar(a)
‘Detail Characterization’ method outlined in the AGA8 standard, Temperature -129 .. +204 -129 .. +204 °C
with the input and output values in metric units. 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 -
Compliance
Mole fraction of Butanes 0.00 .. 0.01 0.00 .. 0.06 -
AGA Report No. 8, Second edition November 1992 - 2nd Mole fraction of Pentanes 0.00 .. 0.003 0.00 .. 0.04 -
printing July 1994 Mole fraction of Hexanes Plus 0.00 .. 0.002 * -
API MPMS 14.2, Second edition November 1992 - 2nd printing Mole fraction of Carbon 0.00 .. 0.03 0.00 .. 0.03 -
monoxide
July 1994 Mole fraction of Carbon dioxide 0.00 .. 0.30 0.00 .. 1.00 -
ISO 12213 Natural gas — Calculation of compression factor — Mole fraction of Nitrogen 0.00 .. 0.50 0.00 .. 1.00 -
Part 2: Calculation using molar-composition analysis, 1997 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 -
Boundaries Mole fraction of Hydrogen 0.00 .. 0.0002 0.00 .. 1.00 -
The AGA-8 calculation has defined uncertainty bounds for gas Sulphide
Mole fraction of Hydrogen 0.00 .. 0.10 0.00 .. 1.00 -
mixtures that lie within the 'Normal range'. Also an 'Expanded
Mole fraction of Water 0.00 .. 0.0005 * -
range' of gas mixtures is defined for which the AGA-8 calculation
* For these components the dew point temperature is the upper limit. Limit check
has a higher uncertainty. Using the AGA-8 calculation for gas is ignored for reason of simplicity.
mixtures that lie outside the 'Expanded range' is not
recommended.
Calculations
The calculations are as documented in the standard.
IT
SPIRIT EXLERATE | FUNCTION REFERENCE MANUAL | CM/EXL/FR -EN 19
fxAGA8_Gross
This function calculates the compressibility factor in accordance Boundaries
with the AGA-8 Gross Characterization Method. Although the The AGA8 standard recommends using the Gross
AGA-8 Gross Method is based on the Standard GERG Virial Characterization Method only when input conditions lie within
Equation Of State (SGERG) there are slight differences in the the following range. For conditions outside this range the
results. standard recommends to use the Detailed Characterization
Two different methods are specified by the standard. Method 1 Method.
takes the Pressure, Temperature, Specific Gravity (Relative
Density), Carbon Dioxide content and Gross Heating Value (GHV) Input value Normal Range EU
Temperature 32..130 °F
as inputs. Method 2 takes the same inputs except for the
Pressure 0 .. 1200 psia
Nitrogen content instead of GHV. Gross heating value 475 .. 1210 Btu/ft3
Relative density 0.554 .. 0.87 -
Compliance Carbon dioxide 0.00 .. 0.30 mol/mol
Nitrogen 0.00 .. 0.50 mol/mol
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
Calculations
The calculations are in accordance with the standard.
IT
20 SPIRIT EXLERATE | FUNCTION REFERENCE MANUAL | CM/EXL/FR -EN
fxAPI_Dens15C_1952
Compliance
Density (T, P) <--> Density (15°C, equilibrium pressure)
ASTM-IP Petroleum Measurement Tables, Metric Edition,
Metric Units of Measurement, 1952
This function converts a density value at the observed API MPMS 11.2.1M - Compressibility Factors for Hydrocarbons:
temperature and pressure to the density at 15°C and the 638 - 1074 Kilograms per Cubic Meter Range - First Edition,
equilibrium pressure (typically 0 barg) or vice versa. August 1984
The temperature conversion is according to ASTM-IP Petroleum
Measurements Tables 1952 (Also known as API-1952 tables)
Table 54.
Calculations The CTL value is determined from the Density at [15 C,
The calculations depend on the conversion method. equilibrium pressure] according to API 1952 Table 54.
The Density at [15 C, equilibrium pressure] is calculated from
Conversion method 1: from observed to standard conditions. the Observed Density, the new CTL value and the CPL value
The function performs the following iterative algorithm to from the previous iteration.
calculate the Density at standard conditions: The compressibility factor is calculated according to API
At the start of the iteration the initial value for Density at [15 MPMS 11.2.1M from the density at [15 C, equilibrium pressure]
C, equilibrium pressure] is set to the Observed Density. The and the 'Observed temperature'. If API 11.2.1M rounding is
initial CPL value is set to 1. enabled then the density and temperature are rounded and
IT
SPIRIT EXLERATE | FUNCTION REFERENCE MANUAL | CM/EXL/FR -EN 21
fxAPI_Dens15C_1980
Compliance
Density (T, P) <--> Density (15°C, equilibrium pressure)
API MPMS 11.1 Volume X (API Standard 2540) - Table 53A -
Generalized Crude Oils, Correction of Observed Density to
This function converts a density value at the observed Density at 15°C - First Edition, August 1980
temperature and pressure to the density value at 15°C and the API MPMS 11.1 Volume X (API Standard 2540) - Table 54A -
equilibrium pressure (typically 0 bar(g)) or vice versa. Generalized Crude Oils, Correction of Volume to 15°C against
The temperature conversion is according to API-2540, Tables Density at 15°C- First Edition, August 1980
53A/54A (Generalized Crude Oils) and 53B/54B (Refined Oil API MPMS 11.1 Volume X (API Standard 2540) - Table 53B -
Products) and API MPMS 11.1 Chapter XIV Table 53D/54D: 1984 Generalized Products, Correction of Observed Density to
(Lubricating Oils), while the volume correction for pressure Density at 15°C - First Edition, August 1980
according to API MPMS 11.2.1M. API MPMS 11.1 Volume X (API Standard 2540) - Table 54B -
An iterative calculation needs to be applied to convert the Generalized Products, Correction of Volume to 15°C against
observed density to the value at base conditions. Density at 15°F - First Edition, August 1980
API MPMS 11.1 Volume XIV - Table 53D - Generalized
NOTE: this function is a combination of API2540 and API 11.2.1M. Lubricating Oils, Correction of Observed Density to Density at
For the calculation from observed to standard conditions an 15°C - January 1982
iterative calculation is required. The rounding and truncating of API MPMS 11.1 Volume XIV - Table 54D - Generalized
input and intermediate values is implemented such that the Lubricating Oils, Correction of Volume to 15°C against Density
example calculations as specified in both standards are exactly at 15°F - January 1982
reproduced. API MPMS 11.2.1M - Compressibility Factors for Hydrocarbons:
638 - 1074 Kilograms per Cubic Meter Range - First Edition,
August 1984
Equilibrium pressure The equilibrium pressure is considered to be 0 bar(g) for liquids which have bar(g) EQUIPRES 0..150 0
an equilibrium pressure less than atmospheric pressure (in compliance with
API MPMS 12.2 par. 12.2.5.4)
Conversion method 1: From observed to standard conditions CONVERSION 1
2: From standard to observed conditions
fxAPI_Dens15C_NGL_LPG
Compliance
Density (T, P) <--> Density (15°C, Pe)
API MPMS 11.2.4: Temperature Correction for the Volume of
NGL and LPG Tables 23E, 24E, 53E, 54E, 59E & 60E, September
This function converts the density value at the observed 2007
temperature and pressure to the density value at 15°C and the GPA TP-27: Temperature Correction for the Volume of NGL
equilibrium pressure or vice versa. and LPG Tables 23E, 24E, 53E, 54E, 59E & 60E, September
The temperature correction is according to API MPMS 11.2.4:2007 2007
(GPA TP-27), while the pressure correction is according to API API MPMS Chapter 11.2.2M - 1986 (Compressibility Factors for
MPMS 11.2.2M:1984. Hydrocarbons: 350-637 kg/m3 Density (15°C) and –46°C to
The calculation of the equilibrium pressure is according to GPA 60°C)
TP-15 (API MPMS 11.2.2 Addendum:1994). 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 - 0..750 0
the observed temperature and pressure or at 15 °C and the equilibrium
pressure
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 API1124RND 0
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
API 11.2.2M rounding 0: Disabled API1122RND 0
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
Equilibrium pressure 1: Use Input EQUIPMODE 2
mode 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
Equilibrium pressure Only used when input 'Equilibrium pressure mode' is set to 'Use input'. bar(a) EQUIPINP 0
value The value will be used for the calculation of the CPL
GPA TP-15 rounding Only used when 'Equilibrium pressure mode is set to 'GPA TP-15' - TP15RND 0
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
P100 Correlation Only used when 'Equilibrium pressure mode is set to 'GPA TP-15' - P100CORR 0
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.
Vapor pressure at 100°F Only used when 'Equilibrium pressure mode is set to 'GPA TP-15' and the bar(a) EQUIP100F 0..200 0
P100 correlation is enabled.
Conversion method 1: From observed to standard conditions CONVMETH 1
2: From standard to observed conditions
Function outputs
Name Remark EU SW tag Alarm Fallback
Status 0: Normal - STS 1
1: Input argument out of range FIOOR
IT
26 SPIRIT EXLERATE | FUNCTION REFERENCE MANUAL | CM/EXL/FR -EN
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
If API 11.2.4 rounding is enabled, then the density at [15C,
equilibrium pressure] is rounded to 0.1
fxAPI_Dens20C_NGL_LPG
Compliance
Density (T, P) <--> Density (20°C, Pe)
API MPMS 11.2.4: Temperature Correction for the Volume of
NGL and LPG Tables 23E, 24E, 53E, 54E, 59E & 60E, September
This function converts the density value at the observed 2007
temperature and pressure to the density value at 20°C and the GPA TP-27: Temperature Correction for the Volume of NGL
equilibrium pressure or vice versa. and LPG Tables 23E, 24E, 53E, 54E, 59E & 60E, September
The temperature correction is according to API MPMS 11.2.4:2007 2007
(GPA TP-27), while the pressure correction is according to API API MPMS Chapter 11.2.2M - 1986 (Compressibility Factors for
MPMS 11.2.2M:1984. Hydrocarbons: 350-637 kg/m3 Density (15°C) and –46°C to
The calculation of the equilibrium pressure is according to GPA 60°C)
TP-15 (API MPMS 11.2.2 Addendum:1994). 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 kg/m3 0..750 0
observed temperature and pressure or at 20 °C and the equilibrium pressure
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 API1124RND 0
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
API 11.2.2M rounding 0: Disabled API1122RND 0
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
Equilibrium pressure 1: Use Input EQUIPMODE 2
mode 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
Equilibrium pressure value Only used when input 'Equilibrium pressure mode' is set to 0. bar(a) EQUIPINP 0
The value will be used for the calculation of the CPL
GPA TP-15 rounding 0: Disabled - TP15RND 0
Full precision (no rounding and truncating applied)
1: Enabled
Rounding as defined in ' GPA TP15:1988 / API MPMS 11.2.2 Addendum':1994
P100 Correlation 0: Disabled - P100CORR 0
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.
Vapor pressure at 100°F bar(a) EQUIP100F 0..200 0
Conversion method 1: From observed to standard conditions CONVMETH 1
2: From standard to observed conditions
Function outputs
Name Remark EU SW tag Alarm Fallback
Status 0: Normal - STS 1
1: Input argument out of range FIOOR
Outputs will be set to fallback values
2: Calculation error CALC
Outputs will be set to fallback values
3: No convergence within 15 iterations NOCONV
Outputs will be set to values of last iteration
IT
SPIRIT EXLERATE | FUNCTION REFERENCE MANUAL | CM/EXL/FR -EN 29
fxAPI_Gravity60F_1952
NOTE: this function is a combination of the API 1952 Tables and
°API (T, P) <--> °API (60°F, equilibrium pressure)
API 11.2.1. For the calculation from observed to standard
conditions an iterative calculation is required. The rounding and
This function calculates the API gravity value at the observed
truncating of input and intermediate values is implemented such
temperature and pressure to the API gravity value at 60°F and
that the example calculations as specified in both standards are
the equilibrium pressure (typically 0 psig) or vice versa.
exactly reproduced.
Calculations The CTL value is determined from the API Gravity at [60 F,
The calculations depend on the conversion method. equilibrium pressure] according to API 1952 Table 6.
The API Gravity at [60 F, equilibrium pressure] is calculated
Conversion method 1: from observed to standard conditions. from the Observed API gravity, the new CTL value and the CPL
The function performs the following iterative algorithm to value from the previous iteration.
calculate the API Gravity at standard conditions: Because API 11.2.1 requires the API gravity value at 60 F, the
At the start of the iteration the initial value for API Gravity at API gravity at [60 F, equilibrium pressure] is calculated from
[60 F, equilibrium pressure] is set to the Observed API the API gravity at [60 F, equilibrium pressure].
Gravity. The initial CPL value is set to 1.
IT
32 SPIRIT EXLERATE | FUNCTION REFERENCE MANUAL | CM/EXL/FR -EN
fxAPI_Gravity60F_1980
Compliance
°API (T, P) <--> °API (60°F, equilibrium pressure)
API MPMS 11.1 Volume X (API Standard 2540) - Table 5A -
Generalized Crude Oils, Correction of Observed API Gravity to
This function calculates the API gravity value at the observed
API Gravity at 60°F - First Edition, August 1980
temperature and pressure to the API gravity value at 60°F and
API MPMS 11.1 Volume X (API Standard 2540) - Table 5B -
the equilibrium pressure (typically 0 psig) or vice versa.
Generalized Products, Correction of Observed API Gravity to
The volume correction for temperature is according to API-2540,
API Gravity at 60°F- First Edition, August 1980
Tables 5/6A (Generalized Crude Oils) and 5/6B (Refined Oil
API MPMS 11.1 Volume XIII - Table 5D - Generalized Lubricating
Products) and API MPMS 11.1 Chapter XIII Table 5D: 1984
Oils, Correction of Observed API Gravity to API Gravity at 60°F
(Lubricating Oils), while the volume correction for pressure
- January 1982
according to API MPMS 11.2.1.
API MPMS 11.1 Volume X (API Standard 2540) - Table 6A -
Generalized Crude Oils, Correction of Volume to 60°F against
NOTE: this function is a combination of API2540 and API 11.2.1.
API Gravity at 60°F - First Edition, August 1980
For the calculation from observed to standard conditions an
API MPMS 11.1 Volume X (API Standard 2540) - Table 6B -
iterative calculation is required. The rounding and truncating of
Generalized Products, Correction of Volume to 60°F against
input and intermediate values is implemented such that the
API Gravity at 60°F - First Edition, August 1980
example calculations as specified in both standards are exactly
API MPMS 11.1 Volume XIII - Table 6D - Generalized Lubricating
reproduced.
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
fxAPI_MPMS_11_2_1
The API MPMS 11.2.1 standard consists of a printed table that Boundaries
contains compressibility factors to correct hydrocarbon volumes API MPMS 11.2.1 defines the following limits on the input values:
under pressure to the corresponding volumes at the equilibrium 0 to 90 °API
pressure for the metered temperature. -20 to +200 °F
The table contains compressibility factors related to meter 0 to 1500 psig.
temperature and API gravity at 60°F.
From the compressibility factor the volume correction for API Rounding
pressure is calculated according to API MPMS 12.2. The actual standard is the printed table. It also includes the
'Calculation Procedure' to obtain the table values based on the
Compliance rounding and truncating of all input, intermediate and output
API MPMS 11.2.1 - Compressibility Factors for Hydrocarbons: 0 values.
- 90°API Gravity Range - First Edition, August 1984 The function provides the option to either output the table value
API MPMS 12.2 - Calculation of Liquid Petroleum Quantities (including the full API rounding and truncating requirements) or
Measured by Turbine or Displacement Meters to perform the calculation procedure without any rounding and
truncating being applied.
Calculations With:
The calculations are in either full or partial compliance with the If Pe > 0 then CPL Volume correction -
factor for pressure
standards, depending on whether API rounding is enabled or 1
not and on the actual number of decimal places for the CPL CPL F Compressibility 1/p
1 F ( Po Pe) factor si
value (API MPMS 12.2 defines 4 decimal places for the CPL Po Observed pressure psig
Pe Equilibrium psig
value).
Else pressure
The CPL value is calculated as follows (in compliance with API
MPMS 12.2): 1
CPL
1 F Po
IT
SPIRIT EXLERATE | FUNCTION REFERENCE MANUAL | CM/EXL/FR -EN 37
fxAPI_MPMS_11_2_1M
The API MPMS 11.2.1M standard consists of a printed table that Data Limits
contains compressibility factors to correct hydrocarbon volumes API MPMS 11.2.1M defines the following limits on the input
under pressure to the corresponding volumes at the equilibrium values:
pressure for the metered temperature.
The table contains compressibility factors related to meter 638 to 1074 kg/m3
temperature and density at 15°C. -30 to 90 °C
This metric standard corresponds with API MPMS 11.2.1 (the 0 to 103 bar(g).
customary version).
It is advised not to use the standard outside these limits.
Compliance
11.2.1M - Compressibility Factors for Hydrocarbons: 638 - 1074
Kilograms per Cubic Meter Range - First Edition, August 1984
API MPMS 12.2 - Calculation of Liquid Petroleum Quantities
Measured by Turbine or Displacement Meters
Function inputs
Name Remark EU SW tag Range Default
Name Optional tag name, tag description and tag group
Density at 15°C kg/m3 0..1300 0
Observed temperature °C -100..200 15
Observed pressure bar(g) -1..150 0
Equilibrium pressure The equilibrium pressure is considered to be 0 bar(g) for liquids which have an bar(g) EQUIPRES 0
equilibrium pressure less than atmospheric pressure (in compliance with API MPMS 12.2
par. 12.2.5.4)
API 11.2.1M rounding 0: Disabled - APIROUND 0
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 in accordance with the standard.
Function outputs
Name Remark EU SW tag Alarm Fallback
Status 0: Normal STS 1
1: Input argument out of range FIOOR
2: Calculation error CALC
Calculations
The calculations are in either full or partial compliance with the Else
standards, depending on whether API rounding is enabled or not 1
CPL
and on the actual number of decimal places for the CPL value 1 F Po
(API MPMS 12.2 defines 4 decimal places for the CPL value).
The CPL value is calculated as follows (in compliance with API CPL Volume correction factor for pressure -
MPMS 12.2): F Compressibility factor 1/bar
Po Observed pressure bar(g)
If Pe > 0 then Pe Equilibrium pressure bar(g)
1
CPL
1 F ( Po Pe)
IT
38 SPIRIT EXLERATE | FUNCTION REFERENCE MANUAL | CM/EXL/FR -EN
fxAPI_MPMS_11_2_2
The API MPMS 11.2.2 standard consists of a printed table that Pseudo-critical temperature check
contains compressibility factors to correct hydrocarbon volumes The standard specifies that the observed temperature must be
under pressure to the corresponding volumes at the equilibrium less than the pseudo-critical temperature.
pressure for the metered temperature.
The table contains compressibility factors related to meter Observed Temperature [Rankin] < Pseudo Critical Temperature *
temperature and the relative density at 60°F. 0.96
Compliance With:
11.2.2 - Compressibility Factors for Hydrocarbons: 0.350 - Pseudo Critical Temperature [Rankin] = 621.418 - 822.686 * RD60
0.637 Relative Density (60°F/60°F) and -50°F to 140°F + 1737.86 * RD60^2
Metering Temperature - Second Edition, October 1986 Observed Temperature [Rankin] = Observed Temperature [°F] +
459.7;
Boundaries
API MPMS 11.2.2 defines the following limits on the input values: API Rounding
The actual standard is the printed table. Also included is a
0.350 to 0.637 (relative density) 'Calculation Procedure' that illustrates how to obtain the table
-50 to 140 °F values including all required rounding and truncating of the
0 to 2200 psig input, intermediate and output values.
The function provides the option to either output the table value
(including all the full API rounding and truncating requirements)
or to perform the calculation procedure without any rounding
and truncating being applied.
Calculations
The calculations are in either full or partial compliance with the
standard, depending on the selected type of API rounding.
IT
SPIRIT EXLERATE | FUNCTION REFERENCE MANUAL | CM/EXL/FR -EN 39
fxAPI_MPMS_11_2_2M
The API MPMS 11.2.2M standard consists of a printed table that Boundaries
contains compressibility factors to correct hydrocarbon volumes API MPMS 11.2.2M defines the following limits on the input
under pressure to the corresponding volumes at the equilibrium values:
pressure for the metered temperature. 350 to 637 kg/m3
The table contains compressibility factors related to meter -46 to 60 °C
temperature and the density at 15°C. 0 to 152 bar(g)
This metric standard corresponds with API MPMS 11.2.2 (the U.S.
customary version) Also the check on the pseudo-critical temperature as defined for
fxAPI_MPMS_11_2_2 is applied.
Compliance
11.2.2M - Compressibility Factors for Hydrocarbons: 350 - 637
Kilograms per Cubic Meter Density (15°C) and -46°C to 60 °C
Metering Temperature - First Edition, October 1986
Calculations
The calculations are in either full or partial compliance with the
standard, depending on the selected type of API rounding.
IT
40 SPIRIT EXLERATE | FUNCTION REFERENCE MANUAL | CM/EXL/FR -EN
fxAPI_MPMS_11_3_2_1
The function calculates the density of Ethylene (C2H4, also called Boundaries
Ethene) based on the API MPMS 11.3.2.1 Equation Of State in USC The equation of state is valid from 65…165 °F and 200 … 2100
units. This API chapter is also known as API Standard 2565. psia.
References
Supplement to API MPMS 11.3.1.1 (API Std. 1565) Ethylene
Density, 1974, Reaffirmed 1993.
Calculations
The calculations are in compliance with the standard.
IT
SPIRIT EXLERATE | FUNCTION REFERENCE MANUAL | CM/EXL/FR -EN 41
fxAPI_MPMS_11_3_3_2
The API MPMS 11.3.3.2 standard consists of a table with the Boundaries
density values (lbm/ft3) of propylene liquid as a function of The Calculation Procedure of API MPMS 11.3.3.2 defines the
pressure and temperature. Also part of the standard is the following limits on the input values:
Calculation Procedure to obtain the table values. 30 to 165 °F
0 to 1600 psig
Compliance
API MPMS 11.3.3.2 Propylene Compressibility Tables, 1974,
Reaffirmed 1997.
Calculations
The calculations are in full or partial compliance with the
standard depending on input ‘API rounding’.
IT
42 SPIRIT EXLERATE | FUNCTION REFERENCE MANUAL | CM/EXL/FR -EN
fxAPI_RD60F_1980
Compliance
Relative Density (T, P) <--> Relative Density (60°F,
API MPMS 11.1 Volume X (API Standard 2540) - Table 23A -
equilibrium pressure)
Generalized Crude Oils, Correction of Observed Relative
Density to Relative Density at 60/60°F - First Edition, August
This function converts a relative density value at the observed
1980
temperature and pressure to the relative density at 60°F and the
API MPMS 11.1 Volume X (API Standard 2540) - Table 23B -
equilibrium pressure (typically 0 psig) or vice versa.
Generalized Products, Correction of Observed Relative
The temperature conversion is according to API-2540, Tables
Density to Relative Density at 60/60°F - First Edition, August
23A/24A (Generalized Crude Oils) and 23B/24B (Refined Oil
1980
Products), while the volume correction for pressure according to
API MPMS 11.1 Volume X (API Standard 2540) - Table 24A -
API MPMS 11.2.1.
Generalized Crude Oils, Correction of Volume to 60°F against
In 1982 API published tables 5D, 6D, 53D and 54D for lubricating
Relative Density at 60/60°F - First Edition, August 1980
oil products as part of API MPMS 11.1. Although tables 23D and
API MPMS 11.1 Volume X (API Standard 2540) - Table 24B -
24D are not covered in an official API standard the Spirit IT
Generalized Products Correction of Volume to 60°F against
products support tables 23D and 24D as well by combining the
Relative Density at 60/60°F - First Edition, August 1980
calculation of tables 23A/B and 24A/B with the K0 and K1
API MPMS 11.2.1 - Compressibility Factors for Hydrocarbons: 0
constants published in the other tables for lubricating oils.
- 90°API Gravity Range - First Edition, August 1984
The CPL value is calculated from the compressibility factor The CPL value is calculated from the compressibility factor
and the 'Observed pressure' and 'Equilibrium pressure' input and the 'Observed pressure' and 'Equilibrium pressure' input
values. values.
The density at [60F, equilibrium pressure] is calculated by The relative density at observed temperature and pressure is
dividing the observed density by CTL and the new CPL value. calculated from the input relative density and the CTL and the
If API2540 rounding is enabled then the density at [60F, CPL values.
equilibrium pressure] value is rounded to 3 decimal places as
specified in the standard.
The relative density at [60 F, equilibrium pressure] is
calculated from the density at [60 F, equilibrium pressure]
If API2540 rounding is enabled then the relative density at
[60F, equilibrium pressure] value is rounded to 4 decimal
places as specified in the standard.
Steps 5 through 17 are repeated taking the density value from
step 14 as the start value for the next iteration 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.
For refined products the entire iteration loop is repeated if
the relative density at [60F, equilibrium pressure] appears to
be in a different product region than the observed relative
density. This is required because a different product region
means different K0, K1 and K2 factors.
If API 11.2.4 rounding is enabled, then the relative density
value at [60F, equilibrium pressure] is rounded to 0.0001
fxAPI_SG60F_1952
Compliance
Specific Gravity (T, P) <--> Specific Gravity (60°F,
ASTM-IP Petroleum Measurement Tables, American Edition,
equilibrium pressure)
United States Units of Measurement, 1952
API MPMS 11.2.1 - Compressibility Factors for Hydrocarbons: 0
This function converts a specific gravity value at the observed - 90°API Gravity Range - First Edition, August 1984
temperature and pressure to the specific gravity at 60°F and the
equilibrium pressure (typically 0 psig) or vice versa.
The temperature conversion is according to ASTM-IP Petroleum
Measurements Tables 1952 (Also known as API-1952 tables)
Table 24.
Calculations At the start of the iteration the initial value for Specific
The calculations depend on the conversion method. Gravity at [60 F, equilibrium pressure] is set to the Observed
Specific Gravity. The initial CPL value is set to 1.
Conversion method 1: from observed to standard conditions. The CTL value is determined from the Specific Gravity at [60
The function performs the following iterative algorithm to F, equilibrium pressure] according to API 1952 Table 24.
calculate the Specific Gravity at standard conditions: The Specific Gravity at [60 F, equilibrium pressure] is
calculated from the Observed specific gravity, the new CTL
value and the CPL value from the previous iteration.
IT
46 SPIRIT EXLERATE | FUNCTION REFERENCE MANUAL | CM/EXL/FR -EN
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 Specific gravity at [60 F, equilibrium pressure].
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.
The CPL value is calculated from the compressibility factor
and the 'Observed pressure' and 'Equilibrium pressure' input
values.
The Specific Gravity at [60F, equilibrium pressure] is
calculated by dividing the Observed Specific Gravity by the
CTL and the new CPL value.
Steps 2 through 7 are repeated taking the specific gravity
value from step 7 as the start value for the next iteration until
the absolute difference between two consecutive specific
gravity values is 0.0001.
fxAPI_RD60F_NGL_LPG
Compliance
Relative Density (T, P) <--> Relative Density (60°F, Pe)
API MPMS 11.2.4: Temperature Correction for the Volume of
NGL and LPG Tables 23E, 24E, 53E, 54E, 59E & 60E, September
This function converts the relative density value at the observed 2007
temperature and pressure to the relative density value at 60°F GPA TP-27: Temperature Correction for the Volume of NGL
and the equilibrium pressure or vice versa. and LPG Tables 23E, 24E, 53E, 54E, 59E & 60E, September
2007
The temperature correction is according to API MPMS 11.2.4:2007 GPA TP-25: Temperature Correction for the volume of Light
(GPA TP-25 / GPA TP-27), while the pressure correction is Hydrocarbons – Tables 24E and 23E, 1998
according to API MPMS 11.2.2:1984. API MPMS 11.2.2 - Compressibility Factors for Hydrocarbons:
0.350 - 0.637 Relative Density (60°F/60°F) and -50°F to 140°F
The calculation of the equilibrium pressure is according to GPA Metering Temperature - Second Edition, October 1986
TP-15 (API MPMS 11.2.2 Addendum:1994). 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 relative density Depending on the conversion method this represents the relative density - 0..0.75 0
either at the observed temperature and pressure or at 60 °F and the
equilibrium pressure
Observed temperature Temperature at which the relative density is observed °F -100..300 60
Observed pressure Pressure at which the relative density is observed psia -10..2500 0
API 11.2.4 rounding 0: Disabled API1124RND 0
The calculations are performed with full precision and the output values are
not rounded
1: Enabled
The input and output values are rounded as defined in the standard
API 11.2.2 rounding 0: Disabled API1122RND 0
The calculations are performed with full precision and the output values are
not rounded
1: Enabled
The input and output values are rounded as defined in the standard
Equilibrium pressure mode 1: Use Input EQUIPMODE 2
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
Equilibrium pressure value Only used when input 'Equilibrium pressure mode' is set to 'Use input'. psia EQUIPINP 0
The value will be used for the calculation of the CPL
GPA TP-15 rounding 0: Disabled - TP15RND 0
Full precision (no rounding and truncating applied)
1: Enabled
Rounding as defined in ' GPA TP15:1988 / API MPMS 11.2.2 Addendum':1994
P100 Correlation 0: Disabled - P100CORR 0
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.
Vapor pressure at 100°F psia EQUIP100F 0..2500 0
Conversion method 1: From observed to standard conditions CONVMETH 1
2: From standard to observed conditions
Function outputs
Name Remark EU SW tag Alarm Fallback
Status 0: Normal - STS
1: Input argument out of range FIOOR
IT
48 SPIRIT EXLERATE | FUNCTION REFERENCE MANUAL | CM/EXL/FR -EN
fxAPI_Table5_1952
Compliance
°API (T) --> °API (60°F)
ASTM-IP Petroleum Measurement Tables, American Edition,
United States Units of Measurement, 1952
This function converts an API gravity value at the observed
temperature to the API gravity value at 60°F in accordance with
API 1952 Table 5.
Calculations
The table values are the standard, so no calculations are
involved. The function performs an interpolation between the
table values that correspond to the input values.
IT
SPIRIT EXLERATE | FUNCTION REFERENCE MANUAL | CM/EXL/FR -EN 51
fxAPI_Table5_1980
Compliance
°API (T) --> °API (60°F)
API MPMS 11.1 Volume X (API Standard 2540) - Table 5A -
Generalized Crude Oils, Correction of Observed API Gravity to
This function converts an API gravity value at the observed API Gravity at 60°F - First Edition, August 1980
temperature to the API gravity value at 60°F. API MPMS 11.1 Volume X (API Standard 2540) - Table 5B -
The temperature conversion is according to API MPMS 11.1:1980 Generalized Products, Correction of Observed API Gravity to
(API-2540), Tables 5A (Generalized Crude Oils) and 5B (Refined API Gravity at 60°F- First Edition, August 1980
Oil Products) and API MPMS 11.1 Chapter XIII Table 5D: 1984 API MPMS 11.1 Volume XIII - Table 5D - Generalized Lubricating
(Lubricating Oils). Oils, Correction of Observed API Gravity to API Gravity at 60°F
The function provides the option to correct for readings taken - January 1982
from a hydrometer as specified in the API-2540 standard.
Calculations
The calculations are in full or partial compliance with the
standard depending on input ‘API 2540 rounding’.
IT
52 SPIRIT EXLERATE | FUNCTION REFERENCE MANUAL | CM/EXL/FR -EN
fxAPI_Table5_2004
An iterative calculation needs to be applied to convert the
°API (T, P) --> °API (60°F, 0 psig)
observed API gravity to the value at base conditions.
This function converts an API gravity value at the observed NOTE: As opposed to API-2540, the 2004 standard does not
temperature and pressure to the API gravity value at 60°F and 0 include a correction for readings taken from a hydrometer and
psig. assumes that the equilibrium pressure is below atmospheric
pressure, so taking 0 psig as the base pressure.
The temperature and pressure correction is according to API
MPMS 11.1:2004. Compliance
API MPMS 11.1 Temperature and Pressure Volume Correction
Factors for Generalized Crude Oils, Refined Products and
Lubricating Oils, May 2004
Calculations
The calculations are in either full or partial compliance with the
standard, depending on whether API rounding is enabled or
not.
IT
SPIRIT EXLERATE | FUNCTION REFERENCE MANUAL | CM/EXL/FR -EN 53
fxAPI_Table6_1952
Boundaries
°API (60°F, 0 psig) --> CTL
Table 6 contains values for the following range:
This function calculates the volume correction factor for Input value Normal Range EU
API Gravity at 60 °F 0 .. 100 °API
temperature from the API gravity value at 60°F and the observed
Observed temperature 0 .. 300 °F
temperature according to API 1952 Table 6.
Note that the table does not cover the full range, e.g. for an API
Compliance
gravity of 70 the table only specifies values between 0 .. 150 °F.
ASTM-IP Petroleum Measurement Tables, American Edition,
United States Units of Measurement, 1952
Calculations
The table values are the standard, so no calculations are
involved. The function performs an interpolation between the
table values that correspond to the input values.
IT
54 SPIRIT EXLERATE | FUNCTION REFERENCE MANUAL | CM/EXL/FR -EN
fxAPI_Table6_1980
Compliance
°API (60°F, 0 psig) --> CTL
API MPMS 11.1 Volume X (API Standard 2540) - Table 6A -
Generalized Crude Oils, Correction of Volume to 60°F against
This function calculates the volume correction factor for API Gravity at 60°F - First Edition, August 1980
temperature from the API gravity value at 60°F and the observed API MPMS 11.1 Volume X (API Standard 2540) - Table 6B -
temperature. Generalized Products, Correction of Volume to 60°F against
The temperature conversion is according to API-2540, Tables 6A API Gravity at 60°F - First Edition, August 1980
(Generalized Crude Oils) and 6B (Refined Oil Products) and API API MPMS 11.1 Volume XIII - Table 6D - Generalized Lubricating
MPMS 11.1 Chapter XIII Table 6D: 1984 (Lubricating Oils). Oils, Correction of Volume to 60°F Against API Gravity at 60°F
- January 1982
Calculations
The calculations are in full or partial compliance with the
standard depending on input ‘API 2540 rounding’.
IT
SPIRIT EXLERATE | FUNCTION REFERENCE MANUAL | CM/EXL/FR -EN 55
fxAPI_Table6_2004
NOTE: As opposed to API-2540 that the equilibrium pressure is
°API (60°F, 0 psig) --> °API (T, P)
below atmospheric pressure, so taking 0 psig as the base
pressure.
This function converts an API gravity value at 60°F and 0 psig to
the API gravity value at the observed temperature and pressure. Compliance
The temperature and pressure correction is according to API API MPMS 11.1 Temperature and Pressure Volume Correction
MPMS 11.1:2004. Factors for Generalized Crude Oils, Refined Products and
Lubricating Oils, May 2004
Function inputs Remark EU SW tag Range Default
Name Optional tag name, tag description and tag group
API at 60 °F API gravity at 60°F and 0 psig °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
Product 1: A - Crude Oil PRDTYP 1
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
API rounding 0: Disabled APIROUND 0
The calculations are performed with full precision
1: Enabled
The input and output values are rounded in compliance with the standard.
The CTL, CPL and CTPL value are rounded to 5 decimal places.
Calculations
The calculations are in either full or partial compliance with the
standard, depending on whether API rounding is enabled or not.
IT
56 SPIRIT EXLERATE | FUNCTION REFERENCE MANUAL | CM/EXL/FR -EN
fxAPI_Table23_1952
Boundaries
Specific Gravity (T) --> Specific Gravity (60°F)
Table 23 contains values for the following range:
This function converts a specific gravity value at the observed Input value Normal Range EU
temperature to the specific gravity at 60° according to the API Observed specific gravity 0.420 .. 1.099
1952 Table 23. Observed temperature 0 .. 150 °F
Compliance Note that the table does not cover the full range, e.g. for an
ASTM-IP Petroleum Measurement Tables, American Edition, Observed specific gravity of 0.420 the table only specifies values
United States Units of Measurement, 1952 between 120 .. 140 °F
Calculations
The table values are the standard, so no calculations are
involved. The function performs an interpolation between the
table values that correspond to the input specific gravity and
input temperature.
fxAPI_Table23_1980
An iterative calculation needs to be applied to convert the
Relative Density (T) --> Relative Density (60°F)
observed relative density to the value at base conditions.
The function provides the option to correct for readings taken
This function converts a relative density value at the observed
from a hydrometer as specified in the API-2540 standard.
temperature to the relative density at 60°.
The temperature conversion is according to API-2540, Tables 23A
Compliance
(Generalized Crude Oils) and 23B (Refined Oil Products.
API MPMS 11.1 Volume X (API Standard 2540) - Table 23A -
In 1982 API published tables 5D, 6D, 53D and 54D for lubricating
Generalized Crude Oils, Correction of Observed Relative
oil products as part of API MPMS 11.1. Although tables 23d and
Density to Relative Density at 60/60°F - First Edition, August
24d are not covered in an official API standard the Spirit IT
1980
productssupport tables 23D and 24D as well by combining the
API MPMS 11.1 Volume X (API Standard 2540) - Table 23B -
calculation of tables 23A/B and 24A/B with the K0 and K1
Generalized Products, Correction of Observed Relative
constants published in the other tables for lubricating oils.
Density to Relative Density at 60/60°F - First Edition, August
1980
Calculations
The calculations are in full or partial compliance with the
standard depending on input ‘API 2540 rounding’.
IT
58 SPIRIT EXLERATE | FUNCTION REFERENCE MANUAL | CM/EXL/FR -EN
fxAPI_Table23_2004
NOTE: As opposed to API-2540, the 2004 standard does not
Relative Density (T, P) --> Relative Density (60°F, 0 psig)
include a correction for readings taken from a hydrometer and
assumes that the equilibrium pressure is below atmospheric
This function converts a relative density value at the observed pressure, so taking 0 psig as the base pressure.
temperature and pressure to the relative density value at 60°F
and 0 psig. Compliance
API MPMS 11.1 Temperature and Pressure Volume Correction
The temperature and pressure correction is according to API Factors for Generalized Crude Oils, Refined Products and
MPMS 11.1:2004. Lubricating Oils, May 2004
An iterative calculation needs to be applied to convert the
observed relative density to the value at base conditions.
Calculations
The calculations are in either full or partial compliance with the
standard, depending on whether API rounding is enabled or not.
IT
SPIRIT EXLERATE | FUNCTION REFERENCE MANUAL | CM/EXL/FR -EN 59
fxAPI_Table23E
Compliance
Relative Density (T) --> Relative Density (60°F)
API MPMS 11.2.4: Temperature Correction for the Volume of
NGL and LPG Tables 23E, 24E, 53E, 54E, 59E & 60E, September
This function converts the relative density value at the observed 2007
temperature to the corresponding relative density at 60°F. GPA TP-27: Temperature Correction for the Volume of NGL
The temperature correction is according to API MPMS 11.2.4:2007 and LPG Tables 23E, 24E, 53E, 54E, 59E & 60E, September
(GPA TP-25 / GPA TP-27). 2007
GPA TP-25: Temperature Correction for the volume of Light
Hydrocarbons – Tables 24E and 23E, 1998
Function inputs Remark EU SW tag Range Default
Name Optional tag name, tag description and tag group
Observed relative density Relative density at the observed temperature - 0..0.75 0
Observed temperature Temperature at which the relative density is observed °F -100..300 60
API rounding 0: Disabled APIROUND 0
The calculations are performed with full precision and the output values are
not rounded
1: Enabled
The input and output values are rounded as defined in the standard
Calculations
The calculations are in either full or partial compliance with the
standard, depending on the selected type of API rounding.
IT
60 SPIRIT EXLERATE | FUNCTION REFERENCE MANUAL | CM/EXL/FR -EN
fxAPI_Table24_1952
Boundaries
Specific Gravity (60°F) --> CTL
Table 23 contains values for the following range:
Compliance Note that the table does not cover the full range, e.g. for an
ASTM-IP Petroleum Measurement Tables, American Edition, Specific gravity at 60 °F of 0.500 the table only specifies values
United States Units of Measurement, 1952 between -50 .. 95 °F
Calculations
The table values are the standard, so no calculations are
involved. The function performs an interpolation between the
table values that correspond to the input specific gravity and
input temperature.
fxAPI_Table24_1980
Compliance
Relative Density (60°F) --> CTL
API MPMS 11.1 Volume X (API Standard 2540) - Table 24A -
Generalized Crude Oils, Correction of Volume to 60°F against
This function calculates the volume correction factor for
Relative Density at 60/60°F - First Edition, August 1980
temperature CTL from the relative density value at 60°F and the
API MPMS 11.1 Volume X (API Standard 2540) - Table 24B -
observed temperature.
Generalized Products, Correction of Volume to 60°F against
The temperature conversion is according to API-2540, Tables
Relative Density at 60/60°F - First Edition, August 1980
24A (Generalized Crude Oils) and 24B (Refined Oil Products.
In 1982 API published tables 5D, 6D, 53D and 54D for lubricating
oil products as part of API MPMS 11.1. Although tables 23d and
24d are not covered in an official API standard the Spirit IT
products support tables 23D and 24D as well by combining the
calculation of tables 23A/B and 24A/B with the K0 and K1
constants published in the other tables for lubricating oils.
Calculations
The calculations are in full or partial compliance with the
standard depending on input ‘API 2540 rounding’.
IT
62 SPIRIT EXLERATE | FUNCTION REFERENCE MANUAL | CM/EXL/FR -EN
fxAPI_Table24_2004
NOTE: The 2004 standard assumes that the equilibrium pressure
Relative Density (60°F, 0 psig) --> Relative Density (T, P)
is below atmospheric pressure, so taking 0 psig as the base
pressure.
This function converts a relative density value at 60°F and 0 psig
to the relative density value at the observed temperature and Compliance
pressure. API MPMS 11.1 Temperature and Pressure Volume Correction
The temperature and pressure correction is according to API Factors for Generalized Crude Oils, Refined Products and
MPMS 11.1:2004. Lubricating Oils, May 2004
Calculations
The calculations are in either full or partial compliance with the
standard, depending on whether API rounding is enabled or not.
IT
SPIRIT EXLERATE | FUNCTION REFERENCE MANUAL | CM/EXL/FR -EN 63
fxAPI_Table24E
Compliance
Relative Density (60°F) --> CTL
API MPMS 11.2.4: Temperature Correction for the Volume of
NGL and LPG Tables 23E, 24E, 53E, 54E, 59E & 60E, September
This function calculates the volume correction factor for 2007
temperature from the relative density value at 60°F and the GPA TP-27: Temperature Correction for the Volume of NGL
observed temperature. and LPG Tables 23E, 24E, 53E, 54E, 59E & 60E, September
The temperature correction is according to API MPMS 11.2.4:2007 2007
(GPA TP-25 / GPA TP-27). GPA TP-25: Temperature Correction for the volume of Light
Hydrocarbons – Tables 24E and 23E, 1998
Function inputs Remark EU SW tag Range Default
Name Optional tag name, tag description and tag group
Relative density at 60 °F Relative density at 60°F - 0..0.75 0
Observed temperature Temperature at which the relative density is observed °F -100..300 60
API rounding 0: Disabled APIROUND 0
The calculations are performed with full precision and the output values
are not rounded
1: Enabled
The input and output values are rounded as defined in the standard
Calculations
The calculations are in either full or partial compliance with the
standard, depending on the selected type of API rounding.
IT
64 SPIRIT EXLERATE | FUNCTION REFERENCE MANUAL | CM/EXL/FR -EN
fxAPI_Table53_1952
Boundaries
Density (T) --> Density (15°C)
Table 53 contains values for the following range:
This function converts a density value at the observed Input value Normal Range EU
temperature to the density at 15°C according to the API 1952 Observed density 420 .. 1099 kg/m3
Table 53. Observed temperature -25 .. 125 °C
Compliance Note that the table does not cover the full range, e.g. for an
ASTM-IP Petroleum Measurement Tables, Metric Edition, Observed specific gravity of 0.420 the table only specifies values
Metric Units of Measurement, 1952 between 45 .. 60 °C
Calculations
The table values are the standard, so no calculations are
involved. The function performs an interpolation between the
table values that correspond to the input specific gravity and
input temperature.
fxAPI_Table53_1980
Compliance
Density (T) --> Density (15°C)
API MPMS 11.1 Volume X (API Standard 2540) - Table 53A -
Generalized Crude Oils, Correction of Observed Density to
This function converts a density value at the observed
Density at 15°C - First Edition, August 1980
temperature to the density value at 15°C.
API MPMS 11.1 Volume X (API Standard 2540) - Table 53B -
The temperature conversion is according to API-2540, Tables 53A
Generalized Products, Correction of Observed Density to
(Generalized Crude Oils) and 53B (Refined Oil Products) and API
Density at 15°C - First Edition, August 1980
MPMS 11.1 Chapter XIV Table 53D: 1984 (Lubricating Oils).
API MPMS 11.1 Volume XIV - Table 53D - Generalized
The function provides the option to correct for readings taken
Lubricating Oils, Correction of Observed Density to Density at
from a hydrometer as specified in the API-2540 standard.
15°C - January 1982
Calculations
The calculations are in full or partial compliance with the
standard depending on input ‘API 2540 rounding’.
IT
66 SPIRIT EXLERATE | FUNCTION REFERENCE MANUAL | CM/EXL/FR -EN
fxAPI_Table53_2004
NOTE: As opposed to API-2540, the 2004 standard does not
Density (T, P) --> Density (15°C, 0 bar(g))
include a correction for readings taken from a hydrometer and
assumes that the equilibrium pressure is below atmospheric
This function converts a density value at the observed pressure, so taking 0 psig as the base pressure.
temperature and pressure to the density value at 15°C and 0
bar(g). Compliance
The temperature and pressure correction is according to API API MPMS 11.1 Temperature and Pressure Volume Correction
MPMS 11.1:2004. Factors for Generalized Crude Oils, Refined Products and
An iterative calculation needs to be applied to convert the Lubricating Oils, May 2004
observed density to the value at base conditions.
Calculations
The calculations are in either full or partial compliance with the
standard, depending on whether API rounding is enabled or not.
IT
SPIRIT EXLERATE | FUNCTION REFERENCE MANUAL | CM/EXL/FR -EN 67
fxAPI_Table53E
Compliance
Density (T) --> Density (15°C)
API MPMS 11.2.4: Temperature Correction for the Volume of
NGL and LPG Tables 23E, 24E, 53E, 54E, 59E & 60E, September
This function converts the density value at the observed 2007
temperature to the corresponding density at 15°C. GPA TP-27: Temperature Correction for the Volume of NGL
The temperature correction is according to API MPMS 11.2.4:2007 and LPG Tables 23E, 24E, 53E, 54E, 59E & 60E, September
(GPA TP-27). 2007
Calculations
The calculations are in either full or partial compliance with the
standard, depending on the selected type of API rounding.
IT
68 SPIRIT EXLERATE | FUNCTION REFERENCE MANUAL | CM/EXL/FR -EN
fxAPI_Table54_1952
Boundaries
Density (15°C) --> CTL
Table 54 contains values for the following range:
This function determines the volume correction factor for Input value Normal Range EU
temperature CTL from the relative density value at 15°C and the Density at 15 °C 500 .. 1100 kg/m3
observed temperature according to the API 1952 Table 54. Observed temperature -50 .. +150 °C
Compliance Note that the table does not cover the full range, e.g. for a
ASTM-IP Petroleum Measurement Tables, Metric Edition, Density at 15 °C of 500 kg/m3the table only specifies values
Metric Units of Measurement, 1952 between -50 .. 55 °C
Calculations
The table values are the standard, so no calculations are
involved. The function performs an interpolation between the
table values that correspond to the input specific gravity and
input temperature.
fxAPI_Table54_1980
Compliance
Density (15°C) --> CTL
API MPMS 11.1 Volume X (API Standard 2540) - Table 54A -
Generalized Crude Oils, Correction of Volume to 15°C against
This function calculates the volume correction factor for
Density at 15°F - First Edition, August 1980
temperature CTL from the relative density value at 15°C and the
API MPMS 11.1 Volume X (API Standard 2540) - Table 54B -
observed temperature.
Generalized Products, Correction of Volume to 15°C against
The temperature conversion is according to API-2540, Tables
Density at 15°C - First Edition, August 1980
54A (Generalized Crude Oils) and 54B (Refined Oil Products) and
API MPMS 11.1 Volume XIV - Table 54D - Generalized
API MPMS 11.1 Chapter XIV Table 54D: 1984 (Lubricating Oils).
Lubricating Oils, Correction of Volume to 15°C Against Density
at 15°C - January 1982
Calculations
The calculations are in full or partial compliance with the
standard depending on input ‘API 2540 rounding’.
IT
70 SPIRIT EXLERATE | FUNCTION REFERENCE MANUAL | CM/EXL/FR -EN
fxAPI_Table54_2004
NOTE: The 2004 standard assumes that the equilibrium pressure
Density (15°C, 0 bar(g)) --> Density (T, P)
is below atmospheric pressure, so taking 0 psig as the base
pressure.
This function converts a density value at 15°C and 0 bar(g) to the
density value at the observed temperature and pressure. Compliance
The temperature and pressure correction is according to API API MPMS 11.1 Temperature and Pressure Volume Correction
MPMS 11.1:2004. Factors for Generalized Crude Oils, Refined Products and
Lubricating Oils, May 2004
Function inputs Remark EU SW tag Range Default
Name Optional tag name, tag description and tag group
Density at 15 °C Density at 15°C and 0 bar(g) kg/m3 0..1300 0
Observed temperature Temperature at which the density is observed °C -100..200 15
Observed pressure Pressure at which the density is observed bar(g) -1..150 0
Product 1: A - Crude Oil PRDTYP 1
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
API rounding 0: Disabled APIROUND 0
The calculations are performed with full precision and the final CTL, CPL and
CTPL values are rounded as specified by the inputs 'CTL / CPL/ CTPL decimal
places'
1: Enabled
The input and output values are rounded in compliance with the standard. The
CTL, CPL and CTPL value are rounded to 5 decimal places.
Calculations
The calculations are in either full or partial compliance with the
standard, depending on whether API rounding is enabled or
not.
IT
SPIRIT EXLERATE | FUNCTION REFERENCE MANUAL | CM/EXL/FR -EN 71
fxAPI_Table54E
Compliance
Density (15°C) --> CTL
API MPMS 11.2.4: Temperature Correction for the Volume of
NGL and LPG Tables 23E, 24E, 53E, 54E, 59E & 60E, September
This function calculates the volume correction factor for 2007
temperature from the relative density value at 15°C and the GPA TP-27: Temperature Correction for the Volume of NGL
observed temperature. and LPG Tables 23E, 24E, 53E, 54E, 59E & 60E, September
2007
The temperature correction is according to API MPMS 11.2.4:2007
(GPA TP-27).
Calculations
The calculations are in either full or partial compliance with the
standard, depending on the selected type of API rounding.
IT
72 SPIRIT EXLERATE | FUNCTION REFERENCE MANUAL | CM/EXL/FR -EN
fxAPI_Table59_2004
NOTE: As opposed to API-2540, the 2004 standard does not
Density (T, P) --> Density (20°C, 0 bar(g))
include a correction for readings taken from a hydrometer and
assumes that the equilibrium pressure is below atmospheric
This function converts a density value at the observed pressure, so taking 0 psig as the base pressure.
temperature and pressure to the density value at 20°C and 0
bar(g). The temperature and pressure correction is according to Compliance
API MPMS 11.1:2004. API MPMS 11.1 Temperature and Pressure Volume Correction
An iterative calculation needs to be applied to convert the Factors for Generalized Crude Oils, Refined Products and
observed density to the value at base conditions. Lubricating Oils, May 2004
Calculations
The calculations are in either full or partial compliance with the
standard, depending on whether API rounding is enabled or
not.
IT
SPIRIT EXLERATE | FUNCTION REFERENCE MANUAL | CM/EXL/FR -EN 73
fxAPI_Table59E
Compliance
Density (T) --> Density (20°C)
API MPMS 11.2.4: Temperature Correction for the Volume of
NGL and LPG Tables 23E, 24E, 53E, 54E, 59E & 60E, September
This function converts the density value at the observed 2007
temperature to the corresponding density at 20°C. GPA TP-27: Temperature Correction for the Volume of NGL
The temperature correction is according to API MPMS 11.2.4:2007 and LPG Tables 23E, 24E, 53E, 54E, 59E & 60E, September
(GPA TP-27). 2007
Calculations
The calculations are in either full or partial compliance with the
standard, depending on the selected type of API rounding.
IT
74 SPIRIT EXLERATE | FUNCTION REFERENCE MANUAL | CM/EXL/FR -EN
fxAPI_Table60_2004
NOTE: The 2004 standard assumes that the equilibrium pressure
Density (20°C, 0 bar(g)) --> Density (T, P)
is below atmospheric pressure, so taking 0 psig as the base
pressure.
This function converts a density value at 20°C and 0 bar(g) to the
density value at the observed temperature and pressure. Compliance
The temperature and pressure correction is according to API API MPMS 11.1 Temperature and Pressure Volume Correction
MPMS 11.1:2004. Factors for Generalized Crude Oils, Refined Products and
Lubricating Oils, May 2004
Calculations
The calculations are in either full or partial compliance with the
standard, depending on whether API rounding is enabled or
not.
IT
SPIRIT EXLERATE | FUNCTION REFERENCE MANUAL | CM/EXL/FR -EN 75
fxAPI_Table60E
Compliance
Density (20°C) --> CTL
API MPMS 11.2.4: Temperature Correction for the Volume of
NGL and LPG Tables 23E, 24E, 53E, 54E, 59E & 60E, September
This function calculates the volume correction factor for 2007
temperature from the relative density value at 20°C and the GPA TP-27: Temperature Correction for the Volume of NGL
observed temperature. and LPG Tables 23E, 24E, 53E, 54E, 59E & 60E, September
2007
The temperature correction is according to API MPMS 11.2.4:2007
(GPA TP-27).
Calculations
The calculations are in either full or partial compliance with the
standard, depending on the selected type of API rounding.
IT
76 SPIRIT EXLERATE | FUNCTION REFERENCE MANUAL | CM/EXL/FR -EN
fxASTM_D1550_RD60
This function calculates the relative density at 60°F and 0 psig of Boundaries
Butadiene based on ASTM Designation 1550. The ASTM-D1550 ASTM D1550 table 1 consists of table values with a resolution of
standard specifies several tables. This function uses table 1, 0.005 for the relative density and 1°F for the temperature. The
which contains values for the relative density at 60°F as a function applies a linear interpolation between table values
function of the observed relative density and the observed based on the input values. The table specifies relative density at
temperature. The compressibility factor is calculated in 60°F values that are limited to a low value of 0.621 and a high
accordance with API MPMS 11.2.2:1984. value of 0.634. When the combination of input values lies outside
the range covered by the table, the function outputs either the
Compliance low or high table value depending on whether the input values
ASTM Designation: D1550 -94 (Reapproved 2005), Standard lay below or above the table limits.
ASTM Butadiene Measurement Table 1 Reduction of observed Data
specific gravity to specific gravity at 15.6/15. °C (60/60°F) API MPMS 11.2.2 applies for the following range:
API MPMS 11.2.2 - Compressibility Factors for Hydrocarbons: 0.350 to 0.637 (relative density)
0.350 - 0.637 Relative Density (60°F/60°F) and -50°F to 140°F -50 to 140 °F
Metering Temperature - Second Edition, October 1986 0 to 2200 psig
Calculations setting ‘API 11.2.2. rounding’ the rounding and truncation rules
The function performs the following iterative algorithm to of API 11.2.2. are applied for this step.
calculate the relative density at 60 °F and 0 psig. No rounding is The CPL value is calculated from the calculated
applied. compressibility factor and the 'Observed pressure' input
At the start of the iteration the relative density at [60 F, 0 value.
psig] is set equal to the observed relative density and the CPL The new value for relative density at [60F, 0 psig] is
value is set to 1. calculated by dividing the observed density by the CTL and
The relative density corrected for pressure is calculated by CPL values.
dividing the observed relative density by the CPL value. Steps 2 through 6 are repeated until the absolute difference
The CTL value and the relative density at [60 F, equilibrium between two consecutive relative density values is less than
pressure] is calculated from the relative density corrected for the convergence limit of 1e-8.
pressure and the observed temperature according to ASTM When no convergence is achieved in 20 iterations then the
D1550 Table 1 status output is set to ‘No convergence’ and the relative
The compressibility factor F is calculated according to API density output is set to 0.
MPMS 11.2.2 from the relative density at [60 F, equilibrium
pressure] and the 'Observed temperature'. Depending on
IT
SPIRIT EXLERATE | FUNCTION REFERENCE MANUAL | CM/EXL/FR -EN 77
fxASTM_D1550_Ctl
This function calculates the Ctl value (VCF) of Butadiene based Compliance
on the ASTM Designation 1550. The standard specifies several ASTM Designation: D1550 -94 (Reapproved 2005), Standard
tables. This function uses table 2, which contains values for the ASTM Butadiene Measurement Table 2 Reduction of Observed
volume correction factor as a function of the relative density at Volume to 15.6°C (60°F) Against Specific Gravity 60/60°F
60°F and the observed temperature.
Calculations
The Standard consists of a set of table values with a resolution
of 0.001 for the relative density at 60°F and 1°F for temperature.
The function applies a linear interpolation between table values
based on the unrounded input values. When an input value lies
outside the range of the table the function limits the input value
to the minimum or maximum value of the table.
IT
78 SPIRIT EXLERATE | FUNCTION REFERENCE MANUAL | CM/EXL/FR -EN
fxASTM_D1555_Dens60F
This function calculates the relative density at 60°F and 0 psig Boundaries
according ASTM Designation 1555. The ASTM-D1550 standard The standard defines an upper limit for the temperature of 150°F
specifies equations for the calculation of Ctl, the liquid for p-xylene and 140°F for all other products.
correction factor for temperature, for several aromatic
hydrocarbons and cyclohexane as a function of the observed API MPMS 11.2.1 defines the following limits on the input values:
temperature. The compressibility factor is calculated in 0 to 90 °API
accordance with API MPMS 11.2.1:1984. -20 to +200 °F
0 to 1500 psig.
Compliance
ASTM Designation: D1555 -04, Standard Test Method for
Calculation of Volume and Weight of Industrial Aromatic
Hydrocarbons and Cyclohexane
API MPMS 11.2.1 - Compressibility Factors for Hydrocarbons: 0
- 90°API Gravity Range - First Edition, August 1984
Calculations
ASTM D1555 contains both formulas and tables for the Ctl (called The function performs the following iterative algorithm to
VCF in the standard) for the different product. Please note the calculate the relative density at 60 °F and 0 psig. No rounding is
formulas are the standard and not the tables. This function applied.
therefore applies the formula to calculate the Ctl value.
IT
SPIRIT EXLERATE | FUNCTION REFERENCE MANUAL | CM/EXL/FR -EN 79
At the start of the iteration the density at [60 F, 0 psig] is set
equal to the observed density and the CPL value is set to 1.
The density corrected for pressure is calculated by dividing
the observed density by the CPL value.
The CTL value and the density at [60 F, equilibrium pressure]
is calculated from the density corrected for pressure and the
observed temperature according to ASTM D1555
The compressibility factor F is calculated according to API
MPMS 11.2.1 from the density at [60 F, equilibrium pressure]
and the 'Observed temperature'. Depending on setting ‘API
11.2.1 rounding’ the rounding and truncation rules of API 11.2.1
are applied for this step.
The CPL value is calculated from the calculated
compressibility factor and the 'Observed pressure' input
value.
The new value for density at [60F, 0 psig] is calculated by
dividing the observed density by the CTL and CPL values.
Steps 2 through 6 are repeated until the absolute difference
between two consecutive relative density values is less than
the convergence limit of 1e-8.
fxASTM_D1555_Ctl
This function calculates the Ctl value from the observed Boundaries
temperature for several aromatic hydrocarbons and cyclohexane The standard defines an upper limit for the temperature of 150°F
based on the ASTM Designation 1555. for p-xylene and 140°F for all other products.
Compliance
ASTM Designation: D1555 -04, Standard Test Method for
Calculation of Volume and Weight of Industrial Aromatic
Hydrocarbons and Cyclohexane
Calculations
ASTM D1555 contains both formulas and tables for the Ctl (called
VCF in the standard) for the different product. Please note the
formulas are the standard and not the tables. This function
therefore applies the formula to calculate the Ctl value.
IT
SPIRIT EXLERATE | FUNCTION REFERENCE MANUAL | CM/EXL/FR -EN 81
fxBatchFWA
The function calculates a flow-weighted average (FWA) for a
batch.
A batch can be any batch type of process, such as product
loading, meter proving or transmitter validation.
The function weights the input value with a flow increment and
updates the average accordingly. The flow increment is provided
by either a ‘fxTotalizerDelta’ or a ‘xTotalizerRate’ function.
fxBatchHistData
The function retrieves historical 'batch' data from the flow fxBatchFWA
computer persistent memory. fxBatchLatch
A 'batch' can be any batch type of process, such as product fxBatchStore
loading, meter proving or transmitter validation. fxBatchTotal
The function retrieves one or more historical values for the fxBatchTWA
specified function instance. The function instance must be one fxBatchWatch
of the following function types:
The function instance is referred to by its name (i.e. the 1st
argument of the referred function).
fxBatchLatch
The function latches a value at every batch reset.
NOTE: When the latch and reset commands are given at the same time, then the current value becomes the 'Previous latch' output
value and the current latch is reset to 0.
fxBatchMax
The function determines the maximum for a particular input
value over a batch.
fxBatchMin
The function determines the minimum for a particular input
value over a batch.
fxBatchTotal
The function accumulates a flow increment into a batch total. At
every batch reset the current batch total is stored into the
previous value and the current value is reset to 0.
fxBatchTWA
The function calculates a time-weighted average (TWA) for a
batch. At a batch reset the current average is stored in the
previous value and the current value is reset to 0.
The function weights the input value with the time (in fact the
actual calculation cycle time) and updates the average
accordingly.
fxBatchWatch
The function 'remembers' that a condition has been valid during
a batch.
fxConvertUnit
This function converts a value expressed in a particular unit into
the corresponding value expressed in another unit.
The input and output unit must belong category, otherwise the
conversion fails.
fxDeviationAlarm
The function watches the deviation, or the difference or
discrepancy, between two values and generates an alarm when
the deviation exceeds the specified limit.
Logic
Deviation type = 1 (Absolute)
A deviation alarm is raised when the absolute difference
between the two values is greater than the ‘Discrepancy limit’.
NIST1045
The function calculates the density of Ethylene (C2H4, also called Boundaries
Ethene) based on the NIST-1045 Equation Of State in metric The equation of state is valid from 104 K to 400 K (-170 .. +127 °C)
units. and for pressures up to 40 MPa (400 bar).
References
R.D. McCarty and R.T. Jacobsen “An Equation of State for Fluid
Ethylene”, National Bureau of Standards (NBS), US, Technical
Note 1045, 1981.
Calculations
The calculations are in compliance with the standard.
IT
92 SPIRIT EXLERATE | FUNCTION REFERENCE MANUAL | CM/EXL/FR -EN
fxEthylene_IUPAC_C
The function calculates the compressibility factor and the Boundaries
density of Ethylene (C2H4, also called Ethene) based on the The limits of the tables are 104 K to 320 K (-272 .. +116 °F) for
Equation Of State published by IUPAC and in US customary pressures up to 270 MPa (39160 psi) and 104K to 450K (-272 ..
units. +350 °F) for pressures up to 40 MPa (5800 psi).
References
Ethylene (Ethene), International Thermodynamic Tables of the
Fluid State Vol. 10 (1988), IUPAC, ISBN 0-63201-7090.
Calculations
The calculations are in compliance with the standard.
IT
SPIRIT EXLERATE | FUNCTION REFERENCE MANUAL | CM/EXL/FR -EN 93
fxEthylene_IUPAC_M
The function calculates the compressibility factor and the Boundaries
density of Ethylene (C2H4, also called Ethene) based on the The limits of the tables are 104 K to 320 K (-170 .. +47 °C) for
Equation Of State published by IUPAC and in metric units. pressures up to 270 MPa (2700 bar) and 104K to 450K (-170 ..
+177 °C) for pressures up to 40 MPa (400 bar).
References
Ethylene (Ethene), International Thermodynamic Tables of the
Fluid State Vol. 10 (1988), IUPAC, ISBN 0-63201-7090.
Calculations
The calculations are in compliance with the standard.
Because the IUPAC Equation Of State specifies the calculation of
the pressure from a known temperature and density iteration is
required to determine the density from the input pressure. A
convergence limit of 0.0005 kg/m3 is applied. A maximum of 20
iterations is applied.
IT
94 SPIRIT EXLERATE | FUNCTION REFERENCE MANUAL | CM/EXL/FR -EN
fxGasViscosity_2004
The dynamic viscosity of natural gas is calculated in accordance Boundaries
with a method developed at the Rostock University in Germany The limits of the tables are 250 K to 450 K (-24 .. +177 °C) for
and published in 2004 in the ‘International Journal of the pressures up to 30 MPa (300 bar).
Thermophysics’. The estimated uncertainty of the calculated
viscosity is 0.5% for natural gas (0.3% for pure methane).
Reference
Viscosity Measurements and Predictions for Natural Gas, P.
Schley, M. Jaeschke, C. Kuchenmeister and E. Vogel,
International Journal of Thermophysics, Vol. 25, No. 6,
November 2004 (© 2004)
Calculations
The calculations are in accordance with the publication, which is Input component Added to / neglected
based on the following 12 components: methane (+ hydrogen), Methane Methane
Nitrogen Nitrogen
nitrogen (+ helium + oxygen/argon), carbon dioxide, ethane, Carbon Dioxide Carbon Dioxide
propane, n-butane, ibutane, n-pentane (+ benzene), isentane (+ Ethane Ethane
neopentane), n-hexane (hexanes + toluene), n-heptane Propane Propane
Water Neglected
(heptanes), and n-octane (octanes + nonanes+ C10 plus higher +
Hydrogen Sulphide Neglected
xylenes). Hydrogen Methane
Carbon Monoxide Neglected
The function uses the ‘Standard gas composition’ as used by Oxygen Nitrogen
i-Butane i-Butane
most gas property functions. The 22 components of input
n-Butane n-Butane
Composition are lumped to these 12 components as defined in i-Pentane i-Pentane
the following table. n-Pentane n-Pentane
n-Hexane n-Hexane
n-Heptane n-Heptane
NOTES:
n-Octane n-Octane
Components ‘Water’, ‘Hydrogen sulphide’ and ‘Carbon n-Nonane n-Octane
monoxide’ are not supported by the publication and will n-Decane n-Octane
therefore be neglected by the function. The lumped Helium Nitrogen
Argon Nitrogen
composition is normalized to 1 and then used in the Neo-Pentane Iso-Pentane
calculation.
The publication also mentions components benzene, toluene
and xylenes, which are not part of the ‘Standard gas
composition’. To adhere strictly to the publication, add
‘Benzene’ to input ‘n-Pentane’, ‘Toluene’ to input ‘n-Hexane’
and ‘Xylenes’ to input ‘n-Octane’.
IT
SPIRIT EXLERATE | FUNCTION REFERENCE MANUAL | CM/EXL/FR -EN 95
fxGenerateReport
This function generates prints and stores a report.
fxGERG2008_Gas
The compressibility, density, speed of sound and isentropic Boundaries
coefficient of a gas are calculated from its composition, The GERG-2008 calculation has defined uncertainty bounds for
temperature and pressure in accordance with the GERG-2008 fluids that lie within the 'Normal range'. Also an 'Expanded range'
equation of state. The function uses an optimized routine that of gas mixtures is defined for which the calculation has a higher
only applies when fluid is in the gaseous state (100% gas) and uncertainty. Using the calculation at conditions outside the
that requires limited CPU time (suitable for processing in the 'Expanded range' is not recommended.
Spirit IT products).
Input value Normal Range Expanded Range EU
Compliance Pressure 0 .. 35 0 .. 70 MPa(a)
Temperature 90..450 60..700 K
The GERG-2008 Wide-Range Equation of State for Natural Pressure 0 .. 350 0 .. 700 bar(a)
Gases and Other Mixtures: An Expansion of GERG-2004. Kunz, Temperature -183 .. +177 -213 .. +426 °C
O., Wagner, W. Submitted to J. Chem. Eng. Data 57 (2012). Pressure 0 .. 5076 0 .. 10153 psia
Temperature -298 .. +350 -352 .. +800 °F
Mole fraction of all 0.00 .. 1.00 0.00 .. 1.00 -
components
Calculations
The calculations are as documented in the reference.
IT
SPIRIT EXLERATE | FUNCTION REFERENCE MANUAL | CM/EXL/FR -EN 97
fxGERG2008_Flash
The compressibility and density of a gas/liquid mixture are GERG2008 calculation for gas mixtures that lie outside the
calculated from its composition, temperature and pressure in 'Expanded range' is not recommended.
accordance with the GERG2008 standard.
Input value Normal Range Expanded Range EU
Compliance Pressure 0 .. 350 0 .. 700 bar(a)
Temperature -183 .. +177 -213 .. +427 °C
Kunz, O., and W. Wagner. "The GERG-2008 wide-range Mole fraction of Methane 0.00 .. 1.00 0.00 .. 1.00 -
equation of state for natural gases and other mixtures: An Mole fraction of Ethane 0.00 .. 1.00 0.00 .. 1.00 -
expansion of GERG-2004." Journal of Chemical & Engineering Mole fraction of Propane 0.00 .. 1.00 0.00 .. 1.00 -
Mole fraction of Butanes 0.00 .. 1.00 0.00 .. 1.00 -
Data 57.11 (2012): 3032-3091.
Mole fraction of Pentanes 0.00 .. 1.00 0.00 .. 1.00 -
W. Wagner. “Description of the Software Package for the Mole fraction of Hexanes Plus 0.00 .. 1.00 0.00 .. 1.00 -
Calculation of Thermodynamic Properties from the GERG- Mole fraction of Carbon monoxide 0.00 .. 1.00 0.00 .. 1.00 -
2008 Wide-Range Equation of State for Natural Gases and Mole fraction of Carbon dioxide 0.00 .. 1.00 0.00 .. 1.00 -
Mole fraction of Nitrogen 0.00 .. 1.00 0.00 .. 1.00 -
Other Mixtures”.
Mole fraction of Helium 0.00 .. 1.00 0.00 .. 1.00 -
Mole fraction of Argon 0.00 .. 1.00 0.00 .. 1.00 -
Boundaries Mole fraction of Oxygen 0.00 .. 1.00 0.00 .. 1.00 -
Mole fraction of Hydrogen 0.00 .. 1.00 0.00 .. 1.00 -
The GERG2008 calculation has defined uncertainty bounds for Sulphide
gas mixtures that lie within the 'Normal range'. Also an Mole fraction of Hydrogen 0.00 .. 1.00 0.00 .. 1.00 -
'Expanded range' of gas mixtures is defined for which the Mole fraction of Water 0.00 .. 1.00 0.00 .. 1.00 -
GERG2008 calculation has a higher uncertainty. Using the
Calculations
The calculations are as documented in the standard.
IT
98 SPIRIT EXLERATE | FUNCTION REFERENCE MANUAL | CM/EXL/FR -EN
fxGPA_TP15
The GPA-TP15 standard defines a generalized correlation
method to determine the vapor pressure (i.e. the equilibrium Boundaries
pressure) for natural gas liquids (NGL). The GPA TP-15:1988 / API MPMS 11.2.2 Addendum:1994
The vapor pressure is required by the API 11.2.2 and API 11.1:2004 correlation method is valid for the following range.
calculations of the CPL value for light hydrocarbon liquids that
have a vapor pressure above atmospheric pressure. 0.490 to 0.676 (RD60)
-50 to 140 °F
References
API MPMS 11.2.2 Addendum - Compressibility Factors for The GPA TP-15:2007 / API MPMS 11.2.5:2007 correlation method
Hydrocarbons: Correlation Factors of Vapor Pressure for has been extended for lower density and is valid for the
Commercial Natural Gas Liquids - First Edition, December following ranges.
1994
GPA Technical Publication TP-15 A Simplified Vapor Pressure Lower range:
Correlation for Commercial NGLs - 1988 0.350 to 0.425 (RD60)
API MPMS 11.2.5 - A Simplified Vapor Pressure Correlation for -50 to (695.51*RD60 - 155.51) °F
Commercial NGLs - September 2007 with RD60 being the relative density at 60°F
GPA Technical Publication TP-15 A Simplified Vapor Pressure
Correlation for Commercial NGLs - September 2007
Higher range:
ASTM Technical Publication [Stock No. PETROLTBL-TP15] -
0.425 to 0.676 (relative density)
September, 2007
-50 to 140 °F
NOTE: the first two and the last three refer to one and the same
standard. The current standard GPA-TP15 (2007) / API MPMS
11.2.5 extends the applicable range of the previous standard GPA
TP-15 (1988) / API MPMS 11.2.2 Addendum 1994 while preserving
the calculations and constants of the previous standard.
Calculations
The calculations are in either full or partial compliance with the
standards, depending on the selected type of API rounding.
IT
SPIRIT EXLERATE | FUNCTION REFERENCE MANUAL | CM/EXL/FR -EN 99
fxGPA2172_96_C
This uses the procedure for calculating heating value, specific GPA-2172 prescribes that the most recent edition of GPA2145
gravity and compressibility factor at customary (imperial) used for the individual component values. The function provides
conditions from the compositional analysis of a natural gas the option to use the values from editions 2000 and 2003. In
mixture. order to verify the function based on the examples of GPA2172
GPA2172 describes the calculation methods to determine the the function provides the option to GPA2145-89 (edition 1989) as
compositional properties based on the individual component well.
values and it refers to the GPA Standard 2145 (GPA2145)
standard for these individual component values. Compliance
The effect of water on the calculations is rather complicated and GPA Standard 2172-96, Calculation of Gross Heating Value,
is accounted for with a simplified equation that is considered to Relative Density and Compressibility Factor for Natural Gas
be adequate for custody transfer applications. Mixtures from Compositional Analysis - 1996
Therefore compositional properties are calculated for the API MPMS 14.5
following gas compositions: ASTM D3588-98 (Reapproved 2003)
GPA Standard 2145-89, Table of Physical Constants
Wet gas composition GPA Standard 2145-00, Table of Physical Constants
the water fraction of input "Composition' is taken as the GPA Standard 2145-03, Table of Physical Constants
actual water fraction.
Dry gas composition
the water fraction is set to 0 and the composition is
normalized to unity.
Saturated gas composition
the water fraction is set to the value when the gas is
saturated with water and the composition is normalized to
unity
Calculations
The calculations are as documented in the GPA-2172 standard
using the GPA2145 table values. However the calculations are
performed at full precision, so not with intermediate rounding as
shown in the examples of the standard.
Please note that the function uses the input composition ‘as is’,
so does not apply normalization to 1.
fxGPA2172_96_M
This function uses the procedure for calculating heating value, Saturated gas composition
specific gravity and compressibility factor at metric conditions the water fraction value of input ''Composition' is set to the
from the compositional analysis of a natural gas mixture. water saturated mole fraction and the composition is
GPA2172 describes the calculation methods to determine the normalized to unity
compositional properties based on the individual component
values and it refers to the GPA Standard 2145 (GPA2145) GPA-2172 prescribes that the most recent edition of GPA2145
standard for these individual component values. used for the individual component values. The function provides
The effect of water on the calculations is rather complicated and the option to use the values from GPA2145 edition 2000 or 2003.
is accounted for with a simplified equation that is considered to
be adequate for custody transfer applications. Compliance
Therefore compositional properties are calculated for the GPA Standard 2172-96, Calculation of Gross Heating Value,
following gas compositions: Relative Density and Compressibility Factor for Natural Gas
Mixtures from Compositional Analysis - 1996
Wet gas composition API MPMS 14.5 (same as GPA2172-96)
the water fraction of input "Composition' is taken as the GPA Standard 2145-00, Table of Physical Constants
actual water fraction. GPA Standard 2145-03, Table of Physical Constants
Dry gas composition
the water mole fraction of input ''Composition' is set to 0 and
the composition is normalized to unity.
neo-Pentane mode Determines what to do when component neo-Pentane is larger than zero - NEOC5_MODE 1
1: Add to i-Pentane
2: Add to n-Pentane
3: Neglect
Calculations
The calculations are as documented in the GPA-2172 standard
using the GPA2145 table values. However the calculations are
performed at full precision, so not with intermediate rounding as
shown in the examples of the standard.
Please note that the function uses the input composition ‘as is’,
so does not apply normalization to 1.
fxGPA2172_09_C
This function calculates the heating value, specific gravity and Wet gas composition
compressibility factor at customary (imperial) conditions from the water fraction of input "Composition' is taken as the
the compositional analysis of a natural gas mixture in actual water fraction.
accordance with GPA2172-09. Dry gas composition
the water fraction is set to 0 and the composition is
This function does not support the theoretical hydrocarbon normalized to unity.
liquid content calculation that has been added to GPA-2172 2009 Saturated gas composition
revision. the water fraction is set to the value when the gas is
saturated with water and the composition is normalized to
GPA2172 describes the calculation methods to determine the unity
compositional properties based on the individual component
values and it refers to the GPA Standard 2145 (GPA2145) GPA-2172 prescribes that the most recent edition of GPA2145
standard for these individual component values. used for the individual component values. The function provides
the option to use the values from edition 2009.
The effect of water on the calculations is rather complicated and
is accounted for with a simplified equation that is considered to Compliance
be adequate for custody transfer applications. GPA Standard 2172-09, Calculation of Gross Heating Value,
Relative Density, Compressibility and Theoretical
Therefore compositional properties are calculated for the Hydrocarbon Liquid Content for Natural Gas Mixtures from
following gas compositions: Compositional Analysis - 2009
API MPMS 14.5
GPA Standard 2145-09, Table of Physical Constants
Calculations
The calculations are as documented in the GPA-2172 standard
using the GPA2145 table values. However the calculations are
performed at full precision, so not with intermediate rounding as
shown in the examples of the standard.
Please note that the function uses the input composition ‘as is’,
so does not apply normalization to 1.
fxGPA2172_09_M
This function calculates the heating value, specific gravity and Wet gas composition
compressibility factor at metric (imperial) conditions from the the water fraction of input "Composition' is taken as the
compositional analysis of a natural gas mixture in accordance actual water fraction.
with GPA2172-09. Dry gas composition
the water fraction is set to 0 and the composition is
This function does not support the theoretical hydrocarbon normalized to unity.
liquid content calculation that has been added to GPA-2172 2009 Saturated gas composition
revision. the water fraction is set to the value when the gas is
saturated with water and the composition is normalized to
GPA2172 describes the calculation methods to determine the unity
compositional properties based on the individual component
values and it refers to the GPA Standard 2145 (GPA2145) GPA-2172 prescribes that the most recent edition of GPA2145
standard for these individual component values. used for the individual component values. The function provides
the option to use the values from edition 2009.
The effect of water on the calculations is rather complicated and
is accounted for with a simplified equation that is considered to Compliance
be adequate for custody transfer applications. GPA Standard 2172-09, Calculation of Gross Heating Value,
Relative Density, Compressibility and Theoretical
Therefore compositional properties are calculated for the Hydrocarbon Liquid Content for Natural Gas Mixtures from
following gas compositions: Compositional Analysis - 2009
API MPMS 14.5
GPA Standard 2145-09, Table of Physical Constants
Calculations
The calculations are as documented in the GPA-2172 standard
using the GPA2145 table values. However the calculations are
performed at full precision, so not with intermediate rounding as
shown in the examples of the standard.
Please note that the function uses the input composition ‘as is’,
so does not apply normalization to 1.
fxIAPWS_IF97_C
The function calculates the density and enthalpy of steam and Region 2: Superheated steam
water according to AIPWS-IF97 in US Customary units. Region 3: Water
Region 4: Saturation line (saturated steam / water)
IAPWS-IF97 defines calculations for 5 regions as shown in the Region 5: Superheated steam
picture below.
References
Revised Release on the IAPWS Industrial Formulation 1997 for
the Thermodynamic Properties of Water and Steam, August
2007.
Boundaries
The IAPWS Industrial Formulation 1997 consists of a set of
equations for different regions which cover the following range
of validity:
Region 1: Water
Function inputs Remark EU Range Default
Name Optional tag name, tag description and tag group
Temperature °F 0 .. 4000 0
Pressure psia 0..15000 0
Phase The phase (water or steam) can be calculated automatically or be set to either steam or water. 1
1: Auto-select (calculate from t and p inputs)
2: Steam
3: Water
If 'Steam' or 'Water' is selected, while the combination of temperature and pressure indicates the
opposite phase, then the function uses either the saturation pressure (region 4) or the boundary
pressure (intersection regions 2 and 3) instead of the input pressure for its calculations.
For regions 1, 2 and 5 the density can be calculated directly from The other properties can be calculated directly from the
the temperature in pressure. For region 3 an iterative calculation temperature and pressure for all regions.
is required because the Equation Of State for this region
calculates the pressure from a known temperature and density
IT
108 SPIRIT EXLERATE | FUNCTION REFERENCE MANUAL | CM/EXL/FR -EN
fxIAPWS_IF97_M
The function calculates the density and enthalpy of steam and Region 1: Water
water according to AIPWS-IF97 in Metric units. Region 2: Superheated steam
Region 3: Water
IAPWS-IF97 defines calculations for 5 regions as shown in the Region 4: Saturation line (saturated steam / water)
picture below. Region 5: Superheated steam
References
Revised Release on the IAPWS Industrial Formulation 1997 for
the Thermodynamic Properties of Water and Steam, August
2007.
Boundaries
The IAPWS Industrial Formulation 1997 consists of a set of
equations for different regions which cover the following range
of validity:
For regions 1, 2 and 5 the density can be calculated directly from The enthalpy can be calculated directly from the temperature
the temperature in pressure. For region 3 an iterative calculation and pressure for all regions.
is required because the Equation Of State for this region
calculates the pressure from a known temperature and density
IT
SPIRIT EXLERATE | FUNCTION REFERENCE MANUAL | CM/EXL/FR -EN 109
fxIndex
The 'fxIndex' provides the same functionality as the Excel Index For each of the 6 analog inputs the application contains one
function with the addition of the creation of tag names. 'Analog input' function that generates tag names with prefix,
A spreadsheet cell that contains a 'fxIndex' function obtains the "AIN1_", "AIN2_ etc. Also more meaningful tag names such as
tag name as defined by its 'Name' input with the tag inheriting "..PT" (pressure transmitter), ".._TT" are used in the
all properties including the value and units from the referred tag. application. When changing the high alarm limit for the
When the referred cell contains a writable tag (i.e. a value and no pressure transmitter (e.g. through an OPC interface) it makes
function) than the cell with the 'fxIndex' function also represents more sense to address the tag as "..PT_HISCALE" instead of
a writable tag with the same properties. "..AIN3_HISCALE" (assuming AIN 3 being used for the pressure
When the referred cell contains a tag that represents one or transmitter). This can be achieved by using the 'fxIndex'
more alarms, then the same alarms are created for the cell with function for the cell that represents the '..PT_HISCALE' tag.
the 'fxIndex' function. In some cases one and the same input signal is used for
The 'fxIndex' is especially useful for setting up generic (template) multiple process variables that are defined in the generic
applications as illustrated by the following examples: application. E.g. when the generic application assumes a
prover inlet temperature input signal as well as a prover outlet
temperature signal (and has corresponding tag names), while
there is only a temperature transmitter in the prover loop,
then the input tags of both signals can refer to the same "AIN"
signal by using the 'fxIndex' function.
fxInterpolationCurve
This function calculates the output value from a set of reference
points and the actual input value. The function can take an
arbitrary number of reference points.
The function is typically used for applying a calibration curve to a
K factor or a meter factor (liquid) or a meter error curve (gas).
Besides of the 1st calibration point (which is always used) the
function will only use the calibration points (starting from the
2nd point) for which the x value is greater than the previous x
value. All further points will be ignored.
Calculations
Out H Out L
y x InL Out L
InH InL
Where:
x Input value
y Interpolated value
InL Closest input reference value that is smaller than the input value
InH Closest input reference value that is larger than the input value
OutL Output reference value that corresponds with InL
OutH Output reference value that corresponds with InH
IT
SPIRIT EXLERATE | FUNCTION REFERENCE MANUAL | CM/EXL/FR -EN 111
fxISO5167_ISA1932Nozzle
The function calculates the mass flow rate for ISA1932 Nozzle Compliance
pressure differential flow devices according to the ISO-5167 ISO-5167 - 1991 Measurement of fluid flow by means of
standard. pressure differential devices, 1st edition, 1991
ISO-5167 Amd.1 : 1998(E)
ISO-5167 - 2003 Measurement of fluid flow by means of
pressure differential devices inserted in circular cross-section
conduits running full, 2nd edition, 2003
fxISO5167_LongRadiusNozzle
The function calculates the mass flow rate for Long Radius Compliance
Nozzle pressure differential flow devices according to the ISO- ISO-5167 - 1991 Measurement of fluid flow by means of
5167 standard. pressure differential devices, 1st edition, 1991
ISO-5167 Amd.1 : 1998(E)
ISO-5167 - 2003 Measurement of fluid flow by means of
pressure differential devices inserted in circular cross-section
conduits running full, 2nd edition, 2003
Differential Pressure Differential pressure over the primary flow device measured at the up- and downstream mbar 0
pressure tappings, which need to be in the positions as specified in the standard
Pressure Upstream pressure value of the fluid at metering conditions bar(a) 0
Temperature Down- or upstream temperature of the fluid at metering conditions °C 0
Density Down or upstream density of the fluid at metering conditions kg/m3 0
Dynamic Viscosity Dynamic viscosity of the fluid Pa.s 0
Isentropic Exponent Also referred to as (kappa). For an ideal gas this coefficient is equal to the ratio of the - 0
specific heat capacity at constant pressure to the specific heat at constant volume. According
to the ISO standard this ratio may be used, when the real value is unknown.
Pipe Diameter Internal diameter of the pipe at reference temperature mm 0
Pipe Expansion factor The thermal expansion coefficient of the pipe material 1/°C 0.0000108
Pipe Reference temperature The reference temperature that corresponds to the 'Pipe diameter' input value °C 20
Long Radius Nozzle Diameter Long Radius Nozzle diameter at reference temperature mm 0
Long Radius Nozzle Expansion The thermal expansion coefficient of the Long Radius Nozzle material 1/°C 0.0000163
factor
Long Radius Nozzle Reference The reference temperature that corresponds to the 'Long Radius Nozzle diameter' input value °C 20
Temperature
Pressure Location 1: Upstream - 1
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
Input 'Pressure' represents the pressure at the downstream tapping (p2).
Temperature Location 1: Upstream - 2
Input 'Temperature' represents the upstream temperature (t1).
2: Downstream
Input 'Temperature represents the temperature at the downstream tapping (t 2).
3: Recovered
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.
Temperature Correction This parameter specifies how the temperature should be corrected from downstream to 3
upstream conditions (or vice versa)
1: (1-)/
Isentropic expansion using (1-)/ as the temperature referral exponent
2: Constant
Isentropic expansion using input 'Temperature Exponent' as the temperature referral
exponent [-].
Please note that this value must be < 0
3: Joule Thomson
Isenthalpic expansion using input 'Temperature Exponent' as the Joule Thomson coefficient
[°C/bar].
This method is prescribed by ISO5167-1:2003.
Temperature Exponent Refer to input Temperature Correction - 0
Unit depends on input Temperature Correction value -°C/bar
Density Location This parameter specifies if and how the density should be corrected from downstream to - 1
upstream conditions (or vice versa).
1: Upstream
Input 'Density' represents the density at the upstream pressure tapping (1).
2: Downstream
Input 'Density' represents the density at the downstream tapping (2).
3: Recovered
Input 'Density' represents the density downstream at a location Where the pressure has fully
recovered (3).
Density Exponent. This factor is used when density correction is enabled. The formula 1/ will be used when the - 0
input value is set to 0, else the input value will be used.
For more details refer to section 'Density correction'.
Fluid The type of fluid being measured - 1
1: Gas
IT
114 SPIRIT EXLERATE | FUNCTION REFERENCE MANUAL | CM/EXL/FR -EN
fxISO5167_Orifice
The function calculates the mass flow rate for Orifice pressure References
differential flow devices according to the ISO-5167 standard and ISO 5167 - Measurement of fluid flow by means of pressure
the ISO/TR 15377 technical report. differential devices, 1991
ISO 5167 - Measurement of fluid flow by means of pressure
Orifices plates with the following type of pressure tappings are differential devices, 1991
supported by this function: Amendment 1 1998
ISO5167 Square-edged orifice with corner tappings ISO 5167 - Measurement of fluid flow by means of pressure
ISO5167 Square-edged orifice with flange tappings differential devices, 2003
ISO5167 Square-edged orifice with D and D/2 tappings British standard 1042: Part 1: 1964
ISO/TR 15377 Quarter circle orifice with corner tappings ISO/TR 15377:2007 Measurement of fluid flow by means of
ISO/TR 15377 Quarter circle orifice with flange tappings pressure differential devices – Guidelines for the specification
ISO/TR 15377 Conical entrance orifice with corner tappings of orifice plates, nozzle and Venturi tubes beyond the scope
of ISO 5167
Flange
tapping
25.4 mm
D D/2
Temperature Correction This parameter specifies how the temperature should be corrected from downstream to 3
upstream conditions (or vice versa)
1: (1-)/
Isentropic expansion using (1-)/ as the temperature referral exponent
2: Constant
Isentropic expansion using input 'Temperature Exponent' as the temperature referral
exponent [-].
Please note that this value must be < 0
3: Joule Thomson
Isenthalpic expansion using input 'Temperature Exponent' as the Joule Thomson coefficient
[°C/bar].
This method is prescribed by ISO5167-1:2003.
Temperature Exponent Refer to input Temperature Correction - 0
Unit depends on input Temperature Correction value -°C/bar
Density Location This parameter specifies if and how the density should be corrected from downstream to - 1
upstream conditions (or vice versa).
1: Upstream
Input 'Density' represents the density at the upstream pressure tapping (1).
2: Downstream
Input 'Density' represents the density at the downstream tapping (2).
3: Recovered
Input 'Density' represents the density downstream at a location Where the pressure has fully
recovered (3).
Density Exponent. This factor is used when density correction is enabled. The formula 1/ will be used when - 0
the input value is set to 0, else the input value will be used.
For more details refer to section 'Density correction'.
Fluid The type of fluid being measured - 1
1: Gas
2: Liquid
Year Of Edition 1: Edition 1991 - 3
2: Edition 1998
3: Edition 2003
Note: Only applicable for ISO5167. ISO/TR15377 refers to ISO5167:2003.
Drain hole When input value is > 0 then an additional correction on the orifice diameter will be applied mm 0
to account for the drain hole, as explained further on.
2
d
C DH 1 0.55 * DH
d0
Where:
fxISO5167_Venturi
The function calculates the mass flow rate for classical Venturi Compliance
tube pressure differential flow devices according to the ISO-5167 ISO-5167 - 1991 Measurement of fluid flow by means of
standard. pressure differential devices, 1st edition, 1991
ISO-5167 Amd.1 : 1998(E)
ISO-5167 - 2003 Measurement of fluid flow by means of
pressure differential devices inserted in circular cross-section
conduits running full, 2nd edition, 2003
fxISO5167_VenturiNozzle
The function calculates the mass flow rate for Venturi Nozzle Compliance
pressure differential flow devices according to the ISO-5167 ISO-5167 - 1991 Measurement of fluid flow by means of
standard. pressure differential devices, 1st edition, 1991
ISO-5167 Amd.1 : 1998(E)
ISO-5167 - 2003 Measurement of fluid flow by means of
pressure differential devices inserted in circular cross-section
conduits running full, 2nd edition, 2003
Temperature correction
When input ''Temperature exponent' = 0, then an isentropic
expansion is applied:
1
p
t 1 t 3 273.15 3 273.15
p1
Else the value of input 'Temperature exponent' is used:
KTE
p
t 1 t 3 273.15 3 273.15
p1
Where:
t1 Upstream temperature [°C]
t3 Downstream temperature [°C]
p1 Upstream pressure [bar(a)]
p3 Fully recovered downstream pressure [bar(a)]
Isentropic exponent [-]
KTE Temperature exponent [-]
IT
SPIRIT EXLERATE | FUNCTION REFERENCE MANUAL | CM/EXL/FR -EN 123
fxISO6976_1983_M
ISO standard 6976 defines component properties and Compliance
calculations to determine the calorific value, density and relative International standard, Natural Gas - Calculation of calorific
density for a gas composition at the specified metering and values, density, relative density and Wobbe index (ISO
combustion reference temperatures and 1.01325 bar(a). 6976:1983)
Boundaries
ISO6976:1983 does not define limits for its input data.
Calculations
Calculations are performed in accordance with the standard,
using the values as listed in the tables of the standard.
IT
124 SPIRIT EXLERATE | FUNCTION REFERENCE MANUAL | CM/EXL/FR -EN
fxISO6976_1995_M
ISO standard 6976 edition 1995 defines component properties Boundaries
and calculations to determine the calorific value, density, relative The valid ranges for molar fractions are as follows:
density and Wobbe index for a gas composition at the specified Methane 0.5 <= .. <= 1.0
metering and combustion reference temperatures and 1.01325 Nitrogen 0.0 <= .. <= 0.3
bar(a). Ethane 0.0 <= .. <= 0.15
Both the definitive and alternative methods of calculating the Carbon dioxide 0.0 <= .. <= 0.15
calorific value on a mass and volumetric basis are included. All others 0.0 <= .. <= 0.05
Compliance
International standard, Natural Gas - Calculation of calorific
values, density, relative density and Wobbe index (ISO
6976:1995/BS7589)
Calculations
Calculations are performed in accordance with the standard.
IT
SPIRIT EXLERATE | FUNCTION REFERENCE MANUAL | CM/EXL/FR -EN 125
fxISO6976ex_1995_M
Boundaries
Extended version that takes the first 55 components as
The valid ranges for molar fractions are as follows:
used in the standard plus an additional set of user-
Methane 0.5 <= .. <= 1.0
definable components. Nitrogen 0.0 <= .. <= 0.3
Ethane 0.0 <= .. <= 0.15
ISO standard 6976 edition 1995 defines component properties Carbon dioxide 0.0 <= .. <= 0.15
and calculations to determine the calorific value, density, relative All others 0.0 <= .. <= 0.05
density and Wobbe index for a gas composition at the specified
metering and combustion reference temperatures and 1.01325 Compliance
bar(a). International standard, Natural Gas - Calculation of calorific
Both the definitive and alternative methods of calculating the values, density, relative density and Wobbe index (ISO
calorific value on a mass and volumetric basis are included. 6976:1995/BS7589)
Calculations based heating values that are calculated from these input
Calculations are performed in accordance with the standard with properties. Only the Definitive Method for calculating the
the addition of the user-definable components. calorific value is supported in this case.
fxKeypadFallback
This function provides a generic interface to any input signal,
such as a pressure, temperature, density or flow input. It
provides the option to override the 'live' value with a keypad
value and to fallback to a specific value when the input value is
faulty.
When the input signal fails, the in-use value may fall back to the
last good value, the keypad value or additionally a separate
fallback value. The fallback value allows the user to define a fixed
value (e.g. 0) that is independent from the current keypad value.
fxKeypadFallbackArray
This function provides a generic interface to an array of input
values, typically a gas composition. It provides the option to
override the 'live' values with keypad values and to fallback to
specific values when the set of input values is faulty.
When the input signals fail, the in-use values may fall back to the
last good values, the keypad values or additionally separate
fallback values. The fallback values allow the user to define a
fixed values (e.g. 0) that is independent from the current keypad
values.
fxLatch
The 'fxLatch' function provides generic latching functionality.
fxLimitAlarm
The function applies alarm limits on any value.
Logic
The order of priority in setting the alarm status output is as
follows:
If process value is below the ‘Low low limit value’ then the
status becomes ‘3: Low low alarm’.
Else if process value is above the ‘High high limit value’ then
the status becomes ‘4: High high alarm’.
Else if process value is below the ‘Low limit value’ then the
status becomes ‘1: Low alarm’.
Else if process value is above the ‘High limit value’ then the
status becomes ‘2: High alarm’ and the ‘High high alarm’ is
raised
Else the status becomes ‘0: Normal’.
IT
SPIRIT EXLERATE | FUNCTION REFERENCE MANUAL | CM/EXL/FR -EN 131
fxMR113
The relative humidity, compressibility, density, speed of sound, Boundaries
isentropic coefficient and optionally the dynamic viscosity of a The standard defines a valid range for pressure and
gas are calculated from its composition, absolute humidity, temperature. The function will not accept input values outside
temperature and pressure in accordance with the GOST MR113 this range
standard. The CPU-intensive calculation of viscosity can be
optionally enabled if the (flow computer) CPU capacity allows for The valid range is as follows
this. Pressure: 1 .. 150 bar(a)
Temperature: 263..500 K (-10 ..+226 °C)
Compliance
The GSSSD method MR 113-03. Kozlov, Mamonov, Rogovin, NOTE: the standard does not specify a range limitation for the
Rybakov, (10/06/2003). components.
Calculations
The calculations are as documented in the reference.
IT
132 SPIRIT EXLERATE | FUNCTION REFERENCE MANUAL | CM/EXL/FR -EN
fxName
The 'fxName' function creates a string that defines the prefix,
description and group for any function that generates tags,
except for function fxTag.
fxNX19_1962
The AGA NX-19 standard describes a method to calculate the Compliance
super-compressibility for natural gases and was developed in AGA Par Research Project NX-19 - Manual for the
1962. Determination. of the Supercompressibility Factors for
The 1962 standard describes a standard method for calculating Natural Gas, 1962
the super-compressibility factor that is based on the actual Flow Measurement Engineering Handbook, Third edition,
pressure and temperature, the specific gravity and the mole Richard W. Miller, 1996,
fractions of the carbon dioxide and nitrogen. ISBN-0-07-042366-0
The 1962 standard also specifies 3 alternate methods, which are
based on a full compositional analysis (1st alternate method), Boundaries
the relationship between methane and specific gravity (2nd The following boundaries apply for the input values. Using the
alternate method) and the relationship between the heating standard for conditions that lie outside this range will yield to a
value and the specific gravity higher uncertainty and is not recommended.
The function only performs the standard method as specified by
the standard and none of the alternate methods. Temperature -40..240 °F
Pressure 0..5000 psig
Relative density 0.554 .. 01.000 -
NOTE: the definition of the specific gravity as used in the
Nitrogen 0.00 .. 0.15 mol/mol
standard is that of the ratio of the density of the gas to that of Carbon dioxide 0.00 .. 0.15 mol/mol
air at base conditions, so the real specific gravity or real relative
density.
−2
Zb 0.00132
Fpv = √ Zb = [√1 + ]
Zf T 3.25
Where:
Where T = Tadj/500 with Tadj calculated in accordance with the
Fpv Supercompressibility
AGA NX-19:1962 standard
Zb Compressibility at base conditions of 60 °F and 14.7 psia
Zf Compressibility at flowing conditions, i.e. at the input temperature
and pressure
IT
134 SPIRIT EXLERATE | FUNCTION REFERENCE MANUAL | CM/EXL/FR -EN
fxNX19_M
The AGA NX-19 standard describes a method to calculate the NOTE: the definition of the specific gravity as used in the
super-compressibility for natural gases and was developed in standard is that of the ratio of the density of the gas to that of
1962. air at base conditions, so the real specific gravity or real relative
density.
The 1962 standard describes a standard method for calculating
the super-compressibility factor that is based on the actual Compliance
pressure and temperature, the specific gravity and the mole AGA Par Research Project NX-19 - Manual for the
fractions of the carbon dioxide and nitrogen. Determination. of the Supercompressibility Factors for
Natural Gas, 1962
The 1962 standard also specifies 3 alternate methods, which are Berechnung von Realgasfaktoren und Kompressibilitätszahlen
based on a full compositional analysis (1st alternate method), für Erdgas, Technische Richtlinie G9 der Physikalisch -
the relationship between methane and specific gravity (2nd Technische Bundesanstalt für meßgeräte für Gas (PTB), TRG 9
alternate method) and the relationship between the heating 8/82
value and the specific gravity
Boundaries
The function only performs the standard method as specified by The following bounds apply for the input values. Using the
the standard and none of the alternate methods. standard for conditions that lie outside this range will yield to a
The function provides the option to perform the PTB G9 higher uncertainty and is not recommended.
correction instead of the 1962 standard method. This consists of
the modified NX-19 method (NX-19-mod) per Herning &
Wolowsky and the additional ‘BR.KORR.3H’ correction for high-
caloric gases (gross heating value >= 39.8 MJ/m3).
Calculations
The calculations are as specified in the standards.
IT
SPIRIT EXLERATE | FUNCTION REFERENCE MANUAL | CM/EXL/FR -EN 135
fxPeriodFWA
The function calculates a flow-weighted average (FWA) for a
particular period.
The function weights the input value with a flow increment and
updates the average accordingly. The flow increment is provided
by a ‘TotalizerDelta’ or ‘TotalizerRate’ function.
At the end of the period the current average is stored in the
previous value and the current value is reset to 0.
fxPeriodLatch
The function latches a value at the end of a repeating period of
time.
fxPeriodMax
The function determines a maximum value over a particular
period.
fxPeriodMin
The function determines a minimum value over a particular
period.
fxPeriodTotal
The function accumulates a flow increment into a period total. At
the end of the period the current total is stored into the previous
value and the current value is reset to 0.
The flow increment originates from a ‘TotalizerRate’ or
‘TotalizerDelta’ function.
fxPeriodTWA
The function calculates a time-weighted average (TWA) for a
particular period. At the end of a period the current average is
stored in the previous value and the current value is reset to 0.
The function weights the input value with the time (in fact the
actual calculation cycle time) and updates the average
accordingly.
Pre-previous average Average of the pre-previous period (i.e. Same as input ‘Input value’ PPRV 0
the period before the previous period)
IT
SPIRIT EXLERATE | FUNCTION REFERENCE MANUAL | CM/EXL/FR -EN 141
fxPeriodWatch
The function 'remembers' that a condition has been valid during
a period of time.
fxPID
PID control is a generic method to control a process variable by For systems with a slow responsiveness to disturbances or
means of a feedback control loop and is widely used in the setpoint changes feed forward control may be beneficial.
industry. Besides of the closed PID loop an open feed-forward loop is
A PID controller adjusts its control output by applying a added that reacts immediately to a change in process or
Proportional, Integral and Derivative algorithm based on the setpoint value.
error between the measured process variable and the desired The function provides the option for bumpless transfers
setpoint. between auto and manual mode and vice versa. The actual
The Proportional part of the algorithm determines the reaction process value is copied into the required setpoint value while
to the current error. The Integral part reacts to the recent errors manual mode is enabled (PV tracking). When reverting to auto
accumulated over a sliding time window, while the Derivative mode the process will stay on the current process value. For
part reacts to the change rate of the error. The 3 actions are the same reason the actual output % is copied to the manual
added up by applying individual weigh factors and the sum is output % while Auto mode is enabled.
used to adjust a control device, e.g. the position of a control When the control output reaches its limit (e.g. control valve is
valve. fully opened) there is the risk for wind-up of the integral part,
because the error will continue to be integrated. This results
NOTE: In flow measurement systems typically only PI control is in the integral part to become very large, so the error must
applied, so the derivative action is disabled. have the opposite value for a long time before the control
loop returns to normal. In order to avoid this windup (i.e.
The PID function provides several features for enhanced PID achieve anti-windup) the function compensates the integral
control such as: part when the control output has reached its limit.
To avoid that a change in setpoint value will result in an
In cascade control there are two PID control loops arranged impulse in the control signal the function provides the feature
with one loop controlling the set point of the other loop. to define a maximum for the setpoint clamp rate and the
Within the outer loop the primary physical parameter is control output slew rate. The setpoint clamp rate causes the
controlled, such as fluid level or velocity. The inner loop reads setpoint to change gradually until it has caught up with the
the output of the outer loop as its set point and usually required value. The slew rate directly limits the rate of change
controls a more rapid changing parameter such as flow rate of the control output.
or acceleration.
This input tells this function that the secondary (Slave) PID function is not using its
Cascade input, but its Manual output % or Setpoint value instead. This allows the primary
PID function to track the secondary process or setpoint value enabling a bumpless
transfer between modes.
0: Disabled
<> 0 : Enabled
Tracking value This output is meant for cascade control. If this function acts as the primary (Master) PID % 0
controller in a cascade configuration, this input needs to be connected to output
'Tracking value' of the secondary (Slave) PID function.
The value represents the process or setpoint value of the secondary (Slave) PID function
as percentage of scale.
Feed forward Value is directly added to the control output % 0
The advantage of feed forward control is that corrective action is taken for a change in a
disturbance input before it affects the controlled parameter.
Control output logic Check if new control output is outside its limits
If uCUR > uMAX then
The logic for the control output depends on the current manual
uCUR = uMAX
and tracking modes.
Else If uCUR < uMIN then
Manual mode = Enabled uCUR = uMIN
Set current output equal to manual input value
vCUR = 'Manual output %' Bumpless transfer logic
If bumpless transfer is enabled, then the following logic is
Manual mode = Disabled AND Tracking mode = Enabled applied.
Set current output equal to tracking input value
vCUR = 'Tracking value' (input) Setpoint tracking
IF Manual mode = Enabled OR Tracking mode = Enabled
Manual mode = Disabled AND Tracking mode = Disabled SPREQ = PVCUR
Determine the current setpoint
If cascade mode enabled then ELSE IF Cascade mode = Enabled
SPCUR = Cascade input value * (High scale value - Low SPREQ = SPCUR
scale value) + Low scale value
Else Manual output tracking
SPCUR = SPREQ
IF Manual mode = Disabled
Check if the current setpoint needs to be gradually ramped up or 'Manual output %' = uCUR
down to the required setpoint:
If (SPCUR - SPPRV) > ( Upwards SP clamp rate * Δt ) then Tracking mode and value
SPCUR = SPPRV + ( Upwards SP clamp rate * Δt ) Outputs 'Tracking mode' and 'Tracking value' are set as follows:
Else if (SPPRV - SPCUR) > ( Downwards SP clamp rate * Δt)
Tracking mode
then
'Tracking mode' = ('Manual mode' = Enabled) OR ('Cascade mode'
SPCUR = SPPRV - ( Downwards SP clamp rate * Δt )
= Disabled)
Calculate the current error:
Tracking value
If Control direction = Forward then
IF 'Manual mode' = Enabled
eCUR = SPCUR – PVCUR
'Tracking value' = (PVCUR * - Low scale value) / (High scale
Else
value - Low scale value) * 100
eCUR = PVCUR – SPCUR
fxROCAlarm
The function checks if a value does not change its value at a rate
that is higher than a specific limit (‘rate of change’).
Logic
A 'Rate of change alarm' is raised when the absolute difference
between two consecutive values divided by the calculation cycle
time in seconds is more than the limit.
IT
146 SPIRIT EXLERATE | FUNCTION REFERENCE MANUAL | CM/EXL/FR -EN
fxSarasota_C
The function calculates the density from a frequency input signal
provided by a Sarasota densitometer and corrects it for
temperature and pressure effects in US customary units.
Note: The calibration constants also need to be in US customary
units (°F, psi and lbm/ft3).
Calculations
The corrected density ρC is calculated by
C C
C d0 2 K
C C
fxSarasota_M
The function calculates the density from a frequency input signal
provided by a Sarasota densitometer and corrects it for
temperature and pressure effects in metric units.
Note: Calibration constants also need to be in metric units (°C,
bar and kg/m3).
Calculations
The corrected density ρC is calculated by
C C
C d0 2 K
C C
C 0 t COEF t t CAL p COEF p p CAL
Where:
ρC The corrected density kg/m3
d0 Obtained from the calibration certificate kg/m3
0 Obtained from the calibration certificate s
K Obtained from the calibration certificate -
d0 Obtained from the calibration certificate -
pCOEF Obtained from the calibration certificate s/bar
tCOEF Obtained from the calibration certificate s/°C
t Line temperature °C
tCAL Reference temperature °C
p Line temperature bar(g)
pCAL Reference pressure bar(g)
C Time periodic input corrected for temperature and s
pressure
τ The time period in µS s
IT
148 SPIRIT EXLERATE | FUNCTION REFERENCE MANUAL | CM/EXL/FR -EN
fxSetOnChange
The 'fxSetOnChange function sets a tag or cell to a specific value
whenever another value changes
fxSetOnCondition
The 'fxSetOnCondition' function sets a tag or cell to a specific
value whenever a condition is true.
It is a generic function that is especially useful for implementing
logic for controlling output signals (e.g. valve commands) and
state machines (e.g. prove sequences).
fxSetOnEvent
The 'fxSetOnEvent' function sets a tag to a specific value
whenever an event occurs.
It is a generic function that is especially useful for implementing
logic for controlling output signals (e.g. valve commands) and
state machines (e.g. prove sequences).
fxSetIndexOnChange
The 'fxSetIndexOnChange function sets one tag from an array of
tags to a specific value whenever another value changes.
IT
SPIRIT EXLERATE | FUNCTION REFERENCE MANUAL | CM/EXL/FR -EN 149
fxSetIndexOnCondition
The 'fxSetIndexOnCondition' function sets one tag from an array
of tags to a specific value whenever a condition is true.
It is a generic function that is especially useful for implementing
logic for controlling output signals (e.g. valve commands) and
state machines (e.g. prove sequences).
fxSetIndexOnEvent
The 'fxSetIndexOnEvent' function sets one tag from an array of
tags to a specific value whenever an event occurs.
It is a generic function that is especially useful for implementing
logic for controlling output signals (e.g. valve commands) and
state machines (e.g. prove sequences).
fxSGERG_C
This function performs the SGERG calculation in USC units. Compliance
GERG Technical Monograph 5, Standard GERG Virial Equation,
The Standard (or Simplified) GERG TM5 1991 Virial Equation 1991
(SGERG or SGERG-88) has defines a method to calculate the
Compressibility Factor (Z) for Natural Gases. The SGERG Boundaries
calculation is equivalent to the AGA8 Gross Characterisation The standard specifies a maximum uncertainty of the
Method, however .the results are slightly different compressibility factor of 0.1% provided the inputs lie in the
following range.
Instead of the full compositional analysis (as used by the AGA 8 Pressure 0 .. 1740 psi(a)
Detailed Characterization method), the Gross Characterisation Temperature 17 .. 143 °F
Method (SGERG) uses a restricted set of input variables for its Gross heating value 509 .. 1288 Btu/ft3
equation, comprising Relative Density, Superior Calorific Value, Relative density 0.55 .. 0.90 -
Carbon Dioxide and Nitrogen together with pressure and Carbon dioxide 0.00 .. 0.30 mol/mol
temperature.
Nitrogen 0.00 .. 0.50 mol/mol
Hydrogen 0.00 .. 0.10 mol/mol
Calculations the gross heating value (GHV) at 25°C and 1.01325 bar(a)
The calculations are in accordance with the standard. combustion and 0°C and 1.01325 bar(a) metering conditions.
As specified in the standard and depending on the selected Input 'Reference Conditions' Multiply input Multiply input RD
GHV with with
reference conditions (input 'Reference conditions') one of the
60 °F, 60 °F @ 14.73 psia 1.0543/26.85 1.0002
following set of conversions is carried out to obtain the input 60 °F, 60 °F @ 1.01592 bar(a) 1.0543/26.86 1.0002
values of the relative density (RD) at 0°C and 1.01325 bar(a) and
IT
SPIRIT EXLERATE | FUNCTION REFERENCE MANUAL | CM/EXL/FR -EN 151
fxSGERG_M
Description Compliance
This function performs the SGERG calculation in metric units. GERG Technical Monograph 5, Standard GERG Virial Equation,
The Standard (or Simplified) GERG TM5 1991 Virial Equation 1991
(SGERG or SGERG-88) has defines a method to calculate the
Compressibility Factor (Z) for Natural Gases. The SGERG Boundaries
calculation is equivalent to the AGA8 Gross Characterisation The standard specifies a maximum uncertainty of the
Method, however .the results are slightly different compressibility factor of 0.1% provided the inputs lie in the
Instead of the full compositional analysis (as used by the AGA 8 following range.
Detailed Characterization method), the Gross Characterisation Pressure 0 .. 120 bar(a)
Method (SGERG) uses a restricted set of input variables for its Temperature 265..335 K
Gross heating value 19 .. 48 MJ/m3
equation, comprising Relative Density, Superior Calorific Value,
Relative density 0.55 .. 0.90 -
Carbon Dioxide and Nitrogen together with pressure and Carbon dioxide 0.00 .. 0.30 mol/mol
temperature. Nitrogen 0.00 .. 0.50 mol/mol
Hydrogen 0.00 .. 0.10 mol/mol
fxSolartron_Gas_C
The function calculates the density from a frequency input signal Compliance
provided by a Solartron 7810, 7811 or 7812 gas densitometer and The calculations are in accordance with documents:
corrects it for temperature and velocity of sound effects in US 78125010 'Solartron 7812 Gas Density Transducer Manual',
customary units. 2001.
The function requires that the calibration constants are based 78125040 Rev. C, 'Micro Motion 7812 Gas Density Meter',
on the following units: October 2007.
Temperature °F
Pressure psi
Density g/cc
Calculations
Density calculations are performed in g/cc, while the function Where:
outputs are in lbm/ft3 ρt The density corrected for temperature g/cc
K18 Obtained from the calibration certificate -
K19 Obtained from the calibration certificate -
The uncorrected density ρi is calculated by t The line temperature °F
i K 0 K1 K 2 2 tR The reference temperature °F
Where:
ρi The uncorrected density g/cc The density value corrected for Velocity of Sound is calculated as
K0 Obtained from the calibration certificate - follows:
K1 Obtained from the calibration certificate -
K2 Obtained from the calibration certificate -
τ The time period in µS s K3 G
VOS t 1 Kc
The temperature corrected density ρt is calculated by
t K 4 t 273
Cc
Kc
t i 1 K18 t t R K19 t t R t C 273
IT
SPIRIT EXLERATE | FUNCTION REFERENCE MANUAL | CM/EXL/FR -EN 153
Where:
ρVOS The density corrected for temperature and VOS g/cc
K3 Obtained from the calibration certificate -
K4 Obtained from the calibration certificate -
Kc Calibration gas constant from the calibration certificate -
G G value. -
Equals either input 'G value' or the ratio of inputs 'Specific
gravity' and 'Ratio of specific heats', depending on input 'G
value method'
t The line temperature °F
Cc Specific Gravity/Ratio of specific heats of calibration gas -
tc Calibration temperature °F
IT
154 SPIRIT EXLERATE | FUNCTION REFERENCE MANUAL | CM/EXL/FR -EN
fxSolartron_Gas_M
The function calculates the density from a frequency input signal Compliance
provided by a Solartron 7810, 7811 or 7812 gas densitometer and The calculations are in accordance with documents:
corrects it for temperature and velocity of sound effects in 78125010 'Solartron 7812 Gas Density Transducer Manual',
metric units. 2001.
The function requires that the calibration constants are based 78125040 Rev. C, 'Micro Motion 7812 Gas Density Meter',
on the following units: October 2007.
Temperature °C
Pressure bar
Density kg/m3
Calculations Where:
The uncorrected density ρi is calculated by ρt The density corrected for temperature kg/m3
K18 Obtained from the calibration certificate -
K 0 K1 K 2
i
2
K19 Obtained from the calibration certificate -
t The line temperature °C
tR The reference temperature °C
Where:
ρi The uncorrected density kg/m3 The density value corrected for Velocity of Sound is calculated as
K0 Obtained from the calibration certificate -
K1 Obtained from the calibration certificate -
follows:
K2 Obtained from the calibration certificate -
τ The time period in µs s
K3 G
VOS t 1 Kc
The temperature corrected density ρt is calculated by t K 4 t 273
t i 1 K18 t t R K19 t t R Kc
Cc
t C 273
Where:
IT
SPIRIT EXLERATE | FUNCTION REFERENCE MANUAL | CM/EXL/FR -EN 155
fxSolartron_Liquid _C
The function calculates the density from a frequency input signal Compliance
provided by a Solartron 7835, 7845, 7846 or 7847 liquid The calculations are in accordance with documents:
densitometer and corrects it for temperature, pressure and 78355010 'Solartron 7835, 7845, 7846 & 7847 Advanced Liquid
velocity of sound effects using US Customary units. Density Transducer Manual', 2001
The function requires that the calibration constants are based 78355080, Rev. C, 'Micro Motion 7835, 7845, 7846 & 7847
on the following units: Liquid Density Transducer', October 2007
Temperature °F
Pressure psi
Density g/cc
i K 0 K1 K 2 2
t i 1 K18 t tR K19 t tR
Where:
IT
SPIRIT EXLERATE | FUNCTION REFERENCE MANUAL | CM/EXL/FR -EN 157
Where: Else (pt < 0.3 or pt > 1.4) the VOS of sound correction is not
ρt The density corrected for temperature g/cc performed.
K18 Obtained from the calibration certificate -
K19 Obtained from the calibration certificate -
t The line temperature °F Where:
tR The reference temperature °F ρVOS The density corrected for temperature g/cc
Kr Constant obtained from Solartron -
Kj Constant obtained from Solartron g/cc
The pressure and temperature corrected density ρPT is calculated VC Calibration VOS m/s
by VA Liquid VOS m/s
K 20 K 20 A K 20 B p pREF
Where:
ρpt The density corrected for pressure and temperature g/cc
K20A Obtained from the calibration certificate -
K20B Obtained from the calibration certificate -
K21A Obtained from the calibration certificate -
K21B Obtained from the calibration certificate -
p The line pressure psig
pR The reference pressure psig
VOS pt Kr . pt K j 3
1.4e 6 1 1
VOS pt 1 2 2
1000 pt 1.4 VC VA
VC 100 1455 pt
VC 2690 900 pt
IT
158 SPIRIT EXLERATE | FUNCTION REFERENCE MANUAL | CM/EXL/FR -EN
fxSolartron_Liquid_M
The function calculates the density from a frequency input signal Compliance
provided by a Solartron 7835, 7845, 7846 or 7847 liquid The calculations are in accordance with documents:
densitometer and corrects it for temperature, pressure and 78355010 'Solartron 7835, 7845, 7846 & 7847 Advanced Liquid
velocity of sound effects using metric units. Density Transducer Manual', 2001
The function requires that the calibration constants are based 78355080, Rev. C, 'Micro Motion 7835, 7845, 7846 & 7847
on the following units: Liquid Density Transducer', October 2007
Temperature °C
Pressure bar
Density kg/m3
Calculations
The indicated density ρi is calculated by The temperature corrected density ρt is calculated by
i K 0 K1 K 2 2
t i 1 K18 t tR K19 t tR
Where:
ρi The indicated density kg/m3 Where:
K0 Obtained from the calibration certificate - ρt The density corrected for temperature kg/m3
K1 Obtained from the calibration certificate - K18 Obtained from the calibration certificate -
K2 Obtained from the calibration certificate - K19 Obtained from the calibration certificate -
τ The time period in µS s t The line temperature °C
tR The reference temperature °C
IT
SPIRIT EXLERATE | FUNCTION REFERENCE MANUAL | CM/EXL/FR -EN 159
K 20 K 20 A K 20 B p pREF
Where:
ρpt The density corrected for pressure and temperature kg/m3
K20A Obtained from the calibration certificate -
K20B Obtained from the calibration certificate -
K21A Obtained from the calibration certificate -
K21B Obtained from the calibration certificate -
p The line pressure bar(g)
pR The reference pressure bar(g)
VOS pt Kr . pt K j 3
1.4e 6 1 1
VOS pt 1 2 2
pt 1400 VC V A
When 300 <= pt <= 1100:
VC 100 1.455 pt
When 1100 < pt <= 1600:
VC 2690 0.9 pt
Else (pt < 300 or pt > 1600) the VOS of sound correction is not
performed.
Where:
fxSolartron_SG
The function calculates the specific gravity from a frequency Compliance
input signal provided by a Solartron 3096 or 3098 Specific The calculations are in accordance with documents:
Gravity transducer. 30985020 'Solartron 3098 Gas Specific Gravity Transducer
Manual', 2001
30985020, Rev. B, 'Micro Motion 3098 Gas Specific Gravity
Meter', October 2007
Gx Gy
SG K 0 K 2 2 K2
t X2 t Y2
Where:
SG Specific gravity - Gx Specific gravity of calibration gas x -
Periodic time s Gy Specific gravity of calibration gas y -
K0 Obtained from the calibration certificate - x Periodic time of calibration gas x s
K2 Obtained from the calibration certificate - y Periodic time of calibration gas y s
IT
SPIRIT EXLERATE | FUNCTION REFERENCE MANUAL | CM/EXL/FR -EN 161
fxStatusAlarm
The ‘fxStatusAlarm’ alarm function generates an alarm that can
be triggered by a boolean condition.
fxTag
The 'fxTag' function creates a tag for the cell that contains the
'fxTag' function.
fxTimer
The 'fxTimer' function provides generic timer functionality.
fxTotalizerDelta
The function accumulates a flow increment into a cumulative NOTE: As opposed to the flow increment input value, the flow
(eternal) total. increment output value is set to 0 when the totalization is
Besides of the cumulative total the function also outputs the disabled and has the proper units and is therefore better suited
flow increment that represents the increase in flow quantity in as input for other functions.
the last calculation cycle. This increment value serves as an input
for related batch and period flow-weighted averaging and
totalization functions.
Unit conversion The flow increment is converted from 'sm3' to 'MMscf' before
The function will automatically apply the required conversion the cumulative total and increment output values are
based on the unit of the flow increment input value (Input unit) updated.
and the selected 'Output unit' for the flow quantity.
E.g. when flow rate input is in 'scf' the output unit is 'MMscf' then Similar conversions are applied for flow increments that are
the following conversions are applied: expressed in mass, volume, normal volume and energy units.
fxTotalizerRate
The function accumulates a flow rate into a cumulative (eternal) the last calculation cycle. This increment value serves as an input
total. for related batch and period flow-weighted averaging and
Besides of the cumulative total the function also outputs the totalization functions.
flow increment that represents the increase in flow quantity in
Unit conversion resulting in a value expressed in 'kg' (i.e. the base unit for
The function will automatically apply the required conversion 'Mass').
based on the unit of the flow rate input value (Input unit) and the The flow increment is converted from 'kg' to 'tonne' before
selected 'Output unit' for the flow quantity. the cumulative total and increment output values are
E.g. when flow rate input is in 'kg/hr' the selected unit is 'tonne' updated.
then the following conversions are applied:
Similar conversions are applied for flow rates that are expressed
The flow rate value is converted to the corresponding base in volume, standard volume, normal volume and energy units.
unit, which is 'kg/s' for a 'Mass per Time' unit
The flow increment over the last calculation cycle is calculated
from the 'kg/s' value and the actual calculation cycle time,
IT
SPIRIT EXLERATE | FUNCTION REFERENCE MANUAL | CM/EXL/FR -EN 165
fxUGC_C
The function calculates the density from a frequency input signal
provided by a UGC densitometer and corrects it for temperature
and pressure effects in US customary units.
Calculations
The uncorrected density ρi is calculated by
K 0 K1 K 2
i
2
Where:
ρi The uncorrected density lbm/ft3
K0 Obtained from the calibration certificate -
K1 Obtained from the calibration certificate -
K2 Obtained from the calibration certificate -
τ The time period in µS s
t i K P1 K P 2 i K P3 i 2 p pR KT 1 KT 2 i KT 3 i 2 t t R
Where:
ρt The density corrected for temperature and pressure lbm/ft3
KP1 Obtained from the calibration certificate -
KP2 Obtained from the calibration certificate -
KP3 Obtained from the calibration certificate -
KT1 Obtained from the calibration certificate -
KT2 Obtained from the calibration certificate -
KT3 Obtained from the calibration certificate -
t The line temperature °F
tR The reference temperature °F
p The line pressure psig
pR The reference pressure psig
IT
166 SPIRIT EXLERATE | FUNCTION REFERENCE MANUAL | CM/EXL/FR -EN
fxUGC_M
The function calculates the density from a frequency input signal
provided by a UGC densitometer and corrects it for temperature
and pressure effects in metric units. Calibration constants also
need to be in metric units.
Calculations
The uncorrected density ρi is calculated by
K 0 K1 K 2
i
2
Where:
ρi The uncorrected density kg/m3
K0 Obtained from the calibration certificate -
K1 Obtained from the calibration certificate -
K2 Obtained from the calibration certificate -
τ The time period in µS s
t i K P1 K P 2 i K P3 i 2 p pR KT 1 KT 2 i KT 3 i 2 t t R
Where:
ρt The density corrected for temperature and pressure kg/m3
KP1 Obtained from the calibration certificate -
KP2 Obtained from the calibration certificate -
KP3 Obtained from the calibration certificate -
KT1 Obtained from the calibration certificate -
KT2 Obtained from the calibration certificate -
KT3 Obtained from the calibration certificate -
t The line temperature °C
tR The reference temperature °C
p The line pressure bar(g)
pR The reference pressure bar(g)
IT
SPIRIT EXLERATE | FUNCTION REFERENCE MANUAL | CM/EXL/FR -EN 167
fxWatchUpdate
This function raises a flag whenever a value has been updated in
the latest calculation cycle.
fxVCone_C
This function calculates the mass flow rate for a measured Compliance
differential pressure over a McCrometer V-Cone meter in U.S. McCrometer: Flow Calculations for the V-Cone Flow meter
customary units. Literature part #24509-54 Rev 3.1/02-05 2005
The calculation, as specified by the meter supplier, is essentially
a modified ISO 5167 flow rate calculation. As opposed to ISO-
5167 the discharge coefficient is a function input. Because the
discharge coefficient is a function of Reynolds number an
optional calibration correction needs to be applied outside this
function.
Calculations
The flow calculation is as specified in the McCrometer reference
document.
The downstream to upstream correction (and vice versa) for
pressure, temperature and density are as specified for function
'ASME MFC-3M Orifice'.
IT
170 SPIRIT EXLERATE | FUNCTION REFERENCE MANUAL | CM/EXL/FR -EN
fxVCone_M
This function calculates the mass flow rate for a measured Compliance
differential pressure over a McCrometer V-Cone meter in metric McCrometer: Flow Calculations for the V-Cone Flow meter
units. Literature part #24509-54 Rev 3.1/02-05 2005
The calculation, as specified by the meter supplier, is essentially
a modified ISO 5167 flow rate calculation. As opposed to ISO-
5167 the discharge coefficient is a function input. Because the
discharge coefficient is a function of Reynolds number an
optional calibration correction needs to be applied outside this
function.
Calculations
The flow calculation is as specified in the McCrometer reference
document.
The downstream to upstream correction (and vice versa) for
pressure, temperature and density are as specified for function
'ISO 5167 Orifice'.
IT
172 SPIRIT EXLERATE | FUNCTION REFERENCE MANUAL | CM/EXL/FR -EN
3 Flow-X IO functions
This chapter lists all available IO functions. Please refer to the
pinouts for your specific model of flow computer in the
installation manual provided with the Flow-Xpress software.
fxAnalogInput
Each flow module supports a maximum of 6 analog input Squares (RMS), Where the latter is meant for a differential
signals. The first 2 signals can be used as either a mA/VDC input pressure signal of a primary flow device (e.g. an orifice plate)
or as a RTD input.
The input signal is considered to be faulty when the input
The Analog input function is used for mA and VDC inputs. For circuitry has an open or a short circuit or when the measured
RTD inputs refer to function 'RTD Input'. value is outside a configurable range.
Analog signals are sampled at a rate of about 15 Hz. Every
calculation cycle the samples are averaged and the average is NOTE: Function fxKeypadfallback provides the option to force
scaled to a value in engineering units. the analog input value to a specific fallback value in case it
The output value can be equal to either the last sample or the should fail. It also provides the option to force the input value to
average of the samples of the last calculation cycle. The average a keypad value e.g. upon user request.
is either the arithmetic mean or the Root of the Mean of the
fxAnalogOutput
This function configures a single 4-20 mA output channel on the
local Flow-X module. Use function 'fxSetAnalogOutput' to control
the actual output signal.
fxSetAnalogOutput
This function writes an analog value to an output. Make sure that
the analog output has been set up by calling fxAnalogOutput
first.
fxDigitalInput
The Digital Input function processes a single digital input and
outputs either the actual input signal or the latched input signal.
Calculations
The following table summarizes the relationship between the
input signal and the output 'State', depending on the inputs
'Logic and 'Mode'.
fxDigitalOutput
The Digital Output function configures a single digital output on
the local module. Use function 'fxSetDigitalOutput' to control the
actual output signal.
IT
174 SPIRIT EXLERATE | FUNCTION REFERENCE MANUAL | CM/EXL/FR -EN
Calculations
The following table summarizes the relationship between the
output signal, the input 'Logic and the control value as set by
function 'fxSetDigitalOutput'.
fxSetDigitalOutput
This function writes a value to a configured digital output.
fxFrequencyOutput
This function provides a programmable output frequency on one
of the digital pins. The frequency as well as the duty cycle are
user programmable. When using the frequency output to
configure a dual pulse system, channel 2 can be configured.
fxSetFrequencyOutput
This function starts a programmed frequency on the digital pin,
set by fxFrequencyOutput. In case of a dual pulse via frequency
out, here the phase shift between the pins can be configured.
fxDoubleChronometry
The function provides double chronometry measurement for the other end (C and D) there are 4 possible detector
meter proving and calibration purposes with a resolution of 100 combinations A-C, A-D, B-C and B-D, resulting in four available
nanoseconds. prover volumes. By defining 4 Prove measurement functions
The function monitors a (dual) pulse input signal provided by the all 4 prove volumes can be used to prove the meter by a single
meter under test and by one or more digital signals that prove sequence. The operator selects the primary detector
represent the start and stop of the measurement. combination that will be used for calculating the new K factor
The digital inputs used for start and stop of the measurement or meter factor. The result of the 4 detector combinations are
are typically connected to the sphere detector switches of a pipe compared to each other and an alarm is raised in case of
prover or the piston detectors of a compact prover. discrepancy.
The start / stop signal may also be any other type of signal, e.g. Meters that operate in series can all be proved at the same
a digital output from another flow computer. This allows for time.
flexible master meter configurations in which a single prove For meters that provide more than flow signal all signals can
measurement is performed by two separate flow computers, be proved at the same time
one that monitors the meter under test and one that monitors For provers with a range of calibrated prover volumes to
the reference or master meter. accommodate proving of meters of different capacities,
multiple prover volumes can be processed at the same time.
By using multiple Double Chronometry functions multiple prove
measurements can be performed at the same time by one and Combinations of these scenarios are possible as well.
the same flow module.
Some examples of simultaneous prove measurements are: The double chronometry method comprises the measurement of
the time between the start and stop signals and the time
For a prover with 2 begin and 2 end detector switches the between the two meter pulses that immediately follow the start
flow meter can be proved against all 4 the calibrated prover and stop signals. The flow module then determines the
volumes at the same time. interpolated number of meter pulses that correspond to the
measurement start and stop signals as follows:
With 2 detectors at one end of the prover (A and B) and 2 at
IT
176 SPIRIT EXLERATE | FUNCTION REFERENCE MANUAL | CM/EXL/FR -EN
time A
Interpolated pulse count whole pulses
time B
fxPulseInput
The 'fxPulseInput' function is meant for a flow meter that The function also provides the option to output the raw pulse
provides a single or a dual pulse output signal. Each flow module signals, which is useful in case a separate flow computer is used
supports either 1 single or 1 dual pulse input. for proving purposes. The proving flow computer takes the pulse
A dual pulse signal is a set of two pulse signals ('pulse trains') A output from the flow computer that processes the meter on
and B that originate from the same flow meter. The two pulse prove to perform prove measurements including double
trains are similar but shifted in phase (typically 90°). chronometry if required. The prover output signal is generated
The primary purpose of the dual signal is to allow for pulse at 20 MHz, the same frequency at which the raw pulse input
integrity checking. Added or missing pulses on either pulse train signals are sampled.
are detected and corrected for and simultaneous noise pulses
are rejected. Compliance
The function provides detailed information on the raw, corrected ISO 6551:1982, Petroleum liquids and gases -- Fidelity and
and bad pulses for both channels and for both the forward and security of dynamic measurement -- Cabled transmission of
reverse flow direction. electric and/or electronic pulsed data
The phase shifted pulse train signal also allows for automatic
detection of flow direction. Each A pulse is followed by a B pulse NOTE: The Flow/X series of flow computers provides Level A
within a time period (t) in case the flow runs in the forward pulse security as defined in ISO 6551, which means that bad
direction. In case the flow runs in the reverse direction, the pulses are not only detected (level B) but also corrected for.
opposite is the case, i.e. each B pulse is followed by an A pulse
within the same time period t.
B
t
fxResetPulseInputErrors
This function resets the error pulse counters (error, added,
missing and simultaneous pulses) of the pulse input of one of
the modules part of the same configuration.
It is required that the pulse input of the specified module is
configured by function 'fxPulseInput'.
fxPulseOutput
This function is used to feed pulses to an electro-mechanical
(E/M) counter. There are 4 pulse output units, to be selected by
the index parameter. The function uses a reservoir to accumulate
the pulses. On one hand the number of pulses that need to be
added to the reservoir is calculated from inputs 'Increment' and
‘Significance factor'. On the other hand pulses are taken from
the reservoir and fed to the E/M counter at a rate that will not
exceed the specified output rate.
This can also be used to configure a dual pulse situation, for this
case you can configure a second channel and the delay it has on
the primary channel.
Calculations
Every calculation cycle a number of pulses is added to the
reservoir that is equal to input value 'Increment' divided by input
value Significance factor.
fxSetPulseOutput
Adds pulses to the reservoir, to be output on the next cycle.
Takes the ‘significance factor’ into account, see fxPulseOutput.
fxPT100Input
Each flow module provides 2 inputs for Pt-100 sensors. For each sample the temperature value is obtained from the
A Pt-100 sensor is a Platinum Resistance Thermometer (PRT) measured Ohms by means of the standard RTD quadratic
element with a resistance of 100 Ω at 0°C. 'Pt' is the symbol for equation.
platinum.
The input signal is considered to be faulty when the input
Resistance thermometers as such are also referred to as circuitry has an open or a short circuit or when the measured
Resistance Temperature Detectors (RTD). value is outside its range (as defined in table below).
fxRTDInput
Reads the PT100 input as a ‘raw’ Ohm number. Use fxPT100Table to
convert to degrees Celsius.
fxPT100Table
This function converts a resistance value (Ohm) into a For each sample the temperature value is obtained from the
temperature value (°C) according to the Pt-100 conversion measured Ohms by means of the standard RTD quadratic
tables. A Pt-100 sensor is a Platinum Resistance Thermometer equation.
(PRT) element with a resistance of 100 Ω at 0°C. 'Pt' is the
symbol for platinum. The input signal is considered to be faulty when the input
Resistance thermometers as such are also referred to as circuitry has an open or a short circuit or when the measured
Resistance Temperature Detectors (RTD). value is outside its range (as defined in table below).
The resistance changes linearly with temperature. For Pt-100
elements the linearity coefficient is 0.385 Ohm/°C for European
elements and 0.392 Ohm/°C for American elements
fxTimePeriodInput
This function measures the time period between two pulses with The measured time period value can be linked to a subsequent
a high resolution (100 nanoseconds) and is typically used for densitometer-specific (Solartron, Sarasota, UGC) function that
densitometer inputs. The measurement is performed calculates the density at the densitometer conditions.
continuously in the background and the function returns the Abnormal measurements are filtered out and alarmed for.
average value since the previous calculation cycle.
Relative Density at 60 degrees Fahrenheit RD @ 60°F kg/m3 ρH2O,60°F (2) Exact (3)
(1)
(1)
This conversion only applies when
conversion is to /from the 'Mass per
Volume' value at 60 °F
(2)
ρH2O,60°F the density of water at 60 °F is
a global setting with a default value of
999.012 kg/m3
(2)
The conversion is exact, however the
resulting value is an approximation
because of ρH2O,60°F
Mass per Standard kilogram per standard cubic meter kg/sm3
Volume
gram per standard cubic centimeter g/scm3 kg/sm3 1.0 E03 Exact
pound per standard cubic foot lbm/scf kg/sm3 1.601846337 E+01 Exact
Mass per Normal kilogram per normal cubic meter kg/m3(n)
Volume
gram per normal cubic centimeter g/cm3(n) kg/m3(n) 1.0 E-03 Exact
Mole mole mol
A mole resembles 6.0251 x 10^23
molecules of a substance, a standard
number of molecules known as
Avogadro’s number.
kilomole kmol mol 1.0 E+03 Exact
pound mole lbmol mol 4.5359237 E-01 Exact
In English units, the pound-mass (lbm) is
the standard unit of mass. In order to use
the same molecular weights as those
listed on the periodic chart, the pound-
mol, (lbmol, sometimes lb-mol, lbm-mol,
or lbm-mole) is defined
kilopound mole klbmol mol 4.5359237 E+02 Exact
Mole per Mole mole fraction mole/mole
mole percentage %mole mole/mole 1.0 E-02 Exact
Mole per Volume mole per cubic meter mol/m³
mole per cubic centimeter mol/cm³ mol/m³ 1.0 E+6 Exact
mole per litre mol/l mol/m³ 1.0 E+3 Exact
kilomole per cubic meter kmol/m³ mol/m³ 1.0 E+3 Exact
kilomole per cubic centimeter kmol/cm³ mol/m³ 1.0 E+9 Exact
kilomole per litre kmol/l mol/m³ 1.0 E+6 Exact
kilomole per cubic feet kmol/ft³ mol/m³ 1 / 28.31685 E -03 Exact
IT
SPIRIT EXLERATE | FUNCTION REFERENCE MANUAL | CM/EXL/FR -EN 185
Terminology
Term Description Same as
Heating Value Usually the same as Gross Heating Value
Calorific Value Usually the same as Superior Calorific Value
Superior Calorific Value Heating value when assuming that water formed at the combustion stays in the gaseous state. Gross Heating Value
From ISO6976.
Inferior Calorific Value Heating value when assuming that water formed at the combustion has totally condensed to the liquid Net Heating Value
state.
From ISO6976.
Gross Heating Value Heating value when assuming that water formed at the combustion stays in the gaseous state Superior Calorific Value
Term used in GPA2172.
Net Heating Value Heating value when assuming that water formed at the combustion has totally condensed to the liquid Inferior Calorific Value
state.
Term used in GPA2172.
Molar Mass Ratio Ratio of molar mass of gas and molar mass of air at the base conditions Specific Gravity
Ideal Specific Gravity
Ideal Relative Density
Relative Density Ratio of real mass density of gas and real mass density of air at the base conditions Real Relative Density
Real Specific Gravity
Specific Gravity Ratio of real mass density of gas and real density of air at the base conditions Molar Mass Ratio
Ideal Specific Gravity
Ideal Relative Density
IT
188 SPIRIT EXLERATE | FUNCTION REFERENCE MANUAL | CM/EXL/FR -EN
Standard composition
The Standard Composition is a standard array of mole fractional
values that is used by all functions that require a (partial)
compositional analysis.
The following table defines the sequence of the components and
also defines which function uses which component.
1) Depending on function input 'Neo-Pentane mode' the value is added to i-Pentane or n-Pentane or it is neglected.
2) GPA2172 uses the specified water fraction for wet gas calculation only.
3) MR113 requires the input water fraction to be 0. The output water fraction is calculated from absolute humidity
IT
SPIRIT EXLERATE | FUNCTION REFERENCE MANUAL | CM/EXL/FR -EN 189
Notes
IT
190 SPIRIT EXLERATE | FUNCTION REFERENCE MANUAL | CM/EXL/FR -EN
Notes
IT
SPIRIT EXLERATE | FUNCTION REFERENCE MANUAL | CM/EXL/FR -EN 191
Notes
—
ABB b.v. ABB Inc.
Measurement & Analytics Measurement & Analytics
Prof. Dr. Dorgelolaan 20 7051 Industrial Boulevard
5613 AM Eindhoven Bartlesville OK 74006
The Netherlands United States of America
Phone: +31 40 236 9445 Phone: +1 800 442 3097
Mail: nl-spiritit-sales@abb.com
ABB Limited
ABB Malaysia Sdn Bhd. Measurement & Analytics
Measurement & Analytics Oldends Lane, Stonehouse
Lot 608, Jalan SS 13/1K Gloucestershire, GL10 3TA
47500 Subang Jaya United Kingdom
Selangor Darul Ehsan, Malaysia Phone: +44 7730 019 180
Phone: +60 3 5628 4888
abb.com/midstream
—
We reserve the right to make technical changes or modify the contents of this document
without prior notice. With regard to purchase orders, the agreed particulars shall prevail.
ABB AG does not accept any responsibility whatsoever for potential errors or possible lack
of information in this document.
We reserve all rights in this document and in the subject matter and illustrations contained
therein. Any reproduction, disclosure to third parties or utilization of its contents – in
whole or in parts – is forbidden without prior written consent of ABB.
© ABB 2017