TM-SP08-0003 ed14 Inventory Calculations
TM-SP08-0003 ed14 Inventory Calculations
Elektroniskt/Electronic I
Document type
Specifikation/Specification
Approved by Reg. No.
EPc-HK TM-SP08-0003
Issued by Date Issue Page
EPc-HK Håkan Kjellström 2009-01-20 14 1(76)
Fördelning/To För Kännedom/Copy
Dept TP, Dept TT, Dept TSe, TM-AR Dept TS, Dept EPc, ESs-VK-P
TankMaster
Inventory Calculations
Issue 3
Document template: C:\Documents and Settings\hkjellstrom\Application Data\Microsoft\Templates\Normal.dotm
Table of contents
1 DOCUMENT DEFINITION
1.1 Identification
This document describes the Inventory functions (calculation of volume, weight, density, etc.) in
the OPC TankServer included in TankMaster program suit.
Issue 12 2008-05-09 / EPc-HK This document replaces the use of the old document WinOpi/SP-99.0020.
Chapter 2.6 Conversion of Values, changed the value for water density from
999.012 to 999.016 used in converting density values.
Chapter 5.5 Reference Density Calculation, added subchapter API Standard 2540
from 2004
Issue 3
Issue 13 2008-10-13 / EPc-HK This document replaces the use of the old document WinOpi/SP-99.0020.
Chapter 5.5 Reference Density Calculation, added subchapter API Standard 2540
from 2007 (5E, 23E, 53E, 59E).
Issue 14 2009-01-20 / EPc-HK Added info about reference temperature for Alcohol table.
2 GENERAL
2.1 Introduction
TankMaster is a software product that is used in petrochemical process industry, tank terminals,
chemical industry and on ships for tank gauging monitoring and inventory calculation.
The inventory calculations are mainly based on volumes. The main calculation is to find a volume
correction factor (VCF). The VCF is then used to calculate a volume based on a reference
temperature.
3. Calculation of reference density and VCF according to the selected volume correction table,
4. Calculation of net volumes with help of VCF.
The specific calculation methods can be divided into seven categories of correction tables.
# Table Description Reference
1 54A_2004, API Standard 2004 API Standard VCF Calculation
54B_2004, Chapter VOLUME CORRECTION
54C_2004, FACTOR CALCULATION
54D_2004,
6A_2004,
6B_2004,
6C_2004,
6D_2004,
60A_2004,
60B_2004,
60C_2004,
60D_2004
24A_2004,
24B_2004,
24C_2004,
24D_2004
------------------------ -----------------------------------
54E_2007 API Standard 2007
Issue 3
6E_2007
60E_2007
24E_2007
Document template: C:\Documents and Settings\hkjellstrom\Application Data\Microsoft\Templates\Normal.dotm
------------------------ -----------------------------------
54A, API Standard 1980
54B,
54C,
54D, API Standard 1984
------------------------ -----------------------------------
54 API standard 1960
54 API standard 1952
6 API standard 1952
2 D4311 ASTM D4311 1983/1996 Chapter ASTM Standard D4311 from
Standard Practice for 1996
Determining Asphalt Volume
Correction to a Base
Temperature
3 Chem Chemical Volume Correction Chapter CHEMICAL AND LINEAR
Linear VOLUME CORRECTION
CALCULATION
4 RT_54A_2004, API Standard 2004 with Chapter VOLUME CORRECTION TO
RT_54B_2004, operator entered reference OTHER TEMPERATURES
RT_54C_2004, temperature.
RT_54D_2004,
RT_6A_2004,
RT_6B_2004,
RT_6C_2004,
RT_6D_2004
------------------------ -----------------------------------
RT_54E_2007 API Standard 2007 with
RT_6E_2007 operator entered reference
Issue 3
temperature.
------------------------ -----------------------------------
RT_54A, API standard 1980 with
Document template: C:\Documents and Settings\hkjellstrom\Application Data\Microsoft\Templates\Normal.dotm
RT_6A,
RT_6B,
RT_6C,
RT_6D
5 User1-User10 User supplied VCF formulas. Chapter USER VOLUME
CORRECTION CALCULATION
6 Custom Custom Volume Correction Chapter CUSTOM VOLUME
CORRECTION CALCULATION
7 Alcohol Practical Alcohol Table Chapter ALCOHOL VOLUME
(VOLUME 2, Table 1) CORRECTION CALCULATION
Table 1 Supported correction tables
2.2 References
2.3 Definitions
Definition Description
API American Petroleum Institute
ASTM American Society for Testing Materials
MPMS Manual of Petroleum Measurement Standard
Derived values Calculated values, e.g. volume of product.
Dongle A piece of hardware connected to the parallel port of the PC. The dongle
will protect our software from software piracy.
Measured Sensor values, manually entered values and configuration data are
values considered to be measured values in contrast to derived values.
OLE Object Linking and Embedding
OPC OLE for Process Control
OPI Operators Interface
TM TankMaster
TR TankRadar
Pounds lb XXX.0
Kilograms kg XXX.0
Short tons ton s XXX.xxx
Metric tons ton m XXX.xxx
Long tons ton l XXX.xxx
Issue 3
In cases where a value is shown with the number 5 in the last decimal place e.g. XXX.x5, then the
last decimal place in the value will be rounded to either 0 or 5.
C F (― F‖ - 32.0) / 1.8
Document template: C:\Documents and Settings\hkjellstrom\Application Data\Microsoft\Templates\Normal.dotm
WinOpi
WinSetup
TankServer
(OPC)
Master
Protocol
Server
(OPC)
Issue 3
The system will run in Windows NT and consist of the programs below.
Document template: C:\Documents and Settings\hkjellstrom\Application Data\Microsoft\Templates\Normal.dotm
Programs Description
OPC Servers There are in fact two types of OPC servers. The Main OPC Server (Tank Server)
is a standalone program, which will collect device data from OPC Master Protocol
server and calculate inventory tank data. The OPC server can provide data to the
WinOpi and WinSetup program as well as Microsoft Office programs as Excel. The
other one is the OPC Master Protocol Server. This program provides services
such as direct device data access via Modbus protocol. It will also be possible to
program devices, change address of device and restart devices via this OPC server.
WinOpi The operators program in the TankMaster suite. This program includes functions
such as alarm handling, automated reports, batch reporting and tank and group
windows with bargraphs.
WinSetup The engineer program in the TankMaster suite. This program includes functions
such as device configuration, tank installation and service functions.
Average Temp
CSTh
Ambient Air Temp
GSV
Document template: C:\Documents and Settings\hkjellstrom\Application Data\Microsoft\Templates\Normal.dotm
S&W
NSV
Reference Density
WIV
3.1 Introduction
The observed volume calculations form the base of the inventory (or volume) calculations in the
system. Therefore is this part, common for all inventory calculations.
3.2.1 Introduction
The TCT converts level to volume and is valid for a defined temperature, for example 20 ºC. Tank
Capacity Tables for cylindrical and spherical tanks are supported.
The system will store the level, volume and temperature unit at which the TCT was entered.
Issue 3
All these data are stored in the database and used in the calculation.
Where is the linear thermal expansion factor for the shell material.
for example:
Level From Level To Base Volume Area Coeff V = BV + AC * level
(m) (m) (m³) (m³/m)
0.000 2.036 32.618 332.801 V = 32.618 + 332.801 * level
2.036 3.979 30.676 333.755 V = 30.678 + 333.755 * level
3.979 6.026 32.572 333.279
6.026 7.904 28.503 333.954
7.904 9.902 31.321 333.597
9.902 11.693 24.247 334.312
Note: The volume at zero level varies due to expansion in tank material
V = Volume at beginning of level interval + Coeff * (level - level at the beginning of the interval)
for example:
Level From Level To Base Volume Area Coeff V = BV + AC * ( level – LF )
(m) (m) (m³) (m³/m)
0.000 0.050 3.156 0.000 3.156 + 0.000 * (level – 0.000)
0.050 0.100 74.199 1420.860 74.199 + 1420.860 * (level – 0.050)
0.100 0.150 156.274 1641.500
0.150 0.180 238.348 1641.480
0.180 0.190 287.606 1641.930
The TCT volume is obtained from the table with linear interpolation except for spherical tanks
where quadratic interpolation is used. TCTs calculates the volume within an interval as:
Document template: C:\Documents and Settings\hkjellstrom\Application Data\Microsoft\Templates\Normal.dotm
V = Volume at beginning of level interval + Coeff * (level - level at the beginning of the interval)
Area Coefficient = (Base Volume for next interval – Base Volume) / ( Level To – Level From)
for example:
Level From Level To Base Volume V = BV + AC * ( level – LF )
(m) (m) (m³)
0.000 1.000 0.000
1.000 2.000 1000.000 1000.0 + ((2000.0 – 1000.0)/(2.0-1.0)) * (level – 1.0)
2.000 3.000 2000.000
3.000 4.000 3000.000
4.000 5.000 4000.000
Note: ―Level To‖ = ―Level From‖ for next interval. ―Level To‖ is redundant information and not
necessary to enter into the system.
Available Room (AVRM) is calculated by subtracting the total observed volume (TOV) from the
Document template: C:\Documents and Settings\hkjellstrom\Application Data\Microsoft\Templates\Normal.dotm
tanks max volume (Max Vol). Max volume is manually entered in the TCT for the tank.
PW = PV * Observed Density
Issue 3
Document template: C:\Documents and Settings\hkjellstrom\Application Data\Microsoft\Templates\Normal.dotm
Variable Description
TECsh Tank shell expansion coefficient. ( TECsh = 2 * where is the linear thermal
expansion factor for the shell material see table in chapter Introduction. )
TA Ambient air temperature (rounded to nearest degree)
TL Temperature of the liquid in the tank.
Tsh Temperature of the tank shell.
TB Base shell temperature (the temperature at which the tank capacity was computed).
T T = Tsh – TB
VTCT The volume obtained from the tank calibration table.
For noninsulated tanks, the current shell temperature will be given by the equation.
7*TL TA
Issue 3
For insulated tanks, the current shell temperature will be given by the equation.
was computed).
D Density difference, D = Dobsair – DB kg/ m³
VAF Volume Adjustment Factor (from tank capacity table) m³
Document template: C:\Documents and Settings\hkjellstrom\Application Data\Microsoft\Templates\Normal.dotm
The volume compensation depends on the position of the roof and is separated into three intervals:
Roof factor Description
0 Below lower limit (below critical zone), when the roof is resting on its leg no
compensation is made (roof factor = 0).
1 Above upper limits (above critical zone), when the roof is freely floating, the
‗volume‘ of the roof reduces the volume value from the TCTs. In this case
compensation is made with roof factor = 1
x Between lower and upper limits (critical zone), when the roof is partly floating
compensation is made with:
roof factor = (Level – lower limit) / (upper limit - lower limit)
All volume and weight values are indicated by a @ or a * in front of the value when needed.
The @ indication is used when the roof is partly floating i.e. within the limits of roof positions.
The * indication is used when the roof is resting on the legs.
Roof correction is calculated with help of roof weight and observed density.
If the roof correction is calculated into the TCT using a base density, a secondary correction must
be calculated for any difference between the base density and the observed density.
On these TCT the following or similar note can be found:
A total of 39543 liters has been deducted from this table between 110 cm and 146 cm for floating
roof displacement based on a floating weight of 29266 kg and an observed liquid density of 740.1
kg/m³. Gauged levels above 146 cm reflects this deduction, but should be adjusted for varying
observed density according to the following.
FRA = D * VAF
4.1 Introduction
This chapter includes the calculations for Net volume and Weight. These calculations are valid for
API Standard 2540, ASTM D1250, IP200 and other standards described in this document if no
other calculation is described for the standard. In the calculations below VCF and Reference density
is used, these variables are described in separate chapters below and will be calculated differently
according to the selected volume correction table.
(liquid equivalent of vapor) is added, see chapter Liquid and mass calculation of vapor in LPG.
WIA = NSV * WCF ( Note: NSV converted to bbl or m3 depending of the used table. )
Weight Conversion Factor is calculated according to the used weight and density unit see table
below. (Note: lb/gal (US) is converted to API before calculation of WCF.)
This calculation will only be performed if the tank is of the types sphere or horizontal and the
product for the tank is included in the product table. Products are available to select for this
purpose. Attributes on the products are product name, product description, VLVR and Molecular
Mass. The terms used in the calculation are defined as follows.
Variable Description Unit
AVRM Available room above liquid level. m³
Pv Vapor Pressure (gauge pressure) kPa
TA Vapor temperature in Kelvin (Observed vapor temperature + 273.15). Kelvin
101,325 Standard pressure kPa
TB Base Temperature in Kelvin (273.15 + 15.0). Kelvin
Mv Vapor mass kg
Mm Molecular mass kg/kmol
VLVR Vapor liquid volume ratio
Vg Equivalent Liquid Volume m³
V * Mm
Mv = ----------
23,6451
Vg = V / VLVR
5 DENSITY CALCULATION
5.1 Introduction
This chapter includes the calculations for Observed Density and Reference density.
Calculations according to ISO Standard CD 15169
considered constant or calculated based on base density and ambient air temperature.
Manual default value is 1.21 kg/m3.
Document template: C:\Documents and Settings\hkjellstrom\Application Data\Microsoft\Templates\Normal.dotm
Variable Description
DB Density Base in unit kg/m3 (user entered, default value 1.21 kg/m3 based on 15.0 °C , 1
bar and 50% relative air humidity).
TB Temperature Base (15.0 °C, 288.15 Kelvin).
PB Pressure Base (absolute pressure, 100000 Pa).
Da Ambient Air Density in unit kg/m3 (rounded to 2 decimals).
Ta Ambient Air Temperature in unit °C (rounded to 2 decimals).
Pa Ambient Air Pressure (absolute pressure).
Da = DB * ( TB / Ta ) * ( Pa / PB )
Assuming that ambient air pressure (Pa) is constant (absolute pressure 100000 Pa) air density can be
calculated as:
RTG P3
Ht
P1
L
Z (can be < 0)
Datum plate
Thus:
Issue 3
P1- P3 = Total liquid product head (above P1) + in-tank vapor head – ambient air head between P1
Document template: C:\Documents and Settings\hkjellstrom\Application Data\Microsoft\Templates\Normal.dotm
and P3
When the level (L) is below the minimum level for density measurement (Lmin), the last approved
reference density (Dref) value is used to calculate the observed density (Dobsvacuum).
The observed density and all values derived from it are then marked with a'=' (except when floating
roof correction is used).
When the reference density in vacuum (Dref) is manually entered by the user and valid value for
VCF are available observed density in vacuum (Dobsvacuum) is calculated as below.
5.5.1 Introduction
The reference density can be calculated when an observed density is measured with one or more
pressure sensors (the reference density is not calculated if it‘s manually entered by the user).
The density will be calculated differently according to the selected volume correction table.
Tables 53 and 5.
Lookup table 53/5 from 1952 is not implemented, the algorithm for table 53A/5A from 1980 is
used. See chapter API Standard 2540, MPMS Chapter 11.1 from 1980
The above listed tables are only used when calculating the reference density.
The reference density can be calculated according to API tables 53A/5A if the observed density is
available.
Issue 3
Numbers of density intervals are 19 and the total defined range of density is 500.0 - 1200.0 kg/m³.
Calculation:
Calculation procedure:
1. Round Observed Density (Dobsvacuum) to nearest 0.5 kg/m³
2. Check input values.
3. Calculate ΔT = TL - 15.0 °C
4. Initialize Dref = Dobsvacuum
5. Calculate VCF according to used table (e.g. 54A).
6. Calculate new Dref = Dobsvacuum / VCF
7. If the new value Dref differs, more than 0.05 kg/m³ from the old one go back to step 5.
Issue 3
This calculation procedure is used also for obtaining API tables 5A, 23A, 5B and 23B. Only
temperature and density units and ranges are different as well as the coefficients used in step 5 as
shown in chapter API Standard 2540, MPMS Ch 11.1 from 1980.
See chapter API Standard 2540, MPMS Chapter 11.1 from 1980
API tables 5A, 5B, 5C, 5D, 23A, 23B, 23C, 23D, 53A, 53B, 53C, 53D, 59A, 59B, 59C and 59D.
The above listed tables are only used when calculating the reference density. The reference density
can be calculated according to MPMS chapter 11.1.6.2 if the observed density is available.
Input: Observed Density (DObsvacuum, in used unit kg/m³ or ºAPI or 60/60 ºF)
Thermal expansion factor (TEC Liquid)
Average Temperature (TL)
Pressure (Liquid Pressure – Vapor Pressure)
Output: Reference Density (DRef , in used unit kg/m³ or ºAPI or 60/60 ºF)
Calculation procedure:
1. Convert Observed Density (DObsvacuum) to kg/m³.
2. Convert Average Temperature to ºF.
3. Convert the pre-calculated thermal expansion factor (TEC Liquid) to ºF base.
4. Convert Pressure to PsiG.
5. Check input values to determine if they are in range of this standard.
Temperature range: -58.0 ºF to 302.0 ºF
Pressure range: 0.0 PsiG to 1500.0 PsiG
Observed Density range: 470.4 kg/m³ to 1208.3 kg/m³ depending on table se below.
Thermal expansion factor (TEC Liquid) range: 0.000230 1/ºF to 0.000930 1/ºF.
Issue 3
9. Calculate new DObs = DRef * CTPL (Note: used CTPL is not rounded)
10. If the difference between DObs and DObsvacuum is more than 0.000001 kg/m³ then calculate
the density delta with Newtons itaration method and add this to the ref density that will be
used in next itaration. New DRef = DRef + NewtonDelta and go back to step 8.
11. Check output value DRef to determine if it is in range of this standard.
12. Convert the DRef value in kg/m³ to used density unit.
13. Round the converted DRef value.
Commodity Type Table Min DObs Max DObs Min DRef Max DRef
Crude Oil 5A, 23A, 470.5 kg/m³ 1201.8 kg/m³ 610.6 kg/m³ 1163.5 kg/m³
53A, 59A
Refined Product 5B, 23B, 470.4 kg/m³ 1209.5 kg/m³ 610.6 kg/m³ 1163.5 kg/m³
53B, 59B
Lubricating Oil 5D, 23D, 714.3 kg/m³ 1208.3 kg/m³ 800.9 kg/m³ 1163.5 kg/m³
53D, 59D
Note: API MPMS 11.2 from 2007 is equivalent to GPA T-27 and ASTM T-27.
API tables 5E, 23E, 53E and 59E for NGL and LPG products.
The above listed tables are only used when calculating the reference density. The reference density
can be calculated according to MPMS chapter 11.2.4.5 if the observed density is available.
Input: Observed Density (DObsvacuum, in used unit kg/m³ or ºAPI or 60/60 ºF)
Average Temperature (TL)
Pressure (Liquid Pressure – Vapor Pressure)
Output: Reference Density (DRef , in used unit kg/m³ or ºAPI or 60/60 ºF)
Calculation procedure:
16. If the calculation has not yet converged set new upper and lower bounds based on DRefTrail
and DRefMid and go back to step 8.
17. Check output value DRef to determine if it is in range of this standard.
18. Convert the DRef value in relative density 60/60 ºF to used density unit.
19. Round the converted DRef value.
Issue 3
Document template: C:\Documents and Settings\hkjellstrom\Application Data\Microsoft\Templates\Normal.dotm
Table 54 uses reference density, in kg/m³, at 15 ºC to obtain volume correction factor. The inputs to
the lookup table are limited to the following ranges (see also chapter 6.7 Standard Table Range):
Reference density range 500.0 kg/m³ to 1105.0 kg/m³ (in steps of 5.0 kg/m³).
Observed temperature range -46.0 ºC to 150.0 ºC (in steps of 0.5 ºC).
Table 6 uses reference API gravity, in ºAPI, at 60 ºF to obtain volume correction factor. The inputs
to the lookup table are limited to the following ranges (see also chapter 6.7 Standard Table Range):
API gravity range 20.0 ºAPI to 90.0 ºAPI (in steps of 1.0 ºAPI).
Observed temperature range 50.0 ºF to 160.0 ºF (in steps of 1.0 ºF).
Input:
Reference Density (in unit kg/m³ or ºAPI) and Observed Temperature.
Calculation procedure:
Issue 3
Round the Observed Temperature to the nearest temperature value in the table.
If the Reference Density is between two table values interpolation will be done.
Document template: C:\Documents and Settings\hkjellstrom\Application Data\Microsoft\Templates\Normal.dotm
Output:
VCF (rounded to 4 decimals).
E.g.
What is the VCF for a product with observed temperature 1.2 ºC and reference density 723.7 kg/m³?
1. Enter the table with 1.0 ºC and 720.0 kg/m³. The VCF is 1.0165.
2. Enter the table with 1.0 ºC and 725.0 kg/m³. The VCF is 1.0162
3. Calculate the VCF at 1.0 ºC and 723.7 kg/m³ as
VCF = 1.0165 – [((1.0165 - 1.0162) * (723.7 - 720.0)) / (725.0 - 720.0)]
VCF = 1.0163
Values of the below mentioned parameters P1, P2, P3 and P4 for each interval of density are listed
in TABLE X, see Ref. 5.
Numbers of density intervals are 19 and the total defined range of density is 500.0 - 1200.0 kg/m³.
Table 54 uses density, in kg/m³, at 15 ºC to obtain volume correction factor.
Three equations form the basis for VCF. The density is not rounded when table 54 is used.
Choice of constants (P1, P2, P3, P4) depends on the products density value.
Issue 3
Document template: C:\Documents and Settings\hkjellstrom\Application Data\Microsoft\Templates\Normal.dotm
6.3.1 Introduction
The Volume Correction Factor is calculated according to API Standard 2540, which defines tables
for volume correction factors.
Table 6/54/24/60A for generalized crude oils,
table 6/54/24/60B for generalized products,
table 6/54/24/60C for individual and special applications (when product data is unknown)
and 6/54D are used for generalized lubricating oils.
Tables 54A, 54B and 54D use density in kg/m³ at 15 °C to obtain VCF.
Tables 6A, 6B and 6D use density in API degrees at 60 °F to obtain VCF.
Tables 24A and 24B use Relative Density at 60 °F to obtain VCF.
Tables 60A and 60B use density in kg/m³ at 20 °C to obtain VCF.
Table 6C, 54C, 24C and 60C uses experimentally determined thermal expansion coefficients (TEC)
to obtain volume correction factors. When 6C, 54C, 24C or 60C are chosen for a tank the operator
must supply the thermal expansion coefficient (TEC) for the product.
Issue 3
Document template: C:\Documents and Settings\hkjellstrom\Application Data\Microsoft\Templates\Normal.dotm
6.3.2 Calculation
Unit Description
TL Temperature (average) of the liquid in the tank.
Tref Reference temperature of the volume, 15 ºC or 60 ºF
ΔT TL – Tref
DRef Density at reference temperature, Tref
TecTref Liquid thermal expansion coefficient, TEC, at reference temperature, Tref
K0,K1,A,B Constants depending on density range and used in formula 2 and 3.
Output: VCF (rounded to 5 decimals when avg. temp is above standard temp,
rounded to 4 decimals when avg. temp is below standard temp).
Issue 3
When table 60A or 60B is used, the reference density is converted to reference density at 15 °C.
When table 6 or table 24 is used, the reference density is converted to kg/m³.
Document template: C:\Documents and Settings\hkjellstrom\Application Data\Microsoft\Templates\Normal.dotm
Reference density (DRef ) in unit kg/m³ will be rounded to the nearest 0.5 kg/m³ before used in
calculation.
For the table 6C, 54C, 60C and 24C, the thermal expansion coefficient TecTref is manually entered,
for other tables TecTref is calculated. Choice of formula 2 or 3 and constants (K0, K1, A and B)
depends on the density value (or ºAPI) of the product (see chapter Standard table constants).
For the table 6, 54 and 24 VCF is calculated from formula (1) above.
For the table 60 VCF is calculated from formula (4) above.
K1 = 0.0
6B Kerosene 48.1 – 52.0 A = -0.00186840 3
B = 1489.0670
Document template: C:\Documents and Settings\hkjellstrom\Application Data\Microsoft\Templates\Normal.dotm
6.4.1 Introduction
The Volume Correction Factor (VCF) is calculated according to API Standard 2540 chapter 11.1.
Different tables are used depending on product and reference temperature.
Table 6/54/24/60 A for generalized crude oils.
Table 6/54/24/60 B for generalized products.
Issue 3
6.4.2 Calculation
Unit Description
TL Temperature (average) of the liquid in the tank.
TRef Reference temperature 60 ºF
ΔT TL68 – 60.0068749
TCorr Temperature correction constant = 0.01374979547
DRef Density at reference temperature, TRef
TecTref Liquid thermal expansion coefficient at reference temperature, TRef
K0,K1,K2 Constants depending on density range and used in formula 1.
P P = Liquid Pressure – Vapor Pressure
CTL Correction factor due to temperature
FP Compressibility factor
CPL Correction factor due to pressure
CTPL Correction factor due to temperature and pressure
Issue 3
Calculation procedure:
1. Convert Reference Density to kg/m³ at 60 ºF.
2. Convert Average Temperature to ºF.
3. Convert the pre-calculated thermal expansion factor (TEC Liquid) to ºF base.
4. Convert Pressure to PsiG.
5. Check input values to determine if they are in range of this standard.
Temperature range: -58.0 ºF to 302.0 ºF
Pressure range: 0.0 PsiG to 1500.0 PsiG
Density range: 610.6 kg/m3 to 1163.5 kg/m3 depending on table se above.
Thermal expansion factor (TEC Liquid) range: 0.000230 1/ºF to 0.000930 1/ºF.
6. Shift the Average Temperature to IPTS-68 base (TL68)
7. Shift the Reference Density to IPTS-68 base (DRef68)
8. Calculate thermal expansion coefficient at 60 ºF, TecTref according to formula 1.
(For the C tables the thermal expansion coefficient is manually entered.)
9. Calculate the correction factor due to temperature, CTL according to formula 2.
10. Calculate the compressibility factor, FP according to formula 3.
11. Calculate the correction factor due to pressure, CPL according to formula 4.
12. Calculate volume correction factor, VCF (correction factor due to temperature and pressure,
CTPL) according to formula 5.
K2 = 0.0
6B, 24B, 54B, 60B Fuel Oils 838.3127 – 1163.50 K0 = 103.8720
K1 = 0.2701
K2 = 0.0
6B, 24B, 54B, 60B Jet group 787.5195 – 838.3126 K0 = 330.3010
K1 = 0.0
K2 = 0.0
6B, 24B, 54B, 60B Kerosene 770.3520 – 787.5194 K0 = 1489.0670
K1 = 0.0
K2 = -0.00186840
6B, 24B, 54B, 60B Gasoline‘s 610.6 – 770.3519 K0 = 192.4571
K1 = 0.2438
K2 = 0.0
6D, 24D, 54D, 60D Lubricating Oils 800.9 – 1163.5 K0 = 0.0
K1 = 0.34878
K2 = 0.0
6.5.1 Introduction
Note: API MPMS Chapter 11.2 is equivalent to GPA T-27 and ASTM T-27.
For custody transfer purposes, natural gas liquid (NGL) and liquefied petroleum gas (LPG) volumes
are generally stated at a fixed base temperature and saturation pressure. Most volume transfers
occur at temperatures and pressure other than the standard conditions, these volumes are adjusted to
standard conditions through the use of correction factors. Separate factors for temperature (CTL)
and pressure (CPL) are used. The MPMS Chapter 11.2 describes how to calculate the temperature
correction factor (CTL) to calculate the pressure correction factor (CPL) the method described in
MPMS Chapter 11.1 - 2004 is used.
Different tables are used depending on density unit and reference temperature.
Table 54E use density in kg/m³ at reference temperature 15 °C.
Table 6E use density in API gravity at reference temperature 60 °F.
Table 24E use density in Relative Density at reference temperature 60 °F.
Table 60E use density in kg/m³ at reference temperature 20 °C.
6.5.2 Calculation
Issue 3
Unit Description
Document template: C:\Documents and Settings\hkjellstrom\Application Data\Microsoft\Templates\Normal.dotm
Calculation procedure:
1. Convert Reference Density to Relative Density at 60 ºF (DRef) and round density.
2. Convert Average Temperature to ºF (TL) and round temperature.
3. Convert Pressure to PsiG.
4. Check input values to determine if they are in range of this standard.
Temperature range: -50.8 ºF to 199.4 ºF
Pressure range: 0.0 PsiG to 1500.0 PsiG
Density range: 0.3500 60/60 ºF to 0.6880 60/60 ºF.
5. Convert Average Temperature to ºK (Tx).
6. Determine two adjacent reference fluids to be used in the calculation.
7. Calculate the interpolation variable (δ) based on the products ref. density and the reference
fluid‘s ref. density.
8. Calculate the products critical temperature (Tc) based on the reference fluid‘s critical
temperature.
9. Calculate the products reduced observed temperature (Trx).
10. Calculate the reduced temperature at 60 ºF (Tr60).
11. Calculate the scaling factor (h2) based on reference fluid‘s critical compressibility factors
(Zc) and critical densities (Dc).
12. Calculate the saturation density (DSat_60_1 and DSat_60_2) for both reference fluids at 60 ºF using
the reduced temperature (Tr60).
13. Calculate the interpolation factor X.
14. Calculate the saturation density (DSat_x_1 and DSat_x_2) for both reference fluids at reduced
observed temperature (Trx).
Issue 3
15. Calculate the correction factor due to temperature, CTL according to formula 9.
16. Calculate the correction factor due to pressure, CPL according to MPMS 11.1.
17. Calculate volume correction factor, VCF (correction factor due to temperature and pressure,
Document template: C:\Documents and Settings\hkjellstrom\Application Data\Microsoft\Templates\Normal.dotm
Output: VCF (rounded to 5 decimals when avg. temp is above standard temp,
. rounded to 4 decimals when avg. temp is below standard temp).
When density in API gravity or Relative density is used, the density is converted to kg/m³ using
formula 3 or formula 4 and rounded to nearest 0.5 kg/m³.
The temperatures are converted to °C before calculation.
Unit Description
TL Temperature (average) of the liquid in the tank (ºC).
Dref Reference Density in vacuum at 15 ºC
54D (2004)
60D (2004) 798.11 – 1160.71 -50.0 – 150.0
54E (2007) 351.7 – 687.8 -46.0 – 93.0
60E (2007) 331.7 – 683.6 -46.0 – 93.0
D4311 850.0 – 1600.0 -25.0 – 275.0
6.8.1 Introduction
The relationship between product and table listed below is illustrative and is not meant to be all-
inclusive. Selection of table depends on product reference density, reference temperature and used
density unit.
Table Density Unit Reference Temperature
6A, 6B, 6C, 6D, 6E °API 60 °F
24A, 24B, 24C, 24D, 24E 60/60 °F 60 °F
54A, 54B, 54C, 54D, 54E kg/m³ 15 °C
60A, 60B, 60C, 60D, 60E kg/m³ 20 °C
drip gasoline
JP-4
Document template: C:\Documents and Settings\hkjellstrom\Application Data\Microsoft\Templates\Normal.dotm
6.8.3.1 Gasoline
Select table: 6B (2004), 24B (2004), 54B (2004) or 60B (2004)
Products:
alkylate
aromatic natural gasoline
aviation gasoline
catalytic cracked gasoline
catalyst gas
clear gasoline
gasoline
low lead gas
motor gasoline
motor spirit
naphta
premium gasoline
reformulated gasoline
unleaded gasoline
auto diesel
diesel fuel
Document template: C:\Documents and Settings\hkjellstrom\Application Data\Microsoft\Templates\Normal.dotm
fuel oil
fuel oil PA
fuel oil LLS (light low sulfur)
furnace oil
gas oil
heating fuel
low sulfur fuel
LT (low temperature) fuel oil
No. 6 fuel oil
No. 2 furnace oil
No. 2 burner fuel
premium fuel
Products:
MTBE ( 789.000*10-6 F-1 or 1420.000*10-6 C-1 )
gasohol ( 714.340*10-6 F-1 or 1285.812*10-6 C-1 )
6.8.6 Asphalt
7.1 Introduction
This calculation method, uses product data Dref, Tref and Dcorr. The reference density, Dref, is
entered at a reference temperature, Tref, (this temperature can vary from product to product,
compare for example the API calculations) and a density correction factor, Dcorr.
The definition of Dref in this calculation method might be a little bit diffuse since it differs from
Dref as defined elsewhere in the document. But, for convenience reasons is the reference density
used in this chapter also called Dref.
To utilize this method the user must select volume correction table Chem or Linear.
Table Chem will use product data stored in System Product Table.
Table Linear will use product data unique for the tank.
Special calculation for the table is listed below, all other calculations are done as in chapter NET
VOLUME CALCULATION
Issue 3
The observed density will always be calculated from product data and observed product
temperature. The terms used in the calculation of observed density are defined as follows
Variable Description Unit
Tref Temperature for the product for defined Dref (product data). C
TP Temperature of the product in the tank. C
Dref Reference density in vacuum for the product (product data) at Tref. kg/m³
Dcorr How much the products density will be corrected per 1 C (product data). kg/m³/ C
Note: If other units are used in the product table conversion will be done before calculation.
T = Tref – TP
8.1 Introduction
Gost standard calculation is equivalent to API Standard 2540 from 1980.
Table 60A, 60B or 60C should be used.
Tables 60A and 60B use density in kg/m³ at 20 °C to obtain VCF.
The reference density in vacuum can be entered manually, and 20 °C is assumed, or calculated
according to API tables 53A or 53B if the observed density is available.
9.1 Introduction
Volume corrections to other reference temperature then 15ºC or 60ºF are described in this chapter.
Correction tables User entered Reference Density
RT_54A (1980) kg/m³ at 15ºC
RT_54B (1980) kg/m³ at 15ºC
RT_54C (1980) -
RT_54D (1980) kg/m³ at 15ºC
RT_6A (1980) °API at 60ºF
RT_6B (1980) °API at 60ºF
RT_6C (1980) -
RT_6D (1980) °API at 60ºF
RT_54A (2004) kg/m³ at reference temperature
RT_54B (2004) kg/m³ at reference temperature
RT_54C (2004) -
RT_54D (2004) kg/m³ at reference temperature
RT_54E (2007) kg/m³ at reference temperature
RT_6A (2004) °API at reference temperature
RT_6B (2004) °API at reference temperature
Issue 3
RT_6C (2004) -
RT_6D (2004) °API at reference temperature
Document template: C:\Documents and Settings\hkjellstrom\Application Data\Microsoft\Templates\Normal.dotm
See chapter 5.5.6 API Standard 2540, MPMS Ch 11.1 from 2004
or chapter 5.5.7 API Standard 2540, MPMS Ch 11.2 from 2007.
See chapter 6.4 API Standard 2540, MPMS Ch 11.1 from 2004
or chapter 6.5 API Standard 2540, MPMS Ch 11.2 from 2007.
Issue 3
Document template: C:\Documents and Settings\hkjellstrom\Application Data\Microsoft\Templates\Normal.dotm
The following calculations are done if the operator has selected one of the
volume correction tables in Table 3 for the tank.
The reference density can be calculated according to API tables 53A (1980) or 53B (1980) and
converted to reference density at entered reference temperature, if observed density is available.
If not the observed density is available the Reference Density at 15 °C (or °API at 60 °F) must be
entered manually and then converted to reference density at entered reference temperature.
Converting
Input: Reference Density at 15 °C (Dref)
Document template: C:\Documents and Settings\hkjellstrom\Application Data\Microsoft\Templates\Normal.dotm
Calculation procedure:
1. Round Observed Density (Dobsvacuum) to nearest 0.5 kg/m³
2. Check input values
3. Calculate ΔT = TL – 15.0 °C
4. Initialize Dref = Dobsvacuum
5. Calculate VCF_TL according to table 54A (1980) or 54B (1980)
6. Calculate new Dref = Dobsvacuum / VCF_TL
7. If the new Dref differs more than 0.05 kg/m³ from the old one go back to step 5
8. Check output value and round to one (1) decimal
9. Convert Reference Density at 15 °C to Reference Density at Ref Temp °C
The Volume Correction Factor is used to convert observed volume to equivalent volume at "Ref.
Temp" (user entered) in °C or in °F.
The Volume Correction Factor is calculated according to API Standard 2540 from 1980.
For more detailed information see chapter API Standard 2540, MPMS Ch 11.1 from 1980.
Tables 54A, 54B and 54D use density at 15 °C to obtain volume correction factors.
Tables 6A, 6B and 6D use density at 60 °F to obtain volume correction factors.
The Tables 54C and 6C uses experimentally determined thermal expansion coefficients (TEC) to
obtain the volume correction factor (VCF).
When either 54C or 6C is selected as volume correction table the operator must supply the thermal
expansion coefficient at 15°C or 60 °F.
Converting
Output: VCF (rounded to 5 decimals when avg. temp is above reference temp,
rounded to 4 decimals when avg. temp is below reference temp).
Observed gravity
Observed relative density
Average Temperature (TL)
Document template: C:\Documents and Settings\hkjellstrom\Application Data\Microsoft\Templates\Normal.dotm
Calculation procedure:
1. Observed Density (Dobsvacuum) is convert to kg/m³ and rounded to two (2) decimals.
2. Check input values.
3. Initialize Dref = Dobsvacuum
4. Calculate VCF according to table USER
5. Calculate new Dref = Dobsvacuum / VCF
6. If the new value Dref differs, more than 0.07 kg/m³ from the old one go back to step 4.
7. Check output value and round to one (1) decimal
11.1 Introduction
This calculation method is used for non petroleum products with known product coefficients.
To utilize this method the user must select volume correction table Custom.
Special calculation for the table is listed below, all other calculations are done as in chapter NET
VOLUME CALCULATION
Constants
Output: VCF (rounded to 5 decimals when product temp is above reference temp,
Document template: C:\Documents and Settings\hkjellstrom\Application Data\Microsoft\Templates\Normal.dotm
Variables Description
TP Average Temperature of the product in the tank.
Tref Reference temperature (user entered system parameter e.g. 15 ºC).
ΔT TP – Tref
K0,K1,K2,K3,K4 Coefficients for product (user entered)
Input:
Coefficients for product (user entered)
Average Temperature (TL)
Calculation procedure:
1. Calculate VCF according to table CUSTOM
2. Calculate Dref = Dobsvacuum / VCF
3. Round density value to one (1) decimal
Output:
Reference Density (Dref)
Issue 3
Document template: C:\Documents and Settings\hkjellstrom\Application Data\Microsoft\Templates\Normal.dotm
12.1 Introduction
Practical Alcohol Tables, Volume 2 - Table 1 from 1978
This calculation method is used for alcohol products.
The Alcohol Table use reference temperature 20 °C.
To utilize this method the user must select volume correction table ALCOHOL.
Special calculation for the table is listed below, all other calculations are done as in chapter NET
VOLUME CALCULATION
Alcohol Table uses strength, in % to obtain volume correction factor. The inputs to the lookup table
are limited to the following ranges:
Strength range 0.0 % to 100.0 % (in steps of 1.0 %).
Observed temperature range -20.0 ºC to 40.0 ºC (in steps of 1.0 ºC).
Calculation procedure:
Round the Strength and Observed Temperature to 2 decimals.
If the Strength or Temperature is between two table values interpolation will be done.
Variables Description
Issue 3
E.g.
What is the VCF for a product with observed temperature 33.5 ºC and strength 93.5 %?
1. Enter the table with 33.0 ºC and 93.0 %. The VCF is 0.987.
2. Enter the table with 34.0 ºC and 93.0 %. The VCF is 0.985
3. Calculate the VCF at 93.0 % and 33.5 ºC as
VCFS93 = 0.987 – [(0.987 - 0.985) * (33.5 – 33.0)]
VCFS93 = 0.986
4. Calculate the VCF at 94.0 % and 33.5 ºC as
VCFS94 = 0.986 – [(0.986 - 0.985) * (33.5 – 33.0)]
VCFS94 = 0.9855
5. Calculate the VCF at 93.5 % and 33.5 ºC as
VCF = 0.986 – [(0.986 - 0.9855) * (93.5 – 93.0)]
VCF = 0.98575
13 OTHER VOLUMES
These volumes and values are common for all calculations, i.e. volume correction tables.
14.1 Introduction
The following are the procedures when using calculated values from TankMaster as input to
calculations of transferred volumes and weight for single tank. Fore multiple tank movements add
each tank‘s delivered or received quantity to get the total sum of volume.
Suffix Description
og Opening Gauge value
cg Closing Gauge value
Before start of transfer the following data must be entered into the system to calculate correct open
gauge values.
- Individual tank samples for Ref. Density must be taken and analyzed.
- Individual tank samples for S&W must be taken and analyzed.
Issue 3
Before start of transfer the following data must be entered into the system to calculate correct open
gauge values.
- Individual tank samples for Ref. Density must be taken and analyzed.
- Individual tank samples for S&W must be taken and analyzed.
- Free water level (FWL) must be gauged.
After stop of transfer the following data must be entered into the system to calculate correct close
gauge values.
- Individual tank samples for Ref. Density must be taken and analyzed.
- Individual tank samples for S&W must be taken and analyzed.
- Free water level (FWL) must be gauged.
TOV
Level(og) TOV(og) Delivered / TOV(cg) Level(cg)
Received
FRA(og) FRA(cg)
Air Density (og) Air Density (cg)
GOV
GOV(og) Delivered / GOV(cg)
Ref Density(og) Received Ref Density(cg)
VCF(og) VCF(cg)
Avg Temp(og) Avg Temp(cg)
Issue 3
GSV
GSV(og) Delivered / GSV(cg)
Received
Document template: C:\Documents and Settings\hkjellstrom\Application Data\Microsoft\Templates\Normal.dotm
S&W(cg)
S&W(og)
NSV
NSV(og) Delivered / NSV(cg)
Received
WIV
WIV(og) Delivered / WIV(cg)
Received
15 OTHER CALCULATIONS
Calculation 2, 3 and 4 will only be performed if parameter type, open value and close value
are configured (done by client program).
In the calculations the variables and units below are used.
Possible selections are TOV, GOV, GSV, NSV, WIA and WIV
(default TOV). If parameter type WIA or WIV the weight values
Document template: C:\Documents and Settings\hkjellstrom\Application Data\Microsoft\Templates\Normal.dotm
Input:
New Flow Rate value.
Calculation:
If the Flow Rate value is grater than zero (receiving product into tank):
FeVolume = AVRM
ΔVolume = VolumeCG – Current Volume
TrVolume = Current Volume - VolumeOG
If the Flow Rate value is smaller than zero (deliver product from tank):
FeVolume = Pumpable Volume
ΔVolume = Current Volume - VolumeCG
TrVolume = VolumeOG - Current Volume
Output:
Estimated Close time (TimeCG and DateCG)
Transfer time (TrTime)
Transferred Volume (TrVolume)
Time to Full / Empty tank (FeTime)
Input:
New Flow Rate value (FR)
Document template: C:\Documents and Settings\hkjellstrom\Application Data\Microsoft\Templates\Normal.dotm
Calculation:
if FR > FRStart and LLOG not saved
Save current level value as LLOG .
Set SD = Current Date + Max
if FR < FRStop and LLOG saved
Save current level value as LLCG.
Save current date and time as MSD.
Calculate AST = (absolute value of (LLOG – LLCG)) * SF
If saved SD > current date (MSD) then AST = AST + remaining time.
Calculate ST = minimum of AST and Max
Calculate settling date SD = Current Date + ST
Save settling date SD
Clear saved values for LLOG.
Output:
Settling Date (SD)
Movement Stop Date (MSD)
Variable Description
Z1 Local elevation in unit meter.
L1 Local latitude in unit degree (rounded to nearest half degree).
g Local gravity in unit m/s2 (rounded to 4 decimals).