100% found this document useful (2 votes)
3K views

Chapter 11 - 1-Volume Correction Factors

Uploaded by

duy nguyen
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (2 votes)
3K views

Chapter 11 - 1-Volume Correction Factors

Uploaded by

duy nguyen
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 422

Manual of Petroleum Measurement Standards

Chapter 11--Physical Properties Data


Section 1--Volume Correction Factors
AFT Standard 2540
October 1980

Editorial
Amplification
--
| | |

of
|
|
|||| |||| | | ||

Volume X-Background, Development, and Computer Documentation


|||| |||| || || |

The implementation procedures (VolumeX) for the even


numbered tables (Tables6, 2 4 , and 5 4 ) do not provide a sufficient
|
|||| |||---

explanation of truncating and rounding. The literal application


of the implementation procedures would result in a code capable
of producing differences from the printed tables1 in of the
fourth derived place at a rate of at leastone difference in
every 2 4 0 tabulated entries. This insufficiency in the rounding
and truncating procedures is a direct result of a lack of clarity
in VolumeX.
This lack of clarity is corrected as described in the following
pages. The corrections to the implementation procedures were
validated by an exhaustive number-by-number test of the results of
the A P I master tape against the tabular representation produced
in three different computer systems: Double precision IBM, single
precision CDC, and a module in a TI-59 calculator. These three
types of equipment exhibited differences of 1 in the fourth place
at a rate of less than .O08 percent (7 entries out of 87,000
in Table 6B and less than half that rate in Table 6A). This rate
is caused by the differences in the number of places carried by
each machine and represents the maximum degree of software-machine
independence presently attainable. The rate of difference, while
not quantitatively known, will be less than this for five significant
figure applications. Because of the nature of the calculations, it
is believed that the same basic rate of difference will be found
in allof the even numbered tables.
The changes outlined below are editorial corrections to the
printed Volume X and do not affect the master tape, the published
tables, the computer listings, or the balloted standard.

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
S p e c i f i cC h a n g e s

On p a g e s 101/102 ( S t e p 61, 125 ( S t e p 6), 143/144 ( S t e p 31,


233 ( S t e p 6) , 255/256 ( S t e p 6), 274/275 ( S t e p 31, 361 ( S t e p 5 ) ,
382 ( S t e p 5), and 400/401 ( S t e p 3 1 , correct t h e c a l c u l a t i o n of
VCF step to r e a d l i k e t h e sample s t e p r e p r o d u c e d h e r e .
STEP X: Calculationof VCF
d e f i n e VCF = E X P I - a A t ( l . 0 + 0.8aAtll
= EXPL-a A t - 0.8 a* A t 2 ]
a. C a l c u l a t i o n of exponent
a(l) a A t = .XXXXXXXX truncated
a(2) .8aAt = .xxXXxXxx truncated
a(3) .8 a 2 A t2 = . X X X X X X x x rounded
a ( 4 )- a b + - 0.8 a 2 A t 2 = 0.XXXXXXXX

b. C a l c u l a t i o n of e x p o n e n t i a l
VCF = EXPL-aA t - 0.8 a 2 A t 2 I = x . XXXXXXXX truncated
using a t l e a s t t h e f i r s t 7 t e r m so ft h e power s e r i e se x p a n s i o n
of ex

Computational
v a l u e o f VCF

T a b l ev a l u e
of VCF
-c
-

=
1,XXXX

0.XXXXX

X.XXXX
rounded t o n e a r e s t 0.0001

rounded t o n e a r e s t 0.00001

rounded VCF t o n e a r e s t 0.0001


i f VCF

i f VCF
2 1

As a r e s u l t of t h e s ec o r r e c t i o n s ,t h ef o l l o w i n gc h a n g e sm u s t
be made t o t h ee x a m p l e sa n d test p r o c e d u r e s :
Volume X Page Number Correction
X-105 S t e p 6: b. VCF = 0.98108352
X-106 S t e p 6: b. VCF = 1.01170961
X-107 S t e p 6: b. VCF = 0.92848397
X-128 S t e p 6: b. VCF = 0.98071056
X-129 S t e p 6: b. VCF = 1.00986724
X-130 S t e p 6: b. VCF = 1.00705932
X-131 Step 6: b. VCF = 0.98010283
X-145 Step 3: b. VCF = 0.98108806
X-146 S t e p 3: b. VCF = 1.01171376

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
X-147 S t e p 3: b. VCF = 0.92848397
X-236 S t e p 6: b. VCF = 0.98114263
X-237 S t e p 6: b. VCF = 1.01171376
X-238 S t e p 6: b. VCF = 0.92850559
X-258 S t e p 6: b. VCF = 0.98074695
X-260 S t e p 6: b. VCF = 0.99007803
X-260 S t e p 6: b. VCF = 1.00704627
X-262 S t e p 6: b. VCF = 0.98010882
X-276 S t e p 3: b. VCF = 0.98108801
X-277 S t e p 3: b. VCF = 1.01171377
X-277 S t e p 3: b. VCF = 0.92848393
X-364 S t e p 5: b. VCF = 0.98071557
X-365 S t e p 5: b. VCF = 1.01119225
X-366 S t e p 5: b. VCF = 0.92808220
X-385 S t e p 5: b. VCF = 0.98806704
X-386 S t e p 5: b. VCF = 0.98055297
X-387 S t e p 5: b. VCF = 1.00641225
X-388 Step 5 : b. VCF = 0.97942377
X-402 S t e p 3: b. VCF = 0.98050208
X-403 S t e p 3: b. VCF = 1.01109395
X-404 S t e p 3: b. VCF = 0.92821201

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API flPflS*lIL=L V O L X X 80 m 0732290 0525853 Y O 8 M

Manual of Petroleum
Measurement Standards
Chapter 11.1-Volume Correction
Factors
Volume X-Background, Development, and
Program Documentation

API STANDARD 2540


FIRST EDITION, AUGUST1980

4) American
Petroleum Institute API Std 2540
.a
-y IP of Petroleum
Institute
"
20q
____
(!Tb American
Society
for Testing & Materials ASTM D l 250

(IWRKYIWUIOWU] American National Standards


Institute ANSVASTM D E I
_~ -

American Petroleum Institute


2101 L Street, Northwest
Washington, D.C. 20037

11'
-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL-L VOL*X 80 m 0732270 0525854 3 4 4 m

Manual of Petroleum
Measurement Standards
Chapter 11 .l-Volume Correctidn
Factors
VolumeX-Background,Development,and

|||| |||---
ProgramDocumentation

|
|||| |||| || || |
MeasurementCoordination/lndustryAffairs

|||| |||| | | ||
APISTANDARD 2540
FIRST EDITION,AUGUST 1980

|
|
| | |
--

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL*L VOL*X 80 0732290 0525855 280 m

These tables or themathematical relationships represented thereby may be used


by anyone desiring to do so, but the American Petroleum Institute, theAmerican
Society for Testing and Materials, and the Instituteof Petroleum and their respec-
tive members andthe U.S. National Bureauof Standards shall not be held respon-
sible or liable in any way for loss or damage, including, but not limited to, conse-
quential damage,resulting from such usageor for violation of any federal, state, or
municipal laws, regulations, or practices of the United States or of any foreign
country.

The tables included in this volume and the subroutines from which they were
generated are voluntary standards and were developed under the auspices of the
Joint API/ASTM Committee on Static Petroleum Measurement in part from data
generated by a project funded by the American Petroleum Institute at the U.S.
National Bureau of Standards, Gaithersburg, Maryland.

Inquiries concerning application of the tables or the computer subroutines should


be addressed to:
American Petroleum Institute
Measurement Coordination
2101 L Street, N.W.
Washington, D.C. 20037

Library of Congress Catalog Card Number: 80-68070

ISBN 0-89364-033-6 (Volume X)


ISBN 0-89364-021-2 (10 Volume Set)
Copyright @ American Petroleum Institute 1980
All Rights Reserved
-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I flPMS*LL-L VOL*X B O m 0732270 052585b L L 7 m

CONTENTS
PAGE

Introductory Information
Foreword. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii
Preface.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix
Officers of the Committee on Petroleum Measurement and the
Joint API/ASTM Committee on Static Petroleum Measurement . . . . . . . xi
APIMeasurementCoordinators. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xii
Members of the COSM Physical Properties Working Group. . . . . . . . . . . . . xii
Members of the Institute of Petroleum Measurement and Sampling
Committee and Calculation and Table Subcommittee.. . . . . . . . . . . . . . . . xiii

Manual of Petroleum Measurement Standards

Chapter 1 1-Physical Properties Data


Section 1-Volume Correction Factors
Volume X
11.1.5TABLES5A and SB-Correction of Observed API Gravity
to API Gravity at 60°F. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . X-1
11.1S . 1 TABLE SA-Generalized Crude Oils, Correction
of Observed API Gravity to API Gravity at 60°F . . . . . X-1
TABLE 5A. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . See Volume I
11.1.5.2 Program Documentation for Subroutine TABSA . . . . . X-2
11.1.5.3 Implementation Procedure for Subroutine TABSA. . . X-17
11.1.5.4TABLE SB-Generalized Products, Correction
of Observed API Gravity to API Gravity at 60°F . . . . X-32
TABLE 5B. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . See Volume II
11.1.5.5 Program Documentation for Subroutine TAB5B . . . . . X-33
11.1.5.6 Implementation Procedure for Subroutine TAB5B . . . X-49

11.1.6TABLES 6A, 6B, and 6C-Correction of Volume


to 60°F Against API Gravity at 60°F and Thermal
Expansion Coefficients. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . X-70

History and Developmentof the Petroleum Measurement Tables(1980)


Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . X-73
Experimental Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . X-73
FluidGroups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . X-74
Separate Representation Needed for Crude
and Product Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . X-75
Correlation Development . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . X-76
Parameter Determination and Results ....................... X-76
Table Development . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . X-78
Summary and Precision Statement .......................... X-79
Independent Test of the Correlation. . . . . . . . . . . . . . . . . . . . . . . . . X-79
Comparison of the Old and New Tables ..................... X-80

iii
-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL.L VOL*X 80 m 0732290 0525857 053

Example Calculations. . . . . . . . . . . . . . . . . . . . . . . . . . . , . . . , . . . . . . X-80


Special Considerations . . . . . . . . . . . . . . . . . . . . . . . . , , . . . . . . . . . . . X-80
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . X-85

11.1.6.1 TABLE6A"Generalized Crude Oils, Correction


of Volume to 60°F Against API Gravity at 60°F . . . . . X-86
TABLE 6A. . . . . . . . . . . . , . . . . . . . . . . . . . . . . . . . . . . . . . . See Volume I
11.1.6.2 Program Documentation for Subroutine TAB6A . . . . X-86
11.1.6.3 Implementation Procedure for Subroutine TAB 6A . . X-99
11.1.6.4 TABLE6B"Generalized Products, Correction
of Volume to 60°F Against API Gravity at 60°F . . . . X-108
11.1.6.5 Program Documentation for Subroutine TAB6B. . . . X-108
11.1.6.6 Implementation Procedure for Subroutine TAB6B . . X-122
11.1.6.7 TABLE 6C-Volume Correction Factors for Individual
and Special Applications, Volume Correction to 60°F
Against Thermal Expansion Coefficients at 60°F. . . . X-132
TABLE 6B. , . . . . . . . . . . . . . . . . . . . . . , . . . . . . . . . . . . . . .See Volume II
TABLE 6C. . . . , , . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . See Volume III
11.1.6.8 Program Documentation for Subroutine TAB6C. . . . X-132
11.1.6.9 Implementation Procedure for Subroutine TAB6C. . X-142

11.1.23 TABLES 23A and 23B"Correction of Observed Relative


Density to Relative Density 60/60"F , , . . . . . . . . . . . . . . . . . . . . . . X-I47
11.1.23.1 TABLE 23A"Generalized Crude Oils,
Correction of Observed Relative Density
to Relative Density 60/60"F. . . . . . . . . . . . . . . . . . . . . . . X-147
Table 23A. . . . . , . , . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .See Volume IV
11.1.23.2 Program Documentation for Subroutine TAB23A . . X-148
11.1.23.3 Implementation Procedure for Subroutine TAB23A. X-163
11.1.23.4 TABLE 23B"Generalized Products, Correction
of Observed Relative Density to Relative
Density 60/60"F , . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . X-179
TABLE 23B. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . See Volume V
11.1.23.5 Program Documentation for Subroutine TAB23B.. . X-180
11.1.23.6 Implementation Procecure for Subroutine
TAB23B . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . X-196

11.1.24 TABLES 24A, 24B, and 24C"Correction of Volume


to 60°F Against Relative Density 60/60"F and Thermal
Expansion Coefficients. . . . . . . . . . . . . . . . . . , . . . . . . . . . . . . . . . . . X-217
11.1.24.1 TABLE 24A"Generalized Crude Oils,
Correction of Volume to 60°F Against
Relative Density 60/60"F , . . . . . . . . . . . . . . . . . . . . . . . . X-217
TABLE 24A. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .See Volume IV
11.1.24.2 Program Documentation for Subroutine TAB24A . . X-218

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---


¡v
COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
11.1.24.3 Implementation Procedure for Subroutine
TAB24A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . X-231
11.1.24.4 TABLE 24B"Generalized Products,
Correction of Volume to 60°F Against
Relative Density 60/60. . . . . . . . . . . . . . . . . . . . . . . . . . . X-239
TABLE 24B. . . . . . . . . . . , . . . . . . . . . . . . . . . . . . . . . . . . . See Volume V
11.1.24.5 Program Documentation for Subroutine TAB24B. . . X-239
11.1.24.6 Implementation Procedure for Subroutine
TAB24B . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . , . . . . . X-252
11.1.24.7 TABLE 24C-Volume Correction Factors for
Individual and Special Applications, Volume
Correction to 60°F Against Thermal Expansion
Coefficients at 60°F. . . . . , . . . . . . . . . . . . . . . . . . . . . . . . X-262
TABLE 24C. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .See Volume VI
11.1.24.8 Program Documentation for Subroutine TAB24C. . . X-263
11.1.24.9 Implementation Procedure for Subroutine
TAB24C . . . . , . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . X-273

11.1.53 TABLES 53A and 53B"Correction of Observed Density


to Density at 15°C. . . . . . . . . . . . . . . . , , . . . . . . . . . . . . . . . . . . . . . . X-278
11.1.53.1 TABLE 53A"Generalized Crude Oils, Correction
of Observed Density to Density at 15°C , . . . . . . . . . . X-278
TABLE 53A. . . . , . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . See Volume VI1
11.1.53.2 Program Documentation for Subroutine TAB53A . . X-279
11.1.53.3 Implementation Procedure for Subroutine
TAB53A. . . . . . . . , , . . . . . . . . . . , . . . . . . . . . . , . . . . . . . X-293
11.1.53.4 TABLE 53B"Generalized Products, Correction
of Observed Density to Density at 15°C . . . . . . . . . . . X-307
TABLE 53B. . . . , . . . . . . . . . . . . . . . . . . . . , . . . . . . . . . See Volume VI11
11.1.53.5 Program Documentation for Subroutine TAB53B. . . X-308
11.1.53.6 Implementation Procedure for Subroutine
TAB53B . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . X-324

11.1.54 TABLES 54A, 54B, and 54C"Correction of Volume


to 15°C Against Density at 15°C and
Thermal Expansion Coefficients . . . . . . . . . . . . . . . . . . . . . , . . . . . X-345
11.1.54.1 TABLE 54A"Generalized Crude Oils, Correction
of Volume to 15°C Against Density at 15°C . . . . . . . . X-345
TABLE 54A. . . , . . . . . , , . . . . . . . , . . . . . . . . . . , . . . . . . See Volume VI1
11.1S4.2 Program Documentation for Subroutine TAB54A . , X-346
11.1S4.3 Implementation Procedure for Subroutine
TAB54A , , . . . . . . . . , . . . . . . . . . . . . . . . . . . . . . . . . . . . . X-359
1l.1S4.4 TABLE 54B"Generalized Products, Correction
of Volume to 15°C Against Density at 15°C . . . . . . . . X-366
TABLE 54B. . . . . . . . . . . . . . . . . . . . . . . . . , . . . . . . . . . See Volume VI11
11.1.54.5 Program Documentation for Subroutine TAB54B. . . X-367

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---


V

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API MPMS+ZZ-Z V O L + X 80 0732290 0525859 92b

11.1S4.6 Implementation Procedure for Subroutine


TAB54B ....................................... X-379
11.1S4.7 TABLE 54C-Volume Correction Factors for
Individual and Special Applications, Volume
Correction to 15°C Against Thermal Expansion
Coefficients at15°C ............................. X-389
TABLE 54C. ................................... .See Volume IX
11.1.54.8 Program Documentation for Subroutine TAB54C. . . X-390
11.1.54.9 Implementation Procedure for Subroutine
TAB54C ....................................... X-399

-- | | | | | |||| |||| | | || vi
|||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
FOREWORD

The Objectives
The complete collection of the jointly issued API/ASTM-IP tables of which this
volume is a partis the result of close cooperation between the American Petroleum
Institute (API), the Institute of Petroleum (London) (IP), and the American Soci-
ety for Testing and Materials (ASTM). The overall objective of this effort was to
meet the worldwide need for auniform and authoritativepublication, based on the
most accurate informationavailable. This publication serves as a basis for standard-
ized calculations of measured quantities of petroleum fluids regardless of point of
origin, destination, or units of measure used by custom or statute. To meet the
objective of worldwide standardized measurement practices, the American Na-
tional Standards Institute (ANSI) and the British Standards Institute (BSI) have
also been closely involved nationally, resulting in the acceptance of the revised
tables as an AmericanNational Standard and as a British Standard. In addition, in
their respective capacities as Secretariatof the InternationalOrganization for Stan-
dardization TU28 and of TU28 SC3, ANSI and BSI have been instrumental in
progressing the revised tables towards their adoption as an international standard
by the International Organization for Standardization.

Historical Notes
The present collection supersedes all previous editions of the petroleum measure-
ment Tables ANSI/ASTM D1250, IP200, and API Standard 2540. Action is being
taken in ISO/TC 28 for the corresponding tables listed in IS0 R91 and the tables
in the addendum to R91 to be superseded by the present revised collection.
In view of the progress of metrication in countries formerly using the British
system of weights and measures, demand for the revision of the British edition does
not justify the considerable work involved. The present edition will therefore be

|||| |||---
withdrawn on the same date as corresponding
the metric and American editions are
published and will not be replaced.

|
For the metric edition the new standard covers products with densities in the

|||| |||| || || |
range 610.0 to 1076.0 kg/m3 (0.610to 1.076 g/mL). The tables for densities below
this range, covering liquefied petroleum gases, have not been revised.
The original tables, which were developed in the late 1940s, were based on the

|||| |||| | | ||
1916 data of Bearce and Peffer (1916) and represent thirty years of evolution. The
history of this evolution is summarized by Hall et al. (1975). |
|
| | |

Present Development
--

Downer and Inkley (1972) demonstrated that the original tables were not satis-
factory representationsof many petroleum fluids of current importance. In 1974 the
American Petroleum Institute (API) and the United States National Bureau of
Standards (NBS) initiated a research program funded by the API which intended
to provide the solid scientific base for the development of more accurate, conse-
quently more equitable,measurement tables. The result of this program was precise
density data on 349 different fluids representing a wide variety of refined products
and 66.8 percent of the world crude production in 1974. The completion of this
five-year, $500,000 project in March 1979 opened the way for modernizing the
tables. Using the NBS density data and taking advantage of publications of out-
standing technical authorities, a Joint API-ASTM Physical Properties Working

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I M P M S * L L = L VOL*X 80 m 0732270 0525BbL 58q

Group produced this present collection of the Petroleum Measurement Tables. The
development and results of the work are described by Hankinson et al. (1979).

Conceptual Departure
A major conceptual departure from previous versions is inherent in the recogni-
tion of the present and futureposition of computers in the petroleum industry. The
actual Standard represented by this volume and the companion volumes is neither
the hardcopy printed tables nor the set of equations used to represent the density
data but is an explicit implementation procedure used to develop computersubrou-
tines. Thestandardization of an implementation procedure implies the standardiza-
tion of the set of mathematical expressions, including calculational sequence and
round-off procedures, used within the computer code. Absolute adherence to the
outlinedprocedures will ensurethat all computers and computer codes of the
future, meeting the stated specifications and restrictions, will be able to produce
identical results. Hence, the published implementation procedures are the primary
Standard, thedistributed subroutines are thesecondary standard, and the published
tables are produced for convenience.

Acknowledgments
The task of completing this project could not have been accomplished without
many substantial contributions by a considerable number of individuals and compa-
nies. It is impossible to single out anyspecificindividuals for special mention.
However, included in the introductory material are lists of the officers of the API’s
Committee on Petroleum Measurement (COPM), the officers of the Joint API/
ASTM Committee onStatic Petroleum Measurement (COSM), the major contribu-
tors from theInstitute of Petroleum,and the members of the COSM Physical
Properties Working Group.
References
Bearce, H. W . , and E. L. Peffer, “Technology Papers of National Bureau of Standards-Density and
Thermal Expansion of American Petroleum Oils,” GPO, pp. 125-154. Washington. DC. 1916
Downer, L., and F. A . Inkley, Oil and Gas Journal, Vol. 70, No. 25. p 52-55. June 19. 1972.
Hall, A . H . ,J . A . Smpson, and J R. Whetstone, “Investigation of Densities and Thermal Expansion
Coefficients Applicable to Petroleum Measurement,” SP 7, World Petroleum Congress, Tokyo. 1975.
Hankinson, R. W . , R . G . Segers, T. Krolikowski Buck, and F. P. Gielzeckl. Oil and Gas Journal. Vol
77, No. 52, p. 66-70, December 24, 1979.
--
| | |
|
|
|||| |||| | | ||
|||| |||| || || |
|
|||| |||---

viii
COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I M P M S * I J L = I I VOL*X AO m 0732290 0 5 2 5 8 b 2 410 m

PREFACE

The Petroleum Measurement Tables, Volume Correction Factors (Volumes 1


through X), are, with this edition, incorporated into API’s Manual of Petroleum
Measurement Standards. These tables form Section 1 of Chapter 11,“Physical
Properties Data.” To simplify the transition from the American Society for Testing
and Materials’ (ASTM) publication of the original tables to APl’s publication in
1980, the original ASTM numerical designations have been retained for the indi-
vidual tables.
The numbering system used throughout Volumes I through X corresponds to the
--

numbering system of the Manual of Petroleum Measurement Standards. The system


| | |

consists of a series of fields separated by decimal points. The first two fields (1 1.1)
|

indicate chapter and section of the manual; the third field gives the ASTM table
|
|||| |||| | | ||

number. Therefore, although not serial, 11.1.5, 11.1.6, 11.1.23, 11.1.24, 11.1.53,
and 11.1.54are the majorheadings used. All other headings are subordinate tothe
three field headings.
|||| |||| || || |

Volumes Ithrough IX, which are designed for field use, are arranged on a
functional basis rather than on a topical basis.
|

First Series-Volumes I, II, and 111


|||| |||---

These three volumes contain TABLES 5 and 6, the tables for the “API, “F, 60°F
base series, plus examples to guide the user. Each volume contains specific data
as follows:
Volume I -Generalized Crude Oils (TABLES 5A and 6A)
Volume II “Generalized Products (TABLES 5B and 6B)
Volume III “Individual and Special Applications (TABLE 6C) and an appen-
dix describing the equations and constants used and the densities
and coefficients of thermal expansion of each NBS sample.
Second Series-Volumes IV, V, and VI
These three volumes contain TABLES 23 and 24,thetablesfor the relative
density, “F, 60°F base series, plus examples to guide the user. Each volume
contains specific data as follows:
Volume IV -Generalized Crude Oils (TABLES 23A and 24A)
VolumeV “Generalized Products (TABLES 23B and 24B)
Volume VI -Individual and Special Applications (TABLE 24C) and an appen-
dix describing the equations and constants used and the densities
and coefficients of thermal expansion of each NBS sample.
Third Series-Volumes VII, VIII, and IX
These three volumes contain TABLES 53 and 54, the tables for the kilogram per
cubic metre, “C, 15°C base series, plus examples to guide the user. Each volume
contains specific data as follows:
Volume VI1 -Generalized Crude Oils (TABLES 53A and 54A)
Volume VIII-Generalized Products (TABLES 53B and 54B)
Volume IX “Individual and Special Applications (TABLE 54C) and an appen-
dix describing the equations and constants used and the densities
and coefficients of thermal expansion for each NBS sample.
Volume X provides a complete breakdown of the Petroleum Measurement
Tables, Volume Correction Factors, and references appropriate volumes for the
location of specific tables. Volume X is the key volumeof the entire set and contains
the actual Standard, the implementation procedures, and the instructions for the

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I M P M S * L L = L V O L X X 80 m 0732290 0525863 357 m

use of the computer subroutines. The history and development of the project are
also included in Volume X under 11.1.6.
Inquiries concerning the application of the tables or the computer subroutines
should be addressed to-
American Petroleum Institute
Measurement Coordination
2101 L Street, N.W.
Washington, D.C. 20037
--
| | |
|
|
|||| |||| | | ||
|||| |||| || || |
|
|||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
OFFICERS OF THE COMMITTEE ON
PETROLEUM MEASUREMENT AND
THE JOINT APVASTM COMMITTEE ON
STATIC PETROLEUM MEASUREMENT
AT SIGNIFICANT MILESTONES
IN THE DEVELOPMENT OF THE
PETROLEUM MEASUREMENT TABLES

1972 Chairman COPM C. Webber


Sun Oil Company
Chairman COSM R. A. Hartmann
Exxon Corporation
1974 Chairman COPM A. H. Hall
Shell Oil Company
Chairman COSM T. L. Hillburn
Phillips Petroleum Company
Chairman API/NBS Project R. F. Meeker
Committee Texaco Inc.
1976 Chairman COPM R. A. Hartmann
Exxon Corporation
Chairman COSM T. L. Hillburn
Phillips Petroleum Company
1978 Chairman COPM B. Messer, Jr.
Mobil Research and Development
Corporation
Chairman COSM T. L. Hillburn
Phillips Petroleum Company
I S 0 Advisor COPM R. A. Hartmann
Exxon Corporation
1979 Chairman COPM B. Messer, Jr.
Mobil Research and Development
Corporation
Chairman COSM W. D. Fulton
Explorer Pipeline Company
Legal Advisor COPM B. S. Tharp
Atlantic Richfield Company
I S 0 Advisor COPM R. A. Hartmann
Exxon Corporation
Chairman Physical Proper- R. W. Hankinson
ties Working Phillips Petroleum Company
Group, COSM
1980 Chairman COPM K. E. Bailey
Williams Pipeline Company
Chairman COSM C. M. Owen
SOH10 Pipe Line Company
Legal Advisor COPM B. S. Tharp
Atlantic Richfield Company
I S 0 Advisor COPM R. A. Hartmann
Exxon Corporation
Chairman Table 6 Task R. W. Hankinson
Force, COSM Phillips Petroleum Company

-- | | | | | |||| |||| | | || xi
|||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API MEASUREMENT COORDINATORS
DURING THE PROJECT DEVELOPMENT
AND IMPLEMENTATION

1974W.
- 1978 N. Seward
1978-Present J. K. Walters

MEMBERS OF THE COSM


PHYSICAL PROPERTIES WORKING GROUP
ACTIVE IN THE DEVELOPMENT EFFORT
Kurt A . Beyreis Mark A. Plummer
Mobil Sales and Supply Marathon Oil Company
Judith J. Bigby C. Steven Pringle
Phillips Petroleum Company Texas Eastern Corporation
Theresa Krolikowski Buck Richard G. Segers
Union Carbide Corporation Exxon Corporation
Marshall C. Clegg Gerald W. Singletary
Standard Oil Company of California Texas Eastern Corporation
Terry A. Coker James K. Walters
Phillips Petroleum Company American Petroleum Institute
Howard M. Davis, Jr. Karen I. West
Marathon Pipeline Company Mobil Research and Development
Frank P. Gielzecki Corporation
Imperial Oil, Ltd. L. D. Wiener
Risdon W. Hankinson (Chairman, Mobil Research and Development
Working Group) Corporation
Phillips Petroleum Company Gael Williams (now retired)
Raymond M. Henry Standard Oil Company of California
Gulf Research and Development E. K . Van Horne
Company Mobil Oil Corporation
Clyde M. Owen (Vice-chairman,
COSM)
SOH10 Pipe Line Company

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*:L:L*L V O L * X 80 m 0 7 3 2 2 9 0 0525866 Obb m

MEMBERS OF THE INSTITUTE OF PETROLEUM


MEASUREMENT AND SAMPLING COMMITTEE AND THE
CALCULATION AND TABLES SUBCOMMITTEE
ACTIVE IN THE DEVELOPMENT OF THE PETROLEUM
MEASUREMENT TABLES
J.R. Spencer Chairman, Measurement and British Petroleum,
Ltd.
Sampling Committee
B.C. Ferguson Past-Chairman, Measurement Caleb Brett,
Ltd.
and Sampling Committee
Chairman, I S 0 TU28 SC3
L. Downer Chairman,
Institute
of British
Petroleum
Petroleum
Research Tables
Subcommittee
B. O’Shaughnessy British Petroleum
Research
O.W. Molony British Standards
Institution
P.D. O’Connel1 Institute of Petroleum

COPM-API Committee on Petroleum Measurement

|||| |||---
COSM-Joint API/ASTM Subcommittee on Static Petroleum Measurement
NBS-U.S. National Bureau of Standards

|
ISO-International Organization for Standardization

|||| |||| || || |
|||| |||| | | ||
|
|
| | |
--

xiii
COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL-L VOL*X 80 m 0 7 3 2 2 9 0 0 5 2 5 8 b 7 TT2 W

Chapter 1I-Physical Properties Data

SECTION 1-VOLUME CORRECTION FACTORS

11.1.5 TABLES 5A and 56-Correction of 11.1.5.1 TABLE SA-GENERALIZED CRUDE OILS,


Observed API Gravity to API Gravity CORRECTION OF OBSERVED API
GRAVITY TO API GRAVITY AT 60°F
at 60°F
TABLE 5A gives the values of API gravity at 60°F
TABLES 5A and5B give values of API gravity for a
corresponding to an API hydrometer reading at ob-
fluid at 60°F corresponding to APIgravities of that fluid
served temperatures other than 60°F. In converting the
at temperatures other than60°F. It is assumed that the
API hydrometer reading at the observed temperature
observed gravities are obtained with a glass hydrom-
to the corresponding API gravity at 60"F, two correc-
eter. The gravity measurements at temperatures other
tions are necessary: the first arises from the change in

|||| |||---
than 60°F require two corrections: the first is for the
volume of the glass hydrometer with temperature (stem
change in volume of the glass hydrometer with tempera-
correction) and the second from the change in volume

|
|||| |||| || || |
ture and the second is for the change in the volume of
of the crude oil with temperature. Both have been ap-
the fluid with temperature. Thefirst correction is neces-
plied in this table. The values of API gravity at 60°F in
sary because the glass hydrometers are calibrated for
this table are theresult of a computer procedurewhich

|||| |||| | | ||
60°F. Both corrections are applied in this table. is the Standard (see 11.1.5.2 and 11.1.5.3).
The data are representedby two tables to maximize
The temperature ranges of this table are:
accuracy while maintaining convenience of use:

|
"API "F

|
TABLE 5A GeneralizedCrude Oils

| | |
O to 40 O to 300
TABLE 5B Generalized Products (see Volume II)

--
40 to 50 O to 250
The development and intended use of these tables is 50 to 100 o to 200
described in 11.1.6. The parameters KO and KI can be The values of API gravity at 60°F given in this table
found in 11.1.6.7.1 (see Volume III). are based on data from the U.S. National Bureau of
Standards and from other published data. Portions of
The limits of these tables are illustrated in Figures the gravity and temperature ranges represent areas be-
X-1 and X-2. yond these data. Thus, mathematical techniques were

40 50 55 1O0

Gravity O API

Figure X-1 - Data Limits for TABLE 5A

x-1

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
x-2 CHAPTER
1 PHYSICAL PROPERTIES
DATA

300
250
--

Temp
| | |

"F 200
|
|

150
|||| |||| | | ||
|||| |||| || || |

I l

40 50 85
|
|||| |||---

Gravity "API
Figure X-2 - Data Limits for TABLE 58

employed to extrapolate beyond the gravity and tem- This table must beentered with an API
perature ranges of the given data to determine the value hydrometerreading measured with a soft glass
of API gravity at 60°F for these areas. These values are hydrometercalibratedat 60°F and withan ob-
denoted by an asterisk (*). Extension of the table be- served temperature.
yond the ranges shown is not recommended. A correction to the glass hydrometer reading
Increments usedin this table for determining API has been incorporated into the table to account
gravity at 60°F are 0.5"F and O.5"API. Interpolation for the thermal expansion of glass. The hydrom-
with temperature is not intended since there is no pras- eter constant, as defined in the Report on the De-
tical method of interpolation that will produce the ac- velopment,Construction, Calculation, and Prep-
curacy obtainable from the Standard. However, inter- aration of the ASTM-IP Petroleum Measurement
polation with gravity to one additional significant digit Tables (1960), varies with temperature according
can be reasonably made. Interpolation is not required if to the following:
the TABLE 5A results are to be used as entriesto HYC = 1 - 0.00001278 ( t - 60°F)
TABLE 6A. - 0.0000000062 (t - 60°F)'

11.1.5.2 PROGRAM DOCUMENTATIONFOR SUBROUTINE TAB5A-


GENERALIZED CRUDE OILS, CORRECTION OF OBSERVED API
GRAVITY TO GRAVITY AT 60°F

ABSTRACT

Subroutine Title: TAl35A - TABLE 5A, Generalized Crude O i l s , API


Gravity Correction to 60 OF.

Description: ?his subroutine is designed to calculate the API


g r a v i t y at 60 OF corresponding to API g r a v i t i e s
observed a t tenperatures other than 60 OF.

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I M P M S * L L = L V O L X X 80 m 0732290 0525869 875 m

i-VOLUME CORRECTION
SECTION FACTORS x-3

Program Responsibility: American Petroleum I n s t i t u t e


Measurement Coordination
2101 L Street N.W.
Washington, D .C. 20037

Date Issued: August 1980

Language : FORTRAN, ANSI/FSA Standard


--
| | |
|
|

API Standard 2540, WLE 6 , 11.1.6


|||| |||| | | ||

Reference :
|||| |||| || || |

THIS SUEROUTINE W DEVELOPED USING ?HE MATFIEMATICAL AILXIRITHMS


|
|||| |||---

AND SPECIFICATIONS DESCRIBED I N 'ME lXXWENT PKKX'DURE 11.1.5.3.


ANY MODIFICATION ?r> 'MIS SUBROUTINE MJST RIGIDLY ADHERE 'IO ?IIE
SAME ALGORITHMS AND SPEIFICATIONS.

11.1.5.2.1 Introduction

TAE35A is a computer subroutinedesigned to c a l c u l a t e f o r s u b s t a n c e s


API g r a v i t y at 60 degrees
c h a r a c t e r i z e d as crude o i l the value of
Fahrenheit (OF) corresponding to API gravities observed a t temperatures
o t h e r t h a n 60 OF. The subroutine accepts as inputtheobserved API
g r a v i t y rounded to the nearest 0.1 O A P I and thetemperaturerounded to the
n e a r e s t 0.1 OF. mt been properlyrounded, the
I fe i t h e ri n p u tv a l u eh a s
subroutine w i l l round thevalues and r e t u r n the corrected values. The
s u b r o u t i n e r e t u r n s the value of the API g r a v i t y a t 60 OF rounded tn the
n e a r e s t 0.1 and a s t a t u s f l a g f o r user mnvenience. The f l a g is set to -1
i f an error a n d i t i o n o c c u r s and to +1 if the value of the API g r a v i t y a t
60 OF is an extrapolation. The limits of the correlationincluding the
extrapolated region are depicted in Figure X-l. The c a l l i n g program must
check the f l a g and provide user with appropriate warningmessage or
program termination. The f l a g is set to zero when theinputvariables and
t h e API g r a v i t y at 60 OF are within the limits of t h e a x r e l a t i o n .

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I M P M S * L L ~ L VOL*X 80 H O732270 0525870 577 m

x-4 CHAPTER 11- -PHYSICAL PROPERTlES DATA

11.1.5.2.2 SubroutineSpecifications

The range of application is:

OAPI lkmprature, OF
O to
40 O to 300
40.1 to 50 O to 250
50.1 to 100 o to 200

Referenced m u l e s : ALF5A, D I E A , MPY5A, 1w05A,


VCF5A

FOIiTRAN functions: FTDAT, IABS

Average execution time: 625 entries/CPUsecond


IM 370/168
B

The subroutines are w r i t t e n i n ANSI/ASA FOKIRAN using integer arithmetic.


The s i z e and storage requirements are:
1. Coqilable source
statements 126
2. mimal storage bytes 3676
3 . Words 919
11.1.5.2.3 Calling
Sequence

CALL lN35A (API, DEGF, IHYDFO, API60 , IFLIX;)

INPUT DESCRIP'X'ION

API - API g r a v i t y a t &served tenperature


(API returned w i l l be rounded to nearest 0.1 OAPI)

DEGF - Observed tenperature, OF


(DEGF returned w i l l be rounded to nearest O .1 OF)

-
IHyDIIL> Hydrometer switch
O: The API g r a v i t y was &served with a g l a s s lydro-
meter ;uad a hydrometer a o r r e c t i o n is rreeded

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API MPMS*LL~L V O L * X ¿!O m 0732290 0525873 4E3 m

SECTION 1"VOLUME CORRECTION FACTORS x-5

1: The API g r a v i t y w a s determined from anon-line


densitometer and a hydrometer c o r r e c t i o n is not
needed.

OUTPUT DESCRIPTION

-160 - Corresponding API g r a v i t y a t 60 OF rounded t


n nearest 0.1 O W 1

IFLAG - Status Code


O: Indicates i n p u tv a r i a b l e s and c a l c u l a t e dr e s u l t s are
w i t h i n the range of a p p l i c a t i o n
1: Indicates i n p u tv a r i a b l e s are in extrapolatedregion
-1: or c a l c u l a t e dr e s u l t s
I n d i c a t e si n p u tv a r i a b l e s are
o u t s i d e the range of a p p l i c a t i o n

WE
I: If a nm-convergenceoccurs, the s u b r o u t i n ep r i n t s the following
message:

AT XXX.X I=EGREES F AND =.X EGF¿EES API, A CxlRRESPoNDING


APIW160FaXlLDNJTBE~RMINED.

This messageshould not occur unless the code has been a l t e r e d or


incorrectlyreproduced.FollowSection 11.1.5.3,Implementation
Procedure, and test the subroutineexactly as described. The
s t a t u s f l a g w i l l be set to -1, MI60 m -99.9, and program c o n t r o l
returned to t h e c a l l i n g r o u t i n e

11.1.5.2.4 Method of Calculation

This subroutine uses a amvergence technique t n determine the API g r a v i t y


|||| |||---

a t 60 O F that mrresponds to an API gravity &served at swne temperature


|

other than 60 OF. Since the equations are expressed in tem of density,
|||| |||| || || |

the API g r a v i t y i s mnverted to d e n s i t y by the following relationship:


|||| |||| | | ||

-- *
|

141.5 999.012
|

131.5 + API
| | |

Pt
--

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I ~PNS*IIL=II V O L * X 80 m 0732270 0525872 3bT m

X-6 CHAPTER
1 PHYSICAL PROPERTIES
DATA

where = d e n s i t y at temperature t
Pt
API = o b s e r v e d API g r a v i t y
999 .O12 = densityof water a t 60 ?F,Kg/m 3

The c o e f f i c i e n t of t h e r m a le x p a n s i o n a t t h eb a s et e m p e r a t u r e , €0 ‘F,
is related to the density a t t h eb a s et e m p e r a t u r eb y

The v a l u e s of p and ct60 are used i n t h ev o l u m ec o r r e c t i o nf a c t o r


t
e q u a t i o nt oc o m p u t e p
60 *

VCF = --
Pt
- + O0 . 8800. ~. ~~ A~J t ~) ]t ) l
OP - L A t ((1
EXPr-0.60At 1
60

Where pb0 = d e n s i t y a t t h eb a s et e m p e r a t u r e

At = t - 60.0

Since the equation for cannot be s o l v e de x p l i c i t l y , a successive


P
60
approximationiterative scheme is used ta c b t a i n a s o l u t i o n . The i n i t i a l
estimate of p is the value of thedensity a t observedtemperature t .
60
Thisapproximation is s u b s t i t u t e d i n t o t h e r i g h t hand s i d e of the equation
|||| |||---

t o c b t a i n a secondvalueapproximation.This process of s u b s t i t u t i n g i n t o
t h e r i g h t hand s i d e of the equation and estimating a new v a l u e from the
|
|||| |||| || || |

o t h e r is r e p e a t e d u n t i l bo a n s e c u t i v e r e s u l t s are i n agreement to the


desireddegreeofaccuracy,Insubroutine TAE35A, a convergedsolution is
|||| |||| | | ||

reached when the change i n d e n s i t y is less than 0.05 Kg/m 3 i n m


successive passes.
|
|
| | |
--

A fullexplanation of the equations and the values of the parameters


KO and K 1 may be found i n API Standard 2540, TABLE 6 , 11.1.6

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL-L VOLaX 80 m 0 7 3 2 2 9 0 0525873 2Tb m

SECTIONVOLUME CORRECTION FACTORS x-7

11.1.5.2.5 Examples

Theseexamples are tutorial i n n a t u r e and are mt intended to k Suff i-


cientforsubroutinecheckout. The examples givenintheImplementation
Procedure,Section11.1.5.3, are to be used for the computercheckout.

Example 1

API = 30.02 (observed


with a glass
hydrometer)
DEGF = 248 .O
IHYDRD= o

CALL TM35A (W1,DEGF,IHYDRD ,W160 ,IFLAG)

After
the call : API = 30.0
DEGF = 248 .O
IHYDfFD = 0
API60 = 18.5

|||| |||---
IFLAG = 0

|
|||| |||| || || |
Example 2

|||| |||| | | ||
API = 88 .O (observed
with a glass
hydrometer)

|
|
| | |
DEGF = 184.0

--
1mm= o

Call TAE35A (API,DEGF,IHYD~,API60,IFLAG)

After the call : API = 88 .O


DEGF = 184 .O
IHYDfFD= o
-160 = 69.2
IFLAG = 1

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API M P M S * L L - L V O L * X 80 m 0732290 0525874 132 m

X-8 CHAPTER DATA


1 PHYSICAL PROPERTIES

Example 3

API = 43.0 (observed with a glass hydrometer)


DEGF = 273.0
IHYDED = O

Call TAB5A (API,Dl%F,IH~ED,API6O,IFLAG)

After the call : API = 43.0


DEGF = 273 .O
1mm = o
W160 = -99.9
IFLAG = -1
--
| | |
|
|
|||| |||| | | ||
|||| |||| || || |
|
|||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API MPMS*LL-L V O L * X 80 D 0732290 0525875 079 m

SECTIONVOLUME CORRECTION FACTORS x-9

1 1 . 1 -5.2.6 FLONCHART

INPUT API GRAVITY


OBSERVEDTEMPERATURE

|||| |||---
ROUND INPUT DATA
TO SPECIFICATIONS

|
|||| |||| || || |
|||| |||| | | ||
DATA W I T H I N SET
STATUS
FLAG -1
No

|
'). AND API GRAVITY AT 60' F = -99 -9

|
| | |
CORRELATION RETURN

--
+= 1 CALCULATEDELTAT

CONVERT APIGRAVITY TO DENSITY

Y ES

COMPUTE HYDROMETER CORRECTION

+
APPLYHYDROMETER CORRECTION TO DENSITY
I

I N I T I A L I Z E6 0 ' FD E N S I T Y

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*ZZ*L VOLJX 80 0732290 052587b T05 W

x-1o CHAPTER1 PHYSICAL PROPERTIES


DATA

|||| |||---
I

|
|||| |||| || || |
CALCULATE
ALPHA

|||| |||| | | ||
CALCULATEVCF

|
|
| | |
--
CALCULATE NEW
60. F OENS ITY

-
SET
STATUS FLAC -1
W I T H I NL I H I T S NO A
)
ND W1 QRAVITY AT W F = -88.8
F CORRELATIO RETURN

SET STClTUS FLAO


RETURN
- 1
6

SETSTATUSFLAC = O

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL-L VOL*X 80 m 0732290 0525877 941 m

SECTIONVOLUME
FACTORS
CORRECTION x-11

11.1.5.2.7 Subroutine Listim

TAI35A This subroutine accepts API g r a v i t y and the abservation


temperature and determines the corresponding API g r a v i t y at
60 OF for Generalized Crude O i l s .

Referenced kdüies

ALFSA This module c a l c u l a t e s the a x f f i c i e n t of thermal expansion


needed b determine a volume m r r e c t i o n factor.

DImA This module is designed to produceadditional=curacy from an


integer divide.

MPY5A This module is designed to produce additional accuracy from an


integer rmltiplication.

RH05A This module uses an A P I g r a v i t y to c a l c u l a t e a density value.

VCFSA This module c a l c u l a t e s a volume correction factor.

|||| |||---
|
|||| |||| || || |
|||| |||| | | ||
SUBROUTINE TAB5A(API,DEGF,IHYDRO,APIGO,IFLAG) 5A00001 O
C 5A000020 |
|
| | |

C ( C ) COPYRIGHT 1 9 8 0 5A000030
C AMERICAN PETROLEUM INSTITUTE 5A000040
--

C ALLRIGHTS RESERVED 5A000050


C 5A000060
C T H I S SUBROUTINE I S A VOLUNTARYSTANDARDAND WAS DEVELOPED 5A000070
C UNDER THE AUSPICES OF THE JOINTAPI-ASTM COMMITTEE ON STATIC 5A000080
C PETROLEUM MEASUREMENT I N PART FROM DATAGENERATED BY A 5A000090
C PROJECT FUNDED BY THE AMERICAN PETROLEUM INSTITUTE AT THE 5A0001 O0
C U . S . NATIONAL BUREAU OF STANDARDS, GAITHERSBURG, MARYLAND. 5A00011 O
C 5A000120
C INQUIRIES CONCERNING I T SA P P L I C A T I O N SHOULD BE ADDRESSED TO: 5A000130
C 5A000140
C AMERICAN PETROLEUM INSTITUTE 5A000150
C MEASUREMENT COORDINATION 5A000160
C 2 1 0 1 L STREET,
N.W. 5A000170
C WASHINGTON, DC 2 0 0 3 7 5A000180

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS+LL.L VOL+X 80 m 0732290 0525878 B88 m

x-12 CHAPTER
1 PHYSICAL PROPERTIES
DATA

C 5A000190
C ................................................................. 5~000200
C * * 5A000210
C * T H I S SUBROUTINE OR THE MATHEMATICAL RELATIONSHIPS * 5A000220
C * REPRESENTEDTHEREBY
MAY BE USED BY ANYONE WISHING * 5A000230
C * TO DO SO, BUTTHE AMERICAN PETROLEUM I N S T I T U T E , THE * 5A000240
C * AMERICAN SOCIETY FOR TESTING AND MATERIALS, AND THE * 5A000250
C * INSTITUTE OF PETROLEUM
AND THEIR
RESPECTIVE MEMBERS AND * 5A000260
C * THE U . S . NATIONAL BUREAU OF STANDARDS, SHALL NOT BE HELD * 5A000270
C * RESPONSIBLE OR L I A B L E I N ANY
WAY
FROM LOSS OR DAMAGE, * 5A000280
C * INCLUDING, BUT NOT L I M I T E D TO, CONSEQUENTIAL DAMAGE, * 5A000290
C * RESULTING FROM SUCH
USAGE OR FOR VIOLATION OF ANY FEDERAL, * 5A000300
C * STATE, OR MUNICIPAL LAWS, REGULATIONS OR PRACTICES OF THE * 5A000310
C * UNITED
STATES OR OF ANY FOREIGN COUNTRY. * 5A000320
C * * 5A000330
C * * * * * t * * ~ ~ * * * * * * * t ~ + * ~ ~ * * ~ ~ ~ : ~ * * * * ~ : ~ * ~ ~ * * * * * * * * ~ ~ * * * * ~ ~ * * * * * ~ * * * * * * * ~ ~ * ~ c * * 5~000340
C 5A000350
--

C PURPOSE 5A000360
| | |

C 5A000370
|
|

C T H I S SUBROUTINE I S DESIGNED TO ACCEPT AS INPUT API GRAVITY 5A000380


|||| |||| | | ||

C VALUE ( A P I ) AT OBSERVED TEMPERATURE (DEGF) I N DEGREES FAHRENHEIT5A000390


C AND
PRODUCE THE
CORRESPONDING A P I GRAVITY VALUE I A P I 6 0 ) AT 5A000400
C 6 0 DEGREES FAHRENHEIT FOR TABLE 5 A , GENERALIZED CRUDË 01LS . 5A00041 O
|||| |||| || || |

C THEUSEOF A GLASS HYDROMETER CORRECTION I S OPTIONAL. 5A000420


C 5A000430
C EXTERNAL FUNCTIONS OR SUBPROGRAMS 5A000440
|
|||| |||---

C 5A000450
C ALF5A, DIVSA, MPYSA, RHOSA, VCF5A 5A000460
C FORTRAN FUNCTIONS: FLOAT, IABS 5A000470
C 5A000480
C DESCRIPTION OF PARAMETERS 5A000490
C 5A000500
C A P I - A P I GRAVITYAT OBSERVED T , NEAREST 0 . 1 DEG A P I 5(A IN0 )0 0 5 1 O
C (PROGRAM WILL ROUND A P I TO THE NEAREST 0.1 5A000520
C DEG A P I ANDRETURNTHEROUNDED VALUE.) 5A000530
C DEGF - OBSERVED TEMPERATURE, NEAREST 0 . 1 DEG F 5A0005 ( I4N0)
C (PROGRAM WILL ROUND T TO THE NEAREST 0 . 1 5A000550
C DEG F ANDRETURNTHEROUNDED VALUE.) 5A000560
C IHYDRO - APPLICATION OF GLASS HYDROMETER CORRECTION 5A0005 ( I7N0)
C O - HYDROMETER CORRECTION I S TO BEMADE 5A000580
C 1 -
HYDROMETER CORRECTION I S NOT TO BE MADE 5A0005W
C API6O - CORRESPONDING A P I GRAVITY AT 6 0 DEGREES F (OUT 1 5A000600
C (ROUNDED TO THE NEAREST 0 . 1 DEG A P I ) 5A00061 O
C IFLAG - STATUS CODE ( OUT 1 5A000620
C O - INPUT AND CALCULATED RESULTS I N CORRELATION L I M I T S5 A 0 0 0 6 3 0
C 1 - INPUT OR CALCULATED RESULTS I N EXTRAPOLATED REGION 5A000640
C - 1 - INPUT OR CALCULATED RESULTS NOT W I T H I N LIMITS OF 5A000650
C CORRELATION 5A000660
C 5A000670
C BASE TEMPERATURE ( 6 0 DEGREES5A000680F)
DATA IBASE / 6 0 0 / 5A000690
C UPPERAND LOWER DENSITY LIMITS ( O , 100 A P5I )A 0 0 0 7 0 0
DATA L I M l , L I M 2 / 1601704692872 , / 5A00071 O
C BREAK POINTS FOR A P I RANGES ( 4 0 AND 50 A P5IA) 0 0 0 7 2 0
I BDATA
P2 IBP1, / 4 0 0 , 500 / 5A000730
C UPPER LAI P
MII T OF CORRELATION 5A ( 1AP00I0)0 0 7 4 0
DATA NBP1 / 1 0 0 0 / 5A000750
C MAXIMUM TEMPERATURES AT EACH BREAK P O I N T( 3 0 0 , 2 5 0 , 2 0 0 5 A 0 0 0 7 6 0

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API M P M S * L L - L V O L + X 80 m 0732290 0525879 714 m

CORRECTION 1-VOLUME SECTION X-13 FACTORS

DATA ITMP1,
ITMP2,
ITMP3 / 223
0500000, , / 5A000770
C BEGINNING
TEMPERATURE OF EXTRAPOLATIONS ( 2 5 0 , 2 0 0 , 1 5 0 5 A 0 0 0 7 8 0
DATA I EI E
P
IEP
3P21 , , / 2 5 0 0 ,1 5 20 0 0 , / 5A000790
C BEGINNING OF A P I EXTRAPOLATONS ( 5 5 . 1 - 1 0 0 DEG 5AAP0I0) 0 8 0 0
DATA I E A P I / 550 / 5A00081 O
C CRUDECOEFFICIENTS 5A000820
FOR OILS
K1 DATA KO, / 3410957, O / 5AOOO830
KONSTC OBTAINED BY MULTIPLYING 5A000840
999012
TIMES1415
DATA KONST 980 / 1413601 / 5A000850
C U N I T 6 I S THE OUTPUT U N I TI F. THE
OUTPUT I S TO DIRECTED
BE 5A000860
SOME
OTHER
TO C U N I T , SET NOUT TO APPROPRIATE U N I T NUMBER. 5A000870
NOUT = 6 5A000880
C 5A000890
C NEAREST ROUND A P5I ATO 000900 0.1
I A P I = ( (API * 100) +5 5)A 0/ 0 0 1901 O
A P I = FLOAT( I A 5AP0I 0 )0 9/2 01 0 . 0
C NEGATIVE TEMPERATURE 5A000930
5 A 0 0I0F9 4(0 DEGF 2 0 ) SOO, 2 0 ,
C ROUND TEMPERATURE TO 5 ANEAREST
000950 0.1
20 I T = ( (DEGF * 1 0 0 ) +
5 5)A 0/0 01906 0
DEGF = FLOAT( 5 A I0T 0 0) 9 /7 01 0 . 0
C A PI IS LESSZERO THAN ( I F YES, BRANCH
TO 5A9 0 0 )0 9 8 0
5A000990 4I 0F ( I A4P0I, ) 900,
C API SI GREATER
THAN (1I 0F 0 YES, BRANCH
TO 59A0000) 1 O00
4 0 I F ( I A P I - NBP1 ) 50, 5A001
50, 900 O 1O
C A PI IS GREATER
THAN 40 ( I F YES, BRANCH TO 70) 5A001020
50 I F (5 AI0A0P1 I073-00 I B P6l0 ,) 60,
C I SGREATER
TEMP
THAN 300 ( I F YES, BRANCH TO 900) 5A001040
60 I F ( I T - I T M P l 5) A 1 0 091
000
, 05 1
00 0 ,
C A PI IS GREATER
THAN 50 ( I F YES, BRANCH TO SO) 5A001060
70 I F (5 AI 0A0P1I097-00 I B P820 ,) 80,
C I SGREATER
TEMP
THAN 250 ( I F YES, BRANCH TO SOO) 5A001080
8 0 I F ( I T - ITMP2 1)0 01,0 0 , SOO 5A001 O90
C I SGREATER
TEMP
THAN 200 ( I F YES, BRANCH TO 900 5A0011 O0
SO I F ( I T 5- AITMP3 0 09101011 0) 0 ,1 0 0 , O
1O0 CONTINUE 5A001120
C 5A001130
IFLAG = O 5A001140
5A001150 I D T = I T - IBASE
C CONVERT
5A001160 A P I TO DENSITY
CALL RH05A(IAPI,IRHOT)
C 5A001180
C I S HYDROMETER CORRECTION TO BE USED ( I F NO, BRANCH TO 1 450A) 0 0 1 1 9 0
5 A 0 0 1 2 0 0 1 4I0F ( IHYDRO 101, ) 101,
C 5A00121 O
C ATHYDROMETER
CONSTANT
COMPUTE DELTA T 5A001220
HYC C = 1 . - .00001278*(DEGF-60) - .0000000062"(DEGF-60)**2 5A001230
101 = 50 5A001240
IDT) IF
|||| |||---

1260 105 = -50


IH1 110 = (127800 * I D T +
I R D5)A 0/ 0 1120700
+
|

IH2 = (62 * IDT * IDT 5 0 0 ) 5A001280


/ 1000
|||| |||| || || |

IHYC = 1 0 0 0 0 0 0 0 0 0 5 A I0H -0129 - 0I H 2


C APPLY HYDROMETER CONSTANTTO DENSITY TEMPERATURE
AT T 5A001300
IRHO
5 A 0 0= 131 IRHOT * 1 0 O
|||| |||| | | ||

CALL MPY5A(IRHO,IHYC,IRHOT,lOOOO) 5A001320


IRHOT = ( IRHOT + 50 5 A)0 0/1 313000
|
|
| | |
--

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
X-1 4 CHAPTER
1 PHYSICAL PROPERTIES
DATA

C 5A001340
C 5A001350
1 4 0 JRHOT = IRHOT * 10000 5A001360
C 5A001370
IRHOGO = IRHOT 5A001380
C 5A001390
KRHO = O 5A001400
C 5A00141 O
NP = O 5A001420
C 5A001430
300 NP = NP + 1 5A001440
C 5A001450
CALL ALF5A(IRHOSO,KO,Kl,IALF) 5A001460
C 5A001470
C A L LV C F 5 A ( I A L F , I D T , I V C F ) 5A001480
C 5A001490
IVCF = ( IVCF + 50 ) / 100 5A001500
C 5A00151 O
CALL DIV5A(JRHOT,IVCF,IRH060,1000) 5A001520
C 5A001530
C 5A001540
I F ( IABS
5 A (IRHOGO
0 0 1 5 5 0 - KRHO3 2) 0 - 50 ) 500, 3 2 0 ,
C 5A001560
320 KRHO = IRHOGO 5A001570
C 5A001580
IRHOGO = ( IRHOGO 5 ) / 10 + 5A001590
C 5A001600
I F ( NP - 2 0 ) 3 0 04, 0 04, 0 0 5A00161 O
C 5A001620
400 I F L A G = - 1 5A001630
API6O = - 9 9 . 9 5A001640
WRITE( NOUT, 6 0 0 1 ) DEGF, A P I 5A001650
6001 FORMAT(5HlAT , F 5 . 1 1 1 5 H DEGREESFAND ,F5.1, 66H DEGREES A P
AI5, A 0 0 1 6 6 0
CORRESPONDING
1 A P I AT 60 COULD F NOT BE DETERMINED. ) 5A001670
RETURN 5A001680
C 5A001690
--
| | |

C I S DENSITY GREATER THAN


UPPER L I M I (TI F YES, BRANCH
TO 900) 5A001700
500 I F (IRHOGO - L I M 1 5) 1 05, 1 09, 0 0 5A00171 O
|
|

C I S DENSITY LESS THAN LOWER L I M I( T IF YES, BRANCH


TO 900) 5A001720
|||| |||| | | ||

510 I F (IRHOGO - L I M 29) 0 05, 2 05, 2 0 5A001730


520 IRHOGO = ( (IRHOGO 5) / 1 0 ) + 5A001740
I A P I 6 O = KONST / IRHOGO - 1 3 1 5 0
|||| |||| || || |

5A001750
C TIMES
INTEGER
VALUE 10 5A001760
IAPIGO = ( IAPIGO 5 ) / 10 + 5A001770
C FLOATING
POINT VALUE ROUNDED
NEAREST
TO TENTH 5A001780
|
|||| |||---

API6O = IAPIGO ’* . 1 5A001790


C A IPSI GREATER
THAN 55 ( I F NO, BRANCH
TO 770) 5A001800
I F ( I A P I - I E A P I ) 7 7 07, 7 07, 6 0 5A00181 O
C SWITCH
SET INDICATING EXTRAPOLATION REGION 5A001820
7 6 0I F L A G = 1 5A001830
RETURN 5A001840
C I S A P I GREATER THAN 4 0( I F YES, BRANCHTO 790) 5A001850
770 I F ( I A P I - I B P 1 ) 7 8 07, 8 07, 9 0 5A001860
C I S TEMP GREATER THAN 2 5 0( I FY E S , BRANCHTO 760) 5A001870
780 I F ( I T - I E P 1 ) 8 2 08, 2 07, 6 0 5A001880
C I S A P I GREATER THAN 50 ( I F YES, BRANCH TO 810) 5A001890
7 9 0 I F ( I A P I - I B P 2 ) 8 0 0 , 8 0 08, 1 0 5A001900
C I S TEMP GREATER THAN 2 0 0( I F YES, BRANCH TO 760) 5A00191 O

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
SECTIONVOLUME CORRECTION FACTORS X-1 5

800 I F ( IT - I E P 2 ) 8 2 08, 2 07, 6 0 5A001920


C I S TEMP
GREATER
THAN 1( 5I F0 YES, BRANCH
TO 760 5A001930
810 I F ( I T - I E P 3 ) 8 2 08, 2 07, 6 0 5A001940
5A001950
820 CONTINUE SA001 960
RETURN 5A001970
C SET SWITCH INDICATING OUTSIDE RANGE
OF TABLE
5A 5A001980
9 0 0I F L A G = -1 5A001990
API6O = - 9 9 . 9 5A002000
RETURN 5A00201 O
END 5A002020
--

SUBROUTINE R H 0 5 A ( I A P I , I R H O ) 5A002030
| | |

C 5A002040
|

C T H I S SUBROUTINE I S DESIGNED TO CALCULATE A DENSITY 5A002050


|
|||| |||| | | ||

C VALUE FOR A GIVEN VALUE OF A P I BY THE FORMULA 5A002060


C RHO=141 . 5 ” 9 9 9 . 0 1 2 / ( A P I + 1 3 1 . 5 ) 5A002070
C I T I S ASSUMED THAT THE A P I VALUE HAS BEEN ROUNDED 5A002080
|||| |||| || || |

C TOTHE NEARESTTENTH DEGREE A P I AND


THE VALUE MULTIPLIED 5A002090
C BY 1 0 . THEOUTPUT VALUE OF RHO WILL BE RETURNED 5A0021 O0
C ASAN INTEGER AND ROUNDED TOTHENEAREST HUNDREDTH 5A00211 O
|
|||| |||---

C KILOGRAM/CUBIC METRE. 5A002120


C 5A002130
C THE VALUE 1 4 1 3 6 0 1 9 8 0 REPRESENTS 141 .5’:‘999.012*‘1 O000 5A002140
C CORRECT TO 1 O D I G I T S 5A002150
IDENOM=IAPI+1315 5A002160
IRHO=(1413601980/IDENOM+5)/10 5A002170
RETURN 5A002180
END 5A002190

SUBROUTINE DIVSA(INUM,IDENOM,IRES,ISCALE) 5A002200


C 5A00221 O
C T H I S SUBROUTINE I S DESIGNED TO PRODUCE ADDITIONAL 5A002220
C ACCURACY FROM
AN INTEGER D I V I D E WHERE THE
NUMERATOR 5A002230
C I S ISCALE GREATER THAN THE DENOMINATOR. THE SUBROUTINE 5A002240
C ASSUMES PROPER SCALING OF BOTH THE INPUT NUMERATOR 5A002250
Ci AND DENOMINATORAND WILL RETURNTHE RESULTS MULTIPLIED 5A002260
C BY ISCALE. 5A002270
C 5A002280
IRES1=INUM/ IDENOM 5A002290
IRES2=(INUM-IRES1*IDENOM)*ISCALE/IDENOM 5A002300
IRES=IRESl ’:‘ISCALE+IRES2 5A00231 O
RETURN 5A002320
END 5A002330

SUBROUTINE A L F 5 A ( I R H O , K O , K l , I A L F ) 5A002340
5A002350
T H I S SUBROUTINE I S DESIGNED TO CALCULATE ALPHA FOR 5A002360
USE I N DETERMINATION OF VOLUME CORRECTION 5A002370
FACTOR. ALTHOUGH ALL CALCULATIONS ARE DONEAS INTEGERS 5A002380
THE SUBROUTINE RETURNS WITH A 7 D I G I T VALUE ( . O O X X X X X ) 5A002390
5A002400

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
X-16 1 P PHYSICAL PROPERTIES
CHAPTER DATA

INPUTVARIABLES 5A00241 O
IRHO=DENSITY*100(KILOGRAMS/CUBIC METRE) 5A002420
KO,K1=COEFFICIENTS OF DESIRED CURVE * 1 0 0 0 0 5A002430
5A002440
ALGORITHM- 5A002450
ALPHA=KO/RH0**2+Kl/RHO 5A002460
5A002470
CALCULATE K1 /RHO 5A002480
5A002490
INUM=Kl * 1 O000 5A002500
CALL DIV5A(INUM,IRHO,IALFl,lOOOO) 5A00251 O
C 5A002520
C CALCULATE KO/RHO**2 5A002530
C 5A002540
INUM=K0*100 5A002550
CALL DIV5A(INUM,IRHO,IALFS,lOOOO) 5A002560
CALL DIV5A(IALFS,IRHO,IALF2,10000) 5A002570
I A L F = ( I A L F l + I A L F 2 + 5 0 0) / l o 0 0 5A002580
RETURN 5A002590
END 5A002600

SUBROUTINE V C F 5 A ( I A L F , I D T , I V C F ) 5A00261 O
C 5A002620
C T H I S SUBROUTINE I S DESIGNED TO CALCULATE VOLUME 5A002630
--

C CORRECTION FACTOR. ALTHOUGH ALL CALCULATIONS ARE DONE


| | |

5A002640
C AS INTEGERS, THE SUBROUTINE RETURNS WITH A 8 5A002650
|
|

C OR 9 D I G I T VALUE DEPENDENT
UPONWHETHER IDT 5A002660
|||| |||| | | ||

C I S POSITIVE OR NEGATIVE. 5A002670


C 5A002680
C ALGORITHM- 5A002690
|||| |||| || || |

C VCF=EXP(-ALPHA*DT(l.O+0.8*ALPHA*DT)) 5A002700
C 5A00271 O
C CALCULATEALPHA*DT 5A002720
|
|||| |||---

C 5A002730
ITERMl=IALF*IDT 5A002740
C 5A002750
C CALCULATE O.B*ALPHA*DT 5A002760
C 5A002770
5A002780
C 5A002790
C CALCULATE EXPONENT-ALPHA*DT(l.O+0.8*ALPHA*DT) 5A002800
C 5A00281 O
CALL MPY5A(ITERM1,ITERM2,ITERM3,1000) 5A002820
ITERM3 = ( ITERM3 +
500 ) / 1 0 0 0 5A002830
I X = -1TERM1 - ITERM3 5A002840
C 5A002850
C CALCULATE EXPONENTIAL(F1RST 7
TERMS
OF POWER SERIES) 5A002860
C 5A002870
ISUM1=1 OOOOOOOO+IX 5A002880
C A L LM P Y 5 A ( I X , I X , I S U M 2 , 1 0 0 0 ) 5A002890
ISUM2=((ISUM2+50)/100)/2 5A002900
CALL MPY5A(IX,ISUM2,1SUM3,1000) 5A00291 O
ISUM3=((1SUM3+50)/100)/3 5A002920
CALL MPY5A(IX,ISUM3,ISUM4,1000) 5A002930
ISUM4=((ISUM4+50)/100)/4 5A002940
CALL MPY5A(IX,ISUM4,1SUM5,1000) 5A002950

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL.L VOLSX 80 0732270 0525883 L45 m

SECTIONVOLUME
FACTORS
CORRECTION X-17

ISUM5=((1SUM5+50)/100)/5 5A002960
CALL MPY5A(IX,ISUM5,ISUM6,1000) 5A002970
ISUM6=((ISUMS+50)/100)/6 5A002980
IVCF=ISUM1+ISUM2+ISUM3+ISUM4+ISUM5+ISUM6 5A002990
RETURN 5A003000
END 5A00301 O

SUBROUTINE M P Y 5 A ( I X , I Y , I Z , I S C A L E ) 5A003020
C T H I S ROUTINE PERFORMS INTEGER MULTIPLICATION. THE TOTAL 5A003030
C NUMBER OF D I G I T ISINX AND I Y MUST
NOT EXCEED 1 7 . OTHER 5A003040
C WISE, OVERFLOW W I L L OCCUR. 5A003050
C 5A003060
I U 1 = I X / ISCALE 5A003070
K1 = ISCALE * I U 1 5A003080
IV1 = I X - K1 5A003090
I U 2 = I Y / ISCALE 5A0031 O0
K2 = ISCALE * I U 2 5A00311 O
I V 2 = I Y - K2 5A003120
K3 = I U 1 * I V 2 + IU2 * IV1 + I V 1 * I V 2 / ISCALE 5A003130
I Z = (K3 + +
I S C A L E / 2 ) / ISCALE I U 1I U 2 5A003140
RETURN 5A003150
END 5A003160

11.1.5.3 IMPLEMENTATION PROCEDUREFOR SUBROUTINE TAB5A

The use of the conputer has gained widespread acceptance throughout the
--

petroleum industry.Computers are used foraccounting prposes, in


| | |

process simulation and m d e l i n g , d a t a r e t r i e v a l and evaluation, and are


|
|
|||| |||| | | ||

now being used extensively in custody transfer measurements and trans-


actions.In1968,the American Petroleum Instituterecognizedthe need
|||| |||| || || |

forincorporatingexisting petroleum measurement tables i n t o a m p u t e r


code. I n June of1973, a subroutine for TABLE 6 , Volume Reduction to 60 OF,
|
|||| |||---

was made available.Sincethen many of the otherstandardized ptroleum


measurement tables have been made a v a i l a b l e as amputer subroutines.

However, the computerization of an e x i s t i n g table ofn&rsproved to te


a v e r y d i f f i c u l t task. For instance, it proved to be impossible b use
the mathematical expression that was supposedly used n l generate the table
values and c a l c u l a t ev a l u e si d e n t i c a l to t h et a b u l a re n t r i e s . This was
because some of the v a l u e s e n t e r e d i n t o the tables had been s l i g h t l y
modified and also becausetheprocedures used to round the c a l c u l a t e d
values were inconsistent.

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMStLL.1 VOL+X 80 W 0732270 0525884 081

X-18 1 P PHYSICAL PROPERTIES


CHAPTER DATA

The only way to uvercome these problems i n a amputer subroutine was b


manually locate all the table e n t r i e s that did mt agree w i t h the cal-
c u l a t e dv a l u e s and add extensive"exception tables" to the code. This
made the d e lengthy andsomewhat cLnnbersome to m d i f y and to some e x t e n t
restricted its use to l a r g e r conrputing systems.

The m r k i n g group for TABLE 6 r e v i s i o n r e a l i z e d the importance of e l i m i -


n a t i n g any potential for such problem i n the f u t u r e and also recognized
t h e reed to have amputer subroutines available at the time the new
petroleun measurement tables were released. The -king group decided ID
o u t l i n e an explicit inplementationprocedure to te followed when using the
new c o r r e l a t i o n for volume m r r e c t i o nf a c t o r s . This implementation
procedure muld then be the Standard rather than a set of equations or set
of t a b l e s .S t a n d a r d i z a t i o n of an implementationprocedure implies
s t a n d a r d i z a t i o n o f the set of mathematical expressions used w i t h i n t h e
a n p u t e r aile. Absoluteadherence
to theoutlinedprocedure w i l l insure
t h a t all mmputers and a m p u t e r d e of the future, meeting the s t a t e d
s p e c i f i c a t i o n s and r e s t r i c t i o n s , w i l l be able to produce i d e n t i c a l
r e s u l t s . Such a procedure allows for the maximum machine and code
independence.

The implementationprocedure as described i n the following text can by


c a r e f u l and deliberate applicationofnumerical analysis ke followed
through the majority of language andword s i z e s i n present and anticipated
use. To follow the standardprocedure means absolute and unwavering
adherence to the number of digits s p e c i f i e d a t each step and b the
c a l c u l a t i o n a l p r o c e d u r e as outlined.

I n the procedure, the m m e n c l a t u r e d i g i t s (rorX.XX) means mathematically


s i g n i f i c a n t d i g i t s as defined in ASTM E380-76. I n the previous example,
a l l f i v e ( 5 ) d i g i t s i n the p r e n t h e s i s are mathematically significant.

A t various steps i n the inplementation procedure, c a l c u l a t e d r e s u l t s are


rounded or truncated. When rounding a r e s u l t to fewer d i g i t s t h a n
the
total nm-ber a v a i l a b l e , the followingprocedure which was used overrides
t h a t of RSTM E380-76:

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API MPMS*LL*L VOL*X 80 m 0 7 3 2 2 9 00 5 2 5 8 8 5 TL6 m

SECTION
1"VOLUME CORRECTION
FACTORS x-19

a ) when t h e f i r s t d i g i t to k discarded is less than 5 , the last d i g i t


r e t a i n e d is m t changed.
b) when t h e f i r s t d i g i t to be discarded is greater than 4, the last
digitretained is increased by one unit.

The procedure used in truncating a r e s u l t to fewer d i g i t s t h a n the total


number a v a i l a b l e is to sinply discard all d i g i t s f o l l o w i n g the last d i g i t
to be retained and leaving the last r e t a i n e d d i g i t unchanged.

Another s p e c i f i c a t i o n is t h a t the coeff i c i e n t s used to relate the thermal


expansion coefficient at 60 OF to the 60 OF d e n s i t y base and all o t h e r
constants needed i n t h e c o r r e l a t i o n mst be used m e x a c t l y the number of
d i g its spec i f i e d .
Calculation Procedure

Step 1: Round inputvariables


a ) Round API g r a v i t y to nearest 0.1
API = W . X rounded
b ) Round &servedtemperature to warest 0.1

|||| |||---
T = XXX.X rounded

|
|||| |||| || || |
Step 2: Calculatedifferencein&served temperature and

|||| |||| | | ||
base temperature
BASE TEMPERATURE = 60 .O
|

DELTA = XXX.X - 60.0 = XXX.X |


| | |
--

Step 3: Compute hydrometer m r r e c t i o n term ( o p t i o n a l )


HYC = 1.0 - .00001278*DELTA - .0000000062*DELTA2
TERM1 = .00001278*DELTA = .OOXXXXXXX rounded
TERM2 = .0000000062*DELTA2 = .OOOXXXXXX rounded
mc = 1.000000000 - .ooXXXXXXX - .oooXXXXXX = x.xXXXXXXXX

Step 4: Convert API g r a v i t y to density, Kg/m3


RHO = (141.5*999.012)/(131.5+API)
RHO = 141360.1980/XXX.X = XXXX.XX rounded

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
x-20 CHAPTER PROPERTIES
1I-PHYSCM DATA

Step 5A: Zqplication of hydrometer mrrection


mm = RHO * mc = m.xx rounded
Step 5B: Initialize 60 OF density
RHO60 = m = xxxx.xx
Step 6: Calculate coefficient of thermal expansion
ALPHA = Ko/RH06O2 + K1/RH060
KO = XXXX.XXXX
K i ' = .M
T
ERMl = Ko/RH060 = X
.XXXXXXX truncated
TERM2 = TERM1/RH060 = .OOXXXXXXXX truncated
TERM3 = Kl/RH060 = .OOXXXXXXXX truncated
ALPHA = TERM2 + TERM3 = .OOOXXXX rounded
Step 7: Calculate volume mrrectionfactor
VCF = EXP(-ALF'm*DELTA - o.8*ATJ?HA2*DELTA2)
a ) calculate exponent
TEXMl = ALPHA * DELTA = .mtruncated
TERM2 = O. 8 * TERMl =X
.XXXXXXX truncated
TERM3 = TERMl * TERM;! X .XXXXU
IM rounded
=
TERM4=-TERMl-TERM3=.XXXXXXXX
b) calculate exponential
VCF = EXP(TERM4) = X.XXXXXX rounded
( M u s t use a t least the first Seventermsof
the power series expansion. )

Step 8: Calculate 60 OF density


RHO60 = RHOI?/ICF = XXXX.XXX truncated
Since the equation for p60 cannot be solved explicitly, a successive
approximtion iterative scheme is used to obtain a solution. %e initial
estimate of p60 is the value of the density a t observed temperature t.
Tnis approximation is substituted into the right hand side of the equation
t o obtain a second value approximation. This process of substituting into
the right hand side of the equation and estimating a new value from the r..

other is repeated until two consecutive res-ats


are i n agreement t o the
desired degree of accuracy. In subroutine TAB5A, a converged solution is

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
SECTIONVOLUME
FACTORS
CORRECTION x-21

reached when the change in density is less than 0.05 Kg/m 3 in


successive passes.

The 1980 i n t e g e r FOF?TRAN code issued by API contain both an i n t e g e r


d i v i s i o n and an i n t e g e r m l t i p l i c a t i o n a l g o r i t h m . A d e s c r i p t i o n of each
follows.

INTEGER MULTIPLICATION PROCEDURE


(For 32 B i t Arithmetic)

DATA DEFINITION
X,Y are integer numbers t h a t are equal to or less than 2*lO9 ( s l i g h t l y
less than 231). A larger value may causeoverflow.Inaddition,the
total n m b e r o f d i g i t s i n X and Y must not exceed 17, otherwise werflow
w i l l occur. Z is the product (X*Y) s c a l e d by i.e. Z = (X*Y) /lo8 .
Note: I f it is desirable to obtain mximm precision, X and Y may be
s c a l e d up prior to use of the procedure.Typically, at least 15 d i g i t s
are needed to obtain 6 d i g i t p r e c i s i o n , 1 6 f o r 7 and 17 for 8. The
l a r g e s t v a l u e o f X and Y t h a t may be used are 2 O00 O00 O00 and 99 999 999.
(Either values may be used f o r X and Y ) .

CALCULATION
x/10000 = u1
10000 * u1 = Kl
X-K1 = VI.
Y/10000 = u2
10000 * U2 = K2
Y-K2 = V2
(Ul*V2) + (U2*Vl) + (Vl*vz/lOOOO) = K3
(K3 + 5000)/10000 + Ul*U2 = Z

Note: Z has been scaled by and may have b be rescaledbefore use.

TOTAL DIGITS I N X AND Y 12 13 14 15 16 17


D I G I T S IN PKQDUCI’, Z 3-4 4-5 5-6 6-7 7-8 8-9

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
x-22 CHAPTER 11"PHYSICAL PROPERTIES DATA

INTM;ER DIVISION PROCEIXTRE


(For 32 B i t Arithmetic)

DATA DEFINITION
X,Y are i n t e g e r n m r s such that X is equal to or leSS than $1-1 and
Y is of order ofmagnitude lo4 less than X.

R is the quotient of X/Y s c a l e d by lo4, i.e. R = X/Y * lo4.

Note: If it is desirable to & t a i n maximum p r e c i s i o n , X and Y may ke


s c a l e d up prior to use of the procedure.Typically, the mre d i g i t s that
are carried i n both X and Y, the mre a c c u r a t e d i g i t s on output.

CALCULATION
x/Y = u1
U l * Y = K l
x-Kl=vl
vl/Y = u2
U1 * 10000 + U2 =R

Note: R has been scaled by lo4 and may need to be rescaled before use.

Examples for Checkout

The followingexamples illustrate how the implementationprocedure is


a c t u a l l y used tn determine the value of an API g r a v i t y a t 60 O F f o r
GeneralizedCrude O i l s . The examples carry the computationsthrough each
step of the procedure showing the r e s u l t s of each mathematical aperation.
Thecomputed values are given to the required precision and it is indicated
i f a value has been rounded or truncated. The step-by-stepcalculations are
shown for the first i t e r a t i o n t h e n
a table is presented which s r n a r i z e s the
intermediate values used to o b t a i n a mnverged solution.

These examples are to be used as test cases for subroutine TAE55A to v e r i f y


the computer code has not been altered or incorrectly reproduced. The
r o u t i n e has keen designed to execute on machines that use WoTd s i z e of

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*IIL~L V O L * X 80 m 0732290 0525889 bb3 m

SECTION1"VOLUMEFACTORS
CORRECTION X-23
--
| | |
|
|

32-bits or greater. Any rrew developnentofcomputer d e t h a t is designed


|||| |||| | | ||

t o follow the standardimplementationprocedure mst insure that the values


|||| |||| || || |

computed at each step i n the procedure are i d e n t i c a l to thosegiveninthe


examples.
|
|||| |||---

EXAMPLE 1
Step 1: Round inputvariables
a ) Round API g r a v i t y to nearest 0.1
W1 = 30 .O rounded
b) Round observedtemperature la nearest 0.1
T = 248. O rounded

Step 2: Calculate differenceinobservedtemperature and base temperature


BASE TEMPERATURE = 60 .O
DELTA = 248.0 - 60.0 = 188.0

Step 3: Compute hydrometer mrrection term


HYC = 1.O - .O0001278 * DELTA - .0000000062 * DELTA2
TERMl = .O0001278 * DELTA = .O02402640 rounded
TERM2 = ,0000000062 * DELTA2 = .O00219133 rounded
HYC = 1.000000000 - .O02402640 - .O00219133 = .997378227

Step 4: Convert API g r a v i t y to d e n s i t y


RHO = (141.5 * 999.012)/(131.5 + API)
RHO = 141360.1980/161.5 = 875.30 rounded

S t e p SA: Application of hydrometer correction


RHOT = RHO * HYC = 873 .O1 rounded

Step 5B: I n i t i a l i z e 60 OF d e n s i t y
RH060 = RHOT = 873 .O1

Step 6A: Calculate e f f i c i e n t of thermalexpansion


ALPHA = Ko/WI06O2 + Kl/F!H060
KO = 341 .O957 (as of May 1, 1980)

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
X-24 CHAPTER
1 PHYSICAL PROPERTIES
DATA

K 1 = 0.0 (as of May 1, 1980)


TERMl = Ko/RH060
TERMl = .39071224 truncated
TERM2 = TERMl/w1060
TERM2 = .O004475461 truncated
"3 = K1/IMO60
TERM3 = 0.0
ALPHA = TJ2RM2 + TERM3 = .O004475 rounded

Step 7: Calculate volume a x r e c t i o n factor


VCF = MP ( -ALPHA * DELTA - O. 8 * ALPHA^ * DELTA^ )
a ) Calculate
exponent
TERMl = ALPHA * DELTA = .O8413000 truncated
TERM2 = 0.8 * T
ERMl = 0.6730400 truncated
TERM3 = T
ERM1 * TERM2 = .O0566229 rounded
4" = -'I"1 - TERM3 = -.O8979229
b) Calculateexponential
VCF = MP(TERM4) = .914121 rounded
(must use the first seven terms of the power series
expansion of ex)

S t e p 8: Calculate 60 OF density
MO60 = RHOT/VCF = 955 .O26 truncated

TABLE 1 shows the r e s u l t s of e a c h i t e r a t i o n .

TABLE 1

ITERATION RHO60 ( N ) mm VCF RHO60 ( N+1)


1 873.01 .O004475 .914121 955.026
2 955.03 ,0003740 .928424 940.313
3 940.31 .O003858 .926132 942.641
2.64 4 .O003839 .926501 942.265
5 942.27 .O003842 .926443 942.324
6 942.32 .O003841 .926462 942.305

W160 = 141360.1980/942.31 - 131.5 = 18.5

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
SECTIONVOLUME
FACTORS
CORRECTION X-25

"PLE 2
Step 1: Round inputvariables
a ) Faund ApI g r a v i t y k~nearest 0.1
API = 72.5 rounded
b) Faund &servedtemperature to nearest 0.1
T = 52.5 rounded

S t e p 2 : Calculatedifferenceinobservedtemperature and base


terrperature
BASE TEMPERATURE = 60 .O
DELTA = 52.5 - 60.0 = -7.5

S t e p 3:Compute hydrometer m r r e c t i o n term


HYC = 1.O -
.O0001278 * DELTA - .0000000062 * DELTA
2

TERMl = .O0001278 * DELTA = -.O00095850 rounded


TERM2 = .0000000062 * DELTA2 = .O00000349 rounded
HYC = 1.000000000 + .O00095850 - .O00000349 = 1.000095501

Step 4: Convert ApI g r a v i t y to d e n s i t y


RHO = (141.5 * 999.012)/(131.5 + API)
RHO = 141360.1980/204.0 = 692.94 rounded

Step 5A: Application of hydrcm&er correction


m = RHO * HYC = 693 . O 1 rounded

Step 5B: I n i t i a l i z e 60 OF density


RH060 = FU-ICYJ? = 693.01

Step 6A: Calculate coefficient of thermal expansion


|||| |||---

ALPHA = Ko/RH0602 K1/RH060 +


|
|||| |||| || || |

KO = 341.0957 (as of May 1, 1980)


K 1 = 0.0 (as of May 1, 1980)
|||| |||| | | ||

TERMl Ko/RHOGO
=
TERMl = .49219448 truncated
|
|

TERM2 = TEXMl/IM060
| | |
--

TERM2 = .O0071022700 truncated

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
X-26 1 P PHYSICAL PROPERTIES
CHAPTER DATA

TERM3 = Kl/F?HO60
TERM3 = 0.0
ALPHA = TERM2 + TERM3 = .O007102 rounded
Step 7: C a l c u l a t e volume a x r e c t i o n factor
VCF = EXP(-ALPHA * DELTA - 0.8 * m m 2 * DELTA^ )
a) Calculateexponent
T E M = ALPHA * DELTA = -.O0532650 truncated
TERM2 = 0.8 * TERMl = -.O0426120 truncated
TERM3 = TEM * TERM;! = .O0002270 rounded
TERM4 = “l- TERM3 = .O0530380
b ) Calculateexponential
VCF = EXP(TERM4) = 1.005318rounded
(must use t h e f i r s t s e v e n terms of the power series
expansion of ex)
Step 8: Calculate 60 O F density
RH060 = RHOTWF = 689.344 truncated

TABLE 2 shows the r e s u l t s of e a c h i t e r a t i o n .

ITERATION RIIOGO ( N ) ALPHA VCF RH060 ( N+1)


1 693.01 .O007102 1.005318 689.344
2 689.34 .O007178 1.005375 689.304

W160 = 141360.1980/689.30 - 131.5 = 73.6

EXAMPLE 3
Step 1: Round inputvariables
a) API
R O U ~ g r a v i t y b n e a r e s t 0.1
API = 88 .O
rounded
b) Wund observed t e p r a t u r e to nearest 0.1
T = 184 .O rounded

Step 2: Calculate differenceinobservedtemperature and base


temperature
BASE TEMPERATURE = 60 .O
DELTA = 184.0 - 60.0 = 124.0

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API MPMS*LL-L VOL*X 80 m 0732290 0525893 094m

SECTION FACTORS
1"VOLUME CORRECTION X-27

S t e p 3: Compute hydrometer c o r r e c t i o n term


HYC = 1.O -
.O0001278 * DELTA - .0000000062 * DELTA2
TEM = .O0001278 * DELTA = .O01584720 rounded
TERQ = .0000000062 * DELTA2 = .O00095331 rounded
HYC = 1.000000000 - .O01584720 - .O00095331 = e998319949

Step 4: Convert ApI g r a v i t y to d e n s i t y


RHO = (141.5 *
999.012)/(131.5 + API)
RHO = 141360.1980/219.5 = 644.01rounded

Step 5A: Application of hydrometer correction


EHOT = RHO * W C = 642.93 rounded

Step 5B: I n i t i a l i z e 60 O F d e n s i t y
RH060 = RHCrr = 642.93

S t e p 6A: C a l c u l a t e c o e f f i c i e n t of thermalexpansion
ALPHA = Ko/RH0602 + K1/RH060
KO = 341.0957 (as of May 1, 1980)
K 1 = 0.0 (as of May 1, 1980)
TJ%Ml = Ko/RHO60
TERMl = .53053318 truncated
TERM2 = TERM1/I?H060
TERM2 = .O008251803 truncated
TERM3 = K1/RH060
TERM3 = 0.0
ALPHA = TERM2 + TERM3 = .O008252 rounded

Step 7: Calculate volume c o r r e c t i o n factor


VCF = EXP(-ALPHA * DELTA - O. 8 * m m 2 * DEXTA~)
a ) Calculateexponent
TERM1 = ALPHA * DELTA = .lo232480 truncated
TERM2 = 0.8 * TE
RM l = .O8185984 truncated
TERM3 = TERM1 * TERM2 = ,00837629 rounded
TERM4 = l"l - TERM3 = -.11070109

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
x-28 CHAPTER
1 PHYSICAL PROPERTIES
DATA

b) Calculateexponential
VCF = EXP("4) = .895206 rounded
(must use t h e f i r s t seven t e m ofthe p e r series
expansion of eX)

Step 8: Calculate 60 OF density


RH060 = RHOT/VCF = 718.192 truncated

TABLE 3 shows the r e s u l t s of each iteration.

TABLE 3

ITERATION WO60 ( N ) ALPHA VCF RH060(N+1)


1 642.93 .O008252 .895206 718.192
2 718.19 .O006613 .916328 701.637
3 701.64 .O006929 .912264 704.763
4 704.76 .O006867 .913062 704.147
5 704.15 .O006879 .912908 704.265
--
| | |

6 704.27 .O006877 .912934 704.245


|
|
|||| |||| | | ||

API60 = 141360.1980/704.25 - 131.5 = 69.2


|||| |||| || || |
|
|||| |||---

"PLE 4
Step 1: Round inputvariables
a ) Round API g r a v i t y to nearest 0.1
API = 94.5 rounded
b ) Round observed temperature tm nearest 0.1
T = 127.5rounded

Step 2: Calculatedifferencein &served temperature and base


temperature
RASE TEMPERATURE = 60 .O
DELTA = 127.5 - 60.0 = 67.5

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I flPflS*LL.L V O L X X 80 W 0732290 0525895 967

SECTIONVOLUME
FACTORS
CORRECTION X-29

S t e p 3 : Compute h y d r o m t e r correction term


HYC = 1.0 - .O0001278 * DELTA - .0000000062 * DELTA2
TEM = .O0001278 * DELTA = .O00862650 rounded
TERM2 = .0000000062 * DELTA2 = .O00028249 rounded
HYC = 1.OOOOOOOOO - .O00862650 - .O00028249 = .999109101

step 4: Convert API gravity to d e n s i t y


RHO = (141.5 *
999.012)/(131.5 + API)
RHO = 141360.1980/226.0 = 625.49 rounded

S t e p SA: Application of hydmmeter correction


RHOT = RHO * HYC = 624.93 rounded

S t e p SB: I n i t i a l i z e 60 O F d e n s i t y
RH060 = RHOT = 624.93

Step 6A: Calculate c o e f f i c i e n t of thermalexpansion


ALPHA = Ko/FW0602 + K1/FW060
KO = 341.0957 (as of May 1, 1980)
K 1 = 0.0 (as of May 1, 1980)
TERMl = Ko/RH060
T
ERMl = .S4581425 truncated
TERM2 = TE€UYl/RH060
TERM2 = .O008734006 truncated
TERM3 = K1/FW060
TERM3 = 0.0
ALPHA = TERM2 + TERM3 = .O008734 rounded

Step 7: C a l c u l a t e volume m r r e c t i o n factor


VCF = EXP (-ALPHA * DELTA - 0.8 * m m 2 * DELTA;!
a ) Calculateexponent
TERM1 = ALPHA * DELTA = .O5895450 truncated
TERM2 = 0.8 * TERMl = .O4716360 truncated
TERM3 = TERMl * TERM2 = .O0278051 rounded
TERM4 = -TERM1 - TERM3 = -.O6173501

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API M P M S * L L * L V O L * X B O m 0732290 0525896 8 T 3

X-30 CHAPTER DATA


1 PHYSICAL PROPERTIES

b) Calculateexponential
VCF = MP(TERM4) = .940132 rounded
(must use t h e first Seven terms of t h e m e r series
expansion of ex)

Step 8: C a l c u l a t e 60 density

|||| |||---
O F

RH060 = REIOT/VCF = 664.725 truncated

|
|||| |||| || || |
TABLE 4 shaws the results of e a c h i t e r a t i o n .

|||| |||| | | ||
TABLE 4

|
|
| | |
--
ITERATION mao (N) ALPHA VCF m060 (N+1)
1 624.93 .O008734 .940132 664.725
2 664.73 .O007719 .947172 659.785
3 659.79 .O007835 .946368 660.345
4 660.35 .O007822 .946458 660.282
5 660.28 .O007824 .946444 660.292

-160 = 141360.1980/660 -29 - 131.5 = 82.6

EXAMPLE 5
Step 1: Round input variables
a ) R x n d API g r a v i t y t
a nearest O .1
API = 50 .O rounded
b ) Wund &served temperature to nearest 0.1
T = 77 .O rounded

Step 2: Calculatedifferenceinobservedtemperature and base


tenperature
BASE TEMPENITURE = 60 .O
DELTA = 77.0 - 60.0 = 17.0

Step 3:Compute hydrometer c o r r e c t i o n term


HyC = 1.O - .O0001278 * DELTA - .0000000062 * DELTA2

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL.L VOL*X A O m 0732290 0 5 2 5 8 9 7 73T m

SECTIONVOLUME CORRECTION
FACTORS X-31

TEM = .O0001278 * DELTA = .O00217260 rounded


"2 = .0000000062 * DELTA2 = .O00001792 rounded
HYC = 1.000000000 - .O00217260 - .O00001792 = .999780948

S t e p 4: Convert ApI g r a v i t y to d e n s i t y
RHO = (141.5 *
999.012)/(131.5 + API)
RHO = 141360.1980/181.5 = 778.84 rounded

Step 5A: Application of hydrometer correction


RHOT = RHO * W C = 778.67 rounded

Step 5B: I n i t i a l i z e 60 density


OF

RH060 = RHCYI' = 778.67

S t e p 6A: Calculate coefficient of thermal expansion


ALPHA = Ko/m06O2 + K1/F&l060
KO = 341.0957 (as of May 1, 1980)
K1 5 0.0 (as of May 1, 1980)
TEBMl = Ko/F3l060
TF,RMl = .43804910 truncated
TERM2 = TERM1/IM060
TERM2 = .O05625606 truncated
TERM3 = K1/E7H060
TERM3 = 0.0
ALPHA = TERM2 + TERM3 = .O005626 rounded

Step 7: Calculate volume c o r r e c t i o nf a c t o r


VCF = EXP( -ALPHA * DELTA - o. 8 * ALPHA* * DEXTA~)
a ) Calculateexponent
T E M = ALPHA *DELTA = .O0956420 truncated
TERM2 = 0.8 * l" l= .O0765136 truncated
|||| |||---

TERM3 = TERMl * "2 = .O0007318 rounded


|

l- TERM3 = -.O0963738
|||| |||| || || |

TERM4 = "
b ) Calculateexponential
|||| |||| | | ||

VCF = Exp(TERM4) = .990409 rounded


|
|
| | |
--

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I flPflS*LL=L VOL*X 80 m 0732290 0525898 676

X-32 CHAPTER DATA


1 PHYSICAL PROPERTIES

(must use the f i r s t seven t e m of the m e r series


expansion of ex)

Step 8: C a l c u l a t e 60 OF d e n s i t y
RH060 = RHOT/VCF = 786.210 truncated

TABLE 5 shows the r e s u l t s of e a c h i t e r a t i o n .

TABLE 5

ITERATION RHO60 (N) ALPHA VCF RH060 ( N + l )


1 778.67 .O005626 .990409 786.210
2 786.21 .O005518 .990594 786.063
3 786.06 ,0005520 .990590 786.066

W160 = 141360.198/786.07 - 131.5 = 48.3

11.1.5.4 TABLE SB-GENERALIZED PRODUCTS, perature ranges of the given data to determine the value
CORRECTION OF OBSERVED API of API gravity at 60°F for these areas. These values are
GRAVITY TO API GRAVITY AT 60°F denoted by an asterisk (*). Extension of this table be-
yond the ranges shown is not recommended.
TABLE 5B gives the values of API gravity at 60°F Increments usedin this table for determining API
corresponding to an API hydrometer reading at ob- gravity at 60°F are 0.5"F and O.5"API. Interpolation
served temperatures other than60°F. In converting the with temperature is not intended since there is no prac-
API hydrometer reading at the observed temperature tical method of interpolation that will produce the ac-

|||| |||---
to the corresponding API gravity at 6VF, two correc- curacy obtainable from the Standard. However, inter-
tions are necessary: the first arises from the change in polation with gravity to one additional significant digit
|
|||| |||| || || |
volume of the glass hydrometer with temperature (stem can be reasonably made. Interpolationis not required if
correction) and the second from the change in volume the TABLE 5B results are to be used asentries to
of the products with temperature. Both have been ap-
TABLE 6B.
|||| |||| | | ||

plied in this table. The values of API gravity at 60°F in


Thistable must be entered with an API hy-
this table are the result of a computer procedurewhich
drometer reading measured with a soft glass hy-
is the Standard (see 11.1.5.5 and 11.1.5.6).
drometer calibrated at 60°F and with an observed
|
|

The temperature ranges of this table are:


| | |

temperature.
"API "F
--

A correction to the glass hydrometer reading


O to 40 O to 300 has been incorporated into the table to account
40 to 50 O to 250 for the thermal expansion of glass. The hydrom-
50 to 85 o to 200 eter constant,as defined in the Reporton the
The values of API gravity at 60°F given in this table Development, Construction, Calculation, and
are based on data from the U.S. National Bureau of Preparation of the ASTM-IP Petroleum Measure-
Standards and from other published data. Portions of ment Tables (1960), varies with temperature ac-
the gravity and temperature ranges represent areas be- cording to the following:
yond these data. Thus, mathematical techniques were HYC = 1 - 0.00001278 ( t - 60°F)
employed to extrapolate beyond the gravity and tem- - 0.0000000062 ( t - 60"F)*

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
SECTION
1-VOLUME
FACTORS
CORRECTION x-33

11.1.5.5 PROGRAM DOCUMENTATION FOR SUBROUTINE TAB5B-


GENERALIZED PRODUCTS, CORRECTIONOF OBSERVED API
GRAVITY TO API GRAVITY AT 60°F

ABSTRACT

S u b r o u t i n e T i t l e: TAl35ß - T a b l e 5ß, Generalized Products, API


Gravity Correction to 60 OF.

Description: This subroutine is designed to c a l c u l a t e t h e API


g r a v i t y at 60 OF corresponding to A P I g r a v i t i e s
observed a t temperatures other than 60 OF.

Program Responsibility: American Petroleum I n s t i t u t e


Measuremnt Coordinat ion
2101 L S t r e e t N.W.
Washington, D .C. 20037

Date Issued: August 1980

Language: FrXTRAN, I4NSI/FsA Standard

Reference: API Standard 2540, TAF3I.E 6 , 11.l.6

THIS SUBF¿OUTINE W DEVELOPED USING ?HE IWTHEMATICALALGOFUTHMS


AND SPECIFICATIONS DESCRIßED IN THE W U " PFOCEWRE 11.1.5.6.
ANY MODIFICATION TO SUBROUTINE MUST RIGIDLY ACHERE 'ID ?HE
SAME ALI;ORITHMS AND SPECIFICATIONS.

11.1.5.5.1 Introduction

TAB5B is a anputer subroutine designed to calculate for substances


characterized as generalized products the value of API g r a v i t y a t 60 degrees
Fahrenheit (OF) Corresponding b API g r a v i t i e s observed at temperatures other

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
X-34 CHAPTER
1 PHYSICAL PROPERTIES
DATA

than 60 OF. The subroutine accepts as input the observed API g r a v i t y rounded
to the nearest 0.1 OAPI and the temperature rounded to the nearest O .1 OF.
If either input value has not beenproperlyrounded,thesubroutine will
round the values and returnthecorrectedvalues. The subroutinereturnsthe
value of the API g r a v i t y at 60 OF rounded to the nearest O .1 and a s t a t u s
f l a g f o r user mnvenience. The f l a g is set to -1 i f an error m n d i t i o n
occurs and to +1i f the value of the API g r a v i t y a t 60 OF is an extrapola-
t i o n . The limits of the correlation including the extrapolated region are
d e p i c t e d i n Figure X-2. The c a l l i n g program must check the flag and provide
--
| | |

userwith appropriate warning message or program termination. The f l a g is


|
|

set b zero when t h e i n p l t variables and the API g r a v i t y a t 60 OF are within


|||| |||| | | ||

t h e limits of the correlation.


|||| |||| || || |

11.1.5.5.2 S u b r o u t i n eS m c i f i c a t i o n s
|
|||| |||---

The range of application is:

O A P I Temperature, O F
O to 40 O to 300
40.1 b 50 O to 250
50.1 lm 85 o +X200
I

Referenced d u l e s : ALF5B, D I n B , MPY5B, HO5B, VCF5B

FoliTRAN functions: FUXT, IABS

Averageexecution time: 530 entries/CFTJ second


IBM 370/168

The subroutines are w r i t t e n i n ANSI/ASA FOKI'RAN using integer arithmetic.


The s i z e and storage requirements are:
1. Conpilable source
statements 172
2. Decimal storage bytes 4258
3. Wrds 1065

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*33-3 V O L * X 80 0732290 0 5 2 5 9 0 3 T90

SECTIONI-VOLUME CORRECTION FACTORS x-35

11.1.5.5.3 Calling Sequence

CALL W 5 B (API, DEGF, IHYDW, API60, IFLAG)

API - API g r a v i t y at observedtemperature


(API returned w i l l be rounded to rrearest 0.1 O A P I )

DEGF - Observedtemperature, O F

( DEGF returned w i l l be rounded to nearest O. 1 O F)

IHYDFO - Hydrometer switch


O: ?he APIg r a v i t y w a s observedwith a glass &&o-
meter and a hydrometer m r r e c t i o n is needed
1: The API g r a v i t y was determined from anm-line
densitometer and a hydrometer c o r r e c t i o n is m t

|||| |||---
needed.

|
|||| |||| || || |
OUTPUT DESCRIPTION

|||| |||| | | ||
-160 - Corresponding API g r a v i t y at 60 OF rounded to n e a r e s t 0.1 O A P I

|
|
| | |
--
IFLAG - S t a t u s Code
and c a l c u l a t e d r e s u l t s are
O : I n d i c a t e si n p u tv a r i a b l e s
w i t h i n the range of a p p l i c a t i o n
1: Indicatesinputvariables are inextrapolatedregion
-1: Indicates inputvariables or c a l c u l a t e dr e s u l t s are
o u t s i d e the range of application

KYT
E: I f a mn-convergenceoccurs,thesubroutineprints the following
message :

AT =.X EGREES F AND =.X DEGREES API , A OilRRESPoNDING


API AT 60 O F COULD BE DETERMINED.

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API M P M S U L L - L V O L * X 80 m 0732290 0525902 927 D

X-36 CHAPTER 1i-PHYSlCM PROPERTIES DATA

This message should not occur unless the d e has been altered or
i n c o r r e c t l y reproduced. Follow Section11.1.5.6,Implementation
Procedure, and test the subroutineexactly as described. The
s t a t u s f l a g w i l l be set to -1, -160 m -99.9, and program control
returned t
n the calling mutine.

11.1.5.5.4 Method of Calculation

This subroutine uses a mnvergencetechnique to determine the A P I g r a v i t y


a t 60 OF that corresponds b an API g r a v i t y observed a t some temperature
otherthan 60 OF. Sincetheequations are expressed i n terms of density,
the API g r a v i t y is mnverted to d e n s i t y by the following relationship:

- 141.5 * 999.012
Pt 131.5 + API
--
| | |

where = densityattemperature t
|
|
|||| |||| | | ||

API = observed API gravity


3
999.012 = density of water 60
at O F , Kg/m
|||| |||| || || |

60 O F , is
The coefficient of thermal expansion at the base temperature,
|
|||| |||---

related to the density at the base temperature


by

“60
= -
p
KO
2
+ -K1
60 ’60

The values of p and c1 are used in the volume correction factor equation
t 60
to compute p 60 a

VCF = - = EXP [-a60At (1 + O .8a60At)]


’60

Thus p t - P60 EXP [-a60 At(1 + O .8c~~~At))


Where p = density at the base temperature
60
At = t - 60.0

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
SECTIONVOLUME
FACTORS
CORRECTION x-37

Since the equation for p cannot be s o l v e de x p l i c i t l y , a successive


60
approximationiterative ?he i n i t i a l
scheme is used to o b t a i n a s o l u t i o n .
estimate of is the valueof the d e n s i t y at observedtemperature t.
This approximation is s u b s t i t u t e d into the r i g h t hand side of the equation
to o b t a i n a secondvalueapproximation.This process of s u b s t i t u t i n g i n t o
the r i g h t hand side of the equation and estimating a new v a l u e f r o m the
other is repeated u n t i l two m n s e c u t i v e r e s u l t s are i n agreement &I the

|||| |||---
desired degree of accuracy.Insubroutine TAE35B, a mnvergedsolution is

|
Kg/m 3 i n two

|||| |||| || || |
reached when the change i n d e n s i t y is less than O .O5
successive passes. If the computed valueof the 60 OF API g r a v i t y is not

|||| |||| | | ||
on the same curve as the &served API g r a v i t y , the parameters KO and
K 1 used to determine the cmefficient of thermal expansionrmst be

|
|
redefined and the mnvergencetechnique repeated. A s t r a i g h t l i n e

| | |
--
i n t e r p o l a t i o n is used tn connect the jet fuel curve w i t h the g a s o l i n e
curve when the s o l u t i o n is between 48 and 52 O A P I . When this occurs, the
c o e f f i c i e n t of thermal expansion is defined as :
2
c1 = A + B /p60
60
where A = -.O0186840 (as of May 1, 1980)
(as of May 1, 1980)
B = 1489.0670
I n this case, the tolerance i s increased &I O .O7 Kg/m
3
.
A f u l l e x p l a n a t i o n of the equations and the values of the parameters
KO and K 1 may be fouml i n API Standard 2540, TABLE 6 , 11.1.6.

11.1.5.5.5
Examples

These examples are t u t o r i a l i n nature and are mt intended to be s u f f i -


cientforsubroutinecheckout. The examplesgivenin the Implementation
Procedure, Section 11.1. 5.6, are f33 be used f o r the amputer checkout.

Exanple 1

API = 30.52 (observed w i t h a glass hydrometer)


DEGF = 248 .O
IHyDIio= o

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
X-38 CHAFTER1 PHYSICAL
DATA
PROPERTIES

CALL W 5 B (API ,DEGF,IHM€O,AP160 ,IFLAG)

After the call : AFT = 30.5


DEGF = 248 .O
IHyDrn = o
API60 = 18.4
IFLZX; = O

Example 2

API = 81.0 (observed w i t h a glass hydrometer)


DEGF = 184 .O

|||| |||---
IHYDw3= o

|
|||| |||| || || |
CALL ?aB5B (API ,DM;F,IHYDFO,APIGO ,IJ?LAG)

|||| |||| | | ||
After the call: API = 81.0
= 184 .O

|
DEGF

|
| | |
1mm= o

--
W160 = 62.6
IF= = 1

Example3

API = 43.0 (observed w i t h a glass hydrometer)


DEGF = 273 .O
MyDm= o

CALL PiB5B (API,DEGF,IHYDFO,AI60 ,I-)

After the call : API = 43.0


DEGF = 273 .O
IHYDrn = o
W160 = -99.9
IFLAG = -1

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL-L VOL*X 80 m 0 7 3 2 2 9 00 5 2 5 9 0 5 636 m

SECTIONVOLUME CORRECTION
FACTORS x-39

11 .I .5 .S .6 FLOWCHART

I INPUT:
API
GRAVITY
OBSERVED TEMPERATURE I
I ROUNO INPUT DATA
TO SPECIFICATIONS I

|||| |||---
|
|||| |||| || || |
SET
STATUS FLAG -1
OF
BOUNDS No W A N D API GRAVITY AT 60.F a -99.9
RETURN

|||| |||| | | ||
|
|
| | |
I CALCULATEDELTA T I

--
I CONVERT API GRAVITY TO DENSITY 1
i

J YES

I COMPUTE
HYDROMETER CORRECTION I

APPLY
HYDROMETER CORRECTION TO DENSITY

vI N I T I A L I Z E 60'F DENSITY

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
X-40 CHAPTER 11"PHYSICAL PROPERTIES DATA

|||| |||---
|
|||| |||| || || |
|||| |||| | | ||
I ICALCULRTE NEM 60.F DENSITY I

|
|
| | |
NO

--
NO
m nra
SET
STATUS
FLAC
npx GRAVITY AT W F
RETURN
-
-1
-99.9

REPEAT CONVERGENCESCHEME
YES
ON STRAXCHT HITH RE-DEFINED nLPHn

<> AAPI I N
EXTRAPOLATED
REC I ON

SETSTATUSFLAC
YES SETSTATUS FLAC
RETURN
= 1

RETURN

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*ll-l V O L * X 80 m 0732290 0525907 409

SECTIONVOLUME
FACTORS
CORRECTION X-41

11.1.5.5.7 SubroutineListing

TAE35B This subroutine accepts API g r a v i t y and the cbservation


temperature and determines the mrresponding API g r a v i t y at
60 O F for Generalized Products.

Referenced Modules

ALF5B This module c a l c u l a t e s the c o e f f i c i e n t of thermal expansion


needed to determine a volme c o r r e c t i o n factor.

DIV5B This module is designed to produce additional accuracy froman


integer divide.

MFT5B This module is designed to produce additional accuracy f r o m an


integer mltiplication.

RH05B This module uses an API g r a v i t y to c a l c u l a t e a density value.

VCF5B This module c a l c u l a t e s a wlme c o r r e c t i o n f a c t o r .


--
| | |
|
|
|||| |||| | | ||

SUBROUTINE TAB5B(API,DEGF,IHYDRO,API6O,IFLAG) 5B00001 O


C 5B000020
|||| |||| || || |

C (C) COPYRIGHT 1 9 8 0 58000030


C AMERICAN PETROLEUM INSTITUTE 56000040
C ALLRIGHTS RESERVED 56000050
5B000060
|

C
|||| |||---

C T H I S SUBROUTINE I S A VOLUNTARYSTANDARDAND WAS DEVELOPED 5B000070


C UNDER THE AUSPICES OF THE JOINTAPI-ASTM COMMITTEE ON STATIC 5B000080
C PETROLEUM MEASUREMENT I N PART FROM DATAGENERATED BY A 5B000090
C PROJECT FUNDED BY THE AMERICAN PETROLEUM INSTITUTE AT THE 5B0001 O0
C U . S . NATIONAL BUREAU OF STANDARDS, GAITHERSBURG, MARYLAND. 5 8 0 0 0 1 1O
C 580001 20
C INQUIRIES CONCERNING I T SA P P L I C A T I O N SHOULD BE ADDRESSED TO: 580001 30
C 580001 4 0
C AMERICAN PETROLEUM INSTITUTE 580001 50
C MEASUREMENT COORDINATION 560001 60
C 2 1 0 1 L STREET,
N.W. 580001 70
C WASHINGTON, DC 2 0 0 3 7 580001 8 0

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API MPMS*LL.L V O L X X 80 0732290 0525908 345 m

X-42 CHAPTER 1 PHYSICAL PROPERTIES


DATA

C 580001 90
C * * x< * * * 0 * x< S >x 0 * * * o x< * >x << * >:< * * >> x< * ,>* >:c * 0 * 4 <c * * * >:< * * >c: * * 8 >> * ><: <c >c: <c >> xc x<x< ,x >> ,x * * ,:<* 5 8 0 0 0 2 0 0
;(i

x<
C * 58000210
C * T H I S SUBROUTINE OR THE MATHEMATICAL RELATIONSHIPS x' 5 8 0 0 0 2 2 0
C * REPRESENTED THEREBYMAY BE USED BY ANYONE WISHING * 58000230
C * DO TO SO, BUT THE AMERICAN PETROLEUM INSTITUTE, THE * 56000240
C * AMERICAN SOCIETY FOR TESTING AND MATERIALS, THE AND 58000250
C * INSTITUTE OF PETROLEUM AND THEIR RESPECTIVE MEMBERS AND * 5B000260
C * THE U . S . NATIONAL BUREAU OF
STANDARDS, SHALL NOT BE HELD 'R 5 8 0 0 0 2 7 0
C * RESPONSIBLE OR L I A B LIEN ANY WAY FROM LOSS OR DAMAGE, * 58000280
C * INCLUDING, BUT NOT L I M I T E D TO, CONSEQUENTIAL DAMAGE, '$ 58000290
C * RESULTING FROM SUCH USAGE OR FOR VIOLATION OF ANY FEDERAL, 58000300
C * STATE, OR MUNICIPAL LAWS, REGULATIONS OR PRACTICES OF THE * 58000310
C * UNITED
STATES ANY
OR OF FOREIGN COUNTRY. *' 5 8 0 0 0 3 2 0
C * * 58000330
--

C *8*****~**+*<~<~8h***<~*<~**********o***********************x~*,x****** 5~000340
| | |

C 58000350
|
|

C PURPOSE 58000360
|||| |||| | | ||

C 58000370
C T H I S SUBROUTINE I S DESIGNED TO ACCEPT AS INPUT APIGRAVITY 58000380
C VALUE ( A P I ) AT OBSERVED TEMPERATURE (DEGF) I N DEGREES FAHRENHEIT58000390
|||| |||| || || |

C AND PRODUCE THECORRESPONDING A P I GRAVITY VALUE ( A P I 6 0 ) AT 58000400


C 6 0 DEGREES FAHRENHEIT FOR TABLE 5 8 , GENERALIZED PRODUCTS. 5B00041 O
C OF
USE
THE A GLASS HYDROMETER CORRECTION I S OPTIONAL. 58000420
|
|||| |||---

C 58000430
C EXTERNAL FUNCTIONS OR SUBPROGRAMS 58000440
C 58000450
Y58, CDIV56, ALF58, VCF5B 58000460
C FORTRAN
FLOAT, FUNCTIONS: 58000470 IABS
C 58000480
AMETERS
C DESCRIPTION OF 58000490
C 58000500
C A P I - A P I GRAVITY AT OBSERVED TEMPERATURE, NEAREST 0 . (1I N5) 8 0 0 0 5 1 0
C DEG F (PROGRAM WILL ROUND A P I THE NEAREST
TO 58000520
C 0 . 1 DEG A PRETURN IROUNDED
AND V A5 L8U0E0. 0) 530
C DEGF - OBSERVED TEMPERATURE, NEAREST 0 . 1 DEG F (5I 8
N0) 0 0 5 4 0
C (PROGRAM WILL ROUND DEGF
TO THE NEAREST 508. 10 0 0 5 5 0
C DEG RETURN
THE
F AND ROUNDED V A5L8U0E 00. )5 6 0
C IHYDRO - APPLICATION OF GLASS HYDROMETER CORRECTION 5 8( I0N0)0 5 7 0
C O - HYDROMETER CORRECTION I S TO BE MADE 58000580
C 1 - HYDROMETER CORRECTION I S NOT TO BE MADE 58000590
C API6O - CORRESPONDING A P I GRAVITY AT 6 0 DEGREES F (OUT) 58000600
C (ROUNDED TO NEAREST
THE 0 . 1 DEG5 A 80
P0I )0 6 1 O
C I F L A G - STATUS CODE 58000620 (OUT)
C O - INPUT AND CALCULATED RESULTS I N CORRELATION L I M I T S5 8 0 0 0 6 3 0
C 1 - INPUT OR CALCULATED RESULTS I N EXTRAPOLATED REGION 58000640
C - 1 - INPUT OF CALCULATED RESULTS NOT W I T H I N LIMITS OF 58000650
C CORRELATION 56000660
C BASE TEMPERATURE ( 6 0 5DEGREES 8 0 0 0 6 7 0F )
DATA IBASE / 6 0 0 / 58000680
C 58000690
C MAXIMUM A P OF I RANGE TABLE
5 8 0A0P0I 7)( 8
050
DATA NBP1 / 8 5 0 / 5 8 0 0 0 7 1O
C 5B000720
C BREAK POINTS FOR A P I RANGES ( 4 0 AND 50 A 5P8I )0 0 0 7 3 0
I BDATA
P2 IBP1, / 4 0 0 , 500 / 58000740
C 58000750
C MAXIMUM TEMPERATURES AT EACH BREAK POINT ( 3 0 0 , 2 5 0 , 2 0 0 )5 6 0 0 0 7 6 0

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*KLL-L VOL*X B O m 0732290 0525909 281 m

~
SECTIONV VOLUME
FACTORS
CORRECTION x-43

DATA ITMP1,
ITMP2,
ITMP3 / 3 0 0 02, 5 0 02, 0 0 0 / 58000770
C 58000780
C BEGINNING OF TEMPERATURE EXTRAPOLATIONS (250,200,150) 56000790
DATA I E P 1 I, E P 2 I, E P 3 / 2 5 0 02
, 0 0 01, 5 0 0 / 58000800
C 560008 1 O
C COEFFICIENTS FOR DIESELS,HEATINGOILS, AND FUEL O I L S 58000820
DATA KOF,
K1 F / 1 0 3 8 7 2 0 ,2 7 0 1 / 58000830
DATA NHIF / 370 / 56000840
C 58000850
C COEFFICIENTS FOR JETFUELS, KEROSENES, AND
SOLVENTS 58000860
DATA KOJ,K1 J / 3 3 0 3 0 1 0 , o / 58000870
DATA N L O J N
, HIJ / 3 7 1 , 500 / 58000880
C 58000890
C COEFFICIENTS FOR GASOLINES ANDNAPTHENES 58000900
DATA
KOG, K1G / 1 9 2 4 5 7 1 2
, 438 / 5800091 O
DATA NLOG / 501 / 58000920
C 58000930
C DENSITIES AT O AND 8 5A P I 58000940
DATA L I M l ,L I M 2 / 1 0 7 4 9 8 26, 5 2 9 3 4 / 58000950
C 58000960
C STRAIGHT LINE INTERPOLATION: ALPHA=A+B/(RHO”*2) 56000970
C FOR A P I4 8 - 52 56000980
DATA I N T 1 I, N T 2 / 4 8 05
, 20 / 58000990
DATA I A , I 8 / - 18 6 8 4 0 ,1 4 8 9 0 6 7 0 / 56001 O00
C 58001 O 1 O
C KONST OBTAINEDBYMULTIPLYING1415TIMES999012 58001 020
DATA
KONST / 1413601980 / 58001 030
C 58001 040
C UNIT 6 IS THE
OUTPUT U N I T .I F THE OUTPUT I S TO DIRECTED 58001050
C TO SOME OTHER U N I T , SET NOUT TO APPROPRIATE VALUE. 58001 060
NOUT = 6 58001 070
C 56001 080
C ROUND A P I TO NEAREST 0 . 1 58001 O90
I A P I = ( (API * 100) + 5 ) / 10 58001 1O0
A P I = FLOAT( I A P I ) / 1 0 . 0 5800111 O
C 58001 120
C ROUND TEMPERATURE TO NEAREST 0 . 1 58001 130
I F ( DEGF ) 1 2 0 0 , 2 0 , 20 58001 140
20 I T = ( (DEGF ‘‘ 1 0 0 ) 5 ) / 10 + 58001 150
DEGF = FLOAT( I T ) / 1 0 . 0 58001 160
C I S A P I LESS THAN ZERO ( I F YES, BRANCH
TO 1200) 58001 170
IF ( IAPI ) 1
424
00 0, , 58001 180
C I S A P I GREATER THAN 85 ( I F YES, BRANCH
TO 1200) 58001190
40 I F ( I A P I - NBP1 ) 50, 50, 1200 58001200
C I S A P I GREATERTHAN 40 ( I F YES, BRANCH
TO 70) 5800121 O
50 I F ( I A P I - I B P l ) 6 06,07,0 58001220
C I S TEMPGREATERTHAN 300 ( I F YES, BRANCH
TO 1200) 56001 230
60 I F ( I T - ITMP1 ) 1 0 01, 0 01, 2 0 0 58001 240
C I S A P I GREATER THAN 50 ( I F YES, BRANCH
TO 90) 58001 250
70 I F ( I A P I - I B P 2 ) 8 08,09,0 58001 260
C I S TEMPGREATERTHAN 250 ( I F YES, BRANCH
TO 1200) 58001 270
80 I F ( I T - ITMP2 ) 1 0 01, 0 01, 2 0 0 58001280
C I S TEMPGREATERTHAN 200 ( I F YES, BRANCH
TO 1200) 58001290
90 I F ( I T - ITMP3 ) 1 0 01, 0 01, 2 0 0 58001300
1 O0 CONTINUE 58001 3O 1
C 58001 320
IFLAG = O 330 56001

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I M P M S * L L = L VOL*X 80 0732290 0525930 TT3

X-44 CHAPTER 11-PHYSlCM PROPERTIES DATA

IDT = IT - IBASE 58001 340


C CONVERT
API DENSITY
TO 56001 350
CALL RHO56(IAPI,IRHOT) 58001 360
C 56001 370
C IS HYDROMETER CORRELATION TO BE USED (IF NO, BRANCH TO 112) 58001 380
IF ( IHYDRO ) 101, 101, 1 1 1 58001 390
C 58001400
CCOMPUTE HYDROMETER CONSTANTAT DELTA T 58001 41 O
C HYC = 1 . - .00001278*(DEGF-60) - . 0 0 0 0 0 0 0 0 6 2 * ( D E G F - 6 0 ) * * 2 56001 420
101 IRD = 50 58001430
I F (IDT) 105, 110, 110 58001440
105 IRD = -50 58001 450
110 IH1 = (127800 * IDT + IRD) / 100 56001 460
IH2 = (62 * IDT * IDT + 500) / 1000 56001 470
IHYC = 1000000000 - IH1 - IH2 56001 480
C 56001 490
C HYDROMETER
APPLY
CORRECTION TO DENSITY 58001 500
IRHO = IRHOT * 10 58001 51 O
CALL MPY56(IRHO,IHYC,IRHOT,lOOOO) 56001 520
IRHOT = ( IRHOT + 50 ) / 100 58001 530
C 58001 540
1 1 1 JRHOT = IRHOT * 10000 58001 550
C 56001 560
112 ICOUNT = O 56001 570
CIS APIINDIESELRANGE (0-37 API) (IF NO, BRANCH TO 120) 56001 580
IF ( IAPI - NHIF ) 115, 115, 120 58001 590
115 KO = KOF 58001 600
K1 = K1 F 56001 61 O
IREG = O 56001 620
GO TO 150 56001 630
C IS APIINJET RANGE (37.1-50 API) (IF NO, BRANCH TO 130) 58001 640
120 IF ( IAPI - NHIJ ) 125, 125, 130 56001 650
125 KO = KOJ 58001 660
K1 = K1 J 58001 670
IREG = 1 56001 680
GO TO 150 58001 690
C API IS IN GASOLINE REGION (50.1-85 API) 58001 700
130 KO = KOG 58001 71 O
K1 = K1G 5B001720
IREG = 2 56001 730
C 56001 740
150 ICOUNT = ICOUNT + 1 56001 750
C 58001760
IF (ICOUNT - 2) 160, 160, 400 58001770
C 58001780
160 IRHOGO = IRHOT 5B001790
C 58001800
KRHO = O 58001 O81
C 5B001820
NP = O 58001 830
C 58001 840
300 NP = NP + 1 58001 8 5 0
C 58001 860
CALL ALF5B(IRHOGO,KO,K1,IALF) 58001 870
C 58001 880
CALL VCF56(IALF,IDT,IVCF) 58001 890
C 58001 900
IVCF = ( IVCF + 5 0 ) / 100 58001 91 O

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I NPflS*LL=L V O L * X 80 H 0732290 0 5 2 5 9 3 3 93T m

SECTIONI VOLUME CORRECTION FACTORS X-&

C 58001 920
CALL DIV5B(JRHOT,IVCF,IRH060,1000) 58001 930
C 58001 940
I F ( I A B S (IRHOGO - KRHO ) - 50 ) 500, 3 2 03, 2 0 58001 950
C 58001 960
320 KRHO = IRHOGO 58001 970
C 58001 980
IRHOGO = ( IRHOGO + 5 ) / 10 58001 990
C 58002000
I F ( NP - 20 ) 3 0 0 1, 1 5 0 1, 1 5 0 5800201O
C 58002020
C STRAIGHT LINE
INTERPOLATION I S USED CONNECT
TO THE JET FUEL 58002030
C AND GASOLINE L I N E( S
48 - 5A2P I ) . ONLY
THE D E F I N I T I O N OF 58002040
C ALPHA I S CHANGED. ALPHA = A B / (IRH060**2) + 58002050
C 58002060
400 KRHO = O 58002070
NP = O 58002080
ICOUNT = 3 58002090
C FIRST GUESS I S DENSITY AT 50 A P I 580021 O0
IRHOGO = 7 7 8 8 4 580021 1 O
C 58002120
440 NP = NP 1 + 5B002130
CALL DIV5B(IB,IRHO6O,IRES,lOOOO) 580021 40
IRES = I R E1S0 58002150
CALL DIV5B(IRES,IRHO6O,IRES2,10000) 58002160
IRES2 = ( I R E S 2 +
5) / 1 0 580021 70

|||| |||---
IALF = ( I A IRES2 + 5) / 1 0+ 58002180
C A L LV C F 5 B ( I A L F , I D T , I V C F ) 580021 90

|
IVCF = (IVCF +
50) / 1 0 0 58002200

|||| |||| || || |
CALL DIV5B(JRHOT,IVCF,IRH060,1000) 5 8 0 0 2 2 1O
C 58002220
I F ( IABS(IRHO6O - KRHO) - 70 ) 5 0 0 , 460, 460 58002230

|||| |||| | | ||
C 58002240
460 KSAV = KRHO 58002250
KRHO = IRHOGO 58002260

|
IRHOGO = ( I R H 0 6 0 + 5) / 1 0

|
58002270

| | |
I F ( NP -
4 0 ) 4 4 04, 8 04, 8 0 58002280

--
C 58002290
C RESTRICTING DENSITY (IRHOGO) THREE
TO DECIMAL PLACES MAY 58002300
C CAUSE
THE
CONVERGENCE TECHNIQUE REACH
TO A STATIONARY 5800231O
C POINT BEFORE TOLERANCE REACHED. THE
AVERAGE
THE
UPPER
OF 58002320
C AND
LOWER BOUNDARIES IS A SATISFACTORY SOLUTION. 58002330
C 58002340
C AVERAGE LAST TWO PASSES 58002350
C 58002360
480 IRHOGO = ( KRHO +
KSAV ) / 2 58002370
C 58002380
C I S RH060 GREATER THAN
UPPER L I M I (TI F YES, BRANCH
TO 1200) 5B002390
500 I F ( IRHOGO - L I M l ) 5 1 05, 1 01, 2 0 0 58002400
C I S RH060LESS THAN LOWER L I M (I ITF YES, BRANCH
TO 1200) 5800241O
510 I F ( IRHOGO - L I M 2 ) 1200, 5 2 05, 2 0 58002420
C 58002430
520 IRHOGO = ( (IRHO60 +
5) / 1 0 ) 58002440
IAPIGO = KONST / IRHOGO - 1 3 1 5 0 58002450
C 58002460
IAPIGO = ( IAPIGO +
5 ) / 10 58002470
API6O = F L O A T ( I A P I 6 0 ) / 1 0 . 58002480
C 58002490

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
X-46 CHAPTER
DATA
PROPERTIES
1 I-PHYSICAL

I F (ICOUNT - 36
) 0 07, 2 07, 2 0 58002500
C 5800251 O
600 I F (IREG - 1 ) 6 1 0 6 , 206 , 40 58002520
C I S API6O ABOVE DIESEL REGION ( I F YES, BRANCH
TO 125) 58002530
610 I F ( I A P I 6 O - N H I F ) 6 8 06, 8 01, 2 5 58002540
C I S API6O ABOVE JET REGION ( I F YES, BRANCH
TO 130) 58002550
620 I F ( IAPIGO - N H I J ) 6 3 06, 8 01, 3 0 58002560
C I S API6O BELOW JET REGION ( I F YES, BRANCH
TO 115) 58002570
630 I F ( IAPIGO - NLOJ ) 1 1 56, 8 06, 8 0 58002580
C I S API6O BELOW GASOLINE REGION ( I F YES, BRANCHTO 125) 58002590
640 I F ( IAPIGO - NLOG ) 1 2 56, 8 06, 8 0 58002600
C 5800261O
680 CONTINUE 58002620
C 58002630
C I F IAPIGO GT 479 AND I A P I 6L5O T
21, USE STRAIGHT LINE 58002640
C AI PSI GREATER THAN 4 8( I. F 0 YES, BRANCH
TO 690) 58002650
I F ( IAPI6O - INT1 ) 7 2 04, 0 06, 9 0 58002660
C ( I5F2. L. 0E
A .P I I S YES, BRANCH
TO 400) 58002670
690 I F ( I A P I 6 O - I N T 2 ) 4 0 04, 0 07, 2 0 58002680
C 58002690
C A P II S GREATER
THAN 40 ( I F YES, BRANCH TO 790) 58002700
720 I F ( I A P I - I B P 1 ) 7 8 07, 8 07, 9 0 5800271O
C ISGREATER
THAN
TEMP 250 ( I F YES, BRANCH TO 830) 58002720
--

780 I F ( I T - I E P l ) 8 2 08,2 08,3 0 58002730


| | |

C A P II S GREATER
THAN 50 ( I F YES, BRANCH TO 810) 58002740
|

790 I F ( I A P I - I B P 2 ) 8 0 08, 0 08, 1 0


|

58002750
|||| |||| | | ||

C ISGREATER
THAN
TEMP 200 ( I F YES, BRANCH TO 830) 58002760
800 I F ( I T - I E P 2 ) 8 2 08,2 08,3 0 58002770
C ISGREATER
THAN
TEMP 150 ( I F YES, BRANCH TO 830) 5B002780
|||| |||| || || |

810 I F ( I T - I E P 3 ) 8 2 0 8, 2 0 8, 3 0 58002790
820 CONTINUE 5B002800
RETURN 5800281 O
|
|||| |||---

C SET SWITCH INDICATING EXTRAPOLATED REGION 58002820


8 3 0I F L A G = 1 58002830
RETURN 58002840
C 5B002850
1150WRITE(NOUT.6020) DEGF. A P I 58002860
6020 FORMAT(5Hl AT , F 5 . 1 , 1 5 H DEGREES F AND , F 5 . 16, 6 H DEGREES A P IA, 5 8 0 0 2 8 7 0
1 CORRESPONDING A P I AT 60 F COULD BE
NOT DETERMINED. ) 58002880
C 58002890
C SET SWITCH INDICATING OUTSIDE OF RANGE TABLE
5 8 0 05289 0 0
1200 = -1 5 8 0 0 2 9 1O
APIGO = - 9 9 . 9
RETURN 58002930
END 58002940

SUBROUTINE RHOSB(IAP1,IRHO) 58002950


58002960
T H I S SUBROUTINE I S DESIGNED TO CALCULATEA DENSITY 58002970
VALUE FOR A GIVEN VALUE OF A P I BY THE
FORMULA 58002980
RHO=141 . 5 * 9 9 9 . 0 1 2 / ( A P I + 1 3 1 .5) 58002990
I T I S ASSUMED THAT THE A P I VALUE HAS BEEN ROUNDED 58003000
TO THENEAREST TENTH DEGREE A P I AND THE VALUE MULTIPLIED 5 8 0 0 3 0 1O
BY 1 0 . THE OUTPUT VALUE OF RHO WILL BERETURNED 58003020
ASAN INTEGER AND ROUNDED TO THE NEAREST
HUNDREDTH 58003030
KILOGRAM/CUBIC METRE. 58003040

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL.L VOL*X 80 0732290 0525933 702 m

SECTION
I-VOLUME
FACTORS
CORRECTION x-47
--

C 56003050
| | |

C THE VALUE 1 4 1 3 6 0 1 9 8 0 REPRESENTS 1 4 1. 5 * 9 9 9 . 0 1 2 * 1 0 0 0 0 58003060


|
|

C CORRECT
TO 1 0D I G I T S 56003070
|||| |||| | | ||

IDENOM=IAPI+1315 58003080
IRHO=(1413601980/IDENOM+5)/10 58003090
RETURN 580031 O0
|||| |||| || || |

END 580031 1 O
|
|||| |||---

SUBROUTINE DIV5B(INUM,IDENOM,IRES,ISCALE) 5B003120


C 5B003130
C T H I S SUBROUTINE I S DESIGNED TO PRODUCE ADDITIONAL 5B003140
C ACCURACY FROM
AN INTEGER D I V I D E WHERETHE
NUMERATOR 5B003150
C I S ISCALE GREATER THAN THE DENOMINATOR. THESUBROUTINE 5B003160
C ASSUMES PROPER SCALING OF BOTH THE INPUT NUMERATOR 580031 70
C AND DENOMINATOR AND WILL RETURNTHE RESULTS MULTIPLIED 58003180
C BY ISCALE. 580031 90
C 58003200
IRES1 =INUM/IDENOM 5 8 0 0 3 2 1O
IRES2=(INUM-IRES1*IDENOM)*ISCALE/IDENOM 58003220
IRES=IRESl "ISCALE+IRES2 58003230
RETURN 58003240
END 56003250

SUBROUTINE A L F 5 B ( I R H O , K O , K 1 , I A L F ) 58003260
C 58003270
C T H I S SUBROUTINE I S DESIGNED TO CALCULATE ALPHA FOR 58003280
C USE I N DETERMINATION OF VOLUME CORRECTION 56003290
C FACTOR. ALTHOUGH ALL CALCULATIONS ARE DONEAS INTEGERS, 58003300
C THE SUBROUTINE RETURNS WITH A8 D I G I T VALUE 5800331 O
C 58003320
C INPUTVARIABLES 58003330
C IRHO=DENSITY*lOO(KILOGRAMS/CUBIC METRE) 58003340
C KO,K1=COEFFICIENTS OF DESIRED CURVE * 1 0 0 0 0 58003350
C 58003360
C ALGORITHM- 58003370
C ALPHA=KO / RHO':' * 2+K1 /RHO 58003380
C 58003390
C CALCULATEK1 /RHO 58003400
C 5600341 O
INUM=Kl x' 1 O000 58003420
CALL DIV56(INUM,IRHO,IALFl,lOOOO) 58003430
C 58003440
C CALCULATE KO/RHO**2 58003450
C 5B003460
INUM=KO*l O0 58003470
CALL DIV5B(INUM,IRHO,IALFS,lOOOO) 58003480
CALL DIV5B(IALFS,IRHO,IALF2,10000) 58003490
I A L F = ( I A L F l + I A L F 2 + 5 0 0) / l o 0 0 58003500
RETURN 5800351 O
END 58003520

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
SUBROUTINE V C F 5 B ( I A L F , I D T , I V C F ) 56003530
C 56003540
C T H I S SUBROUTINE I S DESIGNED TO CALCULATE VOLUME 58003550
C CORRECTION FACTOR. ALTHOUGH ALL CALCULATIONS ARE DONE 56003560
C AS INTEGERS, THE SUBROUTINE RETURNS WITHA 8 56003570
C OR 9 D I G I T VALUE DEPENDENT UPON
WHETHER IDT 56003580
C I S POSITIVE OR NEGATIVE. 56003590
C 58003600
C ALGORITHM- 5600361O
C VCF=EXP(-ALPHA*DT(l.O+0.8*ALPHA*DT)) 56003620
C 56003630
C CALCULATE ALPHA*DT 58003640
C 56003650
ITERMl=IALF*IDT 56003660
C 56003670
C CALCULATE O.B*ALPHA*DT 58003680
C 56003690
ITERM2=ITERMl/ 5 * 40 56003700
C 5800371O
C CALCULATE EXPONENT-ALPHA*DT(l.O+0.8*ALPHA*DT) 58003720
C 56003730
CALL MPY58(ITERM1,ITERM2,ITERM3,1000) 56003740
ITERM3 = ( ITERM3 +
500 ) / 1000 56003750
I X = -1TERMl - ITERM3 56003760
C 5B003770
C CALCULATE EXPONENTIAL(F1RST 7 TERMS
OF
POWER SERIES) 58003780
C 56003790
ISUMl=l OOOOOOOO+IX 56003800
CALL M P Y 5 6 ( I X , I X , I S U M 2 , l O O O ) 5 8 0 0 3 8 1O
ISUM2=((ISUM2+50)/100)/2 56003820
CALL MPY56(1X,ISUM2,ISUM3,1000) 56003830
ISUM3=((1SUM3+50)/100)/3 56003840
CALL MPY56(IX,ISUM3,ISUM4,1000) 58003850
ISUM4=((ISUM4+50)/100)/4 56003860
CALL MPY56(IX,ISUM4,ISUM5,1000) 58003870
ISUM5=((1SUM5+50)/100)/5 56003880
CALL MPY5B(IX,ISUM5,ISUM6,1000) 58003890
ISUM6=((1SUM6+50)/100)/6 58003900
IVCF=ISUM1+ISUM2+ISUM3+ISUM4+ISUM5+ISUM6 5600391O
RETURN 56003920
END 56003930

SUBROUTINE M P Y 5 6 ( I X , I Y , I Z , I S C A L E ) 58003940
C T H I S ROUTINE PERFORMS INTEGER MULTIPLICATION. THE TOTAL 56003950
C NUMBER OF D I G I T S I N I X AND I Y MUST NOT EXCEED 1 7 . OTHER 58003960
C WISE, OVERFLOW W I L L OCCUR. 56003970
C 56003980
I U 1 = I X / ISCALE 56003990
K1 = ISCALE * I U 1 56004000
IV1 = I X K1 - 5600401O
I U 2 = I Y / ISCALE 56004020
K2 = ISCALE * I U 2 56004030
I V 2 = I Y - K2 56004040
K3 = I U 1 * I V 2 +
I U 2 * I V 1 + I V 1 * I V 2 / ISCALE 58004050
I 2 = (K3 +
I S C A L E / 2 ) / ISCALE IU1 * IU2 + 56004060
RETURN 56004070
END 58004080

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL.L VOL*X B O m O732290 0525935 5 8 5 m

SECTION1"VOLUME CORRECTION
FACTORS x-49

11.15 6 IMPLEMENTATION PROCEDUREFOR SUBROUTINE TABSB

Theuse of the aonputer has gained widespread acceptance m w b u t the


petroleum industry. Computers are used for accounting plrposes, i n
process s i m l a t i o n and n-deling, data r e t r i e v a l and evaluation, and are
now being used extensively in custody transfer masurements and trans-
a c t i o n s .I n 1968, the American Petroleum Instituterecognized the need
for i n c o r p o r a t i n g e x i s t i n g petroleum masurement tables i n t o computer

|||| |||---
code. In June of 1973, a subroutine for TABLE 6 , Volume Reduction to 60 OF,

|
m y of the otherstandardized ptroleum

|||| |||| || || |
w a s made available.Sincethen
measurement tables havebeen made a v a i l a b l e as mmputer subroutines.

|||| |||| | | ||
However, the m n p u t e r i z a t i o n of an e x i s t i n g table of numbers proved to be

|
a v e r yd i f f i c u l t For instance, it p v e d to be impossible to use

|
task.

| | |
the mathematical expression that w a s supposedly used to generate the table

--
v a l u e s and c a l c u l a t ev a l u e si d e n t i c a l to the t a b u l a r e n t r i e s . This w a s
because some of the v a l u e s e n t e r e d i n t o the tables had been s l i g h t l y
modified and also because the procedures used to round the c a l c u l a t e d
values were inconsistent.

The only way to Overcome these problems i n a computer subroutine was to


manually locate all the table e n t r i e s that did rnt agree w i t h the calculated
values and add extensive"exception tables" to the d e . ?his made the d e
lengthy andsomewhat cLsnbersome to modify and t
a some e x t e n t restricted its
use to larger mnputing systems.

The w r k i n g group for TABLE 6 r e v i s i o n r e a l i z e d the importance of elimi-


n a t i n g any p o t e n t i a l for such problems in the f u t u r e and also recognized
t h e E e d to have m m t e r subroutines available a t the time the n e w
petroleum measurement tables were released. The -king group decided to
o u t l i n e an explicit inplementation procedure to l
x followed when using the
new c o r r e l a t i o n for volume c o r r e c t i o n factors. This implementation
procedure wuld then be the Standard rather than a set of equations or set
of tables. Standardization of an irrplementation procedure implies
s t a n d a r d i z a t i o n of the set of mathematical expressions used within the

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
X-50 CHAPTER
DATA
PROPERTIES
1 I-PHYSICAL

mnguter code. Absoluteadherence tm the outlinedprocedure w i l l insure


that all mnputers and computer code of the future, meeting the stated
s p e c i f i c a t i o n s and r e s t r i c t i o n s , w i l l be able to produceidentical
results. Such a procedure allows f o r the maximum machine and code
independence.

The inplementationprocedure as described i n the following t e x t can by


c a r e f u l and deliberate application of numerical analysis be followed
through the majority of language and word s i z e s i n p r e s e n t and a n t i c i p a t e d
use. To follow the standardprocedure means absolute and unwavering
adherence to the n u h e r of d i g i t s s p e c i f i e d at each step and to the
c a l c u l a t i o n a l procedure as outlined.

I n the procedure, the m m e n c l a t u r e d i g i t s (xxX.XX) means mathematically


s i g n i f i c a n t d i g i t s as defined in ASTM E380-76. I n the previous example,
a l l f i v e ( 5 ) d i g i t s i n the p a r e n t h e s i s are mathematically significant.

A t various steps i n the implementation procedure, c a l c u l a t e d r e s u l t s are


rounded or truncated. When rounding a r e s u l t to fewer digitsthanthe
total n u h e r a v a i l a b l e , the followingprocedure which was used overrides
that of ASTM E380-76:

a ) when the first d i g i t to be discarded is less than 5, the last d i g i t


r e t a i n e d is mt changed.
b) when the first d i g i t to be discarded is greater than 4 , the last
digitretained is increased by one unit.

The procedure used i n t r u n c a t i n g a r e s u l t tm fewer d i g i t s than the total


number a v a i l a b l e is to simply discard all d i g i t s f o l l o w i n g the last d i g i t
to be r e t a i n e d and leaving the last r e t a i n e d d i g i t unchanged.

Another s p e c i f i c a t i o n i s that the c o e f f i c i e n t s used to relate the thermal


expansion coefficient a t 60 OF to the 60 O F d e n s i t y base and all o t h e r
c o n s t a n t s needed i n the mrrelation mst be used to e x a c t l y the number of
d i g i t s speci f ied .
-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL.L VOL*X 8 0 m 0732290 0525937 358 m

SECTIONVOLUME CORRECTION
FACTORS X-51

Calculation Procedure

Step 1: Round inputvariables


a ) Round API g r a v i t y to nearest 0.1
API = XXX .X rounded
b ) Round &servedtemperature to nearest 0.1
T = =.X rounded

Step 2: Calculatedifferencein&servedtemperature and


basetemperature
BASE TEMPERATURE = 60 .O
DELTA = W . X - 60.0 = XXX.X

Step 3 : Compute hydrometer a x r e c t i o n term ( o p t i o n a l )


HYC = 1.0 -.00001278*DELTA - .0000000062*DELTA2
TERM1 = .00001278*DELTA = .OOXXXXXXX rounded
TERM2 = .0000000062*DELTA2 = .OOOXXXXXX rounded
HYC = 1.000000000 - .ooxxxxxxx - .oooXX>CXXX = x.xxXXXXm

Step 4: Convert API g r a v i t y to density, Kg/m3


RHO = (141.5*999.012)/(131.5+API)
RHO = 141360.1980/XXX.X = XXXX.XX rounded

Step 5A: Application of hydrometer m r r e c t i o n


F"= RHO*HYC = W. X rounded
X

Step 5B: I n i t i a l i z e 60 OF density


RH060 = RHcrr = XXXX.XX

Step 6A: Calculate ooefficient of thermalexpansion


ALPHA = Ko/RH06O2 + K1/mØ60
KO = xxxX.XXXX
K1 = .xx)(x
TERMl = Ko/RHOGO = X.XXXXXXX truncated
T m 2 = TERM1/RHO60 = . O O m truncated
-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I M P M S * 3 3 ~ 3 V O L X X 80 m 0 7 3 2 2 9 00 5 2 5 9 3 8 294 m

X-52 CHAPTER
1 PHYSICAL PROPERTIES
DATA

TERM3 = K1/RHO60 = . O O m truncated


ALPHA = TERM2 + TERM3 = .oooxxxx rounded

|||| |||---
|
|||| |||| || || |
Step 6B: Calculation of ALPHA for straight line segment
ALPHA = A + B/RH0602

|||| |||| | | ||
A = -r00186840 (as of May 1, 1980)
(as of May 1, 1980)
B = 1489.0670

|
|
TERMl = B/W060 = X.xxx>uM truncated

| | |
TERM2 = TERMl/RH060 = X
.X
XXX
XX
roundedX

--
ALPHA = A + TERM2 = .OOOXXXX rounded

Step 7: Calculate volume correctionfactor


VCF = EN?( -ALPHA*DELTA - O. 8*ALpHA2*DELTA2)
a ) calculate exponent
TERM1 = ALPHA * DELTA = .IMXXXXXX truncated
TERM2 = 0.8 * TERMl = M
.CXXXXXX truncated
TERM3 = l " l * "2 = X .XXXXXXX rounded
TERM4 = - TERMl - TERM3 = X.XXXXXXX
b) calculate exponentia1
VCF = Mp(TERM4) = X.XXXXXX rounded
( M u s t use at least the first seven tem of
the power series expansion. )

Step 8: Calculate 60 O F density


RHO60 = RHOT/VCF = XXXX.XXX truncated

Since the equation for p cannot be solved explicitly, a successive


60
approximation iterative scheme is used to obtain a solution. The i n i t i a l
estimate of pG0 is the value of the density a t observed tanperature t.
This approximation is substituted into the right hand side of the equation
to obtain a second valueapproximation. This process of substituting into
the right hand side of the equation and estimating a new value f r m the
other is repeated until tm consecutive results are i n agreemnt to the
desired degree of accuracy. In subroutine TABSB, a converged solution is
reached when the change in density is less than O. 05 Kg/m' in t
w

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL-L V O L * X 80 m 0732290 0525939 L20 m

SECTION 1-VOLUME CORRECTION FACTORS x-53

successive passes. I f the mputed v a l u e of the 60 OF API g r a v i t y is n o t


on the same curve as the observed API g r a v i t y , the paramters KO and
K1 used to detennine the c o e f f i c i e n t of thermal expansion must be
redefined and the convergence technique r e p t e d . A s t r a i g h t l i n e
i n t e r p o l a t i o n is used to connect the jet f u e l curve w i t h the gasoline
curve when t h e s o l u t i o n is between 48 and 52 OAPI. When this occurs, the
c o e f f i c i e n t of thml expansion is defined as:
2
c1
60 = A + B /ps0
where A = -.O0186840 (as of May 1, 1980)
B = 1.489.0670 (as of May 1, 1980)
In t h i s case, the t o l e r a n c e is increased to 0.07 Kg/m
3
.
The 1980 i n t e g e r FOIiTRAN code issued by API c o n t a i n both an i n t e g e r
d i v i s i o n and an integer rmltiplication algorithm. A d e s c r i p t i o n of each
follows.

INTEGER MULTIPLICATION PROCEDURE


(For 32 B i t Arithmetic)

DATA DEFINITION
X,Y are i n t e g e r n m n k r s t h a tare equal to or less than 2*109 ( s l i g h t l y
less than 231) .
A l a r g e r v a l u e may cause overflow. I n a d d i t i o n , t h e
total n m k r of d i g i t s i n X and Y must not exceed 17, otherwise overflow
w i l l occur. 2 is the product (X*Y) s c a l e d by 10-8, i.e. 2 = (X*Y) /lo8.

Note: I f it is d e s i r a b l e to o b t a i n maximum p r e c i s i o n , X and Y may be


s c a l e d up p r i o r to use oftheprocedure.Typically, a t least 15 d i g i t s
are needed i a obtain 6 digitprecision,16for 7 and 17 f o r 8 . The
largest value of X and Y t h a t m y be used are 2 O00 O00 O00 and
99999 999. (Either values may be used f o r X and Y) .
-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API M P M S * L L - L V O L * X 80 m 0732290 0525920 942 m

x-54 CHAPTER DATA


1 PHYSICAL PROPERTIES

CALCULATION
x/10000 = u1
10000 * u1 = K1
X-K1 = V1
Y/10000 = u2
10000 * U2 = K2
Y-K2 = V2
(Ul*V2) + (U2*V1) + (Vl*V2/10000) = K3
(K3 + 5000)/10000 + Ul*U2 = Z

Note : 2 has been scaled by 10-8 and may have to be rescaled before use.

TOTAL DIGITS IN X AND Y 12 13 14 15 16 17


DIGITS IN PKXXJCII, Z 3-4 4-5 5-6 6-7 7-8 8-9

INTEGER DIVISION PFUXEIWRE


(For 32 B i t Arithmetic)

DATA DEFINITION
X,Y are i n t e g e r nmnbers such t h a t X is equal to or less than -1 and
Y is of orderofmagnitude 104 less than X.

R is the quotient of X / Y scaled by lo4, i.e. R = X/Y * lo4.

Note: If it is d e s i r a b l e to a b t a i n maximum p r e c i s i o n , X and Y may be scaled


up prior to use of the procedure.Typically, the mre d i g i t s t h a t are
c a r r i e d in both X and Y, the more a c c u r a t e d i g i t s cn output.

CALCULATION
x/Y = u1
U l " Y = K l
x-Kl=m
v l / Y = u2
U1 * 10000 + U2 = R

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL.L VOL*X 80 0732290 0525921 889

SECTIONVOLUME
FACTORS
CORRECTION x-55

Note: R hasken scaled by lo4 and may need to k r e s c a l e db e f o r e use.


Examples f o r C h e c k o u t

Thefollowingexamples illustrate how theimplementationprocedure is


actuallyused b d e t e r m i n et h ev a l u eo f an API g r a v i t y a t 60 OF f o r
G e n e r a l i z e dP r o d u c t s . The e x a m p l e sc a r r yt h ea m p u t a t i o n st h r o u g he a c h step
oftheprocedureshowing the r e s u l t so fe a c hm a t h e m a t i c a lo p e r a t i o n , The
computedvalues are g i v e n to t h er e q u i r e dp r e c i s i o n and it is i n d i c a t e d if a
v a l u e has beenrounded or t r u n c a t e d . T h es t e p - b y - s t e pc a l c u l a t i o n s are
shown f o r t h e f i r s t i t e r a t i o n t h e n a table is presentedwhichsumnarizesthe
i n t e r m e d i a t ev a l u e su s e d to o b t a i n a m n v e r g e d s o l u t i o n .

These examples are to be used as test cases f o r s u b r o u t i n e TAE55B to v e r i f y


t h e c m p u t e r code h a s not b e e n a l t e r e d or i n c o r r e c t l y r e p r o d u c e d . The
r o u t i n e has beendesigned to e x e c u t e cn m a c h i n e s t h a t use word s i z e o f
3 2 - b i t s or g r e a t e r . Any new developnent of a m p u t e r d e that is designed
to f o l l o w the standardimplementationprocedure must i n s u r e t h a t the v a l u e s
computed at each step i nt h ep r o c e d u r e are i d e n t i c a l to those g i v e n i n the
examples.

EXAMPLE 1

|||| |||---
S t e p 1: Round i n p u tv a r i a b l e s

|
|||| |||| || || |
a ) Round API g r a v i t y t
m nearest 0.1
API = 25. O rounded

|||| |||| | | ||
b) Round & s e r v e dt a n p e r a t u r e to n e a r e s t O .1
T = 130 .O rounded |
|
| | |

Step 2: C a l c u l a t ed i f f e r e n c ei no b s e r v e d temperature and base temperature


--

BASE TEMPERATURE = 60.0


DELTA = 130.0 - 60.0 = 70.0

Step 3 : Compute hydrometer mrrec t i o n term


HYC = 1.0 - .O0001278 * DELTA - .0000000062 * DELTA2
TERMl = .O0001278 * DELTA = .O00894600rounded
TERM2 = .0000000062 * DELTA2 = .O00030380 rounded
HYC = 1.000000000 -.000894600- .O00030380 = e999075020

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*11.1 VOL*X AO 0732290 0525922 715

X-56 CHAPTER
1 PHYSICAL PROPERTIES
DATA

Step 4: Convert APIg r a v i t y to d e n s i t y


RHO = (141.5 * 999.012)/(131.5 + AFT)
RHO = 141360.1980/156.5 = 903.26 rounded

Step 5A: m l i c a t i o n of hydrometer m r r e c t i o n


F"= RHO * HYC = 902.42 rounded

Step 5B: I n i t i a l i z e 60 OF density


RHO60 = RHOT = 902.42

Step 6A: C a l c u l a t e m e f f i c i e n t of thermal expansion


ALPHA = K0/RHO6O2 + K1/RH060
KO = 103.8720 (as of May 1, 1980)
K 1 = .2701 ( a s of May 1, 1980)
TE3"l = Ko/RH060
" l= .11510383 truncated
TERM2 = TEXMl/RHO60
TERM2 = .O001275501 truncated
TERM3 = K1/FW060
TERM3 = .O002993063 truncated
ALPHA = TERM2 + TERM3 = .O004269 rounded

Step 7: Calculate volume m r r e c t i o nf a c t o r


VCF = MP(-ALPHA * DELTA - O. 8 * ALPHA2 * DELTA2)
a ) Calculateexponent
TERMl = ALPHA * DELTA = .O2988300 truncated
TERM2 = 0.8 *
TERM1 = .O2390640 truncated
TERM3 = TERMl * TERM2 = .O0071439 rounded
TERM4 = " 4 1 - TERM3 = -.O3059739
b) Calculateexponential
VCF = Exp(TERM4) = .969866 rounded
(must use the first seven terms of the p e r series
expansion of ex)

Step 8: Calculate 60 OF density


RH060 = RHCV/KF = 930.458 truncated

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API MPMS*LL-L V O L * X 80 D 0732290 0 5 2 5 9 2 3 651 m

SECTIONV VOLUME
FACTORS
CORRECTION x-57

TABLE 1 shows the results of each i t e r a t i o n .

TABLE 1

ITERATION RHO60 (N) ALPHA VCF RH060( N+1)


1 902.42 .O004269 .969866 930.458
2 930.46 .O004103 .971047 929.326
3 929.33 .O004109 .971004 929.367

API60 = 141360.1980/929.37 - 131.5 = 20.6

EXAMPLE 2
Step 1: Round input variables
a ) Wund ApI g r a v i t y to nearest 0.1

|||| |||---
API = 35.O rounded

|
|||| |||| || || |
b) Round observedtemperature to nearest 0.1
T = 7.5 rounded

|||| |||| | | ||
Step 2: C a l c u l a t ed i f f e r e n c e in &servedtemperature and base

|
|
| | |
tenperature

--
BASE TEMPERATURE = 60.O
DELTA = 7.5 - 60.0 = -52.5

Step 3: Compute hydrometer m r r e c t i o n t e r m


2
HYC = 1.0 - .O0001278 * DELTA - .0000000062 * DELTA
TERM1 = .O0001278 * DELTA = -.O00670950 rounded
TERM2 = .0000000062 * DELTA2 = .O00017089 rounded
HYC = 1.000000000 + .O00670950 - .O00017089 = 1.000653861

Step 4: Convert -1 g r a v i t y to d e n s i t y
RHO = (141.5 * 999.012)/(131.5 + API)
RHO = 141360.1980/166.5 = 849.01 rounded

Step SA: Application of h y d r m t e r correction


RHOT = RHO * HYC = 849.57 rounded

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
x-58 CHAPTER
1 PHYSICAL PROPERTIES
DATA

Step 5B: I n i t i a l i z e 60 O F density


RH060 = RHOT = 849.57

Step 6A: Calculate e f f i c i e n t of thermal expansion


ALPHA = K0/WI06O2 + K1/MO60
KO = 103.8720 (as of May 1, 1980)
K 1 = .2701 (as of May 1, 1980)
TERMl = K0/”060
TE
RM l = .12226420 truncated
TERM2 = TEF34l/RH060
TERM2 = .O001439130 truncated
TEXM3 = K1/RHO60
TERM3 = .O003179255 truncated
ALPHA = TERM2 + TERM3 = .O004618 rounded

|||| |||---
Step 7: Calculate volume c o r r e c t i o nf a c t o r
VCF = ExP(-AT;pm * DEZTA - 0.8 * ALPHI$ * DELTA^ )

|
|||| |||| || || |
a ) Calculate exponent
TERMl = ALPHA * DELTA = -.O2424450 truncated

|||| |||| | | ||
TERM2 = O. 8 * TERMl = -.O1939560 truncated
TERM3 = TERMl * TERM2 = .O0047024 rounded

|
|
| | |
TERM4 = 4 E F W - TERM3 = .O2377426

--
b) Calculateexponential
VCF = EXP(TERM4) = 1.024059 rounded
(must use the first seven tem of the p e r series
expansion of ex)

Step 8: Calculate 60 OF d e n s i t y
RH060 = RHOT/VCF = 829.610 truncated

TABLE 2A shows the r e s u l t s ofeach iteration.

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
I-VOLUME
SECTION FACTORS
CORRECTION x-59

TABLE 2A

ITERATION MO60 (N) ALPHA VCF RH060 ( N+1)


1 849.57 .O004618 1.024059 829.610
2 829.61 .O004765 l.024819 828.995
3 829.00 .O004770 l. 024844 828.974

W160 = 141360.1980/828.97 - 131.5 = 39.0

Computed value of -160 is m t an the same curve as the input API g r a v i t y .


Redefine KO and K 1 f o r the jet fuel curve and repeat theconvergence
scheme in steps 5B through8.Table 2B shows t h er e s u l t s .

TABLE 2B

ITERATION
RH060 (N) ALPHA VCF RH060 ( N + l )
1 849.57 .O004576 1.023842 829.786
2 829.79 .O004797 1.024984 828.861
3 828.86 .O004808 l.025041 828.815

W160 = 141360.1980/828.81 - 131.5 = 39.1

EXAMPLE 3
S t e p 1: Round inpt v a r i a b l e s
a ) Round API g r a v i t y to nearest 0.1
API = 45 .O rounded
b ) Wund observed tenperature to nearest 0.1
T = 77 .O rounded

Step 2: C a l c u l a t ed i f f e r e n c e in &servedtemperature and base


tenperature
BASE TEMPERATURE = 60. O
DELTA = 7’7.0 - 60.0 = 17.0

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API M P M S * L L = L V O L X X 80 0732290 0525726 360

X-60 1 PHYSICAL PROPERTIES


CHAPTER DATA

Step 3: Conputehydrometer m r r e c t i o n term


HYC = 1.O - .O0001278 * DELTA - .0000000062 * DELTA2
TERMl = .O0001278 * DELTA = .O00217260 rounded
TERM2 = .0000000062 * DELTA2 = .O00001792 rounded
HYC = 1.000000000 - .O00217260 - .O00001792 = .999780948

Step 4: Convert ApI g r a v i t y to d e n s i t y


RHO = (141.5 * 999.012)/(131.5 + API)
RHO = 141360.1980/176.5 = 800.91 rounded

|||| |||---
|
Step 5A: Application of hydmm2ter correction

|||| |||| || || |
mm = RHO * IIYC = 800.73 rounded

|||| |||| | | ||
Step 5B: I n i t i a l i z e 60 O F density

|
RHO60 = RHOT = 800.73

|
| | |
--
Step 6A: Calculate e f f i c i e n t of thermal expansion
ALPHA = Ko/RH0602 + Kl/RJfI060
KO = 330.3010 (as of May 1, 1980)
K 1 = 0.0 (as of May 1, 1980)
TERML = Ko/PH060
TERML = .41249984 truncated
TERM2 = TERM1/RH060
TERM2 = .O005151547 truncated
TERM3 = Kl/RH060
TERM3 = 0.0
W HA = TERM2 + TERM3 = .O005152?munded

Step 7: Calculate volume m r r e c t i o nf a c t o r


VCF = EXP(-ALPHA * DELTA - 0.8 * ALPHA2 * DELTA2)
a) Calculateexponent
TERMl = ALPHA * DELTA = .O0875840 truncated
TERM2 = 0.8 * TERMl = .O0700672 truncated
TERM3 = TERMl * TERM2 = .O0006137 rounded
TERM4 = 4?ERM1- TERM3 = - .O0881977

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL=L VOLXX AO 0 7 3 2 2 9005 2 5 9 227T 7 m

SECTIONVOLUME CORRECTION
FACTORS x-61

b ) Calculateexponential
VCF = EXP(TERM4) = .991219 rounded
(must use the f i r s t seven k m of the p r series
expansion of ex)

Step 8: Calculate 60 O F d e n s i t y
RHO60 = RHm/VCF = 807.823 truncated

TABLE 3 shows the r e s u l t s of each iteration.

ITERATICRJ RHO60 ( N ) ALPHA VCF m060 ( N + l )


1 800.73 .O005152 .99 1219 807.823
807.82 2 .O005062 .991373 807.698
3 807.70 .O005063 .991371 807.699

W160 = 141360.1980/807.70 - 131.5 = 43.5

EXAMPLE 4
Step 1: Round inputvariables
a ) murid API g r a v i t y la nearest 0.1
API = 60 .O rounded
b) Round observed tenperature la nearest O .1
T = 140 .O rounded

Step 2: Calculatedifferencein&servedtemperature and base


temperature
BASE TEMPERATURE = 60 .O
DELTA = 140.0 - 60.0 = 80.0

Step 3 : Compute hydrometer correction term


HYC = 1.0 - .O0001278 * DELTA - .0000000062 * DELTA2
TERMl = .O0001278 * DELTA = .O01022400 rounded
TERM2 = .0000000062 * DELTA2 = ,000039680 rounded
HYC = 1.000000000 - .O01022400 - .O00039680 = .998937920
-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I M P M S * L L = L V O L t X 80 0732270 0525928 L33 m

X-62 1 P PHYSICAL PROPERTIES


CHAPTEP DATA

Step 4: Convert ApI g r a v i t y to d e n s i t y


FU0 = (141.5 * 999.012)/(131.5 + API)
RHO = 141360.1980/191.5 = 738.17 rounded

Step 5A: Application of hydrmster c o r r e c t i o n


RHDI? = RHO * HYC = 737.39 rounded

Step 58: I n i t i a l i z e 60 density


OF

RH060 = RHOT = 737.39

Step 6A: Calculate mfficient of thermal expansion


2
ALPHA = Ko/RHO60 + K1/RHO60
KO = 192.4571 ( a s of May 1, 1980)
K 1 = 0.2438 (as of May 1, 1980)
TERMl = Ko/RHO60
TERMl = .26099770 truncated
TERM2 = TERMl/F!H060
TERM2 = .O003539479 truncated
TERM3 = K1/RH060
TERM3 = .O003306255 truncated
ALPHA = -2 + TERM3 = .O006846 rounded

Step 7: Calculate volume a x r e c t i o nf a c t o r


VCF = EXP(-ALPHA * DELTA - 0.8 * ALPHA^ * DEL,TA~)

|||| |||---
a ) Calculateexponent
TERMl = ALPHA * DELTA = .O5476800 truncated |
|||| |||| || || |

TERM2 = 0.8 * TERMl = .O4381440 truncated


TERM3 = TERMl * TERM2 = .O0239963 rounded
|||| |||| | | ||

TERM4 = 4XRMl - TERM3 = -.O5716763


|

b) Calculateexpanential
|
| | |

VCF = MP(TEm4) = .944436 rounded


--

(must use the f i r s t seven terms of the pwer series


expansion of G )

Step 8: Calculate 60 OF d e n s i t y
RHO60 = RHOT/WF = 780.772 truncated

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
SECTIONVOLUME
FACTORS
CORRECTION X-63

TABLE 4A shows the results of each iteration.

TABLE 4A

ITERATION RHO60 ( N ) -
ALPHA VCF RHo60(N4-1)
1 737.39 .O006846 ,944436 780.772
2 780.77 .O006280 .949083 776.949
3 776.95 .O006326 .948705 777.259
4 777.26 .O006322 .948738 777.232

W 1 6 0 = 141360.1980/777 e23 - 131 5 = 50 e 4

Colrputed value of W160 is on t h e s t r a i g h t l i n e segment mnnecting the jet


f u e l and gasolinecurves.Redefine ALPHA and repeat convergence scheme i n
steps 5B through 8.

Step SB: I n i t i a l i z e 60 OF d e n s i t y
RH060 = 778.84
( f i r s t approximation is density equivalent of 50 OAPI)

Step 6B: Calculation of ALPHA f o r s t r a i g h t l i n e segment


ALPHA = A + B/F?H0602
A = -.O0186840 (as of May 1, 1980)
B = 1489 .O670 (as of May 1, 1980)
TERMl = B/RH060 = 1.911903 truncated
TERM2 = “l/RH060 = .O0245481 rounded
ALPHA = A + TERM2 = .O005864 rounded

Step 7: Calculate mlume m r r e c t i o nf a c t o r


VCE’ = MP( -ALPHA * DELTA - O. 8 * ALPHA2 * DELTA2)
a ) Calculateexponent
TERM4 = -.O4691200 - .O0176059 = “04867259
b) C a l c u l a t e e x p e n t i a l
VCF = EXP (TERM4) = .952493 rounded
(must use t h e f i r s t seven terms of the p e r series
expansion of ex)

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL-L VOL*X 80 m 0732290 0525930 891

X-64 1 PHYSICAL
CHAPTER DATA
PROPERTIES

Step 8: Calculate 60 OF density


RHO60 = 737.39/.952493 = 774.168

TABLE 4B

ITERATION RH060 (N) ALPHA VCF RH060 (N+l)


1 778.84 .O005864 .952493 774.168
2 774.17 .O006161 .950059 776.151
3 776.15 ,0006035 .951092 775.308
4 775.31 .O006088 .950657 775.663
5 775.66 .O006066 .950838 775.515
6 775.52 .O006075 .950764 775.576

-160 = 141360.1980/775.58 - 131.5 = 50.8

Step 1: Round input variables


a ) Wund API gravity t~ nearest 0.1
API = 50.O rounded
b) R m d cbserved temperature &I nearest 0.1
T = 12.5 rounded

Step 2: Calculatedifference in cbservedtemperature and base


temperature
BASE 'IEMPERATURE = 60.0
DELTA = 12.5 - 60.0 = -47.5

Step 3: Computehydrometer mrrection tgrm


2
HYC = 1.0 - .O0001278 * DELTA - .0000000062 * DELTA
TERMl = .O0001278 * DELTA -.O00607050 rounded =
TERM2 = .0000000062 * DELTA" = .O00013989 rounded
HYC = 1.000000000 + .O00607050 .O00013989 = 1.000593061 -
Step 4: Convert API gravity &I density
RHO = (141.5 * 999.012)/(131.5 + API)
RHO = 141360.1980/181.5 = 778.84 rounded

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I M P M S * L L - L V O L X X B O M 0732290 0525931 7 2 8 M

SECTIONV VOLUME
FACTORS
CORRECTION X-65

S t e p 5A: Application of hydrcsneter correction


RHOT = RHO * HYC = 779.30 rounded

Step 5B: I n i t i a l i z e 60 OF density


RH060 = RHOT = 779.30

Step 6A: C a l c u l a t e m f f i c i e n t of thermal expansion


ALPHA = Ko/RHO6O2 + K1/RH060
KO = 330.3010 (as of May 1, 1980)
K 1 = 0.0 (as of May 1, 1980)
m= Ko/RH060
TERMl = .42384319 truncated
TERM2 = TERMl/IM060

|||| |||---
TERM2 = .O005438768 truncated

|
TERM3 = K1/RHC360

|||| |||| || || |
TERM3 = 0.0
ALPHA = TERM2 + TERM3 = .O005439 rounded

|||| |||| | | ||
|
|
| | |
Step 7: C a l c u l a t e volume m r r e c t i o nf a c t o r

--
VCF = MP(-ALPHA * DELTA - 0.8 * ALPHA^ * DELTA^)
a ) Calculateexponent
TERM1 = ALPHA * DELTA = -.O2583525 truncated
TERM2 = 0.8 * TERMl = -.O2066820 truncated
TERM3 = TERMl * TERM2 = .O0053397 rounded
TERM4 = -TEFW1 - TERM3 = .O2530128
b) Calculateexponential
VCF = EXP(TERM4) = 1.025624 rounded
(must use t h e f i r s t seven tem of the p e r series
expansion of ex)

Step 8: Calculate 60 OF d e n s i t y
m 6 0 = RIm/VCF = 759.830 truncated

TABLE
5A shows the r e s u l t s of each i t e r a t i o n .

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I M P M S + L L * L VOL+X 80 0732270 0525932 664 m

X-66 CHAPTER1 P PHYSICAL


DATA
PROPERTIES

ITERATION RHO60 (N) ALPHA RH060


VCF ( N+1)
1 779.30 .O005439 1.025624 759.830
2 759.83 .O005721 l. 026940 758.856
3 758.86 .O005736 1.027010 758.804
4 758.80 .O005737 1.027015 758.800

W160 = 141360.1980/758.80 - 131.5 = 54.8

Conputed value of W160 is not on the same curve as the input AFT g r a v i t y .
Redefine KO and K1 f o r the gasoline curve and repeat the convergence
scheme i n steps 5B through 8. Table 5B shows the r e s u l t s .

TABLE 5B

ITERATION RH060(N) ALPHA VCF RH060(N+1)


1 779.30 .O006297 l. 029625 756.877
2 756.88 .O006581 l. 030947 755.906
3 755.91 .O006593
--

1.031003 755.865
| | |
|
|

-
|||| |||| | | ||

API60 = 141360.1980/755.87 131.5 = 55.5


|||| |||| || || |

"PLE 6
Step 1: Round inplt v a r i a b l e s
|

a) €&und API g r a v i t y to nearest O .1


|||| |||---

API = 75.O rounded


b ) €&und observedtenperature to warest 0.1
T = 94.0 rounded

Step 2: C a l c u l a t ed i f f e r e n c e in &servedtemperature and base


tenperature
BASE TEMPERATURE = 60.O
DELTA = 94.0 - 60.0 = 34.0

Step 3: Compute hydrometer oorrection term


HYC .O0001278 * DELTA - .0000000062 * DELTA2
= 1.0 -
"l= .O0001278 * DELTA = .O00434520 rounded

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
SECTIONVOLUME
FACTORS
CORRECTION X-67

TERM2 = .0000000062 * DELTA2 = .O00007167 rounded


WC = 1.000000000 - .O00434520 - .O00007167 = .999558313
--
| | |
|

step 4: Convert API g r a v i t y b density


|
|||| |||| | | ||

RHO = (141.5 * 999.012)/(131.5 + AF'I)


RHO = 141360.1980/206.5 = 684.S5 rounded
|||| |||| || || |

S t e p 5A: Application of hydraneter correction


|
|||| |||---

RHOT = RHO * HYC = 684.25 rounded

Step 5B: I n i t i a l i z e 60 OF density


RH060 = RHUC = 684.25

S t e p 6A: Calculate m f f i c i e n t of thermal expansion


ALPHA = Ko/RHO6O2 + K1/RH060
KO = 192.4571 (as of May 1, 1980)
K 1 = 0.2438 (as of May 1, 1980)
T
ERM1 = Ko/FN06O
"RMl = .28126722 truncated
TERM2 = TERMl/IW060
TERM2 = .O004110591 truncated
3" = K1/RH060
TERM3 = .O003563025 truncated
ALPHA = TERM2 + TERM3 = .O007674 rounded

Step 7: Calculate v
ol
ume c o r r e c t i o nf a c t o r
VCF = MP(-ALPHA * DELTA - 0.8 *.m m 2 * DELTA^)
a ) Calculateexponent
TERM1 = ALPHA * DELTA = .O2609160 truncated
TERM2 = 0.8 * TERMl = .O2087328 truncated
TERM3 = TERMl * TERM2 = .O0054462 rounded
TERM4 = 43XM.l - TERM3 = -.O2663622
b ) Calculate exponential
VCF = MP(l"4) .973715 rounded
=
(must use the f i r s t seven terms of the p e r series
expansion of ex)

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
X-68 11"PHYSICAL CHAPrER PROPERTIES DATA

Step 8: Calculate 60 OF d e n s i t y
RHO60 = €?HOT/KF = 702.721 truncated

TABLE 6 shows the results of e a c h i t e r a t i o n .

TABLE 6

ITERATION mo60 (N) ALPHA VCF RHO60 ( N+1)


1 684.25 .O007674 .973715 702.721
2 702.72 .O007367 .974774 701.957
-
3 701.96 .O007379 .974733 701.987

API60 = 141360.1980/701.99 - 131.5 = 69.9

"PLE 7
Step 1: Round inpt v a r i a b l e s
a) wund API g r a v i t y tn nearest O .1
API = 55.5 rounded
b) lir>und &served tenperature to nearest 0.1
T = 176 .O rounded

Step 2: Calculatedifferencein&served kmperature and base


tenperature
BASE TEMPERATURE = 60 .O
DELTA = 176.0 - 60.0 = l16.0

S t e p 3:Compute hydrometer m r r e c t i o n term


HYC = 1.0 - .O0001278 * DELTA - .0000000062 * DELTA2
TERMl = .O0001278 *
DELTA = .O01482480 rounded
2
TERM2 = .0000000062 * DELTA = .O00083427 rounded
HYC = 1.000000000 - .O01482480 - .O00083527 = .998434093

Step 4: Convert API g r a v i t y to d e n s i t y


RED = (141.5 *
999.012)/(131.5 + API)
RHO = 141360.1980/187.0 = 755.94 rounded

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL.L VOL*X B O m 0732290 0525935 373 m

SECTIONV VOLUME
FACTORS
CORRECTION X-69

S t e p 5A: Application of h y h t e r c o r r e c t i o n
mm = RHO * WC = 754.76 rounded

Step 5B: I n i t i a l i z e 60 O F density


RID60 = RHCYI' = 754.76

S t e p 6A: Calculate coefficient of thermal expansion


ALPHA = Ko/W10602 + K1/FH060
KO = 192.4571 ( a s of May 1, 1980)
K 1 = 0.2438 (as of May 1, 1980)
T m = Ko/F%I060
TFAMl = .25499112 truncated
TERM2 = T E R M l ~ 0 6 0
TERM2 = .O003378439 truncated
TERM3 = Kl/FEIH060
TERM3 = .O003230165 truncated
ALPHA = TERM2 + TERM3 = .O006609 rounded

Step 7: Calculate volume m r r e c t i o nf a c t o r


VCF = MP(-ALPHA* DELTA - 0.8 * ALPHA:! * DELTA^)
a ) Calculateexponent
TERM1 = ALPHA * DELTA = .O7666440 truncated
TERM2 = 0.8 * TERMl = .O6133152 truncated
TERM3 = T
ERM1 * TEM2 = .O0470194 rounded
TERM4 = 4"1 - TERM3 = -.O8136634
--
| | |

b ) Calculateexponential
|
|

VCF = MP(TERM4) = .921856 rounded


|||| |||| | | ||

(must use the f i r s t seven terms of the pawer series


|||| |||| || || |

expansionofex)
|
|||| |||---

Step 8: Calculate 60 OF d e n s i t y
RHO60 = FUXYI?,WF = 818.739 truncated

TABLE Ï'A shows the r e s u l t s o f each i t e r a t i o n .

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
X-70 1 PHYSICAL PROPERTIES
CHAPTER DATA

ITERATION
RHO60 (N) ALPHA VCF RH060 ( N+1)
1 754.76 .O006609 .921856 818.739
2 818.74 .O005849 .930967 810.726
3 810.73 .O005935 .929938 811.624
4 811.62 .O005926 .930045 811.530
5 811.53 .O005927 .930033 811.541

API60 = 141360.1980/811.54 - 131.5 = 42.7

|||| |||---
Computed value of W160 is not on the same curve as theinput API gravity.
Redefine KO and K 1 for the jet fuel curve and repeat theconvergence

|
|||| |||| || || |
scheme in steps SB through 8.Table 7B shows the results.

|||| |||| | | ||
TABLE 7B

|
|
| | |
ITERATION m060 (M) ALPHA VCF RH060 (N+1)

--
1 754.56 .O005798 .931578 810.195
2 810.20 .O005032 .940732 802.311
3 802.31 .O005131 .939551 803.319
4 803.32 .O005118 .939706 803 J 8 7
5 803.19 .O005120 .939682 803.207

W160 = 141360.1980/803.21 - 131.5 = 44.5

11.1.6 TABLES 6A, 66, and 6C- TABLE 6B Generalized Products (see Volume II)
Correction of Volume to 60°F TABLE 6CVolume CorrectionFactorsfor
Individual and Special Applications
Against API Gravity at 60°F and (see Volume III)
Thermal Expansion Coefficients
TABLES 6A and 6B use API gravity at 60°F to ob-
TABLES 6A, 6B, and give 6C the factorsfor convert- tain volume correction factors. TABLE6C uses experi-
ing liquid petroleum volumes measuredat observed mentally determined thermal expansion coefficients to
temperatures to the corresponding volumes at 60°F. obtain volume correction factors.
The data are presented in three tables to maximize The development and intended use of these tables is
accuracy while maintaining convenience of use: described below. The parameters KO and K I canbe
found in 11.1.6.7.1 (see Volume III).
TABLE 6A GeneralizedCrude Oils The limits of these tables are illustrated in Figures
(see Volume I) X-3, X-4, and X-S.

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL.L VOL*X 80 m 0732290 0525937 L46 m

SECTIONVOLUME
FACTORS
CORRECTION X-71

Temp
"F

Gravity O API

Figure X-3 - Data Limits for TABLE 6A

Temp
"F

40 50 85
Gravity "API

Figure X-4 - Data Limits for TABLE 6B

300

250
Temp
"F 200

Data Range

510 530 930

Thermal Expansion Coefficient x 1O6 (" F" )

Figure X-5 - Data Limits for TABLE 6C

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

Note: The Ludwig charts used throughout these volumes weredevel-


COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
oped by Dr. L.D. Weiner, Mobil Oil Corporation. call the Document Policy Management Group at 1-800-451-1584.
A P I M P M S * L L - L VOL*X 80 m 0732270 0525738 O82 m

SECTIONV VOLUME
FACTORS
CORRECTION x-78
--

HISTORY AND DEVELOPMENT OF THE


| | |

PETROLEUM MEASUREMENT TABLES (1980)


|
|
|||| |||| | | ||

A major revision of thePetroleum Measurement In 1972 Downer and Inkley demonstrated that the
Tables (ASTM D1250/IP 200) was developedunder the previously published tables were not satisfactorily ap-
|||| |||| || || |

sponsorship of the American Petroleum Institute. The plicable to many crude oils of current economic impor-
new tables have been accepted as standard by several tance. The API and the National Bureauof Standards
national and international organizations. The status of (NBS) initiated a cooperative venture, funded by the
|

the revised tables at the time of the preparation of this API, to createa data base of density measurements on
|||| |||---

document is summarized as follows: both crudeoils and refined products. This joint venture
American Petroleum Institute (API) was initiated in 1974 and its intent was to provide the
Accepted by the Committee on Petroleum. Mea- solid scientific base for the development of more ac-
surement, September 1979. curate, consequently moreequitable, measurement
API Standard 2540 tables.
Institute of Petroleum (London) The completion of this five-year, $500,000 project in
March 1979opened theway for modernizing the tables.
Accepted as revised standard, September 1979.
The sequence of events leading up to thepublication of
IP Standard 200
these tablesis summarized in Table X-l. Using the NBS
International Standards Organization (ISO) density data and taking advantage of publications of
Accepted asDraftInternationalStandard, No- outstanding technical authorities, a Joint API-ASTM
vember 1979. Final vote to be completed during Subcommittee on Physical Properties produced the
1981. 1980 edition of the Petroleum Measurement Tables.
I S 0 DIS 91 The results of this project are described in the open
American Society for Testing and Materials (ASTM) literature by Hankinson et al. (1979) and Hankinson et
Accepted by CommitteeD-2,December 1979, al. (1980).
vote of the generalmembership wascompleted Table X-2 gives a capsule picture of the issues that
April 1980. concerned the committeein producing the final version
ASTM D 1250 of its work.
American National Standards Institute (ANSI)
Awaiting American Society for Testing and Ma-
terials results. Experimental Project
The American Petroleum Institute and the National
Background Bureau of Standards initiated a cooperative venture,
For the purpose of custody transfer of bulk petroleum funded by the API, to create a data base of density
oils and products, bulk volumes and contractual densi- measurements on both crude oils obtained from com-
ties are stated at fixed
a reference or base temperature. mercially significant, worldwide sources and onrefined
Sixty degrees Fahrenheit is used as the base tempera-
ture within the United States andmany other producing Table X-1 - API Thermal Volumetric Correction
countriesdealing with theUnitedStates.However, Factor Study
15°C and 20°C are standard bases in a significant num-
ber of nations. Volumes meteredat temperatures other Downer and Inkley presented problem in 1972.
API sponsored five year NBS project to reaffirm TABLES
than base value are adjusted to thebase value by factors 5 and 6.
developedandtabulated in thePetroleum Measure- NBS produced density-temperature data for industry
ment Tables. supplied samples.
NBS submitted data to API in September 1978 with revisions in
The original tables were developed in the late 1940s March 1979.
as describedby Hall etal. (1975). The tables werebased Preliminary results by NBS showed data did not confirm
on the crude and fraction data published by Bearce and TABLES 5 and 6.
API COSM Physical Properties Working Group expanded
Peffer (1916). These tables were the result of close co- October 1978.
operation in 1953 between the Institute of Petroleum Recommendations to API inMarch 1979.
(London), the Committee D-2 on Petroleum Products API ballot on new tables issued
COSM, MARCH 197GUNANIMOUS APPROVAL
and Lubricants of the American Society for Testing COPM, AUGUST 1979-UNANIMOUS APPROVAL
Materials, and the American Petroleum Institute. IP, SEPTEMBER 1979-UNANIMOUS APPROVAL

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API MPMS*LL.L V O L X X 80 m 0732290 0525939 TL9

x-74 CHAPTER
1 PHYSICAL PROPERTIES
DATA

Table X-2 - Issues Addressed by APIWorking Group approximately 30 percent of the original data andmade
significant modifications to the database. On March 6 ,
0 How should NBS data be screened for consistency?
0 Do the samples represent more than one statistical population? 1979, Whetstone released thefinalized data base to the
What is the best equation for relating volume correction factor API. Excluding samples on which fewer than three ex-
to temperature for a single population? perimental measurements were reported, and certain
0 How should the density of a substance at base temperature be
related to thermal expansion coefficients for a population of duplicates, the final data base consisted of 349 samples
substances? distributed as shown in Table X-3. The data base con-
0 What is the best technique for extrapolating beyond 140"F, the tains temperature density data only and does notreflect
limit of the NBS data?
0 How many tables should be published to replace the present viscosity, molecular weight, UOPK, or any additional
tables? characterization parameter. There were25 samples for
0 What should be their limits, increments, and format? which fewer than threepoints of data were reported and
How can universal computer code be best developed?
14 samples which were replicated for equipment cali-
products of the greatest economic significance. bration. The points in these two groups were eliminated
Through its member companies, the API provided from the data base, are not containedin Table X-3, and
the NBS with 463 samples; 211 of crude oils, the re- were not used in the correlation effort.
mainder of refined products. The list of samples rep-
resented 66.8 percent of the world crude production
and 68.1 percent of the estimated reserves for 1974. The
criteria for the selection of crude sample sources were
Fluid Groups
(1) production for 1974, (2) estimated reserves for that The original NBS data were screened forconsistency
year, and(3) countries wishing to contributesamples of and to obtaina preliminary indication of the existence
national origin which did not fit the first two categories. of more than a single population. The screening was
Refined products were obtainedprimarily from API performed by the use of linear equations andlarge ma-
member companies. Each company was requested to chine generated plots (see TableX-4).
submit at least three samples, preferably of those pro- The samples included in the database wereidentified
ducts having the highest refining volume. Refineries by source and class of substance (crude oil, jet fuel,
outside of the United Statesprovided approximately 30 kerosine, motor gasoline, and so forth). These classifi-
percent of the refined products samples. cations wereused as aguide to statistical examination of
A detailed descriptionof the experimental technique the data base to determine if it contained identifiable,
and preliminary, unconfirmed results were released by statistically differentpopulations. It wasfound that
the NBS principal investigator, J. R. Whetstone, in there were five major identifiable groups of substances
September 1978. Based on statistical studies performed that had significantly different relationships between
by the Physical Properties Working Group and because the coefficient of thermal expansion and density. The
of the group's recommendations, Whetstone checked differences between each of these unusual groups and

Table X-3 - APVNBS Data Base

Temperature
Density
Number of Number of RangeRange
ns Samples Category kg/m3 "F

Crude oil 124 600 770-990 40-133


Finished and 76 436 657-770 39-111
unfinished gasolines
Jet fuels, kerosines, 44 35 1 785-825 39-125
solvents
Fuel oils, heating oils, 76 617 812-1075 39-136
diesel oils
Lubricating oils 17 107 861-940 40-136
Miscellaneous
Lube 2 13 927-972 50-127
Reformate, naphtha, etc. 6 43 664-823 39-129
JP-4 4 - 21 736-763 41-104
TOTALS 349 2278

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API MPMS+LL.L VOLXX BO m 0732290 0525740 730 m

SECTION1-VOLUME CORRECTION
FACTORS x-75

the rest of the data wereall statistically significant. Table X-4 - Preliminary Study of NBS Data
These deviations were attributed to differences in com-
Computer Generated Plots of Deviations in Densities from Linear
position, aromaticity, density range, or other anoma- Equations:
lies. These major andminor categories areidentified in Screening of NBS Data for Anomalies
Table X-3. Large differences over small temperature ranges.
Same bias for points from several samples run on same day.
Bias in points run several months apart on same sample.
Visual Analysis of Total Population
Separate Representation Needed for Trends in deviations indicated if a sample was above, at, or
Crude and Product Classes below average, i.e. to identify sub-groups in population.
Distinguish between data anomalies and trends.
Figure X-6 shows that the coefficient of thermal ex- 0 Communicate Results

pansion of crude oil and the classes of products (gas- Data anomalies communicated to NBS (and others) who
immediately recognized the problems.
olines, jet fuels, fueloils, and lubeoils) follow separate Results
curves as afunction of inverse density squared. This fact 5 populations, 1 crude and 4 product groups indicated.
forces different representations be to usedfor each class 0 NBS revised data on nearly 30 percent of samples.

in each of the new petroleum measurement tables. A


more detailed breakdownof the product classifications It isworthemphasizing that meticulous care went
is as follows: into establishing, by both visual and mathematical anal-
ysis, the need forfive populations of data, the crude and
Gasoline 50 S “API S 85 four product groups indicated. As stressed by William
Jet fuels 37 =S“API < 50 E. Deming, as early as 1939, “without a homogeneous
Fuel oils O 6 “API < 37 population, a statistician’s calculations by themselves,
Lubricating oils are an illusion, if not a delusion.”

900 /
0
0

8ool
0

GASOLINES

700 0
600 -

500 -

400 -

300 M I I 1 I I I I I
.8 1.o 1.2 1.4 1.6 1.8 2.0 2.2 2.4 2.6

(l/pT2) X lo6 [kg/m~~]-~

Figure X-6 - Coefficients of Expansion for Five Statistically Homogeneous Groups

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS+11*1 V O L + X 80 m 0732290 0525941 677 m

X-76 1 P PHYSICAL
CHAPTER DATA
PROPERTIES

The most significant impactof this portion of the Hence from Equations 1 and 2:
study was to demonstrate conclusively that the wide
range of commercially important materials represented L dl/ =aT+ßAt (3)
by the data base could not be adequately described by dt V
twodimensionaltables, such as the previously pub-
lished TABLES 5 and 6 in the Petroleum Measurement At = t - T
Tables. The basic accuracy of this quality data would be
destroyed and bias would be introduced by an attempt Which can be rearranged and integrated
between t and
to characterize the five categories as a single group. T to give:
This loss of accuracy and the introductionof bias is not In - V - a T A t + !A?
defensible if the tables are to be equitable to all table e VT (4)
users. A study of the NBS data demonstrated that:
Correlation Development ß=ka; (5)
Thefundamental definition forthe coefficient of
thermal expansion is: Where:
a =--1 dV (1) k = a temperature independent constant.
Vdt These equations werestatistically validated by com-
--

Where:
| | |

puter studies of the NBS data base. The precise value of


|

a = coefficient of thermal expansion k was selected from a consideration of (1) the computer
|
|||| |||| | | ||

V = volume at any temperature. studies, (2) the theoretical curvature of density with
temperature, and (3) high temperature literature data
The final form of the equationrelating volume correc- oncrudes, petroleum fractions, and C6through C3*
tion factors to easily obtainable measurements depends
|||| |||| || || |

alkanes. These literature data were obtained from the


upon the integration of this definition. The integration,
work of Jessup (1929)and Orwall and Flory (1967).The
in turn, depends upon the assumptions made and the value of k best expressing these criteria is 1.6.
|

sequence in the derivation atwhich the assumptions are


|||| |||---

invoked. Thus, Equation 4 becomes:


A number of forms were proposed and studied by the
working group. Three types of equations were elimin- VT = -
VCF = - P
= EXP [ - a @ ( l + 0.8 aTAt)] ( 6 )
ated from consideration:(1) forms with finite discontin- v PT
uities in the equationor thederivative between temper- Where:
atures of O"F and 300"F, ( 2 ) equations containing com- t = any temperature
plicated transcendental functions not suitable for gen- T = base temperature.
eral use on mini- and microcomputers, and (3) equa-
tions containing high order powers inside an exponen- Equation 6 is valid for a particular fluid of known
tial or other limitations prohibiting the use of single alpha.
precision nonlinear analysis. From this type of elimina- It was determined that the coefficients of thermal
tion, an exponential equation emerged containing a se- expansion at the base temperature for each group are
cond order term which exhibited the most desirable related to the densities at the base temperature by:
characteristics in terms of accuracy, simplicity, and
curveshape.The working group accepted this ex- KO + KlPT
ponential equation for use in the final correlation. aT = (7)
P?
The equation was derived using:
Parameter Determination and Results
a =ß aATt + (2) The values of KO and K1 were established for each
major group from a simultaneous nonlinear regression
Where: of all data points within thatgroup to Equations 6
and 7 . In this case the parameters were KOand K I for
aT = a at the base temperature the group and the vector of 60°F densities for each
ß = a functionof a and is independent of temperature. sample. See Column C of Table X-5.

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API M P M S * L L - L V O L * X B O m 0732290 0525942 503 m

SECTIONVOLUME CORRECTION
FACTORS x-77

Table X-5 - Comparison of Correlation Results

KO -k KIPT
OLT =
PT’
Tabular Entries in Percent Standard Deviation

A B C From Method C
Group Set NP NS Time a at Generalization of A Global Fit KO KI

Crude oils 124 690 .O152 .O371 .O253 341.0957 0.0


Gasoline and naphthenes .o10976 436 ,0304 .o266 192.4571 0.2438
Jet fuels and kerosines 44 35 1 ,0105 ,0237 .O174 330.3010 0.0
Diesels, heating oils and 76 617 .o094 ,0262 .O180 103.8720 0.2701
fuel oils
Lubricating oils 107 - 17 - .o067 ,0274 .O197 144.0427 0.1896
TOTAL 2201 337

Note: Alpha in reciprocal “F. Rho in k/m3.


The datawere also reduced a set attime a by the use 2. The reduction of the error in small data sets well
of Equation 6. In this case the parameters were the aT below the experimental scatter of the data by fitting a
and p T for each sample. It is apparent that the use of set at a time.At this time there is insufficient informa-
two parameters forfitting a three or four point sample tion available to ascertain the distribution of the stan-
introduces a maximum bias because of the over specifi- dard deviation between these two factors.
cation of the degrees of freedom.These results are Table X-5 further shows thatthe simultaneous or
shown in Column A , Table X-5. The a T and P T pairs global fit of all data in a groupis significantlybetter than
obtained from this procedure were, as the third meth- the attempt to generalize the pairs resulting from the set
od, fit to Equation 7 to determine the values of KOand at a timeregression. This is becauseof the scatter about
K I . See Column B of Table X-5. Equation 7 caused by the “overfitting” of the small data
The results and accuracy indicators are presented in sets. The global fit (Column C) gives equal weight to
Tables X-5 and X-6. Percent standarddeviation given in eachdatapoint while the generalization technique
the table is defined by: (Column B) gives equal weight to each data set, hence

u= v-no2 [(pi - P,) Pi12 / (np - 1) x 100


the global fit is a less biased, more equitable represen-
tation of the entire data base. The results from the
global fit (see Table X-6) were used in the preparation
i=l (8)
of the tables.
--

A complete set of results including the percent stan-


| | |

Where: dard deviation, the maximum percent error, the density


|

at 60°F, and the coefficient of thermal expansion are


|
|||| |||| | | ||

u = percent standard deviation presented for each samplein the printed tables.
pi = experimental density Equation 6 presents the volume correction factor
pc = calculated density (VCF) as a function of the thermal expansion coeffi-
|||| |||| || || |

np = number of points cient and density, both evaluated at thereference tem-


na = total number of observations in a group. perature. In that basic form, the equation is indepen-
An examination of Table X-5 shows that there is a
|
|||| |||---

significant increase in standard deviation between the Table X-6 - Results of Global Regression of
data fit a set at a time (Column A) and the data fit NBS Data to Final Equations
simultaneously (ColumnC).This occurred for two
major reasons:
Percent Standard
1. By the act of grouping, whichwas necessary to Number Group Deviation
of Points
produce a reasonable number of tables, sample differ-
ences such as composition, aromaticity,
690 and
density
oils dif- Crude ,0253
ferences were averaged out. This 436effect could be re- Gasolines ,0266
fuels Jet 35 1 ,0174
duced by the inclusion of some technique to charac- Fuel oils 617 ,0180
terize the aromaticity as described previously. 107 oilsLubricating ,0197

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL.L VOL*X B O W 0732290 0525943 44T m

X-78 1 PHYSICAL
CHAPTER DATA
PROPERTIES

Table X-7 - Table Development tors or densities are tabulated as functions of tempera-
ture. These were computed from Equations 6 and 7
Tables with the appropriate values for KOand K , . Each prod-
0 Three separate tables.
TABLE A Generalized Crude Oils ( 0 - 1 0 0 O API) ucts table was computed in three sections:
TABLE B Generalized Products (0-85" API)
TABLE C VCF for Individual and Special Applications l. Fuel oils group equationfrom anAPI of O" to an API
0 Temperature and "API in 0.5 increments. of 37".
a Printout to five significant digits.
0 Interpolation not to be used.
2. Jet fuel group equationfrom an APIof 37"to an API
0 Appendix to TABLE C contains pr and ar for each individual of 50".
sample. 3. Gasoline group equation from an API of 50" to an
dent of any specific group and equally applicable to all API of 85".
groups. The equation is reliable over the temperature This is shown graphically in Figure X-7. TABLE 6A
range of 0°F to 250°F and an API range of O" to 100". for crude oils covers a range from O" to 100"API.
Equation 7 relates thermal expansion coefficient and TABLES C, the special applications tables, present
density to a specific group throughthe constants KOand tabularentries of volume correctionfactor against
KI for each group. thermal expansion coefficient and temperature. Each
TABLE C was computed from Equation 6 and thus is
Table Development independent of the group or substance. TABLE C can
Because of the growing importance of computers and be used with anyvalid method of obtaining the thermal
their increasing influence on themetering effort, it was expansion coefficient for a given fluid as long as a sta-
decided that the actual API Standard would consist of tistically significant number of points are obtained. A
computer procedures. Subroutines were developed fol- minimum of ten such points is recommended. An ap-
lowing these procedures so that identical answers are pendix (see Volumes III, VI, and IX) to the published
obtained regardlessof the word size (within the limits of TABLES C presents values of the thermal expansion
the word size conventions of the majorhardware coefficient along with the base density for each of the
vendors) used by the hardware. NBS samples. In addition, values of the constants KO
There are threecommon sets of tables in current use. and K I are given for each major group. The existence of
These arein terms of "API (TABLES 5 and 6),relative this table and its primary subroutine allow the use of
density (TABLES 23 and24),and density inkg/m3 measureddatafor previously unstudied fluids to be
(TABLES 53 and 54). In order to maximize accuracy easily incorporated into the procedure. High precision
and maintain convenienceof use, three separatetables density data obtainedfrom the laboratory for a fluid of
are required to replace each existing table. For exam- interest may be reducedby Equation 6 to obtain cuTand
ple, for TABLE 6 there are: TABLE 6A Generalized pr. TABLES C may then be entered with the aT so
CrudeOils, TABLE 6B Generalized Products, and determined.
TABLE 6C Volume Correction Factors for Individual TABLES C, when used with a minimum of ten data
and Special Applications. Equivalent tables were devel- points, allow one to extract the highest degree of accu-
oped for the other two sets in the appropriateunits. See racy from the data base. TABLES C introduce a high
Table X-7. The temperature ranges of the tables and degree of flexibility into the procedureby allowing new
the limits are shown in Table X-S. data to be incorporated into the Standard. Of course,
The crudeoil and products tablesretain the formatof with the increase of computer applications, the use of
the previously published tables. Volume correction fac- the TABLES C technique will not, on the average,
prove to be a loss of convenience. It is suggested that
TABLES C be used when:

Table X-8 - Table Development 1. TABLES A and B do not adequately represent the
Correlation Limits thermal expansion properties of the fluids of interest;
and
2. Precise thermal expansion coefficients maybe ob-
TABLE A TABLE B tained directly or indirectly by experiment (As an exam-
"API "F "API "F ple, high precision density data may be usedto compute
the coefficient.); and
0-40 0-300 0-40 0-300
40-SO 0-250 40-SO 0-250 3. If buyersand sellers agree that, for their use,a
50-100 0-200 50-85 0-200 ,:rester degree of equity can be obtained.

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*:LL*L V O L X X 80 m 0732290 0525944 3Bb

SECTIONV VOLUME CORRECTION FACTORS x-79

Summary and Precision Statement A precision statement for the250°F to 300°F portion
of the tables is not given because it is an extrapolation.
The new tables give factors forconverting petroleum
volumes observed at temperatures other than the base
temperature to corresponding volumes at the base tem- Independent Test of the Correlation
perature for values of API gravity in the range o" to In order to obtain an independent test of the revised
100". tables, an oil of commercial importance which was not
The tables are based on density temperature determi- included in the NBS data set was studied. The stepsof
nations madeby the U.S. National Bureauof Standards this study are described below.
from 1974 to 1979 under contract to the API on 225
samples of products ranging from heavy fuel oil to gaso- l. An oil sample of Prudhoe Bay crude oil was supplied
--

line blend components and124 samples of crude oilthat by SOHIO.


| | |

cover a wide range of quality and represent about 45 2. The experimental work was performedby Dr. James
|

W. Gall of Phillips Petroleum Company.


|

percent of the world's crude production andreserves as


|||| |||| | | ||

known during that time period. a. The sample was chilled to 50"F,settled and the
The thermal expansion properties (volume correc- upper portion siphoned off. This step removed
|||| |||| || || |

tion factors) for products (including lube stocks) and anywax that formed at 50°F and the assorted
crude oils are correlated in separate, generalized tables solids in the original sample.
as a function of temperature anddensity or APIgravity. b. The oil densities were measured on a Mettler/
|

The predicted precision at the 95 percent confidence Paar high precision densitometer. Theinstrument
|||| |||---

level is: VCF precision at 95 was calibrated with both water and nitrogen at
percent confidence level, % each temperature and pressure for which the oil
Temperature 150°F
100°F 200°F 250°F density was measured. The calibration was con-
Crudes and Products k0.05 .15 .25 .35 firmed using pentane.
900

i
a
I

85

I
300 I I I 1 I I I I
.8 1 .o 1.2 1.4 1.6 1.8 2.0 2.2 2.4

(1/pT2) X 1O6 [kg/m3]-*

Figure X-7 - Products Tables (TABLES B)

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
--

3. The experimental'results were tested against the new Table X-10-Average Error in the
| | |

correlation by: Previously Published Table6


|
|
|||| |||| | | ||

a. The constants for the thermal expansion coeffi- Percent Over Actual at 60°F
cients equation were fixed atthe generalized Fluid 150°F 90°F 120°F
values for crude oil. Crude oils
|||| |||| || || |

20"API 0.01 0.04 0.09


KO = 341.0957 3O"API 0.07 0.16 0.26
40"API 0.09 0.21 0.32
KI = 0.0
|

Products
|||| |||---

20"API 0.06 0.14 0.25


b. Weighting factors of unity were applied to the WAPI 0.04 0.11 O. 18
60"API 0.41 0.19 0.62
first five points of data since they are in the NBS
data set temperature range. Weighting factors of Figure X-8 shows the comparison of the volume cor-
O.OOO1 were applied to the remaining four points. rection factors of the old and new tables relative to the
This step insured that the single parameter, the experimental data on the Prudhoe Bay crude. Table
60°F density, was not influenced by the datain the X-10 presents a representativesample of a comparison
extrapolation region of the model. made between the NBS data and the previously pub-
C. A nonlinearregression routine was usedto fit the lished TABLE 6.
data to the TABLE 6 model and determine the
missing parameter, the 60°F density.
The results are shown in Table X-9. The first five Example Calculations
points of data were fit to a 0.0277 percent standard A comprehensive set of example calculations are pre-
deviation; all points exhibit a 0.0365 percent standard sented by Hankinson et al. (1979). In addition, sections
deviation. These deviations are well within the 95 per- containing example calculations are presented with the
cent confidence limlts given in the precision statement text accompanying each individual table in Volumes I
of the model and validate both the basic model and the through IX.
temperature extrapolation.

Comparison of the Old and New Tables Special Considerations


INFORMATION DISSEMINATION
The goal of the working group was to develop the
revised tables based on the most recent data, not to be To maximize the convenience of use and to provide
influenced by comparisons with the old table. However, thegreatestdegree of flexibilityin application, the
after the developmental effort
was completed, a limited tables will be issued in several formats:
number of such comparisons were made for instruc- 1. Hardcopy printed tables.
tional purposes. 2. Microfiche of printed tables.
3. Printed listings of the computer subroutines.
Table X-&Prudhoe Bay Oil Density (P = 24.8 psia) 4. Card decks of the computer subroutines.
Temperature Density, kg/m3 5 . Magnetic tapes containing the computer subrou-
Percent
"F "C Experimental
Calculated error tines.
10.13 50.234 897.36 896.931 - .o477
20.04 68.072 889.92 890.012 .O225 PRINTED TABLES
29.96 85.928 883.00 883.272 .O309
39.89 103.802 876.36 876.389 ,0033 The printed tables are presented at increments de-
50.08 122.144 869.373 869.291 ,0088 signed to minimize the need for manual interpolation.
60.20 140.360 862.530 862.225 .O353
70.13 158.231 855.671 855.262 .O0478 These, by mutual agreement among working group
80.00 175.00 848.742 848.710 .o0379 members andwith approval of both COSM and COPM,
89.72 193.496 842.032 841.459 .o680 are:

Average Absolute Average Percent "F 0.5


Standard
Summary
Error
Percent 0.25 Deviation "C
1st 5 points .o2264 .o277 "API 0.5
All points .O365 .O3759
Relative density 0.0020
pm = 893.207 kg/m3. 2.0 kg/m3

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I M P M S + L L = L V O L X X 80 m 0732290 0525946 L59 m

SECTIONCA VOLUME CORRECTION


FACTORS x-81

COMPUTER SUBROUTINES portance of minimizing future problemsinvolving


changes in computer software and hardware. Hence,
The computer subroutines reproduce the basic ex-
explicit implementationprocedures weredeveloped
perimental datato theprecision specified in this report.
which describe the precise calculational sequences and
The increments available from these subroutines are:
the exact rounding techniqueused in the representation
of the equations. These implementation procedures are
"F o. 1 the specific Standardratherthanequations,subrou-
oc 0.05
tines, or hardcopy printout.
"API o. 1
Relative density 0.0005 A detailedimplementationprocedure isgiven for
kg/m3 O. 50 each of the fifteen separate tables. Absolute adherence
to theoutlined procedureswill insure thatall computers
The rounding proceduresand thelimits on the preci- and computer codes of the future, meeting the stated
sion of the subroutine inputs are discussed fully in the specifications and restrictions, will be able to produce
companion documents describing each subroutine. identical results. Such aprocedure provides for the
maximum machine and code independence. A valida-
IMPLEMENTATION PROCEDURES
tion of the 1980 computer subroutinesis documentedby
The working group for the revision realized the im- the following letters.

|||| |||---
|
|||| |||| || || |
0.4 -

|||| |||| | | ||
t TABLE 6 PREVIOUSLY PUBLISHED

|
c |
,'c-o
0.3

| | |
1

--
I

-0.1
40 60 80 1O0 120 140180 160 200

TEMPERATURE, OF

Figure X-8 - Prudhoe Bay Crude, August 1979 Data

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
Mobil Research and Development Corporation
Apri I 25,1980
RESEARCH DEPARTMENT
Dr. R. W. Hankinson P.O. BOX 900
Ph i I I i ps Petroleum Company DALLAS. TEXAS 75221
B a r t l e s v i I le, OK 74004
ROBERT J. WATSON

Dear D r . Hankinson: MANAGER


FIELD RESEARCH LABORATORY

The t e s t i n g of a l l s u b r o u t i n e s i n v o l v e d i n t h e r e v i s i o n o f TABLE 6 (API Standard


2540)has now been completed. The t e s t i n g procedure was so designedas t o
confirmthefactthatthesubroutines would produce t h e i d e n t i c a l r e s u l t s on
a l l computers availabletodayhaving a32 b i t o r l a r g e r word s i z e and a FORTRAN
comp i Ier. The t e s t i n g p r o c e d u r e i s g i v e n below.

a) A magnetic tape containing driver programs and a l l s u b r o u t i n e s


(TAB5A,TABSB, T A S A , TASB, TAB6C,TAB23A,TAB23B,TAB24A,TAB248,
TAB24C,TAB53A, TAB53B, TAB54A, TAB54B,
TAB54C)
was sent t o T. A.
Coker ( P h i l l i p s P e t r o l e u m Company w i t h anIBM 370, 32 b i t word) and

|||| |||---
t o David Johnson (Shell Development Corporationwith a UNIVAC 1110,
36 b i t word).

|
|||| |||| || || |
b) The programs contained on t h e t a p e were r u n ( w i t h o u t m o d i f i c a t i o n )
a t t h e two t e s t i n g i n s t a l l a t i o n s . A l l o u t p u t was d i v e r t e d t o magnetic

|||| |||| | | ||
tape and r e t u r n e dt oM o b i l Research and Development C o r p o r a t i o n i n
Da1 las.

|
The i d e n t i c a l programs were executed a t t h e D a l l a s s i t e ( o n a CDC

|
C)

| | |
175)and t h e o u t p u t was d i v e r t e d t o what w i I I be referenced as the

--
ttmastertttape.

d) The t a p e s r e c e i v e d f r o m P h i l l i p s and Shell were compared v i a acomputer


program against the ttmastertt tape. Thecompar i son was on character-by-
character basis whichwould accurately show any discrepancy between
the entries of the tables on t h e tapes.

e) All l i n e st h a t showed discrepancies were p r i n t e d for v i s u a l comparison.

I n summary, no l i n e s w i t h i n t h e body of t h e t a b l e s were p r i n t e d fromany of t h e


tapes.Therefore,there wereno d i f f e r e n c e s among t h e r e s u l t s producedonany
of t h e machines. T h i st e s tc o n f i r m st h a tt h es u b r o u t i n e s , i f unaltered, will
a c c u r a t e l y r e p r o d u c e t h e new API Standard 2540 t a b l e s oncomputers w i t h a32
b i t o r I arger wordand a FORTRANComp i I er.

Very t r u l y yours,

" Kdren I. West

KW/ it
attach

cc: J. K. Walters, PI
C. M. Owen, S o h i o P i p e l i n e

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API MPMS*LL.L V O L X X 80 M 0732290 0525948 T 2 1 M

SECTIONV VOLUME CORRECTION FACTORS X-83

Mobil Research and Development Corporation

RESEARCH DEPARTMEN7
P o BOX 900
DALLAS, TEXAS 75221

ROBERT J WATSON
June 13, 1980 MANAGER
FIELD RESEARCH LABORATOfiY
--
| | |
|
|
|||| |||| | | ||

Dr. R. W. Hankinson
P h i l l i p s P e t r o l e u m Co.
308 TRW B u i l d i n g
|||| |||| || || |

B a r t l e s v i I le, Oklahoma 74004

Dear Dr. Hankinson:


|
|||| |||---

As a r e s u l t o f t h e c o m p l e t i o n o f t h e s t a t i s t i c a l t e s t i n g phase we
j o i n t l y agreed upon, i t has come t o my a t t e n t i o n t h a t c e r t a i n
updates need t o be made t o t h e computersubroutineswhich w i l l be
issued by t h e API as p a r t of t h e 1980 r e v i s i o n o f API Standard
2540. The u p d a t e sc o n c e r nt h eh a n d l i n go fb r e a kp o i n t s and bound-
a r y c o n d i t i o n s between t h e even numbered s u b r o u t i n e s and t h e odd
numbered s u b r o u t i n e s , a f f e c t i n g o n l y t h e numberand rangeof
p o i n t sp r o d u c e di nl i m i t e ds e c t i o n s of t h es u b r o u t i n e s . These
changes w i l l a f f e c t noanswers withintheofficialprecision
s t a t e m e n ta sc o n t a i n e di nt h eb a l l o t e ds t a n d a r d s .

Attached you w i l l f i n d a l i s t o f t h e updates. I n a l l cases t h e


f i r s t l i n e will g i v e t h e l i n e o f codeandcorresponding sequence
number found i n t h e l i s t i n g s i n Volume X o ft h eP e t r o l e u m Mea-
surement Manual, F i r s t E d i t i o n , f o l l o w e d by a second l i n e o f code
c o n t a i n i n g t h e change.

K.'I. West

K1W:sd

cc: T. A. Coker
A. D. Powell
R. G. Segers
J. K. W a l t e r s

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
X" 1 PHYSICAL PFWERTIESDATA
CHAPTER

current: C BREAK PQIINTS


FOR RELATIVE DENSITY (-7790 AND e82451 23A00730
updated: C BREAK P0lNTS FOR RELATIVEDENSITY (-7795 AND m8250) 23A00730

current: DATA IBPl, IBP2 / 7790, 8245 / 23A00740


updated : DATA lBP1, IBP2 / 7795, 8250 / 23A00740

current: C IS SG GREATER THAN 7790 ( I F YES, BRANCH T0 790) 23A0 1980


updated: C IS SG GREATER THAN -7795 ( I F YES, BRANCH T0 790) 23A0 1980

current: C IS SG GREATER
THAN .8245 ( I F YES, BRANCH T0 810) 23A02020
updated: C IS SG GREATER THAN .8250 ( I F YES, BRANCH T0 810) 23A02020

current: C BREAK PfdlNTS F0R


REL DEN RANGES ( .7790 AND .8245 23B007 1O
updated: C BREAK PBINTS F0RREL DEN RANGES ( .7795 AND .8250 1 238007 1O

current: DATA IBP1, IBP2 / 7790, 8245 / 23800720


updated : DATA IBP1, IBP2 / 7735, 8250 / 23800720

current: C IS Sti GREATER


THAN .7790 ( I F YES, BRANCH T0 70) 2380 1200
updated: C IS SG GREATER
THAN -7795 ( I F YES,
BRANCH T0 70) 2380 1200

current: C I S SG GREATER
THAN .8245 ( IF YES, BRANCH T0 90) 2380 1 240
updated: C I S SG GREATER THAN -8250 ( I F YES, BRANCH T0 90) 2380 1240

current: C I S RH0 LESS


THAN 650. ( I F YES, BRANCH T0 1200) 5380 1 160
updated: C I S RH0 LESS
THAN 653. ( I F YES, BRANCH T0 1200) 5380 1 160

current: 53BO 1 170


updated: 53801 170

current: DATA BPl,lBP2/7785,8245/ 54A00930


updated: DATA BPl,IBP2/7785,8240/ 54A00930

current: DATA ,Pl,lBP2/7790,8245/ 54800930


updated: DATA BPl,lBP2/7785,8240/ 54800930

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API MPMS*LL-L V O L * X 80 0732270 0525950 b 8 T m

SECTION 1-VOLUME CORRECTION FACTORS X-85

HYDROMETER CORRECTIONS It should be noted that pure fluid densities as re-


ported in the literature andwhich are normally usedfor
The hardcopy version of TABLES 5 , 23, and 53 in-
the calibration of densitometersare almost always
clude the appropriate stem correction for the thermal
based on “weight in vacuo.” Hence, the densitometer
expansion of a glass hydrometer. These corrections are
readings obtained from such calibrations are also “in
given by:
vacuo” values. The densities referred to in this work are
all “in vacuo’’ values.
TABLES 5 and 23 Following the convention specified in 15.2.4.8of API
Publication 2564, Second Edition (in press), and with
HYC = 1.0 - 0.00001278(t-60) the concurrence of the Institute of Petroleum, the term
“specific gravity” has been discontinued. It has been
- 0.0000000062(t-60)2
replaced with the term “relative density.” Relative
t = “F density is a relationship defined by the ratios of the
volume of fluid to the volume of water where both
TABLE 53 volumes are “in vacuo” values determined at identical
temperatures.
HYC 1.0 - 0.000023(t-15)
- 0.00000002(t-15)2 References
t = “C
Bearce, H. W. and E. L. Peffer, “Technology Papers of the National
Bureau of Standards-Density and Thermal Expansion of Ameri-
can Petroleum Oils,” p. 125-154, GPO, Washington, D.C., 1916.
The subroutines for these tables contain an override Deming, William E., Theory of Sampling, John Wiley andCo., N.Y.,
N.Y., 1960.
switch allowingthe user to omit thecorrection. Such an Downer, L. and F. A. Inkley, Oil and Gas Journal, Vol. 10, No. 25,
override capability is necessary if the observed densities p. 52-55, June 19, 1972.
or gravities are obtainedfrom an absolute densitometer Hall, A. H., J. A. Simpson, and J. R. Whetstone, “Investigation of
Densities and Thermal Expansion Coefficients Applicable to Petro-
rather than a temperature dependent hydrometer. leum Measurement,” SP 7 WorldPetroleum Congress, Tokyo,
1975.
DENSITY AND RELATIVE DENSITY Jessup, R.S., Journal of Research of the National Bureau of Stan-
dards, p. 985-1011, 1929.
The term“weight in air” is that weight whicha quan- Onvall, R.A . , and P. J. Flory, Journal ofAmerican Chemical Society,
89:26, Dec. 1967.
tity of fluid appears to have when weighed in air against Hankinson, R. W., R. G. Segen, T. KrolikowskiBuck,and F. P.
commercial weights which have been standardized so Gielzecki, Oil and Gas Journal, Vol. 77, No. 52, p. 66-70, Dec. 24,
that each will have a mass (weight in vacuo) equal to the 1979.
Hankinson, R. W., R. G. Segen, T. KrolikowskiBuck,and F. P.
nominal mass associated with it. The term “weight in Gielzecki, Proceedings of the 59th Annual Gas Processors Associa-
vacuo” refers to the true mass of a fluid. tion Convention, Houston, Texas, March 1980.

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*11.1 VOL*X 80 0732290 0525951 5 1 b

X-86 CHAPTER
1 PHYSICAL PROPERTIES
DATA

11.1.6.1 TABLE GA-GENERALIZED CRUDE OILS, dards and from other published data. Portions of the
CORRECTION OF VOLUME TO 60°F gravity and temperature ranges represent areas beyond
AGAINST API GRAVITY AT 60°F these data. Thus, mathematical techniques wereem-
ployed to extrapolate beyond the gravity and tempera-
TABLE 6Agives volume correction factors for con-
ture ranges of the given data to determine the volume
vertingcrude oil volumes observedattemperatures
correctionfactorsfortheseareas.These factors are
other than 60°F to corresponding volumes at 60°F.
denoted by an asterisk (*). Extension of this table be-
The volume correction factors given in this table are
yond the ranges shown is not recommended.
the result of a computer procedure which is the Stan-
Increments used in this table for determiningvolume
dard (see 11.1.6.2 and 11.1.6.3). All of these volumes
correction factors are 0.5"Fand 0.5"API gravity. Inter-
are at saturation conditions. Pressurecorrections from
polation between either temperature or gravity is not
saturation are not included.
intended since there is no practical method of interpola-
The temperature ranges of this table are:
tion that will produce the accuracy obtainable from the
"API "F Standard.
O to 40 O to 300
40 to 50 O to 250
50 to 100 o to 200
The volume correction factors given in this table are This table must be entered with a known API
based on data from the U.S. National Bureau of Stan- gravity at 60°F and with an observed temperature.

|||| |||---
11.1.6.2 PROGRAM DOCUMENTATION FOR SUBROUTINE
TABGA-GENERALIZED CRUDE OILS, CORRECTION OF VOLUME

|
|||| |||| || || |
TO 60°F AGAINST API GRAVITY AT 60°F

|||| |||| | | ||
|
|
The thermalexpansionproperties(volumecorrectionfactors, VCF's) for

| | |
--
p r o d u c t s( e x c l u d i n gl u b es t o c k s ) and c r u d e sa r ec o r r e l a t e di nt w os e p a r a t e
g e n e r a l i z e dt a b l e sa s a f u n c t i o no ft e m p e r a t u r e and PI g r a v i t y . The pre-
d i c t e dp r e c i s i o na t 95% c o n f i d e n c ei s :

VCF P r e c i s i o n a t 95% Conf idence, %


Temperature 100 "F 150 "F 200 "F 250 " F
Crudes & P r o d u c t s -
+O .O5 .15 -25 .35

I f t h i sp r e c i s i o n i s unacceptable, i t i s recommended t h a tt h ea c t u a lt h e r m a l
e x p a n s i o np r o p e r t i e so ft h es u b s t a n c e bemeasured and t h e VCF be determined
u s i n g TABLE
6C with either K oralphavaluesderivedfromthe measured data.
The i n s t r u c t i o n s f o r t h i s p r o c e d u r e a r e g i v e n i n TABLE
6C.

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
FACTORS
SECTION1"VOLUME CORRECTION x-87

ABSTRACT

S u b r o u t i nTei t l e : TABGA - TABLE


6A, Generalized
Crude
Oils,
Volume C o r r e c t i o n t o 60 "F.

Description: T h i ss u b r o u t i n e i s designed t o c a l c u l a t e t h e
volume c o r r e c t i o n f a c t o r r e q u i r e d t o convert
a volume a t an observedtemperature to the
correspondingvolume a t 60"Fassuming the
substancecan be characterizedas a crudeoil.

|||| |||---
Program R e s p o n s i b i l i t y :h e r i c a nP e t r o l e u mI n s t i t u t e

|
|||| |||| || || |
Measurement C o o r d i n a t i o n
2101 L S t r e e t , N.W.

|||| |||| | | ||
Washington, D.C. 20037

|
|
| | |
DateIssued: August 1980

--
Language: FORTRAN,
ANSI/ASA Standard

Reference: API Standard 2540, TABLE 6 , 11.1.6

THIS SUBROUTINE WAS DEVELOPED USING THE


MATHEMATICAL
ALGORITHMS
AND SPECIFICATIONS DESCRIBED I N THE
DOCUMENT
PROCEDURE 11.1.6.3.
ANY MODIFICATIONS TO THIS SUBROUTINE
MUST RIGIDLY ADHERE
TO
THE SAME ALGORITHMS AND SPECIFICATIONS.

11.1.6.2.1 Introduction

TAMA i s a computer subroutinedesigned t o calculatethe volume correc-


tionfactor (VCF) necessary t o c o n v e r t a volume o f a g e n e r a l i z e dc r u d ea t a
s p e c i f i e dt e m p e r a t u r ei nd e g r e e sF a h r e n h e i t( " F ) and of a s p e c i f i e d6 0 O F

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
X-88 CHAPTER 1î-PHYSICAL PAWERTlES DATA

gravityin degrees API ("API) t o t h e e q u i v a l e n t volume a t 60 "F. The subrou-


tineaccepts as i n p u t t h e API g r a v i t y a t 60 " F rounded t o t h e n e a r e s t 0.1 "API
and theobservedtemperaturerounded t o t h en e a r e s t 0.1 "F. I f e i t h e ri n p u t
valuehasnot been p r o p e r l y rounded, t h e s u b r o u t i n e w i l l r o u n d t h e v a l u e s and
r e t u r nt h ec o r r e c t e dv a l u e s . The s u b r o u t i n er e t u r n s onevalue of VCF w i t h 5
s i g n i f i c a n tf i g u r e so fa c c u r a c yf o rc o m p u t a t i o np u r p o s e s and another VCF v a l u e
rounded t o fourdecimalplaces for p r i n t i n g purposes. The s u b r o u t i n ea l s o
o u t p u t s a s t a t u s code' foruserconvenience. The code i s s e t t o -1 i f an e r r o r
c o n d i t i o no c c u r s and t o +1 i f t h ei n p u tv a l u e sa r eo u t s i d et h el i m i t s of t h e
correlation. A s t a t u s code o fz e r oi sr e t u r n e d i f t h ei n p u tv a l u e sa r ew i t h i n
t h el i m i t so ft h ec o r r e l a t i o n . The l i m i t so ft h ec o r r e l a t i o ni n c l u d i n gt h e
e x t r a p o l a t e dr e g i o na r ed e p i c t e di n Figure X-3. The c a l l i n g programmustcheck
the flag and p r o v i d et h eu s e rw i t ha p p r o p r i a t ew a r n i n g messages o r program
term i n a t i o n .

11.1.6.2.2 SubroutineSpecifications

The range of a p p l i c a t i o n : "PI Temperature, O F


0.0 t o 40.0 0.0 t o 300.0
40.1 to 50.0 0.0 t o 250.0
50.1 t o 100.0 0.0 t o 200.0

Referenced
modules: RHOA, ALPHAA,
VCFGA, SDIVA, "YA

FORTRAN f unct
ions : FLOAT

Average
execution
time: 1890 VCF entries/CPU second
IBM 370/ 168

The s u b r o u t i n e s a r e w r i t t e n i n ANS I/ASA FORTRAN us¡ ng i n t e g e r a r i t h m e t ¡c. The


s i z e and storagerequirementsare:

1. Canpilable
source
statements 111
2. Decimal
storage
bytes 2966
3. Words 742

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
SECTION 1"VOLUME CoRRECTlON FACTORS x-89

11.1.6.2.3 C a l l i n g Sequence

CALL
TAB6A
(AP160,
DEGF, VCFC, VCFP, IFLAG)

I NPUT DESCH I PT I ON

AP160 - API g r a v i t ya 6
t 0 "F
(AP160 r e t u r n e d w i l l be rounded t o n e a r e s t 0.1 "API)

DEGF - Observed
temperature,
"F
(DEGF r e t u r n e d wi I I berounded t o n e a r e s t O. 1 "F)

OUTPUT DESCRIPTION

VCFC - Output VCF rounded t o 5 s i g n i f i c a n tf i g u r e s f o r computational


purposes
¡.e. VCFC = 1.XXXX
or VCFC = 0.XXXXX

VCFP - O u t p u t VCF rounded t o 4 d e c i m apl l a c e sf o p


r r i n t i n gp u r p o s e s
i .e.
VCFP = 1 .XXXX
or VCFP = 0.XXXX

IFLAG - S t a t u s Code

O: I n d i c a t e si n p u tv a r i a b l e sa r ew i t h i nt h er a n g e of a p p l i -
c a t i on.
|||| |||---

1: Inpud
t a t ao u t s i d el i m i t s of c o r r e l a t i o n a sg i v e ni n
|

11.1.6.
|||| |||| || || |
|||| |||| | | ||

-1: I n d i c a t e si n p u t AP160 or i n p u t DEGF o u t s i d er a n g e of


a p p l i c a t i o na sg i v e ni n 11.1.6; VCFC and VCFP s e t t o
- 1 .oooo.
|
|
| | |
--

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL*L VOL*X 80 0732290 0525955 IbI D

X-90 DATA
1 PHYSICAL PROPERTIES
CHAPTER

11.1.6.2.4 Method o f C a l c u l a t i o n

The s u b r o u t i n e e v a l u a t e s t h e e q u a t i o n

VCF = EXPI- a 6 0 A t ( 1 + 0.8 a60 A t ) ]

where A t = DEGF - 60.0

|||| |||---
|
|||| |||| || || |
141.5 *
999.012
P 60 = AP160 + 131.5

|||| |||| | | ||
|
999.012 = d e n s i t y o f w a t e r a t 60 OF, Kg/m3

|
| | |
--
A f u l le x p l a n a t i o n of t h ee q u a t i o n s and theparameters KO and K 1 may be found
i n API Standard 2540, TABLE
6,
11.1.6.

11.1.6.2.5 Examples

Theseexamples a r et u t o r i a li nn a t u r e and a r en o ti n t e n d e d t o be s u f f i c i e n t
forsubroutinecheckout. The examplesgiven i np r o c e d u r e 11.1.6.3 a r et o be
used f o r t h e computercheckout.

Examp l e 1
AP160 = 37.02
DEGF = 90.47
CALL
TAB6A (AP160, DEGF,
VCFC,
VCFP, IFLAG)
A f t e rt h ec a l l : AP160 = 37.0
DEGF = 90.5
VCFC = .98516
VCFP = .9852
IFLAG = O

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API MPMS*LL.L VOLtX B O m 0732290 0525956 OT8 m

SECTION 1"VOLUME CORRECTION FACTORS x-91

Example 2
AP160 = 47.5
DEGF = 240.0
CALL
TAB6A (AP160, DEGF,
VCFC,
VCFP, IFLAG)
A f t e rt h ec a l l : AP160 = 47.5
DEGF = 240.0
VCFC = ,89925
VCFP = .8992
I FLAG = 1

Examp l e 3
AP160 = 37.0
OEGF = 500.0
CALL
TAB6A (AP160, DEGF,
VCFC,
VCFP, IFLAG)
A f t e rt h ec a l l : AP160 = 37.0
DEGF = 500.0

VCFC = -1 .O000
VCFP = - 1 .O000
IFLAG = - 1

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL.L VOLlkX 80 0732290 0525957 T3q m

X-92 CHAPTER 11"PHYSICAL PROPERTIES DATA

1 1 . 1 A 2 . 6 FLOWCHART

INPUT:
API
GRAVITY
OBSERVEDTEMPERATURE

ROUND I N P U T DATA
TO S P E C I F I C A T I O N

S E T VCF = - 1 .O000
DATA W I T H I N No > ERROR FLAG 1 ERR = - 1
RETURN

YES

CALCULATE RHO

V
CALCULATEALPHA
--
| | |
|
|
|||| |||| | | ||
|||| |||| || || |
|
|||| |||---

i"
SET ERROR

I I

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL-L VOL*X B O m 0732290 0525958 970m

SECTIONV VOLUME
FACTORS
CORRECTION x-93

11.1.6.2.7 SubroutineListinq

TAB6A s uTbhriosu t ¡neservesastheinput/out put routine to


t h e subsequentmodulesnecessary inthecalculation of
volume c o r r e c t i o n f a c t o r from API g r a v i t y a t 60"F and
observedtemperature.

ReferencedModules

ALPHAA T h i s module i s designed t o c a l c u l a tael p h a f o r use i n


d e t e r m i n a t i o n of volume c o r r e c t i o n f a c t o r .

MPYA T h i s m o d upl ee r f o r mi nst e g m


e ru l t i p l i c a t i owni t h a maxi-
mum o f 17 d i g i t s .

RHOA T h i s module i s designed t o c a l c u l a t e a d e n s i t yv a l u e for


--
| | |

a g i v e nv a l u e of API g r a v i t y by t h ef o r m u l a
|
|
|||| |||| | | ||

141.5 * 999.012
P = (AP160 + 131.5)
|||| |||| || || |

SD I V A T h i s module i s designed t o produceadditionalaccuracy


|
|||| |||---

f r o ma ni n t e g e rd i v i d ew h e r et h en u m e r a t o ri s 10000
greaterthanthedenominator.

VCF6A T h i s module i s designed t o c a l c u l a t e volume c o r r e c t i o n


factor.

SUBROUTINE TABGA(APIGO,DEGF,VCFC,VCFP,IFLAG) 6A00001 O


C 6A000020
C ( C1) 9
C8O0P Y R I G H T 6A000030
C AMERICAN
PETROLEUM INSTITUTE 6A000040
RESERVED
RIGHTS
ALL C 6A000050
6A000060
C THIS
SUBROUTINE I S A VOLUNTARY STANDARD
AND WAS DEVELOPED 6A000070
C UNDER THE AUSPICES OF THE JOINT
API-ASTM
COMMITTEE ON S T A T I C 6A000080
PETROLEUM
C MEASUREMENT I N PART FROM DATAGENERATED 6A000090

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I M P M S X L L - L V O L X X 80 W 0732290 0525959 807 W

x-94 CHAPTER
1 PHYSICAL PROPERTIES
DATA

C BY A PROJECT
FUNDED BY THE AMERICAN PETROLEUM 6A0001 O0
C INSTITUTE AT THE U . S . NATIONAL BUREAU
OF
STANDARDS, 6A00011 O
C GAITHERSBURG, MARYLAND. 6A000120
C 6A000130
C INQUIRIES CONCERNING I TASP P L I C A T I O N SHOULD 6A000140
C BE ADDRESSED TO: 6A000150
C AMERICAN PETROLEUM INSTITUTE 6A000160
C MEASUREMENT COORDINATION 6A000170
C 2 1 0 1 N.W.
L STREET, 6A000180
C WASHINGTON, DC 2 0 0 3 7 6A000190
C 6A000200
c ................................................................... 6A00021 O
c * * 6A000220
C * T H I S SUBROUTINE OR THE MATHEMATICAL RELATIONSHIPS * 6A000230
C * REPRESENTED THEREBY MAY BE USED BY ANYONE WISHING * 6A000240
C * TO DO S O , BUT THE AMERICAN PETROLEUM INSTITUTE. * 6A000250
C * THE AMERICAN SOCIETY FOR TESTING AND MATERIALS, * 6A000260
C * THEAND INSTITUTEPETROLEUM
OFAND THEIR * 6A000270
C * RESPECTIVE MEMBERS AND THE U . S . NATIONAL BUREAU * 6A000280
C * STANDARDS,
OF SHALL NOT BE HELDRESPONSIBLE OR 8 6A000290
C * L I A B L E I N ANY
WAY
FROM LOSS OR DAMAGE, INCLUDING, * 6A000300
C * BUT NOT L I M I T E D TO, CONSEQUENTIAL DAMAGE, * 6A00031 O
C * RESULTING FROM SUCH USAGE OR FOR VIOLATION OF * 6A000320
C * ANY FEDERAL, STATE, OR MUNICIPAL LAWS, REGULATIONS * 6A000330
C * OR PRACTICESTHE OF UNITED STATES OR OF ANY * 6A000340
C * FOREIGN COUNTRY. * 6A000350
C 0 8
6A000360
C ***. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6A000370
C 6A000380
C THE
THERMAL EXPANSIONPROPERTIES (VOLUME CORRECTION FACTORS, 6A000390
C VCFS) FOR
PRODUCTS (EXCLUDING LUBE STOCKS) AND CRUDES 6A000400
C ARE
CORRELATED I N TWO SEPARATE,GENERALIZEDTABLES 6A00041 O
C AS A FUNCTION OF
TEMPERATUREAND A P I GRAVITY. THE 6A000420
C PREDICTED PRECISIONAT95 PERCENT CONFIDENCE I S : 6A000430
C 6A000440
C VCF PRECISION AT 9 5 PERCENT CONFIDENCE, PERCENT 6A000450
C 6A000460
C TEMPERATURE
1OOF 250F 200F 150F 6A000470
C CRUDES,
PRODUCTS 0.05 0.15 O0 .. 2
35 6A000480
C 6A000490
C I F THISPRECISION I S UNACCEPTABLE, I T I S RECOMMENDED 6A000500
C THATTHE ACTUAL THERMAL EXPANSIONPROPERTIES OF THE 6A00051 O
C SUBSTANCE BE MEASUREDANDTHEVCF BE DETERMINED 6A000520
C USINGTABLE 6C WITHEITHER K OR ALPHA VALUES DERIVED 6A000530
C FROM THE MEASURED DATA. THE INSTRUCTIONS FOR T H I S 6A000540
C PROCEDURE ARE GIVEN I N TABLE 6C. 6A000550
C 6A000560
C T H I S SUBROUTINE I S DESIGNED TOACCEPTAS 6A000570
C INPUTAPIGRAVITY VALUEAT 6 0F ( A P I 6 O ) AND 6A000580
C OBSERVED TEMPERATURE I N DEGREES FAHRENHEIT(DEGF) AND 6A000590
C PRODUCE THE VOLUME CORRECTION FACTOR (VCF) FOR 6A000600
C A P I TABLE 6 A , GENERALIZED CRUDE O I L S 6A00061 O
C VOLUME CORRECTION FACTOR TO 6 0F . 6A000620
C 6A000630
C T H I S SUBROUTINE CALLS THE FOLLOWING MODULES 6A000640
C RHOA 6A000650
C ALPHAA (CALLSSDIVA) 6A000660
C VCF6A (CALLS MPYA) 6A000670

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPflS*LL.Z VOL*X BO W 0732290 05257b0 529 m

SECTIONI-VOLUME CORRECTION FACTORS x-95

C 6A000680
C API6O SHOULD BE PASSED I N THENEAREST TENTH 6A000690
C OF
DEGREE A P I . THE SUBROUTINE WILL HOWEVERROUND 6A000700
C THE VALUE ANDRETURNTHECORRECTED VALUE. 6A00071 O
C 6A000720
C DEGF
SHOULD BE PASSED I N THENEAREST TENTH 6A000730
C OF
DEGREE FAHRENHEIT. THE SUBROUTINE WILL HOWEVER 6A000740
C ROUND THE VALUE ANDRETURNTHECORRECTED VALUE. 6A000750
C 6A000760
C VCFC I S THE
RETURNED VOLUME CORRECTION FACTOR 6A000770
C CORRECTTO FIVE(5)SIGNIFICANTFIGURES. 6A000780
C 6A000790
C VCFP I S THE
RETURNED VOLUME CORRECTION FACTOR 6A000800
C CORRECTTO FOUR(4)DECIMAL DIGITS. 6A00081 O
C 6A000820
C I F L A G I S THE ROUNDED STATUS CODE WHICH SHOULD 6A000830
C BE CHECKED BY THEUSER I N THE CALLING PROGRAM 6A000840
C =O NOERROR 6A000850
C =1 INPUT DATA WITHIN EXTRAPOLATION RANGES AS 6A000860
C GIVEN I NA P I2 5 4 0 , TABLE 6 , 1 1 . 1 . 6 6A000870
C =-1INPUT DATA OUTSIDESPECIFIED RANGE OF 6A000880
C APPLICATION AS GIVEN I N A P I 2 5 4 0 , 6A000890
C TABLE 6 , 1 1 . 1 . 6 6A000900
C 6A00091 O
DATA IBAS/GOO/ 6A000920
DATA IBPl,IBP2/400,500/ 6A000930
DATA NBP1/ 1O O O / 6A000940
DATA ITMP1,ITMP2,ITMP3/3000,2500,2000/ 6A000950
DATA IEP1,IEP2,IEP3/2500,2000,1500/ 6A000960
DATA IEAPI/550/ 6A000970
DATA KO, K I / 3 4 1 0 9 5 7 , 0 / 6A000980
C 6A000990
VCFC=- 1 . O000 6A001 O00
VCFP=- 1 . O000 6A001 O 1 O
IFLAG=- 1 6A001020
C 6A001030
C ROUND INPUT PARAMETERS 6A001040
C 6A001050
I A P I = A P I G Q * l O .O+O. 5 6A001060
API60=FLOAT(IAPI)/10.0 6A001070
ITEMP=DEGF * 1O . 0+0 . 5 6A001080
DEGF=FLOAT(ITEMP)/lO.O 6A001 O90
C 6A0011 O 0
C CHECK A P I RANGES 6A00111 O
C 6A001120
IF(IAPI)10,20,20 6A001130
1 0 CONTINUE 6A001140
RETURN 6A001150
20 I F ( I A P I - N B P 1 ) 3 0 , 3 0 , l O 6A001160
3 0 CONTINUE 6A001170
C 6A001180
C CHECK VALID TEMPERATURERANGES 6A001190
C 6A001200
IDT=ITEMP-IBAS 6A00121 O
IF(ITEMP)40,50,50 6A001220
40 CONTINUE 6A001230
IFLAG=- 1 6A001240
RETURN 6A001250

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
50 I F ( I A P I - I B P l ) 6 0 , 6 0 , 7 0 6A001260
60 IF(ITEMP-ITMPl)lOO,l00,40 6A001270
70 I F ( I A P I - I B P 2 ) 8 0 , 8 0 , 9 0 6A001280
80 IF(ITEMP-ITMP2)lOO,l00,40 6A001290
90 IF(ITEMP-ITMP3)lOO,l00,40 6A001300
1 O0 CONTINUE 6A00131 O
C 6A001320
c CALCULATE RHO 6A001330
C 6A001340
CALLRHOA(IAP1,IRHO) 6A001350
C 6A001360
C CALCULATE ALPHA 6A001370
C 6A001380
CALL A L P H A A ( I R H O , K O , K l , I A L F ) 6A001390
C 6A001400
C CALCULATE VCF 6A00141 O
C 6A001420
CALL V C F G A ( I A L F , I D T , I V C F ) 6A001430
IF LAG=O 6A001440
C 6A001450
C CHECK
TO DETERMINE I F I N EXTRAPOLATED REGION 6A001460
C 6A001470
IF(IAPI-IEAPI)170,170,160 6A001480
1 6 0 CONTINUE 6A001490
IFLAG=l 6A001500
GO TO 220 6A00151 O
1 7 0 IF(IAPI-IBP1>180,180,190 6A001520
1 8 0 IF(ITEMP-IEP1)220,220,160 6A001530
1 9 0 IF(IAPI-IBP2)200,200,210 6A001540
200 I~(ITEMP-IEP2)220.220,160 6A001550
21 o IF(ITEMP-IEP3)220,220,160 6A001560
220 CONTINUE 6A001570
C 6A001580
C CALCULATE PRINT AND CALCULATION VALUES OF
VCF 6A001590
C PRINT VALUE(PVCF)ROUNDED TO 4DECIMAL DIGITS 6A001600
C CALCULATIONVALUE(CVCF) ROUNDED TO 5 SIGNIFICANTDIGITS 6A00161 O
C 6A001620
JVCF=( I V C F / 1 0 0 0 + 5 ) / 1O 6A001630
PVCF=JVCF 6A001640
PVCF=PVCF/lOOOO. 6A001650
1F(1VCF-100000000)230,240,240 6A001660
230 CONTINUE 6A001670
C 6A001680
C VCF LESS THAN ONE, F I V E DECIMALS RETURNED 6A001690
C 6A001700
JVCF=(IVCF/100+5)/10 6A00171 O
CVCF=JVCF 6A001720
CVCF=CVCF/ 1 00000. 6A001730
GO
TO 250 6A001740
240 CONTINUE 6A001750
CVCF=PVCF 6A001760
250 CONT I
NUE 6A001770
VCFP=PVCF 6A001780
VCFC=CVCF 6A001790
RETURN 6A001800
END 6A00181 O

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I flPflS*:LL-L V O L * X 80 m 0732290 0525962 3TL m

CORRECTION
1-VOLUME SECTION FACTORS x-97

SUBROUTINE RHOA(IAP1,IRHO) 6A001820


C 6A001830
C T H I S MODULE I S DESIGNED TO CALCULATE A DENSITY 6A001840
C VALUE FOR A GIVEN VALUE OF A P I BY THE FORMULA 6A001850
C RHO=141 . 5 * 9 9 9 . 0 1 2 / ( A P I + 1 3 1 . 5 ) 6A001860
C I T I S ASSUMED THAT THE A P I VALUE HAS BEEN ROUNDED 6A001870
C TO THE NEAREST TENTH DEGREE A P I ANDTHE VALUE MULTIPLIED 6A001880
C BY 1 0 . THEOUTPUT VALUE OF RHO W I L L BE RETURNED 6A001890
C ASAN INTEGER ANDROUNDEDTOTHENEARESTHUNDREDTH 6A001900
C KILOGRAM/CUBIC METRE. 6A00191 O
C 6A001920
C THE VALUE 1 4 1 3 6 0 1 9 8 0 REPRESENTS 1 4 1 . 5 * 9 9 9 . 0 1 2 * 1 0 0 0 0 6A001930
C CORRECT
TO 1 0D I G I T S 6A001940
IDENOM=IAPI+1315 6A001950
IRHO=(1413601980/IDENOM+5)/10 6A001960
RETURN 6A001970
END 6A001980

SUBROUTINE SDIVA(INUM,IDENOM,IRES) 6A001990


C 6A002000
C T H I S MODULE I S DESIGNED TO PRODUCE ADDITIONAL 6A00201 O
C ACCURACY FROM AN INTEGER D I V I D E WHERE THE
NUMERATOR 6A002020
C I S 1 0 0 0 0 GREATER
THAN
THEDENOMINATOR. THESUBROUTINE 6A002030
C ASSUMES PROPER SCALING OFBOTHTHE INPUT NUMERATOR 6A002040
C ANDDENOMINATORAND WILL RETURN THE RESULTS MULTIPLIED 6A002050
C BY 1 0 0 0 0 . 6A002060
C 6A002070
IRESl=INUM/IDENOM 6A002080
IRES2=(INUM-IRES1*IDENOM)*lOOOO/IDENOM 6A002090
IRES=IRESl * 10000+IRES2 6A0021 O0
RETURN 6A00211 O
END 6A002120

SUBROUTINE ALPHAA(IRHO,KO,Kl,IALF) 6A002130


C 6A002140
C T H I S MODULE I S DESIGNED TO CALCULATE ALPHA FOR 6A002150
C USE I N DETERMINATION OF VOLUME CORRECTION 6A002160
C FACTOR. 6A002170
C 6A002180
C INPUTVARIABLES 6A002190
C IRHO==DENSITY*lOO(KILOGRAMS/CUBIC METRE) 6A002200
C KO,Kl=COEFFICIENTS OF DESIRED CURVE * 1 0 0 0 0 6A00221 O
C 6A002220
C ALGORITHM- 6A002230
C ALPHA=KO/RH0**2+Kl/RHO 6A002240
C 6A002250
C CALCULATE K1 /RHO 6A002260
C 6A002270
INUM=Kl *l O000 6A002280
C A L LS D I V A ( I N U M , I R H O , I A L F 1 ) 6A002290
C 6A002300
C CALCULATE KO/RH0**2 6A00231 O
C 6A002320

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I M P M S * L L = L VOL*X 80 W 0732290 0525963 238 W

X-96 CHAI'TER 11"PHYSICAL PRoPERTlES DATA

INUM=KO * 1O0 6A002330


CALLSDIVA(INUM,IRHO,IALFS) 6A002340
C A L LS D I V A ( I A L F S , I R H O , I A L F 2 ) 6A002350
I A L F = ( I A L F l + I A L F 2 + 5 0 0) / l o 0 0 6A002360
RETURN 6A002370
END 6A002380

SUBROUTlNE V C F G A ( I A L F , I D T , I V C F ) 6A002390
C 6A002400
C T H I S MODULE I S DESIGNED TO CALCULATE VOLUME 6A00241 O
C CORRECTION FACTOR. ALTHOUGH ALL CALCULATIONS ARE DONE 6A002420
C AS INTEGERS, THE SUBROUTINE RETURNS WITHA8 6A002430
C OR 9 D I G I T VALUE DEPENDENTUPON WHETHER I D T 6A002440
C I S POSITIVE OR NEGATIVE. 6A002450
C 6A002460
C ALGORITHM- 6A002470
C VCF=EXP(-ALPHA*DT(l.O+0.8*ALPHA*DT)) 6A002480
C 6A002490
C CALCULATE ALPHA*DT 6A002500
C 6A00251 O
ITERMl=IALF*IDT 6A002520
C 6A002530
C CALCULATE 0 . 8 *ALPHA
*DT 6A002540
C 6A002550
ITERM2=ITERM1/5*4 6A002560
C 6A002570
C CALCULATE EXPONENT-ALPHA*DT(l.O+0.8*ALPHA*DT) 6A002580
C 6A002590
CALL MPYA(ITERMl,ITERM2,1TERM3) 6A002600
I X = - ( ITERM1 +ITERM3) 6A00261 O
C 6A002620
C CALCULATE EXPONENTIAL(F1RST7 TERMS
OF POWER SERIES) 6A002630
C 6A002640
ISUM1=1 O O O O O O O O + I X 6A002650
CALLMPYA(IX,IX,ISUM2) 6A002660
ISUM2=ISUM2/2 6A002670
CALLMPYA(IX,ISUM2,ISUM3) 6A002680
ISUM3=ISUM3/3 6A002690
CALLMPYA(IX,ISUM3,ISUM4) 6A002700
ISUM4=ISUM4/4 6A00271 O
CALLMPYA(IX,ISUM4,ISUMS) 6A002720
ISUMS=ISUM5/5 6A002730
CALLMPYA(IX,ISUM5,ISUM6) 6A002740
ISUM6=ISUM6/6 6A002750
IVCF=ISUM1+ISUM2+ISUM3+ISUM4+ISUM5+ISUM6 6A002760
RETURN 6A002770
END 6A002780

SUBROUTINE M P Y A ( I X , I Y , I Z ) 6A002790
C 6A002800
C T H I S MODULE
PERFORMS INTEGER MULTIPLICATION. THE TOTAL 6A00281 O
C NUMBER OF D I G I T S I N I X AND I Y MUST
NOT
EXCEED 1 7 . OTHER 6A002820
C WISE, OVERFLOW W I L L OCCUR. 6A002830

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
SECTIONV VOLUME CORRECTION FACTORS x-99

6A002840
IU1 = I X / 10000 6A002850
K1 = 10000 * IU1 6A002860
IV1 = I X - K1 6A002870
IU2 = I Y / 10000 6A002880
K2 = 10000 * IU2 6A002890
IV2 = I Y - K2 6A002900
K3 = I U 1 * IV2 +
IU2 * IV1 +
I V 1 * I V 2 / 10000 6A00291 O
I Z = (K3 + 5000) / 10000 I U I * IU2 + 6A002920
RETURN 6A002930
END 6A002940

11.I.6.3 IMPLEMENTATION PROCEDUREFOR SUBROUTINE TABGA

I nt o d a y ‘ sw o r l dt h e r ei s a r a p i d l yd e v e l o p i n gt r e n d t o usecomputers in
c u s t o d yt r a n s f e r measurements, a c c o u n t i n g work, processcontrolsystems, and a
varietyofother useswhere t a b l e s must be i n c o r p o r a t e d i n t o computercodes.
Y e t many o f t h e p r i n t e d t a b l e s a r e a l m o s t i m p o s s i b l e t o codedue to the fact
t h a t someone has s l i g h t l y m o d i f i e d s e l e c t e d v a l u e s t o d i f f e r from t h o s e
o b t a i n e du s i n gt h em a t h e m a t i c a le x p r e s s i o nt h a ts u p p o s e d l yg e n e r a t e dt h e
tables. T o overcome t h i s problem i t i s o f t e n r e q u i r e d t o add e x t e n s i v e excep-
t iontablestothe codes. T h i s makes t h e codes l a r g e and cumbersome t o modify,
and r e s t r i c t s t h e i r u s e t o largercomputer systems. A l s o w i t ht h e development
o fb e t t e rm e a s u r i n gd e v i c e s i t i so f t e np o s s i b l et og a i n more d i g i t s o f p r e c i -
sioninthetable p a r a m e t e r s ,n e c e s s i t a t i n gf i n e rg r i do ft h et a b u l a rv a l u e s ,
r e s u l t i n gi nl a r g e r volumes o f p r i n t e d t a b l e s t o be handled.
I na d d i t i o n , as t h e o n - l i n e u s e of computers f o rm e t e r i n gp u r p o s e s
--
| | |

i n c r e a s e s ,t h ed i r e c tu s eo fp r i n t e dt a b l e sw i l l decrease;therefore,the new
|
|

Standard i s an e x p l i c i ti m p l e m e n t a t i o np r o c e d u r er a t h e rt h a n a s e to f equa-
|||| |||| | | ||

t i o n so r a s e to ft a b l e s . I t must be remembered t h a tt h es t a n d a r d i z a t i o no f
|||| |||| || || |

t h ei m p l e m e n t a t i o np r o c e d u r ei m p l i e ss t a n d a r d i z a t i o n of t h e s e t o f mathernati-
calexpressions used w i t h i n t h e code. Absoluteadherence tothe procedure
|

willhelptoinsurethatall computers and computercodes of t h ef u t u r e , meet-


|||| |||---

i n gt h es p e c i f i c a t i o n s and r e s t r i c t i o n s , w i l l be a b l et op r o d u c et h e same
results. I t i s b e l i e v e dt h a tt h i sp r o c e d u r ew i l la l l o wf o rt h e maximum
machine and codeindependence.The procedure was implemented i n computer sub-
r o u t i n e si s s u e d by API i n 1980 u s i n g ANSI/ASA FORTRAN. The subroutinesmaxi-
m i z e dp r e c i s i o n by t h eu s eo f3 2 - b i ti n t e g e ra r i t h m e t i c .

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL-L VOL*X 80 m 0732290 05259b5 O00 m

x-1O0 1 P PHYSICAL PROPEW~IES


CHAPTER DATA

The p r o c e d u r ea sd e s c r i b e di nt h ef o l l o w i n gt e x t can, by c a r e f u l and


d e l i b e r a t ea p p l i c a t i o n of numericalanalysis, be used w i t h t h e m a j o r i t y o f
languages and word s i z e si np r e s e n to ra n t i c i p a t e d use. To u s et h es t a n d a r d
procedure means t o m a i n t a i n a b s o l u t e and unwaveringadherence t o t h e number o f
digits specified at each s t e p and t o t h e c a l c u l a t i o n p r o c e d u r e a s o u t l i n e d .
I nt h ep r o c e d u r e ,t h en o m e n c l a t u r e used i s t h a t o f ASTM E380-76, unless
an e x p l i c i tp r o c e d u r e is g i v e n below, i n whichcase theproceduregiven below
overrides that g ¡ven by ASTM E380-76.
I nt h ep r o c e d u r et h en o m e n c l a t u r e (XXX.XX) means f i v e ( 5 ) m a t h e m a t i c a l l y
significant digits.
The termroundingas used i n t h e p r o c e d u r e means: Consider only the
first digit to the right of thedesiredposition and
a. I f t h a td i g i ti sg r e a t e rt h a n 4, incrementthe d e s i r e dp o s i t i o n by
one and d r o p t h e r e m a i n i n g d i g i t s t o t h e r i g h t o f t h ed e s i r e dp o s i -
t ion.
b. I f t h a td i g i ti sl e s st h a n 5, s i m p l yd r o pt h er e m a i n i n gd i g i t st o
t h e r i g h t of thedesiredposition.
A l l c o n s t a n t sa r e used t o e x a c t l y t h e number o f d i g i t s p r i n t e d .

CalculationProcedure
--
| | |

STEP 1: Round i n p u tv a r i a b l e s of API g r a v i t y and observedtemperature


|
|
|||| |||| | | ||

a. Round P I g r a v i t yt ot h en e a r e s t
0.1 " P I and c a r r ya s 4 digitresult
|||| |||| || || |

¡.e. API g r a v i t(yA P I 6 0 ) = XXX.X


b.
Round observedtemperature t ot h en e a r e s t
|
|||| |||---

0.1 " F and c a r r y a s 4 digit result


¡.e. observed
temperature (DEGF) = XXX.X

STEP 2: Conversion t o d e n s i t y i n Kg/m3

Note: 141.5 * 999.012 = 141360.1980 and mustbe c a r r i e dt o 10


significant digits.
Round p t o n e a r e s t 0.01
¡.e. p = XXXX.XX

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL*L VOL*X 80 m 0732290 0525966 T147 m

FACTORS
SECTIONVOLUME CORRECTION x-101

STEP 3 : Choose t h ea p p r o p r i a t ev a l u e s of KO and K 1 a sd e s c r i b e di n AF’I Stan-


dard 2540, TABLE 6 , 11.1.6
Ko i s a 7 d i g i t c o n s t a n t
I .e. KO = XXX.XXXX
K I i s a4 digitconstant
I .e. K1 = .XXXX

STEP 4 :C a l c u l a t i o n o f a l p h a( c o e f f i c i e n t o f thermalexpansion)

|||| |||---
KO K1
- +-

|
define U =

|||| |||| || || |
P2 p

|||| |||| | | ||
a. KO
Evaluate 7
PL
K
A

|
a( 1 Compute = .XXXXXXXX

|
| | |
P

--
a (2 1 Compute KO’P = .oooxxxxxxx
P

b. K1
Evaluate -
P
K
b( 1 ) 1 = .OOOXXXXXXX
o

c. Sum r e s u I t s o f a ( 2 ) and b ( 1 ) and round t o n e a r e s t 0.0000001


I .e. ci = .oooxxxx

STEP 5: Calculate A t
def¡ne A t = DEGF - TBASE
Note: TBASE c a r r i e d to 3 d i g i t s XX.X (60.0)
Carry A t = XXX.X

STEP 6 : C a l c u l at i o n o f VCF
d e f i n e VCF = EXP[- crAt(l.0 + 0.8 a A t ) l
= E X P I - aAt - 0.8 a’ At‘]
a. Cal cu I a t ion o f exponent
a(1) U A t = .XXXXXXXX
a(2) .8 U A t = .XXXXXXXX

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
x-102 CHAPTER
1 PHYSICAL PROPERTIES
DATA

a(3) .8 a2 A t 2 = .OXXXXXXX
a(4) -aAt - 0.8 a2 A t 2 = 0.XXXXXXXX w i t h any t r a i l i n g
d i g i t s dropped
b. C a l c u l a t i o n of e x p o n e n t i a l
VCF = EXP[- a A t - 0.8 A t 2 ] = X.XXXXXX
using at least the first 7 terms o f t h e power s e r i e se x p a n s i o n
o fe x

1.XXXX rounded t on e a r e s t 0.0001 > 1


i f VCF -
Computational
v a l u e o f VCF
0.XXXXX rounded t o n e a r e s t 0.00001 i f VCF < 1

Tab l e va I ue
o f VCF = X.XXXX rounded VCF t o n e a r e s t 0.0001

The 1980 integer FORTRAN code issued by A P I contained both an integer


division and an integer multiplication algorithm. A description of each is
--

contained in the following.


| | |
|
|
|||| |||| | | ||

INTEGEP MULTIPLICATION PROCEDURE


(FOR 32 B I T ARITHMETIC)
|||| |||| || || |

DATA DEFINITION

9
*
|

X, Y a r ei n t e g e r numbers t h a t a r e equal t o or l e s st h a n 2 10
|||| |||---

( s l i g h t l yl e s st h a n z3’). A l a r g e rv a l u e may c a u s eo v e r f l o w .I na d d i t i o n ,
thetotal number o f d i g i t s i n X and Y mustnotexceed 17, o t h e r w i s eo v e r f l o w
w i l l occur.
Z i tsh p
er o d u c t XY s c a l e d by ¡.e. Z = XY/108.
Note: I f i t i s d e s i r a b l e t o o b t a i n maximum p r e c i s i o n , X and Y may be
s c a l e d up p r i o r t o use of t h ep r o c e d u r e .T y p i c a l l y ,a tl e a s t 15 d i g i t s a r e
needed t o o b t a i n 6 d i g i t p r e c i s i o n , 16 f o r 7 and 17 f o r 8.
The l a r g e s t v a l u e s of X and Y t h a t may be used a r e 2 O00 O00 O00 and
99999999.

CALCULATION
x/10000 = u1
10000 U1 = K 1
X - KI = V1

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL.L VOL*X B O m 0732290 0525968 8 L T m

SECTIONVOLUME
FACTORS
CORRECTION X-103

Y/1 O000 = u2
10000 U2 = K 2
Y - K2 = V2
(U1V2) + (U2V1) + (V1V2/10000) K3
( K 3 + 5000)/10000 + (U1U2) = Z
Note: Z hasbeensca I ed by
and may have t o be r e s c al e db e f o r e use.
TOTAL DIGITS
IN X AND Y 12151413
1716" " "

DIGITS I N PRODUCT, Z 3-4 4-5 5-6 6-7 7-8 8-9

INTEGER DIVISION PROCEDURE


(FOR 32 BIT ARITHMETIC)

DATA DEFINITION

X, Y a r ei n t e g e r numbers such t h a t X i s equal t o or l e s st h a n 232 - 1


and Y i s of o r d e r o f magn i t u d e lo4 I ess than X.

R i s thequotient of 2 scaledby
Y
l o 4 , ¡.e. R =x
Y
* lo4.

Note: I f i t i s d e s i r a b l e t o o b t a i n maximum p r e c i s i o n , X and Y may be


s c a l e d up p r i o r t o use of t h ep r o c e d u r e .T y p i c a l l yt h e more d i g i t s t h a t a r e
carriedinboth X and Y, t h e more a c c u r a t e d i g i t s on o u t p u t .

CALCULATION
X/Y = u1
U1Y = Kt
X - K1 = V1
V1/Y = u2

U1 * 10000 + U2 = R
Note: R hasbeen scaled by lo4 and may have t o be r e s c al e db e f o r e use.

Examples ForCheckout

The f o l l o w i n g examples aredesiyned to aid in checkoutproceduresfor


b o t ht h ee x i s t i n y API s u b r o u t i n e and any subroutineswhicharedevelopedusiny
t h ei m p l e m e n t a t i o np r o c e d u r eo u t l i n e d above. The l i n e s of t h e examples a r e

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
numbered t o correspond t o t h e c o r r e s p o n d i n g l i n e s w i t h i n t h e c a l c u l a t i o n p r o -
cedure.

EXAMPLE 1: Assume a crude o i l w i t h an i n p u t API g r a v i t y c o r r e c t e d t o 60 O F of


24.99 OAPl andan observedtemperature of 105.03 'F. C a l c u l a t et h e
VCF r e q u i r e d t o c o r r e c t t h e volume t o 60 OF, c o r r e c t t o 4 decimal
digits.

STEP 1: a. rounded AP160 = 25.0


b. rounded DEGF = 105.0

STEP 2: p rounded t o n e a r e s t 0.01 Kg/m3


p = 903.26

STEP 3: KO = 341.0957 (as of May 1, 1980)


Ky = 0.0 (as of May 1 , 1980)

'STEP 4: a. Eva I uate -


KO
2
P

K
a( 1 ) 2 = 0.37762737
P

a(2) -
KO/P
= 0.0004180716
P

b. Evaluate -
K1
--

P
| | |
|
|
|||| |||| | | ||
|||| |||| || || |

C. U = 0.0004181
|
|||| |||---

STEP 5: A t = 45.0

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LLoL VOLXX BO m 0732270 0525770 9 7 8 m

SECTION V VOLUME CORRECTION


FACTORS X-105

STEP 6 : C a l c u l a t i o n of VCF
a. C a l c u l a t i o n of exponent
a(1) 0.01881450
a(2) 0.01505160
a(3) 0.00028318
a(4) -0.01909768
b. C a l c u l a t i o n of exponential
VCF = 0.981083

VCF c o r r e c t t o 4 decimal d i g i t s = 0.9811

EXAMPLE 2: Assume a crude o i l w i t h an i n p u t API g r a v i t y c o r r e c t e d t o 60 "F o f


50.0 "PI and an observedtemperature o f 39.1 "F. C a l c u l a t et h e
VCF r e q u i r e d t o c o r r e c t t h e volume t o 60 "F, correct to 5 signifi-
c a n tf i g u r e s .

STEP 1 : a. rounded AP160 = 50.0


b. rounded DEGF = 39.1

STEP 2: p rounded to n e a r e s t 0.01 Kg/m3


p = 778.84

STEP 3 : K O = 341 .O957 ( a s o f May 1, 1980)


K1 = 0.0 ( a s of May 1, 1980)

STEP 4: a. Eva I u a t e KO
2
-
P
K
a( 1 ) 2= 0.43795349
P

KO/P
a(2) = 0.000562315
P

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
X-106 1 P PHYSICAL PROPERTIES
CHAPTER DATA

b. Evaluate K 1
P

K
b(l1 1 = o .o

|||| |||---
P

|
cc = 0.0005623

|||| |||| || || |
C.

|||| |||| | | ||
STEP 5: A t = -20.9

|
STEP 6 :C a l c u la t i o no f VCF

|
| | |
a. C a l c u l a t i o n o f exponent

--
a(1) -0.01175207
a(2) -0.00940165
a(3) 0.0001
1048
a(4) 0.01 164159
b. C a l c u l a t i o noef x p o n e n t i a l
VCF = 1.011709

VCF c o r r e c t t o 5 s i g n i f i c a n t f i g u r e s 1.0117

EXAMPLE 3 : Assume a c r u d e o i l w i t h an i n p u t AF'I g r a v i t y c o r r e c t e d t o 60"F of


8.7 " P I and
an o b s e r v e dt e m p e r a t u r eo f 269.4
"F. C a l c u l a t et h e
VCF r e q u i r e d t o c o r r e c t t h e volume t o 60 OF, c o r r e c t t o 5 s i g n i f i -
cantfigures.

STEP 1 : a. rounded W160 = 8.7


b. rounded DEGF = 269.4

STEP 2: p rounded t on e a r e s t 0.01


Kg/m3
= 1008.28

STEP 3: KO = 341.0957 ( a so f May 1, 1980)


KI = 0.0 (oafs May 1, 1980)

STEP 4 : a. E v a l u a t e KO -
PZ

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
SECTION
1-VOLUME CORRECTION
FACTORS X-107

K
a( 1 1 2 = O .33829462
P

KO/p
a(2) - = 0.0003355165
P

b. Evaluate -
K1
P

K
b(1) = 0.0
P

c. a = 0.0003355

STEP 5: At = 209.4

STEP 6 : Calculation of VCF

a. Calculation of exponent
a( 1 ) 0.07025370
a ( 21 O .O5620296
a ( 31 O .O0394846
a(4)-0.07420216
b. Calculation of exponential
VCF = ,928483

VCF correct to 5 significant figures= 0.92848

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
11.1.6.4TABLE 6 H E N E R A L I Z E D PRODUCTS, The volume correction factorsgiven in this table are
CORRECTION OF VOLUME TO 60°F based on data from the U.S. National Bureau of Stan-
AGAINST API GRAVITY AT 60°F dards and from other published data. Portions of the

|||| |||---
gravity and temperature ranges represent areas beyond
these data. Thus, mathematical techniques were em-

|
|||| |||| || || |
TABLE 6B gives volume correction factors for con- ployed to extrapolate beyond the gravity and tempera-
vertingproduct volumes observed attemperatures ture ranges of the given data to determine the volume
other than 60°F to corresponding volumes at 60°F. correction factors for these areas. These factors are

|||| |||| | | ||
The volume correction factorsgiven in this table are denoted by an asterisk (*). Extension of this table be-
the result of a computer procedure which is the Stan- yond the ranges shown is not recommended.
dard (see 11.1.6.5 and 11.1.6.6). All of these volumes

|
Increments usedin this table for determining volume

|
are at saturation conditions. Pressure correctionsfrom

| | |
correction factors are0.5"Fand 0.5"API gravity. Inter-
saturation are not included. polation between either temperature or gravity is not

--
The temperature ranges of this table are: intended since thereis no practical method of interpola-
tion thatwill produce theaccuracy obtainable from the
"API "F Standard.
O to 40 O to 300
40 to 50 O to 250 This table must be entered with a known API
50 to 85 o to 200 gravity at 60°F and with anobserved temperature.

11.1.6.5 PROGRAM DOCUMENTATION FOR SUBROUTINE T A B 6 L


GENERALIZED PRODUCTS, CORRECTIONOF VOLUME TO 60°F
AGAINST API GRAVITY AT 60°F

The t h e r m a le x p a n s i o np r o p e r t i e s( v o l u m ec o r r e c t i o nf a c t o r s , VCF's) for


p r o d u c t s( e x c l u d i n gl u b es t o c k s ) and c r u d e sa r ec o r r e l a t e di nt w os e p a r a t e
g e n e r a l i z e dt a b l e s as a f u n c t i o no ft e m p e r a t u r e and API g r a v i t y . The pre-
d i c t e dp r e c i s i o na t 95% confidence is:

VCF P r e c i s i o n a t 95% Confidence, $

Temperature 100 OF 150 "F 200 "F 250 OF


Crudes B P r o d u c t s -
+O .O5 .15 .25 .35

I f t h i sp r e c i s i o ni su n a c c e p t a b l e , i t i s recommended t h a tt h ea c t u a lt h e r m a l
e x p a n s i o np r o p e r t i e so ft h es u b s t a n c e be measured and t h e VCF be determined
u s i n g TABLE
6C with either K or a l p h a v a l u e s d e r i v e d from t h e measureddata.
The i n s t r u c t i o n s f o r t h i s p r o c e d u r e a r e g i v e n i n TABLE
6C.

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL.L VOL*X 80 m 0732290 0525974 O13 m

SECTIONVOLUME CORRECTION FACTORS x-1o9

ABSTRACT

Subrout i ne T i t l e : TAB68 - TABLE 68, GeneralizedProducts,


Volume C o r r e c t i o n t o 60 OF.

Description: Thissubroutineisdesignedtocalculatethe
volume c o r r e c t i o n f a c t o r r e q u i r e d t o c o n v e r t
a volume a t an observedtemperature to the
corresponding volume a t 60 O F assuming t h e
substance canbe c h a r a c t e r i z e da s a product.

Program Responsibility: AmericanPetroleum Institute


Measurement C o o r d i n a t i o n
2101L Street, N.W.
Washington, D.C. 20037

Date I ssued : August 1980

Language: FORTRAN, ANSI/ASA Standard

Reference: API Standard 2540, TABLE


6,
11.1.6

THIS SUBROUTINE WAS DEVELOPED USING THE MATHEMATICALALGORITHMS


AND SPECIFICATIONS DESCRIBED IN THE DOCUMENT
PROCEDURE 11.1.6.6.
ANY MODIFICATIONS TO THIS SUBROUTINE
MUST RIGIDLY ADHERE
TO THE SAME ALGORI THMS AND SPECIFICATIONS.

11.1.6.5.1 Introduction

TAB66 i s a computersubroutinedesigned to calculate the volume c o r r e c -


tionfactor (VCF) necessary t o c o n v e r t a volume of a g e n e r a l i z e d p r o d u c t a t a
s p e c i f i e dt e m p e r a t u r ei nd e g r e e sF a h r e n h e i t (OF) and of a s p e c i f i e d 60 OF
g r a v i t yi n degrees API ( " A P I ) t ot h ee q u i v a l e n t volume a t 60 "F. Thesubrou-
-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
x-110 CHAPTER 11"PHYSICAL PROPERTIES DATA

t i n e a c c e p t sa si n p u tt h e API g r a v i t y a t 60 "F rounded t o t h e n e a r e s t 0.1 "APl


and theobservedtemperaturerounded t ot h en e a r e s t 0.1 "F. I fe i t h e ri n p u t
v a l u e has n o t been p r o p e r l y rounded, t h e s u b r o u t i n e will roundthevalues and
r e t u r nt h ec o r r e c t e dv a l u e s . The s u b r o u t i n er e t u r n s o n ev a l u eo f VCF w i t h 5
s i g n i f i c a n tf i g u r e so fa c c u r a c y f o r computationpurposes and another VCF v a l u e
rounded t o f o u r d e c i m a lp l a c e sf o rp r i n t i n gp u r p o s e s . The s u b r o u t i n ea l s o
o u t p u t s a s t a t u s code foruserconvenience. The code i s s e t to - 1 i f an e r r o r
c o n d i t i o no c c u r s and t o + l i f t h ei n p u tv a l u e sa r eo u t s i d et h el i m i t so ft h e
--
| | |

correlation. A s t a t u s code o fz e r oi sr e t u r n e d i f t h ei n p u tv a l u e sa r ew i t h i n
|
|

t h el i m i t s of t h ec o r r e l a t i o n . The l i m i t so ft h ec o r r e l a t i o ni n c l u d i n gt h e
|||| |||| | | ||

e x t r a p o l a t e dr e g i o na r ed e p i c t e di n Figure X-4. The calling program must check


|||| |||| || || |

the flag and p r o v i d e t h e u s e r w i t h a p p r o p r i a t e w a r n i n g messages o r program


termination.
|
|||| |||---

11.1.6.5.2 S u b r o u t i n eS p e c i f i c a t i o n s

The range of a p p l i c a t i o n : "AP I Temperature,


"F
0.0 t o 40.0 0.0 t o 300.0
40.1 t o 50.0 0.0 t o 250.0
50.1 t o 85.0 0.0 t o 200.0

Referenced modules: RHOB,


ALPHAB,
VCF6B,
SDIVB, MPYB

FORTRAN ions:
funct FLOAT

Average
execution
time: 1845 VCF entries/CPU second
IBM 370/168

The s u b r o u t i n e sa r ew r i t t e ni n ANSI/ASA FORTRAN u s i n gi n t e g e ra r i t h m e t i c . The


s i z e and s t o r a g e r e q u i r e m e n t s a r e :

1. Compilable
source
statements 133
2. Decimal
storage
bytes 3212
3. 803

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I M P M S * L L - L VOL+X 80 0732290 0525976 996

SECTIONV VOLUME CORRECTION FACTORS x-111

11.1.6.5.3 C a l l i n g Sequence

CALLTAB6B(AP160, DEGF,
VCFC,
VCFP, IFLAG)

I NPUT DE SCH I P T I ON

AP160 - API g r a v i t ya t 60 "F


( A P 1 6 0 r e t u r n e dw i l l be rounded t o neares? 0.1 "API)

DEGF - Observed
temperature, "F
(DEGF r e t u r n e d wi I I be rounded t o n e a r e s t O. 1 " F )

OUTPUT DESCRIPTION

VCFC - O u t p u t VCF rounded t o 5 s i g n i f i c a n t f i g u r e s for computational


purposes
--
| | |

¡.e. VCFC = 1.XXXX


|
|

or VCFC = 0.XXXXX
|||| |||| | | ||

-
|||| |||| || || |

VCFP O u t p u t VCF rounded t o 4 d e c i m a lp l a c e sf o rp r i n t i n gp u r p o s e s


¡.e. VCFP = 1.XXXX
|

or VCFP = 0.XXXX
|||| |||---

IFLAG - St a t u sCode

O: I n d i c a t e si n p u tv a r i a b l e sa r ew i t h i nt h er a n g eo fa p p l i -
cation.

1: I n p u td a t ao u t s i d el i m i t s of c o r r e l a t i o n a sg i v e ni n
11.1.6.

-1: I n d i c a t e si n p u t AP160 o r i n p u t DEGF o u t s i d er a n g eo f


a p p l i c a t i o na sg i v e ni n 11.1.6; VCFC and VCFP s e t t o
-1 .oooo.

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I M P M S * L L - L V O L X X 80 0732290 0525977 8 2 2 m

x-112 DATA
CHWTER1i-PHYSICAL PROPERTIES

11.1.6.5.4 Method o f C a l c u l a t i o n

The s u b r o u t i n e e v a l u a t e s t h e e q u a t i o n

141.5 *
999.012
60 = AP160 + 131.5

999.012 = d e n s i t y o f w a t e r a t 60 OF, Kg/m3

A f u l le x p l a n a t i o no ft h ee q u a t i o n s and theparameters KO and K 1 may be found


i n API Standard 2540, TABLE
6, 11.1.6.

11.1.6.5.5 Examples

Theseexamples aretutorial i n n a t u r e and a r en o ti n t e n d e d t o be s u f f i c i e n t


--
| | |

f o rs u b r o u t i n ec h e c k o u t . The examplesgiveninprocedure 11.1.6.6 a r e t o be


|
|
|||| |||| | | ||

used f o r t h e computercheckout.
|||| |||| || || |

Example 1
P 1 6 0 = 37.02
|
|||| |||---

DEGF = 90.47
CALL
TAI366 (AP160, DEGF, VCFC,
VCFP, IFLAG)
A f t e rt h ec a l l :W 1 6 0 = 37.0
DEGF = 90.5
VCFC = .98562
VCFP = .9856
I FLAG = O

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
SECTION1-VawE CORRECTION FACTORS X-1 13

Examp I e 2
W160 = 27.5
DEGF = 270.0
CALL
TAf36B (AP160, DEGF,
VCFC,
VCFP, IFLAG)
A f t e rt h ec a l l :W 1 6 0 = 27.5
DEGF = 270.0
VCFC = -90658
VCFP = .9066
IFLAG = 1

Example 3
W160 = 37.0
DEGF = 500.0
CALL
TAI368 (AP160, DEGF,
VCFC,
VCFP, IFLAG)
A f t e rt h ec a l I: W160 = 37.0
DEGF = 500.0
VCFC = -1.0000
VCFP = - 1 .O000
IFLAG = - 1

|||| |||---
|
|||| |||| || || |
|||| |||| | | ||
|
|
| | |

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
--

User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API flpflS+Ll,.l, V O L * X B O m 0732290 0525979 bT5 m

X-1 14 CHAPTER1 PHYSICAL PF~OPERTIES


DATA

11.1.6.5.6 FLOWCHART

I INPUT:
API
GRAVITY
OBSERVED TEMPERATURE

ROUND INPUT DATA


TO SPECIFICATION
--
| | |
|
|
|||| |||| | | ||

SETVCF = -1.0000
DATA W I T H I N No > ERROR FLAG I ERR = - 1
RETURN
|||| |||| || || |
|
|||| |||---

CHOOSE APPROPRIATE

ICALCULATE RHO

I CALCULATE ALPHA I


CALCULATE VCF

I S DATA I N
EXTRAPOLATED

U
SET ERROR
FLAG = O I SET ERROR
FLAG,- 1 I
I

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API M P M S * L L * L V O L X X 80 m 0732290 0525980 317 m

SECTIONVOLUME CORRECTION FACTORS X-1 15

11.1.6.5.7 SubroutineListing

TABGB T hsiusb r o u t i sneer v e s as t hi nep u t / o u t pruotu t i nt oe


t h e subsequentmodulesnecessary inthecalculation of
volume c o r r e c t i o n f a c t o r f r o m API g r a v i t y a t 60 O F and
observedtemperature.

ReferencedModules

ALPHAB T h i s module i s designed tcoa l c u l a tael p hfao r use i n


d e t e r m i n a t i o no f volume c o r r e c t i o n f a c t o r .

MPY B T h i s m o d upl ee r f o r mi nst e g m


e ru l t i p l i c a t i owni t h a maxi-
mum of 17 d i g i t s .

RHOB T h i s module i s designed t o c a l c u l a t e a d e n s i t y v a l u e f o r


a g i v e nv a l u e of API g r a v i t y by t h ef o r m u l a

141.5 * 999.012
P = (AP160 + 131.5)

SD I VB T h i s module i s designed t o produceadditionalaccuracy


from a ni n t e g e rd i v i d e where thenumerator i s 10000
greaterthanthedenominator.

VCF6B T h i s module i s designed t o c a l c u l a t e volume c o r r e c t i o n


factor.

SUBROUTINE TABGB(APIGO,DEGF,VCFC,VCFP,IFLAG) 6800001 O


68000020
(C)COPYRIGHT 1980 68000030
AMERICAN PETROLEUM I N S T I T U T E 68000040
ALLRIGHTS RESERVED 66000050
68000060
T H I S SUBROUTINE IS A VOLUNTARYSTANDARDAND WAS DEVELOPED 68000070
UNDER THE AUSPICES OF THE JOINTAPI-ASTM COMMITTEE ON STATIC 68000080
PETROLEUM MEASUREMENT I N PART FROM DATA
GENERATED 68000090
BY A PROJECT FUNDED BY THE AMERICAN PETROLEUM 660001 O0

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL.L VOL*X 80 W 0732290 0525981 253 W

X-116 CHAPTER1 P PHYSICAL PROPERTIES


DATA

INSTITUTE
C AT THE U . S . NATIONAL BUREAU OF STANDARDS, 680001 1O
GAITHERSBURG,
C MARYLAND. 680001 20
C 680001 30
C I N Q U I R I E S CONCERNING I TASP P L I C A T I O N SHOULD 680001 40
C BE ADDRESSED TO: 680001 5 0
RICAN C PETROLEUM I N S T I T U T E 68000160
C MEASUREMENT COORDINATION 68000170
C N.W.STREET,
2101 L 68000180
C WASHINGTON, DC 2 0 0 3 7 680001 90
C 68000200
c ............................................................ 6800021O
c * * 68000220
C * T H I S SUBROUTINE OR THE
MATHEMATICAL
RELATIONSHIPS * 68000230
C * REPRESENTED THEREBY MAY BE USED BY ANYONE WISHING * 68000240
C * DOTO S O , BUT
THE AMERICAN PETROLEUM I N S T I T U T E , * 68000250
C * THE AMERICAN SOCIETY FOR TESTING AND MATERIALS, * 68000260
C * AND THE INSTITUTE OF PETROLEUM AND THEIR * 68000270
C * RESPECTIVE MEMBERS AND THE U . S . NATIONAL BUREAU * 68000280
C * OF STANDARDS, SHALL NOT BE HELD RESPONSIBLE OR * 68000290
C * L I A B L E I N ANY WAY
FROM LOSS OR DAMAGE, INCLUDING, * 68000300
C * BUT NOT L I M I T E DCONSEQUENTIAL
TO, DAMAGE, * 6800031O
C * RESULTING FROM SUCH USAGE OR FOR VIOLATION OF * 68000320
C * ANY FEDERAL, STATE, OR MUNICIPAL LAWS, REGULATIONS
1 68000330
C * OR PRACTICES OF THE UNITED STATES OR OF ANY * 68000340
C * FOREIGN COUNTRY. * 68000350
c * * 68000360
c ............................................................ 68000370
C 66000380
C THE THERMAL EXPANSIONPROPERTIES (VOLUME CORRECTION FACTORS, 68000390
C VCFS) FOR
PRODUCTS (EXCLUDING LUBE STOCKS) ANDCRUDES 68000400
C ARE CORRELATED I N TWO SEPARATE,GENERALIZEDTABLES 6800041O
C AS AFUNCTION OF TEMPERATURE AND APIGRAVITY. THE 68000420
C PREDICTED PRECISION AT 9 5 PERCENT CONFIDENCE I S : 68000430
C 68000440
C VCF PRECISION AT 9 5 PERCENT CONFIDENCE, PERCENT 68000450
C 68000460
C TEMPERATURE lOOF 150F 200F 250F 68000470
C CRUDES, PRODUCTS 0 . 0 5 0.15 0.25 0.35 66000480
C 68000490
C I F THISPRECISION I S UNACCEPTABLE, I T I S RECOMMENDED 66000500
C THAT THE ACTUAL THERMAL EXPANSIONPROPERTIES OF THE 6800051O
C SUBSTANCE BE MEASURED AND THEVCF BEDETERMINED 68000520
C USING TABLE6C WITHEITHER K OR ALPHA VALUES DERIVED 68000530
C FROM THE MEASURED DATA. THE INSTRUCTIONS FOR T H I S 68000540
C PROCEDURE ARE GIVEN I N TABLE6C. 68000550
C 68000560
C 68000570
C T H I S SUBROUTINE I S DESIGNED TOACCEPTAS 68000580
C INPUTAPIGRAVITY VALUE AT 6 0F ( A P I 6 O ) AND 68000590
C OBSERVED TEMPERATURE I N DEGREES FAHRENHEIT(DEGF) AND 68000600
C PRODUCE THE VOLUME CORRECTION FACTOR(VCF) FOR 6800061O
C A P I TABLE 6 8 , GENERALIZED PRODUCTS 68000620
C VOLUME CORRECTION FACTOR TO 6 0F . 68000630
C 68000640
C T H I S SUBROUTINECALLS THE FOLLOWING MODULES 68000650
C RHO8 68000660
C ALPHA8 (CALLSSDIVB) 68000670
C SDIVB 68000680

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API M P M S * L L - L V O L * X 80 m 0732290 0525982 L 9 T H

~
SECTIONVOLUME CORRECTION
FACTORS X-117

C VCF6B (CALLS MPYB) 68000690


C 68000700
C API6O SHOULDBE PASSED I N THENEAREST TENTH 6800071O
C OF
DEGREE A P I . THE SUBROUTINE W I L L HOWEVERROUND 66000720
C THE VALUE AND RETURNTHECORRECTED VALUE. 68000730
C 68000740
C DEG6O
SHOULD BE PASSED I N TEE NEAREST TENTH 68000750
C OF
DEGREE FAHRENHEIT. THE SUBROUTINE WILL HOWEVER 68000760
C ROUND THE VALUE AND RETURNTHECORRECTED VALUE. 68000770
C 68000780
C VCFC I S THERETURNEDVOLUME CORRECTION FACTOR 68000790
C CORRECTTO FIVE(5)SIGNIFICANTFIGURES. 66000800
C 6800081O
C VCFP I S THE
RETURNED VOLUME CORRECTION FACTOR 66000820
C CORRECTTO FOUR(4)DECIMAL DIGITS. 68000830
C 68000840
C I F L A G I S THE ROUNDED STATUS CODE WHICH SHOULD 68000850
C BECHECKED BY THEUSER I N THE CALLING PROGRAM 68000860
C =O NO ERROR 68000870
C =I INPUT DATA WITHIN EXTRAPOLATION RANGES AS 68000880
C GIVEN I N A P I 2 5 4 0 , TABLE 6 , 1 1 . I . 6 68000890
C = - 1I N P U T DATA OUTSIDESPECIFIED RANGE OF 66000900
C APPLICATION AS GIVEN I N A P I 2 5 4 0 , 6800091O
C TABLE 6 , 1 1 . l6. 68000920
C 68000930
DATA NBP1,NBP2,NBP3,NBP4/370,480,520,850/ 68000940
DATA IBP1,IBP2/400,500/ 68000950
DATA 1TMP1,1TMP2,1TMP3/3000,2500,2000/ 68000960
DATA IBAS/GOO/ 68000970
DATA IEP1,IEP2,IEP3/2500,2000,1500/ 66000980
C 68000990
C COEFFICIENTS FOR DIESELS,HEATINGOILS AND FUEL O I L S 68001 O00
C 68001 O 1 O
DATA KOF , K1 F / 1 0 3 8 7 2 0 , 2 7 0 1/ 68001 020
C 68001 030
C COEFFICIENTS FOR JETFUELS, KEROSENES, AND SOLVENTS 68001 040
C 68001 050
DATA K O J , K 1 J / 3 3 0 3 0 1 0 , 0 / 68001 060
C 68001 070
C COEFFICIENTS FOR TRANSITION BETWEEN JETS AND GASOLINES 68001 080
C 68001 O90
66001 1O0
--

DATA K O T , K l T / 1 4 8 9 0 6 7 0 , - 1 8 6 8 4 0 /
| | |

C 66001 1O 1
|

C COEFFICIENTS FOR GASOLINES AND NAPHTHENES 68001 120


|
|||| |||| | | ||

C 68001 130
DATA K O G , K l G / 1 9 2 4 5 7 1 , 2 4 3 8 1 66001 140
C 68001 150
|||| |||| || || |

VCFC=- 1 . O000 68001 160


VCFP=-I . O000 66001 170
C 68001180
68001190
|

C ROUND INPUT PARAMETERS


|||| |||---

C 68001 200
I A P I = A P I 6 0 * 1O . 0+0 . 5 68001 21O
API6O=FLOAT(IAPI)/lO.O 68001 220
ITEMP=DEGF*10.0+0.5 66001 230
DEGF=FLOAT(ITEMP)/lO.O 68001 240
IDT=ITEMP-IBAS 68001 250
IFLAG=- 1 68001 260

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API MPMS*LL*L V O L * X 80 D 0732290 0525983 026 m

X-1 18 CHAPTER
1 PHYSICAL PROPERTIES
DATA

C 68001 270
C CHECK A P I RANGES 66001 280
C 68001 290
I F ( 1 A P I )Ol , 2 0 , 2 0 68001300
1O CONTINUE 68001 3O 1
RETURN 66001 320
C 68001 330
DEFINE
C CURVE COEFFICIENTS 68001 340
C 68001 350
20 I F ( I A P I - N 8 P 1 ) 3 0 , 3 0 , 4 0 68001 360
30 KO=KOF 68001 370
K1=K1 F 68001 380
GO TO 8 0 68001 390
4 0I F ( I A P I - N S P 2 ) 5 0 , 6 0 , 6 0 66001 400
50 KO=KOJ 68001 41 O
K1=K1 J 68001 420
GO TO 8 0 68001 430
6 0I F ( I A P I - N S P 3 ) 7 0 , 7 0 , 7 5 68001 440
70 KO=KOT 68001 450
K1 =K1 T 66001 460
GO TO 8 0 68001 470
7 5I F ( I A P I - N S P 4 ) 7 8 , 7 8 , 1 0 68001 480
78 KO=KOG 68001 490
K1 =K1 G 68001 500
8 0 CONTINUE 68001 51 O
C 68001 520
C CHECK V A L I D TEMPERATURE RANGES 68001 530
C 68001 540
I F ( ITEMP)SO, 10 0 , l O0 68001 550
90 CONTINUE 68001 560
RETURN 68001 570
100 IF(IAPI-IBP1)110,110,120 68001 580
110 IF(ITEMP-ITMP1)150,150,90 68001 590
120 IF(IAPI-IBP2)130,130,140 68001 600
130 IF(ITEMP-ITMP2)150,150,90 6 8 0 0 1 6O
1
140 IF(ITEMP-ITMP3)150,150,90 68001620
150 CONTINUE 68001630
C 68001640
C CALCULATE RHO 68001 650
C 68001 660
CALLRHOB(IAP1,IRHO) 68001670
C 68001680
C CALCULATE ALPHA 68001690
C 68001700
IF(KO.NE.KOT)GO TO 155 68001 71 O
C 66001 720
C CALCULATE ALPHA I N TRANSITION ZONE 68001730
C 68001 740
CALL S D I V B ( K O , I R H O , I R E S ) 68001750
IRES=IRES* 1O 68001760
CALL S D I V B ( I R E S , I R H O , I A L F 1 ) 68001770
IALFl=(IALF1+5)/10 68001 780
I A L F = ( I A L F+K1+5
l ) / 1O 68001790
GO TO 1 5 8 68001 800
155 C A L LA L P H A B ( I R H O , K O , K l , I A L F ) 6800181O
C 68001820
C CALCULATE VCF 68001 830
C 68001 840

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL.L VOL*X 80 m 0732290 0525984 T b 2 m

SECTIONVOLUME CORRECTION FACTORS x-1 19

1 5 8 CONTINUE 68001 850


CALL V C F G B ( I A L F , I D T , I V C F ) 68001 860
IFLAG=O 68001 870
C 68001 880
C CHECK
TO DETERMINE I F I N EXTRAPOLATED REGION 68001 890
C 68001 900
IF(IAPI-IBP1)160,l60,170 6 8 0 0 1 9O 1
160 IF( ITEMP-IEP1 )200,200,165 68001 920
1 65 IFLAG=I 68001 930
GO TO 200 66001 940
170 IF(IAPI-IBP2)180,180,190 68001 950
1 8 0 IF(ITEMP-IEP2)200,200,165 68001960
1 9 0 IF(ITEMP-IEP3)200,200,165 66001 970
200 CONTINUE 66001 980
C 66001 990
C CALCULATE PRINT AND CALCULATION VALUES OF
VCF 66002000
C PRINTVALUE(PVCF) ROUNDED
TO 4DECIMAL DIGITS 6600201 O
C CALCULATIONVALUE(CVCF) ROUNDEDTO 5 SIGNIFICANTDIGITS 66002020
C 66002030
JVCF=( I V C F / 1 0 0 0 + 5 ) / 1O 6B002040
PVCF=JVCF 66002050
PVCF=PVCF/l O000 . 66002060
1F(1VCF-100000000)210,220,220 6B002070
21 o CONTINUE 68002080
C 68002090

|||| |||---
C VCF LESS THAN ONE, F I V E DECIMALS RETURNED 660021 O0
C 660021 1O

|
|||| |||| || || |
JVCF=(IVCF/100+5)/10 680021 20
CVCF=JVCF 660021 30
CVCF=CVCF/lOOOOO. 6B002140

|||| |||| | | ||
GO TO 250 660021 50
220 CONTINUE 680021 60
CVCF=PVCF 660021 70

|
250 CONTINUE 660021 80

|
| | |
VCFP=PVCF 68002190

--
VCFGCVCF 68002200
RETURN 6 6 0 0 2 2 1O
END 66002220

SUBROUTINE RHOB(IAP1,IRHO) 66002230


C 66002240
C T H I S MODULE I S DESIGNED TO CALCULATE ADENSITY 68002250
C VALUE FOR A GIVEN VALUE OF A P I BY THE
FORMULA 66002260
C RHO=l41.5*999.012/(API+131.5) 66002270
C I T I S ASSUMED THAT THE A P I VALUE HAS BEEN ROUNDED 66002280
C TO THENEAREST TENTH DEGREE A P I AND THE VALUE MULTIPLIED 68002290
C BY 1 0 . THEOUTPUT VALUE OFRHO W I L L BE RETURNED 68002300
C ASAN INTEGER ANDROUNDED
TOTHE NEARESTHUNDREDTH 6800231O
C KILOGRAM/CUBIC METRE. 68002320
C 66002330
C THEVALUE 1 4 1 3 6 0 1 9 8 0 REPRESENTS 1 4 1 . 5 * 9 9 9 . 0 1 2 * 1 O000 66002340
C CORRECT
TO 1 0D I G I T S 68002350
IDENOM=IAPI+1315 66002360
IRHO=(1413601980/IDENOM+5)/10 66002370
RETURN 66002380
END 66002390

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API MPMS*LL.L VOL*X 80 m 0732290 0525985 9T9 m

x-120 --
| | |
|
|
|||| |||| | | || 1 PHYSICAL PRoPmnEs DATA
CHAPTER

SUBROUTINE SDIVB(INUM,IDENOM,IRES) 66002400


6800241O
|||| |||| || || |

T H I S MODULE I S DESIGNED TOPRODUCE ADDITIONAL 68002420


ACCURACY FROMAN INTEGER D I V I D E WHERE THE
NUMERATOR 66002430
I S 1 0 0 0 0 GREATER
THANTHE DENOMINATOR. THE SUBROUTINE 66002440
|

ASSUMES PROPER SCALING OF BOTH THE INPUT NUMERATOR 66002450


|||| |||---

AND DENOMINATOR AND WILL RETURNTHE RESULTS M U L T I P L I E D 66002460


BY 1 0 0 0 0 . 66002470
66002480
IRES1 =INUM/IDENOM 66002490
IRES2=(INUM-IRES1*IDENOM)*lOOOO/IDENOM 68002500
IRES=IRESl*10000+IRES2 6600251O
RETURN 66002520
END 66002530

SUBROUTINE A L P H A B ( I R H O , K O , K l , I A L F ) 68002540
C 68002550
C T H I S MODULE I S DESIGNED TO CALCULATE ALPHA FOR 66002560
C USE I N DETERMINATION OF VOLUME CORRECTION 66002570
C FACTOR. 66002580
C 68002590
C INPUTVARIABLES 66002600
C IRHO=DENSITY*100(KILOGRAMS/CUBIC METRE) 6600261O
C KO,K1=COEFFICIENTS OF DESIRED CURVE * 1 0 0 0 0 66002620
C 68002630
C ALGORITHM- 66002640
C ALPHA=KO/RHO**Z+Kl/RHO 68002650
C 66002660
C CALCULATEK1 /RHO 68002670
C 66002680
INUM=K1*1 O000 66002690
CALLSDIVB(INUM,IRHO,IALF1) 66002700
C 6800271O
C CALCULATE KO/RHO**2 66002720
C 66002730
INUM=KO * 1 O0 66002740
CALL S D I V B ( I N U M , I R H O , I A L F S ) 66002750
CALL S D I V S ( I A L F S , I R H O , I A L F 2 ) 66002760
I A L F = ( I A L F l + I A L F 2 + 5 0 0) / l o 0 0 66002770
RETURN 68002780
END 66002790

SUBROUTINE V C F G B ( I A L F , I D T , I V C F ) 66002800
C 6600281O
C T H I S MODULE I S DESIGNED TO CALCULATE VOLUME 66002820
C CORRECTION FACTOR. ALTHOUGH ALL CALCULATIONS AREDONE 66002830
C AS INTEGERS, THE SUBROUTINE RETURNS WITHA8 66002840
C OR 9D I G I T VALUE DEPENDENT UPONWHETHER IDT 68002850
C I S P O S I T I V E OR NEGATIVE. 68002860
C 68002870
C ALGORITHM- 68002880
C VCF=EXP(-ALPHA*DT(l.O+0.8*ALPHA*DT)) 68002890
C 68002900
C CALCULATE ALPHA'DT 6800291O

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*:LL-L VOL*X 80 m 0732290 0525786 835 m

SECTIONVOLUME CORRECTION FACTORS x-121

C 68002920
ITERMl=IALF*IDT 68002930
C 68002940
C CALCULATE 0 . 8 *ALPHA *DT 68002950
C 68002960
68002970
C 68002980
C CALCULATE EXPONENT-ALPHA*DT(l.O+0.8*ALPHA*DT) 68002990
--
| | |

C 68003000
CALL MPYB(ITERMl,ITERM2,1TERM3) 6800301 O
|
|

IX=-(ITERMl+ITERM3) 66003020
|||| |||| | | ||

C 68003030
C CALCULATE EXPONENTIAL(F1RST 7 TERMS OF POWER SERIES) 68003040
68003050
|||| |||| || || |

C
ISUMl=l OOOOOOOO+IX 68003060
CALL MPYB(IX,IX,ISUM2) 68003070
ISUM2=ISUM2/2 68003080
|
|||| |||---

CALL MPYB(IX,ISUM2,ISUM3) 68003090


ISUM3=ISUM3/3 680031 O0
CALL MPYB(IX,ISUM3,ISUM4) 680031 1 O
ISUM4=ISUM4/4 680031 20
CALL MPYB(IX,ISUM4,ISUM5) 680031 30
ISUM5=ISUM5/5 680031 40
CALL MPYB(IX,ISUMS,ISUMG) 680031 50
ISUM6=ISUM6/6 680031 60
IVCF=ISUM1+ISUM2+ISUM3+ISUM4+ISUM5+ISUM6 680031 70
RETURN 680031 80
END 68003190

SUBROUTINE MPYB(IX,IY,IZ) 68003200


C 6800321 O
C THIS MODULE PERFORMS INTEGER MULTIPLICATION. THE TOTAL 68003220
C NUMBER OF DIGITS IN IX AND IY MUST NOT EXCEED 17. OTHER 68003230
WISE,
C OVERFLOW WILL OCCUR. 68003240
C 68003250
IU1 = IX / 10000 68003260
K1 = 10000 * IU1 68003270
IV1 = IX - K1 68003280
IU2 = IY / 10000 68003290
K2 = 10000 * IU2 68003300
IV2 = IY - K2 6800331 O
K3 = IU1 * IV2 + IU2 * IV1 + IV1 * IV2 / 10000 68003320
IZ = (K3 + 5000) / 10000 + IU1 * IU2 68003330
RETURN 68003340
END 68003350

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL.L V O L m X 80 M 0732290 0525987 77L M

x-122 CHAPTER 11"PHYSICAL PROPERTIES DATA

11.1.6.6 IMPLEMENTATION PROCEDURE FOR SUBROUTINE TAB6B

l nt o d a y ' sw o r l dt h e r ei s a r a p i d l yd e v e l o p i n gt r e n dt ou s ec o m p u t e r si n
c u s t o d yt r a n s f e r measurements, a c c o u n t i n g work, processcontrolsystems, and a
v a r i e t yo fo t h e ru s e s where t a b l e s must be i n c o r p o r a t e di n t oc o m p u t e r codes.
Y e t many of t h e p r i n t e d t a b l e s a r e a l m o s t i m p o s s i b l e t o code due t o t h e f a c t
t h a t someone has s l i g h t l y m o d i f i e d s e l e c t e d v a l u e s t o d i f f e r fromthose
obtainedusingthemathematicalexpressionthatsupposedlygeneratedthe
tables. Toovercome t h i s problem it i s o f t e n r e q u i r e d t o add e x t e n s i v e excep-
t i o nt a b l e st ot h e codes. T h i s makes t h e codes l a r g e and cumbersome t o modify,
and r e s t r i c t s t h e i r use t o l a r g e r computersystems. A l s ow i t ht h ed e v e l o p m e n t
o fb e t t e rm e a s u r i n gd e v i c e s i t isoftenpossibletogain more d i g i t s o f p r e c i -
s i o ni nt h et a b l ep a r a m e t e r s ,n e c e s s i t a t i n gf i n e rg r i do ft h et a b u l a rv a l u e s ,
r e s u l t i n gi nl a r g e r volumes o f p r i n t e d t a b l e s t o be handled.
Inaddition, as t h e o n - l i n e u s e of computers f o rm e t e r i n gp u r p o s e s
i n c r e a s e s ,t h ed i r e c t use o f p r i n t e d t a b l e s w i l l decrease; t h e r e f o r e ,t h e new
Standard i s an e x p l i c i ti m p l e m e n t a t i o np r o c e d u r er a t h e rt h a n a s e t of equa-
t i o n so r a s e to ft a b l e s . I t must be remembered t h a tt h es t a n d a r d i z a t i o no f
t h ei m p l e m e n t a t i o np r o c e d u r ei m p l i e ss t a n d a r d i z a t i o no ft h es e to fm a t h e m a t i -
calexpressions used w i t h i n t h e code. Absoluteadherence t ot h ep r o c e d u r e
w i l l h e l pt oi n s u r et h a ta l lc o m p u t e r s and computercodesofthefuture, meet-

|||| |||---
i n gt h es p e c i f i c a t i o n s and r e s t r i c t i o n s , w i l l be a b l e t o producethe same

|
|||| |||| || || |
results. I t i sb e l i e v e dt h a tt h i sp r o c e d u r e will a l l o wf o rt h e maximum
machine and codeindependence.The procedure was implemented i n computer sub-

|||| |||| | | ||
r o u t i n e si s s u e d by API i n 1980 u s i n g ANSI/ASA FORTRAN. The subroutinesmaxi-
m i z e dp r e c i s i o n by t h e u s e o f 3 2 - b i t i n t e g e r a r i t h m e t i c .
|
|

The p r o c e d u r ea sd e s c r i b e di nt h ef o l l o w i n gt e x t can, by c a r e f u l and


| | |
--

d e l i b e r a t ea p p l i c a t i o no fn u m e r i c a la n a l y s i s , be used w i t h t h e m a j o r i t y of
languages and word s i z e s i n p r e s e n t o r a n t i c i p a t e d use. Tousethestandard
procedure means t o m a i n t a i n a b s o l u t e and unwaveringadherence t o t h e number o f
digits specified at each s t e p and t o t h e c a l c u l a t i o n p r o c e d u r e a s o u t l i n e d .
I nt h ep r o c e d u r e ,t h en o m e n c l a t u r e used i s t h a t o f ASTM E380-76, unless
an e x p l i c i t p r o c e d u r e i s g i v e n below, i n whichcasetheproceduregivenbelow
overridesthatgiven by ASTM E380-76.
I nt h ep r o c e d u r et h en o m e n c l a t u r e (XXX.XX1 means f i v e ( 5 ) m a t h e m a t i c a l l y
significant digits.

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API M P M S + L L = L V O L * X 80 m 0732290 0525988 608 m

SEcnoN V VOLUME CORRECTIONFACTORS X- 123

The termroundingas used i nt h ep r o c e d u r e means: C o n s i d e ro n l yt h e


first digit to the right of the desired position and
a. I ft h a td i g i ti sg r e a t e rt h a n 4, i n c r e m e n tt h ed e s i r e dp o s i t i o n by
one and d r o p t h e r e m a i n i n g d i g i t s t o t h e r i g h t of t h e d e s i r e d p o s i -
tion.
b. I ft h a td i g i ti sl e s st h a n 5, s i m p l yd r o pt h er e m a i n i n gd i g i t st o
therightofthedesiredposition.

-
A I I constants a r e used t o e x a c t l y t h e number of d i g i t s p r nted.
'i

C a l c u l a t i o nP r o c e d u r e

STEP 1 : Round i n p u tv a r i a b l e s of A P I g r a v i t y and observedtemperature


a.
Round P I g r a v i t y t o t h en e a r e s t
0.1 "API and c a r r ya s 4 digit result
¡.e. A P I g r a v i t y (AP160) = XXX.X
b. Round observedtemperature t ot h en e a r e s t
0.1 "F and c a r r y a s 4 digit result
¡.e. observed
temperature (DEGF) = XXX.X

STEP 2: Convers ion t o dens i t y i n Kg/m3

Note: 141.5 * 999.012 = 141360.1980 and mustbe c a r r i e dt o 10


significant digits.
Round p t o n e a r e s t O .O1
I .e. D = xxxx.xx
STEP 3: Choose t h ea p p r o p r i a t ev a l u e so f KO and K1 a sd e s c r i b e di n API Stan-
dard 2540, TABLE 6, 11.1.6
KO i s a 7 d i g i t c o n s t a n t
¡.e. KO = XXX.XXXX
K i i s a 4 digitconstant
i .e. K1 = .XXXX

STEP 4: Calculation o f alpha (coefficient of thermal expansion)


I. If input API gravity c 48"API or
input API gravity > 52"API
-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
X-1 24 1 PHYSICAL PROPERTIES
CHAPTER DATA

define a = - -+ -
K1
P2

a. Evaluate
KO
P2
K
a( I Compute 0= .XXXXXXXX
P

KO/P
a(2) Compute -,= .OOOXXXXXXX
D

b. Eva I u a t e -
P
K
b( 1 1 = .@OOXXXXXXX
P

c. Sum r e s uI t so fa ( 2 ) and b ( l ) and round t o n e a r e s t 0.0000001


I .e. a = .oooxxxx

II. I f i n p u t API g r a v i t y L 48 "APl and


i nput AP I g r a v i t y 5 52 'AP I

def¡ne a = A + B/p2 where

A and B a r e chosen t o be t h e c o e f f i c i e n t s o f t h e t r a n s i t i o n l i n e
a sd e s c r i b e di n API Standard 2540, TABLE 6, 11.1-6-
A = .OOXXXXXX
6 = XXXX.XXXX

B
a. Evaluate 2
P

a(1) compute -BP = X.XXXXXX


B/P
a(2) compute D = .OOXXXXXX rounded t o n e a r e s t .O0000001

Sum
b. r e s u l t s of a ( 2 ) and A and round t o n e a r e s t ~000000~
i .e. a = .OOOXXXX

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API M P M S * L L = L V O L * X 80 m O732290 0525990 2bb m

SECTION 1"VOLUME CORRECTION FACTORS x-125

STEP 5: Calculate A t
def i ne A t = DEGF - TBASE
Note: TBASE c a r r i e d t o 3 d i g i t s XX.X (60.0)
Carry A t = XXX.X

STEP 6: C a l c u l a t i o n of VCF
d e f i n e VCF = EXP[-aAt(l.O + 0.8 a A t ) l
= EXP[-aAt - 0.8 a 2 A t 2 ]
a. C a l c u l a t i o n of exponent
a(l) a A t = .XXXXXXXX
--
| | |

a(2) .8 ab t = .XXXXXXXX
|
|

a(3) .8 a* At2 = .OXXXXXXX


|||| |||| | | ||

a(4) - aAt - 0.8 a2 A t 2 = 0.XXXXXXXX w i t h any t r a i l i n g


d i g i t s dropped
|||| |||| || || |

b. Ca 1 cu l a t i o n o f exponent i a I
-
|

VCF = EXP[- a A t 0.8 a 2 A t 2 ] = X.XXXXXX


|||| |||---

using a t l e a s t t h e f i r s t 7 terms o f t h e power s e r i e se x p a n s i o n


of ex

Computational
v a l u e o f VCF

Table va I ue
o f VCF
=c
=
1.XXXX

0.XXXXX

X.XXXX
rounded t o n e a r e s t 0.0001

rounded t o n e a r e s t 0.00001

rounded VCF t on e a r e s t 0.0001


i f VCF

i f VCF
L 1

The
1980 i n t e g e r FORTRAN code issuedby API containedboth an i n t e g e r
d i v i s i o n and an i n t e g e rm u l t i p l i c a t i o na l g o r i t h m . A d e s c r i p t i o n of each i s
c o n t a i n e di nt h ef o l l o w i n g :

INTEGER MULTIPLICATION PROCEDURE


(FOR 32 B I T ARITHMETIC)

DATA DEFINITION

X, Y a r ei n t e g e r numbers t h a t a r e equal t o o r l e s s t h a n 2 * 109


( s l i g h t l yl e s st h a n2 3 1 ) . A l a r g e rv a l u e may causeoverflow.Inaddition,
thetotal number of d i g i t s i n X and Y mustnot exceed 17, o t h e r w i s eo v e r f l o w
w i l l occur.

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL-L VOL*X 80 m 0732290 052.5991 I T 2 m

X-1 26 CHAPTER
1 PHYSICAL PROPERTIES
DATA

Z i st h ep r o d u c t XY scaledby 10-8, ¡.e. Z = XY/108.


Note: I f i t i sd e s i r a b l e t o o b t a i n maximum p r e c i s i o n , X and Y may be
scaled up p r i o r t o use of t h e p r o c e d u r e .T y p i c a l l y ,a tl e a s t 15 d i g i t s a r e
needed t o o b t a i n 6 d i g i t p r e c i s i o n , 16 f o r 7 and 17 f o r 8.
The l a r g e s t v a l u e s of X and Y t h a t may be used a r e 2 O00 O00 O00 and

|||| |||---
99999 999.

|
|||| |||| || || |
|||| |||| | | ||
CALCULATION
x/10000 = u1

|
|
| | |
10000 U1 = K 1

--
X - K1 = V1
Y/10000 = u2
10000 U2 = K2
Y - K2 = V2
(UIV2) + (U2V1) + CV1V2/10000> K3
(K3 + 5000)/10000 + (U1U2) Z
Note: Z hasbeensca 1 ed by 10-8 and may have t o be resca I ed b e f o r e use.
TOTAL DIGITS IN X AND 16
Y 15141312 " " "
17
DIGITS I N PRODUCT, Z 3-4 4-5 5-6 6-7 7-8 8-9

INTEGER D I V I S I O N PROCEDURE
(FOR 32 BIT ARITHMETIC)

DATA DEFINITION

X, Y a r ei n t e g e r numbers such t h a t X i s equa I t o o r l e s s t h a n 232 - 1


and Y i s o f o r d e r of magn i t u d e lo4 l e s st h a n X.

R isthequotient of 21. s c a l e d
Y
by 104, ¡.e. R = xY * lo4.

Note: I f it i s d e s i r a b l e t o o b t a i n maximum p r e c i s i o n , X and Y may be


s c a l e d up p r i o r t o use of t h ep r o c e d u r e .T y p i c a l l yt h e more d i g i t s t h a t a r e
carriedinboth X and Y, t h e more a c c u r a t e d i g i t s on o u t p u t .

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL*L V O L W X 8 0 m 0732290 0525992 039 m

SECTION
1-VOLUME FACTORS
CORRECTION X-1 27

CALCULATION
X/Y = u1
U1Y = K1
X - K i = V1
V1/Y = u2
U1 * 10000 + U2 = R
Note: R hasbeen s c a l e d by104and may have t o be r e s c al e db e f o r e use.

Examp I es For Checkout

The f o l l o w i n g examples aredesigned toaidincheckoutproceduresfor


boththeexisting API s u b r o u t i n e andany s u b r o u t i n e s which a r ed e v e l o p e du s i n g
t h ei m p l e m e n t a t i o np r o c e d u r eo u t l i n e d above.The l i n e so ft h e examples a r e
numbered t o correspond t o t h e l i n e s w i t h i n t h e c a l c u l a t i o n p r o c e d u r e .
EXAMPLE 1 : Assume a f u e l o i l w i t h an i n p u t API g r a v i t y c o r r e c t e d t o 60 "F o f
24.99 "APl andan observedtemperatureof 105.03 "F. C a l c u l a t et h e
VCF r e q u i r e d t o c o r r e c t t h e volume t o 60 OF, c o r r e c t t o 4 decimal
digits.

STEP 1 : a. rounded AP I60 = 25 .O


b. rounded DEGF = 105.0

STEP 2 : p rounded t o n e a r e s t O .O1 Kg/m3


= 903.26

STEP 3 : KO = 103.8720 ( a s of May 1, 1980)


K 1 = 0.2701 ( a s of May 1, 1980)

STEP 4 : 1 .a. -
KO
P2

a(l1 - = O. 11499678
P

KO/P
a(2) = 0.0001273130
P

K1
1 .b. Evaluate -
P

p
K1 = O. 0002990279

1 .c. a = O. 0004263

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL-L VOL*X 80 m 0732290 0525993 T75 m

X-128 CHAPTER1 P PHYSICAL PROPERTIES


DATA

STEP 5: A t = 45.0

STEP 6 : C a l c u l a t i o n of VCF
a. C a l c u l a te x p o n e n t
a( 1 ) 0.01918350
a(2) 0.01534680
a(3) 0.00029440
a(4) -0.01947790
b. C a l c u l a t i o n of e x p o n e n t i a l
VCF = 0.980710

VCF c o r r e c t t o 4 dec imal d i g t s = 0.9807

EXAWLE 2 : Assume a j e t f u e w i t h an i n p u t API g r a v i t y c o r r e c t e d t o 60 "F of

|||| |||---
41.1 "AP and an observedtemperature o f 39.9 "F. C a l c u l a t et h e

|
|||| |||| || || |
VCF r e q u r e d t o c o r r e c t t h e volume t o 60 "F, c o r r e c t t o 4 decimal
digits.

|||| |||| | | ||
STEP 1 : a) rounded AP I60 = 41.1

|
|
| | |
b) rounded DEGF = 39.9

--
STEP 2: P rounded t on e a r e s t 0.01
Kg/m3
P = 819.00

STEP 3: KO = 330.3010 ( aosf May 1, 1980)


K1 = 0.0 ( a s of May 1, 1980)

STEP 4: I .a. Eva I u a t e -KO.


P*

K
a( 11 2= O .40329792
P

K /P
a(2) 0 = 0.0004924272
P

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
SECTIONVOLUME CORRECTION
FACTORS x-129

.
I b. Eva I u a t e K 1
P

b(1) K1 = 0.0
P

I .c. CL = 0.0004924

STEP 5 : A t = -20.1

STEP 6 : C a l c u l a t i o n o f VCF
a. C a l c u l a te x p o n e n t
a(l) -0.00989724
a(2) -0.00791779
a(3) 0.00007836
a(4) 0.00981888
b. C a l c u l a t i o n of e x p o n e n t i a l
VCF = 1 -009867

VCF c o r r e c t t o 4dec mal d i g i t s = 1.0099

EXAMPLE 3: Assume a p r o d u c t w i t h an i n p u t AF'I g r a v i t y c o r r e c t e d t o 60 " F of


50.3 "AP and an observedtemperatureof 48.1 "F. C a l c u l a t et h e
VCF r e q u i r e d t o c o r r e c t t h e volume t o 60 "F, c o r r e c t t o 4 decimal
digits.

STEP 1 : a)
rounded P 1 6 0 = 50.3
|||| |||---

b)
rounded DEGF = 48.1
|
|||| |||| || || |

STEP 2: p rounded t o n e a r e s t 0.01


Kg/m3
|||| |||| | | ||

P = 777.56
|
|
| | |

STEP 3 : KO, K1 n o ta p p l i c a b l e ; API g r a v i t y found i n t r a n s i t i o n


--

zone.

STEP 4: II A = -.O0186840 ( a s o f May 1, 1980)


B = 1489.0670 ( a s o f May 1, 1980)

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API M P M S * L L - L V O L X X 80 m 0732290 0525995 848 m

x-i30 CHAPTER 11"PHYSICAL PROPERTIES DATA

B
a.Eva I uate 2
P

a(l1 S = 1.915050
P

a( 2 ) B/p = 0.00246290
P

be U = 0.0005945

STEP 5: A t = -1 1.9

STEP 6 : C a l c u l a t i o no f VCF
a. C a l c u l a t i o n o f exponent
a(l1 -0.00707455
a(2) -0.00565964
a( 31 O .O0004003
a( 41 O .O0703452
b. C a l c u l a t i o no ef x p o n e n t i a l
VCF = 1 .O07059

VCF c o r r e c t t o 4 decimal d i g i t s = 1.0071

EXAMPLE 4 : Assume a g a s o l i n ew i t h an i n p u t A P I g r a v i t y c o r r e c t e d t o 60 "F


o f 57.2 " A P I andan observedtemperature of 89.6 "F. Calculate
t h e VCF r e q u i r e d t o c o r r e c t t h e volume t o 60 OF, c o r r e c t t o 5
significantfigures.

STEP 1 : a. rounded W160 = 57.2


b. rounded DEGF = 89.6

STEP 2: p rounded t on e a r e s t 0.01 Kg/rn3


P = 749.13

STEP 3: KO = 192.4571 ( a s of May 1 , 1980)


K1 = 0.2438 ( a s of May 1 , 1980)

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL.L V O L I X 80 m 0732290 0525996 781.1 m

SECTIONV VOLUME
FACTORS
CORRECTION X-131

STEP 4: I .a. Eva I u a t e KO


2
P

K
a(1) 0 = .25690747
P

KO/P
a(2) -= 0.0003429411
P

1.b. -
Eva I u a t e K 1
P

K
b( 11 1= 0.0003254441
P

I.c a = O .O006684

STEP 5 : A t = 29.6

STEP 6: C a l c u l a t i o n o f VCF
a. Ca I cu I ate exponent
a( 1 ) O .O 1978464
a(2) 0.01582771
a(3) 0.00031314
a(4) -.O2009778
b. C a l c u l a t i o n of e x p o n e n t i a l
VCF = 0.980102

VCF c o r r e c t t o 5 s i g n i f i c a n t f i g u r e s = 0.98010

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I M P M S * L L ~ L V O L X X 80 0732290 0525997 bL0

X-1 32 CHAl'lER 11"PHYSICAL PROPERTIES DATA

11.1.6.7 TABLE 6C-VOLUME CORRECTION TABLE 6C, when used with a minimum of ten data
FACTORS FOR INDIVIDUAL AND points, allows one to extract the highest degree of ac-
SPECIAL APPLICATIONS, VOLUME curacy from the base data.It is suggested that TABLE
CORRECTION TO 60°F AGAINST 6C be used when:
THERMAL EXPANSION COEFFICIENTS 1. TABLES 6A and 6B do not adequately represent
AT 60°F the thermal expansion properties of the fluids of in-
TABLE 6C gives volume correction factors to con- terest; and
vertpetroleumliquid volumes to the corresponding 2. Precise thermal expansion coefficients maybe ob-
volume at 60°F. The table presents tabular entries of tained directlyor indirectly by experiment (As an exam-
volume correction factors against thermal expansion co- ple, high precision density data may be usedto compute
efficients and temperature. The values were computed the coefficients.); and
from the basic equation used to represent volume cor- 3. Buyers and sellers agree that, for their use, a greater
rection factors. degree of equity can be obtained.
VCF = EXP [ - a d t ( l + 0.8adt)J (1) The temperature ranges of this table are:
aT = a at the base temperature a * lo6 "F
At=t-T 270 to 510 O to 300
t = any temperature 510 to 530 O to 250
T = base temperature. 530 to 930 o to 200
In this form the equation is independent of the group The volume correction factorsgiven in this table are
or substance. It can be used withanyvalid method based on data from the U.S. National Bureau of Stan-
of obtaining the thermal expansion coefficient for a dards and from other published data. The appendix to
givenfluid as long as a statistically significantnum- this table presents valuesof the thermalexpansion coef-
ber of points are obtained. A minimum of ten such ficients at 60°F for each of the samples included in the
points is recommended. The appendix to TABLE 6C NBS data set. Portionsof the temperature range repre-
(11.1.6.7.1 in Volume III)presents values of the sent areas beyond these data. Thus, mathematical tech-
thermal expansion coefficient along with the base den- niques were employed to extrapolate beyond the tem-
sity for eachof the NBS samples. In addition,values of perature range of the given data to determine thevol-
the constantsKOand K Iare given for each major group. ume correction factors for these areas. These factors are
These constants relate the thermal expansion coeffi- denoted by an asterisk (*). Extension of this table be-
cient to base density by yond the ranges shown is not intended.
Increments used in this tablefordeterminingthe
aT =
KO + K l P T volume correction factors are 05°F and 2 units for a.
(2)
P2 Interpolation between either temperature or thermal
This table andits primary subroutineallow the use of expansion coefficient is not intended since there is no
measured data for previously unstudied fluids to sup- practical method of interpolation that will produce the
plement data included in the initial data base. High accuracy obtainable from the Standard.
precision density data obtained from the laboratory for
a fluid of interest may be reduced by Equation 1 to This table must be entered-with a known ther-
obtain pTandaT.TABLE 6C may then be entered with mal expansion coefficient at 60°F and with an ob-
the aTso determined. served temperature.
11.1.6.8 PROGRAM DOCUMENTATION FOR SUBROUTINE TAB6C-
VOLUME CORRECTION FACTORS FOR INDIVIDUAL AND SPECIAL
APPLICATIONS, CORRECTION OF VOLUMETO 60°F AGAINST
COEFFICIENTS OF THERMAL EXPANSION AT 60°F

ABSTRACT

S u b r o u t i nTei t l e : TAB6C - TABLE


VCF
6C, f o r I n d i v i d u a l and
S p e c i a lA p p l i c a t i o n s , Volume C o r r e c t i o n to
60 'F.
-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*:LL*:L V O L * X 80 m 0732290 0525998 557 m

SECTION VOLUME CORRECTION FACTORS x-133

Description: Thissubroutineisdesignedtocalculatethe
volume c o r r e c t i o n f a c t o r r e q u i r e d t o convert
a volume a t an observedtemperature to the
correspondingvolume a t 60"Fassuming the
c o e f f i c i e n to ft h e r m a le x p a n s i o ni s known.

Program Responsibility: A m e r i c a nP e t r o l e u mI n s t i t u t e
Measurement C o o r d i n a t i o n
2101 L S t r e e t , N.W.
Washington, D.C. 20037

DateIssued: August 1980

Language: FORTRAN, ANS I /ASA Standard

Reference: A P I Standard 2540, TABLE


6,
11.1.6

TH I S SUBROUTINE WAS DEVELOPED USING THEMATHEMATICALALGORITHMS


AND SPECIFICATIONS DESCRIBED I N THE DOCUMENT PROCEDURE11.1.6.9.
ANY MODIFICATIONS TO THIS SUBROUTINEMUST RIGIDLY ADHERE
TO THE SAME ALGORI THMS AND SPECIFICATIONS.

11.1.6.8.1 Introduction

TAB6C i s a computersubroutinedesigned to calculate the volumecorrec-


tionfactor (VCF) necessary t o c o n v e r t t h e volume of a l i q u i dh y d r o c a r b o nw i t h
a known c o e f f i c i e n to ft h e r m a le x p a n s i o n and a t a s p e c i f i e dt e m p e r a t u r ei n
|||| |||---

degreesFahrenheit("F) t ot h ee q u i v a l e n t volume a t 60 O F . The s u b r o u t i n e


|

accepts as i n p u tt h ed e s i r e dc o e f f i c i e n to ft h e r m a le x p a n s i o nr o u n d e d t o the
|||| |||| || || |

n e a r e s t 0.0000005 and theobservedtemperaturerounded to the nearest 0.1 "F.


|||| |||| | | ||

Ifeitherinputvalue has n o t been p r o p e r l y rounded, t h e s u b r o u t i n e w i l l


r o u n dt h ev a l u e s and r e t u r nt h ec o r r e c t e dv a l u e s . The s u b r o u t i n er e t u r n s one
|

v a l u e of VCF w i t h 5 s i g n i f i c a n t f i g u r e s o f a c c u r a c y for computationalpurposes


|
| | |

and another VCF valuerounded tofour d e c i m e lp l a c e sf o rp r i n t i n gp u r p o s e s .


--

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
x-i 34 --
| | |
|
|
|||| |||| | | || DATA
CHAPTER1 P PHYSICAL PROPERTIES

-
|||| |||| || || |

The s u b r o u t i n ea l s oo u t p u t s a s t a t u s code foruserconvenience, The code i s


s e t t o -1 i f an e r r o r c o n d i t i o n o c c u r s and t o +1 i f t h ei n p u tv a l u e sa r eo u t -
|
|||| |||---

s i d et h el i m i t so ft h ec o r r e l a t i o n . A s t a t u sc o d eo fz e r oi sr e t u r n e d i f the
i n p u tv a l u e sa r ew i t h i nt h el i m i t so ft h ec o r r e l a t i o n . The l i m i t s o f t h e
c o r r e l a t i o ni n c l u d i n gt h ee x t r a p o l a t e dr e g i o na r ed e p i c t e di n Figure X-5. The
c a l l i n g programmustcheck the flag and p r o v i d e t h e u s e r w i t h a p p r o p r i a t e
warning messages o r p r o g r a m t e r m i n a t i o n .

11.1.6.8.2 SubroutineSpecifications

The arpaopnflgi cea tAi ol pnh: a * 106 Temperature, OF


270.0 t o 510.0 0.0 t o 300.0
510.5 t o 530.0 0.0 t o 250.0
530.5 t o 930.0 0.0 t o 200.0

Referenced modu les: VCFGC, MPYC

FORTRAN f unct ions: FLOAT

Averageexecutiontime: 2290 VCF entries/CPU second


IBM 370/168

The s u b r o u t i n e sa r ew r i t t e ni n ANSI/ASA FORTRAN u s i n gi n t e g e ra r i t h m e t i c . The


s i z e and s t o r a g e r e q u i r e m e n t s a r e :

1. Compilable
source
statements 86
2. Decimal
storage
bytes 1944
3. Words 486

11.1.6.8.3 C a l l i n g Sequence

CALL
TABGC (ALF60, DEGF, VCFC, VCFP, IFLAG)

I NPUT DESCRI PT I ON

ALF60 - C o e f f i c i e not fh e r m aelx p a n s i o n


(ALF60 r e t u r n e d w i l l be rounded t o n e a r e s t 0.0000005)

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
SECTIONVOLUMEFACTORS
CORRECTION x-135

DEGF - Observed
temperature, "F
(DEGF r e t u r n e d w i l l be rounded t o n e a r e s t 0.1 "F)

OUTPUT DESCRIPTION

VCFC - O u t p u t VCF rounded t o 5 s i g n i f i c a n tf i g u r e s f o r COmpUtatiOnal


purposes
¡.e.
VCFC = 1.XXXX
or VCFC = 0.XXXXX

VCFP - O u t p u t VCF rounded t o 4 decimal


places f o r p r i n t i n gp u r p o s e s
¡.e. VCFP = 1.XXXX
or VCFP = 0.XAXX

IFLAG - S t a t u s Code

O: I n d i c a t e si n p u tv a r i a b l e sa r ew i t h i nt h er a n g e of a p p l i -
cation.

1: I n p u td a t ao u t s i d el i m i t so fc o r r e l a t i o n a sg i v e ni n
11.1.6.

-1: I n d i c a t e si n p u t ALF60 o r i n p u t DEGF o u t s i d er a n g eo f


a p p l i c a t i o na sg i v e ni n 11.1.6; VCFC and VCFP s e t t o
-1 .oooo.

11.1.6.8.4 Method o f C a l c u l a t i o n

The s u b r o u t i n e e v a l u a t e s t h e e q u a t i o n
|||| |||---
|
|||| |||| || || |

-
|||| |||| | | ||

where A t = DEGF 60.0


|

"60 = c o e f f i c i e n t o f thermalexpansion
|
| | |
--

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API MPMS*LL.L VOL*X 80 W 0 7 3 2 2 9 0 052b00L 74T W

x-136 CHAPrrR 1i"PHYSICAL PROPERTIES DATA

A f u i I e x p l a n a t i o no ft h ee q u a t i o n may befound i n API Standard 2540, TABLE 6,


11.1.6.

11.1.6.8.5 Examples

Theseexamples aretutorialinnature and a r en o ti n t e n d e d t o be s u f f i c i e n t f o r


s u b r o u t i n ec h e c k o u t . The examplesgiven i np r o c e d u r e 11.1.6.9 a r e t o be used
for the computercheckout.

Example 1
ALF60 = .O004402
DEGF = 90.47

|||| |||---
CALL
TAB6C
(ALFGO,
DEGF, VCFC, VCFP, IFLAG)
A f t e rt h ec a l l : ALF6O = .O004400

|
|||| |||| || || |
DEGF = 90.5
VCFC = e98653

|||| |||| | | ||
VCFP = S9865
IFLAG = O

|
|
| | |
Exampl e 2

--
ALF60 = o0003300
DEGF = 255.0
CALL
TAB6C (ALF60, DEGF,
VCFC,
VCFP, I FLAG)
A f t e rt h ec a l l : ALF60 = .O003300
DEGF = 255.0
VCFC = o93458
VCFP = -9346
IFLAG = 1
Exampl e 3
ALF60 = o0006660
DEGF = 500.0
CALLTAB6C ( ALFGO,
DEGF,VCFC,VCFP, I FLAG)
A f t e rt h ec a l I: ALF60 = .O006660
DEGF 500.0
VCFC = -1 o0000
VCFP = - 1 .O000
IFLAG = -1

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL-L V O L * X 80 m 0732290 0526002 686 m

SEcnm VOLUME CORRECTION FACTORS X-1 37

11.1.6.8.6 FLOWCHART

INPUT:
THERMAL
EXPANSION
COEFFICIENT OBSERVEDTEMPERATURE

ROUND INPUTDATA
TO S P E C I F I C A T I O N

SET VCF = - 1 .O000


ERROR FLAG IERR = - 1
RETURN

Y ES

CALCULATE VCF

SET ERROR SET ERROR


FLAG = O FLAG = 1
|||| |||---
|
|||| |||| || || |

11.1.6.8.7 SubroutineListing
|||| |||| | | ||
|

TAB6C T hsiusb r o u t i sne r v e s as t hi nep u t / o u t pruotu t i n e to


|
| | |

t h e subsequentmodulesnecessary inthecalculationof
--

volume c o r r e c t i o n f a c t o r from t h e c o e f f i c i e n t o f
thermalexpansion a t 60 O F and observedtemperature.

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API MPMSUL1.L VOLUX 8 0 W 0732290 052b003 512 D

x-138 ~ ~~~
CHAPTER 11"PHYSICAL PROPERTIES DATA

ReferencedModules

WYC T h i s m o d upleer f o r m
i nst e gme ur l t i p l i c a t iw
onith a maxi-
mum o f 17 d i g i t s .

VCF6C T h i s module i s designed t o c a l c u l a t e volume c o r r e c t i o n


factor.

SUBROUTINE TABGC(ALFGO,DEGF,VCFC,VCFP,IFLAG) 6C00001 O


c 6C000020
C (C)COPYRIGHT 1 9 8 0 6C000030
C AMERICAN PETROLEUM I N S T I T U T E 6C000040
C RIGHTS
ALL RESERVED 6C000050
C 6C000060
CTHIS SUBROUTINE I S A VOLUNTARY STANDARD AND WAS DEVELOPED 6C000070
C UNDER
THE AUSPICES OF THE JOINT API-ASTM COMMITTEE ON STATIC 6C000080
C PETROLEUM
MEASUREMENT I N PART FROM DATA GENERATED 6C000090
C BY A PROJECT FUNDED BY THE AMERICAN PETROLEUM 6C0001 O0
INSTITUTE
C AT THE U . S . NATIONAL BUREAU OF STANDARDS, 6C00011 O
C GAITHERSBURG, MARYLAND. 6C000120
C 6COOOl30
INQUIRIES
C CONCERNING I TASP P L I C A T I O N SHOULD 6C000140
C ADDRESSED
BE TO: 6C000150
C AMERICAN PETROLEUM I N S T I T U T E 6C000160
C MEASUREMENT COORDINATION 6C000170
1 C 6C000180
C WASHINGTON, DC 2 0 0 3 7 6C000190
C 6C000200
c ............................................................ 6C00021 O
c * * 6C000220
C * T H I S SUBROUTINE OR THE MATHEMATICAL
RELATIONSHIPS * 6C000230
C * REPRESENTED THEREBY MAY BE USED BY ANYONE WISHING * 6C000240
C * TO DO SO, BUT THE AMERICAN PETROLEUM I N S T I T U T E , * 6C000250
C * THE AMERICAN SOCIETY FOR TESTING AND MATERIALS, * 6C000260
C * AND THE INSTITUTE OF PETROLEUM
AND THEIR * 6C000270
C * RESPECTIVE MEMBERSAND THE U.S.
NATIONAL BUREAU * 6C000280
C * OF STANDARDS, SHALL NOT HELD BE
RESPONSIBLE OR * 6C000290
C * L I A B LIEN ANY WAYFROM LOSS OR DAMAGE, INCLUDING, * 6C000300
C * BUT NOT L I M I T E D
CONSEQUENTIAL
TO, DAMAGE, * 6C00031 O
C * RESULTING FROM SUCH USAGE OR FOR VIOLATION OF * 6C000320
C * ANY FEDERAL, STATE, OR MUNICIPAL LAWS, REGULATIONS * 6C000330
C * OR PRACTICES OF THE UNITED STATES OR OF ANY * 6C000340
C * FOREIGN COUNTRY. * 6C000350
c * * 6C000360
c ............................................................ 6C000370
C 6C000380
C 6C000390
T
CH I S SUBROUTINE I S DESIGNED TO ACCEPT AS INPUT 6C000400
AC VALUE OF ALPHA (THERMAL EXPANSION COEFFICIENT) 6C00041 O
C AND OBSERVEDTEMPERATURE I N DEGREES FAHRENHEIT (DEGF) 66000420
C AND
PRODUCE THE VOLUME CORRECTION FACTOR FOR 6C000430
C
API TABLE
6C, VCF FOR I N D I V I D U A L AND SPECIAL
APPLICATIONS 6C000440
C VOLUME CORRECTION FACTORTO 6F0. 6C000450

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API B O m 073zzqo 0 5 z b 0 0 4 459 m
MPMS*LL.L V O L ~ X

FACTORS
SECTIONVOLUME CORRECTION X-139

C 6C000460
C T H I S SUBROUTINE CALLS 6C000470
C VCFC (CALLS MPYC) 6C000480
C 6C000490
C ALF6O SHOULDBE INPUT TO THE NEAREST 0 . 5 WHERE 6C000500
C ALF6O I S XXX.X * l o * * - 6 . THE SUBROUTINE WILL 6C00051 O
C ROUNDTHE VALUE AND RETURNTHECORRECTED VALUE. 6C000520
C 6C000530
C DEGF
SHOULD BE PASSED I N THE NEAREST 6C000540
C TENTH OFDEGREE FAHRENHEIT. THE SUBROUTINE WILL 6C000550
C ROUNDTHE VALUE AND RETURNTHE CORRECTED 6C000560
C VALUE. 6C000570
C 6C000580
C VCFC I S THE
RETURNED VOLUME CORRECTION FACTOR 6C000590
C CORRECTTO F I V E ( 5 )S I G N I F I C A N T FIGURES. 6C000600
C 6C00061 O
C VCFP I S THE
RETURNED VOLUME CORRECTION FACTOR 6C000620
C CORRECTTO FOUR(4)DECIMAL DIGITS. 6C000630
C 6C000640
C I F L A G I S THE ROUNDED STATUS CODE WHICH SHOULD 6C000650
C BE CHECKED BY THEUSER I N THE CALLING PROGRAM 6C000660
C =O NO ERROR 6C000670
C =1 INPUT DATA W I T H I N EXTRAPOLATION RANGES AS 6C000680
C GIVEN I NA P I2 5 4 0 , TABLE 6 , 1 1 . 1 . 6 6C000690
C = - 1 INPUT DATA OUTSIDESPECIFIED RANGE OF 6C000700
C APPLICATION AS GIVEN I N A P I 2 5 4 0 , 6C00071 O
C TABLE 6 , 1 1 . 1 . 6 6C000720
--

C 6C000730
| | |

DATA I E P 1 , I E P 2 , I E P 3 / 2 5 0 0 , 2 0 0 0 , 1 5 0 0 / 6C000740
|

DATA N B P . l , N B P 2 / 2 7 0 0 , 9 3 0 0 / 6C000750
|
|||| |||| | | ||

DATA I B P l , I B P 2 / 5 1 0 0 , 5 3 0 0 / 6C000760
DATA ITMP1,ITMP2,ITMP3/3000,2500,2000/ 6C000770
DATA IBAS/6OO/ 6C000780
|||| |||| || || |

VCFC=- 1 . O000 6C000790


VCFP=- 1 . O000 6C000800
IFLAG=-l 6C00081 O
|

C 6C000820
|||| |||---

C ROUND INPUT VALUES 6C000830


C 6C000840
IALF=(ALF60*100000000.0+25.0)/50.0 6C000850
IALF=IALF*5 6C000860
ALF6O=FLOAT(IALF)/lOOOOOOO. 6C000870
ITEMP=DEGF*l O . 0+0 .5 6C000880
DEGF=FLOAT(ITEMP)/lO.O 6C000890
C 6C000900
C CHECK ALPHA RANGES 6C00091 O
C 6C000920
I F ( I A L F - N B P 1 )Ol , 2 0 , 2 0 6C000930
10 CONTINUE 6C000940
RETURN 6C000950
2 0I F ( I A L F - N S P 2 ) 3 0 , 3 0 , 1 0 6C000960
30 CONTINUE 6C000970
C 6C000980
C CHECK V A L I D TEMPERATURERANGES 6C000990
C 6C001 O00
IF(ITEMP)40,50,50 6C001 O1 O
40 CONTINUE 6C001020
RETURN 6C001030

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL.L VOL*X B O m 0732290 0526005 395 m

50 I F ( I A L F - I B P l ) 6 0 , 6 0 , 7 0 6C001040
60 I F ( ITEMP-ITMP1 ) l o o , 10 0 , 4 0 6C001050
70 IF(IALF-IBP2)80,80,90 6C001060

|||| |||---
80 I F ( ITEMP-ITMP2)10OI 10 0 , 4 0 6C001070
9 0 IF(ITEMP-ITMP3)lOO,l00,40 6C001080

|
1O0 CONTINUE 6C001 O90

|||| |||| || || |
IIALF=IALF 6C0011 O0
IDT=ITEMP-IBAS 6C00111 O
C 6C001120

|||| |||| | | ||
C CALCULATE VCF 6C001130
C 6C001140
C A L LV C F 6 C C I I A L F , I D T , I V C F ) 6C001150

|
|
IFLAG=O 6C001160

| | |
C 6C001170

--
C CHECK
TO DETERMINE I FI N EXTRAPOLATED REGION 6C001180
C 6C001190
IF(1ALF-IBP1)lOl ,101,110 6C001200
1 0 1 IF(ITEMP-IEP1)140,140,105 6C00121 O
105IFLAG=l 6C001220
GO TO 1 4 0 6C001230
1 1 0 IF(IALF-IBP2)120,120,130 6C001240
1 2 0 IF(ITEMP-IEP2)140,l40,105 6C001250
1 3 0 IF(ITEMP-IEP3)140,140,105 6C001260
1 4 0 CONTINUE 6C001270
C 6C001280
CALCULATE
C PRINT AND CALCULATIONVALUES OF
VCF 6C001290
PRINT
C VALUE (PVCF) ROUNDED TO DECIMAL
4 DIGITS 6C001300
CALCULATION
C VALUE (CVCF) ROUNDEDTO 5 S I G N I F I C A ND
TI G I T S 6C00131 O
C 6C001320
JVCF=(IVCF/1000+5)/10 6C001330
PVCF=JVCF 6C001340
PVCF=PVCF/lOOOO . 6C001350
1F(1VCF-100000000)150,160,160 6C001360
1 5 0 CONTINUE 6C001370
C 6C001380
C VCF LESS THAN ONE, F I V E DECIMALS RETURNED 6C001390
C 6C001400
JVCF=(IVCF/100+5)/10 6C00141 O
CVCF=JVCF 6C001420
CVCF=CVCF/lOOOOO. 6C001430
GO
TO 180 6C001440
1 6 0 CONTINUE 6C001450
CVCF=PVCF 6C001460
1 8 0 CONTINUE 6C001470
VCFC=CVCF 6C001480
VCFP=PVCF 6C001490
RETURN 6C001500
END 6C00151 O

SUBROUTINE V C F G C ( I A L F , I D T , I V C F ) 6C001520
C 6C001530
THIS
C MODULE I S DESIGNED TO CALCULATE VOLUME 6C001540
C CORRECTION FACTOR. ALTHOUGH ALL CALCULATIONS ARE
DONE 6C001550
C AS INTEGERS, THE SUBROUTINE RETURNS WITH 8A 6C001560
C OR 9 D I G I T VALUE DEPENDENT UPON
WHETHER IDT 6C001570

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS+11-1 VOL+X 80 m 0732290 052b00b 2 2 1 9

SECTION ~-VOCUMECORRECTION FACTORS X-141

C I S POSITIVE OR NEGATIVE. 6C001580


C 6C001590
C ALGORITHM- 6C001600
VCF=EXP(-ALPHA*DT(l.O+0.8*ALPHA*DT)) 6C00161 O
--

C
| | |

C 6C001620
|

C CALCULATE ALPHA'DT 6C001630


|
|||| |||| | | ||

C 6C001640
ITERMl=IALF*IDT 6C001650
C 6C001660
|||| |||| || || |

C CALCULATE 0 . 8 *ALPHA
*DT 6C001670
C 6C001680
ITERM2=ITERM1/5 "4 6C001690
|

C 6C001700
|||| |||---

C CALCULATEEXPONENT-ALPHA*DT(l.O+0.8*ALPHA*DT) 6C00171 O
C 6C001720
CALL MPYC(ITERMl,ITERM2,ITERM3) 6C001730
I X = - ( ITERMl +ITERM3) 6C001740
C 6C001750
C CALCULATE EXPONENTIAL(F1RST7 TERMS
OF
POWER SERIES) 6C001760
C 6C001770
I S U M l = l OOOOOOOO+IX 6C001780
CALL M P Y C ( I X , I X , I S U M 2 ) 6C001790
ISUM2=ISUM2/2 6C001800
CALLMPYC(IX,ISUM2,ISUM3) 6C00181 O
ISUM3=ISUM3/3 6C001820
CALLMPYC(IX,ISUM3,ISUM4) 6C001830
ISUM4=ISUM4/4 6C001840
CALLMPYC(IX,ISUM4,ISUM5) 6C001850
ISUMS=ISUM5/5 6C001860
CALLMPYC(IX,ISUMS,ISUMG) 6C001870
ISUM6=ISUM6/6 6C001880
IVCF=ISUM1+ISUM2+ISUM3+ISUM4+ISUM5+ISUM6 6C001890
RETURN 6C001900
END 6C00191 O

SUBROUTINE M P Y C ( I X , I Y , I Z ) 6C001920
TH
CI S MODULE
PERFORMS INTEGER MULTIPLICATION. THE TOTAL 6C001930
C NUMBER
OF DIGITS INIX AND I Y MUST
NOT
EXCEED 1 7 . OTHER 6C001940
C WISE, OVERFLOW W I L L OCCUR. 6C001950
C 6C001960
IU1 = I X / 10000 6C001970
K1 = 1 0 0 0 0 * IU1 6C001980
IV1 = I X - K1 6C001990
IU2 = I Y / 10000 6C002000
K2 = 1 0 0 0 0 * IU2 6C00201 O
IV2 = I Y - K2 6C002020
K3 = I U 1 * IV2 +IU2 * IV1 +
I V 1 * I V 2 / 10000 6C002030
I Z = (K3 + 5000) / 1O000 +
IU1 * IU2 6C002040
RETURN 6C002050
END 6C002060

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL.L VOLXX 80 0732290 0526007 L b 8

X-1 42 CHAPTER DATA


1 PHYSICAL PROPERTIES

11.1.6.9 IMPLEMENTATION PROCEDUREFOR SUBROUTINE TABGC

I nt o d a y ' sw o r l dt h e r ei s a r a p i d l yd e v e l o p i n gt r e n dt o usecomputers in
c u s t o d yt r a n s f e r measurements, a c c o u n t i n g work, processcontrolsystems, and a
varietyofother useswhere t a b l e s must be i n c o r p o r a t e di n t oc o m p u t e r codes.
Y e t many o f t h e p r i n t e d t a b l e s a r e a l m o s t i m p o s s i b l e t o code due t o t h e f a c t
t h a t someone has s l i g h t l y m o d i f i e d s e l e c t e d v a l u e s t o d i f f e r f r o m t h o s e
o b t a i n e du s i n gt h em a t h e m a t i c a le x p r e s s i o nt h a ts u p p o s e d l yg e n e r a t e dt h e
tables. To overcome t h i s problem i t i s o f t e n r e q u i r e d t o add e x t e n s i v e excep-
t i o nt a b l e st ot h e codes. T h i s makes t h e codes l a r g e and cumbersome t o modify,
and r e s t r i c t s t h e i r use t o l a r g e r computersystems. A l s ow i t ht h ed e v e l o p m e n t
o fb e t t e rm e a s u r i n gd e v i c e s i t isoftenpossibletogain more d i g i t s o f p r e c i -
sioninthetable p a r a m e t e r s ,n e c e s s i t a t i n gf i n e rg r i do ft h et a b u l a rv a l u e s ,
r e s u l t i n gi nl a r g e r volumes o f p r i n t e d t a b l e s t o be handled.
Inaddition, as t h e o n - l i n e u s e of computers f o r m e t e r i n g p u r p o s e s
i n c r e a s e s ,t h ed i r e c t use o f p r i n t e d t a b l e s w i l l d e c r e a s e ;t h e r e f o r e ,t h e new
Standard i s an e x p l i c i ti m p l e m e n t a t i o np r o c e d u r er a t h e rt h a n a s e to f equa-
t i o n s o r a s e to ft a b l e s . I t must be remembered t h a tt h es t a n d a r d i z a t i o n of
t h ei m p l e m e n t a t i o np r o c e d u r ei m p l i e ss t a n d a r d i z a t i o no ft h es e to fm a t h e m a t i -
calexpressions used w i t h i n t h e code. Absoluteadherence t ot h ep r o c e d u r e
willhelptoinsurethatall computers and computercodes o ft h ef u t u r e , meet-
i n gt h es p e c i f i c a t i o n s and r e s t r i c t i o n s , w i l l be a b l e t o p r o d u c e t h e same
results. I t i s b e l i e v e dt h a tt h i sp r o c e d u r ew i l la l l o wf o rt h e maximum
machine and codeindependence.The procedure was implemented i n computer sub-
r o u t i n e si s s u e d by API i n 1980 u s i n g ANSI/ASA FORTRAN. The subroutinesmaxi-
m i z e dp r e c i s i o n by t h e u s e o f 3 2 - b i t i n t e g e r a r i t h m e t i c .
The procedure a s d e s c r i b e d i n t h e f o l l o w i n g t e x t can, by c a r e f u l and
d e l i b e r a t ea p p l i c a t i o no fn u m e r i c a la n a l y s i s , be used w i t h t h e m a j o r i t y o f
languages and word s i z e si np r e s e n to ra n t i c i p a t e d use. Touse t h es t a n d a r d
procedure means t o m a i n t a i n a b s o l u t e and unwaveringadherence t o t h e number of
digits specified at each s t e p and t o t h e c a l c u l a t i o n p r o c e d u r e a s o u t l i n e d .
I nt h ep r o c e d u r e ,t h en o m e n c l a t u r e used i s t h a t o f ASTM E380-76, unless
an e x p l i c i t p r o c e d u r e i s g i v e n below, i n whichcasetheproceduregivenbelow
overridesthatgiven by ASTM E380-76.
I nt h ep r o c e d u r et h en o m e n c l a t u r e (XXX.XX) means f i v e ( 5 ) m a t h e m a t i c a l l y
significant digits.

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API MPMS*LZ.Z VOL*X 80 m 0732290 0526008 OT4 m

SECTIONVOLUME CORRECTION
FACTORS x-143

I nt h ep r o c e d u r et h en o m e n c l a t u r e (XXX.XX) means f i v e ( 5 ) m a t h e m a t i c a l l y
significantdigits.
The termroundingas used i nt h ep r o c e d u r e means: C o n s i d e ro n l yt h e
first digit to the right of the desired position and
a. I f t h a td i g i ti sg r e a t e rt h a n 4, i n c r e m e n tt h ed e s i r e dp o s i t i o n by
o n ea n dd r o pt h er e m a i n i n gd i g i t s t o t h e r i g h t of t h e d e s i r e d p o s i -
tion.
b. I ft h a td i g i ti sl e s st h a n 5, s i m p l yd r o pt h er e m a i n i n gd i g i t st o
the right of t h e d e s i r e d p o s i t i o n ,

C a l c u l a t i o nP r o c e d u r e

STEP 1 : Round i n p u tv a r i a b l e so fc o e f f i c i e n to ft h e r m a le x p a n s i o n (ALF60) and


observedtemperature
a. Round c o e f f i c i e n to ft h e r m a le x p a n s i o nt ot h en e a r e s t
.O000005 and c a r r ya s 7 digit result
iALF60
.e. = .OOOXXXX
b. Round observedtemperature t o t h en e a r e s t
0.1 'F and c a r r ya s 4 digitresult
¡.e. observed
temperature (DEGF) = XXX.X

STEP 2: Calculate A t
def¡ne A t = DEGF - TBASE
--

Note: TBASE c a r r i e d t o 3 d i g i t s XX.X (60.0)


| | |
|

Carry A t = XXX.X
|
|||| |||| | | ||

STEP 3: C a l c u l a t i o no f VCF
|||| |||| || || |

d e f i n e VCF = E X P I - a A t ( l . O + 0.8crAt)l
= EXPi-aA t - 0.8 a 2 A t 2 ]
|
|||| |||---

a. Calculation
oef x p o n e n t
a ( l >a A t = ,XXXXXXXX
a(2) .8 a A t = .XXXXXXXX
a(3) .8 a * A t * = .OXXXXXXX rounded t on e a r e s t .O0000001
a(4) - aAt - 0.8 a2 A t 2 = 0.XXXXXXX w i t h any t r a i l i n g
d i g it s dropped

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
x-144 CHAFIER 11"PHYSICAL PROPERTIES DATA

b. C a l c u l a t i o n of e x p o n e n t i a l
VCF = E X P I - a A t - 0.8 a 2 A t 2 ] = X.XXXXXX
using at least the first 7 t e r m so ft h e power s e r i e s e x p a n s i o n
o f ex

Computational =
1.XXXX rounded t o n e a r e s t 0.0001 i f VCF 1. 1
v a l u e of VCF
0.XXXXX rounded t o n e a r e s t 0.00001 i f VCF C 1

T a b l ev a l u e
o f VCF = X.XXXX rounded VCF n
t oe a r e s t 0.0001

The
1980 i n t e g e r FORTRAN code issued by API c o n t a i n e d an i n t e g e rm u l t i -
p l i c a t i o na l g o r i t h m . A d e s c r i p t i o n of each i sc o n t a i n e di nt h ef o l l o w i n g :

INTEGER MULTIPLICATION PROCEDURE


(FOR 32BIT ARITHMETIC)

DATA DEFINITION
X, Y a r ei n t e g e r numbers t h a t a r e equal t o o r l e s s t h a n 2 * 109
( s l i g h t l yl e s st h a n 231). A l a r g e rv a l u e may causeoverflow.Inaddition,
thetotal number o f d i g i t s i n X and Y mustnotexceed 17, o t h e r w i s eo v e r f l o w
will occur.
Z i st h ep r o d u c t XY scaled by lom8, ¡.e. Z = XY/108.
Note: I f it i s d e s i r a b l e t o o b t a i n maximum p r e c i s i o n , X and Y may be
scaled up p r i o r t o use of t h ep r o c e d u r e .T y p i c a l l y ,a tl e a s t 15 d i g i t s a r e
needed t o o b t a i n 6 d i g i t p r e c i s i o n , 16 f o r 7 and 17 f o r 8.
The l a r g e s t v a l u e s o f X and Y t h a t may beused a r e 2 O00 O00 O00 and
99999 999.
CALCULATION
x/10000 = u
10000 U1 = K
X - K l = V

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API M P M S * L L = L VOL*X B O W 0732290 052bOLO 7 5 2

SEcnm V VOLUME CORRECTION FACTORS X-145

Note: 2 has been scaled by


and may have t o be r e s c al e db e f o r e use.
TOTAL DIGITS I N X AND Y 12 13 14 15
" " " 16 17
DIGITS IN PRODUCT, Z 3-4 4-5 6-7
5-6 8-9
7-8

Examples f o r Checkout

The f o l l o w i n g examples aredesigned to aid in checkoutprocedures for


boththeexisting P I s u b r o u t i n e andany subroutineswhicharedevelopedusing
t h ei m p l e m e n t a t i o np r o c e d u r eo u t l i n e d above.The l i n e s of t h e examples a r e
numbered t o correspond t o t h e c o r r e s p o n d i n g l i n e s w i t h i n t h e i m p l e m e n t a t i o n
proced Ure.

EXAMPLE 1: Assume a l i q u i dp e t r o l e u mp r o d u c tw i t h an i n p u tc o e f f i c i e n t of
thermalexpansioncorrected t o 60 "F o f 0.0004181andan observed
t e m p e r a t u r eo f 105.03 OF. C a l c u l a t et h e VCF r e q u i r e d t o c o r r e c t
t h e volume t o 60 OF, c o r r e c t t o 4 decimal d i g i t s .

STEP 1: a)
rounded ALF60 = .O004180
b)
rounded DEGF = 105.0

STEP 2: A t = 45.0

STEP 3: C a l c u l a t i o no f VCF
a. C a l c u l a t ieoxn
fponent
a(l> 0.01881000
a(2) 0.01504800
a(3) 0.00028305
a(4) -0.01909305
b. C a l c u l a t i o n of e x p o n e n t i a l
VCF = 0.981088
|||| |||---
|
|||| |||| || || |

VCF c o r r e c t t o 4 decimal d i g i t s = 0.9811


|||| |||| | | ||

EXAMPLE 2: Assume a l i q u i dp e t r o l e u mp r o d u c tw i t h an i n p u tc o e f f i c i e n to f
thermalexpansioncorrected t o 60 OF o f .O005625 andan observed
|
|
| | |
--

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API MPMS*LL.L VOLxx 8 0 0732290 0526033 699 m

X-i 46 CHAPTER ii-PHYSlCAL


PROPERTIES DATA

t e m p e r a t u r eo f 39.1 OF. C a l c u l a t et h e VCF r e q u i r e d t o c o r r e c t t h e


volume t o 60 OF, correct to 5 significantfigures.
--
| | |

STEP 1: a. rounded ALF6O = ,0005625


|
|
|||| |||| | | ||

b. rounded DEGF = 39.1


|||| |||| || || |

STEP 2: A t = -20.9
|
|||| |||---

STEP 3 C
: a l c u l a t i o no f VCF
a. C a l c u l a t i o noef x p o n e n t
a( 1 ) -0.01 175625
a(2) -0.00940500
a(3) 0.00011056
a(4) 0.01 164569
b. C a l c u l a t i o no ef x p o n e n t i a l
VCF = 1.011713

VCF c o r r e c t t o 5 s i g n i f i c a n t f i g u r e s 1.0117

EXAMPLE 3: Assume a l i q u i dp e t r o l e u mp r o d u c tw i t h an i n p u tc o e f f i c i e n t of
thermalexpansioncorrected t o 60 OF o f 0.0003355andan observed
t e m p e r a t u r eo f 269.4 OF. C a l c u l a t et h e VCF r e q u i r e d t o c o r r e c t t h e
volume t o 60 OF, c o r r e c t t o 5 s i g n i f i c a n t f i g u r e s .

STEP 1: a. rounded ALF60 = .O003355


b. rounded DEGF = 269.4

STEP 2: A t = 209.4

STEP 3 :C a l c u l a t i o n of VCF
a. C a l c u l a t i o n of exponent
a(l) 0.07025370
a(2) 0.05620296
a(3) 0.00394846
a(4) -0.07420216

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*33*3 VOLSX 8 0 D 0732290 0526032 525 D

FACTORS
SECTION~ " V O C U M ECORRECTION X-147

b. C a l c u l a t i o n of exponential
VCF = .928483

VCF c o r r e c t t o 5 s i g n i f i c a n t f i g u r e s = 0.92848

11.1.23 TABLES 23A and 23B- 11.1.23.1 TABLE 23A"GENERALIZED CRUDE


Correction of Observed Relative OILS, CORRECTION OF OBSERVED
RELATIVE DENSITYTO RELATIVE
Density to Relative Density DENSITY 60/60°F
6O/6O0F
TABLE 23Agives the values of relative density
TABLES 23A and 23B givevalues of relative density 60/60"F corresponding to hydrometer readings at ob-
60/6OoF corresponding to the relative density of that served temperatures other than 60°F. In converting the
fluid at temperatures other than 60°F. It is assumed that API hydrometer reading at the observed temperature
the observeddensities areobtained with a glass to the corresponding relative density 60/60T,two cor-
hydrometer.Thedensitymeasurements at tempera- rections are necessary: the first arises from the change
tures other than 60°F require two corrections: the first in volume of the glass hydrometer with temperature
is for the changein volume of the glass hydrometer with (stem correction) and the second from the change in
temperature, the secondis for thechange in the volume volume of the crude oil with temperature. Both have
of the fluid with temperature. The first correction is been applied in this table. The values of relative den-
necessary because theglass hydrometers are calibrated sity 60/WF in this table are the result of a computer
for 60°F. Both corrections are applied in this table. procedure whichis theStandard(see 11.1.23.2 and
The data are representedby two tables to maximize 11.1.23.3).
accuracy while maintaining convenienceof use: The temperature ranges of this table are:
TABLE 23A Generalized Crude Oils
(see Volume IV) Relative
Density 60/60"F "F
TABLE 23B GeneralizedProducts 0.8250 to 1.0760 O to 300
(see Volume V) 0.7795 to 0.8250 o to 250
The development and intendeduse of these tables is 0.6110 to 0.7795 o to 200
described in 11.1.6. The parameters KOand K Imay be
found in 11.1.24.7.1 (see Volume VI). The values of relative density 60/60"Fgiven in this
The limits of these tables are illustrated in Figures table are based on data from theU.S. National Bureau
X-9 and X-10. of Standards and from other published data. Portionsof

300
250
Temp 200
"F
150
Data Range

n
U
1.0760
.7795.7585 .8250 .6110

Relative Density
Figure X-9 - Data Limits for TABLE 23A

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API MPMS*LL*L V O L * X BO m 0732290 052b013 4bL m

x-148 C!4APTER 11"PHYSICAL PROPERTIES DATA

250
Temp
"F 200

150

I 1

,8250 7795 .653!5

Relative Density

Figure X-10 - Data Limits for TABLE 238

the density and temperature ranges represent areas be- polation is not required if the TABLE 23A results are
yond these data. Thus, mathematical techniques were to be used as entries to TABLE 24A.
employed to extrapolate beyond the density and tem-
This table must be entered with hydrometer
perature rangesof the given data to determine the value
reading measured with a soft glass hydrometer
of relative density60/60"Ffor these areas. These values
calibrated at 60°F and an observed temperature.
are denoted by an asterisk (*), Extension of this table
beyond the ranges shown is not recommended. A correction to the glass hydrometer reading
has been incorporated into the table to account
for the thermal expansion of glass. The hydrom-
Increments usedin this table for determining relative eter constant, as defined in the Report onthe De-
density 60/60"F are 0.5"F and 0.0020 relative density. velopment,Construction,Calculation, and Prep-
Interpolation with temperature is not intended since aration of the ASTM-IP Petroleum Measurement
there is no practical method of interpolation that will Tables (1960), varies with temperature according
produce the accuracy obtainable from the Standard. to the following:
However, interpolationwith relative density to one ad- HYC = 1 - O.oooO1278 (t - 60°F)
ditional significant digit can be reasonably made. Inter- - 0.0000000062 ( t - 60°F)2

11.1.23.2 PROGRAM DOCUMENTATIONFOR SUBROUTINE


TAB23A"GENERALIZED CRUDE OILS, CORRECTION OF
OBSERVED RELATIVE DENSITY TO RELATIVE DENSITY60/60"F

ABSTRACT
--
| | |
|
|
|||| |||| | | ||

Subroutine Title: W23A - TABLE 23A,


Generalized Crude Oils,
to 60/60 OF.
Relative Density Correction
|||| |||| || || |

Description: This subroutine is designedto calculate relative


|
|||| |||---

density 60/60 O F corresponding tn relative


densities &served at tenperatures otherthan
60 OF.

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*33.3 VOL*X 80 m 0732290 0526034 3TB m

SECTION 1-VOLUME CORRECTION FACTORS X-1 49

Program Respansibility: American Petrolem I n s t i t u t e


Measurement Coordinat ion
2101 L Street N.W.
'Washington, D .C. 20037

Date Issued: Au
gut 1980
s

Language: EDKIPAN, ?WSI/ASA Standard

Reference: API Standard 2540, ?aBLE 24 11.1.24

THIS SUBRCUTINE c91s


AND SPECIFICATIONS DESCRIBED I N lHE DOCUMENT PFWEJXJRE 11.1.23.3.
ANY MODIFICATION TO TIIS SUBRCUTINE WST RIGIDLY TO THE
SAME ALGORITHMS AND SPEIFICATIONS,

11.1.23.2.1 Introduction

TAE323A is a mnputer subroutine designed to c a l c u l a t e f o r s u b s t a n c e s


c h a r a c t e r i z e d as crude o i l the value of r e l a t i v e d e n s i t y 60/60 OF
corresponding to r e l a t i v e d e n s i t i e s Observed at temperatures other than
60 OF. The subroutine accepts as inputthe observed r e l a t i v e density
rounded to the nearest 0.0005 and the t e r p e r a t u r e munded to the n e a r e s t
O .1 OF. I f either i n w t v a l u e has mt been properly rounded the
subroutine w i l l round the values and r e t u r n the mrrected values. The
subroutine returns the value of relative &nsity 60/60 O F rounded to the
n e a r e s t 0.0001and a s t a t u s f l a g f o r user mnvenience. The f l a g is set b
-1 i f an error m d i t i o n o c c u r s and to +1 i f the value of the r e l a t i v e
d e n s i t y 60/60 O F is anextrapolation. The limits of the m r r e l a t i o n
including the extrapolated region are depicted in Figure X-9. The calling
program rmst check the f l a g and provide user with appropriate warning
message cx program termination. The f l a g is set to zero when the input
v a r i a b l e s and the r e l a t i v e d e n s i t y at 60 O F are within the limits of the
correlation.

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL.L VOL*X BO 0732290 O526035 234 W

x-150 CHAFTER1 P PHYSICAL PROPERTIES


DATA

11.1.23.2.2 SubroutineSpecifications

The range of a p p l i c a t i o n is:

Relative Densitv Tenperature , O F


0.6110 to 0.7795 o to 200
0.7800 to 0.8250 O to 250
0.8255 to 1.0760 O to 300

Referencedrrodules: ALE'23A,
DIV23A,
MPY23A,
VCF23A
EY3KI'RAN f u n c t i o n s : FLOXI?, IABS

Averageexecution time: 675entries/CPUsecond


IM 370/168
B

The subroutines are w r i t t e n i n ANSI/ASA FURIPAN using integer arithmetic.


--

The s i z e and storage requirements are:


| | |
|

1. Conpilable
source
statements 122
|
|||| |||| | | ||

2. Decimal storage bytes 3482


3. Words 871
|||| |||| || || |
|
|||| |||---

11.1.23.2.3 CallinaSeauence

SG - R e l a t i v ed e n s i t y at &served tenperature
( S G r e t u r n e d ' w i l l be rounded to nearest 0.0005)

DEGF - Observed tenperature, OF

(DEGF r e t u r n e d w i l l be rounded to nearest 0.1 OF)

IHyDIio - Hydrometer switch


O: The r e l a t i v e d e n s i t y w a s observed w i t h a glass hydro-
meter and a hydrometer oorrection is needed

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*33.3 VOL*X 80 m 0 7 3 2 2 9 00 5 2 6 0 3 6L 7 0 m

SECTIONVOLUME CORRECTION
FACTORS X-151

1: The r e l a t i v e d e n s i t y was determined from an on-line


densitometer and a hydrometer a x r e c t i o n is not
needed.

OUTPUT DESCRIPTION

SG60 - Correspondingrelativedensity 60/60 OF rounded to nearest 0.0001

IFTA2 - S t a t u s Code
O: I n d i c a t e si n p tv a r i a b l e s and c a l c u l a t e dr e s u l t s are
w i t h i n the range of a p p l i c a t i o n
1: I n d i c a t e si n p u tv a r i a b l e s are i n extrapolatedregion
-1: I n d i c a t e si n p u tv a r i a b l e s or c a l c u l a t e dr e s u l t s are
o u t s i d e the range of application
WIE: If a mn-convergenceoccurs, the s u b r o u t i n ep r i n t s the following
message:

AT =.X E m E S F AND X.= F5LRI'IVE DENSITY, A OORRESKN"


I G RJZATIVE ENSITY 60/60
N O F CCULD Ncrr BE DETERMIIWD.

T h i s message should mt occur unless the d e hasbeen altered or


incorrectlyreproduced. Follow Section 11.1.23.3, Implemntation
Procedure, and test the subroutineexactly as described. The
s t a t u s f l a g w i l l be set to -1, S 6 0 to -9.9999, and program c o n t r o l
returned to the c a l l i n g r o u t i n e .

11.1.23.2.4 Method ofCalculation

This subroutine uses a mnvergencetechnique to determine the r e l a t i v e


d e n s i t y 60/60 OF that m r r e s p m d s tn a relative density &served at some
t e n p e r a t u r e other than 60 OF. Since the equations are expressed i n terms
of d e n s i t y , the r e l a t i v e d e n s i t y is a m v e r t e d to d e n s i t y by the following
relationship:

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
X- 152 CHAPTER
1 P PHYSICAL PROPERTIES
DATA
--
| | |

where
|
|
|||| |||| | | ||

= density at temperaturet
Pt
O 3
999.012 = density of water at 60 F, Kg/m
|||| |||| || || |

of 60 OF is
|

The coefficient of thermal expansion at the base temperature


|||| |||---

related to density at the base temperature


by

u60
= - KO
2
+ -
P 60 60

The values of p and u are used in the volume correction factor equation
t 60
to compute p
60 *

+ 0.8a60At)
VCF =
'60
= EXP [-a60 At(1
1
Thus p t = p60 EXP [-a60At(l + 0.8a60At)
1
where p = density at the base temperature
60

At = t - 60.0
Sincetheequation for p60 cannot be s o l v e d e x p l i c i t l y , a successive
approximationiterative scheme is used IB& t a i n a s o l u t i o n . The i n i t i a l
estimate of p60 is the value of the d e n s i t y at observed tenperature t.
This approximation is s u b s t i t u t e d into the r i g h t hand s i d e o f the equation
to & t a i n a secondvalueapproximation.This process of s u b s t i t u t i n g i n t o
t h e r i g h t hand side of the equation and estimating a new value from the
other is repeated u n t i l two a m s e c u t i v e r e s u l t s are i n agreement to the
desired degree of accuracy. In subroutine TAB23A, a convergedsolution is
3
reached when the change i n d e n s i t y is less than 0.05 Kg/m i n two
successive passes.

A f u l l e x p l a n a t i o n of the equations and the values of the parameters


KO and K 1 may be found i n API Standard 2540, ?aBLE 24, 11.1.24.

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API MPMS*ZZ.L VOL*X 80 m 0732290 O526038 T 4 3 m

SECTION1“VOLUME CORRECTION
FACTORS x-153

11.1.23.2.5 Exanmles

These examples are t u t o r i a l in nature and are mt intended t~ be s u f f i -


cientforsubroutinecheckout. The examples given in the Implementation
Procedure, Section 11.1.23.3, are to be used f o r the amputer checkout.

Exarrple 1

SG = O .7632 (observed w i t h a glass hydrometer)


DEGF = 87.5
IHYDrn= o

CALL W 2 3 A (SG,DEGF,IHyDra3,SG6O,IFLtAG)

After the call: SG = 0.7’630


DECF = 87.5
IHYDrn = o
S60 = 0.7749
IFLAG = O

Example 2

SG = 0.6390 (observed
with a g l a s s hydrometer)
DM;F = 175.51
IHYDRo= o

Call TAB23A (SG,DEGF,IHYDFQ,SG60,IFLAG)


|||| |||---
|

A f t e r the call : SG = 0.6390


|||| |||| || || |

DEGF = 175.5
1mm= o
|||| |||| | | ||

SG60 = 0.6956
|

IFLAG = 1
|
| | |
--

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL.L V O L V X B O W 0732290 0526019 98T W

x-154 CHAPTER DATA


1 P PHYSICAL PROPERTIES

Exarrple 3

SG = O .6390 (observed w i t h a glass hydrometer)


DEW = 7.5
1mm= o

Call TAB23A (SG,D€GF,IHYD~,SG6O,IFLpL;)

After the call: SG = 0.6390


DEGF = 7.5
1mm = o
SG60 = -9.9999
IFW = -1

|||| |||---
|
|||| |||| || || |
|||| |||| | | ||
|
|
| | |
--

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*IJIJ-IJ V O L * X 80 m 0732290 052b020 b T L m

SECTIONVOLUMEFACTORS
CORRECTION x-155

11 .1.23.2.6 FLOWCHART

INPUT: RELATIVE DENSITY


OBSERVED TEMPERATURE

V
ROUND INPUT DATR
TO SPECIFICATIONS

A SET STATUSFLAG = -1
BOUNDS OF
AND NO REL. DEN.
AEL.
60/60'F == - 9.9999
RETURN
9.9999 - I

ICONVERT
-=I
CALCULATEDELTA

RELATIVE DENSITY
T

TO DENSITY I

HYDROMETER NO
D
CORRECTION

i-
[ I N I T I A L I Z E 60°F DENSITY ]
I

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API MPMS*IIL=L V O L * X 80 0732270 052b02J 538 m

X-1 56 CHAPTER DATA


1~-PHYSICMPRWERTIES

I CALCULATE ALPHII I

i
i CALCULATE
VCF

CALCULATE NEW
60. F DENS ITY

NO

SET
STATUS
FLAC -1
AND REL.DEN.
NO m 60I60.F -9.9999
F CORRELATIO RETURN

CALCULATE RELATIVEDENSITY60/6OeF

SETSTATUSFLAC =

I SETSTATUSFLAG
RETURN
= O I
-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API M P M S U L L - L V O L U X 80 m 0732290 O526022 474 m

SECTIONV VOLUME CORRECTION FACTORS X-157

11.1.23.2.7 SubroutineListing

TAE323A Thissubroutine accepts r e l a t i v e d e n s i t y and the & e m a t i o n


tenperature and determines the corresponding relative Qnsity
60/60 OF for Generalized Crude O i l s .

Referenced Modules

ALF23A This module c a l c u l a t e s t h e e f f i c i e n t of thermal expansion


needed to determine a volume correction factor.

DIV23A This module is designed to produce additional accuracy from


an integer divide.

MPY23A This module is designed to produce additional accuracy from


an integer nu1tip1icat ion.

VCF'23A This module c a l c u l a t e s a v


ol
ume correction factor.

SUBROUTINE TAB23A(SG,DEGF,IHYDRO,SGGO,IFLAG) 23A0001 O


C 23A00020
C ( C ) COPYRIGHT 1 9 8 0 23A00030
C AMERICAN PETROLEUM INSTITUTE 23A00040
C ALLRIGHTS RESERVED 23A00050
C 23A00060
C T H I S SUBROUTINE I S AVOLUNTARYSTANDARDAND WAS DEVELOPED 23A00070
C UNDER THE AUSPICES OF THE JOINTAPI-ASTM COMMITTEE ON STATIC 23A00080
C PETROLEUMMEASUREMENT I N PART FROM DATA GENERATED BY A 23A00090
C PROJECTFUNDED BYTHEAMERICAN PETROLEUM INSTITUTE AT THE 23A001 O 0
C U . S . NATIONAL BUREAUOF STANDARDS, GAITHERSBURG, MARYLAND. 23A0011 O
C 23A00120
C INQUIRIES CONCERNING I T S APPLICATION SHOULD BE ADDRESSED TO: 23A00130
C 23A00140
C AMERICAN PETROLEUM INSTITUTE 23A00150
C MEASUREMENT COORDINATION 23A00160
C 2 1 0 1 L STREET,
N.W. 23A00170
C WASHINGTON, DC 2 0 0 3 7 23A00180
C 23A00190

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API MPMS*LL.L V O L X X 80 W 0732290 0 5 2 b 0 2 3 300 W

x-158 1 P PHYSICAL PROPERTIES


CHAPTER DATA

C ................................................................. 23A00200
* *
--

C 23A0021 O
* 23A00220
| | |

C * T H I S SUBROUTINE OR THE MATHEMATICAL RELATIONSHIPS


* 23A00230
|

C * REPRESENTED THEREBY MAY BE USED BY ANYONE WISHING


|

* 23A00240
|||| |||| | | ||

C * TO DO SO, BUT THE AMERICAN PETROLEUM I N S T I T U T E , THE


C * AMERICAN SOCIETY FOR TESTING AND MATERIALS, AND THE * 23A00250
C * I N S T I T U T E OF PETROLEUM AND THEIR RESPECTIVE MEMBERS AND * 23A00260
|||| |||| || || |

C * THE U . S . NATIONAL BUREAU OF STANDARDS, SHALL NOT BE HELD * 23A00270


C * RESPONSIBLE OR L I A B L E I N ANY WAY FROM LOSS OR DAMAGE, * 23A00280
C * INCLUDING, BUT NOT L I M I T E D TO, CONSEQUENTIAL DAMAGE, * 23A00290
|

C * RESULTING FROM SUCH


USAGE OR FOR VIOLATION OF ANY FEDERAL, * 23A00300
|||| |||---

C * STATE, OR MUNICIPAL LAWS, REGULATIONS OR PRACTICES OF THE * 23A0031 O


C * UNITED STATES, OR OF ANY FOREIGN COUNTRY. * 23A00320
C * * 23A00330
C ................................................................. 23A00340
C 23A00350
C PURPOSE 23A00360
C 23A00370
C T H I S SUBROUTINE I S DESIGNED TO ACCEPT AS INPUT A RELATIVE 23A00380
C DENSITY(SG) AT SOME OBSERVED TEMPERATURE (DEGF) I N DEGREES 23A00390
C FAHRENHEIT AND CALCULATE THECORRESPONDING RELATIVEDENSITY 23A00400
C 6 0 / 6 0 DEGREES FAHRENHEIT FOR TABLE 23A, GENERALIZED CRUDE O I L S . 23A0041 O
C THEUSE OF A GLASS HYDROMETER CORRECTION I S OPTIONAL. 23A00420
C 23A00430
C EXTERNAL FUNCTIONS OR SUBPROGRAMS 23A00440
C 23A00450
C ALF23A, DIV23A, MPY23A,RH023A, VCF23A 23A00460
C FORTRAN FUNCTIONS: FLOAT, IABS 23A00470
C 23A00480
C DESCRIPTION OFPARAMETERS 23A00490
C 23A00500
C SG - RELATIVE DENSITY AT OBSERVED TEMPERATURE, NEAREST ( I N ) 23A0051 O
C ,0005 (PROGRAM W I L L ROUND SG
TO THE
NEAREST 23A00520
C .O005 ANDRETURNROUNDED VALUE.) 23A00530
C DEGF - OBSERVED TEMPERATURE, NEAREST 0 . 1 DEG F (IN) 23A00540
C (PROGRAM W I L L ROUND T TO THE NEAREST . 1 23A00550
C DEG F AND RETURNTHEROUNDED VALUE.) 23A00560
C IHYDRO - APPLICATION OF GLASS HYDROMETER CORRECTION (IN) 23A00570
C -
O HYDROMETER CORRECTION I S TO BEMADE 23A00580
C -
1 HYDROMETER CORRECTION I S NOT TO BE MADE 23A00590
C SG60 - CORRESPONDING RELATIVE DENSITY 6 0 / 6 0 DEGREES F (OUT) 23A00600
C (ROUNDED TOTHE NEAREST .0001) 23A0061 O
C IFLAG - STATUS CODE (OUT 1 23A00620
C O - INPUT AND CALCULATEDRESULTS I N CORRELATION L I M I T S 23A00630
C 1 - INPUT OR CALCULATEDRESULTS I N EXTRAPOLATED REGION 23A00640
C -1 - INPUT OR CALCULATEDRESULTS NOT W I T H I NL I M I T S OF 23A00650
C CORRELATION 23A00660
C BASE TEMPERATURE ( 6 0 DEGREES F ) 23A00670
DATA IBASE / 600 / 23A00680
C 23A00690
C UPPER
ANDLOWER DENSITY L I M I T S ( O , 1 0 0A P I ) 23A00700
DATA LIMI , LIMP / 1 0 7 4 9 8 2 ,6 1 0 6 2 7 / 23A0071 O
C 23A00720
C BREAK POINTS FOR RELATIVEDENSITY(.7790 AND .B245 ) 23A00730
DATA I B P I ,I B P 2 / 7 7 9 08, 2 4 5 / 23A00740
C 23A00750
C MAXIMUMTEMPERATURES AT EACH BREAK P01NT(200,250,300)23A00760
DATA IIT ITTM
MMP
PPI2,3, / 320
2500000, , / 23A00770

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API MPMS*LL-L V O L * X 8 0 m 0732290 O526024 247 m

CORRECTION
i-VOLUME
SECTION FACTORS x-159

C 23A00780
C BEGINNING OF TEMPERATURE EXTRAPOLATIONS ( 1 5 0 , 2 0 0 . 2 5 0 ) 2 3 A 0 0 7 9 0
DATA I E P 1 I, E P 2 I, E P 3 / 1 5 0 02, 0 0 02, 5 0 0 / 23A00800
C 23A0081 O
C BEGINNING OF EXTRAPOLATIONS ( .6110 - .7585) 23A00820
DATA IESG / 7 5 8 5 / 23A00830
C 23A00840
C COEFFICIENTS FOR CRUDE O I L S 23A00850
DATA KO, K1 / 3 4 1 0 9 5 7 , O / 23A00860
C 23A00870
C DENSITY OF WATER 23A00880
DATA I H 2 0 / 9 9 9 0 1 2 / 23A00890
C 23A00900
C U N I T 6 I S THE OUTPUT U N I T .I F THE OUTPUT I S TO BE DIRECTED 23A0091 O
C TO SOME OTHER U N I T , SET NOUT TO APPROPRIATEVALUE. 23A00920
NOUT = 6 23A00930
C ROUND SGTO NEAREST .O005 23A00940
I S G = ( (SG * 1 0 0 0 0 0 ) + 2 5 ) / 50 23A00950
ISG = ISG * 5 23A00960
SG = FLOAT(1SG) / 1 0 0 0 0 . 23A00970
C 23A00980
C CHECKFOR TEMPERATURE LESS THAN ZERO 23A00990
I F ( DEGF ) 9 0 0 1 , 01
,0 23A01 OGO
C ROUND TEMPERATURE TO NEAREST 0 . 1 DEG F 23A01 O 1 O
10 I T = ( (DEGF * 1 0 0 ) + 5 ) / 10 23A01020
DEGF = FLOAT(1T) / 1 0 . 23A01030
C IS SG LESS THAN . 6 1 1 0 ( I F YES, BRANCH TO 900) 23A01040
I F ( I S G - 6 1 1 0 ) 9 0 04,04,0 23AO1050
C I S SG GREATERTHAN 1.076 ( I F YES, BRANCH TO 900) 23A01060
40 I F ( ISG - 10760 ) 50, 50, 900 23A01070
C I S SG GREATER THAN , 7 7 9 0 ( I F YES, BRANCH TO 7 0 ) 23A01080
50 I F ( ISG - IBP1 ) 6 06 ,07 ,0 23A01 O90
C I S TEMPGREATERTHAN 200. ( I F YES, BRANCH TO 900) 23A011 O0
60 I F ( I T - ITMP1 ) 1 0 0 , 1 0 09, 0 0 23A0111 O
C I S SG GREATER THAN .8245 ( I F YES, BRANCH TO 90) 23A01120
70 I F ( I S G - I B P 2 ) 8 08,09,0 23A01130
C I S TEMPGREATERTHAN 250. ( I F YES, BRANCH TO 900) 23A01140
80 IF ( IT - ITMP2 ) 1 0 0 , 1 0 09, 0 0 23A01150
C I S TEMPGREATERTHAN 300. ( I F YES, BRANCH TO 900 23A01160
90 I F ( I T - ITMP3 ) 1 0 01, 0 09, 0 0 23A01170
1 O0 CONTINUE 23A01180
C 23A01190
IFLAG = O 23A01200
I D T = I T - IBASE 23A0121 O
C 23A01220
C COMPUTE DENSITY (RHO = REL DEN * DENSITY OF WATER) 23A01230
CALL MPY23A(ISG,IH2O,IRHOT,lO) 23A01240
IRHOT = ( IRHOT + 500 ) / 1 0 0 0 23A01250
C 23A01260
C I S HYDROMETER CORRECTION TO BE USED ( I F NO, BRANCH TO 140) 23A01270
I F ( IHYDRO ) 1 0 11, 0 11, 4 0 23A01280
C 23A01290
C COMPUTE HYDROMETER CONSTANT AT DELTAT 23A01300
C HYC = 1 .- . 0 0 0 0 1 2 7 8 * ( D E G F - 6 0 ) - .0000000062*(DEGF-60)**2 23A0131 O
1o1 IRD = 50 23A01320
I F( I D T )1 0 5 1
, 101, 10 23A01330
105 IRD = - 5 0 23A01340
110 I H 1 = ( 12 7 8 0 0 * I D T + I R D ) / 100 23A01350

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API N P N S ~ I , I , . LV O L ~ X B O m 0732290 0526025 183 m

x-160 CHAPTER DATA


1 PHYSICAL PROPERTIES

IH2 = (62 * IDT * IDT 500) / 1 0 0 0 + 23A01360


IHYC = 1000000000 IH1 - IH2 - 23A01370
C 23A01380
C APPLY HYDROMETERCONSTANTTO DENSITY ATTEMPERATUREDEGF 23A01390
IRHO = IRHOT * 1 0 23A01400
CALL MPY23A(IRHO,IHYC,IRHOT,lOOOO) 23A0141 O
IRHOT = ( IRHOT 50 ) / 100 + 23A01420
C 23A01430
C 23A01440
1 4 0 JRHOT = IRHOT * 1 0 0 0 0 23A01450
C 23A01460
IRHO60 = IRHOT 23A01470
C 23A01480
KRHO = O 23A01490
C 23A01500
NP = O 23A0151 O
C 23A01520
300 NP = NP 1 + 23A01530
C 23A01540
CALL ALF23A(IRH060,KO,Kl,IALF) 23A01550
C 23A01560
CALL V C F 2 3 A ( I A L F , I D T , I V C F ) 23A01570
C 23A01580
IVCF = ( IVCF 50 ) / 1 0 0 + 23A01590
C 23A01600
CALLDIV23A(JRHOT I V C F , IRHOGO, 1 0 0 0 ) 23A0161 O
C 23A01620
C 23A01630
I F ( IABS(IRHO60 - KRHO ) -
5 0 ) 500, 3 2 0 3, 2 0 23A01640
C 23A01650
320 KRHO= IRHO60 23AO1660
C 23A01670
IRHO60 = ( IRHO60 + 5 ) / 1 0 23A01680
C 23A01690
23A01700
C 23A0171 O
4 O0 I F L A G = -1 23A01720
SG60 = - 9 . 9 9 9 9 23A01730
WRITE(NOUT,6001) DEGF, SG 23A01740
6001 FORMAT(5Hl AT , F 6 . 1 , 1 5 H DEGREES F AND , F 8 . 4 , 8 4 HR E L A T I V ED E N S I T Y 2
, 3A01750
1A CORRESPONDING RELATIVEDENSITY60/60F COULD NOT BE DETERMINED )23AO1760
-RETURN 23A01770
C 23A01780
C I S DENSITY GREATER THANUPPER L I M I (TI F YES, BRANCH TO 900) 23A01790
|||| |||---

500 I F ( IRHO60 -
L I M l ) 5 1 0 5, 1 0 , 900 23A01800
C IS DENSITYLESS THAN LOWER L I M I( TI F YES, BRANCH TO 900) 23A0181 O
|

510 I F ( IRHO60 - L I M 2 ) 9 0 0 5, 2 0 5, 2 0
|||| |||| || || |

23A01820
c 23A01830
$20 JRHOT = IRHO60 * 1 0 0 0 23A01840
23A01850
|||| |||| | | ||

C
C COMPUTE RELATIVE DENSITY
F 60/60 23A01860
CALL DIV23A(JRHOT,IH20,ISG60,1000) 23A01870
|

C 23A01880
|

+
| | |

ISGGO = ( ISGGO 50 ) / 100 23A01890


FLOATING
CPOINT VALUE ROUNDED
TO NEAREST .O001 23A01900
--

SG60 = FLOAT(ISG60) / 1 0 0 0 0 . 23A0191 O


C 23A01920
C I S SG LESS THAN , 7 (5I8F5 NO, BRANCH
TO 770) 23A01930

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API M P M S * L L * L V O L * X 80 D 0732290 052602b OLT m

SECTIONVOLUME CORRECTION FACTORS X-161

I F ( ISG - IESG ) 7 6 07, 6 07, 7 0 23A01940


C SET SWITCH I N D I C A T I N G EXTRAPOLATION
REGION 23A01950
760IFLAG = 1 23A01960
RETURN 23A01970
C I S SG GREATER
THAN . 7 7( 9I F0 YES, BRANCH
TO 790) 23A01980
770 I F ( I S G - I B P 1 ) 7 8 07, 8 07, 9 0 23A01990
C I S TEMP
GREATER
THAN 1 5( I0F. YES, BRANCH
TO 760) 23A02000
780 I F ( I T - I E P l ) 8 2 08,2 07,6 0 23A0201 O
C I S SG GREATERTHAN . a 2( 4I F5 YES, BRANCH
TO 810) 23A02020
790 I F ( ISG -I B P 2 ) 8 0 08
, 0 08, 10 23A02030
C I S TEMP
GREATER
THAN 2 0( I0F. YES, BRANCH
TO 760) 23A02040
800 I F ( I T - I E P 2 ) 8 2 08, 2 07, 6 0 23A02050
C I S TEMP
GREATER
THAN 2 5( 0 I F. YES, BRANCH
TO 760 23A02060
810 I F ( I T - I E P 3 ) 8 2 08,2 07,6 0 23A02070
C 23A02080
820 CONTINUE 23A02090
RETURN 23A021 O0
C SWITCH
SET I N D I C A T I N G OUTSIDE RANGE
OF TABLE
23A 23A0211 O
900IFLAG = -1 23A02120
SG60 = - 9 . 9 9 9 9 23A02130
RETURN 23A02140
END 23A02150

SUBROUTINE DIV23A(INUM,IDENOM,IRES,ISCALE) 23A02160


23A02170
T H I S SUBROUTINE I S DESIGNED TO PRODUCE ADDITIONAL 23A02180
ACCURACY FROM
AN INTEGER D I V I D E WHERE THE NUMERATOR 23A02190
I S ISCALE GREATERTHAN THE DENOMINATOR. THESUBROUTINE 23A02200
ASSUMES PROPER SCALING OF BOTHTHE INPUT NUMERATOR 23A0221 O
AND DENOMINATOR AND WILL RETURNTHE RESULTS MULTIPLIED 23A02220
BY ISCALE. 23A02230
23A02240
IRES1 =INUM/IDENOM 23A02250

|||| |||---
IRES2=(INUM-IRES1*IDENOM)*ISCALE/IDENOM 23A02260
IRES=IRESl*ISCALE+IRES2 23A02270

|
|||| |||| || || |
RETURN 23A02280
END 23A02290

|||| |||| | | ||

SUBROUTINE A L F 2 3 A ( I R H O , K O , K l , I A L F ) 23A02300
23A0231 O
|

C
|

23A02320
| | |

C T H I S SUBROUTINE I S DESIGNED TO CALCULATE ALPHA FOR


C USE I N DETERMINATION OF VOLUME CORRECTION 23A02330
--

C FACTOR. ALTHOUGH ALL CALCULATIONS ARE DONEAS INTEGERS, 23A02340


C THE SUBROUTINE RETURNS WITHA8 D I G I T VALUE 23A02350
C 23A02360
C INPUTVARIABLES 23A02370
C IRHO=DENSITY*IOO(KILOGRAMS/CUBIC METRE) 23A02380
C KO,K1=COEFFICIENTS OF DESIRED CURVE * 1 0 0 0 0 23A02390
C 23A02400
C ALGORITHM- 23A0241 O
C ALPHA=KO/RH0**2+Kl/RHO 23A02420
C 23A02430
C CALCULATE K1 /RHO 23A02440

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL.L VOL*X 80 m 0732290 O526027 T5b m

X-162 1 CHAPTER PHYSICAL PROPERTIES


DATA

C 23A02450
INUM=Kl '1 O000 23A02460
CALL DIV23A(INUM,IRHO,IALFl,lOOOO) 23A02470
C 23A02480
C CALCULATE K O / R H 0 * * 2 23A02490
C 23A02500
INUM=KO* 1 O0 23A0251 O
CALL DIV23A(INUM,IRHO,IALFS,lOOOO) 23A02520
CALL DIV23A(IALFS,IRHO,IALF2,10000) 23A02530
I A L F = ( I A L F l + I A L F 2 + 5 0 0) / l o 0 0 23A02540
RETURN 23A02550
END 23A02560

SUBROUTINE V C F 2 3 A ( I A L F , I D T , I V C F )

|||| |||---
23A02570
C 23A02580
C T H I S SUBROUTINE I S DESIGNED TO CALCULATE VOLUME 23A02590

|
|||| |||| || || |
C CORRECTION FACTOR. ALTHOUGH ALLCALCULATIONS ARE
DONE 23A02600
C AS INTEGERS, THE SUBROUTINE RETURNS WITHA 8 23A0261 O
C OR 9 D I G I T VALUE DEPENDENT UPON
WHETHER IDT 23A02620

|||| |||| | | ||
C I S P O S I T I V E OR NEGATIVE. 23A02630
C 23A02640
C ALGORITHM- 23A02650

|
|
C VCF=EXP(-ALPHA*DT(l.O+O.8*ALPHA*DT)) 23A02660

| | |
C 23A02670

--
C CALCULATE ALPHA'DT 23A02680
C 23A02690
ITERMl=IALF*IDT 23A02700
C 23A0271 O
C CALCULATE0.8'ALPHA'DT 23A02720
C 23A02730
ITERM2=ITERM1/5*40 23A02740
C 23A02750
C CALCULATE EXPONENT-ALPHA*DT(l.O+0.8*ALPHA*DT) 23A02760
C 23A02770
CALL MPY23A(ITERM1,ITERM2,ITERM3,1000) 23A02780
ITERM3 = ( ITERM3 +
500 ) / 1 0 0 0 23A02790
I X = -1TERM1 ITERM3 - 23A02800
C 23A0281 O
C CALCULATEEXPONENTIAL(F1RST 7 TERMS
OFPOWER SERIES) 23A02820
C 23A02830
ISUM1=1 O O O O O O O O + I X 23A02840
CALL MPY23A(IX,IX,ISUM2,1000) 23A02850
ISUM2=((ISUM2+50)/100)/2 23A02860
CALL MPY23A(IX,ISUM2,1SUM3,1000) 23A02870
ISUM3=((1SUM3+50)/100)/3 23A02880
CALL MPY23A(IX,ISUM3,1SUM4,1000) 23A02890
ISUM4=((1SUM4+50)/100)/4 23A02900
CALL MPY23A(IX,ISUM4,ISUM5,1000) 23A0291 O
ISUM5=((ISUM5+50)/100)/5 23A02920
CALL MPY23A(IX,ISUM5,ISUM6,1000) 23A02930
ISUMS=((ISUM6+5O)/l00)/6 23A02940
IVCF=ISUM1+ISUM2+ISUM3+ISUM4+ISUM5+ISUM6 23A02950
RETURN 23A02960
END 23A02970

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL*L V O L X X 8 0 0732290 O526028 992

--
| | |
|
|
|||| |||| | | ||
SECTIONVOLUME CORRECTION FACTORS x-163

SUBROUTINE M P Y 2 3 A ( I X , I Y , I Z , I S C A L E ) 23A02980
|||| |||| || || |

T HCI S ROUTINE PERFORMS INTEGER MULTIPLICATION. THE TOTAL 23A02990


C NUMBER OF D I G I T ISINX AND I Y MUSTNOT EXCEED 1 7 . OTHER 23A03000
C WISE, OVERFLOW W I L L OCCUR. 23A0301 O
|

23A03020
|||| |||---

C
I U 1 = I X / ISCALE 23A03030
K1 = ISCALE * I U 1 23A03040
IV1 = I X -
KI 23A03050
I U 2 = I Y / ISCALE 23A03060
K2 = ISCALE * I U 2 23A03070
IV2 = I Y -
K2 23A03080
K3 = I U 1 * I V 2 + IU2 * IV1 +I V 1 * I V 2 / ISCALE 23A03090
I 2 = (K3 +
I S C A L E / 2 ) / ISCALE + IU1 * IU2 23A031 O0
RETURN 23A0311 O
END 23A03120

Errata
Please make the following updates to this subroutine listing. For an explanation
of the updates see 11.1.6.

current: C BREAK PQIINTS FOR RELATIVEDENSITY ( - 7 7 9 0 AND -8245)23A00730


updated: C BREAK PglNTS FOR RELATIVEDENSITY(.7795 AND .8250)23A00730

current: DATA IBP1, IBP2 / 7790, 8 2 4 5 / 23A00740


updated : DATA 1BP1, IBP2 / 7795, 8 2 5 0 / 23A00740

current: C IS SG GREATER
THAN .7790 ( I F YES, BRANCH T 07 9 0 ) 23A0 1980
updated: C I S SG GREATER THAN .7795 ( I F YES, BRANCH T 07 9 0 ) 23A0 1980

current: C IS SG GREATER
THAN .8245 ( I F YES, BRANCH T 0 810) 23A02020
updated: C I S SG GREATER THAN .8250 ( I F YES, BRANCH T 08 1 0 ) 23A02020

11.1.23.3 IMPLEMENTATION PROCEDURE FOR SUBROUTINE TAB23A

The use of the computer has gained widespread acceptance throughout the
petroleum industry.Computers are used foraccounting prposes, i n
process s i r m l a t i o n and m d e l i n g , data r e t r i e v a l and evaluation, and are
now being used extensively in custody t r a n s f e r measurements and trans-
actions.In1968, the American Petroleum I n s t i t u t er e c o g n i z e d the need
f o r i n c o r p o r a t i n g e x i s t i n g petroleum masurement tables i n t o a m p u t e r d e .
I n June of 1973, a subroutine for TABLE 6 , Volume Reduction t n 60 OF, was
made available.Sincethen m y oftheotherstandardizedpetroleum
measurement tables have been made available as amputer subroutines.

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL=L VOL*X 80 0732290 0526029 829

x-164 C H A m R 11"PHYSICAL PROPERTIES DATA

However, the mquterization of an existing table of nLrmbers proved to be


a very difficult task. For instance, it proved to be inpossible to u x
the mathematicalexpression that was supposedly used b generate the table
values and calculate values identical to the tabularentries. This w a s
because some of thevalues entered into the tables had k e n s l i g h t l y
modified and also because theprocedures used tn round the calculated
values were inconsistent.

The mly way to cwercome these problems i n a mnputer subroutine was to


manually locate all the table entries that did not agree w i t h thecalcu-
lated values and add extensive "exception tables" to thecode. This made
the d e lengthy and somewhatcLnnbersome tn d i f y and tn some extent
r e s t r i c k d its to larger computing systems.

The -king group for TABLE 6 revision realized theinportance of elimi-


nating any potential for suchproblems i n the future and also recognized
the lleed to have amputer subroutines available at the time the new
petrolem measurement tables were released. The working group decided to
outline an explicit inplementationprocedure to be followed when usingthe
new aorrelationfor volume mrrectionfactors. This inplementation
procedure would then be theStandard rather than a set of equations or set
of tables.Standardization of an implementationprocedureimplies
standardization of the set of mathematical expressions used w i t h i n the
computer d e . Absoluteadherence to the outlined procedure w i l l insure
that all mnputers and computer d e of the future, meeting the stated
specifications and restrictions, w i l l be able tn produce identical
results. Such a procedure allows for the maxima machine and code
independence.

The implementationprocedure as described in thefollowing text can by


careful and deliberate application of numerical analysis be followed
throughthe majority oflanguage and word s i z e s in present and anticipated
use. To followthe standard procedure mans absolute and unwavering
adherence b the nwnberof d i g i t s specified at each step and tn the
calculational procedure as outlined.
-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API MPMS*LL*L V O L X X 80 m 0732290 O526030 5 4 0 m

SECTIONV VOLUME CORRECTION FACTORS X-165

I n the procedure, the m m e n c l a t u r e d i g i t s (XXX.XX)means mathematically


s i g n i f i c a n t d i g i t s as defined in ASTM E380-76. I n the previousexample,
a l l f i v e ( 5 ) d i g i t s in the w r e n t h e s i s are mathematically significant.

A t various steps i n the inplementation procedure, calculated results are


rounded m truncated. When rounding a r e s u l t to fewer d i g i t s than the
total number a v a i l a b l e , the followingprocedure which was used merrides
that of ASTM E380-76:

a ) when the first d i g i t to be discarded is less than 5 , the last d i g i t


r e t a i n e d is not changed.
b) when the f i r s t d i g i t to be discarded is greater than 4, the last
d i g i t r e t a i n e d is increased by me m i t .

The procedureused i n truncating a r e s u l t to fewer d i g i t s than the tatal


number a v a i l a b l e is to sinply discard all d i g i t s f o l l o w i n g the last d i g i t
to be r e t a i n e d and leaving the last r e t a i n e d d i g i t unchanged.

Another s p e c i f i c a t i o n is t h a t t h e e f f i c i e n t s used to relate the thermal


--

expansion coefficient a t 60 to the 60 O F d e n s i t y base and all o t h e r


| | |

O F
|

constants needed in the axrelation mst be used to exactly the number of


|
|||| |||| | | ||

digitsspecified.
|||| |||| || || |

Calculation procedure
|
|||| |||---

S t e p 1: Round inputvariables
a) Round r e l a t i v e d e n s i t y to nearest 0.0005
SG = x.= rounded
b) Round observed terperature to nearest 0.1
T = XXX.X rounded

S t e p 2 : Calculate d i f f e r e n c e i n observedtemperature and


base t e p r a t u r e
BASE TEMPERATURE = 60 .O
DELTA = XXX.X - 60.0 = =.X

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMSxLL.L V O L m X 80 0732290 0526088 367 m

X-1 66 CHAPTER 11"PHYSICAL PROPERTIES DATA

S t e p 3: Compute hydrometercorrection tem ( o p t i o n a l )


HYC = 1.0 - .OOOO1278*DELTA - .0000000062*DELTA2
TE,"l = .00001278*DELTA =
.OOXXXXXXX rounded
TERM2 = .0000000062*DELTA2 = .OOOXXXXXX rounded
Hyc = 1.000000000 - .ooX)[XXXXX - . O O O =~

Step 4: Convert r e l a t i v e d e n s i t y to d e n s i t y , Kg/m3


RHO = SG * 999 .O12
RHO = m.xx rounded.

Step 5A: Application of hydrometer c o r r e c t i o n


MOT = RHO*HYC = m
X. X rounded

S t e p 5B: I n i t i a l i z e 60 OF density
RHO60 = FWOT = XXXX.XX

S t e p 6: Calculatemefficientofthermalexpansion
ALPHA = Ko/RI-I06O2+ K1/RH060
KO = XXXX.XXXX
K1 = .m
TERM1 = Ko/I?HOGO = truncated X
.XXXXXXX
TERM2 = TERMl/RHO60 = .OOXXXXXXXX truncated
TERM3 = K1/I?H060 = . O O m truncated
ALPHA = TERM2 + TERM3 = .oooxxxx rounded

Step 7: Calculate volume c o r r e c t i o n hctor


VCF = W(-ALPHA*DELTA - 0.8*ALJ?HA2*DELTA2)
a ) calculate exponent
TERMl = ALPHA * DELTA = X
().XXXXXXtruncated
TERM2 = 0.8 * TERMl = X
.XXXXX
)[Xtruncated
TERM3 = TERMl* TERM2 = .mmunded
TERM4 = -T m - TERM3 = X
.XUXXXX
b) calculateexponential
VCF = ExP(TERM4) = x.xKxx)(x rounded

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL.L VOL*X 80 m 0732290 0 5 2 b 0 3 L 487

FACTORS
SECTION I-VOLUME CORRECTION X-1 67

( M u s t use a t least the f i r s t seven terms of


the power series expansion.)
--
| | |
|
|

S t e p 8: Calculate 60 OF density
|||| |||| | | ||

mo60 = mc~r/vCF= xxXX.XXX truncated


|||| |||| || || |

Since the equation for pG0 cannot be solved e x p l i c i t l y , a successive


|
|||| |||---

approximation iterative scheme is used t o o b t a i n a solution. The i n i t i a l


estimate of pG0 i s the value of the d e n s i t y a t observed tanperature t.
This approximation is s u b s t i t u t e d i n t o the right hand side of t h e e q u a t i o n
to o b t a i n a second value approximation. This process of s u b s t i t u t i n g into
the r i g h t hand side of the equation and estimating a new v a l u e f r a n the
other i s repeated until +smconsecutive results are i n agreement to t h e
desired degree of accuracy. In subroutine TAE323A, a converged solution is
reached when the change in d e n s i t y is less than O. 05 Kg/m3 i n two
successive passes.

INTEGER MULTIPLICATION PROCEDURE


(For 32 B i t Arithmetic)

DATA DEFINITION
X,Y are integer numbers t h a t are equal b or less than 2*lO9 ( s l i g h t l y
.
less than 231) A l a r g e rv a l u e may causeoverflow.Inaddition, the
total nunber of d i g i t s in X and Y rmst m t exceed 17 , otherwise overf low
w i l l occur. Z is the
product (X*Y) scaled by i.e. Z = (X*Y) /los.

Note: I f it is d e s i r a b l e to c b t a i n maxirrarm p r e c i s i o n , X and Y may be


scaled up p r i o r to use of the procedure. Typically, at least 15 d i g i t s
are meded to c b t a i n 6 d i g i t p r e c i s i o n , 1 6 for 7 and 17 for 8. The
l a r g e s t v a l u e of X and Y t h a t may be used are 2 O00 O00 O00 and
99999 999. (Either values may be used f o r X and Y) .
COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL=L VOL*X 80 m 0732290 0526032 313 m

X-168 CHAPTER1 PHYSICAL PROPERTIES


DATA

x/10000 = u1
10000 * u1 = K l
x-KI. = vl
Y/10000 = u2
10000 * U2 = K2
Y-K2 = V2
(Ul*V2) + (U2*v1) + (Vl*V2/10000) = K3
(K3 + 5000)/10000 + Ul*U2 = Z

Note: Z has been scaled by low8 and may have to be rescaledbefore use.
TOTAL DIGITS IN X AND Y 12 13 14 15 16 17
DIGITS IN PIXIDUCT, Z 3-4 4-5 5-6 6-7 7-8 8-9

INTEGER DIVISION PIEocEIxJIiE


(For 32 B i t Arithmetic)

DATA DEFINITION
x,Y are integer nmbers such that X is equal to c
x less than 2 3 l -1 and
Y is of crder of magnitude lo4 less than X.

R is the q u o t i e n t of X/Y s c a l e d by lo4, i.e. R = X/Y * lo4.

Note: If it is d e s i r a b l e to & t a i n maximum p r e c i s i o n , X and Y may be scaled


up prior to use of the procedure. Typically, t h e mre d i g i t s t h a t are
c a r r i e d in both X and Y, the n o r e = c u r a t e d i g i t s m output.

CAIÆULIATION
x/Y = u1
U l * Y = K l
x-n=Vl
vl/Y = u2
U1 * 10000 + U2 = R
Note: R has been scaled by lo4 and may need to be rescaled before W.
-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL-L VOLJX 8 0 W 0732270 052b033 25T W

SECTION
CORRECTION
i-vOLUME FACTORS x-169

Examples for C h e c h u t

The followingexamples illustrate how theimplementationprocedure is


a c t u a l l y used to determine the value of a r e l a t i v e d e n s i t y 60/60 O F for

GeneralizedCrude O i l s . The examples c a r r y the anputationsthrougheach


step of the procedure showing the r e s u l t s ofeach
mathematical operation.
The a n p u t e d v a l u e s are given t~ the required precision and it is indicated
i f a value has teen rounded or truncated. The step-by-stepcalculations are
shown f o r t h e f i r s t i t e r a t i o n t h e n a t a b l e is presented which sumnarizes the
intermediate values used to & t a i n a converged solution.

These examdes are to be used as test cases for subroutine TAB23A to v e r i f v


the cmputer code has not been altered or incorrectly reproduced. The
r o u t i n e has beendesigraed to execute cn machines t h a t use m d s i z e of
32-bits or greater. Any rrew developmentof a n p u t e r d e t h a t is designed
to follow the standardimplementationprocedurermstinsure that the values
corrputed at each step i n the procedure are i d e n t i c a l m those given in the
examples.

EXAMPLE 1
S t e p 1: Round inputvariables
a) Round r e l a t i v ed e n s i t y to rearest .O005
--
| | |

SG = .8760 rounded
|
|
|||| |||| | | ||

b) Round &servedtemperature to nearest 0.1


T = 248 .O rounded
|||| |||| || || |

S t e p 2: Calculatedifference in &
ser
ved temperature and base temperature
|
|||| |||---

BASE TEMPERATUFE = 60 .O
DELTA = 248.0 - 60.0 = 188 .O

S t e p 3:Compute hydrometer correction term


HYC = 1.0 .O0001278 * DELTA - ~0000000062* DELTA2
-
“ l= .O0001278 * DELTA = .O02402640 rounded
TERM2 = .0000000062 * DELTA2 = .O00219133 rounded.
HYC = 1.000000000 - .0024026”’, - .O00219133 = -997378227

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL-L VOL*X 80 W 0732290 052603Y L96 W

X-1 70 CHAPTER
1 PHYSICAL PROPERTIES
DATA

S t e p 4: C o n v e r tr e l a t i v ed e n s i t y to d e n s i t y
RHO = SG * 999.012
RHO = 875.13 rounded

S t e p SA: @plication of hydrometer oorrection


RHOT = RHO * HYC = 872.84 rounded

S t e p SB: I n i t i a l i z e 60 O F density
RHO60 = RHW = 872.84

S t e p 6: Calculate c o e f f i c i e n t of thermalexpansion
ALPHA = Ko/RH0602 + K1/M060
KO = 341 .O957 (as of May 1, 1980)
K 1 = 0.0 (as of May 1, 1980)
“l= Ko/RH060
“l= .39078834 truncated
TERM2 = “ l / ~ 0 6 0
TERM2 = .O004477204 truncated

|||| |||---
TERM3 = K1/RI060

|
|||| |||| || || |
TERM3 = 0.0
ALPHA = TERM2 + TERM3 = .O004477 rounded

|||| |||| | | ||
S t e p 7: C a l c u l a t e volume oorrection factor

|
(-zum * - o. 8 * ALPHA^ * DELTA^)

|
VCF = EXP DELTA

| | |
a ) Calculate exponent
--
“l= ALPHA * DELTA = .O8416760 truncated
”2 = 0.8 * TERMl = .O6733408 truncated
TERM3 = TERMl * TERM2 = .O0566735 rounded
TERM4 = 4“l - “3 = “08983495
b) Calculateexponential
VCF = Mp(TEFW4) = .914082 rounded
(must use t h e first seven terms of the p e r series
expansion of ex)

S t e p 8: Calculate 60 O F d e n s i t y
RHO60 = RHCYTm F = 954.881 truncated

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I HPHS*IJIJ.L V O L t X 80 0732290 0526035 O22

SECTIONV VOLUMEFACTORS
CORRECTION X-1 71

TABLE 1 shows the r e s u l t s of e a c h i t e r a t i o n .

TABLE 1

ITERATION RHO60 ( N ) ALPHA RH060VCF ( N+1)


1 872.84 .O004477 .914082 954.881
2 954.88 .O003741 .928404 940.151
3 940.15 .O003859 .926112 942.477
4 942.48 .O003840 .926481 942 .lo2
5 942.10 .O003843 .926423 942.161
6 942.16 .O003843 .926423 942.161

SG60 = 942.16/999.012 = 0.9431

EXAMPLE 2
Step 1: Round input v a r i a b l e s
a ) Wund r e l a t i v e d e n s i t y to nearest .O005
SG = .6935 rounded
b ) Found &servedtemperature to nearest 0.1
T = 52.5 rounded

Step 2: Calculatedifferenceinobservedtemperature and base


tenperature
BASE TEMPERATURE = 60 .O
DELTA = 52.5 - 60.0 = -7.5

Step 3 : Compute hydrometer axrect i o n term


HYC = 1.O - .O0001278 * DELTA - .0000000062 * DELTA2
T"l = .O0001278 * DELTA = -.O00095850 rounded
TERM2 = .0000000062 * DELTA2 = .O00000349 rourrded
HYC = 1.000000000 + .O00095850 -
.O00000349 = 1.000095501

step 4: C o n v e r tr e l a t i v ed e n s i t y to d e n s i t y
RHO = SG * 999.012
RHO = 692.81 rounded
-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS+LL.L V O L X X 80 m 0732290 0 5 2 b 0 3 b Tb9 m

X-172 C!4PTER 11"PHYSICAL PROPERTIES DATA

S t e p SA: mlication of hydrometer aorrection


RI" = RHO * HYC = 692.88 rounded

S t e p 5B: I n i t i a l i z e 60 OF density
RHO60 = RHcrr = 692.88

Step 6: C a l c u l a t em f f i c i e n t of thermal expansion


ALPHA = K@06O2 + Kl/RHO60
KO = 341.0957 (as of May 1, 1980)
K1 = 0.0 (as of May 1, 1980)
" l= KO/EM060
TERMl = .49228683 truncated
TERM2 = TER"/EM060
TERM;! = .O007104936 truncated
"3 = K1/RH060
TERM3 = 0.0
ALPHA = TERM2 + TERM3 = .Oflo7105 rounded

Step 7: Calculate v ou
lm e correction f a c t o r
VCF = MP(-ALPHA * DELTA - o. 8 * ALPHA^ * D ~ T A ~ )
a ) Calculateexponent
TEFW = AWHA * DELTA = -.O0532875 truncated
TERM2 = O. 8 * TERMl = -.O0426300 truncated
TERM3 = TF.RMl * TER42 = .O0002272 rounded
-4 = +L"l "3 = .O0530603 -
b) Calculateexponential
VCF = MP(TERM4) = 1.005320rounded
(must use the f i r s t seven &
rmsof the power series
expansion of G )

S t e p 8: Calculate 60 OF density
RHO60 = PHOl!flCF = 689.213 truncated

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API MPMS*LL.L VOL*x 8 0 W 0 7 3 2 2 9 0 0526037 9T5 m

SECTION 1"VOLUME CORRECTION FACTORS X-1 73

TABLE 2 shows t h e r e s u l t s of each i t e r a t i o n .


--
| | |
|
|
|||| |||| | | ||
|||| |||| || || |

ITERATIaJ RHO60 ( N ) ALPHA VCF RH060(N+1)


1 692.88 .O007105 1.005320 689.213
|

2 689.21 .O007181 l.005377 689.174


|||| |||---

SG60 = 689.17/999.012 = 0.6899

Step 1: Round inputvariables


a) Wund r e l a t i v e d e n s i t y to nearest .O005
SG = .6445 rounded
b) mund observedtenperature to nearest 0.1
T = 184.0rounded

Step 2: Calculatedifference in &servedtemperature and base


temperature
BASE TEMPERATURE = 60 .O
DELTA = 184 .O - 60.0 = 124.0

S t e p 3:Compute hydrometer a r r e c t i o n brin


HYC = 1.O - .O0001278 * DELTA - .0000000062 * DELTA2
TERMl = .O0001278 * DELTA = .O01584720 rounded
TERM;! = .0000000062 * DELTA2 = .O00095331 rounded
HYC = 1.000000000 - .O01584720 - .O00095331 = -998319949

S t e p 4: C o n v e r tr e l a t i v ed e n s i t y to d e n s i t y
RHO = SG * 999.012
RHO = 643.86 rounded

S t e p 5A: Application of hdyrcmter correction


RHOT = RHO * HYC = 642.78 rounded

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API MPMSrLL.L VOLxX 80 0732290 0526038 831 m

X-1 74 CHAPTER
1 PHYSICAL PROPERTIES
DATA

S t e p 5B: I n i t i a l i z e 60 OF density
RH060 = rwCrr = 642.78

Step 6: C a l c u l a t em e f f i c i e n to f thermal expansion


ALPHA = KO/IW0602 + K1/E?€1060
KO = 341.0957 (as of May 1, 1980)
K1 = 0.0 (as of May 1, 1980)
= Ko/FU4060
TERMl = .53053398 truncated
TERM2 = TERMl/F?I-I060
TERM;! = .O008255654 truncated
TERM3 = K1/RH060
TERM3 = 0.0
ALPHA = TERM2 + “3 = .O008256 rounded

S t e p 7: C a l c u l a t e volume c o r r e c t i o n factor
VCF = M P ( -ALPHA * DELTA - 0.8 * ALPHA;! * DELTA^)
a ) Calculateexponent
TERMl = ALPHA * DELTA = .lo237440 truncated
TERM2 = 0.8 * “l= .O8189952 truncated
TERM3 = TEFW * TERM2 = .O0838441 rounded
”4 = “l- TERM3 = -.U075881
b) Calculateexpanential
VCF = EXP(TERM4) = .895155 rounded
( m u s t use the f i r s t seven terms of the p e r series
expansion of ex)

Step 8 : C a l c u l a t e 60 O F density
M060 = mCYF/VCF = 718.065 truncated
|||| |||---
|
|||| |||| || || |
|||| |||| | | ||
|
|
| | |
--

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
SECTION 1"VOLUME CORRECTION FACTORS X-1 75

TABLE 3 shows the r e s u l t s of each iteration.

TABLE 3

ITERATION RHO60 ( N ) ALPHA VCF RH060 ( N+1)


1 642.78 .O008256 .895155 718 .O65
2 718.07 .O006615 .916303 701.492
3 701.49 .O006932 .912226 704.6.28
4 704.63 .O006870 .913024 704.012
5 704.01 .O006882 .912869 704.131
6 704.13 .O006880 .912895 704.111

|||| |||---
SG60 = 704.11/999.012 = 0.7048

|
|||| |||| || || |
|||| |||| | | ||
EXAMPLE 4
S t e p 1: Round inputvariables

|
|
a ) €&und r e l a t i v e d e n s i t y i
a nearest .O005

| | |
SG = .6260 rounded

--
b ) Round observedtemperature to nearest 0.1
T = 127 .5 rounded

S t e p 2: C a l c u l a t ed i f f e r e n c ei n &served temperature and base


temperature
BASE TEMPERATURE = 60.0
DELTA = 127.5 - 60.0 = 67.5

S t e p 3:Compute hydrometercorrection term


HYC = 1.0 - .O0001278 * DELTA .0000000062 - * DELTA2
T
ERM1 = .O0001278 * DELTA = .O00862650 rounded
TERM;! = .0000000062 * DELTA2 = .O00028249 rounded
HYC = 1.000000000 - .O00862650 - .O00028249 = .999109101

Step 4: C o n v e r tr e l a t i v ed e n s i t y to d e n s i t y
RHO = SG * 999.012
RHO = 625.38 rounded

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API MPMS*IIL-L VOL*X 80 D 0732290 0526040 4 9 T m

X-1 76 CHAPTER 1l"PliYSlCAL PROPERTIES DATA

Step 5A: Application of hydrcmter correctim


RHcrr = IMO * HYC = 624.82 rounded

Step SB: Initialize 60 OF density


RHO60 = RHCYI' = 624 -82

Step 6: Calculate e f f i c i e n t of thermalexpansion


ALPHA = Ko/RH0602 + Kl/FSO60
KO = 341.0957 (as of May 1, 1980)
K 1 = 0.0 (as of May 1, 1980)
TERMl = K()/RH060
TERMl = .54591034 truncated
TERM2 = TERMl/IM060
TERM2 = .O008737081 truncated
"3 = K1/RH060
TERM3 = 0.0
ALPHA = TERM2 + TERM3 = -0008737 rounded

Step 7 : Calculate volwne arrection factor


VCF = W(-ALPHA * DELTA - 0.8 * ALPHA2 * DELT712)
a ) Calculate exponent
TERMl = ALPHA * DELTA = .O5897475 truncated

|||| |||---
TERM2 = 0.8 * TERMl = .O4717980 truncated

|
|||| |||| || || |
TERM3 = TEFMl * TERM2 = .O0278242 rounded
TERM4 = - "3 = -.O6175717
|||| |||| | | ||
b ) Calculate exponential
VCF = W(TERM4) = .940111 rounded
|
|
| | |

(must use the first seven terms of the pawer series


--

expansion of eX)

Step 8: Calculate 60 O F density


RHO60 = R€KYrrr/V@F= 664.623 truncated

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL-L V O L X X B O 0732270 0 5 2 b 0 4 L 32b m

SECTIONVOLUME CORRECTION FACTORS x-177

TABLE 4 shows t h e r e s u l t s of each i t e r a t i o n .

TABLE 4

ITERATION RHO60 (N) WH


A VCF RH060 ( N+1)
1 624.82 .O008737 .940111 664.623
2 664 62 .O007722 .947151 659.683
3 659.68 .O007838 .946347 660.244
4 660.24 .O007825 .946437 660.181
5 660.18 .O007826 .946430 660.186

SG60 = 660.19/999 .O12 = 0.6608


--
| | |
|
|
|||| |||| | | ||

S t e p 1: Round i n w tv a r i a b l e s
|||| |||| || || |

a) murd r e l a t i v e d e n s i t y tn nearest .O005


SG = .7795 rounded
|

b ) Rxmd &served tenperature tn nearest 0.1


|||| |||---

T = 77 .O rounded

S t e p 2: C a l c u l a t ed i f f e r e n c ei no b s e r v e dt e p r a t u r e and base
tenperature
BASE TEMPERATUFE = 60 .O
DELTA = 77.0 - 60.0 = 17.0

Step 3: Compute hydrometer a x r e c t i o n term


HYC = 1.0 - .O0001278 * DELTA - .0000000062 * DELTA2
TERMl = .O0001278 * DELTA = .O00217260 rounded
TERM2 = .0000000062 * DELTA2 = .O00001792 rounded
WC = 1.000000000 - .O00217260 - .O00001792 = .999780948

S t e p 4: Convertrelativedensity to density
RHO = SG * 999.012
FU40 = 778.73 rounded

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I M P M S J L L - L VOLtX 8 0 W 0732290 052bOY2 262 W

X- 170 CHAPTER DATA


1 P PHYSICAL PROPERTIES

Step 5A: Application of hydrcsneter correction


m = m0 * HYC = 778.56 rounded

S t e p SB: I n i t i a l i z e 60 O F density
RHO60 = RHcn: = 778.56

S t e p 6A: Calculate e f f i c i e n t of thermal expansion


ALPHA = Ko/F!H06O2 + Kl/FH060
KO = 341.0957 ( a s of May 1, 1980)
K 1 = 0.0 ( a s of May 1, 1980)
" l= Ko/RHO60
TEBMl = .43811099 truncated
TERM2 = TERM1/IM060
TERM2 = .O005627 truncated
--

TERM3 = Kl/RH060
| | |
|

TERM3 = 0.0
|
|||| |||| | | ||

ALPH74 = TERM2 + TERM3 = .O005627 rounded


|||| |||| || || |

S t e p 7: Calculate volume m r r e c t i o n f a c t o r
VCF = m ( - m m * DELTA -
0.8 * mm2 * DELTA^)
|
|||| |||---

a ) Calculateexponent
TERM1 = ALPHA * DELTA = .O0956590 truncated
T m 2 = 0.8 * TERM = -00765272 truncated
TERM3 = TEF!Ml * "2 = .O0007321 rounded
"4 = +t"l - TERM3 = -.O0963911
b) Calculate exponential
VCF = EXP(l"4) = .990407 rounded
(must use t h e f i r s t seventermsof the pawerr series
expansion of ex)

S t e p 8: Calculate 60 OF d e n s i t y
RH060 = €U-IOT./fEF = 786 .lo1 truncated

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL-L VOL*X 80 H 0732290 052b043 I T 9 H

SECTION V VOLUME CORRECTION


FACTORS x-179

TABLE 5 shows the results of each iteration.

TABLE 5

ITERATION RHO60 (N) ALPHA VCF Rm360(N+1)


1 778.56 .O005627 .990407 786.10
2 786.10 .O005520 .990590 785.955
3 785.96 .O005522 .990587 785.958

SG60 = 785.96/999.012 = 0.7867

11.1.23.4 TABLE 23B-GENERALIZED PRODUCTS, CORRECTION OF


OBSERVED RELATIVE DENSITY TO RELATIVE DENSITY 60/60"F

TABLE 23B gives the values of relative density of relative density60/60"Ffor these areas. These values
60/60"F correspondingtohydrometerreading at ob- are denoted by an asterisk (*). Extension of this table
--

served temperatures other than60°F. In converting the beyond the ranges shown is not recommended.
| | |

API hydrometer reading at the observed temperature Increments used in this table for determining relative
|
|

to the corresponding relative density60/60"F, two cor- density 60/60"F are 0.5"F and 0.0020 relative density.
|||| |||| | | ||

rections are necessary: the first arises from the change Interpolation with temperature isnot intended since
in volume of the glass hydrometer with temperature there is no practical method of interpolation that will
(stem correction), and the second from the change in producethe accuracy obtainable from the Standard.
|||| |||| || || |

volume of the products with temperature. Both have However, interpolationwith relative density to one ad-
been applied in this table. The values of relative den- ditional significant digit can bereasonably made. Inter-
sity 60/60"Fin this table are the result of a computer
|

polation is not required if the TABLE 23B results are


|||| |||---

procedure whichis theStandard(see 11.1.23.5 and to be used as entries to TABLE 24B.


11.1.23.6).
This table must be entered with a hydrometer
The temperature ranges of this table are: reading measured with a soft glass hydrometer
Relative
Density 60/WF "F calibrated at 60°F and an observed temperature.
0.8250 to 1.0760 O to 300 A correction to the glass hydrometer reading
0.7795 to 0.8250 O to 250 has been incorporated into the table to account
0.6535 to 0.7795 o to 200 for the thermal expansion of glass. The hydrom-
The values of relative density 60/60"F given in this eter constant, as defined in the Report on the De-
table are based on data from theU.S. National Bureau velopment,Construction,Calculation, and Prep-
of Standards and from other published data. Portionsof aration of the ASTM-IP Petroleum Measurement
the density and temperature ranges represent areas be- Tables (1960), varies with temperature according
yond these data. Thus, mathematical techniques were to the following:
employed to extrapolate beyond the density and tem- HYC = 1 - O.oooO1278 (t - 60°F)
perature rangesof the given data to determine the value - 0.0000000062 (t - 60°F)'

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL*L VOL*X B O W 0732270 052b044 035 W

x-180 CHAPTER1 PHYSICAL PROPERTIES


DATA

11.1.23.5 PROGRAM DOCUMENTATION FOR SUBROUTINE


TABPSB-GENERALIZED PRODUCTS, CORRECTION OF
OBSERVED RELATIVE DENSITYTO RELATIVE DENSITY 6O/6O0F
ABSTRACT

Subroutine Title: W23B - TABLE 23B, Generalized Products,


R e l a t i v e Density Correction to 60/60 OF.

Description: This subroutine is designed b calculate t h e

|||| |||---
r e l a t i v e d e n s i t y 60/60 *F corresponding b
r e l a t i v e d e n s i t i e s o b s e r v e d a t temperatures other

|
|||| |||| || || |
than 60 OF.

|||| |||| | | ||
Program Responsibility: American Petroleum I n s t i t u t e
Measurement Coordination

|
|
| | |
2101 L S t r e e t N.W.

--
Washingbn, D .C. 20037

Date Issued: August 1980

Language: m m , ANSI/ASA Standard

Reference: API Standard 2540, T B L E 24, 11.1.24

THIS suBRcmTNE! W s
AND SPECIFICATIONS DESCRIBED IN ?HE DOCUMENT PRXXllUIIE 11.1.23.6.
ANY MODIFICATION 'IO THIS MUST RIGIDLY ACHERE 33 'ME SAME
ALGORI'IHMS IWD SPECIFICATIONS.

11.1.23.5.1 Introduction

TAB23B is a amputer subroutine designed to c a l c u l a t e for substances


c h a r a c t e r i z e d as generalized products the value of r e l a t i v e density 60/60 OF
corresponding b r e l a t i v e d e n s i t i e s o b s e r v e d at tenperatures other than 60 OF.
The subroutine accepts as input the &served relative d e n s i t y rounded to the

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API MPMS*LL.L VOL*X 80 m 0732290 0526045 T71 m

SECTIONVOLUME
FACTORS
CORRECTION X-181

n e a r e s t 0.0005 and the tenperature rounded to the nearest 0.1 OF. Ifeither
input value has not been properly rounded, the subroutine w i l l round the
values and returnthecorrectedvalues. The subroutinereturnsthevalueof
r e l a t i v e d e n s i t y 60/60 OF rounded i m the nearest 0.0001 and a s t a t u s flag for
usermnvenience. The f l a g is set to -1 i f an error a m d i t i o no c c u r s and to
+1 ifthevalue of the r e l a t i v e d e n s i t y 60/60 OF is an extrapolation. The
limits of the correlation including the extrapolated region are depicted in
Figure x-10. The calling program must check the flag and provide the user with
appropriate warningmessage or program termination. The f l a g is set to zero
when the input variables and t h e r e l a t i v e d e n s i t y 60/60 OF are within the
limits of t h e c o r r e l a t i o n .

11.1.23.5.2 SubroutineSpecifications

|||| |||---
The range of application is :

|
|||| |||| || || |
Relative Densit y Wmperature , O F

|||| |||| | | ||
0.6535 - 0.7795 o- 200
0.7800 - 0.8250 o- 250
- 300

|
-

|
0.8255 1.0760 O

| | |
--
Referencedrmdules: ALF23B,
DIV23B,
MPY23B,
VCF23B

Fortranfunctions: FLOAT, IABS

Averageexecution time: 560 entries/CFUsecond


IM 370/168
B

The subroutines are w r i t t e n in ANSI/ASA using


integer arithmetic.
The s i z e and storagerequirements are:
1. Coqilable source statements 169
2. Decimal storage bytes 4104
3. W r d s 1026

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
x-182 1 PHYSICAL PROPERTIES
CHAPTER DATA

11.1-23.5.3 Calling
Sequence

CAIL W 2 3 B (SG, DEGF, IHYDFO, SG60, II?LAG)

INPUT DESCRIPTION

SG - Relativedensity at observed kmperature


( SG returned w i l l be rounded n
l nearest O .OOOS)

DEGF - Observed t e p r a t u r e , OF
( DEGF returned w i l l be rounded t~ nearest O. 1 O F)

IHYDm - Hydrometer switch


--

O: %e r e l a t i v e d e n s i t y was &servedwith a g l a s s hydro-


| | |
|

meter and a hydrometer a o r r e c t i o n is needed


|
|||| |||| | | ||

1: The r e l a t i v e d e n s i t y was determined from an m-line


densitometer and a hydrometer a o r r e c t i o n is mt
|||| |||| || || |

needed.
|
|||| |||---

SG60 - Corresponding r e l a t i v e d e n s i t y 60/60 OF rounded tn nearest 0.0001

IFLAG - Status Code


O: I n d i c a t e si n w tv a r i a b l e s and c a l c u l a t e d r e s u l t s are
within the range of a p p l i c a t i o n
1: Indicatesinputvariables are inextrapolated lregion
-1: Indicatesinputvariables or calculated r e s u l t s are
o u t s i d e the range of q l i c a t i o n

E
JMl: If a mn-convergenceoccurs,
E the s u b r o u t i n ep r i n t s the following
message :

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I flPflS*LL-l V O L * X 80 m 0732290 O526047 B44 m

SECTIONVOLUMEFACTORS
CORRECTION X-1 83

This messageshould m t occur unless the d e has k e n altered or


incorrectlyreproduced. Follow Section 11.1.23.6, I q l e m n t a t i o n
Procedure, and test the subroutineexactly as described. The
s t a t u s f l a g w i l l be set to -1, SG60 to -9.9999 , and program c o n t r o l
returned lm the c a l l i n g m u t i n e .

11.1.23.5.4 Method ofCalculation

This subroutine uses a mnvergencetechnique l determine the relative


a
d e n s i t y 60/60 OF that mrrespnds tD a r e l a t i v e d e n s i t y observed at same
temperature other than 60 OF. Since the equations are expressed in terms
of d e n s i t y , the r e l a t i v e d e n s i t y is oonverted to density by the following
relationship:

= relative density* 999.012


Pt

where

= density at temperaturet
Pt
O 3
999.012 = density of water at
60 F, Kg/m

O
The coefficient of thermal expansion at the base temperature60ofF is
related to density at the base temperature by
|||| |||---

= - KO + -K1
|
|||| |||| || || |

"60 2
'60
P 60
|||| |||| | | ||

The values of p and a are used in the volume correction factor equation
t 60
|

to compute p
|

60
| | |
--

\
+ 0.8c~~~At)
VCF =
'60
= Exp [-a60 At(1
1
Thus Pt -
- ' 6 0 EXP [-cr60At(l + 0.8a60At)]

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API MPMS*LL.L VOLSX 80 0732290 O526048 780

X-184 1 P PHYSICAL PROPERTIES


CHAPTER DATA

where p = density at the base temperature


60

At = t - 60.0

Since the equationfor p60 cannot k s o l v e de x p l i c i t l y , a successive


approximation iterative scheme is used to o b t a i n a s o l u t i o n . The i n i t i a l
estimate of is the value of the d e n s i t y at observed temperature t.
60
T h i s approximation is s u b s t i t u t e d i n t o the r i g h t hand side of the equation
to o b t a i n a second valueapproximation. This process of s u b s t i t u t i n g i n t o
t h e right hand side of the equation and estimating a new value from the

|||| |||---
o t h e r is r e p e a t e d u n t i l tm c o n s e c u t i v e r e s u l t s are i n agreement to the

|
|||| |||| || || |
desired degree of accuracy.Insubroutine TAl323B, a mnvergedsolution is
reached when the change i n d e n s i t y is less than 0.05 Kg/m 3 i n two

|||| |||| | | ||
s u c c e s s i v e passes. If the computed value of r e l a t i v e d e n s i t y 60/60 OF is
n o t m the same c u m e as the &served r e l a t i v e d e n s i t y , the parameters KO

|
|
and KI used to determine the a x f f i c i e n t of thermal expansionrmst be

| | |
--
redefined and the convergencetechniquerepeated. A straight l i n e
i n t e r p o l a t i o n is used to connect the jet fuel curve with the gasoline curve
when the s o l u t i o n is between 0.7710and 0.7885. When this occurs, the
coefficient of thermal expansion is defined as:

2
“60 = A + B /P60
where A = -.O0186840 (as of May 1, 1980)
B = 1489,0670 (as of May 1, 1980)
Inthis case, thetolerance is increased to 0.07 Kg/m
3
.
A f u l l e x p l a n a t i o n of the equations and thevalaes of the parameters
KO and K 1 m y be found in API Standard 2540, WLE 24, 11-1.24.

11.1.23.5.5
Examples I

These exanples are t u t o r i a l i n m t u r e and are not intended to be s u f f i -


c i e n t for subroutinecheckout. The examplesgiven i n theImplementation
Procedure,Section 11.1.23.6, are to be used for the umguter checkout.

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I M P M S * L L - L V O L X X 80 0732290 0526049 b L 7

SECTION VOLUMEFACTORS
CORRECTION X- 185

Exarrple 1

SG = 0.7012 (observed w i t h a glass hydrometer)


DEGF = 120 .O
IHYDrn= o

CALL W 2 3 B (SG,DEGF,IHYDFO,SG6O,IFLAG)

A f t e r the call: SG = 0.7010


DEGF = 120 .O
IHYDrn = o
SG60 = 0.7313
I F M = O
Example2

SG = O .7950 (observed w i t h a glass hydrometer)


DEGF = 210 .O4
IHYDrn= o

CALL W 2 3 B (SG,DEF,IHYDIXI,SG60~IFLAG)

After the call : SG = 0.7950


DEGF = 210.0
IHYDrn= o
SG60 = 0.8533
IFLplG = 1
Exarrple 3

SG = 0.8230 (observed w i t h a glass hydrometer)


DEGF = 252.5
IHYDIXI= o
CALL W 2 3 B (SG,DECF,IHYDPD,SG6O,Im;AG)

After t h e call : API = 0.8230


DEGF = 252.5
I
H YDO =
F o
3260 = -9.9999
IFLAG = -1

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
X-186

11.1 -23.S .6 FLOHCHART


A P I flPflS*LL-L V O L X X 80

. CHAPTER

INPUT RELATIVE DENSITY


OBSERVED TEMPERATURE

I ROUND INPUT DATA


TO SPECIFICATIONS

."
BOUNDS OF
"

CORRE'.LB1ION/

I CALCULATE DELTAT
7
I

I
0732290 0526050 339

1 PHYSICAL PROPERTIES
DATA

I
SET
STATUSFLAC
fiND REL. DEN.
60/60'F = -9.9993
RETURN
-1

~~~ ~

CONVERT RELATIVEDENSITY TO D E N S I T Y ]

5 COMPUTE CORRECTION
HYDROMETER

I APPLYHYDROMETER
I
CORRECTION TO DENSITY I
I
k
--
| | |
|
|
|||| |||| | | ||

SELECTAPPROPRIATE KO ANO K 1 CONSTANTS

.1
|||| |||| || || |

I INITIALIZE ~ O - FDENSITY I
I
|
|||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
i-VOLUME CORRECTION FACTORS
SECTION X-1 87

I- CALCULATE NEW 60.F DENSITY

AND REL. DEN.


60/60*F = -9.9999

-
CONVERGENCE
REPEAT
SCHEME
YES
RE-DEFINED
WITH
ON STRAIGHT ALPHA

NO
CALCULATE RELATIVEDENSITY 60160.F

STATUS
SETYES FLAG 1
RETURN

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
x-188 CHAPTER DATA
1 P PHYSICAL PROPERTIES

11.1.23.5.7 Subroutine Listim

TAB23B Thissubroutine accepts r e l a t i v ed e n s i t y and the observation


terrperature and determines the mrresponding relative density
60/60 O F for Generalized Products.

Referenced Modules

ALF23B This module c a l c u l a t e s the e f f i c i e n t ofthermalexpansion


needed to determine a v o l ’ m e m r r e c t i o n factor.

DIV23B This module is designed to produce additionalaccuracy from an


integer divide.

MPY23B This module is designed to produceadditionalaccuracy from an


integer nultiplication.

VCF23B This mrdule c a l c u l a t e s a volume c o r r e c t i o n factor.

SUBROUTINE TAB23B(SG,DEGF,IHYDRO,SG6O,IFLAG) 2380001O


C 23800020
C ( C ) COPYRIGHT 1 9 8 0 23800030
C AMERICAN PETROLEUM I N S T I T U T E 23800040
C ALLRIGHTS RESERVED 23600050
C 23800060
C T H I S SUBROUTINE I S A VOLUNTARYSTANDARDAND WAS DEVELOPED 23800070
C UNDER THE AUSPICES OF THE JOINTAPI-ASTM COMMITTEE ON STATIC 23800080
C PETROLEUMMEASUREMENT I N PART FROM DATA GENERATEDBY A 23800090
C PROJECT FUNDED BY THE AMERICAN PETROLEUM I N S T I T U T E ATTHE 238001 O0
C U . S . NATIONAL BUREAU OF STANDARDS, GAITHERSBURG, MARYLAND. 2380011 O
C 236001 20
C I N Q U I R I E S CONCERNING I T SA P P L I C A T I O N SHOULD BE ADDRESSED TO: 23800130
C 238001 4 0
C AMERICAN PETROLEUM I N S T I T U T E 236001 50
C MEASUREMENT COORDINATION 238001 60
C 2101 L STREET,
N.W. 238001 70
C WASHINGTON, DC 2 0 0 3 7 238001 80
C 238001 90

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL-L VOL*X 80 0732290 0526053 048 m

SECTIONVOLUME CORRECTION
FACTORS X-1 89

C ................................................................. 23800200
C * * 2380021 O
C * T H I S SUBROUTINE OR THE MATHEMATICAL RELATIONSHIPS 4; 23800220
C * REPRESENTEDTHEREBY MAY BE USED BY ANYONE WISHING 8 23800230
C * DO
TO SO, BUT
THE AMERICAN PETROLEUM I N S T I T U T E , THE * 23800240
C * AMERICAN SOCIETY FOR TESTING AND MATERIALS, AND THE * 23800250
C * INSTITUTE OF PETROLEUM AND THEIR RESPECTIVE MEMBERS
AND * 23800260
C * THE U . S . NATIONAL BUREAU OF STANDARDS, SHALL NOT BE HELD * 23800270
C * RESPONSIBLE OR L I A B LIEN ANY
WAY
FROM LOSS OR DAMAGE, * 23800280
C * INCLUDING, NOTBUT L I M I T E D TO, CONSEQUENTIAL DAMAGE, * 23800290
C * RESULTING FROM SUCH
USAGE OR FOR VIOLATION OF ANY FEDERAL, * 23800300
C * STATE, OR MUNICIPAL LAWS, REQULATIONS OR PRACTICES OF THE * 2380031O
C * UNITED STATESANY OR OF FOREIGN COUNTRY. * 23800320
C * * 23800330
C ................................................................. 23800340
C 23800350
C PURPOSE 23800360
C 23800370
C T H I S SUBROUTINE I S DESIGNED TO ACCEPT AS INPUTARELATIVE 23800380
C DENSITY(SG) AT SOME TEMPERATURE (DEGF) I N DEGREES 23800390
C FAHRENHEIT AND CALCULATE THECORRESPONDING RELATIVEDENSITY 23800400
C (SG60) AT 6 0 DEGREES FAHRENHEIT FOR TABLE 2 3 8 , GENERALIZED 2380041O
C PRODUCTS. 23800420
C THEUSE OF A GLASS HYDROMETER CORRECTION I S OPTIONAL. 23800430
C 23800440
C EXTERNAL FUNCTIONS OR SUBPROGRAMS 23800450
C 23800460
--

C A L F 2 3 BD, I V 2 3 8 , MPY23B,VCF23B 23800470


| | |

C FORTRAN FUNCTIONS: FLOAT, IABS 23800480


|

C 23800490
|
|||| |||| | | ||

C DESCRIPTION OF PARAMETERS 23800500


C 2 3 8 0 0 5 1O
C SG - RELATIVEDENSITY AT OBSERVED
TEMPERATURE,
NEAREST 23800520
|||| |||| || || |

C ,0005 (PROGRAM WILL ROUND SG TO THE NEAREST 23800530


C ,0005 AND RETURNTHE ROUNDED VALUE.) 23800540
|

C DEGF - OBSERVED TEMPERATURE, NEAREST 0 . 1 DEGREE F 23800550


|||| |||---

C (PROGRAM WILL ROUND T TOTHENEAREST 0.1 23800560


C DEG F AND RETURN THEROUNDED VALUE.) 23800570
C IHYDRO - APPLICATION OF GLASS HYDROMETER CORRECTION 23800580
C O - HYDROMETER CORRECTION I S TO BE MADE 23800590
C 1 - HYDROMETER CORRECTION I S NOT TO BE MADE 23800600
C SG60 - CORRESPONDING RELATIVEDENSITY 6 0 / 6 0 DEGREES F (OUT) 2 3 8 0 0 6 1O
C (ROUNDED TOTHE NEAREST ,0001) 23800620
C I F L A G - STATUS CODE (OUT)
23B00630
C O - INPUT AND CALCULATED RESULTS I N CORRELATION L I M I T S 23800640
C 1 - INPUT OR CALCULATED RESULTS I N EXTRAPOLATED REGION 23800650
C - 1 - INPUT OR CALCULATED RESULTS NOT W I T H I NL I M I T S OF 23800660
C CORRELATION 23800670
C BASE TEMPERATURE ( 6 0 DEGREES F ) 23800680
DATA IBASE / 600 / 23800690
C 23800700
C BREAK POINTS FOR REL DEN RANGES ( . 7 7 9 0 AND , 8 2 4 5 ) 2380071O
DATA I B P l ,I B P 2 / 7 7 9 08
, 245 / 23800720
C 23800730
C MAXIMUM TEMPERATURES ATEACH BREAK P O I N T( 2 0 0 , 2 5 0 , 3 0 0 ) 23800740
DATA ITMP1, ITMP2, ITMP3 / 2 0 0 02, 5 0 03, 0 0 0 / 23800750
C 23800760

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API flpflS+LL.L V O L * X 80 0732290 052b05Y T 8 4

x-190 CHAPTER
1 PHYSICAL PROPERTIES
DATA

C BEGINNING OF TEMPERATURE EXTRAPOLATIONS ( 1 5 0 , 2 0 0 , 2 5 02) 3 6 0 0 7 7 0


DATA I E P 1 I, E P 2 I, E P 3 / 1 5 0 02, 0 0 02, 5 0 0 / 23800780
C 23600790
C COEFFICIENTS FOR DIESELS,HEATINGOILS, AND FUEL O I L S 23B00800
DATA KOF,K1F / 1 0 3 8 7 2 0 ,2 7 0 1 / 2360081O
DATA NLOF / 8400 / 23600820
C 23B00830
C COEFFICIENTS FOR JETFUELS, KEROSENES, AND SOLVENTS 23600840
DATA KOJ,K1 J / 3 3 0 3 0 1 0 , o / 23800850
DATA N L O J N , HIJ / 7 7 9 58, 3 9 5 / 23600860
C 23800870
C COEFFICIENTS FOR GASOLINES AND NAPTHENES 23600880
DATA KOG, K1G / 1 9 2 4 5 7 1 , 2 4 3 8 / 23800890
DATA NHIG / 7 7 9 0 / 23B00900
C 2380091O
C UPPER ANDLOWER D E N S I T YL I M I T S ( O , 8 5A P I ) 23600920
DATA L I M 1L, I M 2/ 1 0 7 4 9 8 26, 5 2 9 3 4 / 23800930
C 23600940
C STRAIGHT LINEINTERPOLATION:ALPHA=A+B/(RH0**2) 23800950
C FOR REL DEN . 7 7 1 0 - . 7 8 8 5 23600960
DATA I N T 1 , I N T 2 / 7 7 1 O , 7 8 8 5 / 23800970
DATA I A , I 6 / - 18 6 8 4 0 ,1 4 8 9 0 6 7 0 / 23800980
C 23600990
C DENSITY OF WATER 23601 O00
DATA I H 2 0 / 9 9 9 0 1 2 / 23801 O1 O
C 23801 020
C U N I T6 I S THE OUTPUT U N I T .I F THE OUTPUT I S TO BE DIRECTED 23601 030
C TO
SOME OTHER UNIT, SET NOUT TO APPROPRIATE VALUE. 23601 040
NOUT = 6 23801050
--

C 23801 060
| | |

C ROUND SGTO NEAREST , 0 0 0 5 23601 070


+
|

I S G = ( (SG * 1 0 0 0 0 0 ) 25 ) / 50 23801 080


|
|||| |||| | | ||

ISG = ISG * 5 23801 O90


SG = FLOAT( I S G ) / 1 0 0 0 0 . 23601 1O0
C CHECK FOR TEMPERATURE LESS THAN ZERO 23601 1O 1
|||| |||| || || |

I F ( DEGF ) 1 2 0 0 1, 0 1, 0 23801 120


C ROUND TEMPERATURE TO NEAREST 0 . 1 DEG F 23601 130
1 0I T = ( (DEGF * 1 0 0 ) +
5 ) / 10 23601 140
|

DEGF = FLOAT( I T ) / 1 0 . 23801 150


|||| |||---

C I S SG LESS THAN , 6 5 3 5 ( I F YES, BRANCH TO 1200) 23601 160


I F ( I S G - 6 5 3 5 ) 1 2 0 04,04,0 23601 170
C I S SG GREATER THAN 1.O760 ( I F YES, BRANCH TO 1 2 0 0 ) 23801 180
40 I F ( I S G 10760 ) - 50, 50, 1200 23601 190
C I S SG GREATER THAN .7790 ( I F YES, BRANCH TO 70) 23801 200
50 I F ( I S G -
I B P l ) 6 06,07,0 23601 21O
C I S TEMP GREATERTHAN 200 ( I F YES, BRANCH TO 1 2 0 0 ) 23601 220
60 I F ( I T - ITMP1 ) 1 0 01, 0 01, 2 0 0 23601 230
C I S SG GREATER THAN .8245 ( I F YES, BRANCH TO 90) 23601 240
70 I F ( I S G - I B P 2 ) 8 08, 0 , 90 23601 250
C I S TEMPGREATERTHAN 2 (5I0F YES, BRANCH TO 1 2 0 0 ) 23601 260
80 I F ( I T - ITMP2 ) 1 0 0 , 1 0 0 1 2 0 0 23801 270
C I S TEMPGREATERTHAN 3 (0I0F YES, BRANCH TO 1200) 23601 280
90 I F ( I T -
ITMP3 ) 1 0 01, 0 0 1200 23601 290
1 O0 CONTINUE 23601 300
C 23601 3O 1
IFLAG = O 23801 320
I D T = I T - IBASE 23801 330
C COMPUTE DENSITY RHO = REL DEN * DENSITY OF WATER) 23601 340

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL=L VOL+X BO 0732290 O526055 910 m

SECTIONVOLUME CORRECTION
FACTORS x-191

CALL MPY23B(ISG,IH2O,IRHOT,lO) 23801 350


IRHOT = ( IRHOT + 500 ) / 1000 23801 360
C 23801370
C IS HYDROMETER CORRECTIONTO BE USED (NO, BRANCHTO112) 23801380
IF ( IHYDRO ) 101, 101, 112 23801 390
C 23801 400
C
COMPUTE HYDROMETERCONSTANT AT
DELTA
T 23801 41 O
HYC
C = 1 . - .00001278*(DEGF-60) - . 0 0 0 0 0 0 0 0 6 2 * ( D E G F - 6 0 ) * * 2 23801 420
101 IRD = 50 23801 430
IF (IDT) 105, 110, 110 23801 440
105 IRD = -50 23801 450
110 IH1 = ( 1 27800 * IDT + IRD) / 1 O0 23801 460
IH2 = (62 * IDT * IDT + 500) / 1000 23B01470
IHYC = 1000000000 - IH1 - IH2 23801 480
C 23801490
APPLY
C HYDROMETER CORRECTION TO DENSITY 23801 500
IRHO = IRHOT * 10 23801 51 O
CALL MPY238(IRHO,IHYC,IRHOT,lOOOO) 23801 520
IRHOT = ( IRHOT + 50 ) / 100 23801 530
C 23801540
112 ICOUNT = O 23801 550
C IS SG IN GASOLINE RANGE (.6535-.7790) (IF NO, BRANCH TO 120) 23801 560
IF ( ISG - NHIG ) 115, 115, 120 23801 570
115 KO = KOG 23801 580
K1 = K1G 23801 590
IREG = O 23801600

GO
TO 150 23801 O61
C IS SG IN JET RANGE (.7795-.8395)(IF NO, BRANCH TO 1 30 ) 23801 620
120 IF ( ISG - NHIJ ) 125, 125, 130 23801 630
125 KO = KOJ 23801 640
K1 = K1 J 23801 650
IREG = 1 23801660
GO TO 150 23801 670
C SG IS IN DIESELREGION (.8400-1.0760) 23801 680
130 KO = KOF 23801 690
K1 = K1 F 23801 700
IREG = 2 23801 71 O
C 23801 720
150 ICOUNT = ICOUNT + 1 23801 730
C 23801 740
IF (ICOUNT - 2) 160, 160, 400 23801 750
C 23801 760
C 23801 770
160 JRHOT = IRHOT * 10000 23801 780
C 23801 790
IRHO60 = IRHOT 23801 800
C 23801 O81
KRHO = O 23801 820
C 23801 830
NP = O 23801 840
C 23801850
300 NP = NP + 1 23801860
C 23801 870
CALL ALF23B(IRH060,KO,Kl,IALF) 23801 880
C 23801 890
CALL VCF23B(IALF,IDT,IVCF) 23801 900
C 2380191 O
-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
X-1 92 CHAPTER
1 P PHYSICAL PROPERTIES
DATA

IVCF = ( IVCF + 50 ) / 1 0 0 23801 920


C 23601 930
CALL D I V 2 3 6 ( JRHOT, I V C F , IRHOGO, 1 0 0 0 ) 23601 940
C 23601 950
I F ( I A B S (IRHOGO - KRHO ) - 50 ) 5 0 0 , 3 2 0 3
, 20 23801 960
C 23601 970
320 KRHO = IRHOGO 23601 980
C 23601 990
IRHOGO = ( IRHOGO + 5 ) / 10 23602000
C 2360201O
I F ( NP - 2 0 ) 3 0 01, 1 5 01, 1 5 0 23602020
C 23602030
STRAIGHT
C L I N E INTERPOLATION I S USED CONNECT TO THE JET FUEL 23602040
C AND GASOLINE L I N(E. 7S7 1 0 - . 7 8 8 5 ) . ONLY THE D E F I N I T I O N 23602050
C OF ALPHA I S CHANGED. ALPHA = A + 6 / ( R H 0 6 0 * * 2 ) 23602060
C 23602070
400 KRHO = O 23602080
NP = O 23802090
ICOUNT = 3 236021 O0
--

C 236021 1 O
| | |

C FIRST GUESS 778 I S. 8 4 KG/CU METRE 236021 20


|

IRHOGO = 7 7 8 8 4 236021 30
|
|||| |||| | | ||

JRHOT = IRHOT * 1 0 0 0 0 238021 40


440 NP = NP 1 + 236021 5 0
CALL DIV236(I6,IRHO6O,IRES,lOOOO) 236021 60
|||| |||| || || |

IRES = IRES * 1 0 236021 70


CALL DIV236(IRES,IRH060,IRES2,10000) 236021 8 0
IRES2 = ( I R E S 2 5 ) / 10 + 236021 90
+ +
|

IALF = ( I A IRES2 5 ) / 10 23602200


|||| |||---

CALL V C F 2 3 6 ( I A L F , I D T , I V C F ) 2360221O
IVCF = (IVCF 50) / 100 + 23602220
CALL DIV236(JRHOT,IVCF,IRH060,1000) 23602230
C 23602240
I F ( IABS(IRHO60 - KRHO) - 70 ) 5 0 0 , 4 6 04, 6 0 23802250
C 23602260
460 KSAV = KRHO 23602270
KRHO = IRHOGO 23602280
IRHOGO = ( IRHOGO 5 ) / 10 + 23602290
I F ( NP - 40 ) 4 4 04, 8 04, 8 0 23602300
C 2380231O
RESTRICTING
C DENSITY
(IRHOGO) TO THREE DECIMAL PLACES MAY 23602320
C CAUSETHE
CONVERGENCE TECHNIQUE TO REACHSTATIONARY
A 23602330
POINT
C BEFORETOLERANCE REACHED. THE AVERAGE OF THE UPPER 23002340
C LOWER
AND BOUNDARIES I S SATISFACTORY
A SOLUTION. 23602350
C 23602360
C AVERAGE LAST TWO PASSES 23602370
C 23602380
480 IRHOGO = ( KRHO KSAV ) / 2 + 23602390
C 23602400
C I S RH060 GREATER THAN
UPPER L I M I(TI F YES, BRANCH TO 1 2 0 0 ) 2360241O
500 I F ( IRHOGO - LIM1 ) 5 1 0 , 51 O , 1 2 0 0 23802420
C I S RH060
LESS THAN LOWER L I M(I ITF YES, BRANCH TO 1 2 0 0 ) 23602430
510 I F ( IRHOGO -
L I M 2 ) 1 2 0 05, 2 05, 2 0 23602440
C 23602450
520 JRHOT = IRHOGO * 1 0 0 0 23602460
C 23602470
C COMPUTE RELATIVE DENSITY 60/60 F 23602480
CALL DIV236(JRHOT,IH2O,ISG6O,lOOO) 23602490

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL-L V O L M X B O 0732290 0526057 793

--
| | |
|

SECTIONVOLUME CORRECTION
FACTORS X-i 93
|
|||| |||| | | ||

ISG6O = ( ISGGO +
50 ) / 1 0 0 23802500
|||| |||| || || |

FLOATING
C TO2380251 NEAREST .O001
VALUE ROUNDED O
SG60 = FLOAT(ISG60) / 1 0 0 0 0 . 23802520
C 23802530
-
|

I F (ICOUNT 36) 0 07, 2 07, 2 0 23802540


|||| |||---

~ C 23802550
6-2 01, ) 6 1 0 ,
I
600
2 3 8 I0 F
2 56
(IREG
4
00
C I S SG60 ABOVE GASOLINE REGION ( I F YES, BRANCHTO 122358)0 2 5 7 0
610 I F ( ISGGO 2 3 8 0 NHIG1
22 55 -
8 06 8)0 ,6 8 0 ,
C I S SG60 ABOVE JET REGION ( I F YES, BRANCH
TO 2133800) 2 5 9 0
620 I F ( ISGGO 2 3 8- 0 2 N
16 3H0I 0
J6 8)0 ,6 3 0 ,
C I S SG60 BELOWREGION JET ( I F YES, BRANCHTO 2
13 18 50) 261 O
630 I F ( ISG6O 2 3 8-0 26 NLOJ
682006 8)0 , 1 1 5 ,
C I S SG60 BELOW DIESEL REGION ( I F YES, BRANCHTO 12 23 58 )0 2 6 3 0
640 I F ( ISG6O 2 3 8- 0 NLOF
2
66 84 0 06 8)0 ,1 2 5 ,
C 23802650
680 CONTINUE 23802660
C 23802670
C I F ISGGO .7710 .GE. AND . 7
L8E8. 4 , USE STRAIGHT L2I3N8E0 2 6 8 0
C I S SG60 ( I.F7 7. G1 0E . YES, TO
BRANCH 2 3 8609206) 9 0
I F ( ISG6O 238026 7I9 -
0N0T 14 0)0 , 7 2 0 ,
C I S SG60(. I7F .8L8E5. YES, BRANCH TO 213080002)7 1 O
690 I F ( ISGGO 2 3 8-0 27I 7 N220T024 0)0 , 4 0 0 ,
C 23B02730
C 23802740
C I S SG GREATER THAN , 7( 7I F9 0 YES, BRANCH
TO 2739800)2 7 5 0
720 I F ( I2S3G8 0-277I96B00P7l 8 0) , 7 8 0 ,
C I S GREATER
TEMP THAN (1I F 50 YES, ßRANCH TO 2833800)2 7 7 0
780 I F ( 2 3I 8T0 28738 I 0E -
0 P8l 2 0) , 8 2 0 ,
C I S SG GREATER THAN , 8(2I 4 F5 YES, BRANCH
TO 81 O ) 23802790
790 I F ( I S2 G 380 - 28I81B00P028 0 )0 , 8 0 0 ,
C IS GREATER
THAN
TEMP 200 ( I F YES, BRANCH TO 830) 2380281O
800 I F ( 2 I3 T
8 0 2883I2E -
00P822 0) , 8 2 0 ,
C IS GREATER
THAN
TEMP 250 ( I F YES, BRANCH TO 830) 23802830
810 I F ( 8 0 -2883I4E
2 I3 T 00P832 0) , 8 2 0 ,
820 CONTINUE 23802850
RETURN 23B02860
C SET SWITCH I N D I C A T I N G EXTRAPOLATED REGION 23802870
830 = 1 23802880
RETURN 23802890
C 23802900
ITE(NOUT,6020)
1150 DEGF, SG 2380291 O
6020 FORMAT(5Hl AT , F 6 . 1 , 1 5 H DEGREES F AND ,F7.4,84HRELATIVEDENSITY,23802920
1A CORRESPONDING RELATIVEDENSITY 6 0 / 6 0 F COULD NOT BE DETERMINED.)23802930
C 23802940
C SET SWITCH INDICATING OUTSIDE OF
RANGE TABLE
2 3283 08 2950
02960 1200 = -1
70 SG60 = - 9 . 9 9 9 9
RETURN 23802980
END 23802990

SUBROUTINE DIV23B(INUM,IDENOM,IRES,ISCALE) 23803000


C 2380301O
C T H I S SUBROUTINE I S DESIGNED PRODUCE
TO ADDITIONAL 23803020
C ACCURACY FROM
AN INTEGER D I V I D E WHERE THE NUMERATOR 23803030
C I S ISCALE GREATERTHANTHE DENOMINATOR. THE SUBROUTINE 23803040

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API MPMS*LL.L VOL*X 80 m 0 7 3 2 2 9 00 5 2 6 0 5 8b 2 T m

x-194 CHAPTER
1 PHYSICAL PROPERTIES
DATA

C ASSUMES
PROPER SCALING OF BOTHTHE INPUT NUMERATOR 23803050
C AND DENOMINATOR AND WILL RETURNTHE RESULTS M U L T I P L I E D 23603060
C BY ISCALE. 23803070
C 23803080
IRES1 =INUM/ IDENOM 23803090
IRES2=(INUM-IRES1*IDENOM)*ISCALE/IDENOM 238031 O0
IRES=IRESl*ISCALE+IRES2 238031 1 O
RETURN 236031 20
END 238031 30

SUBROUTINE A L F 2 3 8 ( I R H O , K O , K l , I A L F ) 238031 4 0
C 238031 50
C T H I S SUBROUTINE I S DESIGNED TO CALCULATE ALPHA FOR 236031 60
C USE I N DETERMINATION OF VOLUME CORRECTION 236031 70
C FACTOR. ALTHOUGH ALLCALCULATIONS AREDONEAS INTEGERS, 238031 ao
C THE SUBROUTINE RETURNS WITHA 8 D I G I T VALUE 23803190
C 23803200
C INPUTVARIABLES 2360321O
C IRHO=DENSITY*lOO(KILOGRAMS/CUBIC METRE) 23603220
C KO,Kl=COEFFICIENTS OF DESIRED CURVE * 1 0 0 0 0 23803230
C 23603240
C ALGORITHM- 23603250
C ALPHA=KO/RH0**2+Kl/RHO 23803260
C 23803270
C CALCULATEK1/RHO 23603280
C 23803290
INUM=Kl * 1 O000
--

23603300
| | |

CALL DIV23B(INUM,IRHO,IALFl,lOOOO) 2360331O


|

C 23803320
|
|||| |||| | | ||

C CALCULATE KO/RH0**2 23603330


C 23603340
INUM=KO*l O0 23803350
|||| |||| || || |

CALL DIV23B(INUM,IRHO,IALFS,lOOOO) 23603360


CALL DIV23B(IALFS,IRHO,IALF2,10000) 23803370
I A L F = ( I A L F l + I A L F 2 + 5 0 0 ) / 1 O00 23803380
|

RETURN 23803390
|||| |||---

END 23803400

SUBROUTINE V C F 2 3 B ( I A L F , I D T , I V C F ) 2360341O
C 23603420
C T H I S SUBROUTINE I S DESIGNED TO CALCULATE VOLUME 23603430
C CORRECTION FACTOR. ALTHOUGH ALL CALCULATIONS ARE DONE 23603440
C AS INTEGERS, THE SUBROUTINE RETURNS WITHA 8 23803450
C OR 9D I G I T VALUE DEPENDENT UPONWHETHER IDT 23603460
C I S P O S I T I V E OR NEGATIVE. 23603470
C 23603480
C ALGORITHM- 23603490
C VCF=EXP(-ALPHA*DT(l.O+0.8*ALPHA*DT)) 23803500
C 2380351O
C CALCULATEALPHA*DT 23603520
C 23803530
ITERMl=IALF*IDT 23603540
C 23603550
C CALCULATE 0.8"ALPHA"DT 23803560
C 23603570
ITERM2=ITERM1/5*40 23803580
C 23603590

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API MPMS*LL-L V O L V X 80 m 0732290 0526057 566 m

SECTIONVOLUME CORRECTION FACTORS X-195

C CALCULATE EXPONENT-ALPHAQDT(1.0+O.8*ALPHA*DT) 23803600


C 2380361 O
CALL MPY23B(ITERM1,ITERM2,ITERM3,1000) 23803620
ITERM3 = ( ITERM3 + 500 ) / 1000 23803630
IX= -1TERM1 - ITERM3 23803640
C 23803650
C CALCULATE EXPONENTIAL(F1RST 7 TERMS OF POWER SERIES) 23803660
C 23803670
ISUM1=1 OOOOOOOO+IX 23803680
CALL MPY238(IX,IX,ISUM2,1000) 23803690
ISUM2=((ISUM2+50)/100)/2 23803700
CALL MPY238(IX,ISUM2,ISUM3,1000) 2380371 O
ISUM3=((ISUM3+50)/100)/3 23803720
CALL MPY23B(IX,ISUM3,ISUM4,1000) 23803730
ISUM4=((1SUM4+50)/100)/4 23803740
CALL MPY23B(IX,ISUM4,ISUM5,1000) 23803750
ISUM5=((1SUM5+50)/100)/5 23803760
CALL MPY23B(IX,ISUM5,1SUM6,1000) 23803770
ISUM6=((ISUM6+50)/100)/6 23803780
IVCF=ISUM1+ISUM2+ISUM3+ISUM4+ISUM5+ISUM6 23803790
--

RETURN 23803800
| | |

END 2380381 O
|
|
|||| |||| | | ||

SUBROUTINE MPY23B(IX,IY,IZ,ISCALE) 23803820


THIS
C ROUTINE
PERFORMS INTEGER
MULTIPLICATION THE TOTAL 23803830
|||| |||| || || |

C NUMBER OF DIGITS IN IX AND IY MUST NOT EXCEED 17. OTHER 23803840


C WISE, OVERFLOW WILL OCCUR. 23803850
C 23803860
IU1 = IX / ISCALE 23803870
|
|||| |||---

K1 = ISCALE * IU1 23803880


IV1 = IX - K1 23803890
IU2 = IY / ISCALE 23803900
K2 = ISCALE * IU2 2380391 O
IV2 = IY - K2 23803920
K3 = IU1 * IV2 + IU2 * IV1 + IV1 * IV2 / ISCALE 23803930
IZ = (K3 + ISCALE/2) / ISCALE + IU1 * IU2 23803940
RETURN 23803950
END 23803960
Errata
Please make the following updates to this subroutine listing. For an explanation
of the updates see 11.1.6.

current: C BREAK PglNTS FORREL DEN RANGES ( -7790 AND -8245 1 238007 1O
updated: C BREAK
POINTS F0RREL DEN RANGES ( ,7795 AND e8250 1 238007 1O

current: DATA lBPl , IBP2 / 7790, 8245 / 23800720


updated : DATA I BP1, I 8P2 / 7795, 8250 / 23600720

current: C IS SG GREATER
THAN -7790 ( I F YES, BRANCH T0 70) 2380 1200
updated: C IS SG GREATER
THAN e7795 ( I F YES, BRANCH T0 70) 2380 1200

current: C IS SG GREATER THAN e8245 ( I F YES, BRANCH T0 9 0 ) 2380 1240


updated: C IS SG GREATER THAN -8250 ( I F YES, BRANCH T0 90) 2380 1240

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL.L V O L X X 80 m 0732290 0526060 288 m

X-1 96 CHAFTER1l"PwscrU PROPERTIES


DATA

11.1.23.6 IMPLEMENTATION PROCEDUREFOR SUBROUTINE TA6236

The use of the aorrputer has gained widespread acceptance throughout the
petroleun industry. Computers are wed for accounting p.lrposes, i n process
simulation and modeling, d a t a r e t r i e v a l and evaluation, and are m being
usedextensively in custody t r a n s f e r measurements and t r a n s a c t i o n s .I n
1968, the American Petrolem I n s t i t u t e r e c o g n i z e d t h e need for incorporating
e x i s t i n g petroleum measurement tables into m u t e r d e . In June of 1973,
a subroutine for TABLE 6 , Volume Reduction to 60 OF, was made a v a i l a b l e .
Since then many of the other standardized petroleum masurement tables have
been mde a v a i l a b l e as a m p u t e r s u b r o u t i n e s .

|||| |||---
|
|||| |||| || || |
|||| |||| | | ||
|
|
| | |
--
The mly way to arercom these problems i n a amputer subroutine was to
manually locate all the table entries that d i d m t qree w i t h the c a l c u l a t e d
v a l u e s and add extensive"exception tables" to the code. mis made the&e
lengthy andsomewhat cunhersome to modify and to some e x t e n t restricted its
use ~ l a r g e r c o r p u t i n g system.

The working group f o r TABLE 6 r e v i s i o n r e a l i z e d the importanceof elimi-


n a t i n g any p o t e n t i a l for such problems in t h e f u t u r e and also recognized
t h e need to have amputer subroutines available at t h e time t h e new
petroleum measurement tables were released. The mrkinggroup decided to
o u t l i n e an explicit implementationprocedure to be followed when using
the new c o r r e l a t i o n for volume c o r r e c t i o nf a c t o r s . This implementation
prucedure muld then be the Standard rather than a set of q a t i o n s <x set
of tables. Standardization of an inplementationprocedureimplies
s t a n d a r d i z a t i o n of the set ofmathematical expressions used within the
computer d e . Absoluteadherence to the outlinedprocedure w i l l insure

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
SECTION VOLUME CORRECTION
FACTORS x-197

t h a t all m n p u t e r s and annputercodeof the future, meeting the s t a t e d


s p e c i f i c a t i o n s and r e s t r i c t i o n s , w i l l be a b l e to produce identical
I

results. Such a procedure allows f o r the maximum m c h i n e ard d e


independence.

The inplementation procedure as described in the following text can by


--
| | |

c a r e f u l and deliberate application of numerical analysis lx followed


|
|
|||| |||| | | ||

through the majority of language andword s i z e s i n p r e s e n t and a n t i c i p a t e d


use. To follow the standardproceduremansabsolute and unwavering
|||| |||| || || |

adherence to the number of d i g i t s s p e c i f i e d at each step and to the


c a l c u l a t i o n a l p r o c e d u r e as outlined.
|
|||| |||---

I n the procedure, the m m e n c l a t u r e d i g i t s (XXX.XX)means mathematically


s i g n i f i c a n t d i g i t s as definedin ASTM E380-76. I n the previous example,
a l l f i v e ( 5 ) d i g i t s i n t!e p r e n t h e s i s are mathematicallysignificant.

A t various steps in the implementationprocedure,calculatedresults are


rounded or truncated. When rounding a r e s u l t to fewer digits than the
total n-r a v a i l a b l e , the following procedure which was used cxrerrides
t h a t o f ASTM E380-76:

a) when the first d i g i t to be discarded is less than 5 , t h e last d i g i t


r e t a i n e d is mt changed.
b) when the first d i g i t to be discarded is greater than 4, the last
d i g i t r e t a i n e d i s increased by me unit.

The p m e d u r e used i n t r u n c a t i n g a r e s u l t to fewer d i g i t s than the btal


number a v a i l a b l e is to s i n p l y discard all digits following the last d i g i t
to be r e t a i n e d and leaving the last r e t a i n e d d i g i t unchanged.

Another specification is that the e f f i c i e n t s used to relate the thermal


expansion e f f i c i e n t at 60 O F to the 60 OF d e n s i t y base and all other
c o n s t a n t s needed in the m r r e l a t i o n nust be used b e x a c t l y t h e n&r of
d i g i t s specified.

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL.L VOL*X 80 m 0732290 0526062 050 m

x-198 1 P PHYSICAL PROPERTIES


CHAPTER DATA

Calculation Procedure

Step 1: Round i n p u tv a r i a b l e s
a) Round r e l a t i v ed e n s i t y b nearest 0.0005
SG = X.)(xxx rounded
b) Round &served tenperature to nearest 0.1
T = XXX.X rounded
--

Step 2: Calculatedifferencein&servedtenperature and


| | |
|

basetenperature
|
|||| |||| | | ||

BASE TEMPERATURE = 60 .O
DELTA = XXX.X - 60.0 = =.X
|||| |||| || || |

Step 3: C c q u t e hydrometer m r r e c t i o n term ( o p t i o n a l )


|
|||| |||---

HYC = 1.0 -
.00001278*DELTA - .0000000062*DELTA2
TERMl = .00001278*DELTA = .OOXXXXXXX rounded
TERM2 = .0000000062*DELTA2 = ,000XXXXXX rounded
HYC = 1.000000000 - .ooXXXI[XXX - .oooXXXXXX = x.XXXXXXXXX

Step 4: C o n v e r tr e l a t i v ed e n s i t y tn d e n s i t y , Kg/m3
RHO = SG * 999.012
RHO = XXXX.XX rounded

Step 5A: m l i c a t i o n of h y d r o m t e r m r r e c t i o n
RHOC = RHO*HyC = XXXX.XX rounded
Step 5B: I n i t i a l i z e 60 O F density
RHO60 = RHCYI' = xxxX.XX
Step 6A: C a l c u l a t e a o e f f i c i e n t of thermal expansion
ALPHA = Ko/l?H06O2 + K1/RH060
KO = xx)(x.XXXX
KI = .m
TERMl = KO/RHO6O = X
.XXXXXXX truncated
TERM2 = TERMl/FHO60 = .OOXXXXXXXX truncated

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
SECTION 1"VOLUME
FACTORS
CORRECTION x-199

TERM3 = Kl/RH060 = . O O m truncated


ALPHA= mm2 + mm3 = .OOOxXXX rounded

Step 6B: Calculation of ALPHA f o r s t r a i g h t l i n e segment


ALPHA = A + B/W060 2
A = -.O0186840 (as of May 1, 1980)
(as of May 1, 1980)
B = 1489 .O670
TEML = B/FH060 = X.xxx)Du( truncated
TERM2 = TEX?Ml/I73IOliO = X
.XXXXXXX rounded
ALPHA = A + TERM2 = .OOOxXXX rounded

S t e p 7: Calculate volume mrrection f a c t o r


VCF = W(-ALPHA*DELTA - 0.8*ALPHA2*DELTA2)
a ) calculate exponent
TERMl = ALPHA * DELTA = X.XXXXXXX truncated
TERM2 = O. 8 * TERMl = X
.XXXXXXX truncated
TERM3 = "l TERM;! = X.XXXXXXX rounded
*
TERM4 = - TERMl- TERM3 = X .XXXXXXX
b) calculate expcnential
VCF = EXP(TERM4) = X-. rounded
( M u s t use a t least t h e f i r s t seven t e m of
t h e m e r series expansion. )

S t e p 8: Calculate 60 OF density
m060 = RHCYT/VCF = XXXX.XXX truncated
Since the e q u a t i o n f o r ps0 cannot be s o l v e d e x p l i c i t l y , a successive
approxination iterative schare is used to obtain a s o h t i o n . The i n i t i a l
estimate of p i s the value of t h e d e n s i t y a t observed tenperature t.
60
This approximation is s u b s t i t u t e d i n t o the r i g h t hand side of the equation
to obtain a secondvalueapproximation. This process of s u b s t i t u t i n g inta
t h e r i g h t hand s i d e of the equation and estimating a new value fm the
other is repeated u n t i l t m consecutive results are i n a g r e e m n t to the
desired degree ofaccuracy. In subroutine W 2 3 B , a converged solution is
reached when the change i n d e n s i t y i s less than O. 05 Kg/n3 in two

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API MPMS*LL*L V O L X X B O m 0732290 052bOb4 923 D

X-200 1 IN PHYSICAL PROPERTIES


CHAPTER DATA

successive passes. If the v e


td value of relative density 60/60% is
not on the m curve as the observed relative density, the parameters KO
and K1 used to determine the coefficient of th-1 expansion must be
redefined and the convergence technique repeated. A straight line
interpolation is used to connect the jet fuel curve w i t h the gasoline curve
when the solution is &* en 0.7710 and 0.7885. When this occurs, the
coefficient of thexmal -sion is defined as:
2
a60 = A + B /P60
where A = -.O0186840 (as of May 1, 1980)
B = 1489.0670 (as of May 1, 1980)
In this case, the tolerance is increased to O. 07 Kg/m3.

The 1980 i n t e g e r FCRTFAN code issued by API c o n t a i n both an i n t e g e r


d i v i s i o n and an i n t e g e r m l t i p l i c a t i o n a l g o r i t h m . A d e s c r i p t i o n of each
follows.

INTM;ER MULTIPLICATION PRCEECURE


(For 32 B i t Arithmetic)

DATA DEFINITION
X,Y are i n t e g e r n u n k r s
that are equal b OT less than 2*109 ( s l i g h t l y
.
less than z3I) A larger value may cause werflow. I n a d d i t i o n , t h e
total number of digits in X and Y must mt exceed17, otherwise averflow
w i l l occur. Z is the product (X*Y) scaled by 10-8, i.e. z = (x*Y) /108*
--
| | |

Note: If it is desirable to o b t a i n maximum p r e c i s i o n , X and Y m y be


|
|
|||| |||| | | ||

s c a l e d up prior to use of the procedure.Typically, at least 1 5 d i g i t s


are needed to o b t a i n 6 d i g i t p r e c i s i o n , 1 6 for 7 and 17for8. The
|||| |||| || || |

largest value of X and Y that may be used are 2 O00 O00 O00 and
99 999 999. (Either values may be used for X and Y).
|
|||| |||---

CALCULATION
x/10000 = u1
10000 * u1 = Kl

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
SECTIONRE VOLUME CORRECTION
FACTORS x-201

x-KI. = v1
Y/10000 = u2
10000 * U2 = K2
Y-K2 = V2
(Ul*V2) + (U2W) + (Vl*V2/10000) = K3
(K3 + 5000)/10000 + Ul*U2 = 2

Note: Z has been scaled by and may have tD be rescaledbefore use.

TOTAG DIGITS IN X AND Y 12 13 14 15 16 17


DIGITS IN PIlDMJCT, Z 3-4 4-5 5-6 6-7 7-8 8-9

1NTM;ER DIVISION PROCEDURE


(For 32 B i t Arithmetic)

DATA DEFINITION
X,Y are integernmberssuch that X is q a l cr less than23l -1 and
Y is of arder of magnitude lo4 less than X.

R is the quotient of X/Y s c a l e d by lo4, i.e. R = X/Y * lo4.


--
| | |
|
|

Note: I f it is desirable to & t a i n maximum p r e c i s i o n , X and Y may be scaled


|||| |||| | | ||

up prior to use of the procedure.Typically, the mre d i g i t s t h a t are


|||| |||| || || |

c a r r i e d in both X and Y, the mre a c c u r a t e d i g i t s m output.


|
|||| |||---

CALCULATION
x/Y = u1
Ul*Y=KI.
x-Kl=vl
vl/Y = u2
U1 * 10000 + U2 =R

Note: R has been scaled by 104 and may need tD te rescaled before use.
COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MP M S * L L - L V O L V X 8 0 0732290 0526066 7Tb H

x-202 CHAPTER
1 P PHYSICAL PROPERTIES
DATA

Examples f o r Checkout

The followingexamples illustrate how the inplementationpmcedure is


a c t u a l l y used to determine the v a l u e o f r e l a t i v e d e n s i t y 60/60 OF f o r
GeneralizedProducts. The exanplescarry the computationsthrough each step
of the procedure showing the r e s u l t s of each mathematical aperation. The
computed values are given to the r e q u i r e d p r e c i s i o n and it is indicated if a
v a l u e has been rounded or truncated. The step-by-step c a l c u l a t i o n s are
shown for t h e f i r s t i t e r a t i o n t h e n a table is presentedwhichsumnarizes the
intermediate values used t n o b t a i n a converged solution.

These examples are to be used as test cases f o r s u b r o u t i n e TAB23B to v e r i f y


the computer code has not been altered or i n c o r r e c t l y reproduced. The
r o u t i n e has beendesigned to execute on machines that use word s i z e o f
32-bits or greater. Any new d e v e l o p e n t of amputer d e that is designed
to follow the standardirrplementationprocedure must i n s u r e t h a t t h e v a l u e s
computed at each step i n the procedure are i d e n t i c a l to those given in the
exanples.

EXAMPLE 1
Step 1: Round i n p u tv a r i a b l e s
a ) Round r e l a t i v ed e n s i t y to n e a r e s t .O005
SG = .9040 rounded
b) Round observedtemperature to n e a r e s t O. 1
T = 130 .O rounded

Step 2: in &servedb?nperature
C a l c u l a t ed i f f e r e n c e and base temperature
BASE TEMPERATURE = 60 .O
DELTA = 130.0 -
60.0 = 70.0

Step 3: Conputehydrometer c o r r e c t i o n term


HYC = 1.0 - .O0001278 * DELTA - .0000000062 * DELTA2
TERMl = .O0001278 * DELTA = .O00894600 rounded
“2 = .0000000062 * DELTA2 = .O00030380 rounded
HYC = 1.000000000 - .000894600- .O00030380 = .999075020
-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL.L VOL*X 80 m 0732290 0526067 632 m

SECTION FACTORS
I-VOLUME CORRECTION X-203

Step 4: Convert r e l a t i v e d e n s i t y m density


mo = SG * 999.012
RHO = 903 .ll rounded

S t e p 5A: &plication of hydrometer m r r e c t i o n


RHOT = RHO * HYC = 902.27 rounded

S t e p SB: I n i t i a l i z e 60 O F d e n s i t y
RHO60 = FXYT = 902.27

Step 6A: Calculate e f f i c i e n t of thermal expansion


ALPHA = K0/RH06O2 + Kl/F?H060
KO = 103.8720 (as of May 1, 1980)
KI = 0.2701 (as of May 1, 1980)
TERMl= Ko/RHOGO
mm = .11512296 truncated
mm2 = TERM1/FH060
I

m= .O001275925 truncated
TERM3= K1/RHO60
TERM3 = .O002993560 truncated
ALPHA = TERM2 + TERM3 = .O004269 rounded

Step 7: Calculate volume m r r e c t i o n factor


VCF = EXP( -ALPHA * DESTA - o. 8 * ALPHA^ * DELTA^)
Calculateexponent
“l= ALPHA * DELTA = .O2988300 truncated
TERM2 = 0.8 * TERMl = .O2390640 truncated
TERM3 = TEM * TERM2 = .O0071439 rounded
TERM4 = 4“l - TERM3 = -.O3059739
Calculateexponential
VCF = MP(TERM4) = .969866 rounded
(must use the f i r s t seven terms of the power series
expansion of ex)

Step 8: Calculate 60 OF density


RHO60 = F@DT/VCF = 930.303 truncated
-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL=L VOL*X 80 m 0732270 0526068 579 m

X-204 1 P PHYSICAL PROPERTIES


CHAPTER DATA

TABLE 1 shaws the r e s u l t s of e a c h i t e r a t i o n .

TABLE 1

ITERATION RHO60 (N) ALPm VCF RH060(N+1)


1 902.27 .O004269 .969866 930.303
2 930.03 .O004104 .971039 929.179
3 929.18 .O004110 .970997 929.220

SG60 = 929.22/999 .O12 = 0.9301

"PLE 2
S t e p 1: Round input v a r i a b l e s
a) K u n d r e l a t i v e d e n s i t y to nearest .O005
SG = .8500 rounded
b ) Wund &served tenperature to nearest 0.1
T = 7.5 rounded

S t e p 2: Calcylate d i f f e r e n c e in &servedtemperature and base


tenperature
BASE TEMPEXWTURE = 60 .O
DELTA = 7.5 - 60.0 = -52.5

S t e p 3: Campute hydrometeraorrection tem


HYC = 1.0 -
.O0001278 * DELTA .0000000062 * DELTA
2
-
TERMl = .O0001278 * DELTA = -.O00670950 rounded
TERM2 = .0000000062 * DELTA2 = .O00017089 rounded
HYC = 1.000000000 + .O00670950 - .O00017089 = 1.000653861

S t e p 4: C o n v e r tr e l a t i v ed e n s i t y to d e n s i t y
RHO = SG * 999.012
RHO = 849.16 rounded

S t e p 5A: Application of hydrometer correction


RHUT = RHO * HYC = 849.72 rounded

S t e p SB: I n i t i a l i z e 60 OF d e n s i t y
RHO60 = RHCYI' = 849.72
-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL.L VOL*X BO 0732290 0526069 405

FACTORS
SECTIONVOLUME CORRECTION X-205

S t e p 6: C a l c u l a t e e f f i c i e n t of thermal expansion
ALPHA = Ko/FH0602 + Kl/F?H060
KO = 103.8720 (as of May 1, 1980 )
K 1 = 0.2701 (as of May 1, 1980)
TERMl = Ko/FH060
TER M 1 = .12224262 truncated
TERM2 = TEXMl/IW060
2" = .O001438622 truncated
TERM3 = K1/FH060
TERM3 = .O003178694 truncated
ALPHA = TERM2 + TERM3 = .O004617 rounded

Step 7: Calculate volume m r r e c t i o nf a c t o r


VCF = MP(-ALPHA * DELTA - 0.8 * m m 2 * DELTA^)
a ) Calculateexponent
TERMl = ALPHA * DELTA = -.O2423925 truncated
TERM2 = 0.8 * TERMl = -.O1939140 truncated
TERM3 = TERMl * TERM2 = .O0047003 rounded
TERM4 = " -
l TERM3 = .O2376922
b ) Calculateexponential
VCF = EXP(TERM4) = 1.024054 rounded
(must usethe f i r s t seven terms of the m e r series
expansion of ex)

Step 8: Calculate 60 OF d e n s i t y
RH060 = RHDP/VCF = 829.760 truncated

TABLE 2A shows the r e s u l t s of each iteration.

TABLE 2A
|||| |||---

ITERATION RHO60 ( N ) ALPHA VCF RHo60(N+1)


|
|||| |||| || || |

1 849.72 .O004617 l.024054 829.760


2 829.76 .O004764 l.0248 13 829.146
|||| |||| | | ||

3 829.15 .O004768 l. 024834 829.129


|
|
| | |

SG60 = 829.13/999.012 = 0.8299


--

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL=L VOL*X 80 0732290 0526070 L27 m

X-206 1 P PHYSICAL
CHAPTER DATA
PROPERTIES

Computed value of SG60 is mt an the same curve as the input r e l a t i v e


density.Redefine KO and K 1 f o r the jet f u e lc u r v e and repeat the
convergence scheme i n S t e p s SB through 8. Table 2B shows t h e r e s u l t s .

TABLE
2B

RH060
ITERATION (N) AI;pHA VCF RHO60(N+l)
1 849.72 .O004575 1.023837 829.936
2 829.94 .O004795 l.024974 829 .O16
3 829.02 .O004806 l. 025030 828.970

SG60 = 828.97/999.012 = 0.8298

"PLE 3
S t e p 1: Round input variables
a ) mund r e l a t i v e d e n s i t y to nearest .O005
SG = .8015 rounded
b ) mundobservedtemperature t~ nearest 0.1
T = 77.0 rounded

Step 2: Calculate difference in observed temperature and base


temperature
RASE TEMPERATURE= 60 .O
DELTA = 77.0 - 60.0 = 17.0

S t e p 3: Compute hydrometer m r r e c t i o n term


HYC = 1. O - .O0001278 * DELTA - .0000000062 * DELTA2
TEm = .O0001278 * DELTA = .O00217260 rounded
TERM2 = .0000000062 * DELTA2 = .O00001792 rounded
HYC = 1.000000000 - .O00217260 - .O00001792 = .999780948

Step 4: Conver t r e l a t i v e d e n s i t y to d e n s i t y
RHO= SG * 999 .O12
RHO = 800.71rounded

Step 5A: Application of h y d r c m t e r c o r r e c t i o n


RI" = RHO * HYC = 800 .53 rounded

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL.L VOL*X 80 m 0732290 0526071 Ob3 m

SECTION FACTORS
I-VOLUME CORRECTION X-207

S t e p 5B: I n i t i a l i z e 60 OF d e n s i t y
RH060 = RHW = 800.53

Step 6: C a l c u l a t e e f f i c i e n t of thermal expansion


-
ALPHA = Ko/RH06O2 i - Kl/RH060
KO = 330.3010 (as of May 1, 1980)
KI = 0.0 (as of May 1, 1980)
TEM = Ko/RHO60
--

TE M = .41260290 truncated
| | |
|

TERM2 = TERMl/RH060
|
|||| |||| | | ||

TERM2 = .O005154121 truncated


m= K1/m060
|||| |||| || || |

TERM3= 0.0
ALPHA = “2 + TERM3 = .O005154 rounded
|
|||| |||---

Step 7: Calculate volume m r r e c t i o nf a c t o r


VCF = EXP(-ALPHA * DELTA - 0.8 * m m 2 * DEXTA~)
a) Calculateexponent
TERMl = ALPHA * DELTA = .O0876180 truncated
TERM2 = 0.8 * “l= .O0700944 truncated
TFRM3 = TERMl * TERM2 = .O0006142 rounded
TERM4 = JI‘ERM1 - TERM3 = -.O0882322
b) Calculateexponential
VCF = MP(TERM4) = .991216 rounded
(must use t h e f i r s t seven terms of the p e r series
expansionofex)
S t e p 8: Calculate 60 O F density
RH060 = RHOT/VCF = 807.624 truncated

TABLE 3 shows t h e r e s u l t s ofeachiteration.


TABLE 3

ITERATION REI060 ( N ) ALSm VCF RHO60 (N+1)


1 800.53 .O005154 .991216 807.624
2 807.62 .O005064 .99 1369 807.499
3 807.50 .O005066 .991366 807.501

SG60 = 807.50/999 .O12 = 0.8083

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
X-208 CHAPTER DATA
1 PHYSICAL PROPERTIES

EXAMPLE 4
Step 1: Round input variables
a ) €@und relative density to nearest .O005
SG = .7390 rounded
b) Wund observed tenperature to nearest 0.1
T = 140 .O rounded

Step 2: Calculatedifference i n &served tenperature and base


tenperature
BASE T E M P F D A ~= 60 .O
DEZTA = 140.0 - 60.0 = 80.0

Step 3: Conputehydrometer mrrection term


HYC = 1.0 - .O0001278 * DELTA -.0000000062 * DELTA2
TERMl = .O0001278 * DELTA = .O01022400 rounded
TERM2 = .0000000062 * DELTA2 = .O00039680 rounded
HYC = 1.000000000 - .O01022400 -
.O00039680 = -998937920

Step 4: Convert relative density to density


RHO = SG * 999.012
RHO = 738.27 rounded

Step 5A: Application of hydrameter correction


RHOT = W O * HYC = 737.49 rounded

Step 5B: Initialize 60 OF density


mo60 = m = 737.49

Step 6A: Calculate e f f i c i e n t of thermalexpansion


|||| |||---

ALPHA = Ko/IM0602 + K1/IM060


KO = 192.4571 (as of May 1, 1980)
|
|||| |||| || || |

KI = 0.2438 (as of May 1, 1980)


TERMl = Ko/REIo60
|||| |||| | | ||

TERMl = .26096231 truncated


TERM2 = TER"/RHO60
|
|

TERM2 = .O003538519 truncated


| | |
--

TERM3 = Kl/RH060
TERM3 = .O003305807 truncated
ALPHA = TERM2 + "3 = .O006844 rounded

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API MPMS*LL.L VOL*X 80 0732290 0526073 936

SECTIONVOLUME CORRECTION FACTORS x-209

Step 7: Calculate volume c o r r e c t i o n factor


VCF Exp (-ALPHA * DELTA - O. 8 * ALPHA2 * DELTA2)
a ) Calculateexponent
"l= ALPHA * DELTA = .O5475200 truncated
TERM2 = 0.8 * TERMl = .O4380160 truncated
TERM3 = TERMl * TERM2 = .O0239823 rounded
TERM4 = JI"l - TERM3 = -.O5715023
b) Calculateexponential
VCF = MP(TERM4) = .944452 rounded
( m u s t use t h e f i r s t seven terms of the p e r series
expansion of ex)

Step 8: Calculate 60 OF d e n s i t y
RH060 = RHOI?/VCF = 780.865 truncated

TABLE
4A s h m the r e s u l t s of e a c h i t e r a t i o n .
--
| | |
|
|
|||| |||| | | ||

ITERATION ALPHA VCF RHO60(N+1)


|||| |||| || || |

RHO60 ( N )
1 737.49 .O006844 .944452 780.865
2 780 .87
|

.O006278 .949099 777.042


|||| |||---

3 777.04 .O006325 .948714 777.357


4 777.36 .O006321 .948746 777.331

SG60 = 777.33/999 .O12 = O. 7781

Computed value of SG60 is m the straight l i n e segment connecting the jet


f u e l and gasolinecurves.Redefine ALPHA and repeat convergence scheme in
steps 5B through 8.

Step 5B: I n i t i a l i z e 60 O F density


mo60 = 778.84
( f i r s t approximation is density equivalent of 50 O A P I )

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
x-21 o CHAPTER DATA
1 P PHYSICAL PROPERTIES

S t e p 6B: Calculation of ALPHA f o r s t r a i g h t l i n e segment


2
ALPHA = A + B/RH060

|||| |||---
A = -.O0186840 (as of May 1, 1980)

|
|||| |||| || || |
B = 1489.0670 (as of May 1, 1980)
TERMl = B/RHO60 = 1.911903 truncated

|||| |||| | | ||
TERM2 = “l/IWO60 = .O0245481 rounded
ALPHA = A + TERM2 = .O005864 rounded

|
|
| | |
--
S t e p 7: C a l c u l a t e volume c o r r e c t i o nf a c t o r
VCF = EXP(-ALPHA * DELTA - O. 8 * m m 2 * DELTA^ )
a ) Calculateexponent
TERM4 = -.O4691200 - .O0176059 = -*O4867259
b) Calculateexponential
VCF = EXP(TERM4) = .952493 rounded
( m u s t use t h e f i r s t seven terms of the mer series
expansion of 9)

S t e p 8: Calculate 60 OF density
RH060 = 737.49/ .952493 = 774.273

TABLE 4B

ITERATION RHO60 (N) ALPHA RH060 VCF (N+l)


1 778.84 .O005864 .952493 774.273
2 774.27 ,0006155 .950108 776.217
3 776.22 .O006030 .951133 775,380
4 775 ,38 .O006084 ,950690 775.741
5 775 74 ,0006061 ,950879 775 ,587
6 775.59 ,0006070 .950805 775.648

S60 = 775.65/999 .O12 = 0.7764

Step 1: Round i n p u tv a r i a b l e s
a ) murid r e l a t i v e d e n s i t y tr> nearest .O005
SG = .7795 rounded

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL-L V O L + X 80 m 0732290 0526075 709 m

SECTIONVOLUMEFACTORS
CORRECTION x-211

b) Round cbservedtemperature to nearest 0.1


T = 12.5 rounded

S t e p 2: Calculatedifferenceincbservedtemperature and base


temperature
BASE "PERATURE = 60 .O
DELTA = 12.5 - 60.0 = -47.5

S t e p 3:Compute hydrometer a o r r e c t i o n term


€WC = 1.0 - .O0001278 * DELTA - .0000000062 * DELTA2
TERMl = .O0001278 * DELTA = -.O00607050 rounded
"2 = .0000000062 * DELTA2 = .O00013989 rounded
€WC = 1.000000000 + .O00607050 -
.O00013989 = 1.000593061

S t e p 4: C o n v e r tr e l a t i v ed e n s i t y to d e n s i t y
RHO = SG * 999.012
RHO = 778.73 rounded

Step 5A: Application of hydromter correction


RHm = RHO * HYC = 779.19 rounded

S t e p 5B: I n i t i a l i z e 60 OF d e n s i t y
RH060 = RHCYI' = 779.19

Step 6A: Calculate e f f i c i e n t of thermalexpansion


ALPHA = Ko/F?H0602 + Kl/RHO60
KO = 330.3010 (as of May 1, 1980 )
K 1 = 0.0 (as of May 1, 1980)
TEXMI.= Ko/mO6O
TERMl = .42390302 truncated
TERM2 = TEZ"/MO60
TERM2 = .O005440303 truncated
TERM3 = K1/H060
TERM3 = 0.0
ALPHA = TERM2 + TERM3 = .O005440 rounded

Step 7: Calculate volume a o r r e c t i o nf a c t o r


VCF = EXP(-ALPHA * DELTA - 0.8 * ALPHA^ * DELTA^)
-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API M P M S * ~ I L ~ LV O L * X 80 W 0732290 0526076 645 m

x-212 CHAPTER 11"PHYSICAL PRoPERTlES DATA

a ) Calculateexponent
TEM = ALPHA * DELTA = -.O2584000 truncated
TERM;! = 0.8 * TJ2RF4l = -.O2067200 truncated
TERM3 = TERMl * "2 = .O0053416 rounded
-
TERM4 = 4 E F N L "3 = .O2530584
b ) Calculate e m e n t i a l
VCF = MP(TERM4) = 1.025629 rounded
(must usethe f i r s t seven tem of the p e r series
expansion of 9)

Step 8 : Calculate 60 OF d e n s i t y
RHO60 = RHCYr/VCF = 759.719 truncated

TABLE 5A shows the r e s u l t s of e a c h i t e r a t i o n .

TABLE 5A

|||| |||---
ITERATION RHO60 ( N ) ALPHA VCF m 6 0 ( N+1)

|
|||| |||| || || |
1 779.19 .O005440 1.025629 759.719
2 759.72 .O005723 l.026950 758 741 .

|||| |||| | | ||
3 758.74 .O005738 l.027020 758.690
4 758.69 .O005738 1.027020 758.690

|
|
| | |
--
SG60 = 758.69/999.012 = 0.7594

Canputed value of SG60 is mt m the same curve as the i n p u t s p e c i f i c


gravity.Redefine €$-J and K1 f o r the gasolinecurve and repeat the
convergence scheme i n steps 5B through 8. T a b l e 5B shows the r e s u l t s

TABLE
5B

ITERATION RHO60 ( N ) ALPHA VCF RH060( N+1)


1 779.19 .O006299 1.029635 756.763
2 .O006582 1.030952 755.796
3 755.80 .O006595 1.031012 755.752

SG60 = 755.75/999 .O12 = 0.7565

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API flPMS*LL~L VOLXX A O m 0732290 0526077 581 m

1-VOLUME
SECTION FACTORS
CORRECTION x-213

EXAMPLE 6
Step 1: Round i n p t v a r i a b l e s
a nearest .O005
a ) Wund r e l a t i v e d e n s i t y t
SG = .6850 rounded
b) Wund observed tenperature a l warest 0.1
T = 94.0 rounded

S t e p 2: Calculatedifferencein&sewedtenperature and base


temperature
BASE TEMpERATURJ2 = 60.0
DELTA = 94.0 60.0 = 34.0 -
Step 3: Conputehydrometer m r r e c t i o n tem
HYC = 1.0 - .O0001278 * DELTA - .0000000062 * DELTA2
TEEW = .O0001278 * DELTA = .O00434520 rounded
TERM2 = .0000000062 * DELTA2 = .O00007167 rounded
HYC = 1.000000000 .O00434520 .O00007167 = -999558313 - -
Step 4: C o n v e r tr e l a t i v ed e n s i t y to d e n s i t y
RHO = !X * 999.012
RHO = 684.32 rounded

Step 5A: Application of hydmneter correction


RHOT = RHO * HYC = 684 .O2 rounded

Step 5B: I n i t i a l i z e 60 OF d e n s i t y
RH060 = RHW = 684.02

Step 6A: Calculate e f f i c i e n t of thermal expansion


ALPHA = Ko/RH0602 + K1/F%O60
KO = 192.4571 (as of May 1, 1980)
K 1 = 0.2438 (as of May 1, 1980)
m = Ko/WIO60
T"l = .28136180 truncated
TERM2 = TERMl/MO60
TERM2 = .O004113356 truncated
T M 3 = K1/RH060
TERM3 = .O003564223 truncated
ALPHA = TERM;! + TERM3 = .O007678 rounded
-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I M P M S * 1 1 = 1 V O L t X 80 m 0732290 0526078 418 m

X-21 4 CHAPTER
1 PHYSICAL PROPERTIES
DATA

Step 7: Calculate volume m r r e c t i o n factor


VCF = EXP( -ALPHA * DELTA - o. 8 * m m 2 * DELTA^ )
a ) Calculateexponent
TERMl = ALPHA * DELTA = .O2610520 truncated
TERM2 = 0.8 * “l= .O2088416 truncated
TERM3 = TERMl * TERM2 = .U0054519 rounded
TERM4 = - T E m = -.O2665039
b) Calculateexponential
VCF = EXP(TERM4) = .973702 rounded
( m u s t use t h e f i r s t seven tem of the p e r series
expansion of ex)

S t e p 8: Calculate 60 OF density
RH060 = F?HOI?/VCF = 702.494 truncated

TABLE 6 shows the r e s u l t s of each iteration.

|||| |||---
TABLE 6

|
|||| |||| || || |
ITERATION RHO60 (N) mm VCF RHO60 ( N+1)
1 684.02 .O007678 .973702 702.494

|||| |||| | | ||
2 702.49 .O007370 .974764 701.728
3 701.73 .O007383 .974719 701.761

|
|
| | |
--
SG60 = 701.76/999 .O12 = 0.7025

”Pm 7
S t e p 1: Round inputvariables
a ) Round relative d e n s i t y to nearest .O005
SG = .7565 rounded
b ) Round &served temperature to nearest 0.1
T = 176 .O rounded

S t e p 2 : Calculate difference in &sewed temperature and base


tenperature
BASE TEMPERATURE = 60.0
DELTA = 176 .O 60.0 = 116.0 -
COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I M P M S * L L m L VOL*X 80 m 0732290 052b079 354 m

SECTIONVOLUMEFACTORS
CORRECTION x-215

S t e p 3:Compute hydrometer correction term


HYC = 1.0 - .O0001278 * DELTA - .0000000062 * DELTA
2
TERMl = .O0001278 * DELTA = .O01482480 rounded
--

TERM2 = .0000000062 * DELTA2 = .O00083427 rounded


| | |
|

= 1.000000000 - .O01482480 - .O00083427 = .998434093


|

HYC
|||| |||| | | ||

S t e p 4: C o n v e r tr e l a t i v ed e n s i t y to d e n s i t y
REI0 = SG * 999 .O12
|||| |||| || || |

RHO = 755.75 rounded


|
|||| |||---

S t e p 5A: Application of hydrtxeter correction


RHDC = RHO * WC = 754.57 rounded

Step 5B: I n i t i a l i z e 60 OF d e n s i t y
RHO60 = RHCrr = 754.57

S t e p 6A: C a l c u l a t e a x f f i c i e n t ofthermalexpansion
ALPHA = Ko/IMW02 + K1/Iw060
KO = 192.4571 ( a s of May 1, 1980)
K 1 = O. 2438 (as of May 1, 1980)
= Ko/RH060
TERMl = ,25505532 truncated
TERM2 = TEF?Ml/IhI060
TERM2 = .O003380141 truncated
TERM3 = Kl/FHO60
TERM3 = .O003230979 truncated
ALPHA = TERM2 + TEFW= .O006611 rounded

Step 7: Calculate volume c o r r e c t i o nf a c t o r


VCF = MP ( -ALPHA * DELTA - o. 8 * m m 2 * DELTA^ )
a ) Calculateexponent
TEF?Ml = ALPHA * DELTA = .O7668760 truncated
TERM2 = 0.8 * TERMl = .O6135008 truncated
TERM3 = TERMl * TERM;! = .O0470479 rounded
TERM4 = -“l- TEPM3 = -.O8139239
b ) Calculateexponential
VCF = Exp(TERM4) = .921832 rounded
(must use t h e f i r s t seventerms of the p e r series
expansionofex)

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API MPMS*I,L*L V O L X X 80 m 0732290 0526080 07b m

X-216 CHAFIER 1 P PHYSICAL PFOPERTIES


DATA

S t e p 8: Calculate 60 OF density
RHO60 = m / I C F = 818.554 truncated

TABLE
7A shows the r e s u l t s of each i t e r a t i o n .
--

TABLE7A
| | |
|
|
|||| |||| | | ||

ITERATION RHO60 ( N ) ALPHA VCF RHO60(N+l)


1 754.57 .O006611 -921832 818.554
|||| |||| || || |

2 818.55 .O005851 -930943 810.543


3 810.54 .O005937 .9 29914 811.440
|
|||| |||---

4 811.44 .O005927 -930033 811.336


5 811.34 .O005929 .930009 811.357

SG60 = 811.36/999 .O12 = 0.8122

Corrputed value of SG60 is mt m the same curve as the i n p u t r e l a t i v e


density.Redefine KO and K 1 for the jet fuelcurve and =peat the
convergence scheme in steps 5B through 8. Table 7B shows the r e s u l t s .

TABLE 7B

ITEI?A!CION RHO60 ( N ) mm RHO60


VCF (N+1)
1 754.57 .O005801 .931542 810 .O22
810.02 2 .O005034 .940708 802.129
802.13 3 .O005134 .939515 803.148
4 803.15 .O005121 .939670 803.015
803 5 .O2 .O005122 .939658 803.026

SG60 = 803.03/999.012 = 0.8038

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*IIL-h V O L * X 80 m 0732290 0526083 T02 m

SECTIONVOLUME CORRECTION
FACTORS X-217

11.1.24 TABLES 24A, 246, and 24C- The volume correction factors given in this table are
Correction of Volume to 60°F the result of a computer procedure which is the Stan-
dard (see11.1.24.2 and 11.1.24.3). Allof thesetvolumes
Against Relative Density 60/60°F are at saturation conditions. Pressure correctionsfrom
and Thermal Expansion saturation are not included.
Coefficients
The temperature ranges of this table are:
TABLES 24A, 24B, and 24Cgive thefactorsfor
converting liquid petroleum volumes measured at ob- Relative
Density 60/60"F "F
served temperatures to the corresponding volumes at 0.8250 to 1.0760 O to 300
60°F. 0.7795 to 0.8250 O to 250
The data are presented in three tables to maximize
accuracy while maintaining convenienceof use: 0.6110 to 0.7795 o to 200
TABLE 24A Generalized Crude Oils The volume correction factorsgiven in this table are
(see Volume IV) based on data from the U.S. National Bureau of Stan-
TABLE 24B GeneralizedProducts dards and from other published data. Portions of the
(see Volume V) relative density and temperatureranges represent areas
--

TABLE 24C Volume CorrectionFactors for beyondthesedata.Thus,mathematicaltechniques


| | |

Individual and Special Applica- were employed to extrapolatebeyond the relative den-
|

sity and temperature rangesof the given data to deter-


|

tions (see Volume VI)


|||| |||| | | ||

minethe volume correctionfactors for theseareas.


TABLES 24A and 24B userelative density 60/60"F to These factors are denotedby an asterisk (*). Extension
obtain volume correction factors. TABLE 24C uses ex- of this table beyond the ranges shown is not recom-
|||| |||| || || |

perimentallydeterminedthermal expansion coeffi- mended.


cients to obtain volume correction factors.
The development and intendeduse of these tables is Increments used in this table for determiningvolume
|

correction factors are0.5"F and 0.0020 relative density.


|||| |||---

described in 11.1.6. The parameters KOand K I may be


found in 11.1.24.7. (see Volume VI). Interpolation between either temperature or relative
The limits of these tables are illustrated in Figures density is not intended since there is no practical meth-
X-11, X-12, and X-13. od of interpolation that will produce the accuracy ob-
tainable from the Standard.
11.1.24.1 TABLE 24A"GENERALIZED CRUDE
OILS, CORRECTION OF VOLUME TO This table must be entered with a known rela-
60°F AGAINST RELATIVE tive density 60/60"F and with an observed tem-
DENSITY 60/60"F perature.
Table 24A givesvolume correction factorsconverting
crude oil volumes observedat temperatures otherthan
60°F to corresponding volumes at 60°F.

250
Temp 150
"F

O
10

Figure X-1 1 - Data Limits for TABLE 24A

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL*L VOL*X 80 m 0732290 052b082 949 m

X-218 CHAPTER
1 PHYSICAL PFIOPERTIES
DATA

Temp
"F c
Data Range

I I I
.8250 .T195 .e35

Relative Density

Figure X-12 - Data Limits for TABLE 246

Temp
"F

510 530 930

Thermal Expansion Coefficient x 11?6 ("F")

Figure X-13 - Data Limits for TABLE 24C

11.1.24.2 PROGRAM DOCUMENTATION FOR SUBROUTINE TAB24A-


GENERALIZED CRUDE OILS, CORRECTION OF VOLUME TO 60°F
AGAINST RELATIVE DENSITY 60/60"F

The t h e r m a le x p a n s i o np r o p e r t i e s( v o l u m ec o r r e c t i o nf a c t o r s , VCF's) for


p r o d u c t s( e x c l u d i n gl u b es t o c k s ) and c r u d e sa r ec o r r e l a t e di n two s e p a r a t e
g e n e r a l i z e dt a b l e sa s a f u n c t i o n of t e m p e r a t u r e a n d r e l a t i v e d e n s i t y 60/60 "F.
The p r e d i c t e d p r e c i s i o n a t 95% c o n f i d e n c ei s :

VCF P r e c i s i o n a t 95$ Confidence, %


Temperature 100 "F 150"F 200 "F 250 "F
Crudes B P r o d u c t s -
+0.05 .15 -25 .35

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL-L VOL*X 80 m 0732270 0526083 885 m

SECTIONV VOLUME CORRECTION


FACTORS X-219

I f t h i sp r e c i s i o ni su n a c c e p t a b l e , it i s recommended t h a tt h ea c t u a lt h e r m a l
e x p a n s i o np r o p e r t i e s of thesubstance be measuredand t h e VCF be determined
u s i n g TABLE24C with either K oralphavaluesderivedfromthe measureddata.
The i n s t r u c t i o n s f o r t h i s p r o c e d u r e a r e g i v e n i n TABLE
24C.

ABSTRACT

Subroutine Title: TAB24A - TABLE


24A, GeneralizedCrudeOils,
Volume C o r r e c t i o n t o 60 'F.

Description: Thissubroutineisdesigned to calculatethe


volume c o r r e c t i o n f a c t o r r e q u i r e d t o c o n v e r t
a volume a t an observed temperature to the
corresponding volume a t 60 O F assuming t h e
substance can be c h a r a c t e r i z e da s a crudeoil.

Program Responsibility: A m e r i c a nP e t r o l e u mI n s t i t u t e
Measurement C o o r d i n a t i o n
2101 L S t r e e t , N.W.
Washington, D.C. 20037

DateIssued: August 1980

Language: FORTRAN,
ANSI/ASA Standard

|||| |||---
Reference: API Standard 2540, TABLE
24,
11.1.24 |
|||| |||| || || |

THIS SUBROUTINE WAS DEVELOPED USING THE MATHEMATICAL


ALGORITHMS
|||| |||| | | ||

AND SPECIFICATIONS DESCRIBED IN THE DOCUMENT


PROCEDURE 11.1.24.3.
ANY MODIFICATIONS TO THIS SUBROUTINE
MUST RIGIDLY ADHERE
|

TO THE SAME ALGORITHMS AND SPECIFICATIONS.


|
| | |
--

11.1.24.2.1 Introduction

TAB24A i s a computersubroutinedesigned to calculate the volume c o r r e c -


tionfactor (VCF) necessary t o c o n v e r t a volume of a g e n e r a l i z e dc r u d e at a

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API M P M S * L L - L V O L M X 80 m 0732290 O526084 711 m

x-220 CHAPTER 11"PHYSICAL PRoPERTlES DATA

specified temperature in degrees Fahrenheit( " F ) and of a specified relative


density 60/60 "F to the equivalent volume 60
at "F. The subroutine accepts as
601'60 "F rounded to the nearest
input the relative density 0.0005 and the
0.1 "F.
observed temperature rounded to the nearest If either input value has
will round the values and return the
not been properly rounded, the subroutine
of VCF with 5 significant
corrected values. The subroutine returns one value
and another VCF value rounded to
figures of accuracy for computation purposes
four decimal places 'for printing purposes. The subroutine also outputsa
status code for user convenience. The code is set - 1to if an error condition
occurs and to +1 if the input values are outside the limitsof the correlation.
A status code of zero is returned if the input values are within the limits of
the correlation. The limits of the correlation including the extrapolated
reg ion are depicted in Figure X-11. The c a l l i n g program must check t h e flag and
provide the user with appropriate warning messages or program termination.

11.1.24.2.2 Subroutine Specifications

The range of app I i cation: Relative Density 60/60 "F Temperature, "F
0.6110 t o 0.7795 0.0 to 200.0
0.7800 t o 0.8250 0.0 to 250.0
0.8255 t o 1.0760 0.0 to 300.0

Referenced modu I es: ALPHAA, VCF24A, SDIVA, MPYA

FORTRAN fun ctions : FLOAT

Average execution time: 2200 VCF entries/CPU second


I BM 370/ 168

in ANSI/ASA FORTRAN using integer arithmetic. The


The subroutines are written
size and storage requirements are:

1. Compilable
source
statements 111
2. Decimal
storage
bytes 2786
3. Words 697
-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL-L VOL*X 80 0732290 0526085 b 5 8

SECTIONV VOLUME CORRECTION FACTORS x-221

11.1.24.2.3 C a l l i n g Sequence
--
| | |

CALLTAB24A (sG60, DEGF, VCFC,


VCFP, I FLAG)
|
|
|||| |||| | | ||

INPUTDESCRIPTION
|||| |||| || || |

SG60 - R e l a t i vdee n s i t y 60/60 O F


|
|||| |||---

(SG60 r e t u r n e d wi I I be rounded t o n e a r e s t 0.0005)

DEGF - Observed temperature, "F


(DEGF r e t u r n e d w i I I be rounded t o n e a r e s t O . 1 "F)

OUTPUTDESCRIPTION

VCFC - Output VCF rounded t o 5 s i g n i f i c a n ft i g u r e sf o rc o m p u t a t i o n a l


p ur poses
i .e. VCFC = 1 .XXXX
or VCFC = 0.XXXXX

VCFP - Output VCF rounded t o 4 d e c i m apl l a c e sf opr r i n t i n gp u r p o s e s


i .e.
VCFP = 1 .XXXX
or VCFP = 0.XXXX

IFLAG - S t a t u s Code

O: I n d i c a t e si n p u tv a r i a b l e sa r ew i t h i nt h er a n g e of a p p l i c a -
t ion

1: I n p u td a t ao u t s i d el i m i t s of c o r r e l a t i o na sg i v e ni n
1 1 e 1 024.

-1: I n d i c a t e si n p u t SG60 o ri n p u t DEGF o u t s i d er a n g eo fa p p l i -


cationasgivenin 11.1.24; VCFC and VCFP s e t t o -1.0000.

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
x-222 CHAPTER1 PHYSICAL
DATA
PROPERTIES

11.1.24.2.4 Method o f C a l c u l a t i o n

The s u b r o u t i n e e v a l u a t e s t h e e q u a t i o n

where A t = DEGF - 60.0

|||| |||---
|
|||| |||| || || |
|||| |||| | | ||
P = r e l a t i v ed e n s i t y 60/60 " F x 999.012
60

|
999.012 = d e n s i t y of water a t 60 OF, Kg/rn3

|
| | |
--
A fullexplanationoftheequations and t h ep a r a m e t e r s KO and K 1 may be
found i n A P I Standard 2540, TABLE 24, 11.1 -24.

11.1.24.2.5 Examples

Theseexamples a r et u t o r i a li nn a t u r e and a r e n o t i n t e n d e d t o be s u f f i c i e n t
f o rs u b r o u t i n ec h e c k o u t . Theexamples g i v e ni np r o c e d u r e 11.1.24.3 a r e t o be
used f o r t h e computercheckout.

Example 1
SG60 = O .8396
DEGF = 90.47
CALL
TAB24A
(SG60,
DEGF,
VCFC,
VCFP, IFLAG)
A f t e rt h ec a l l : SG60 = 0.8395
DEGF = 90.5
VCFC = .98515
VCFP = .9851
IFLAG = O

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL*L VOL*X B O m 0732290 0526087 420 m

SECTION1"VOLUME CORRECTION FACTORS X-223

Example 2
SG60 = 0.7905
DEGF = 240.0
CALL
TAB24A (SG60, DEGF,
VCFC,
VCFP, IFLAG)
Afterthe call: SG60 = 0.7905
DEGF = 240.0
VCFC = .a9925
VCFP = .8992
IFLAG = 1

Exarnp I e 3
SG60 = 0.8398
DEGF = 500.0
CALL
TAB24A (SG60, DEGF,
VCFC,
VCFP, IFLAG)
A f t e r the c a l l : SG60 = 0.8400
DEGF = 500.0
VCFC = - 1 .O000
VCFP = -1.0000
IFLAG = - 1
--
| | |
|
|
|||| |||| | | ||
|||| |||| || || |
|
|||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
x-224 CHAPTER 11"PHYSICAL PROPERTIES DATA

11.1.24.2.6 FLOWCHART

b 1

I NPUT:RELAT I VE DENS I TY 6O/6O0F


OBSERVED TEMPERATURE

ROUND I N P U T DATA
TO S P E C I F I C A T I O N

SET VCF = - 1 .O000


ERROR FLAG I ERR -1
RETURN

CALCULATE RHO

CALCULATEALPHA

CALCULATEVCF

SET ERROR
FLAG = O

I
v S E T ERROR

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL=L VOL*X B O m 0732290 052b090 TL5 m

SECTIONVOLUME
FACTORS
CORRECTION x-225

11.1.24.2.7 Subroutine Listing

TAB24A T hsi u
s b r o u t i ns e r v e s as t hi ne p u t / o u t p ruot u t i nt o
e
t h e subsequentmodulesnecessary in the calculation of
volume c o r r e c t i o n f a c t o r from r e l a t i v e d e n s i t y 60/60 "F
and observedtemperature.

Referenced Modu I es

ALPHAA T h i s module i s designed tcoa l c u l a tael p hfaoursien


d e t e r m i n a t i o no f volume c o r r e c t i o n f a c t o r .

MPYA Th i s modu l e p e r f o r m s i n t e g e r m u l t i p l i c a t ionwith a maxi-


mum o f 17 d i g i t s .
--
| | |
|

SD IVA T h i s module i s designed t o p r o d u c ea d d i t i o n a la c c u r a c y


|
|||| |||| | | ||

from an i n t e g e r d i v i d e where t h e numerator i s 10000


greater than the denominator.
|||| |||| || || |

VCF24A T h i s module i s designed t o c a l c u l a t e volume c o r r e c t i o n


|
|||| |||---

factor.

SUBROUTINE TAB24A(SG6O,DEGF,VCFC,VCFP,IFLAG) 24A0001 O


C 24A00020
C (C)COPYRIGHT 1 9 8 0 24A00030
C AMERICAN PETROLEUM INSTITUTE 24A00040
C ALLRIGHTS RESERVED 24A00050
C 24A00060
C T H I S SUBROUTINE I S AVOLUNTARYSTANDARDAND WAS DEVELOPED 24A00070
C UNDER THE AUSPICES OF THE JOINTAPI-ASTM COMMITTEE ON STATIC 24A00080
C PETROLEUM MEASUREMENT I N PART FROM DATA GENERATED 24A00090
C BY APROJECTFUNDED BY THE AMERICAN PETROLEUM 24A001 O0
C INSTITUTE AT THE U . S . NATIONAL BUREAU OF STANDARDS, 24A0011 O
C GAITHERSBURG. MARYLAND. 24A00120
C 24A00130
C INQUIRIES CONCERNING I T SA P P L I C A T I O N SHOULD 24A00140
C BE ADDRESSED TO: 24A00150
C AMERICAN PETROLEUM INSTITUTE 24A00160
C MEASUREMENT COORDINATION 24A00170
C 2 1 0 1 L STREET, N . W . 24A00180
C WASHINGTON, DC 2 0 0 3 7 24A00190

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL.L VOL*X 80 0732290 052b09L 951

X-226 CHAPTER 11"PHYSICAL PROPERTIES DATA

C 24A00200
c ............................................................ 24A0021 O
c * 8
24A00220
C * T H I S SUBROUTINE OR THE MATHEMATICALRELATIONSHIPS * 24A00230
C * REPRESENTED THEREBY MAY BE USED BY ANYONE WISHING * 24A00240
C * DOTO S O , BUT
THE AMERICAN PETROLEUM I N S T I T U T E , * 24A00250
C * THE AMERICAN SOCIETY FOR TESTING AND MATERIALS, * 24A00260
C * AND THE I N S T I T U T E OF PETROLEUM
AND THEIR * 24A00270
C * RESPECTIVE MEMBERS AND THE U . S . NATIONAL BUREAU * 24A00280
C * OF STANDARDS, SHALL NOT BE HELD RESPONSIBLE OR * 24A00290
C * L I A B L E I N ANY WAY
FROM LOSS OR DAMAGE, INCLUDING, * 24A00300
C * BUT NOT L I M I T E D CONSEQUENTIAL
TO, DAMAGE, * 24A0031 O
C * RESULTING FROM SUCH USAGE OR FOR VIOLATION OF * 24A00320
C * ANY FEDERAL, STATE, OR MUNICIPAL LAWS, REGULATIONS * 24A00330
C * OR PRACTICES OF THE UNITED STATES OR OF ANY * 24A00340
C * FOREIGN COUNTRY. * 24A00350
c * * 24A00360
c ............................................................ 24A00370
C 24A00380
C THE
THERMAL EXPANSIONPROPERTIES (VOLUME CORRECTION FACTORS, 24A00390
C VCFS) FOR
PRODUCTS (EXCLUDING LUBE STOCKS) ANDCRUDES 24A00400
C ARE CORRELATED I N TWO SEPARATE,GENERALIZEDTABLES 24A0041 O
C AS AFUNCTION OF TEMPERATURE AND RELATIVEDENSITY 6 0 / 6 0F . 24A00420
C THE PREDICTED PRECISION AT 9 5 PERCENT CONFIDENCE I S : 24A00430
C 24A00440
C VCF PRECISION AT 95 PERCENT CONFIDENCE, PERCENT 24A00450
C 24A00460
C TEMPERATURE
250F 200F 150F lOOF 24A00470
C CRUDES, PRODUCTS0 0. 3
0. 2
05
. 15
. 05 5 24A00480
C 24A00490
C I F THISPRECISION I S UNACCEPTABLE, I T I S RECOMMENDED 24A00500
C THAT THE ACTUAL THERMAL EXPANSIONPROPERTIES OF THE 24A0051 O
C SUBSTANCE BE MEASURED ANDTHE
VCF BE DETERMINED 24A00520
C USINGTABLE24CWITHEITHERK OR ALPHA VALUES DERIVED 24A00530
C FROM THE MEASURED DATA. THE INSTRUCTIONS FOR T H I S 24A00540
C PROCEDURE ARE GIVEN I N TABLE 24C. 24A00550
C 24A00560
C T H I S SUBROUTINE I S DESIGNED TOACCEPTAS 24A00570
C INPUTRELATIVEDENSITY60/60F(SG6O) AND 24A00580
C OBSERVED TEMPERATURE I N DEGREES FAHRENHEIT(DEGF) AND 24A00590
C PRODUCE THE VOLUME CORRECTION FACTOR (VCF) FOR 24A00600
C A P I TABLE 24A, GENERALIZED CRUDE O I L S 24A0061 O
C VOLUME CORRECTION FACTOR TO 6 0F . 24A00620
C 24A00630
C T H I S SUBROUTINECALLS THE FOLLOWING MODULES 24A00640
C ALPHAA (CALLSSDIVA) 24A00650
C MPYA 24A00660
C VCF24A(CALLS MPYA) 24A00670
C 24A00680
C SG60 SHOULDBE PASSED ROUNDED TO THE NEAREST 24A00690
C 0 . 0 0 0 5 . THE SUBROUTINE W I L L HOWEVER
ROUND THE 24A00700
C VALUE AND RETURNTHE CORRECTED VALUE. 24A0071 O
C 24A00720
C DEGF
SHOULD BE PASSED I N THE NEAREST TENTH 24A00730
C OF DEGREE FAHRENHEIT. THE SUBROUTINE WILL HOWEVER 24A00740
C ROUND THE VALUE AND RETURNTHE CORRECTED VALUE. 24A00750
C 24A00760

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
~~~

A P I MPMS*:LII.II VOL*X 80 H 0732290 0526072 898

SECTION 1-VOLUME CORRECTION FACTORS X-227

C VCFC I S THE
RETURNED VOLUME CORRECTION FACTOR 24A00770
C CORRECTTO FIVE(5)SIGNIFICANTFIGURES. 24A00780
C 24A00790
C VCFP I S THE
RETURNED VOLUME CORRECTION FACTOR 24A00800
C CORRECTTO FOUR(4)DECIMAL DIGITS. 24AOO81 O
C 24A00820
C I F L A G I S THE ROUNDED STATUS CODE WHICH SHOULD 24A00830
C BE CHECKED BY THE USER I N THE CALLING PROGRAM 24A00840
C =O NO ERROR 24A00850
C =1 INPUT DATA WITHIN EXTRAPOLATION RANGES AS 24A00860
C GIVEN I NA P I2 5 4 0 , TABLE 2 4 ,1 1 . 1 . 2 4 24A00870
C = - 1 INPUT DATA OUTSIDESPECIFIED RANGE OF 24A00880
C APPLICATIONASGIVEN INAPI2540, 24A00890
C TABLE 2 4 , l l .l. 2 4 24A00900
C 24A0091 O
DATA IBAS/6OO/ 24A00920
DATA IBPl,IBP2/7795,8250/ 24A00930
DATA NBPl/10760/ 24A00940
DATA ITMP1,ITMP2,ITMP3/2000,2500,3000/ 24A00950
DATA IEP1,IEP2,IEP3/1500,2000,2500/ 24A00960
DATA IESG/7585/ 24A00970
DATA IFSG/611O / 24A00980
DATA I B T 1/ O / 24A00990
DATA KO,K1/3410957,0/ 24A01 O00
C 24A01 O 1 O
IFLAG=- 1 24A01020
VCFP=-l . O000 24A01030
VCFC=-l . O000 24A01040
C 24A01050
C ROUND INPUT PARAMETERS 24A01060
C 24A01070
ISG=(SG60*100000.+25.0)/50.0 24A01080
ISG=ISG*5 24A01 O90
SG60=FLOAT(ISG)/10000. 2 4 A O l l O0
ITEMP=DEGF * 1O . 0+0 .5 24A0111 O
DEGF=FLOAT(ITEMP)/lO.O 24A01120
C 24A01130
C CHECK SPECIFICGRAVITY RANGES 24A01140
C 24A01150
IF(ISG-IFSG)10,20,20 24A01160
1 0 CONT I NUE 24A01170
RETURN 24A01180
20 I F ( I S G - N B P 1 ) 3 0 , 3 0 , 1 0 24A01190
3 0 CONTI NUE 24A01200
--

C 24A0121 O
| | |

C CHECK VALID TEMPERATURERANGES 24A01220


|

C 24A01230
|
|||| |||| | | ||

IDT=ITEMP-IBAS 24AO1240
IF(ITEMP-IBTl)40,50,50 24A01250
40 CONTINUE 24A01260
|||| |||| || || |

RETURN 24A01270
50 I F ( I S G - I B P 1 ) 6 0 , 6 0 , 7 0 24A01280
60 IF(ITEMP-ITMPl)lOO,l00,40 24A01290
|

70 I F ( I S G - I B P 2 ) 8 0 , 8 0 , 9 0 24A01300
|||| |||---

8 0 IF(IT€MP-ITMP2)lOO,l00,40 24A0131 O
9 0 IF(ITEMP-ITMP3)100,100,40 24A01320
1O0 CONTINUE 24A01330
C 24A01340

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API M P M S ~ L L . L V O L ~ X B O m O Ï J ~ Z Z Y O 0 5 2 b o w 724 m

X-228 CHAPTER 11"PHYSICAL PROPERTIES DATA

C CONVERT RELATIVEDENSITY 6 0 / 6 0 F TO DENSITY 24A01350


C I Y - DENSITY OF
WATER = 9 9 9 . 0 1 2K G / M * * 3 24A01360
C 24A01370
I X = I S G * l O00 24A01380
IY=9990120 24A01390
CALL M P Y A ( I X , I Y , I D E N ) 24A01400
IDEN= ( IDEN+5 ) / 1O 24A0141 O
C 24AO1420
C 24A01430
C CALCULATE ALPHA 24A01440
C 24A01450
CALLALPHAA(IDEN,KO,Kl,IALF) 24A01460
C 24AO1470
C CALCULATE VCF 24A01480
C 24A01490
CALL V C F 2 4 A ( I A L F , I D T , I V C F ) 24A01500
IFLAG=O 24A0151 O
C 24A01520
C CHECK
TO DETERMINE I F I N EXTRAPOLATED REGION 24A01530
C 24A01540
IF( ISG-IESG)1701 170,160 24A01550
1 6 0 CONTINUE 24A01560
IFLAG=l 24A01570
GO
TO 220 24A01580
--

170 I F ( I S G - I B P 1 ) 1 8 0 , l 8 0 . 1 9 0 24A01590
| | |

1 8 0 IF(ITEMP-IEP1)220,220,160 24A01600
|
|

190 IF(ISG-IBP2)200,200,210 24A0161 O


|||| |||| | | ||

200 IF(ITEMP-IEP2)220,220,160 24A01620


21 o IF(ITEMP-IEP3)220,220,160 24A01630
220 CONTINUE 24A01640
|||| |||| || || |

C 24A01650
C CALCULATE PRINT AND CALCULATION VALUES OF VCF 24A01660
C PRINT VALUE(PVCF)ROUNDED TO 4 DECIMAL D I G I T S 24A01670
|

C CALCULATIONVALUE(CVCF) ROUNDED
TO 5 S I G N I F I C A N TD I G I T S
|||| |||---

24A01680
C 24A01690
JVCF=(IVCF/1000+5)/10 24A01700
PVCF=JVCF 24A0171 O
PVCF=PVCF/lOOOO . 24A01720
1F(1VCF-100000000)230,240,240 24A01730
230 CONTINUE 24A01740
C 24A01750
C VCF LESS THAN ONE, F I V E DECIMALS RETURNED 24A01760
C 24A01770
JVCF=(IVCF/100+5)/10 24A01780
CVCF=JVCF 24A01790
CVCF=CVCF/lOOOOO. 24A01800
GO
TO 250 24A0181 O
240 CONTINUE 24A01820
CVCF=PVCF 24A01830
250 CONT I
NUE 24A01840
VCFC==VCF 24A01850
VCFP=PVCF 24A01860
RETURN 24A01870
END 24A01880

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I M P M S * L L = L VOL*X 80 0732270 052609LI 660 m

SECTION 1"VOLUME CORRECTION FACTORS X-229

SUBROUTINE SDIVA(INUM,IDENOM,IRES) 24A01890


24A01900
T H I S MODULE I S DESIGNED TOPRODUCE ADDITIONAL 24A0191 O
ACCURACY FROM AN INTEGER D I V I D E WHERE THE
NUMERATOR 24A01920
I S 1 0 0 0 0 GREATER THAN THE DENOMINATOR. THE SUBROUTINE 24A01930
ASSUMES PROPER SCALING OF BOTH THE INPUT NUMERATOR 24A01940
ANDDENOMINATORAND WILL RETURN THE RESULTS MULTIPLIED 24A01950
BY 1 0 0 0 0 . 24A01960
24A01970
IRESl=INUM/IDENOM 24A01980
IRES2=(INUM-IRES1*IDENOM)*lOOOO/IDENOM 24A01990
IRES=IRESl '1 0000+IRES2 24A02000
RETURN 24A0201 O
END 24A02020

SUBROUTINE ALPHAA(IRHO,KO,Kl,IALF) 24A02030


C 24A02040
C T H I S MODULE I S DESIGNED TO CALCULATEALPHA FOR 24A02050
C USE I N DETERMINATION OF VOLUME CORRECTION 24A02060
C FACTOR. 24A02070
C 24A02080
C INPUTVARIABLES 24A02090
C IRHO==DENSITY*lOO(KILOGRAMS/CUBIC METRE) 24A021 O0
C KO,Kl=COEFFICIENTS OF DESIRED CURVE * 1 0 0 0 0 24A0211 O
C 24A02120
C ALGORITHM- 24A02130
C ALPHA=KO/RHO**2+Kl/RHO 24A02140
C 24A02150
C CALCULATE K1 /RHO 24A02160
C 24A02170
INUM=K1*1 O000 24A02180
C A L LS D I V A ( I N U M , I R H O , I A L F l ) 24A02190
C 24A02200
C CALCULATE KO/RH0**2 24A0221 O
C 24A02220
INUM=KO*l O0 24A02230
CALLSDIVA(INUM,IRHO,IALFS) 24A02240
C A L LS D I V A ( I A L F S , I R H O , I A L F 2 ) 24A02250
I A L F = ( I A L F l + I A L F 2 + 5 0 0) / l o 0 0 24A02260
RETURN 24A02270
END 24A02280

SUBROUTINE V C F 2 4 A ( I A L F , I D T , I V C F ) 24A02290
C 24A02300
C T H I S MODULE I S DESIGNED TO CALCULATE VOLUME 24A0231 O
C CORRECTION FACTOR. ALTHOUGH ALL CALCULATIONS ARE DONE 24A02320
C AS INTEGERS, THE SUBROUTINE RETURNS WITHA 8 24A02330
C OR 9 D I G I T VALUE DEPENDENTUPON WHETHER I D T 24A02340
C I S POSITIVE OR NEGATIVE. 24A02350
C 24A02360
C ALGORITHM- 24A02370
C VCF=EXP(-ALPHA*DT(l.O+0.8*ALPHA*DT)) 24A02380
C 24A02390

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
. A P I MPMS*LL.L VOLXX 80 0732290 0 5 2 b 0 9 5 5 T 7

X-230 CHAPTER
1 PHYSICAL PROPERTIES
DATA

C CALCULATE ALPHA*DT 24A02400


C 24A0241 O
ITERMl=IALF*IDT 24A02420
C 24A02430
C CALCULATE 0.8 *ALPHA *DT 24A02440
C 24A02450
ITERM2=ITERMl/ *4 5 24A02460
C 24A02470
C CALCULATE EXPONENT-ALPHA*DT(l.O+0.8*ALPHA*DT) 24A02480
C 24A02490
CALL MPYA(ITERMl,ITERM2,1TERM3) 24A02500
IX=-(ITERMl+ITERM3) 24A0251 O
C 24A02520
C CALCULATE EXPONENTIAL(F1RST 7 TERMS
OF POWER SERIES) 24A02530
C 24A02540
ISUMl=l OOOOOOOO+IX 24A02550
CALL MPYA(IX,IX,ISUM2) 24A02560

|||| |||---
ISUM2=ISUM2/2 24A02570
CALL MPYA(IX,ISUM2,ISUM3) 24A02580

|
ISUM3=ISUM3/3

|||| |||| || || |
24A02590
CALL MPYA(IX,ISUM3,ISUM4) 24A02600
ISUM4=ISUM4/4 24A0261 O
CALL MPYA(IX,ISUM4,ISUM5) 24A02620

|||| |||| | | ||
ISUMS=ISUM5/5 24A02630
CALL MPYA(IX,ISUMS,ISUMG) 24A02640

|
ISUM6=ISUM6/6 24A02650

|
| | |
IVCF=ISUM1+ISUM2+ISUM3+ISUM4+ISUM5+ISUM6 24A02660
RETURN 24A02670

--
END 24A02680

SUBROUTINE MPYA(IX,IY,IZ) 24A02690


C 24A02700
C THIS MODULE PERFORMSINTEGER MULTIPLICATION. THE TOTAL 24A0271 O
C NUMBER OF DIGITS IN IX AND IY MUST NOT EXCEED 17. OTHER 24A02720
C WISE, OVERFLOW WILL OCCUR. 24A02730
C 24A02740
IU1 = IX / 10000 24A02750
K1 = 10000 * IU1 24A02760
IV1 = IX - K1 24A02770
IU2 = IY / 10000 24A02780
K2 = 10000 * IU2 24A02790
IV2 = IY - K2 24A02800
K3 = IU1 * IV2 + IU2 * IV1 + IV1 * IV2 / 10000 24A0281 O
I 2 = (K3 + 5000) / 1 O000 + IU1 * IU2 24A02820
RETURN 24A02830
END 24A02840

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
' SECTION
1-VOLUMEFACTORS
CORRECTION X-231

11.1.24.3 IMPLEMENTATION PROCEDURE FOR SUBROUTINE TAB24A

I nt o d a y ' sw o r l dt h e r ei s a rapidlydevelopingtrendto usecomputers in


c u s t o d yt r a n s f e r measurements, accounting work, p r o c e s sc o n t r o l systems, and a

|||| |||---
v a r i e t yo fo t h e ru s e s where t a b l e s mustbe i n c o r p o r a t e di n t o computercodes.

|
|||| |||| || || |
Yet many o f t h e p r i n t e d t a b l e s a r e a l m o s t i m p o s s i b l e t o code due t o t h e f a c t
t h a t someone has s l i g h t l y m o d i f i e d s e l e c t e d v a l u e s t o d i f f e r from those

|||| |||| | | ||
obtainedusingthemathematicalexpressionthatsupposedlygeneratedthe
tables. To overcome t h i s problem it i s o f t e n r e q u i r e d t o add e x t e n s i v e excep-

|
|
| | |
tiontablestothe codes. T h i s makes t h e codes l a r g e and cumbersome t o modify,

--
and r e s t r i c t s t h e i r use t ol a r g e r computersystems. A l s ow i t ht h e development
ofbetter measuringdevices it i s o f t e n p o s s i b l e t o g a i n more d i g i f - s o f p r e -
cisioninthetable p a r a m e t e r s ,n e c e s s i t a t i n gf i n e ry r i d d i n go ft h et a b u l a r
v a l u e s ,r e s u l t i n gi nl a r g e r volumes of p r i n t e d t a b l e s t o be handled.
I na d d i t i o n ,a st h eo n - l i n eu s eo fc o m p u t e r sf o rm e t e r i n gp u r p o s e s
i n c r e a s e s ,t h ed i r e c tu s eo fp r i n t e dt a b l e sw i l l decrease;therefore,the new
Standard i s an e x p l i c i ti m p l e m e n t a t i o np r o c e d u r er a t h e rt h a n a s e to f equa-
t i o n so r a s e t of t a b l e s . I t mustbe remembered t h a tt h es t a n d a r d i z a t i o no f
t h ei m p l e m e n t a t i o np r o c e d u r ei m p l i e ss t a n d a r d i z a t i o no ft h es e t of mathe-
m a t i c a le x p r e s s i o n s used w i t h i nt h e code. Absoluteadherence t ot h ep r o c e d u r e
will help t o i n s u r e t h a t a l l computersandcomputercodes o ft h ef u t u r e , meet-
i n gt h es p e c i f i c a t i o n s and r e s t r i c t i o n s , will be a b l e t o p r o d u c e t h e same
results. I t i sb e l i e v e dt h a tt h i sp r o c e d u r e will a l l o wf o r The maximum
machine and codeindependence.Theprocedure was implemented i n computer
subroutinesissued by A F ' I i n 1980 u s i n g ANSI/ASA FORTRAN. The s u b r o u t i n e s
maximized p r e c i s i o n by t h e use o f 3 2 - b i t i n t e g e r a r i t h m e t i c .
The p r o c e d u r ea sd e s c r i b e di nt h ef o l l o w i n gt e x t can,by c a r e f u l and
d e l i b e r a t ea p p l i c a t i o n o f numericalanalysis, beused w i t ht h em a j o r i t yo f
lenguages and word s i z e s i n p r e s e n t o r a n t i c i p a t e d use.To u s et h es t a n d a r d
procedure means t o m a i n t a i n a b s o l u t e and unwaveringadherence t o t h e number o f
digits specified at each s t e p and t o t h e c a l c u l a t i o n p r o c e d u r e as o u t l i n e d .
I n t h e procedure, t h en o m e n c l a t u r e used i s t h a t of ASTM E380-76, unless
an e x p l i c i t p r o c e d u r e i s g i v e n below, i n whichcasetheproceduregivenbelow
overridesthatgiven by ASTM E380-76.
I nt h ep r o c e d u r et h en o m e n c l a t u r e (XXX.XX) means f i v e (51 m a t h e m a t i c a l l y
significant digits.

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS~IIII.II VOL*X 8 0 D 0 7 3 2 2 9 0 052b097 37T m

X-232 CHAPTER 11"PHYSICAL PROPERTIES DATA

The t e r mr o u n d i n ga s used i nt h ep r o c e d u r e means: C o n s i d e ro n l yt h e


first digit to the right of the desired position and
a. I f t h a td i g i ti sg r e a t e rt h a n 4, i n c r e m e n tt h ed e s i r e dp o s i t i o n by
one and d r o p t h e r e m a i n i n g d i g i t s t o t h e r i g h t of t h e d e s i r e d p o s i -
tion.
b. I f t h a td i g i ti sl e s st h a n 5, s i m p l yd r o pt h er e m a i n i n gd i g i t s to
t h e r i g h t of t h e d e s i r e d p o s i t i o n .
A l l c o n s t a n t sa i e used t o e x a c t l y t h e number o f d i g i t s p r i n t e d .

C a l c u l a t i o nP r o c e d u r e

STEP 1: Round i n p u tv a r i a b l e so fr e l a t i v ed e n s i t y 60/60 OF and observed tem-


perature
a. Round r e l a t i v e d e n s i t y 60/60 "F t o t h e n e a r e s t
--
| | |

0.0005 and c a r r y a s 5 digit result


|
|
|||| |||| | | ||

¡.e. r e l a t i v ed e n s i t y 60/60 "F (SG60) = X.XXXX


b. Round observedtemperature t ot h en e a r e s t
|||| |||| || || |

0.1 "F and c a r r y a s 4 digit result


¡.e. observed
temperature (DEGF) = XXX.X
|
|||| |||---

STEP 2: Convers ion t o dens it y i n Ky/rn3


define p = relative density 60/60 OF * 999,012
Round p t o n e a r e s t 0.01
¡.e. p = XXXX.XX

STEP 3: Choose t h ea p p r o p r i a t ev a l u e so f KO and K 1 a sd e s c r i b e di n API Stan-


dard 2540, TABLE 24, 1 1 1.24 .
KO i s a 7 d i g i t c o n s t a n t
i .e. KO = XXX.XXXX
K1 i s a 4 d i g i t c o n s t a n t
i .e. K1 = .XXXX

STEP 4: C a l c u l a t i o no fa l p h a( c o e f f i c i e n t of thermalexpansion)

define KO + -
a = - K1
PZ

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL=L V O L X X 80 m 0732290 0526098 206 m

SECTIONV VOLUME CORRECTION FACTORS x-233

K
a( 11 Compute O= .XXXXXXXX
P

a(2) Compute -
KO'P
P
= .oooxxxxxxx

b. Evaluate K 1 -
P

K
b( 1 1 = .OOOXXXXXXX
P

c. Sum r e s u l t so fa ( 2 ) and b ( 1 ) and round t o n e a r e s t 0.0000001


I .e. a = .OOOXXXX

STEP 5: Cad'cu I a t e A t
def i ne A t = DEGF - TBASE
Note:TBASE c a r r i e d t o 3 d i g i t s XX.X (60.0)
Carry A t = XXXcX

STEP 6: C a l c u l a t i o no f VCF
d e f i n e VCF = E X P I - a A t ( l . 0 + 0.8aAt)l
= EXP[- a A t - 0.8 a2 A t 2 ]
a. C a l c u l a t i o noef x p o n e n t
a(1) a A t = .XXXXXXXX
a(2) .8 a A t = .XXXXXXXX
a(31 .8 a 2A t 2 = .OXXXXXXX
a ( 4 )- a A t - 0.8 a2 A t 2 = 0.XXXXXXXX w i t h any t r a i l i n g
d i g i t s dropped
b. C a l c u l a t i o no ef x p o n e n t i a l
VCF = EXPL- a A t - 0.8 a2 At21 = X.XXXXXX
using at least the first 7 terms of t h e power s e r i e se x p a n s i o n
o f ex

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API MPMS*LL.L VOL*X 80 0732290 0526099 L42 m

x-234 CHAPTER DATA


1 ~“PHYSICM PROPEFITES

Computat iona I - 1.XXXX rounded t o n e a r e s t 0.0001 i f VCF 1. 1


v a l u e o f VCF
..
0.XXXXX rounded t o n e a r e s t 0.00001 i f VCF < 1

T a b l ev a l u e
o f VCF = X.XXXX rounded VCF nt oe a r e s t 0.0001

The
1980 i n t e g e r FORTRAN code issued by API c o n t a i n e db o t h an i n t e g e r
d i v i s i o n and an i n t e g e rm u l t i p l i c a t i o na l g o r i t h m . A d e s c r i p t i o n of each i s
c o n t a i n e di nt h ef o l l o w i n g :

INTEGER MULTIPLICATION PROCEDURE


(FOR 32 BIT ARITHMETIC)

DATA DEFINITION

X, Y areinteger numbers t h a t a r e equal t o o r l e s s t h a n 2 * 109


( s ti g h t l yl e s st h a n Z3b. A l a r g e rv a l u e may c a u s eo v e r f l o w .I na d d i t i o n ,
thetotal number o f d i g i t s i n X and Y must n o t exceed 17, o t h e r w i s eo v e r f l o w
w i l l occur.
Z itsh pe r o d u c t XY scaled by ¡.e. Z = XY/108.
Note: I f it i s d e s i r a b l e t o o b t a i n maximum p r e c i s i o n , X and Y may be
s c a l e d up p r i o r t o use of t h e p r o c e d u r e .T y p i c a l l y ,a tl e a s t 15 d i g i t s a r e
needed t o o b t a i n 6 d i g i t p r e c i s i o n , 16 f o r 7and 17 for 8.
The l a r g e s t v a l u e s of X and Y t h a t may beused a r e 2 O00 O00 O00 and
99 999 999.
CALCULATION
x/10000 = u1
10000 U1 = K 1
X - K1 = V1
Y/1 O000 = u2
10000 U2 = K2
Y - K2 = V2
(UIV2) + (U2V1) + (V1V2/10000) = K3
(K3 + 5000)/10000 + (U1U2) = Z
Note: Z has
been scaled by
and may have t o be r e s c al e db e f o r e use.
TOTAL DIGITS I N X AND 16
Y 15 14 13 12 ” “ ”
17
DIGITS I N PRODUCT, Z 3-4 4-5 5-6 6-7 8-9
7-8

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I flPMS*33*3 V O L * X 80 0732290
O526300 794

SECTIONV VOLUME CORRECTION FACTORS x-235

INTEGER D I V I S I O N PROCEDURE
(FOR 32 BIT ARITHMETIC)

DATA DEFINITION

X, Y a r ei n t e g e r numbers such t h a t X i s equal t o o r l e s s t h a n 232 - 1


and Y i s o f o r d e r o f m a y itude lo4 l e s st h a n X.

R i st h eq u o t i e n to fs c a l e d by lo4, î.e. R = 5* 104.


Y Y
--

Note: I f i t is d e s i r a b l e t o o b t a i n maximum p r e c i s i o n , X and Y may be


| | |
|

s c a l e du pp r i o r t o u s eo ft h ep r o c e d u r e .T y p i c a l l yt h e more d i g i t s t h a t a r e
|
|||| |||| | | ||

carriedinboth X and Y, t h e more a c c u r a t e d i g i t s on output.


CALCULATION
|||| |||| || || |

X/Y = u1
= K1
|

U1Y
|||| |||---

X - K1 = V 1
V1/Y = u2
U1 * 10000 + U2 = R
Note: R hasbeen scaled by lo4 and may have t o be r e s c al e db e f o r e use.

Examples ForCheckout

The f o l l o w i n g examples aredesigned to aid in checkoutprocedures for


b o t ht h ee x i s t i n g API s u b r o u t i n e andany subroutineswhicharedevelopedusing
t h ei m p l e m e n t a t i o np r o c e d u r eo u t l i n e d above.The l i n e s of t h e examples a r e
numbered t o correspond t o t h e c o r r e s p o n d i n g l i n e s w i t h i n t h e c a l c u l a t i o n p r o -
cedure.

EXAMPLE 1 : Assume a crude o i l w i t h an i n p u tr e l a t i v ed e n s i t y 60/60 "F of


0.9054andan observedtemperatureof 105.03 "F. C a l c u l a t et h e
VCF r e q u i r e d t o c o r r e c t t h e volume t o 60 "F, c o r r e c t t o 4 decimal
digits.

STEP 1: a. rounded SG60 = 0.9055


b. rounded DEGF = 105.0

STEP 2: p rounded t o n e a r e s t 0.01 Kg/m3


P = 904.61

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*:LL=L V O L X X B O m 0732290 0526101 620 m

X-236 CHAPTER 1 1 A Y S l C A L PROPERTIES DATA

STEP 3 : KO = 34 1 .O957 ( a so f May 1 , 1980)


KI = 0.0 ( a s o f May 1, 1980)

STEP 4: a. Eva I u a t e -
KO
2
P

KO/P
a(2) = 0.0004168247
P

b. Evaluate -
K1
P

K
b(1) 1= 0.0
P

C. U = 0.0004168

STEP 5: A t = 45.0

STEP 6: C a l c u l a t i o n of VCF
a. C a l c u l a t i o noef x p o n e n t
a( 1 ) 0.01875600

|||| |||---
a(2) 0.01500480
a(3) 0.00028143
a(4) -0.01903743 |
|||| |||| || || |

b. C a l c u l a t i o no ef x p o n e n t i a l
|||| |||| | | ||

VCF = 0.981142
VCF c o r r e c t t o 4 decimal d i g i t s = 0.9811
|
|
| | |
--

EXAMPLE 2: Assume a c r u d e o i l w i t h an i n p u t r e l a t i v e d e n s i t y 60/60 OF of


0.7795 andan o b s e r v e dt e m p e r a t u r eo f 39.1 OF. C a l c u l a t et h e VCF
r e q u i r e d t o c o r r e c t t h e volume t o 60 OF, c o r r e c t t o 5 s i g n i f i c a n t
figures.

STEP 1: a. rounded 3260 = 0.7795


b. rounded DEGF = 39.1

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API MPMS*LL*L V O L * X 80 0732290 O526302 5 b 7

1-vOLUME SECTION CORRECTION FACTORS X-237

STEP 2: p rounded t on e a r e s t 0.01


Kg/m3
P = 778.73

STEP 3: KO = 341.0957 ( a s of May 1, 1980)


K1 = 0.0 ( a s o f May 1, 1980)

STEP 4 : a. Eva I u a t e -
KO
PZ

K
a(1) 2= 0.43801535
P

a(2) -
KO/P
P
= 0.0005624740

b. Evaluate K 1 -
P

b(1) -
K1 = 0.0
P
C. CC = 0.0005625

STEP 5 : A t = -20.9

STEP 6 :C a l c u l a t i o n of VCF
a. C a l c u l a t i o n of exponent
|||| |||---

a(1) -0.01175625
|
|||| |||| || || |

a( 2 1 -0 .O0940500
a(3) 0.0001 IO56
|||| |||| | | ||

a(4) 0.01 164569


b. C a l c u l a t i o noef x p o n e n t i a l
|
|
| | |

VCF = 1.011713
--

VCF c o r r e c t t o 5 s i g n i f i c a n t f i g u r e s 1.0117

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
X-238 CHAPTER
1 PHYSICAL PROPERTIES
DATA

EXAMPLE 3: Assumea c r u d e o i l w i t h an i n p u t r e l a t i v e d e n s i t y 60/60 "F of


1.0093 andan observedtemperature o f 269.4 OF. C a l c u l a t et h e
VCF r e q u i r e d t o c o r r e c t t h e volume t o 60 OF, c o r r e c t t o 5 s i g n i f -
icantfigures.
--

STEP 1 : a. rounded SG60 = 1 .O095


| | |

b. rounded DEGF = 269.4


|
|
|||| |||| | | ||

STEP 2: p rounded t o n e a r e s t 0.01 Kg/m3


|||| |||| || || |

p = 1008.50
|
|||| |||---

STEP 3: KO = 341.0957 ( a s of May 1, 1980)


K1 = 0.0 ( a s o f May 1, 1980)

STEP 4: a. E v a l u a t e KO -2
P

K
a( 1 1= O .33822082
P
KOh
a(2) = 0.0003353702
P

b. Eva I u a t e K 1 -
P

b(1) - P
= 0.0

C. ~1 = 0.0003354

STEP 5: A t = 209.4

STEP 6: C a l c u l a t i o n o f VCF
a. C a l c u l a t i o n o f exponent
a( 1 ) 0.07023276
a(2) 0.05618620
a(3) 0.0039461 1
a(4) -0.07417887

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
SECTION
X-239 FACTORS
VOLUME CORRECTION

b. C a l c u l a t i o n of e x p o n e n t i a l
VCF = .928505

VCF c o r r e c t t o 5 s i g n i f i c a n t f i g u r e s = 0.92851

1 1.1.24.4 TABLE 24B-GENERALIZED PROP The volume correction factorsgiven in this table are
UCTS, CORRECTION OF VOLUME TO based on data from the U.S. National Bureau of Stan-
60°F AGAINST RELATIVE DENSITY dards and from other published data. Portions of the
60/60"F temperature ranges represent areasbeyond these data.
Thus, mathematical techniques were employed to ex-
trapolate beyond the temperature ranges of the given
TABLE 24B gives volume correction factors for con- data to determine the volume correction factor for these
vertingproduct volumes observed at temperatures areas. These factors are denoted by an asterisk (*).
other than 60°F to corresponding volumes at 60°F. Extension of this table beyond the ranges shown is not
The volume correction factors given in this table are recommended.
the result of a computer procedure which is the Stan- Increments used in this table for determiningvolume
dard (see11.1.24.5 and 11.1.24.6).All of these volumes correction factors are05°F and 0.0020 relative density.
are at saturation conditions. Pressure correctionsfrom Interpolation between either temperature or relative
saturation are not included. density is not intended since there is no practical meth-
The temperature ranges of this table are: od of interpolation that will produce the accuracy ob-
tainable from the Standard.
Relative
Density 60/60"F "F
0.8250 to 1.0760 O to 300 This table must be entered with a known rela-
0.7795 to 0.8250 O to 250 tive density 60/60"F and withan observed tem-
0.6535 to 0.7795 o to 200 perature.

11.1.24.5 PROGRAM DOCUMENTATION FOR SUBROUTINE TAB24B-


GENERALIZED PRODUCTS, CORRECTION OF VOLUME TO 60°F
AGAINST RELATIVE DENSITY 60160°F

The t h e r m a le x p a n s i o np r o p e r t i e s( v o l u m ec o r r e c t i o nf a c t o r s , VCF's) for


p r o d u c t s( e x c l u d i n gl u b es t o c k s ) and c r u d e sa r ec o r r e l a t e di nt w os e p a r a t e
g e n e r a l i z e dt a b l e sa s a f u n c t i o no ft e m p e r a t u r e and r e l a t i v e d e n s i t y 60/60 "F.
The p r e d i c t e d p r e c i s i o n a t 95% c o n f i d e n c e i s :
|||| |||---

VCF P r e c i s i o n a t 95% Confidence, $


Temperature 100 "F 150 "F 200 "F 250 "F
|
|||| |||| || || |

Crudes B Products -
+0.05 .15 2 5 .35
|||| |||| | | ||

I f t h i sp r e c i s i o ni su n a c c e p t a b l e , i t i s recommended t h a tt h ea c t u a lt h e r m a l
e x p a n s i o np r o p e r t i e so ft h es u b s t a n c e be measuredand t h e VCF be determined
|
|
| | |
--

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL.L VOL*X 80 m 0732290052bL0527b

u s i n g TABLE24C with either K or a l p h a v a l u e s d e r i v e d f r o m t h e measureddata.


The i n s t r u c t i o n s for t h i s p r o c e d u r e a r e g i v e n i n TABLE
24C.

ABSTRACT

Subroutine Title: TAB24B - TABLE24B, Generalized Products,


Volume C o r r e c t i o n t o 60 OF.

Description: Thissubroutineisdesignedtocalculatethe
volume c o r r e c t i o n f a c t o r r e q u i r e d t o c o n v e r t
a volume a t an observed temperature to the
corresponding volume a t 60 "F assuming t h e
substance canbe c h a r a c t e r ¡zedas a product.

P r o g r a mR e s p o n s i b i l i t y :A m e r i c a nP e t r o l e u mI n s t i t u t e
Measurement C o o r d i n a t i o n
2101L S t r e e t , N.W.
Washington, D.C. 20037

Date I ssued: August 1980

Language: FORTRAN, ANSI/ASA Standard

Reference: API Standard 2540, TABLE 24,11.1.24

THIS SUBROUTINE WAS DEVELOPED USING THEMATHEMATICALALGORITHMS


AND SPECIFICATIONS DESCRIBED I N THE DOCUMENT PROCEDURE 11.1.24.6.
ANY MODIFICATIONS TO THIS SUBROUTINE
MUST RIGIDLY ADHERE
TO
THE SAME ALGORITHMS AND SPECIFICATIONS.

11.1.24.5.1 Introduction

TAB24B i s a computersubroutinedesigned to calculate the volumecor-


r e c t i o nf a c t o r (VCF) necessary t o c o n v e r t a volume o f a g e n e r a l i z e dp r o d u c ta t
a s p e c i f i e dt e m p e r a t u r ei nd e g r e e sF a h r e n h e i t (OF) and o f a r e l a t i v e d e n s i t y

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL-L VOL*X 80 m 0732290 052bLOb LO2 m

SECTION 1"VOLUME CORRECTION FACTORS X-241

60/60 "F t o t h e e q u i v a l e n t volume a t 60 "F. The s u b r o u t i n ea c c e p t sa si n p u t


the relative density a t 60/60 "F rounded to t h e n e a r e s t 0.0005 and t h e observed
temperature roumded t o t h e n e a r e s t 0.1 "F. I f e i t h e ri n p u tv a l u e has n o t been
p r o p e r l y rounded, t h es u b r o u t i n e w i l l r o u n dt h ev a l u e s and r e t u r n t h e c o r r e c -
tedvalues. The s u b r o u t i n er e t u r n s one v a l u eo f VCF w i t h 5 s i g n i f i c a n t f i g -
uresofaccuracyforcomputationpurposes and another VCF valuerounded to
f o u rd e c i m a lp l a c e sf o rp r i n t i n g purposes.The s u b r o u t i n ea l s oo u t p u t s a
s t a t u s code foruserconvenience. The code i s s e t t o -1 i f an e r r o r c o n d i t i o n
occurs and t o +1 i f t h ei n p u tv a l u e sa r eo u t s i d et h el i m i t s of t h e c o r r e l a t i o n .
A s t a t u s code o fz e r oi sr e t u r n e d i f t h ei n p u tv a l u e sa r ew i t h i nt h el i m i t so f
t h ec o r r e l a t i o n . The l i m i t so ft h ec o r r e l a t i o ni n c l u d i n gt h ee x t r a p o l a t e d
r e g i o na r ed e p i c t e di n Figure X-13. The c a l l i n g programmustcheck t h ef l a g and
providetheuserwithappropriatewarning messages o r programtermination.

11.1.24.5.2 SubroutineSpecifications

The
range o f app I ¡ c aito nR: e l a t i v e
Density 60/60 "F Temperature, "F
O. 6535 t o O. 7795 0.0 t o 200.0
0.7800 t o 0.8250 0.0 t o 250.0
0.8255 t o 1 .O760 0.0 t o 300.0

Referenced modu I es: ALPHAB,


VCF24B,
SDIVB, WYB

FORTRAN f u n c tions : FLOAT |||| |||---


|
|||| |||| || || |

Averageexecu t i o nt i m e : 1790 VCF entries/CPU


second
I BM 370/ 168
|||| |||| | | ||

The s u b r o u t i n e sa r ew r i t t e ni n ANSI/ASA FORTRAN u s i n gi n t e g e ra r i t h m e t i c . The


|
|
| | |

s i z e and s t o r a g e r e q u i r e m e n t s a r e :
--

1. Compilable
source
statements 136
2. Decimal
storage
bytes 3054
3. Words

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API MPMS*33-3 V O L * X 80 0732290 O526307 049 U

X-242 CHAPTER
1 P PHYSICAL PROPERTIES
DATA

11.1.24.5.3 C a l l i n g Sequence

CALL
TAf324B
(SG60, DEGF, VCFC,
VCFP, IFLAG)

INPUTDESCRIPTION

SG60 - R e l a t i v e dens i t y a t 6 0 / 6 0 "F


(SG60 r e t u r n e d w i l l be rounded t o n e a r e s t 0.0005)

DEGF - Observed
temperature, "F
(DEGF r e t u r n e d wi I I be rounded t o n e a r e s t O . 1 "F)

OUTPUT DESCRIPTION

VCFC - Output VCF rounded t o 5 s i g n i f i c a n ft i g u r e sf o cr o m p u t a t i o n a l


purposes
i .e. VCFC = 1 .XXXX
or VCFC = 0.XXXXX

VCFP - Output VCF rounded t o 4 d e c i m apl l a c e sf o p


r r i n t i n gp u r p o s e s
¡.e. VCFP = 1.XXXX
or VCFP = O .XXXX

IFLAG - S t a t u s Code

O: I n d i c a t e si n p u tv a r i a b l e sa r ew i t h i nt h er a n g eo fa p p l i c a -
tion.

1: I n p u td a t ao u t s i d el i m i t so fc o r r e l a t i o n as g i v e ni n
11.1.24.

-1: I n d i c a t e si n p u t SG60 o ri n p u t DEGF o u t s i d er a n g eo fa p p l i -


c a t i o na sg i v e ni n 11.1.24; VCFC and VCFP s e t t o -1.0000.

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I M P M S * L L - L VOL*X 80 0732290 052bLOB T85 m

SECTION VOLUME
FACTORS
CORRECTION x-243

11.1.24.5.4 Method o f C a l c u l a t i o n

The s u b r o u t i n e e v a l u a t e s t h e e q u a t i o n

VCF = EXPI- "60 A t ( l . 0 + 0.8 "60 A t ) 1

where A t = DEGF - 60.0

"60 -
- -+-
KO K1
'60
'60

p = r e 1a t i v ed e n s i t y 60/60
"F * 999.012
60

999.012 = densityofwaterat 60 OF, Kg/m3

A f u l le x p l a n a t i o no ft h ee q u a t i o n s and theparameters KO and K 1 may be


found i n A P I Standard 2540, TABLE 24, 11.1.24.

11.1.24.5.5 Examples

Theseexamples a r et u t o r i a l i n n a t u r e and a r en o ti n t e n d e d t o be s u f f i c i e n t
f o rs u b r o u t i n ec h e c k o u t . The examplesgiven i n procedure 11.1.24.6 a r et o be
used f o r t h e computercheckout.

Example 1
SG60 = O .8396
DEGF = 90.47
CALL
TAB24B
(SG60, DEGF,
VCFC,
VCFP, IFLAG)
A f t e rt h ec a l l : SG60 = 0.8395
DEGF = 90.5
VCFC = .98561
VCFP = .9856
I FLAG = O

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
Exarnp I e 2
SG60 = O ,8899
DEGF = 270.0
CALL
TAB246
(SG60, DEGF, VCFC, VCFP, IFLAG)
A f t e rt h e call: SG60 = 0.8900
DEGF = 270.0
VCFC = .go658
VCFP = .9066
IFLAG = 1

Example 3
SG60 = 0.7660
DEGF = 500.0
CALL
TAB24B
(SG60, DEGF,
VCFC,
VCFP, IFLAG)
A f t e rt h e call: SG60 = 0.7660
DEGF = 500.0
VCFC = -1.0000
VCFP = -1,0000
IFLAG = - 1
--
| | |
|
|
|||| |||| | | ||
|||| |||| || || |
|
|||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
SECTIONVOLUME CORRECTION FACTORS X-245

11.1.24.5.6 FLOWCHART

ROUND INPUT DATA


TO SPECIFICATION

SET VCF = 1 .O000 -


No > ERROR FLAG I ERR = - 1
RETURN

YES

V
CHOOSE APPROPRIATE
VALUES OF KO AND K,

V
CALCULATE RHO
--
| | |

CALCULATE
ALPHA
|

I
|
|||| |||| | | ||

WCALCULATE
VCF
|||| |||| || || |
|
|||| |||---

SET ERROR SET ERROR


FLAG = O FLAG = 1

I
I I

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL-L V O L * X 80 m 0732290 052bLLL 57T m

X-246 1 PHYSICAL PROPERTIES


CHAPTER DATA

11.1.24.5.7 Subroutine Listing

TA6246 T hsi su b r o u t i naec t u a lsl ye r v e s as t hi nep u t / o u t pruotu -


tine to the subsequentmodulesnecessary inthecalcula-
tion of volume c o r r e c t i o n f a c t o r f r o m r e l a t i v e d e n s i t y a t
60/60 "F andobservedtemperature.

ReferencedModules

ALPHAB T h i s module i s designed tcoa l c u l a tael p hfao r use i n


d e t e r m i n a t i o no f volume c o r r e c t i o n f a c t o r .

MPY 6 T h i s module p e r f o r m s i n t e g e r m u l t i p l i c a t i o n w i t h a maxi-


mum o f 17 d i g i t s .

SD IV6 T h i s module i s designed t o p r o d u c ea d d i t i o n a la c c u r a c y


from an i n t e g e r d i v i d e where thenumerator i s 10000
g r e a t e rt h a nt h ed e n o m i n a t o r .

VCF24B T h i s module i s designed t o c a l c u l a t e volume c o r r e c t i o n


factor.

SUBROUTINE TAB24B(SG60,DEGF,VCFC,VCFP,IFLAG) 2480001O


C 24800020
C (C)COPYRIGHT 1 9 8 0 24800030
C AMERICAN PETROLEUM I N S T I T U T E 24800040
C ALLRIGHTS RESERVED 24800050
C 24800060
C T H I S SUBROUTINE I S A VOLUNTARYSTANDARDAND WAS DEVELOPED 24800070
C UNDER THE AUSPICES OF THE JOINTAPI-ASTM COMMITTEE ON STATIC 24800080
C PETROLEUM MEASUREMENT I N PART FROM DATA GENERATED 24800090
|||| |||---

C BY A PROJECT FUNDED BY THE AMERICAN PETROLEUM 248001 O0


C I N S T I T U T E AT THE U . S . NATIONAL BUREAU OF STANDARDS, 248001 1 O
|
|||| |||| || || |

C GAITHERSBURG, MARYLAND. 248001 20


C 24800130
C I N Q U I R I E S CONCERNING I T SA P P L I C A T I O N SHOULD 248001 40
C BEADDRESSED TO:
|||| |||| | | ||

248001 50
C AMERICAN PETROLEUM INSTITUTE 24B00160
C MEASUREMENT COORDINATION 24800170
|

C 2101 L STREET, N.W. 248001 80


|
| | |

C WASHINGTON, DC 20037 248001 90


--

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API MPMS*LL-L VOL*X 80 m 0732290 052bLL2 40b

SECTION1"VOLUME CORRECTION
FACTORS X-247

C 24B00200
c .............................................................. 2480021 O
c * * 24800220
C * T H I S SUBROUTINE OR THE MATHEMATICAL RELATIONSHIPS * 24800230
C * REPRESENTED THEREBY MAY BE USED BY ANYONE WISHING 9 24800240
C * DOTO SO, BUT
THE AMERICAN PETROLEUM I N S T I T U T E , * 24800250
C * THE AMERICAN SOCIETY FOR TESTING AND MATERIALS, * 24800260
C * THE
AND INSTITUTE OF PETROLEUM
AND THEIR * 24800270
C * RESPECTIVE MEMBERS AND THE U . S . NATIONAL BUREAU * 24800280
C * OF STANDARDS, SHALL NOT HELD BE
RESPONSIBLE OR * 24800290
C * L I A B L E I N ANY
WAY
FROM LOSS OR DAMAGE, INCLUDING, * 24800300
C * BUTNOT LIMITEDTO, CONSEQUENTIAL DAMAGE, 8
2480031 O
C * RESULTING FROM SUCH USAGE OR FOR VIOLATION OF * 24800320
C * ANY FEDERAL, STATE, OR MUNICIPAL LAWS, REGULATIONS * 24800330
C * OR PRACTICES OF THE UNITED STATES OR OF ANY * 24800340
C * FOREIGN COUNTRY. * 24800350
c * * 24800360
c ............................................................. 24B00370
C 24800380
C THETHERMAL EXPANSIONPROPERTIES (VOLUME CORRECTION FACTORS, 24800390
C VCFS) FORPRODUCTS (EXCLUDING LUBE STOCKS) AND
CRUDES 24800400
C ARE CORRELATED I N TWO SEPARATE, GENERALIZEDTABLES 2480041 O
C AS
A FUNCTION OF
TEMPERATUREAND RELATIVEDENSITY60/60F. 24800420
C THE PREDICTED PRECISION AT 9 5 PERCENT CONFIDENCE I S : 24800430
C 24800440
C VCF PRECISION AT 9 5 PERCENT CONFIDENCE, PERCENT 24800450
C 24800460
C TEMPERATURE
1OOF 250F 200F 150F 24800470
C CRUDES, PRODUCTS 0 . 0 5 00.0.3.25155 24800480
C 24800490
C I F THISPRECISION I S UNACCEPTABLE, I T I S RECOMMENDED 24800500
C THAT THE ACTUAL THERMAL EXPANSIONPROPERTIES OFTHE 24B0051 O
C SUBSTANCE BE MEASURED ANDTHE
VCF BE DETERMINED 24800520
C USING TABLE 24CWITHEITHER K OR ALPHA VALUES DERIVED 24800530
C FROM THE MEASURED DATA. THE INSTRUCTIONS FOR T H I S 24800540
C PROCEDURE ARE GIVEN I N TABLE 2 4 C . 24800550
C 24800560
C T H I S SUBROUTINE I S DESIGNED TOACCEPTAS 24800570
C INPUTRELATIVEDENSITY60/60F(SG6O) AND 24800580
C OBSERVED TEMPERATURE I N DEGREES FAHRENHEIT(DEGF) AND 24800590
C PRODUCE THE VOLUME CORRECTION FACTOR(VCF) FOR 24800600
C A P I TABLE 2 4 8 , GENERALIZED PRODUCTS 2480061 O
C VOLUME CORRECTION TO 6 0F . 24800620
C 24800630
C T H I S SUBROUTINE CALLS THE FOLLOWING MODULES 24B00640
C ALPHA8 (CALLSSDIVB) 24800650
C MPYB 24800660
C SDIVB 24600670
C VCF24B(CALLS MPYB) 24800680
C 24800690
C SG60 SHOULD BE PASSED ROUNDED TO
THENEAREST 24B00700
C 0 . 0 0 0 5 . THE SUBROUTINE WILL HOWEVERROUND
THE 2480071 O
C VALUE ANDRETURNTHECORRECTED VALUE. 24800720
C 24800730
C DEGF
SHOULD BE PASSED IN THE NEAREST TENTH 24800740
C OF
DEGREE FAHRENHEIT. THE SUBROUTINE WILL HOWEVER 24800750
C ROUND THE VALUE ANDRETURNTHECORRECTED VALUE. 24800760
C 24800770

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
x-248 DATA
CHAPTER1 P PHYSICAL PROPERTIES

C VCFC I S THE
RETURNED VOLUME CORRECTION FACTOR 24800780
C CORRECTTO F I V E ( 5 )S I G N I F I C A N T FIGURES. 24800790
C 24800800
C VCFP I S THE
RETURNED VOLUME CORRECTION FACTOR 2480081O
C CORRECTTO FOUR(4)DECIMALDIGITS. 24800820
C 24800830
C I F L A G I S THE ROUNDED STATUS CODE WHICH SHOULD 24800840
C BE CHECKED BY THEUSER I N THE CALLING PROGRAM 24800850
C =O NOERROR 24800860
C =1 INPUT DATA WITHIN EXTRAPOLATION RANGES AS 24800870
C GIVEN I NA P I2 5 4 0 , TABLE 2 4 , 1 1 . 1 . 2 4 24800880
C =-1 INPUT DATA OUTSIDESPECIFIED RANGE OF 24800890
C APPLICATIONASGIVEN INAPI2540, 24800900
C TABLE 2 4 , l I . I , 2 4 2 4 8 0 0 9 1O
C 24800920
DATA NBP1,NBP2,NBP3,NBP4/7710,7885,8400,10760/ 24800930
DATA IBPl,IBP2/7790,8250/ 24800940
DATA ITMP1,ITMP2,ITMP3/2000,2500,3000/ 24800950
DATA IEP1,IEP2,IEP3/1500,2000,2500/ 24800960
DATA IBT1/ O / 24800970
DATA IBAS/6OO/ 24800980
DATA IFSG/6535/ 24800990
C 24801 O00
C COEFFICIENTS FOR DIESELS,HEATINGOILS AND FUEL O I L S 24801 O 1 O
C 24801 020
DATA KOF , K1 F / 1 0 3 8 7 2 0 , 2 7 0 1/ 24801 030
C 24801 040
C COEFFICIENTS FOR JETFUELS, KEROSENES, AND SOLVENTS 24801 0 5 0
C 24801 060
DATA KOJ , K 1 J / 3 3 0 3 0 1 0, O / 24801 070
C 24801 080
C COEFFICIENTS FOR TRANSITION BETWEEN JETS AND GASOLINES 24801 O90
C 248011 O0
DATA K O T , K l T / 1 4 8 9 0 6 7 0 , - 1 8 6 8 4 0 / 24801 11O
C 24801120
C COEFFICIENTS FOR GASOLINES AND NAPHTHENES 24801 130
C 24801 140
DATA K O G , K l G / 1 9 2 4 5 7 1 , 2 4 3 8 / 24801 150
C 24801 160
VCFP=- 1 . O000 24801 170
VCFC=- 1 . O000 24801 180
IFLAG=- 1 24801 190
C 24801 200
C ROUND INPUT PARAMETERS 24801 21O
C 24801 220
ISG=(SG60*100000.0+25.0)/50.0 24801230
ISG=ISG*5 24801240
SGSO=FLOAT(ISG)/lOOOO. 24801250
ITEMP=DEGF*l O . O+O. 5 24801 260
DEGF=FLOAT(ITEMP)/lO.O 24801 270
IDT=ITEMP-IBAS 24801280
C 24801 290
C CHECK SPECIFICGRAVITY RANGES 24801 300
C 24801 31 O
IF(ISG-IFSG)10,20,20 24801320
1 0 CONT I
NUE 24801 330
RETURN 24801340
C 24801350

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
SECTIONVOLUME CORRECTION FACTORS X-249

C DEFINE CURVE COEFFICIENTS 24801 360


C 24801 370
2 0I F ( I S G - N B P 1 ) 3 0 , 4 0 , 4 0 24801 380
30 KO=KOG 24801 390
K1=K1 G 24801 400
GO TO 80 24801 41 O
4 0I F ( I S G - N B P 2 ) 5 0 , 5 0 , 6 0 24801 420
50 KO=KOT 24801 430
K1=K1 T 24801 440
GO TO 8 0 24801 450
6 0I F ( I S G - N B P 3 ) 7 0 , 7 5 , 7 5 24801 460
70 KO=KOJ 24801470
K1 =K1 J 24801 480
GO TO 80 24801 490
7 5I F ( I S G - N B P 4 ) 7 8 , 7 8 , 1 0 24801 500
78 KO=KOF 24801 51 O
K1=K1 F 24801 520
80 CONTINUE 24801 530
C 24801 540
C CHECK V A L I D TEMPERATURE
RANGES 24801 550
C 24801 560
I F ( I T E M P ) 9 0110 0 , 1 0 0 24B01570
90 CONTINUE 24801580
RETURN 24801 590
1 0 0I F ( I S G - I B P l ) l l O , l l 0 , 1 2 0 24801 600
1 1 0 IF(ITEMP-ITMP1)150,150,90 24801 61 O
1 2 0I F ( I S G - I 8 P 2 ) 1 3 0 , 1 3 0 , 1 4 0 24801 6 2 0
1 3 0 IF(ITEMP-ITMP2)150,150,90 24801 630
1 4 0 IF(ITEMP-ITMP3)l50,150,90 24801640
1 5 0 CONTINUE 24801 650
24801 660
C 24801 670
C CONVERT RELATIVE
DENSITY 6 0 / 6 0 F TO DENSITY 24801680
C I Y - DENSITY OF
WATER = 9 9 9 . 0 1K
2G/M**3 24801 690
C 24801 700
I X = I S G * l O00 24801 71 O
IY=9990120 24801 720
CALL M P Y B ( I X , I Y , I D E N ) 24801 730
IDEN=(IDEN+5)/10 24801 740
I RHO= I DEN 24801 750
C 24B01760
C CALCULATE ALPHA 24801 770
C 24801 780
IF(KO.NE.KOT)GO TO 1 5 5 24801 790
C 24801 800
C CALCULATE ALPHA I N TRANSITION ZONE 24801 81O
C 24801 820
CALLSDIVB(KO,IRHO,IRES) 24801 830
IRES=IRES*l O 24801 840
CALL S D I V B ( I R E S , I R H O , I A L F 1 ) 24801 850
IALFl=(IALF1+5)/10 24801 860
IALF=(IALFl+K1+5)/10 24801 870
GO TO 1 5 8 24801 880
155 CALL A L P H A B ( I R H O , K O , K l , I A L F ) 24801 890
C 24801 900
C CALCULATE VCF 24801 9O 1
C 24801 920

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL.L VOL*X 80 m 0732290 052bLL5 L15 m

x-250 1 PHYSICAL PROPERTIES


CHAPTER DATA
--

1 5 8 CONT INUE 24801 930


| | |

CALL V C F 2 4 B ( I A L F , I D T , I V C F ) 24801940
|
|

IF LAG=O 24801 950


|||| |||| | | ||

C 24801 960
C CHECK
TO DETERMINE I F I N EXTRAPOLATED REGION 24801 970
C 24801980
|||| |||| || || |

IF(ISG-I8Pl)l6O,l60,170 24801 990


160 IF( ITEMP-IEP1 )200,200,165 24802000
165 I F LAG=1 2480201O
|

24802020
|||| |||---

GO TO 2 0 0
170 I F ( I S G - I 8 P 2 ) 1 8 O , l 8 0 , 1 9 0 24802030
1 8 0 IF(ITEMP-IEP2)200,200,165 24802040
1 9 0 IF(ITEMP-IEP3)200,200,165 24802050
200 CONTINUE 24802060
C 24802070
C CALCULATE PRINT AND CALCULATIONVALUES OF VCF 24802080
C PRINTVALUE(PVCF) ROUNDED
TO 4DECIMAL DIGITS 24802090
C CALCULATIONVALUE(CVCF) ROUNDED TO 5 S I G N I F I C A N TD I G I T S 248021 O0
C 248021 1O
JVCF=(IVCF/1000+5)/10 248021 20
PVCF=JVCF 248021 30
PVCF=PVCF/ 1 0000. 248021 40
1F(1VCF-100000000)210,220,220 2 4 8 0 2 1 50
21 o CONT I
NUE 24802160
C 24802170
C VCF LESS THAN ONE, F I V E DECIMALS RETURNED 24802180
C 24802190
JVCF=(IVCF/100+5)/10 24802200
CVCF=JVCF 2480221O
CVCF=CVCF/lOOOOO. i
24802220
GO TO 250 24802230
220 CONT I
NUE 24802240
CVCF=PVCF 24802250
250 CONTINUE 24802260
VCFC=CVCF 24802270
VCFP=PVCF 24802280
RETURN 24802290
END 24802300

SUBROUTINE SDIVB(INUM,IDENOM,IRES) 2480231O


C 24802320
C T H I S MODULE I S DESIGNED TOPRODUCE ADDITIONAL 24802330
C ACCURACY FROMAN INTEGER D I V I D E WHERE THE
NUMERATOR 24802340
C I S 1 0 0 0 0 GREATER
THANTHE DENOMINATOR. THE SUBROUTINE 24802350
C ASSUMES PROPER SCALING OF BOTHTHE INPUT NUMERATOR 24802360
C AND DENOMINATOR AND W I L L RETURNTHE RESULTS MULTIPLIED 24802370
C BY 1 0 0 0 0 . 24802380
C 24602390
IRESl=INUM/IDENOM 24602400
IRES2=(INUM-IRES1*IDENOM)*lOOOO/IDENOM 2480241O
IRES=IRESl *1 0000+IRES2 24802420
RETURN 24802430
END 24802440

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I M P M S * L L - L VOL*X 80 m 0732290 052bLLb 051 m

SECTIONVOLUME
FACTORS
CORRECTION X-251

SUBROUTINE A L P H A B ( I R H O , K O , K l , I A L F ) 24802450
C 24802460
C T H I S MODULE I S DESIGNED TO CALCULATE ALPHA FOR 24802470
C USE I N DETERMINATION OF VOLUME CORRECTION 24802480
C FACTOR. 24802490
C 24802500
C INPUTVARIABLES 2480251O
C IRHO=DENSITY*100(KILOGRAMS/CUBIC METRE) 24802520
C KO,Ki=COEFFICIENTS OF DESIRED CURVE * 1 0 0 0 0 24802530
C 24802540
C ALGORITHM- 24802550
C ALPHA=KO/RH0**2+Kl/RHO 24802560
C 24802570
C CALCULATE K1 /RHO 24802580
c 24802590
INUM=Kl * 1 O000 24802600
CALL S D I V B ( I N U M , I R H O , I A L F 1 ) 2480261O
C 24802620
C CALCULATE KO/RH0**2 24802630
C 24802640
INUM=K0*100 24802650
CALL S D I V B ( I N U M , I R H O , I A L F S ) 24802660
CALL S D I V B ( I A L F S , I R H O , I A L F 2 ) 24802670
I A L F = ( I A L F l + I A L F 2 + 5 0 0 )/i000 24802680
RETURN 24802690
END 24802700

SUBROUtINE V C F 2 4 B ( I A L F , I D T , I V C F ) 2480271O
C 24802720
C T H I S MODULE I S DESIGNED TO CALCULATE VOLUME 24802730
C CORRECTION FACTOR. ALTHOUGH ALL CALCULATIONS ARE DONE 24802740
C AS INTEGERS, THE SUBROUTINE RETURNS WITHA 8 24802750
C OR 9 D I G I T VALUE DEPENDENT
UPONWHETHER IDT 24802760
C I S POSITIVE OR NEGATIVE. 24802770
C 24802780
C ALGORITHM- 24802790
C VCF=EXP(-ALPHA*DT(l.O+0.8*ALPHA*DT)) 24802800
C 2480281O
C CALCULATE ALPHA*DT 24802820
C 24802830
ITERMl=IALF*IDT 24802840
C 24802850
C CALCULATE 0 . 8 *ALPHA
*DT 24802860
C 24802870
ITERM2=ITERM1/5*4 24802880
C 24802890
C CALCULATE EXPONENT-ALPHAQDT(1.0+O.8*ALPHA*DT) 24802900
C 2 4 8 0 2 9 1O
CALL MPYB(ITERMl,ITERM2,1TERM3) 24802920
I X = - ( ITERM1 +ITERM3) 24802930
C 24802940
C CALCULATE EXPONENTIAL(F1RST 7 TERMS
OFPOWER SERIES) 24802950
ISUM2=ISUM2/2 24802960
C 24802970
ISUM1=100000000+IX 24802980
CALL M P Y B ( I X , I X , I S U M 2 ) 24802990

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I M P M S * L L ~ L VOLtX 80 W 0732290 052bLL7 T98 W

X-252 1 P PHYSICAL PROPERTIES


CHAPTER DATA

ISUM2=ISUM2/2 24803000
CALL MPYB(IX,ISUM2,ISUM3) 2480301 O
ISUM3=ISUM3/3 24803020
CALL MPYB(IX,ISUM3,ISUM4) 24803030
ISUM4=ISUM4/4 24803040
CALL MPYB(IX,ISUM4,ISUM5) 24803050
ISUMS=ISUM5/5 24803060
CALL MPYB(IX,ISUM5,ISUM6) 24803070
ISUM6=ISUM6/6 24803080
IVCF=ISUMl+ISUM2+ISUM3+ISUM4+ISUM5+ISUM6 24803090
RETURN 248031 O0
END 248031 1 O
SUBROUTINE MPYB(IX,IY,IZ) 246031 20
C 248031 30
C THISMODULEPERFORMS INTEGER MULTIPLICATION.THETOTAL 248031 40
C NUMBER OF DIGITS IN IX AND IY MUST NOT EXCEED 17. OTHER 248031 50
WISE,
C OVERFLOW WILL OCCUR. 248031 60
C 248031 70
IU1 = IX / 10000 248031 80
KI = 10000 * IUI 248031 90
IV1 = IX - K1 24803200
IU2 = IY / 10000 2480321 O
K2 = 10000 * IU2 24803220
IV2 = IY - K2 24803230
K3 = IU1 * IV2 + IU2 * IV1 + IV1 * IV2 / 10000 24803240
IZ = (K3 + 5000) / 1 O000 + IU1 * IU2 24803250
RETURN 24803260
END 24803270
--
| | |
|
|
|||| |||| | | ||

11.1.24.6 IMPLEMENTATION PROCEDURE FOR SUBROUTINE TAB24B


|||| |||| || || |

I nt o d a y ' sw o r l dt h e r ei s a r a p i d l yd e v e l o p i n gt r e n dt ou s ec o m p u t e r si n
c u s t o d yt r a n s f e r measurements, a c c o u n t i n g work, processcontrolsystems, and a
|

varietyofother useswhere t a b l e sm u s t be i n c o r p o r a t e di n t oc o m p u t e r codes.


|||| |||---

Y e t many of t h e p r i n t e d t a b l e s a r e a l m o s t i m p o s s i b l e t o codedue to the fact


t h a t someone has s l i g h t l y m o d i f i e d s e l e c t e d v a l u e s t o d i f f e r f r o m t h o s e
obtainedusingthemathematicalexpressionthatsupposedlygeneratedthe
tables. To overcome t h i s problem it i s o f t e n r e q u i r e d t o add e x t e n s i v e excep-
tiontablestothe codes. T h i s makes t h e codes l a r g e and cumbersome t o modify,
and r e s t r i c t s t h e i r use t o largercomputersystems. A l s o w i t ht h e development
o fb e t t e rm e a s u r i n gd e v i c e s it i s o f t e n p o s s i b l e t o g a i n more d i g i t s o f p r e c i -
s i o ni nt h et a b l ep a r a m e t e r s ,n e c e s s i t a t i n gf i n e rg r i do ft h et a b u l a rv a l u e s ,
r e s u l t i n gi nl a r g e r volumes o f p r i n t e d t a b l e s t o be handled.
I na d d i t i o n , as t h eo n - l i n eu s eo fc o m p u t e r sf o rm e t e r i n gp u r p o s e s
i n c r e a s e s ,t h ed i r e c tu s eo fp r i n t e dt a b l e sw i l l decrease; t h e r e f o r e ,t h e new

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*bL=L VOLXX 80 m 0732290 0526118 924 W

SECTIONV VOLUME
FACTORS
CORRECTION x-253

Standard i s an e x p l i c i ti m p l e m e n t a t i o np r o c e d u r er a t h e rt h a n a s e t of equa-
tionsor a s e t of t a b l e s . I t must be remembered t h a t t h e s t a n d a r d i z a t i o n o f
t h ei m p l e m e n t a t i o np r o c e d u r ei m p l i e ss t a n d a r d i z a t i o no ft h es e to f mathe-
m a t i c a le x p r e s s i o n s used w i t h i nt h e code. Absoluteadherence t ot h ep r o c e d u r e
--
| | |

wil I helptoinsurethatall computers and computercodesofthefuture, meet-


|
|

i n gt h es p e c i f i c a t i o n s and r e s t r i c t i o n s , w i l l be a b l e t o producethe same


|||| |||| | | ||

results. I t i s b e l i e v e dt h a tt h i sp r o c e d u r ew i l la l l o wf o rt h e maximum
|||| |||| || || |

machine and codeindependence.The procedure was implemented i n computer


s u b r o u t i n e si s s u e d by API i n 1980 u s i n g ANSI/ASA FORTRAN. The s u b r o u t i n e s
|
|||| |||---

maximized p r e c i s i o n by t h e use o f3 2 - b i ti n t e g e ra r i t h m e t i c .
The procedure a s d e s c r i b e d i n t h e f o l l o w i n g t e x t can, by c a r e f u l and
d e l i b e r a t ea p p l i c a t i o n of numericalanalysis, be used w i t h t h e m a j o r i t y of
languages and word s i z e s i n p r e s e n t o r a n t i c i p a t e d use. Tousethestandard
procedure means t o m a i n t a i n a b s o l u t e and unwaveringadherence t o t h e number o f
digits specified at each s t e p and t o t h e c a l c u l a t i o n p r o c e d u r e a s o u t l i n e d .
I nt h ep r o c e d u r e ,t h en o m e n c l a t u r e used i s t h a t of ASTM E380-76, unless
an e x p l i c i t p r o c e d u r e i s g i v e n below, i n whichcase theproceduregivenbelow
overridesthatgiven by ASTM E380-76.
I nt h ep r o c e d u r et h en o m e n c l a t u r e (XXX.XX) means f i v e ( 5 ) m a t h e m a t i c a l l y
significant digits.
The termroundingas used i nt h ep r o c e d u r e means: C o n s i d e ro n l yt h e
first digit to the right of the desired position and
a. i ft h a td i g i ti sg r e a t e rt h a n 4, i n c r e m e n tt h ed e s i r e dp o s i t i o n by
one and d r o p t h e r e m a i n i n g d i g i t s t o t h e r i g h t of thedesired POS¡-

tion.
b. I f t h a td i g i ti sl e s st h a n 5, s i m p l yd r o pt h er e m a i n i n gd i g i t s to
t h e r i g h t of t h e d e s i r e d p o s i t i o n .

-
All constants are used t o e x a c t l y t h e number o f d i g i t s p r i n t e d .

C a l c u l a t i o nP r o c e d u r e

STEP 1: Round i n p u tv a r i a b l e so fr e l a t i v ed e n s i t y6 0 / 6 0 "F and observed tern-


perature
a. Round r e l a t i v e d e n s i t y 60/60 "F t o t h en e a r e s t
0.0005 and c a r r y a s 5 digit result
¡.e. r e l a t i v ed e n s i t y6 0 / 6 0 "F (SG60) = X.XXXX

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API MPMS*LL.L VOLxX B O m 0732290 052bLL9 BbO m

X-254 1 P PHYSICAL PROPERTIES


CHAPTER DATA

b. Round observedtemperature t o t h en e a r e s t
0.1 O F and c a r r ya s 4 digit result
¡.e. observed
temperature (DEGF) = XXX.X

STEP 2 : Convers ion t o dens i t y i n Kg/m3


define p = r e l a t i v ed e n s i t y 6 0 / 6 0 "F * 999.012
Round p t on e a r e s t 0.01
I .e. p = xxxx.xx

STEP 3: Choose t h ea p p r o p r i a t ev a l u e so f K O and K 1 a sd e s c r i b e di n API Stan-


dard 2540, TABLE 24,11.1.24
KO i s a7 digitconstant
i .e. KO = XXX.XXXX
K1 i s a 4 d i g i tc o n s t a n t
i .e. K i = .XXXX

|||| |||---
STEP 4: C a l c u l a t i o no fa l p h a( c o e f f i c i e n t of thermalexpansion)

|
1. I f i n p u tr e l a t i v ed e n s i t y 60/60"F < 0.7710 o r

|||| |||| || || |
inputrelativedensity 60/60 O F > 0.7885

|||| |||| | | ||
define a = KO
2
-+ -
K1
P
P

|
|
| | |
a. Evaluate -
KO

--
PZ

K
a( 1 Compute 0= .XXXXXXXX
P

a(2) Compute -
KO/P
D
= .oooxxxxxxx

b. Evaluate -
K1
P

K
b( 1 1 1 = .OOOXXXXXXX
P

c. Sum r e s u l t s o f a ( 2 ) andb(1)andround t o n e a r e s t 0.0000001


i .e. a = .OOOXXXX

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I M P M S + L L * L VOL+X 80 m 0732290 0526320 582 m

SECTIONVOLUME
FACTORS
CORRECTION X-255

II. I f input relative density 60/60 "F -


> 0.7710and
input relative densit'y 6 0 / 6 0 "F L 0.7885
define a = A + B/p2
where
A and B a r e chosen t o be t h e c o e f f i c i e n t s o f a line joining the jet
fuellineat 0.7710 t o t h e g a s o l i n e l i n e a t 0.7885.
A = .OOXXXXXX
B = xxxx.xxxx
a)Evaluate -
B
PZ

a( I 1 compute E = .XXXXXXXX
P

a(2)
compute -
B/P
P
= .XXXXXXXX rounded t o n e a r e s t .0000000001

b) Sum r e s u l t so fa ( 2 ) and A and round t o n e a r e s t .O000001


I .e. a = .OOOXXXX

STEP 5: Calculate At
def i ne A t = DEGF - TBASE
Note:TBASE c a r r i e d t o 3 d i g i t s XX.X (60.0)
Carry A t = XXX.X

|||| |||---
|
|||| |||| || || |
STEP 6: C a l c u l a t i o n of VCF
d e f i n e VCF = E X P [ - a A t ( l . O + 0.8aAt)l
|||| |||| | | ||
= EXPL-a A t - 0.8 a 2 A t 2 ]
a.Ca I cu l a t i on of exponent
|
|
| | |

a(1) a b t = .XXXXXXXX
--

a(2) .8 a A t = .XXXXXXXX
a(3) .8 a2 A t 2 = .OXXXXXXX
a ( 4 )- a A t - 0 . 8 ~
A t 2~ = 0.XXXXXXXX w i t h any t r a i l i n g
d i g i t s dropped
b. C a l c u l a t i o noef x p o n e n t i a l
VCF = EXPL-a A t - 0.8 a 2 A t 2 1 = X.XXXXXX
usingatleastthefirst 7 t e r m so ft h e power s e r i e se x p a n s i o n
of ex

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL-L VOL*X A O m 0732290 052bL2L 419 W

X-256 CHAPTER1 PHYSICAL PROPERTIES


DATA

Computational =
1.XXXX rounded t o n e a r e s t 0.0001 i f VCF L 1
v a l u e o f VCF
0.XXXXX rounded t o n e a r e s t 0.00001 i f VCF 1

T a b l ev a l u e
o f VCF = X.XXXX rounded VCF nt o
earest 0.0001

The 1980 integer.FORTRAN code issued by API containedbothaninteger


d i v i s i o n and an i n t e g e r m u l t i p l i c a t i o na l g o r i t h m . A d e s c r i p t i o n of each i s
c o n t a i n e di nt h ef o l l o w i ng:

INTEGER MULTIPLICATION PROCEDURE


(FOR 32 BIT ARITHMETIC)

DATA DEFINITION

X, Y areinteger numbers t h a t a r e equa I t o o r l e s s t h a n 2 o lo9.


( s l i g h t l yl e s st h a n Z31). A l a r g e rv a l u e may c a u s eo v e r f l o w I. na d d i t i o n ,
thetotal number of d i g i t s i n X and Y must n o t exceed 17, o t h e r w i s eo v e r f l o w
will occur.
Z i st h ep r o d u c t XY scaled by 10-8, ¡.e. Z = XY/108
Note: I f i t i sd e s i r a b l et oo b t a i n maximum p r e c i s i o n , X and Y may be
s c a l e d up p r i o r t o use o f t h e p r o c e d u r e .T y p i c a l l y ,a tl e a s t 15 d i g i t s a r e
needed t o o b t a i n 6 d i g i t p r e c i s i o n , 16 for 7and 17 f o r 8.
The l a r g e s t v a l u e s o f X and Y t h a t may beused a r e 2 O00 O00
O00 and
99 999 999.

|||| |||---
CALCULATION

|
|||| |||| || || |
x/10000 = u1
10000 U1 = KI
|||| |||| | | ||

X - K1 = V1
Y/10000 = u2
|
|
| | |

10000 U2 = K2
--

Y - K2 = V2
( U 1 V 2 ) + (U2V1) + (VlV2/10000) = K3
(K3 + 5000)/10000 + (UIU2) = Z
Note: Z hasbeensca I edby 10-8 and may have t o be rescaledbefore use.
TOTAL DIGITS I N X AND Y 12
" " "
13 14 15 16 17
DIGITS I N PRODUCT, Z 3-4 4-5 6-7
5-6 8-9
7-8

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I flPMS*33-L VOL*X 80 m 0732290 0 5 2 6 3 2 2 355 m

SECTIONi-VOLUME CORRECTION FACTORS X-257

INTEGER D I V I S I O N PROCEDURE
(FOR 32 BIT ARITHMETIC)

DATA DEFINITION

X, Y a r ei n t e g e r numbers such t h a t X i s equa 1 t o o r l e s s t h a n 232 - 1


and Y i s o f o r d e r of magn i t u d e lo4 l e s st h a n X.

R i s thequotient of &
Y
scaled by lo4, ¡.e. R = xY * lo4.

Note: I f it i sd e s i r a b l e t o o b t a i n maximum p r e c i s i o n , X and Y may be


scaled up p r i o r t o u s eo ft h ep r o c e d u r e .T y p i c a l l yt h e more d i g i t s t h a t a r e
carriedinboth X and Y, t h e more a c c u r a t e d i g i t s on o u t p u t .
CALCULATION
X/Y = u1
U1Y = K1
X - K1 = V1
V1/Y = u2
U1 * 10000 + U2 = R
Note: R hasbeen sca I edby lo4 and may have t o be r e s c a l e d b e f o r e use.

EXAMPLES FOR CHECKOUT

The f o l l o w i n g examples aredesigned t o a i di nc h e c k o u tp r o c e d u r e sf o r


boththeexisting API s u b r o u t i n e andany subroutineswhicharedevelopedusing
t h e imp l e m e n t a t i o n p r o c e d u r e o u t I i nedabove.The I i nes of t h e examples a r e
numbered t o correspond t o t h e l i n e s w i t h i n t h e c a l c u l a t i o n p r o c e d u r e .

EXAMPLE 1: Assume a f u e l o i l w i t h an i n p u tr e l a t i v ed e n s i t y 60/60 OF o f


0.9054 and an observedtemperatureof 105.03 'F. C a l c u l a t et h e
VCF r e q u i r e d t o c o r r e c t t h e volume t o 60 OF, c o r r e c t t o 4 decimal
digits.

STEP 1: a. rounded SG60 = 0.9055


b. rounded DEGF = 105.0

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*33.3 V O L W X 80 m 0732290 O526323 291 m

X-258 CHAPTER
1 PHYSICAL PROPERTIES
DATA

STEP 2: p rounded to nearest 0.0 1 Kg/m3


p = 904.61

STEP 3: KO = 103.8720 (as of May 1, 1980)


K1 = 0.2701 (as of May 1, 1980)

K
STEP 4: 1.a. Evaluate -
O
2
P

K
a(1) 2 = 0.11482517
P

a(2) -
K /P
O = 0.0001269333
P

K
I .b. Evaluate L
P

K
b(l) 1= 0.0002985817
P

1 .c. u = 0,0004255

|||| |||---
STEP 5: At = 45.0

|
|||| |||| || || |

STEP 6: Calculation of VCF


|||| |||| | | ||

a. Calculation of exponent
a(l) 0.01914750
|
|
| | |

a(2)0.01531800
--

a(3)0.00029330
a(4)-0.0194408
b. Calculation of exponential
VCF = 0.980746

VCF correct to 4 decimal digits = 0.9807

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
SECTIONFA VOLUME
FACTORS
CORRECTION X-259

EXAMPLE 2: Assume a j e t f u e l w i t h an i n p u t r e l a t i v e d e n s i t y 60/60 "F of 0.8198


andan observedtemperature of 80.1 "F. C a l c u l a t et h e VCF r e q u i r e d
tocorrectthe volume t o 60 "F, c o r r e c t to 4 d e c i m a ld i g i t s .

STEP 1 : a. rounded SG60 = 0.8200


b. rounded DEGF = 80.1

STEP 2: p rounded t on e a r e s t O .O1 Ky/rn3

|||| |||---
p = 819.19

|
|||| |||| || || |
STEP 3: KO = 330.3010 (as of May 1, 1980)
K 1 = 0.0 (as o f May 1, 1980)

|||| |||| | | ||
K
STEP 4: 1.a. Evaluate 2

|
|
| | |
P2

--
K
a( 1) 2= 0.40320438
P

a(2) -
KO/P

P
= 0.0004921989

K
I . b. Eva I u a t e -1
P

K
b(1) 1 = 0.0
P

I .c. a = 0.0004922

STEP 5: A t = 20.1

STEP 6: C a l c u l a t i o n of VCF
a. C a l c u l a t i o n o f exponent
a( 1 1 0.00989322
a(2) 0.00791457
a(3) 0.00007830
a(4) -0.00997152

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
b. Ca I c u t a t i o nof exponent i a I
VCF = 0.990078

VCF c o r r e c t t o 4 decimal d i g i t s = .9901

EXAMPLE 3: Assume a p r o d u c t w i t h an i n p u t r e l a t i v e d e n s i t y 60/60 O F of 0.7783


andan o b s e r v e dt e m p e r a t u r eo f 48.1 OF. C a l c u l a t et h e VCF r e q u i r e d
t o c o r e e c tt h e volume to 60 'F, c o r r e c t t o 4 d e c i m a ld i g i t s .

STEP 1: a. rounded SG60 = 0.7785


b. rounded DEGF = 48.1

STEP 2: p rounded t o n e a r e s t 0.01


Ky/m3
P = 777.73

STEP 3: KO, K1 n o ta p p l i c a b l e ;r e l a t i v ed e n s i t y 60/60 OF found


i n t r a n s i t i o n zone.

STEP 4: 1l.a. A = -.O0186840 ( a s of May 1, 1980)


6 = 1489.0670 ( aosf May 1, 1980)

a(1) = 1.914632
P

a(2) B/p = 0.00246182


P
--

b. a = 0.0005934
| | |
|
|
|||| |||| | | ||

STEP 5: A t = -11.9
|||| |||| || || |

STEP 6 :C a l c u l a t i o n of VCF
a. C a l c u l a t i o noef x p o n e n t
|
|||| |||---

a(1) -0.00706146
a(2) -0.00564916
a(3) 0.00003989
a(4) 0.00702157
b. C a l c u l a t i o no ef x p o n e n t i a l
VCF = 1.007046

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LLm3 V O L X X 80 m 0732290 0 5 2 6 3 2 6 TT0 m

SECTIONV VOLUME CORRECTION FACTORS X-261

VCF c o r r e c t t o 4 decimal d i g i t s = 1.0070

|||| |||---
|
EXAMPLE 4: Assume a g a s o l i n ew i t h an i n p u t r e l a t i v e d e n s i t y 60/60 of

|||| |||| || || |
O F

0.7500 andan observedtemperatureof 89.6 OF. C a l c u l a t et h e VCF


required t o c o r r e c t t h e volume t o 60 OF, c o r r e c t t o 5 s i g n i f i c a n t

|||| |||| | | ||
f igures.

|
|
| | |
STEP 1 : a)
rounded SG60 = 0.7500

--
b) rounded DEGF = 89.6

STEP 2: p rounded t o n e a r e s t 0.01 Kg/m3


p = 749.26

STEP 3: KO = 192.4571 ( a s of May 1, 1980)


K 1 = 0.2438 (o
a fs May 1, 1980)

STEP 4: 1.a. Evaluate -


KO
2
D

K
a( 1 ) 0 = .25686290
P

KO/P
a(2) -= 0.0003428221
P

I .b. Eva l u a t e K 1 -
P

K
b(l) 1 = 0.0003253877
P

I .c. C( = O .O006682

STEP 5: A t = 29.6

STEP 6 : C a l c u l a t i o n of VCF
a. Calculate
exponent
a( 1 ) 0.01977872

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL-L VOL*X 80 M 0732290 0 5 2 b L 2 7 937 m

X-262 1 P PHYSICAL
CHAPTER DATA
PROPERTIES

a(2)0.01582297
a(3)0.00031295
a(4)-.O2009167
b. Calculation of exponential
VCF = 0.980108

VCF correct to5 significant figures= 0.98011

11.1.24.7 TABLE 24C-VOLUME CORRECTION measured data for previously unstudied fluids to sup-
FACTORS FOR INDIVIDUAL AND plement those data included in the initial data base.
SPECIAL APPLICATIONS, VOLUME High precision density data obtained from the labora-
CORRECTION TO 60°F AGAINST tory for a fluid of interest may be reduced by Equa-
THERMAL EXPANSION COEFFICIENTS tion l to obtain p T and aT.TABLE 24C may then be
AT 60°F entered with the aTso determined.
TABLE 24C, when used witha minimum of ten data
points, allows one to extract the highest degree of accu-
TABLE 24C gives volume correctionfactors to racy from the base data. It is suggested that TABLE
convert petroleum liquid volumes to the corresponding 24C be used when:
volume at 60°F. The table presents tabular entries of 1. TABLES 24A and 24B do not adequately represent
volume correction factors against thermal expansion co- the thermal expansion propertiesof the fluids of inter-
efficients and temperature. The values were computed est; and
from the basic equation used to represent volume cor- 2. Precise thermal expansion coefficients maybe ob-
rection factors. tained directlyor indirectly by experiment (As an exam-
VCF = EXP [-apit(l + 0.8aTAt)] (1) ple, high precision density data may be usedto compute
the coefficients); and
(YT = (Y at the base temperature
3. Buyers and sellers agree that, fortheir use, a greater
At = t - T
degree of equity can be obtained.
t = any temperature
--

The temperature ranges of this table are:


| | |

T = base temperature.
|

In this form the equation is independent of the group


|

lo6 "F
|||| |||| | | ||

(Y
or substance. It can be used with any valid method of
270 to 510 O to 300
obtaining the thermal expansioncoefficient for a given
510 to 530 O to 250
fluid as long asa statistically significant number of
|||| |||| || || |

points are obtained. A minimum of ten such points is


530 to 930 o to 200
recommended. The appendix (11.1.24.7.1 in Volume
VI) to TABLE24C presents valuesof the thermal ex-
|

The volume correction factors given in this table are


|||| |||---

pansion coefficient alongwith the base density for each based on data from the U.S. National Bureau of Stan-
of the NBS samples. In addition, values of the constants dards (NBS) and from other published data. The ap-
KOand KIare given for each major group. Thesecon- pendix to this table presents values of the thermal ex-
stants relate the thermal expansion coefficient to base pansion coefficients at 60°F for each of the samples
density by included in the NBS data set. Portions of the tempera-
ture ranges represent areas beyond these data. Thus,
mathematical techniqueswere employed to extrapolate
beyond the temperature ranges of the given data to
determinethevolumecorrectionfactors for these
This table and its primary subroutine allow the use of areas. These factors are denoted by anasterisk (*).

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*ltL=L VOL*X 80 W 0732290 O526328 873 W

SECTION FACTORS
VOLUME CORRECTION x-263

Extension of this table beyond the ranges shown is not practical method of interpolation that will produce the
intended. accuracy
from obtainable the Standard.
Increments used in this table for determining the
vol- Thistable must beentered with a known
ume correction factors are 0.5"Fand 2 units for a. In- thermal expansion coefficient at 60°F and with an
terpolation between either temperature or thermal ex- observed temperature.
pansion coefficient is notintended since there is no

11.1.24.8 PROGRAM DOCUMENTATION FOR SUBROUTINE TAB24C-


VOLUME CORRECTION FACTORS FOR INDIVIDUAL AND
SPECIAL APPLICATIONS, CORRECTION OF VOLUME TO 60°F
AGAINST COEFFICIENTS OF EXPANSIONAT 60°F

ABSTRACT

Subroutine Title: TAB24C - TABLE


24C,
VCF f o rI n d i v i d u a l and
S p e c i a lA p p l i c a t i o n s , Volume C o r r e c t i o n t o 60 "F

Description: Thissubroutine i s designed t o c a l c u l a t e t h e


volume c o r r e c t i o n f a c t o r r e q u i r e d t o c o n v e r t
a volume a t an observedtemperature t o t h e cor-
responding volume a t 60 "F assuming t h e c o e f f i -
c i e n t of thermalexpansion i s known.

Program Responsibility: A m e r i c a nP e t r o l e u mI n s t i t u t e
Measurement C o o r d i n a t i o n
2101 L S t r e e t , N.W.
Washington, D.C. 20037

Date I ssued : August 1980

Language: FORTRAN, ANS 1 /ASA Standard

Reference: W I Standard 2540, TABLE 24,


11.1.24

THIS SUBROUTINE WAS DEVELWEDUSINGTHEMATHEMATICALALGORITHMS


AND SPECIFICATIONS DESCRIBED IN THE
DOCUMENT
PROCEDURE 11.1.24.9.
ANY MODIFICATIONS TO THIS SUBROUTINE
MUST RIGIDLY ADHERE
TO
THE
SAME
ALGORITHMS AND SPECIFICATIONS.

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPNS*KLL.L VOL*X B O m 0732290 0526329 70T m

11.1.24.8.1 Introduction

TAB24C i s a computersubroutinedesigned t o c a l c u l a t e $he volumecor-


r e c t i o nf a c t o r (VCF) necessary t o c o n v e r t a volume of a l i q u i dh y d r o c a r b o n
w i t h aknown c o e f f i c i e n t of thethermalexpansion and a t a s p e c i f i e d tempera-
turein degreesFahrenheit ("F) t ot h ee q u i v a l e n t volume a t 60 OF. Thesub-
r o u t i n ea c c e p t s as.inputthedesiredcoefficientofthermalexpansionrounded
--
| | |

to the nearest 0.0000005 and the observed temperature rounded to the nearest
|
|

O. 1 'F. I f e i t h e ri n p u tv a l u e has n o t been p r o p e r l y rounded, t h es u b r o u t i n e


|||| |||| | | ||

will r o u n dt h ev a l u e s and r e t u r nt h ec o r r e c t e dv a l u e s . The s u b r o u t i n er e t u r n s


|||| |||| || || |

onevalue of VCF w i t h 5 s i g n i f i c a n t f i g u r e s o f a c c u r a c y for computationpur-


posesand another VCF valuerounded t o fourdecimalplaces for p r i n t i n gp u r -
|

poses.The s u b r o u t i n ea l s oo u t p u t s a s t a t u s code foruserconvenience. The


|||| |||---

code i s s e t t o -1 i f an e r r o r c o n d i t i o n o c c u r s and t o + l i f t h ei n p u tv a l u e s
a r eo u t s i d et h el i m i t s of t h e c o r r e l a t i o n . A s t a t u s code of z e r oi sr e t u r n e d
i f t h ei n p u tv a l u e sa r ew i t h i nt h el i m i t so ft h ec o r r e l a t i o n . The l i m i t s o f
t h ec o r r e l a t i o ni n c l u d i n gt h ee x t r a p o l a t e dr e g i o na r ed e p i c t e di n Figure x-13.
The c a l l i n g programmustcheck the flag and p r o v i d e t h e u s e r w i t h a p p r o p r i a t e
warning messages or program termination.

11.1.24.8.2 Subroutine Specifications

The range of a p p l i c a t i oAnl:p h a * lo6 Temperature, OF


270.0 t o 510.0 0.0 t o 300.0
510.5 t o 530.0 0.0 t o 250.0
530.5 t o 930.0 0.0 t o 200.0

Referenced
modules: VCF24C, WYC

FORTRAN f u n d ions : FLOAT

Averageexecutiontime: 2290 VCF entries/CPU


second
I BM 370/ 168

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API MPMS*3L-L V O L * X 80 m 0732290 0526330 421

SECTION V VOLUME CORRECTION FACTORS x-265

The s u b r o u t i n e sa r ew r i t t e ni n ANSI/ASA FORTRAN u s i n gi n t e g e ra r i t h m e t i c . The


s i z e and s t o r a g e r e q u i r e m e n t s a r e :

1. Compilable
source
statements 86
2. Decimal
storage
bytes 1944
3. Words 486

11.1.24.8.3 C a l l i n g Sequence

CALLTAB24C(ALFGO,DEGF, VCFC, VCFP, I FLAG)

INPUTDESCRIPTION

ALF60 - C o e f f i c i e not fh e r m aelx p a n s i o n


(ALF60 r e t u r n e d wi I I berounded t o n e a r e s t 0.0000005)
--
| | |
|

-
|

DEGF Observed temperature, "F


|||| |||| | | ||

(DEGF r e t u r n e d w i l l be rounded t o n e a r e s t 0.1 "F)


|||| |||| || || |

OUTPUT DESCRIPTION
|
|||| |||---

VCFC - Output VCF rounded t o 5 s i g n i f i c a n t f i g u r e s f o r c o m p u t a t i o n a l


purposes
i .e. VCFC = 1 .XXXX
or VCFC = 0.XXXXX

VCFP - Output VCF rounded t o 4 decimalplaces for p r i n t i n g purposes


¡.e. VCFP = 1.XXXX
or VCFP = O. XXXX

IFLAG - S t a t u s Code

O: I n d i c a t e si n p u tv a r i a b l e sa r ew i t h i nt h er a n g e of applica-
tion.
1: I n p u td a t ao u t s i d el i m i t s o f c o r r e l a t i o n a sg i v e ni n
1 1 a 1 -24.

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
x-266 CHAPTER DATA
1 PHYSICAL PROPERTIES

-1: I n d i c a t e si n p u t ALF6O o ri n p u t DEGF o u t s i d er a n g e of a p p l i -


c a t i o na sg i v e ni n 11.1.24; VCFC and VCFP s e t t o -1.0000.

11.1.24.8.4 Method of C a l c u l a t i o n

The s u b r o u t ¡ n ee v a l u a t e st h ee q u a t i o n

VCF =

where A t = DEGF - 60.0

"60 = c o e f f i c i e n t of thermalexpansion

A f u l l e x p l a n a t i o n of t h ee q u a t i o n may befound i n A P I Standard 2540, TABLE


24, 11.1.24.

11.1.24.8.5 Examples

Theseexamples a r et u t o r i a li nn a t u r e and a r en o ti n t e n d e dt o be s u f f i c i e n t
f o rs u b r o u t i n ec h e c k o u t . Theexamples g i v e ni np r o c e d u r e 11.1.24.9 areto be
used f o r t h e computercheckout.

Example 1
ALF60 = .O004402
DEGF = 90.47
CALL
TAB24C
(ALFGO,
DEGF,
VCFC,
VCFP, IFLAG)
A f t e rt h ec a l l : ALF60 = .O004400
DEGF = 90.5
VCFC = .98653
VCFP = .9865
IFLAG = O

Examp I e 2
ALF6O = ,0003300
DEGF = 255.0
CALL
TAB24C (ALF60, DEGF,
VCFC,
VCFP, IFLAG)
-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL-L VOLIX 80 m 0732290 0526332 2T4

SECTIONVOLUME
FACTORS
CORRECTION x-267

A f t e rt h ec a l l : ALF60 = .O003300
DEGF = 255.0
VCFC = .9345a
VCFP = .9346
I FLAG = 1

Example 3
ALF6O = .O006660
OEGF = 500.0
CALL
TAB24C (ALF60, DEGF,
VCFC,
VCFP, IFLAG)
A f t e r t h ec a l l : ALF6O = .O006660
DEGF = 500.0
VCFC = - 1 .O000
VCFP = -1 .O000
IFLAG = - 1

|||| |||---
|
|||| |||| || || |
|||| |||| | | ||
|
|
| | |
--

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
11.1.24.8.6 FLOWCHART

I INPUT:THERMAL EXPANSION
COEFF I C I ENT OBSERVED TEMPERATURE

ROUND INPUT DATA


TO S P E C I F I C A T I O N

SnVCF -1.0000
ERROR FLAG I E R R .L -1
RETU RN

I CALCULATEVCF I

-
"i
SET ERROR SET ERROR
FLAG 1

11.1.24.8.7 SubroutineListinq

TA62 4C T h si su b r o u t i nsee r v e s as t hien p u t / o u t p ur to u t i nteo


t h e subsequentmodulesnecessary in the calculation of
volume c o r r e c t i o n f a c t o r from t h e c o e f f i c i e n t of thermal
expansicm a t 60 " F andobservedtemperature.
-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMSJtLL-L V O L X X 80 0732290 052b134 077 m

SEcnoN VOLUME CORRECTIONFACTORS X-209

ReferencedModules

MPYC T h i s m o d upleer f o r m
i nst e gm
eur l t i p l i c a t iw
m
ona
iat h
xi-
mum of 17 d i g i t s .

VCF24C T h i s modu l e i s des igned t o c a l c u l a t e volume c o r r e c t i on


factor.

SUBROUTINE TAB24C(ALF6O,DEGF,VCFC,VCFP,IFLAG) 24C0001 O


C 24C00020
(C)COPYRIGHT
C 19 8 0 24C00030
C AMERICAN PETROLEUM I N S T I T U T E 24C00040
C RIGHTS
ALL RESERVED 24C00050
C 24C00060
C T H I S SUBROUTINE IS A VOLUNTARY STANDARDAND WAS DEVELOPED 24C00070
C UNDER THE AUSPICES OF THE JOINT API-ASTM COMMITTEE ON STATIC 24C00080
C PETROLEUM MEASUREMENT I N PART FROM DATA GENERATED 24C00090
C BY A PROJECT FUNDED BY THE AMERICAN PETROLEUM 24C001 O0
C INSTITUTE AT THE U . S . NATIONAL BUREAU OF STANDARDS, 24C0011 O
GAITHERSBURG,
C MARYLAND. 24C00120
C 24C00130
C INQUIRIES CONCERNING I T S APPLICATION SHOULD 24C00140
C ADDRESSED
BE TO: 24C00150
MERICAN C PETROLEUM INSTITUTE 24C00160
C MEASUREMENT COORDINATION 24C00170
C 2101 N.W.
L STREET, 24C00180
C WASHINGTON, DC 2 0 0 3 7 24C00190
C 24C00200
c ............................................................ 24C0021 O
c * * 24C00220
C * T H I S SUBROUTINE OR THE
MATHEMATICALRELATIONSHIPS * 24C00230
C * REPRESENTED THEREBY MAY BE USED
BY ANYONE WISHING * 24C00240
C * TO
DO SO, BUT
THE AMERICAN PETROLEUM I N S T I T U T E , * 24600250
C * THE AMERICAN SOCIETY FOR TESTING AND MATERIALS, * 24C00260
C * AND THE INSTITUTE OF PETROLEUM AND THEIR * 24C00270
C * RESPECTIVE MEMBERS AND THE U . S . NATIONAL BUREAU * 24C00280
C * OF STANDARDS, SHALL NOT BE HELD RESPONSIBLE OR * 24600290
C * L I A B L E I N ANY WAY
FROM LOSS OR DAMAGE, INCLUDING, * 24C00300
C * BUT NOT L I M I T E D TO,CONSEQUENTIAL DAMAGE, * 24C0031 O
C * RESULTING FROM SUCH
USAGE OR FOR VIOLATION OF * 24600320
C * ANY FEDERAL, STATE, OR MUNICIPAL LAWS, REGULATIONS * 24C00330
C * OR PRACTICES OF THE UNITED STATES OR OF ANY * 24C00340
C * FOREIGN COUNTRY. 4
24C00350
c * 8 24C00360
c ............................................................ 24C00370
C 24C00380
C T H I S SUBROUTINE I S DESIGNED TO ACCEPT AS INPUT 24C00390
AC VALUE OF ALPHA (THERMAL EXPANSION COEFFICIENT) 24C00400
C AND OBSERVED TEMPERATURE I N DEGREES FAHRENHEIT(DEGF) 24C004 1O
C AND
PRODUCE THE
VOLUME CORRECTION FACTOR FOR 24C00420
C A P I TABLE 24C, VCF FOR I N D I V I D U A L AND SPECIALAPPLICATIONS 24C00430
C VOLUME CORRECTION TO 60 F. 24C00440

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API M P M S * L L - L V O L * X B O m 0732290 0 5 2 b L 3 5 T03 m

X-270 1 PHYSICAL PROPERTIES


CHAPTER DATA

C 24C00450
C T H I S SUBROUTINE CALLS 24C00460
C VCF24C(CALLS MPYC) 24C00470
C 24C00480
C ALF6O SHOULD BE INPUT TO THE
NEAREST 0.5 WHERE 24C00490
C ALF6O I S XXX.X "
1 0 " " - 6 . THE SUBROUTINE WILL 24C00500
C ROUND THE VALUE ANDRETURNTHECORRECTED VALUE. 24C0051 O
C 24C00520
C DEGF
SHOULD BE PASSED I N THENEAREST 24C00530
C TENTH OF
DEGREE FAHRENHEIT. THE SUBROUTINE WILL 24C00540
C ROUND THE VALUE ANDRETURNTHECORRECTED 24C00550
C VALUE. 24C00560
C 24C00570
C VCFC I S THE
RETURNED VOLUME CORRECTION FACTOR 24C00580
C CORRECTTO FIVE(5)SIGNIFICANTFIGURES. 24C00590
C 24C00600
C VCFP I S THE
RETURNEDVOLUME CORRECTION FACTOR 2 4 6 0 0 6 1O
C CORRECTTO FOUR(4)DECIMALDIGITS. 24C00620
C 24C00630
C I F L A G I S THEROUNDED STATUS CODE WHICH SHOULD 24C00640
C BE CHECKED BY THEUSER I N THE CALLING PROGRAM 24C00650
C =O NO ERROR 24C00660
C =1 INPUT DATA WITHIN EXTRAPOLATION RANGES AS 24C00670
C GIVEN I NA P I2 5 4 0 ,1 1 . 1 . 2 4 24600680
C = - 1 INPUT DATA OUTSIDESPECIFIED RANGE OF 24C00690
C APPLICATION AS GIVEN I N A P I 2 5 4 0 , 1 1 . 1 . 2 4 24C00700
C 24C0071 O
DATA IEP1,IEP2,IEP3/2500,2000,1500/ 24C00720
DATA NBPl,NBP2/2700,9300/ 24C00730
DATA IBPl ,IBP2/5100,5300/ 24C00740
DATA ITMP1,ITMP2,ITMP3/3000,2500,2000/ 24600750
DATA IBAS/6OO/ 24C00760
C 24C00770
VCFC=- 1 . O000 24C00780
VCFP=- 1 . O000 24C00790
IFLAG=- 1 24C00800
C 24C0081 O
C ROUND INPUT VALUES 24C00820
C 24C00830
ITEMP=DEGF"l O . 0+0 . 5 24C00840
DEGF=FLOAT(ITEMP)/lO.O 24C00850
IALF=(ALF60"100000000.0+25.0)/50.0 24C00860
IALF=IALF"5 24C00870
ALF6O=FLOAT(IALF)/1OOOOOOO. 24C00880
C 24C00890
C CHECK ALPHA RANGES 24C00900
C 24C0091 O
I F ( IALF-NBP1 ) 1O , 2 0 , 2 0 24C00920
1 0 CONTINUE 24C00930
RETURN 24C00940
20 IF(IALF-NBP2)30,30,10 24C00950
3 0 CONTINUE 24C00960
C 24C00970
C CHECK V A L I D TEMPERATURERANGES 24C00980
C 24C00990
IF(ITEMP)40,50,50 2 4 c 0 1 O00
40 CONTINUE 24C01 O 1 O
RETURN 24C01020

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*11-1 V O L X X 80 m 0732290 0526136 9 Y T m

SECTION I-VOLUME CORRECTION FACTORS X-271

50 I F ( I A L F - I B P 1 ) 6 0 , 6 0 , 7 0 24C01030
60 IF(ITEMP-ITMP1)100,100,40 24C01040
7 0I F ( I A L F - I B P 2 ) 8 0 , 8 0 , 9 0 24C01050
8 0 IF(ITEMP-ITMP2)100,100,40 24C01060
9 0 IF(ITEMP-ITMP3)lOO,l00,40 24C01070
1O0 CONTINUE '24C01 O80
IIALF=IALF 24C01 O90
IDT=ITEMP-IBAS 24C011 O0
C 24C0111 O
C CALCULATE VCF 24C01120
C 24C01130
C A L LV C F 2 4 C ( I I A L F , I D T , I V C F ) 24C01140
IFLAG=O 24C01150
C 24C01160
CHECK
C TO DETERMINE I FI N EXTRAPOLATED REGION 24C01170
C 24C01180
IF(1ALF-IBP1)lOl ,101 ,110 24C01190
1 0 1 IF(ITEMP-IEP1)140,140,105 24C01200
1 0 5I F L A G = l 24C0121 O
GO TO 1 4 0 24C01220
1 1 0 IF(IALF-IBP2>120,120,130 24C01230
1 2 0 IF(ITEMP-IEP2)140,140,105 24C01240
1 3 0 IF(ITEMP-IEP3)140,140,105 24C01250
1 4 0 CONTINUE 24C01260
C 24C01270
C CALCULATE PRINT AND CALCULATION VALUES OF
VCF 24C01280
C PRINT VALUE (PVCF) ROUNDED
TO 4 DECIMAL D I G I T S 24C01290
C CALCULATION VALUE (CVCF) ROUNDED TO 5 S I G N I F I C A ND
TI G I T S 24C01300
C 24C0131 O
JVCF=(IVCF/lO00+5)/10 24C01320
PVCF=JVCF 24C01330
PVCF=PVCF/l O000 . 24C01340
1F(1VCF-100000000)150,160.160 24C01350
1 5 0 CONTINUE 24C01360
C 24C01370
VCF
C LESS THAN ONE, F I V E DECIMALS RETURNED 24C01380
C 24C01390
JVCF=(IVCF/100+5)/10 24C01400
CVCF=JVCF 24C0141 O
CVCF=CVCF/lOOOOO. 24C01420
GO TO 1 8 0 24C01430
1 6 0 CONTINUE 24C01440
CVCF=PVCF 24C01450
1 8 0 CONTINUE 24C01460
VCFC=CVCF 24C01470
VCFP=PVCF 24C01480
RETURN 24C01490
END 24C01500

SUBROUTINE V C F 2 4 C ( I A L F , I D T , I V C F ) 24C0151 O
C 24C01520
C T H I S MODULE I S DESIGNED TO CALCULATE VOLUME 24C01530
C CORRECTION FACTOR. ALTHOUGH ALL CALCULATIONS AREDONE 24C01540
AS
C INTEGERS, THE SUBROUTINE RETURNS WITH A 8 24C01550
C OR 9 D I G I T VALUE DEPENDENT
UPON
WHETHER IDT 24C01560
C I S POSITIVE OR NEGATIVE. 24C01570

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL-L VOL*X 80 m 0732290 0526337 886 m

X-272 CHAPTER 11"PHYSlCM PROPERTIES DATA

C 24C01580
C ALGORITHM- 24C01590
C VCF=EXP(-ALPHA*DT(l.O+0.8*ALPHA*DT)) 24C01600
C 24C0161 O
C CALCULATE ALPHA*DT 24C01620
C 24C01630
ITERMl=IALF*IDT 24C01640
C 24C01650
C CALCULATE 0.8 *ALPHA *DT 24C01660
C 24C01670
ITERM2=ITERM1/5*4 24C01680
C 24C01690
C CALCULATE EXPONENT-ALPHAIDT(l.O+O.8*ALPHA*DT) 24C01700
C 24C0171 O
CALL MPYC(ITERMl,ITERM2,ITERM3) 24C01720
IX=-(ITERMl+ITERMS) 24C01730
C 24C01740
C CALCULATE EXPONENTIAL(F1RST 7 TERMS OF POWER SERIES) 24C01750
C 24C01760
ISUM1=1 OOOOOOOO+IX 24C01770
CALL MPYC(IX,IX,ISUM2) 24C01780
ISUM2=ISUM2/2 24C01790
CALL MPYC(IX,ISUM2,ISUM3) 24C01800
ISUM3=ISUM3/3 24C0181 O
CALL MPYC(IX,ISUM3,ISUM4) 24C01820
ISUM4=ISUM4/4 24C01830
CALL MPYC(IX,ISUM4,ISUM5) 24C01840
ISUM5=ISUM5/5 24C01850
CALL MPYC(IX,ISUM5,ISUM6) 24C01860
ISUM6=ISUM6/6 24C01870
IVCF=ISUM1+ISUM2+ISUM3+ISUM4+ISUM5+ISUM6 24C01880
RETURN 24C01890
END 24C01900

SUBROUTINE MPYC(IX,IY,IZ) 24C0191 O


C 24C01920
C THIS MODULE PERFORMS INTEGER MULTIPLICATION. THETOTAL 24C01930
C NUMBER OF DIGITS IN IX AND IY MUST NOT EXCEED 17. OTHER 24C01940
C WISE, OVERFLOW WILL OCCUR. 24C01950
C 24C01960
IU1 = IX / 10000 24C01970
K1 = 10000 * IU1 24C01980
IV1 = IX - K1 24C01990
IU2 = IY / 10000 24C02000
K2 = 10000 * IU2 24C0201 O
IV2 = IY - K2 24C02020
K3 = IU1 * IV2 + IU2 * IV1 + IV1 * IV2 / 10000 24C02030
IZ = (K3 + 5000) / 1 O000 + IU1 * IU2 24C02040
RETURN 24C02050
END 24C02060

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL-L V O L * X 80 m 0732290 052bL38 7 1 2 m

SECTION 1"VOLUME CORRECTION FACTORS x-273

11.1.24.9 IMPLEMENTATION PROCEDURE FOR SUBROUTINE TAB24C

I nt o d a y ' sw o r l dt h e r ei s a r a p i d l yd e v e l o p i n gt r e n dt ou s ec o m p u t e r si n
c u s t o d yt r a n s f e r measurements, a c c o u n t i n g work, processcontrolsystems, and a
varietyofother useswhere t a b l e s must be i n c o r p o r a t e di n t oc o m p u t e r codes.
Y e t many o f t h e p r i n t e d t a b l e s a r e a l m o s t i m p o s s i b l e t o code due t o t h e f a c t
t h a t someone has s l i g h t l y m o d i f i e d s e l e c t e d v a l u e s t o d i f f e r from t h o s e
o b t a i n e du s i n gt h em a t h e m a t i c a le x p r e s s i o nt h a ts u p p o s e d l yg e n e r a t e dt h e
tables. To overcome t h i s problem i t i s o f t e n r e q u i r e d t o add e x t e n s i v e excep-

|||| |||---
tiontablestothe codes. T h i s makes t h e codes l a r g e and cumbersome t o modify,

|
|||| |||| || || |
and r e s t r i c t s t h e i r use t o l a r g e r computer systems. A l s ow i t ht h ed e v e l o p m e n t
o fb e t t e rm e a s u r i n gd e v i c e s it isoftenpossibletogain more d i g i t s o f p r e c i -

|||| |||| | | ||
sioninthetable p a r a m e t e r s ,n e c e s s i t a t i n gf i n e rg r i do ft h et a b u l a rv a l u e s ,
r e s u l t i n gi nl a r g e r volumes o f p r i n t e d t a b l e s t o be handled.

|
|
Inaddition, as t h eo n - l i n eu s eo fc o m p u t e r sf o rm e t e r i n gp u r p o s e s

| | |
i n c r e a s e s ,t h ed i r e c tu s e of p r i n t e d t a b l e s w i l l decrease; t h e r e f o r e ,t h e new

--
Standard i s an e x p l i c i ti m p l e m e n t a t i o np r o c e d u r er a t h e rt h a n a s e t of equa-
t i o n s o r a s e to ft a b l e s . I t must be remembered t h a t t h e s t a n d a r d i z a t i o n of
t h ei m p l e m e n t a t i o np r o c e d u r ei m p l i e ss t a n d a r d i z a t i o n of t h e s e t o f mathemati-
calexpressions used w i t h i n t h e code. Absoluteadherence t ot h ep r o c e d u r e
willhelptoinsurethatall computers and computercodes o ft h ef u t u r e , meet-
ingthespecifications and r e s t r i c t i o n s , wil I be a b l et op r o d u c et h e same
results. I t i sb e l i e v e dt h a tt h i sp r o c e d u r ew i l la l l o wf o rt h e maximum
machine and codeindependence.The procedure was implemented i n computer sub-
r o u t i n e si s s u e d by API i n 1980 u s i n g ANSI/ASA FORTRAN. The subroutinesmaxi-
m i z e dp r e c i s i o n by t h e u s eo f3 2 - b i ti n t e g e ra r i t h m e t i c .
The p r o c e d u r e a s d e s c r i b e d i n t h e f o l l o w i n g t e x t can, by c a r e f u l and
d e l i b e r a t ea p p l i c a t i o no fn u m e r i c a la n a l y s i s , be used w i t h t h e m a j o r i t y o f
languages and word s i z e s i n p r e s e n t o r a n t i c i p a t e d use. To u s et h es t a n d a r d
procedure means t o m a i n t a i n a b s o l u t e and unwaveringadherence t o t h e number of
digits specified at each s t e p and t o t h e c a l c u l a t i o n p r o c e d u r e a s o u t l i n e d .
I nt h ep r o c e d u r e ,t h en o m e n c l a t u r e used i s t h a t o f ASTM E380-76, unless
an e x p l i c i t p r o c e d u r e i s g i v e n below, i n whichcasetheproceduregivenbelow
overridesthatgiven by ASTM E380-76.
I nt h ep r o c e d u r et h en o m e n c l a t u r e (XXX.XX) means f i v e ( 5 ) m a t h e m a t i c a l l y
significant digits.

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*33~3 VOL*X 80 m 0732290 O526339
- .. 659 m

X-274 CHAPTER11"PHysIcfi PROPERTIES


DATA

The t e r mr o u n d i n ga s used i nt h ep r o c e d u r e means: C o n s i d e ro n l yt h e


f i r s t d i g i t t o t h e r i g h t of t h e d e s i r e d p o s i t i o n and
a. I f t h a td i g i ti sg r e a t e rt h a n 4, i n c r e m e n tt h ed e s i r e dp o s i t i o n by
one and d r o p t h e r e m a i n i n g d i g i t s t o t h e r i g h t o f t h e d e s i r e d p o s i -
tion.
b. I ft h a td i g i ti sl e s st h a n 5, s i m p l yd r o pt h er e m a i n i n gd i g i t st o
therightofthedesiredposition.

Calculation Procedure

|||| |||---
STEP 1: Round i n p u tv a r i a b l e so f API g r a v i t y andobservedtemperature

|
g r a v i t y t o t h en e a r e s t

|||| |||| || || |
a. Round
API
0.1 "APIand c a r r ya s 4 digitresult

|||| |||| | | ||
¡.e.
API g r a v i t y (AP160) = XXX.X
b. Round observedtemperature t ot h en e a r e s t

|
O. 1 OF and c a r r y a s

|
4 digit resu I t

| | |
¡.e. observed
temperature (DEGF) = XXX.X

--
STEP 2: Calculate At
define A t = DEGF - TBASE
Note:TBASE c a r r i e d t o 3 d i g i t s XX.X (60.0)
Carry A t = XXX.X

STEP 3: C a l c u l a t i o no f VCF
def ¡ne VCF = EXPI- a A t ( 1 .O + 0.8 a A t ) l
= EXP[- a A t - 0.8 a 2 A t 2 ]
a. C a l c u l a t i o noef x p o n e n t
a( 1 ) a A t = .XXXXXXXX
a(2) .8 a A t = .XXXXXXXX
a(3) .8 a 2 A t 2 = .XXXXXXXX
a(4) - aAt - 0.8 a2 A t 2 = 0.XXXXXXXX w i t h any t r a i I i n g
d i g i t s dropped
b. C a l c u l a t i o no e
f xponential
VCF = EXP[- a A t - 0.8 a2 A t 2 ] = X.XXXXXX
using at least the first 7 terms of t h e power s e r i esexpansion
of ex

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*IIII.L V O L * X 80 0732290 0526140 370 m

SECTIONV VOLUME
FACTORS
CORRECTION X-275

Computat iona I =
v a l u e o f VCF

T a b l e va I ue
c 1.XXXX

0.XXXXX
rounded t on e a r e s t 0.0001

rounded t o n e a r e s t 0.00001
i f VCF

i f VCF
L 1
1

of VCF = X.XXXX rounded VCF t o n e a r e s t 0.0001


--

The 1980 i n t e y e r FORTRAN code issued by AP I c o n t a i ned an i n t e g e r mu I t i-


| | |
|

p l i c a t i o na l g o r i t h m . A d e s c r i p t i o ni sc o n t a i n e di nt h ef o l l o w i n g :
|
|||| |||| | | ||

INTEGER MULTIPLICATION PROCEDURE


|||| |||| || || |

(FOR 32BIT ARITHMETIC)

DATA DEFINITION
|
|||| |||---

X,
Y areinteger numbers t h a t a r e equa I t o o r l e s s t h a n 2 * lo9
( s l i g h t l yl e s st h a n $1). A l a r g e rv a l u e may c a u s eo v e r f l o w I. na d d i t i o n ,
thetotal number of d i g i t s i n X and Y mustnot exceed 17, o t h e r w i s eo v e r f l o w
will occur.
Z istheproduct XY s c a l e d by lom8, i .e. Z = XY/108
Note: I f it i s d e s i r a b l e t o o b t a i n maximum p r e c i s i o n , X and Y may be
s c a l e d up p r i o r t o use of t h ep r o c e d u r e .T y p i c a l l y ,a tl e a s t 15 d i g i t s a r e
needed t o o b t a i n 6 d i g i t p r e c i s i o n , 16 f o r 7 and 17 f o r 8.
The l a r g e s t v a l u e s of X and Y t h a t may be used a r e 2 O00 O00 O00 and
99999 999. ( E i t h e rv a l u e s may beused f o r X and Y ) .
CALCULATION
x/10000 = u1
10000 U 1 = K i
X - K1 = V1
Y/10000 = u2
10000 U2 = K2
Y - K2 = V2
(UIV2) + (U2V1) + (V1V2/10000) = K3
(K3 + 5000)/10000 + (U1U2) = Z
Note: Z hasbeen sca I ed by lom8 and may have t o be resca I ed b e f o r e use.
TOTAL DIGITS I N X AND Y 1 2 14 13
" " "
15 16 17
DIGITS I N PRODUCT, Z 3-4 4-5 5-6 6-7 7-8 8-9

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
X-276 CHAPTER
1 PHYSICAL PROPERTIESDATA

Examples ForCheckout

The f o l l o w i n g examples a r ed e s i g n e d t oa i di nc h e c k o u tp r o c e d u r e sf o r
boththeexisting API s u b r o u t i n e andany subroutineswhicharedevelopedusing
t h ei m p l e m e n t a t i o np r o c e d u r eo u t l i n e d above. The l i n e so ft h e examples a r e
numbered t o correspond t o t h e c o r r e s p o n d i n g l i n e s w i t h i n t h e c a l c u l a t i o n p r o -
cedure.

EXAMPLE 1: Assume a l i q u i dp e t r o l e u mp r o d u c tw i t h an i n p u tc o e f f i c i e n t of

|||| |||---
thermalexpansioncorrected t o 60"F o f 0.0004181andan observed

|
|||| |||| || || |
temperature of 105.03"F. C a l c u l a t et h e VCF r e q u i r e d t o c o r r e c t
t h e volume t o 60 "F, c o r r e c t t o 4 decimal d i g i t s .

|||| |||| | | ||
STEP 1 : a. rounded ALF60 = 0.0004180

|
|
b. rounded DEGF = 105.0

| | |
--
STEP 2: A t = 45.0

STEP 3 : C a l c u l a t i o n of e x p o n e n t i a l
a. C a l c u l a t i o n of exponent
a( 1 ) 0.01881000
a(2) 0.0150480
a(3) 0.00028310
a(4) -0.0190931
b. C a l c u l a t i o noef x p o n e n t i a l
VCF = 0,9810881

VCF c o r r e c t t o 4 decimal d i g i t s = 0.9811

EXAMPLE 2: Assume a l i q u i dp e t r o l e u mp r o d u c tw i t h an i n p u tc o e f f i c i e n t of
thermalexpansioncorrected t o 60 "F of 0.0005625andan observed
temperature of 39.1 'F. C a l c u l a t et h e VCF r e q u i r e d t o c o r r e c t t h e
volume t o 60 "F, correct to 5 significantfigures.

STEP 1 : a. rounded ALF60 = 0.0005625


b. rounded DEGF = 39.1

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*11.1 VOLWX 80 m 0732290 0526142 L43 m

SECTIONVOLUME CORRECTION FACTORS X-277

STEP 3: C a l c u l a t i o no fe x p o n e n t i a l
a. C a l c u l a t i o coef x p o n e n t
a( 1 ) -0.01 17563
a(2) -0.0094050
--

a(3) 0.0001106
| | |
|

a(4) 0.0116457
|
|||| |||| | | ||

b. C a l c u l a t i o no ef x p o n e n t i a l
VCF = 1.0117138
|||| |||| || || |

VCF c o r r e c t t o 5 s i g n i f i c a n t f i g u r e s = 1.0117
|
|||| |||---

EXAMPLE 3: Assume a l i q u i dp e t r o l e u mp r o d u c tw i t h an i n p u t c o e f f i c i e n t o f
thermalexpansioncorrected t o 60 O F o f 0.0003355andan observed
t e m p e r a t u r eo f 269.4"F. Ca I c u l a t e t h e VCF r e q u i r e d t o c o r r e c t t h e
volume t o 60 OF, correct to 5 significantfigures.

STEP 1: a. rounded ALF6O = 0.0003355


b. rounded DEGF = 269.4

STEP 2: A t = 209.4

STEP 3: C a l c u l a t i o no e
f xponential
a. C a l c u l a t i o noef x p o n e n t
a(1) 0.07025370
a(2) 0.05620300
a(3) 0.0039485
a(4 1 -0 .O742022
b. C a l c u l a t i o noef x p o n e n t i a l
VCF = .928484

VCF c o r r e c t t o 5 s i g n i f i c a n t f i g u r e s = 0.92848

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API MPMS*LZ-L V O L * X 80 m 0732290 0526343 O B T m

x-278 CHAPTER DATA


1 P PHYSICAL PROPERTIES

11.1.53 TABLES 53A and 536-Correction TABLE 53B GeneralizedProducts


of Observed Densityto Density at (see Volume VIII)
15°C The development and intendeduse of these tables is
described in 11.1.6. The parameters KOand K I may be
Tables 53A and 53B give values of density in kilo- found in 11.1.54.7.1 (see Volume IX).
gram per cubic metre for afluid at 15°C corresponding The limits of these tables are illustrated in Figures,
to densities (kg/m3) of that fluid at temperatures other X-14 and X-15.
than 15°C. It is assumed that the observed densities are
obtained with a glass hydrometer. The density measure-
ments at temperatures other than 15°C require two cor-
rections: the first is for the changein the volume of the 1 1.153.1 TABLE 53A-GENERALIZED CRUDE
glass hydrometer with temperature, the second is for OILS, CORRECTION OF OBSERVED
the changein the volume of the fluid with temperature. DENSITY TO DENSITY AT 15°C
The first correction is necessary because the glass hy- TABLE 53A gives the value of density in kilogram
drometers are calibrated for 15°C. Both corrections are per cubic metre at 15°C corresponding toa hydrometer
applied in this table. reading at observed temperatures other than 15°C. In
The data are represented by two tables to maximize converting the hydrometer reading at the observed tem-
accuracy while maintaining convenience of use: perature to the corresponding density at 15"C, twocor-
TABLE 53A GeneralizedCrude Oils rections are necessary: the first arises from the change
(see Volume VII) in volume of the glass hydrometer with temperature

150

120
Temp 90 95
"C
60

-18
778.5 824.0 1075.0 61O. 5

Density KG/M3
Figure X-14 - Data Limits for TABLE 53A

150

120
Temp
"C DO 95
60

-18
778.5
1075.0 824.0 653.0

Density KG/M3
Figure X-15 - Data Limits for TABLE53B
-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
SECTIONVOLUME
FACTORS
CORRECTION X-279

(stem correction) and the second from the change in TABLE 53A results are tobe used as entries to TABLE
volume of the crude oil with temperature. Both have 54A.
been applied in this table. Thevalues of density at 15°C
in this table are the result of a computer procedure Some countries which have historically used a metric
which is the Standard (see 11.1.53.2 and 11.1.53.3). system have retained for field use units such as g/mL,
The temperature ranges of this table are: g/cc, or kg/L. This practice was consistent with pre-
"CDensity, kg/m3 viously published API/IP measurement tables which
610 to 778 -18 to 95 have been replaced by this 1980 edition. In these in-
778 to 824 -18 to 125 stances where field measurements of density are re-
824 to 1075 -18 to 150 corded in g/mL, g/cc, or kg/L, multiply the measure-
ments by lo00 to obtain kg/m3prior to entering TABLE
The values of density at 15" C given in this table are 53A.
based on data from the U.S. National Bureau of Stan-
dards and from other published data. Portions of the
This table must be entered with a hydrometer
density and temperatureranges represent areasbeyond
reading measured with a soft glass hydrometer
these data. Thus, mathematical techniques were em-
calibrated at 15°C and with an observed tempera-
ployed to extrapolate beyond the density and tempera-
ture.
ture ranges of the given data to determine the value of
the density at 15°C for these areas. These values are A correction to the glass hydrometer reading
denoted by an asterisk (*). Extension of this table has been incorporated into the table to account
beyond the ranges shown is not recommended. for the thermal expansion of glass. The hydrom-
Increments used in this table for determining density eter constant, as defined in the Report on the De-
at 15°C are 0.25"C and 2kg/m3. Interpolation with tem- velopment, Construction, Calculation, and Prep-
perature is not intended since there is no practical meth- aration of the ASTM-IP Petroleum Measurement
od of interpolation that will produce the accuracy ob- Tables (1960), varies with temperature according
tainable from theStandard.However, interpolation to the following:
with density to one additional significant digit can be HYC = 1 - 0.000023(t - 15°C)
reasonably made. interpolation is not required if the - 0.00000002(t - 15"C)2

11.1.53.2 PROGRAM DOCUMENTATION FOR SUBROUTINE TAB53A-


GENERALIZED CRUDE OILS, CORRECTION OF OBSERVED
DENSITY TO DENSITY AT 15°C
ABSTRACT

Subroutine Title: TAl353A - TABLE 53A, Generalized


Crude Oils,
Density Correction to 15 OC.

Description: This subroutine is designed to c a l c u l a t e the


d e n s i t y at 15 "C corresponding to d e n s i t i e s
observed a t temperatures other than 15 OC.

Program Responsibility: American Petroleum I n s t i t u t e


Measurement Coordination
2101 L Street N.W.
Washington , D .C. 20037

Date Issued: August 1980


-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMSULL-L VOL*X BO m 0 7 3 2 2 9 0 052bL45 952 W

x-280 1 PHYSICAL PRoPmnEs DATA


CHAPTER

Language : IWSI/ASA Standard

Reference : API Standard 2540, WLE 54, 11.l. 54

?HIS !XJBRXJTINE W DEVELQPED USING !EIE "XEMATICAL AI%oRITHMS


AND SPECIFICATIONS DESCRIBED I N 'ME DXUMENT PRXEWRE
11.1.53.3. ANY MalIFICATION 'IO ?HIS SUBROUTINE MLJST NGIDLY
ADHERE 'IO ?HE SAMEAIX;ORITHMS AND SPEIFICATIONS .
11.1.53.2.1 Introduction

TAB53A is a amputer subroutine designed to c a l c u l a t e for substances


c h a r a c t e r i z e d as crude o i l the value of density a t 15 degrees C e l s i u s
(OC) m densities &
corresponding i ser
ved a t temperatures other than
15 OC. !The subroutine xcepts as input the &served d e n s i t y rounded tD
the n e a r e s t O. 5 Kg/m3 and the temperaturerounded tD the n e a r e s t
O .O5 OC. If either i n w t v a l u e has not been properlyrounded, the
subroutine w i l l round the values and r e t u r n the a r r e c t e d v a l u e s . The
s u b r o u t i n e r e t u r n s the value of the &nsity
at 15 OC rounded to the
nearest 0.1 Kg/m3 and a s t a t u s f l a g for user amvenience. The f l a g is
set to -1 if an error condition occurs and to +1 if the value of the
d e n s i t y at 15 OC is anextrapolation. The limits of the a x r e l a t i o n
including the extrapolated region are depicted in Figure X-14. The calling
program rmst check the f l a g and prr>v ide mer w i t h appropriate warning
message or programtermination. Tne f l a g is set b zero when the input
v a r i a b l e s and the d e n s i t y a t 15 O C are within the l i m i t s of the
correlation.

11.1.53.2.2 SubroutineSpecifications

The range of a p p l i c a t i o n is:


Density, Kq/m3 Temperature, OC

610.5 to 778.5 -18.00 b 95.00


779.0 to 824.0 -18.00 to 125.00
824.5 to 1075.0 -18.00 to 150.00

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*33-3 VOL*X B O W 0732270 0526346 B99 W

SECTIONV VOLUME
FACTORS
CORRECTION x-281

Referencedmxlules: ALF53A,
DIV53A,
MPY53A,
VCF53A
Fortranfunctions: FLOAT, IABS

Averageexecution time: 950 entries/CPUsecond


IM 370/168
B

The subroutines are w r i t t e n i n M I / A S A FORTRAN using integer arithmetic.


The s i z e and storage requirements are:
1. Compilable source
statements 122
2. Decimalbytes
storage 3464
3. Words 866

11.1.53.2.3 C a l l i n s Sesuence

CALL TN353A (IMO, D E , IHYDKJ, Iw015, IE'LAG)

INPUT DESCRIPTION

IMO - Density at &served t e p r a t u r e , Kg/m3


(IMO returned w i l l be rounded m nearest 0.5 Kg/m3)

DEGC - Observed tenperature, OC

( D m r e t u r n e d w i l l be rounded b nearest 0.05 "C)

I
H YDF
O - Hydrometer switch
O: The d e n s i t y w a s &served with a g l a s s &dm-
meter and a hydrometer m r r e c t i o n is needed
1: The d e n s i t y w a s determined from an m - l i n e
densitometer and a hydrometer m r r e c t i o n i s mt
needed.

RH015 - Correspondingdensity a t 15 OC a nearest 0.1 Kg/m3


rounded i
IFLAG - Status Code
O: Indicates inputvariables and c a l c u l a t e dr e s u l t s are
w i t h i n the range of + p l i c a t i o n

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
X-282 1 PHYSICAL PROPERTIES
CHAPTER DATA

1: Indicates i n p u tv a r i a b l e s are inextrapolatedregion


-1: I n d i c a t e s inplt v a r i a b l e s ar c a l c u l a t e dr e s u l t s are
o u t s i d e the range of a p p l i c a t i o n

NCf
I
E : If a non-convergence occurs, the s u b r o u t i n ep r i n t s the following
message:

AT XXX.XX DEGREES C AND =.X KG/CU Y


IF
R
lE,A CKlRRESPoNDING
DENSITY RF 15 O C CUJL,D KT BE DETERMINED.

This message should not occur unless the d e has been a l t e r e d or


incorrectlyreproduced. Follow Section 11.1.53.3,Implementation
Prccedure, and test the subroutineexactly as described. The s t a t u s
f l a g w i l l be set b -1, EM015 to -999.9 , and program

|||| |||---
control returned
to the c a l l i n g m u t i n e .

|
|||| |||| || || |
|||| |||| | | ||
11.1.53.2.4 Method of Calculation

|
|
| | |
This subroutine uses a amvergencetechnique to determine the density a t

--
15 OC that m r r e s p m d s to a density observed at some temperature other
than 15 OC.

O
The c o e f f i c i e n t of t h e r m a le x p a n s i o n a t t h eb a s et e m p e r a t u r e of 15 C is
related to density a t t h eb a s et e m p e r a t u r eb y

- - KO + -K 1
a15 2
15
P 15

The v a l u e s o f t h e d e n s i t y a t temperature t , p t , and a I 5 are used i n t h e


volumecorrectionfactorequationtocompute pI5.

P t
- + 0.8a15At)
VCF =
15
= EXP
I
COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
SECTION V VOLUME
FACTORS
CORRECTION x-283

when p15 = density at the base temperature

At = t - 15.0

Since the equationfor a successive p15 cannot be s o l v e de x p l i c i t l y ,


approximationiterative scheme is used ta & t a i n a solution. The i n i t i a l
estimate of p is the value of the d e n s i t y at &
ser
ved temperature t.
15
Thisapproximation the r i g h t hand side of the equation
is s u b s t i t u t e d i n t o
to o b t a i n a secondvalueqproximation. mis process o fs u b s t i t u t i n g into
the r i g h t hand side of the equation and estimating a m w value from the
two c o n s e c u t i v e r e s u l t s are in agreement ta the
other i s r e p e a t e d u n t i l
desireddegree of accuracy.Insubroutine TAB53A, a mnvergedsolution is
3
reached when the change i n d e n s i t y is less than O .O5 Kg/m i n two
successive passes.

A f u l l e x p l a n a t i o n of the equations and the values of the parameters


KO and K 1 may be found in API Standard 2540, 'ITIBLE 54, 11.1.54.

11.1.53.2.5 Examples

Theseexamples are d t o r i a l i n n a t u r e and are not intended to be s u f f i -


cientforsubroutinecheckout. The examplesgivenin the Implementation
Procedure, Section 11.l. 53.3, are to be used for the amputer checkout.

Example 1

RHO = 846.0 (observed w i t h a g l a s s hydrometer)


DEGC = 59.25
IHYDRo= o

CALL TAB53A (RHO,DEGC,IHYDw>,~15


,IFLAG)

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API MPMS*33*3 V O L * X 80 m 0 7 3 2 2 9 0O 5 2 6 3 4 9 5T8 m

x-284 CHAPTER
1 PHYSICAL PROPERTIES
DATA

After
the call : IMO = 846.0
DEGC = 59.25
IHYDFO = o
RH015 = 876.4
IFLAG = O

Example 2

IWO = 786 .ll (observed with a g l a s s kydrometer)


DEGC = 109.49
1mm= o

CALL W 5 3 A (RHO,DEGC,IHYD€0,RH015 ,IFLAG)

Afterthe call : RHO = 786 .O


DEGC = 109.5
1mm= o
--

IMO15 = 835.5
| | |
|

IFLAG = 1
|
|||| |||| | | ||
|||| |||| || || |
|
|||| |||---

Example 3

RHO = R 4 .O (observed w i t h a g l a s s hydrometer)


DEW = 110 .O
1mm= o

CALL W 5 3 A (RHO,DEGC,IHYD€43,RHO15,IFLAG)

A f t e r the call: IMO = 774.0


DEGC = 110 .O
IHYDrn = o
RH015 = -999.9
IFLAG = -1

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL.L VOL*X 80 m 0732290 0526350 2LT m

~~
SECTIONVOLUME
FACTORS
CORRECTION X-285

11.1.53.2.6 FLOWCHART

INPUT: DENSITY AND


OBSERVED TEMPERATURE

ROUND INPUT OATA


TO SPECIFICATIONS
--
| | |
|
|
|||| |||| | | ||

No SET
STATUS
FLAC -1
BOUNDS OF *AND 1S.C OENSITY = -999.9
|||| |||| || || |

RETURN
|
|||| |||---

Y ES
V

L1J
CnLCULATEDELTAT

HYDROMETER
CORRECTION
NO
*

I COMPUTE
HYDROMETER CORRECTION I

APPLY
HYDROMETER CORRECTION TO DENSITY
I
I-

1I N l T I R L I Z E 15'C DENSITY ]

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API M P M S * L L * L V O L * X 80 m 0732290 0526151 156 m

X-206 CHAPTER
1 P PHYSICAL PROPERTIES
DATA

?
+
CALCULATE ALPHA

CALCULATE VCF
--
| | |

I I
|

CALCULATE NEW
|
|||| |||| | | ||

1S'C DENSITY
|||| |||| || || |
|

NO
|||| |||---

I
SETSTATUSFLAC = -1
W I TLHI M
I NI T S No ANO 15'C DENSITY -999.9
F CORRELATIO RETURN

SET
STATUS FLAC =

I No

I SET STATUSFLAG
RETURN
= O
I
COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
SECTIONVOLUME
FACTORS
CORRECTION X-287

11.1.53.2.7 Subroutine L i s t i n s

TAE353A This subroutine accepts d e n s i t y and the observation


temperature and determines the corresponding density a t 15 O C

for Generalized Crude O i l s .

|||| |||---
Referenced Modules

|
|||| |||| || || |
ALF53A This module c a l c u l a t e s the cogff i c i e n t of thermal expansion

|||| |||| | | ||
needed b determine a volume m r r e c t i o n f a c t o r .

|
This module is designed t
m produceadditionalaccuracy from

|
DIV53A

| | |
an integer divide.

--
MPY53A Thismdule is designed b produceadditionalaccuracy from
an integer mltiplication.

VCF53A This- module c a l c u l a t e s a volume c o r r e c t i o n factor.

53A0001 O
C 53A00020
C ( C ) COPYRIGHT 1 9 8 0 53A00030
C AMERICAN PETROLEUM INSTITUTE 53A00040
C ALLRIGHTS RESERVED 53AOOO50
C 53A00060
C T H I S SUBROUTINE IS A VOLUNTARYSTANDARDAND WAS DEVELOPED 53A00070
C UNDER THE AUSPICES OF THE JOINTAPI-ASTM COMMITTEE ON STATIC 53A00080
C PETROLEUM MEASUREMENT I N PART FROM DATA GENERATED BY A 53A00090
C PROJECT FUNDED BY THE AMERICAN PETROLEUM INSTITUTE AT THE 53A001 O0
C U . S . NATIONAL BUREAUOF
STANDARDS, GAITHERSBURG, MARYLAND. 53A0011 O
C 53A00120
C INQUIRIES CONCERNING I T SA P P L I C A T I O N SHOULD BE ADDRESSEDTO 53A00130
C 53A00140
C AMERICAN PETROLEUM INSTITUTE 53A00150
C MEASUREMENT COORDINATION 53A00160
C 2 1 0 1 L STREET, N.W. 53A00170
C WASHINGTON, DC 2 0 0 3 7 53A00180

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API
MPMS*33.3 VOL*X 80 M 0732290 O526353 T 2 9 m

x-288 1 PHYSICAL
CHAPTER DATA
PROPERTIES

C 53A00190
****************************<'***~~*d*d****************************
C 53A00200
C * <c
53A0021 O
C * T H I S SUBROUTINE OR THE MATHEMATICAL RELATIONSHIPS * 53A00220
C * REPRESENTED THEREBY MAY BE USED BY ANYONE WISHING * 53A00230
C * TO DO SO, BUT THE AMERICAN PETROLEUM I N S T I T U T E , THE 9 53A00240

C * AMERICAN SOCIETY FOR TESTING AND MATERIALS, AND THE * 53A00250


C * INSTITUTE PETROLEUM
OF AND THEIRRESPECTIVE MEMBERS AND * 53A00260
C * THE U . S . NATIONAL BUREAU OF STANDARDS, SHALL NOT BE HELD * 53A00270
C * RESPONSIBLE OR L I A B LIE N ANY
WAY
FROM LOSS OR DAMAGE, d 53A00280
C * INCLUDING, BUT NOT L I M I TTEOD, CONSEQUENTIAL DAMAGE, 8 53A00290
C * RESULTING FROM SUCH USAGE OR FOR VIOLATION OF ANY FEDERAL, * 53A00300
C * STATE, OR MUNICIPAL LAWS, REGULATIONS OR PRACTICES OF THE * 53A0031 O
C * STATES
UNITED OR OF ANY FOREIGN COUNTRY. * 53A00320
C * * 53A00330
t********t*d*******C~****~~d*~:~************<~***********ddd*******~'*
C 53A00340
C 53A00350
C PURPOSE 53A00360
C 53A00370
C T H I S SUBROUTINE I S DESIGNED TO ACCEPT AS INPUT A DENSITY (RHO) 53A00380
C AT SOME OBSERVED TEMPERATURE (DEGC) I N DEGREES CELSIUS 53A00390
C AND CALCULATE THE CORRESPONDING DENSITY(RH015) AT 1 5 DEGREES 53A00400
C CELSIUS FOR TABLE 5 3 A , GENERALIZED CRUDE O I L S . 53A0041 O
C THEUSEOF A GLASS HYDROMETER CORRECTION I S OPTIONAL. 53A00420
C 53A00430
C EXTERNAL FUNCTIONS OR SUBPROGRAMS 53A00440
C 53A00450
C ALF53A, DIV53A, MPY53A, VCF53A 53A00460
C FORTRAN FUNCTIONS: FLOAT, IABS 53A00470
C 53A00480
C DESCRIPTION OF PARAMETERS 53A00490
C 53A00500
C RHO -
DENSITYAT OBSERVED TEMPERATURE, NEAREST .5 (5I N
3A ) 0051 O
C KG/CU METRE (PROGRAM WILL ROUND RHO TOTHE 53A00520
C NEAREST . 5 KG/CU METRE AND RETURN THE 53A00530
C ROUNDED VALUE.) 53A00540
C DEGC -
OBSERVED TEMPERATURE, NEAREST . O 5 DEG C 5 3 A 0( I0N5)5 0
C (PROGRAM W I L L ROUND DEGC TO THE NEAREST .O5 53A00560
C DEG C ANDRETURNTHEROUNDED VALUE.) 53A00570
C IHYDRO - APPLICATION OF GLASS HYDROMETER CORRECTION 5 3 A 0( I0N5)8 0
C O - HYDROMETER CORRECTION I S TO BEMADE 53A00590
C 1 - HYDROMETER CORRECTION I N NOT TO BE MADE 53A00600
C RH015 - CORRESPONDING DENSITYAT 1 5 DEGREES C (OUT) 53A0061 O
C (ROUNDED TO THE NEAREST . 1 KG/CU METRE) 53A00620
C I F L A G - STATUS CODE (OUT) 53A00630
C O -
INPUT AND CALCULATED RESULTS I N CORRELATION L I M I T S5 3 A 0 0 6 4 0
C 1 - INPUT OR CALCULATED RESULTS I N EXTRAPOLATED REGION 53A00650
C - 1 - INPUT OR CALCULATED RESULTS NOT W I T H I N
LIMITS OF 53A00660
C CORRELATION 53A00670
C BASE TEMPERATURE ( 1 5 DEGREES 53A00680C)
DATA IBASE / 1 5 0 0 / 53A00690
C AND UPPER LOWER DENSITY 5 3 A L0 I0M7 I0T0S
DATA LIM1 , 5L3IAM 006
20277
/1/ 16017 4 9 8 2 , O
C 53A00720
C BREAK POINTS FOR DENSITY RANGES ( 7 7 8 . 5 AND 8 2 4 5 . )3 A 0 0 7 3 0
IDATA
BP2 IBP1, 8 2 4/ 0 07 7 8 5 0 , / 53A00740
C 53A00750
C MAXIMUM TEMPERATURES AT EACH BREAK POINT ( 9 5 , 1 2 5 , 1 5 0 5 3 A 0 0 7 6 0

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API plpplS*ll,.l, VOL*)( 80 0732290 0526154 Tb5

SECTIONVOLUME CORRECTION FACTORS X-289

DATA ITMP1,
ITMP2,
ITMP3 / 1
912
5500 0
,0, 53A00770 /
C 53A00780
C BEGINNING OF TEMPERATURE EXTRAPOLATIONS ( 6 09, 0 , 1 2 0 5 3 A 0 0 7 9 0
DATA I E P 1 I, E P 2 I, E P 3 / 6 0 0 09, 0 0 01, 2 0 0 0 / 53A00800
C 53A0081 O
C DENSITY EXTRAPOLATIONS ( 6 1 0 . 5 - 7 5 8 . ) 53A00820
DATA IERHO / 7 5 8 0 0 / 53A00830
C 53A00840
C COEFFICIENTS FOR CRUDE OILS 53A00850
DATA KO, K1 / 6 1 3 9 7 2 3 , O / 53A00860
C 53A00870
C U N I T 6 I S THE OUTPUT U N I T .I F THE OUTPUT I S TO BE DIRECTED 53A00880
C TO SOME OTHER U N I T , SET' NOUT TO APPROPRIATEVALUE. 53A00890
NOUT = 6 53A00900
C ROUNDRHO TO NEAREST . 5 KG/CU METRE 53A0091 O
IRHO = ( (RHO * 1 0 0 ) 2 5 ) / 50 + 53A00920
IRHO = IRHO * 50 53A00930
RHO = FLOAT(IRH0) / 1 0 0 . 53A00940
C CHECKFOR TEMPERATURE LESS THAN - 1 8 DEG C 53A00950
I F ( DEGC + 1 8 ) 9 0 0 ,1 0 ,1 0 53A00960
C ROUND TEMPERATURE TO
NEAREST .O5 DEG C 53A00970
10 IRD = 25 53A00980
I F ( DEGC ) 1 5 2 , 02
, 0 53A00990
15 IRD = -25 53A01 O00
20 I T = ( (DEGC * 1 0 0 0 ) I R D ) / 50 + 53A01 O 1 O
I T = I T * 5 53A01020
DEGC = FLOAT(1T) / 1 0 0 . 53A01030
C I S RHO LESS THAN 6 1 0 . 5( I F YES, BRANCHTO 900) 53A01040
I F ( IRHO - 6 1 0 5 0 ) 9 0 04, 04, 0 53A01050
C I S RHO GREATER THAN 1 0 7 5 .( I F YES, BRANCH TO 900) 53A01060
40 I F ( IRHO - 1 0 7 5 0 0 ) 5 0 , 5 09, 0 0 53A01070
C I S RHO GREATER THAN 7 7 8 . 5( I F YES, BRANCH TO 70) 53A01080
50 I F ( IRHO - I B P 1 ) 6 06 ,07 ,0 53A01 O90
C I S TEMP GREATER THAN 9 5 .( I F YES, BRANCH TO 900) 53A011 O 0
60 I F ( I T - ITMP1 ) 1 0 01, 0 09, 0 0 53A0111 O
C I S RHO GREATER THAN 8 2 4 .( I F YES, BRANCH TO 90) 53A01120
70 I F ( IRHO - I B P 2 ) 8 08,09,0 53A01130
C IS TEMP GREATER THAN 1 2 5 .( I F YES, BRANCH TO 900) 53A01140
80 IF ( I T -
ITMP2 ) 1 0 01, 0 09, 0 0 53A01150
C I S TEMP GREATER THAN 1 5 0 .( I F YES, BRANCH TO 900 53A01160
90 I F ( I T - ITMP3 ) 1 0 01, 0 09, 0 0 53A01170
1O0 CONT I NUE 53A01180
C 53A01190
IFLAG = O 53A01200
I D T = I T - IBASE 53A0121 O
IRHOT = IRHO 53A01220
C I S HYDROMETER CORRECTION TO BE MADE ( I F NO, BRANCH TO 1 4 0 ) 53A01230
I F ( IHYDRO ) 1 0 1 1 , 0 11 , 40 53A01240
C 53A01250
C COMPUTE HYDROMETER CONSTANT ATDELTA T 53A01260
C HYC = 1 . .000023*(DEGC-15) - .00000002*(DEGC-15)**2 - 53A01270
1 o1 IRD = 5 53A01280
I F( I D T )1 0 5 1
, 101, 10 53A01290
105 IRD = - 5 53A01300
110 I H 1 = (2300 * I D T I R D ) / 1O + 53A0131 O
I H 2 = ( 2 *' I D T * I D T + 5 0 0 ) / 1 0 0 0 53A01320
IHYC = 1 0 0 0 0 0 0 0 0 0 IH1 - IH2 - 53A01330
C 53A01340

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
X-290 CHAPTER 11"PHYSICAL PROPERTIES DATA

C APPLY HYDROMETER
CONSTANT
TO DENSITY AT TEMPERATURE DEGC 53A01350
I R D = IRHO * 1 0 53A01360
CALL MPY53A(IRD,IHYC,IRHOT,lOOOO) 53A01370
IRHOT = ( IRHOT +50 ) / 1 0 0 53A01380
C 53A01390
1 4 0 JRHOT = IRHOT * 1 0 0 0 0 53A01400
C 53A0141 O
I R H 0 1 5 = IRHOT 53A01420
C 53A01430
KRHO = O 53A01440
C 53A01450
NP = O 53A01460
C 53A01470
3 0 0 NP = NP 1 + 53A01480
C 53A01490
CALL ALF53A( IRHO1 5 ,KO, K1, I A L F ) 53A01500
C 53A0151 O
C A L LV C F 5 3 A ( I A L F , I D T , I V C F ) 53A01520
C 53A01530
IVCF = ( IVCF +
50 ) / 1 0 0 53A01540
C 53A01550
CALL DIV53A(JRHOT,IVCF,IRH015,1000) 53A01560
C 53A01570
C 53A01580
I F ( I A B S( I R H 0 1 5 - KRHO ) - 50 ) 5 0 0 , 3 2 0 3, 2 0 53A01590
C 53A01600
320 KRHO = I R H 0 1 5 53A0161 O
C 53A01620
--

IRHO1 5 = ( I R H O l 5 +
5 ) / 10 53A01630
| | |

C 53A01640
|

I F ( NP - 2 0 ) 3 0 04, 0 04, 0 0 53A01650


|
|||| |||| | | ||

C 53A01660
4 0 0I F L A G = -1 53A01670
RH015 = - 9 9 9 . 9 53A01680
|||| |||| || || |

WRITE(NOUT,6001) DEGC, RHO 53A01690


6001 FORMAT(5HO AT , F 6 . 2 , 1 5 H DEGREES AND
C , F 7 . 17, 0 H KG/CU METRE, A53A01700
1 CORRESPONDING DENSITYAT15 C
COULD NOT BEDETERMINED. ) 53A0171 O
|

RETURN 53A01720
|||| |||---

C 53A01730
500 I F ( IRH015 - L I M l ) 5 1 0 , 5 1 0 , 9 0 0 53A01740
510 I F ( IRH015 - L I M 2 ) 9 0 0 , 5 2 0 , 5 2 0 53A01750
C 53A01760
520 JRHOT = ( IRHO15 +
50 ) / 1 0 0 53A01770
C 53A01780
C FLOATING POINT VALUE ROUNDED
NEARESTTO 0.1 53A01790
RH015 = FLOAT(JRH0T) / 1 0 . 53A01800
C I S RHO LESS THAN 758 . O ( I F NO, BRANCH TO 7 7 0 ) 53A0181 O
I F ( IRHO -
IERHO ) 7 6 0 7, 6 0 7, 7 0 53A01820
C SWITCH
SET INDICATING EXTRAPOLATION REGION 53A01830
7 6 0I F L A G = 1 53A01840
RETURN 53A01850
C I S RHO GREATER THAN 7 7 8( .I 5F YES, BRANCH TO 790) 53A01860
7 7 0 I F ( IRHO -
I B P l ) 7 8 07, 8 07, 9 0 5 3 ~ 0 a70
1
C I S TEMPGREATERTHAN 6( I0F. YES, BRANCH TO 7 6 0 ) 5 3 ~ 0 a80
1
780 I F ( I T - I E P l ) 8 2 08,2 07,6 0 53A01890
C I S RHO GREATER THAN 8 2( I4F. YES, BRANCH TO 810) 53A01900
7 9 0 I F ( IRHO - I B P 2 ) 8 0 0 8, 0 0 8, 1 0 53A0191 O
C I S TEMPGREATERTHAN 9( 0I F. YES, BRANCH TO 760) 53A01920

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
SECTIONV VOLUME CORRECTION
FACTORS X-291

800 I F ( I T - I E P 2 ) 8 2 08, 2 0 , 760 53A01930


C I S TEMP
GREATER
THAN 1 2( I0F. YES, BRANCH TO 7 6 0 53A01940
810 I F ( I T - I E P 3 ) 8 2 08,2 07,6 0 53A01950
C 53A01960
820 CONTINUE 53A01970
RETURN 53A01980
C SET SWITCH INDICATING OUTSIDE RANGE
OF TABLE
53A 53A01990
9 0 0I F L A G = -1 53A02000
RH015 = - 9 9 9 . 9 53A0201 O
RETURN 53A02020
END 53A02030

SUBROUTINE DIV53A(INUM,IDENOM,IRES,ISCALE) 53A02040


C 53A02050
C T H I S SUBROUTINE I S DESIGNED TOPRODUCE ADDITIONAL 53A02060
ACCURACY
C FROMAN INTEGER D I V I D E WHERE THE
NUMERATOR 53A02070
C I S ISCALE GREATER THAN THE DENOMINATOR. THE SUBROUTINE 53A02080
ASSUMES
C PROPER SCALING OF BOTH THE INPUT NUMERATOR 53A02090
C AND
DENOMINATOR AND WILL RETURN THE RESULTS MULTIPLIED 53A021 O0
BY C ISCALE. 53A0211 O
C 53A02120
IRES1=INUM/ IDENOM 53A02130
IRES2=(INUM-IRES1*IDENOM)*ISCALE/IDENOM 53A02140
IRES=IRESl*ISCALE+IRES2 53A02150
RETURN 53A02160

|||| |||---
END 53A02170

|
|||| |||| || || |
SUBROUTINE A L F 5 3 A ( I R H O , K O , K l , I A L F ) 53A02180
C 53A02190

|||| |||| | | ||
C T H I S SUBROUTINE I S DESIGNED TO CALCULATE ALPHA FOR 53A02200
C USE I N DETERMINATION OF VOLUME CORRECTION 53A0221 O
C FACTOR. ALTHOUGH ALL CALCULATIONS ARE DONEAS INTEGERS, 53A02220

|
|
C THE SUBROUTINE RETURNS WITH A8 D I G I T VALUE 53A02230

| | |
C 53A02240

--
C INPUTVARIABLES 53A02250
C IRHO=DENSITY”lOO(KILOGRAMS/CUBIC METRE) 53A02260
C KO,K1=COEFFICIENTS OF DESIRED CURVE * 1 0 0 0 0 53A02270
C 53A02280
C ALGORITHM- 53A02290
C ALPHA=KO/RHOQ*2+K1/RH0 53A02300
C 53A0231 O
C CALCULATE K1 /RHO 53A02320
C 53A02330
INUM=K1*1 O000 53A02340
CALL DIV53A(INUM,IRHO,IALFl,lOOOO) 53A02350
C 53A02360
C CALCULATE KO/RH0**2 53A02370
C 53A02380
INUM=KO * 1O0 53A02390
CALL DIV53A(INUM,IRHO,IALFS,lOOOO) 53A02400
CALL DIV53A(IALFS,IRHO,IALF2,10000) 53A0241 O
I A L F = ( I A L F l + I A L F 2 + 5 0 0) / l o 0 0 53A02420
RETURN 53A02430
END 53A02440

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I M P M S + L L * L V O L X X 80 m 0732290 0 5 2 b L 5 7b 7 4 m

X-292 1 PHYSICAL
CHAPTER DATA
PROPERTIES

SUBROUTINE V C F 5 3 A ( I A L F , I D T , I V C F ) 53A02450
C 53A02460
C T H I S SUBROUTINE I S DESIGNED TO CALCULATE VOLUME 53A02470
C CORRECTION FACTOR. ALTHOUGH ALL CALCULATIONS ARE DONE 53A02480
C AS INTEGERS, THE SUBROUTINE RETURNS WITH A 8 53A02490
C OR 9 D I G I T VALUE DEPENDENT
UPON
WHETHER IDT 53A02500
C I S POSITIVE OR NEGATIVE. 53A0251 O
C 53A02520
C ALGORITHM- 53A02530
C VCF=EXP(-ALPHA*DT(1.0+0.8*ALPHA*DT)) 53A02540
C 53A02550
C CALCULATE ALPHA*DT 53A02560
C 53A02570
ITERMl=IALF*IDT 53A02580
C 53A02590
C CALCULATE 0.8"ALPHA"DT 53A02600
C 53A0261 O
ITERM2=ITERM1/5*4 53A02620
C 53A02630
C CALCULATE EXPONENT-ALPHA"DT(l.O+0,8*ALPHA*DT) 53A02640
C 53A02650
CALL MPY53A(ITERM1,ITERM2,ITERM3,10000) 53A02660
C 53A02670
ITERM3 = ITERM1 + (ITERM3+5)/10 53A02680
I X = -ITERM3/1 O 53A02690
C 53A02700
C CALCULATE EXPONENTIAL(F1RST 7
TERMS
OF POWER SERIES) 53A0271 O
C 53A02720
ISUM1=1 O O O O O O O O + I X 53A02730
CALL MPY53A(IX,IX,ISUM2,1000) 53A02740
ISUM2=((ISUM2+50)/100)/2 53A02750
CALL MPY53A(IX,ISUM2,ISUM3,1000) 53A02760
ISUM3=((1SUM3+50)/100)/3 53A02770
CALL MPY53A(IX,ISUM3,ISUM4,1000) 53A02780
ISUM4=( ( I S U M 4 + 5 0 ) / 1 0 0 ) / 4 53A02790
CALL MPY53A(IX,ISUM4,1SUM5,1000) 53A02800
ISUM5=((1SUM5+50)/100)/5 53A0281 O
CALL MPY53A(IX,ISUM5,1SUM6,1000) 53A02820
ISUM6=((1SUM6+50)/100)/6 53A02830
IVCF=ISUM1+ISUM2+ISUM3+ISUM4+ISUM5+ISUM6 53A02840
RETURN 53A02850
END 53A02860

SUBROUTINE M P Y 5 3 A ( I X , I Y , I Z , I S C A L E ) 53~02870
C T H I S ROUTINE PERFORMS INTEGER MULTIPLICATION. THE TOTAL 53A02880
C NUMBER OF D I G I T S I N I X AND I Y MUST NOT
EXCEED 1 7 . OTHER 53A02890
C WISE, OVERFLOW W I L L OCCUR. 53A02900
C 53A0291 O
I U 1 = I X / ISCALE 53A02920
K1 = ISCALE * I U 1 53A02930
I V 1 = I X - K1 53A02940
I U 2 = I Y / ISCALE 53A02950
K2 = ISCALE * I U 2 53A02960
I V 2 = I Y - K2 53A02970
K3 = I U 1 * I V 2 I U 2I V 1 +
I V 1 * I V 2 / ISCALE + 53A02980
I Z = ( K 3 + I S C A L E / 2 ) / ISCALE IU1 * IU2 + 53A02990
RETURN 53A03000
END 53A0301 O

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
SECTIONVOLUME
FACTORS
CORRECTION X-293

11.1 S3.3 IMPLEMENTATION PROCEDURE FOR SUBROUTINE TAB53A

The use of the conputer has gained widespread acceptance throughout the
--
| | |

petroleum industry. Computers are used for accounting gurpses , i n


|
|
|||| |||| | | ||

process simulation and d e l i n g , data r e t r i e v a l and evaluation, and are


now being used extensively i n custody transfer measurements and trans-
|||| |||| || || |

actions.In 1968 ? the American Petroleum Institute recognized the need


f o r i n c o r p o r a t i n g e x i s t i n g petroleum measurement tables i n t o computer
|
|||| |||---

code. I n Juneof1973, a subroutine for TABLE 6 , Volume Reduction tm


60 O F , w a s made available.Sincethen many of the other standardized
petroleum measurement tables havebeen made a v a i l a b l e as cornplter
subroutines.

mever,thecomputerizationof an e x i s t i n g table of numbers proved to be


av e r yd i f f i c u l tt a s k . For instance, it proved to k e impossible to use
t h e mathematical expression that w a s supposedly used to generate the table
values and c a l c u l a t ev a l u e si d e n t i c a l to the tabular e n t r i e s .
This w a s
because sore of the values entered into the tables had been s l i g h t l y
modified and also because the procedures used to round the calculated
values were inconsistent.

The only way to Overcome these woblern in axomputer subroutine was to


manually locate all the table e n t r i e s that did mt agreewith the calcu-
lated values. andadd extensive"exception tables" to the code. This made
t h e d e lengthy and mmewhat cumbersome to m d i f y and to some extent
restricted its use to largermnputingsystems.

The wrking group for TABLE 6 revision realized the importance of elimi-
n a t i n g any p o t e n t i a l for such problems i n the f u t u r e and also recognized
t h e reed to have amputer subroutines available at the time the n e w
petroleum measurement tables were released. The workinggroup decided to
o u t l i n e an explicit irrplementationprocedure to be follow& when using the
new c o r r e l a t i o nf o r volume a x r e c t i o n f a c t o r s . This implementation
procedure would then be the Standard rather than a set of equations or set
of tables. Standardization of an implementationprocedure implies
s t a n d a r d i z a t i o n of the set of mathematical expressions used within the
computer code. Absoluteadherence to the outlined procedure w i l l insure

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I M P M S * L L - L V O L V X 80 0732290 0526359 447

X-294 CHAPTER DATA


1 P PHYSICAL PROPERTIES

t h a t all mn-puters and a m p u t e r codeof the future, meeting the stated


s p e c i f i c a t i o n s and r e s t r i c t i o n s , w i l l be able txI produce i d e n t i c a l
results. Such a procedure allows for the maximum machine and code
independence.

The implementationprocedure as described i n the following t e x t can by


c a r e f u l and deliberate a p p l i c a t i o n ofnumericalanalysis be followed
through the majority of language andword s i z e s i n present and a n t i c i p a t e d
use. T o follow the standardproceduremans&solute and unwavering
adherence to the number of d i g i t s specified a t each s t e p and to the
c a l c u l a t i o n a l p r o c e d u r e as o u t l i n e d .

In the procedure, the m m e n c l a t u r e d i g i t s (XXX.XX)means m a t h e m t i c a l l y


s i g n i f i c a n t d i g i t s as defined i n ASTM F380-76. I n the previous example,
a l l f i v e ( 5 ) d i g i t s i n the p a r e n t h e s i s are mathematically significant.

A t various steps in theirrplementation p x e e d u r e , calculated r e s u l t s are


rounded or truncated. When rounding a r e s u l t to fewer d i g i t s thanthe
total number a v a i l a b l e , the followingprocedure which was used w e r r i d e s
that of ASTM E380-76:

a) when the f i r s t d i g i t to be discarded i s less than 5, the last d i g i t


retained is notchanged.
b ) when the f i r s t d i g i t to be discarded is greater than 4, the last
d i g i t r e t a i n e d is increased by me unit.

The procedure used i n truncating a r e s u l t tm fewer d i g i t s than the total


the last d i g i t
number a v a i l a b l e is txI s i n p l y discard all d i g i t s f o l l o w i n g
to be r e t a i n e d and leaving the last r e t a i n e d d i g i t unchanged.

Anotherspecification is that the c o e f f i c i e n t s used to relate the thermal


expansion coefficient at 15 OC to the 15 O C d e n s i t y base and all other
c o n s t a n t s needed i n the c o r r e l a t i o n rmst be used to e x a c t l y the n&r of
d i g its spec i f ied .
-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
SECTION
VOLUME CORRECTION
FACTORS X-295

Calculation Procedure

S t e p 1: Round i n p tv a r i a b l e s
a) Round density to nearest O. 5 Kg/m3
RHO = =.X rounded
b) Round observedtemperature to nearest 0.05 O C

T = XXX.XX rounded
S t e p 2: Calculatedifferencein&served temperature and
basetemperature
BASE TEMPERATURE = 15 .O0
DELTA = XXX.XX - 15.00 = XXX.XX
Step 3: Compute hydrometer m r r e c t i o n term ( o p t i o n a l )
HYC = 1.0 - .O00023 * DELTA - .O0000002 * DELTA2
TEFW = .O00023 * DELTA = .OOXXXXXXX rounded
TERM2 = .O0000002 * DELTA2 = .OOOXXXXXX rounded
HYC = 1.000000000 - .ooXXXXXXX - .oooXXXXXX = -.x
Step 4: Application of hydrometer correction
RHW = RHO * HYC = XXXX.XX rounded
Step 5: I n i t i a l i z e 15 OC density
RH015 = RHW = XXXX.XX
S t e p 6: Calculate c o e f f i c i e n t of thermalexpansion
ALPHA = K o / F ~ - I O ~ ~K1/m015
~ +
KO = )(xxx.XXXX
Ki = .xxxx
TERMl = Ko/F?HO15 = X
.XXXXXXX truncated
TERM2 = TERMl/F?H015 = .OOXXXXXXXX truncated
TERM3 = K1/FH015 = .OOXXXXXXXX truncated
ALPHA = TEM2 + TERM3 = .OOOXXXX rounded

S t e p 7: Calculatevolunemrrectionfactor
VCF = MP(-ALPHA*DELTA - o.8*ALPHA2*DELTA2)

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API M P M S * L L * L V O L * X 80 m 0732290 052bLbL O T 5

X-296 CHAPTER DATA


1 PHYSICAL PROPERTIES

a) calculateexponent
TERMl = ALPHA * DELTA = X
.XXXXXXXX truncated
*
TERMl =
TERM2 = 0.8 X
.XXXXXXXX truncated
“3 = TERMl* TERM2 = X.XXXXXXXX rounded
TERM4 = - TERMl - TERM3 = X
.XX>UX
[XXtruncated
b) c a l c u l a t e exponent ia1
VCF = EXP(TERM4) = X.XXXXXX rounded
(Must use at least the f i r s t Seventerms of
the power series expansion.)

Step 8: Calculate 15 OC d e n s i t y
RH015 = RHOT/VCF = XXXX.XXX truncated
--
| | |

Since the equation for pG0 cannot be solved explicitly, a successive


|
|
|||| |||| | | ||

approximation iterative scheme is used to obtain a solution. The initial


estimate of p15 is the value of the density a t observed temperature t.
|||| |||| || || |

This approximation is substituted on the right hand side of the equation


to obtain a second value approximation. This process of substituting into
|
|||| |||---

the right hand side of the equation and estimating a new value from the
other is repeated until h o consecutive results are in agreement t o the
desired degree of accuracy. In subroutine TAB53A, aconverged s o l u t i o n
is reached when the change in density is less than 0.05 Kg/m 3 in tsm
successive passes.

The 1980 i n t e g e r FO- code issued by API c o n t a i n both an i n t e g e r


d i v i s i o n and an i n t e g e r m l t i p l i c a t i o n a l g o r i t h m . A d e s c r i p t i o n o f each
follows .
INTEGER MULTIPLICATION PROCEWRE
(For 32 B i t Arithmetic)

DATA DEFINITION
X,Y are i n t e g e r numbers that are equal b or less than 2*lO9 ( s l i g h t l y
less than231). A larger value may causeaverflow.Inaddition,the

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL=L VOL*X 80 m 0 7 3 2 2 9 00 5 2 6 3 6 2T 3 1 m

SECTIONVOLUME CORRECTION
FACTORS X-297

total number of digits in X and Y mst m t exceed 17, otherwise cwerflow


w i l l occur. Z is theproduct (X*Y) s c a l e d by 10-8, i.e. Z = (X*Y) /lO8.

Note: If it is desirable to obtain maximum precision, X and Y may be


s c a l e d up prior to use of the procedure.Typically, at least 15 d i g i t s
are needed to obtain 6 d i g i t p r e c i s i o n , 1 6 f o r 7 and 17 f o r 8. The
l a r g e s t v a l u e of X and Y t h a t may be used are 2 O00 O00
O00 and
99 999 999. (Eithervalues may be used f o r X and Y).

CALCULATION
x/10000 = u1
10000 * u1 = K1
X-K1 = Vl
Y/10000 = u2
10000 * U2 = K2
Y-K2 = V2
(Ul-) + (U2*Vl) + (Vl*V2/10000) = K3
(K3 + 5000)/10000 + U1*U2 = 2

Note: 2 has teen scaled by 10-8 and may have to be rescaledbefore use.
TOTAL DIGITS I N X AND Y 12 13 14 15 16 17
DIGITS IN PFODUCT, Z 3-4 4-5 5-6 6-7 7-8 8-9
--
| | |
|
|
|||| |||| | | ||

(For 32 B i t Arithmetic)
|||| |||| || || |

DATA DEFINITION
X,Y are i n t e g e r n u h e r s such t h a t X is equal to or less than 231 -1 and
|
|||| |||---

Y is of order of magnitude 104 less than X.

R is the quotient of X/Y s c a l e d by 104, i.e. R = X/Y * lo4.

Note: If it is desirable to & t a i n maximum precision, X and Y may be scaled


up prior to use of theprocedure.Typically,the mre d i g i t s t h a t are
carried in both X and Y, the mre = c u r a t e d i g i t s m output.

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
X-298 CHAPTER DATA
1 PHYSICAL PROPERTIES

CALCULATION
x/Y = u1
U l * Y = K l
X - Y J = V l
Vl/Y = u2
U1 * 10000 + U2 = R

Note: R has been scaled by lo4 and may need tu be rescaled before use.

Examples f o r C h e c b u t

The followingexamples i l l u s t r a t e how the implementationprocedure is


a c t u a l l y used to determine the value of a d e n s i t y at 15 O C for Generalized
Crude O i l s . Theexamples c a r r y the computationsthrough each step of the
procedure showing t h er e s u l t so f each mathematical aperation. me mmputed
--
| | |

values are given to the required p r e c i s i o n and it is indicated if a value


|
|
|||| |||| | | ||

has beenrounded or truncated. The step-by-stepcalculations are shown f o r


t h e f i r s t i t e r a t i o n t h e n a table i s presented which m a r i z e s the
|||| |||| || || |

intermediate values used to o b t a i n a mnverged solution.


|
|||| |||---

These examples are to be used as test cases f o r s u b r o u t i n e TAB53A to v e r i f y


the cmmter code has not been a l t e r e d or i n c o r r e c t l v reproduced. The
r o u t i n e has been designed to execute m machines that use wrd s i z e of
32-bits or greater. Any new developnent of a m p u t e r d e that is designed
to follow the standardimplementation p x e d u r e rmst insure that the values
computed a t each step in the procedure are i d e n t i c a l t~ those given in the
examples o

EXAMPLE 1
Step 1: Round inputvariables
a ) Round d e n s i t y tn nearest 0.5
RHO = 875 .5 rounded
b ) Round observed tenperature to nearest 0.05
T = 120 .O0 rounded

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I M P M S * L L * L V O L X X 80 m 0732290 052bLb4 804 m

SECTIONVOLUME
FACTORS
CORRECTION x-299

Step 2: Calculatedifference i n &served tenperature and base temperature


BASE TEMPERATURE = 15 .O0
DELTA = 120 .O0 - 15.00 = 105.00

S t e p 3: C q u t e hydrometer m r r e c t i o n term
HYC = 1.0 - .O00023 * DELTA .00000002 - * DELTA2
TERMl = .O00023 * DELTA = .O02415000 munded
TERM2 = .O0000002 * DELTA2 = .O00220500 rounded
HYC = 1.OOOOOOOOO - TERM1 - TERM;! = .997364500

S t e p 4: A p l i c a t i o no f hydrometer m r r e c t i o n
RHOT = RHO * HYC = 873.19 rounded

S t e p 5: I n i t i a l i z e1 5 O C d e n s i t y
RH015 = RHOT = 873.19

Step 6 : Calculate m f f i c i e n t o f thermal expans ion


ALPHA = K0/W015~ + K1/IW015
KO = 613.9723 (as of May 1, 1980)
K 1 = 0.0 (as of May 1, 1980)
TERMl = KO/IM015

|||| |||---
TERMl = .70313711 truncated

|
|||| |||| || || |
TERM2 = TERM1/RH015
“2 = .O008052509 truncated
|||| |||| | | ||

TERM3 = K1/EH015
TERM3 = 0.0
|

ALPHA = “2 + TERM3 = .O008053 munded


|
| | |
--

S t e p 7: Calculate volume m r r e c t i o nf a c t o r
VCF = EXP (-ALPHA * DELTA - 0.8 * ALPHA** DELTA^ )
a ) Calculate exponent
T m = ALPHA * DELTA = .O84556500 truncated
TERM2 = 0.8 * TERM1 = .O67645200 truncated
TERM3 = TERMl * TERM2 = .O05719841 rounded
TERM4 = - TEl?M3 = -.O9027634 truncated

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL.L VOL*X 80 m 0 7 3 2 2 9 00 5 2 6 1 6 57 4 0 m

x-300 CHAPTER1 PHYSICAL PROPERTIES


DATA

b) Calculate exponential
VCF = EXP(TERM4) = .913679 rounded
(must use the f i r s t seven tem of the p e r series
expansion of $1

Step 8: Calculate 15 OC d e n s i t y
RHO15 = l?HCYT/VCF = 955.685 truncated

TABLE 1 shows t h e r e s u l t s o f each i t e r a t i o n .

TABLE 1

ITERATION RHO15 (N) ALPHA VCF R€Dl5(N+l)


1 873.19 .O008053 .913679 955.685
2 955.69 .O006722 .928146 940.789
3 940.79 .O006937 .925813 943.160
4 943.16 .O006902 .926193 942.773
5 942.77 .O006908 .926128 942.839
6 942.84 .O006907 .926139 942.828

RH015 = 942.8 rounded to nearest 0.1


EXAMPLE 2
S t e p 1: Round i n p u tv a r i a b l e s
a) Wund d e n s i t y nearest 0.5
RHO = 693 .O rounded
b ) Wund observed tempera t u r e to nearest O. 05
T = 11.40 rounded

Step 2: C a l c u l a t ed i f f e r e n c ei n &served tenperature and base


tenperature
BASE TEMPERATURE = 15.00
DELTA = 11.40 - 15.00 = -3.60

Step 3 : Compute hydrometercorrection term


2
HYC = 1.0 - .O00023 * DELTA - .O0000002 * DELTA
TERM1 = .O00023 * DELTA = -.O00082800 rounded

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL.L VOL*X 80 m 0732290 052bLbb 6 8 7 m

SECTIONV VOLUME
FACTORS
CORRECTION X-301

TERM2 = .O0000002 * DELTA2 = .O00000259 rounded


WC = 1 000000000 - T E M - TERM2 = 1.000082541

S t e p 4: Application of hydraneter correction


RHOF = RHO * HYC = 693 .O6 rounded

S t e p 5: I n i t i a l i z e 15 O C density
RH015 = RHO" = 693 .O6

Step 6: C a l c u l a t ea x f f i c i e n to f thermal expansion


2
ALPHA = Ko/RHO15 + K1/RH015
KO = 613.9723 (as of May 1, 1980)
K 1 = 0.0 (as of May 1, 1980)
TER" = Ko/RH015
TEFW = .88588621 truncated
TERM2 = "EFWl/F!H015
TERM2 = .O012782244 truncated
TERM3 = K1/lW015
TERM3 = 0.0
ALPHA = TERM2 + TERM3 = .O012782 rounded

S t e p 7: Calculate v
ol
ume c o r r e c t i o nf a c t o r
VCF = EXP(-ALPHA * DELTA - o. 8 * ALPHA^ * DELTA^)
a ) Calculateexponent
T
EN = ALPHA * DELTA = -.O04601520 truncated
TERM2 = 0.8 * TERMl = -.O03681212 truncated
TERM3 = TERMl * TERM2 = .O00016939 rounded
TERM4 = +CEFWl - TERM3 = .O0458458 truncated
b ) Calculate exponent ia1
VCF = MP(TEBM4) = 1.004595 rounded
(must usethe f i r s t seven terms of the p e r series
expansion of ex)

S t e p 8: Calculate 15 "C d e n s i t y
RH015 = RHCJIlflCF = 689.889 truncated
-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API MPMS*33.3 VOLVX BO 0732290 0526367 5 1 3 D

X-302 CHAPTER DATA


1 PHYSICAL PROPERTIES

TABLE 2 shows t h e r e s u l t s of e a c h i t e r a t i o n .

ITERATION M015 ( N ) ALPHA VCF RHO15( N+1)


1 693.06 .O012782 1.004595 689.889
2 689 .89 .O012900 l.004637 689.861

RH015 = 689.9 rounded nearest O. 1

EXAMPLE 3
Step 1: Round input variables
a ) murid d e n s i t y b nearest 0.5
RHO = 644 .O rounded
b ) Wund observed temperature to nearest 0.05
T = 84.45 rounded

Step 2: C a l c u l a t ed i f f e r e n c e i n &servedtemperature and base


tenperature
BASE TEMPERATURE = 15.00
DELTA = 84.45 - 15 .O0 = 69.45

Step 3:
Compute hydrometer a x r e c t i o n term
HYC = 1.0 - .O00023 * DELTA - .00000002 * DELTA2
TERMl = .O00023 * DELTA = .O01597350 rounded
TERM2 = .O0000002 * DELTA2 = .O00096466 rounded
HYC = 1.OOOOOOOOO - TERMl - TERM2 = .998306184

Step 4: Application of hydrameter correction


RHOT = RHO * HYC = 642.91 rounded

Step 5: I n i t i a l i z e 15 OC d e n s i t y
RH015 = MCYT = 642.91

Step 6: Calculate a x f f i c i e n t of thermalexpansion


ALPHA = K0/W015~ + K1/RI-I015

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
X m 0732270 0526368 4 5 T m
API MPMSr33.L V O L ~ 80

SECTIONVOLUME
FACTORS
CORRECTION x-303

KO = 613.9723 (as of May 1, 1980)


K 1 = 0.0 (as of May 1, 1980)
TJBMl = KO/RH015
TERMl = .95498950 truncated
“2 = TERMl/RHO15
TERM;! = .O01485417 truncated
TERM3 = K1/RH015
TERM3 = 0.0
ALPHA = TERM2 + TERM3 = .O014854 rounded

Step 7: Calculate volume a x r e c t i o nf a c t o r


VCF = EXP( -ALPHA * DELTA - o. 8 * ALFHA~ * DELTA^)
a ) Calculate exponent
TERM1 = ALPHA * DELTA = .103161030 truncated
TERM2 = 0.8 * TERMl = .O82528824 truncated
TERM3 = TERMl * TERM2 = .O08513758 rounded
TERM4 = aRM1 - TERM3 = -.1167489 truncated
b ) Calculateexponential
VCF = MP(TERM4) = .894335 rounded
(must use the f i r s t seven t e m of the pwer series
expansionof G )

S t e p 8: Calculate 15 *C d e n s i t y
RH015 = RHCYr/VCF = 718.869 truncated

TABLE 3 shows the r e s u l t s of each iteration.

TABLE 3

RH015
ITERATION (N) ALPHA VCF RHOl5(N+l)
1 642.91 .O014854 .894335 718.869
2 718.87 .O011881 .915797 702 .O22
3 702.02 .O012458 .911641 705.222
4 705.22 .O012345 .912455 704.593
5 704.59 .O012367 .912296 704.716
6 704.72 .O012363 .912325 704.694

RH015 = 704.7 rounded to nearest O .1


-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL-L VOL*X 80 m 0732270 0 5 2 b L b 9 376 m

x-304 CHAPTER
1 P PHYSICAL PROPERTIES
DATA

Step 1: Round input v a r i a b l e s


a ) F a n d d e n s i t y to n e a r e s t 0.5
RHO = 625 .5 rounded
b) F a n d observedtenperature t~ nearest 0.05
T = 53.05 rounded

Step 2: Calculatedifference in &served terperature and base


tenperature
BASE TEMPERATURE = 15.00
DELTA = 53.05 - E . O O = 38.05

S t e p 3: Conputehydrometer a x r e c t i o n term
HYC = 1.0 - .O00023 * DELTA - .O0000002 * DELTA2
TERMl = .O00023 * DELTA = .O00875150 rounded
TERM2 = .O0000002 * DELTA2 = .O00028956 rounded
HYC = 1.000000000 - TERM1 - TERM2 = .999095894

S t e p 4: Application of hyamnSeter correction


RHOT = RHO * HYC = 624.93 rounded

S t e p 5: I n i t i a l i z e 15 O C density
RHO15 = RHm = 624.93

Step 6: C a l c u l a t e a x f f i c i e n t of thermal expansion


ALPHA = K o / F ? H O ~ +
~ ~K1/R-l015
KO = 613.9723 (as of May 1, 1980)
K 1 = 0.0 (as of May 1, 1980 )
= Ko/RH015
TERMl = .98246571 truncated
TERM2 = TERMl/FlH015
TERM2 = .O015721212 truncated
TERM3 = K1/M015
TERM3 = 0.0
ALPHA = "2 + TERM3 = .O015721 rounded

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I f l P f l S * L L = L VOL*X 80 m 0732290 0526370 008 m

SECTIONVOLUME CORRECTION FACTORS X-305

Step 7: Calculate v
ol
ume oorrectionfactor
* DELTA 0.8 *
VCF = EXP(-ALPHA - ALPHA^ * DELTA^)
a ) Calculate exponent
TEFM1 = ALPHA * DELTA = .O59818405 truncated
TERM2 = 0.8 * TE3Ml = .O47854724 truncated
TERM3 = TERMl * TERM2 = .O02862593 rounded
TERM4 = ~~ - TERM3 = -.O6268099 truncated
b ) Calculate exponential
VCF = MP(TERM4) = .939243 rounded
(must use the first seven terms of the m e r series
expansion of ex)

Step 8: Calculate 15 O C density


RH015 = RI-RYI?/VCF = 665.354 truncated

TABLE 4 shows the r e s u l t s of each iteration.

TABLE 4

ITERATION RH015 (N) ALPHA VCF RHol5(N+1)


1 624.93 .O015721 .939243 665.354
2 665.35 .O013869 .946486 660.263
3 660.26 .O014084 .945646 660.849
4 660.85 .O014059 .945744 660.781
5 660.78 .O014062 .945732 660.789

RH015 = 660.8 rounded tn nearest O. 1

EXAMPLE 5
Step 1: Round input variables
a ) Faund density t~ nearest 0.5
RHO = 779 .O rounded
b) Mund observed tenperature to nearest O .O5
T = 25.00 rounded

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL.L VOLXX BO M 0732270 052bL7L T 4 4 m

--
| | |

X-306 CHAFTER1 PHYSICAL PROPERTIES


DATA
|
|
|||| |||| | | ||

S t e p 2: Calculate d i f f e r e n c e i n observed t e p r a t u r e and base


|||| |||| || || |

tenperature
BFSE TEMPERATURE = 15 .O0
-
|

DELTA = 25.00 15.00 = 10 .O0


|||| |||---

S t e p 3 : Compute hydrometer a x r e c t i o n term


HYC = 1.0 - .O00023 * DELTA - .O0000002 * DELTA2
TERMl = .O00023 * DELTA = .O00230000 rounded
TERM2 = .O0000002 * DELTA2 = .000002000 rounded
HYC = 1.000000000 + TERMl - TERM2 = .999768000

S t e p 4: Application of hydmmter correction


RHOT = RHO * HYC = 778.82 munded

Step 5: I n i t i a l i z e 15 O C density
RHO15 = RHOT = 778.82

S t e p 6: Calculate a f f i c i e n t of thermalexpansion
ALPHA = K0/R€l015~ + Kl/R€lO15
KO = 613.9723 (as of May 1, 1980)
K 1 = 0.0 (as of May 1, 1980)
TE!RMl = Ko/RHO15
TERMl = .78833658 truncated
TERM2 = TERMl/RHO15
TERM2 = .O010122192 truncated
TERM3 = K1/RH015
TERM3 = 0.0
ALPHA = TERM2 + TERM3 = .o010122 rounded

S t e p 7: Calculate volune m r r e c t i o nf a c t o r
VcF' = MP(-ALPHA * DELTA - 0.8 * ALPHA2 * DELTA2)
a ) Calculateexponent
T E M = ALPHA * DELTA = .O10122000 truncated
TERM2 = O. 8 * TERMl = .O08097600 truncated
TERM3 = TERMl * TERM2 = .O00081964 rounded
Tm4 =4
ERM1 - TERM3 = -.O1020396 t
r
u nCat
e d

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I M P M S * L L - L VOL*X 80 0732290 0526372 980 W

SECTIONVOLUME
FACTORS
CORRECTION x-307

b ) Calculate e p e n t i a l
VCF = MP(TERM4) = .989848 rounded
(must use t h e f i r s t seven terms of the power Series
expansion of eX)

S t e p 8: Calculate 15 OC density
RHO15 = RHOI'/'VCF = 786.807 truncated

TABLE 5shows the r e s u l t s of each iteration.

TABLE 5

ITERATIaJ W015 (N) ALPHA VCF m015 ( N + l )


1 778.82 .o010122 .989848 786.807
2 786.81 .O009918 .990053 786.644
3 786.64 .O009922 .990049 786.647

RHO15 = 786.6 rounded to nearest 0.1

density and temperatureranges represent areasbeyond


11.1.53.4
TABLE
536-GENERALIZED PROP thesedata.
Thus,
mathematical techniques were
em-
UCTS,CORRECTION OF OBSERVED ployed toextrapolate beyond the density andtempera-
DENSITYTODENSITYAT15°C ture ranges of the given datatodeterminethe value of
the density at 15°C for these areas. These values are
TABLE 53B gives the value of density in kilogram
denoted by an asterisk (*). Extension of this table
per cubic metre at 15°C corresponding to a hydrometer
beyond the ranges shown is not recommended.
reading at observed temperatures other than 15°C. In
Increments used in this table fordetermining density
converting the hydrometer reading at theobserved tem-
at 15°C are 0.25"C and 2kg/m3. Interpolation with tem-
perature to thecorresponding density at 15"C, twocor-
perature is not intendedsince there is nopractical meth-
rections are necessary: the first arises from the change.
od of interpolation that will produce the accuracy ob-
in volume of the glass hydrometer with temperature 1
tainablefrom theStandard.However,interpolation
(stem correction) and the second from the change in
with density to one additional significant digit can be
volume of the products with temperature. Both have
reasonably made. Interpolation is not required if the
been applied in this table. The values of density at 15°C
TABLE 53B results are tobe usedas entries to TABLE
in this table are the result of a computer procedure
54B.
which is the Standard (see 11.1.53.5 and 11.1.53.6).
Some countrieswhich have historically used a metric
The temperature ranges of this table are:
system have retained forfield use density units such as
Density, kg/m3 "C g/mL, g/cc, or kg/L. This practice was consistent with
653 to 778 -18 to 95 previously published API/IP measurement tables which
778 to 824 -18 to 125 have been replaced by this 1980 edition. In these in-
824 to 1075 -18 to 150 stances where field measurements of density are re-
The values of density at 15" C given in this table are corded in g/mL, g / ~or, kg/L, multiply the measure-
based on data from theU.S. National Bureau of Stan- ments by lo00 toobtain kg/m3prior to entering TABLE
dards and from other published data. Portions of the 53B.

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL*L VOL*X 80 m 0732290 052bL73 817 m

X-308 CHAPTER DATA


1 P PHYSICAL PROPERTIES

This table must be entered with a hydrometer meter constant, as defined in the Report on the
reading measured with a soft glass hydrometer Development, Construction, Calculation, and Pre-
calibrated at 15°C and with an observed tempera- paration of the ASTM-IP Petroleum Measurement
ture. Tables (1960), varies with temperature according
A correction to the glass hydrometer reading to the following:
has been incorporated into the table to account HYC = 1 - 0.000023(t - 15°C)
for the thermal expansion of glass. The hydro- - 0.00000002(t - 15"C)2

11.1 S3.5 PROGRAM DOCUMENTATIONFOR SUBROUTINE TAB535-


GENERALIZED PRODUCTS, CORRECTION OF OBSERVED
DENSITY TO DENSITY AT 15°C

Subroutine
Title: TAB53B - TABLE 53B, Generalized
Prcducts,
Density
Correction to 15 OC.

Description: This subroutine is designed to c a l c u l a t e the


d e n s i t y at 15 O C corresponding to densities
observed at temperaturesotherthan15 OC.

Program Responsibility: American Petroleum I n s t i t u t e


Measurement Coordination
2101 L Street N.W.
Washington, D .C. 20037

Date Issued: August 1980

Language: FORTRAN, ANSI/ASA Standard

Reference : API Standard 2540, TABLE 54, 11.1.54

THIS SUBFKXJ'I'INE W DEVELOPED USING ?HE MATHJZMATICAL ALGORITHK


AND SPEIFICATIONS DESCRIBED I N ?HE nXuMENT P E E W R E 11.1.53.6.
ANY MODIFICATION 10 'MIS SUBRMJTINE MJSTRIGIDLY AMlEFE ?o THE M E
AIÆORITHMS AND SPECIFICATIONS.
-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
i-VOLUME CORRECTION
SECTION FACTORS X-309

11.1.53.5.1 Introduction

TAE353B is a amputer subroutine designed to c a l c u l a t e for substances


c h a r a c t e r i z e d as generalized products the value of d e n s i t y at 15 degrees
Celsius (OC) corresponding t~ d e n s i t i e s observed at temperatures other
than15 OC. The subroutine accepts as input the &served d e n s i t y rounded
to the n e a r e s t O. 5 Kg/m3 and the temperature rounded to the mares t
0.05 O C . I f e i t h e r i n p u t v a l u e has not been properlyrounded, the s u b
r o u t i n e w i l l round the values and r e t u r nt h e mrrected values. The sub-

|||| |||---
routine returns the value of the d e n s i t y a t 15 O C rounded to the nearest

|
.

|||| |||| || || |
O . 1 Kg/m3 and a s t a t u s f l a g f o r user mnvenience The f l a g is set to -1
i f an error m n d i t i o n o c c u r s and to +1 i f t h e v a l u e of the d e n s i t y at

|||| |||| | | ||
1 5 O C an extrapolation. The limits of the m r r e l a t i o ni n c l u d i n gt h e
extrapolated region are depicted i n Figure X-15. The calling program m u s t

|
|
check the f l a g and provide user with appropriate warning message or

| | |
--
program termination. The f l a g is set to zero h e n the inputvariables and
t h e d e n s i t y a t 15 O C are within the limits of the c o r r e l a t i o n .

11.1.53.5.2 SubroutineSpecifications

The range of a p p l i c a t i o n is :

Dens it y , Kq/m3 Temperature, O C

653.0 to 778.5 -18.00 to 90 .O0


779.0 to 824.0 -18 .O0 to 125 .O0
824.5 to 1075.0 -18.00 to 150.00
Referenced d u l e s : ALF53B, DIV53B, MPY53ß,
VCF53B

Fortranfunctions: FIX>AT, I
ABS

Averageexecution time: 860 entries/CPUsecond


JM 370/168
I3

The subroutines are w r i t t ei n ANSI/FSA using


integer arithmetic.
The s i z e and storage requirements are:
1. Compilable sourcestatements 170
2. Decimal bytes
storage 4060
3. Words 1015

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I M P M S * 3 3 = 3 V O L V X 80 m 0732290 0526375 bqT 9

X-31O CHAPTER
PROPERTIES
1DATA
I-PHYSICAL

11.1.53.5.3 C a l l i r a Sesuence

CALL 'AFj53B (RHO, DEGC, IHYDIIO, ~ ~ 0 1 I5


FL,AG)

INPUT DESCRIPTION

EI0 - Density at observed tenperature


(RHO r e t u r n e d w i l l be rounded to n e a r e s t O. 5 Kg/m3)

|||| |||---
|
|||| |||| || || |
DEGC - Observedtemperature, OC
( D E R returned w i l l be rounded to n e a r e s t 0.05 O C )

|||| |||| | | ||
IHYDFKI - Hydrometer switch

|
|
The d e n s i t y was observed w i t h a g l a s s hydrometer

| | |
O:

--
and a hydrometer m r r e c t i o n is rreeded
1: The d e n s i t y was determined from an on-line
densitometer and a hydrometer m r r e c t i o n is mt
needed.

RH015 - Corresponding density at 15 O C rounded to nearest O. 1 Kg/m3

IF= - Status Code


O: I n d i c a t e si n p u tv a r i a b l e s and c a l c u l a t e dr e s u l t s are
w i t h i n the range of a p p l i c a t i o n
1: I n d i c a t e si n p u tv a r i a b l e s are i n extrapolatedregion
-1: I n d i c a t e si n p u tv a r i a b l e s or c a l c u l a t e dr e s u l t s are
o u t s ide the range of a p p l i c a t i o n

NOTE: If a non-convergence occurs, the s u b r o u t i n ep r i n t s the following


message :

AT XXX .X DEGREES C FND XXX .X KG/CU


X m,A CxlRRESPclNDING
DENSITY p4c 15 O C mW BE DFTERMINED.

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I flPMS*LL-L V O L * X 80 m 0732290 0526376 526 m

SECTIONVOLUMEFACTORS
CORRECTION X-31 1

This messageshouldnotoccur unless theoode has been a l t e r e d or


--

incorrectlyreproduced. Follow Section11.1.53.6,Implementation


| | |
|

Procedure, and test the subroutineexactly as described. The


|
|||| |||| | | ||

s t a t u s f l a g w i l l be set to -1, IWO15 to -999.9, and program c o n t r o l


r e t u r n e d b the c a l l i n g r o u t i n e .
|||| |||| || || |

11.1.53.5.4 Method of c a l c u l a t i o n
|
|||| |||---

This subroutine uses a anvergence technique to determine the d e n s i t y a t


15 OC that a x r e s p o n d s to a density observed a t some temperature other
than15 OC.

15 OC of
The coefficient of thermal expansion at the base temperature is
related to density at the base temperature by

The values of the density at temperature t, and a are used in the


15
volume correction factor t o compute
equation plK.

VCF = -
Pt = EXP [-a15At(l + 0.8aI5At)]
15

Thus - At(1 + 0.8a15At)]


Pt - p15 [-a15

when = density at the base temperature


15

At = t - 15.0

Since the equationforFi5cannot ke s o l v e d e x p l i c i t l y , a successive


approximationiterative scheme is used to o b t a i n a s o l u t i o n . The i n i t i a l
estimate of p15 is the value of the d e n s i t y a t &served temperature t.
This approximation is s u b s t i t u t e d into the r i g h t hand side of the equation

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL*L VOL*X 80 m 0 7 3 2 2 9 00 5 2 b L 7 7q b 2 m

X-312 CHAPTER1 PHYSICAL PROPERTIES


DATA

to o b t a i n a secondvalueapproximation. This -SS of s u b s t i t u t i n g into


t h e r i g h t hand side of the equation and estimating a new value from the
other is Epeated u n t i l two a n s e c u t i v e r e s u l t s are in agreement to the
desireddegree of accuracy.Insubroutine TAl353B, a mnvergedsolution is
reached when the change in d e n s i t y is less than O. 05 Kg/m 3 i n two
successive passes, If the computed valuesof the 15 OC d e n s i t y is mt on
the same curve as the &served d e n s i t y , the parameters KO and K 1
used to determine the e f f i c i e n t of thermal expansion mst be redefined
and the convergencetechnique=peated. A straight l i n ei n t e r p o l a t i o n is
used to connect the jet fuel curve w i t h the gasoline curve between 770.5
and787.5 Kg/m3. When t h i s o c c u r s , the c n e f f i c i e n t o f thethermal
expansion is defined as:

2
als = A + B /Pl5
where A = -.O0336312
(as of May 1, 1980)
B = 2680.3206 ( a s of May 1, 1980)
I n this case, the tolerance is increased to O. 07 Kg/m 3

A f u l le x p l a n a t i o no f the q a t i o n s and the valuesof the p r a m e t e r s


KO and K 1 m y be found in API Standard 2540, TRElLE 54,11.1.54.

|||| |||---
11.1.53.5.5 Examdes
|
|||| |||| || || |

These exanples are t u t o r i a l i n nature and are mt intended tx) be s u f f i -


|||| |||| | | ||

c i e n t for subroutinecheckout. The examplesgiven in theImplementation


Procedure, Section 11.1.53.6, are b be used f o r t h e computercheckout.
|
|
| | |
--

Exanple 1

IMO = 827.0 (observed with a glass hydrometer)


DEGC = 28.25
1mm= o

CALL TiB53B (~0,DEGc,IHYDw3,FH015,I~G)

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL.L VOL*X B O D 0732290 052bl178 3T9

SECTION VOLUMEFACTORS
CORRECTION X-313

A f t e r the call: RHO = 827.0


DEGC = 28.25
IHYDRO = o
RH015 = 836.2
IFLAG = O

Example 2

MO = 887.2 (observed w i t h a glass hydrometer)


DEGC = 147 . O 1
IHYDrn= o

CALL W 5 3 B (lWO,DEGC,IHyDFO,RHOl5 ,IFLAG)

A f t e r the call : W O = 887 .O


DEGC = 147 .O0
1mm= o
RH015 = 975.5
IFLAG = 1

Exqle 3

RHO = 769. O (observed w i t h a glass hydrometer)


DEGC = 98.00
1mm= o

CALS; IITIB53B U30, D E,IH!EXXI , ~ ~ 0 1IFLAG)


(F 5,

After the call: RHO = 769.0


DEGC = 98 .O0
IHYDFa = o
RH015 = -999 -9
IFLAG = -1

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPflS*LL.L VOL*X 80 0732290 O526379 235 m

X-314 CHAPTER
1 P PHYSICAL PROPERTIES
DATA

1 1 . I .53.5.6 FLOWCHART

No SET STATUS FLAC -1


BOUNDS OF -AND 15'C DENSITY = -999.9
RETURN

YES

I COMPUTE
HYDROMETER CORRECTION

APPLY HYOROHETER CORRECTION TO DENSITY

SELECT
APPROPRIATE KO AND K 1 CONSTANTS

[ INITIALIZE 15.C DENSITY I

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I NPNS*LL=L VOL*X 80 m 0732290 0526380 T57 m

SECTIONVOLUME CORRECTION
FACTORS X-315

YES

SETSTATUSFLRG = -1
No
*AND15'CDENSITY = -999.9
RETURN
-

NO
KO AND K 1

REPEAT CONVERGENCE SCHEME


ON STRAIGHT
YES
+ WITHRE-DEFINED ALPHA
|||| |||---

NO
|
|||| |||| || || |

SET s T n T u s FLAG = 1
RETURN
|||| |||| | | ||
|

r-
|
| | |

SETSTATUSFLAG =
--

RETURN

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I flPflS*:LL-L V O L X X 80 0 7 3 2 2 9O05 2 6 1 8 1 993

X-31 6 CHAPTER
1 PHYSICAL PROPERTIES
DATA

11.1.53.5.7 Subroutine L i s t i n a

TAE353B This subroutine accepts d e n s i t y and the observation


temperature and determines the a x r e s p o n d i n g d e n s i t y at 15 OC

for Generalized Products.


--

Referenced Modules
| | |
|
|
|||| |||| | | ||

ALF53B This module c a l c u l a t e s the c o e f f i c i e n t of thermal expansion


needed to determine a volume c o r r e c t i o n f a c t o r .
|||| |||| || || |

DIV53B This module is designed to prcduceadditionalaccuracy from


|
|||| |||---

anintegerdivide.

MPY53B This module is designed to produceadditionalaccuracy from


an integer mltiplication.

VCF53B This module c a l c u l a t e s a volme a x r e c t i o n f a c t o r .

SUBROUTINE TA6536(RHO,DEGC,IHYDRO,RHOl5,IFLAG) 5380001O


C 53800020
C ( C ) COPYRIGHT 1 9 8 0 53600030
C AMERICAN PETROLEUM INSTITUTE 53600040
C ALLRIGHTS RESERVED 53800050
C 53600060
C T H I S SUBROUTINE I S A VOLUNTARYSTANDARDAND WAS DEVELOPED 53600070
C UNDER THE AUSPICES OF THE JOINTAPI-ASTM COMMITTEE ON STATIC 53800080
C PETROLEUM MEASUREMENT I N PART FROM DATAGENERATEDBY A 53600090
C PROJECT FUNDED BY THE AMERICAN PETROLEUM INSTITUTE Ar THE 536001 O0
C U . S . NATIONAL BUREAU OF STANDARDS, GAITHERSBURG, MARYLAND. 538001 1 O
C 538001 20
C I N Q U I R I E S CONCERINING I T S APPLICATION SHOULD BE ADDRESSED TO 536001 30
C 536001 40
C AMERICAN PETROLEUM I N S T I T U T E 536001 50
C MEASUREMENT COORDINATION 538001 60
C 2101
STREET,
L N.W. 538001 70
C WASHINGTON, DC 2 0 0 3 7 538001 80
C 536001 90

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I M P M S * 3 3 = 3 V O L + X 80 0732290 0526382 8 2 T m

SECTIONVOLUME
X-31FACTORS
CORRECTION 7

C ................................................................. 53~00200
C * * 53800210
C * T H I S SUBROUTINE OR THE MATHEMATICAL RELATIONSHIPS * 53800220
C * REPRESENTED THEREBY MAY BE USED BY ANYONE WISHING * 53800230
C * TO
DO SO, BUT THE AMERICAN PETROLEUM INSTITUTE, THE * 53800240
C * AMERICAN SOCIETY FOR TESTING AND MATERIALS, AND THE * 53800250
C * INSTITUTE OF PETROLEUM
AND THEIR RESPECTIVE MEMBERS AND * 53800260
C * THE U . S . NATIONAL BUREAU OF
STANDARDS, SHALL NOT BE
HELD * 53800270
C * RESPONSIBLE OR L I A B L E I N ANY
WAY
FROM LOSS OR DAMAGE, * 53800280
C * INCLUDING, BUT NOT L I M I T E D TO, CONSEQUENTIAL DAMAGE, * 53800290
C * RESULTING FROM SUCH
USAGE OR FOR VIOLATION OF ANY FEDERAL, * 53800300
C * STATE, OR MUNICIPAL LAWS, REGULATIONS OR PRACTICES OF THE * 53800310
C * UNITED STATES OR OF ANY FOREIGN COUNTRY. * 53800320
C * * 53600330
C *+**t****t*b*t*************************************************** 53800340
C 53800350
C PURPOSE 53800360
C 53800370
C T H I S SUBROUTINE I S DESIGNED TO
ACCEPT AS INPUT A DENSITY 53800380
C (RHO) AT SOME OBSERVED TEMPERATURE (DEGC) I N DEGREES CELSIUS 53800390
C AND CALCULATE THE CORRESPONDING DENSITY(RH015) AT 1 5 DEGREES 53800400
C CELSIUS FOR TABLE 5 3 8 , GENERALIZED PRODUCTS. 5 3 8 0 0 4 1O
C THEUSEOF A GLASS HYDROMETER CORRECTION I S OPTIONAL. 53B00420
C 53800430
C EXTERNAL FUNCTIONS OR SUBPROGRAMS 53800440
C 53800450
C ALF53B,
DIV538,
MPY53B,
VCF538 53800460
C FORTRAN FUNCTIONS:
FLOAT, IABS 53800470
C 53800480
C DESCRIPTION OF
PARAMETERS 53800490
C 53800500
C RHO - DENSITY AT OBSERVED TEMPERATURE,NEAREST . 5 KG/CU ( I N ) 5 3 8 0 0 5 1O
C METRE. (PROGRAM WILL ROUND RHO TO THE
NEAREST 53800520
C . 5 KG/CU METREANDRETURNROUNDED VALUE.) 53B00530
C DEGC - OBSERVED TEMPERATURE,NEAREST . O 5 DEG C (IN) 53B00540
C (PROGRAM WILL ROUND T TO THE NEAREST .O5 53B00550
C DEG C AND RETURN THEROUNDED VALUE.) 53800560
C IHYDRO -
APPLICATION OF GLASS HYDROMETER CORRECTION (IN) 53800570
C O - HYDROMETER CORRECTION I S USED 53800580
C 1 - HYDROMETER CORRECTION I S NOT USED 53800590
C RH015 - CORRESPONDING DENSITY AT 1 5 DEGREES C (OUT ) 53B00600
C (ROUNDED TO THE NEAREST . 5 KG/CU METRE) 5 3 8 0 0 6 1O
C I F L A G - STATUS CODE (OUT ) 53800620
C O - INPUT AND CALCULATED RESULTS I N CORRELATION L I M I T S 53800630
C 1 - INPUT OR CALCULATED RESULTS I N EXTRAPOLATION REGION 53800640
C - 1 - INPUT OR CALCULATED RESULTS NOT W I T H I NL I M I T S OF 53800650
C CORRELATION 53800660
C BASE TEMPERATURE ( 1 5 DEGREES C ) 53800670
DATA IBASE / 1500 / 53800680
C UPPER AND
LOWER DENSITYLIMITS 53B00690
DATA L I M 1L, I M P / 1 0 7 4 9 8 26
, 529341 53B00700
C 5380071 O
C BREAK POINTS FOR DENSITY RANGES ( 7 7 8 . 5 AND 8 2 4 . 0 ) 53800720
DATA I B P l ,I B P 2 / 7 7 8 5 08
, 2400 / 53800730
C 53800740
C MAXIMUM
TEMPERATURES AT EACH BREAK POINT ( 9 5 , 1 2 5 , 1 5 0 ) 53800750
DATA ITMP1,
ITMP2,
ITMP3 / 1912555000000, 0, / 53600760

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*33.3 VOL*X 80 m 0732290 0526383 766

X-318 CHAPTER
1 PHYSICAL PROPERTIES
DATA

53800770
BEGINNING OF TEMPERATURE EXTRAPOLATIONS ( 6 09, 0 , 1 2 05) 3 6 0 0 7 8 0
DATA
I EI E
P
IEP
3P21
,, 1/ 2
9 060 0 ,0 , / 53600790
53800800
COEFFICIENTS FOR DIESELS, HEATING OILS, AND FUEL O I L S 53800810
K1DATA KOF, F / 4 816826 9 6 9 6 , / 53800820
OF DATA / 83900 / 53800830
53600840
COEFFICIENTS FOR JET FUELS, KEROSENES, AND SOLVENTS 53800850
K1 DATA KOJ, J / 5945418, o / 53800860
NHIJ
DATA NLOJ, 8 3 8/5 07 7 9 0 0 , / 53800870
53800880
COEFFICIENTS FOR GASOLINES AND NAPTHENES 53800890
KOG, DATA K l G 4 /3 8384 6 4 2 2 8 , / 53800900
DATA NHIG / 7 7 8 5 0 / 5380091O
53800920
STRAIGHT
INTERPOLATION:
LINE
ALPHA=A+B/(RH0**2) 53800930
FOR DENSITY 7 7 0 . 5 - 7 8(74. 85 - 52 DEGREES A5P3I8) 0 0 9 4 0
I DATA
NT2 INTI, 7 8 7/5 07 7 0 5 0 , / 53800950
DATA I A , I 6 2/6 8-0333260361 2 , / 53800960
53800970
U N I T 6 I S THE OUTPUT U N I T .I F THE
OUTPUT I S TO BE DIRECTED53800980
TO SOME OTHER U N I T , SET NOUT TO APPROPRIATEVALUE. 53800990
NOUT = 6 53801 O00
53801 O1 O
ROUND RHO TO NEAREST .5 KG/CU METRE 53801 020
IRHO = ( (RHO * 1 0 0 ) + 25 ) / 50 53801 030
IRHO = IRHO * 50 53801 040
RHO = FLOAT( IRHO ) / 100. 53601 050
CHECK FOR TEMPERATURE LESS THAN - 1 8 C 53801060
I F ( DEGC +
1 8 ) 1 2 0 0 ,1 0 ,1 0 53801 070
ROUND TEMPERATURE TO NEAREST . O 5 DEG C 53801 080
1 0I R D = 25 53801 O90
I F ( DEGC ) 1 5 , 2 0 2, 0 538011 O0
1 5I R D = -25 5 3 8 0 1 1O
1
20 I T = ( (DEGC * 1 0 0 0 ) + I R D ) / 5 0 53801 120
IT = IT * 5 53801 130
DEGC = FLOAT( I T ) / 1 0 0 . 53801140
53801 150
I S RHO LESS THAN 650. ( I F YES, BRANCH
TO 1200) 53801160
I F ( IRHO - 6 5 0 0 0 ) 1 2 0 04,04,0 53801170
I S RHO GREATERTHAN 1075. ( I F YES, BRANCH
TO 1200) 53601 180
40 I F ( IRHO - 1 0 7 5 0 0 ) 50, 50, 1200 53601 190
I S RHO GREATERTHAN 778.5 ( I F YES, BRANCH
TO 70) 53801 200
50 I F ( IRHO - I B P 1 ) 6 06 ,07 ,0 53801 2 1 O
I S TEMP GREATER THAN 95 ( I F YES, BRANCH
TO 1200) 53801220
60 IF ( IT - I T M P l ) 1 0 01, 0 01, 2 0 0 53801 230
I S RHO GREATERTHAN 824. ( I F YES, BRANCH
TO 90) 53801 240
70 I F ( IRHO - I B P 2 ) 8 08,0 , 90 53801 250
I S TEMPGREATERTHAN 125 ( I F YES, BRANCH TO 1 2 0 0 ) 53801 260
80 I F ( I T - ITMP2 ) 1 0 01, 0 01, 2 0 0 53801 270
I S TEMPGREATERTHAN 150 ( I F YES, BRANCH
TO 1200) 53801 280
90 I F ( I T - ITMP3 ) 1 0 0 , 1 0 0 , 1 2 0 0 53801 290
1 O0 CONTINUE 53801 300
C 5 3 8 0 1 3O
1
IFLAG = O 53801 320
I D T = I T - IBASE 53601 330

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL.L VOLtX 80 m 0732290 052b184 b T 2 m

SECTIONVOLUME
FACTORS
CORRECTION X-319

IRHOT = IRHO 53801340


C I S HYDROMETER CORRECTION TO BE USED ( I F NO, BRANCH
TO 112) 53601 350
I F ( IHYDRO ) 1 0 1 , 1 0 1 1
, 12 53801 360
C 53801 370
C COMPUTE
HYDROMETER
CONSTANT AT DELTA T 53801 380
C HYC = 1 . - . 0 0 0 0 2 3 * ( D E G C - 1 5 ) - . 0 0 0 0 0 0 0 2 * ( D E G C - 1 5 ) * * 2 53601 390
1 0 1I R D = 5 53B01400
I F( I D T )1 0 5 1
, 101
, 10 53801 41O
1 0 5I R D = -5 53801 420
1 1 0I H 1 = (2300 * I D T +
I R D ) / 1O 53B01430
I H 2 = ( 2 $' I D T * I D T +
500) / 1000 53B01440
IHYC = 1 0 0 0 0 0 0 0 0 0 - I H 1 - I H 2 53B01450
C 53B01460
C APPLY HYDROMETER CORRECTION TO DENSITY 53B01470
I R D = IRHO * 1 0 53B01480
CALL MPY536(IRD,IHYC,IRHOT,lOOOO) 53801490
IRHOT = ( IRHOT +
50 ) / 1 0 0 53801500
C 53B0151 O
1 1 2 ICOUNT = O 53B01520
C I S RHO I N GASOLINE RANGE ( 6 5 0 - 7 7 8 . 5( )I F NO, BRANCH
TO 120) 53B01530
I F ( IRHO - NHIG ) 1 1 5 1
, 1 51
, 20 53801 540
1 1 5 KO = KOG 53801 550
K1 = K1G 53801 560
IREG = O 53801 570
GOTO 150 53601 580
C IS RHO I N JET RANGE ( 7 7 9 - 8 3 8 . 5( I)F NO, BRANCH
TO 130) 53801590
1 2 0 I F ( IRHO - N H I J ) 1 2 5 1, 2 5 1, 3 0 53801 600
125 KO = KOJ 53801 61 O
K1 = K1 J 53801 620
IREG = 1 53801 630
GO TO 1 5 0 53801 640
C RHO I ISN DIESEL REGION ( 8 3 9 - 1 0 7 5 ) ) 53601 650
1 3 0 CONTINUE 53601 660
IF(IC0UNT-2)140,135,135 53601 670
1 3 5 I F ( IRHO1 5 - N L O F ) 7 2 0 1 1 4 0 , 1 4 0 53801 680
1 4 0 CONTINUE 53801 690
KO=KO F 53801 700
K1 = K1 F 5 3 8 0 1 7O
1

|||| |||---
IREG = 2 53801 720
C 53601 730
|
1 5 0 ICOUNT = ICOUNT 1 + 53B01740 |||| |||| || || |

C 53B01750
I F (ICOUNT - 21) 6 01, 6 04, 0 0 53B01760
|||| |||| | | ||

C 53B01770
1 6 0 JRHOT = IRHOT * 1 0 0 0 0 53B01780
C 53801 790
|

IRHO1 5 = IRHOT 53601 800


|
| | |

C 5380181 O
53801 820
--

KRHO = O
C 53601 830
NP = O 53601 840
C 53601 850
300 NP = NP 1 + 53601 860
C 53601 870
CALL ALF53B( IRHO1 5 ,KO, K1 , I A L F ) 53601 880
C 53601 890
CALL V C F 5 3 B ( I A L F , I D T , I V C F ) 53601 900

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*11.1 VOL*X 80 m 0 7 3 2 2 9 0O 5 2 6 1 8 55 3 9 m

X-320 CHAPTER DATA


1 PR PHYSICAL PROPERTIES

C 5 3 8 0 1 9O 1
IVCF = ( IVCF + 50 ) / 100 53801 920
C 53801 930
CALL DIV53B(JRHOT,IVCF,IRH015,1000) 53601 940
C 53801 950
I F ( I A B S( I R H 0 1 5 - KRHO ) - 50 ) 500, 3 2 03, 2 0 53801 960
C 53801 970
320 KRHO = IRHO1 5 53801 980
C 53801 990
+

|||| |||---
IRH015 = ( IRH015 5 ) / 10 53802000
C 5380201O
I F ( NP - 2 0 ) 3 0 01, 1 5 01, 1 5 0 53802020

|
|||| |||| || || |
C 53802030
C STRAIGHT L I N E INTERPOLATION I S USED TO CONNECTTHE JETFUEL 53802040
C AND GASOLINE L I N E S (770.5-787.5 KG/CU
METRE). ONLY
THE 53802050
+

|||| |||| | | ||
C D E F I N I T I O N OF ALPHA I S CHANGED.
ALPHA = A B / (IRH015**2) 53802060
C 53602070
C 53802080

|
400 KRHO = O 53802090

|
| | |
NP = O 538021 O0

--
ICOUNT = 3 538021 1 O
C 53B02120
C FIRST GUESS I S 7 7 8 . 8 4 KG/CU METRE 538021 30
IRH015 = 77884 536021 40
JRHOT = IRHOT * 1 0 0 0 0 538021 50
C 538021 60
440 NP = NP 1 + 538021 70
CALL DIV53B(IB,IRHOl5,IRES,lOOOO) 53B02180
I R E S = IRES * 1 0 538021 90
CALL DIV53B(IRES,IRH015,IRES2,10000) 53802200
IRES2 = ( I R E S 2 5) / 1 0 + 5380221O
IALF = ( I A IRES2 + 5 ) / 10 + 53802220
CALL V C F 5 3 B ( I A L F , I D T , I V C F ) 53802230
IVCF = (IVCF 50) / 1 0 0 + 53802240
CALL DIV53B(JRHOT,IVCF,IRH015,1000) 53802250
C 53802260
I F ( IABS(IRHO15 - KRHO) - 70 ) 500, 4 6 04, 6 0 53802270
C 53802280
460 KSAV = KRHO 53802290
KRHO = IRHO1 5 53802300
IRHOl5 = ( IRH015 5 ) / 10 + 5 3 8 0 2 3 1O
I F ( NP - 40 ) 4 4 0 4, 8 0 4, 8 0 53802320
C 53802330
C RESTRICTINGDENSITY ( I R H 0 1 5 ) TO
THREE DECIMAL PLACES MAY 53802340
C CAUSE THE CONVERGENCE TECHNIQUE TO REACH ASTATIONARY 53802350
C POINT BEFORETOLERANCE
REACHED. THE AVERAGE
OF
THEUPPER 53802360
C AND
LOWER BOUNDARIES I S ASATISFACTORYSOLUTION. 53802370
C 53802380
C AVERAGE LAST TWO PASSES 53802390
C 53802400
480 I R H 0 1 5 = ( KRHO + KSAV ) / 2 5 3 8 0 2 4 1O
C 53802420
500 I F ( IRHO15 - LIM1 ) 5 1 05, 1 01, 2 0 0 53802430
51 O I F ( I R H 0 1 5 - LIM2 ) 1 2 0 05, 2 05, 2 0 53602440
C 53802450
520 JRHOT = ( I R H 0 1 5 50 ) / 1 0 0 + 53802460
IRH015 = ( IRH015 5 ) / 10 + 53802470
C FLOATING VALUE ROUNDED TO NEAREST 0 . 1 53602480

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I M P M S X L L - L V O L X X 80 m 0732290 0526186 475 m

SECTIONI-VOLUME
FACTORS
CORRECTION X-321

RH015 = FLOAT(JRH0T) / 1 0 . 53802490


C 53602500
I F (ICOUNT - 3 6) 0 07, 2 07, 2 0 5380251 O
C 53802520
600 I F (IREG -
1 ) 61 O , 6 2 0 ,6 4 0 53802530
C I S RH015 ABOVE GASOLINE REGION ( I F YES, BRANCH
TO 125) 53802540
610 I F ( IRHO15 - NHIG ) 6 8 06, 8 01, 2 5 53802550
C I S RH015 ABOVE JET REGION ( I F YES, BRANCH
TO 130) 53802560
620 I F ( IRH015 -
N H I J ) 6 3 06, 8 01, 3 0 53802570
C I S RH015 BELOW JET REGION ( I F YES, BRANCH TO 1 1 5 ) 53802580
630 I F ( IRH015 - NLOJ ) 1 1 56, 8 06, 8 0 53802590
C I S RH015 BELOW DIESEL REGION ( I F YES, BRANCH
TO 125) 53802600
640 I F ( IRHO15 - NLOF ) 1 2 5 6 , 80, ,680 5380261O
C 53802620
680 CONTINUE 53802630
53802640
C I F I R H 0.1G57E7.0 . 5 AND . L7E8. 7 . 5 , USE STRAIGHT L I N E 53802650
C I S .GE.
RH015 7( I7F0 . 5 YES, BRANCH
TO 690) 53802660
I F ( IRH015 INTl ) - 7 2 04, 0 06, 9 0 53802670
C I S RHO(7I 8 F. 7
L .E5. YES, TO
BRANCH 400) 53802680
690 I F ( IRH015 - I N T 2 ) 4 0 04, 0 07, 2 0 53802690
C 53602700
C 5380271 O
C I S RHO GREATER THAN 778.5 ( I F YES, BRANCHTO 790) 53802720
720 I F ( IRHO - I B P 1 ) 7 8 07, 8 07, 9 0 53802730
C ISGREATER
THAN
TEMP 60 ( I F YES, BRANCHTO 830) 53802740
780 I F ( IT -
I E P 1 ) 8 2 08,2 08,3 0 53802750
C I S RHO GREATER THAN 824 ( I F YES, BRANCHTO 81 O ) 53802760
--

790 I F ( IRHO - I B P 2 ) 8 0 0 , 8 0 0 , 810


| | |

53802770
|

C ISGREATER
THAN
TEMP 90 ( I F YES, BRANCHTO 830) 53802780
|

I T - I E P 2 ) 8 2 08,2 08,3 0
|||| |||| | | ||

800 I F ( 53802790
C ISGREATER
THAN
TEMP 120 ( I F YES, BRANCHTO 830) 53802800
810 I F ( I T - I E P 3 ) 8 2 08,2 08,3 0 5380281O
|||| |||| || || |

820 CONTINUE 53802820


RETURN 53B02830
C SET SWITCH INDICATING EXTRAPOLATED REGION 53802840
830IFLAG = 1 53802850
|
|||| |||---

RETURN 53802860
C 53802870
1150WRITE(NOUT,6020) DEGC, RHO 53802880
6020 FORMAT(5Hl AT , F 6 . 2 , 1 5 H DEGREES C AND , F 6 . 17, 0 H KG/CU METRE, A53802890
1 CORRESPONDING DENSITY AT 1 5 C COULD NOT BEDETERMINED. ) 53802900
C 5380291 O
C SET SWITCH INDICATING OUTSIDE RANGE OF TABLE 5 3 8 53802920
1 2 0 0I F L A G = -1 53802930
RH015 = - 9 9 9 . 9 53802940
RETURN 53802950
END 53802960

SUBROUTINE DIV53B(INUM,IDENOM,IRES,ISCALE) 53802970


C 53802980
C T H I S SUBROUTINE I S DESIGNED TOPRODUCE ADDITIONAL 53802990
C ACCURACY FROM
AN INTEGER D I V I D E WHERE
THE
NUMERATOR 53803000
C I S ISCALE GREATERTHANTHE DENOMINATOR. THE SUBROUTINE 53B0301 O

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API MPMS*LL.L VOL*X 80 W 0732270 0.526187 301 W

X-322 CHAPTER 11"PHYSICAL PROPERTIES DATA

C ASSUMES
PROPER SCALING OF BOTHTHE INPUT NUMERATOR 53603020
C AND DENOMINATOR AND WILL RETURNTHE RESULTS MULTIPLIED 53803030
C BY ISCALE. 53003040
C 53003050
IRES1 =INUM/IDENOM 53003060
IRES2=(INUM-IRES1*IDENOM)*ISCALE/IDENOM 53803070
IRES=IRESl*ISCALE+IRES2 53803080
RETURN 53003090
END 530031 O0

SUBROUTINE A L F 5 3 0 ( I R H O , K O , K l , I A L F ) 538031 1O
C 538031 20
C T H I S SUBROUTINE I S DESIGNED TO CALCULATE ALPHA FOR 538031 30
C USE I N DETERMINATION OF VOLUME CORRECTION 530031 4 0
C FACTOR. ALTHOUGH ALLCALCULATIONS ARE DONE
AS INTEGERS, 530031 50
C THE SUBROUTINE RETURNS WITHA8 D I G I T VALUE 530031 60
C 538031 70
C INPUTVARIABLES 538031 80
C IRHO=DENSITY*lOO(KILOGRAMS/CUBIC METRE) 53803190
C KO,K1=COEFFICIENTS OF DESIRED CURVE * 1 0 0 0 0 53803200
C 53B0321 O
C ALGORITHM- 53803220
C ALPHA=KO/RH0**2+Kl/RHO 53603230
C 53803240
C CALCULATE K1 /RHO 53803250
C 53803260
INUM-K1 * 1 O000 53803270
CALL DIV53B(INUM,IRHO,IALFl,lOOOO) 53003280
C 53003290
C CALCULATE KO/RH0**2 53803300
C 5380331O
INUM=KO * 1 O0 53003320
CALL DIV53B(INUM,IRHO,IALFS,lOOOO) 53003330
CALL DIV53B(IALFS,IRHO,IALF2,10000) 53003340
I A L F = ( I A L F I + I A L F 2 + 5 0 0) / l o 0 0 53803350
RETURN 53003360
END 53603370

SUBROUTINE V C F 5 3 B ( I A L F , I D T , I V C F ) 53003380
--

C 53003390
| | |

C T H I S SUBROUTINE I S DESIGNED TO CALCULATE VOLUME 53003400


|

5380341O
|

C CORRECTION FACTOR. ALTHOUGH ALL CALCULATIONS ARE DONE


|||| |||| | | ||

C AS INTEGERS, THE SUBROUTINE RETURNS WITHA8 53003420


C OR 9D I G I T VALUE DEPENDENT UPONWHETHER IDT 53003430
C I S POSITIVE OR NEGATIVE. 53003440
|||| |||| || || |

C 53003450
C ALGORITHM- 53003460
C VCF=EXP(-ALPHA*DT(l.O+0.8*ALPHA*DT)) 53803470
|

C 53003480
|||| |||---

C CALCULATE ALPHA'DT 53803490


C 53003500
ITERMl=IALF*IDT 5300351O
C 53003520

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*IJL.L VOL*X 80 m 0732290 0526188 248 m

SECTIONV VOLUME CORRECTION


FACTORS X-323

C CALCULATE O.a*ALPHA*DT 53803530


C 53803540
53603550
C 53803560
C CALCULATE EXPONENT-ALPHA*DT(l.O+O.a*ALPHA*DT) 53803570
C 53603580
CALL MPY536(ITERM1,ITERM2,ITERM3,10000) 53603590
C 53803600
ITERM3 = ITERM1 + (ITERM3 + 5) / 1 O 5380361 O
IX=-ITERM3/10 53803620
C 53803630
C CALCULATE EXPONENTIAL(F1RST 7 TERMS OF POWER SERIES) 53603640
C 53603650
ISUMl=l OOOOOOOO+IX 53603660
CALL MPY53B(IX,IX,ISUM2,1000) 53803670
ISUM2=((1SUM2+50)/100)/2 53803680
CALL FAPY536( IX, ISUM2, ISUM3,lOOO) 53803690
ISUM3=((1SUM3+50)/100)/3 53603700
CALL MPY53B(IX,ISUM3,1SUM4,1000) 5360371 O
ISUM4=((1SUM4+50)/100)/4 53603720
CALL MPY53B(IX,ISUM4,ISUM5,1000) 53603730

|||| |||---
ISUM5=((ISUM5+5O)/lOO)/5 53803740
CALL MPY53B(IX,ISUM5,ISUM6,1000) 53803750

|
|||| |||| || || |
ISUM6=((ISUM6+50>/100)/6 53803760
IVCF=ISUM1+ISUM2+ISUM3+ISUM4+ISUM5+ISUM6 53803770
RETURN 53~03780

|||| |||| | | ||
END 53603790

|
|
| | |
SUBROUTINE MPY53B(IX,IY,IZ,ISCALE) 53603aoo
C THIS
ROUTINE
PERFORMS INTEGER MULTIPLICATION.
THE TOTAL 5380381 O

--
C NUMBER OF DIGITS IN IX AND IY MUST NOT EXCEED 17. OTHER 53603820
WISE,
C OVERFLOW
WILL
OCCUR. 53803830
C 53603840
IU1 = IX / ISCALE 53803850
K1 = ISCALE * IU1 53803860
IV1 = IX - K1 53803870
IU2 = IY / ISCALE 53803880
K2 = ISCALE * IU2 53803890
IV2 = IY - K2 53603900
K3 = IU1 * IV2 + IU2 * IV1 + IV1 * IV2 / ISCALE 5360391 O
IZ = (K3 + ISCALE/2) / ISCALE + IU1 * IU2 53603920
RETURN 53803930
END 53603940

Errata
Please make the following updates to this subroutine listing. For an explanation
of the updates see 11.1.6.

current: C IS RH0 LESS THAN 650. ( I F YES, BRANCH T0 1200) 53801 160
updated: C I S RH0 LESS THAN 653. ( I F YES, BRANCH T0 160
53801
1200)

current: IF ( IRH0 -
65000 1 1200, 40, 40 5380 1 170
updated: IF ( lRH0 - 65300 1 1200, 40, 40 5380 1 170

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS+LL.L VOLXX B O m 0732290 0526369 L84 m

X-324 CHAPTER DATA


1 PHYSICAL PROPERTIES

11-1.53.6 IMPLEMENTATION PROCEDURE FOR SUBROUTINE TAB53B

The use of the mnputer has gained widespread acceptance throughout the
petroleum industry. Computers are used for accountingpurposes , i n
process simulation and modeling, data r e t r i e v a l and evaluation, and are
now being used extensively i n custody t r a n s f e r measurements and trans-
actions.In1968, the American Petroleum I n s t i t u t er e c o g n i z e d the need
for incorporating existing petroleum measurement tables i n t o computer
code. I n June of 1973 , a subroutine for TABLE 6 , Volume Reduction to 60 OF,

w a s made available.Sincethen many of the otherstandardizedpetroleum


measurement tables have been mde a v a i l a b l e as computersubroutines.

However, the m q u t e r i z a t i o n of an e x i s t i n g table of numbers proved to be


a v e r y d i f f i c u l t task. For instance, it proved to be impossible to use
the mathematical expression that was supposedly used to generate the table
to the t a b u l a re n t r i e s .
values and c a l c u l a t ev a l u e si d e n t i c a l This was
modified and also because theprocedures used to round the a l c u l a t e d
values were i n c o n s i s t e n t .

The only way to overcome these problems i n a amputer subroutine was to


manually locate all the table e n t r i e s t h a t d i d mt agree w i t h the c a l c u l a t e d
values and add extensive"exception tables" to the d e . This made the d e
lengthy and somewhat cmbersome to d i f y and to some extent restricted
its use a
l largerconputing systems.

The w r k i n g group f o r TABLE 6 r e v i s i o n r e a l i z e d the importance of elimi-


n a t i n g any p o t e n t i a l f o r s u c h problems i n the f u t u r e and also recognized
t h e need to have amputer subroutines available at the time the new
petroleum measurement tables were released. The w r k i n g group decided to
o u t l i n e an explicit inplementationprocedure to be followed when using the
new c o r r e l a t i o nf o r mlume m r r e c t i o n factors. This implementation
procedure muld then be the Standard r a t h e r than a set of equations or set
of tables. Standardization of animplementation procedure implies
s t a n d a r d i z a t i o n o f the set of mathematical expressions used within the
computer code. Absoluteadherence to the outlinedprocedure w i l l insure
t h a t all computers and computer aode of the future, meeting the stated

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*lL.l VOLXX B O m 0732270 0526370 7Tb W

SECTIONVOLUME CORRECTION FACTORS X-325

s p e c i f i c a t i o n s and restrictions , will be able to produœ identical


results. Such a procedure allows for the maximun-t machine and code
independence.

The implementationprocedure as described in the following t e x t can by


careful and deliberate application of numerical analysis be followed
through the majority of language and word s i z e s i n present and a n t i c i p a t e d
use. To follow the standardprocedure means absolute and unwavering
adherence to the n d r o f d i g i t s s p e c i f i e d at each s t e p and to the
c a l c u l a t i o n a l p r o c e d u r e as outlined.

I n the procedure, the nomenclaturedigits (XXX.XX) means mathematically


s i g n i f i c a n t d i g i t s as d e f i n e d i n ASTM E380-76. I n the previous example,
a l l f i v e ( 5 ) d i g i t s i n the p a r e n t h e s i s are m t h e m a t i c a l l y s i g n i f i c a n t .
A t various steps i n the inplementation procedure, calculated r e s u l t s are
rounded or truncated. When rounding a r e s u l t to fewer d i g i t s t h a n t h e
total number available,thefollowingprocedure which was used a v e r r i d e s
t h a t of ASTM E380-76:

a ) when the f i r s t d i g i t to be discarded is less than 5, the last d i g i t


r e t a i n e d is m t changed.
b) when t h e f i r s t d i g i t to be discarded is greater than 4, the last
d i g i t r e t a i n e d is increased by one unit.

The procedure used i n t r u n c a t i n g a r e s u l t to fewer d i g i t s t h a n the total


number a v a i l a b l e is to s i n p l y d i s c a r d 611 d i g i t s following the last d i g i t
t o be r e t a i n e d and leaving the last r e t a i n e d d i g i t unchanged.

Another s p e c i f i c a t i o n is that the m e f f i c i e n t s used to relate the thermal


expansion a x f f i c i e n t a t 15 to the15 OC d e n s i t y base and all other
OC

c o n s t a n t s needed in the c o r r e l a t i o n rmst be used to exactly the number of


d i g i t s specified.

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API MPMS*:LL=L VOLXX BO 0732290 0 5 2 b L 9 1 832 W

X-326 CHAPTER DATA


1 PHYSICAL PROPERTIES

C a l c u l a t i o n procedure

S t e p 1: Round i n p u tv a r i a b l e s
a ) Round d e n s i t y to nearest 0.5 Kg/m3
mo = xxxx.x rounded
b ) Round observedtemperature to nearest 0.05 OC

T= XXX.XX rounded
Step 2: Calculatedifferenceinobservedtemperature and
base temperature
BASE TEMPERATURE = 15 .O0
DELTA = XXX.XX - 15.00 = XXX-XX

Step 3: Compute hydrometer c o r r e c t i o n krm ( o p t i o n a l )


HYC = 1.0 - .000023*DELTA - .00000002*DFLTA2
TERMl = .000023*DELTA = .OOXXXXXXX rounded
TERM2 = .00000002*DELTA2 = .OOOXXXXXX rounded
HYC = 1.000000000 - .ooXXXXXXX - .oooXXXXXX = -
.x

Step 4 : Application of hydrometer c o r r e c t i o n


mm = mo * HYC = xxxx.xx rounded

|||| |||---
Step 5 : I n i t i a l i z e 15 O C density
RH015 = RHDI? = =X
.X |
|||| |||| || || |
|||| |||| | | ||

Step 6A: C a l c u l a t e c o e f f i c i e n t of thermalexpansion


ALPHA = Ko/F!H01S2 + R1/F?H015
|

z
wMX
.X
XX
|

KO =
| | |

.m
--

KI =
TERMl = Ko/RHO15 = X
.XXXXXXX truncated
TERM2 = TERMl/RH015 = . O O m truncated
TERM3 = K1/IM015 = . O O m truncated
ALPHA = TERM2 + TERM3 = .OOOXXXX rounded

Step €
43:Calculation of ALPHA for s t r a i g h t l i n e segment
ALPHA = A + B/RH015 2

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API MPMS*33~3 VOL*X A O m 0732290 0526372 779

SECTIONVOLUME
FACTORS
CORRECTION X-327

A = -.O0336312 (as of May 1r 1980)


B = 2680.3206 (as of May 1, 1980)
T E F W = B/RH015 = X.XXXXXX truncated
TERM2 = TERMl/W015 = X
.X
XXX
XXX rounded
ALPHA = A + TERM2 = .OOxXXXX rounded

Step 7: Calculate volume correctionfactor


VCF = MP(-ALl?HA*DELTA - O. 8*ALPHA2*DELTA2)
a ) calculate exponent
TERMl = ALPHA * DELTA = X
.XXXXXXXX truncated
TERM2 = 0.8 * X
.XXXXXXXX truncated
TERMl =
TERM3 = TERMl * TERM2 = X.XXXXXXXX truncated
TERM4 = - TERMl - TERM3 = X
.XXXXXXX truncated
b) calculate e x p e n t i a l
VCF = M p (TERM4) = X.XXXXXX rounded
(Must use at least the first seven terms of
t h e p e r series expansion. )

Step 8: Calculate 15 O C density


RH015 = RHm/VCF = XXXX.XXX truncated

|||| |||---
|
Since the equation for p15 cannot be solved explicitly, a successive

|||| |||| || || |
approximation iterative scheme is used t o obtain a solution. The i n i t i a l
estimte of p15 is the value of the density a t observed temperature t. |||| |||| | | ||

This approximation is substituted into the right hand side of the equation
|

to obtain a second value approximation. This process of substituting into


|
| | |

the right hand side of the equation and estimating a new value from the
--

other is repeated until tvm consecutive results are i n agreen-mt to the


desired degree ofaccuracy. In subroutine TAF353B, a convergd solution is
reached when the change i n density i s less than O. 05 Kg/m’ in tvm
successive passes. If the coquted value of the 15OC density is not on
the s a r e cume as the obsnrved density, the parameters KO and K1
used t o determine the coefficient of thermal expansion must be redefined
and the convergence technique repeated. A straight line inteqolation is

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API MPMS*LL.L VOL*X 80 m 0732290 0526373 b05 m

X-328 CHAPTER DATA


1 P PHYSICAL PROPERTIES

used to connect the jet fuel cuwe with the gasoline curve b
e
- 770.5
and 787.5 Kg/m3. When t h i s occurs, the coefficient of theml expansion is
defined as:
a 2
1 5 = A + B/p15

where A = -.O0336312 (as of May 1, 1980)


B = 2680.3206 (as of May 1, 1980)

In t h i s case, the tolerance is increased to 0.07 Kg/m 3 .


The 1980 i n t e g e r FoF3WiN code issued by API containboth an i n t e g e r
d i v i s i o n and an i n t e g e r r m l t i p l i c a t i o n a l g o r i t h m . A d e s c r i p t i o n of each
follows .

INTEGER MULTIPLICATION PROCEDURE


(For 32 B i t Arithmetic)

|||| |||---
DATA DEFINITION

|
X,Y are integer numbers that are equal to or less than 2*109 ( s l i g h t l y

|||| |||| || || |
less than 231) .
A l a r g e r v a l u e may causeoverflow.Inaddition,the
t o t a l n&r of d i g i t s i n X and Y nust not exceed 17, otherwise overflow

|||| |||| | | ||
w i l l occur. Z is the
product (X*Y) s c a l e d by i.e. Z = (X*Y) /lo8.

|
|
| | |
Note: I f it is desirable to & t a i n maximum p r e c i s i o n , X and Y may be
--
s c a l e d up p r i o r to use oftheprocedure.Typically, a t least 1 5 d i g i t s
are reeded to o b t a i n 6 d i g i t p r e c i s i o n , 1 6 for 7 and 17 for 8. The
largest value of X and Y that may be used are 2 O00 O00 O00 and
99999 999. ( E i t h e r v a l u e s may k used f o r X and Y) .
CALCULATION
x/10000 = u1
10000 * u1 = Kl
X-K1 = v1
Y/10000 = u2
10000 * U2 = K 2

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*11.1 V O L X X 80 0732290 0526394 541 m

SECTION FACTORS
1-VOLUME CORRECTION X-329

Y-K2 = v2
(Ul*V2) + (U2*Vl) + (Vl*V2/10000) = K3
(K3 + 5000)/10000 + Ul*U2 = Z

Note: Z has been scaled by and may have to be rescaled before use.

|||| |||---
ToTAc DIGITS IN X AND Y 12

|
13 14 15 16 17

|||| |||| || || |
DIGITS IN PFOIXJCI’, Z 3-4 4-5 5-6 6-7 7-8 8-9

|||| |||| | | ||
INTEGER DMSION PWXEWRE
(For 32 B i t Arithmetic)

|
|
| | |
--
DATA DEFINITIaJ
X,Y are i n t e g e rn u m k r ss u c ht h a t X is equal to or less t!an -1 and Y
is of order of magnitude lo4 less than X.

R is the quotient of X / Y scaled by lo4, i.e. ,R= x/Y * lo4.

Note: If it is d e s i r a b l e to obtain maximum precision, X and Y may IE scaled


up prior to use of theprocedure.Typically,the mre d i g i t s t h a t are
c a r r i e d i n b o t h X and Y, the mre a c c u r a t e d i g i t s on output.

x/Y = u1
Ul*Y=Kl
X - K1 = V I
Vl/Y = u2
U1 * 10000 + U2 = R

Note: R has been scaled by lo4 and may need to be rescaled before use.

Examples f o r Checkout

The followingexanples illustrate how the implementationprocedure i s


a c t u a l l y used to &termine the value of a density a t 15 OC for Generalized
Products. The examples carry thecomputationsthrough each step ofthe

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
X-330 CHAPTER DATA
1 PHYSICAL PROPERTIES

procedure showing t h e r e s u l t s ofeachmathematicaloperation. The m p u t e d


values are given to therequiredprecision and it is indicatedif a value
has keen munded or truncated. The step-by-step c a l c u l a t i o n s are shown f o r
the first iteration then a table is presented which s u m a r i z e s t h e
intermediate values used to obtain a mnverged solution.

These examples are to be used as test cases f o r s u b r o u t i n e TAF353B t o v e r i f y


t h e computer code has not been altered or incorrectly reproduced. ?he
r o u t i n e has beendesigned to execute on machines t h a t use word s i z e of
32-bits or greater. Any n e w developnent of mnputer d e t h a t is designed
to follow the standardinplementationprocedure must i n s u r e t h a t the values
computed at each step in the procedure are i d e n t i c a l to thosegiven i n the
examples.

EXAMPLE 1

step 1: w u n di n p l tv a r i a b l e s
a ) murid d e n s i t y t a nearest 0.05
RHO = 903.5 rounded
b ) Round observed temperature to nearest 0.05
T = 54.45 rounded

Step 2: C a l c u l a t ed i f f e r e n c e in observedtemperature and base temperature


BASE TEMPERATURE = 15.O0
DELTA = 54.45 - 15.00 = 39-45

Step 3 : Campute hydrometer m r r e c t i o n term


HYC = 1.0 - .OOOO23*DELTA - .00000002*DELTA2
TERMl = .000023*DFLTA = .O00907350 rounded
TERM2 = ~ooOOo~~~*DELTA2 = .O00031126 rounded
HYC = 1.OOOOOOOOO - TERMI. - TERM2 = .999061524

Step 4 : Application of hydrometer a x r e c t i o n


RHm = RHO * HYC = 902.65 rounded
-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL.L VOL*X 80 m 0732290 052b39b 314 m

SECTIONVOLUME
FACTORS
CORRECTION x-331

Step 5: I n i t i a l i z e 15 O C density
RH015 = RHcrr = 902.65

Step 6A: Calculatecoefficientofthermalexpansion


ALPHA +
= K o / F % I O ~ ~ ~K1/wI015
KO = 186.9696 (as of May 1, 1980)
K 1 = 0.4862 (as of May 1, 1980)
TERM1 = Ko/RH015
TERMl = .20713410 truncated
TERM;! = TE!FNl/IM015
TERM2 = .O002294733 truncated
TERM3 = K1/RH015
TERM3 = .O005386362 truncated
ALPHA = TERM2 + TERM3 = .O007681 rounded

Step 7: Calculate volume m r r e c t i o n factor


VCF = MP(-ALPHA * DELTA - 0.8 * m m 2 * DELTA*)
a ) Calculateexponent
TERMl = ALPHA * DELTA = .O30301545 truncated
TERM2 = 0.8 * TERMl = .O24241236 truncated
TERM3 = TERMl * TERM2 = .O00734547 rounded
TERM4 = JI'EZMl - TERM3 = -.O3103609
b) C a l c u l a t e e x p n e n t i a l
VCF = MP(TERM4) = .969441 rounded
(must use the first seven terms of t h e m e r series
expansion of eX)

S t e p 8: Calculate15 O C density
RH015 = RHOT/VCF = 931.103 truncated

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*lIII.lI VOLXX AO m 0732290 052bl197 250 m

x-332 CHAPTER DATA


1 P PHYSICAL PROPERTIES

TABLE 1 shaws the r e s u l t s of e a c h i t e r a t i o n .

TABLE 1

ITERATION RH015 ( N ) ALPHA VCF RHol5(N+1)


1 902.65 .O007681 .969441 931.103
2 931.10 .O007378 .970655 929.939
3 929.94 .O007390 .970607 929.985

RH015 = 930.0 rounded b nearest 0.1

EXAMPLE 2
Step 1: Round input v a r i a b l e s
a ) Mund d e n s i t y to nearest 0.5
RHO = 849.0 rounded
b ) Mund observed tenperature to nearest 0.05
T = -13 -60 rounded

Step 2: C a l c u l a t ed i f f e r e n c e i n &
ser
ved temperature and base
temperature
BASE TEMPERATURE = 15 .O0
DELTA = -13.60 - 15.O0 = -28.60

|||| |||---
Step 3: Compute hydrometer a x r e c t i o n term
HYC = 1.0 - .000023*DELTA - .000000002*DELTA2 |
|||| |||| || || |

rounded
= .000023*DELTA = -.O00657800
TERM2 = .0000002*DELTAL = .O00016359 rounded
|||| |||| | | ||

HYC = 1.OOOOOOOOO - TERMl - TERM2 = 1.000641441


|
|
| | |

Step 4: m l i c a t i o n of hydrometer m r r e c t i o n
--

RHOT = RHO * Hyc = 849.54 rounded

Step 5 : I n i t i a l i z e 15 density O C

RH015 = RHUT = 849.54

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL.L VOL*X B O m 0732290 052bL9B L97 m

SECTIONVOLUME
FACTORS
CORRECTION x-333

Step 6: of thermal expansion


C a l c u l a t ea e f f i c i e n t
ALPHA = K o / R H O ~+
~ ~K1/FH015
KO = 186.9696 (as of May 1, 1980)
K1 = 0.4862 (as of May 1, 1980)
TERM1 = Ko/F?HO15
TERMl = .22008333 truncated
TERM2 = TERMl/RHO15
TERM2 = .O002590617 truncated
TERM3 = K1/F!H015
TERM3 = .O005723097 truncated
ALPHA = TERM2 + TERM3 = .O008314 rounded

Step 7: Calculate volume m r r e c t i o n factor


VCF = MP( -ALPHA * DELTA - 0.8 * ALPHA2 * DELTA2)
a) Calculate e x p e n t
TERMl = ALPHA * DELTA = -.O23778040 truncated
TERM2 = 0.8 * TERMl = -.O19022432 truncated
TERM3 = TERMl * TERM;! = .O00452316 rounded
TERM4 = JlERMl - TERM3 = .O2332572 truncated
b) Calculate exponent ia1
VCF = EXP(TERM4) = 1.023600 rounded
(must usethe first seven brins of the power series
expansion of ex)

Step 8: Calculate15 O C d e n s i t y
RH015 = F?HOT/KF = 829.953 truncated

TABLE 2 shows the r e s u l t s o f e a c h i t e r a t i o n .

TABLE 2A

ITERATION RHO15( N ) ALPHA VCF RHOl5(N+1)


1 849.54 .O008314 1.023600 829.953
2 829.95 .O008573 1.024329 829.362
3 829.36 .O008581 l. 024352 829.343

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
x-334 CHAPTER DATA
1 PHYSICAL PROPERTIES

Computed value of RH015 is m t cn the same curve as the input density .


Redefine KO and K 1 f o r the jet fuelcurve and repeat themnvergence
scheme in steps 5 through 8.

Table 2B shows the r e s u l t s .

TABLE 2B

ITERATION M015 ( N ) ALPHA VCF RHOl5(N+l)


1 849.54 .O008238 1.023386 830.126
2 830.13 .O008628 l.024484 829.236
3 829.24 .O008646 1.024535 829.195

RHO15 = 829.2 rounded to nearest O .1

EXAMPLE 3
Step 1: Round inpt v a r i a b l e s
a ) Wund density to n e a r e s t 0.5
RHO = 801.0 rounded
b ) mund&sewedtemperature to nearest 0.05
T = 25.00 rounded

Step 2: Calculatedifferencein&servedtemperature and base


tenperature
BASE "PERATURE = 15 .O0
DELTA = 25.00 - 15.00 = 10.00
|||| |||---

Step 3: Compute hydrometer a x r e c t i o n term


2
= 1.0 - .O00023 * DELTA - .O0000002 *
|

HYC DELTA
|||| |||| || || |

TERMl = .O00023 *
DELTA = .O00230000 rounded
TERM2 = .O0000002 * DELTA2 = .000002000 rounded
|||| |||| | | ||

WC = 1.OOOOOOOOO - TEFNL - TERM;! = .999768000


|
|

Application of hydrcmeter correction


| | |

Step 4:
RHW = RHO * €WC = 800.81rounded
--

S t e p 5: I n i t i a l i z e 15 OC density
RH015 = RHW = 800.81

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API MPMS*LL-L V O L * X B O 0732270 0526200 675 M

SECTIONV VOLUME CORRECTION FACTORS x-335

Step 6: C a l c u l a t e e f f i c i e n t of thermal expansion


2
ALPHA = Ko/€?EIOi5 + Kl/lW015
KO = 594.5418
(as of May 1, 1980)
K 1 = 0.0 (as of May 1, 1980)
" l= Ko/RH015 truncated
TEF" = ,74242554 truncated
TERM2 = TERMl/FW015
TERM2 = .O009270932 truncated
TERM3 = K1/RHO15
TERM3 = 0.0
ALPHA = T"2 + TERM3 = .O009271 rounded

Step 7: Calculate mlume c o r r e c t i o n factor


VCF = M p ( -ALPHA * DELTA - O. 8 * ALPHA2 * DKTA2)
a ) Calculateexponent
TERM1 = " P H A * DELTA = .O09271000 truncated
TERM2 = 0.8 * TERMl = .O07416800 truncated
TERM3 = TERMI. * TERM2 = .O00068761 rounded
TERM4 = - TERM3 = - .O09339761 truncated
b) Calculateexponential
VCF = MP(TERM4) = .990704 rounded
(must usethe f i r s t seven terms of the p e r series
expansion of eX)

S t e p 8: Calculate 15 O C density
RH015 = RHOT/V@F = 808.324 truncated

TABLE 3 shows t h e r e s u l t s of each iteration.

ITERATION RH015 ( N ) ALPHA VCF RHOl5(N+1)


1 800.81 .O009271 .990704 808.324
2 808 .32 .o009099 .990877 808.183
3 808 .18 .O009103 .990873 808.186

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I M P M S * L L - L VOL*X BO 0732290 0.526201 5 0 1 H

x-336 CHAPTER
DATA
PROPERTIES
1 I-PHYSICAL

RH015 = 808.2 rounded b marest O .1

EXAMPLE 4
Step 1: Round i n w tv a r i a b l e s
a ) Wund d e n s i t y to nearest 0.5
RHO = 738 .O rounded
b ) wund observed terrperature to nearest 0.05
T = 60 .O0 rounded

Step 2: C a l c u l a t ed i f f e r e n c e in observedtenperature and base


tenperature
BASE TEMPERATURE = 15 .O0
DELTA = 60.00 - 15.00 = 45.00

Step 3: Campute hydrometer m r r e c t i o n term


2
HYC = 1.0 - .O00023 * DELTA - .O0000002 * DELTA
TERMl = .O00023 * DELTA = .O01035000 rounded
TERM2 = .O0000002 * DELTA2 = .O00040500 rounded
HYC = 1.OOOOOOOOO - TE€" - TERM;! = .998924500

step 4: Application of hydrameter c o r r e c t i o n


= RHO * HYC = 737.21 rounded

Step 5: I n i t i a l i z e 15 OC density
RHO15 = RHW = 737.21

Step 6: C a l c u l a t e a x f f i c i e n t of thermal expansion


ALPHA = K o / R H O ~ ~ ~K1/RH015 +
KO = 346.4228 (as of May 1, 1980)
K 1 = 0.4388 ( a o~f May 1, 1980)
m= Ko/RH015
TERMl = .46991060 truncated
"2 = TERMl/RH015
TERM2 = .O006374175 truncated
TERM3 = K1/RH015
TERM3 = .O005952171 truncated
AI;pHA = TERM2 + TERM3 = .O012326 rounded

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
SECTIONV VOLUME
FACTORS
CORRECTION x-337

Step 7: Calculate volume a x r e c t i o n factor


VCF = EXP(-ALPHA * DELTA - O. 8 * ALPHA2 * DELTA2)
a) Calculateexponent
TERMl = ALPHA * DELTA = .O55467000 truncated
TERM2 = 0.8 * TERMl = .O44373600 truncated
TERM3 = TENU * TERM;! = .O02461270 rounded
- TERM3 = -.O5792827 truncated

|||| |||---
TERM4 = “ 1
b) Calculateexponential

|
|||| |||| || || |
VCF = EXP(TERM4) = .943718 rounded
(must use t h e f i r s t seven tem of the power series

|||| |||| | | ||
expansion of eX)

|
|
| | |
S t e p 8: Calculate 15 OC density

--
RHO15 = RHOF/VCF = 781.176 truncated

TABLE 4A shows t h e r e s u l t s of each iteration.

TABLE 4A

ITERATION RHO15 ( N ) ALPHA VCF RHOl5(N+l)


1 737.21 .O012326 .943718 781.176
2 781.18 .O011294 .948485 777.250
3 777.25 0011380 .948088 777 e 575
4 777.58 .O011373 .948120 777.549

Computed value of RH015 is on t h e s t r a i g h t l i n e segment m m e c t i n g t h e jet


fuelcurvewiththegasolinecurve.Redefine ALPHA and repeat anvergence
scheme i n steps 5 through 8.

Step 5: I n i t i a l i z e 15 O C density.
RHO15 = 778.84

Step 6B: Calculation of ALPHA for s t r a i g h t l i n e segment.


ALPHA = A + B/RH0152
A = - .O0336312 (as of May 1, 1980)

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API MPMS*LL.L VOLtX 80 0732290 O526203 384 m

X-338 CHAPTER DATA


1 PHYSICAL PROPERTIES

B = 2680.3206 (as of May 1, 1980)


TERMl = B/RH015 = 3.441426 truncated
TERM2 = TEFMl/RH015 = .O0441866 rounded
ALPHA = A + TERM2 = .O010555 rounded

S t e p 7: Calculate volume m r r e c t i o nf a c t o r
VCF = MP(-ALPHA* DELTA - O. 8 * mm2 * DELTA*
a ) Calculateexpcnent
TERM4 = -.O4749750 - .O0180481 = -.O4930231
b ) Calculateexponental
VCF = MP(TERM4) = .951893
(must usethe f i r s t seven tem of the m e r series
expansion of eX)

S t e p 8: Calculate 15 O C density
RH015 = 737.21/.951893 = 774.467

TABLE
4B

ITERATION M015 ( N ) ALPHA VCF RHO15 ( N+1)


1 778.84 .O010555 .951893 774.467
2 774.47 .O011055 .949588 776.347
3 776.35 .O010839 .950584 775.533
4 775.53 .O010933 .950151 775.887
5 775.89 .O010892 .950340 775.732
6 775.73 .o010910 .950257 775.800

RH015 = 775.8 rounded to nearest 0.1

EXAMPLE 5
Step 1: Round inputvariables
a ) mund density to nearest 0.5
RHO = 779 .O0 rounded
b) €&und observed temperature to nearest 0.05
T = -10.85 rounded

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL.L VOL*X 80 0732270 0526204 210 m

SECTIONVOLUME CORRECTION
FACTORS x-339
--
| | |

S t e p 2: Calculatedifferenceinobservedtemperature and base


|
|
|||| |||| | | ||

temperature
BASE TEMPERATURE = 15 .O0
|||| |||| || || |

DELTA = -10.85 - 15.00 = -25.85


|
|||| |||---

Step 3: Compute hydrometer c o r r e c t i o n term


€WC -
.O00023 * DELTA
= 1.0 .O0000002 * DELTA2 -
TERM1 = .O00023 * DELTA = -.O00594550 rounded
TERM2 = .O0000002 * DF,LTA2 = .O00013364 rounded
HYC = 1.000000000 - TERMl - TERM2 = 1.000581186

S t e p 4: Application of hydrameter correction


RHW = RHO * HYC = 779.45 rounded

S t e p 5: I n i t i a l i z e 15 O C d e n s i t y
RH015 = RHOT = 779.45

S t e p 6: C a l c u l a t e m f f i c i e n t of thermalexpansion
2
ALPHA = Ko/PH015 + K1/MO15
KO = 594.5418 (as of May 1, 1980)
K 1 = 0.0 (as of May 1, 1980)
"l= Ko/RI015
TERMl = .76277092 truncated
TERM2 = T"l/PH015
TERM2 = .O009786014 truncated
TERM3 = K1/RH015
TERM3 = 0.0
ALPHA = TERM2 + TERM3 = .O009786 rounded

Step 7: Calculate volume m r r e c t i o n factor


VCF = EXP(-ALPHA * DELTA - 0.8 * ALPHA;! * DELTA^)
a ) Calculateexponent
TERMl = ALPHA * DELTA = -.O25296810
truncated
TERM2 = 0.8 * " l= -.O20237448 truncated
TERM3 = TERM1 * TERM2 = .O00511943 rounded
TERM4 = "1- TERM3 = -.O24784867 truncated

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
x-340 CHAPTER
1 PHYSICAL PROPERTIES
DATA

b) Calculate exponental
VCF = EXP(TERM4) = 1.025095 rounded
(must use the first seven terms of the p e r series
expansion of ex)
--

Step 8: Calculate 15 O C density


| | |

RHO15 = FWX/VCF = 760.368 truncated


|
|
|||| |||| | | ||
|||| |||| || || |

Table 5A shows the results ofeach iteration,


|
|||| |||---

TABLE 5A

ITERATION m015 (N) ALPHA VCF RHO15( N+1)


1 779.45 .O009786 l.025095 760.368
2 760.37 .O010283 1.026358 759.432
3 759.43 .O010309 l. 026424 759.384

Computed value of RH015 is m t on the same curve as the input density.


Refine KO and K1 for the gasoline curve and repeat the convergence
scheme in steps 5 through 8. Table 5B shows the results.

TABLE 5B

ITERATION RH015(N) ALPHA VCF W015(N+1)


1 779 45 .O011332 l. 029020 757.468
2 757.47 .O011831 1.030284 756.538
3 756.54 .O011853 1 030340 756.497

RH015 = 756.5 rounded to nearest 0.1

EXAMPLE 6
Step 1: Round inplt variables
a ) Faund density m nearest 0.5
RHO = 684.5 rounded
b ) mund observed temperature t~ nearest 0.05
T = 34.45 rounded

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*lJL.Z V O L X X 80 m 0732290 0526206 O93

SECTIONVOLUME CORRECTION
FACTORS x-341

Step 2 : C a l c u l a t e d i f f e r e n c e i n &served temperature and base


tenperature
BASE TEMPERATURE = 15 .O0
DELTA = 34.45 - 15.00 = 19.45

S t e p 3 : Compute hydrometer m r r e c t i o n term


HYC = 1.O - .O00023 * DELTA - .O0000002 * DELTA2
TERMl = .O00023 * DELTA = .O00447350 rounded
TERM2 = .O0000002 * DELTA2 = .O00007566 rounded
HYC = 1~000000000- TEm - T E m = .999545084
--

Application of hydrmeter o o r r e c t i o n
| | |

Step 4:
|

MOI? = RHO * HYC = 684.19 rounded


|
|||| |||| | | ||

Step 5: I n i t i a l i z e 15 density
|||| |||| || || |

O C

M015 = MOI? = 684.19


|
|||| |||---

S t e p 6: C a l c u l a t e e f f i c i e n t of thermal expansion
2
ALPHA = Ko/RHO15 + Kl/RH015
KO = 346.4228 (as of May 1, 1980)
K1 = 0.4388 (as of May 1, 1980)
= Ko/RHO15
TERMl = .S0632543 truncated
TERM2 = TERMl/RHO15
TERM2 = .O007400362 truncated
TERM3 = K1/REl015
TERM3 = .O006413423 truncated
ALPHA = TERM2 + TERM3 = .O013814 rounded

Step 7: Calculate volume m r r e c t i o nf a c t o r


VCF = EXP( -ALPHA * DELTA -
0.8 * m m 2 * DEGTA~)
a) Calculateexponent
TEFW = ALPHA * DELTA = .O26868230 truncated
TERM2 = 0.8 * TERMl = .O21494584 truncated
TERM3 Em * TERM2 = .O00574458 rounded
= T
TERM4 = 4"l - TERM3 = -.O2744575 truncated

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API M P M S * L L * L VOL*X 8 0 m 0732290 0526207 T 2 T m

X-342 1 PHYSICAL PROPERTIES


CHAPTER DATA

b ) Calculateexponental
VCF = EXp("4) = .972927 rounded

|||| |||---
(must use t h e f i r s t seven terms of the m e r series

|
|||| |||| || || |
expansionof ex)

|||| |||| | | ||
Step 8: Calculate 15 O C density
RHO15 = RHOT/VCF = 703.228 truncated

|
|
| | |
--
Table 6 shows the r e s u l t s of each iteration.

TABLE 6

ITERATION RH015 (N) AGPHA VCF RHO15( N + l )


1 684 .19 .O013814 .972927 703.228
2 703.23 .O013245 .974050 702.417
3 702.42 .O013268 .974005 702.450

RH015 = 702.5 rounded b nearest O. 1

EXAMPLE 7
Step 1: Round inputvariables
a ) Wund d e n s i t y to nearest 0.5
RHO = 756 .O rounded
b ) €@und observedtemperature to nearest 0.05
T = 80 .O0 rounded

Step 2: Calculatedifferencein&servedtemperature and base


temperature
BASE 'IEMPERATURE = 15 .O0
DELTA 80 .O0 - 15.O0 = 65.00

Step 3 : Compute hydrometer a x r e c t i o n term


HYC = 1.o .O00023 * DELTA - .O0000002 - * DELTA
2

= ,000023 * DELTA = .O01495000 rounded

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL-L VOL*X 80 0732290 052b208 9 b b

SECTIONVOLUME CORRECTION
FACTORS X”

TERM2 = .O0000002 * DELTA2 = .O00084500 rounded


HYC = 1.OOOOOOOOO -“l- TERM2 = .998420500

step 4: Application of h y d m w t e r c o r r e c t i o n
mm = RHO * HYC = 754.81 rounded

S t e p 5: I n i t i a l i z e 15 O C density
RH015 = RHDI’ = 754.81

Step 6: C a l c u l a t e e f f i c i e n t ofthermalexpansion
ALPHA = K0/W015~ + K1/RH015
KO = 346.4228 (as of May 1, 1980)
K 1 = 0.4388 (as of May 1, 1980)
“l= Ko/FH015
“l= .45895364 truncated
TERM2 = TEFWl/RHO15
TEWU = .O006080386 truncated
TERM3 = KdRH015
TERM3 = .O005813383 truncated
ALPHA = TERM2 + TERM3 = .O011894 rounded

Step 7: Calculate volume m r r e c t i o nf a c t o r


VCF = MP ( -ALPHA * DELTA - o. 8 * ALPHA^ * DELTA^ )
a ) Calculateexponent
TERMl = ALPHA * DELTA = .O77311000 truncated
TERM2 = 0.8 * TERMl = .O61848800 truncated
TERM3 = TEFW * TERM2 = .O04781593 rounded
TERM4 = -“l - TERM3 = -.O8209259 truncated
b ) Calculateexponental
VCF = EXP(TERM4) = .921187 rounded
(must use the f i r s t seven tem of the power series
expansion of eX )

Step 8: Calculate 15 O C d e n s i t y
mo15 = mm/VCF = 819.388 truncated
-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API M P M S * L L - L V O L * X 8 0 0732270 O526207 & T 2

X-344 1 PHYSICAL PROPERTIES


CHAPTER DATA

Table 7A shows the r e s u l t s of each iteration.

TABLE
7A

ITERATION m015 ( N) ALPHA VCF RHolS(N+l)


1 754.81 .O011894 .921187 819.388
2 819.39 .O010515 .930452 811.229
3 811.23 .O010673 .929392 812.154
4 812.15 .O010655 .929513 812.048
5 812.05 .O010657 .929499 812.061

Coquted value of RH015 is mt m the same curve as the input density,


Redefine Ko and K 1 for the jet f u e l c u r v e and repeat the mnvergence
scheme in steps 5 through 8.

Table 7l3 shows t h e r e s u l t s .

TABLE 7B

RH015
ITERATION (N) ALPHA VCF RHOl5(N+l)
1 754.81 .O010435 .930989 810.761
2 810.76 .O009045 .940299 802.734
3 802.73 .O009227 .939081 803.775
4 803.78 .O009203 .939242 803.637
5 803.64 .O009206 .939222 803.654

RH015 = 803.7 rounded to nearest 0.1

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API MPMS*LL.L VOLXX 80 m 0732290 D5262LD 5 1 4

FACTORS
SECTIONVOLUME CORRECTION x-345

î..î.îS4 TABLES 54A, 548, and 54C- The development and intended use of these tables is
Correction of Volume to 15°C described in 11.1.6. The parameters KOand KI may be
found in 11.1.54.7.1. (see Volume IX).
Against Density at 15°C and The limits of these tables are illustrated in Figures
Thermal Expansion Coefficients X-16, X-17, and X-18.
Tables 54A, 54B, and 54C give the factors for con-
verting liquid petroleum volumes measured atobserved
temperatures to the corresponding volumes at 15°C.
The data are presented in three tables to maximize
accuracy while maintaining convenience of use: 11.1S4.1 TABLE 54A"GENERALIZED CRUDE
TABLE 54A Generalized Crude Oils OILS, CORRECTION OF VOLUME TO
(see Volume VII) 15°C AGAINST DENSITY AT 15°C
TABLE 54B Generalized Products
(see Volume VIII) TABLE 54A gives volumecorrection factorsfor con-
TABLE 54C Volume Correction Factors for vertingcrude oil volumes observed attemperatures
Individual and Special Applications other than 15°C to corresponding volumes at 15°C.
(see Volume IX) The volume correction factors given in this table are
TABLES 54A and 54B use density at 15°C to obtain the result of a computer procedure which is the Stan-
volume correctionfactors. TABLE 54Cuses experi- dard (see11.1.54.2 and 11.1.54.3). All of these volumes
mentally determined thermal expansion coefficients to are at saturation conditions. Pressure corrections from
obtain volume correction factors. saturation are not included.

95
--
| | |
|

610.5
|
|||| |||| | | ||

Density kg/m3
|||| |||| || || |

Figure X-16 - Data Limits for TABLE 54A


|
|||| |||---

95

1075.0 824.0 778.5 653.0

Density kg/m3

Figure X-17 - Data Limits for TABLE 546

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I M P M S J L L = L VOLXX 80 0 7 3 2 2 7 0 052b2LL 450

X-346 CHAPTER
1 PHYSICAL PROPERTIES
DATA

150

120
Temp
95
"C 90
60
Data Rango
--
| | |
|

I
|

-18 1 1
|||| |||| | | ||

486 918 954 1674

Figure X-18 - Data Limits for TABLE 54C


|||| |||| || || |
|

The temperature ranges of this table are: ture ranges of the given data to determine the volume
|||| |||---

Density, kg/m3 "C correction factors for these areas. These factors are
610 to 778 -18 to 95 denoted by anasterisk (*). Extension of this table
778 to 824 -18 to 125 beyond the ranges shown is not recommended.
824 to 1075 -18 to 150 Increments used in this table for determiningvolume
correction factors are 0.25"Cand 2 kg/m3. Interpolation
between either temperature or density is not intended
The volume correction factorsgiven in this table are
since there is no practical methodof interpolation that
based on data from the U.S. National Bureau of Stan-
will produce the accuracy obtainable from the Stan-
dards and from other published data. Portions of the
dard.
density and temperature ranges represent areas beyond
these data. Thus, mathematical techniques were em- This table must be entered with a known den-
ployed to extrapolate beyond the density and tempera- sity at 15°C and with an observed temperature.

11.1S4.2 PROGRAM DOCUMENTATIONFOR SUBROUTINE TAB54A-


OF VOLUME TO 15°C
GENERALIZED CRUDE OILS, CORRECTION
AGAINST DENSITY AT 15°C

The t h e r m a le x p a n s i o np r o p e r t i e s( v o l u m ec o r r e c t i o nf a c t o r s , VCF's) for


p r o d u c t s( e x c l u d i n gl u b es t o c k s ) and c r u d e sa r ec o r r e l a t e di nt w os e p a r a t e
g e n e r a l i z e dt a b l e sa s a f u n c t i o n of temperature and d e n s i t y . The p r e d i c t e d
p r e c i s i o n a t 95% c o n f i d e n c e i s :

VCF P r e c i s i o n a t 95% Confidence, $


Temperature 40 " C 65 "C 90 O C 120 "C
Crudes 8, P r o d u c t s -
+0.05 .15 .25 .35

I f t h i sp r e c i s i o ni su n a c c e p t a b l e , i t i s recommended t h a tt h ea c t u a lt h e r m a l
e x p a n s i o np r o p e r t i e s of thesubstance be measuredand t h e VCF be determined

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*33-L VOL*X 80 0 7 3 2 2 9005 2 6 2 3 2 397

SECTIONVOLUME
FACTORS
CORRECTION x-347

u s i n g TABLE54C with either K or a l p h a v a l u e s d e r i v e d from t h e measureddata.


The i n s t r u c t i o n s f o r t h i s p r o c e d u r e a r e g i v e n i n TABLE
54C.

ABSTRACT

Subroutine Title: TAB54A - TABLE 54A, Genera I i zed Crude O i I S ,


Volume C o r r e c t i o n t o 15 OC.
--
| | |

Description: Thissubroutineisdesigned to calculatethe


|
|
|||| |||| | | ||

volume c o r r e c t i o n f a c t o r r e q u i r e d t o convert
a volume a t an observed temperature to the
|||| |||| || || |

correspondingvolume a t 15 * C assuming t h e
s u b s t a n c ec a nb ec h a r a c t e r i z e da s a crude o i l .
|
|||| |||---

P r o g r a mR e s p o n s i b i l i t yA
: m e r i c a nP e t r o l e u mI n s t i t u t e
Measurement C o o r d i n a t i o n
2101 L S t r e e t , N.W.
Washington, D.C. 20037

Issued
Date : August 1980

Language : FORTRAN, ANSI/ASA Standard

Reference: A P I Standard 2540, TABLE 54, 11.1.54

THIS SUBROUTINE WAS DEVELOPED USING THEMATHEMATICALALGORITHMS


AND SPECIFICATIONS DESCRIBED IN THE
DOCUMENT
PROCEDURE
11.1.54.3.
ANY MODIFICATIONS TO THIS SUBROUTINE
MUST RIGIDLY ADHERE
TO
THE
SAME
ALGORITHMS AND SPECIFICATIONS.

11.1.54.2.1 Introduction

TAB54A i s a computersubroutinedesigned t o c a l c u l a t e t h e volumecorrec-


tion factor (VCF) necessary t o c o n v e r t a volume of a g e n e r a l i z e d c r u d e a t .a

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*IIII*L VOLLX 80 m 0732290 0526233 223 m

X" CHAPTER 11"PHYSICAL PROPERTIES DATA

s p e c i f i e dt e m p e r a t u r ei nd e g r e e sC e l s i u s ("C) and o f a s p e c i f i e d 15 "C d e n s i t y


i nk i l o g r a m s / c u b i cm e t r e (Kg/m3) t ot h ee q u i v a l e n t volume a t 15 "C. The sub-
routineacceptsasinputthedensityat 15 "C rounded t o t h e n e a r e s t 0.5Kg/rn3

|||| |||---
and theobservedtemperaturerounded t ot h en e a r e s t 0.05 "C. I f e i t h e ri n p u t

|
v a l u e has n o t been p r o p e r l yr o u n d e d ,t h es u b r o u t i n e will r o u n dt h ev a l u e s and

|||| |||| || || |
r e t u r nt h ec o r r e c t e dv a l u e s . The s u b r o u t i n er e t u r n s o n ev a l u eo f VCF w i t h 5
s i g n i f i c a n tf i g u r e so fa c c u r a c yf o rc o m p u t a t î o np u r p o s e s and another VCF v a l u e

|||| |||| | | ||
rounded t o f o u r d e c i m a lp l a c e sf o rp r i n t i n gp u r p o s e s . The s u b r o u t i n ea l s o

|
o u t p u t s a s t a t u sc o d ef o ru s e rc o n v e n i e n c e . The code i s s e t t o -1 i f an e r r o r

|
| | |
c o n d i t i o no c c u r s and t o + 1 i f t h ei n p u tv a l u e sa r eo u t s i d et h el i m i t s of t h e

--
correlation. A s t a t u s code o fz e r o i s r e t u r n e d i f t h ei n p u tv a l u e sa r ew i t h i n
t h el i m i t so ft h ec o r r e l a t i o n . The l i m i t so ft h ec o r r e l a t i o ni n c l u d i n gt h e
e x t r a p o l a t e dr e g i o na r ed e p i c t e di n F i g u r e X-16. The c a l l i n g program must check
theflag and p r o v i d e t h e u s e r w i t h a p p r o p r i a t e w a r n i n g messages o r program
termination.

11.1.54.2.2 SubroutineSpecifications

The r a n a
gop
ef p l i c a t i o n : Dens i t y , Kq/m3 Temperature, "C
610.5 to 778.5 -18.0 to 95.0
779.0 t o 824.0 -18.0 t o 125.0
824.5 t o 1075.0 -18.0 t o 150.0

Referenced modu les: ALPHAA,


VCF54A, SDIVA, MPYA

FORTRAN f unct
ions : FLOAT

Averageexecutiontime: 2320 VCF entries/CPU second


IBM 370/168

The s u b r o u t i n e sa r ew r i t t e ni n ANSI/ASA FORTRAN u s i n gi n t e g e ra r i t h m e t i c . The


s i z e a n ds t o r a g er e q u i r e m e n t sa r e :

1. Compilable
source
statements 115
2. Oecirnal
storage
bytes 2832
3. 708

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I M P M S * 1 1 - 1 V O L X X 80 m 0732290 0.526214 LbT m

SECTION
1-VOLUME
FACTORS
CORRECTION x-349

11.1.54.2.3 C a l l i n g Sequence

CALLTAB54A(DEN15, DEGC,
VCFC, VCFP, IFLAG)

INPUTDESCRIPTION

DEN15 - D e n s i t y a t 1 5 "C
(DEN1 5 r e t u r n e d w i 1 1 be rounded t o n e a r e s t 0.5 Kg/m3)

DEGC - Observed
temperature
(DEGC r e t u r n e d w i I I be rounded t o n e a r e s t 0.05"C)

OUTPUT DESCRIPTION

VCFC - O u t p u t VCF rounded t o 5 s i g n i f i c a n ft i g u r e sf o c


r omputational
purposes
¡.e. VCFC = 1.XXXX
or VCFC = 0.XXXXX

VCFP - Output VCF rounded to 4 d e c i m apl l a c e sf o pr r i n t i n gp u r p o s e s


¡.e. VCFP = 1.XXXX
or VCFP = 0.XXXX

IFLAG - S t a t u s Code

O: I n d i c a t e si n p u tv a r i a b l e sa r ew i t h i nt h er a n g eo fa p p l i c a -
tion.

1: I n p u td a t ao u t s i d el i m i t so fc o r r e l a t i o na sg i v e ni n
11.1.54.

-1: I n d i c a t e si n p u t DEN15 or i n p u t DEGC o u t s i d er a n g e of a p p l i -


c a t i o na sg i v e ni n 11.1.54; VCFC and VCFP s e t t o -1.0000.

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
x-350 CHAPTER
1 P PHYSICAL PROPERTIES
DATA

11.1.54.2.4 Method o f C a l c u l a t i o n

The s u b r o u t i n e e v a l u a t e s t h e e q u a t i o n

where A t = DEGC - 15.0

-- - KO
+- K1
15 2 P15
'15

A f u l I e x p l a n a t i o n of t h ee q u a t i o n s a n d t h ep a r a m e t e r s KO and K 1 may be found


i n API Standard 2540, TABLE 54,11.1.54.

11.1.54.2.5 Examples
--
| | |
|
|
|||| |||| | | ||

Theseexamples a r et u t o r i a li nn a t u r e and a r en o ti n t e n d e d t o be s u f f i c i e n t
for s u b r o u t i n ec h e c k o u t . Theexamples g i v e ni np r o c e d u r e 11.1.54.3 a r e t o be
|||| |||| || || |

used f o r t h e computercheckout.
|
|||| |||---

Examp I e 1
DEN15 = 838.93
DEGC = 32.48
CALLTAB54A(DEN15, DEGC, VCFC,
VCFP, IFLAG)
A f t e rt h ec a l l : DEN15 = 839.00
DEGC = 32.50
VCFC = .98467
VCFP = .9847
I FLAG = O

Example 2
DEN15 = 789.7
DEGC = 115.55
CALLTAB54A(DEN15, DEGC, VCFC,
VCFP, I FLAG)
A f t e rt h ec a l l : DEN15 = 789.50
DEGC = 115.55

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL.L VOL*X 80 m 0732290 0 5 2 6 2 L b T32 m

SECTIONVOLUME CORRECTION
FACTORS X-351

VCFC = .ma63
VCFP = .8986
IFLAG = 1

Example 3
DEN15 = 838.0
DEGC = 200.00
CALL
TAB54A
(DEN15, DEGC,
VCFC,
VCFP, IFLAG)
After the c a l l : DEN15 = 838.0
DEGC = 200.00
VCFC = - 1 .O000
VCFP = - 1 .O000
IFLAG = - 1

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL-L V O L X X 8 0 m 0 7 3 2 2 9 0 052b2L7 979 m

X-352 CHAPTER
1 PHYSICAL PROPERTIES
DATA

11.1.54.2.6 FLOWCHART

INPUT:
DENSITY
OBSERVEDTEMPERATURE

ROUND INPUT DATA


TO S P E C I F I C A T I O N

Y ES
No >
- SET VCF -1.0000
ERROR FLAGIERR
RETURN
= -1

CALCULATEALPHA

I
I CALCULATEVCF 1

__ IN

SET ERROR SET ERROR


FLAG = 1

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I M P M S * L L - L VOL*X BO m 0732290 0 5 2 6 2 L B 805 m

SECTIONVOLUME CORRECTION FACTORS x-353

11.1.54.2.7 Subroutine Listing

TA05
4A T h si su b r o u t i nsee r v e s as t hien p u t / o u t p ur to u t i nteo
t h e subsequentmodulesnecessary i n thecalculation of
volume c o r r e c t i o n f a c t o r from d e n s i t y a t 15 "C and
observedtemperature.

ReferencedModules

ALPHAA T h i s module i s designed t o c a l c u l a tael p h a for use i n


determ i n a t ion o f vo I ume c o r r e c t i on f a c t o r .
--

MPYA T h i s m o d u l ep e r f o r m si n t e g e rm u l t i p l i c a t i o nw i t h a maxi-
| | |
|

mum o f 17 d i g i t s .
|
|||| |||| | | ||

SD I V A T h i s module i s designed t o p r o d u c ea d d i t i o n a la c c u r a c y
|||| |||| || || |

from an i n t e g e r d i v i d e where t h e n u m e r a t o r i s 10000


greaterthanthedenominator.
|
|||| |||---

VCF54A T h i s module i s designed t o c a l c u l a t e volume c o r r e c t i o n


factor.

SUBROUTINE TAB54A(DEN15,DEGC,VCFC,VCFP,IFLAG) 54A0001 O


C 54A00020
C (C)COPYRIGHT 1 9 8 0 54A00030
C AMERICAN PETROLEUM INSTITUTE 54A00040
C ALLRIGHTS RESERVED 54A00050
C 54A00060
C T H I S SUBROUTINE I S A VOLUNTARYSTANDARD AND WAS DEVELOPED 54A00070
C UNDER THE AUSPICES OF THE JOINTAPI-ASTM COMMITTEE ON STATIC 54A00080
C PETROLEUM MEASUREMENT I N PART FROM DATA GENERATED 54A00090
C BY A PROJECTFUNDED BY THE AMERICAN PETROLEUM 54A001 O0
C INSTITUTE AT THE U . S . NATIONAL BUREAU OF STANDARDS, 54A0011 O
C GAITHERSBURG, MARYLAND. 54A00120
C 54A00130
C INQUIRIES CONCERNING I T SA P P L I C A T I O N SHOULD 54A00140
C BEADDRESSED TO: 54A00150
C AMERICAN PETROLEUM INSTITUTE 54A00160
C MEASUREMENT COORDINATION 54A00170
C 2 1 0 1 L STREET,
N.W. 54A00180
C WASHINGTON, DC 20037 54A00190
C 54A00200

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API M P M S * L L = L V O L * X 80 m 0732290 0526219 71.11 m

x-354 CHAPTER
1 PHYSICAL PROPERTIES
DATA

c ************o****o*oooo*oo**oo***o**~~*oo*o***o****o~'****o*o* 54A0021 O
c * * 54A00220
C * T H I S SUBROUTINE OR THE MATHEMATICAL RELATIONSHIPS o 54A00230
C * REPRESENTED THEREBY
MAY BE USED BY ANYONE WISHING o 54A00240
C * TO DO SO, BUT THE AMERICAN PETROLEUM I N S T I T U T E , o 54A00250
C * THE AMERICAN SOCIETY FOR TESTING AND MATERIALS, o 54A00260
C * AND THE INSTITUTE OF PETROLEUMAND THEIR o 54A00270
C * RESPECTIVE MEMBERS AND THE U . S . NATIONAL BUREAU * 54A00280
C * OF STANDARDS, SHALL NOT BE HELD
RESPONSIBLE OR o 54A00290
C * L I A B L E I N ANY WAY
FROM LOSS OR DAMAGE, INCLUDING, * 54A00300
C * BUTNOT LIMITED
TO, CONSEQUENTIAL DAMAGE, o 54A0031 O
C * RESULTING FROM SUCH USAGE OR FOR VIOLATION OF o 54A00320
C * ANY FEDERAL, STATE, OR MUNICIPAL LAWS, REGULATIONS * 54A00330
C * OR PRACTICES OF THE UNITED STATES OR OF ANY o 54A00340
C * FOREIGN COUNTRY. o 54A00350
c * o 54A00360
c *****~*********4**~*8880+******o**o**oo*******4*~~*******o****o 54A00370
C 54A00380
C THE
THERMAL EXPANSIONPROPERTIES (VOLUME CORRECTION FACTORS, 54A00390
C VCFS) FOR
PRODUCTS (EXCLUDING LUBE STOCKS) ANDCRUDES 54A00400
C ARE
CORRELATED I N TWO SEPARATE,GENERALIZEDTABLES 54A004l O
C AS A FUNCTION OF
TEMPERATURE AND DENSITY. THE 54A00420
C PREDICTED PRECISION AT 9 5 PERCENT CONFIDENCE I S : 54A00430
C 54A00440
C VCF PRECISION AT 9 5 PERCENT CONFIDENCE, PERCENT 54A00450
C 54A00460
C TEMPERATURE 40C 65C 9oc 120c 54A00470
C CRUDES,
PRODUCTS 0.05 0.15 O . 25 0.35 54A00480
C 54A00490
C I F THISPRECISION I S UNACCEPTABLE, I T I S RECOMMENDED 54A00500
C THAT THE ACTUAL THERMAL EXPANSIONPROPERTIES OF THE 54A0051 O
C SUBSTANCE BE MEASUREDANDTHEVCF BEDETERMINED 54A00520
C THEMEASURED DATA. THE INSTRUCTIONS FOR T H I S PROCEDURE 54A00530
C USINGTABLE54CWITHEITHER K OR ALPHA VALUES DERIVED 54A00540
C FROM THEMEASURED DATA. THE INSTRUCTIONS FOR T H I S 54A00550
C PROCEDURE ARE GIVEN I N TABLE 5 4 C . 54A00560
C 54A00570
C T H I S SUBROUTINE I S DESIGNED TOACCEPTAS 54A00580
C INPUTDENSITY VALUE AT 1 5C ( D E N l 5 ) A N D OBSERVED 54A00590
C TEMPERATURE I N DEGREES CELSIUS (DEGC) AND 54A00600
C PRODUCE THE VOLUME CORRECTION FACTOR (VCF) FOR 54A006l O
C A P I TABLE 54A,GENERALIZED CRUDE O I L S 54A00620
C VOLUME CORRECTION TO 1 5C . 54A00630
C 54A00640
C T H I S SUBROUTINE CALLS THE FOLLOWING MODULES 54A00650
C ALPHAA (CALLSSDIVA) 54A00660
C VCF54A (CALLS MPYA) 54A00670
C 54A00680
C DEN15 SHOULD BE PASSED ROUNDED TO 0 . 5 KG/CU M . 54A00690
C THE SUBROUTINE WILL HOWEVER
ROUND THE VALUE AND 54A00700
C RETURNTHECORRECTED VALUE. 54A0071 O
C 54A00720
C DEGC SHOULD BE PASSED ROUNDEDTO 0.05C. 54A00730
C THE SUBROUTINE WILL ROUND THE VALUE ANDRETURN 54A00740
C THECORRECTED VALUE. 54A00750
C 54A00760
C VCFC I S THE
RETURNED VOLUME CORRECTION FACTOR 54A00770
C CORRECTTO FIVE(5)SIGNIFICANTFIGURES. 54A00780

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*:LL*L V O L X X BO m 0732290 0526220 463m

SECTIONVOLUME CORRECTION FACTORS x-355

C 54A00790
VCFP
C I S THE
RETURNED VOLUME CORRECTION FACTOR 54AOO800
CORRECT
C TO FOUR(4) DECIMAL DIGITS. 54A0081 O
C 54A00820
C I F L A G I S THE
ROUNDED STATUS CODE WHICH SHOULD 54A00830
C BE CHECKED BY THE USER I N THE CALLING PROGRAM 54AOO840
C =O NO
ERROR 54A00850
C =1 INPUT DATA WITHIN EXTRAPOLATION RANGES AS 54A00860
C GIVEN2A5P
IN4I 0 , TABLE 1514. ,1 . 5 4 54A00870
C =-1 INPUT DATA OUTSIDE SPECIFIED RANGE
OF 54A00880
C APPLICATION
GIVENAS 2A5P4I N
I0 , 54A00890
C TABLE 5 4 , . 11 5 4. l 54A00900
C 54A0091 O
DATA I B A S / I 5 0 0 / 54A00920
DATA I B P l , I B P 2 / 7 7 8 5 , 8 2 4 5 / 54A00930
DATA NBPl / I 0 7 5 0 / 54A00940
DATA 1 T M P 1 , 1 T M P 2 , 1 T M P 3 / 9 5 0 0 , 1 2 5 0 0 , 1 5 0 0 0 / 54A00950
DATA 1EP1,1EP2,1EP3/6000,9000,12000/ 54A00960
DATA I E D E N / 7 5 8 0 / 54A00970
DATA I F D E N / 6 1 0 5 / 54A00980
DATA I B T l / 1 8 0 0 / - 54A00990
DATA KO, K 1 / 6 1 3 9 7 2 3 , 0 / 54A01 O00
C 54A01 O 1 O
IFLAG=-I 54A01020
VCFP=- 1 . O0 54A01030
VCFC=- 1 . O 0 54A01040
C 54A01050
C ROUND INPUT PARAMETERS 54A01060
C 54A01070
IDEN=(DEN15*100+25.0)/50.0 54A01080
IDEN=IDEN*5 54A01 O90
DENl5=FLOAT(IDEN)/lO.O 54A011 O0
ITEMP=DEGC*lOOO. 54A0111 O
IF(ITEMP.GT.O)ITEMP=ITEMP+25 54A01120
IF(ITEMP.LT.O)IT€MP=ITEMP-25 54A01130
ITEMP=ITEMP/50*5 54A01140
DEGC=FLOAT(ITEMP)/100.0 54A01150
C 54A01160
CHECK
C A P I RANGES 54A01170
C 5 4 ~ 0 1 ao
1
IF(IDEN-IFDEN>lO,20,20 54A01190
10 CONTINUE 54A01200
RETURN 54A0121 O
20 IF( IDEN-NBPI )30,30,1O 54A01220
3 0 CONTINUE 54A01230
|||| |||---

C 54A01240
CHECK
C V A L I D TEMPERATUR€
RANGES 54A01250
|

C 54A01260
|||| |||| || || |

IDT=ITEMP-IBAS 54A01270
IF(ITEMP-IBTl)40,50,50 54A01280
40 CONTINUE 54AO1290
|||| |||| | | ||

RETURN 54A01300
50 I F ( I D E N - I B P l ) 6 O , 6 O , 7 O 54A0131 O
60 IF(ITEMP-ITMPl)lOO,l00,40 54A01320
|
|

7 0I F ( I D E N - I B P 2 ) 8 0 , 8 0 , 9 0 54A01330
| | |

8 0 IF(ITEMP-ITMP2)100,100,40 54A01340
--

9 0 I F ( I T E M P - I T M P 3 )100,l0 0 , 4 0 54A01350
1O0 CONTINUE 54A01360

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL=L VOLIX B O M 0732290 O526223 3 T T m

X-356 1~“PHYSICM PROPERTIES


CHAPTER DATA

C 54A01370
CALCULATE
C ALPHA 54A01380
IDEN=IDEN* 1O 54A01390
C 54A01400
CALL A L P H A A ( I D E N , K O , K l , I A L F ) 54A0141 O
C 54A01420
IDEN=IDEN/ 1 O 54A01430
CALCULATE
C VCF 54A01440
C 54A01450
CALL V C F 5 4 A ( I A L F , I D T , I V C F ) 54A01460
IFLAG=O 54AO 1 470
C 54A01480
C CHECK
TO DETERMINE I FI N EXTRAPOLATED REGION 54A01490
C 54A01500
IF( IDEN- IEDEN)160,170,170 54A0151 O
1 6 0 CONTINUE 54AOl520
IFLAG=l 54A01530
GO
TO 220 54AOl540
1 7 0 IF(IDEN-IBP1)190,180,180 54A01550
180 IF( ITEMP-IEP1)2201 220,160 54A01560
1 9 0 IF(IDEN-IBP2)210,200,200 54A01570
200 IF(ITEMP-IEP2)220,220,160 54A01580
210 IF(ITEMP-IEP3)220,220,160 54A01590
220 CONTINUE 54A01600
C 54A0161 O
c CALCULATE PRINT AND CALCULATION VALUES OF VCF 54A01620
C PRINT VALUE(PVCF)ROUNDED TO 4 DECIMAL D I G I T S 54A01630
CALCULATION
C VALUE(CVCF) ROUNDED TO 5 S I G N I F I C A ND
TI G I T S 54A01640
C 54A01650
JVCF=(IVCF/1000+5)/10 54A01660
PVCF=JVCF 54A01670
PVCF=PVCF/lOOOO. 54A01680
1F(1VCF-100000000)230,240,240 54A01690
230 CONTINUE 54A01700
C 54A0171 O
C VCF LESS THAN ONE, F I V E DECIMALS RETURNED 54A01720
C 54A01730
JVCF=(IVCF/100+5)/10 54A01740
CVCF=JVCF 54A01750
CVCF=CVCF/lOOOOO. 54A01760
GO TO 250 54A01770
240 CONTINUE 54A01780
CVCF=PVCF 54A01790
250 CONTINUE 54~01 ao0
5 4 ~ 0 1 oa 1
|||| |||---

VCFP=PVCF
VCFC=CVCF 54A01820
RETURN 54A01830
|
|||| |||| || || |

END 54A01840
|||| |||| | | ||

SUBROUTINE SDIVA(INUM,IDENOM,IRES) 54A01850


C 54A01860
C T H I S MODULE I S DESIGNED TO
PRODUCE ADDITIONAL 54A01870
|

C ACCURACY FROMAN INTEGER D I V I D E WHERE THE


NUMERATOR 54A01880
|
| | |

C I S 1 0 0 0 0 GREATER
THAN THE DENOMINATOR. THE SUBROUTINE 54A01890
--

C ASSUMES PROPER SCALING OF


BOTH
THE INPUT NUMERATOR 54A01900
C AND DENOMINATOR AND W I L L RETURN THE RESULTS MULTIPLIED 54A0191 O
C BY 1 0 0 0 0 . 54A01920

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I M P M S * L L - L V O L X X 80 m 0732270 052b222 236 m

SECTION~ " V O C U M ECORRECTION FACTORS x-357

C 54A01930
IRESl=INUM/IDENOM 54A01940
IRES2=(INUM-IRES1*IDENOM)*lOOOO/IDENOM 54A01950
IRES=IRES1*10000+IRES2 54A01960
RETURN 54A01970
END 54A01980

SUBROUTINE ALPHAA(IRHO,KO,KI,IALF) 54A01990


C 54A02000
C T H I S MODULE I S DESIGNED TO CALCULATE ALPHA FOR 54A0201 O
C USE I N DETERMINATION OF VOLUME CORRECTION 54A02020
C FACTOR. 54A02030
--

C 54A02040
| | |

C INPUTVARIABLES 54A02050
|

C IRHO=DENSITY*lOO(KILOGRAMS/CUBIC METRE) 54A02060


|

OF DESIRED CURVE * 1 0 0 0 0
|||| |||| | | ||

C KO,K1=COEFFICIENTS 54A02070
C 54A02080
C ALGORITHM- 54A02090
|||| |||| || || |

C ALPHA=KO/RH0**2+Kl/RHO 54A02 1O0


C 54A0211 O
C CALCULATE K1 /RHO 54A02120
|

C 54A02130
|||| |||---

INUM=KI * 1 O000 54A02140


CALLSDIVA(INUM,IRHO,IALF1) 54A02150
C 54A02160
C CALCULATE KO/RH0**2 54A02170
C 54A02180
INUM=K0*100 54A02190
CALLSDIVA(INUM,IRHO,IALFS) 54A02200
CALL S D I V A ( I A L F S , I R H O , I A L F 2 ) 54A0221 O
I A L F = ( I A L F l + I A L F 2 + 5 0 0) / l o 0 0 54A02220
RETURN 54A02230
END 54A02240

SUBROUTINE V C F 5 4 A ( I A L F , I D T , I V C F ) 54A02250
C 54A02260
C T H I S MODULE I S DESIGNED TO CALCULATE VOLUME 54A02270
C CORRECTION FACTOR. ALTHOUGH ALL CALCULATIONS ARE DONE 54A02280
C AS INTEGERS, THE SUBROUTINE RETURNS WITH A 8 54A02290
C OR 9 D I G I T VALUE DEPENDENTUPON WHETHER I D T 54A02300
C I S POSITIVE OR NEGATIVE. 54A0231 O
C 54A02320
C ALGORITHM- 54A02330
C VCF=EXP(-ALPHAQDT(1.0+O.8*ALPHA*DT)) 54A02340
C 54A02350
C CALCULATEALPHA*DT 54A02360
C 54A02370
ITERMl=IALF*IDT 54A02380
ITERMl =ITERMl/ 1 O 54A02390
C 54A02400
C CALCULATE 0 . 8 *ALPHA 'DT 54A0241 O
C 54A02420
ITERM2=ITERM1/5*4 54A02430
C 54A02440

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
C CALCULATE EXPONENT-ALPHA*DT(l.O+O.8*ALPHA*DT) 54A02450
C 54A02460
CALL MPYA(ITERMl,ITERM2,ITERM3) 54A02470
IX=- (ITERMl+ITERM3) 54A02480
--

54A02490
| | |

C
C CALCULATE EXPONENTIAL(F1RST 7 TERMS OF POWER SERIES) 54A02500
|
|

C 54A0251 O
|||| |||| | | ||

ISUMl=l OOOOOOOO+IX 54A02520


CALL MPYA(IX,IX,ISUM2) 54A02530
ISUM2=ISUM2/2 54A02540
|||| |||| || || |

CALL MPYA(IX,ISUM2,ISUM3) 54A02550


ISUM3=ISUM3/3 54A02560
CALL MPYA(IX,ISUM3,ISUM4) 54A02570
|
|||| |||---

ISUM4=ISUM4/4 54~02580
CALL MPYA(IX,ISUM4,ISUM5) 54A02590
ISUM5=ISUM5/5 54A02600
CALL MPYA(IX,ISUM5,ISUM6) 54A0261 O
ISUM6=ISUM6/6 54A02620
IVCF=ISUM1+ISUM2+ISUM3+ISUM4+ISUM5+ISUM6 54A02630
RETURN 54A02640
END 54A02650

SUBROUTINE MPYA(IX,IY,IZ) 54A02660


C 54A02670
C THIS MODULE PERFORMSINTEGER MULTIPLICATION. THE TOTAL 54A02680
C NUMBER OF DIGITS IN IX AND IY MUST NOT EXCEED 17. OTHER 54A02690
C WISE, OVERFLOW WILL OCCUR. 54A02700
C 54A0271 O
IU1 = IX / 10000 54A02720
K1 = 10000 * IUl 54A02730
IV1 = IX - K1 54A02740
IU2 = IY / 10000 54A02750
K2 = 10000 * IV2 54A02760
IV2 = IY - K2 54A02770
K3 = IU1 * IV2 + IU2 * IV1 + IV1 * IV2 / 10000 54A02780
IZ = (K3 + 5000) / 10000 + IU1 * IU2 54A02790
RETURN 54A02800
END 54A0281 O

Errata
Please make the following updates to this subroutine listing. For an explanation
of the uDdates see 11.1.6.

current: DATA IEP1,I BP2/7785,8245/ 54A00930


updated : DATA lBPl,lBP2/7785,8240/ 54A00930

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API M P M S * l I L ~ L VOL*X 80 m 0732290 052b2.24 O09 m

SECTIONV VOLUME
FACTORS
CORRECTION x-359

11.1S4.3 IMPLEMENTATION PROCEDURE FOR SU8ROUTINE TAB54A

I nt o d a y ' sw o r l dt h e r ei s a r a p i d l yd e v e l o p i n gt r e n dt ou s ec o m p u t e r si n
c u s t o d yt r a n s f e r measurements, accounting work, processcontrolsystems, and a
varietyofother uses where t a b l e sm u s t be i n c o r p o r a t e di n t oc o m p u t e r codes.
Yet many o f t h e p r i n t e d t a b l e s a r e a l m o s t i m p o s s i b l e t o codedue to the fact
t h a t someone has s l i g h t l y m o d i f i e d s e l e c t e d v a l u e s t o d i f f e r from t h o s e
obtainedusingthemathematicalexpressionthatsupposedlygeneratedthe
tables. To overcome t h i s problem i t i s o f t e n r e q u i r e d t o add e x t e n s i v e excep-
tiontablestothe codes, T h i s makes t h e codes l a r g e and cumbersome t o modify,
and r e s t r i c t s t h e i r use t o l a r g e r computersystems. A l s ow i t ht h ed e v e l o p m e n t
of bettermeasuringdevices it i s o f t e n p o s s i b l e t o g a i n more d i g i t s o f pre-
c i s i o ni nt h et a b l ep a r a m e t e r s ,n e c e s s i t a t i n gf i n e rg r i do ft h et a b u l a r

|||| |||---
v a l u e s ,r e s u l t i n gi nl a r g e r volumes of p r i n t e d t a b l e s t o be handled.

|
Inaddition,astheon-line use o f computers f o r m e t e r i n g p u r p o s e s

|||| |||| || || |
i n c r e a s e s ,t h ed i r e c tu s eo fp r i n t e dt a b l e s w i l l decrease; t h e r e f o r e ,t h e new

|||| |||| | | ||
Standard i s an e x p l i c i ti m p l e m e n t a t i o np r o c e d u r er a t h e rt h a n a s e t of equa-
t i o n so r a s e to ft a b l e s . I t must be remembered t h a t t h e s t a n d a r d i z a t i o n o f

|
t h ei m p l e m e n t a t i o np r o c e d u r ei m p l i e ss t a n d a r d i z a t i o no ft h es e t of mathe-

|
| | |
m a t i c a le x p r e s s i o n s used w i t h i n t h e code. Absoluteadherence tothe procedure

--
will h e l p t o i n s u r e t h a t a l l computers and computercodes o ft h ef u t u r e , meet-
ingthespecifications and r e s t r i c t i o n s , will be a b l e t o producethe same
results. I t i sb e l i e v e dt h a tt h i sp r o c e d u r e will a l l o wf o rt h e maximum
machine and codeindependence. The procedure was implemented i n computer
subroutinesissued by PI i n 1980 u s i n g ANSI/ASA
FORTRAN. The s u b r o u t i n e s
maximizedprecision by t h eu s e o f 3 2 - b i ti n t e g e ra r i t h m e t i c .
The p r o c e d u r ea sd e s c r i b e di nt h ef o l l o w i n gt e x t can, by c a r e f u l and
d e l i b e r a t ea p p l i c a t i o no fn u m e r i c a la n a l y s i s , beused withthemajorityof
languages and word s i z e si np r e s e n to ra n t i c i p a t e d use. To usethestandard
procedure means t o m a i n t a i n a b s o l u t e and unwaveringadherence t o t h e number o f
digits specified at each s t e p and t o t h e c a l c u l a t i o n p r o c e d u r e as o u t l i n e d .
Intheprocedure,thenomenclature used i s t h a t o f ASTM E380-76, unless
an e x p l i c i t p r o c e d u r e i s g i v e n below, i n whichcasetheproceduregivenbelow
overridesthatgiven by ASTM E380-76.
I nt h ep r o c e d u r et h en o m e n c l a t u r e (XXX.XX) means f i v e ( 5 1 m a t h e m a t i c a l l y
significant digits.

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL.L VOL*X 80 m 0732290 O526225 T 4 5 m

x-360 CHAPTER 11"PHYSICAL PROPERTIES DATA

The termroundingas used i n t h e p r o c e d u r e means: Consideronlythe


f i r s t d i g i t t o t h e r i g h t of t h e d e s i r e d p o s i t i o n and
a. I f t h a td i g i ti sg r e a t e rt h a n 4, increment he d e s i r e dp o s i t i o n by
one and d r o p t h e r e m a i n i n g d i g i t s t o t h e r i g h t o ft h ed e s i r e dp o s i -
tion.
b. I f t h a td i g i ti sl e s st h a n 5, s i m p l yd r o pt h er e m a i n i n gd i g i t st o
t h e r i g h t of t h e d e s i r e d p o s i t i o n .
-
A l l constants are used t o e x a c t l y t h e number o f d i g i t s p r i n t e d .

Calculation Procedure

STEP 1: Round i n p u tv a r i a b l e so fd e n s i t y andobservedtemperature


a. Round d e n s i t yt ot h en e a r e s t
0.5 Kg/$ and c a r r y a s 5 digit resu I t
¡.e. d e n s i t y (DEN151 = XXXX.X
b. Round observedtemperature t ot h en e a r e s t
0.05 "C and c a r r y a s 5 digit result
¡.e. observed
temperature (DEGC) = XXX.XX

STEP 2: Choose t h ea p p r o p r i a t ev a l u e so f KO and K1 a sd e s c r i b e di n API Stan-


dard 2540, TABLE 54,11.1.54
KO i s an 7 d i g i t c o n s t a n t

|||| |||---
i .e. KO = XXX.XXXX

|
|||| |||| || || |
K t i s a 4 d i g i tc o n s t a n t
i .e. K t = .XXXX
|||| |||| | | ||

STEP 3 : C a l c u l a t i o no fa l p h a( c o e f f i c i e n t o f thermalexpansion)
|
|
| | |

define c1 -+ -
= KO K1
--

2 P
P
a. Eva1 u a t e -
KO
P2

a(1) -
Compute KO = .XXXXXXXX
P

KO/P
a(2) Compute - P
= .oooxxxxxxx

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API M P M S * L L - L V O L X X 80 m 0732290 0 5 2 b 2 2 b 981 m

SECTION VOLUME CORRECTION FACTORS x-361

b. Eva1u a t e K1
-P

bC 1 1 -= .OOOXXXXXXX
P

c.
Sum r e s u l t so fa ( 2 ) and b ( 1 ) and round t o n e a r e s t 0.0000001
i .e. a = .oooxxxx
--
| | |

STEP 4: Calculate A t
|

-
|

def i ne A t = DEGC TBASE


|||| |||| | | ||

Note: TBASE c a r r i e d t o 4 d i g i t s XX.XX (15.00)


Carry A t = XXX.XX
|||| |||| || || |
|

STEP 5: C a l c u l a t i o no f VCF
|||| |||---

d e f i n e VCF = EXP[-aAt(1.0 + 0.8aAtll


= EXP[-aAt - 0.8 a2 A t 2 ]
a. C a l c u l a t i o noef x p o n e n t
a(l1 a A t = .XXXXXXXX
a ( 2 .) 8 a A t = .XXXXXXXX
a(3) .8 a2 At2 = .OXXXXXXX
a ( 4 )- a A t - 0.8 a 2 A t 2 = 0.XXXXXXXX w i t h any t r a i l i n g
d ig i t s dropped
b. Ca t c u l a t i o n o f e x p o n e n t i a l
VCF = EXP[- a A t - 0.8 a2 At21 = X.XXXXXX
us i n y a t least the first 7 t e r m so ft h e power s e r i e s e x p a n s i o n
o f ex

1.XXXX rounded t o n e a r e s t 0.0001 > 1


i f VCF -
Computat iona I =
v a l u e o f VCF
0.XXXXX rounded t o n e a r e s t 0.00001 i f VCF C 1
T a b l e va I ue
o f VCF = X.XXXX rounded VCF t on e a r e s t 0.0001

The 1980 i n t e g e r FORTRAN code issuedby API c o n t a i n e db o t h an i n t e g e r


d i v i s i o n and an i n t e g e rm u l t i p l i c a t i o na l g o r i t h m . A d e s c r i p t i o n of each i s
c o n t a i n e di nt h ef o l l o w i n g :

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL.L V O L t X BO m 0732290 O526227 B L B m

x-362 PROPERTIES
11"PHYSICAL CHAPTER DATA

INTEGER MULTIPLICATION PROCEDURE


(FOR 32 B I T ARITHMETIC)

DATA DEFINITION
Y a r ei n t e g e r numbers t h a ta r ee q u a lt oo rl e s st h a n
X, 2 x lo9
( s l i g h t l yl e s st h a n Z3b. A l a r g e rv a l u e may c a u s eo v e r f l o w I. na d d i t i o n ,
thetotal number of d i g i t s i n X and Y mustnotexceed 17, o t h e r w i s eo v e r f l o w
will occur.
Z itshper o d u c t XY s c a l e d by ¡.e. Z = XY/108
Note: I f it i sd e s i r a b l et oo b t a i n maximum p r e c i s i o n , X and Y may be
s c a l e d up p r i o r t o u s eo ft h ep r o c e d u r e .T y p i c a l l y , a t l e a s t 15 d i g i t s a r e
needed t o o b t a i n 6 d i g i t p r e c i s i o n , 16 f o r 7 and 17 f o r 8.
The l a r g e s t v a l u e s of X and Y t h a t may be used a r e 2 O00O00 O00 and
99 999 999.
CALCULATION
x/10000 = u1
10000 U1 = K1
X - K1 = V1
Y/10000 = u2
10000 U2 = K2
Y - K2 = V2
(U1V2) + (UZV1) + (V1V2/10000) = K3
(K3 + 5000)/10000 + (UIU2) = Z
Note: Z has
been sca I ed
by
and may have t o be r e s c al e db e f o r e use.
TOTAL DIGITS I N X AND Y 12
" " " 13 14 15 16 17
--

DIGITS I N PRODUCT, Z 3-4


4-5
5-6
6-7 7-8 8-9
| | |
|
|

INTEGER DIVISION PROCEDURE


|||| |||| | | ||

(FOR 32 B I T ARITHMETIC)
DATA DEFINITION
|||| |||| || || |

X, Y a r ei n t e g e r numbers such t h a t X i s equa 1 t o or l e s st h a n Z3' - 1


and Y i S o f o r d e r of magn i t u d e 104 l e s s t h a n X.
|
|||| |||---

R is thequotientof & s c a l e d by 104, ¡.e. R = & * 104.


Y Y

Note: I f it i s d e s i r a b l e t o o b t a i n maximum p r e c i s i o n , X and Y may be


s c a l e d up p r i o r t o use o f t h ep r o c e d u r e .T y p i c a l l yt h em o r ed i g i t st h a ta r e
c a r r i e d i n b o t h X and Y, t h e more a c c u r a t e d i g i t s on o u t p u t .

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I M P M S * L L - L VOL*X 80 m 0732290 O526228 754 m

SECTIONVOLUME
FACTORS
CORRECTION x-363

CALCULATION
X/Y = u1
U1Y = K1
X - K1 = V 1
V1/Y = u2
U1 * 10000 + U2 = R
Note: R has been s c a l e d by lo4 and may have t o be r e s c a l ed b e f o r e use.

Examples ForCheckout

The f o l l o w i n g examples aredesigned toaidin checkoutproceduresfor


b o t ht h ee x i s t i n g P I s u b r o u t i n e andany subroutineswhicharedevelopedusing
t h ei m p l e m e n t a t i o np r o c e d u r eo u t l i n e d above. The l i n e s of t h e examples a r e
numbered t o correspond t o t h e c o r r e s p o n d i n g l i n e s w i t h i n t h e c a l c u l a t i o n p r o -
cedure. r

EXAMPLE 1 : Assume a c r u d e o i l w i t h an i n p u td e n s i t yc o r r e c t e dt o 15 "C o f


903.26 Kg/rn3 andan observed temperature of 40.52 'C. Cal cu I a t e
t h e VCF r e q u i r e d t o c o r r e c t t h e volume t o 15 OC, correct to 4
decimal d i g i t s .

STEP 1 : a. rounded DEN15 = 903.5


b. rounded DEGC = 40.50

STEP 2: KO = 613.9723 ( a s o f May 1 , 1980)


K1 = 0.0 (a
o sf May 1, 1980)

STEP 3 : a. Eva I u a t e -
KO
2
P

K
a(1) 0 = 0.67954875
P

K /P
a(2) 0= 0.0007521292
P
-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL.L VOL*X 80 m 0732290 0526229 690 m

X-364 CHAPTER 11"PHYSICAL PROPERTIES DATA

b. Evaluate -
K1
P

K
b(1) 1= 0.0
P

C. a = 0.0007521

STEP 4 : A t = 25.50

S'TEP 5 : C a l c u l a t i o no f VCF
a. C a l c u l a t i o n o f exponent
a( 1 ) 0.01917855
a(2) 0.01534284
a( 3 1 O .O0029425
a(4) -0.01947280
b. C a l c u l a t i o n of e x p o n e n t i a l
VCF = 0.980715

VCF c o r r e c t t o 4 decimal d i g i t s = 0.9807

EXAMPLE 2: Assume a c r u d e o i l w i t h an i n p u td e n s i t yc o r r e c t e dt o 15"C of


779 .O Kg/m3 and an o b s e r v e d t e m p e r a t u r e o f 3.9 "C. Cal c u l a t e
t h e VCF r e q u i r e d t o c o r r e c t t h e volume t o 15 OC, c o r r e c t t o 5 sig-
n i f i c a n tf i g u r e s .

STEP 1 : a. rounded DEN15 = 779.0


b. rounded DEGC = 3.90

STEP 2 : KO = 613-9723
(as of May 1 , 1980)
K1 = 0.0 ( a s o f May 1, 1980)
|||| |||---

STEP 3: a. Eva I u a t e -
KO
|
|||| |||| || || |

2
P

K
|||| |||| | | ||

a( 1 ) 2= 0.78815442
P
|
|
| | |
--

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API MPMS*LL-L VOL*X 80 m 0732290 052b230 302 m

SECTIONV VOLUME CORRECTION


FACTORS X-365

KO/P
a(2) - = 0.00101175
P

b. Eva I u a t e K 1 -
P

K
b(1) 1= 0.0
P

C. a = 0.0010118

STEP 4: A t = - 1 1 -10

STEP 5: C a l c u l a t i o no f VCF
a. C a l c u l a t i o n of exponent
a( 1 ) -0.01 123098
a(2) -0.00898478
a(3) 0.00010090
a(4) 0.01 113008
b. C a l c u l a t i o noef x p o n e n t i a l
VCF = 1 .Oll 192

VCF c o r r e c t t o 5 s i g n i f i c a n t f i g u r e s 1.0112

EXAMPLE 3: Assume a c r u d e o i l w i t h an i n p u td e n s i t yc o r r e c t e dt o 15 "C o f


1008. O Kg/rn3 and an observed temperature of 131.9 " C . Calcu I a t e
t h e VCF r e q u i r e d t o c o r r e c t t h e volume t o 15 O C , c o r r e c t t o 5 s i g -
nificantfigures.
|||| |||---
|
|||| |||| || || |

STEP 1: a. rounded DEN15 = 1008.0


b. rounded DEGC = 131.90
|||| |||| | | ||

STEP 2: KO = 613.9723 ( a so f May 1,


1980)
|

( a s o f May 1 , 1980)
|

K1 = 0.0
| | |
--

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I HPMS*LL*L VOL*X A O 0732290 0526233 249 m

X-366 CHAPTER1 PHYSICAL PROPERTIES


DATA

STEP 3: a. E v a l u a t e KO
2
-
P

K
a( 1) 2= 0.60909950
P

a(2) -
Ko/P
= 0.0006042653
P

b. Eva I u a t e -
P

C. CL = 0.0006043

STEP 4: A t = 116.90

STEP 5: C a l c u l a t i o no f VCF
a. C a l c u l a t i o n of exponent
a( 1 1 0.07064267
a(2) 0.05651413
a ( 31 O .O0399230
a(4) -0.07463497
b. Ca I cu I a t ion o f exponent i a I
VCF = .928082

VCF c o r r e c t t o 5 s i g n i f i c a n t f i g u r e s = 0.92808

11.1S4.4 TABLE 54HENERALIZED PROD- dard(see11.1.54.5and 11.1.54.6). All of these volumes


UCTS, CORRECTIONOF VOLUME TO are at saturation conditions. Pressure corrections
from
15°C AGAINST DENSITY AT 15°C saturation are not included.
The temperature ranges of this table are:
TABLE 54B gives volume correction factors forcon-
volumes
observed
product
verting at temperatures
Density, kg/m3 "C
other
than 15°Ccorresponding
to volumes at 15°C. 653 to 778 -18 to 95
The volume correction factorsgiven in this table are 778 to 824 -18 to 125
the result of a computer procedure which is the Stan- 824 to 1075 -18 to 150

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API MPMS*LL-L V O L X X 80 m 0732290 0526232 L85 m

SECTIONV VOLUME CORRECTIONFACTORS X-367

The volume correction factors given in this table are Increments used in this table for determiningvolume
based on data from the U.S. National Bureau of Stan- correction factorsare 0.25"Cand 2 kg/m3. Interpolation
dards and from other published data. Portions of the between either temperature or density is not intended
density and temperature ranges represent areas beyond since there is no practical method of interpolation that
these data. Thus, mathematical techniques were em- will produce the accuracy obtainable from theStan-
ployed to extrapolate beyond the density and tempera- dard.

|||| |||---
ture ranges of the given data to determine the volume
correctionfactorsfortheseareas.These factors are

|
|||| |||| || || |
denoted by an asterisk (*). Extension of this table be- This table must be entered with a known den-
yond the ranges shown is not recommended. sity at 15°C and with an observed temperature.

|||| |||| | | ||
11.1.54.5 PROGRAM DOCUMENTATION FOR SUBROUTINE TAB54B-
GENERALIZED PRODUCTS, CORRECTION OF VOLUME TO 1 5 " ~
AGAINST DENSITY AT 15°C

|
|
| | |
--
The t h e r m a le x p a n s i o np r o p e r t i e s( v o l u m ec o r r e c t i o nf a c t o r s , VCF's) for
p r o d u c t s( e x c l u d i n gl u b es t o c k s ) and c r u d e sa r ec o r r e l a t e di nt w os e p a r a t e
g e n e r a l i z e dt a b l e sa s a f u n c t i o no ft e m p e r a t u r e and d e n s i t y . The p r e d i c t e d
p r e c i s i o n a t 95% c o n f i d e n c ei s :

VCF P r e c i s i o n a t 95% Confidence, %


Temperature 40 "C 65 "C 90 "C 120 "C
Crudes 8, P r o d u c t s -
+0.05 .15 .25 .35

I f t h i sp r e c i s i o ni su n a c c e p t a b l e , i t i s recommended t h a tt h ea c t u a lt h e r m a l
expans i o n p r o p e r t i e s o f t h e s u b s t a n c e be measured and t h e VCF be determined
u s i n g TABLE54C with either K o ra l p h av a l u e sd e r i v e df r o mt h e measureddata.
The i n s t r u c t i o n s f o r t h i s p r o c e d u r e a r e g i v e n i n TABLE
54C.

ABSTRACT

Subroutine Title: TAf354B - TABLE 548, GeneralizedProducts,


Volume C o r r e c t i o n t o 15 "C.

Description: T h i s s u b r o u t i n ei sd e s i g n e d t o calculatethe
volume c o r r e c t i o n f a c t o r r e q u i r e d t o c o n v e r t
a volume a t an observedtemperature to the
correspondingvolume a t 15 "C assuming t h e
substance canbe c h a r a c t e r i z e da s a product.

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API MPNS*LL*L VOLXX B O m 0732270 O526233 O11 D

x-388 CHAPTER
1 P PHYSICAL PRoPERnEs DATA

Program R e s p o n s i b i l i t y : American
Petroleum Institute
Measurement C o o r d i n a t i o n
2101L S t r e e t , N.W.
Washington, D.C. 20037

Issued:
Date August 1980

Language: FORTRAN, ANSI/ASA Standard

Reference: A P I Standard 2540, TABLE 54, 11.1.54

THIS SUBROUTINE WAS DEVELOPED USING THE


MATHEMATICAL
ALGORITHMS
AND SPECIFICATIONS DESCRIBED I N THE
DOCUMENT
PROCEDURE 11.1.54.6.
ANY MODIFICATIONS TO THIS SUBROUTINE
MUST RIGIDLY ADHERE
TO
THE SAME ALGORITHMS AND SPECIFICATIONS.

11.1.54.5.1 Introduction

TAB54B i s a computersubroutinedesigned to calculate the volumecor-


rectionfactor (VCF) necessary t o c o n v e r t a volume o f a g e n e r a l i z e d p r o d u c t a t
a s p e c i f i e dt e m p e r a t u r ei nd e g r e e sC e l s i u s ("C) and of a s p e c i f i e d 15 "C den-
s i t yi nk i l o g r a m s / c u b i cm e t r e (Kg/m3) t o t h e e q u i v a l e n t volume a t 15 "C. The
s u b r o u t i n ea c c e p t sa si n p u tt h ed e n s i t ya t 15 "C rounded t o t h e n e a r e s t 0.5
Kg/m3 and theobservedtemperaturerounded t ot h en e a r e s t 0.05 "C. If either
i n p u tv a l u e has n o t been p r o p e r l y rounded, t h e s u b r o u t i n e will r o u n dt h e
values and r e t u r nt h ec o r r e c t e dv a l u e s . The s u b r o u t i n e r e t u r n s o n ev a l u eo f
VCF w i t h 5 s i g n i f i c a n t f i g u r e s o f a c c u r a c y f o r c o m p u t a t i o n p u r p o s e s and
another VCF valuerounded t of o u r decimalplacesforprintingpurposes. The
s u b r o u t i n ea l s oo u t p u t s a s t a t u s code foruserconvenience. The code i s s e t
t o -1 i f an e r r o r c o n d i t i o n o c c u r s and t o +1 i f t h ei n p u tv a l u e sa r eo u t s i d e
t h el i m i t s o f t h ec o r r e l a t i o n . A s t a t u s code o fz e r oi sr e t u r n e d i f t h ei n p u t
v a l u e sa r ew i t h i nt h el i m i t so ft h ec o r r e l a t i o n . The l i m i t s o f t h e c o r r e l a -
t i o ni n c l u d i n gt h ee x t r a p o l a t e dr e g i o na r ed e p i c t e di n Figure X-17. The calling
programmustcheck the flag and p r o v i d e t h e u s e r w i t h a p p r o p r i a t e w a r n i n g mes-
sages o r programtermination.

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL*L VOL*X 80 m 0732290 0526234 T58

SECTION 1"VOLUME CORRECTION FACTORS X-369

11.1.54.5.2 SubroutineSpecifications

The range of a p p l i c a t i o n :
Dens i t y , Kg/m3 Temperature, "C
653.0 to 778.5 -18.0 to 90.0
779.0 to 824.0 -18.0 t o 125.0
824.5 t o 1075.0 -18.0 t o 150.0

Referenced
modules: ALPHAB,
VCF548,
SDIVB, MPYB

FORTRAN fun c t ions : FLOAT

|||| |||---
Average
execution
time: 1890 VCF E n t r i e d C P U second

|
|||| |||| || || |
I BM 370/ 168

|||| |||| | | ||
The s u b r o u t i n e sa r ew r i t t e ni n ANSI/ASA FORTRAN u s i n gi n t e g e ra r i t h m e t i c . The
s i z e and s t o r a g e r e q u i r e m e n t s a r e :

|
|
| | |
--
1. Compilable
source
statements 140
2. Decimal
storage
bytes 3102
3. Words 776

11.1.54.5.3 C a l l i n g Sequence

CALL TAB546 (DEN15, DEGC, VCFC, VCFP, IFLAG)

INPUT DESCRIPTION

DEN15 - D e n s i t ay t 15 "C
(DEN1 5 r e t u r n e d w i I I be rounded t o n e a r e s t O. 5 Kg/rn51

DEGC - Observed
temperature, "C
(DEGC r e t u r n e d w i I I be rounded t o n e a r e s t 0.05 "C)

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL*L VOL*X 80 m 0732290 0 5 2 b 2 3 5 994 m

X-370 CHAPTER1 PHYSICAL PROPERTIES


DATA

OUTPUT DESCRIPTION

VCFC - Output VCF rounded t o 5 s i g n i f i c a n t f i g u r e s f o r c o m p u t a t i o n a l

|||| |||---
pur poses

|
|||| |||| || || |
¡.e. VCFC = 1.XXXX
or VCFC = 0.XXXXX

|||| |||| | | ||
VCFP - O u t p u t VCF rounded t o 4 d e c i m a lp l a c e sf o rp r i n t i n gp u r p o s e s

|
|
¡.e.
VCFP = 1.XXXX

| | |
--
or VCFP = 0.XXXX

I FLAG - S t a t u s Code

O: I n d i c a t e si n p u tv a r i a b l e sa r ew i t h i nt h er a n g e of a p p l i c a -
tion.

1: I n p u td a t ao u t s i d el i m i t so fc o r r e l a t i o n as g i v e ni n
11.1.54.

-1: I n d i c a t e si n p u t DEN15 o r i n p u t DEGC o u t s i d er a n g e of a p p l i -


c a t i o na sg i v e ni n 11.1.54; VCFC and VCFP s e t t o -1.0000,

11.1.54.5.4 Method o f C a l c u l a t i o n

Thesubroutineevaluatestheequation

where A t = DEGC - 15.0

A f u I I e x p l a n a t i o n of t h e e q u a t i o n s and t h e parameters KO and Kt may be


found i n API Standard 2540, TABLE 54, 11.1.54.

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I M P M S + L L = L V O L X X 80 0732290 052b23b 820

SECTIONVOLUME
FACTORS
CORRECTION X-371

11.1.54.5.5 Examples

Theseexamples a r et u t o r i a li nn a t u r e and a r en o ti n t e n d e dt o be s u f f i c i e n t
f o rs u b r o u t i n ec h e c k o u t . Theexamples g i v e ni np r o c e d u r e 11.1.54.6 a r e to be
used f o r t h e computercheckout.

Examp l e 1
DEN15 = 838.93
OEGC = 32.480
CALL
TAB546
(DEN15, DEGC, VCFC,
VCFP, IFLAG)
A f t e rt h ec a l l : DEN15 = 839.0
DEGC = 32.50
VCFC = .98515
VCFP = .9851
IFLAG = O

Examp l e 2
DEN15 = 889.0
DEGC = 115.55
CALL
TAB54B
(DEN15, DEGC, VCFC,
VCFP, IFLAG)
A f t e rt h ec a l l : DEN15 = 889.0
DEGC = 115.55

VCFC = .91966
VCFP = .9197
IFLAG = 1

Example 3
|||| |||---

DEG15 = 838.0
|
|||| |||| || || |

OEGC = 200.0
CALL
TAB548
(DEN15, DEGC, VCFC, VCFP, IFLAG)
|||| |||| | | ||

A f t e rt h ec a l l : DEN15 = 838.0
DEGC = 200 .O0
|
|

VCFC = - 1 .o000
| | |

VCFP = - 1 .O000
--

IFLAG = - 1

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL.L VOL*X 80 W 07322900526237767

X-372 CHAPTER
1 PHYSICAL PROPERTIES
DATA

11.1.54.5.6 FLOWCHART

OBSERVEDTEMPERATURE

ROUND INPUT DATA


TO S P E C I F I C A T I O N

|||| |||---
|
|||| |||| || || |
SETVCF = - 1 .O000
>

|||| |||| | | ||
DATA W I T H I N No ERROR FLAG I ERR = - 1
RETURN

|
|
| | |
YES

--
CHOOSE APPROPRIATE
VALUES OF KO AND K1

1
?lCALCULATE ALPHA

i4CALCULATEVCF

CHECK
TSO S
+YE ,
IS DATA I

II SET ERROR
FLAG, = O
I
I >I ~
A
I SET ERROR
FLAG, = 1 J

RETURN

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I M P M S * L L - L VOL*X 80 m 0732290 052b238 bT3 m

SECTION~ “ V O C U M ECORRECTION
FACTORS x-373

11.1.54.5.7 SubroutineListing

TAB54B T hsi u
s b r o u t i ns e r v e s as t hi ne p u t / o u t p ruot u t i nt o
e
t h e subsequentmodulesnecessary inthecalculationof
volume c o r r e c t i o n f a c t o r from d e n s i t y a t 15 “C and
observedtemperature.

ReferencedModules

ALPHAB T h i s module i s designed tcoa l c u l a tael p h a for use i n


d e t e r m i n a t i o no f volume c o r r e c t i o n f a c t o r .

MPYB T h i s m o d u l ep e r f o r m si n t e g e rm u l t i p l i c a t i o nw i t h a maxi-
mum of 17 d i g i t s .

SD I VB T h i s module i s designed t o p r o d u c ea d d i t i o n a la c c u r a c y
from an i n t e g e r d i v i d e where t h en u m e r a t o ri s 10000
greaterthanthedenominator.

VCF54B T h i s module i s designed t o c a l c u l a t e volume c o r r e c t i o n


factor.

SUBROUTINE TAB54B(DEN15,DEGC,VCFC,VCFP,IFLAG) 5480001 O


C 54800020
--

C (C)COPYRIGHT 1980 54800030


| | |

C AMERICAN PETROLEUM INSTITUTE 54800040


|

C ALLRIGHTS RESERVED 54800050


|
|||| |||| | | ||

C 54800060
C T H I S SUBROUTINE I S A VOLUNTARYSTANDARDAND WAS DEVELOPED 54800070
C UNDER THE AUSPICES OF THE JOINTAPI-ASTM COMMITTEE ON STATIC 54800080
|||| |||| || || |

C PETROLEUM MEASUREMENT I N PART FROM DATA


GENERATED 54800090
C BY A PROJECTFUNDED BY THE AMERICAN PETROLEUM 548001 O 0
C INSTITUTE AT THE U . S . NATIONAL BUREAU OF STANDARDS, 548001 1 O
|

C GAITHERSBURG, MARYLAND. 54B00120


|||| |||---

C 548001 30
C INQUIRIES CONCERNING I T SA P P L I C A T I O N SHOULD 548001 40
C BE ADDRESSED TO: 548001 50
C AMERICAN PETROLEUM INSTITUTE 548001 60
C MEASUREMENT COORDINATION 548001 70
C 2101 L STREET, N.W. 548001 80
C WASHINGTON, DC 20037 548001 90
C 54800200

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I M P M S * L L * L V O L X X 80 m 0732290 0526239 53T m

--
| | |

x-374 CHAPTER
1 PHYSICALDATA
PROPERTIES
|
|
|||| |||| | | ||

c **************,:~*****~~***,:~,:~***~~**~~~~~~I*,:~*~:~*,p***~~~~,p***,p**~~*~p*~~*
5 4 8 0 0 2 1O
c 54800220
|||| |||| || || |

C * T H I S SUBROUTINE OR THE MATHEMATICAL RELATIONSHIPS * 54800230


C '% REPRESENTED THEREBY MAY BE USED BY ANYONE WISHING * 54800240
C * TO DO SO, BUT THE AMERICAN PETROLEUM I N S T I T U T E , 8
54B00250
|

C '> THE AMERICAN SOCIETY FOR TESTING AND MATERIALS, 54800260


|||| |||---

C AND
THE INSTITUTE OF
PETROLEUM
AND THEIR 54800270
C * RESPECTIVE MEMBERS AND THE U . S . NATIONAL BUREAU 54B00280
C * OF STANDARDS, SHALL NOT BE HELD
RESPONSIBLE OR p
54800290
C * L I A B L E I N ANY WAY
FROM LOSS OR DAMAGE, INCLUDING, t< 54800300
C * BUTNOT LIMITED
TO, CONSEQUENTIAL DAMAGE, 5 4 8 0 0 3 1O
C * RESULTING FROM SUCHUSAGE OR FOR VIOLATION OF p
54800320
C * ANY FEDERAL, STATE, OR MUNICIPAL LAWS, REGULATIONS 54800330
C * OR PRACTICES OF THE UNITED STATES OR OF ANY 54800340
C * FOREIGN COUNTRY. *c
54600350
c * p
54800360
c t**O**+*****I******~:~*,:~*,:~:p,2~~*~~,:~**~'*~'*~~t~I,p**~***~,~*~~*~~~~'*~'***t~* *
54800370
C 54800380
C THE
THERMAL EXPANSIONPROPERTIES (VOLUME CORRECTION FACTORS, 54800390
C VCFS) FOR
PRODUCTS (EXCLUDING LUBE STOCKS) ANDCRUDES 54B00400
C ARE
CORRELATED I N TWO SEPARATE,GENERALIZEDTABLES 5 4 8 0 0 4 1O
C AS A FUNCTION OF
TEMPERATUREAND DENSITY. THE 54800420
C PREDICTED PRECISIONAT95 PERCENT CONFIDENCE I S : 54800430
C 54800440
C VCF PRECISION AT 9 5 PERCENT CONFIDENCE, PERCENT 54800450
C 54800460
C 1 2 0TEMPERATURE
c 9oc 65C 40C 54800470
C CRUDES,
PRODUCTS 0.05 0.15 00. .3255 54800480
C 54800490
C I F THISPRECISION I S UNACCEPTABLE, I T I S RECOMMENDED 54B00500
C THAT THE ACTUAL THERMAL EXPANSIONPROPERTIES OF THE 5 4 8 0 0 5 1O
C SUBSTANCE BE MEASURED AND THE
VCF BEDETERMINED 54800520
C USINGTABLE54CWITHEITHER K OR ALPHA VALUES DERIVED 54800530
C FROM THEMEASURED DATA. THE INSTRUCTIONS FOR T H I S 54800540
C PROCEDURE ARE GIVEN I N TABLE 5 4 C . 54800550
C 54800560
C T H I S SUBROUTINE I S DESIGNED TOACCEPTAS 54800570
C INPUTDENSITY VALUE AT 15C(DEN15) AND OBSERVED 54800580
C TEMPERATURE I N DEGREES CELSIUS (DEGC) AND 54800590
C PRODUCE THE
VOLUME CORRECTION FACTOR(VCF)FOR 54800600
C A P I TABLE 5 4 8 , GENERALIZED PRODUCTS 5 4 8 0 0 6 1O
C VOLUME CORRECTION TO 1 5 C . 54800620
C 54800630
C T H I S SUBROUTINE CALLS THE FOLLOWING MODULES 54800640
C ALPHA8 (CALLSSDIVB) 54B00650
C SDIVB 54800660
C VCF54B(CALLS MPYB) 54800670
C 54B00680
C DEN15 SHOULDBE PASSED ROUNDED
TO 0 . 5 KG/CUM. 54800690
C THE SUBROUTINE WILL HOWEVERROUND THE VALUE AND 54800700
C RETURNTHECORRECTED VALUE. 5 4 8 0 0 7 1O
C 54800720
C DEGC SHOULD BE PASSED ROUNDED
TO 0.05 C. 54800730
C THE SUBROUTINE WILL ROUND THE VALUE AND 54800740
C RETURNTHECORRECTED VALUE. 54800750
C 54800760
C VCFC I S THE
RETURNED VOLUME CORRECTION FACTOR 54800770
C CORRECTTO FIVE(5)SIGNIFICANTFIGURES. 54800780

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL.L VOLJX 80 m 0732290 05262VO 251 m

FACTORS
SECTIONVOLUME CORRECTION x-375

C 54600790
C VCFP I S THE
RETURNED VOLUME CORRECTION FACTOR 54600800
C CORRECTTO FOUR(4)DECIMAL DIGITS. 5460081 O
C 54800820
C I F L A G I S THEROUNDED STATUS CODE WHICH SHOULD 54600830
C BE CHECKED BYTHEUSER I N THE CALLING PROGRAM 54600840
C =O NO ERROR 54600850
C =1 INPUT DATA WITHIN EXTRAPOLATION RANGES AS 54600860
C GIVEN I NA P I2 5 4 0 , TABLE 5 4 ,1 1 . 1 . 5 4 54600870
C = - 1 INPUT DATA OUTSIDESPECIFIED RANGE OF 54~00880
C APPLICATION AS GIVEN I N A P I 2 5 4 0 , 54600890
C TABLE 5 4 , l l . 1 . 5 4 54600900
C 5480091O
DATA NBP1,NBP2,NBP3,NBP4/7705,7875,8390,10750/ 54600920
DATA IBPl,IBP2/7790,8245/ 54600930
DATA IBP3/10750/ 54600940
DATA 1TMP1,1TMP2,1TMP3/9500,12500,15000/ 54600950
DATA IBAS/1500/ 54800960
DATA IEP1,IEP2,IEP3/6000,9000,12000/ 54600970
DATA IBT1/ - 1800/ 54600980
DATA IFDEN/6530/ 54600990
C 54601 O00
C COEFFICIENTS FOR DIESELS,HEATINGOILS AND FUEL O I L S 54601 O 1 O
C 54601 020
DATA K O F , K l F / 1 8 6 9 6 9 6 , 4 8 6 2 / 54601 030
C 54601 040
C COEFFICIENTS FOR JET
FUELS, KEROSENES, AND SOLVENTS 54601 050
C 54801 060
DATA KOJ , K1 J / 5 9 4 5 4 1 8 , 0 / 54601 070
C 54601 080
C COEFFICIENTS FOR TRANSITION BETWEEN JETS AND GASOLINES 54801 O90
C 54601 1O 0
DATA KOT,KlT/26803206,-336312/ 54601 11O
C 54601 120
C COEFFICIENTS FOR GASOLINES AND NAPHTHENES 54801 130
C 54601 140
DATA K O G , K l G / 3 4 6 4 2 2 8 , 4 3 8 8 / 54601 150
C 54601 160

|||| |||---
VCFP=-l . O0 54601 170
VCFC=- 1 . O0 54601 180
IFLAG=- 1
|
54601 190
|||| |||| || || |
C 54601 200
C ROUND INPUT PARAMETERS 54601 21 O
C 54601 220
|||| |||| | | ||

IDEN=(DEN15*100.+25.0)/50.0 54601 230


IDEN=IDEN*5 54801 240
DENl5=FLOAT(IDEN)/lO.O 54801 250
|

ITEMP=DEGC*lOOO .
|

54601 260
| | |

IF(ITEMP.GT.O)ITEMP=ITEMP+25 54601 270


--

IF(ITEMP.LT.O)ITEMP=ITEMP-25 54601 280


ITEMP=ITEMP/50*5 54601 290
DEGC=FLOAT(ITEMP)/lOO.O 54601 300
IDT=ITEMP-IBAS 5 4 8 0 1 3O1
C 54801 320
C CHECK DENSITY RANGES 54601 330
C 54601 340
IF(IDEN-IFDEN)l0,20,20 54601 350
10 CONTINUE 54601 360

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
X-376 CHAPTER L DATA
I ~ ~ H Y S I C APROPERTIES ~

RETURN 54801 370


C 54801 380
C DEFINE CURVE COEFFICIENTS 54801 390
C 54801 400
20 I F ( I D E N - N 8 P 1 ) 3 0 , 4 0 , 4 0 5 4 8 0 1 4 1O
30 KO=KOG 54801 420
K1 =K1 G 54801430
GO TO 8 0 54801 440
4 0I F ( I D E N - N 8 P 2 ) 5 0 , 5 0 , 6 0 54801 450
50 KO=KOT 54801 460
K1=K1 T 54801 470
GO TO 8 0 54801 480
6 0I F ( I D E N - N B P 3 ) 7 0 , 7 5 , 7 5 54801 490
70 KO=KO J 54801 5 0 0
K1=K1 J 54801 5O 1
GO TO 8 0 54801 520
7 5I F ( I D E N - N B P 4 ) 7 8 , 7 8 , 1 0 54801 530
78 KO=KOF 54801 540
K1 =K1 F 54801550
80 CONTINUE 54801 560
C 54801 570
C CHECK V A L I D TEMPERATURE
RANGES 54801 580
54801 590
I F ( I T E M P - I B T 1 ) 9 0 , 1 0 0O0
,1 54801 600
90CONTINUE 54801 6O 1
RETURN 54801 620
1 0 0 IF(IDEN-I8Pl)llO,llO,120 54801630
1 1 0 IF(ITEMP-ITMP1)150,150,9O 54801 640
1 2 0 IF(IDEN-I8P2)130,130,140 54801650
1 3 0 IF(ITEMP-ITMP2)150,150,90 54801 660
1 4 0I F ( I D E N - I B P 3 ) 1 5 0 , 1 5 0 , 9 O 54801 670
150 IF( ITEMP-ITMP3)152,152,90 54801 680
1 5 2 CONTINUE 54801 690
IDEN=IDEN*l O 54801 700
C 5480171O
CALCULATE
C ALPHA 54801 720
C 54801 730
IF(KO.NE.KOT)GO TO 1 5 5 54801 740
C 54801 750
CALCULATE
C ALPHA I N TRANSITION ZONE 54801 760
C 54801 7 7 0
CALLSDIVB(KO,IDEN,IRES) 54801 780
IRES=IRES*l O 54801 790
CALL S D I V B ( I R E S , I D E N , I A L F 1 ) 54801 800
IALFl=(IALF1+5)/10 5480181O
I A L F = ( I A L F l + K 1 + 5 )/ l o 54801 820
GO TO 1 5 8 54801 830
1 5 5C A L LA L P H A B ( I D E N , K O , K l , I A L F ) 54801 840
C 54801 850
CALCULATE
C VCF 54801 860
C 54801 870
1 5 8 CONTINUE 54801 880
IDEN=IDEN/ 1O 54801 890
CALL V C F 5 4 B ( I A L F , I D T , I V C F ) 54801 900
I F LAG=O 54801 9O 1
C 54801 920
C CHECK TO DETERMINE I FI N EXTRAPOLATED REGION 54801 930
C 54801 940

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I M P M S J L L - L V O L J X 80 m 0732290 0526242 O24 m

SECTION VOLUME CORRECTION


FACTORS x-377

IF(IDEN-I8P1)170,170,160 54801 950


1 60 IF(ITEMP-IEP1)200,200,165 54801 960
165 I FLAG=l 54801 970
GO TO 200 54801 980
1 7 0 IF(IDEN-I8P2)190,180,180 54801 990
180 IF(ITEMP-IEP2>200,200,165 54802000
1 9 0 IF(ITEMP-IEP3)200,200,165 5 4 8 0 2 0 1O
2 O0 CONTINUE 54802020
C 54802030
C CALCULATE PRINT AND CALCULATION VALUES OF VCF 54802040
C PRINTVALUE(PVCF) ROUNDED
TO 4DECIMAL DIGITS 54802050
C CALCULATIONVALUE(CVCF) ROUNDEDTO 5 S I G N I F I C A N TD I G I T S 54802060
C 54802070
JVCF=(IVCF/1000+5)/10 54802080
PVCF=JVCF 54802090
PVCF=PVCF/lOOOO . 548021 O0
I F ( 1 V C F - 1 0 0 0 0 0 0 0 0 ) 2O1, 2 2 0 , 2 2 0 548021 1 O
21 o CONTINUE 548021 20
C 548021 30
C VCF LESS THAN ONE, F I V E DECIMALS RETURNED 548021 40
C 548021 50
JVCF=(IVCF/100+5)/10 548021 60
CVCF=JVCF 54802170
CVCF=CVCF/l O0000 . 548021 80
GO TO 250 548021 90
220 CONTINUE 54802200
CVCF=PVCF 5480221O
250 CONT I
NUE 54802220
VCFP=PVCF 54802230
VCFC=CVCF 54802240

|||| |||---
RETURN 54802250
END 54802260

|
|||| |||| || || |
SUBROUTINE SDIVB(INUM,IDENOM,IRES) 54802270

|||| |||| | | ||
C 54802280
C T H I S MODULE IS DESIGNED TO PRODUCE ADDITIONAL 54802290
C ACCURACY FROMAN INTEGER D I V I D E WHERE
THE
NUMERATOR 54802300
|
|
C I S 1 0 0 0 0 GREATER
THANTHE DENOMINATOR. THE SUBROUTINE 5480231O
| | |
C ASSUMES PROPER SCALING OF
BOTH THE INPUT NUMERATOR 54802320
--

C AND DENOMINATOR AND WILL RETURNTHE RESULTS MULTIPLIED 54802330


C BY 1 0 0 0 0 . 54802340
C 54802350
IRESl=INUM/IDENOM 54802360
IRES2=(INUM-IRES1*IDENOM)*lOOOO/IDENOM 54802370
IRES=IRESl "1 0000+IRES2 54802380
RETURN 54802390
END 54802400

SUBROUTINE A L P H A B ( I R H O , K O , K l , I A L F ) 5 4 8 0 2 4 1O
C 54802420
C T H I S MODULE I S DESIGNED TO CALCULATE ALPHA FOR 54802430
C USE I N DETERMINATION OF VOLUME CORRECTION 54802440
C FACTOR. 54B02450
C 54802460
C INPUTVARIABLES 54802470

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL*L VOLXX BO m 0732290 0526243 Tb0

--
| | |
X-378 |
|
|||| |||| | | ||
CHAPTER DATA
1 CH PHYSICAL PROPERTIES

IRHO=DENSITY*lOO(KILOGRAMS/CUBIC METRE) 54802480


KO.Kl=COEFFICIENTS OF DESIRED CURVE * 1 0 0 0 0 54802490
|||| |||| || || |

54802500
ALGORITHM- 5480251O
ALPHA=KO/RHO**2+Kl/RHO 54802520
|
|||| |||---

54B02530
CALCULATEK1 /RHO 54802540
54802550
INUM=K1*1 O000 54802560
CALL S D I V B ( I N U M , I R H O , I A L F l ) 54802570
C 54802580
C CALCULATEKO/RH0*%'2 54802590
C 54802600
INUM=KO * 1 O0 5480261O
CALLSDIVB(INUM,IRHO,IALFS) 54802620
CALL S D I V B ( I A L F S , I R H O , I A L F 2 ) 54802630
I A L F = ( I A L F l + I A L F 2 + 5 0 0) / l o 0 0 54802640
RETURN 54802650
END 54802660

SUBROUTINE V C F 5 4 B ( I A L F , I D T , I V C F ) 54802670
C 54802680
C T H I S MODULE I S DESIGNED TO CALCULATE VOLUME 54802690
C CORRECTION FACTOR. ALTHOUGH ALLCALCULATIONS ARE
DONE 54802700
C AS INTEGERS, THE SUBROUTINE RETURNS WITHA 8 5480271O
C OR 9 D I G I T VALUE DEPENDENT UPON WHETHER I D T 54802720
C IS P O S I T I V E OR NEGATIVE. 54802730
C 54802740
C ALGORITHM- 54802750
C VCF=EXP(-ALPHA*DT(l.O+O.8*ALPHA*DT)) 54802760
C 54B02770
C CALCULATEALPHA*DT 54802780
C 54802790
ITERMl =IALF* IDT 54802800
ITERMI =ITERM1/1O 5 4 8 0 2 8 1O
C 54802820
C CALCULATE 0 . 8 *ALPHA
*DT 54802830
C 54802840
54802850
C 54802860
C CALCULATE EXPONENT-ALPHA*DT(l.O+0.8*ALPHA*DT) 54802870
C 54802880
CALL MPYB(ITERMl,ITERM2,ITERM3) 54802890
I X = - (ITERMi+ITERM3) 54802900
C 5480291O
C CALCULATEEXPONENTIAL(F1RST 7 TERMS
OFPOWER SERIES) 54802920
C 54802930
ISUMl=l OOOOOOOO+IX 54802940
CALLMPYB(IX,IX,ISUM2) 54802950
ISUMZ=ISUM2/2 54802960
CALLMPYB(IX,ISUM2,ISUM3) 54802970
ISUM3=ISUM3/3 54802980
CALLMPYB(IX,ISUM3,ISUM4) 54802990
ISUM4=ISUM4/4 54803000
CALLMPYB(IX,ISUM4,ISUM5) 5480301O

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
SECTION1-VOLUME CORRECTION
FACTORS x-379

ISUM5=ISUM5/5 54603020
CALLMPYB(IX,ISUM5,ISUM6) 54603030
ISUM6=ISUM6/6 54603040
IVCF=ISUM1+ISUM2+ISUM3+ISUM4+ISUM5+ISUM6 54603050
RETURN 54803060
END 54803070
--

SUBROUTINE M P Y B ( I X , I Y , I Z ) 54803080
| | |

C 54803090
|

C T H I S MODULE
PERFORMS INTEGER MULTIPLICATION. THE TOTAL 5 4 6 0 3 1 O0
|
|||| |||| | | ||

C NUMBER OF D I G I T S
IN
IX AND I Y MUST
NOT
EXCEED 1 7 . OTHER 5 4 6 0 3 1 1O
C WISE, OVERFLOW W I L L OCCUR. 546031 20
C 546031 30
|||| |||| || || |

IU1 = I X / 10000 546031 40


K1 = 1 0 0 0 0 * IU1 548031 50
IV1 = I X - K1 546031 60
|

IU2 = I Y / 10000 548031 7 0


|||| |||---

K2 = 1 0 0 0 0 * IU2 546031 80
IV2 = I Y - K2 548031 90
K3 = I U 1 '> IV2 +
I U 2I V 1 + I V 1 * I V 2 / 10000 54B03200
I Z = (K3 + 5000) / 1 0 0 0 0 + IV1 v IU2 5460321 O
RETURN 54803220
END 54603230

Errata
Please make the following updates to this subroutine listing.For an explanation
of the updates see 11.1.6.

current: DATA lBPl,lBP2/7790,8245/ 54800930


updated : DATA IBPl,lBP2/7785,8240/ 54800930

11.1S4.6 IMPLEMENTATION PROCEDURE FOR SUBROUTINE TAB54B

I nt o d a y ' sw o r l dt h e r ei s a r a p i d l yd e v e l o p i n gt r e n dt ou s ec o m p u t e r si n
c u s t o d yt r a n s f e r measurements, a c c o u n t i n g work, processcontrolsystems, and a
v a r i e t y of otheruses where t a b l e sm u s t be i n c o r p o r a t e d i n t o computercodes.
Y e t many o f t h e p r i n t e d t a b l e s a r e a l m o s t i m p o s s i b l e t o codedue to the fact
t h a t someone has s l i g h t l y m o d i f i e d s e l e c t e d v a l u e s t o d i f f e r from t h o s e
o b t a i n e du s i n gt h em a t h e m a t i c a le x p r e s s i o nt h a ts u p p o s e d l yg e n e r a t e dt h e
tables. To overcome t h i s problem i t i s o f t e n r e q u i r e d t o add e x t e n s i v e excep-

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I flPflS*LL-L VOL*X 80 m 0732290 0526245 833 m

x-380 CHAPTER
1 P PHYSICAL PROPERTIES
DATA

t i o nt a b l e st ot h e codes. T h i s makes t h e codes l a r g e and cumbersome t o modify,


and r e s t r i c t s t h e i r use t o largercomputer systems. A l s ow i t ht h ed e v e l o p m e n t
ofbettermeasuringdevices i t isoftenpossibletogain more d i g i t s o f p r e c i -
s i o ni nt h et a b l ep a r a m e t e r s ,n e c e s s i t a t i n gf i n e rg r i do ft h et a b u l a rv a l u e s ,
r e s u l t i n gi nl a r g e r volumes o fp r i n t e dt a b l e st o be handled.
I na d d i t i o n ,a st h eo n - l i n eu s e o f computers for meteringpurposes
i n c r e a s e s ,t h ed i r e c t use o fp r i n t e dt a b l e s w i l l decrease; t h e r e f o r e ,t h e new
Standard i s an e x p l i c i ti m p l e m e n t a t i o np r o c e d u r er a t h e rt h a n a s e to f equa-
t i o n s o r a s e to ft a b l e s . I t must be remembered t h a t t h e s t a n d a r d i z a t i o n o f
t h ei m p l e m e n t a t i o np r o c e d u r ei m p l i e ss t a n d a r d i z a t i o no ft h es e to f mathe-
m a t i c a le x p r e s s i o n s used w i t h i nt h e code. Absoluteadherence t ot h ep r o c e d u r e
w i l l h e l p t o i n s u r et h a ta l lc o m p u t e r s and computercodesofthefuture, meet-
i n gt h es p e c i f i c a t i o n s and r e s t r i c t i o n s , w i l l be a b l et op r o d u c et h e same
results. I ti sb e l i e v e dt h a tt h i sp r o c e d u r ew i l la l l o wf o rt h e maximum
machine and code
independence.
The procedure was i m p l e w n t e di nc o m p u t e r
s u b r o u t i n e si s s u e d by API i n 1980 u s i n g ANSI/ASA FORTRAN. The s u b r o u t i n e s
m a x i m i z e dp r e c i s i o n by t h eu s eo f3 2 - b i ti n t e g e ra r i t h m e t i c .
The p r o c e d u r ea sd e s c r i b e di nt h ef o l l o w i n gt e x t can, by c a r e f u l and
d e l i b e r a t ea p p l i c a t i o n of numericalanalysis, be used w i t h t h e m a j o r i t y o f
languages andword s i z e si np r e s e n to ra n t i c i p a t e d use. Tousethestandard
procedure means t o m a i n t a i n a b s o l u t e and unwaveringadherence t o t h e number o f
digits specified at each s t e p and t o t h e c a l c u l a t i o n p r o c e d u r e a s o u t l i n e d .
I nt h ep r o c e d u r e ,t h en o m e n c l a t u r e used i s t h a t o f ASTM E380-76, unless
an e x p l i c i t p r o c e d u r e i s g i v e n below, i n whichcasetheproceduregivenbelow
overridesthatgiven by ASTM E380-76.
--

I nt h ep r o c e d u r et h en o m e n c l a t u r e (XXX.XX) means f i v e ( 5 ) m a t h e m a t i c a l l y
| | |

significant digits.
|
|
|||| |||| | | ||

The t e r mr o u n d i n ga su s e di nt h ep r o c e d u r e means: C o n s i d e ro n l yt h e
first digit to the right of the desired position and
|||| |||| || || |

a. I f t h a td i g i ti sg r e a t e rt h a n 4, i n c r e m e n tt h ed e s i r e dp o s i t i o n by
one and drop the remai ni ng d i g ¡ t s t o t h e r i g h t o f t h e d e s i r e d p o s i -
|
|||| |||---

tion.
b. I f t h a td i g i ti sl e s st h a n 5, s i m p l yd r o pt h er e m a i n i n gd i g i t st o
t h e r i g h t of t h e d e s i r e d p o s i t i o n .

-
All constants a r e used t o e x a c t l y t h e number of d i g i t s p r i n t e d .

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL=L VOL*X A O m 0732290 052b24b 7 7 T m

SECTIONVOLUME
FACTORS
CORRECTION x-381

C a l c u l a t i o nP r o c e d u r e
--

STEP 1: Round i n p u tv a r i a b l e so fd e n s i t y and observedtemperature


| | |

a. Round d e n s i t y t o t h en e a r e s t
|
|
|||| |||| | | ||

0.5Kg/m3 and c a r r y a s 5 d i y i t r e s u I t
¡.e. d e n s i t y (DEN151 = XXXX.X
|||| |||| || || |

b. Round observedtemperature t ot h en e a r e s t
0.05 "C and c a r r y a s 5 d i g i t resu I t
|
|||| |||---

¡.e. observed
temperature (DEGC) = XXX.XX
STEP 2: Choose t h ea p p r o p r i a t ev a l u e so f KO and K1 as d e s c r i b e di n API Stan-
dard 2540 , TABLE54, .
1 1 1.54
KO i s an 7 d i g i t c o n s t a n t
I .e. KO = XXX.XXXX
K 1 i s a 4 d i g i tc o n s t a n t
I .e. K1 = .XXXX

STEP 3: C a l c u l a t i o no fa l p h a( c o e f f i c i e n to ft h e r m a le x p a n s i o n )
1 I f i n p u td e n s i t y C 770.5 Kg/m3
i nput dens it y > 787.5 Kg/m3

define = -+ -
2 P
P

a. Eva1 u a t e -
KO
2
P
K
a( 1 I Compute 0= .XXXXXXXX
P

a(2) Compute KO/P = .oooxxxxxxx


P

b. Evaluate -
P
K
b( 1 1 1= .OOOXXXXXXX
P

c. Sum r e s u l t so fa ( 2 1 and b ( 1 ) and round t o n e a r e s t 0.0000001


i .e. C1 = .oooxxxx

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMSx1L.L VOL*X A O 9 0732290052b2Y7bob m

X-382 1 P PHYSICAL PROPERTIES


CHAPTER DATA

II. I f input density -


> 770.5 Ky/m3
i n p u t dens it y 5 787.5 Kg/m3
--
| | |

def i ne a = A + B/$ where


|
|
|||| |||| | | ||

A and B a r e chosen t o be t h e c o e f f i c i e n t s o f a line joining the jet


fuel line at 770.5 Kg/rn3 to thegasol¡ne I ¡ne a t 787.5 Ky/m3.
|||| |||| || || |

A = .OOXXXXXX
B = XXXX.XXXX
|
|||| |||---

a(1) compute I
I= .XXXXXXXX
P

a(í’)
compute B/p = .OOXXXXXXXX rounded t on e a r e s t .0000000001
P

b) Sum r e s u l t s o f a ( 2 ) and A and round t o n e a r e s t .O000001


¡.e. a = .OOOXXXX

STEP 4: Calculate A t
def i ne A t = DEGC - TBASE
Note: TBASE c a r r i e d t o 4 d i g i t s XX.XX (15.00)
Carry A t = XXX.XX

STEP 5 : C a l c u l a t i o no f VCF
def ¡ne VCF = EXPL- a A t ( 1 .O + 0.8 a A t ) l
= EXP[-aAt - 0.8 a 2 A t 2 ]
a. C a l c u l a t i o n of exponent
a( 1 ) a A t = .XXXXXXXX
a ( í ’.)8 a A t = .XXXXXXXX
a(3) .8 a2 A t 2 = .OXXXXXXX
a(4) - aAt - 0.8 aí’ A t 2 = 0.XXXXXXXX w i t h any t r a i I i n g
d i g i t s dropped
b. C a l c u l a t i o n of e x p o n e n t i a l
VCF EXPI- a A t - 0.8 At21 = X.XXXXXX
usingatleastthefirst 7 t e r m so ft h e power s e r i e se x p a n s i o n
o f ex

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL*L VOLXX 80 m 0732290 05262118 542 D

1-VOLUME CORRECTION
SECTION FACTORS x-383

Computational -
v a l u e o f VCF

T a b l ev a l u e
o f VCF
-c
=
1.XXXX

0.XXXXX

X.XXXX
rounded t on e a r e s t 0.0001

rounded t on e a r e s t

rounded VCF n
t oe a r e s t
0.00001

0.0001
i f VCF

i f VCF
2 1

|||| |||---
The 1980 i n t e g e r FORTRAN code issued by API containedboth an i n t e g e r

|
|||| |||| || || |
d i v i s i o n andan i n t e g e rm u l t i p l i c a t i o na l g o r i t h m . A d e s c r i p t i o n o f each i s
c o n t a i n e di nt h ef o l l o w i n g :

|||| |||| | | ||
INTEGER MULTIPLICATION PROCEDURE
(FOR 32 B I T ARITHMETIC)

|
|
| | |
DATA DEFINITION

--
X, Y a r ei n t e g e r numbers t h a t a r e equal t o o r l e s s t h a n 2 x lo9 (SI ightly
lessthan Z3l). A l a r g e rv a l u e may c a u s eo v e r f l o w .I na d d i t i o n ,t h et o t a l
number o f d i g i t s i n X and Y mustnot exceed 17, o t h e r w i s eo v e r f l o w will occur.
Z i tsh pe r o d u c t XY s c a l e d by ¡.e. Z = XY/108,
Note: I f i t i sd e s i r a b l et oo b t a i n maximum p r e c i s i o n , X and Y may be
scaled up p r i o r t o u s eo ft h ep r o c e d u r e .T y p i c a l l y ,a tl e a s t 15 d i g i t s a r e
needed t o o b t a i n 6 d i g i t p r e c i s i o n , 16 f o r 7 and 17 f o r 8.
The l a r g e s t v a l u e s of X and Y t h a t may beused a r e 2 O00O00 O00 and
99999999.

CALCULATION
x/10000 = u1
10000 U1 = K1
X - K1 = V1
Y/lOOOO = u2
10000 U2 = K2
Y - K2 = V2
(UIV2) + (U2V1) + (V1V2/10000) = K3
(K3 + 5000)/10000 + (UIU21 = 2

Note: Z has
been scaled by and may have t o be r e s c a l e d b e f o r e use.

15 Y14
TOTAL DIGITS I N X AND 13 12
" " "
16 17
DIGITS IN PRODUCT, Z 3-4 4-5 5-6 6-7 7-8
8-9

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
X-384 CHAPTER DATA
1 P PHYSICAL PROPERTIES

INTEGER D I V I S I O N PROCEDURE
(FOR 32BIT ARITHMETIC)

DATA DEFINITION
X, Y a r ei n t e g e r numbers such t h a t X is equal t o o r l e s s t h a n 232 -,1
I
and Y i s of o r d e ro f mayn i t u d e lo4 l e s st h a n X.

R i st h eq u o t i e n to f & scaled by lo4, ¡.e. R = * lo4.


Y Y
--
| | |

Note: I f i t i sd e s i r a b l et o obtain.maximumprecision, X and Y may be


|
|
|||| |||| | | ||

scaled up p r i o r t o use of t h e procedure. T y p i c a l l yt h e more d i g i t s t h a t a r e


carriedinboth X and Y, t h e more a c c u r a t e d i g i t s on output.
|||| |||| || || |

CALCULATION
X/Y = u1
|
|||| |||---

U1Y = K1
X - K1 = V 1
Vl/Y = u2
U1 * 10000 + U2 = R
Note: R hasbeensca I ed by 1 O4 and may have t o be resca led before use.

Examp I es for Checkout

The f o l l o w i n g examples aredesigned t o a i d i nc h e c k o u tp r o c e d u r e sf o r


boththeexisting API s u b r o u t i n e and any subroutineswhicharedevelopedusing
t h ei m p l e m e n t a t i o np r o c e d u r eo u t l i n e d above. The l i n e s o f t h e examples a r e
numbered t o correspond t o t h e lines w i t h i n t h e calculation procedure.

EXAMPLE 1: Assume a f u e l o i l w i t h an i n p u td e n s i t yc o r r e c t e d t o 15 "C o f


903.5 Kg/m3 andan observedtemperature of 30.52 OC. Calculate
t h e VCF r e q u i r e d t o c o r r e c t t h e volume t o 15 OC, correct to 4
decimal d i g i t s .

STEP 1 : a. rounded DEN15 = 903.5


b. rounded DEGC = 30.50

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL.L VOL*X 80 0732290 O526250 LTO D

--
| | |
|
|
|||| |||| | | ||
FACTORS
SECTIONVOLUME CORRECTION x-385

STEP 2: KO = 186.9696 ( a s of May 1, 1980)


|||| |||| || || |

K1 = 0.4862 ( a s of May 1, 1980)

-
|

STEP 3: I .a. Eva1 u a t e KO


|||| |||---

2
P

a( 1 ) -
KO = 0.20693923
P

KO/P
a(2) - = 0.0002290417
P

I .be Evaluate -
K1
P

K
b( 1 ) 1 = 0.0005381294
P

I .C. c1 = 0.0007672

STEP 4: At = 15.50

STEP 5: C a l c u l a t i o n of VCF
a. C a l c u l a t i o n of exponent
a( 1 ) 0.01 189160
a(2) 0.00951328
a(3) 0.00011312
a(4) -0.01200472
b. C a l c u l a t i o n of e x p o n e n t i a l
VCF = 0.988067

VCF c o r r e c t t o 4 decimal d i g i t s = 0.9881

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*33-3 VOL*X 80 W 0732290 0526253 037 W

X-386 1 P PHYSICAL PROPERTIES


CHAPTER DATA

EXAMPLE 2: Assume a j e t f u e l w i t h an i n p u td e n s i t yc o r r e c t e dt o 15 "C of


819.0
Ky/m3 andan observedtemperature o f 26.75 OC. Calculate
t h e VCF r e q u i r e d t o c o r r e c t t h e volume to 15 OC, correct to 4
d e c i m adl i g i t s .

STEP 1: a. rounded DEN15 = 819.0


b. rounded DEGC = 26.75

STEP 2: KO = 594.5418 ( a s of May 1, 1980)


K t = 0-0 o( af s May 1, 1980)

STEP 3: 1 .a. Eva1 u a t e -


KO
2
P

K
a(l1 2= 0.72593626
P

KO/P
a(2) = O.OOC88636
P

I b. Eva I u a t e K 1-
P

b(1) -
K1 = 0.0
P

I .c. a = 0.0008864

STEP 4: A t = 11.75

STEP 5: C a l c u l a t i o n of VCF
a. C a l c u l a t i o n o f exponent
a( 1 ) 0.01041520
a(2) 0.00833216
a(3) 0.00008678
a(4) -0.01050198
b. C a l c u l a t i o n of exponential
VCF = 0.989552

VCF c o r r e c t t o 4 decimal d i g i t s = 0.9896

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL.L VOL*X B O m 0 7 3 2 2 9 0 0526252 T73 m

SECTIONV VOLUME
FACTDRS
CORRECTION x-387

EXAMPLE 3: Assume a p r o d u c tw i t h an i n p u td e n s i t yc o r r e c t e d t o 15 "C o f


777.5 K g / d andan observedtemperature of 8.98 OC. Calculate
t h e VCF r e q u i r e d t o c o r r e c t t h e volume t o 15 OC, correct to 4
decimal d i g i t s .

STEP 1 : a. rounded DEN1 5 = 777.5


b. rounded DEGC = 9.00
--

STEP 2: KO, K1 n o ta p p l i c a b l e ;d e n s i t yf o u n di nt r a n s i t i o n zone.


| | |
|
|
|||| |||| | | ||

STEP 3 : 1I.a. A = -0.00336310 ( aosf May 1, 1980)


B = 2680.3206 ( a s o f May 1 , 1980).
|||| |||| || || |
|
|||| |||---

b. a = 0.0010708

STEP 4 : A t = -6.00

STEP 5: C a l c u l a t i o n o f VCF
a. C a l c u l a t i o n of exponent
a(1) -0.00642480 \

a(2) -0.00513984
a(3) 0.00003302
a(4) 0.00639178
b. C a l c u l a t i o n of e x p o n e n t i a l
VCF = 1 .O06412

VCF c o r r e c t t o 4 decimal d i g i t s = 1.0064

EXAMPLE 4: Assume a g a s o l i n ew i t h an i n p u td e n s i t yc o r r e c t e dt o 15 "C o f


749.1 Ky/m3 and an o b s e r v e d t e m p e r a t u r e o f 32.0 "C. Ca 1 c u l a t e

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
X-388 CHAPTER 11"PHYSICAL PROPERTIES DATA

t h e VCF r e q u i r e d t o c o r r e c t t h e volume t o 15 OC, correct to 5


significantfigures.

STEP 1 : a)rounded DEN15 = 749.0


b) rounded DEGC = 32.00

STEP 2: KO = 346.4228 ( aosf May 1, 1980)


K t = 0.4388 (o
a fs May 1, 1980)

STEP 3: 1.a. Evaluate -


KO
2
P

K
a(1) 2 = .46251375
P

KO/P
a(2) = 0.00061750
P

.
I b. Eva l u a t e K1 -
P

b(l) 2 P
= 0.00058584

I.c. U = 0.0012033

STEP 4: A t = 17.00

STEP 5: C a l c u l a t i o no f VCF
|||| |||---

a. Ca I cu I ate exponent
|
|||| |||| || || |

a(1) 0.02045610
a(2) 0.01636488
|||| |||| | | ||

a( 3 1 O .O0033476
a(4) -0.02079086
|
|

b. C a l c u l a t i o no ef x p o n e n t i a l
| | |
--

VCF = 00979423

VCF c o r r e c t t o 5 s i g n i f i c a n t f i g u r e s = 0.97942

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL.L VOLZX 80 0732290 052b254 84b m

SECTIONVOLUME CORRECTION
FACTORS x-389

11.1S4.7 TABLE 54GVOLUME CORRECTION TABLE 54C, when used witha minimum of ten data
FACTORS FOR INDIVIDUAL AND points, allows one to extract the highest degree of ac-
SPECIAL APPLICATIONS, VOLUME curacyfrom the base data. Itis suggested that TABLE
CORRECTION TO 15°C AGAINST 54C be used when:
THERMAL EXPANSION COEFFICIENTS 1. TABLES 54A and 54B do not adequately represent
AT 15°C the thermal expansion properties of the fluids of in-
TABLE 54C gives volume correction factors tocon- terest; and
vert petroleum liquid volumes to thecorresponding vol- 2. Precise thermal expansion coefficients may be ob-
ume at 15°C. Thetablepresentstabularentries of tained directlyor indirectly by experiment (As an exam-
volume correction factoragainst thermal expansion co- ple, high precision density data may be usedto compute
efficient and temperature. The values were computed the coefficients); and
from the basic equation used to represent volume cor- 3. Buyers andsellers agree that, for their use, a greater
rection factors. degree of equity can be obtained.
VCF = EXP [-a&(l + O.~CL&)] (1) Thetemperature ranges of this table
are:
--
| | |

aT = CL at the base temperature a * lo6 "C


|

At = t - T 486 to 918 -18 to 150


|
|||| |||| | | ||

t = any temperature 918 to 954 -18 to 125


T = base temperature. 954 to 1674 -18 to 95
In this form the equationis independent of the group
|||| |||| || || |

The volume correction factors given in this table are


or substance.Itcan beusedwithanyvalid method based on data from the U.S. National Bureau of Stan-
of obtaining the thermal expansion coefficientfor a dards and from other published data. The appendix to
|

given fluid as long as a statistically significant num- this table presents valuesof the thermalexpansion coef-
|||| |||---

ber of points are obtained. A minimum of ten such ficients at 15°C for each of the samples included in the
points is recommended. The appendix (11.1 S4.7.1) to NBS data set. Portionsof the temperaturerange repre-
TABLE 54C presents values of the thermal expansion sent areasbeyond these data. Thus, mathematical tech-
coefficient along with the base density for each of the niques were employed to extrapolate beyond the tem-
NBS samples. In addition, values of the constants KO perature range of the given data to determine thevol-
and KIare given for each major group. These constants ume correction factors for these areas. These factors are
relate the thermal expansion coefficient to base density denoted by an asterisk (*). Extension of this table be-
by yond the ranges shown is not intended.

OLT =
KO " KIPT
(2) Increments used inthis tablefordeterminingthe
PT2
volume correction factors are0.25"C and 4 units for p.
Interpolation between either temperature or thermal
Thistableanditsprimarysubroutine allow the use of expansion coefficient is not intended there is no
measured data for previously unstudied fluids to sup- practical method of interpolation that will produce the
plementthosedata included in the initial database. accuracy obtainable from the Standard.
High precision density data obtained from the labora-
toryfora fluid of interest maybe reduced by EquationThistable mustbe entered with a known thermal
1to obtain pTand aT.TABLE 54Cmay then be entered expansion Coefficient at 15°C and with an observed
with the aT so temperature.
determined.

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API MPMS*LL-L V O L * X 80 m 0732290 O526255 782 m

X-390 CHAPTER 11"PHYSICAL PROPERTIES DATA

11.1.54.8 PROGRAM DOCUMENTATION FOR SUBROUTINE TAB54C-


VOLUME CORRECTION FACTORSFOR INDIVIDUAL AND
SPECIAL APPLICATIONS, CORRECTIONOF VOLUME TO 15°C
AGAINST COEFFICIENTS OF THERMAL EXPANSION AT 15°C

Subroutine Title: TAB54C - TABLE54C, VCF for I nd i v i d u a I and


S p e c i a lA p p l i c a t i o n s , Volume C o r r e c t i o n t3 15 "C

Descr i p t i on : T h i ss u b r o u t i n ei sd e s i g n e dt oc a l c u l a t et h e
volume c o r r e c t i o n f a c t o r r e q u i r e d t o c o n v e r t
a volume a t an observedtemperature to the cor-
respondingvolume a t 15 "C assuming t h e c o e f f i -
c i e n t of thermalexpansion i s known.

Program Respons i b i I i t y : A m e r i c a nP e t r o l e u mI n s t i t u t e
Measurement C o o r d i n a t i o n
2101 L S t r e e t , N.W.
Washington, D.C. 20037

D a t e I ssued : August 1980

Language: FORTRAN, ANSI/ASA Standard

Reference: API Standard 2540, TABLE 54, 11.1.54

THIS SUBROUTINE WAS DEVELOPED USING THE


MATHEMATICAL
ALGORITHMS
AND SPECIFICATIONS DESCRIBED I N THE DOCUMENT PROCEDURE 11.1.54.9.
ANY MODIFICATIONS TO THIS SUBROUTINE
MUST RIGIDLY ADHERE
TO THE SAME ALGORITHMS AND SPECIFICATIONS.

11.1.54.8.1 Introduction

TAB54C is a computersubroutinedesigned tocalculatethe volumecor-


r e c t i o nf a c t o r (VCF) necessary t o c o n v e r t avolume of a l i q u i dh y d r o c a r b o n

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL=L VOL*X 80 m 0732290 0 5 2 b 2 5 b b L 9 m

SECTIONVOLUME CORRECTION
FACTORS X-391

w i t h aknown c o e f f i c i e n t of thermalexpansion and a t a s p e c i f i e dt e m p e r a t u r e


i n degreesCelcius ( " C ) t ot h ee q u i v a l e n t volume a t 15 'C. The s u b r o u t i n e
acceptsasinputthedesiredcoefficientofthermalexpansionrounded tothe
nearest 0.000001 and theobservedtemperaturerounded t ot h en e a r e s t 0.05 ' C .
I fe i t h e ri n p u tv a l u e has n o t been p r o p e r l y rounded, t h e s u b r o u t i n e w i l l r o u n d
t h ev a l u e s and r e t u r nt h ec o r r e c t e dv a l u e s . The s u b r o u t i n er e t u r n so n ev a l u e
o f VCF w i t h 5 s i g n i f i c a n t f i g u r e s o f accuracyforcomputationpurposes and
another VCF valuerounded t o fourdecimalplaces for p r i n t i n g purposes.The
s u b r o u t i n ea l s oo u t p u t s a s t a t u sc o d ef o ru s e rc o n v e n i e n c e . Thecode isset
t o -1 i f an e r r o r c o n d i t i o n o c c u r s and t o + 1 i f t h ei n p u tv a l u e sa r eo u t s i d e
t h el i m i t so ft h ec o r r e l a t i o n . A s t a t u s code of z e r oi sr e t u r n e d i f t h ei n p u t
v a l u e sa r ew i t h i nt h el i m i t s of t h ec o r r e l a t i o n . The l i m i t so ft h ec o r r e l a -
t i o ni n c l u d i n gt h ee x t r a p o l a t e dr e g i o na r ed e p i c t e di n Figure X-18. The calling
programmustcheck t h e f l a g andprovidetheuserwithappropriatewarning mes-
sages o r program term i n a t i o n ,

11.1.54.8.2 SubroutineSpecifications

The range of a p p l i c a t i o n :
Alpha * lo6 Temperature, "C
486.0 to 918.0 -18.0 t o 150.0
919.0 t o 954.0 -18.0 t o 125.0
955.0 t o 1674.0 -18.0 t o 95.0

Referenced
modules: VCF54C, W Y C

FORTRAN f u n c t i o n s : FLOAT

Average e x e c u t i o nt i m e : 2290 VCF entries/CPU second


IBM 370/168

The s u b r o u t i n e sa r ew r i t t e ni n ANSI/ASA
FORTRAN u s i n gi n t e g e ra r i t h m e t i c . The
s i z e and storagerequirementsare:

1. Compilable
source
statements 93
2.bytes
storage
Decimal 1052
3. Words 513
-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*LL.L VOL*X 80 m 0732290 0526257 555 m

X-392 CHAPTER1 PHYSICAL PROPERTIES


DATA

11.1.54.8.3 C a l l i n g Sequence

CALL
TAB54C (ALF15, DEGC, VCFC,
VCFP, IFLAG)

IWUT DESCRIPTION

ALF15/ - C o e f f i c i e not tfh e r m ael x p a n s i o n


(ALF15 r e t u r n e d w i l l be rounded t o n e a r e s t 0.0000010)

DEGC - Observed
temperature, "C
(DEGC r e t u r n e d wil I be rounded t o n e a r e s t 0.05 "C)

OUTPUT DESCRIPTION

VCFC - O u t p u t VCF rounded t o 5 s i g n i f i c a n t f i g u r e s f o r c o m p u t a t i o n a l


purposes
¡.e. VCFC = 1 .XXXX
or VCFC = 0.XXXXX

VCFP - O u t p u t VCF rounded t o 4 d e c i m a lp l a c e sf o rp r i n t i n gp u r p o s e s


¡.e.
VCFP = 1.XXXX
or VCFP = 0.XXXX

IFLAG - S t a t u s Code

O: I n d i c a t e si n p u tv a r i a b l e sa r ew i t h i nt h er a n g e of a p p l i c a t i o n .

1: I n p u td a t ao u t s i d el i m i t s o f c o r r e l a t i o na sg i v e ni n 11.1.54.

-1: I n d i c a t e si n p u t ALF15 o r i n p u t DEGC o u t s i d er a n g eo fa p p I i . c a t i o n


a sg i v e ni n 11.1.54; VCFC and VCFP s e t t o -1.0000.

11.1.54.8.4 Method o f C a l c u l a t i o n

T h es u b r o u t i n ee v a l u a t e st h ee q u a t i o n

VCF = EXPI- "15 A t t ( 1 .O + 0.8 "15 A t ) 1


-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I M P M S * L L - L VOL*X 80 D 0732290 052b258 491 D

SECTIONV VOLUME CORRECTION FACTORS x-393

where A t = DEGC - 15.00

|||| |||---
a15 = c o e f f i c i e n to ft h e r m a e
l xpansion

|
|||| |||| || || |
|||| |||| | | ||
|
|
11.1.54.8.5 Examples

| | |
--
Theseexamples aretutorialinnature and a r en o ti n t e n d e d t o be s u f f i c i e n t
f o rs u b r o u t i n ec h e c k o u t . The examplesgiven i np r o c e d u r e 11.1.54.9 areto be
used’ f o r t h e computer checkout.

Example 1
ALF15 = .O007924
DEGC = 32.50
CALL
TAB54C (ALF15, DEGC,
VCFC,
VCFP, IFLAG)
A f t e tr h ec a l l : ALF15 = .O00792
DEGC = 32.50
VCFC = .98608
VCFP = .9861
IFLAG = O

Examp I e 2
ALF15 = .O005940
DEGC = 124.00
CALL
TAB54C (ALFIS, DEGC, VCFC,
VCFP, IFLAG)
A f t e tr h ec a l l : ALF15 = .O00594
DEGC = 124.00
VCFC = a93417
VCFP = .9342
I FLAG = 1

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
x-394 1 P PHYSICAL PROPERTIES
CHAPTER DATA

Exarnp l e 3
ALFl5 = .O01 1880
DEGC = 200.00
CALL
TAB54C (ALF15, DEGC, VCFC,
VCFP, IFLAG)
A f t e r t h e c a l I: ALF15 = .O01 1880
OEGC = 200.00
VCFC = -1.0000
VCFP = - 1 .O000
IFLAG = - 1

11.1.54.8.6 FLOWCHART

I INPUT: THERMAL
EXPANS
COEFFICIENT OBSERVED
ION
TEMPERATURE I
I ROUND INPUT DATA
TO SPECIFICATION I

+
DATA WITHIN ERROR FLAG I ERR = -1
BOUNDS OF
TABLE

CALCULATEVCF

Y ES

V
SET ERROR SET ERROR
FLAG = O FLAG = 1
I l

I
I 1

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I M P M S * L L - L V O L J X 80 W 0732290 0 5 2 b 2 b 0 0 4 T W

SECTIONVOLUME CORRECTION FACTORS x-395

11.1.54.8.7 Subroutine Listing

TA65 4C T h si su b r o u t i nsee r v e s as t hien p u t / o u t p ur o


l u t i nteo
t h e subsequentmodulesnecessary inthecalculation of
volume c o r r e c t i o n f a c t o r f r o m t h e c o e f f i c i e n t o f t h e r m a l
expansion a t 15 "C and observedtemperature.

ReferencedModules

WYC T h i s m o d upleer f o r m
i nst e gme ur l t i p l i c a t iw
onith a maxi-
mum o f 17 d i g i t s .

VCF54C T h i s module i s designed tcoa l c u l a t e volume c o r r e c t i o n


factor.

SUBROUTINE TAB54C(ALF15,DEGC,VCFC,VCFP,IFLAG) 54C0001 O


C 54C00020
(C)COPYRIGHT
C 1980 54C00030
C AMERICAN PETROLEUM I N S T I T U T E 54C00040
C RIGHTS
ALL RESERVED 54C00050
C 54C00060
C T H I S SUBROUTINE IS A VOLUNTARY STANDARD
AND WAS DEVELOPED 54C00070
C UNDER THE AUSPICES OFTHE JOINT
API-ASTM COMMITTEE ON STATIC 54C00080
C PETROLEUM MEASUREMENT I N PART FROM DATA
GENERATED 54C00090
C BY A PROJECT FUNDED BY THE AMERICAN PETROLEUM 54C001 O0

|||| |||---
C INSTITUTE AT THE U . S . NATIONAL BUREAU OF STANDARDS, 54C0011 O
GAITHERSBURG,
C MARYLAND. 54C00120
C 54C00130

|
|||| |||| || || |
C I N Q U I R I E S CONCERNING I T S APPLICATION SHOULD 54C00140
C ADDRESSED
BE TO: 54C00150
AMERICAN C PETROLEUM INSTITUTE 54C00160

|||| |||| | | ||
C MEASUREMENT COORDINATION 54C00170
C 2101 N.W.
L STREET, 54C00180
C WASHINGTON, DC 2 0 0 3 7 54C00190

|
C 54C00200
|
c ............................................................ 54C0021 O | | |

c * *
--

54C00220
C * T H I S SUBROUTINE OR THE MATHEMATICAL RELATIONSHIPS * 54C00230
C * REPRESENTED THEREBY MAY BE USED BY ANYONE WISHING * 54C00240
C * DOTO SO, BUT
THE AMERICAN PETROLEUM I N S T I T U T E , * 54C00250
C * THE AMERICAN SOCIETY FOR TESTING AND MATERIALS, * 54C00260
C * AND THE INSTITUTE OF PETROLEUM AND THEIR * 54C00270
C * RESPECTIVE MEMBERS AND THE U . S . NATIONAL BUREAU * 54C00280
C * OF STANDARDS, SHALL NOT BE HELD RESPONSIBLE OR * 54C00290
C * L I A B L E I N ANY
WAY
FROM LOSS OR DAMAGE, INCLUDING, * 54C00300
C * NOT
BUT LIMITED
TO, CONSEQUENTIAL DAMAGE, * 54C0031 O
C * RESULTING FROM SUCH
USAGE OR FOR VIOLATION OF * 54C00320
C * ANY FEDERAL, STATE, OR MUNICIPAL LAWS, REGULATIONS 0 54C00330
C * OR PRACTICES OF THE UNITED STATES OR OF ANY * 54C00340
C * FOREIGN COUNTRY. * 54C00350
c * * 54C00360
c ............................................................ 54C00370

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I HPHS*LL.L VOL*X B O m 0732290 0526261 TBb

x-396 CHAPTER1 PHYSICAL PROPERTIES


DATA

C 54C00380
C T H I S SUBROUTINE I S DESIGNED TO ACCEPT AS INPUT 54C00390
C A VALUE OF ALPHA (THERMAL EXPANSION COEFFICIENT) 54C00400
C AND OBSERVEDTEMPERATURE I N DEGREES CELSIUS (DEGC) 54C0041 O
C ANDPRODUCE THEVOLUME CORRECTION FACTOR FOR 54C00420
C A P I TABLE 5 4 C , VCF FOR I N D I V I D U A L AND SPECIALAPPLICATIONS 54C00430
C VOLUME CORRECTION FACTOR TO 1 5C . 54C00440
C 54C00450
C T H I S SUBROUTINE CALLS 54C00460
C VCF54C (CALLS MPYC) 54C00470
C 54C00480
C ALF15 SHOULDBE INPUT TO THE NEAREST 1 . 0 WHERE 54C00490
C ALF15 I S XXXX.X * l o * * - 6 . THE SUBROUTINE WILL 54C00500
C ROUNDTHE VALUE AND RETURNTHE CORRECTED VALUE. 54C0051 O
C 54C00520
C DEGC
SHOULD BE PASSED ROUNDED TO THE NEAREST 54C00530
C 0.05 DEGREE CELSIUS. THE SUBROUTINE WILL ROUND 54C00540
C THE VALUE ANDRETURNTHECORRECTED VALUE. 54C00550
C 54C00560
VCFC I S THE
RETURNED VOLUME CORRECTION FACTOR 54C00570
C
CORRECTTO F I V E ( 5 )S I G N I F I C A N T FIGURES. 54C00580
C
C 54C00590
C VCFP I S THE
RETURNED VOLUME CORRECTION FACTOR 54C00600
C CORRECTTO FOUR(4)DECIMAL DIGITS. 54C0061 O
C 54C00620
C I F L A G I S THE ROUNDED STATUS CODE WHICH SHOULD 54C00630
C BE CHECKED BY THEUSER I N THE CALLING PROGRAM 54C00640
C =O NO ERROR 54C00650
C -1 INPUT DATA W I T H I N EXTRAPOLATION RANGES AS 54C00660
GIVEN I N A P I 2 5 4 0 , TABLE 5 4 , 1 1 . 1 . 5 4 54C00670
C
C = - 1I N P U T DATA OUTSIDESPECIFIED RANGE OF 54C00680

|||| |||---
C APPLICATION AS GIVEN I N A P I 2 5 4 0 54C00690
TABLE 5 4 , l l . 1 . 5 4 54C00700
C
54C0071 O

|
C

|||| |||| || || |
DATA IEP1,IEP2,IEP3/12000,9000,6000/ 54C00720
DATA N B P l , N B P 2 / 4 8 6 0 , 1 6 7 4 0 / 54C00730
DATA I B P l , I B P 2 / 9 1 8 0 , 9 5 4 0 / 54C00740

|||| |||| | | ||
DATA ITMP1 , I T M P 2 , I T M P 3 / 1 5 0 0 0 , 1 2 5 0 0 , 9 5 O O / 54C00750
DATA I B A S / 1 5 0 0 1 54C00760
DATA I B T l / 18 0 0 1 - 54C00770
|

VCFC=- 1 . O 54C00780 |
| | |

VCFP=-l . O 54C00790
--

IFLAG= - 1 54C00800
54C0081 O
C
ROUND INPUT VALUES 54C00820
C
54C00830
C
ITEMP=DEGC*lOOO. 54C00840
IF(ITEMP.GT.O)ITEMP=ITEMP+25 54C00850
IF(ITEMP.LT.O)ITEMP=ITEMP-25 54C00860
ITEMP=ITEMP/50*5 54C00870
DEGC=FLOAT(ITEMP)/lOO. 54C00880
IALF=(ALF15*10000000.0+5.0)/10.0 54C00890
IALF=IALF*l O 54C00900
ALFl5=FLOAT(IALF)/1OOOOOOO.O 54C0091 O
54CO0920
C
CHECK ALPHA RANGES 54C00930
C
54C00940
C
) l o , 20,2O
IF( IALF-NBP1 54C00950

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API MPMS*11-1 VOLrX 80 m 0732290 0 5 2 b 2 6 2 912 m

SECTIONV VOLUME CORRECTION


FACTORS x-397

ip/ CONV~NUE 54C00960


' KTURN 54C00970
20 I F ( I A L F - N B P 2 ) 3 0 1 3 0O, l 54C00980
5 O CONT INUE 54C00990
C 54C01 O00
C CHECK V A L I D TEMPERATURE
RANGES 54C01 O1 O
C 54C01020
IF(ITEMP-IBTl)40,50,50 54C01030
40CONTINUE 54C01040
RETURN 54C01050
50 I F ( 1 A L F - I B P l ) 6 0 , 6 0 . 7 0 54C01060
60 IF(ITEMP-ITMPl)lOO,l00,40 54C01070
70 I F ( I A L F - I B P 2 ) 8 0 , 8 0 , 9 0 54C01080
8 0 IF(ITEMP-ITMP2)lOO,l00,40 54C01 O90
90 IF(ITEMP-ITMP3)100,100,40 54C011 O0
1O0 CONTINUE 54C0111 O
IIALF=IALF 54C01120
IDT=ITEMP-IBAS 54C01130
C 54C01140
C CALCULATE VCF 54C01150
C 54C01160
CALL V C F 5 4 C ( I I A L F , I D T , I V C F ) 54C01170
IFLAG=O 54C01180
C 54C01190
C CHECK TO DETERMINE I FI N EXTRAPOLATED REGION 54C01200
C 54C0121 O
I F ( 1 A L F - I B P l ) 1 0 1 ,1 0 1 , 1 1 0 54C01220
101 IF(ITEMP-IEP1)140 140,105 54C01230
105IFLAG=l 54C01240
GO TO 1 4 0 54C01250
1 1 0I F ( I A L F - I B P 2 ) 1 2 0 , 12 0 , 1 3 0 54C01260
1 2 0I F ( I T E M P - I E P 2 ) 1 4 0 140,105 54C01270
130 IF( ITEMP-IEP3)140 140,105 54C01280
140 CONTINUE 54C01290
C 54C01300
C CALCULATE PRINT AND CALCULATION VALUES OF VCF 54C0131 O
PRINT
C VALUE (PVCF) ROUNDED TO 4 DECIMAL D I G I T S 54C01320
CALCULATION
C VALUE (CVCF) ROUNDEDTO SIGNIFICANT
5 DIGITS 54C01330
C 54C01340
JVCF=(IVCF/1000+5)/10 54C01350
PVCF=JVCF 54C01360
PVCF=PVCF/lOOOO . 54C01370
1F(1VCF-100000000)150,160,160 54C01380
150 CONTINUE 54C01390
C 54C01400
C VCF LESS THAN ONE, F I V E DECIMALS RETURNED 54C014 1O
C 54C01420
JVCF=(IVCF/100+5)/10 54C01430
CVCF=JVCF 54C01440
CVCF=CVCF/lOOOOO. 54C01450
GO TO 1 8 0 54C01460
1 6 0 CONTINUE 54C01470
CVCF=PVCF 54C01480
1 8 0 CONTINUE 54C01490
VCFC=CVCF 54C01500
VCFP=PVCF 54C0151 O
RETURN 54C01520
END 54C01530

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API MPMS*LL.II VOL*X &O m 0732290 0526263 859

X-398 CHAPTER 11"PHYSICAL PROPERTIES DATA

SUBROUTINE V C F 5 4 C ( I A L F , I D T , I V C F ) 54C01540
C 54C01550
C T H I S MODULE I S DESIGNED TO CALCULATE VOLUME 54C01560
C CORRECTION FACTOR. ALTHOUGH ALL CALCULATIONS AREDONE 54C01570
C AS INTEGERS, THE SUBROUTINE RETURNS WITHA8 54C01580
C OR 9D I G I T VALUE DEPENDENT UPONWHETHER IDT 54C01590
C I S POSITIVE OR NEGATIVE. 54C01600
C 54C0161 O
C ALGORITHM- 54C01620
C VCF=EXP(-ALPHA*DT(l.O+O.8*ALPHA*DT)) 54C01630
C 54C01640
C CALCULATEALPHA*DT 54C01650
C 54C01660
ITERMl=IALF*IDT 54C01670
ITERM1 =ITERMl/ 1O 54C01680
C 54C01690
C CALCULATE 0 . 8 *ALPHA
*DT 54C01700
C 54C0171 O
ITERM2=ITERM1/5*4 54C01720
C 54C01730
C CALCULATE EXPONENT-ALPHA*DT(l.O+O.8*ALPHA*DT) 54C01740
C 54C01750
CALL MPYC(ITERMl,ITERM2,1TERM3) 54C01760
I X = - ( ITERMl +ITERM3) 54C01770
C 54C01780
C CALCULATEEXPONENTIAL(F1RST7 TERMS
OFPOWER SERIES) 54C01790
C 54C01800
ISUM1=1 O O O O O O O O + I X 54C0181 O
CALL M P Y C ( I X , I X , I S U M 2 ) 54C01820
ISUM2=ISUM2/2 54C01830
CALL M P Y C ( I X , I S U M 2 , I S U M 3 ) 54C01840
ISUM3=ISUM3/3 54C01850
CALLMPYC(IX,ISUM3,ISUM4) 54C01860
ISUM4=ISUM4/4 54C01870
CALLMPYC(IX,ISUM4,ISUM5) 54C01880
ISUMS=ISUM5/5 54C01890
CALLMPYC(IX,ISUM5,ISUM6) 54C01900
ISUM6=ISUM6/6 54C0191 O
IVCF=ISUM1+ISUM2+ISUM3+ISUM4+ISUM5+ISUM6 54C01920
RETURN 54C01930
END 54C01940

SUBROUTINE M P Y C ( I X , I Y , I Z ) 54C01950
C 54C01960
C T H I S MODULE
PERFORMS INTEGER MULTIPLICATION. THE TOTAL 54C01970
|||| |||---

C NUMBER OF D I G I T S I N I X AND I Y MUST


NOT EXCEED 1 7 . OTHER 54C01980
C WISE, OVERFLOW W I L L OCCUR. 54C01990
|
|||| |||| || || |

C 54C02000
IU1 = I X / 10000 54C0201 O
K1 = 1 0 0 0 0 * IU1 54C02020
|||| |||| | | ||

IV1 = I X - K1 54C02030
IU2 = I Y / 10000 54C02040
K2 = 1 0 0 0 0 * IU2 54C02050
-
|

IV2 = I Y K2 54C02060
|

+ +
| | |

K3 = I U 1 * IV2 IU2 * IV1 I V 1 * I V 2 / 10000 54C02070


I Z = (K3 + 5000) / 1 O000 +
IU1 * IU2 54C02080
--

RETURN 54002090
END 54C021 O0

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I M P M S * L L - L V O L X X 80 m 0732290 052b2b4 795 m

SECTION
1“VOLUME CORRECTION FACTORS x-399

11.1S4.9 IMPLEMENTATION PROCEDUREFOR SUBROUTINE TAB54C

I nt o d a y ’ sw o r l dt h e r ei s a r a p i d l yd e v e l o p i n gt r e n dt ou s ec o m p u t e r si n
c u s t o d yt r a n s f e r measurements, a c c o u n t i n g work, p r o c e s sc o n t r o l systems, and a
v a r i e t yo fo t h e ru s e s where t a b l e sm u s t be i n c o r p o r a t e d i n t o computer codes.
Y e t many o f t h e p r i n t e d t a b l e s a r e a l m o s t i m p o s s i b l e t o code due t o t h e f a c t
t h a t someone has s l i g h t l y m o d i f i e d s e l e c t e d v a l u e s t o d i f f e r f r o m t h o s e
obtainedusingthemathematicalexpressionthatsupposedlygeneratedthe
tables. To overcome t h i s problem i t i s o f t e n r e q u i r e d t o add e x t e n s i v e excep-
t i o nt a b l e st ot h e codes. T h i s makes t h e codes l a r g e and cumbersome t o modify,
and r e s t r i c t s t h e i r use t o l a r g e r computersystems. A l s ow i t ht h ed e v e l o p m e n t
o fb e t t e rm e a s u r i n gd e v i c e s i t isoftenpossibletogain more d i g i t s o f p r e c i -
s i o n i n t h et a b l ep a r a m e t e r s ,n e c e s s i t a t i n gf i n e rg r i do ft h et a b u l a rv a l u e s ,
r e s u l t i n gi nl a r g e r volumes o f p r i n t e d t a b l e s t o be handled.
Inaddition, as t h e o n - l i n e u s e o f computers f o rm e t e r i n gp u r p o s e s
i n c r e a s e s ,t h ed i r e c tu s eo fp r i n t e dt a b l e sw i l l decrease;therefore,the new
S t a n d a r di s an e x p l i c i ti m p l e m e n t a t i o np r o c e d u r er a t h e rt h a n a s e to f equa-
t i o n so r a s e to ft a b l e s . I t must be remembered t h a tt h es t a n d a r d i z a t i o no f
theimplementationprocedureimpliesstandardizationofthesetofmathemati-

|||| |||---
calexpressions used w i t h i nt h e code. Absoluteadherence t ot h ep r o c e d u r e

|
|||| |||| || || |
will h e l p t o i n s u r e t h a t a l l computers and computercodes o ft h ef u t u r e , meet-
i n gt h es p e c i f i c a t i o n s and r e s t r i c t i o n s , w i l l be a b l e t o producethe same

|||| |||| | | ||
results. I t i sb e l i e v e dt h a tt h i sp r o c e d u r ew i l la l l o wf o rt h e maximum
machine and codeindependence.The procedure was implemented i n computer sub-

|
|
r o u t i n e si s s u e d by API i n 1980 u s i n g ANSI/ASA
FORTRAN. The subroutinesmaxi-
m i z e dp r e c i s i o n by t h e use o f3 2 - b i ti n t e g e ra r i t h m e t i c . | | |
--

The p r o c e d u r e a s d e s c r i b e d i n t h e f o l l o w i n g t e x t can, by c a r e f u l and


d e l i b e r a t ea p p l i c a t i o no fn u m e r i c a la n a l y s i s , be used w i t h t h e m a j o r i t y o f
languages andword s i z e si np r e s e n to ra n t i c i p a t e d use. To usethestandard
procedure means t o m a i n t a i n a b s o l u t e and unwaveringadherence t o t h e number o f
digits specified at each s t e p and to t h e c a l c u l a t i o n p r o c e d u r e as o u t l i n e d .
I nt h ep r o c e d u r e ,t h en o m e n c l a t u r e used i s t h a t o f ASTM E380-76, unless
an e x p l i c i t p r o c e d u r e i s g i v e n below, i n whichcasetheproceduregivenbelow
overridesthatgiven by ASTM E380-76.
I nt h ep r o c e d u r et h en o m e n c l a t u r e (XXX.XX) means f i v e ( 5 ) m a t h e m a t i c a l l y
significant digits.

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API MPMS*LL.L VOLXX AO m 0732290 0 5 2 b 2 b 5 b2L W

X-400 CHAPTER
1 PHYSICAL PR~PERTIES
DATA

The t e r mr o u n d i n ga s used i nt h ep r o c e d u r e means: C o n s i d e ro n l yt h e


first digit to the right of the desired position and
a. I f t h a td i g i ti sg r e a t e rt h a n 4, i n c r e m e n tt h ed e s i r e dp o s i t i o n by
one and d r o p t h e r e m a i n i n g d i g i t s t o t h e r i g h t of t h e d e s i r e d p o s i -
tion.
b. I f thatdigitis less than 5, s i m p l yd r o pt h er e m a i n i n gd i g i t st o
theright: of t h e d e s i r e d p o s i t i o n .

-
All c o n s t a n t s a r e used t o e x a c t l y t h e number o f d i g i t s p r i n t e d .

CalculationProcedure

STEP 1 : Round i n p u tv a r i a b l e so fc o e f f i c i e n t of thermalexpansion (ALFIS) and


observedtemperature
a. Round c o e f f i c i e n t of thermalexpansion t ot h en e a r e s t
.O000010 and c a r r y a s 6 digit result
i .e. ALF15 = .OOOXXX
b. Round observedtemperature t o t h en e a r e s t
0.05OC and c a r r y a s 5 d i g i t r e s u I t
¡.e. observed
temperature (DEGC) = XXX.XX

STEP 2: Calculate A t
define A t = DEGC - TBASE
Note: TBASE c a r r i e d t o 4 d i g i t s XX.XX (15.00)
Carry A t = XXX.XX

STEP 3: C a l c u l a t i o no f VCF
def¡ne VCF = EXP[-aAt(l.O + 0.8aAt)l
EXP[-a A t - 0.8 a2 A t 2 ]
a.Ca I cu l a t i on of exponent
a(l) a A t = .XXXXXXXX
a ( 2 .)8 a A t = .XXXXXXXX
a(3) .8 a2 A t 2 = .XXxxxxxx rounded t o n e a r e s t .O0000001
a ( 4 )- a A t - 0.8 a 2 A t 2 = 0.XXXXXXXX w i t h any t r a i l i n g
d i g i t s dropped

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API MPMS+LL.L VOLXX AO 0732290 0 5 2 6 2 b b Sb8 m

SECTON1-VOLUME
FACTORS
CORRECTION x-401

b. C a l c u l a t i o noef x p o n e n t i a l
VCF = E X P l - a A t - 0.8 a 2 A t 2 ] = X.XXXXXX
using at least the first 7 t e r m so ft h e power s e r i esexpans on
o f ex

Computational
v a l u e of VCF
-c
- 1.XXXX

0.XXXXX
rounded t o n e a r e s t 0.0 O01 i f

rounded t o n e a r e s t 0.00001
vc
i f VCF < 1
-> 1

|||| |||---
T a b l ev a l u e
o f VCF = X.XXXX rounded VCF t o n e a r e s t 0.0001

|
|||| |||| || || |
The 1980 i n t e g e r FORTRAN code issued by API contained an i n t e g e rm u l t i -

|||| |||| | | ||
p l i c a t i o na l g o r i t h m . A d e s c r i p t i o ni sc o n t a i n e di nt h ef o l l o w i n g :

|
|
| | |
INTEGER MULTIPLICATION PROCEDURE
(FOR 32 BIT ARITHMETIC)

--
DATA DEFINITION
X, Y a r ei n t e g e r numbers t h a t a r e equal t o or l e s st h a n 2 * lo9
( s l i g h t l yl e s st h a n z3b. A l a r g e rv a l u e may c a u s eo v e r f l o w I. na d d i t i o n ,
thetotal number o f d i g i t s i n X and Y must n o t exceed 17, o t h e r w i s eo v e r f l o w
w i l l occur.
Z itsh pe r o d u c t XY scaled by
¡.e. Z = XY/108.
Note: I f i t i sd e s i r a b l et oo b t a i n maximum p r e c i s i o n , X and Y may be
s c a l e d up p r i o r t o u s eo ft h ep r o c e d u r e .T y p i c a l l y ,a tl e a s t 15 d i y i t s a r e
needed t o o b t a i n 6 d i g i tp r e c i s i o n , 16 for 7and 17 f o r 8.
The l a r g e s t v a l u e s o f X and Y t h a t may be used a r e 2 O00 O00 O00 and
99 999 999. ( E i t h e rv a l u e s may beused f o r X and Y ) .
CALCULATION
x/10000 = u1
10000 U1 = K1
X - Kt = V1
Y/1 O000 = u2
10000 U2 = K2
Y - K2 = V2
(U1V2) + (U2V1) + (V1V2/10000) = K3
(K3 + 5000)/10000 + (UIU2) = Z

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
x42 CHAPTER1 PHYSICAL PROPERTIES
DATA

|||| |||---
Note: Z has been scaled by and may have t o be rescal ed b e f o r e use.
TOTAL DIGITS IN X AND
15 Y14 13 12 16 17

|
|||| |||| || || |
" " "

DIGITS I N PRODUCT, Z 3-4 4-5


5-6
6-7 7-8 8-9

|||| |||| | | ||
Examp Ies For Checkout

|
|
| | |
--
The f o l l o w i n g examples a r e d e s i g n e d t o a i d i nc h e c k o u tp r o c e d u r e sf o r
b o t ht h ee x i s t i n g A P I s u b r o u t i n e andany subroutineswhicharedevelopedusing
t h ei m p l e m e n t a t i o np r o c e d u r eo u t l i n e d above.The l i n e so ft h e examples a r e
numbered t o correspond t o t h e c o r r e s p o n d i n g l i n e s w i t h i n t h e c a l c u l a t i o n p r o -
cedure.

EXAMPLE 1: Assume a l i q u i dp e t r o l e u mp r o d u c tw i t h a c o e f f i c i e n to ft h e r m a l
e x p a n s i o nc o r r e c t e d t o 15 "C of 0.0007526andan observedtemper-
ature of 40.73 OC. Cal c u l a t e t h e VCF r e q u i r e d t o c o r r e c t t h e
volume t o 15 "C, c o r r e c t t o 4 decimal d i g i t s .

STEP 1: a. rounded ALF15 = 0.000753


b. rounded DEGC = 40.75

STEP 2: A t = 25.75

STEP 3: C a l c u l a t i o no e
f xponential
a. C a l c u l a t i o n of exponent
a( 1) 0.01938975
a(2) 0.01551
180
a(3) 0.00030076
a(4) -0.01969051
b. C a l c u l a t i o noef x p o n e n t i a l
VCF = 0.980502

VCF c o r r e c t t o 4 decimal d i g i t s = 0.9805

EXAMPLE 2: Assume a l i q u i dp e t r o l e u mp r o d u c tw i t h an i n p u t c o e f f i c i e n t of
thermalexpansioncorrected t o 15 "C o f 0.0010120andan observed

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
SECTIONV VOLUME CORRECTION
FACTORS x-403

t e m p e r a t u r eo f 4.0 "C. C a l c u l a t et h e VCF r e q u i r e d t o c o r r e c t t h e


volume t o 15 OC, c o r r e c t t o 5 significantfigures.

STEP 1: a. rounded ALF15 = 0.001012


b. rounded DEGC = 4.00

STEP 2: A t = - 1 1.00

S'TEP 3 : C a l c u l a t i o n of e x p o n e n t i a l
a. C a l c u l a t i o noef x p o n e n t
a(1) -0.01113200
a(í!) -0.00890560
a(3) 0.00009913
a(4) 0.01 103287
b. C a l c u l a t i o n of exponential
VCF = 1.011093

VCF c o r r e c t t o 5 s i g n i f i c a n t f i g u r e s 1.0111

EXAMPLE 3: Assume a l i q u i dp e t r o l e u mp r o d u c tw i t h an i n p u t c o e f f i c i e n t o f
thermalexpansioncorrected t o 15 " C o f 0.0006039andan observed
t e m p e r a t u r eo f 131.75 "C. C a l c u l a t et h e VCF r e q u i r e d t o c o r r e c t
t h e volume to 15 OC, c o r r e c t t o 5 significantfigures.

STEP 1 : a. rounded
ALFl5 = 0.000604
b. rounded DEGC = 131.75

STEP 2 : A t = 116.75

STEP 3: C a l c u l a t i o no fe x p o n e n t i a l
a. C a l c u l a t i o noef x p o n e n t
a( 1 ) 0.07051700
a(2) 0.05641360

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API MPMS*LL-L V O L X X 80 W 0732290 052b2bq 2 7 7 m

X-404 CHAPTER DATA


1 PHYSICAL PROPERTIES

a(3) 0.0039781 1
a(4) -0.07449511
b. C a l c u l a t i o noef x p o n e n t i a l
VCF = .928212

VCF c o r r e c t t o 5 s i g n i f i c a n t f i g u r e s = 0.92821
--
| | |
|
|
|||| |||| | | ||
|||| |||| || || |
|
|||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
API MPMS*IL-I V O L W X 80 D 0732290 052b270

Order No. 852-27145

-- | | | | | |||| |||| | | || |||| |||| || || | | |||| |||---

COPYRIGHT 2002; American Petroleum Institute Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.
A P I MPMS*:LL-Z V O L * X BO 0732290 0526273 725 m

--
| | |
|
|
|||| |||| | | ||
|||| |||| || || |
|
|||| |||---

American Petroleum Institute


2101 L Street, Northwest
Washington, D.C.20037

COPYRIGHT 2002; American Petroleum Institute


11)
Document provided by IHS Licensee=Shell Services International B.V./5924979112,
User=, 12/03/2002 23:47:19 MST Questions or comments about this message: please
call the Document Policy Management Group at 1-800-451-1584.

You might also like