Você está na página 1de 218

Compressibility Factors

of Natural Gas
and Other Related

Hydrocarbon Gases
by
K.E. Starling and .J.L. Savidge

Aci'A
Transmission Measurement Committee Report No. 8

American Petroleum Institute MPMS Chapter 14.2

~r-I
Gas Research Institute

A.G~ American Gas Association

Catalog No. XQ9212

Second Edition, November 1992


2nd Printing July 1994
3rd Printing, November 2003
Property of PT. NISCONI
Property of PT. NISCONI
REPORT NO.8 SOFfWARE

The methods presented in ReportNo. 8 have been incorporated into efficient computer
code and software, catalog # XQ9222, 1994. Both the executable an the FORTRAN 77
code can be purchased from AGA on diskette. The easy-to-use program provides tabular
output of compressibility, supercompressibility and density for applications on PC's, flow
computers and mainframes.

System specifications:

Language: FORTRAN 77
Requirements: IBM Compatible PC (Minimum SI2KB RAM)
Compiler: Microsoft 5.0 (Adaptable for other compilers)

The purchasing company is granted unlimited use of the program and subroutines within
the purchasing company. The purchasing company can incorporate subroutines provided
on this diskette into executable programs for sale, but cannot sell source code provided
on this diskette.

To order a program diskette, complete the information below and mail to:

ILl Infodisk, Inc.


610 Winters Avenue
Paramus, NJ 07652
Toll Free: 866 819 9444
Fax: 201 986 7886
Outside the US: 201 986 1131
Email: sales@ili-info.com
Web: www.aga.org/catalog

. Name:
------------------------------------------------------------
Title:-------------------------------------------------------------

Company: _________________________________________________________

Address: ----------------------------------------------------------

City, State, Zip: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ___

Country: _________________________________________________________

Phone: Fax:
--------------------------- -----------------------------

Property of PT. NISCONI


Disclaimers and Copyright

Nothing contained in this publication is to be construed as granting any right, by implication or


otherwise, for the manufacture, sale, or use in connection with any method, apparatus, or product
covered by letters patent, or as insuring anyone against liability for infringement of letters patent.
The American Gas Association's Transmission Measurement Committee developed this
publication as a service to the natural gas industry and to the public. Use of this publication is
voluntary and should be taken after an independent review of the applicable facts and
circumstances.
Efforts have been made to ensure the accuracy and reliability of the data contained in this
publication; however, the American Gas Association (AGA) makes no representation, warranty,
or guarantee in connection with this publication and hereby expressly disclaims any liability or
responsibility for loss or damage resulting from its use or from the use of any product or
methodology described herein; for any violation of any federal, state, or municipal regulation
with which this publication may conflict; or for the infringement of any patent from the use of this
publication. Nothing contained in this publication should be viewed as an endorsement by A GA
ofany particular manufacturer's products.
Permission is granted to republish material herein in laws or ordinances, and in regulations,
administrative orders, or similar documents issued by public authorities. Those desiring
permission for other publications should consult the Operating and Engineering Section,
American Gas Association, 400 North Capitol Street, NW, 4th Floor, Washington, DC 20001,
USA.

Copyright 1992,1994 and 2003 American Gas Association, All Rights Reserved.

ii

Property of PT. NISCONI


PREFACE

This manual is based on research managed and sponsored by the Gas Research
Institute (GRI) and the Groupe Europeen de Recherches Gazieres (GERG) in cooperation with
A.G.A. The manual provides all of the technical information needed to compute compressibility
factors, supercompressibility factors, and densities for natural gas and related gases. It
supersedes the 1985 Version of A.G.A. Report Number 8 and conforms to International
Standards Organization Document ISO 12213, Natural Gas - Calculation of Compression
Factors. This A.G.A. document includes FORTRAN computer programs and sample
calculations which are optimized for efficient microprocessor and flow computer
implementation. Supporting computer programs based on the methods in this manual can be
obtained on diskette from the A.G.A.

This manual was updated in July 1994 for the purpose of: (1) correcting typographical
errors identified in the November 1992 edition, (2) imprOving the computer programs, and (3)
achieving computational consistency with GPA 2172-94 and the 1992 edition of A.G.A. Report
No.3, Part 3. No changes were made to the basic equations of state, or to the parameters
used to calculate the compressibility factor. Properties calculated from this document will be
slightly different from the November 1992 version. The differences in the exampie calculations
are caused by changes in the way the gas characterization parameters are obtained from input
data. These changes help assure a high Jevel of numerical conSistency with other industry
standards for flow computer computations. The effects of these changes, however, are
expected to be less than 0.01 % for typical natural gas found in transmission pipelines and Jess
than 0.03% for typical production gas. This is well within the uncertainty of the experimental
data. Therefore no change is required from the November 1992 revision to maintain the stated
accuracy.

iii

Property of PT. NISCONI


ACKNOWLEDGEMENTS

This document is the result of many years of effort. It is based on a large amount of
related supporting materials which are the product of many dedicated individuals and
organizations both domestically and internationally. The individuals and organizations listed
below deserve the recognition and thanks of the gas industry for their significant contributions
of time, skills and resources.

Foremost among the contributors are Mr. P. Hoglund of Washington Natural Gas and
Dr. M. Jaeschke of Ruhrgas AG. Mr. Hoglund led A.G.A in organizing and articulating the
benefits of the R&D program. In addition, he actively promoted international cooperation which
initiated A.G.A.'s participation in the International Standards Organization Technical Committee
193/Subcommittee 1. Paul's vision and efforts led to pivotal research interactions that
substantially improved the quality of the methods presented in this document.

Dr. Jaeschke's research at Ruhrgas AG made an invaluable contribution to improving


compressibility factor prediction through his extensive experimental work on the PVT behavior
of natural gases. His initial efforts were in support of GERG virial equation of state research
with Dr. J. Schouten. The experimental work was later expanded to help support needs
identified at Ruhrgas and in the GRI wide-range equation of state research with Dr. K. Starling
and Dr. R. Jacobsen. Dr. Jaeschke's efforts, and those of his coworkers, produced over ten
thousand state-of-the-art measurements of the compressibility factor for a wide variety of
natural gases, their constituents, and related mixtures. Their data are the predominant
experimental basis for the high accuracy equations of state presented in this report.

GRI, AG.A, and GERG contributed their financial, committee, and technical
management. Gasunie, Ruhrgas, Gaz de France, and British Gas contributed to the
development of the experimental compressibility factor database and the GERG research
program which produced the GERG method. Individual contributions were made by Mr. J.
Erickson and Ms. Lori Traweek of AG.A through their active support and patience and Dr.
A Smit (Gasunie) through his leadership as chairman of ISO TC 193/SC 1. Mr. J.P. Smith
(Transco), Mr. M.L. Williams (Amoco), Mr. G. Givens (Consolidated Natural Gas) contributed
through their leadership, advice, and participation as industry liaisons through the AG.A Fpv
Committees. Dr. D. Embry (Phillips Petroleum), Mr. J. Stuart (Pacific Gas & Electric), Mr. P.
LaNasa (private consultant), Dr. R. Teyssandier (Texaco) and Mr. R. Beaty (Amoco)
contributed by providing valuable industry feedback during the preparation process of this
report and provided ideas for the computer programs.

Lastly, the contributions made by the researchers, many students and support staff at
the University of Oklahoma, University of Amsterdam, University of Idaho, Texas A&M, and
National Institute of Standards and Technology are best represented by the exceptional quality
of the results produced for the gas industry. Dr. K.E. Starling's, U. of Oklahoma, contribution
helped to produce not only an exceptional equation of state (DETAIL CHARACTERIZATION
METHOD) for natural gases, but significantly improved this document in ways which should
facilitate its understanding and practical use. Dr. R. Jacobsen and coworkers at the University
of Idaho provided an exceptional correlation development methodology and set of tools that
helped substantially in developing the DETAIL CHARACTERIZATION METHOD. Dr. J.

iv

Property of PT. NISCONI


Schouten and Dr. J. Michels of the U. of Amsterdam contributed creative research which
produced the SGERG equation of state (GROSS CHARACTERIZATION METHOD). Dr. C.
Fitz, U. of Oklahoma, and Mr. P. Clarke, U. of Idaho, contributed great personal effort to
produce the DETAIL CHARACTERIZATION METHOD. Dr. K. Hall, Dr. J. Holste, Texas A&M
U., and Dr.. M. Haynes, N.I.S.T., contributed their skills to develop a state-of-the-art PVT
RefEnence Database on natural gas mixtures. Dr. S. Beyerlein and Mr. E. Lemmon, U. of
Idaho, made a number of significant technical contributions which improved both the quality
of the-final results of the research project and this A.G.A. report.

Dr. Jeffrey L. Savidge


Project Manager

Property of PT. NISCONI


Property of PT. NISCONI
TABLE OF CONTENTS

1 INTRODUCnON ................................................ 1

1.1 Scope. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 1
1.2 Background ....................... ~ . . . . . . . . . . . . . . . . . . . . .. 1
1.3 Field of Application ................................. .. . . . . .. 2
1.3.1 Types of Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 2
1.3.2 Types of Gases ..................................... 2
1.3.3 Types of Conditions .................................. 3
1.4 Overview of Compressibility Factor Calculation Methods ........... 4
1.4.1 DETAIL CHARACTERIZATION METHOD ......... . . . . . . . .. 5
1.42 GROSS CHARACTERIZATION METHOD . . . . . . . . . . . . . . . . .. 5
1.5 Uncertainty . . . . . . . . . . . . . . ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 6
1.5.1 DETAIL CHARACTERIZATION METHOD Uncertainty . . . . . . . . .. 7
1.5.2 GROSS CHARACTERIZATION METHOD Uncertainty ......... 7
1.6 Recommendations ......................................... 7

2 SyMBOLS..................................................... 7

3 DEFINlnONS .................................................. 8

4 GENERAL EQUATIONS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 8

5 NATURAL GAS CHARACTERIZATION METHODS .................... 10

6 REFERENCE CONDITIONS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 11

6.1 Mass Density at Contract Reference Conditions . . . . . . . . . . . . . . . . .. 11


6.2 Supercompressibility Factor Reference Condition ................ 11
6.3 Relative Density Reference Condition . . . . . . . . . . . . . . . . . . . . . . . . .. 12
6.4 Heating Value Reference Conditions . . . . . . . . . . . . . . . . . . . . . . . . . .. 12

7 UNITS, CONVERSIONS, PRECISION AND ACCURACY . . . . . . . . . . . . . . .. 13

8 EQUATIONS FOR COMPRESSIBIUTY FACTORS. . . . . . . . . . . . . . . . . . . .. 15

8.1 DETAIL CHARACTERIZATION METHOD Equation of State . . . . . . . . . .. 15


8.1.1 Nomenclature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 15
8.12 DETAIL CHARACTERIZATION METHOD Equation of State for
Compressibility Factor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 16
8.1.3 DETAIL CHARACTERIZATION METHOD Equation of State for
Pressure ......................................... 21
8.2 GROSS CHARACTERIZATION METHOD Equation of State ........... 27
8.2.1 Nomenclature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 27
8.2.2 GROSS CHARACTERIZATION METHOD Equation of State for
Compressibility Factor. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 28

vii

Property of PT. NISCONI


8.2.3 Interaction Vi rial Coefficient Terms for Nitrogen and Carbon
Dioxide .......................................... 30
8.2.4 Interaction Vi rial Coefficient Terms for the Equivalent
Hydrocarbon, CH ................................... 31

9 PROCEDURES FOR COMPUTATIONS OF COMPRESSIBILITY


FACTORS .............................. ;....... . . . . . . . . . . . .. 33

10 COMPUTER PROGRAMS FOR COMPUTATIONS OF


COMPRESSIBILITY FACTORS, SUPERCOMPRESSIBILITY
FACTORS, AND DENSITIES ........... . . . . . . . . . . . . . . . . . . . . . . .. 33

10.1 Documentation for Computer Programs ........................ 34


10.2 Computer Program Code Listings ............................ 34

11 TABLES OF COMPUTED COMPRESSIBILITY FACTORS AND


SUPERCOMPRESSIBILITY FACTORS . . . . . . . . . . . . . . . . . . . . . . . . . .. 34

12 UNCERTAINTIES IN COMPUTED COMPRESSIBILITY FACTORS AND


SUPERCOMPRESSIBILITY FACTORS . . . . . . . . . . . . . . . . . . . . . . . . . .. 34

APPENDIX A - DETAIL CHARACTERIZATION METHOD ................. 35

APPENDIX A.1 - NOMENCLATURE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 37


APPENDIX A.2 - DETAIL CHARACTERIZATION METHOD COMPUTATION
PROCEDURES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 38
A.2.1 Computations of Compressibility Factors and Densities . . . . . . . .. 38
A.2.2 Computations of Other Quantities ........................ 38
APPENDIX A.3 - DETAIL CHARACTERIZATION METHOD COMPUTER
PROGRAM DOCUMENTATION ...... " ...................... 40
A.3.1 Scope ............................................ 40
A.3.2 Summary Flow Diagram ............................... 40
A.3.3 Driver Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 40
A.3.4 Component Dependent Quantities Block ................... 42
A.3.5 Composition Dependent Quantities Block . . . . . . . . . . . . . . . . . .. 42
A.3.6 Temperature Dependent Quantities Block .................. 42
A.3.7 Density Dependent Quantities Block ................ : ..... 42
A.3.8 Descriptions of Functions and Subroutines .................. 43
A.3.8.1 BLOCK DATA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 43
A3.8.2 Subroutine PARAMDL . . . . . . . . . . . . . . . . . . . . . . . . .. 43
A.3.8.3 Subroutine CHARDL '" ....................... , 43
A3.8.4 Subroutine B . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 44
A3.8.5 Subroutine TEMP ............................. 44
A3.8.6 Function Subprogram DDETAIL . . . . . . . . . . . . . . . . . .. 44
A3.a. 7 Subroutine BRAKET ........................... 45
A3.8.8 Function Subprogram PDETAIL . . . . . . . . . . . . . . . . . .. 45
A3.8.9 Function Subprogram ZDETAIL ................... 46
A.3.9 Example Calculations ................................. 46

viii

Property of PT. NISCONI


APPENDIX A.4 - DETAIL CHARACTERIZATION METHOD FORTRAN
CODE USTING ......................................... 49
FUNCTION DDETAIL .................................... 50
FUNCTION PDETAIL ..................................... 54
FUNCTION ZDETAIL ..................................... 55
SUBROUTINE B . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 57
SUBROUTINE BRAKET .................................. 58
SUBROUTINE CHARDL .................................. 61
SUBROUTINE PARAMDL ............... . . . . . . . . . . . . . . . . . .. 65
SUBROUTINE TEMP ..................................... 67
BLOCK DATA ........................................... 69
APPENDIX A.S - DETAIL CHARACTERIZATION METHOD COMPUTER
PROGRAM CALCULATIONS ............................... 74
APPENDIX A.6 - DETAIL CHARACTERIZATION METHOD CALCULATION
UNCERTAINTIES ........................................ 76
A.6.1 Uncertainties in the DETAIL CHARACTERIZATION METHOD
Computed Compressibility Factors. . . . . . . . . . . . . . . . . . . . . .. 76
A.6.2 Uncertainties in DETAIL CHARACTERIZATION METHOD
Computed Supercompressibility Factors . . . . . . . . . . . . . . . . .. 78
APPENDIX A.7 - DETAIL CHARACTERIZATION METHOD REFERENCES . .. 79

APPENDIX 8 - GROSS CHARACTERIZATION METHOD ................. 81

APPENDIX B.1 - NOMENCLATURE ................................ 83


APPENDIX B.2 - GROSS CHARACTERIZATION METHOD COMPUTATION
PROCEDURES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 84
B.2.1 Determination of the Molar Gross Heating Value of the
Equivalent Hydrocarbon (HCH) .......................... 84
B.2.2 METHOD 1. Input Parameters: Volumetric Gross Heating
Value, Relative Density, Mole Fraction CO2 84
B.2.3 METHOD 2. Input Parameters: Relative Density, Mole Fractions
of N2 and CO2 . . . 87
B.2.4 SGERG Method Equation of State for Pressure .............. 90
APPENDIX B.3 - GROSS CHARACTERIZATION METHOD COMPUTATION
PROCEDURES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 92
B.3.1 Computations of Compressibility Factors .................... 92
B.3.2 Computations of Other Quantities ........................ 92
APPENDIX B.4 - GROSS CHARACTERIZATION METHOD COMPUTER
PROGRAM DOCUMENTATION . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 93
B.4.1 Scope ............................................. 93
B.4.2 Summary Flow Diagram ............................... 93
8.4.3 Driver Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 93
B.4.4 Component Dependent Quantities Block ................... 93
B.4.5 Characterization Dependent Quantities Block . . . . . . . . . . . . . . .. 95
B.4.6 Temperature Dependent Quantities Block .................. 95
B.4.7 Density Dependent Quantities Block ...................... 95
B.4.8 Descriptions of Functions and Subroutines. . . . . . . . . . . . . . . . .. 95
B.4.8.1 Subroutine CHARGS .......................... 95
B.4.8.2 Function DGROSS ............................ 96

ix

Property of PT. NISCONI


B.4.8.3 Subroutine PARAMGS ......................... 96
B.4.8.4 Function PGROSS ............................ 96
B.4.8.5 Subroutine VIRGS . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 96
B.4.8.6 Function ZGROSS ............................ 96
B.4.9 Example Calculations ................................. 96
APPENDIX B.S - GROSS CHARACTERIZATION METHOD FORTRAN
CODE LISTING (GROSSXZ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 103
FUNCTION DGROSS .................................... 104
FUNCTION PGROSS .................................... 106
FUNCTION ZGROSS .................................... 107
SUBROUTINE CHARGS .................................. 108
SUBROUTINE PARAMGS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 112
SUBROUTINE VIRGS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 114
APPENDIX B.6 - GROSS CHARACTERIZATION METHOD COMPUTER
PROGRAM CALCULATIONS .............................. 116
APPENDIX B.7 - GROSS CHARACTERIZATION METHOD CALCULATION
UNCERTAINTIES .............................. . . . . . . . .. 120
B.7.1 Uncertainties in Computed Compressibility Factors. . . . . . . . . .. 120
B.7.2 Uncertainties in Computed Supercompressibility Factors. . . . . .. 122
APPENDIX B.8 - GROSS CHARACTERIZATION METHOD REFERENCES .. 123

APPENDIX C - REFERENCE CONDITIONS AND CONVERSIONS FOR


HEATING VALUE AND RELATIVE DENSITY ..................... 125

APPENDIX C.1 - NOMENCLATURE ............................... 127


APPENDIX C.2 - DISCUSSION OF REFERENCE AND STANDARD
CONDmONS .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 129
APPENDIX C.3 - DENSITY, COMPRESSIBILITY FACTOR AND
SUPERCOMPRESSIBILITY FACTOR ........................ 130
C.3.1 Mass Density at Contract Reference Conditions . . . . . . . . . . . .. 132
C.3.2 Supercompressibility Factor Reference Condition ...... .. . . . .. 132
C.3.3 Relative Density Reference Condition .................... 133
APPENDIX C.4 - MOLAR HEATING VALUE FROM COMPOSITION ... . . .. 135
APPENDIX C.S - VOLUMETRIC HEATING VALUE .................... 142
APPENDIX C.6 - REFERENCES ................................. 143

APPENDIX D - UNIT CONVERSIONS ................................ 145

APPENDIX 0.1 - UNIT CONVERSION PROGRAM DOCUMENTATION ..... 147


APPENDIX 0.2 - UNIT CONVERSION PROGRAM FORTRAN SOURCE
CODE ................................................ 151
APPENDIX 0.3 - REFERENCES ................................. 156

Property of PT. NISCONI


APPENDIX E - UTILITY PROGRAM (AGA8PROG) . . . . . . . . . . . . . . . . . . . . .. 157

APPENDIX E.1 - UTILITY PROGRAM DOCUMENTATION .............. 159


APPENDIX E.2 - UTIUTY PROGRAM FORTRAN SOURCE CODE LISTING . 164
PROGRAM AGA8PROG ................................. 165
SUBROUTINE COM PST .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 168
SUBROUTINE CONFIG ......................... , . . . . . . . .. 169
SUBROUTINE INPUT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 172
SUBROUTINE METHOD .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 173
SUBROUTINE OUTPUT .................................. 179
SUBROUTINE PROPS ................................... 180
SUBROUTINE SETUP ................................... 181
SUBROUTINE STATUS .................................. 183
SUBROUTINE TABLES. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 186
SUBROUTINE TABLES2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 190
SUBROUTINE STATUS2 .................................. 194
SUBROUTINE UNITSG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 196
FUNCTION DCALC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 199
FUNCTION PCALC ............................ ~ . . . . . . . .. 200
FUNCTION ZCALC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 201

INDEX 203

xi

Property of PT. NISCONI


1

COMPRESSIBILITY FACTORS FOR NATURAL GAS


AND OTHER RELATED HYDROCARBON GASES

1 INTRODUCTION

1.1 Scope

This report presents detailed information for precise computations of compressibility


factors and densities of natural gas and other hydrocarbon gases, calculation uncertainty
estimations and FORTRAN computer program listings. Applications for computations of other
properties are summarized but are beyond the scope of this report.

1.2 Background

Research in 1928 and 1929 under the direction of Mr. Howard S. Bean of the National
Bureau of Standards provided the natural gas industry with its initial compressibility factor data
covering pressures up to 600 psia (4 MPa). However, it was not until 1954 that extensive
tables of natural gas supercompressibility factors were published, based on tests supervised
by Professor Samuel R. Beitler of Ohio State University. The natural gas supercompressibility
factor tables were extended and an equation of state was developed in 1956-1962 under the
direction of Mr. R. H. Zimmerman of Ohio State University. The results of this project,
designated PAR Project NX-19, appear in A.G.A.'s -Manual for Determination of
Supercompressibility Factors for Natural Gas: published in 1962.

The research leading to the present report was initiated in 1981 under the sponsorship
of GRI in close liaison with the A.G.A. Transmission Measurement Committee. This research,
carried out under the direction of Professor Kenneth E. Starling of the University of Oklahoma,
was aimed at extending capabilities for accurate computation of compressibility factors beyond
the temperature, pressure and composition ranges of PAR Project NX-19. The results for
pipeline quality natural gases, which were completed in 1984, provided the basis for the 1985
report.

The initial 1981-1984 research used data ranging in pressures up to approximately 900
psia (6 MPa) obtained from the literature and provided by GERG. However, the GERG data
bank was extended considerably in the period 1985-1990. The new data showed that the
original equation of state, developed in the period 1981-1984, needed to be improved. In
addition, velocity of sound data obtained under GRI sponsorship during 1985-1989 showed
calculation for rich gases were not sufficiently accurate for critical flow applications. The new
equations of state presented in this revision include the most recent GRI and GERG
compressibility factor data for natural gas mixtures. In addition, the revised method has
applied an improved correlation methodology developed by researchers under the direction of
Professor Richard T Jacobsen at the University of Idaho.

Property of PT. NISCONI


2

1.3 Field of Application

1.3.1 Types of Properties

This report presents detailed information needed to compute gas phase compressibility
factors, supercompressibility factors and densities for natural gas and other related
hydrocarbon gases.

The detailed information in this report on the subject of computations of compressibility


factors, supercompressibility factors and densities can be applied directly in calculations of gas
volume and gas flow rate. These computations also can be used in other instances where the
relationship between temperature, pressure and volume of gas is important. A pertinent
example is gas reservoir calculations. The derived thermodynamic properties which can be
calculated using the information in this report include the heat capacity, enthalpy, entropy,
sonic velocity, critical flow factor and component chemical potentials. Applications using these
properties include sonic nozzle calculations, compressor calculations, heat exchanger
calculations, gas mixture reaction equilibrium calculations and gas mixture component fugacity
calculations (for use in vapor-liquid equilibrium calculations).

1.3.2 Types of Gases

This report is intended for natural gases and other related hydrocarbon gases. The
information in this report also can be used for calculations of compressibility factors and
densities for pure methane, ethane, nitrogen, carbon dioxide, hydrogen and hydrogen sulfide
and gas mixtures of up to twenty-one compounds. Table 1 identifies the ranges of gas
characteristics for which this report can be used. The normal range column gives the range
of gas characteristics for which the average expected uncertainty corresponds to the
uncertainties identified in Figure 1. The expanded range of gas characteristics has an average
uncertainty which is expected to be higher, especially outside of Region 1 of Figure 1. The
use of this report for computations of the physical properties of gases with component mole
percentages outside the ranges given in Table 1 is not recommended.

An accepted database for water, heavy hydrocarbons and hydrogen sulfide in natural
gases is not presently available for determinations of uncertainties of calculated gas properties.
Therefore, as a practical matter, the only limitation is that the calculation is for the gas phase.
Thus, the limits are the water dew point for mole percent water, the hydrocarbon dew point for
mole percent heavy hydrocarbons, and pure hydrogen sulfide. The presentation of methods
for calculations using the various heavy hydrocarbon fraction characterization methods used
in the hydrocarbon industry is beyond the scope of this report; these methods will be presented
subsequently in the technical literature.

Property of PT. NISCONI


3

Table 1

Ranges of Gas Mixture Characteristics


Consistent with this Report

Quantity Normal Range Expanded Range


Relative Density* .554 to .87 0.07 to 1.52
Gross Heating Value** 477 to 1150 Btu/scf o to 1800 Btu/scf
Gross Heating Value*** 18.7 to 45.1 MJ/m 3 o to 66 MJ/m3
Mole Percent Methane 45.0 to 100.0 o to 100.0
Mole Percent Nitrogen o to 50.0 o to 100.0
Mole Percent Carbon Dioxide o to 30.0 o to 100.0
Mole Percent Ethane o to 10.0 o to 100.0
Mole Percent Propane o to 4.0 o to 12.0
Mole Percent Total Butanes o to 1.0 o to 6.0
Mole Percent Total Pentanes o to 0.3 o to 4.0
Mole Percent Hexanes Plus o to 0.2 o to Dew Point
Mole Percent Helium o to 0.2 o to 3.0
Mole Percent Hydrogen o to 10.0 o to 100.0
Mole Percent Carbon Monoxide o to 3.0 o to 3.0
Mole Percent Argon # o to 1.0
Mole Percent Oxygen # o to 21.0
Mole Percent Water o to 0.05 o to Dew Point
Mole Percent Hydrogen Sulfide o to 0.02 o to 100.0
* Reference Condition: Relative density at 60F,14.73 pSia
** Reference Conditions: Combustion at 60F,14.73 psia; density at 60F,14.73 psia.
*** Reference Conditions: Combustion at 25C,0.101325 MPa; density at 0C,0.101325 MPa.
# The normal range is considered to be zero for these compounds.

1.3.3 Types of Conditions

This report is only valid for the gas phase. It can be applied for temperatures from
-200F to 760F (-130C to 400C) at pressures up to 40,000 psia (280 MPa). Application at
extreme conditions should be verified by other means (e.g., experimental verification). Use
of the calculation methods is not recommended within the vicinity of the critical point. For
pipeline quality natural gas, this is usually not a constraint because operating conditions near
the critical point generally are not encountered.

Property of PT. NISCONI


4

Temperature,OC
-130 -60 -8 62 120 200
20,000
I I I I 1.0% 140
Region 4

-c.as 10,000
(I) 0.5%
70 as
Q.
:5
..
f
:::l
Region 3 ...<
:::l
(I) (I)
(I) (I)
f e
Q.
2,500 I--
Region 2 0.3%
- 17 Q.

1750 I-- - 12
0.1%

Region 1

o o
-200 -80 17 143 250 400
Temperature,OF

Figure 1. Targeted Uncertainty for Natural Gas Compressibility Factors using the
DETAIL CHARACTERIZATION METHOD

1.4 Overview of Compressibility Factor Calculation Methods

This report provides recommended methods to compute highly accurate compressibility


factors and densities for natural gas custody transfer and other gas measurement applications.
Two equation of state methods are provided. All the information needed to efficiently
implement the appropriate method is contained in this report.

Property of PT. NISCONI


, 5

The two methods are differentiated by the input parameters needed for the equation
of state calculations. One method applies a detail knowledge of natural gas composition to
compute the compressibility factor (Le., using the gas analysis), Reference 1, Appendix A.7.
This method is referred to herein as the -DETAIL CHARACTERIZATION METHOD: It can
"be applied over the entire temperature, pressure and composition regime referred to in Section
1.3. The second method applies an aggregate or gross knowledge of natural gas composition
(given by heating value andlor relative density and diluent content information) to compute the
compressibility factor, References 2 and 3, Appendix B.8. This method is referred to herein
as the -GROSS CHARACTERIZATION METHOD: The GROSS CHARACTERIZATION
METHOD can be applied in a limited temperature, pressure region for natural gas
compositions shown in the normal range column of Table 1. Both methods require the use
of temperature and pressure in absolute units and a gas analysis to initially determine the
applicable method.

"1.4.1 DETAIL CHARACTERIZATION METHOD

The DETAIL CHARACTERIZATION METHOD was developed to accurately describe


the gas phase pressure-temperature-density behavior of natural gas mixtures over a wide
range of conditions. It can also accurately describe the gas phase pressure-temperature-
density behavior of the pure components methane, ethane, carbon dioxide, nitrogen and
hydrogen and mixtures of these components. In addition, a low density correlation was
developed for propane and heavier hydrocarbons and binary mixtures of these components
with methane, ethane, nitrogen and carbon dioxide. This method reduces the uncertainty of
compressibility factor and density calculations for natural gases from production separators,
which can contain mole percentages of hexanes plus heavier hydrocarbons greater than 1%.
Correlations of the density behavior of pure hydrogen sulfide and binary mixtures of hydrogen
sulfide with methane, ethane, nitrogen and carbon dioxide were developed to reduce the
calculation uncertainty for natural gases co"ntaining hydrogen sulfide (sour gas). Rnally,
second virial correlations were developed for water and binary mixtures of water with methane,
ethane, nitrogen and carbon dioxide to reduce the calculation uncertainty for natural gases
containing water vapor (wet gas). Section 8.1 and Appendix A present detailed information
for the DETAIL CHARACTERIZATION METHOD.

1.4.2 GROSS CHARACTERIZATION METHOD

The GROSS CHARACTERIZATION METHOD was developed using the natural gas
characteristics database listed in Table 2 to accurately calculate compressibility factors for dry,
sweet natural gases. Section 8.2 and Appendix B present detailed information for the GROSS
CHARACTERIZATION METHOD.

Property of PT. NISCONI


6

Table 2

Nominal Ranges of Natural Gas Characteristics from Available Experimental


Compressibility Factor Data Used to Test
the DETAIL and GROSS CHARACTERIZATION METHODS

Quantity Range
Relative DensitY' 0.554 to 0.87
Gross Heating Value** 477 to 1150 Btu/set
Gross Heating Value*** 18.7 to 45.1 MJ/m 3
Mole Percent Methane 45.2 to 98.3
Mole Percent Nitrogen 0.3 to 53.6
Mole Percent Carbon Dioxide 0.04 to 28.94
Mole Percent Ethane 0.24 to 9.53
Mole Percent Propane 0.02 to 3.57
Mole Percent Total Butanes 0.01 to 1.08
Mole Percent Total Pentanes 0.002 to 0.279
Mole Percent Hexanes Plus 0.0005 to 0.1004
Mole Percent Helium o to 0.158
Reference Condition: Relative density at 60F,14.73 psia
** Reference Conditions: Combustion at 60F,14.73 psia; density at 60F,14.73 psia.
....... Reference Conditions: Combustion at 25C,0.1 01325 MPa; density at 0C,0.1 01325 MPa.

1.5 Uncertainty

The uncertainties of compressibility factors calculated using either the DETAI L


CHARACTERIZATION METHOD or the GROSS CHARACTERIZATION METHOD depend
upon the natural gas composition and the temperature-pressure condition of the calculation.
Evaluations of the uncertainties of calculated compressibility factors for natural gases were
made by comparing them to the GRI and GERG compressibility factor reference databases.
The reference databases have the natural gas physical characteristics identified in Table 2.
Comparisons were also made with data for pure components and binary mixtures. Lastly,
comparisons were also made with experimental speed of sound data to access derived
thermodynamic property capabilities of the equations. Detailed uncertainty analysis is
available in Reference 2, Appendix A. 7.

Property of PT. NISCONI


7

1.5.1 DETAIL CHARACTERIZATION METHOD Uncertainty

In general, the expected uncertainty of the DETAIL CHARACTERIZATION METHOD


is within the targets given in Figure 1 for natural gases having the normal range of gas
characteristics identified in Table 1. For the expanded range of gas characteristics in Table
1, the method has average uncertainty which may be higher, especially outside of Region 1
of Figure 1. The GRI and GERG compressibility factor reference databases have verified the
expected uncertainty in the normal range of gas characteristics within Region 1 and parts of
Regions 2, 3, and 4 of Figure 1.

1.5.2 GROSS CHARACTERIZATION METHOD Uncertainty

In general, the expected uncertainty of the GROSS CHARACTERIZATION METHOD


is within the targets given for Region 1 in Figure 1 for natural gases having the characteristics
identified in the normal range in Table 1. The GRI and GERG compressibility factor reference
.databases have verified the expected uncertainty in the normal range of gas characteristics
in Table 1 within Region 1. The equation was not designed for and should not be used
outside of these limits.

1.6 Recommendations

The GROSS CHARACTERIZATION METHOD, because of its simplicity, is


recommended for calculations of natural gas compressibility factors and densities for
temperatures from 32F to 130F (OC to 55C) for pressures up to 1200 psia (8.3 MPa),
provided the natural gas characteristics are within the normal range defined in Table 1. For
all other conditions and natural gas compositions, the DETAIL CHARACTERIZATION
METHOD is recommended. In those cases when the operating conditions exceed the
pressure, temperature or compositional limits of the GROSS CHARACTERIZATION METHOD,
the DETAIL CHARACTERIZATION METHOD is recommended.

2 SYMBOLS

The symbols used generally are specific to thermodynamics, although symbols specific
to flow measurement have been used as a convenience to the reader. Symbols used in
Sections 4 through 6, which do not refer to a specific equation of state, are given below.
Symbols specific to the equations of state used to compute compressibility factors are given
in Sections 8.1.1 and 8.2.1.

Symbol = Represented Quantity

d = molar density (moles per unit volume)


d(Td,Pd) = molar density at reference condition Td, Pd
Fpv = supercompressibility factor
Gr{Tgr'Pgr) = relative density (specific gravity) of gas mixture at Tgr' Pgr
HN{Th'Ph) ::: molar ideal gross heating value at reference condition Th, Ph
HV{Th,Ph,Td,Pd) = volumetric gross heating value, reference conditions Th,Ph,Td,Pd
Mr = molar mass (molecular weight)

Property of PT. NISCONI


8

Mr(air) = molar mass of air


=
MrI molar mass of ith component
n = number of moles of gas
N = number of components in gas mixture
=
P absolute pressure
Pb = absolute pressure at base conditions
Pd = reference pressure for molar density
=
Pgr reference pressure for relative density
=
Ph reference pressure for heating value
=
R gas constant
=
T absolute temperature of gas
Tb = absolute temperature at base conditions
Td = reference temperature for molar density
=
Tgr reference temperature for relative density (specific gravity)
=
Th reference temperature for heating value
=
V gas volume
=
X. mole fraction of component i in gas mixture
=
Z compressibility factor at conditions of interest
=
4, compressibility factor at base conditions
Z(T.P) = compressibility factor at T. P
=
Z(Tgrt Pgr} compressibility factor of gas mixture at Tgr Pgr
=
Z(air.Tgr' Pgr) compressibility factor of air at Tor' Pgr
=
Z(60F. 14.73 psia) compressibility factor at 60Of. 14.73 psia
=
p mass density (mass per unit volume)
=
p(Tgr' Pgr} mass density of gas mixture at Tor' Pgr
=
p(air. Tgr. Pgr) mass density of air at T grt Pgr
=
Pb mass density at contract reference base condition T b' Pb

3 DEFINmONS

The quantities used in the equations in this document generally are defined with the
specific discussion of the relations.

4 GENERAL EQUATIONS

This section contains general equations involving the compressibility factor, the molar
density and mass density of natural gas and other hydrocarbon gases.

The compressibility factor Z is defined by the equation:

Z = PV (1 )
nRT

Where:
P = absolute static pressure of gas
V = gas volume
=
n number of moles of gas
=
Z compressibility factor of gas
R = gas constant
=
T absolute temperature of gas
Property of PT. NISCONI
9

Both the DETAIL CHARACTERIZATION METHOD and the GROSS


CHARACTERIZATION METHOD express the compressibility factor Z in terms of the molar
density d:

d = ~ (2)
V

Where:
d = molar density (moles per unit volume)
n = number of moles of gas
V = gas volume

The gas mixture molar mass Mr is calculated from the composition using the relation:

(3)

Where:
Mr = molar mass (molecular weight)
>Ct = mole fraction of component i in gas mixture
Mri = molar mass of ith component
N = number of components in gas mixture

The summation in Equation 3 is over all components in the gas mixture.

The mass density p is related to the molar density d by the relation:

(4)

Where:
p = mass density (mass per unit volume)
=
d molar density (moles per unit volume)
=
Mr molar mass (mass per mole)

Property of PT. NISCONI


10

Thus, using Equations 2 and 4, in Equation 1, the following equations for the molar
density d and the mass density p in terms of the compressibility factor result:

d=~ (5)
ZRT

(6)

Where:
Z =compressibility factor at conditions of interest
P =absolute pressure
d =molar density (moles per u!1it volume)
R =gas constant
T =absolute temperature of gas
Mr =molar mass (mass per mole)
p =mass density (mass per unit volume)

5 NATURAL GAS CHARACTERIZATION METHODS

The natural gas characterization information required for calculations using the DETAIL
CHARACTERIZATION METHOD is the natural gas composition, i.e., the mole fractions or
mole percentages of the components in the natural gas mixture.

The natural gas characterization information required for calculations using the GROSS
CHARACTERIZATION METHOD is the molar ideal gross heating value HCH of the mixture of
hydrocarbon components present in the natural gas along with the compositions (I.e., mole
percentages) of the nonhydrocarbon components in the natural gas mixture.

When a gas analysis is available, HCH can be calculated from the known molar ideal
gross heating values of the hydrocarbon components in the natural gas mixture for direct use
in the correlation. When the composition of the natural gas is not known, HCH and one
non hydrocarbon composition can be estimated from limited natural gas characterization
information. With the natural gas relative density, volumetric gross heating value and carbon
dioxide composition as inputs, methods in Appendix B can be used to determine HCH and the
mole fraction of nitrogen consistent with these inputs. Similarly, with the natural gas relative
density, carbon dioxide composition and nitrogen composition as inputs, methods in Appendix
B can be used to determine the value of HCH consistent with these inputs.

Property of PT. NISCONI


11

6 REFERENCE CONDITIONS

This section contains a brief summary of reference condition relations for natural gas
density, supercompressibility factor, relative density and heating value. Detailed equations are
given in Appendix C.

6.1 Mass Density at Contract Reference Conditions

The mass density Pb at the contract reference condition (Le., base condition) Tb , Pb can
be calculated using the following relation:

(7)

Where:
Pb =mass density at contract reference condition T b, Pb
Mr = molar mass
R = gas constant
=
T b contract reference absolute temperature
Pb = contract reference absolute pressure
~ = compressibility factor at contract reference condition T b' Pb

This relation is discussed in detail in Appendix C.

6.2 S~percompressibility Factor Reference Condition

Tabulations of the supercompressibility factor Fpv presented by the A.G.A. are defined
by the following relation:

F2 = Z(60F, 14.73psia) (8)


pv Z(T,P)

Where:
Fpv = supercompressibility factor at T, P
Z(60F,14.73 psia) = compressibility factor at 60F, 14.73 psia
Z(T,P) = compressibility factor at T, P

In this equation, the condition 60F, 14.73 psia is a specific reference condition. Note that the
contract reference condition equals the reference condition for supercompressibility factor only
when the contract reference condition is 60F, 14.73 psia.

Property of PT. NISCONI


12

6.3 Relative Density Reference Condition

The gas relative density (speclfic gravity) at the reference condition T gr' Por is defined
by the relation:

p(TgrtPgr)
(9)
p(air, Tgrt Por)

Where:
Gr(Tgr' Pgr) = relative density of gas mixture at T gr. Pgr
p(Tgr' Por) = mass density of gas mixture at T gr. Por
p(air. Tor. Por) = mass density of air at Tor' Pgr
T gr = reference temperature for relative density
Por = reference pressure for relative density

In this relation for Gr (Tgr' Pgr), both the gas mixture density p(Tgr. Pgr} and the air density p(air.
T gr. Pgr) must be at the same temperature-pressure condition T gr' Pgr' Thus. using Equation
6 for the mass density of both the gas mixture and air, the following relation results from
Equation 9:

= MrZ(air,Tgr'Pgr}
(10)
Mr(air)Z(Tgr'P gr}

Where:
Gr(Tgr' Pgr} = relative density of gas mixture at T gr' Pgr
Mr = molar mass for the gas mixture
Mr(air} = molar mass of air
Z(Tgr. Pgr} = compressibility factor of gas mixture
Z(air.Tgr. Pgr} = compressibility factor of air at Tgr. Por

Note that the compressibility factors of both the gas mixture and air must be at the reference
condition T gr' P gr' Also note that the relative density is not a constant but varies with both T gr
and Pgr because both Z(Tgr' P or) and Z(air, T gr' Pgr) vary with T gr and P gr' The calculation of the
compressibility factor of air is discussed in detail in Appendix C,

6.4 Heating Value Reference Conditions

The volumetric gross heating value is the product of the molar ideal gross heating value
and the molar density of the gas mixture:
(11 )

Where:
HV(Th,Ph,Td,Pd} = volumetric gross heating value, reference conditions Th,Ph,Td,Pd
HN(Th,Ph} = molar ideal gross heating value at Th, Ph
d(Td'Pd) = molar density at T d, P~

Property of PT. NISCONI


13

Note that the reference condition Th , Ph for the molar real gross heating value may differ from
the reference condition T d' Pd for the molar density. This situation occurs in the use of the
GROSS CHARACTERIZATION METHOD. Both Th, Ph and Td, Pd must be specified to specify
the reference conditions for the volumetric heating value. Relations for the heating value are
presented in detail in Appendix C.

7 UNITS, CONVERSIONS, PRECISION AND ACCURACY

Most equations are presented here without specific units so that the equations are valid
provided consistent units are used. In cases where quantities require a specific set of units,
the units are specified.

The computer program subroutines provided in this document uses metric units, which
in most cases correspond to SI units. For this reason, tabulations of dimensional constants
used in the computer programs are given in metric units. A units conversion FORTRAN
subroutine is provided for conversions to other units which are more convenient to the user.

The computer program subroutines in this document use the following units for the
prinCipal dimensional quantities; absolute temperature in kelvins (K), pressure in Megapasca/s
(MPa). molar density in moles per cubic decimeter (moVdm3). the real gas volumetric heating
value in kilojoules per cubic decimeter (kJ/dm 3), and the molar ideal gross heating value in
kilojoules per mole (kJ/mol). Conversion factors are required for conversions to and from other
units. Some conversion factors used in this document are given in Table 3. When pOSSible,
the conversion factors given in Table 3 correspond to international standards (ISO 6976 and
GPA 2172-94) or anticipated consensus values (e.g., the value for the gas constant R is the
antiCipated consensus value). Temperatures are based on the IPTS-68 temperature scale.
Other conversion factors are provided in Appendix D.

The quantities in Table 3 have been rounded to seven Significant figures. Most of the
conversions are not accurate to more than seven significant figures. Thus, the accuracy of
computed compressibility factors is not improved by the use of more than seven significant
figures for the conversions in Table 3.

Property of PT. NISCONI


14

Table 3

Units Conversions

Quantity Units Conversion


Length 1.0 in = 0.0254 m
Length 12.0 in =1.0 ft
Mass 1.0 Ibm =0.4535924 kg
Moles 1.0 Ib-mole =0.4535924 kg-mole
Temperature Temperature (in OR) =Temperature (in oF) + 459.67
Temperature Temperature (in K) =Temperature.(in 0c) + 273.15
Temperature 1.8 oR = 1.0 K
Pressure 1.0 psia = 0.006894757 MPa
Pressure 1.0 bar =0.10 MPa
Standard Acceleration 32.17405 ftlsec = 9.806650 mlsec
of Gravity
Gas Constant 10.73164 psia tfllbmol-R =8.314510 J/mol-K
Gas Constant 1.985886 Btullbmol-R = 8.314510 J/mol-K
Energy 1.0 Btu =1.055056 kJ

Note that a calculation preCision of five significant figures is approximately 1 part in


100,000 for the compressibility factor. Appendices A and B present information showing that
the expected uncertainties of computed natural gas compressibility factors in the custody
transfer region are 0.048% (one standard deviation) for both the DETAIL
CHARACTERIZATION METHOD and the GROSS CHARACTERIZATION METHOD. The
uncertainty of 0.048% corresponds to 48 parts in 100,000, so the calculation precision of 1 part
in 100,000 is more than an order of magnitude less than the uncertainty in the computed
compressibility factor. The computed compressibility factor generally agrees with the best
available compressibility factor data for natural gases with differences approaching the
experimental uncertainty of 0.1 %. Thus, calculated compressibility factors are accurate to
about one part in 10,000, or if less than one (Z<1.0) to about four significant figures. When
more than four significant figures are quoted in this document, the purpose is for computer
program calculation verification only.

Property of PT. NISCONI


15

8 EQUATIONS FOR COMPRESSIBILITY FACTORS

Two different equations for the compressibility factor Z, the DETAIL


CHARACTERIZATION METHOD and the GROSS CHARACTERIZATION METHOD are
provided. The choice of a particular method is dependent upon natural gas characteristics and
the region of application; see Section 1.6, Recommendations.

In the DETAIL CHARACTERIZATION METHOD, a natural gas is characterized by its


composition, that is the mole fractions or mole percentages of the components in the natural
gas. Procedures to apply the DETAIL CHARACTERIZATION METHOD are given in Appendix
A. Computer implementation is given in Appendix A and Appendix E.

In the GROSS CHARACTERIZATION METHOD a natural gas is characterized either


by the compositional analysis or by using combinations of three of the following four quantities:
(1) the real gas relative density (specific gravity) Gr, (2) the real gas gross heating value per
unit volume, HV, (3) the mole fraction of carbon dioxide, Xc02 and (4) the mol~ fraction of
nitrogen, ~2' The input for the GROSS CHARACTERIZATION METHOD can be either
measured values of these quantities or calculated values from a gas analysis. Procedures to
apply the GROSS CHARACTERIZATION METHOD for calculations of compressibility factors
are given in Appendix B and Appendix C. Computer implementation is given in Appendix B
and Appendix E.

8.1 DETAIL CHARACTERIZATION METHOD Equation of State

8.1.1 Nomenclature

Symbol = Represented Quantity

~ = constant in Table 4
B = second vi rial coefficient
B~'j = bi"nary characterization coefficient
bn = constant in Table 4
C~ = coefficients which are functions of composition
cn = constant in Table 4
o = reduced density of gas
d = molar density (moles per unit volume)
E, = characteristic energy parameter for ith component (Table 5)
=
Ej characteristic energy parameter for jth component (Table 5)
E~ = second vi rial coefficient binary energy parameter
e; = second vi rial coefficient energy binary interaction parameter (Table 6)
F = mixture high temperature parameter
FI = high temperature parameter for ith component (Table 5)
F, = high temperature parameter for jth component (Table 5)
fn = constant in Table 4
G = orientation parameter
G1 = orientation parameter for ith component (Table 5)
G j = orientation parameter for jth component (Table 5)

Property of PT. NISCONI


16

G, =binary orientation parameter


"G; =binary interaction parameter for orientation (Table 6)
gn =constant in Table 4
K =size parameter
K. =size parameter for ith component (Table 5)
~ =size parameter for jth component (Table 5)
~ = binary interaction parameter for size (Table 6)
kn = constant in Table 4
N =number of components in gas mixture
P =absolute pressure
o= quadrupole parameter
=
0 1 quadrupole parameter for ith component
=
0 1 quadrupole parameter for jth component
qn = constant (n=1, 2, etc.) in Table 4
=
R gas constant
=
SI dipole parameter for ith component (Table 5)
SI = dipole parameter for jth component (Table 5)
=
sn constant (n = 1, 2, etc.) in Table 4
=
T absolute temperature
=
U mixture energy parameter
U, = binary interaction parameter for conformal energy (Table 6)
=
Un constant in Table 4
WI = association parameter for ith component (Table 5)
WI = association parameter for jth component (Table 5)
wn = constant (n=1, 2, etc.) in Table 4
~ = mole fraction of component i in the gas mixture
~ = mole fraction of component j in the gas mixture
Z = compressibility factor

8.1.2 DETAIL CHARACTERIZATION METHOD Equation" of State for


Compressibility Factor

The equations, constants, and parameters needed to calculate compressibility factors


for natural gas mixtures using the O"ETAIL CHARACTERIZAnON METHOO are given here.
Computation procedures, FORTRAN programs, uncertainty discussion and references are
provided in Appendix A.

The equation of state used here is a hybrid formulation. The method is based on the
work of Starling et aI., Reference 1, Appendix A.7. It combines features of the virial equation
of state (a power series in density) for low density conditions and exponential functions for
applications at high density conditions (extended Benedict-Webb-Rubin equation). This
formulation provides both high accuracy, broad temperature-pressure-composition application
range, and derived thermodynamic property capabilities. A detailed description of the
performance of the equation is available in Reference 2, Appendix A.7.

Property of PT. NISCONI


17

The equation of state for the compressibility factor Z for the DETAIL
CHARACTERIZATION METHOD is given in its condensed form by the following equation:

(12)

Where:
Z = compressibility factor
B = second vi rial coefficient
K = mixture size parameter
D = reduced density
=
C~ coefficients which are functions of composition
=
T absolute temperature
un,bn,cn.~ = constants (n=13, 14, etc.) in Table 4

The reduced density D is related to the molar density d -by the equation:

(13)

Where:
o = reduced density
d = molar density (moles per unit volume)
=
K mixture size parameter

The mixture size parameter K is calculated using the equation:

(14)

Where:
. K =mixture size parameter
K. = size parameter for ith component (Table 5)
~ = size parameter for jth component (Table 5)
~ =binary interaction parameter for size (Table 6)
X. = mole fraction of ith component
~ = mole fraction of jth component
N = number of components in the gas mixture

The subscript i refers to the ith component in the gas mixture and the subscript j refers to the
jth component in the mixture. In the single sum, i ranges over the integer values from 1 to N.
For example, for a mixture of 12 components, N=12 and there would be 12 terms in the single
sum. In the double sum, i ranges from 1 to N-1 and, for each value of i, j ranges from i+ 1 to
N. For example, for a mixture of 12 components, there would be 66 terms in the double sum

Property of PT. NISCONI


18

if all values of ~ differed from one. However, because many of the values of ~ are one, the
number of nonzero terms in the double sum is small for many natural gas mixtures. Note that
all values of ~ are one except for the values in Table 6.

The second virial coefficient B is given by the following equations, where N is the
number of components in the gas mixture and the values of i and j both range from 1 to N:

18 N N 3

B= :E anT -u':E :E x"'J~Ju1K.KJ ~Bnij


n-1 '-1 )-1
(15)

1 1
(16)
Bn~=(G,+1-gJg.(O,Ot1-qn)q,,(F,~F)~+1-fS'(S,S)+1-snt"CN,Wt1-Wn)w.

Where:
B = second vi rial coefficient
B: = binary characterization coefficient
q
Bn,un = constants (n=1,2, etc.) in Table 4
gn,qn,fn,sn,wn = constants (n=1,2, etc.) in Table 4
T = absolute temperature
X. = mole fraction of component i in the gas mixture
~ = mole fraction of component j in the gas mixture
G, = binary orientation parameter
0i = quadrupole parameter for ith component (Table 5)
OJ = quadrupole parameter for jth component (Table 5)
. F, = high temperature parameter for ith component (Table 5)
Fj = high temperature parameter for jth component (Table 5)
Si = dipole parameter for ith component (Table 5)
Sj = dipole parameter for jth component (Table 5)
Wi = association parameter for ith component (Table 5)
Wj = association parameter for jth component (Table 5)
Eij = second vi rial coefficient binary energy parameter
K. = size parameter for ith component (Table 5)
~ =size parameter for jth component (T~ble 5)
=
N number of components in gas mixture

It should be noted that W, is zero for all components except water and that F, is zero for all
components except hydrogen.

The binary parameters Eij and Gij are calculated using the following equations:

Property of PT. NISCONI


19

(17)

(18)

Where:
Eq = second virial coefficient binary energy parameter
Ej = characteristic energy parameter for ith component (Table 5)
E, = characteristic energy parameter for jth component (Table 5)
~ = second virial coefficient energy binary interaction parameter (Table 6)
Gij= binary orientation parameter
Gj = orientation parameter for ith component (Table 5)
G, = orientation parameter for jth component (Table 5)
G; = binary interaction parameter for orientation (Table 6)

Note that all values of the binary interaction parameters t:; and G; are one except for
the values in Table 6.

The coefficients ~ (n=13 to 58) are given by the equation:

(19)

Where:
c~ = coefficients which are functions of composition
~,gn,qn,un,fn = constants (n=13, 14, etc.) in Table 4
T = absolute temperature
G = orientation parameter
o = quadrupole parameter
F = mixture high temperature parameter
U = mixture energy parameter

The mixture parameters U, G, 0, and F are calculated using the following equations,
where in the double sums, i ranges from 1 to N-1 and, for each value of i, j ranges from i+ 1
to N:

Property of PT. NISCONI


20

(20)

N N-l N

G = EXIGI + E E XJ(G; -1)(G I+GJ (21)


1-1 I-I J-I+l

(22)

(23)

Where:
~ = mole fraction for the ith component
~ = mole fraction for the jth component
N = number of components in gas mixture
U = mixture energy parameter
~ = energy parameter for ith component (Table 5)
Ej = energy parameter for jth component (Table 5)
=
U, binary interaction parameter for conformal energy (Table 6)
G = orientation parameter
G I = orientation parameter for ith component (Table 5)
GJ = orientation parameter for jth component (Table 5)
G~ = binary interaction parameter for orientation (Table 6)
=
o quadrupole parameter
=
0 1 quadrupole parameter for ith component (Table 5)
=
OJ quadrupole parameter for jth component (Table 5)
F = mixture high temperature parameter
FI = high temperature parameter for ith component (Table 5)
Fj = high temperature parameter for jth component (Table 5)

It should be noted that all values of the binary interaction parameters Kq. e;. G;. and
U, are one except for the values given in Table 6. Also note that FI is zero for all components
except hydrogen.

Property of PT. NISCONI


21

8.1.3 DETAIL CHARACTERIZATION METHOD Equation of State for Pressure

In the computation of the compressibility factor Z using the DETAIL


CHARACTERIZATI.GN METHOD, the composition of the gas is known, the absolute
temperature T of the gas is known, and the absolute pressure P is known. The problem then
is to compute the molar density d using the equation of state expression for the pressure P.
For this purpose, Equation 12 is substituted into Equation 5 to obtain an equation for the
pressure:

16 56
P = dRT [1 + Bd - DE Cnl-tl + E Cnl-tl(bn-enknD k.)D bexp( -enD k.)] (24)
n-13 n-13

Where:
P = absolute pressure
=
R gas constant
T = absolute temperature
d = molar density of gas
=
B second virial coefficient
o = reduced density
C~ = coefficients which are functions of composition
un,bn,cn'~ = constants (n=13, 14, etc.) in Table 4

When the temperature, pressure and composition of a gas are known, the only
unknown quantity in Equation 24 is the molar density d. The density is determined using
appropriate iterative procedures. It should be noted that before the computation of d can be
performed, the coefficients B and C~ in Equation 24 must be calculated from the composition
and temperature of the gas.

Property of PT. NISCONI


22

Table 4

DETAIL CHARACTERIZATION METHOD Equation of State Parameters

n a" bn c;, k,. Un 9n <In fn Sn Wn

1 0.153832600 1 0 0 0.0 0 0 0 0 0
2 1.341953000 1 0 0 0.5 0 0 0 0 0
3 -2.998583000 1 0 0 1.0 0 0 0 0 0
4 -0.048312280 1 0 0 3.5 0 0 0 0 0
5 0.375796500 1 0 0 -0.5 1 0 0 0 0
6 -1.589575000 1 0 0 4.5 1 0 0 0 0
7 -0.053588470 1 0 0 0.5 0 1 0 0 0
8 0.886594630 1 0 0 7.5 0 0 0 1 0
9 -0.710237040 1 0 0 9.5 0 0 0 1 0
10 -1.471722000 1 0 0 6.0 0 0 0 O 1
11 1.321850350 1 0 0 12.0 0 0 0 0 1
12 -0.786659250 1 0 0 12.5 0 0 0 0 1
13 2.291290E-9 1 1 3 -6.0 0 0 1 0 0
14 0.157672400 1 1 2 2.0 0 0 0 0 0
15 -0.436386400 1 1 2 3.0 0 0 0 0 0
16 -0.044081590 1 1 2 2.0 0 1 0 0 0
17 -0.003433888 1 1 4 2.0 0 0 0 0 0
18 0.032059050 1 1 4 11.0 0 0 0 0 0
19 0.024873550 2 0 0 -0.5 0 0 0 0 0
20 0.073322790 2 0 0 0.5 0 0 0 0 0
21 -0.001600573 2 1 2 0.0 0 0 0 0 0
22 0.642470600 2 1 2 4.0 0 0 0 0 0
23 -0.416260100 2 1 2 6.0 0 0 0 0 0
24 -0.066899570 2 1 4 21.0 0 0 0 0 0
25 0.279179500 2 1 4 23.0 1 0 0 0 0
26 -0.696605100 2 1 4 22.0 0 1 0 0 0
27 -0.002860589 2 1 4 -1.0 0 0 1 0 0
28 -0.008098836 3 0 0 -0.5 0 1 0 0 0
29 3.150547000 3 1 1 7.0 1 0 0 0 0
30 0.007224479 3 1 1 -1.0 0 0 1 0 0
31 -0.705752900 3 1 2 6.0 0 0 0 0 0
32 0.534979200 3 1 2 4.0 1 0 0 0 0
33 -0.079314910 3 1 3 1.0 1 0 0 0 0

Property of PT. NISCONI


23

n a" bn Cn k" Un 9. qn tn Sn Wn

34 -1.418465000 3 1 3 9.0 1 0 0 0 0
35 . -5.99905E-17 3 1 4 -13.0 0 0 1 0 0
36 0.105840200 3 1 4 21.0 0 0 0 0 0
37 0.034317290 3 1 4 8.0 0 1 0 0 0
38 -0.007022847 4 0 0 -0.5 . 0 0 0 0 0
39 0.024955870 4 0 0 0.0 0 0 0 0 0
40 0.042968180 4 1 2 2.0 0 0 0 0 0
41 0.746545300 4 1 2 7.0 0 0 0 0 0
42 -0.291961300 4 1 2 9.0 0 1 0 0 0
43 7.294616000 4 1 4 22.0 0 0 0 0 0
44 -9.936757000 4 1 4 23.0 0 0 0 0 0
45 -0.005399808 5 0 0 1.0 0 0 0 0 0
46 -0.243256700 5 1 2 9.0 0 0 0 0 0
47 0.049870160 5 1 2 3.0 0 1 0 0 0
48 0.003733797 5 1 4 8.0 0 0 0 0 0
49 1.874951000 5 1 4 23.0 0 1 0 0 0
50 0.002168144 6 0 0 1.5 0 0 0 0 0
51 -0.658716400 6 1 2 5.0 1 0 0 0 0
52 0.000205518 7 0 0 -0.5 0 1 0 0 0
53 0.009776195 7 1 2 4.0 0 0 0 0 0
54 -0.020487080 8 1 1 7.0 1 0 0 0 0
55 0.015573220 8 1 2 3.0 0 0 0 0 0
56 0.006862415 8 1 2 0.0 1 0 0 0 0
57 -0.001226752 9 1 2 1.0 0 0 0 0 0
58 0.002850908 9 1 2 0.0 0 1 0 0 0

Property of PT. NISCONI


~

Table 5

Characterization Parameters for Use in the DETAIL CHARACTERIZATION METHOD

CID Compound Molar Energy Size Orlentalion Quadrupole High Temp. Dipole Association
Mass Parameter Parameter Parameter Parameter Parameter Parameter Parameter
M, E (K) K (m 3/kg-mole)'1'3 G Q F S W
1 Methane 16.0430 151.318300 0.4619255 0.0 0.0 0.0 0.0 0.0
2 Nitrogen 28.0135 99.737780 0.4479153 0.027815 0.0 0.0 0.0 0.0
3 Carbon Dioxide 44.0100 241.960600 0.4557489 0.189065 0.690000 0.0 0.0 . 0.0
4 Ethane 30.0700 244.166700 0.5279209 0.079300 0.0 0.0 0.0 0.0
5 Propane 44.0970 298.118300 0.5837490 0.141239 0.0 0.0 0.0 0.0
6 Water 18.0153 514.015600 0.3825868 0.332500 1.067750 0.0 1.582200 1.0
7 Hydrogen Sulfide 34.0820 296.355000 0.4618263 0.088500 0.633276 0.0 0.390000 0.0
8 Hydrogen 2.0159 26.957940 0.3514916 0.034369 0.0 1.0 0.0 0.0
9 Carbon Monoxide 28.0100 105.534800 0.4533894 0.038953 0.0 0.0 0.0 0.0
10 Oxygen 31.9988 122.766700 0.4186954 0.021000 0.0 0.0 0.0 0.0
11 I-Butane 58.1230 324.068900 0.6406937 0.256692 0.0 0.0 0.0. 0.0
12 n.Butane 58.1230 337.638900 0.6341423 0.281835 0.0 0.0 0.0 0.0
13 I-Pentane 72.1500 365.599900 0.6738577 0.332267 0.0 0.0 0.0 0.0
14 n-Pentane 72.1500 370.682300 0.6798307 0.366911 0.0 0.0 0.0 0.0
15 n-Hexane 86.1770 402.636293 0.7175118 0.289731 0.0 0.0 0.0 0.0
16 n-Heptane 100.2040 427.722630 0.7525189 0.337542 0.0 0.0 0.0 0.0
17 n-Octane 114.2310 450.325022 0.7849550 0.383381 0.0 0.0 0.0 0.0
18 n-Nonane 128.2580 470.840891 0.8152731 0.427354 0.0 0.0 0.0 0.0
19 n-Decane 142.2850 489.558373 0.8437826 0.469659 0.0 0.0 0.0 0.0
20 Helium 4.0026 2.610111 0.3589888 0.0 0.0 0.0 0.0 0.0
21 Argon 39.9480 119.629900 0.4216551 0.0 0.0 0.0 0.0 0.0
-- --
25

Table 6

Binary Interaction Parameter Values for Use in the


DETAIL CHARACTERIZATION METHOD*

Identification
Number
CID(I) CIDO) Component Pair E'~ U~ ~ G'~

... _..._.__._...._.................._..........................................................._--_....._._.__. _-- ._-..._--_.._--_....- .._.....__.__....._...- ......_._..--...........-._.


2 Methane Nitrogen 0.971640 0.886106 1.003630
3 carbon 0.960644 0.963827 0.995933 0.807653
Dioxide

_._-_.......- ..54_....._.__......_._...._._.................
... Ethane _........-....__..._-_._------_..._.__.._---_...._-- -._-_..._...............__.- .__.__._...._--..
Propane 0.994635 0.990877 1.007619

......-.........._.. --_. _..__...- ...__.... ..._.- ...._._......._...-...._... --_._--_. _-.......-......_-_.._-.- .._--.._.............._....- ...._._......__._._._.
6 Water
-...
0.708218
7
.....__...__...._._._-_._- .__._...__.-.-...Sulfide
Hydrogen
_._-
0.931484

_--- ..._--_.__......................_. _.......__......._..................... _..


......._.... 8 Hydrogen 1.170520
0.736833 1.000080
..._......-.- .-.-_._._---- ._--------- -_._--_._----_...._....__.
..__....._-_..._--_..._- ......._. ...
1.156390 1.023260 1.957310
._. __
_-_ __._-- ._--_._-----
9 carbon 0.990126
_-_
"---"--- _..._--- ._...._..._._...- ...Monoxide..._..._......._---._._- ._------_._-- ---_.._----...- ._--_.__.-.-_.
---_.._.- ..10 _._._-_... -----.-_.- ..i-Butane - .._.._----_. -------_..-._--------- ---_..----_...._......__...__.--..-
Oxygen

..._...__.__.. _._._-_...._-_._-_._...._..
11 .__. -----_.
-._......-.....-..- .._.-.._- ._.-._-_.-.-- _._.._..._.._--.. ---_.._.- ._------_
12 n-Butane 0.989844
__
1.019530 __.._-------- ---------_._._- .__.__._--_.
0.992291
_.....__.._._..._...__._-_...._.
..- ..0.997596
13 iPentane 1.002350
..--._......_-1------_ ....._--.--.-....-...-..-----. 0.999268 .-.----- ----.----- --.--...------- -'-'---'-'-'
.._-_._--- -_. 14 __._- ._. __ ._._._...._....nPentane _...__._.._-.- ------_..- ------ 1.003670 ._ ..__._-_...__._- .__..._....._._._.
1.002529
15 n-Hexane 1.107274 1.302576 0.982962

.._..._._.._-- -----_
16
.......-....- .. _............. _....._...._ _._........0.880880
n-Heptane

.._.__..._-- ..__._--- .__...__._...-........._..._.._. __........_----- ._---_.--...._- -_


17 nOctane
._---_. _- . _--------
0.880973
1.191904
1.205769
0.983565
.....
...... __
__..._......_..._..._- ._._._._-_. .
.._-..._-_._-- -_.__......._.
0.982707
__
18 n-Nonane 0.881067 1.219634 0.981849
19 n-Decane 0.881161 1.233498 0.980991
2 3 Nitrogen carbon 1.022740 0.835058 0.982361 0.982746
Dioxide

...._........... _- ..._......_.._- ........_ _


4
....... .................... _....
Ethane
_..._.............0.970120
_-----_ ........ -----_._-
0.816431
_-........................._- ..........._._......__.._.
...._.........1.007960
_
................_......5 ......_-_.............._._........ - .-..........__ ......_..................._-_._ .........._-- --------- ..__._... _..._...-....-- ...._... _-_._....._.....
Propane 0.945939 0.915502
6 Water 0.746954
7 Hydrogen 0.902271 0.993476 0.942596
Sulfide

................ _
8
_ _ _ _ _ . _ . _ _ _ ............_ .... _ ......._
Hydrogen
. . . . . _ _ . _. . . . . . . . . 4 . . . . . . . _ 4 _
1.086320
........_ . . ._ _ _ _ .... _
0.408838 1.032270
_ _ _ _ _ _ _ _ . . . _ _ . . . . ._ ... _ _ _ . . . . . . . . . . . . . . 4 . . . . . . . . _ _ . _. . . . . _ _ . . . . . _ _

9 carbon 1.005710
Monoxide
10 Oxygen 1.021000

..__....._..... --_
11 ..... _.. _- .... _. __ .. _._ ...._....iButane 0.946914 ... __ ........._._-_.... __ ...._...._--_._ .. _._ .................__._.-_.... _-.
_..............._._... -----_
12 n-Butane 0.973384 0.993556
13 i-Pentane 0.959340
14 n-Pentane 0.945520

* Note: Values of one should be used for all binary interaction parameters except for the
entries in this table.

Property of PT. NISCONI


26

Identification
Number
CIOQ) CIO(j) Component Pair
3 4 Carbon Elhane 0.925053 0.969870 1.008510 0.370296
Dioxide
...-.-- -.---.-
5
._-'.- ---------,i-----+---------
Propane 0.960237
----.------.- .-....---...-.......-.
..---.--.-- -----
6
.------ .------.-.-
Water
-,-.----f-------.-----
0.849408
---------- .-.-.-.--.....
1.673090
-.....-.
-.----..-- 7--.-- .-----.-- -_-_--1------+---------
Hydrogen
---------- .--.-......-....-.-....
._----- ..8_--- ._-- ---_._
Sulfide
...... 0.955052 1.045290 1.007790

.._-_...-- ----
9
--'--"-'''--
Hydrogen
Carbon
....1.281790
_----+---_._-
1.500000 0.900000
.-----_.._.-- ............._........._....
Monoxide
..---.- _.-.-- .-----1-.--.-..-.-1-..- - - - f-------.- .-.------ ....-....- ......-...-
10 ~en
..---..--.. -'-'-.-----
11
----...
J.Butane
-...- --.---"i--------
0.906849
..------ .-...--.....-....--
.----- -12 n-Butane
,-i------t----
0.897362
1------- ._....-....-......-.
--.---- -----
13
.------i---.-
~Pemane 0.726255
..------ .......... -.....-....-
+--.----i~----

.---.-- ------
14
----.-+----
n-Pentane
--+.--......
0.859764
--i------i-------- '-'--'--'-'-'-'-
------ ---- .----- --i------+------i-----.. -- ..--........................
__
n-Hexane
-------- ----
15
------- ------- _._---+--------
0.855134
---.. _--- .__...._......-..........
1.066638 0.910183
16
-------- ----- .
17
. - n-Octane
n-Heptane 0.831229
0.808310
1.077634
1.088178
-------
0.895362
0.881152
...._...- ....._._..-
---- - ---...-.-f-.------i ---- - - - - . - - .-.-.-.-.-.........--.
18 n-Nonane 0.786323
0.867520 1.098291
-----.- 19
-- -------~-----,
n-Oecane 0.765171
-I--------i--------
1.108021 0.854406
.-.-.---...-.---..
4 5 E1hane Propane 1.022560 1.065173 0.986893
-+---+------+
1 - -.. ---- . - - - - - ._.........-.............
6 Water 0.693168
..- - -.. "--'- .----.- .,-------f------+------.- .. . . - '--"-'''-'''''''''-'-'
7 Hydrogen 0.946871 0.971926 0.999969
Sulfide
..----.. -8'-' Hydrogen -.- -1-.1-64460------ "-.6-1-6660---'" -1:0-2-034-0---- '--''''---'--'
..------ -9---- -----+Carbon..;.------ .. ..-------.- .------...........-.
Monoxide
.....- -..-- - - - . . - 1 - - - _.. _.- ...--.------- .._.-....................
10 Oxygen

.. __ - __ __._ _- __ _ -- --_ _------ _......_ __


..... _ -... - -.. -
.........11..
..- - - ' - " - 1 - ' ' ' ' ' ' - - - ' ' ' ' ' ' ' ' - ..--..
... .... I-Butane
..... ... ... ..
. . - - - - - ..- - -..- - - - -...................................
...... .. ........._---_..........- .__........................
1.250000

. ---....... 12
---- -"--"-"'-- --
nButane 1.013060 1.250000
---1--._---_._- .-.-.--.. .-.. . . . -.
.._----_..._--- 13
14
..--_.-:--.- i-Pentane ..-.- ------
n-Pentane
~--.--.-
1.005320
1.250000
1.250000
--- ----..._._---- _._........... _..........
.._._.. _.........8_--- ._----- _._._-.........- ----_ ..- ---------- _.._-.-._-_.._-- ..............................
5 Propane Hydrogen 1.034787
.....
12 n-Butane 1.004900
7 15 Hydrogen
..........- ....... -_16.._-_._- .__._._._-- ._.__..._.._........ -----_._-
Sulfide n-Hexane
1.008692
---------
1.028973
_._-_._----_.-
0.968130
.........................._.
...--...-..... -1'7----- .--.-----
......_............ 18
_
.._-_.__.._- -_
"'-'''''''--
nHeptane
1.010126
........-. "1-.01
...__............. --_.--_.-
n-Nonane 1.012821
1.033754

._----_._-
1.042735
0.962870
1.038338-- '0'.957828---'-'-- .......-.....................
.._-_..........- .._- .. ..._-_...----_.._....._. ---_...--.- ----- .._-------- ...._....................._.
.~ ~--

._._--"-.--
0.952441
......._.....................
19 n-Oecane
1.014089 1.046966 0.948338
8 9 Hydrogen carbon 1.100000
...-._................._......_.-- ..__ _-..._......_...........- ..... _--_...- .__..._......-...._..- .._._----_.._......_........_........-....
._-_.._._- ..Oxygen
Monoxide

.. __...._.......-..-...._- ._.__...._- ..._--_..._......- ...._------- .__._.--...._- ..-_._....._........- .__........._.............


10

.. - ..._--_....- ._.._--_.__...--- .._._._.._----_........._......-.............


__.._.._- ...1211__._--.....__.__.._- --'-'-'-"._'" ...1.300000
~Butane

n-Butane
1.300000

* Note: Values of one should be used for all binary interaction parameters except for the
entries in this table.
Property of PT. NISCONI
27

8.2 GROSS CHARACTERIZATION METHOD Equation of State

8.2.1 Nomenclature

Symbol = Represented Quantity


SCHoCH = binary CH-CH interaction coefficient
BC02-cH = binary CO2-CH interaction coefficient
BC02-C02 = binary CO2-C02 interaction coefficient
BC02-N2 = binary CO2-N2 interaction coefficient
Bij = binary interaction coefficient
Bmix = second vi rial coefficient for the mixture
BN2-cH = binary N2-CH interaction coefficient
BN2-N2 = binary N2-N2 interaction coefficient
Bo,B 1,B2 =coefficients in second virial equation for CH-CH interaction
bo,b1,b2 = constants in Table 7
b lO ,b l1 ,b12 = constants in Table 8
CCH-CH-CH = ternary CH-CH-CH interaction coefficient
CC02-cH-CH = ternary CO2-CH-CH interaction coefficient
CC02-c02-CH = ternary CO2-C02-CH interaction coefficient
CC02-C02-C02 = ternary CO2-C02-C02 interaction coefficient
CC02-c02-N2 = ternary CO2-C02-N2 interaction coefficient
CC02-N2-CH = ternary CO2-N2-CH interaction coefficient
CC02-N2-N2 = ternary CO2-N2-N2 interaction coefficient
C N2-CH-CH = ternary N2-CH-CH interaction coefficient
C N2-N2-CH = ternary N2-N2-CH interaction coefficient
C N2 -N2-N2 = ternary N2-N2-N2 interaction coefficient
Cmix = third vi rial coefficient for the mixture
C O,C 1 ,C2 = coefficients in third vi rial equation for CH-CH interaction
CO,C1'~ = constants in Table 7
CIO,<11'~ = constants in Table 8
Cijk = ternary interaction coefficient

d = molar density, moVdm 3


HCH = molar gross heating value of the equivalent hydrocarbon
N = number of components in gas mixture
P = pressure
R = gas constant
T = temperature
XcH = mole fraction of equivalent hydrocarbon
Xc02 = mole fraction of CO2
~2 = mole fraction of N2
~ = mole fraction of illl component in the natural gas
t
Xj = mole fraction of component in the natural gas
x k = mole fraction of kill component in the natural gas
Z = compressibility factor

Property of PT. NISCONI


28

8.2.2 GROSS CHARACTERIZATION METHOD Equation of State


for Compressibility Factor

Equations, constants and parameters needed to calculate compressibility factors for


natural gas mixtures using the GROSS CHARACTERIZATION METHOD are presented in this
section. Computation procedures, FORTRAN programs, uncertainty discussion and references
are provided in Appendix B. The equation of state applied is a virial type model. It is based
on the work of Schouten et al. (1990); see Reference 2, Appendix B.8. It is also "known as the
SGERG model; see Reference 3, Appendix B.8. The method uses a range of natural gas
heating value, relative density (specific gravity) and diluent content data as gross
characterization parameters in place of the detailed composition of a natural gas. The model
predicts highly accurate compressibility factors for natural gases which contain component
concentrations in the ranges given in Table 2, with less than 0.1 mole percent water and 0.05
mole percent hydrogen sulfide.

A virial equation of state is a polynomial expansion in density. Each density term is


preceded by a virial coefficient. The virial coefficients are functions of temperature and
composition. The application of the virial equation of state via the SGERG model truncates
the virial equation for the compressibility factor after the third vi rial coefficient term. This
truncation provides high accuracy for normal gas pipeline transmission and distribution
conditions, but limits applications of the SGERG model to moderate densities and pressures.

The GROSS CHARACTERIZATION METHOD approximates a natural gas mixture by


treating it as a mixture of three components: an equivalent hydrocarbon component (Le.
pseudo-hydrocarbon component), nitrogen and carbon dioxide. The equivalent hydrocarbon,
CH, is used to collectively represent all the hydrocarbons found in the gas mixture. Nitrogen
and carbon dioxide are the diluent components. The original formulation of this method
contained the capability to include hydrogen and carbon monoxide as gas components at a
fixed ratio for coke/oven gas applications. These gases rarely <?CCur in North American
pipeline applications and are not included in the description of the method in this document.
However, the programs in Appendix B.5 include them as possible components if desired by
the user.

The equations and model are identical to the original work of Schouten et al. (1990),
Reference 2, Appendix B.8. The computation procedures provided in Appendix B have been
optimized for electronic flow measurement applications. The SGERG model was developed
using SI units. These units are used in the description of the method for the purpose of
maintaining continuity with the original work. Convenient unit conversion routines are provided
in the FORTRAN program listed in Appendix D.

Property of PT. NISCONI


29

The GROSS CHARACTERIZATION METHOD predicts the compressibility factor of


natural gas at a given temperature and pressure using three of the following four
characterization parameters:

* the volumetric gross heating value with reference conditions of TrF, 14.696 psia
(25C, 0.101325 MPa) for molar (or mass) ideal gross heating value and 32F,
14.696 psia (DOC, 0.101325 MPa) for molar (or mass) density,

* the relative density (specific gravity) with reference conditions of 32F, 14.696
pSia (DOC, 0.101325 MPa),

* the mole fraction of carbon dioxide, and

* the mole fraction of nitrogen.

Two methods for using these characterization parameters are given in Appendix B. Method
1 uses heating value, relative density and carbon dioxide content as input. Method 2 uses
relative density, carbon dioxide content and nitrogen content as input.

The SGERG model expresses the compressibility factor in terms of the molar density
(d), the mixture second virial coefficient (Bmlx), and the mixture third virial coefficient (Cmix):

(25)

N N
Bmlx =L
lal
L
jal
B1jx1xj (26)

N N N
Cm1x = L L L CljkXIXjXk
1-1 j-l k-l
(27)

Where:
Z = compressibility factor
Bmlx = second virial coefficient for the mixture
Cmlx = third vi rial coefficient for the mixture
d = molar density (moles per unit volume)
Bij = the individual component(s) interaction second virial coefficient
C1jk = the individual component(s) interaction third virial coefficient
x1,X1,xk = mole fractions of gas components
N = number of components in gas mixture

The indices i, j, and k represent molecular components in a natural gas mixture. The SGERG
model treatment for natural gas is based on a Simple 3 component mixture where CO2 and N2
are the .only diluents. All hydrocarbon components are collected into a single equivalent
hydrocarbon component, CH.

Property of PT. NISCONI


30

The B, and CIjk terms in Equations 26 and 27 are the interaction vi rial coefficient terms.
They are temperature dependent functions. For natural gas applications within the specified
limits of this equation. the temperature dependence for these terms is a quadratic function.
Expanding Equations 26 and 27 for Bmbc and C mbt identifies all the terms needed to solve the
SGERG model. Expanding Equations 26 and 27 gives:

2 2
Bmlx = Bco.-co. X2 co. + BNa-Nz x Na + BCH-Qi x CH (28)
+ 2 Bco.-N. Xco.~ + 2 Bco.-c.;cco.XcH + 2 BNa-cHxNaXcH

and:

3
C mlx = Cco.-co.-co. X 3 co. + CNa-N.-Nz X 3 Na + CCH-CH-cH X CH
2
+ 3 CCO~..Al
1 1'~
x CO.-x.
~
+ 3 Cco-CO-Qi
I Z
X2COXCH
Z
2
+ 3 Cco.-Nz-N. x NaXco. + 3 Cco.-CH-cH X2CH Xco.
2
+ 3 CNa-Nz-CH X2Na XcH + 3 CNa-cH-CH x CH ~
+ 6 Cco.-N.-cH Xco.~~
(29)

The following sections provide the equations and methods needed to compute all the second
and third vi rial interaction terms for Equations 28 and 29.

8.2.3 Interaction Virial Coefficient Terms for Nitrogen and Carbon Dioxide

The Bij values for the terms involving only nitrogen and carbon dioxide are expressed
in (dm 3/mol) and are given by:

(30)
Where values for boo b,. and b2 are given in Table 7 and T is the temperature in kelvins.

Similarly. the C~k values for the terms involving only nitrogen and carbon dioxide are
expressed in (dm6/mol) and are given by: .

(31 )

Where values for Co. c 1 and ~ are also given in Table 7.

Property of PT. NISCONI


31

Table 7

Interaction Vi rial Coefficient Terms for Nitrogen and Carbon Dioxide

Fluid for a l bo (dm3/mol) b 1 (dm3/mol K) b 2 (dm3/mol K2)


N2-N 2 -0.144600 0.740910x10-3 -0.911950x10-6
CO2-CO 2 -0.868340 0.403760x10-2 -0 .516570x1 0-5
CO 2-N 2 -0.339693 0.161176x10-2 -0.204429x10-s

G 2
Fluid for C l1k Co (dm /mol ) c1 (dm6/mol 2 K) c 2 (dm6/mol 2 K2)
N2-N 2 -N 2 0.784980x10-2 -0.398950x10'" 0.611870x10-7
CO2-C0 2-C02 0.205130x10-2 0.348880x10'" -0.837030x107
CO2 -N 2-N 2 0.552066x10-2 -0.168609x10'" 0.157169x10-7
CO2-C0 2-N 2 0.358783x10-2 0.806674x10-S -0.325798x107

8.2.4 Interaction Virial Coefficient Terms for the Equivalent Hydrocarbon, CH

The only remaining virial coefficient terms and mole fraction needed to compute the
compressibility factor of a natural gas from Equations 28 and 29 are the quantities involving
the equivalent hydrocarbon CH. The second and third interaction vi rial coefficients for the
equivalent hydrocarbon (CH) must be calculated from the molar ideal gross heating value of
the equivalent hydrocarbon (HCH in kJ/mol at 25C and 0.101325 MPa). The molar gross
heating value HCH can be determined by one of two methods. These methods are summarized
in Appendix B.

The equations for the second and third interaction virial coefficients for the equivalent
hydrocarbon are:

(32)

and

(33)

Where 8 0 , B 1 B2 Co. C1 and C2 are temperature dependent functions defined as:

(34)

Property of PT. NISCONI


32

and:
(35)

The constants in Equations 34 and 35 are given in Table 8 and the temperature is in kelvins.

Table 8

Vi rial Coefficient Terms for the Equivalent Hydrocarbon

I blo b l1 bl2
8 0 (dm'/mol) 0 -0.425468 0.286500x102 -0.462073x10-5

8 1 (dm'/kJ) 1 0.877118x10-3 -0.556281 x1 0-5 0.88151 Ox1 0-8

8 2 (dm'moI/kJ2) 2 -o.824747x10-6 0.431436x10-8 -0.608319x10- 11

i CIO CI1 C12

CO (dm'/moI2 ) 0 -0.302488 0.195861x10-2 -0.316302x10-5

C1 (dm'/mol-kJ) 1 0.646422x1 0-3 -o.422876x10-5 0.688157x10-8

Cz (dm'/kJ2) 2 -o.332805x10-6 0.223160x10-8 -0.367713x10- 11

The interaction second virial coefficient term for the equivalent hydrocarbon CH with
nitrogen N2 is calculated using the relation:

(B + B )
= (0.72 + 1.875 x 10-5(320-T)~ N,,~ CH-CH (36)
2

Where T is in kelvins. For the equivalent hydrocarbon CH with carbon dioxide CO2 , the
relation is:
1
(37)
BCOz-CH = -0.865 (Bcoz-coz BCH-CH) ~

The interaction third vi rial coefficient terms for carbon dioxide and nitrogen with the equivalent
hydrocarbon are calculated by Equations 38 through 42:

1
(38)
CN,,-cH-CH = (0.92 + 0.0013 (T -270)) (C~H-cH-CH CN,,~~)-:J

Property of PT. NISCONI


33

1
(39)
CN.-N.-CH = (0.92 + 0.0013 (T -270)) (C~.-{oIz~z CCH-CH-cH)-:r

1
(40)
CCO.-CH-cH = 0.92 (C~H-CH-CH Cco.-co.-co)-:r

1
(41)
CCO.-CO.-CH = 0.92 (C~02-CO.-C02 CCH-CH-CH)-:r

1
(42)
CCOz-N.-cH = 1.10 (Ccoz-co.-coz CNz-N.-N. CCH-cH-CH )-:r

The equation for calculating the pressure using the GROSS CHARACTERIZATION METHOD
is obtained by substituting Equation 25 into Equation 5:
(43)

9 PROCEDURES FOR COMPUTATIONS OF COMPRESSIBILITY FACTORS

Flow rate calculations for gas metering applications typically require values of both the
compressibility factor Z at the flowing temperature and pressure and the compressibility factor
at base conditions 2;,. Procedures for computations of Z and 2;, are given in Appendix A for
the DETAIL CHARACTERIZATION METHOD and. in Appendix B for the GROSS
CHARACTERIZATION METHOD.

10 COMPUTER PROGRAMS FOR COMPUTATIONS OF COMPRESSIBILITY


FACTORS, SUPERCOMPRESSIBILITY FACTORS, AND DENSITIES

The two equations of state, the DETAIL CHARACTERIZATION METHOD and the
GROSS CHARACTERIZATION METHOD, have been incorporated into efficient computer
programs to compute the compressibility factor, Z, the molar density, d, the mass density, p,
and the supercompressibility factor, Fpv.

The computer programs provided in this document can be used for the following
purposes: (1) direct use for computation of Z, d, p, and Fpv; (2) as a guide for the development
of subroutines for computations of Z, d, p, and Fpv for incorporation in other computer codes,
such as orifice flow computer programs; (3) for verification purposes when new flow programs
are developed; and (4) for utility purposes, such as modification to produce tabulations of Z,
p, or Fpy for particular gas mixture compositions. The programs are documented and are
consistent with the equations and methods presented in this document. The programs can be

Property of PT. NISCONI


34

used for example computation purposes and for development of specific application
subroutines or programs.

10.1 Documentation for Computer Programs

Computer program documentation is given for the DETAIL CHARACTERIZATION


METHOD in Appendix A and for the GROSS CHARACTERIZATION METHOD in Appendix B.
The documentation includes descriptions of the main programs, all subroutines, and calculation
flow diagrams. Brief documentation also is given for a units conversion program in Appendix
D. A utility program which allows calculations using both the DETAIL CHARACTERIZATION
METHOD and the GROSS CHARACTERIZATION METHOD is documented in Appendix E.

10.2 Computer Program Code Listings

Code listings of the computer programs in FORTRAN are given for the DETAIL
CHARACTERIZATION METHOD in Appendix A and for the GROSS CHARACTERIZATION
METHOD in Appendix B. The computer program listings provided have a one-to-one
correspondence with the program documentation. A multipurpose utility driver computer
program using the units conversion program listing in Appendix D has been provided in
Appendix E. The utility driver program calls subroutines from both the DETAIL
CHARACTERIZATION METHOD program in Appendix A and the GROSS
CHARACTERIZATION METHOD program in Appendix B and provides a convenient means
for inputting and outputting data and provides calculations using either the DETAIL
CHARACTERIZATION METHOD or the GROSS CHARACTERIZATION METHOD.

11 TABLES OF COMPUTED COMPRESSIBILITY FACTORS AND


SUPERCOMPRESSIBILITY FACTORS

Tables of computed compressibility factors and supercompressibility factors are


provided for the DETAIL CHARACTERIZATION METHOD in Appendix A and for the GROSS
CHARACTERIZATION METHOD in Appendix B. These tables can be used to verify computer
programs. The tables cover a wide range of gas types.

12 UNCERTAINTIES IN COMPUTED COMPRESSIBILITY FACTORS AND


SUPERCOMPRESSIBILITY FACTORS

The expected uncertainty limits for natural gas compressibility factors computed using
the methods in this manual are summarized in Section 1.5, Uncertainty. More detailed
information regarding uncertainties in compressibility factors at typical custody transfer
conditions is presented for the DETAIL CHARACTERIZATION METHOD in Appendix A and
for the GROSS CHARACTERIZATION METHOD in Appendix B.

Property of PT. NISCONI


35

APPENDIX A

DETAIL CHARACTERIZATION METHOD

APPENDIX A.1 - NOMENCLATURE .... , ................................ 37


APPENDIX A.2 - COMPUTATION PROCEDURES ...... " .......... , ........ 38
APPENDIX A.3 - COMPUTER PROGRAM DOCUMENTATION ................. 40
APPENDIX A.4 - FORTRAN CODE LISTING . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 49
APPENDIX A.S - COMPUTER PROGRAM CALCULATIONS ................... 74
APPENDIX A.6 - CALCULATION UNCERTAINTIES ......................... 76
APPENDIX A.7 - REFERENCES ........................................ 79

Property of PT. NISCONI


Property of PT. NISCONI
37

APPENDIX A.1

NOMENCLATURE

Symbol = Represented Quantity

AAD = average absolute deviation


B =second virial coefficient
BIAS = bias
Cn = coefficients which are function of composition
d = molar density
Fpv =supercompressibility factor
Max.Dev. = maximum value of ~
N = number of data points
P = absolute pressure
R = gas constant
RMS = root mean squared deviation
Std.Dev. = standard deviation
T =absolute temperature
Xi = components of the mixture
Z = compressibility factor
~ = compressibility factor at base conditions
Zca'c = calculated compressibility factor
~Iff = relative percentage difference between calculated and experimental
compressibility factors
~iff.1 = ~Iff for ith data point
(~iff)max = maximum value of ~iff
4xp = experimental compressibility factor
p = mass density

Property of PT. NISCONI


38

APPENDIX A.2

DETAil CHARACTERIZATION METHOD COMPUTAnON PROCEDURES

A.2.1 Computations of Compressibility Factors and Densities

Figure A.2.1 gives the procedure used for computation of the compressibility factor Z
using the DETAil CHARACTERIZATION METHOD in Section 8.1.

1. Input is made of the mole fractions of the components in the gas. The gas
mixture molar mass is calculated using Equation 3, Section 4.

2. Input is made for the temperature and pressure for which the computation of
the compressibility factor is desired.

3. Computation is made of the coefficients B and C~ in the equation of state.


These coefficients are functions of absolute temperature and the mole fractions
of the components in the gas mixture. Constants required for this calculation
are given in Section 8.1 in Tables 3, 4 and 5. Equations 15 through 23, Section
8.1.2, are required for the computations of B and C~.

4. The molar density d is computed using the equation of state relation for the
pressure P given in Equation 24, Section 8.1.3. The computation procedure
used is referred to as Brenfs method and is given in Reference 5 In App~ndix
A.7. In the iterative procedure for solving for the molar density d, the
convergence criterion is either agreement of the pressure calculated using
Equation 24 with the specified pressure within an absolute relative deviation of
1xl 0-6 or agreement of successive iterative values of d within an absolute
relative deviation of lxl0-6. The mass density is calculated using Equation 4.

5. The compressibility factor Z is computed using Equation 12, Section 8.12.

A.2.2 Computations of Other Quantities

Other quantities of interest such as the supercompressibility factor, the density at


contract conditions and the volumetric gross heating value for specified reference conditions
can be calculated using relations in Equations 1-11 in Sections 4 and 6 and Appendix C.

Property of PT. NISCONI


39

Input
T,P,~

!
Compute coefficients
B,C;

No

!
Iterate
P =dRT[1 +B +..]
t9 get d

Yes
!

IZ=1+Bd+1

I Output Z,Fpv,d,p I
Figure A2..1. Procedure for Calculation of Z, F PV' d, and p

Property of PT. NISCONI


40

APPENDIX A.3

DETAIL CHARACTERIZATION METHOD


COMPUTER PROGRAM DOCUMENTATION

A.3.1 Scope

This appendix provides summary documentation for the FORTRAN language computer
program code listing which is given in Appendix A.4 for the DETAIL CHARACTERIZATION
METHOD. This documentation includes a summary flow diagram of the computer program
and descriptions of the main program and each subroutine. Additional documentation is
provided by comment statements within the computer program listing.

A.3.2 Summary Flow Diagram

Figure A.3-1 is a summary flow diagram for use of the computer program in Appendix
A.4. This computer program was developed for efficient computations of natural gas
compressibility factors using the DETAIL CHARACTERIZATION METHOD, in which the mole
percentages of gas mixture components are known.

One program driver block (Application Program) and four computation blocks are shown
in Figure A.3-1. The principal subroutine used by a given computation block is shown to the
left of that computation block. The computation blocks and the principal subroutines used are,

(1) calculation of component dependent quantities (PARAMOL),

(2) calculation of composition dependent quantities (CHARDL).

(3) calculation of temperature dependent quantities (TEMP).

(4) calculation of density dependent quantities (ODETAIL).

A.3.3 Driver Block

For efficient computations. the application program should call the principal subroutines
in a sequence corresponding to the sequence of the four computation blocks. This
computation sequence is efficient because it minimizes unnecessary repeated calculations.
An example of an unnecessary repeated calculation is the calculation of a temperature
dependent quantity each time the density is calculated at a series of pressures. even though
the temperature may be the same for some of these density calculations. Thus, if the
computation sequence in Figure A.3-1 is incorporated in any other driver program, the
efficiency of this sequence will be maintained.

Property of PT. NISCONI


41

DETAIL CHARACTERIZATION METHOD COMPUTER PROGRAM STRUCTURE

APPlICATION
PROGRAM

CAlCULATION OF
PARAMDl COMPONENT
DEPENDENT
ClUANTlTIES

~TIONOF
CHAROl COMPOStroN
DEPENDENT
QUANT1TIES

CALCUlATION OF
iEMP TEUPERA1\JRE
DEPENDENT
QUANTITIES

CALCUlATION OF
DOETAil DENSfTY
DEPENDENT
0UANTIT1ES

PRESSURE ctMGE

TEMPERATURE CHANGE

COMPOStroN CHANGE

CHANGE IN COMPONENTS

Agure A.3-1. Computation Sequence for DETAIL CHARACTERIZATION METHOD Computer


Program

Property of PT. NISCONI


42

A.3.4 Component Dependent Quantities Block

The computer program structure shown in Figure A.3-1 corresponds to the four levels
of information which are required in the DETAIL CHARACTERIZATION METHOD equation of
state. First, the components of which the gas mixture is composed must' be identified. The
number of components, NCC, and the component identification numbers, CID(1), CID(2), ... ,
CID(NCC), are required by subroutine PARAMDL PARAMDL obtains fixed parameters from
BLOCK DATA and calculates other parameters required subsequently. This completes the first
computation block. Note that for most efficient computation, subroutine PARAMDL is never
called again until the components in the gas mixture change.

A.3.S Composition Dependent Quantities Block

For computations in the second computation block, the composition of the gas mixture
must be identified. The mole percentages of each component, XI(1), XI(2), ... , XI(NCC), are
required by subroutine CHARDL CHARDL calculates composition dependent quantities which
are required subsequently. Note that for most effICient computation, CHARDL subroutine is
never called again until there is a change in the composition of the gas mixture.

A.3.6 Temperature Dependent Quantities Block

For computations in the third computation block, the temperature must be identified.
Subroutine TEMP requires the absolute temperature T. TEMP calls subroutine B, which
calculates the second virial coefficient B for the gas mixture at the temperature T. TEMP then
calculates the other coefficients in the equation of state for the gas mixture, C~. for the
absolute temperature T. Note that for most efficient computation. subroutine TEMP and
subroutine B are never called again until there is a change in the temperature of the gas
mixture.

A.3.7 Density Dependent Quantities Block

For computations of density and density dependent quantities in the fourth computation
block, the pressure must be identified. Function DDETAIL requires the absolute pressure P.
DDETAIL uses Brent's method to solve for the density of the gas mixture of composition XI(1).
XI(2), .... XI(NCC) at absolute temperature T and specified absolute pressure P. Function
DDETAIL calls subroutine BRAKET, which determines two values of density. RHOL and
RHOH, which, when used in the equation of state, yield calculated absolute pressures PRHOL
and PRHOH which bracket the specified pressure P. The densities RHOL and RHOH, which
bracket the solution for density at the specified pressure P, are then used in function DDETAIL
to solve for the density corresponding to the specified pressure P. Both function DDETAI Land
subroutine BRAKET call function POETAIL, which calculates the pressure for a specified
density, RHO. Function PDETAIL calls function ZDETAIL, which calculates the compressibility .
factor for a specified temperature and density.

Property of PT. NISCONI


43

A.3.S Descriptions of Functions and Subroutines

FORTRAN functions and subroutines used to calculate density related properties from
the DEIAIL CHARACTERIZAnON MODEL are listed below. These routines are available in
the module DETAILXZ.FOR, listed in Appendix A.4.

FUNCTION DDETAIL (P, T)


FUNCTION PDETAIL (0, T)
FUNCTION ZDETAIL (0, T)

SUBROUTINE B (T. BMIX)


SUBROUTINE BRAKET (CODE, T, P, RHO, RHOL, RHOH, PRHOL, PRHOH)
SUBROUTINE CHARDL (Nee, XI, ZB, DB)
SUBROUTINE PARAMDL (NCe, CID)
SUBROUTINE TEMP (T)
BLOCK DATA

A.3.S.1 BLOCK DATA

BLOCK DATA is a block data section which contains the fixed constants used in the
equation of state computations of the compressibility factor using the DETAIL
CHARACTERIZATION METHOD. These fixed constants include the gas constant, RGAS, the
equation of state constants, A(l) through A(58), compound characterization parameters, that
is, the molecular masses CMWB(J) for each compound, energy, size and orientation
parameters EIB(J), RKIB(J), and WIB(J) for each compound, and the binary interaction
parameters BEIJB(I,J), BKIJB(I,J), BWIJB(I,J), and BUIJB(I,J).

A.3.8.2 Subroutine PARAMDL

Subroutine PARAMDL assigns component and binary parameters for a mixture


containing NCC components with component identification numbers CID(l), CID(2), ... ,
CID(NCC) from Tables 5 and 6. Pure component and binary parameters in BLOCK DATA
which are required by PARAMDL are accessed through the common block
COMMON/PARAM!.

A.3.8.3 Subroutine CHARDL

. Subroutine CHARDL calculates a number of composition dependent quantities using


tfie mole percent values for the components in the mixture, XI(l), XI(2), ... XI(NCC). The mole
percent values are used to calculate normalized mole tractions by dividing each component
mole percent by the sum of the component mole percents. The gas mixture average molar
mass is calculated as the molar average of the component molar masses. Composition
dependent coefficients of temperature functions in the second vi rial coefficient are calculated
for subsequent use in subroutine B. Also calculated are values of the mixture size parameter
(~in the text and RK3PO in the program), the mixture quadrupole parameter (Ci in the text
and Q2PO in the program), the mixture energy parameter (U in the text and U in the program),
and the mixture orientation parameter (W in the text and W in the program).

Property of PT. NISCONI


44

A.3.8.4 Subroutine B

Subroutine B calculates the second vi rial coefficient for the gas mixture at the absolute
temperature T. The required composition dependent coefficients are accessed through
COMMONNIRI. The computed second virial coefficient BMIX is made accessible through the
subroutine argument.

A.3.8.S Subroutine TEMP

Subroutine TEMP calculates a number of quantities which are functions of temperature


but not density. These quantities are B1 through B12 and FN(13) through FN(58), which are
related to the coefficients of the density functions in the equation of state. Required mixture
parameters are accessed through COMMON/AGAVARIABLESI. Required equation of state
parameters are accessed from BLOCK DATA through COMMONlEOSAII. The required
absolute temperature T is accessed through the subroutine TEMP argument. Subroutine
TEMP calls subroutine B for the calculation of the second virial coefficient at the absolute
temperature T. The quantities calculated in subroutine TEMP are made accessible through
COMMONIAGAVARIABLESI and COMMON/AGAEOS/.

A.3.8.S Function Subprogram DOETAIL

Function subprogram DDETAIL uses Brent's method to calculate the molar density for
the specific temperature and pressure in argument of DDETAIL (P, T).

DDETAIL calls subroutine BRAKET, which brackets the solution for the density.
BRAKET determines two values of density, RHOL and RHOH, which, when used in the
equation of state, yield calculated absolute pressures PRHOL and PRHOH which bracket the
specified pressure P. The densities RHOL and RHOH, which bracket the solution for density
at the specified pressure P, are then used by DDETAIL as initial values for ~se in Brent's
method.

The first iteration of Brent's method uses inverse linear interpolation between RHOL
and RHOH to estimate a third trial root. Subsequent iterations of Brent's method make the
most efficient choice between inverse quadratic interpolation, inverse linear interpolation and
bisection to estimate a new trial root. New trial roots in a given iteration are not allowed to
step outside of the current bounds which bracket the solution for density (if an interpolation
fails to stay within the bracketing bounds, the method defaults to the bisection method for that
iteration).

DDETAIL calls function subprogram PDETAIL for the calculation of the absolute
pressure at trial density roots. The iterative calculation is considered converged in DDETAIL
when the absolute value of the difference between the calculated pressure and the specified
pressure is less than the product of the specified absolute pressure and the pressure
convergence tolerance EPSP and when the absolute value of the difference between two
densities which bracket the solution is less than the product of the more accurate density and
the density convergence tolerance EPSR. The two convergence tolerances EPSP and EPSR
are specified in DDETAIL. The maximum allowed number of iterations, ITMAX, also is
specified in the data statement. The quantity EPSMIN, which must be smaller than EPSR and
Property of PT. NISCONI
45

greater than the machine floating point precision for the computer being used, must also be
specified in DDETAIL so that iterative steps in density which are smaller than the computer
precision will not be attempted. The quantity CODE is initialized to 0.0; CODE is set to 1.0
in subroutine BRAKET when there is a maximum in pressure versus density at a pressure
below the specified absolute pressure P.

A.3.S.7 Subroutine BRAKET

Subroutine BRAKET determines two densities, RHOL and RHOH, which bracket the
solution for density. The corresponding absolute pressures, PRHOL and PRHOH, bracket the
specified pressure P. Thus, when the density RHOL is used in the equation of state, the
absolute pressure PRHOL is calculated, such that PRHOL<P. Similarly, when the density
RHOH is used in the equation of state, the absolute pressure PRHOH is calculated, such that
PRHOH>P .

. The first trial values for density in BRAKET are RH01 =0.0 and RH02. RH02 is
approximately the ideal gas equation density. This density is then used in the equation of
state to calculate the pressure P2; BRAKET calls function PDETAIL for this calculation. If
=
P2>P then the solution for density is bracketed between RHOL 0.0 (for which PRHOL 0.0) =
= =
and RHOH RH02 (for which PRHOH P2); BRAKET then retums these results to DDETAIL
through the subroutine BRAKET argument.

When the trial for density in BRAKET, RH02 yields a value of P2 which is less than
P, an algorithm is initiated to bracket the solution for density. In this algorithm, the trial density
is increased iteratively until the calculated absolute pressure exceeds the specified absolute
pressure P. The density is then bracketed between the values of density from the final two
iterations. In the first step, the density is increased by DEL. In subsequent steps, the density
is increased by twice the previous value of DEL. The solution for density is bracketed in this
manner and the resultant values of RHOl, RHOH, PRHOl and PRHOH are retumed to
DDETAIL through the subroutine BRAKET argument. If an iterative value of the calculated
absolute pressure is less than a previous value, this indicates that there is a maximum in
pressure versus density at a pressure less than P. Then CODE is changed from 0.0 to 1.0
and the density from the previous iteration is retumed to DDETAIL as RHO in argument list
of subroutine BRAKET. Function subprogram DDETAll then uses the value RHO for the
solution for density and returns this value to the calling location; Brent's method is not used
in DDETAIL in this situation because it requires two densities which bracket the solution for
density.

A.3.8.S Function Subprogram PDETAIL

Function subprogram PDETAll calculates the absolute pressure using the equation of
state equation for pressure. The function subprogram ZDETAIL is called for the calculation
of the compressibility factor.

Property of PT. NISCONI


46

A.3.8.9 Function Subprogram ZDETAIL

Function subprogram ZOETAll calculates the compressibility factor using the DETAIL
CHARACTERIZATION METHOD equation of state.

A.3.9 Example Calculations

Presented below is a computer listing for an example application. Output from the
example is listed in Table A.3-1. This example simulates a flow computer application in which
there are 20 discrete step temperature-pressure conditions and the gas composition changes
during these 20 discrete steps. The last column of Table A.3-1 gives the number of
computation blocks in Figure A.3-1 which are called for each calculation of Z.

C---------------~-------------------~-----------------------------------
PROGRAM EXAMPLE
C PURPOSE:
C This example program shows how to use the DETAIL method as a
C stand-alone program.
C COMPILED WITH:
C DETAILXZ.FOR - Source code which contains routines for calculating
C properties with the DETAIL CHARACTERIZATION METHOD.
C UNITS.FOR - Source code which contains unit conversion routines.
C---------------------------------------------------------~-------------
INTEGER I, CIDH(21), NCCH, IH, CID(21), NCC, ICOMP, ILEVEL, ITABLE
REAL*8 D, Z, ZB, DB, FPV, TK, PMP, DDETAIL, ZDETAIL, UNITS
REAL*8 TPATA(20), PDATA(20), XK(21,2), XI(21),. XIH(21), XIC(21)
C-----------------------------------------------------------------------
C Set up pressure & temperature arrays:
C TDATA() - Array of temperatures in degrees F.
C PDATA() - Array of pressures in psia.
C Set up composition tables:
C XK(I,J) Array of mole fraction compositions.
C 1 - Methane 8 - Hydrogen 15 - n-Hexane
C 2 - Nitrogen 9 - Carbon Monoxide 16 - n-Heptane
C 3 - Carbon Dioxide 10 - Oxygen 17 - n-Octane
C 4 - Ethane 11 - i-Butane 18 - n-Nonane
C 5 - Propane 12 - n-Butane 19 - n-Decane
C 6 - Water 13 - i-Pentane 20 - Helium
C 7 - Hydrogen Sulfide 14 - n-Pentane 21 ~ Argon
C-----------------------------------------------------------------------
DATA (TDATA(I), 1=1, 20) 165. DO, 65 .DO, 65. 05DO ,65. 05DO, 65. 05DO,
& 65.05DO,65.05DO,65.05DO,65.05DO,65.1DO,65.15DO,65.15DO,65.15DO,
& 65.15DO,65.15DO,65.15DO,65.15DO,65.15DO,65.2DO,65.25DO 1
DATA (PDATA(I),I=l,20)/750.DO,750.5DO,751.DO,751.DO,751.0DO,
& 751.0DO,751.DO,751.5DO,751.5DO,752.DO,752.5DO,752.5DO,752.5DO,
& 752.5DO,752.5DO,753.DO,753.5DO,753.5DO,754.DO,754.DOI
C-----------------------------------------------------------------------
C The following two compositions are for Gulf Coast Gas and Amarillo Gas.
C-----------------------------------------------------------------------
DATA (XK(I,1),I=1,21)/.965222DO,.002595DO, .005956DO,.018186DO,
& .004596DO,O,0,0,O,O,0.000977DO,O.001007DO,.000473DO,.000324DO,
& .000664DO,O,O,O,O,O,01
DATA (XK(I,2),I=l,21)/.906724DO,.031284DO,.004676DO,.045279D0,
& .00828DO,0,O,O,O,O,O.OOl037DO,0.001563DO,.000321DO,.000443DO,
& .000393DO,0,0,0,O,O,01
ICOMP = 1
ITABLE = 20

Property of PT. NISCONI


47

OPEN (UNIT=l,FILE='T~3_1')
WRITE (1,11)
11 FORMAT (1/,33X, 'TABLE A.3-1',I,
& 24X, 'Detail Characterization Method',/,
& 25X, 'OUtput from EXAMPLE Program',/,
& 22X, 'For Program Verification Purposes',//)
WRITE (1,12)
12 FORMAT (SX,'VALUE',4X,'T (F) ',4X,'P (psia)',4X,'D (lbm/ft"3)',
& 5X, , Z' , lOX, ' FPV' , 3X, 'LEVEL' , / , 4X, 72 ( , -' )., /)
C-------------------------------------------------------~---------------
C Start DO loop to set up Table with ITABLE Values.
C Change to second Composition at 10th Table Value.
C-----------------------------------------------------------------------
DO IH=l, ITABLE
IF (IH.EQ.10) ICOMP = 2
NCC = 0
ILEVEL = 0
DO 1=1, 21
IF (XK(I,ICOMP).NE.O) THEN
NCC = NCC + 1
CID(NCC) = I
XI (NCC) = XK(I,ICOMP)
XIC(NCC) = XK(I,ICOMP)
ENDIF
ENDOO
IF (IH.EQ.1) GOTO 400
C-----------------------------------------------------------------------
C Check last values (NCCH, CIDH, XIH, etc.) with new values to see if
C they are different. For th~ first pass, call all subroutines. If the
C composition has changed, call CHARDL. If the temperature is different,
C recalculate the virial coefficients. If the pressure is different,
C recalculate the density. If nothing has changed, print the previous
C results. The LEVEL column is interpreted as follows:
C 0 No change
C 1 Pressurecnange
C 2 -- Temperature change
C 3 -- Gas characterization change
C 4 -- Set up GROSSXZ constants
C-----------------------------------------------------------------------
IF (NCCH.NE.NCC) GOTO 400
DO I=l,NCC
IF (CIDH (I).NE.CID(I GOTO 400
ENDOO
00 I=l,NCC
IF(XIH(I).NE.XI(I GOTO 300
ENDOO
IF (TDATA(IH).NE.TDATA(IH-1 GOTO 200
IF (PDATA(IH).NE.PDATA(IH-1 GOTO 100
GOTO 10
C-----------------------------------------------------------------------
C Start the calculation process by calling the appropriate subroutine.
C-----------------------------------------------------------------------
400 CALL PARAMDL(NCC, CID)
ILEVEL = ILEVEL + 1
300 CALL CHARDL(NCC, XI, ZB, DB)
ILEVEL = ILEVEL + 1
200 TK = UNITS (TDATA(IH) , 'T', 'F 'K ')
CALL TEMP (TK)
ILEVEL = ILEVEL + 1
100 PMP = UNITS (PDATA(IH) , 'P', 'psia , 'MPa ')
ILEVEL = ILEVEL + 1
D = DDETAIL(PMP, TK)
.Z = ZDETAIL(D, TK)
FPV = DSQRT(ZB/Z)
D = UNITS(D, 'D' ,'mol/drn"3 'lbm/ft"3 ')

Property of PT. NISCONI


48

C-----------------------------------------------------------------------
C Print results.
C---------------------------------------~-------------------------------
10 WRITE (1,1000) IH, TDATA(IH), PDATA(IH), D, Z, FPV, ILEVEL
1000 FORMAT (4X,I5,2F12.6,F13.5,F12.6,F13.5,2X,I2)
C--------------------------------------------------------------------~--
C Hold values for checking in next iteration.
C-----------------------------------------------------------------------
DO I=l,NCC
CIDH(I) = CID(I)
XIH(I) = XIC(I)
ENDDO
NCCH = NCC
ENDDO
999 END

TABLE A.3-1
Detail Characterization Method
Output from EXAMPLE Program
For Program Verification Purposes

VALUE T (F) P (psia) D (lbm/ft"3) Z FPV LEVEL


------------------------------------------------------------------------
1 65.000000 750.000000 2.49294 0.897619 1.05436 4
2 65.000000 750.500000 2.49478 0.897555 1.05440 1
3 65.050000 751.000000 2.49628 0.897529 1.05441 2
4 65.050000 751.000000 .2.49628 0.897529 1.05441 0
5 65.050000 751.000000 2.49628 0.897529 1.05441 0
6 65.050000 751.000000 2.49628 0.897529 1.05441 0
7 65.050000 751. 000000 2.49628 0.897529 1.05441 0
8 65.050000 751.500000 2.49812 0.897465 1.05445 1
9 65.050000 751.500000 2.49812 0.897465 1.05445 0
10 65.100000 752.000000 2.63098 0.893031 1. 05702 3
11 65.150000 752.500000 2.63256 0.893004 1.05703 2
12 65.150000 752.500000 2.63256 0.893004 1. 05703 0
13 65.150000 752.500000 2.63256 0.893004 1. 05703 0
14 65.150000 752.500000 2.63256 0.893004 1. 05703 0
15 65.150000 752.500000 2.63256 0.893004 1.05703 0
16 65.150000 753.000000 2.63451 0.892937 1.05707 1
17 65.150000 753.500000 2.63646 0.892870 1. 05711 1
18 65.150000 753.500000 2.63646 0.892870 1. 05711 0
19 65.200000 754.000000 2.63803 0.892843 1. 05713 2
20 65.250000 754.000000 2.63766 0.892884 1.05710 2

Property of PT. NISCONI


49

APPENDIX A.4

DETAIL CHARACTERIZATION METHOD FORTRAN CODE LISTING

Subprograms

Function DDETAIL(P,T) ............................................ 50


Function PDETAIL(D,T) ............................................. 54
Function ZDETAIL(D,T) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 55
Subroutine B(T,BMIX) ........................................... 57
Subroutine BRAKET(CODE,T,P,RHO,RHOL,RHOH,PRHOL.,PRHOH) ............ 58
Subroutine CHARDL(NCC,XI,ZB,DB) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 61
Subroutine PARAMDLNCC,CID) ............... ~ . . . . . . . . . . . . . . . . . .. 65
Subroutine TEMP(T) ............................................... 67
BLOCK DATA ............................................. . . . . . . .. 69

Property of PT. NISCONI


50

C================================================:====
C COPYRIGHT (C) 1992, 1994 AMERICAN GAS ASSOCIATION
C ALL RIGHTS RESERVED
C COPYRIGHT APPLIES TO ALL SUBPROGRAMS
C
C FOR INFORMATION CONTACT:
C DR. JEFFREY L. SAVIDGE
C GAS RESEARCH INSTITUTE
C 8600 W. BRYN MAWR AVE.
C CHICAGO, IL 60631
C PHONE (312) 399-8100, FAX (312) 399-8170
C
C OR: MS. LORI TRAWEEK
C AMERICAN GAS ASSOCIATION
C 1515 WILSON BOULEVARD
C ARLINGTON, VA 22209
C PHONE (703) 841-8400
C
C PROGRAM WRITTEN BY KENNETH STARLING
C=====================================================
C VERSION 1.2
C====================~============================:=======
FUNCTION DDETAIL(P, T)
C
C PURPOSE:
C Calculates density for the AGA8 model given
C pressure and temperature. This function uses Brent's method
C and PDETAll to determine the density.
C
C DESCRIPTION OF ARGUMENTS:
C P - Pressure in MPa. (Input)
C T - Temperature in kelvins. (Input)
C DDETAll - Molar density at P and T in moVdrn"-3. (Output)
C-----------------------------------------------------------------------
REAL*8 DHIGH, PLOW, PHIGH, TLOW, THIGH
COMMONILIMITS/ DHIGH, PLOW, PHIGH, TlOW, THIGH

INTEGER IMAX, I, CODE


REAl*8 EPSP, EPSR, EPSMIN, T, P, RHO, RHOl, RHOH, PRHOL, PRHOH
REAL*8 DDETAIL, PDETAIL, X1, X2, X3, Y1, Y2, Y3
REAL*8 DED(, DElPRV. D~LMIN, DElBIS, XNUMER, XDENOM, SGNDEl
REAL*8 Y2MY3, Y3MY1, Y1 MY2. BOUNDN

IMAX = 150
EPSP = 1.0-6
EPSR 1.0-6=
EPSMIN 1.0-7 =
CODE = 0

Copyright C 1992, 1994 American Gas Association


All Rights Reserved

Property of PT. NISCONI


51

C ... CALL SUBROUTINE BRAKET TO BRACKET DENSITY SOLUTION


CALL BRAKET (CODE,T,P ,RHO,RHOL,RHOH,PRHOL,PRHOH)

C .....CHECK VALUE OF -CODE- RETURNED FROM SUBROUTINE BRAKET


IF (CODE.EQ.1.0R.CODE.EQ.3) THEN
DDETAIL = RHO
RETURN
ENDIF

C .. SET UP TO START BRENT'S METHOD


C X IS THE INDEPENDENT VARIABLE, Y THE DEPENDENT VARIABLE
C DELX IS THE CURRENT ITERATION CHANGE IN X
C DELPRV IS THE PREVIOUS ITERATION CHANGE IN X
X1 = RHOL
X2=RHOH
Y1 = PRHOL - P
=
Y2 PRHOH - P
DELX = X1-X2
DELPRV = DELX

C..... NOTE THAT SOLUTION IS BRACKETED BElWEEN X1 AND X2


C .....A THIRD POINT X31S INTRODUCED FOR QUADRATIC INTERPOLATION
X3 =X1
Y3 =Y1

C ....NOTE THAT ITERATIVE LOOP STARTS HERE, ENDS AT -10 CONTINUE-

DO 10 1=1, IMAX
C ....... Y3 MUST BE OPPOSITE IN SIGN FROM Y2, SO SOLUTION BElWEEN X2, X3
IF (y2*Y3.GT.O.DO) THEN
X3 = X1
Y3 =Y1
=
DELX X1-X2
DELPRV = DELX
ENDIF

C....... Y2 MUST BE VALUE OF Y CLOSEST TO Y=O.O, THEN X2NEW=X20Lo+DELX


IF (DABS(Y3).LT.DABS(Y2) THEN
X1 = X2
X2=X3
X3 = X1
Y1 =Y2
Y2=Y3
Y3 = Y1
ENDIF

C...... DELMIN IS MINIMUM ALLOWED STEP SIZE FOR UNCONVERGED ITERATION


C SMALLER STEPS THAN DELMIN CAN CAUSE OSCILLATIONS

Copyright e 1992. 1994 American Gas Association


All Rights Reserved

Property of PT. NISCONI


52

DELMIN = EPSMIN*DABS(X2)

C ....IF PROCEDURE IS NOT CONVERGING, I.E., ABS(y2ABS(y1),


C OR IF DELPRV IS LESS THAN DELMIN, I.E., INTERPOLATION
C IS CONVERGING TOO SLOWLY, USE BISECTION
C DELSIS = O.5DO*(X3 - X2) IS THE BISECTION DELX
DELBIS = O.5DO*(X3 - X2)

C ..TESTS TO DECIDE NUMERICAL METHOD FOR CURRENT ITERATION

IF (DABS(DELPRV).LT.DELMIN .OR. DABS(y1).LT.DABS(Y2 THEN


C .... USE BISECTION
DELX = DELBIS
. DELPRV = DELBIS

ELSE

IF (X3.NE.X1) THEN
C .... USE INVERSE QUADRATIC INTERPOLATION
Y2MY3 = Y2-Y3
Y3MY1 = Y3-Y1
Y1MY2 = Y1-Y2
XDENOM = -(Y1 MY2)*(Y2MY3)*(Y3MY1)
XNUMER = X1 *Y2*Y3*(y2MY3)+X2*Y3*Y1 *(Y3MY1)
& +X3*Y1 *Y2*(Y1 MY2)-X2*XDENOM
ELSE
C .....USE INVERSE LINEAR INTERPOLATION
XNUMER = (X2-X1 )*Y2
XDENOM = Y1-Y2
ENDIF

C ........ FOLLOWING BRENrS PROCEDURE, BEFORE CALCULATING DELX,


C CHECK THAT DELX=XNUMERlXDENOM DOES NOT STEP OUT OF BOUNDS
IF (2.DO*DABS(XNUMER).LT.DABS(DELPRV*XDENOM THEN
C ......... PROCEDURE CONVERGING, USE INTERPOLATION
DELPRV =DELX
DELX = XNUMERlXDENOM
ELSE
C ........ PROCEDURE DIVERGING, USE BISECTION
DELX = DELSIS
DELPRV = DELBIS
ENDIF

ENDIF

C .. CHECK FOR CONVERGENCE


IFDABS(Y2).LT.EPSP*P).AND.(DABS(DELX).LT.EPSR*DABS(X2))) THEN
DDETAIL = X2+DELX

Copyright C 1992. 1994 American Gas Association


AU RIghts Reserved

Property of PT. NISCONI


53

RETURN
ENDIF

C ......WHEN UNCONVERGED, ABS(DELX) MUST BE GREATER THAN DELMIN


C MINIMUM ALLOWED MAGNITUDE OF CHANGE IN X2 IS 1.0000009*DELMIN
C SGNDEL, THE SIGN OF CHANGE IN X2 IS SIGN OF DELBIS
IF (DABS(DElX).LT.DELMIN) THEN
=
SGNDEL DELBISIDABS(DELBIS)
DELX = 1.0000009*SGNDEL*DELMIN
DELPRV = DELX
ENDIF

C ..... FINAL CHECK TO INSURE THAT NEW X2 IS IN RANGE OF OLD X2 AND X3


C ..... BOUNDN IS NEGATIVE IF NEW X2 IS IN RANGE OF OLD X2 AND X3
BOUNDN = DELX*(X2+DELX-X3)
IF(BOUNDN.GT.O.DO) THEN
C ........ PROCEDURE STEPPING OUT OF BOUNDS, USE BISECTION
DELX = DELBIS
=
DELPRV DELSIS
ENDIF

C ....... RELABEL VARIABLES FOR NEXT ITERATION


C X1NEW=X20LD,Y1NEW=Y20LD
Xl =X2
Yl = Y2
C ....... NEXT ITERATION VALUES FOR X2, Y2
X2 = X2+DELX
Y2 = POETAIL(X2, T) - P

C ..... RETURN TO START OF LOOP FOR NEXT ITERATION

10 CONTINUE

WRITE (*,*) 'DDETAIL: MAXIMUM NUMBER OF ITERATIONS EXCEEDED'

DDETAIL = X2
RETURN
EN!;>

Copyright C 1992, 1994 American Gas Association


All Rights Reserved

Property of PT. NISCONI


54.

C====================================================
FUNCTJONPDETAIL(D, T)
C
C PURPOSE:
C Calculates the pressure from the AGA8 model as a function of
C density and temperature.
C
C DESCRIPTION OF ARGUMENTS:
C o - Molar density in moVdmA3. (Input)
C T - Temperature In keMns. (Input)
C PDETAIL - Pressure In MPa. (Output)
C--
INTEGER PRoo
REAL*8 RGAS, MXNUMER, MW(5)
COMMON/CONSTANTS! PRoo, RGAS, MXNUMER. MW

REAL*8 0, T, PDETAIL. ZDETAIL

PDETAIL =ZDETAIL(D, T)*D*RGAS*T


RETURN
END

Copyright C 1992. 1994 American Gas Associatlon


All Rights Reserved

Property of PT. NISCONI


55

C========================================================
FUNCTION ZDETAIL(D, T)
C
C PURPOSE:
C This function calculates the compressibility factor from the
C AGA8 model as a function of density and temperature.
C
C DESCRIPTION OF ARGUMENTS:
C 0 - Molar density in moVdmA3. (Input)
C T - Temperature in kelvins. (Input)
C ZOETAIL - Compressibility factor. (Output)
C-----------------------------------------------------------------------
REAL*8 FN(58)
COMMON/AGAEOSI FN

REAL*8 UU,RK3PO,WW,Q2PO,HH,BMIX
COMMON/AGAVARIABLESI UU,RK3PO,WW,Q2PO,HH,BMIX

REAL*8 TOLD
COMMONITOLDCI TOLD

REAL*8 01, 02, 03, 04, OS, 06, 07, 08, 09, EXP1, EXP2, EXP3, EXP4
REAL*8 0, T, ZDETAIL

IF (T.NE.TOLD) CALL TEMP(T)


TOLD = T
01 = RK3PO*D
02 = 01*01
03 = 02*01
04 = 03*01
05 = 04*01
06 = 05*01
07 = 06*01
08 = 07*01
09 = 08*01

EXP1 =
OEXP(-01)
EXP2 = OEXP(-02)
EXP3 = OEXP(-03)
EXP4 = OEXP(-04)

ZDETAIL = 1.00 + BMIX*O


& + FN(13)*01 *(EXP3 - 1.00 - 3.00*03*EXP3)
& + (FN(14) + FN(1S) + FN(16*01*(EXP2 - 1.00 - 2.00*02*EXP2)
& + (FN(17) + FN(18*01*(EXP4 - 1.00 - 4.00*04*EXP4)
& + (FN(19) + FN(20*02*2.o0
& + (FN(21) + FN(22) + FN(23*02*(2.00 - 2.00*02)*EXP2
& + (FN(24) + FN(2S) + FN(26*02*(2.00 - 4.00*04)*EXP4

Copyright C 1992, 1994 American Gas AssocIation


All Rights Reserved

Property of PT. NISCONI


56

& + FN(27)*D2*(2.DO - 4.00*04)*EXP4


& + FN(2S)*D3*3.DO
& + (FN(29) + FN(30))"D3*(3.00 - 01 )*EXP1
& + (FN(31) + FN(32*D3*(3.00 - 2.DO*02)*EXP2
& + (FN(33) + FN(34*D3*(3.00 - 3.DO*03)*EXP3
& + (FN(35) + FN(36) + FN(37*03*(3.00 - 4.00*04)*EXP4
& + (FN(38) + FN(39*D4*4.DO
& + (FN(40) + FN(41) + FN(42*04*(4.00 - 2.00*02)*EXP2
& + (FN(43) + FN(44*D4*(4.00 - 4.DO*04)*EXP4
& + FN(4S)*DS*S.OO
& + (FN(46) + FN(47*DS*(S.OO"- 2.DO*02)*EXP2
& + (FN(48) + FN(49*DS*(S.OO - 4.00*04)*EXP4
& + FN(SO)*D6*6.00
& + FN(S1)*D6*(6.00 - 2.DO*02)*EXP2
& + FN(S2)*07*7.DO
& + FN(S3)*07*(7.DO - 2.DO*D2)*EXP2
& + FN(54)*OS*(S.OO - D1)*EXP1
& + (FN(SS) + FN(S6*DS*(S.OO - 2.DO*D2)*EXP2
& + (FN(S7) + FN(SS*D9*(9.DO - 2.DO*D2)*EXP2
END

Copyright C 1992, 1994 American Gas Association


All RIghts Reserved

Property of PT. NISCONI


S7

C:================================================
SUBROUTINE B(T,BMIX)
C
C PURPOSE:
C Calculates the second vi rial coefficient using the AGA8
C method given temperature.
C
C DESCRIPTION OF ARGUMENTS:
C T - Temperature in kelvins. (Input)
C 8MIX. - Second vi rial coefficient in moVdml\3. (Output)
C---------------------------------------
REAL"8 B1,82,83,84,8S,86,87,88,B9,B10,811,812,813,
& B14,81S,816,B17,818
COMMONNIRI 81 ,82,83,84,8S,86,87,88,89,810,811,812,813,
& 814,81S,816,817,818

REAL"8 TOPS, T2PO, T3PO, T3PS, T4PS, T6PO, T11PO, BMIX, T


REAL"8 T7PS,T9PS,T12PO,T12PS

TOPS =
DSQRT(T)
T2PO =
T"T
T3PO = T"T2PO
T3PS =
T3PO"TOPS
T4PS = T"T3PS
T6PO = T3PO"T3PO
=
T11PO T4PS"T4PS*T2PO
T7PS = T6PO"T"TOP5
T9PS = T7PS*T2PO
=
T12PO T9PS*TOP5*T2PO
T12PS = T12PO"TOPS
8M IX = 81+ 82fTOPS + 831T + 841T3PS + BS"TOP5 + B6fT4P5
& + ~7ITOPS+ 881T7PS + 891T9P5 + 810fT6PO + 811fT12PO
& + B12fT12P5 + B13"T6PO + B141T2PO + B1SIT3PO + 8161T2PO
& + 8171T2PO + 8181T11PO
RETURN
END

Copyright C 1992,1994 American Gas Association


All Rights Reserved

Property of PT. NISCONI


58

C=================================================
SUBROUTINE BRAKET (CODE, T, P, RHO, RHOL, RHOH, PRHOL, PRHOH)
C
C PURPOSE:
C Brackets the density solution.
C------ -------------------
INTEGER PROG
REAL*8 RGAS, MXNUMER, MW(5)
COMMON/CONSTANTS! PROG, RGAS, MXNUMER, MW

REAL*8 UU,RK3PO,WW,Q2PO,HH,BMIX
COMMON/AGAVARIABLESI UU,RK3PO,WW,Q2PO,HH,BMIX

INTEGER IMAX, IT, CODE .


REAL*8 DEL, RHOMAX, T, P, RHO, PDETAIL, VIDEAL
REAL*8 RHOLt PRHOL, RHOH, PRHOH, RH01, RH02, P1, P2

CODE =0
IMAX = 200

RH01 = 0.00
P1 = 0.00
RHOMAX = 1.DO/RK3PO
IF (T.GT.1.259300*UU) RHOMAX 20.00*RHOMAX =
=
VIDEAL RGAS*TIP
IF(DABS(BMIX).LT.(0.167DO*VIDEAL THEN
RH02 = 0.95D01(VIDEAL+BMIX)
ELSE
=
RH02 1.15DONIDEAL
ENDtF

C .....NOTE: PRESSURE (P2) AT DENSITY RH02 NOT YET CALCULATED

DEL = RH02l20.DO
IT=O

C ....START ITERATIVE DENSITY SEARCH LOOP

10 IT = IT + 1

IF (IT.GT.lMAX) THEN
C .... MAXIMUM NUMBER OF ITERATIONS EXCEEDED
CODE =3
WRITE (*, 1010)
RHO = RH02
RETURN
ENDIF

Copyright C 1992, 1994 American Gas AssocIation


All Rights Reserved

Property of PT. NISCONI


59

IF (CODE.NE.2 .AND. RH02.GT.RHOMAX) THEN


C ....... DENSITY IN BRAKET EXCEEDS MAXIMUM ALLOWABLE DENSITY
CODE =2
WRITE (*, 1020)
DEL = 0.01 DO*(RHOMAX - RH01) + P/(RGAS*T)/20.DO
RH02 = RH01 + DEL
GOTO 10
ENDIF

C .....CALCULATE PRESSURE P2 AT DENSITY RH02


P2 = PDETAIL(RH02, T)

C .....TEST VALUE OF P2 RELATIVE TO P AND RELATIVE TO P1

IF (P2.GT.P) THEN
C .......THE DENSITY ROOT IS BRACKETED (P1<P AND P2>P)
RHOL= RH01
PRHOL = P1
RHOH = RH02
PRHOH = P2
RETURN

ELSEIF (P2.GT.P1 .AND. CODE.EO.2) THEN


C ....... ~ETAIN CONSTANT VALUE FOR DEL (CODE=2)
RH01 = RH02
P1 = P2 .
=
RH02 RH01 + DEL
GOTO 10

ELSEIF (P2.GT.P1. AND. CODE.EO.O) THEN


C .......INCREASE VALUE FOR DEL (CODE=O)
DEL = 2.00*DEL
RH01 = RH02
P1 = P2
RH02 = RH01 + DEL
GOTO 10
ENDIF

C .....ABOVE IF/ELSEIF CONDITIONS UNSATISFIED IMPLIES P2<P1


C CODE=1 INDICATES THAT PRESSURE HAS A NEGATIVE DENSITY
C DERIVATIVE, SINCE P2 IS LESS THAN SOME PREVIOUS PRESSURE
CODE = 1
WRITE (*, 1030)
RHO = RH01
RETURN

1010 FORMAT(f CODE=3: MAXIMUM NUMBER OF ITERATIONS IN',


& 'BRAKET EXCEEDED', DEFAULT DENSITY USED',/)

Copyright C 1992, 1994 American Gas Association


All Rights Reserved

Property of PT. NISCONI


60

1020 FORMAT(f CODE=2: DENSITY IN BRAKET EXCEEDS MAXIMUM',


& 'ALLOWABLE DENSITY'I DEFAULT PROCEDURE USED'/)
1030 FORMAT(f CODE=1: DERIVATIVE OF PRESSURE WITH RESPECT TO',
& ' DENSITY IS NEGATIVE'I SYSTEM MAY CONTAIN LIQUID,',
& 'DEFAULT GAS DENSITY USED'/)
END

Copyright C 1992, 1994 American Gas Association


All Rights Reserved

Property of PT. NISCONI


61

C================================
SUBROUTINE CHARDL (NCC, XI, ZB, DB)
C
C PURPOSE:
c Sets up composition dependent terms. Subroutine PARAMDL should
C be called before this routine.
C
C DESCRIPTION OF ARGUMENTS:
C NCC - Number of components. (Input)
C XI - Array values for mole fraction composition. (Input)
C This array corresponds to the CID array used in
C subroutine PARAMDL.
C Z8 - Compressibility at 60F and 14.73 pSia. (Output)
C 08 - Molar density at 60F and 14.73 pSia. (Output)
C------------------------------
REAL*8 CMW(21), EI(21), RKI(21), WI(21), 01(21), HI(21), MI(21),
, & 01(21)
REAL*8 BEIJ(21 ,21 ), BKIJ(21 ,21), BWIJ(21 ,21 ), BUIJ(21 ,21 )
COMMONIPARAMI CMW, EI, RKI, WI, 01, HI, BEIJ, 8KIJ, BWIJ, BUIJ,
&MI,DI

INTEGER PROG
REAL*8 RGAS, MWX, MW(5)
COMMON/CONSTANTS! PROG, RGAS, MWX, MW

REAL*8 A(58)
COMMONlEOSAII A

REAL*881,82,83,84,85,86,B7,B8,89,B10,B11,812,813,
& B14,B15,B16,B17,818 .
COMMONNIRI 81,82,83,84,85,86,87,B8,89,810,B11 ,812,813,
& B14,B15,816,817,818

REAL*8 UU,RK3PO,WW,02PO,HH,BMIX
COMMON/AGAVARIA8LESI UU,RK3PO,WW,02PO,HH,BMIX

REAL*8 TOLD
COMMONITOLDCI TOLD

INTEGER I,. J, NCC


REAL*8 DDETAIL, ZDETAIL
REAL*8 TMFRAC, RK5PO, RK2P5, U5PO, U2P5, 01 PO
REAL*8 XIJ, EIJ, WIJ, EOP5, E2PO, E3PO, E3P5, E4P5, E6PO
REAL*8 E7P5, E9P5, E12PO, E12P5
REAL*8 E11 PO, S3, TB, PB, ZB, DB, XI(21)

TOLD =0

COpyright C 1992, 1994 American Gas Association


All Rights Reserved

Property of PT. NISCONI


62

C Normalize mole fractions and calculate molar mass


TMFRAC = 0.00
DO SO' J=1, NCC
80 TMFRAC = TMFRAC + XI(J)
DO 90 J=1, NCC
90 XI(J) = XI(J)/TMFRAC

81 = 0.00
B2 = 0.00
83 = 0.00
B4 =0.00
85 = 0.00
86 =0.00
87 =0.00
B8 =0.00
89 = 0.00
810 = 0.00
811 = 0.00
812=0.00
813 = 0.00
814 = 0.00
815 = 0.00
816 = 0.00
B17 = 0.00
818 = 0.00

RK5PO = 0.00
RK2P5=0.00
U5PO = 0.00
U2P5=0.DO
WW =0-.00
01PO = 0.00
HH = 0.00

MWX=O-
DO 5J=1,NCC
5 MWX = MWX + XI(J)*CMW(J)

DO 201=1, NCC
RK2P5 = RK2P5 + XI(I)*RKI(I)*RKI(I)*OSORT(RKI(I
U2P5 = U2P5 + XI(I)*EI(I)*EI(I)*OSORT(EI(I
WW = WW + XI(I)*WI(I)
01 PO = 01 PO + XI(I)*OI(I) -
HH = HH + XI(I)*XI(I)*HI(I)
DO 10 J=I, NCC
IF(J.NE.J) THEN
XIJ = 2.0*XI(I)*XI(J)
ELSE

Copyright C 1992, 1994 American Gas AssocIation


All Rights Reserved

Property of PT. NISCONI


63

XIJ = XI(I)"'XI(J)
ENDIF
IF (BKIJ(I,J).NE.1.00)
& RKSPO = RKSPO + XIJ"'(BKIJ(I,J)"'*5.DO - 1.00)
& * OSQRTRKI(I)"''''5)'''(RKI(J)*'''S
IF (BUIJ(I,J).NE.1.00)
& USPO = U5PO + XIJ"'(BUIJ(I,J)"'*S.DO - 1.00)
& '" OSQRTEI(I)"''''S.00)'''(EI(J)**5.00
IF (BWIJ(I,J).NE.1.00)
& ww
= WW + XIJ*(BWIJ(I,J) - 1.DO)*WI(I) + WI(JI2.DO)

C ..Tenns in second virial coefficients


EIJ = BEIJ(I,J)"'OSQRT(EI(I)"'EI(J
WIJ = BWIJ(I,J)"'(WI(I) + WI(J/2.00
EOPS = OSQRT(EIJ)
E2PO = EIJ"'EIJ
E3PO = EIJ*E2PO
E3PS = E3PO"'EOPS
E4PS = EIJ*E3PS
ESPO = E3PO*E3PO
E11 PO= E4PS*E4PS*E2PO
E7PS = E4PS*EIJ*E2PO
E9PS = E7PS*E2PO
E12PO= E11 PO"'EIJ
E12PS= E12PO*EOPS .
S3 = XIJ*OSQRTRKI(I)**3)*(RKI(J)**3
81 = 81 + S3
82 = 82 + S3*EOPS
83 = 83 + S3*EIJ
B4 = B4 + S3*E3P5
85 = 8S + S3*WIJIEOP5
8S = 8S + S3*WIJ*E4P5
87 = 87 + S3*QI(I)*QI(J)*EOPS
88 = 88 + S3*MI(I)*MI(J)*E7PS
89 = 89 + S3*MI(I)*MI(J)*E9PS
810= 810+ S3*01(1)*DI(J)*E6PO
811= 811+ S3*01(1)*01(J)*E12PO
812= 812+ S3*01(1)*DI(J)*E12P5
813 = 813 + S3*HI(I)*HI(J)IESPO
814 = 814 + S3*E2PO
815 = 815 + S3*E3PO
816 = 816 + S3*QI(I)*QI(J)*E2PO
B17 = 817 + S3*E2PO
818 = 818 + S3*E11PO
10 CONTINUE
20 CONTINUE

Copyright C 1992, 1994 American Gas AssocIation


All Rights Reserved

Property of PT. NISCONI


64

=
B1 B1*A(1)
=
B2 B2*A(2)
=
B3 S3*A(3)
=
B4 B4*A(4)
=
BS BS*A(S)
B6 = B6*A(6)
B7 = B7*A(7)
=
B8 B8*A(8)
=
B9 B9*A(9)
=
B10 B10*A(10)
B11 =B11*A(11)
B12 = B12*A(12)
=
B13 B13*A(13)
=
B14 B14*A(14)
=
B1S B1S*A(1S)
=
B16 B16*A(16)
=
B17 B17*A(17)
=
B18 B18*A(18)

RK3PO = (RKSPO + RK2PS*RK2PS)**0.600


UU = (USPO + U2PS*U2PS)**0.200
Q2PO =
01 PO*01 PO

C ... ZB=COmpressibility factor at base conditions. TB and PB


C ... Base Conditions: 60.0 Degrees Fahrenheit. 14.73 psia
=
TB (60.00 + 459.6700)/1.800
=
PB 14.7300*6894.7570011000000.00
DB = OOETAIL(PB. TB)
=
ZB ZDETAIL(OB. Te)
END

Copyright C 1992, 1994 American Gas Association


All Rights Reserved

Property of PT. NISCONI


65

C:=======================================================
SUBROUTINE PARAMDl (NCC, CID)
C
C PURPOSE:
C Sets up constants used by the DETAil model.
C
C DESCRIPTION OF ARGUMENTS:
C NCC - Number of Components. (Input)
C CID - Array containing the Component 10 Numbers. (Input)
C The first NCC elements of the array define the composition
C of the mixture. The remaining elements of the array
C are set to zero. The 10 numbers are:
C 1 - Methane 8 - Hydrogen 15 - n-Hexane
C 2 - Nitrogen 9 - Carbon Monoxide 16 - n-Heptane
C 3 - Carbon Dioxide 10 - Oxygen 17 - n-Octane
C 4 - Ethane 11 - i-Butane 18 - n-Nonane
C 5 - Propane 12 - n-Butane 19 - n-Decane
C 6 - Water 13 - i-Pentane 20 - Helium
C 7 - Hydrogen Sulfide 14 - n-Pentane 21 - Argon
C----------------------------------,--
REAL*8 CMWB(21),EIB(21 ),RKIB(21 ),WIB(21 ),0IB(21 ),HIB(21 ),MIB(21),
& DIB(21)
REAL*8 BEIJB(21 ,21 ),BKIJB(21 ,21 ),BWIJB(21 ,21 ),BUIJB(21 ,21 )

COMMONIPARAM91! CMWB,EIB,RKIB,WIB,OIB,HIB,BEIJB,BKIJB,BWIJB,BUIJB,
& MIB,DIB

REAL*8 CMW(21), EI(21), RKI(21), WI(21), 01(21), HI(21), MI(21),


& 01(21)
REAL*8 BEIJ(21 ,21), BKIJ(21 ,2'1), BWIJ(21 ,21), BUIJ(21 ,21)
COMMONIPARAMI ' CMW, EI, RKI, WI, 01, HI, BEIJ, BKIJ, BWIJ, BUIJ,
&MI,DI

INTEGER PROG
REAL*8 RGAS, MWX, MW(5)
COMMON/CONSTANTS! PROG, RGAS, MWX, MW

REAL*8 DHIGH, PLOW, PHIGH, TLOW, THIGH


COMMONILIMITS/ DHIGH, PLOW, PHIGH, TLOW, THIGH

REAL*8 TOLD
COMMONfrOLDC/ TOLD

INTEGER NCC, CI0(21), J, K

TOLD = 0.00
RGAS = 8.314510-3
TLOW =0.00

Copyright C 1992. 1994 American Gas AssocIation


All Rights Reserved

Property of PT. NISCONI


66

THIGH = 10000.00
PLOW = 0.50-9
PHIGH = 275.00
OHIGH = 12.00

C .. Setup constants from block data


MWX = 0.00
DO 400 J=1,NCC
CMW(J) = CMWB(Clo(J
RKI(J) = RKIB(Clo(J
EI(J) = EIB(Clo(J
WI(J) = WIB(CID(J
QI(J) = OIB(CID(J
HI(J) = 0.00
IF (Clo(J).EO.S) HI(J) = HIB(S)
MI(J) = MIB(Clo(J
ol(J) = oIB(CID(J
400 CONTINUE

C . .Interaction parameters from BIP arrays: BEIJ, BKIJ, BWIJ, BUIJ


DO 420 J=1, NCC
DO 410 K=J, NCC
BEIJ(J,K) = BEIJB(CID(J),CID(K)
BKIJ(J,K) = BKIJB(CID(J),CID(K)
BWIJ(J,K) = BWIJB(CID(J),CID(K)
BUIJ(J,K) = BUIJB(CID(J),Clo(K)
410 CONTINUE .
420 CONTINUE
END

Copyright 0 1992, 1994 American Gas Association


All Rights Reserved .

Property of PT. NISCONI


67

C===================================================
SUBROUTINE TEMP (T)
C
C PURPOSE:
C Sets up temperature dependent terms.
C
C DESCRIPTION OF ARGUMENTS:
C T - Temperature in kelvins. (Input)
C-----------------------------------------------------------------------
REAL*8 A(58)
COMMONlEOSAII A

REAL*8 UU,RK3PO,WW,Q2PO,HH,BMIX
COMMON/AGAVARIABLESI UU,RK3PO,WW,Q2PO,HH,BMIX

REAL*8 FN(58)
COMMON/AGAEOSI FN

REAL*8 TROP5, TR1 P5, TR2PO, TR3PO, TR4PO, TR5PO, TR6PO


REAL*8 TR7PO, TR8PO, TR9PO, TR11PO, TR13PO, TR21PO
REAL*8 TR22PO, TR23PO, TR, T

C ...CALCULATE SECOND V!RIAL COEFFICIENT B


CALL B{T,BMIX}

C .. CALCULATE FN(13) THROUGH FN(58)


C .... NOTE: FN(1)-FN(12) DO NOT CONTRIBUTE TO CSM TERMS
TR =
TIUU
TROP5. = DSQRT(TR)
TR1 P5 = TR*TROP5
TR2PO = TR*TR
TR3PO = TR*TR2PO
TR4PO =
TR*TR3PO
TR5PO = TR*TR4PO
TR6PO =
TR*TR5PO
=
TA7PO TR*TR6PO
TR8PO = TR*TR7PO
TR9PO = TR*TR8PO
=
TR11 PO TR6PO*TR5PO
=
TR13PO TR6PO*TR7PO
=
TR21 PO TR9PO*TR9PO*TR3PO
=
TR22PO TR*TR21PO
=
TR23PO TR*TR22PO

FN(13) =A(13)*HH*TR6PO
FN(14) =A(14)ITR2PO
FN(15) =A(15)ITR3PO
FN(16) =A(16)*Q2POITR2PO
CopyrIght 0 1992, 1994 American Gas Association
All Rights Reserved

Property of PT. NISCONI


68

=
FN(17) A(17)rrR2PO
=
FN(18) A(18)rrR11PO
=
FN(19) A(19)*TROPS
=
FN(20) A(20)rrROPS
=
. FN(21) A(21)
=
FN(22) A(22)rrR4PO
=
FN(23) A(23)rrR6PO
FN(24) = A(24)rrR21 PO
=
FN(2S) A(2S)*WWrrR23PO
=
FN(26) A(26)*Q2POrrR22PO
=
FN(27) A(27)*HH*TR
=
FN(28) A(28)*Q2PO*TROPS
=
FN(29) A(29)*WWrrR7PO
FN(30) = A(30)*HH*TR
=
FN(31) A(31)rrR6PO
FN(32) = A(32)*WWrrR4PO
=
. FN(33) A(33)*WWrrR
=
FN(34) A(34)*WWrrR9PO
FN(3S) = A(3S)*HH*TR13PO
FN(36) = A(36)ffR21 PO
=
FN(37) A(37)*Q2POrrRSPO
=
FN(3S) A(38)*TROPS
=
FN(39) A(39)
=
FN(40) A(40)rrR2PO
FN(41) = A(41)rrR7PO
FN(42) = A(42)*Q2POITR9PO
FN(43) = A(43)rrR22PO
=
FN(44) A(44)ffR23PO
FN(4S) = A(4S)rrR
=
FN(46) A(46)rrR9PO
FN(47) = A(47)*Q2POrrR3PO
FN(4S) = A(4S)rrRSPO
FN(49) = A(49)*Q2POITR23PO
FN(SO) = A(SO)rrR1 PS
=
FN(S1) A(S1)*WWITRSPO
FN(S2) = A(S2)*Q2PO*TROPS
FN(S3) = A(S3)rrR4PO
FN(54) = A(54)*WWITR7PO
FN(SS) = A(SS)rrR3PO
FN(S6) = A(S6)*WW
FN(S7) = A(S7)rrR
FN(SS) = A(S8)*Q2PO
RETURN
END

Copyright C 1992, 1994 American Gas AssocIation


All Rights Reserved

Property of PT. NISCONI


69

C======================================
BLOCK DATA
C-----------------------------------------------------------------------
REAL*8 A(58)
COMMONIEOSAII A

REAL*8 CMWB(21),EIB(21),RKIB(21),WIB(21),QIB(21),HIB(21),MIB(21),
& 0IB(21)
REAL*8 BEIJB(21 ,21 ),BKIJB(21 ,21 ),BWIJB(21 ,21 ),BUIJB(21 ,21)
COMMONIPARAM911 CMWB,EIB,RKIB,WIB,QIB,HIB,BEIJB,BKIJB,BWIJB,BUIJB,
& MIB,OIB

C EQUATION OF STATE PARAMETERS, A(1) THROUGH A(53)


C ...A(1 )-A(7)
DATA AI
& 0.15383260000, 1.34195300000, -2.99858300000, -0.04831228000,
& 0.37579650000, -1.58957500000, -0.05358847000,

C ..... A(8)-A(12) FROM GRI1991 A(8)-A(12)


& 0.88659463000, -0.71023704000, -1.47172200000, 1.32185035000,
& -0.78665925000,

C ..... A(13)
& 0.2291290-08,

C ....A(14)-A(34)
& 0.15767240000, -0.43638640000, -0.04408159000, -0.00343388800,
& 0.03205905000, 0.02487355000, 0.07332279000, -0.00160057300,
& 0.64247060000, -0.41626010000, -0.06689957000, 0.27917950000,
& -0.69660510000, -0.00286058900, -0.00809883600, 3.15054700000,
& 0.00722447900, -0.70575290000, 0.53497920000, -0.07931491000,
& -1.41846500000,

C ..... A(35)
& -0.5999050-16,

C ..... A(36)-A(58)
& 0.10584020000, 0.03431729000, -0.00702284700, 0.02495587000,
& 0.04296818000, 0.74654530000, -0.29196130000, 7.29461600000,
& -9.93675700000, -0.00539980800, -0.24325670000, 0.04987016000,
& 0.00373379700, 1.87495100000, 0.00216814400, -0.65871640000,
& 0.00020551800, 0.009n619500, -0.02048708000, 0.01557322000,
& 0.00686241500, -0.00122675200, 0.002850908001

C .... .INOIVIOUAL COMPONENT PARAMETERS


C ..... QIB=Qi, HIB=Fi, RKIB=Ki, EIB=Ei, WIB=Gi, CMWB=MWi, MIB=Mi
C ..... OIB=OELTA
DATA 01 B/5*0.00, 1.00,15*0.00/

Copyright C 1992, 1994 American Gas Association


All Rights Reserved

Property of PT. NISCONI


70

DATA QI6I2*0.00,0.69oo,2*0.00,1.06n500,0.633276oo,14*0.001
DATA HIBI7*O.oo, 1.00, 13*0.001
DATA RKIBlO.461925500, 0.447915300, 0.455748900,0.527920900,
& 0.583749000,0.382586800,0.461826300,0.351491600,
& 0.453389400,0.418695400,0.640693700,0.634142300,
& 0.67385noo, 0.679830700, 0.717511800, 0.752518900,
& 0.784955000,0.815273100,0.843782600,0.358988800,
& 0.4216551001

DATA EIBl151.318300DO, 99.73n80DO, 241.96060000, 244.16670000,


& 298.11830000, 514.01560000, 296.35500000, 26.95794000,
& 105.53480000,122.76670000,324.06890000,337.63890000,
& 365.59990000,370.68230000,402.63629300,427.72263000,
& 450.32502200, 470.840891 DO, 489.55837300, 2.610111 DO,
& 119.629900001

DATA WIBlO.OOOOOOOO,0.02781500,0.18906500,0.079300DO,0.14123900,
& 0.33250000,0.08850000,0.03436900,0.03895300,0.02100000,
& 0.25669200,0.28183500,0.33226700,0.36691100,0.289731 D0,
& 0.33754200,0.38338100,0.42735400,0.46965900,0.00000000,
& 0.000000001

DATA CMWBl16.0430DO, 28.013500, 44.010000, 30.070000, 44.097000,


& 18.015300,34.082000, 2.015900,28.010000,31.998800,
& 2*58.123000,2*72.150000,86.1 nooo, 100.204000, 114.231000,
& 128.258000,142.285000,4.002600,39.9480001

DATA MIBl5*0.00, 1.582200,0.39000, 14*0.001

C ..... BINARy INTERACTION PARAMETERS


C ..... BEIJB=Eij*, BUIJB=UIJ, BKIJB=Kij, BWIJB=Gij*
DATA {BUIJB{l ,J),J=l ,21)1
& 1.00000000, 0.88610600, 0.96382700, 1.00000000, 0.9908nOO,
& 1.00000000,0.73683300,1.15639000,1.00000000,1.00000000,
& 1.00000000, 0.99229100, 1.00000000, 1.00367000, 1.30257600,
& 1.19190400, 1.20576900, 1.21963400, 1.23349800, 1.00000000,
& 1.000000001
DATA (BUIJB(2,J),J=2,21)1
& 1.00000000, 0.83505800, 0.816431 D0, 0.91550200, 1.00000000.
& 0.99347600. 0.40883800. 3*1.00000000, 0.99355600. 9*1.0000001
DATA {BUIJB(3,J),J=3,21)1
& 1.00000000. 0.96987000. 1.00000000. 1.00000000. 1.04529000.
& 1.00000000, 0.90000000. 5*1.000000, 1.06663800. 1.0n634DO.
& 1.08817800. 1.09829100, 1.108021 DO. 2*1.000000001
DATA {BUIJB{4.J).J=4,21)1
& 1.00000000,1.06517300,1.00000000.0.97192600.1.61666000.
& 2*1.000000. 4*1.2500. 7*1.0000001
DATA {BUIJB(5,J).J=5.21)/17*1.001

Copyright C 1992. 1994 American Gas Association


All Rights Reserved

Property of PT. NISCONI


71

DATA (BUIJB(6,J),J=6,21)/16*1.o01
DATA (BUIJB(7,J),J=7,21)/8*1.DO, 1.02897300, 1.03375400,
& 1.03833800, 1.04273500, 1.04696600, 2*1.0000001
DATA (BUIJB(8,J),J=8,21)/14*1.o01
DATA (BUIJB(9,J),J=9,21)/13*1.o01
DATA (BUIJB(10,J),J=10,21)/12*1.ool
DATA (BUIJB(11,J),J=11,21)/11*1.001
DATA (BUIJB(12,J),J=12,21)/10*1.ool
DATA (BUIJB(13,J),J=13,21)19*1.DOI
DATA (BUIJB(14,J),J=14,21 )/8*1.001
DATA (BUIJB(15,J),J=15,21 )17*1.001
DATA (BUIJB(16,J),J=16,21)/6*1.ool
DATA (BUIJB(17,J),J=17,21)/5*1.ool
DATA (BUIJB(18,J),J=18,21)/4*1.DOI
DATA (BUIJB(19,J),J=19,21)13*1.ool
DATA (BUIJB(20,J) ,J=20,21 )/2*1.001
DATA BUIJB(21 ,21)/1.001

DATA (BKIJB(1 ,J),J=1 ,21)1


& 1.00000000, 1~00363000, 0.99593300, 1.00000000, 1.00761900,
& 1.00000000, 1.00008000, 1.02326000, 1.00000000, 1.00000000,
& 1.00000000, 0.99759600, 1.00000000, 1.00252900, 0.98296200,
& 0.98356500, 0.98270700, 0.98184900, 0.980991 ~O, 1.00000000,
& 1.000000001
DATA (BKIJB(2,J),J=2,21)1
& 1.0oooo0000,O.98236100,1.00796000,1.oooo0QOO,1.oo00ooDO,
& 0.942596000,1.03227000,13*1.000000001
DATA (BKIJB(3,J),J=3,21)1
& 1.000000000, 1.OOS51 000, 2*1.00000000,1.0077900,7*1.000,
& 0.91018300, 0.89536200, 0.88115200, 0.86752000, 0.85440600,
& 2*1.000000001
DATA (BKIJB(4,J),J=4,21)1
& 1.00000000, 0.98689300, 1.00000000, 0.99996900, 1.02034000,
& 13*1.0000000001
DATA (BKIJB(5,J),J=5,21)/17*1.001
DATA (BKIJB(6,J),J=6,21 )/16*1.001
DATA (BKIJB(7,J),J=7,21)/S*1.00, 0.96S13000, 0.96287000,
& 0.95782800, 0.952441 ~O, 0.94833800, 2*1.000000001
DATA (BKIJB(S,J),J=8,21)/14*1.001
DATA (BKIJB(9,J),J=9,21)/13*1.001
DATA (BKIJB(10,J),J=10,21)/12*1.001
DATA (BKIJB(11,J),J=11,21)/11*1.001
DATA (BKIJB(12,J),J=12,21 )/1 0*1.001
DATA (BKIJB(13,J),J=13,21)/9*1.o01
DATA (BKIJB(14,J),J=14,21)/8*1.001
DATA (BKIJB(15,J),J=15,21)17*1.001
DATA (BKIJB(16,J),J=16,21)/6*1.o01
DATA (BKIJB( 17,J) ,J= 17,21 )/5*1.001

Copyright C 1992,1994 American Gas Association


All Rights Reserved

Property of PT. NISCONI


72

DATA (BKIJB(18,J),J=18,21)/4*1.ool
DATA .(BKIJB(19,J),J=19,21)13*1.ool
DATA (BKIJB(20,J),J=20,21 )12*1.001
DATA BKIJB(21,21 )/1.00/

DATA (BEIJB(1,J),J=1,21)1
& 1.00000000, 0.97164000, 0.96064400, 1.00000000, 0.99463500,
& 0.70821800,0.93148400,1.17052000,0.99012600,1.00000000,
& 1.01-953000, 0.98984400, 1.00235000, 0.99926800,1.10727400,
& 0.88088000,0.88097300,0.88106700,0.88116109,1.00000000,
& 1.00000000I
DATA (BEIJB(2,J),J=2,21)1
& 1.00000000, 1.02274000,0.97012000,0.94593900,0.74695400,
& 0.90227100, 1.08632000, 1.00571000, 1.02100000, 0.94691400,
& 0.97338400, 0.95934000, 0.94552000, 1.00000000, 1.00000000,
& 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.000000001
DATA (BEIJB(3,J),J=3,21)1
& 1.00000000, 0.92505300, 0.96023700, 0.84940800, 0.95505200,
& 1.28179000, 1.50000000, 1.00000000, 0.90684900, 0.89736200,
& 0.72625500,0.85976400,0.85513400,0.83122900,0.80831000,
& 0.78632300,0.76517100,2*1.000000001
DATA (BEIJB(4,J),J=4,21)1
& 1.00000000, 1.02256000, 0.69316800, 0.94687100, 1.16446000,
& 1.00000000, 1.00000000, 1.00000000, 1.01306000, 1.00000000,
& 1.0053200, 7*1.00000000/
DATA (BEIJB(5,J),J=5,21)1
& 1.00000000, 1.00000000, 1.00000000, 1.03478700,
& 3*1.000000, 1.00490000, 9*1.00000001
DATA (BEIJB(6,J),J=6,21 )/16*1.001
DATA (BEIJB(7,J),J=7,21)/8*1.oo, 1.00869200, 1.01012600,
& 1.01150100, 1.01282100, 1.01408900,2*1.000000001
DATA (BEIJB(8,J),J=8,21)1
& 1.00000000, 1.10000000, 1.00000000, 1.30000000,
& 1.30000000, 9*1.0000001
DATA (BEIJB(9,J),J=9,21 )/13*1.001
DATA (BEIJB(10,J),J=10,21)/12*1.001
DATA (BEIJB(11 ,J),J=11,21 )/11 *1.001
DATA (BEIJB(12,J),J=12,21 )/1 0*1.001
DATA (BEIJB(13,J),J=13,21)19*1.ool
DATA (BEIJB(14,J),J=14,21)/8*1.ool
DATA (BEIJB(15,J),J=15,21)n*1.001
DATA (BEIJB(16,J),J=16,21 )/6*1.001
DATA (BEIJB(17,J),J=17,21)/5*1.001
DATA (BEIJB(18,J),J=18,21)/4*1.ool
DATA (BEIJB(19,J),J=19,21)/3*1.001
DATA (BEIJB(20,J),J=20,21 )12*1.001
DATA BEIJB(21,21)/ 1.001

Copyright C 1992, 1994 American Gas Association


All Rights Reserved .

Property of PT. NISCONI


73

DATA (BWIJB(1 ,J),J=1 ,21 )/1.00, 1.00,O.8076S300,4*1.00,


& 1.9S731000,13*1.001
DATA (BWIJB(2,J),J=2,21 )/1.00,0.98274600,18*1.001
DATA (BWIJB(3,J),J=3,21 )/1.00,0.37029600,1.00,1.6730900, 1S*1.001
DATA (BWIJB(4,J),J=4,21)/18*1.001 .
DATA (BWIJB(S,J),J=5,21 )/17*1.001
DATA (BWIJB(6,J),J=6,21 )/16*1.001
DATA (BWIJB(7,J),J=7,21)/1S*1.001
DATA (BWIJB(8,J),J=8,21 )/14*1.001
DATA (BWIJB(9,J),J=9,21)/13*1.001
DATA (BWIJB(10,J),J=10,21)/12*1.001
DATA (BWIJB(11 ,J),J=11,21 )/11*1.001
DATA (BWIJB(12,J),J=12,21)/10*1.001
DATA (BWIJB(13,J),J=13,21 )/9*1.001
DATA (BWIJB(14,J),J=14,21)/S*1.001
DATA (BWIJB(1S,J),J=1S,21 )17*1.001
DATA (BWIJB(16,J),J=16,21 )/6*1.001
DATA (BWIJB(17,J),J=17,21)15*1.001
DATA (BWIJB(18,J),J=18,21)/4*1.001
DATA (BWIJB(19,J),J=19,21)13*1.001
DATA (BWIJB(20,J),J=20,21 )12*1.001
DATA BWIJB(21 ,21 )/1.001
END

Copyright C 1992, 1994 American Gas Association


All Rights Reserved

Property of PT. NISCONI


74

APPENDIX A.5

DETAIL CHARACTERIZATION METHOD


COMPUTER PROGRAM CALCULATIONS

This appendix provides example calculations which can be used to verify computer
programs. Table A.5-1 provides five reference data natural gas compositions. Table A.5-2
provides computed compressibility factors for the compositions in Table A.5-1 at temperature
and pressure conditions which can be used to verify calculations. The compUter program used
to generate the output in Table A.5-2 is the same as that used in the example program in
Section A.3.9. However, data input, output formats and table headings were slightly modified
in order to generate Table A.5-2 with the gas compositions listed in Table A.5-1.

Table A.5-1

Compositions of Natural Gases

Component Mole Percent for InOcatee! Gas


Component
GuH Coast Amarillo Ekofisk High Nz High COz-Nz

Methane 96.5222 90.6724 85.9063 81.4410 81.2110


Nitrogen 0.2595 3.1284 1.0068 13.4650 5.7020
Carbon Dioxide 0.5956 0.4676 1.4954 0.9850 7.5850
Ethane 1.8186 4.5279 8.4919 3.3000 4.3030
Propane 0.4596 0.8280 2.3015 0.6050 0.8950
i-Butane O.09n 0.1037 0.3486 0.1000 0.1510
n-Butane 0.1007 0.1563 0.3506 0.1040 0.1520
i-Pentane 0.0473 0.0321 0.0509 0.0000 0.0000
n-Pentane 0.0324 0.0443 0.0480 0.0000 0.0000
n-Hexane 0.0664 0.0393 0.0000 0.0000 0.0000
n-Heptane 0.0000 0.0000 0.0000 0.0000 0.0000
n-Octane 0.0000 0.0000 0.0000 0.0000 0.0000

Property of PT. NISCONI


75

Table A.5-2
Natural Gas Compressibility Factors Computed Using the
Detail Characterization Method
For Program Verification Purposes

-------------------------------------------------------------
Compressibility Factor for Indicated Gas
Temp Press. Gulf High High
F psia Coast Amarillo Ekofisk N2 CO2
-------------------------------------------------------------
32.00 14.73 .997406 .997302 .996780 .997670 .997207
32.00 100.00 .982355 .981641 .978025 .984188 .980985
32.00 200.00 .964648 .963200 .955792 .968411 .961854
32.00 400.00 .929176 .926209 .910650 .937108 .923376
32.00 600.00 .893928 .889390 .864910 .906452 .884920
32.00 800.00 .859409 .853295 .819226 .876929 .847047
32.00 1000.00 .826341 .818725 .774778 .849159 .810594
32.00 1200.00 .795680 .786763 .733467 .823883 .776728

50.00 14.73 .997707 .997615 .997145 .997949 .997531


50.00 100.00 .984432 .983798 .980555 .986107 .983218
50.00 200.00 .968877 .967597 .960982 .972303 .966411
50.00 400.00 .937934 .935332 .921580 .945093 .932857
50.00 600.00 .907485 .903542 .882159 .918684 .899675
50.00 800.00 .877958 .872693 .843307 .893470 .867343
50.00 1000.00 .849909 .843400 .805921 .869925 .836503
50.00 1200.00 .824023 .816427 .771264 .848583 .807970

100.00 14.73 .998363 .998294 .997938 .998556 .998233


100.00 100.00 .988930 .988466 .986020 .990258 .988043
100.00 200.00 .977982 .977052 .972107 .980676 .976194
100.00 400.00 .956545 .954687 .944605 .962084 .952923
100.00 600.00 .935904 .933136 .917786 .944418 .930426
100.00 800.00 .916308 .912670 .892018 .927895 .908982
. 100.00 1000.00 .898041 .893601 .867748 .912751 .888917
100.00 1200.00 .881410 .876265 .845491 .899227 .870584
130.00 14.73 .998660 .998602 .998296 .998830 .998551
130.00 100.00 .990959 .990570 .988479 .992127 .990215
130.00 200.00 .982066 .981290 .977078 .984429 .980571
130.00 400.00 .964796 .963255 .954735 .969620 .961787
130.00 600.00 .948352 .946071 .933202 .955716 .943829
130.00 800.00 .932911 .929933 .912747 .942869 .926898
130.00 1000.00 .918669 .915051 .893675 .931237 .911214
130.00 1200.00 .905826 .901645 .876312 .920975 .897008

Property of PT. NISCONI


76

APPENDIX A.6

DETAIL CHARACTERIZATION METHOD CALCULATION UNCERTAINTIES

A.6.1 Uncertainties In the DETAIL CHARACTERIZATION METHO~ Computed


Compressibility Factors

Compressibility factors calculated using the DETAil CHARACTERIZATION METHOD


were compared with experimentally measured values on five simulated natural gas mixtures.
These mixtures were gravimetrically prepared to represent key natural gas samples occurring
in North America and Europe. Table A.5-1 provides the compositions of these samples. The
uncertainty of this reference data set in the temperature range from -10Of to 170F or 250 K
to 350 K and pressures to 1750 psia or 12 MPa at a 95% confidence level is .07%. The
uncertainty of these data in the range from -1 OOF to 170F or 250K to 350K and pressures from
1750 psla to 5200 pSia or 12 MPa to 36 MPa is less than 0.2% (Reference 2 and 3 in
Appendix A.7).

Computed compressibility factors from the DETAil CHARACTERIZATION METHOD


agree on average within 0.025% of a best fit of the experimental data in the custody transfer
region from 35F to 170F and pressures up to 1750 psia (275 K to 350 K and pressures up
to 12 MPa). At conditions up to 5200 psia or 36 MPa the agreement between calculated
values and a best fit of the experimental data above aso F or 275 K is 0.1 % For high pressure
reservoir applications, the DETAil CHARACTERIZATION METHOD predicts compressibility
factors often better than 02% when compared to the PVT reference database.

The DETAil CHARACTERIZATION METHOD equation of state was also used for
compressibility factor calculations for 4145 natural gas data points in the GERG data bank
(Reference 4 in Appendix A 7). These samples were not gravimetrically prepared. The
compositions were determined by gas chromatography. Statistical analyses of the differences
between calculated and experimental compressibility factors were performed to evaluate the
uncertainties in the calculated compressibility factors. Statistics were calculated using the
following equations where N is the number of data points:

(A.6-1)

1 N
BIAS = -E
N
Z.,I
1-1
(A.6-2)

(A.6-3)

Property of PT. NISCONI


77

Std.Dev. = [-1-E(ZdIfI,I-SIAS)2jj (A.6-4)


N-1 1_1

(A.6-5)

Max.Dev. = (ZeIIf)_ (A.6-6)

Where:
~tIf =relative percentage difference between calculated and experimental
compressibility factors
~.I = ~ for ith data point
(~)max = maximum value of Z.
~c =calculated compressibility factor
~lIP = experimental compressibility factor
AAD = average absolute deviation
BIAS =bias
Std.Dev. = standard deviation
RMS = root mean squared deviation
Max.Dev. = maximum value of Z.

Calculations were performed for 75 natural gases in the ranges 1rF to 143F (-SOC to
62C or 265K to 3331<) and pressures up to 1750 psia (12 MPa or 120 bar). These natural
gases were classified into six groups according to composition. Group 1 is composed of 13
natural gases containing more than 9.5 mole percent nitrogen. Group 2 is composed of 8
natural gases containing more than 4.0 mole percent carbon dioxide. Group 3 is composed
of 23 natural gases containing more than 8.0 mole percent ethane. Group 4 is composed of
13 natural gases containing more than 2.0 mole percent hydrogen. Group 5 is composed of
. 10 natural gases containing more than 4.0 mole percent nitrogen and more than 4.0 mole
percent ethane. Group 6 is composed of 8 natural gases containing more than 94.0 mole
percent methane.

A summary of the statistical analyses of the differences between calculated and


experimental compressibility factors for the six groups of natural gases is given in Table A.6-1.
The uncertainties in calculated compressibility factors are smallest for the natural gases with
more than 94.0 mole percent methane (Group 6), for which the standard deviation is 0.030%
and the maximum deviation for 448 data points is 0.160%. The uncertainties in calculated
compressibility factors are largest for the natural gases with more than 9.5 mole percent
nitrogen (Group 1), for which the standard deviation is 0.064% for 625 data points. The
maximum deviation point in the total of 4145 data points occurs for a natural gas with more
than 8.0 mole percent ethane (Group 3); this maximum deviation is 0.256%. Overall, for the
total of 4145 data pOints, the standard deviation is 0.048%, the root mean square deviation is
0.048%, the bias is -0.001% and the average absolute deviation is 0.034%.

Property of PT. NISCONI


78

Table A.6-1

Statistical Analyses of the Differences Between Calculated and Experimental


Compressibility Factors for Six Natural Gas Groups,
DETAIL CHARACTERIZATION METHOD

Gas No. of No. of MD Bias StdOev RMS MaxDev


Group Natural Points % % % 0/0 %
No. Gases
1 13 625 0.058 -0.032 0.064 0.072 0.217
2 8 476 0.032 0.004 0.044 0.044 0.156
3 23 1278 0.031 0.002 0.045 0.045 0.256
4 13 690 0.027 0.004 .0.041 0.041 0.231
5 10 628 0.031 -0.001 0.044 0.044 -0.152
6 8 448 0.025 0.018 0.030 0.035 0.160
1-6 75 4145 0.034 -0.001 0.048 0.048 0.256

A.6.2 Uncertainties in DETAIL CHARACTERIZATION METHOD Computed


Supercompressibility Factors

The uncertainty in a computed supercompressibility factor Fpv is related to the


uncertainties in the computed values of both the compressibility factor Z and the
compressibility factor Z(600F, 14.73 psia). If there were no uncertainty in Z(60F, 14.73 psia),
the uncertainty in Fpv would be one-half the uncertainty in Z. If the uncertainty in Z(60F, 14.73
psia) were equal to the uncertainty in Z, the uncertainty in Fpv would be 0.707 times the
uncertainty in Z. Because the uncertainty in Z(600F, 14.73 psia) cannot exceed the uncertainty
in Z, the uncertainty in Fpv generally will be between 0.5 and 0.707 times the uncertainty in Z.
For the 4145 data points for the 75 natural gases in the custody transfer region of Table A.6-2,
the expected uncertainty in computed values of Fpv is 0.025% to 0.035%. Based on the
maximum deviation in Z of 0.256% in Table A.6-2, the maximum deviation in Fpv for natural
gases in the region of Table A.6-2 is :to.13%. Thus, it is concluded that using the DETAIL
CHARACTERIZATION METHOD, if there were no uncertainty inthe natural gas composition,
then 95% of the time the uncertainty in a calculated supercompressibility factor would not
exceed 0.035% and would not be expected to exceed 0.13% in the region of Table A.6-2.

Property of PT. NISCONI


79

APPENDIX A.7

DETAIL CHARACTERIZATION METHOD REFERENCES

1. Starting, K.E., R.T Jacobsen, S.W. Beyertein, C.W. Fitz, W.P. Clarke, E.
Lemmon, Y.C. Chen, and E. Rondon, -GRI High Accuracy Natura:! Gas
Equation of State for Gas Measurement Applications-1991 Revision of A.G.A.
No.8 Equation, Technical Reference Document,- GRI-91/0184 (1991).

2. Savidge, J.L., S.W. Beyertein, and E. Lemmon, -Technical Reference Document


for the 2nd Edition of AGA Report Number 8,- GRI-9310181 (1993).

3. Schouten, J. and J. Michels, -Evaluation of the PVT Reference Data on Natural


Gas Mixtures,- draft report for the Gas Research Institute (1991).

4. Jaeschke, M. and A.E. Humphreys, -GERG Databank of High Accuracy


Compressibility Factor Measurements, GERG Technical Monograph 4,
Fortschritt-Berichte VOl Reihe 6, No. 251 (1990).

5. Press, W.H., B.P. Aannery, S.A. Teukolsky and W.T. Vetterting, -Numerical
Recipes, The Art of Scientific Computing, Cambridge University Press, New
York (1986).

Property of PT. NISCONI


Property of PT. NISCONI
81

APPENDIX B

GROSS CHARACTERIZATION METHOD

APPENDIX B.1 - NOMENCLATURE ................................... 83


APPENDIX B.2 - COMPUTATION PROCEDURES ...................".... 84
APPENDIX B.3 - GROSS CHARACTERIZATION METHOD COMPUTATION
PROCEDURES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
APPENDIX B.4 - COMPUTER PROGRAM DOCUMENTATION .............. 93
APPENDIX B.S - FORTRAN CODE USTING ....................... 103
APPENDIX B.6 - COMPUTER PROGRAM CALCULATIONS ................ 116
APPENDIX B.7 - UNCERTAINTIES. . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
APPENDIX B.8 - REFERENCES ................... ". . . . . . . . . . . . . . . .. 123

Property of PT. NISCONI


Property of PT. NISCONI
83

APPENDIX B.1

NOMENCLATURE

Symbol =Represented Quantity


=
AAD average absolute deviation
=
BIAS bias
=
B..(Tgr) second virial coefficient of air at Tgr
=
BCH-cH binary CH-CH interaction coefficient
=
Bmtx second virial coefficient of mixture, dm3/mol
=
Cmix third vi rial coefficient of mixture, (dm3/mol)2
= d molar density, moVdm 3
=
Fpv supercompressibility factor
=G r relative density (specific gravity) of mixture
=
. G 1 , -G2 constants used in relation between MrCH and HCH
=
HCH molar gross heating value of the equivalent hydrocarbon
=
HN molar gross ideal gas heating value at 298.15 K and 0.101325 MPa
=
HV volumetric gross heating value at 298.15 K and 0.101325 MPa, KJ/dm 3
=
Max.Dev. maximum value of ~
Mr = molar mass (molecular weight) of the mixture
=
Mr(air) molar mass of air, 28.96256 g/mol
=
MrCH molar mass of equivalent hydrocarbon
=
MrC02 molar mass of carbon dioxide
=
MIN2 molar mass of nitrogen
=N number of data points
= P absolute pressure, MPa
=Pd reference pressl:lre for molar density
=
Pgr reference pressure for relative density
= R gas constant, 8.31451 J/mol-K
RMS = root mean squared deviation
=
Std.Dev. standard deviation
T = absolute temperature, K
Td = reference temperature for molar density
T gr = reference temperature for relative density
=T h reference temperature for heating value
=
~ mole fraction of equivalent hydrocarbon
=
Xc02 mole fraction of carbon dioxide
=
Xm mole fraction of nitrogen
= X. mole fraction of illt component in the natural gas
=
Zc..c calculated compressibility factor
=
~ relative percentage difference between calculated and experimental
compressibility factors
=
~.I ~ for ith data point
(~)max = maximum value of Zcslff
z., = experimental compressibility factor
= ~ compressiblity factor at reference conditions
=P:lr mass density of air

Property of PT. NISCONI


84

APPENDIX B.2

GROSS CHARACTERIZATION METHOD COMPUTATION PROCEDURES

B.2.1 Determination of the Molar Gross Heating Value of the Equivalent


Hydrocarbon (HcH)

The molar gross heating value HCH Is needed for calculations of Bmlx and Cmlx using
Equations 32 and 33 in Section 8.2. Two methods for determination of ~ are presented in
this document. The input parameters for the two methods are summarized in Table B.2-1.

Table B.2-1

Methods for Determining Equivalent Hydrocarbon Properties

Method Number Input Parameters


Method 1 Volumetric gross heating value, relative density, mole fraction CO2
Method 2 Relative density, mole fraction N2 , mole fraction CO2

Iterative procedures are required to solve the SGERG model using methods 1 and 2.
These procedures are based on satisfying rigorous mole, mass and energy balance equations.

B.2.2 METHOD 1.
Input Parameters: Volumetric Gross Heating Value, Relative
Density, Mole Fraction CO2 .

Figure B.2-1 outlines the procedures for calculating the molar gross heating value of
the equivalent hydrocarbon, HcH ' and the nitrogen mole fraction, ~2' based on inputs of
volumetric gross heating value, relative density and mole fraction of carbon dioxide.

The compressibility r is initially set to 1. The molar ideal gross heating value is:

(B.2-1)

Where:
HV = volumetric gross heating value at reference conditions Th' Tdt Pd
R = the gas constant
=
HN molar ideal gross heating value at 298.15K and 0.101325 MPa
=
Th reference temperature for heating value
=
T d reference temperature for molar density
=
Pd reference pressure for molar density
r = compresslblity factor at reference conditions

Property of PT. NISCONI


85

!
Guess ZO=1

!
HN = HV ZORTd (1 +1.027x10-4(Th-298.15))/Pd ........._ _ __
Mr = GrZ RTgrP.1r/PII"

No

! Yes

HCHDetermined
Go To Figure B.2-3

Figure B.2-1. Method 1

Property of PT. NISCONI


86

The molar mass (molecular weight), ~ of the mixture is:

M = GrZ RTgrP:W (8.2-2)


r Pili'

Where:
Gr =relative density at reference conditions Till" Pili'
z;> =compressibility factor at reference conditions T gr' P gr
R = gas constant
T gr =reference temperature for relative density
Pgr =reference pressure for relative density
=
palr mass density of air at reference conditions Tgr. Pgr

The mass density of air. pO11ft at reference conditions T grt Pgr is:

o IT P ) = Mr(air)
Palr\ I grt or RT (8.2-3)
~+B...(Tgr)
Pili'

Where:
Mr(air) =molar mass of air. 28.96256 g/mol
8 ...{Tor) =-0.12527 + 5.91x10'" Tgr - 6.62x10~gr2

The mole fraction of the equivalent hydrocarbon, XcH' is:

Mr - G2HN - M~ + Xco.Mr - Xco Mr


XcH = liz liz co. (8.2-4)
G1 - Mt
liz

Where:
=
G 1 -2.709328
G2 = 0.021062199
=
MrN2 molar mass of nitrogen
MrC02 = molar mass of carbon dioxide
HN = molar gross ideal gas heating value at 298.15 K and 0.101325 MPa

The mole fraction of nitrogen. ~. is:

xN = 1 . - y --
.~
- Xco . (8.2-5)

Property of PT. NISCONI


87

The molar gross heating value of the equivalent hydrocarbon. HCH is:

HCH
HN
=-- (8.2-6)
XCH

8CH-CH is calculated using Equation 32 and 8 mtx is calculated using Equation 28. The
compressibility factor Is then updated:

(8.2-7)

The calculation procedure is iterative. .Equations 8.2-1 through 8.2-7 are repeated. replacing
ZO with ZOnew iteratively until the absolute value of (ZOIZ'_ - 1) is less than
the convergence criterion (5x10-11 in double precision or 5x10-7 in single precision).

8.2.3 METHOD 2.
Input Parameters: Relative Density, Mole Fractions of N2 and
CO2

. Figure 8.2-2 outlines the procedure for calculating the heating value of the equivalent
hydrocarbon. HCH based on inputs of relative density at reference conditions T grt Pgr and mole
fractions of N2 and CO2 - In this method the mole fraction of the equivalent hydrocarbon. ~.
is determined by:

~ = 1-~-Xco. (82-9)

The molar mass (molecular weight). ,Mr. of the mixture is:

M = GrZ RTgrP:W (8.2-10)


r Pgr

Where:
Gr =relative density at reference conditions Tgr. Pgr
ZO =compressibility factor at reference conditions Tgr. P gr
R =gas constant
T gr =reference temperature for relative density
Pgr =reference pressure for relative density
pOair = mass density of air at reference conditions Tgr. Pgr .

Property of PT. NISCONI


88

I Input Gr. Xco.. ~ I


1
Guess ZO=1
XcH=1- ~ - Xco.

1
M Mr - Xco.Mror>z - ~Mr_
= _______ ...
r... Xc..

1
Izo =~I
1

No

! Yes
HCH Determined
Go To Figure B.2-3

Figure B.2-2. Method 2


Property of PT. NISCONI
89

The mass density of air, pOair' at reference conditions T grt Pgr is:

(B.2-11)

Where:
Mr(air) =molar mass of air, 28.96256 glmol
B.Ir(Tgr) =-0.12527 + 5.91x10" Tgr - 6.62x10 Tgr2
7
.

The molar mass of the equivalent hydrocarbon, MrCH , is:

(B.2-12)

Where:
MrN2 = molar mass of nitrogen
=
MrC02 molar mass of carbon dioxide
=
Mr molar mass of mixture

The molar gross heating value of the equivalent hydrocarbon, HCH , is:

(B.2-13)

BCH-CH is calculated using Equation 32 and Bmix is calculated using Equation 28. The
compressibility factor is then updated:

(B.2-14)

The calculation procedure is iterative. Equations B.2-10 through B.2-14 are repeated,
replacing Z' with Z'new iteratively until the absolute value of (Z'lZ'new - 1) is less than
the convergence criterion (5x10 11 in double precision or 5x107 in single precision).

Property of PT. NISCONI


90

8.2.4 SGERG Method Equation of State for Pressure

The SGERG equation of state for pressure is:

(8.2-15)

Where:
P = absolute pressure
R = gas constant
=
T absolute temperature
=
d molar density (moles per unit volume)
=
8mb! mixture second virial coefficient
Cmb! =mixture third virial coefficient

The SGERG model is explicit in density and temperature. An iteration procedure is


necessary to determine the compressibility factor based on the inputs of pressure and
temperature. This procedure is illustrated in Figure 8.2-3. When 8mbc and CmIx have been
determined for a given natural gas mixture at a given absolute temperature T. the molar
density d at a given absolute pressure P can be determined from Equation 8.2-15. The
calculation procedure is iterative; the molar density d is varied until the pressure calculated
using Equation 8.2-15 agrees with the specified pressure within a convergence criterion of
1x10-6 MPa.

Property of PT. NISCONI


91

HCH Detennined from


Method 1,2

No

!
Iterate
P =RTd(1 +Bmlxd+Cmlxd2)
to get d

Yes
!

I Z - 1 + B....d + c"",d'i

Output Z, Fpv' d, P

Figure B.2-3. Procedure for Calculation of Z, Fpv' d, and p

Property of PT. NISCONI


92

APPENDIX B.3

GROSS CHARACTERIZATION METHOD COMPUTATION PROCEDURES

B.3.1 Computations of Compressibility Factors

The following five step procedure can be used for computation of the compressibility
factor Z.

1. Input is made of the characterization information for the gas, corresponding


to one of the methods in Table B.2-1. The computation of the molar gross
heating value of the equivalent hydrocarbon and other parameters is
performed'using the methods in Appendix B2.

2. Input is made for the temperature and pressure for which the computation
of the compressibility factor is desired.

3. Computation is made of the second and third virial coefficients 8 mlx and Cmlx
in the equation of state. These coefficients are functions of absolute
temperature, hydrocarbon molar gross heating value and the mole fractions
of nonhydrocarbon components in the gas mixture.

4. The molar density d is computed using the equation of state relation for the
pressure P given in Equation 43.

5. The compressibility factor Z is computed using Equation 25.

8.3.2 Computations of Other Quantities

The computation above yields the molar density and the compressibility factor. Using
relations given in Equations 1-12 and Appendix C, other desired quantities, such as the mass
density at both flowing and contract conditions and the supercompressibility factor, can be
calculated. .

Property of PT. NISCONI


93

APPENDIX B.4

GROSS CHARACTERIZATION METHOD


COMPUTER PROGRAM DOCUMENTATION

8.4.1 Scope

This appendix provides summary documentation for the FORTRAN language computer
program code listing which is given in Appendix B.5 for the GROSS CHARACTERIZATION
METHOD. This documentation includes a summary flow diagram of the computer program and
descriptions of each subroutine. Additional documentation is provided by comment statements
within the computer program listing.

8.4.2 Summary Flow Diagram

Figure B.4-1 is a summary flow diagram which illustrates the use of the computer program
in Appendix B.S. This computer program was developed for efficient computations of natural
gas compressibility factors using the GROSS CHARACTERIZATION METHOD.

One program driver block (Application Program) and four computation blocks are shown
in Figure 8.4-1. The principal subroutine used by a given computation block is shown to the
left of each computation block. The computation blocks and the principal subroutines are:

(1) initialize constants (PARAMGS)

(2) calculation of characterization dependent quantities (CHARGS)

(3) calculation of temperature dependent quantities (VIRGS)

(4) calculation of density dependent quantities (PGROSS, DGROSS, ZGROSS)

8.4.3 Driver Block

For efficient computations, the application program should call the principal subroutines in
the sequence shown in Figure B.4-1. This computation sequence is efficient because it
minimizes unnecessary calculations. A similar computation sequence is used in the DETAIL
CHARACTERIZATION METHOD.

8.4.4 Component Dependent Quantities Block

In the first computation block, the constants of the equation of state and the molecular
weights are specified. Note that for most efficient computation, subroutine PARAMGS is called
only once at the beginning of the user application.

Property of PT. NISCONI


94

GROSS CHARACTERIZATION METHOD COMPUTER PROGRAM STRUCTURE

APPUCATION
SUbroutine PROGRAM
Ham&
J
SETUP OF
PARAMGS CONSTANTS
INMOOEL

J
CALCULATION OF
CHARGS CHARACTERIZATION
DEPENDENT
.QUANl1TIES
I
CAlCULATION OF
V1RGS SECOND &
THIRD
V1RIAL TERMS

1
CALCULATION OF
DGROSS DENSITY
DEPENDENT
QUANl1TIES

PRESSURE CHANGE

TEMPERATURE CHANGE

CHARACTERIZATION CHANGE

Figure 8.4-1. Computation Sequence for GROSS CHARACTERIZATION METHOD Computer


Program

Property of PT. NISCONI


95

8.4.5 Characterization Dependent Quantities Block

In the second computation block, the characterization (Method 1 or 2) of the gas mixture
is identified. Note that for efficient computation, subroutine CHARGS is never called again
until there Is a change in the characterization of the gas mixture.

8.4.6 Temperature Dependent Quantities Block

In the third computation block, the temperature must be specified. VIRGS is called by
OGROSS. VIRGS calculates the second and third virial coefficients for the gas mixture at the
absolute. temperature T. Note that for efficient computation, subroutine VIRGS is never called
again until there is a change in the temperature of the gas mixture.

B.4.7 Density Dependent Quantities Block

In the last computation block, density dependent quantities' are determined. Function
oGROSS requires the absolute pressure P as an input. oGROSS uses Chambers method
(Reference 4 in Appendix B.8) to solve for the density of the gas mixture at absolute
temperature T and absolute pressure P. The bounds for this method are the upper and lower
limits of the SGERG model. oGROSS calls the function PGROSS, which calculates the
pressure for a specified temperature and density. Function PGROSS calls function ZGROSS
to calculate the compressibility factor for a specified temperature and density.

8.4.8 Descriptions of Functions and Subroutines

FORTRAN functions and subroutines used to calculate density related properties from the
SGERG model are listed below. These routines are available in the module GROSSXZ.FOR,
listed in Appendix B.5.

FUNCTION oGROSS(P, T)
FUNCTION PGROSS(o, T)
FUNCTION ZGROSS(D, T)

SUBROUTINE CHARGS(METHOO, HV, GR, X, TH, TO, PO, TGR, PGR, ZB, DB, ERRNUM)
SUBROUTINE PARAMGS
SUBROUTINE VIRGS(T, X, BMIX, CMIX, BCH, OPT, ERRNUM)

8.4.8.1 Subroutine CHARGS

CHARGS determines the heating value of the equivalent hydrocarbon using one of the two
methods discussed in Appendix B.2. The required inputs to this subroutine are the method
number, the volumetric heating value (kJ/dm 3), the relative density, and the 5 element array,
X, containing the mole fractions of N2, C02, H2, and CO in positions 2 through 5 respectively.
CHARGS returns the base compressibility and density at 60F and 14.73 psia.

Property of PT. NISCONI


96

8.4.8.2 Function OGROSS

OGROSS calculates the molar density of a natural gas mixture given pressure and
temperature. Pressure must be in MPa and the temperature must be in kelvins. Density is
retumed in moVdm3

8.4.8.3 Subroutine PARAMGS

PARAMGS sets up the constants used by the SGERG equation of state. These constants
include the molecular weights of nitrogen and carbon dioxide, the gas constant, and the
constants used in the equation of state.

8.4.8.4 Function PGROSS

PGROSS calculates the pressure for natural gas mixtures as a function of density and
temperature. Density must be in moVdm3 and the temperature must be in kelvins. Pressure
is retumed in MPa. .

8.4.8.5 Subroutine VlRGS

VIRGS calculates the second and third vi rial coefficients of the mixture at the given
temperature. The coefficient constants from Tables 7 and 8 are stored in arrays and are
combined using the combining rules defined by Equations 30-42.

8.4.8.6 Function ZGROSS

ZGROSS calculates the compressibility factor for natural gas mixtures as a function of
density and temperature. Density must be in moVdm3 and the temperature must be in kelvins.

8.4.9 Example Calculations

Presented below are computer listings for Methods 1 and 2 for the same example
applications given for the DETAIL CHARACTERIZATION METHOD in Appendix A.3, Section
A.3.9. Output from the examples are listed in Tables 8.4-1 and 8.4-2.

Property of PT. NISCONI


97

C-----------------------------------------------------------------------
PROGRAM EXAMPLEl
C PURPOSE:
C This example program shows how to use GROSS Method 1 as a stand-alone
C program.
C COMPILED WITH:
C GROSSXZ.FOR - Source code which contains routines for calculating
C properties with the GROSS CHARACTERIZATION METHOD.
C UNITS.FOR - Source code which contains unit conversion routines.
C-----------------------------------------------------------------------
INTEGER I, IH, ICOMP, ILEVEL, ITABLE, ERRNUM, METHOD, J
REAL*8 D, Z, ZB, DB, FPV, TK, PMP, DGROSS, ZGROSS, UNITS
REAL*8 TDATA(20), PDATA(20), XK(9, 2), X(5), XDC(9)
REAL*8 XDH(9), XD(9), TBHS, TBDR, PB, HS, SPECG
C-----------------------------------------------------------------------
C Set up pressure & temperature arrays:
C TDATA() - Array of temperatures in degrees F.
C PDATA() - Array of pressures in psia.
C Set up gas value tables:
C XK(I,J) - Array of gas input values with the I column defined as:
C 1 - Gross heating value in Btu/ft A 3.
C 2 - Reference temperature for molar heating values, degrees F.
C 3 - Reference pressure for molar heating values, psia.
C 4 - Relative density of gas (specific gravity).
C 5 - Reference temperature for relative density, degrees F.
C 6 - Reference pressure for relative density, psia
C 7 - Carbon dioxide mole fraction.
C 8 - Hydrogen mole fraction.
C 9 - Carbon monoxide mole fraction.
C-----------------------------------------------------------------------
DATA (TDATA(I),I=l,20)/65.DO,65.DO,65.05DO,65.0SDO,65.05DO,
& 65.05DO,65.05DO,65.05DO,65.05DO,65.1DO,65.1SDO,6S.1SDO,65.15DO,
& 65.15DO,65.15DO,65.1SDO,6S.1SDO,6S.1SDO,6S.2DO,65.25DO I
DATA (PDATA(I),I=l,20)/750.DO,750.SDO,7S1.DO,7S1.DO,751.0DO,
& 751.0DO,751.DO,751.5DO,7Sl.SDO,752.DO,7S2.SDO,7S2.5DO,752.SDO,
& 752.5DO,752.5DO,7S3~DO,753.SDO,753.SDO,754.DO,754.DOI
C-----------------------------------------------------------------------
C The following values are for Gulf Coast Gas and Amarillo Gas.
C-----------------------------------------------------------------~-----
DATA (XK(I,l),I=1,9)/1036.05DO,60.DO,14.73DO,.S8l078DO,60.DO,
& 14.73DO, .005956DO,0,0/
DATA (XK(I,2),I:l,9)/1034.85DO,60.DO,14.73DO,.608657DO,60.DO,
& 14.73DO, .004676DO,O,O/
ICOMP = 1
METHOD = 1
ITABLE = 20
OPEN (UNIT=1,FILE='TB_4_l')
WRITE (1,11)
11 FORMAT (//,33X, 'TABLE B.4-1',I,
& 23X, 'Gross Characterization Method 1',1,
& 24X, 'OUtput from EXAMPLE1 Program',I,
& 22X, 'For Program Verification Purposes', II)
WRITE (1,12)
12 FORMAT (5X,'VALUE',4X,'T(F) ',4X,'P(psia)',4X,'D(lbm/ft A 3)',
& 5X, 'z' ,lOX, 'FPV',3X,'LEVEL',I,4X,72('-'),I)
C-----------------------------------------------------------------------
C Start DO loop to set up Table with ITABLE Values.
C Change to second Composition at lOth Table Value.
C-----------------------------------------------------------------------
DO IH=l,ITABLE
IF (IH.EQ.lO) ICOMP = 2
ILEVEL = 0
DO J=l,9
XD(J) = XK(J, ICOMP)

Property of PT. NISCONI


98

XDC(J) = XK(J, ICOMP)


ENDOO
IF (IH.EQ.1) GOTO 400
C-----------------------------------------------------------------------
C Check last values (XDH, TDATA AND PDATA) with new values to see if
C they are different. For the first pass, call all subroutines. If the
C composition has changed, call CHARGS. If the temperature is different,
C recalculate the virial coefficients. If the pressure is different,
C recalculate the density. If nothing has changed, print the previous
C results. The LEVEL column is interpreted as follows:
C 0 No change
C 1 Pressure change
C 2 -- Temperature change
C 3 -- Gas characterization change
C 4 -- Set up GROSSXZ constants
C-----------------------------------------------------------------------
00 1=1,9
IF (XDH(I).NE.XD(I GOTO 300
ENDOO
IF (TDATA(IH) .NE.TDATA(IH-1 GOTO 200
IF (PDATA(IH) .NE.PDATA(IH-1 GOTO 100
GOTO 10 .
C-----------------------------------------------------------------------
C Start the calculation process by calling the appropriate sUbroutine.
C-----------------------------------------------------------------------
400 CALL PARAMGS ()
ILEVEL =
ILEVEL + 1
,)
300 TBDR = UNITS(XD(5),'T','F , , 'K
TBHS = UNITS(XD(2),'T','F , , 'K ,)
PB = UNITS(XD(6),'P','psia , , 'MPa ,)
SPECG = XD(4)
HS = UNITS(XD(l),'H', 'Btu/ft~3 ','kJ/dm~3 ,)
X(l) = 0
X(2) 0=
00 1=3,5
XCI) = XD(I + 4)
ENDOO
CALL CHARGS(METHOD, HS, SPECG, X, TBHS, TBDR, PB, TBDR, PB,
& ZB, DB, ERRNUM)
ILEVEL = ILEVEL + 1
200 TK = UNITS(TDATA(IH),'T','F " 'K ,)
ILEVEL = ILEVEL + 1
100 PMP = UNITS(PDATA(IH), 'P','psia , , 'MPa ,)
ILEVEL = ILEVEL + 1
D = DGROSS(PMP, TK)
Z = ZGROSS(D, TK)
FPV = DSQRT(ZB/Z)
D = UNITS(D,'D','mol/dm~3 " 'lbm/ft~3 ')
C-----------------------------------------------------------------------
C Print results.
C-----------------------------------------------------------------------
10 WRITE (f,1000) IH, TDATA(IH) ,PDATA(IH), D, z, FPV, ILEVEL
1000 FORMAT (4X,I5,2F12.6,F13.5,F12.6,F13.5,2X,I2)
C-----------------------------------------------------------------------
C Hold values for checking in next iteration.
C-----------------------------------------------------------------------
00 1=1,9
XDH(I) = XDC(I)
ENDOO
ENDOO
999 END

Property of PT. NISCONI


99

TABLE B.4-1
Gross Characterization Method 1
Output from EXAMPLE1 Program
For Program Verification Purposes

VALUE T (F) P (psia) D (lbm/ft"'3) z FPV LEVEL


------------------------------------------------------------------------
1 65.000000 750.000000 2.49325 0.897558 1.05439 4
2 65.000000 750.500000 2.49509 0.897494 1.05443 1
3 65.050000 751.000000 2.49658 0.897468 1.05444 2
4 65.050000 751.000000 2.49658 0.897468 1.05444 0
5 65.050000 751.000000 2.49658 0.897468 1.05444 0
6 65.050000 751.000000 2.49658 0.897468 1.05444 0
7 65.050000 751.000000 2.49658 0.897468 1. 05444 0
8 65.050000 751.500000 2.49842 0.897404 1.05448 1
'9 65.050000 751.500000 2.49842 0.897404 1. 05448 0
10 65.100000 752.000000 2.63061 0.893197 1.05692 3
11 65.150000 752.500000 2.63219 0.893171 1.05693 2
12 65.150000 752.500000 2.63219 0.893171 1.05693 0
13 65.150000 752.500000 2.63219 0.893171 1.05693 0
14 65.150000 752.500000 2.63219 0.893171 1.05693 0
15 65.150000 752.500000 2.63219 0.893171 1. 05693 0
16 65.150000 753.000000 2.63413 0.893104 1.05697 1
17 65.150000 753.500000 2.63608 0.893037 1.05701 1
18 65.150000 753.500000 2.63608 0.893037 1. 05701 0
19 65.200000 754.000000 2.63765 0.893011 1. 05703 2
20 65.250000 754.000000 2.63728 0.893051 1.05701 2

Property of PT. NISCONI


100

C-----------------------------------------------------------------------
PROGRAM EXAMPLE2
C PURPOSE:
C This example program shows how to use GROSS Method 2 as a stand-alone
C pr'ogram.
C COMPILED WITH:
C GROSSXZ.FOR - Source code which contains routines for calculating
C properties with the GROSS CHARACTERIZATION METHOD.
C UNITS.FOR - Source code which contains unit conversion routines.
C-----------------------------------------------------------------------
INTEGER I, IH, ICOMP, ILEVEL, ITABLE, ERRNUM, METHOD, J
REAL*8 0, Z, ZB, DB, FPV, TK, PMP, DGROSS, ZGROSS, UNITS
REAL*8 TOATA(20), POATA(20), XK(7, 2), X(5), XDC(7)
REAL*8 XDH(7), XD(7), TBOR, PB, HS, SPECG
C-------~---------------------------------------------------------------
C Set up pressure & temperature arrays:
C TDATA() - Array of temperatures in degrees F.
C PDATA() - Array of pressures in psia.
C Set up gas value tables:
C XK(I,J) - Array of gas input values with the I column defined as:
C 1 - Relative density of gas(specific gravity).
C 2 - Reference temperature for relative density, degrees F.
C 3 - Reference pressure for relative density, psia
C 4 - Nitrogen mole fraction.
C 5 - Carbon dioxide mole fraction.
C 6 - Hydrogen mole fraction.
C 7 - Carbon monoxide mole fraction.
C---------~-----------------~-------------------------------------------
DATA (TDATA(I),I=1,20)/65.00,65.00,65.0500,65.0500,65.0500,
& 65.0500,65.0500,65.0500,65.0500,65.100,65.1500,65.1500,65.1500,
& 65.15DO,65.1500,65.1500,65.1500,65.15DO,65.200,65.2500/
DATA (POATA(I),I=I,20)/750.00,750.500,751.00,751.00,751.000,
& 751.000,751.00,751.500,751.500,752.00,752.500,752.500,752.500,
& 752.500,752.500,753.00,753.500,753.500,754.00,754.00/
C-----------------------------------------------------------------------
C The following values are for Gulf ,Coast Gas and Amarillo Gas.
C-----------------------------------------------------------------------
DATA (XK(I,1),I=I,7)/.58107800,60.00,14.7300,
& 0.00259500,.00595600,0,0/
DATA (XK(I,2),I=1,7)/.608657DO,60.00,14.7300,
& 0.03128400,.00467600,0,0/
ICOMP = 1
METHOD = 2
ITABLE = 20
OPEN (UNIT=1,FILE='TB_4_2')
WRITE (1,11) ,
11 FORMAT (//,33X, 'TABLE B.4-2',I,
& 23X, 'Gross Characterization Method 2',1,
& 24X, 'OUtput from EXAMPLE2 Program',/,
& 22X, 'For Program Verification Purposes',/I)
WRITE (1,12)
12 FORMAT (5X, 'VALUE' ,4X, 'T(F) , ,4X, 'P(psia)' ,4X, 'O(lbm/ft"3)',
& 5X, 'Z',10X,'FPV',3X,'LEVEL',/,4X,72('-'),/)
C-----------------------------------------------------------------------
C Start DO loop to set up Table with ITABLE Values.
C Change to second Composition at 10th Table Value.
C-----------------------------------------------------------------------
DO IH=l,ITABLE
IF (IH.EQ.10) ICOMP = 2
ILEVEL = 0
DO J=1,7
XD(J) = XK(J, ICOMP)
XDC(J) = XK(J, ICOMP)
ENDDO

Property of PT. NISCONI


101

IF (IH.EQ.1) GOTO 400


c-----------------------------------------------------------------------
C Check last values (XDH, TOATA AND POATA) with new values to see if
C they are different. For the first pass, call all subroutines. If the
C composition has changed, call CHARGS. If the temperature is different,
C recalculate the virial coefficients. If the pressure is different,
C recalculate the density. If nothing has changed, print the previous
C results. The LEVEL colUmn is interpreted as follows:
C 0 No change
C 1 Pressure change
C 2 -- Temperature change
C 3 -- Gas characterization change
C 4 -- Set up GROSSXZ constants
C-----------------------------------------------------------------------
DO 1=1,7
IF (XDH(I).NE.XD(I GOTO 300
ENDDO
IF (TDATA(IH).NE.TDATA(IH-1 GOTO 200
IF (PDATA(IH).NE.POATA(IH-1 GOTO 100
GOTO 10
C-----------------------------------------------------------------------
C Start the calculation process by calling the appropriate subroutine.
C------~----------------------------------------------------------------
400 CALL PARAMGS()
ILEVEL = ILEVEL + 1
300 TBDR = UNITS(XD(2),'T','F ','K ')
PB = UNITS(XD(3),'P','psia ','MPa ')
SPECG = XD(l)
HS = 0
X(l) = 0
DO 1=2,5
XCI) = XD(I + 2)
ENDDO
CALL CHARGS(METHOO, HS, SPECG, X, TBOR, TBDR, PB, TBOR, PB,
& ZB, OB, ERRNUM)
ILEVEL = ILEVEL + 1
200 TK = UNITS(TDATA(IH),'T','F ','K ')
ILEVEL = ILEVEL + 1
100 PMP = UNITS (POATA(IH) , 'P' , 'psia ' , 'MPa ')
ILEVEL = ILEVEL + 1
D = DGROSS(PMP, TK)
Z = ZGROSS(D, TK)
FPV = DSQRT(ZB/Z)
D = UNITS(D, '0', 'mol/dm~3 ','lbm/ft~3 ')
C-----------------------------------------------------------------------
C Print results.
C-----------------------------------------------------------------------
10 WRITE (1,1000) IH, TDATA(IH), PDATA(IH), D, Z, FPV, ILEVEL
1000 FORMAT (4X,I5,2F12.6,F13.5,F12.6,F13.5,2X,I2)
C-----------------------------------------------------------------------
C Hold values for checking in next iteration. .
C-----------------------------------------------------------------------
DO 1=1,7
XDH(I) = XDC(I)
ENDDO
ENDDO
999 END

Property of PT. NISCONI


102

TABLE B.4-2
Gross Characterization Method 2
Output from EXAMPLE2 Program
For Program Verification Purposes

VALUE T (F) P (psia) D (lbm/ft A 3) z FPV LEVEL


------------------------------------------------------------------------
1 65.000000 750.000000 2.49309 0.897616 1.05436 4.
2 65.000000 750.500000 2.49493 0.897551 1.05440 1
3 65.050000 751.000000 2.49643 0.897526 1.05441 2
4 65.050000 751.000000 2.49643 0.897526 1.05441 0
5 65.050000 751.000000 2.49643 0.897526 1.05441 0
6 65.050000 751.000000 2.49643 0.897526 1.05441 0
7 65.050000 751. 000000 2.49643 0.897526 1.05441 0
8 65.050000 751.500000 2.49827 0.897462 1.05445 1
9 65.050000 751.500000 2'.49827 0.897462 1.05445 0
10 65.100000 752.000000 2.63038 0.893277 1. 05687 3
11 65.150000 752.500000 2.63196 0.893250 1. 05689 2
12 65.150000 752.500000 2.63196 0.893250 1. 05689 0
13 65.150000 752.500000 2.63196 0.893250 1. 05689 0
14 65.150000 752.500000 2.63196 0.893250 1.05689 0
15 65.150000 752.500000 2.63196 0.893250 1. 05689 0
16 65.150000 753.000000 2.63390 0.893183 1. 05693 1
17 65.150000 753.500000 2.63585 0.893117 1.05697 1
18 65.150000 753.500000 2.63585 0.893117 1.05697 0
19 65.200000 754.000000 2.63742 0.893090 1. 05698 2
20 65.250000 754.000000 2.63705 0.893131 1. 05696 2

Property of PT. NISCONI


103

APPENDIX 8.5

GROSS CHARACTERIZATION METHOD FORTRAN CODE LISTING (GROSSXZ)

Subprograms

FUNCTION DGROSS(P, T) ........................................... 104


FUNCTION PGROSS(D, T) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 106
FUNCTION ZGROSS(D, T) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 107
SUBROUTINE CHARGS(METHOD,HV,GR,X,TH,TD,PD,TGR,PGR,ZB,DB,ERRNUM) 108
SUBROUTINE PARAMGS ........................................... 112
SUBROUTINE VIRGS(T, X, BMIX, CMIX, BCH, OPT, ERRNUM) .............. 114

Property of PT. NISCONI


104

C:====================================================
C COPYRIGHT (C) 1992.1994 AMERICAN GAS ASSOCIATION
C ALL RIGHTS RESERVED
C COPYRIGHT APPLIES TO ALL SUBPROGRAMS
C
C FOR INFORMATION CONTACT:
C DR. JEFFREY L SAVIDGE
C GAS RESEARCH INSTITUTE
C 8600 W. BRYN MAWR AVE.
C CHICAGO, IL 60631
C PHONE (312) 399-8100, FAX (312) 399-8170
C
C OR: MS. LORI TRAWEEK
C AMERICAN GAS ASSOCIATION
C 1515 WILSON BOULEVARD
C ARLINGTON, VA 22209
C PHONE (703) 841-8400
C
C PROGRAM WRiTTEN BY ERIC LEMMON AND STEVEN BEYERLEIN
C=====================================================
C VERSION 12
C================================================
FUNCTION DGROSS(P, T)
C
C PURPOSE:
C Calculates density from the GERG model given pressure and
C temperature. This function uses Chambers'S method and PGROSS
C to determine the density.
C
C DESCRIPTION OF ARGUMENTS:
C P - Pressure in MPa. (Input)
C T - Temperature in keMns. (Input)
C DGROSS - Molar density at P and T in moVdrTY'3. (Output)
C------ ----------
REAL*8 DHIGH, PLOW, PHIGH, TLOW, THIGH
COMMONILIMITSI DttlGH, PLOW, PHIGH, TLOW, THIGH

INTEGER IC
REAL*S T. P, OGROSS, PGROSS
REAL*8 TOL, X1, X2, X3, F, F1, F2, F3

C ..... Bracket density solution


=
TOL 1.0-6
X1 = PGROSS(O.DO, T)
X2 = PGROSS(DHIGH, T)

Copyrfght C 1992, 1994 MMtrtcan Gas AssocIation


All Rights Reserved

Property of PT. NISCONI


105

C ....Check the boundaries


=
F1 PGROSS(X1, T) - P
IF (DABS(F1).LE.TOL) THEN
OGROSS = X1
RETURN
ENDIF
=
F2 PGROSS(X2, T) - P
IF (DABS(F2).LE.TOL) THEN
OGROSS = X2
RETURN
ENDIF
IF (F1 *F2.GT.0.ODO) THEN
WRITE (*,*) , **<t DGROSS: THE ROOT WAS NOT BOUNDED ***'
OGROSS = 0
RETURN
ENDIF
C ... Begin iterating
=
DO 100 IC 1,100
=
X3 (X1*F2 - X2*F1 )/(F2 - F1)
=
F3 PGROSS(X3, T) - P
IF (MOD(IC,6).EQ.0) THEN
=
OGROSS (X1 + X2)12.0DO
ELSE
IF (F1 - F2t(F1 - F3)*(F2 - F3.EQ.0.DO) RETURN
=
OGROSS X1*F2*F3IF1 - F2)*(F1 - F3
& + X2*F1*F3IF2 - F1)*(F2 - F3
& + X3*F1*F2IF3 - F1)<t(F3 - F2
IF DGROSS-X1t(oGROSS-X2).GE.0.DO) DGROSS = (X1 + X2)/2.DO
ENolF
F = PGROSS(DGROSS, T) - P
IF (oABS(F).LE.TOL) RETURN
IF (F*F3.LT.O.oO) THEN
X1 = oGROSS
F1 = F
X2 =X3
=
F2 F3
ELSEIF (F3*F1.GT.0.DO) THEN
X1 = oGROSS
F1 = F
ELSE
=
X2 oGROSS
=
F2 F
ENolF
100 CONTINUE
WRITE (*, *) , *<t* oGROSS: NO CONVERGENCE **<t,
oGROSS = 0
RETURN
END

Copyright C 1992. 1994 Am~rican Gas AssocIation


All Rights Reserved

Property of PT. NISCONI


106

C=================================================
FUNCTION PGROSS(O, T)
C
C PURPOSE:
C calculates the pressure from the GERG model as a function of
C density and temperature.
C
C DESCRIPTION OF ARGUMENTS:
C 0 - Molar density in moVdrTY'3. (Input)
C T - Temperature in kelvins. (Input)
C PGROSS - Pressure in MPa. (Output)
~,---------------------
INTEGER PROG
REAL*S RGAS, MWX, MW(5)
COMMON/CONSTANTS! PRoo, RGAS, MWX, MW

REAL*S 0, T, ZGROSS, PGROSS

PGROSS =O*RGAS*T*ZGROSS(O, T)
ENO

CopyrIght C 1992, 1994 American Gas Association


All RIghts Reserved

Property of PT. NISCONI


107

C===============================================
FUNCTION ZGROSS(D, T)
C
C PURPOSE:
C Calculates the compressibility factor from the GERG model as a
C function of density and temperature.
C
C DESCRIPTION OF ARGUMENTS:
C 0 - Molar density in moVdrn"'3. (Input)
C T - Temperature In keMns. (Input)
C ZGROSS - Compressibility factor. (Output)
0--------------------- - - -
INTEGER ERRNUM
REAL*8 BMIX, CMIX, TEMP, 0, ZGROSS, T

REAL*8 X(5)
COMMONIGROSSCOMPI X

ZGROSS=O
CALL VIRGS(T, X, BMIX, CMIX, TEMP, 0, ERRNUM)
IF (ERRNUM.NE.O) RETURN
ZGROSS = 1.00 + BMIX*O + CMIX*O*O
END

Copyright C 1992, 1994 American Gas Association


All Rights ReselVed

Property of PT. NISCONI


108

C====================================================
SUBROUTINE CHARGS(METHOD,HV,GR,X,TH,TD,PD,TGR,PGR,ZB,DB,ERRNUM)
C
C PURPOSE:
C Detennines the heating value of the equivalent hydrocarbon and
C In tum uses this heating value to calculate the parameters in
C the GERG model for the two input methods.
C
C DESCRIPTION OF ARGUMENTS:
C METHOD - Option number for selecting the method: (Input)
C METHOD 1 -- Use gross caloric value (HV), relative density (Dr)
C and the mole fraction of carbon dioxide.
C METHOD 2 - Use relative density (Dr) and mole fractions
C of nitrogen and carbon dioxide.
C HV - Gross calorific heating value for the gas mixture
C in kJ/dnY'3. (Input for Method 1)
C GR - Relative density (specific gravity). (Input)
C X - An array of 5 elements containing the mole factions of:
C X(1) - The equivalent hydrocarbon (Output)
C X(2) - Nitrogen (Input for Method 2)
C X(3) - Carbon Dioxide (Input for Methods 1 and 2)
C X(4) - Hydrogen (Input for Methods 1 and 2)
C X(5) - Carbon Monoxide (Input for Methods 1 and 2)
C TH - Reference temperature for heating value (K). (Input)
C TO - Reference temperature for molar density (K). (I nput)
C TGR - Reference temperature for relative density (K). (Input)
C PO - Reference pressure for molar density (MPa). (Input)
C PGR - Reference pressure for relative density (MPa). (Input)
C ZB - Compressibility factor at 60F and 14.73 psia. (Output)
C DB - Molar density at 60F and 14.73 psia. (Output)
C ERRNUM - Error Flag: .(Output)
C
C
ERRNUM = - No error.
ERRNUM = 1 or 2 -- Iteration failed to converge.
C---------------------------------------------------------------------
REAL*8 BO(5,5). B1 (5,5). B2(5,5), BB(0:2,0:2)
REAL*8 CO(5,5), C1(5,5), C2(5,5)
REAL*8 TOLD. BBMIX. CCMIX
COMMONNIRIAL2I BB. 60, 61, B2. CO, C1. C2, TOLD, BBMIX, CCMIX

REAL *8 XX(5)
COMMON/GROSSCOMPI XX

REAL*8 DHIGH, PLOW, PHIGH. TLOW, THIGH


COMMONILIMITSI DHIGH, PLOW, PHIGH, TLOW. THIGH

INTEGER PROG
REAL*8 RGAS, MWX, MW(5)
COMMON/CONSTANTSI PRoo, RGAS, MWX, MW

Copyright C 1992, 1994 American Gas AssocIation


All Rights Reserved

Property of PT. NISCONI


109

INTEGER ERRNUM, METHOD, FLAG


REAL*8 OGROSS, ZGROSS
REAL*8 HCH, HV, GR, X(5)
REAL*8 BMIX, TEMP, BCH
REAL*8 OOAIR, ZO, ZONEW, ZOTOPO, G1, G2, HNO, MR, HTV4, HTV5
REAL*8 TB, PB, DB, ZB, TH, TO, PO, TGR, PGR, SUM, VIR .

TOLD = 0
ERRNUM = 0
VIR =
0.1252700 + 5.9104*TGR 6.6207*TGR**2
DOAIR = 28.9625600/(RGAS*TGRlPGR + VIR)

G1 =2.70932800
G2 =0.02106219900
HTV4 = 285.8300
HTV5 =282.9800
c..-..--------------------------------..-----------..-------..
C Method 1 Given the caloric value, specific gravity and
C the mole fraction of C02
C------------------------- -----..---------------------
IF (METHOO.EQ.1) THEN
ZO =
1.00
ZOTOPO = 1.00
300 HNO = HV*ZOTDPD*RGAS*TD/PO*(1.00 + 1.027D-4*(TH - 298.1500
MR = GR*ZO*RGAS*TGRlPGR*OOAIR
SUM =
X(3)*(MW(2) MW(3
& + X(4)*(MW(2) - MW(4) + G2*HTV4)
& + X(S)*(MW(2) MW(5) + G2*HTVS)
X(1) = (MR G2*HNO - MW(2) + SUM)/(G1 MW(2
X(2) =1.00 X(1) X(3) - X(4) - X(5)

FLAG =0
IF (X(2).LT.O) THEN
FLAG = 1
X(2) =
X(1) = 1.00 - X(2) X(3) - X(4) - X(S)
ENOIF

HCH =
(HNO X(4)*HTV4 - X(S)*HTVS)/x(1)
IF (HCH.LT.O) HCH 0 =
MW(1) = G1 + G2*HCH
BCH = BB(O,O) + TD*(BB(O,1) + BB(O,2)*TD)
& + (88(1,0) + TD*(BB(1,1) + 8B(1,2)*TO*HCH
& + (88(2,0) + TO*(B8(2,1) + BB(2,2)*TO*HCH**2.DO
CALL VIRGS(TD, X, BMIX, TEMP, BCH, 1, ERRNUM)
ZOTOPD = 1.00 + BMIX*POIRGASfTD

Copyright C 1992, 1994 American Gas Association


All Rights Reserved

Property of PT. NISCONI


110

BCH = BB(O,O) + TGR*(BB(0,1) + BB(0,2)*TGR)


& + (BB(1,0) + TGR*(BB(1,1) + BB(1,2)*TGR*HCH
& + (BB(2,O) + TGR*(BB(2,1) + BB(2,2)*TGR*HCH**2.oo
CALLVIRGS(TGR, X. BMIX, TEMP, BCH, 1, ERRNUM)
ZONEW = 1.00 + BMIX*PGRlRGASrrGR
IF (DABS(ZOIZONEW -1.00).GT.0.5D-10) THEN
ZO=ZONEW
GOTO 300
ENDIF

X(2) = 1.00- X(1) X(3) X(4) X(5)


IF (X(2).LT.0 .OR. FLAG.EO.1) THEN
WRITE (*, *) 'CONfliCTING VALUES OF RELATIVE DENSITY, "
& 'HEATING VALUE, AND'
PAUSE 'CARBON DIOXIDE CONTENr
ERRNUM =3
RETURN
ENDIF

C----- .---------..- -
C Method 2 Given the specific gravity and the mole fractions of
C N2and C02
C------- ----------------
ELSEIF (METHOD.EQ.2) THEN
ZO = 1.00
X(1) = 1.00- X(2) - X(3) - X(4) - X(5)
100 MR = GR*ZO*RGAS*TGRlPGR*OOAIR
MW(1) = (MR - X(2)*MW(2) - X(3)"MW(3)
& - X(4)*MW(4) - X(5)*MW(5/x(1)
HCH =
(MW(1) - G1)/G2
.BCH = BB(O,O) + TGR*(BB(O,1) + BB(O,2)*TGR)
& + (BB(1,O) + TGR*(BB(1,1) + BB(1,2)*TGR*HCH
& + (BB(2,O) + TGR*(BB(2,1) + BB(2,2)*TGR*HCH**2.00
CALL VIRGS(TGR, X, BMIX, TEMP, BCH, 1, ERRNUM)
ZONEW = 1.00 + BMIX*PGRlRGASrrGR
IF (DABS(ZOIZONEW - 1.00).GT.O.5D-10) THEN
ZO =ZONEW
GOTO 100
ENDIF
ENDIF

IF (ERRNUM.NE.O) RETURN

C ..... Find the virial coefficient constants for pure hydrocarbon


C ..... using the caloric value.
=
BO(1,1) BB(O,O) + HCH*(BB(1,O) + BB(2,O)*HCH)
=
B1(1,1) BB(O,1) + HCH*(BB(1,1) + BB(2,1)*HCH)
=
B2(1,1) BB(0,2) + HCH*(BB(1,2) + BB(2,2)*HCH)

Copyright C 1992, 1994 American Gas Association


All Rights Reserved

Property of PT. NISCONI


111

CO(1,1) =-0.30248800 + HCH*( 0.6464220-3 - 0.3328050-06*HCH)


C1(1,1) = 0.1958610-2 + HCH*(-0.4228760-5 + 0.2231600-o8*HCH)
C2(1,1) =-0.3163020-5 + HCH*( 0.6881570-8 - 0.3677130-11*HCH)
=
XX(1) X(1)
=
XX(2) X(2)
=
XX(3) X(3)
=
XX(4) X(4)
=
XX(5) X(5)
TLOW =
263.00
THIGH = 338.00
PLOW =
0.50-9
=
PHIGH 12.00
OHIGH 8.00=
=
DB OGROSS(PGR, TGR)
=
MWX GR*OOAIRIDB

C .....ZB=Compressibility factor at base conditions, TB and PB


C ..... Base Conditions: 60.0 Degrees Fahrenheit, 14.73 psia
TB = (60.00 + 459.6700)/1.800
=
PB 14.7300*6894.7570011000000.00
DB = OGROSS(PB, TB)
=
ZB ZGROSS(DB, TB)
END

Copyright C 1992, 1994 American Gas Association


All Rights Reserved

Property of PT. NISCONI


112

C:==================================================
SUBROUTINE PARAMGS
C
C PURPOSE:
C Sets up constants used by the GERG model.
C- - - .--- ----------------
INTEGER PROG
REAL8 RGAS, MWX, MW(5)
COMMON/CONSTANTS! PROG, RGAS, MWX, MW

REAL8 BO(5,5), 81(5,5), 82(5,5), 88(0:2,0:2)


REAL8 CO(5,5), C1 (5,5), C2(5,5)
REAL8 TOLD, B8MIX, CCMIX
COMMONNIRIAL2I BB, 80, B1, B2, CO, C1, C2, TOLD, BBMIX, CCMIX

C ....Store fluid infonnation - Nitrogen is index 2, C02 is index 3,


C Hydrogen is index 4, CO is index 5, and the hydrocarbon is index 1.
RGAS = 8.314510-3
=
MW(2) 28.0135000
=
MW(3) 44.01000
=
MW(4) 2.015900
=
MW(5) 28.01 DO
C ....Assign vinal coefficient constants for N2 and C02.
=
80(2,2) -0.14460000
81(2,2) = 0.7409100-3
82(2,2) = -0.9119500-6
=
80(3,3) -0.86834000
81 (3,3)= 0.4037600-2
=
82(3,3) -0.5165700-5
80(4,4) = -0.1105960-2
B1(4,4) = 0.8133850-4
=
82(4,4) -0.9872200-7
80(5,5) = -0.13082000
81(5,5) = 0.6025400-3
=
82(5,5) -0.6443000-6
=
80(2,3) -0.33969300
81(2,3) = 0.1611760-2
82(2,3) = -0.2044290-5
=
BO(1,4) -0.5212800-1
81(1,4) = 0.2715100-3
=
82(1,4) -0.2500000-6
=
80(1,5) -0.6872900-1
81(1,5) = -0.2393810-5
82(1,5) = 0.5181950-6
80(2,4) = 0.01200
=
88(0,0) -0.42546800
88(1,0) = 0.8771180-3
88(2,0) = -0.8247470-6

Copyright C 1992, 1994 American Gas Association


All Rights Reserved

Property of PT. NISCONI


113

88(0.1) =0.2865000-2
88(1.1) =-0.5562810-5
88(2.1) =0.4314360-8
88(0.2) =-0.4620730-5
88(1,2) = 0.8815100-8
88(2.2) =-0.6083190-11
CO(2,2) = 0.7849800-2
C1 (2.2) = -0.3989500-4
C2(2.2) = 0.6118700-7
CO(3.3) = 0.2051300-2
C1 (3.3) = 0.3488800-4
C2(3.3) =-0.8370300-7
CO(2,3) = 0.5520660-2
C1 (2,3) =-0.1686090-4
C2(2,3) = 0.1571690-7
CO(3.2) = 0.3587830-2
C1(3.2) = 0.8066740-5
C2(3.2) = -0.3257980-7
CO(4.4) = 0.1047110-2
C1(4.4) = -0.3648870-5
C2(4.4) = 0.4670950-8
CO(1,5) = 0.7367480-2
C1(1.5) = -0.2765780-4
C2(1.5) = 0.3430510-7
END

Copyright C 1992. 1994 American Gas AsSociation


All Rights Reserved

Property of PT. NISCONI


114

C======================================================
SUBROUTINE VIRGS(T, X, BMIX, CMIX, BCH, OPT, ERRNUM}
C
C PURPOSE:
C Calculates the second and third virial coefficients in the GERG
C model at the given temperature. The coefficient constants are
C stored in arrays and are mixed using the combining rules.
C
C DESCRIPTION OF ARGUMENTS:
C T - Temperature in kelvins. (Input)
C BMIX - Second virial coefficient of the mixture. (Output)
C CMIX - Third virial coefficient of the mixture. (Output)
C BCH - Binary CH-CH interaction coefficient. (Input/Output)
C OPT - Option number: (Input)
C OPT = 0 - Calculate BCH.
C OPT = 1 - Use BCH from input.
C ERRNUM - Error Rag: (Output).
C ERRNUM = 0 - No error.
C ERRNUM = 1 or 2 - Iteration failed to converge.
C---
REAL*8 BO(5,5), B1 (5,5), B2(5,5), BB(0:2,0:2)
REAL*8 CO(5,5), C1 (5,5), C2(5,5)
REAL*8 TOLD, BBMIX, CCMIX
COMMONNIRIAL2I B8, BO, B1, B2, CO, C1, C2, TOLD, BBMIX, CCMIX

REAL*8 T, E, F, BMIX, CMIX, X11, X22, X33, X44, X55, X(5)


REAL*8 C11, C22, C33, C23, C32, C15, C44
REAL*8 BCH, BN2, BC02, BH2, BCO
REAL*8 B12, B13, B14, B15, B23, B24
INTEGER OPT, ERRNUM
ERRNUM =0

C ..... Calculate the second virial coefficient


IF (T.EO.TOLD) THEN
BMIX = BBMIX
CMIX=CCMIX
RETURN
ENDIF
X11 = X(1)*X(1)
X22 = X(2)*X(2)
X33 = X(3)*X(3)
X44 = X(4)*X(4)
X55 = X(5)*X(5)
IF (OPT.EO.O) BCH = BO(1,1) + T*(B1(1,1) + B2(1,1}*T)
BN2 = BO(2,2) + T*(B1(2,2) + B2(2,2)*T)
BC02 = BO(3,3) + T*(B1(3,3) + B2(3,3)*T)
6H2 = BO(4,4) + T*(B1(4,4) + B2(4,4)*T)
BCO = BO(5,5) + T*(B1(5,5) + B2(5,5)*T)

CopyrIght C 1992, 1994 American Gas Association


All Rights Reserved

Property of PT. NISCONI


115

IF (BC02*BCH.LT.O.OO) THEN
PAUSE'VIRGS: SORT NEGATIVE'
ERRNUM 1 =
RETURN
ENolF
812 =
(0.7200 + 1.87SD-S*(320.DO-T)*(320.DO-T)t(BN2 + BCH)/2.DO
813 =
-0.86So0*oSORT(BC02*BCH)
814 = BO(l,4) + r(Bl(l,4) + B2(l,4tT)
815 = BO(l,S) + r(Bl(l,S) + B2(l,S)*T)
B23 =
BO(2,3) + r(B1(2,3) + B2(2,3)*T)
824 =
BO(2,4)
8MIX = BCH*Xll + BN2*X22 + BC02*X33 + BH2*X44 + BCO*XSS
& + 2.00*B12*X(1)*X(2) + 2.o0*B13*X(1)*X(3)
& + 2.o0*B14*X(1)*X(4) + 2.o0*B1S*X(1)*X(S)
& + 2.o0*B23*X(2)*X(3) + 2.DO*B24*X(2)*X(4)

C .... Slnce methods 1 and 2 change X(l) and BCH, TOLD must not
C be Initialized until after the two methods have been set up.
C During their setup, OPT is equal to one.
IF (OPT.EO.1) RETURN
TOLo=T
BBMIX =BMIX

C .....Calculate the third virial coefficient


E = 0.9200 + 0.OO13DO*(T - 270.00)
F = 1.00/3.00
Cll = CO(1,l) + T*(Cl(l,l) + C2(l,l)*T)
C22 = CO(2,2) + T*(Cl(2,2) + C2(2,2)*T)
C33 = CO(3,3) + T*(Cl (3,3) + C2(3,3)*T)
C44 = CO(4,4) + T*(Cl (4,4) + C2(4,4)*T)
IF (Cll.LT.O .OR. C33.LT.O) THEN
WRITE (*,*) 'INVALID TERM IN VIRGS'
ERRNUM = 1
RETURN
ENDIF
C1S = 3.DO*(CO(l,S) + T*(Cl(1,S) + C2(l,S)*T
C23 = 3.DO*(CO(2,3) + T*(Cl (2,3) + C2(2,3)*T
C32 = 3.00*(CO(3,2) + T*(Cl (3,2) + C2(3,2)*T
=
CMIX Cl1*Xl1*X(1) + C22*X22*X(2) + C33*X33*X(3) + C44*X44*X(4)
& + C23*X22*X(3) + C32*X33*X(2) + C1S*X1l *X(S)
& + E*3.00*Xll* X(2) *(Cll*Cll *C22)**F
& + E*3.DO*X22* X(l) *(Cll*C22*C22)**F
& + O.9200*3.DO*Xll * X(3) *(Cll *Cll*C33t*F
& + 0.92DO*3.DO*X33* X(l) *(Cl1*C33*C33)**F
& + 1.20DO*3.00*Xll* X(4) *(Cl1*C11*C44)**F
& + 1.1 ODO*6.00*X(1 )*X(2)*X(3)*(Cl1 *C22*C33)**F
=
CCMIX CMIX
END

Copyright C 1992, 1994 American Gas Association


All Rights Reserved

Property of PT. NISCONI


116

APPENDIX 8.6

GROSS CHARACTERIZATION METHOD


COMPUTER PROGRAM CALCULATIONS

This appendix provides example calculations which can be used to verify computer
programs. Table 6.6-1 provides six reference data natural gas compositions. Values of
relative density at 60F and 14.73 psia and volumetric gross heating value at 60F and 14.73
psia calculated from the compositions given in Table 6.6-1 are given in Table 6.6-2. Table
6.6-3 and 6.6-4 provide computed compressibility factors for the natural gases in Tables 6.6-1
and 6.6-2 at temperature and pressure conditions which can be used to verify calculations.
The computer program code used to generate the output in Tables 6.6-3 and 6.6-4 is
essentially the same as that used in the example program in Section 6.4.9. However, data
input, output formats and table headings were slightly modified in order to generate Tables
6.6-3 and 6.6-4 with the gas characteristics listed in Tables 6.6-1 and 6.6-2.

Table 6.6-1

Compositions of Natural Gases

Component Mole Percent for InalCated Gas


Component
GuH Coast Amarillo EkoflSk High Nz High COz-Nz

Methane 96.5222 90.6724 85.9063 81.4410 81.2120


Nitrogen 0.2595 3.1284 1.0068 13.4650 5.7020
Carbon Dioxide 0.5956 0.4676 1.4954 0.9850 7.5850
Ethane 1.8186 4.5279 8.4919 3.3000 4.3030
Propane 0.4596 0.8280 2.3015 0.6050 0.8950
i-Butane O.09n 0.1037 0.3486 0.1000 0.1510
n-Butane 0.1007 0.1563 0.3506 0.1040 0.1520
i-Pentane 0.0473 0.0321 0.0509 0.0000 0.0000
n-Pentane 0.0324 0.0443 0.0480 0.0000 0.0000
n-Hexane 0.0664 0.0393 0.0000 0.0000 0.0000
n-Heptane 0.0000 0.0000 0.0000 0.0000 0.0000
n-Octane 0.0000 0.0000 0.0000 0.0000 0.0000

Property of PT. NISCONI


117

Table 8.6-2

Input Parameters for Natural Gases


for GROSS CHARACTERIZATION METHODS 1 and 2

GuH Coast Amarillo Ekofisk High Nz High CO2 & N2


HV 1036.05 1034.85 1108.11 906.62 933.12
(BTU/ft')

HV* 38.6022 38.5574 41.2871 33.n97 34.7672


(kJ/dm3)
G, 0.581078 0.608657 0.649521 0.644869 0.686002

Nz 0.2595 3.1284 1.0068 13.4650 5.7021


(mole %)

CO2 0.5956 0.4676 1.4954 0.9850 7.5851


(mole %)

HV is the volumetric gross heating value computed from GPA 2172-94. The reference
condition for the molar gross heating value is 60F. 14.73 psia and the reference condition for
the molar density is also 6ooF. 14.73 psia.

* 'Gr is the relative density computed from GPA 2172-94. The reference condition is 60F.
14.73 psia.

Property of PT. NISCONI


118

Table B.6-3

Natural Gas Compressibility Factors Computed Using the


Gross Characterization Method 1
For Program Verification Purposes

-------------------------------------------------------------
Compressibility Factor for Indicated Gas
Temp Press. Gulf High High
F psia Coast Amarillo Ekofisk N2 CO2
-------------------------------------------------------------
32.00 14.73 .997407 .997309 .996792 .997681 .997220
32.00 100.00 .982366 .981689 .978106 .984263 .981072
32.00 200.00 .964673 .963300 .955948 .968562 .962026
32.00 400.00 .929232 .926413 .910923 .937409 .923693
32.00 600.00 .894003 ;889691 .865238 .90.6878 .885329
32.00 800.00 .859486 .853678 .819545 .877431 .847475
32.00 1000.00 .826402 .819185 .775061 .849666 .810972
32.00 1200.00 .795719 .787317 .733805 .824302 .777024

50.00 14.73 .997704 .997616 .997149 .997956 .997539


50.00 100.00 .984414 .983812 .980587 .986158 .983275
50.00 200.00 .968846 .967630 .961044 .972409 .966529
50.00 400.00 .937887 .935414 .921690 .945320 .933094
50.00 600.00 .907424 .903679 .882290 .919027 .900017
50.00 800.00 .877876 .872882 .843433 .893904 .867761
50.00 1000.00 .849791 .843635 .806043 .870401 .836972
50.00 1200.00 .823846 .816703 .771453 .849024 .808478

100.00 14.73 .998359 .998294 .997941 .998556 .998238


100.00 100.00 .988910 .988468 .986049 .990266 .988082
100.00 200.00 .977952 .977066 .972174 .980702 .976284
100.00 400.00 .956520 .954752 . 94477l. .962169 .953149
100.00 600.00 .935910 .933281 .918073 .944586 .930822
100.00 800.00 .916360 .912913 .892439 .928155 .909578
100.00 1000.00 .898136 .893941 .868312 .913089 .889728
100.00 1200.00 .881520 .876678 .846199 .899599 .871608
130.00 14.73 .998652 .998598 .998299 .998822 .998549
130.00 100.00 .990914 .990544 .988499 .992074 .990211
130.00 200.00 .981985 .981247 .977126 .984331 .980574
130.00 400.00 .964671 .963207 .954862 .969461 .961840
130.00 600.00 .948212 .946049 .933424 .955526 .943972
130.00 800.00 .932777 .929956 .913070 .942667 .927164
130.00 1000.00 .918541 .915122 .894090 .931023 .911624
130.00 1200.00 .905682 .901743 .876792 .920727 .897561

Property of PT. NISCONI


119

Table B.6-4

Natural Gas Compressibility Factors Computed Using the


Gross Characterization Method 2
For Program Verification Purposes

-------------------------------------------------------------
Compressibility Factor for Indicated Gas
Temp, Press. , Gulf High High
F psia Coast Amarillo Ekofisk N2 CO2
-------------------------------------------------------------
32.00 14.73 .997408 .997310 .996794 .997682 .997222
32.00 100.00 .982375 .981701 .978120 .984272 .981083
32.00 200.00 .964691 .963323 .955976 .968582 .962048
32.00 400.00 .929268 .926463 .910983 .937449 .923738
32.00 600.00 .894059 .889768 .865334 .906940 .885400
32.00 800.00 .859563 .853785 .819681 .877516 .847573
32.00 1000.00 .826501 .819323 .775240 .849774 .811099
32.00 1200.00 .795840 .787484 .734024 .824432 .777179

50.00 14.73 .997705 .997618 .997151 .997957 .997540


50.00 100.00 .984422 .983822 .980599 .986167 .983285
50.00 200.00 .968862 .967651 .961069 .972427 .966548
50.00 400.00 .937919 .935459 .921743 .945356 .933134
50.00 600.00 .907474 .903748 .882375 .919082 .900079
50.00 800.00 .877944 .872976 .843550 .893979 .867847
50.00 1000.00 .849878 .843755 .806195 .870495 .837082
50.00 1200.00 .823951 .816847 .771638 .849137 .808610

100.00 14.73 .998360 .998295 .997943 .998557 .998239


100.00 100.00 .988916 .988476 .986058 .990273 .988089
100.00 20Q.00 .977963 .977082 .972193 .980715 .976299
100.00 400.00 .956544 .954785 .944810 .962196 .953178
100.00 600.00 .935947 .933331 .918132 .944627 .930867
100.00 800.00 .916409 .912980 .892521 .928209 .909639
100.00 1000.00 .898198 .894025 .868415 .913156 .889804
100.00 1200.00 .881593 .876778 .846323 .899679 .871699

130.00 14.73 .998653 .998599 .998300 .998822 .998550


130.00 100.00 .990919 .990551 .988507 .992080 .990217
130.00 200.00 .981995 .981261 .977142 .984342 .980586
130.00 400.00 .964691 .963235 .954894 .969484 .961865
130.00 600.00 .948242 .946091 .933474 .9.55560 .944010
130.00 800.00 .932817 .930012 .913137 .942712 .927215
130.00 1000.00 .918592 .915192 .894174 .931079 .911686
130.00 1200.00 .905742 .901825 .876893 .920793 .897635

Property of PT. NISCONI


120

APPENDIX B.7

GROSS CHARACTERIZATION METHOD CALCULATION UNCERTAINTIES

B.7.1 Uncertainties in Computed Compressibility.Factors

Compressibility factors calculated using the GROSS CHARACTERIZATION METHOD


with volumetric gross heating value, relative density and carbon dioxide content as input were
compared with experimentally measured values on five simulated natural gas mixtures.
Reference 1, Appendix B.8. These mixtures were gravimetrically prepared to represent key
natural gas samples occurring in North America and Europe. Table B.6-1 provides the
compositions of these samples. The uncertainty of this reference data set in the temperature
range from -10F to 17ff'F or 250 K to 350 K and pressures to 1750 psia or 12 MPa at a 95%
confidence level is 0.07%.

Computed compressibility factors from the GROSS CHARACTERIZATION METHOD


agree on average within 0.04% of a best fit of the experimental data in the custody transfer
region from 35F to 170F and pressures up to 1750 psia (275 K to 350 K and pressures up
to 12 MPa) (References 1 and 6 in Appendix B.8).

The GROSS CHARACTERIZATION METHOD (SGERG method) equation of state was


used for compressibility factor calculations for 4145 natural gas data points in the GERG data
bank (Reference 5 in Appendix B.8). These samples were not gravimetrically prepared. The
compositions were determined by gas chromatography. The reported compositions of these
gases were used to calculate heating values and relative density values used in the SGERG
compressibility factor calculations. Statistical analyses of the differences between calculated
and experimental compressibility factors were performed to evaluate the uncertainties in the
calculated compressibility factors. Statistics were calculated using the following equations
where N is the number of data points:

(B.7-1)

1 N
BIAS = -L~., (B.7-2)
N 1_1

(B.7-3)

Property of PT. NISCONI


121

Std. Dev. = r_1_E(~.I-BIAS)2~J


IN-1 1-1
(B.7-4)

(B.7-5)

Max.Dev. = (~)max (B.7-6)

Where:
~Iff = relative percentage difference between calculated and experimental
compressibility factors
~1 =~ for ith data point
(~)m~ = maximum value of ~
Zalc = calculated compressibility factor
Ze"P =experimental compressibility factor
AAD =average absolute deviation
BIAS = bias
Std.Dev. = standard deviation
RMS = root mean squared deviation
Max.Dev. = maximum value of ~Iff

Calculations were performed for 75 natural gases in the ranges 1rF to 143F (-8C to
62C or 265K to 334K) and pressures up to 1750 psia (12 MPa or 120 bar). These natural
gases were classified into six groups according to composition. Group 1 is composed of 13
natural gases containing more than 9.5 mole percent nitrogen. Group 2 is composed of 8
natural gases containing more than 4.0 mole percent carbon dioxide. Group 3 is composed
of 23 natural gases containing more than 8.0 mole percent ethane. Group 4 is composed of
13 natural gases containing more than 2.0 mole percent hydrogen. Group 5 is composed of
10 natural gases containing more than 4.0 mole percent nitrogen and more than 4.0 mole
percent ethane. Group 6 is composed of 8 natural gases containing more than 94.0 mole
percent methane.

A summary of the statistical analyses of the differences between calculated and


experimental compressibility factors for the six groups of natural gases is given in Table B. 7 -1.
The uncertainties in calculated compressibility factors are smallest for the natural gases with
more than 94.0 mole percent methane (Group 6). for which the standard deviation is 0.030%
and the maximum deviation for 448 data pOints is -0.137%. The uncertainties in calculated
compressibility factors are largest for the natural gases with more than 8.0 mole percent
ethane (Group 3). for which the standard. deviation is 0.057% for 1278 data points. The

Property of PT. NISCONI


122

maximum deviation point in the total of 4145 data points occurs for a natural gas with more
than 8.0 mole percent ethane (Group 3); this maximum deviation is -0.324%. Overall, for the
total of 4145 data points, the standard deviation is 0.049%, the root mean square deviation is
0.049%, t~ bias is -0.005% and the average absolute deviation is 0.034%.

Table B.7-1

Statistical Analyses of the Differences Between Calculated and Experimental


Compressibility Factors for Six Natural Gas Groups,
GROSS CHARACTERIZATION METHOD

Gas No. of No. of AAD Bias StdDev RMS MaxDev


Group Natural Points % % % % %
No. Gases
1 13 625 0.039 0.003 0.049 0.049 -0.159
2 8 476 0.034 0.017 0.041 0.044 0.148
3 23 1278 0.038 -0.017 0.057 0.060 -0.324
4 13 690 0.024 0.003 0.034 0.034 0.147
5 10 628 0.038 -0.022 0.047 0.052 -0.209
6 8 448 0.022 0.008 0.030 0.032 -0.137
1-6 75 4145 0.034 -0.005 0.049 0.049 -0.324

8.7.2 Uncertainties in Computed SupercompresslbilityFactors

The uncertainty in a computed supercompressibility factor Fpv is related to the


uncertainties in the computed values of both the compressibility factor Z and the
compressibility factor Z(60F, 14.73 psia). If there were no uncertainty in Z(60F, 14.73 psia),
the unce~inty in Fpv would be one-half the uncertainty in Z. If the uncertainty in Z(60F, 14.73
psia) were equal to the uncertainty in Z, the uncertainty in Fpv would be 0.707 times the
uncertainty in Z. Because the uncertainty in Z(60F, 14.73 psla) cannot exceed the uncertainty
in Z, the uncertainty in Fpv generally will be between 0.5 and 0.707 times the uncertainty in Z.
For the 4145 data points for the 75 natural gases in the custody transfer region of Table B. 7 -2,
the expected uncertainty in computed values of Fpv is 0.024% to 0.034%. Based on the
maximum deviation in Z of -0.324% in Table B.7-2, the maximum deviation in Fpv for natural
gases in the region of Table B.7-2 is 0.16%. Thus, it is concluded that using the SGERG
method, if there were no uncertainty in the natural gas characterization (heating value, relative
density and nonhydrocarbon content), then 95% of the time the uncertainty in a calculated
supercompressibility factor would not exceed 0.034% and would not be expected to exceed
0.16% in the region of Table B.7-2.

Property of PT. NISCONI


123

APPENDIX B.8

GROSS CHARACTERIZATION METHOD REFERENCES

1. Savidge, J.L., S.W. Beyerlein, and E.W. Lemmon, "Technical Reference


Document for the 2nd Edition of AGA Report Number 8," GRI-93/0181 (1993).

2. Schouten, J.A., J.P. J. Michels, and M. Jaeschke, "Calculation of the


Compressibility Factor of Natural Gases Based on the Calorific Value and the
Specific Gravity, International Journal of Thermophysics, 11 (1 ):145-156 (1990).

3. Jaeschke, M. and A.E. Humphreys, GERG Technical Monograph 5 Fortschritt-


Berichte VOl Reihe 6 No. 266 (1991).

4. Chambers, G., "A Quadratic Formula for Finding the Root of an Equation,"
Mathematics of Computation, 25(114) (1971).

5. Jaeschke, M. and A.E. Humphreys, "GERG Databank of High Accuracy Compressibility


Factor Measurements" GERG Technical Monograph 4, Fortschritt-Berichte VOl Reihe
6, No. 251 (1990).

6. Schouten, J. and J. Michels, "Evaluation of the PVT Reference Data on Natural


Gas Mixtures," Gas Research Institute (1992).

Property of PT. NISCONI


Property of PT. NISCONI
125

APPENDIX C

REFERENCE CONDITIONS AND CONVERSIONS


FOR HEATING VALUE AND RELATIVE DENSITY

APPENDIX C.1 - NOMENCLATURE ................................... 127


APPENDIX C.2 - DISCUSSION OF REFERENCE CONDITIONS . . . . . . . . . . . . . .. 129
APPENDIX C.3 - DENSITY, COMPRESSIBILITY FACTOR AND
SUPERCOMPRESSIBILITY FACTOR ..................... 130
APPENDIX C.4 - MOLAR HEATING VALUE FROM COMPOSITION ........... 135
APPENDIX C.S - VOLUMETRIC HEATING VALUE ........................ 142
APPENDIX C.G - REFERENCES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 143

Property of PT. NISCONI


Property of PT. NISCONI
127

APPENDIX C.1

NOMENCLATURE

Symbol =Represented Quantity


ak,bk,ck = constants in Table C.4-2
n
8(air, = second vi rial coefficient of air at T, dm3/mol
CrH 2r+2 = hydrocarbon molecule
CO = carbon monoxide molecule
CO2 = carbon dioxide molecule
Cp (H 20, Uq.) = liquid water molar heat capacity
C~ = molar ideal gas heat capacity of species k
d = molar density (moles per unit volume)
d(Td' Pd) = molar density at Td' Pd
=
Fpv supercompressibility factor at T, P
Gr(Tgr,Pgr) = relative density of gas mixture at Tgrt Pgr
H2 = hydrogen molecule
H20 = water molecule
=
H2S hydrogen sulfide molecule
HF~(Th,Ph) = ideal molar enthalpy of formation of species kat T h, Ph
=
HH o(Liq.,Th ,Ph) molar enthalpy of liquid water at Th , Ph1
HH20(Liq.,Th~,Ph1)
2 .'Z 1
= molar enthalpy of liquid water at T~, "'l!
Ph1
Hk(Th ,Ph) = ideal gas molar enthalpy of species kat Th , Ph
Hk0(T~' 1 P 1 .
h1) = ideal gas molar enthalpy of species k at T~, Ph
1 1
HMO(Th,Ph) = mass ideal gross heating value at Th, Ph 1
HN(Th'Ph) = molar real gross heating value of gas mixture at Th, Ph
HN(Th'Ph) = molar ideal gross heating value of gas mixture at T h, Ph
HNjO(Th,Ph) = molar ideal gross heating value of ith component at T h, Ph
HN(Th ,Ph) = molar ideal gross heating value at Th , Ph
HN(T~,Phl) = molar ideal gross heating value of ga~ mi~ure at Th , Ph
HN(T~,P~) = molar ideal gro~s heating value of gas mixture at T~, Ph:
HV(Th,Ph,Td,Pd) = volumetric gross heating value with reference conditions
Th,Ph,Td,Pd
Mr = molar mass (molecular weight)
Mr = molar mass of ith component
Mr(aid = molar mass of air
N = number of components in gas mixture
n = number of moles of gas
NC = number of combustible components in gas mixture
O2 = oxygen molecule
P = absolute pressure
Pb = contract reference absolute pressure
Pd = reference pressure for molar density
Por = reference pressure for relative density
Ph = reference pressure for heating value
Ph1 = reference pressure

Property of PT. NISCONI


128

=
P"2 reference pressure
R = gas constant
= r number of carbon atoms in hydrocarbon molecule
=
5C~~o stoichiometric coefficient for water for combustion of ith
component
=
5C~k stoichiometric coefficient of species k for combustion of ith
component
502 = sulfur dioxide molecule
=T absolute temperature
=
Tb contract reference absolute temperature
=
T d reference temperature for molar density
=
T 01' reference temperature for relative density
=
T h reference temperature for heating value
Th1 = absolute temperature
T ~ = absolute temperature
V = gas volume
=~ mole fraction of ith component
=Z compressibility factor at conditions of interest
Z(T,P} = compressibility factor at T, P
=
Z(Tgr' POI'} compressibility factor of gas mixture at Tgr' Pgr
Z( air, T gr' POI'} = compressibility factor of air at Tor' Por .
Z(60F, 14.73 psia} = compressibility factor at 60F, 14.73 psia
=p mass density (mass per unit volume)
=
Pb mass density at contract reference condition Tb , Pb
=
P(Td' Pd) mass density of gas mixture at Td' Pd
=
p(Tor' POI') mass density of gas mixture at T9" Por
=
p(air, T gr' POI'} mass density of air at Tor' Por

Property of PT. NISCONI


129

APPENDIX C.2

DISCUSSION OF REFERENCE AND STANDARD CONDITIONS

When a body of information has been developed for a quantity such as the molar
heating value at a single condition of temperature and pressure, it is common to refer to this
condition as the reference condition. In the gas industry, reference conditions are commonly
referred to using the three terminologies, (1) base conditions, (2) normal conditions, and (3)
standard conditions.

A number of specific temperature-pressure conditions are used for reference conditions


for natural gas volumetric properties (density, specific volume or compressibility factor) as
outlined in GPA 2172-94. In the U.S. gas industry, it is common to refer to the reference
condition 60F and 14.696 psi a as standard conditions. In much of Europe, the reference
condition 15C and 0.101325 MPa is referred to as standard conditions. Also in Europe, the
reference condition OC and 0.101325 MPa commonly is referred to as normal conditions. In
the U.S., the reference condition which is the basis for a gas contract is commonly referred
to as the base condition. The base condition temperature usually is 60F but the base
condition pressure varies, not only with geographical region but from contract to contract. The
reference condition for tabulations of the supercompressibility factor Fpv in American Gas
Association publications is 60F and 14.73 psia; specifically, F:v,= Z(600F, 14.73 pSia)IZ(T,P),
where Fpv is the supercompressibility factor at temperature T and pressure P, Z(60F, 14.73
psia) is the compressibility factor at reference conditions 60F and 14.73 psi a and Z(T,P) is the
compressibility factor at temperature T and pressure P. Given the fact that there is a plethora
of choices for reference conditions as well as names such as standard conditions, normal
conditions and base conditions, the reference condition temperature and the reference
condition pressure should be clearly specified.

The reference condition 25C and 0.101325 MPa commonly is used in scientific
literature for experimental data tabulations of molar enthalpies of formation of compounds from
the elements. The molar enthalpies of formation of the compounds involved in combustion are
used for calculations of compound molar heating values at the reference condition. The molar
heating value for a compound at a specified condition different from the reference condition
then can be determined from the molar heating value at the reference condition plus the
enthalpy differences between the specified condition and the reference condition for the
stoichiometric amou~ts of the compounds involved in the combustion reaction.

The volumetric heating value is the molar heating value multiplied by the molar density.
Mixed reference conditions result for the volumetric heating value when the reference condition
for the molar heating value differs from the reference condition for the molar density.
Therefore, the reference conditions for both the molar heating value and the molar density
must be specified to completely specify the volumetric heating value. This is important to note
since it occurs in the methods presented in Appendix B.2.

Quantitative relations pertinent to reference conditions for volumetric properties and


heating values are given subsequently. The quantitative information presented here agrees
with GPA Standard 2172-94, Reference 4 in Appendix C.6, and the May 22, 1991 draft
revision of ISO 6976, Reference 2 in Appendix C.6, within the combined uncertainties of the
quantities involved.

Property of PT. NISCONI


130

APPENDIX C.3

DENSITY, COMPRESSIBIUTY FACTOR


AND SUPERCOMPRESSIBIUTY FACTOR

This section contains general equations involving the compressibility factor Z, the molar
density d, the mass density p and the supercompressibility factor Fpv for natural gas and other
hydrocarbon gases.

The compressibility factor, Z, is defined by the equation:

Z = PV (C.3-1)
nRT

Where:
Z = compressiblity factor of gas
=
P absolute static pressure of gas
=
V gas volume
=
n number of moles of gas
=
R gas constant
=
T absolute temperature of gas

The number of moles of gas per unit volume is the molar density. d:

d = ~ (C.3-2)
V

Where:
d = molar density (moles per unit volume)
=
n number of moles of gas
V = gas volume

The molar mass, Mr, is needed for calculation of the mass density p from the molar
density d. When using the DETAIL CHARACTERIZATION METHOD, all components in the
mixture are known and this can be obtained from the summation:

(C.3-3)

Property of PT. NISCONI


131

Where:

Mr = molar mass (mass per mole)


Mr = molar mass of ith component
N= number of components in gas mixture
Xi = mole fraction of component i in gas mixture

When using the GROSS CHARACTERIZATION METHOD, the molar mass, must be estimated
from the relative density:

M _ Gr(Tgr,Pgr) Mr(air) Z(Tgr'Pgr)


(C.3-4)
r Z(air,Tgr'Pgr)

Where:
Gr(Tgr' Pgr) = relative density of gas mixture at Tgr' Pgr
Mr = molar mass for the gas mixture
Mr(air) = molar mass of air, 28.96256
Z(Tgr' Pgr) = compressibility factor of gas mixture at T gr' Pgr
Z(air,Tgr. Pgr) = compressibility factor of air at Tgr' Pgr

The mass density p is related to the molar density d by the relation:

p = Mr d (C.3-5)

Where:
p = mass density (mass per unit volume)
d = molar density (moles per unit volume)
Mr = molar mass (mass per mole)

Thus. using Equations C.3-2 and C.3-5 in Equation C.3-1, the molar density d and the mass
density p can be expressed in terms of the compressibility factor Z by the following equations:

d=~ (C.3-6)
ZRT

Mr P
(C.3-7)
P = ZRT

Property of PT. NISCONI


132

Where:
Z =compressibility factor at conditions of interest
P = absolute pressure
d = molar density (moles per unit volume)
R =gas constant
T = absolute temperature of gas
Mr = molar mass (mass per mole)
P = mass density (mass per unit volume)

The compressibility factor of natural gases can be calculated using either the DETAIL
CHARACTERIZATION METHOD in Appendix A or the GROSS CHARACTERIZATION
METHOD in Appendix B.

C.3.1 Mass Density at Contract Reference Conditions

The mass density Pb at the contract reference condition Tb, Pb which is a specific
reference condition. can be calculated using the following relation:

(C.3-8)

Where:
Pb = mass density at contract reference condition at Tb' Pb
Mr =molar mass
R = gas constant
Tb = contract reference absolute temperature
Pb = contract reference absolute pressure

C.3.2 Supercompressibility Factor Reference Condition

Tabulations of the supercompressibility factor Fpv presented by the American Gas


Association (see Appendix C.6, Reference 1), are defined by the following relation:

F2 = Z(60F, 14.73 psia) (C.3-9)


pv Z(T,P)

Where:
Fpv = supercompressibility factor at T, P
Z(60F,14.73 psia) = compressibility factor at 60F, 14.73 psi a
Z(T,P) = compressibility factor at T, P

According to this defining equation for the supercompressibility factor Fpv' the condition 60F,
14.73 psia is a specific reference condition. Note that the contract reference condition equals
the reference condition for supercompressibility factor only when the contract reference
condition is 60F, 14.73 psla.

Property of PT. NISCONI


133

C.3.3 Relative Density Reference Condition

Thegas relative density (specific gravity) at the reference condition Tgr, Pgr is defined
by the relation:

p(Tgr,P gr )
(C.310)
p(air, Tgr , Pgr)

Where:

Gr(Tgr' Pgr) = relative density of gas mixture at T gr' Pgr


p(Tgr' Pgr) = mass density of gas mixture at Tgr' Pgr
p(air, T gr , Pgr) = mass density of air at Tgr, Pgr
T gr = reference temperature for relative density
Pgr = reference pressure for relative density
In this relation for G r (Tgr, Pgr), both the gas mixture density p(Tgr Pgr) and the air density
p(air, Tgp Pgr) must be at the same temperature-pressure condition T gr, Pgr' The gas mixture
mass density can be calculated using either the DETAIL CHARACTERIZATION METHOD or
the GROSS CHARACTERIZATION METHOD.

The mass density of air is calculated as:

(C.3-11)

Where:
T gr = reference temperature for relative density
Pgr = reference pressure for relative density
R = gas constant
Mr(air) = molar mass of air
B(air,Tgr) = air second virial coefficient at Tgr

The second vi rial coefficient of air for temperatures in the range 32F - nOF or OC - 25C can
be calculated using the relation:

B(air,T) = -0.12527 + 5.91x10~T - 6.62x10-7 T2 (C.3-12)

Where:
8(air,T) = air second virial coefficient at T, dm 3/mol
T = absolute temperature

Property of PT. NISCONI


134

The value Mr(air)=28.96256 has been used for the molar mass of air. This value is based on
the composition of dry air in Reference 5, Appendix C.6. The value Mr(air)=28.9625 is used
in Reference 4, Appendix C.6. Air compressibility factor values calculated using Equation C.3-
11 and Equation C.3-12 agree with the values in Reference 5, Appendix C.6 within 0.002%
in the range reported, 66.~F to 78.8F (19.0C to 26.0C) and 10.4 psia to 16.0 psia (0.07
MPa to 0.11 MPa). .

Property of PT. NISCONI


135

APPENDIX C.4

MOLAR HEATING VALUE FROM COMPOSITION

The heating value of a gas mixture is calculated from a knowledge of the mixture
composition and the heating value of each combustible component in the mixture. The molar
ideal heating value of a combustible component is defined in terms of the oxidation reaction
equation for one mole of the component. For the paraffin hydrocarbons, the oxidation reaction
equation can be expressed in the following form:

(C.4-1 )

Where:

r = number of carbon atoms in hydrocarbon molecule


Cr H2r+2 = hydrocarbon molecule
O 2 = oxygen molecule
=
CO2 carbon dioxide molecule
H20 = water molecule

The reaction equation refers to the oxidation reaction of one molecule of the hydrocarbon
C i H 2r+2 The coefficients of the molecular formulas indicate the number of molecules which
enter into the reaction. Thus, the oxidation of one paraffin hydrocarbon molecule reactant
C rH2r+2 requires 1/2(3r+1) molecules of oxygen reactant O2 to form r molecules of carbon
dioxide product CO2 and (r+1) molecules of water-product H20.

Oxidation reaction equations for the gas mixture nonhydrocarbon combustible


components hydrogen sulfide, hydrogen and carbon monoxide are given by the following
relations:

(CA-2)

(CA-3)

(CA-4)

Property of PT. NISCONI


136

Where:
H2S = hydrogen suHide molecule
. O2 = oxygen molecule
S02 = sulfur dioxide molecule
H20 = water molecule
H2 = hydrogen molecule
CO = carbon monoxide molecule
CO2 = carbon dioxide molecule

The molar heating value is defined such that the reactants and products are at the
same reference condition of temperature Th and pressure Ph. The most common reference
condition for experimental data on the heating value is TrF or 25C and 14.696 psia or
0.101325 MPa. The molar ideal gross heating value of the ith component at the reference
condition Th, Ph is given by the following relation:

HN1(Th'Ph) :: -ESCI,kHFk(Th,Ph) (C.4-5)


k

Where:

=
HN ~ (Th,PJ molar ideal gross heating value of ith component at Th, Ph
SCl,k =stoichiometric coefficient of species k for combustion of ith component
HF~(Th,Ph) =molar ideal enthalpy of formation of species kat Th, Ph
Th = reference temperature for heating value
Ph = reference pressure for heating value

The summation over k in this equation is over all species which enter into the reaction of
component i. The stoichiometric coefficients SC~k' which define the relative number of
molecules or moles which enter into the reaction, are given in Table C.4-1 along with the
component molar ideal gross heating values for the major components of natural gas. The
heating values in Table C.4-1 agree with the heating values in GPA Standard 2172-94,
Reference 4 in Appendix C.6 and the May 22, 1991 draft revision of ISO 6976, Reference 2
in Appendix C.6 within the combined uncertainties of the component molar ideal gross heating
values in these references. It should be noted that in Table C.4-1, each of the reactants and
products is at TrF or 25C and 14.696 psi a or 0.101325 MPa. Also, each species (reactants
and products) is in the ideal gas state except for product water which is saturated liquid at its
vapor pressure at the temperature Th (for the net heating value, product water is in the ideal
gas state).

Property of PT. NISCONI


137

Table C.4-1

Stoichiometric Coefficients for Complete Oxidation and Molar Ideal


. Gross Heating Value at 25C, 0.101325 MPa

Species Stoichiometric Coefficient, SC j k Molar Ideal


Gross Heating
Value, HN jO,
kJ/mol
Carbon Sulfur
Compound Compound Oxygen Water Dioxide Dioxide
Methane -1 -2 2 1 0 890.63
Ethane -1 -3.5 3 2 0 1560.69
Propane -1 -5 4 3 0 2219.17
Isobutane -1 -6.5 5 4 0 2868.20
Normal Butane -1 -6.5 5 4 0 28n.40
Isopentane -1 -8 6 5 0 3528.83
Normal Pentane -1 -8 6 5 0 3535.n
Normal Hexane -1 -9.5 7 6 0 4194.95
Normal Heptane -1 -11 8 7 0 4853.43
Normal Octane -1 -12.5 9 8 0 5511.80
Normal Nonane -1 -14 10 9 0 6171.15
Normal Decane -1 -15.5 11 10 0 6829.n
Hydrogen Sulfide -1 -1.5 1 0 1 562.01
Hydrogen -1 -0.5 1 0 0 285.83
Carbon Monoxide -1 -0.5 0 1 0 282.98

The molar ideal gross heating value of a dry gas mixture is related to the composition
of the mixture by the following relation:
NC

HN (Th'Ph) = L xIHNt(Th.Ph)
1=1
(C.4-6)

Property of PT. NISCONI


138

Where:

HN(Th'Ph) =molar ideal gross heating value of gas mixture at Th, Ph


HN.O(Th,Ph)=molar ideal gross heating value of ith component at Th, Ph
X. =mole fraction of ith component in gas mixture
NC =number of combustible components in gas mixture

It should be noted that gas mixture components which do not undergo combustion are not
included in the summation in Equation 6.4-6. In addition, it should be noted that Equation CA-
6 is for a dry gas mixture, that is the gas mixture before combustion contains no water vapor.
If the gas mixture before combustion contains water vapor, the definition of the molar ideal
gross heating value requires that this water vapor be in the liquid state after combustion, so
that the mole fraction of water times the molar enthalpy of vaporization of water must be added
to Equation C.4-6. The molar ideal enthalpy of vaporization of water is the molar enthalpy of
water as an ideal gas at Th minus the molar enthalpy of water as a saturated liquid at its vapor
pressure at Th. Subsequent discussion will be for combustion of dry gas.

When the molar ideal gas heating values of the Components in a gas mixture are
known at one temperature, for example Th , the molar ideal gas heating value can be
calculated at a second temperature, for example T":!' using the enthalpy differences between
T hand T,,:! for all reactants and products according to the stoichiometric coefficients in the
oxldation reactions for the combustible components.

The molar ideal gross heating value for the dry gas mixture at temperature Th is
calculated using the following equation: 2
NC

HN(T""Ph) = HN(Th,'Ph) - LX.ESC'.k[Hk(T""Ph)-Hk(Th"Ph,)]


,-, k (C.4-7)
NC

- L,-, x,SCI,H"o[HH"o(Uq.,T""Ph)-HH"o(Uq.,Th,'Ph)]

Where:

HN(T,,:!,Ph ) = molar ideal gross heating value of ith component at Th , Ph


2
HN(Th ,Ph') = molar ideal gross heating value of ith component at Th , Pn '
'SC;k =stoichiometric coefficient of species k for combustion of ith'
component
H~(T,,:!,Ph) = ideal gas molar enthalpy of species kat T,,:!, Ph
H~(Th ,Ph') = ideal gas molar enthalpy of species kat Th , Ph'
. sb,.~o =stoichiometric coe~ici~nt for water for comtiusti~>n of ith component
HH20(L~q.,T,,:!,Ph,) = molar enthalpy of I~qu~d water at T,,:!, Ph,
H H o(lIq.,Th ,Ph) = molar enthalpy of liqUid water at Th , Ph
2 1 NC = number of combustible component~ in gas mixtures

The summation over k in this equation is over all species (except water) which are involved
in the combustion reaction for the ith cOmponent.

Property of PT. NISCONI


139

The enthalpy differences for reactants and products in Equation C.4-7 can be
calculated using constant pressure heat capacities for the various species involved. For the
temperature range 32F - nOF or OC - 25C, the molar ideal gas heat capacities of all species
considered here (except water) can be calculated using the following relation:

(C.4-8)

Where:
c~
k
=molar ideal gas heat capacity of species k
R = gas constant in same units as C~
k
ak,bk,ck = constants in Table C.4-2
T = absolute temperature

Values for the constants ~, bk, <; in Equation C.4-8 are given in Table C.4-2 for absolute
temperature units of kelvins. The constants in Table C.4-2 were taken from References 3 and
4 in Appendix C.6.

Using the relationship in Equation C.4-8 yields the following equations for the species
molar ideal gas enthalpy difference between the temperatures Th1 , T~:
T

Hk(T""Ph,> - H~O(Th"Ph'> = JC:'dT


T.,
(C.4-9)

Where:
HOk(Th ,Ph)
2 1
= ideal gas molar enthalpy of species k at T~, Ph 1
H\(Th ,Ph ) = ideal gas molar enthalpy of species kat Th ' Ph
1 C~ = molar ideal gas heat capacity of species k 1 1
k

(C.4-10)

R = gas constant in same units as ~


ak,bk,ck = constants in Table C.4-2 k
=
T absolute temperature
T ~ = absolute temperature T~
Th 1 = absolute temperature

Th 1

Property of PT. NISCONI


140

Table C.4-2

Ideal Gas Molar Heat Capacity Coefficients (units: T. K; bk K-1; c k ' K2)
caution: Use only in the range 32F - TrF or OC - 25C

Compound , b..x 1OO ckx105


Methane 4.1947 0.3639 1.49
Ethane 5.9569 1.3n 1.69
Propane 8.2671 2.286 1.90
Isobutane 10.824 3,153 0.82
Nonnal Butane 11.109 2.875 1.82
Isopentane 13.412 3.540 1.40
Nonnal Pentane 13.587 3.288 2.98
NonnalHexane 16.134 3.986 3.60
Nonnal Heptane . 18.642 4.7~6 3.84
Nonnal Octane 21.192 5.480 4.30
Nonna! Nonane 23.730 6.172 4.76
NonnalDecane 26.280 6.869 5.25
Hydrogen Sulfide 4.070 0.118 0.28
Hydrogen 3.433 0.155 -0.74
Carbon Monoxide 3.503 0.009 0.09
Helium 2.500 0 0
Argon 2.500 0 0
Oxygen 3.520 0.044 0.280
Nitrogen 3.502 0.006 O
Sulfur Dioxide 4.707 0.439 0.09
Carbon Dioxide 4.324 0.580 -0.65

For liquid water near atmospheric pressure in the range 32F - TrF or .
OC - 25C, the molar heat capacity C p (H20,Liq.) is nearly constant at the average value 17.98
Btu/lb-mole OR or 75.29 J/mol-K. therefore: .
(C.4-11)

Where:
HH2o(~iq.,T"2,Ph1 )= molar enthalpy of I~qu~d water at T"2' Ph1
HH o(Llq., Th ,Ph) = molar enthalpy of liquid water at Th , Ph
2 Cp(H20~Liq~) = liquid water molar heat capacity 1 1
=
T"2 absolute temperature T"2
Th 1 = absolute temperature Th 1

Property of PT. NISCONI


141

Because there is no effect of pressure on the enthalpies of reactants and products in


the ideal gas state, the molar ideal gross heating value of a gas mixture is unchanged by
changes in the reference pressure Ph except for the effect on the enthalpy of liquid water:

HN (Thz,Ph)
2
=HN O(ThZ ,Ph)1
NC (C.4-12)
-E XISCI,HzO[HHzO(Liq.,Th.,Ph) -HHzo(Liq.,Th.,Ph,)]
I-I

Where:
HN(Th:z'P~ = molar ideal gross heating value at Th:z' Ph
2
HN(Th:z,PhJ = molar ideal gross heating value at Th:z' Ph
ki = mole fraction of ith component 1
SCI,~O = stoichiometric coefficient for water for combustion of ith
component .
HH20(L~q .T h:z'Ph:z} = molar enthalpy of I~qu~d water at Th:z' P~
HH o(Llq.,Th:z,Ph) = molar enthalpy of liquid water at T~, Ph
2 NC = number of combustible components in gas mixture
It should be noted that when both Ph and P':'2 are less than 16.0 pSia or 0.11 MPa, the
difference in Equation C.4-12 can be nkglected.

It is shown in Reference 3 in Appendix C.6 that for natural gases, if the pressure
is less than 16.0 psia or 0.11 MPa, the difference between the molar real gross heating value,
HN(Th' Ph) and the molar ideal gross heating value, HN(Th'Ph), is smaller than the uncertainty
in either a measured value or a calculated value of HN(Th' Ph)' The computations required to
correct the molar ideal gross heating value to the molar real gross heating value are of no
practical benefit with respect to accuracy. For this reason, the molar ideal gross heating value
is used in thi~ document instead of the molar real gross heating value.

The mass ideal gross heating value and the molar ideal gross heating value are
interrelated through the gas mixture molar mass using the relation:

(C.4~13)

Where:
HMO(Th,Ph) = mass ideal gross heating value at Th, Ph
HN(Th,Ph) = molar ideal gross heating value of gas mixture at Th, Ph
Mr = molar mass

Property of PT. NISCONI


142

APPENDIX C.S

VOLUMETRIC HEATING VALUE

The volumetric gross heating value is the product of the molar ideal gross heating value
and the gas mixture molar density:
(C.S-1 )

Where:
HV(Th,Ph.Td.PJ = volumetric gross heating value at reference conditions Th,Ph,Td,Pd
HN(Th'Ph) = molar ideal gross heating value at Th Ph
=
d(Td,Pd) molar density at Td Pd
=
Td Pd reference temperature and pressure for molar density
=
Th' Ph reference temperature and pressure for heating value

Note that the reference condition Th' Ph for the molar real gross heating value can differ from
the reference condition Td' Pd for the molar density. Condition Th' Ph and condition Td' Pd both
must be specified to completely specify the reference conditions for the volumetric heating
value.

The volumetric gross heating value also is the product of the mass ideal gross heating
value and the gas mixture mass density:
(C.S-2)

Where:
HV(Th,Ph.Td,Pd) = volumetric gross heating value at reference conditions Th.Ph,Td,Pd
HM(Th,Ph) = mass ideal gross heating value at Th, Ph
P(Td,Pd) = mass density of gas mixture at Td Pd

Again. note that reference condition Th Ph can differ from reference condition T d Pd and that
both reference condition Th Ph and reference condition Td Pd must be specified to specify the
reference conditions for the volumetric heating value.

When the complete compositional analysis of the natural gas is known, d(Td' Pd) and
P(Td' Pd) can be calculated using the methods of Appendix C.3. HN(Th' Ph) and HMO(Th' Ph)
can be calculated using the methods of Appendix CA. The volumetric gross heating value can
then be calculated using either Equation C.S-1 or Equation C.S-2.

When the complete compositional analysis of the natural gas is not known, heating
values of reliable accuracy can be measured using combustion calorimeters. Also. natural gas
heating values can be estimated from limited characterization information such as relative
denSity, carbon dioxide content and nitrogen content. although the resulting estimates of
heating value generally have greater uncertainty than data from combustion calorimeters or
calculations using complete compositional analyses. .

Property of PT. NISCONI


143

APPENDIX C.6
REFERENCES

1. American Gas Association Report No.3, Orifice Metering of Natural Gas and
Other Related Hydrocarbon Fluids, American Gas Association (1994).

2. Revision of ISOIDP 6976, "Natural Gas - Calculation of Calorific Value, Density,


Relative Density and Wobbe Index Composition, Isorrc 193/SC 1 (1991).

3. G.T. Armstrong and T.L. Jobe, Jr., "Heating Values of Natural Gas and its
Components: NBSIR 82-2401, National Bureau of Standards (1982).

4. GPA Standard 2172-94, Gas Processors Association (1994).

5. Jones, F.E., "The Air Density Equation and the Transfer of the Mass Unit:
Journal of Research of the National Bureau of Standards, Vol. 83, No.5, page
419(1978).

Property of PT. NISCONI


Property of PT. NISCONI
145

APPENDIX 0

UNIT CONVERSIONS

APPENDIX 0.1 - UNIT CONVERSION PROGRAM DOCUMENTATION .......... 147


APPENDIX 0.2 - UNIT CONVERSION PROGRAM FORTRAN SOURCE CODE .... 151
APPENDIX 0.3 - REFERENCES . .................................... " 156

Property of PT. NISCONI


Property of PT. NISCONI
147

APPENDIX 0.1

UNIT CONVERSION PROGRAM DOCUMENTATION

In the DETAIL CHARACTERIZATION METHOD and in the GROSS


CHARACTERIZATION METHOD, equations of state are based on molar density units of
(mol/dm 3) and temperature units of kelvins. Pressure is calculated in Megapascals. In the
GROSS CHARACTERIZATION METHOD, the gross heating value is in kJ/dm 3 Inputs with
other units must be converted to these units before using either the DETAILXZ or GROSSXZ
program modules. Computer code is provided to facilitate these conversions. Common
conversion factors, given in Tables D.1-1 through 0.1-4, are abstracted from Reference 1.

The function subprogram named UNITS can be used to change units. This function
is called using the syntax:
NEWVAL = UNITS(VALUE, TYPE, ALPH1, ALPH2)

Here VALUE is the number to be converted, ALPH1 and ALPH2 are CHARACTER variables
representing the units to convert from and to respectively, TYPE is a CHARACTER variable
representing the type of variable to be converted and NEWVAL is the converted value. TYPE
can be temperature "T", pressure .p., density 0", or gross heating value "W. The subroutine
can convert from density to volume and vice versa by selecting the appropriate density or
volume units. Possible ALPH1 and ALPH2 strings are listed in Table 0.1-5. Unit strings should
be entered exactly as they are shown in this table.

Table 0.1-1
Pressure Conversions

To convert from To Use


psia MPa VALUE 0.006894757
bar MPa VALUE * 0.1
mmHg MPa VALUE 0.000133322
atm MPa VALUE 0.101325
MPa gage MPa VALUE + 0.101325
psig MPa (VALUE + 14.696) 0.006894757
bar gage MPa (VALUE + 1.01325) 0.1
atm gage MPa (VALUE + 1.0) 0.101325
mmHg gage MPa (VALUE + 760) 0.000133322
MPa psia VALUE I 0.006894757
MPa bar VALUE * 10

Property of PT. NISCONI


148

To convert from To Use


MPa' mmHg VALUE / 0.000133322
MPa atm VALUE / 0.101325
MPa MPa gage VALUE - 0.101325
MPa psig VALUE / 0.006894757 - 14.696
MPa bar gage VALUE" 10 - 1.01325
MPa atm gage VALUE / 0.101325 - 1
MPa mmHg gage VALUE / 0.000133322 - 760

Table 0.1-2

Temperature Conversions

To convert from To Use


C K VALUE + 273.15
R K VALUE" 5/9
OF K 5/9 .. (VALUE + 459.67)
K C VALUE - 273.15
K oR VALUE * 9/5
K of VALUE * 9/5 - 459.67

Property of PT. NISCONI


149

Table 0.1-3

Density Conversions

To convert from To Use


kg/m 3 moVdm 3 VALUE / MW
Ibmlff moVdm3 VALUE" 16.01846/ MW
m3/kg mol/dm3 1. / (VALUE" MW)
ffllbm moVdm3 16.01846/ (VALUE" MW)
moVdm 3 kg/rn 3 VALUE" MW
mol/dm3 Ibrnlff VALUE" MW /16.01846
moVdm 3 m3/kg 1. / (VALUE" MW)
mol/dm 3 ffllbm. 16.01846/ (VALUE" MW)

Table 0.1-4

Gross Heating Value Conversions

To convert from To Use


Btulff kJ/dm 3 VALUE" 1.055056/28.316846592
Btulin 3 kJ/dm3 VALUE" 1.055056 / 0.016387064
kcal/m 3 kJ/dm 3 VALUE" 4.184 .. 10-3
MJ/m3 kJ/dm 3 VALUE
kJ/m 3 kJ/dm 3 VALUE" 10-3
kJ/dm 3 Btulff VALUE" 28.316846592/1.055056
kJ/dm 3 Btu/in3 VALUE" 0_016387064/1.055056
kJ/dm 3 kcaVm 3 VALUE / (4.184 .. 10-3)
kJ/dm 3 MJ/m3 VALUE
kJ/dm 3 kJ/m 3 VALUE" 103

Property of PT. NISCONI


150

TABLE 0.1-5

Unit Conversion Options

Property TYPE Label*


Temperature 'T' 'K '*
'T' ,
'e
'T' 'R ,
'T' 'F ,
Pressure 'P' 'MPa '*
'psia ,
'P'
,
'P' 'bar
'P' 'nunHg ,
'atm ,
'P'
'P' 'MPa gage I

'P' 'psig I

'P' 'bar gage ,


'P' 'nunHg gage I

'P' 'atm gage I

Density '0' 'mol/dm"3 ,*


'0' 'kg /m"3 ,
'0' 'lbm/ft"3 I

Volume '0' 'dm"3/mol I

'0' 'm"3/kg I

'0' 'ft"3/lbm I

Gross Caloric 'H' 'Btu/ft"3 I

Value 'H' 'Btu/in~3


I

'H' , kcal/rn"3 I

'H' 'kJ/dm"3 ,*
'H' 'MJ/m"3 ,
kJ Im"3 ,
'H' I

.. Units used in AGA8PROG

Property of PT. NISCONI


151

APPENDIX 0.2

UNIT CONVERSION PROGRAM FORTRAN SOURCE CODE

C
C COPYRIGHT (C) 1992, 1994 AMERICAN GAS ASSOCIATION
C ALL RIGHTS RESERVED
C COPYRIGHT APPLIES TO ALL SUBPROGRAMS
C
C FOR INFORMATION CONTACT:
C DR. JEFFREY L SAVIDGE
C GAS RESEARCH INSTITUTE
C 8600 W. BRYN MAWR AVE.
C CHICAGO, IL 60631
C PHONE (312) 399-8100, FAX (312) 399-8170
C
C OR: MS. LORI TRAWEEK
C AMERICAN GAS ASSOCIATION
C 1515 WILSON BOULEVARD
C ARLINGTON, VA 22209
C PHONE (703) 841-8400
C
C PROGRAM WRITTEN BY ERIC LEMMON AND STEVEN BEYERLEIN
C
C VERSION 1.2
C
FUNCTION UNITS(VALUEIN, TYPE, ALPH1, ALPH2)
C
C PURPOSE:
C Converts temperatures, pressures, densities, volumes and gross
C calorific values between different units systems. All input
C units are first converted to SI, then to the specified unit.
C
C . DESCRIPTION OF ARGUMENTS:
C VALUEIN Input value to be converted. (Input, Real*8)
C TYPE The type of variable to be converted: (Input)
C Type = 'T for temperature,
C Type = 'P' for pressure,
C Type = '0' for density, and
C Type = 'H' for gross calorific value.
C ALPH1 Unit string that identifies the input unit. (Input)
C ALPH2 Unit string that identifies the output unit. (Input)
C UNITS Converted output value. (Output)
C-----------------------------------------------------------------------
INTEGER PROG
REAL*8 RGAS, MWX, MW(5)
COMMON!CONSTANTS! PROG, RGAS, MWX, MW

Copyright C 1992, 1994 American Gas Association


All Rights Reserved

Property of PT. NISCONI


152

REAL*8 VALUE, UNITS, VALUEIN


CHARACTER Type*(*), ALPH1*(*), ALPH2*(*)

REAL*8 C_TO_K, F_TO_R, R_TO_K


REAL*8 ATM_TO_MPA, PSIA_TO_MPA, MMHG_TO_MPA, BAR_TO_MPA
REAL *8 IN3_TO_M3, FT3_TO_M3, LB_TO_KG, CAL_TO_J, BTU_TO_KJ

C_TO_K = 273.1500
F_ TO_R =
459.6700
R_TO_K =
5.00/9.00
ATM_TO_MPA = 0.10132500
PSIA_TO_MPA = 6.8947570-3
MMHG_TO_MPA = 1.333220-4
BAR_TO_MPA = 0.1 DO
IN3_TO_M3 = 1.63870640-5
FT3_TO_M3 = 0.0283168465900
LB_TO_KG =
0.453592400
CAL_TO_J = 4.18400
BTU_TO_KJ = 1.05505600

VALUE = VALUEIN
IF (TYPE.EO.'T .OR. TYPE.EO.'t') THEN
IF (ALPH1.EO.'K') THEN
ELSEIF (ALPH1.EO.'C') THEN
VALUE = VALUE + C_TO_K
ELSEIF (ALPH1.EO.'R') THEN
VALUE = VALUE R_TO_K it

ELSEIF (ALPH1.EO.'P) THEN


VALUE = R_TO_K (VALUE + F_TO_R)
it

ELSE
PAUSE 'Temperature units do not exist.'
ENOIF

IF (ALPH2.EO.'K') THEN
ELSEIF (ALPH2.EO.'C') THEN
VALUE = VALUE - C_TO_K
ELSEIF (ALPH2.EO.'R') THEN
VALUE = VALUE / R_TO_K
El,.SEIF (ALPH2.EO.'P) THEN
VALUE = VALUE / R_TO_K - F_TO_R
ELSE
PAUSE 'Temperature units do not exist.'
ENDIF

ELSEIF (TYPE.EO.'P' .OR. TYPE.EQ.'p') THEN


IF (ALPH1.EO.'MPa') THEN
ELSEIF (ALPH1.EO.'bar') THEN
VALUE = BAR_TO_MPA VALUE it

Copyright e 1992, 1994 American Gas Association


"" Q;ghts Reserved

Property of PT. NISCONI


153

ELSEIF (ALPH1.EQ.'atm') THEN


VALUE = ATM_TO_MPA" VALUE
ELSEIF (ALPH1.EQ.'mmHg') THEN
VALUE = MMHG_TO_MPA" VALUE
ELSEIF (ALPH1.EQ.'psia') THEN
=
VALUE PSIA_TO_MPA .. VALUE
ELSEIF (ALPH1.EQ.'MPa gage') THEN
VALUE = VALUE + ATM_TO_MPA
ELSEIF (ALPH1.EQ.'bar gage') THEN
=
VALUE BAR_TO_MPA" VALUE + ATM_TO_MPA
ELSEIF (ALPH1.EQ.'atm gage') THEN
VALUE = ATM_TO_MPA .. VALUE + ATM_TO_MPA
ELSEIF (ALPH1.EQ.'mmHg gage') THEN
VALUE = MMHG_TO_MPA" VALUE + ATM_TO_MPA
ELSEIF (ALPH1.EQ.'psig') THEN
VALUE = PSIA_TO_MPA .. VALUE + ATM_TO_MPA
ELSE
PAUSE 'Pressure units do not exist.'
ENDIF

. IF (ALPH2.EQ.'MPa') THEN
ELSEIF (ALPH2.EQ.'bar') THEN
VALUE = VALUE I BAR_TO_MPA
ELSEIF (ALPH2.EQ.'atm') THEN
VALUE = VALUE I ATM_TO_MPA
ELSEIF (ALPH2.EQ.'mmHg') THEN
=
VALUE VALUE I MMHG_TO_MPA
ELSEIF (ALPH2.EQ.'psia') THEN
VALUE = VALUE I PSIA_TO_MPA
ELSEIF (ALPH2.EQ.'MPa gage') THEN
VALUE = VALUE - ATM_TO_MPA
ELSEIF (ALPH2.EQ.'bar gage') THEN
VALUE = (VALUE - ATM_TO_MPA) I BAR_TO_MPA
ELSEIF (ALPH2.EQ.'atm gage') THEN
VALUE = (VALUE - ATM_TO_MPA) I ATM_TO_MPA
ELSEIF (ALPH2.EQ.'mmHg gage') THEN
VALUE = (VALUE - ATM_TO_MPA) / MMHG_TO_MPA
ELSEIF (ALPH2.EQ.'psig') THEN
VALUE = (VALUE - ATM_TO_MPA) / PSIA_TO_MPA
ELSE
PAUSE 'Pressure units do not exist.'
ENOIF

ELSEIF (TYPE.EQ.'O' .OR. TYPE.EQ.'d') THEN


IF (ALPH1.EQ.'mol/dm"3' .OR. ALPH1.EQ.'kmoVmI\3') THEN
ELSEIF (ALPH1.EQ.'dmI\3/mol') THEN
=
VALUE 1.00/ VALUE
ELSEIF (ALPH1.EQ.'kglm"3') THEN

Copyrighte 1992. 1994 American Gas Association


All Rights Reserved

Property of PT. NISCONI


154

VALUE = VALUE I MWX


ELSEIF (ALPH1.EQ.'rn"3/kg') THEN
=
VALUE 1.00 I (VALUE * MWX)
ELSEIF (ALPH1.EQ.'lbmlft"3') THEN
VALUE = LB_TO_KG I FT3_TO_M3 * VALUE / MWX
ELSEIF (ALPH1.EQ.'ft"3I1brn') THEN
=
VALUE LB_TO_KG / FT3_TO_M3 / (VALUE * MWX)
ELSEIF (ALPH1.EQ.'lbrnol/ft"3') THEN
VALUE = LB_TO_KG / FT3_TO_M3 * VALUE
ELSEIF (ALPH1.EQ.'ft"3l1brnol') THEN
VALUE = LB_TO_KG I FT3_TO_M3 / VALUE
ELSE
PAUSE 'Density units do not exist.'
ENDIF

IF (ALPH2.EQ.'rnoVdrn"3' .OR. ALPH2.EO.'krnoVm"3') THEN


ELSEIF (ALPH2.EQ.'drn"3/rnol') THEN
VALUE = 1.00 I VALUE
ELSEIF (ALPH2.EQ.'kglm"3') THEN
VALUE = MWX " VALUE
ELSEIF (ALPH2.EQ.'rn"3/kg') THEN
VALUE = 1.00/ (MWX" VALUE)
ELSEIF (ALPH2.EQ.'lbmlft"3') THEN
VALUE = VALUE" MWX / (LB_TO_KG / FT3_TO_M3)
ELSEIF (ALPH2.EQ.'ft"3/lbrn') THEN
VALUE = LB_TO_KG / FT3_TO_M3 / (VALUE" MWX)
ELSEIF (ALPH2.EQ. 'lbrnoVft"3') THEN
VALUE = VALUE / (LB_TO_KG I FT3_TO_M3)
ELSEIF (ALPH2.EQ.'ft"3I1brnol') THEN
VALUE = LB_TO_KG I FT3_TO_M31 VALUE
ELSE
PAUSE 'Density units do not exist.'
ENDIF

ELSEIF (TYPE.EQ.'H' .OR. TYPE.EO.'h') THEN .


IF (ALPH1.EQ.'kJ/drn"3' .OR. ALPH1.EQ.'MJ/rn"3') THEN
ELSEIF (ALPH1.EQ.'kJ/rn"3') THEN
VALUE = VALUE" 1.0-3
ELSEIF (ALPH1.EQ.'kcaVrn"3') THEN
VALUE = VALUE" CAL_TO_J /1.03
ELSEIF (ALPH1.EQ.'Btu/ft"3') THEN
=
VALUE VALUE" BTU_TO_KJ I (FT3_TO_M3 * 1.03)
ELSEIF (ALPH1.EQ.'Btulin"3') THEN
VALUE = VALUE" BTU_TO_KJ I (IN3_TO_M3 .. 1.03)
ELSE
PAUSE 'Heating value units do not exist.'
ENDIF

Copyright C 1992. 1994 American Gas Association


All Rights Reserved

Property of PT. NISCONI


155

IF (ALPH2.EO.'kJ/dm"3' .OR. ALPH2.EO.'MJ/m"3') THEN


ELSEIF (ALPH2.EO.'kJ/m"3') THEN
VALUE = VALUE * 1.03
ELSEIF (ALPH2.EO.'kcaVm"3') THEN
VALUE = VALUE I CAL_TO_J * 1.03
ELSEIF (ALPH2.EO.'Btu/ft"3') THEN
VALUE = VALUE I BTU_TO_KJ * (FT3_TO_M3 * 1.03)
ELSEIF (ALPH2.EO.'Btulin"3') THEN
VALUE = VALUE I BTU_TO_KJ * (IN3_TO_M3 * 1.03)
ELSE
PAUSE 'Heating value units do not exist.'
ENOIF

ELSE
PAUSE 'VARIABLE NOT AVAILABLE'
ENDIF
=
UNITS VALUE
RETURN
END

Copyright > 1992, 1994 American Gas Association


All Rights Reserved

Property of PT. NISCONI


156

APPENDIX 0.3

REFERENCES

1. McCoubrey, A., Guide for the Use of the International System of Units,
The Modernized Metric System, NIST Special Publication 811 (1991).

Property of PT. NISCONI


157

APPENDIX E

UTILITY PROGRAM (AGA8PROG)

APPENDIX E.1 UTILITY PROGRAM DOCUMENTATION .................. " 159


APPENDIX E.2 FORTRAN CODE LISTING . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 164

Property of PT. NISCONI


Property of PT. NISCONI
159

APPENDIX E.1

UTILITY PROGRAM DOCUMENTAnON

The DETAIL CHARACTERIZATION METHOD and GROSS CHARACTERIZATION


METHOD calculation subprograms have been tied together by an interactive application
program entitled AGA8PROG. The program allows the user to conveniently calculate Z, Fpv'
d, and p in a variety of formats. It was developed by the Center for Applied Thermodynamic
Studies at the University of Idaho for GRI. AGA8PROG provides an interactive, menU-driven
program. The program allows the user to direct the generated property data to the screen, to
a file or to the printer as desired. Sol. and engineering units are supported. The default is S.1.
User-selected units can also be specified.

Most options are accompanied by brief explanation statements in the menu to the right
of the option. In some situations AGA8PROG will prompt the user to enter values for various
input properties. Requested values can be entered from the keyboard by following the rules
of free-format input (separate the values by blanks or commas). Options can also be selected
through a configuration file. This file can be created through the SAVE CONFIGURATION
command in the main menu and edited through an ASCII editor. The saved file will be called
"CONF .SAV", unless the user chooses to specify a different filename. This file can then be
loaded in subsequent uses of AGA8PROG.

Figure E.l-l provides a flow diagram of AGA8PROG. Table E.l-l shows the menu
structure for AGA8PROG. Tables E.1-2 through E.1-7 explain the submenus in detail. The
last option in each menu is the "Quit" option. Choosing this option causes AGA8PROG to
return to the main menu. Option 0, "Exit", from the main menu causes AGA8PROG to return
to the operating system. Choosing the "Status option will display a screen containing
information about current program settings. These include the range of validity, output device,
mixture parameters and units.

Option 2, Select calculation method" must be chosen before viewing the status screen
or calculating thermodynamic properties. This option will display a screen similar to Table E.l-
2. The user must then select whether to use the DETAIL CHARACTERIZATION METHOD
or the GROSS CHARACTERIZATION METHOD to calculate natural gas properties. The
DETAIL CHARACTERIZATION METHOD, option 1, wiff display a screen similar to Table E.1-3.
The user then selects which fluids compose the natural gas mixture, and their mole percents.
Option 0 will exit this screen. If the mole percents do riot sum to 100%, the user must select
whether to normalize the mole fractions or to return to the fluid composition screen.

The GROSS CHARACTERIZATION METHOD, option 2, will display a screen similar


to Table E.1-4. Within this method, there are two submethods. Depending on which of the
two submethods is selected, the user will be asked to input the gross heating value, the
specific gravity, and the mole fractions of carbon dioxide and nitrogen. Hydrogen and carbon
monoxide input mole fractions are also supported for syngas mixture applications.

Property of PT. NISCONI


160

Detail Driver Gross


Characterization Program Characterization
Method Method

Call Initiaflze Call


.-- PARAMDL Constants PARAMGS I-
...J en
c
C
a.. C"
ac
~
en
CD
-
5
CI)

en
c
'S !!j
e Initialize
c
.c "'D
::J Call Composition Call G>
en CHAADL Dependent CHAAGS
en
'-- f-
Variables

Set
Call Temperature Call
TEMP Dependent VIAGS
Variables

Call Call
PDetail, Calculate PGross,
DDetail, or Mixture OGross, or
ZOetail Properties ZGross

Figure E.1-1 Flow Diagram of AGA8PROG

Property of PT. NISCONI


161

Table E.1-1

Main Menu

(1 ) Select UNITS (Refer to Table E.1-5)


(2) Select CALCULATION METHOD
(Refer to Table E.1-2)
(3) View calculation setup
(4) Generate a TABLE of properties (Z, Fpv or d)
(5) Calculate Z, Fpv, and d at T and P
(6) Calculate Z, Fpv, and d at constant T
(7) Calculate Z, Fpv, and d at constant P
(8) Select OUTPUT device (Refer to Table E.1-6)
(9) SAVE setup information to a file
(10) LOAD setup information from a file
(0) EXIT to operating system

Table E.1-2

Method Menu

(1 ) DETAIL CHARACTERIZATION METHOD (Refer to Table E.1-3)


(2) GROSS CHARACTERIZATION METHOD (Refer to Table E.1-4)
(3) Return to Main Menu

Property of PT. NISCONI


162

Table E.1-3

Menu for DETAIL CHARACTERIZATION METHOD

(0) Return to Main Menu


(1 ) Methane
(2) Ethane
(3) Propane
(4) Isobutane
(5) n-Butane
(6) Isopentane
(7) n-Pentane
(8) n-Hexane
(9) n-Heptane
(10) n-Octane
(11 ) n-Nonane
(12) n-Decane
(13) Carbon dioxide
(14) Nitrogen
(15) Hydrogen sulfide
(16) Helium
(17) Water
(18) Oxygen
(19) Argon
(20) Hydrogen
(21 ) Carbon monoxide

Table E.1-4

Menu for GROSS CHARACTERIZATION METHOD

(1) Use heating value, relative density and the mole fraction of carbon dioxide
(2) Use relative density and the mole fractions of nitrogen and carbon dioxide
(3) Change reference conditions: T(combustion), T(flow), P(flow)

Property of PT. NISCONI


163

Table E.1-5

Units Menu

(1 ) S. I. (molar) (MPa, moVdm 3 , K, kJ/dm 3)

(2) S. I. (mass) (MPa, kg/m 3 , C, MJ/dm 3)

(3) Engineering (psia, Ibm oliff, of, Btulff)


(molar)

(4) Engineering (psia, Ibmlff,oF, Btlllff)


(mass)
(5) Custom (Choose your own units)
(Refer to Table E.1-7)
(0) Quit (Return to the Main Menu)

Table E.1-6

Output Menu

(1) Display (Display only)


(2) File (Display and a file)
(3) Printer (Display and the printer)
(0) Quit (Return to the main menu)

Table E.1-7

Custom Menu

(1) Temperature Units (K, C , oR , oF)

(2) Pressure Units (MPa, pSia, bar, mmHg, atm, gage)


(3) Density Units (moVdm 3, kg/m 3 , Ibrn!fti, Ibmol/tf)
(4) Heating Value (kJ/dm 3 , MJ/m 3 , kcaVm 3 , Btultf)
(0) Quit (Return to the Units Menu)

Property of PT. NISCONI


164

APPENDIX E.2

. UTILITY PROGRAM FORTRAN SOURCE CODE LISTING

Subprograms

SUBROUTINE COMPST(I) .......................................... , 168


SUBROUTINE CONFlG(OPT, OPTSET, OUTOPT, METSG) .................. , 169
SUBROUTINE INPUT(PROP1, PROP2, PRINC, ERROR, OPT) ................ 172
SUBROUTINE METHOO(METSG) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 173
SUBROUTINE OUTPUT(CON, OUTOPT) ................................ 179
SUBROUTINE PROPS(P, 0, T, Z) .................................... 180
SUBROUTINE SETUP(METSG, ERRNUM) ............................... 181
SUBROUTINE STATUS(OUTOPT, METSG) .............................. 183
SUBROUTINE TABLES(OPT) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 186
SUBROUTINE TABLES2(METSG) ..................................... 190
SUBROUTINE STATUS2(METSG) ..................................... 194
SUBROUTINE UNITSG(OPTSET) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 196
FUNCTION DCALC(P, T) ............................................ 199
FUNCTION PCALC(D, T) ................................ . . . . . . . . . . .. 200
FUNCTION ZCALC(D, T) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201

Property of PT. NISCONI


165

C -------------------------------
---------------
C COPYRIGHT (C) 1992. 1994 AMERICAN GAS ASSOCIATION
C ALL RIGHTS RESERVED
C COPYRIGHT APPLIES TO ALL SUBPROGRAMS
C
C FOR INFORMATION CONTACT:
C DR. JEFFREY L. SAVIDGE
C GAS RESEARCH INSTITUTE
C 8600 W. BRYN MAWR AVE.
C CHICAGO. IL 60631
C PHONE (312) 399-8100. FAX (312) 399-8170
C
C OR: MS. LORI TRAWEEK
C AMERICAN GAS ASSOCIATION
C 1515 WILSON BOULEVARD
C ARLINGTON. VA 22209
C PHONE (703) 841-8400
C
C PROGRAM WRITTEN BY ERIC LEMMON AND STEVEN BEYERLEIN
C
C VERSION 1.2
C
PROGRAM AGA8PROG
C
C PURPOSE:
C Interactive utility program for calculating compressibility factors
C from the DETAIL and GROSS models.
C-----------------------------------------------------------------------
REAL*8 X(5), XI(21). ZB, DB
COMMON/AGAI X. XI, ZB, DB

INTEGER PROG
REAL*8 RGAS, MWX, MW(5)
COMMON/CONSTANTS/ PROG, RGAS, MWX, MW

CHARACTER OUTOPT*80. OPTX*2


INTEGER I, OPTSET,OPT, METSG

WRITE (*,1020)
PAUSE
1020 FORMAT(/.
&/10X,'rr\i= = = = = = = = = = = = = = = = = = = = = = = = = i 1 i 1 ' ,
&ll0X:// 1/',
&11 OX,' /I II',
&11 OX,' /I COMPRESSIBILITY FACTORS OF NATURAL GAS 1/',
&11 OX,' I: AND OTHER RELATED HYDROCARBON GASES 1/',
&ll0X,'/1
&11 OX,' /1
.
II',
/,1'

Copyright C 1992. 1994 American Gas Association


All Rights Reserved

Property of PT. NISCONI


166

&l10x,'11 Research Sponsored by: II',


&l10X,'1I Gas Research Institute II',
&l10x,'11 and I!',
&l10X,'11 Groupe Europeen de Recherches Gazieres II',
&11 OX,' I II',
&l10X,'11 II',
&11 OX,' I For Information Contact: I"
&11 OX,' I Dr. Jeffrey L. Savidge, GRI II',
&11 OX,' I (312) 399-8100 II',
&11 OX,' I Or: Ms. Lori Traweek, AGA I"
&11 OX,' II (703) 841-8400 II',
&11 OX,' I I ',
&11 OX,' II Disclaimer. User assumes all risk and responsibility. II',
&11 OX,' II (C) Copyright 1992, 1994 July 1, 1994 I"
&l10X,'lbli= = = = = = = = = = = = = = = = = = = = = = = = = : : : : ! J11 ')

PROG = 0
METSG =0
DO 201=1,21
20 XI(I) = 0

OPTSET = 1
CALL UNITSG(OPTSET)
OUTOPT = 'nul'
OPEN (1, FILE = OUTOPT)

C ..... Enter the main menu.


100 WRITE (",1010)
1010 FORMAT (25(/),' Compressibility Factor Program',!
&' Select option:',!/,
&' (1) Select UNITS (SI, Engineering, Custom)',!,
&' (2) Select CALCULATION METHOD',!,
&' (3) VIEW calculation setup',!,
&' (4) Generate a TABLE of properties (Z, d, or Fpv)''!,
&' (5) Calculate Z, d, and Fpv at T and P',/,
&' (6) Calculate Z, d, and Fpv at constant TEMPERATURE',!,
&' (7) Calculate Z, d, and Fpv at constant PRESSURE',I,
&' (8) Select OUTPUT device',!,
&' (9) SAVE setup information to a file',!,
&' (10) LOAD setup information from a file',!,
&' (X) EXIT to operating system',!/)
READ (",1 000,ERR=1 00) OPTX
OPT=O
READ (OPTX, 1001,ERR=11 0) OPT
1000 FOR MAT(A)
1001 FORMAT(12)
110 IF (OPT.EQ.1) THEN
OPTSET = 0

Copyright C 1992. 19!;!4 American Gas Association


All Rights Reserved

Property of PT. NISCONI


167

CALL UNITSG(OPTSET)
ELSEIF (OPT.EO.2) THEN
CALL METHOD(METSG)
ELSEIF (OPT.EO.3) THEN
IF (PROG.EO.O) THEN
PAUSE' Please select a method first'
ELSE
CALL STATUS(OUTOPT, METSG)
ENDIF
ELSEIF (OPT.GE.4 .AND. OPT.LE.7) THEN
IF (PROG.EO.O) THEN
PAUSE' Please select a method first'
ELSE
IF (OPT.EO.4) THEN
CALL TABLES2(METSG)
ELSE
CALL TABLES(OPT, METSG)
ENDIF
ENDIF
ELSEIF (OPT.EO.B) THEN
CALL OUTPUT(O, OUTOPT)
ELSEIF (OPT.EO.9) THEN
IF (PROG.EQ.O) THEN
PAUSE' Please select a method first'
ELSE
CALL CONFIG(OPT, OPTSET, OUTOPT, METSG)
ENDIF
ELSEIF (OPT.EO.10) THEN
CALL CONFIG(OPT, OPTSET, OUTOPT, METSG)
ELSEIF (OPTX.EQ.'X' .OR. OPTX.EQ.'x') THEN
STOP
ENDIF
GOTO 100
END

Copyright C 1992, 1994 American Gas Association


All Rights Reserved
Property of PT. NISCONI
168

C=-==================================
SUBROUTINE COMPST(I)
C
C PURPOSE:
C Displays detailed gas composition.
C-----------------------------------------------------------------------
REAL*8 XeS), XI(21), ZB, DB
COMMONIAGAI X, XI, ZB, DB

INTEGER I

IF (LEO.O) THEN
WRITE (*.1000) XI
ELSE
WRITE (1,1000) XI
ENDIF

1000 FORMAT ( , 10 # COMPONENT MOLE PERCENT.I.


& -------- ----------.1,
& 1 METHANE .F1 0.6,/.
& 2 ETHANE ,F1 0.6/,
& 3 PROPANE ',F10.6/.
& 4 ISOBUTANE '.F10.6/.
& S N-BUTANE ,F10.6/.
& 6 ISOPENTANE .F10.6/.
& 7 N-PENTANE ,F1 0.6.1.
& 8 N-HEXANE '.F1 0.6.1.
& 9 N-HEPTANE ,F10.6,1.
& 10 N-OCTANE '.F10.6.1.
& 11 N-NONANE ,F10.6.1.
& 12 N-DECANE .F1 0.6.1.
& 13 CARBON DIOXIDE . F1 0.6.1.
& 14 NITROGEN .F1 0.6.1.
& 15 HYDROGEN SULFIDE F1 0.6.1.
& 16 HELIUM '.F1 0.6.1.
& 17 WATER .F10.6,1.
& 18 OXYGEN .,F1 0.6,/.
& 19 ARGON .F10.6.1,
& '20 - HYDROGEN '.F10.6.1,
& 21 CARBON MONOXIDE .F10.6)
END

Copyright C 1992. 1994 American Gas Association


All Rights Reserved
Property of PT. NISCONI
169

C===
SUBROUTINE CONFIG(OPT, OPTSET, OUTOPT, METSG)
C
C PURPOSE:
C Reads in the CONF.SAV file when OPT = 1.
C Writes out the CONF.SAV file when OPT = 2.
C-----------------------------------------------------------------------
CHARACTER*10 ALPHP, ALPHT, ALPHD, ALPHH
COMMON/LABELS/ ALPHP, ALPHT, ALPHD, ALPHH

REAL"'8 X(S), XI(21),ZB, DB


COMMON/AGAI X, XI, ZB, DB

INTEGER PROG
REAL*8 RGAS, MWX, MW(S)
COMMON/CONSTANTS/ PRoo, RGAS, MWX, MW

REAL*8 TBHV, TBDR, PO, HVINPUT, DRINPUT


COMMON/REFCOND/ TBHV, TBDR, PO, HVINPUT, DRINPUT

CHARACTER*80 CFNAME, OUTOPT, LINE


INTEGER OPT, CON, ERRNUM, OPTSET, I, METSG

10 WRITE (*,'(3(/),A40)')' Configuration Filename <conf.sav> : '


READ (*, '(A80)') CFNAME
IF (CFNAME.EQ.'NUL' .OR. CFNAME.EQ.'nul') RETURN
IF (CFNAME.EQ.' ') CFNAME = 'CONF.SAV'
IF (OPT.EQ.10) THEN
OPEN (2, FILE = CFNAME, STATUS='OLD', ERR=10)
READ (2, "' ,END=60,ERR=70) PROG
READ (2,'(A39)',END=60,ERR=70) OUTOPT
CON =2
IF (OUTOPT.EQ.'NUL' .OR. OUTOPT.EO.'nul') CON ~ 1
IF (OUTOPT.EQ.'PRN' .OR. OUTOPT.EO.'pm') CON = 3
CALL OUTPUT(CON, OUTOPT).
READ (2,'(11)',END=60,ERR=70) OPTSET
IF (OPTSET.EQ.O) OPTSET = 1
CALL UNITSG(OPTSET)
IF (OPTSET.EQ.S) THEN
READ (2,'(A10)',END=60,ERR=70) ALPHP
READ (2,'(A10)',END=60,ERR=70) ALPHT
READ (2,'(A10), ,END=60,ERR=70) ALPHD
READ (2,'(A10)',END=60,ERR=70) ALPHH
ENDIF
READ (2,'(A80)',END=60,ERR=70) LINE
READ (2,'(A80)',END=60,ERR=70) LINE
READ (2,'(A80)',END=60,ERR=70) LINE
LINE = LINE

Copyrighte 1992, 1994 American Gas Association


All Rights Reserved

Property of PT. NISCONI


170

DO 501:1,21
50 READ (2,'(T30,F10.6)',END=60,ERR:70) X\(I)
READ (2,'(ASO)',END=60.ERR=70) UNE
READ (2,'(15)'.END=60,ERR=70) METSG
READ (2,'(F12.6)',END::60,EAR=70) TBHV
READ (2,'(F12.6)'.END=60,ERR=70) TBDR
READ (2,'(F12.8)',END=60,EAR=70) PO
READ (2:(F12.6)',END=60,ERR=70) HVINPUT
READ (2,'(F12.6)',END=60,EAA=70) DAINPUT
READ (2:(F12.8)'.END=60,ERR=70) X(2)
READ (2,'(F12.8}',END=60,ERR=70) X(3)
READ (2,'(F12.8)',END::60,ERR=70) X(4)
READ (2:(F12.8}',END=60,ERR=70) X(5)
X(2) = X(2)/1OO.00
=
X(3) X(3)11oo.00
=
X(4) X(4)1100.00
X(5) : X(S)l100.00
CLOSE(2)
CALL SETUP(METSG, ERRNUM)
C- ._-- ------
ELSEIF (OPT.EO.9) THEN
OPEN (2, ALE = CFNAME)
WRITE (2:(11, T40,A2S),) PAOG ,'Program selection
WAITE (2,'(A40, T40,A25)') OUTOPT,'Output file
WRITE (2,'(11, T40,A25)') OPTSET,'Units selection
IF (OPTSET.eO.S) THEN
WRITE (2,'(A10,T40,A2S),) ALPHP ,'Pressure units
WRITE (2,'(A10,T40,A2S)') ALPHT ,'Temperature units
WRITE (2,'(A10,T40,A2S),) ALPHD ,'Density units
WRITE (2,'(A10,T40,A25),) ALPHH ,'Heating value units
ENDIF
WRITE (2,*)
CALL COMPST(2)
WRITE (2,*)
WRITE (2:(IS, T40,A2S)') METSG ,'GROSS method
WRITE (2:(F12.6,T40,A25),) TBHV ,'Ref. temperature (HV)
WRITE (2:(F12.6,T40,A25)') TBDR ,'Ref. temperature (OR) ,
WRITE (2,'(F12.8,T40,A2.S),) PO ;Ref. presscJm
WAin;; (2,'(F12.f),T40,A25),) HVINPtJT/VoItlmetl'ic Hea.t.inq VAll.l~ ,
WRIn:: (2,'(F12.8,T40,A25),) DRINPUT:Aelativa ~nslty ,
IF (MFTSG.EQ.2.AND. PROO.eO.2) niEN
WRITE (:?,'(f12.e,T40,A2S}') X(2)*100.00,
& 'Mole peff:el1t of nitrogen '
ELSE
WAITE (2,'(Ft2.8,T40,A2Sl') 0.00,
& 'Mole perceflt of nitrogen '
ENDIF
WRITE (2:(n 2.8, T40,A2S),) X(3)*100.M,

Copyright.c 1992,1994 American Gas A.<>sociation


All Rights Res.MId

Property of PT. NISCONI


171

& 'Mole percent of C02


WRITE (2,'(F12.8,T40,A2S),) X(4),,100.DO,
& 'Mole percent of hydrogen I

WRITE (2,'(F12.8,T40,A2S),-) X(S)*100.DO,


& 'Mole percent of CO
CLOSE(2)
ENDIF
RETURN
60 PAUSE' Error: Premature end of file in configuration file'
STOP
70 PAUSE' Error: Invalid input in configuration file'
STOP
END

Copyright C 1992.1994 American Gas Association


All Rights Reserved

Property of PT. NISCONI


172

C============================================
SUBROUTINE INPUT(PROP1, PROP2, PRINC, ERROR, OPT)

C PURPOSE:
C Enters the starting point, ending point and increment for
C temperature and pressure tables. This routine also prints out
C the header.
C-----------------------------------------------------------------------
CHARACTER*10 AlPHP, AlPHT, AlPHD, AlPHH
COMMONIlABElS! AlPHP, AlPHT, AlPHD, AlPHH

INTEGER PROG
REAl*S RGAS, MWX, MW(5)
COMMON!CONSTANTS! PROG, RGAS, MWX, MW

INTEGER OPT
REAl*S PROP1, PROP2, PRINC, PROP, UNITS
lOGICAL ERROR

ERROR = .FAlSE.
READ (*,*,ERR=10) PROP1, PROP2, PRINC
IF (OPT.EO.1) THEN
PROP1 = UNITS(PROP1, 'T', AlPHT, 'K')
PROP2 = UNITS(PROP2, 'T', AlPHT, 'K')
IF (AlPHT.EO.'R' .OR. AlPHT.EO.'P) PRINC = PRINC*S.DO!9.DO
ELSE
PROP1 = UNITS(PROP1, 'P', AlPHP, 'MPa')
PROP2 = UNITS(PROP2, 'P', AlPHP, 'MPa')
PRINC = UNITS(PRINC, 'P', AlPHP(1 :4), 'MPa')
ENDIF
PRINC = DABS(PRINC)
IF (PRINC.EO.O.DO) PRINC = 10000.00
IF (PROP1.GT.PROP2) THEN
PROP = PROP1
PROPl = PROP2
PROP2 = PROP
ENDIF
RETURN
10 ERROR = .TRUE.
END

Copyright 1992, 1994 American Gas Association


All Rights Reserved

Property of PT. NISCONI


173

C=============--================----=======================================
SUBROUTINE METHOD(METSG)
C
C PURPOSE:
C Selects which model should be used to calculate natural gas
C properties and inputs the composition, heating value, and
C relative density (specific gravity) as required by the
C different models.
C-----------------------------------------------------------------------
CHARACTER*10 ALPHP, ALPHT, ALPHD, ALPHH
COMMON/LABELS/ ALPHP, ALPHT, ALPHD, ALPHH

REAL*8 X(S), XI(21), ZB, DB


COMMON/AGAI X, XI, ZB, DB

INTEGER PROG
REAL *8 RGAS, MWX, MW(S)
COMMON/CONSTANTS/ PROG, RGAS, MWX, MW

REAL*8 TBHV, TBDR, PO, HVINPUT, DRINPUT


COMMON/REFCOND/ TBHV, TBDR, PO, HVINPUT, ORIN PUT

CHARACTER*1 INPT
INTEGER IDNMB, I, ERRNUM, METSG, OPT
REAL*8 SUM, UNITS, TS1, TB2, PD1
REAL*8 X1, X2, X3, X4, T1, P1, DAIR, VIR
REAL*8 TEMP1, TEMP2, TEMP3

C ..... Select a mixture method.


10 WRITE (*,1000)
READ(*,",ERR=999) OPT
IF (OPT.EO.O) RETURN
PROG = OPT
IF (PROG.EO.1) METSG = 0

C-----------------------------------------------------------------------
C DETAIL METHOD SETUP
C-----------------------------------------------------------------------
IF (PROG.EO.1) THEN'
310 SUM = 0
DO 320 1=1, 21
320 SUM = SUM + XI(I)
330 CALL COMPST(O)
WRITE (*,1210) SUM
WRITE (*,*) '10 NUMBER TO CHANGE(O=EXIT): '
READ (*,",ERR=330) IDNMB
IF (IDNMB.LT.O .OR. IDNMB.GT.21) GOTO 330
IF (IDNMB.NE.O) THEN

Copyright 1992, 1994 American Gas Association


All Rights Reserved

Property of PT. NISCONI


174

WRITE (*,'("+MOLE PERCENT: u)')


READ (*,*,ERR=330) XI(loNMB)
GOTO 310
ENolF
IF (SUM.EO.O) THEN
PROG = 0
RETURN
ELSEIF (oABS(SUM - 1oo.o0).GT.0.50-6) THEN
350 WRITE (*,1200)
READ (*,*,ERR=350) OPT
IF (OPT.EO.2) GOTO 330
ENolF
CALL SETUP(METSG, ERRNUM)

C-----------------------------------------------------------------------
C GROSS METHOD SETUP
C---------------------------------------------------------------~------
ELSEIF (PROG.EO.2) THEN
IF (TBHV.EO.O .ANo. TeoR.EO.O) THEN
TBHV = 298.1500
TBoR = 273.1500
PO = 0.10132500
ENolF
TB1 = UNITS(TBHV, 'T, 'K', ALPHT)
TB2 = UNITS(TBoR, 'T, 'K', ALPHT)
P01 = UNITS(Po, 'P', 'MPa', ALPHP)
100 WRITE (*,1010) TB1, ALPHT, TB2, ALPHT, P01, ALPHP
READ(*,*,ERR=999) OPT .
IF (OPT.EO.O) THEN
IF (METSG.EO.O) PROG = 0
RETURN
ENolF
IF (OPT.EQ.3) THEN
WRITE (*,1020) ALPHT
READ (*,*,ERR=1OO) TEMP1
WRITE (",1030) ALPHT
READ (*,*,ERR=100) TEMP2
WRITE (*,1040) ALPHP
READ (*,*,ERR=100) TEMP3
TB1 = TEMP1
TB2 = TEMP2
PD1 = TEMP3
TBHV = UN ITS(TB 1, T, ALPHT, 'K')
TBDR = UNITS(TB2, T, ALPHT, 'K')
PO = UNITS(PD1, 'P', ALPHP, 'MPa')
IF (METSG.EO.O) GOTO 100
CALL SETUP(METSG, ERRNUM)
IF (ERRNUM.NE.O) GOTO 997

Copyright C 1992, 1994 American Gas Association


All Rights Reserved

Property of PT. NISCONI


175

GOTO 100
ENOIF
IF (OPT.LT.1 .OR. OPT.GT.2) GOTO 100
METSG = OPT

C ..... Relative Density


ORINPUT= 0
210 WRITE (*,1060) TB2, ALPHT(1:1)
REAO(*,*,ERR=998) ORINPUT
IF (ORINPUT.GT.0.8700 .OR. ORINPUT.LT.0.55400) THEN
WRITE (*,1100)
GOTO 210
ENOIF

C ..... Heating Value


HVINPUT=O
IF (METSG.EQ.2) GOTO 220
T1 = UNITS(60.00, 'T, 'F', 'K')
P1 = UNITS(14.7300, 'P', 'psia', 'MPa')
X1 = UNITS(477.00, 'H', 'BtulftI\3', 'MJ/m"3')
X2 = UNITS(1150.00, 'H', 'BtulftI\3', 'MJ/mI\3')
VIR = -0.1252700 + 5.91 0-4*T1 - 6.620-7*T1**2
OAIR = 28.9625600/(0.00831451 00"T1/P1 + VIR}

X1 = X1*(1.00 + 2.11130-5*(T1 - 273.1S00IDAIR


& *(1.00 + 1.02700-4*(T1 - 298.1500
X2 = X2*(1.00 + 2.11130-5*(T1 - 273.1S00IDAIR
& .. (1.00 + 1.02700-4"(T1 - 298.1500)}

VIR = -0.1252700 + 5.910-4*TBOR - 6.620-7"TBOR**2


OAIR = 28.9625600/(0.0083145100*TBORlPO + VIR}
X3 = X1/(1.00 + 2.11130-5*(TBOR - 273.1500*OAIR
& 1(1.00 + 1.02700-4*(TBHV - 298.1500
X4 = X2/(1.00 + 2.11130-5*(TBOR - 273.1S00*OAIR
& 1(1.00 + 1.0270D-4*(TBHV - 298.1500

X3 = UNITS(X3, 'H', 'MJ/mI\3',ALPHH)


X4 = UNITS(X4, 'H', 'MJ/mI\3',ALPHH)
200 WRITE (*,1050) ALPHH, TB1, TB2, X3, X4, ALPHH
READ (*,*,ERR=998) HVINPUT
IF (HVINPUT.GT.X4*1.0005DO .OR. HVINPUT.LT.X3/1.000S00) THEN
WRITE (*,1100)
GOTO 200
ENDIF
HVINPUT = UNITS(HVINPUT, 'H' ,ALPHH, 'MJ/mI\3')

C ..... Nitrogen
X(2) = 0

Copyright C 1992. 1994 American Gas Association


All Rights Reserved

Property of PT. NISCONI


176

IF (METSG.EO.1) GOTO 230


220 WRITE (*,1120)
REAO(*, *,ERR=998) X(2)
X(2) = X(2)/1OO.00
IF (X(2).GT.0.500 .OR. X(2).LT.O.DO) THEN
WRITE (*,1100)
GOTO 220
ENDIF

C ..... Carbon Dioxide


X(3) = 0
230 WRITE (*,1130)
READ("," ,ERR=998) X(3)
X(3) = X(3)/1OO.00
IF (X(3).GT.0.3DO .OR. X(3).LT.O.DO) THEN
WRITE (*,1100)
GOTO 230
ENDIF

C .... Hydrogen
X(4) 0 =
240 WRITE (*,1140)
READ(", ",ERR=998) X(4)
X(4) = X(4)/1OO.00
IF (X(4).GT.0.100 .OR. X(4).LT.O.DO) THEN
WRITE (",1100)
GOTO 240
ENDIF

C ..... Carbon Monoxide


X(5) 0 =
250 INPT = 'N'
IF (X(4).NE.0) THEN
X(5) = 0.096400"X(4)
WRITE (",1145) X(5)"1OO
READ (*,'(A1)') INPT
ENDIF
IF (INPT.EO.'N' .OR. INPT.EO.'n') THEN
255 WRITE (",1150)
READ(*,*,ERR=250) X(5)
X(5) = X(5)/1OO.00
IF (X(5).GT.O.0300 .OR. X(5).lT.O.DO) THEN
WRITE (*,1100)
GOTO 255
ENDIF
ENDIF

CALL SETUP(OPT, ERRNUM)

Copyright C 1992. 1994 American Gas Association


All Rights Reserved

Property of PT. NISCONI


177

997 IF (ERRNUM.NE.O) THEN


IF (ERRNUM.EQ.1)
& PAUSE ' ...INVALID PARAMETERS IN SETUP, CHECK GAS COMPOSITION'
ERRNUM = 0
METSG = 0
PROG = 0
GOTO 100
ENDIF
ENDIF
999 RETURN
998 METSG = 0
PROG = 0
GOTO 10
C----------------------------------------------------------------------- .
1000 FORMAT (20(1),' SELECT EQUATION OF STATE TO COMPUTE Z, d, OR Fpv'
&If (1) DETAILED CHARACTERIZATION METHOD',1,
& ' (2) GROSS CHARACTERIZATION METHOD',1,
& ' (0) Returnto main menu',!1)
1010 FORMAT (20(1),' GROSS CHARACTERIZATION MENU',1/,
&' 0 - Return to main menu',!,
&' Method 1 - Input volumetric heating value (Hv),',!,
&' relative density (specific gravity),',!,
&' and the mole percent of C02.',1,
&' Method 2 - Input relative density (specific gravity)',1,
&' and the mole percent of N2 and C02.',1,
&' 3 - Change Reference conditions',!,
&' (for more information, see Appendix C.2 in "
&'AGA Report No. B)''!,
&' Current: T(combustion) =',F10A,1X,A1,1,
&' T(flow) =',F10.4,1X,A1,1,
&' P(flow) =',F12.6,1X,A10,1/,
&' Select method number ===> ')
1020 FORMAT (3(1),' Enter reference temperature for the',
& ' combustion basis in ',A 10,1)
1030 FORMAT (3(1),' Enter reference temperature for the',
& ' flow basis in ',A 10,1)
1040 FORMAT (3(1),' Enter reference pressure for the',
& ' flow basis in ',A10,1)
1050 FORMAT (3(1),' Enter the volumetric (gross) heating value in "
& A10,' @ ',F6.2,",F6.2,':',I,
& ' (Range: ',FB.2,' to ',FB.2,' ',A10,'),.I)
1060 FORMAT (3(1),' Enter the relative density (specific gravity)',
& @ ',F6.2,1X,A1,':',1,
& ' (Range: 0.554 to 0.B7)',/1)
1100 FORMAT (' That number is out of range.')
1120 FORMAT (3(1),' Enter the mole percent of nitrogen:',1,
& ' (Range: 0 to 50%)',!1)
1130 FORMAT (3(1),' Enter the mole percent. of carbon dioxide:',1,

Copyright 1992, 1994 American Gas Association


All Rights Reserved

Property of PT. NISCONI


178

& ' (Range: 0 to 30%)',I/)


1140 FORMAT (3(1),' Enter the mole percent of hydrogen:',I,
& ' (Range: 0 to 10%)',11)
1145 FORMAT (3(1),' The mole percent of carbon monoxide is:',F9.6,1,
& ' Do you wish to use this value(Y/N)? ')
1150 FORMAT (3(1),' Enter the mole percent of carbon monoxide:',I.
& ' (Range: 0 to 3%)',11)
1200 FORMAT (25(1),
& 'THE MOLE PERCENT DOES NOT ADD TO 100%',11,
& 'HOW WOULD YOU LIKE TO CORRECT THIS:',I,
& ' (1) NORMALIZE MOLE FRACTIONS',I,
& (2) RETURN TO PREVIOUS PAGE',!)
1210 FORMAT (' SUM = ',F12.6)
END

Copyright C 1992. 1994 American Gas Association


All Rights Reserved

Property of PT. NISCONI


179

C
SUBROUTINE OUTPUT(CON, OUTOPT)
C
C PURPOSE:
C Selects an output device.
C-----------------------------------------------------------------------
CHARACTER OUTOPTo.SO
INTEGER CON, OPT

100 IF (CON.EO.O) THEN


WRITE (o. ,1000)
READ (o. ,o. ,ERR=1 00) OPT
ENDIF

C .....Choose only the display for output.


IF (OPT.EO.1 .OR. CON.EO.1) THEN
OUTOPT = 'nul'
OPEN (1, FILE = OUTOPT)

C ..... Choose a file and display for output.


ELSEIF (OPT.EO.2 .OR. CON.EO.2) THEN
IF (CON.NE.2) THEN
WRITE (*, '(" Enter the filespec for your output file." ,11)')
r,
READ '(ABO)') OUTOPT
IF (OUTOPT.EO.' ') OUTOPT = 'nul'
ENDIF
OPEN (1, FILE = OUTOPT)

C .....Choose the printer and display for output.


ELSEIF (OPT.EO.3 .OR. CON.EO.3) THEN
OUTOPT = 'prn'
OPEN (1, FILE = OUTOPT)

C ..... Return to the main menu.


ELSEIF (OPT.EO.O) THEN
ELSE
CON =0
GOTO 100
ENDIF

1000 FORMAT (25(1),' OUTPUT MENU:',!I,


&' (1) Display (Output to the display only)',!,
&' (2) File (Output to the display and a file)',!,
&' (3) Printer (Output to the display and the printer),,!,
&' (0) Return to the main menu',!1)
END

Copyright C 1992, 1994 American 'Gas Association


All Rights Reserved

Property of PT. NISCONI


180

C================================
SUBROUTINE PROPS(P, 0, T, Z)
C
C PURPOSE:
C Writes properties to the screen and to a file.
C---------------------~-------------------------------------------------
CHARACTER*10 ALPHP, ALPHT, ALPHD, ALPHH
COMMONILABELSI ALPHP, ALPHT, ALPHD, ALPHH

REAL*8.)S), XI(21), ZB, DB


COMMON/AGAI X, XI, ZB, DB

REAL*8 P, 0, T, Z, PP, TT, DO, UNITS

C ..... Convert properties from the SI units system to the select units.
PP = UNITS(P, 'P', 'MPa', ALPHP)
=
TT UNITS(T, 'T, '1<', ALPHT)
DO = UNITS(D, '0', 'moVdrnA3', ALPHD)
WRITE (*, 1000) PP, TT,' DO, Z, OSQRT(ZB/Z)
WRITE (1,1000) PP, TT, DO, Z, DSQRT(ZBIZ)
1000 FORMAT (1X,G11.6E1,1X,F7.3,3X,3(1X,G10.6E1
END

Copyright C 1992, 1994 American Gas Association


All Rights Reserved

Property of PT. NISCONI


181

C - ------------------------
- -------------------------
SUBROUTINE SETUP(METSG, ERRNUM)
C
C PURPOSE:
C Interfaces with the setup routines for the GROSS or DETAIL models.
C--------------------------------------.---------------------------------
REAL*8 X(S), XI(21), ZB, DB
COMMON/AGAI X, XI, ZB, DB

INTEGER PROG
REAL*8 RGAS, MWX, MW(S)
COMMON/CONSTANTSI PROG, RGAS, MWX, MW

REAL*8 TBHV, TBDR, PO, HVINPUT, DRINPUT


COMMON/REFCONDI TBHV, TBDR, PO, HVINPUT, DRINPUT

INTEGER METSG, ERRNUM,I, NCC, CID(21.)


REAL*8 SUM, XJ(21), XK(21), XL(21)

IF (PROG.EO.1) THEN
SUM =0
DO 10 1=1, 21
10 SUM = SUM + XI(I)
IF (SUM.EO.O) SUM = 1.00
DO 201=1,21
20 XJ(I) = XI(I)/SUM
XK( 1) = XJ( 1)
XK( 4) = XJ( 2)
XK( 5) = XJ( 3)
XK(11) = XJ( 4)
XK(12) = XJ( 5)
XK(13) = XJ( 6)
XK(14) = XJ( 7)
XK(15) = XJ( 8)
XK(16) = XJ( 9)
XK(17) = XJ(10)
XK(18) = XJ(11)
XK(19) = XJ(12)
XK( 3) = XJ(13)
XK( 2) = XJ(14)
XK( 7) = XJ(1S)
XK(20) = XJ(16)
XK( 6) = XJ(17)
XK(10) = XJ(18)
XK(21) = XJ(19)
XK( 8) = XJ(20)
XK( 9) = XJ(21)

Copyright C 1992, 1994 American Gas Association


All Rights Reserved

Property of PT. NISCONI


182

NCC=O
DO 301=1,21
IF (XK(I).NE.O) THEN
NCC = NCC+ 1
CID(NCC) = I
XL(NCC) = XK(I)
ENDIF
30 CONTINUE
CALL PARAMDL(NCC, CID)
CAll CHARDl(NCC, Xl, ZB, DB)
ELSEIF (PROG.EQ.2) THEN
CALL PARAMGS
CALL CHARGS(METSG, HVINPUT, DRINPUT, X, TBHV, TBDR, PO,
& TBDR,PD,ZB,DB,ERRNUM)
ENDIF
END

Copyright C 1992. 1994 American Gas Association


All Rights Reserved

Property of PT. NISCONI


183

C -==============================
SUBROUTINE STATUS(OUTOPT, METSG)
C
C PURPOSE:
C Displays the current program settings and fixed points.
C-----------------------------------------------------------------------
CHARACTER*10 ALPHP, ALPHT, ALPHD, ALPHH
COMMON/LABELSI ALPHP, ALPHT, ALPHD, ALPHH

REAL*8 X(5), XI(21), ZB, DB


COMMON/AGAI X, XI, ZB, DB

REAL *8 DHIGH, PLOW, PHIGH, TLOW, THIGH


COMMON/LIMITS/ DHIGH, PLOW, PHIGH, TLOW, THIGH

INTEGER PROG
REAL *8 RGAS , MWX, MW(5)
COMMON/CONSTANTSI PROG, RGAS, MWX, MW

REAL*8 TBHV, TBDR, PO, HVINPUT, DRINPUT


COMMONIREFCONDI TBHV, TBDR, PO, HVINPUT, DRINPUT

CHARACTER*80 UNITOPT, OUTOPT


INTEGER METSG, I
REAL*8 P1 , T1, T2
REAL*8 UNITS, HV1 SUM, TB1 TB2, PD1
I I

C ..... Display program settings.


WRITE (*,'(25(1})')
IF (PROG.EO.1) WRITE (*,1040)
IF (PROG.EO.2) WRITE (*,1050) METSG
UNITOPT = ALPHP/f '/IALPHT/f '/IALPHD/f '/IALPHH
WRITE (*,1000) OUTOPT, UNITOPT
T1 = UNITS(TLOW, T, 'K', ALPHT)
T2 = UNITS(THIGH, T, 'K', ALPHT)
=
P1 UNITS(PHIGH, 'P', 'MPa', ALPHP)
IF (PROG.EO.1) THEN
WRITE (*,1010)
ELSEIF (PROG.EO.2) THEN
WRITE (*,1020) T1, T2, ALPHT, P1, ALPHP
ENDIF
WRITE (*,1030)

SUM =0
DO 10 1=1,21
10 SUM = SUM + XI{I)
WRITE (*,*)
IF (DABS(SUM-100.DO).GT.0.5D-9 .AND. SUM.NEO.DO .AND. PROG.EO.1)

CoPyright C 1992, 1994 American Gas Association


All Rights Reserved

Property of PT. NISCONI


1S4

& WRITE (*, *) 'COMPONENTS WILL BE NORMALIZED'

PAUSE
WRITE (*,'(25(1))')
IF (PROG.EQ.1) THEN
CALL COMPST(O)
PAUSE
ELSEIF (PROG.EO.2) THEN
=
HV1 UNITS(HVINPUT, 'H', 'MJ/m"3', ALPHH)
TB1 = UNITS(T8HV, 'T', 'K',ALPHT)
=
TB2 UNITS(TBDR, 'T', 'K',ALPHT)
=
PD1 UNITS(PD, 'P', 'MPa',ALPHP)
WRITE (*,1100) TB1, ALPHT, TB2, ALPHT, PD1, ALPHP
IF (METSG.EO.1) WRITE (*,1110) HV1, ALPHH
WRITE (*,1120) DRINPUT
IF (METSG.EO.2) WRITE (*,1130) X(2)*100.DO
WRITE (*,1140) X(3)*100.DO .
IF (X(4).NE.0 .OR. X(5).NE.0)
& WRITE (*,1150) X(4)*100.DO, X(5)*100.DO
WRITE (*, *) .
PAUSE
ENDIF
(;-----------------------------------------------------------------------
1000 FORMAT(' (;URRENT OPTION SETTINGS:',/,
& 'OUTPUT DEVICE: ',A60,/,
& 'UNITS SYSTEM: ',A60,1)
1010 FORMAT(' RANGE OF VALIDITY:',/,
& ' GAS PHASE ONLY (User should identify phase boundaries)'/I)
1020 FORMAT(' RANGE OF VALIDITY:',/,
& 'TEMPERATURE:',F7.2,' TO', FS.2,1X, A10,/,
& ,. PRESSURE: 0.00 TO " FS.2,1 X, A 10,1)
1030 FORMAT(, BASE (;ONDITIONS FOR CALCULATION OF SUPERCOMPRESSIBILlTY:'
& / 60F, 14.73 psia OR 15.56(;, 101.56 kPa',1)
1040 FORMAT(' (;URRENT SELE(;TED METHOD:',
& 'DETAILED (;HARA(;TERIZATION METHOD ''/1)
1050 FORMAT(' (;URRENT SELE(;TED METHOD:',
& 'GROSS CHARACTERIZATION METHOD ',11,/1)
1100 FORMAT(
&' REF. TEMPERATURE FOR COMBUSTION (?ASIS: ',F9.3,4X,A10'/,
&' REF. TEMPERATURE FOR FLOW BASIS: ',F9.3,4X,A10,1,
&' REF. PRESSURE FOR FLOW BASIS: ',F14.6,1X,A10,1)
1110 FORMAT(
&' VOLUMETRIC (GROSS) HEATING VALUE @ REF. T,P:',F14.6,1X,A10)
1120 FORMAT(
&' RELATIVE DENSITY (SPE(;IFIC GRAVITY): ',F14.6)
1130 FORMAT(
&' MOLE PERCENT N2: ',F14.6)
1140 FORMAT(

Copyright C 1992, .1994 American Gas Association


All Rights Reserved

Property of PT. NISCONI


185

&' MOLE PERCENT C02: ',F14.6)


1150 FORMAT(
&' MOLE PERCENT H2: ',F14.6J,
&' MOLE PERCENT CO: ',F14.6)
END

Copyright C 1992, 1994 American Gas AssocIation


All Rights Reserved

Property of PT. NISCONI


1S6

C ======================== -------
----------
SUBROUTINE TABLES(OPT, METSG)
C
C PURPOSE:
C Constructs a table of properties.
C-----------------------------------------------------------------------
CHARACTER"10 ALPHP, ALPHT, ALPHD, ALPHH
COMMONILABELS/ ALPHP I ALPHT, ALPHD, ALPHH

INTEGER PROG
REAL"S RGAS, MWX, MW(5)
COMMON/CONSTANTS/ PROG, RGAS, MWX, MW

REAL"S DHIGH, PLOW, PHIGH, TLOW, THIGH


COMMONILIMITSI DHIGH, PLOW, PHIGH, TLOW, THIGH

REAL"S DCALC, UNITS, T, T2, TINC, 0 , P, P2, PINC, Z


INTEGER OPT, METSG, FLAG
LOGICAL ERROR

FLAG = 0
CALL STATUS2(METSG)

C ..... Calculate properties given T and P.


500 WRITE (":)
WRITE (",")
IF (OPT.EO.5) THEN
WRITE (",1010) AlPHT
READ (.. 1* IERR=9999) T
T = UNITS(T, 'T', ALPHT, 'K')
IF (T.LT.TLOW .OR.-T.GT.THIGH) THEN
WRITE (*,*) I ... TEMPERATURE OUT OF BOUNDS .... ,
GOTO 500
ENDIF

510 WRITE (*,1000) ALPHP


READ (,,ERR=9999) P
P = UNITS(P, 'P', ALPHP, 'MPa ')
IF (P.LT.PLOW .OR. P.GT.PHIGH) THEN
WRITE (*,.) , .... PRESSURE OUT OF BOUNDS *'
WRITE (*,*)
GOTO 510
ENDIF

C ..... Calculate isothermal properties.


ELSEIF (OPT.EO.6) THEN
WRITE (,1010) ALPHT
READ (,,ERR=9999) T

Copyright C 1992, 1994 American Gas .Association


All Rights Reserved

Property of PT. NISCONI


187

T = UNITS(T, 'T', ALPHT, 'K')


IF (T.LT.TLOW .OR. T.GT.THIGH) THEN
WRITE (",*) , ...... TEMPERATURE OUT OF BOUNDS ......,
GOTO 500
ENDIF

WRITE (",1030) ALPHP


CALL INPUT(P, P2, PINC, ERROR, 2)
IF (ERROR) GOTO 500
IF (P2.LT.PLOW .OR. P.GT.PHIGH) THEN
WRITE (.. ,*)' ...... PRESSURE OUT OF BOUNDS .....,
GOTO 500
ENDIF

C .....Calculate isobaric properties.


ELSEIF (OPT.EO.7) THEN
WRITE (",1000) ALPHP
READ (*,",ERR=9999) P
=
P UNITS(P, 'P', ALPHP, 'MPa')
IF (P.LT.PLOW .OR. P.GT.PHIGH) THEN
WRITE (*,") , .... * PRESSURE OUT OF BOUNDS ***'
GOTO 500
ENDIF

WRITE (*,1020) ALPHT


CALL INPUT(T, T2, TINC, ERROR, 1)
IF (ERROR) GOTO 500
IF (T2.LT.TLOW .OR. T.GT.THIGH) THEN
WRITE (*,") , ..... TEMPERATURE OUT OF BOUNDS ***'
GOTO 500
ENDIF
ENDIF

C ..... Write header.


WRITE (",'(25(1))')
IF (PROG.EO.1) THEN
WRITE (",.) , PROPERTIES FROM DETAILED CHARACTERIZATION MODEL'
ELSEIF (PROG.EO.2) THEN
. WRITE (*,*) , PROPERTIES FROM GROSS CHARACTERIZATION MODEL'
ENDIF
WRITE (*,'(54("=")')
WRITE (",*) , P T D Z Fpv'
WRITE (*,*) , '1IALPHP(1 :9)/f 'IIALPHT(1 :5)/f 'IIALPHD
WRITE (*,'(54("=")')

IF (OPT.NE.5 .OR. FLAG.EO.O) THEN


FLAG = 1
WRITE (1,*)

Copyright C 1992, 1994 American Gas Association


All Rights Reserved

Property of PT. NISCONI


188

IF (PROG.EO.1) THEN
WRITE (1,*)' PROPERTIES FROM DETAILED CHARACTERIZATION MODEL'
ELSI;IF (PROG.EO.2) THEN
WRITE (1,*)' PROPERTIES FROM GROSS CHARACTERIZATION MODEL'
ENDIF
WRITE (1,'(54("="')
WRITE (1,*)' P T 0 Z Fpv'
WRITE (1,*)' 'IIALPHP(1:9)1f 'IIALPHT(1:5)1f 'IIALPHD
WRITE (1, '(54{"="')
ENDIF

c ..... Property calculation.


IF (OPT.EO.5) THEN
o = DCALC(P, T)
Z = P/(D*RGAS*T)
CALL PROPS(P, 0, T, Z)
ELSEIF (OPT.EO.6) THEN
600 IF (P.LT.PLOW) THEN
=
P P + PINC
GOTO 600
ENDIF
610 IF (P-P2.GT.-0.5D-9) P P2 =
IF (P-PHIGH.GT.-0.5D-9) P = PHIGH
o = OCALC(P, T)
=
Z P/(O*RGAS*T)
CALL PROPS(P, 0, T, Z)
IF (P.NE.P2 .ANO. P.LT.PHIGH) THEN
=
P P + PINC
GOTO 610
ENDIF
ELSEIF (OPT.EO.7) THEN
IF (T.LT.TLOW) THEN
o = OCALC(P, TLOW)
Z = P/(O*RGAS*TLOW)
CALL PROPS{P, 0, TLOW, Z)
ENDIF
700 IF (T.LT.TLOW) THEN
T = T + TINC
GOTO 700
ENOIF
710 IF (T-T2.GT.-O.50-9) T = T2
IF (T-THIGH.GT.-0.50-9) T = THIGH
o = OCALC(P, T)
=
Z P/(O*AGAS*T)
CALL PROPS(P, 0, T, Z)
IF (T.NE.T2 .AND. T.LT.THIGH) THEN
T = T + TINC
GOTO 710

Copyright C 1992, 1994 American Gas Association


All Rights Reserved

Property of PT. NISCONI


189

ENDIF
ENDIF
GOTO 500
9999 RETURN

c;-----------------------------------------------------------------------
1000 FORMAT (' Input Pressure in ',A10,' (X to exit) ----> ')
1010 FORMAT (' Input Temperature in ',A10,' (X to exit) ----> ')
1020 FORMAT (' Enter the following in " A10,!,
&' (1) Starting Temperature',!,
&' (2) Ending Temperature',!,
&' (3) Temperature Increment',!/)
1030 FORMAT (' Input the following in " A10,!,
&' (1) Starting Pressure',!,
&' (2) Ending Pressure',!,
&' (3) Pressure Increment',!/)
END

Copyright e 1992, 1994 American Gas Association


All Rights Reserved

Property of PT. NISCONI


190

C=====================================
SUBROUTINE TABLES2(METSG)
C
C PURPOSE:
C Constructs a table of properties.
C-----------------------------------------------------------------------
REAL*8 X(5), XI(21), ZB, DB
COMMON!AGAI X, XI, ZB, DB

CHARACTER*10 ALPHP, ALPHT,.ALPHD, ALPHH


COMMONILABELS! ALPHP, ALPHT, ALPHD, ALPHH

INTEGER PROG
REAL*8 RGAS, MWX, MW(5)
COMMON!CONSTANTS! PRoo, RGAS, MWX, MW

REAL*8 DHIGH, PLOW, PHIGH, TLOW, THIGH


COMMON/L1MITSI DHIGH, PLOW, PHIGH, TLOW, THIGH

CHARACTER A *11, L1NE*240


LOGICAL ERROR
INTEGER OPT, I, J, CELL, METSG
REAL*8 T, T1, T2, TINC, P, P2, PINC, TT, PP, DO, UNITS
REAL*8 0, Z, FPV, DCALC

CELL = 11
100 WRITE (*,1000)
READ (*,*,ERR=100) OPT
IF (OPT.LE.O .OR. OPT.GE.4) RETURN

WRITE (* ,1010) ALPHT


CALL INPUT(T1, T2, TINC, ERROR, 1)
IF (ERROR) RETURN
IF (T2.LT.TLOW .OR. T1.GT.THIGH) THEN.
PAUSE' *** TEMPERATURE OUT OF BOUNDS ***'
RETURN
ENDIF

WRITE (*,10~0) ALPHP


IF (ERROR) RETURN
CALL INPUT(P, P2, PINC, ERROR, 2)
IF (P2.LT.PLOW .OR. P.GT.PHIGH) THEN
PAUSE' *** PRESSURE OUT OF BOUNDS ***'
RETURN
ENDIF

C .....Write header.
IF (OPT.EQ.1) THEN

Copyright C 1992, 1994 American Gas Association


All Rights Reserved

Property of PT. NISCONI


191

WRITE (*,1060)
WRITE (1,1060)
ELSEIF. (OPT.EO.2) THEN
WRITE (*,1070)
WRITE (1,1070)
ELSE
WRITE (*,1080)
WRITE (1,1080)
ENDIF
CALL STATUS2(METSG)
PAUSE

C ..... Write temperature and pressure header.


IF (ALPHT.EO.'C' .OR. ALPHT.EO.'F') THEN
WRITE (*,1040) ALPHT
WRITE (1,1040) ALPHT
ELSE
WRITE (*,1050) ALPHT
WRITE (1,1050) ALPHT
ENDIF
WRITE (UNE,'(1X,A10)') ALPHP
T =T1
1=1
10 IF (T.LT.TLOW) THEN
T=T + TINC
GOTO 10
ENDIF
15 IF (T-T2.GT.-0.5D-9) T = T2
IF (T-THIGH.GT.-0.5D-9) T = THIGH
TT = UNITS(T, 'T, 'K', ALPHT)
WRITE (A, 1031) IT
UNE(I*CELL+2:I*CELL+CELL+1) = A
1=1+1
IF (T.NE.T2 .AND. T.LT.THIGH .AND. (1+1)*CELL.LT.240) THEN
T = T + TINC
GOTO 15
ENDIF
WRITE (*,*) UNE(1:78)
WRITE (1,*) UNE(1 :I*CELL+CELL+1)
WRITE (UNE, '(240("_")')
IF (I.LE.7) THEN
WRITE (*,*) UNE(1:I*CELL)
ELSE
WRITE (*,*) UNE(1 :78)
ENDIF
WRITE (1,*) UNE(1 :I*CELL)

C ..... Pressure loop.

Copyright C 1992, 1994 American Gas Association


All Rights Reserved

Property of PT. NISCONI


192_ _ _ _ _ .... M- .. _ . _ _ .... _ _ ........ ......... ~... _ . . . , , _ - . . . . . - ..............A ..... _~-...-, _ _ _ _ _ _ __

J=O
=-~ IF (P .LT.PLOw) THEN
=
P P + PINe
GOT030
ENDIF
35 IF (P-P2.GT.-o.50-9) P : f'2
'F (P-PHIGH.GT.-O.50-9) ;J :: PHIGH
1=1
PP = UNITS(P, 'I'" 'MPa', ALPHP)
IF (DABS(PP),LT.O.50-9) PP = 0
WRITE (LINE, 1035) PP

C .....Temperature loop.
T=T1
20 IF (T.LT.TLOW) THEN
T=T+TlNC
GOT020
ENDIF
25 IF (T-T2.GT.-O.50-9) T = T2
IF (T-THtGH.GT.-O.50-9) T = THIGH
=
o DCAlC(P, T)
Z = P/(D*RGAS~
DO: UNITS(D. '0', 'moVdm"3'. ALPHD)
IF (OPT.EQ.1) THEN
WRITE CA, 1030) Z
ElSEtF (OPT,Ea.2) THEN
FPV = DSQRT(ZBIZ)
WRITE (A, 1030) FPV
ELSEIF (OPT,EO.3) THEN
WRITE (A, 1030) DO
ENDIF
LlNE(I*CELL...1:I*CELL+CELL) = A
1:1+1
IF (T.NE.T2 .AND. T.LT.THIGH .AND. (1+1)*CELL.LT.240) THEN
T=T+ TlNC
GOT025
ENDIF

c ., ...End temperature loop.


UNE(CELl+1 :CELL+1)='1'
WRITE (*,*) l1NE(1:78)
WRITE (1,*) UNE(1:I*CELl+CElL)
IF CP,NE.P2 .AND. P.lT.PHIGH) THEN
J=J ... 1
IF (J.EQ.5) THEN
WRITE ~*..' i ' I'
WRITE (1,*' I'
J=O

c~ C 1992, 1994 MIectQan Gas h:socIaton


AM Riqhts ReseMd

Property of PT. NISCONI


193

ENDIF
P = P + PINC
GOTO.35
ENDIF
WRITE (1,*)
WRITE (1,*)
PAUSE

C-----------------------------------------------------------------------
1000 FORMAT (25(1),' Table options:'I!,
&' (1) Compressibility Factor, 1:1,
&' (2) Supercompressibility, Fpv'l,
&' (3) Density',1,
&' (0) Return to main menu'll)
1010 FORMAT (' Enter the following in " A10,l,
&' (1) Starting Temperature'l,
&' (2) Ending Temperature'l,
&' (3) Temperature Increment',!/)
1020 FORMAT (' Input the following in " A 10,1,
&' (1) Starting Pressure'l,
&' (2) Ending Pressure'l,
&' (3) Pressure Increment',11)
1030 FORMAT (1X,G10.6El)
1031 FORMAT (F7.3,4X)
1035 FORMAT (Gll.6El)
1040 FORMAT (' Pressure Temperature,O',Al)
1050 FORMAT (' Pressure Temperature, ',A 1)
1060 FORMAT (' Compressibility Factors' J)
1070 FORMAT (' Supercompressibility Factors'l)
1080 FORMAT (' Densities' J)
END

Copyright C 1992. 1994 American Gas AssocIation


All Rights Reserved

Property of PT. NISCONI


194

C================================= ----
SUBROUTINE STATUS2(METSG)
C
C PURPOSE:
C Prints the method and composition of the selected natural gas.
C-----------------------------------------------------------------------
REAL*8 X(S), XI(21), ZB, DB
COMMON/AGAI X, XI, ZB, DB

INTEGER PROG
REAL*S RGAS, MWX, MW(S)
COMMONICONSTANTsi PROG, RGAS, MWX, MW

CHARACTER*10 ALPHP, ALPHT, ALPHo, ALPHH


COMMONILABELSI ALPHP, ALPHT, ALPHo, ALPHH

REAL*8 TBHV, TBoR, PO, HVINPUT, oRINPUT


COMMONIREFCONol TBHV, TBoR, PO, HVINPUT, oRINPUT

INTEGER METSG, I
REAL*8 HV1, SUM, UNITS; XJ(21)

SUM=O
DO 401=1,21
40 SUM = SUM + XI(I)
IF (SUM.EO.O) SUM 100 =
DO SO 1=1,21
SO XJ(I) = XI(I)/SUM*1oo.00

WRITE (*,*)
WRITE (1,*)
WRITE (1,*)
IF (PROG.EO.1) THEN
WRITE (*,1090)
WRITE (1,1090)
ELSEIF (PROG.EO.2) THEN
WRITE (*,1100) METSG
WRITE (1,1100) METSG
ENDlf
IF (PROG.EO.1) THEN
WRITE (*,1200) XJ(1), XJ(S), XJ(9), XJ(2), XJ(6), XJ(10),
&. XJ(3), XJ(7), XJ(11),XJ(4), XJ(S) , XJ(12),
& XJ(13),XJ(16),XJ(19),XJ(14) ,XJ(17),XJ(20),
& XJ(1S),XJ(1S),XJ(21)
WRITE (1,1200) XJ(1), XJ(S), XJ(9) , XJ(2), XJ(6), XJ(10),
& XJ(3), XJ(7), XJ(11),XJ(4), XJ(S) , XJ(12),
& XJ(13),XJ(16),XJ(19),XJ(14),XJ(17).XJ(20),
& XJ(1S),XJ(1S),XJ(21)

Copyright C 1992, 1994 American Gas Association


All Rights Reserved

Property of PT. NISCONI


195

IF (DABS(SUM-100.DO).GT.0.SD-9 .AND. SUM.NE.O.DO) THEN


WRITE (*,1210)
WRITE (1,1210)
ENDIF
ELSEIF (PROG.EQ.2) THEN
IF (METSG.EQ.1) THEN
HV1 = UNITS(HVINPUT, 'H', 'MJ/m-"3', ALPHH)
WRITE (*,1120) HV1, ALPHH
WRITE (1,1120) HV1, ALPHH
ENDIF
WRITE (*,1130) DRINPUT
WRITE (1,1130) DRINPUT
IF (METSG.EQ.2) THEN
WRITE (*,1140) X(2)*100.DO
WRITE (1,1140) X(2)*100.DO
ENDIF
WRITE (*, 11S0) X(3)*100.OO
WRITE (1 ,11S0) X(3)*100.oo
IF (X(4).NE.0 .OR. X(S).NE.O) THEN
WRITE (*,1160) X(4)*100.OO, X(S)*100.DO
WRITE (1,1160) X(4)*100.DO, X(S)*100.DO
ENDIF
WRITE (*,*)
WRITE (1,*)
ENDIF

1090 FORMAT(, DETAILED CHARACTERIZATION METHOD')


1100 FORMAT(' GROSS CHARACTERIZATION METHOD ',11)
1120 FORMAT(, Volumetric (gross) heating value:',F14.4,1X,A10)
1130 FORMAT(, Relative density: . ',F16.6)
1140 FORMAT(, Mole percent N2: ',F14.4)
11S0 FORMAT(, Mole percent C02: ',F14.4)
1160 FORMAT(' Mole percent H2: ',F14.4,I,
& ' Mole percent CO: ',F14.4)
1200 FORMAT(
&' CH4 ',FB.4,BX,'n-C4H10 ',FB.4,BX,'n-C7H16 ',FB.4,!
&' C2H6 ',FB.4,BX,'i-CSH12 ',FB.4,BX,'n-CBH1B ',FB.4,/
&' C3HB ',FB.4,BX,'n-CSH12 ',FB.4,BX,'n-C9H20 ',FB.4,!
&' i-C4H10 ',FB.4,BX,'n-C6H14 ',FB.4,BX,'n-C10H22',FB.4,!1
&' C02 ',FB.4,BX,'He ',FB.4,BX,'Ar ',FB.4,/
&' N2 ',FB.4,BX,'H20 ',FB.4,BX,'H2 ',FB.4,!
&' H2S ',FB.4,BX,'02 ',FB.4,BX,'CO ',FB.4,1)
1210 FORMAT(' Components have been normalized'/)
END

Copyright C 1992, 1994 American Gas Association


All Rights Reserved

Property of PT. NISCONI


196

C==============================:=========
SUBROUTINE UNITSG(OPTSET)
C
C PURPOSE:
C Sets up unit conversion factors and labels for headings.
C-----------------------------------------------------------------------
CHARACTER*10 ALPHP, ALPHT, ALPHD, ALPHH
COMMONILABELSI ALPHP, ALPHT, ALPHD, ALPHH

INTEGER UNIT, OPTSET, OPT


CHARACTER*12 ALPHA(5,5)

DATA ALPHAI'K','C','R','P,' "


& 'MPa' ,'psia','bar','mmHg','atm',
& 'MPa gage' ,'psig', 'bar gage', 'mmHg gage' ,'atm gage',
& 'moVdnY'3','kmoVnY'3','kglnY'3','lbmlftI\3','lbmoVftI\3',
& 'MJ/nY'3', 'kJ/dnY'3', 'kJ/nY'3', 'kcaVnY'3', 'Bt,ulftl\3'1

C ..... Display the units menu.


IF (OPTSET.EO.5) RETURN

100 IF (OPTSET.EO.O) THEN


WRITE (*,1000)
READ (*, * ,ERR=1 00) OPT
IF (OPT.EO.O) RETURN
OPTSET=OPT
ENDIF

C ..... SI units with molar density and Megapascals for pressure.


IF (OPTSET.EO.1) THEN
ALPHT= 'K'
ALPHP = 'MPa'
ALPHD = 'mol/dm"3'
ALPHH = 'MJ/ml\3'

C ..... SI units with mass density and Megapascals for pressure.


ELSEIF (OPTSET.EO.2) THEN
ALPHT= 'C'
ALPHP = 'MPa'
ALPHD = 'kglm"3'
ALPHH = 'MJ/ml\3'

C ..... Engineering Units with mass density and PSIA for pressure.
ELSEIF (OPTSET.EO.3 .OR. OPTSET.EO.4) THEN
ALPHT = 'F'
ALPHP = 'psia'
ALPHD = 'lbmollftl\3'
ALPHH = 'Btu/ftl\3'

Copyright C 1992. 1994 American Gas Association


All Rights Reserved

Property of PT. NISCONI


197

IF (OPT5ET.E0.4) ALPHD = 'lbm/ftA 3'

C ..... Customize Units.


EL5EIF (OPT5ET.EO.5) THEN
110 WRITE (*,2000) ALPHT, ALPHP, ALPHD, ALPHH
READ(,,ERR=110) OPT
IF (OPT.EO.1) THEN
WRITE (*,2001) ALPHT
READ(*,,ERR=110) UNIT
IF (UNIT.GE.1 .AND. UNIT.LE.4) ALPHT = ALPHA(UNIT, 1)
EL5EIF (OPT.EO.2) THEN
WRITE (,2002) ALPHP
READ(* ,,ERR=11 0) UNIT
IF (UNIT.GE.1 .AND. UNIT.LE.5) ALPHP = ALPHA(UNIT, 2)
IF (UNIT.GE.6 .AND. UNIT.LE.10) ALPHP = ALPHAUNIT-5), 3)
EL5EIF (OPT.EO.3) THEN
WRITE (,2003) ALPHD
READ(,*,ERR=110) UNIT
IF (UNIT.GE.1 .AND. UNIT.LE.5) ALPHD = ALPHA(UNIT, 4)
EL5EIF (OPT.EQ.4) THEN
WRITE (*,2004) ALPHH
READ(,,ERR=110) UNIT
IF (UNIT.GE.1 .AND. UNIT.LE.5) THEN
ALPHH = ALPHA(UNIT, 5)'
ENDIF
EL5EIF (OPT.EO.O) THEN
RETURN
ENDIF
GOTO 110
ENDIF
C-----------------------------------------------------------------------
1000 FORMAT (24(1),' UNITS MENU:'//,
& ' (1) 51 (molar) (MPa, mol/dmA3, K, MJ/m"3)' /,
& ' (2) 51 (mass) (MPa, kg/mA3, c, MJ/mA3)' /,
& ' (3) Engineering (molar) (psia, Ibmol/ftA 3, of, BtulftA3)' /,
& ' (4) Engineering (mass) (psia, Ibm/ftA3, of, BtulftA3)' /,
& ' (5) Custom (Choose your own units)',!,
& ' (0) Return to the main menu',/I)
2000 FORMAT (25(1),' CUSTOM MENU:',
& II,' (1) Temperature ',A10,' (K, c, R, 0F)',/,
& ' (2) Pressure ',A10,
& '(MPa, pSia, bar, mmHg, atm, gage)',!,
& ' (3) Density ',A10,
& '(moVdmA3, kg/mA 3, IbmlftA 3, Ibmol/ftA 3)',!,
& ' (4) Heating Value ',A 10,
& '(MJ/mA3, kJ/dm A3, kcal/mA3, Btu/ftA3)',!,
& ' (0) Return to main menu' ,I)
2001 FORMAT (2(/),' TEMPERATURE UNITS:',II,

Copyright 0 1992, 1994 American Gas Association


All Rights Reserved

Property of PT. NISCONI


198

&' (1) Kelvin'l,


&' (2) Celsius'l,
&' (3). Rankine'l,
&' (4) Fahrenheit'll,
& 'The current units are ',A1011)
2002 FORMAT (2(1),' PRESSURE UNITS:' II,
& '(1) MPa (6) MPa, gage'l,
& ' (2) psia (7) psig, gage'l,
& ' (3) bar (8) bar, gage'l,
& ' (4) mmHg (9) mmHg, gage' I,
& ' (5) atm (10) atm, gage' ,II,
& 'The current units are ',A1011)
2003 FORMAT (2(1),' DENSITY UNITS:' ,II,
& ' (1) moVdl1l"3' I,
& '(2) kgmoVm"3' I,
& '(3) kg/mA3' I,
& ' (4) Ibmlft"3' I,
& '(5) Ibmollft"3'II,
& 'The current units are \A1011)
2004 FORMAT (2(/),' HEATING VALUE UNITS:',!I,
& ' (1) MJ/m"3'I,
& '(2) kJ/dl1l"3' I,
& ' (3) kJ/mA3' I,
& ' (4) kcaVI1l"3'I,
& ' (5) Btu/ftJ'3' I,
& 'The current units are ',A10//)
END

Copyright C 1992, 1994 American Gas Association


All Rights Reserved

Property of PT. NISCONI


199

C -- =--=== ========================
FUNCTION DCALC(P, T)
C
C PURPOSE:
C Calculates the molar density from the GROSS or DETAIL model.
C-----------------------------------------------------------------------
INTEGER PROG
REAL*8 RGAS, MWX, MW(5)
COMMON!CONSTANTS! PRoo, RGAS, MWX, MW

REAL*8 P, T, DCALC, DDETAIL, DGROSS

IF (PROG.EQ.1) THEN
DCALC = DDETAIL(P, T)
ELSEIF (PROG.EQ.2) THEN
DCALe = DGROSS(P, T)
ENDIF .
RETURN
END

e
COpyright 1992, 1994 American Gas Association
All Rights Reserved

Property of PT. NISCONI


200

C========================================
FUNCTION PCAlC(D, T)
c
C PURPOSE:
C Calculates the pressure from the GROSS or DETAil model.
C-----------------------------------------------------------------------
INTEGER PROG
REAL*8 RGAS, MWX, MW(5)
COMMON!CONSTANTS! PROG, RGAS, MWX, MW

REAL*8 0, T, PCAlC, PDETAIL, PGROSS

IF (PROG.EQ.1) THEN
=
PCAlC POETAll(D, T)
ElSEIF (PROG.EQ.2) THEN
=
PCALC PGROSS(D, T)
ENDIF .
RETURN
END

Copyright C 1992. 1994 American Gas Association'


All Rights Reserved

Property of PT. NISCONI


201

C
FUNCTION ZCALC(D, T)
C
C PURPOSE:
C Calculates the compressibility factor from the GROSS or DETAIL model.
C-----------------------------------------------------------------------
INTEGER PROG
REAL *8 RGAS, MWX, MW(5)
COMMON!CONSTANTS! PROG, RGAS, MWX, MW

REAL*8 0, T, ZCALC, ZDETAIL, ZGROSS

IF (PROG.EQ.1) THEN
ZCALC = ZDETAIL(D, T)
ELSEIF (PROG.EQ.2) THEN
ZCALC = ZGROSS(D, T)
ENDIF
RETURN
END

Copyright C 1992. 1994 American Gas Association


All Rights Reserved

Property of PT. NISCONI


Property of PT. NISCONI
203

INDEX

AGA8PROG 157-165
air 12,86,89,131,133,134
air second virial coefficient 133
association parameter 18, 24
average absolute deviation 76, 78, 120, 122
B 17,18,21,29,30,33,38,39,43,44,49,57,84-91
Benedict-Webb-Rubin 16
bias 76, 78, 120, 122
binary interaction parameter 17-20,25,26
binary orientation parameter 18, 19
BLOCKDATA 43,44,49,69
BRAKET 42-45, 49, 58
characteristic energy parameter 19, 20
CHARDL 40-43,49,61, 160
CHARGS 93-95, 103,108, 160
compressibility factor 1,4-10.14-17.28.29.34.38.39.76-78.91.92,120-122
compressibility factor of air 12. 131
COMPST 164. 168
CON FIG 164. 169
contract reference condition 11. 12. 129. 132-134
convergence criterion 38. 87. 89
conversion of measured heating value 13. 149
conversion of measured relative density 13. 149
custody transfer region 4. 5. 7. 76. 120
DDETAIL 40-44. 49. 50. 160
DETAIL CHARACTERIZATION METHOD 5.6.7.10.15-26,33,34,35-49,159-163
DGROSS 93-96, 103, 104, 160
diluent content 3, 28
dipole parameter 18, 24
enthalpy 2, 129, 136, 138-141
equivalent hydrocarbon 29-33, 84-90
example calculations 46-48. 74, 75, 97-102. 116-119
flow diagram 41,94,160
gas constant 14
GROSS CHARACTERIZATION METHOD 5.6,7,10,15.27-34.81-103,159-163
gross heating value 3.6.12,29,84,85,117,135-142,149
heating value reference conditions 12, 142
HN 84,87. 136-142
hydrogen sulfide 2, 3, 5, 24-26, 28, 127. 135-137, 140
ideal gas state 136. 141
INPUT 164, 172
mass density 9-11,131-134
mixture size parameter 17, 18,24
molar density 8-10,21.29,33,130,131,149
molar heat capacity 139, 140
molar heating value 135-142
molar mass 9,24,86,87,89,130,131

Property of PT. NISCONI


204

molar mass of air 12,86,89, 131, 134


OUTPUT 164, 179
oxidation reaction 135
PARAMDL 40-43, 49, 65, 160
PARAMGS 93-96,103,112,160
POETAIL 42, 43, 45, 49, 54, 160
PGROSS 93,95,96,103,106,160
PROPS 164, 180
quadrupole parameter 18-20, 24
reduced density 17-21
reference conditions 12, 129, 132, 133, 142
relative density 12, 29, 84, 85, 88, 131, 133
relative density reference condition 12, 132, 133
root mean squared deviation n, 78, 121, 122
second virial coefficient 17, 18, 21, 29, 30, 33, 38, 39, 84-91
SETUP 164, 181
SGERG 28-30, 90, 96, 120-122 ."
significant figures 13, 14
specific gravity 12,29,84,85,88, 131, 133
standard deviation n,78, 121, 122
STATUS 164, 183
stoichiometric coefficient 136-138
supercompressibility factor 11, 33, 39, 91, 132
supercompressibility factor reference condition 11, 132
TABLES 164, 186
TABLES2 164, 190
TEMP 40-44,49,67
uncertainty 6, 7, 34, 76-78, 120-122, 136
units conversion 14, 34, 147-150
UNITSG 164,196
VIRGS 93-96, 103', 114
vi rial coefficients 17,18,29-33,91,94
volumetric heating value 3,6,12,29,84,85,117,135-142,149
water 2, 3, 24-26, 28, 135, 138, 140
ZOETAIL 43,46,49,55,160
ZGROSS 93,95,96,103,107,160

Property of PT. NISCONI


PROPOSAL TO REVISE AGA REPORT NO.8

Send to: Operations and Engineering Section


Ameriaan Gas Association
do
400 North Capitol St., N. W., 4 Floor
Washington, DC 20001
U.S.A.
Fax: (202) 824-7082
Name: _______________________________________________________________

Company: ____________________________________________________________

Addrus:_____________________________________________________________

Phone: ________________ Fax: ________________-'E-mail___________________

Please Indicate Organization Represented (if any): _______________________________

1. SedionfParagraph: ___________________________________________________

2. Proposal Recommends: (check one): 0 new text o revised text o deleted text
3. Proposal (include proposed new or revised wording, or identification of wording to be deleted, use separate
sheet if needed): [Proposed text should be in legislative fonnat; i.e., use underscore to denote wording to be inserted
(inserted wording) and strike-through to denote wording to be deleted (deleted w8Riiag).]

4. Statement of Problem and Substantiation for Proposal (use separate sheet if needed): (State the problem that
will be resolved by your recOmmendation; give the specific reason for your proposal including copies of tests, research
papers, etc.)

5. 0 This proposal is original material (Note: Original material is considered to be the submitter's own idea based
on or as a result of hislher own experience, thought or research and, to the best of hislher knowledge, is not copied from
another source.)
o This proposal is not original material; its source (if known) is as follows: _ _ _ __

Type or print legibly. If supplementary material (photographs, diagrams, reports, etc.) is included, you may be
required to submit sufficient copies for an members of reviewing committees or task forces.

I hereby grant the American Gas Association the non-exclusive, royalty-free rights, including non-exclusive,
royalty-free rights in copyright. in this proposal and I understand that I acquire no rights in any publication of the
American Gas Association in which this proposal in this or another similar or analogous form is used.

Date: _ _ _ _ _ _ _ _ Signature (Required) _ _ _ _ _ _ _ _ _ _ _ __


r-~F~O~R~O~F=f~IC~E~U~S~E~O~N~L~Y~---,

Log# __________________

Date Rec'd ___________

Property of PT. NISCONI