TABLE OF CONTENTS LIST OF FIGURES

Similar documents
Chapter 22 Testing Protocols

CALCULATING THE SPEED OF SOUND IN NATURAL GAS USING AGA REPORT NO Walnut Lake Rd th Street Houston TX Garner, IA 50438

General Specifications

General Specifications

General Specifications

1 PIPESYS Application

General Specifications

Flow Vision I MX Gas Blending Station

Agilent 490 Micro GC Natural Gas Analyzer

Gas Billing Factors Guideline

Series 100 Slam Shut Valve. Technical Bulletin

Operational Settings:

Model 1800 PFM Series Regulator. Technical Bulletin

Gas Proportioners - Back Pressure Compensated

Fit for Purpose Compositional Input for Allocation Using Equations of State Thomas Hurstell, Letton Hall Group

Control Valve Sizing. Sizing & Selection 3 P 1. P 2 (Outlet Pressure) P V P VC. CONTENTS Introduction Nomenclature Calculating C v

PVT analysis of. bottom hole sample from Well by Otto Rogne. STAT01 L EXPLORATION 81 PRODUCTlON LABORATORY

North American Orifice Metering System

Instrument Performance Evaluation, comparing ISO and NORSOK I-106 Dr Paul Holland, EffecTech Group & Jon Carlsen, Norsk Analyse North Sea Flow

AC : MEASUREMENT OF HYDROGEN IN HELIUM FLOW

Type 310A-32A Pressure Reducing Regulator and Type 310A-32A-32A Working Monitor Regulator

Multiple Tube Flowmeters

T208VR Series Tank Blanketing Vacuum Regulator

Excellent Vortex Flowmeter INSERTION Type BATTERY POWERED EX DELTA

analytical bulk flow distance FLOW level pressure temperature industrial communication

Impact of imperfect sealing on the flow measurement of natural gas by orifice plates

Multiple Tube - Teflon PTFE-Glass Flowmeters

44 (0) E:

Single Tube Flowmeters

Instructions for SMV 3000 Multivariable Configuration (MC) Data Sheets

Upgrading Bio-Plex Manager 4.1, 5.0, or 6.0 Software to Bio-Plex Manager 6.1 Software

CAMASS. Calibration Centre. Gas flow technology and services

ISO INTERNATIONAL STANDARD

Type R622 Pressure Reducing Regulator

CAMASS. Calibration Centre. Gas flow technology and services

Flow and Energy Measurement F-5400 THERMAL MASS FLOW METER

Products Solutions Services. Gas Flow Measurement

Applied Technology and Best Practices in CEE. Conference

ONSITE PROVING OF GAS TURBINE METERS Daniel J. Rudroff Invensys Metering Systems

Schedule of Accreditation issued by United Kingdom Accreditation Service 2 Pine Trees, Chertsey Lane, Staines-upon-Thames, TW18 3HR, UK

Three Columns Gas Chromatograph Analysis Using Correlation between Component's Molecular Weight and Its Response Factor

Measurement & Analytics Wet gas monitoring

stat0il Tone Orke Reservoir Fluid Study for Statoil, Well by Arne M.Martinsen LAB Den norske stab ol.ieselskap a.

Y692VB Series Vacuum Breaker

Types 1808 and 1808A Pilot-Operated Relief Valves or Backpressure Regulators

COLLECTING AND HANDLING OF NATURAL GAS SAMPLES FOR CUSTODY TRANSFER. Christopher L. Grant, Dr. Darin L. George, and Jacob L.

COMPAFLOW. Compressed Air. Volumetric flow. Gas. Mass flow. Steam. Net volumetric flow. Liquid

Spot the Hazards: Review Confined Space Hazards Missed by Most Safety Professionals, and the PPE Solutions that Meet OSHA Requirements

SIZING AND CAPACITIES OF GAS PIPING Reserved

Example: Calculate the density of methane at 50 psig and 32 ⁰F. H.W. In previous example calculate the density of methane in gm/m 3.

Sizing Pressure Regulators & Control Valves

SG TF. Q = 963 Cv (P1 - P2)(P1 + P2) TECHNICAL INFORMATION. Flow Q (GPM)

Technical Manual. Sensepoint XCD Gas Detector

Improved Reliability in Natural Gas Energy Measurement with the Revised ISO Standard. Gerard Nieuwenkamp - VSL

ONSITE PROVING OF GAS METERS. Daniel J. Rudroff WFMS Inc West Bellfort Sugar Land, Texas. Introduction

Features. Description

Models 461-S, 461-8S and S Regulators. R-1330 Rev. 7

SIZING AND CAPACITIES OF GAS PIPING

1800CPB2 Service Regulators Maximum Inlet Pressure 125 PSIG

ULTRA 3000 DEFINITION SPECIFICATION

This portion of the piping tutorial covers control valve sizing, control valves, and the use of nodes.

SIZING AND CAPACITIES OF GAS PIPING

Solubility of Gases in Water

Safety Shut-off Valve SSV

SAFEGUARD ROTAMETERS GENERAL PURPOSE GLASS TUBE METERS FOR MEDIUM AND HIGH FLOWS FEATURING UNIVERSAL END FITTINGS

Type 299 Pressure Reducing Regulators

Type EZH Relief or Backpressure Regulator

RB 4700 Commercial & Industrial Regulator

CONTROL VALVE TESTING

The University of Hong Kong Department of Physics Experimental Physics Laboratory

4. Using the kinetic molecular theory, explain why a gas can be easily compressed, while a liquid and a solid cannot?

Using the CONVAL software for the petrochemical plant control valves checking. Case study

* William A. Sala, Jr. John A. Roscher. Columbia Gas Transmission, LLC * Sorana Linder 700 Louisiana Street, Suite 700 Director, Regulated Services

Aperval Pressure Regulators

PROCESS MONITORING AND CONTROL

Self-operated Regulators Accessories Differential Pressure and Flow Regulators

By: Eng. Ahmed Deyab Fares - Mobile:

MASS FLOW SYSTEMS MASS FLOW MEASURING, CONTROLLING AND BLENDING SYSTEMS

S300 Series. Valve Link. Features. Fisher Controls

1800CPB2 Service Regulators

Multiphase MixMeter. MixMeter specification. System Specification. Introduction

1805 Series Relief Valves

Mass Flow Controller (MFC) for Gases

Discovery HP-TGA 75/750. Site Preparation Guide

Mass Flow Meter (MFM) for Gases

GAS TRANSPORTER S REQUIREMENTS FOR GAS MEASUREMENT SYSTEMS CONNECTED TO THE NATIONAL GRID GAS NETWORK

1800CPB2 Pilot-Loaded Service Regulators

Part 6: Critical flow orifices

SAFETY FIRST. TESTED EQUIPMENT FOR OPTIMAL PROTECTION. DETECTION PERSONAL PROTECTION DIVING TECHNOLOGY SYSTEM TECHNOLOGY SERVICES S.

HOW TO NOT MEASURE GAS - ORIFICE. Dee Hummel. Targa Resources

Pegas 4000 MF Gas Mixer InstructionManual Columbus Instruments

General. Rugged, Reliable with Value-added Features. Pipe Sizes. Temperature Limits. Spring Ranges. Buried Service. Increased Outlet Pipe Sizes

METHOD 2E - DETERMINATION OF LANDFILL GAS PRODUCTION FLOW RATE. NOTE: This method does not include all of the

Kinetic Molecular Theory

Mr Roger Wood Measurement & Process Group (M&P) Network Strategy National Grid Gas plc Brick Kiln Street Hinckley Leicestershire LE10 0NA

Gas Turbine Performance Analysis

MODEL 274 GAS PRESSURE REGULATOR

Type 99 Pressure Reducing Regulators

KMT. Thermal Mass Flow Meter. for Compressed Air and Gases. Measuring range: m3n/h m3 N

Code Basic module and level control complete with optionals code

Transcription:

CG39AGA-1 CONTENTS TABLE OF CONTENTS SECTION AND TITLE PAGE 1.0 INTRODUCTION... 1-1 1.1 PRODUCT DESCRIPTION... 1-1 1.2 PRODUCT SUPPORT... 1-8 1.3 RELATED LITERATURE... 1-9 2.0 AGA3... 2-1 3.0 TURBINE_METER... 3-1 4.0 COMPR_FACTOR... 4-1 5.0 COMPR_FACTOR_s... 5-1 6.0 COMPR_FACTOR_b... 6-1 7.0 COM_FACTOR_2... 7-1 8.0 COM_FACTOR_2_s... 8-1 9.0 AGA3_CF... 9-1 10.0 TURB_METER_CF... 10-1 LIST OF FIGURES FIGURE AND TITLE PAGE 1-1 AGA Application Library... 1-3 1-2 AGA3_CF and TURB_METER_CF Blocks... 1-4 1-3 COM_FACTOR_2_ and AGA3 Blocks... 1-5 1-4 COMPR_FACTOR_ Blocks... 1-6 1-5 TURBINE_METER Block... 1-7 2-1 AGA3 Block Contents (Page 1 of 2)... 2-3 2-1 AGA3 Block Contents (Page 2 of 2)... 2-4 3-1 TURBINE_METER Block Contents... 3-2 November 1997 i

CONTENTS CG39AGA-1 LIST OF FIGURES (Continued) FIGURE AND TITLE PAGE 4-1 COMPR_FACTOR Block Contents (Page 1 of 4)... 4-2 4-1 COMPR_FACTOR Block Contents (Page 2 of 4)... 4-3 4-1 COMPR_FACTOR Block Contents (Page 3 of 4)... 4-4 4-1 COMPR_FACTOR Block Contents (Page 4 of 4)... 4-5 5-1 COMPR_FACTOR_s (Page 1 of 3)... 5-2 5-1 COMPR_FACTOR_s (Page 2 of 3)... 5-3 5-1 COMPR_FACTOR_s (Page 3 of 3)... 5-4 6-1 COMPR_FACTOR_b (Page 1 of 3)... 6-2 6-1 COMPR_FACTOR_b (Page 2 of 3)... 6-3 6-1 COMPR_FACTOR_b (Page 3 of 3)... 6-4 7-1 COM_FACTOR_2 (Page 1 of 4)... 7-3 7-1 COM_FACTOR_2 (Page 2 of 4)... 7-4 7-1 COM_FACTOR_2 (Page 3 of 4)... 7-5 7-1 COM_FACTOR_2 (Page 4 of 4)... 7-6 8-1 COM_FACTOR_2_s (Page 1 of 4)... 8-3 8-1 COM_FACTOR_2_s (Page 2 of 4)... 8-4 8-1 COM_FACTOR_2_s (Page 3 of 4)... 8-5 8-1 COM_FACTOR_2_s (Page 4 of 4)... 8-6 9-1 AGA3_CF (Page 1 of 8)... 9-3 9-1 AGA3_CF (Page 2 of 8)... 9-4 9-1 AGA3_CF (Page 3 of 8)... 9-5 9-1 AGA3_CF (Page 4 of 8)... 9-6 9-1 AGA3_CF (Page 5 of 8)... 9-7 9-1 AGA3_CF (Page 6 of 8)... 9-8 9-1 AGA3_CF (Page 7 of 8)... 9-9 9-1 AGA3_CF (Page 8 of 8)... 9-10 10-1 TURB_METER_CF (Page 1 of 5)... 10-3 10-1 TURB_METER_CF (Page 2 of 5)... 10-4 10-1 TURB_METER_CF (Page 3 of 5)... 10-5 10-1 TURB_METER_CF (Page 4 of 5)... 10-6 10-1 TURB_METER_CF (Page 5 of 5)... 10-7 ii November 1997

CG39AGA-1 CONTENTS SIGNIFICANT CHANGES IN REVISION 3 The significant changes in revision 3, which are indicated by change bars located in text page margins, primarily involve the use of COM_FACTOR_2_ blocks and an additional input to the AGA3_CF block to indicate flow conditions measured upstream or downstream. The locations in this configuration guide of information affected by these changes and a brief description of their effect are provided as follows: 4.0 COMPR_FACTOR: Clarified the fact that this block should also be used to calculate compressibility at standard or base conditions if either the COMPR_FACTOR_s or COMPR_FACTOR_b block is not applicable. Changed the value of X for calculating the required number of scans from 20 to 12. Added the output rho for density in lb/cu. ft. 5.0 COMPR_FACTOR_s: Added output rho for density in lb/cu. ft. 6.0 COMPR_FACTOR_b: Added output rho for density in lb/cu. ft. 9.0 AGA3_CF: Revised the value of X for calculating the required number of scans from 25 to 17. Added input of DNSTRM to indicate that the downstream tap is used to measure flowing conditions. Added note to output Cprime that Qb = Cprime* [(Pf*hw)**0.5]. 10.0 TURB_METER_CF: Revised the typical value of X for calculating the required number of scans from 20 to 12. A.0 APPENDIX A - EXAMPLE WITH AGA3 AND COM_FACTOR_2 BLOCKS: Deleted B.0 APPENDIX B - EXAMPLE WITH TURBINE_METER AND COM_FACTOR_2 BLOCKS: Deleted # November 1997 iii

CONTENTS CG39AGA-1 iv November 1997

CG39AGA-1 INTRODUCTION 1.0 INTRODUCTION This document describes the AGA (American Gas Association) Application Library (Version 3.00 or higher) that contains a set of derived function blocks (DFBs) that are pre-configured at the factory to perform AGA natural gas flow calculations. These calculations include those relating to orifice metering, turbine metering, and compressibility factor calculation. The library is in the form of a stand-alone off-line ACM configuration that is part of a system named AGA. The configuration is intended to be opened identically to opening any other off-line database, and the blocks are to be selectively copied from the library configuration and pasted into the user-developed configuration. The library can be used directly from the floppy, or it can be used from a hard disk after first copying the entire library floppy contents onto the hard disk (keep all subdirectories intact). This document describes each block and provides a graphical presentation of each of the blocks in the AGA Application Library (see Figures 1-1 to 1-5). This configuration guide is organized into the following sections: Section 1, Introduction Section 2, AGA3 Section 3, TURBINE_METER Section 4, COMPR_FACTOR Section 5, COMPR_FACTOR_s Section 6, COMPR_FACTOR_b Section 7, COM_FACTOR_2 Section 8, COM_FACTOR_2_s Section 9, AGA3_CF Section 10, TURB_METER_CF 1.1 PRODUCT DESCRIPTION AGA (American Gas Association) natural gas flow calculations are a means to accurately measure the flow of natural gas using a variety of flowmeter types. In a series of different reports, the AGA provides equations for determining the flow rate by use of orifice meters (Report No. 3) and by use of turbine meters (Report No. 7), and for determining the compressibility factor of the gas at various conditions (Report No. 8. Compressibility factors are essential data for the flowmeter equations. These rigorous AGA calculations are November 1997 1-1

INTRODUCTION CG39AGA-1 generally required for custody transfer and accounting purposes. The AGA Library blocks perform the calculations provided in these three AGA reports. Refer to the document AGA Natural Gas Flow Calculations in the APACS Controller (AD39-3, provided with this configuration guide) for application data and additional background information on the AGA calculations. The AGA3 block continuously calculates the volume flow rate of natural gas at base conditions and the composite orifice flow factor for an orifice flow meter with flange taps, in accordance with the factors approach presented in AGA Report No. 3. The TURBINE_METER block continuously calculates the gas volume flow rate at base conditions for an axial-flow gas turbine meter, in accordance with AGA Report No. 7. Both blocks require the determination of gas compressibility factors for flowing and base conditions (and for AGA3 standard conditions). The purpose of the COMPR_FACTOR_ and COM_FACTOR_2_ blocks are to calculate the compressibility factors, in accordance with AGA Report No. 8. The COMPR_FACTOR_ blocks use equations from the AGA Report No. 8 dated December 1985. The COMPR_FACTOR_s block is to be used for AGA standard conditions (14.73 psia, 60EF) and the COMPR_FACTOR_b block is to be used for base conditions. The COMPR_FACTOR_s and the COMPR_FACTOR_b blocks use a simplified equation that is applicable only if the gas composition is at least 80 mol % methane, and the pressure is less than 16 psia. The COMPR_FACTOR block is to be used for flowing conditions and can be copied to use for standard and/or base conditions if the simplified blocks are not applicable. * * The COM_FACTOR_2_ blocks use equations from the November 1992 AGA Report No. 8 (Second Edition, July 1994). The newer equations in the 1992 report were designed to be more accurate than the 1985 equations when the flowing pressure is very high (e.g. 2000 psia). The COM_FACTOR_2_ blocks are much more time-consuming than the older equations, so they should only be used when necessary. The COM_FACTOR_2 block is to be used for flowing and base conditions, and the COM_FACTOR_2_s block is to be used for AGA standard conditions. Both the COMPR_FACTOR_ and COM_FACTOR_2_ sets of blocks have an array input (named x) that is used to enter the gas composition. Each array element is to be the mol fraction of a particular component. The index numbers of each possible component are listed in the documentation for each block. The COMPR_FACTOR_ blocks require a 20-element array for the x input [e.g. x1(1..20)] and have identical component index assignments. The COM_FACTOR_2_ blocks require a 21-element array [e.g. x2(1..21)] and have identical component index assignments. However, the component index assignments for the COM_FACTOR_2_ set are different than index assignments for the COMPR_FACTOR_ set. * * As a convenience, the equations from the AGA3 and COMPR_FACTOR_ blocks have been combined to form the AGA_CF block. Similarly, the TURBINE_METER and COMPR_FACTOR_ blocks have been combined into the TURB_METER_CF block. These blocks use the older compressibility factor equations, and automatically determine if the simplified equations can be applied to standard and/or base conditions. The AGA3_CF block has an input to indicate if the flowing conditions are measured at the upstream or downstream taps. 1-2 November 1997

CG39AGA-1 INTRODUCTION November 1997 1-3

INTRODUCTION CG39AGA-1 1-4 November 1997

CG39AGA-1 INTRODUCTION November 1997 1-5

INTRODUCTION CG39AGA-1 1-6 November 1997

CG39AGA-1 INTRODUCTION November 1997 1-7

INTRODUCTION CG39AGA-1 1.2 PRODUCT SUPPORT Product support can be obtained from the Moore Products Co. Technical Information Center (TIC). TIC is a customer service center that provides direct telephone support on technical issues related to the functionality, application, and integration of all products supplied by Moore Products Co. To contact TIC for support, either call 215-646-7400, extension 4TIC (4842) or leave a message in the bulletin board service (BBS) by calling 215-283-4968. The following information should be at hand when contacting TIC for support: C Caller ID number, or name and company name (When someone calls for support for the first time, a personal caller number is assigned. This number is mailed in the form of a caller card. Having the number available when calling for support will allow the TIC representative taking the call to use the central customer database to quickly identify the caller s location and past support needs.) Product part number, software version, and serial number, all of which are identified on the software s disk label Computer brand name, model number, and hardware configuration (types of disk drives, memory size, video adapter, etc.), if applicable Version number of operating system (e.g. UNIX, OSF/Motif), if applicable If there is a problem with software operation: - The steps performed before the problem occurred - Any error messages displayed It would also be helpful to have the following information: - 4-mation version number - Documentation about your system s architecture For product support outside of North America, an alternative support system is available by contacting the appropriate Moore Products Co. regional location: Australia Moore Products Co. (Australia) Pty. Ltd. Moore Controls Pvt. Limited Tel: (91) (212) 770171 Tel: (61) (2) 9319 4877 Italy Canada Moore Products Co. (Canada) Inc. Moore Products Co. (Italia) S.r.l. Tel: (39) (2) 2940 1094 Tel: (905) 457 9638 Mexico France Factory Systemes Moore Products de Mexico S.A. de C.V. Tel: (52) 5 611 9858; (52) 5 615 1948; Tel: (33) 1 64 61 68 68 (52) 5 615 0262; or (52) 5 615 0238 India 1-8 November 1997

CG39AGA-1 INTRODUCTION The Netherlands South Africa Moore Products Co. B.V. Moore Controls S.A. (Pty) Ltd. Tel: (31) 180 461111 Tel: (27) 11 466 1673/9 Singapore United Kingdom Moore Products Co. (S) Pte. Ltd. Moore Products Co. (U.K.) Ltd. Tel: (65) 299 6051 Tel: (44) (1935) 706262 1.3 RELATED LITERATURE The following Moore Products Co. literature is available for reference: C AGA Natural Gas Flow Calculations in the APACS Controller (AD39-3) C 4-mation 3.XX: - 4-mation User s Manual, Installation and Operation (UM39-6) - 4-mation User s Manual, Function Block Languages (UM39-7) C 4-mation 4.XX: - 4-mation Installation and Operation (UM39-11) - 4-mation Function Block Language (UM39-12) The following vendor literature should be available as needed: Microsoft MS-DOS Operating System Reference Microsoft Windows 3.1 (or later) Operating System Reference # November 1997 1-9

INTRODUCTION CG39AGA-1 1-10 November 1997

CG39AGA-1 AGA3 2.0 AGA3 The derived block AGA3 continuously calculates the volume flow rate of natural gas at base conditions and the composite orifice flow factor for an orifice flow meter with flange taps, in accordance with the factors approach presented in AGA Report No. 3. The composite orifice flow factor C' is updated continuously for temperature effects and periodically for all other effects. The periodic update of C' is triggered by a function block input. Since the C' recalculation requires iteration, it is time-sliced, using a snapshot of the function block inputs and determining a new C' after several controller scans (typically 4 to 5). The volume flow rate (Q v) and C' are first calculated for the standard conditions used in the AGA report (14.73 psia pressure, 60EF temperature), and are then adjusted to the base conditions. Block contents are shown graphically on Figure 2-1. The inputs are: hw = orifice differential pressure (in wc) Pf1 = flowing pressure at upstream tap (psia) Tf = flowing temperature (EF) Zf1 = compressibility at flowing conditions at upstream tap Zs = compressibility at AGA standard conditions of 14.73 psia and 60EF Gr = specific gravity Pb = base pressure (psia) Tb = base temperature (EF) Zb = compressibility at base conditions dr = orifice plate bore diameter at reference temperature (in) Dr = meter tube internal diameter at reference temperature (in) RECALC = rising-edge trigger for the periodic recalculation of part of C' The outputs are: Qb Cprime DONE = volume flow rate at base conditions (SCFH) = composite orifice flow factor C' (SCFH/(((psi)(in wc))**0.5)) = periodic recalculation DONE status Reference: AGA Report No. 3, Orifice Metering of Natural Gas, Part 3, August 1992 (AGA Catalog No. XQ9210). Several assumptions from the AGA3 report are incorporated in this block. If any of these assumptions do not apply, the block may need to be modified. Cross-references to the structured text statements with equations and assumptions from the AGA3 report appear throughout the block. The assumptions are: C P (standard pressure) = 14.73 psia, T (standard temperature) = 60EF, and Z (compressibility of air at s s sair standard conditions) = 0.999590. C The orifice plate material is type 304 or 316 stainless steel, the meter tube material is carbon steel, and Tr (reference temperature for the orifice bore and tube diameters) = 68EF. November 1997 2-1

AGA3 CG39AGA-1 C The nominal pipe size is 2" or larger; the beta is 0.1-0.75, with d larger than 0.45"; and pipe Reynolds number Re is greater than or equal to 4000. C The expansion factor (Y) and absolute flowing pressure (P f) are referenced to the upstream tap (Y 1 and P f1 are used), and 0 < (h w/(27.707*p f)) <= 0.2. Note that P f1 = P f2 + (h w/27.07), where Pf2 is the pressure measured at the downstream tap. C k (isentropic exponent) = 1.3. C mu (dynamic viscosity) = 0.0000069 lb per ft-sec. m Each instance of the AGA3 block occupies approximately 8K of memory. Normal execution time (when C' recalculation is not occurring) is 0.6 ms in an ACM040 (2 ms in an ACM030). During the 4 to 5 recalculation scans, the execution time is 3 ms for an ACM040 (10 ms for an ACM030). # 2-2 November 1997

CG39AGA-1 TURBINE_METER 3.0 TURBINE_METER The derived block TURBINE_METER continuously calculates the gas volume flow rate at base conditions for an axial-flow gas turbine meter, in accordance with AGA Report No. 7. Block contents are shown graphically on Figure 3-1. The inputs are: Qf = volume flow rate (any units) Pf = flowing pressure (psia) Tf = flowing temperature (EF) Zf = compressibility at flowing conditions Pb = base pressure (psia) Tb = base temperature (EF) Zb = compressibility at base conditions The output is: Qb = volume flow rate at base conditions (same as Qf units) Reference: Section 6 of the AGA Turbine Meter Report No. 7, 1985 (AGA Catalog No. XQ0585). Each instance of the TURBINE_METER block occupies approximately 2.3K of memory. The execution time is 0.2 ms in an ACM040 (0.6 ms in an ACM030). # November 1997 3-1

TURBINE_METER CG39AGA-1 3-2 November 1997

CG39AGA-1 COMPR_FACTOR 4.0 COMPR_FACTOR The derived block COMPR_FACTOR calculates the compressibility factor of a natural gas at a given pressure and temperature in accordance with the primary method presented in AGA Report No. 8 (December 1985). The COMPR_FACTOR block is intended to be used for finding the compressibility at flowing conditions (Z f). This block can also be used to calculate the compressibility at standard or base conditions (Z s * or Z b) if the COMPR_FACTOR_s or the COMPR_FACTOR_b block is not applicable. The calculation is to be triggered periodically (via a function block input) and can require more than a minute to complete. Because the calculation is slow, it is time-sliced, using a snapshot of the function block inputs and determining a new Z after the required number of controller scans. The required number of scans depends on the composition of the gas. Use [(# of components)**2 + X] to calculate the required number of scans (a typical value for X is 12). A boolean output is provided to indicate that the calculation is completed. Block * contents are shown graphically on Figure 4-1. The inputs are: x = gas composition as an array x[1..20] (The index of each component follows.) P = pressure (psia) T = temperature (EF) RECALC = rising-edge trigger for the periodic recalculation of the compressibility factor The outputs are: Z Gr DONE rho = compressibility factor = gas relative density (specific gravity) (to be used in the AGA3 calculation if this block is used for standard conditions) = calculation DONE status = density (lb/cu.ft) * Reference: AGA Compressibility and Supercompressibility for Natural Gas Report No. 8, December 1985 (AGA Catalog No. XQ1285). Cross-references to the structured text statements with equations from the AGA8 report appear throughout the block. The index of each component is as follows: 1 = Nitrogen 6 = Methane 11 = n-pentane 16 = n-nonane 2 = Carbon Dioxide 7 = Ethane 12 = i-pentane 17 = n-decane 3 = Hydrogen Sulfide 8 = Propane 13 = n-hexane 18 = Oxygen 4 = Water 9 = n-butane 14 = n-heptane 19 = Carbon Monoxide 5 = Helium 10 = i-butane 15 = n-octane 20 = Hydrogen Each instance of the COMPR_FACTOR block occupies approximately 23K of memory. The execution time during calculation averages 3 ms in an ACM040 (10 ms in an ACM030). November 1997 4-1

COMPR_FACTOR CG39AGA-1 # 4-2 November 1997

COMPR_FACTOR CG39AGA-1 4-6 November 1997

CG39AGA-1 COMPR_FACTOR_s 5.0 COMPR_FACTOR_s The derived block COMPR_FACTOR_s calculates the compressibility factor of a natural gas at standard conditions (Z s), in accordance with the primary method presented in AGA Report No. 8 (December 1985). This block uses a simplified compressibility equation that is valid for a gas mixture that is more than 80 mol percent methane. Standard conditions are assumed to be those identified as standard in the AGA3 report No. 3: 14.73 psia pressure and 60EF temperature. The calculation is to be triggered periodically (via a function block input) and requires several controller scans to complete. Since the calculation is slow, it is time-sliced, using a snapshot of the function block inputs and determining a new Z s after the required number of controller scans. The required number of scans depends on the composition of the gas. Use [(# of components)**2 + 2] to calculate the required number of scans. A boolean output is provided to indicate that the calculation is completed. Block contents are shown graphically on Figure 5-1. The inputs are: x = gas composition as an array x[1..20] (The index of each component follows.) RECALC = rising-edge trigger for the periodic recalculation of the compressibility factor The outputs are: Zs Gr DONE rho = standard compressibility factor = gas relative density (specific gravity) (to be used in the AGA3 calculation) = calculation DONE status = density (lb/cu.ft) * Reference: AGA Compressibility and Supercompressibility for Natural Gas Report No. 8, December 1985 (AGA Catalog No. XQ1285). Cross-references to the structured text statements with equations from the AGA8 report appear throughout the block. The index of each component is as follows: 1 = Nitrogen 6 = Methane 11 = n-pentane 16 = n-nonane 2 = Carbon Dioxide 7 = Ethane 12 = i-pentane 17 = n-decane 3 = Hydrogen Sulfide 8 = Propane 13 = n-hexane 18 = Oxygen 4 = Water 9 = n-butane 14 = n-heptane 19 = Carbon Monoxide 5 = Helium 10 = i-butane 15 = n-octane 20 = Hydrogen Each instance of the COMPR_FACTOR_s block occupies approximately 12K of memory. The execution time during calculation averages 3 ms in an ACM040 (10 ms in an ACM030). # November 1997 5-1

COMPR_FACTOR_s CG39AGA-1 5-2 November 1997

CG39AGA-1 COMPR_FACTOR_b 6.0 COMPR_FACTOR_b The derived block COMPR_FACTOR_b calculates the compressibility factor of a natural gas at base conditions (Z b) in accordance with the primary method presented in AGA Report No. 8 (December 1985). The block uses a simplified compressibility equation that is valid for a gas mixture that is more than 80 mol percent methane and for a base pressure of no greater than 16.0 psia. The calculation is to be triggered periodically (via a function block input) and requires several controller scans to complete. Since the calculation is slow, it is time-sliced, using a snapshot of the function block inputs and determining a new Z s after the required number of controller scans. The required number of scans depends on the composition of the gas. Use [(# of components)**2 + 2] to calculate the required number of scans. A boolean output is provided to indicate that the calculation is completed. Block contents are shown graphically on Figure 6-1. The inputs are: x = gas composition as an array x[1..20] (The index of each component follows.) Pb = base pressure (psia) Tb = base temperature (EF) RECALC = rising-edge trigger for the periodic recalculation of the compressibility factor The outputs are: Zb DONE rho = base compressibility factor = calculation DONE status = density (lb/cu.ft) * Reference: AGA Compressibility and Supercompressibility for Natural Gas Report No. 8, December 1985 (AGA Catalog No. XQ1285). Cross-references to the structured text statements with equations from the AGA8 report appear throughout the block. The index of each component is as follows: 1 = Nitrogen 6 = Methane 11 = n-pentane 16 = n-nonane 2 = Carbon Dioxide 7 = Ethane 12 = i-pentane 17 = n-decane 3 = Hydrogen Sulfide 8 = Propane 13 = n-hexane 18 = Oxygen 4 = Water 9 = n-butane 14 = n-heptane 19 = Carbon Monoxide 5 = Helium 10 = i-butane 15 = n-octane 20 = Hydrogen Each instance of the COMPR_FACTOR_b block occupies approximately 12K of memory. The execution time during calculation averages 3 ms in an ACM040 (10 ms in an ACM030). # November 1997 6-1

COMPR_FACTOR_b CG39AGA-1 6-4 6-2 October 1997

CG39AGA-1 COMPR_FACTOR_b November 1997 6-3

CG39AGA-1 COM_FACTOR_2 7.0 COM_FACTOR_2 The derived block COM_FACTOR_2 calculates the compressibility factor and density of a natural gas at a given pressure and temperature in accordance with the detail characterization method presented in AGA Report No. 8, November 1992 (Second Edition, July 1994). This block is intended to be used for finding the compressibility at flowing conditions (Z f) or at base conditions (Z b). The calculation is to be triggered periodically (via a function block input) and can require several minutes to complete. Since the calculation is slow, it is time-sliced, using a snapshot of the function block inputs and determines a new Z after the required number of controller scans. The required number of scans depends on the composition of the gas and whether the composition has changed. Approximately (47*X + 15) scans are required (if the composition has not changed), and a typical value for X is 5. If the composition has changed, additional (9*N*(N+1)) scans are required, where N is the number of components. A boolean output is provided to indicate that the calculation is completed. Block contents are shown graphically on Figure 7-1. The inputs are: x = gas composition as an array x[1..21] (The index of each component follows.) P = pressure (psia) T = temperature (EF) RECALC = rising-edge trigger for the periodic recalculation of the compressibility factor The outputs are: Z DONE rho = compressibility factor = calculation DONE status = density (lb/cu.ft) Reference: AGA Compressibility Factors of Natural Gas Report No. 8, November 1992 (AGA Catalog No. XQ9212; Second Edition, July 1994). Cross-references to the structured text statements with equations from the AGA8 report appear throughout the block. The index of each component is as follows: 1 = Methane 8 = Hydrogen 15 = n-hexane 2 = Nitrogen 9 = Carbon Monoxide 16 = n-heptane 3 = Carbon Dioxide 10 = Oxygen 17 = n-octane 4 = Ethane 11 = i-butane 18 = n-nonane 5 = Propane 12 = n-butane 19 = n-decane 6 = Water 13 = i-pentane 20 = Helium 7 = Hydrogen Sulfide 14 = n-pentane 21 = Argon November 1997 7-1

COM_FACTOR_2 CG39AGA-1 Each instance of the COM_FACTOR_2 block occupies approximately 17.5K of memory (plus an overhead of 25K for the global variables shared by all of the COM_FACTOR_2 and COM_FACTOR_2_s blocks). The execution time during recalculation averages 2.1 ms in an ACM040 (7 ms in an ACM030) if the composition has not changed, and 3 ms in an ACM040 (10 ms in an ACM030) if the composition has changed. # 7-2 November 1997

CG39AGA-1 COM_FACTOR_2_s 8.0 COM_FACTOR_2_s The derived block COM_FACTOR_2_s calculates the compressibility factor and density of a natural gas at standard conditions (Z s) in accordance with the detail characterization method presented in AGA Report No. 8, November 1992 (Second Edition, July 1994). Standard conditions are assumed to be the conditions used as standard in the AGA3 Report No. 3: 14.73 psia pressure and 60EF temperature. The calculation is to be triggered periodically (via a function block input), and can require several minutes to complete. Since the calculation is slow, it is time-sliced, using a snapshot of the function block inputs and determining a new Z after the required number of controller scans. The required number of scans depends on the composition of the gas and whether the composition has changed. Approximately (47*X + 15) scans are required (if the composition has not changed), and a typical value for X is 3. If the composition has changed, additional (9*N*(N+1)) scans are required, where N is the number of components. A boolean output is provided to indicate that the calculation is completed. Block contents are shown graphically on Figure 8-1. The inputs are: x = gas composition as an array x[1..21] (the index of each component is listed below) P = pressure (psia) T = temperature (EF) RECALC = rising-edge trigger for the periodic recalculation of the compressibility factor The outputs are: Z DONE rho = compressibility factor = calculation DONE status = density (lb/cu.ft) Reference: AGA Compressibility Factors of Natural Gas Report No. 8, November 1992 (AGA Catalog No. XQ9212; Second Edition, July 1994). Cross-references to the structured text statements with equations from the AGA8 report appear throughout the block. The index of each component is as follows: 1 = Methane 8 = Hydrogen 15 = n-hexane 2 = Nitrogen 9 = Carbon Monoxide 16 = n-heptane 3 = Carbon Dioxide 10 = Oxygen 17 = n-octane 4 = Ethane 11 = i-butane 18 = n-nonane 5 = Propane 12 = n-butane 19 = n-decane 6 = Water 13 = i-pentane 20 = Helium 7 = Hydrogen Sulfide 14 = n-pentane 21 = Argon November 1997 8-1

COM_FACTOR_2_s CG39AGA-1 Each instance of the COM_FACTOR_2_s block occupies approximately 17.5K of memory (plus an overhead of 25K for the global variables shared by all of the COM_FACTOR_2 and COM_FACTOR_2_s blocks). The execution time during recalculation averages 2.1 ms in an ACM040 (7 ms in an ACM030) if the composition has not changed, and 3 ms in an ACM040 (10 ms in an ACM030) if the composition has changed. # 8-2 November 1997

CG39AGA-1 AGA3_CF 9.0 AGA3_CF The derived block AGA3_CF is a combination of the AGA3 block and the COMPR_FACTOR_ blocks. This block continuously calculates the volume flow rate of natural gas at base conditions and the composite orifice flow factor for an orifice flowmeter with flange taps, in accordance with the factors approach presented in AGA Report No. 3. The composite orifice flow factor C' is updated continuously for temperature effects and periodically for all other effects. The periodic update of C' is triggered by a function block input. The first part of the block calculates the compressibility factors of a natural gas at the pressure and temperature values corresponding to flowing conditions (Z f), AGA standard conditions (Z s), and base conditions (Z ). The compressibility factors are calculated in accordance with the primary method presented b in AGA Report No. 8 (December 1985) and are used by the second part of the block for the periodic recalculation of C'. AGA standard conditions are presented in the AGA3 report as 14.73 psia pressure and 60E F temperature. The simplified method presented in the AGA8 report is used for the Z s and Z b calculation if the gas mixture is more than 80 mol percent methane. Also, for Z, the base pressure must be less than 16 b psia. Since the periodic C' recalculation and the associated compressibility factor calculations require iteration and are time-consuming, the calculations are time-sliced, using a snapshot of the function block inputs and determining a new C' after several controller scans. The required number of scans for the periodic update depends on the composition of the gas. Use [(# of components)**2 + X] to calculate the required number of scans (typical value for X is 17). A boolean output is provided to indicate that the C' recalculation is * completed. Block contents are shown graphically on Figure 9-1. The inputs are: hw = orifice differential pressure (in wc) Pf = flowing pressure (psia) Tf = flowing temperature (EF) DNSTRM = indication that the downstream tap is used to measure the flowing conditions (FALSE * = upstream tap; TRUE = downstream tap) * Pb = base pressure (psia) Tb = base temperature (EF) dr = orifice plate bore diameter at reference temperature (in) Dr = meter tube internal diameter at reference temperature (in) x = gas composition (mol fractions) as an array x[1..20] (The index of each component follows.) CHNG_x = status indicating that the gas composition has changed (used when the periodic recalculation is triggered to indicate that Z s and/or Z b must be recalculated) RECALC = rising-edge trigger for the periodic recalculation of part of C' November 1997 9-1

AGA3_CF CG39AGA-1 The outputs are: * Qb Cprime DONE = volume flow rate at base conditions (SCFH) = composite orifice flow factor C' (SCFH/(((psi)(in wc))**0.5)) Note that Qb = Cprime* [(Pf*hw)**05]. = periodic recalculation DONE status References: AGA Report No. 3, Orifice Metering of Natural Gas, Part 3, August 1992 (AGA Catalog No. XQ9210). AGA Compressibility and Supercompressibility for Natural Gas Report No. 8, December 1985 (AGA Catalog No. XQ1285). The index of each component is as follows: 1 = Nitrogen 6 = Methane 11 = n-pentane 16 = n-nonane 2 = Carbon Dioxide 7 = Ethane 12 = i-pentane 17 = n-decane 3 = Hydrogen Sulfide 8 = Propane 13 = n-hexane 18 = Oxygen 4 = Water 9 = n-butane 14 = n-heptane 19 = Carbon Monoxide 5 = Helium 10 = i-butane 15 = n-octane 20 = Hydrogen Cross-references to the structured text statements with equations from the AGA8 report appear throughout the first part of the block. Several assumptions from the AGA3 report are incorporated in this block. If any of these assumptions do not apply, the block may need to be modified. Cross-references to the structured text statements with equations and assumptions from the AGA3 report appear throughout the second part of the block. The assumptions are: C P (standard pressure) = 14.73 psia, T (standard temperature) = 60EF, and Z (compressibility of air at s s sair standard conditions) = 0.999590. C The orifice plate material is type 304 or 316 stainless steel. The meter tube material is carbon steel. Tr (reference temperature for the orifice bore and tube diameters) = 68EF. C The nominal pipe size is 2" or larger. The beta is 0.1-0.75, with d larger than 0.45". Pipe Reynolds number Re is greater than or equal to 4000. * C 0 < (h w/(27.707*p f)) <= 0.2. C k (isentropic exponent) = 1.3. C mu (dynamic viscosity) = 0.0000069 lb per ft-sec. m Each instance of the AGA3_CF block occupies approximately 45K of memory. Normal execution time (when C' recalculation is not occurring) is 0.6 ms in an ACM040 (2 ms in an ACM030). During C' recalculation, the execution time is 3 ms for an ACM040 (10 ms for an ACM030). # 9-2 November 1997

CG39AGA-1 TURB_METER_CF 10.0 TURB_METER_CF The derived block TURB_METER_CF is a combination of the TURBINE_METER block and the COMPR_FACTOR_ blocks. This block continuously calculates the volume flow rate of natural gas at base conditions for an axial-flow gas turbine meter, in accordance with AGA Report No. 7. The first part of the block periodically calculates the compressibility factors of a natural gas at the pressure and temperature values corresponding to flowing conditions (Z f) and base conditions (Z b). The compressibility factors are calculated in accordance with the primary method presented in AGA report No. 8 (December 1985) and are used by the second part of the block for the flow calculation. The periodic update of the compressibility factors is triggered by a function block input. Since the periodic compressibility factor calculations require iteration and are time-consuming, the calculations are time-sliced, using a snapshot of the function block inputs and determining the compressibility factors after several controller scans. The required number of scans for the periodic update depends on the composition of the gas. Use [(# of components)**2 + X] to calculate the required number of scans (a typical value for X is 12). A boolean output is provided to indicate that the compressibility factor recalculation is completed. Block contents are shown graphically on Figure 10-1. The inputs are: Qf = volume flow rate (any units) Pf = flowing pressure (psia) Tf = flowing temperature (E F) Pb = base pressure (psia) Tb = base temperature (E F) x = gas composition (mol fractions) as an array x[1..20] (The index of each component follows.) CHNG_x = status indicating that the gas composition has changed (used when the periodic recalculation is triggered to indicate that Z b must be recalculated) RECALC = rising-edge trigger for the periodic recalculation of the compressibility factors The outputs are: Qb DONE = volume flow rate at base conditions (same units as Qf) = periodic compressibility factor recalculation DONE status References: Section 6 of the AGA Turbine Meter Report No. 7, 1985 (AGA Catalog No. XQ0585). AGA Compressibility and Supercompressibility for Natural Gas Report No. 8, December 1985 (AGA Catalog No. XQ1285). November 1997 10-1

TURB_METER CG39AGA-1 The index of each component is as follows: 1 = Nitrogen 6 = Methane 11 = n-pentane 16 = n-nonane 2 = Carbon Dioxide 7 = Ethane 12 = i-pentane 17 = n-decane 3 = Hydrogen Sulfide 8 = Propane 13 = n-hexane 18 = Oxygen 4 = Water 9 = n-butane 14 = n-heptane 19 = Carbon Monoxide 5 = Helium 10 = i-butane 15 = n-octane 20 = Hydrogen Cross-references to the structured text statements with equations from the AGA8 report appear throughout the first part of the block. In the second part of the block, the cross-references provided are to the AGA7 report. Each instance of the TURB_METER_CF block occupies approximately 31K of memory. Normal execution time (when C' recalculation is not occurring) is 0.4 ms in an ACM040 (1.2 ms in an ACM030). During compressibility factor recalculation, the execution time averages 3 ms in an ACM040 (10 ms in an ACM030). # 10-2 November 1997