Вы находитесь на странице: 1из 18

INSTRUCALC AGA FLOW ORIFICE PLATES.

GAS AND LIQUID FLOW AGA Help Contents This is a program for calculating the size of orifice plates in accordance with AGA Report #3 For help on each screen: Press F1. Help Contents Program Overview Program Features Calculation Menu Program Lead Sheet Orifice Size Calculation for liquids Calculation Engineering Units for liquids Orifice Material selection Calculation Printout Preparing an Orifice Data Sheet Orifice Size Calculation for Gases Orifice Summary Printout Calculation Engineering Units for Gases Calculation Routines Program File Data Specification Importing Data into a Calculation Meter Tube Size.Data File AGA Orifice Plates -- Program Overview Version 5. An option has been added to calculate the system losses from a known source pressure to provide the flow element inlet pressure. The accuracy of this pressure has a considerable impact on the accuracy of the flow measurement. To use the pressure in the vessel which is the source of the flow can cause considerable error because of head and system losses. The fluid density of gases vary considerably with pressure and liquids may have vapor pressure problems or require a specific gravity correction for pressure. An orifice plate is a circular flat plate which is inserted between flanges to measure flow in pipelines. It has a precision bored hole in its center which causes a pressure drop.. Bernoulli in 1738 determined that flow rate was proportional to the square root of pressure drop These programs determine the relationship between the flow rate, the pressure drop and the size of the hole. The programs are based on the American Gas Association 1990 Report Number 3. "Orifice Metering of Natural Gas and Other Related Hydrocarbon Fluids" They are suitable for use with all gaseous and liquid fluids that are clean, single phase, homogenous and Newtonian. All gases, most liquids and most dense phase fluids associated with the petroleum petrochemical and natural gas industries are Newtonian.

The user should be aware of the report's design, application and limitations' requirements in order for the uncertainty percentage calculation to be applicable. AGA sets the following limits for an approved calculation -The pipe size must be greater then 2 inch schedule 160 The orifice bore must be larger than .45 inches The beta ratio must be between 0.1 and 0.75 The pipe Reynolds Number must be greater than 4000 The AGA report is extracted from a new data base. This data base contained new information for flange, radius and corner pressure taps. Programs are provided for all of the taps. Only the flange taps are recognized by AGA, the other programs will provide increased accuracy over the ISO programs. General If changes are made to data recalled from file, the data will be displayed in the color selected for changed data. This will assist in recognizing the affect the changes make to other calculations and the data sheet. Program Features Perform sizing calculations Calculate either.-- Orifice size, Flow rate or Differential range Calculate vent or drain hole size if required Calculate the minimum plate thickness Calculate permanent pressure and power loss Calculate accuracy uncertainty percentage Supply fluid properties at flow conditions Supply steam data Supply pipe sizes Provide material selection Use English or SI engineering units in any mixture Use mass or volume flow units Import process data Print a calculation sheet using the Windows Print Manager Save the data Prepare instrument data sheets WUSIWUG style Initially general- sheets for bid purposes Supply data base of standard specification items After vendor selection, revise for permanent records Print a data sheet using the Windows Print Manager Save the data Print a summary of saved records Print all records Print selected records Print only records having required characteristics AGA Program Menu Options

New calculation Select the required calculation option and the fluid option, then select OK (or double-click if at least one of the options is already selected). File Default files Recalls file data using the files in the default drives and paths. Other files Recalls file data using the Windows file selection procedure. Data file maintenance Edit Tag Numbers Provides the facility to change the Tag Numbers on file. Or delete records from file. Sort data file Rearrange the Tag Numbers in ascending order. Delete the items marked if the edit was saved. (Version 5.0)Data files Path for the default calculation data files. User units Path for the user selection set of engineering units. Headings Path for the printout headings. There are three paths. If a Drive and Path different from the Default Path and Drive provided in the initial Set Up Procedure was used, the program will update them to the Drive and Path which was installed. They are saved in sequential file AGACALC.DRV which resides with the programs. To check or change the paths, either call up the Drive and Path for edit or use a text editor to or change the file contents. Convert V3 file stage 2 InstruCalc version 3 file conversion to Windows format. Exit Exits from InstruCalc to Windows Program Manager. Edit Tables (Version 5.0) InstruCalc uses Data Tables for Gas, Liquid,Pipe Size and Material properties, these contain data from which exact properties for the flow conditions are calculated. It also has tables for equipment data. These option provides an easy means of customizing them. Items can be added, inserted, deleted and changed. Restrictions are built into the Materials Coefficient of Expansion table on insertion and deletion because the row number is used to save data in the calculations. Each program can edit the tables used in the program. Take note that some, such as the Gas, Liquid and Pipe Size are used by other programs and may include data required only by them. Editing is performed by either clicking the appropriate line in the Grid or entering the line number in Row to Edit and clicking Recall Row. Edit the data and Load

Row to the Grid. When a box in the edit line is clicked, information on the data required is displayed above. Save Grid overwrites the old file. A backup file is recommended before you start. The file name is in the heading of the Edit Form and the files are in the program directory. Note that data cannot be edited directly in the grid. Color Provides color options for InstruCalc displays, using the Windows palette. Note that colors for scroll bars, command buttons, disabled text, borders etc., are selected through the Windows Control Panel Print Summary Goes to the print summary program. AGA Orifice Size Liquid Calculation. Version 5. Option added. If the exact inlet pressure is not known, but a source pressure is known then use the option to calculate the flow element inlet pressure. First use an approximate inlet pressure and calculate the flow element to set up the variables, take the option and calculate the system losses, three cases are available. Transfer the selected case to the flow element calculation, re-select the fluid properties and recalculate the flow calculation. Light hyrocarbons may require a specific gravity correction. Volatile liquids may have a vapor pressure problem. Engineering Units. There are four standard unit sets and one user selected set available -Mass Flow - English units. Pounds per hour and degrees Fahrenheit. Volume Flow - English Units. US gallons per minute and degrees Fahrenheit. Mass Flow - SI Units. Kilograms per second and degrees Centigrade. Volume Flow - SI Units. Litres per second and degrees Centigrade. User Units. A set of units selected from the Liquid Flow Engineering Unit screen. To make or change a User Unit set select the option Review units. The Liquid Flow Engineering Unit screen will be displayed. It shows the available options and the current unit selection. Select the required units and save the User file. Unit Selection. A new calculation loads the default units, which can be any of the five available options. It is set up by selecting the required units under the Engineering Units menu, then going back into the same menu and saving it as the default. Two defaults are available, one for liquids, set in the liquid calculation and one for gas, set in the gas calculation. If process data is downloaded to a calculation which is displaying the wrong units, any of them can be overwritten with any of the five standard unit options without converting any of the data. To do this, under the Engineering Units menu, select the option Change units, no conversion , this will then allow one selection from the menu without conversion and then revert to normal operation.

The Unit Selection can be made at any time. The input data will be converted to the new units. If a volumetric flow unit set is selected and the specific gravity at base conditions is not available the flow is set to zero. Units for any individual input entry can be changed by the selecting the Review Units option and choosing from the Liquid Flow Engineering Unit screen. Base Conditions. The Base Conditions option will display the current values of base pressure, base temperature, barometric pressure and calibration temperature. They should be checked and modified and saved to suit the operating conditions. AGA specifies a base pressure of 14.73 psia for natural gas, 14.696 for liquids with a vapor pressure equal or less than one atmosphere, and a base temperature of 60 degF. Fluid Properties. The Fluid properties option is enabled when the pressure and temperature are entered. The properties required for a calculation are available for pure liquids and mixtures and are provided in the selected units. Caution should be used for mixtures of dissimilar fluids because the mixture law may not apply. For a pure liquid find the name and select (or double-click) the name, the fluid properties will be entered. For a mixture select the first component. In the component box, enter the percentage. Continue until the remaining percentage equals zero, then select calculate in the component box and the program will calculate and enter the mixture values. The fluid properties data base can be user maintained. Calculation options are -Orifice size. Flowrate. Differential Range. Select the calculation option and the necessary input data is enabled. The required variable will be disabled and will receive the calculated value. Vent and Drain Hole option. Options provide the for automatic selection of the recommended hole size or the input of a user size. Either a vent hole, a drain hole, both or neither can be selected. Both are the same size. If the flowing liquid contains gas bubbles, a vent hole will enable them to pass the orifice plate. If the line needs to be drained a drain hole can be provided The hole size will be compensated for in the calculation. Meter tube ID. To look up the pipe dimensions, click the meter tube button. The pipe sizes screen will be displayed. Enter the nominal pipe size. Click the Search button to display the available sizes. Select the required inside diameter(Double-click or click OK). Material Selection. Select the Element material to display the materials screen. On the materials screen, select the required material.

Repeat for the Meter tube material. Input Data The options selected enable the input boxes of the data required for the calculation and disable the input boxes for the calculated outputs and the data not required. The maximum flow rate is the upper range value. The normal flow will be the point of greatest accuracy. Specific gravity at base conditions is only required for volumetric flow. Calculate Click the Calculate button. The program will validate the input data. If not valid it will display the unsatisfactory data. If valid it will -Calculate the output data. Display the results. Enable the calculation printout. Enable the data sheet option. Calculation Results The output data should be examined for adequacy. Best accuracy is for beta ratio in the area of 0.55. Change data as required and recalculate. The plate thickness is the recommended minimum. Filing and Moving On The options in the File menu are -Program menu -- Clears the calculation and returns to the main menu. Prepare data sheet --Is enabled after a calculation is made, it displays the screen to prepare a data sheet form for the calculated item. New - Clears the screen for a new calculation. Save - Using the default path, it saves a new record if not previously saved or saves changes to an existing record. Save New.-.Using the default path, it saves an existing record as a new record ( Used to duplicate similar items. i.e. Recall an existing record. Edit as required and Save New) Save As.... - Uses the Windows file access system. Saves to a file anywhere. Import data - Select the units and read Input data supplied in sequential files. File default path - Changes the default paths for the calculation records The default paths are -The Data Files. (AGADAT.TAG and AGADAT.DAT). The User Unit Files. (AGADAT.UNS). The Printout Headings File (HEADINGS.DAT). Print calculation - Is enabled after a calculation is made. It displays the screen to print a calculation. Exit -- Leaves the program and returns to the Windows Program Manager. AGA Liquid Engineering Units

The screen shows the process variables used in a liquid calculation and list the available options. To assure full coverage each (Except Flow Time Base) has an Other option. This is a user defined unit. Double click the option and it will display the name and multiplier to convert it to the standard units. The standard unit is always the first item in the list. The screen shows the current selection. Any unit may be chosen and will be used in the calculation if OK is selected. To create a User File for the User File Unit option in the calculation, select the desired units and click the save button A double click on any unit option selects that option and returns to the calculation. Data conversion For all items except flow, the unit change represents only a multiplier to convert the input data and the data is always converted. The Flow Quantity option has Mass and Volume options. The relationship between mass flow and volume flow is a multiplier and the specific gravity of the fluid. It is conventional when measuring flow by volume that it be at a standard temperature (Usually 60 degrees Fahrenheit). Two specific gravity values are necessary for a volumetric flow calculation, mass flow cannot be converted to volume flow until the specific gravity at standard conditions is available. Conversion factors and units are based on API 2564 Definition of units Mass flow units : lb = pounds kg = kilograms tonne = 1000 kg = 1Mg g = gram UKton = 2240 lb USton = 2000 lb Other = user defined mass unit Volume flow units : USgal = US gallons litre = litres ft3 = cubic feet UKgal = UK gallons m3 = cubic metres bbl = barrels (42 US gallons) cm3 = cubic centimetres Other = user defined volumetric unit Flow time base : /s = per second /m = per minute /h = per hour /d = per day Gauge pressure : psig = pounds per square inch gauge

kPag = kiloPascals gauge atg = atmospheres gauge inhgg = inches of mercury gauge MPag = megaPascals gauge inH2Og = inches of water gauge mmhgg = millimetres of mercury gauge barg = bars gauge kg/cm2g = kilograms per square centimetre gauge Other = user defined gauge pressure unit Absolute pressure : psia = pounds per square inch absolute kPaa = kiloPascals absolute inhga = inches of mercury absolute mmhga = millimetres of mercury absolute Other = user defined absolute pressure unit Temperature : degF = degrees Fahrenheit degF = degrees Centigrade degR = degrees Rankine degK = degrees Kelvin Other = user defined temperature unit Viscosity : cp = centipoises kPa.s = kiloPascal seconds Other = user defined viscosity unit Differential pressure : inH2O = inches of water kPa = kiloPascals inhg = inches of mercury mmH2O = millimetres of water mBar = millibars Other = user defined differential Pipe and orifice diameter : in = inches mm = millimetres cm = centimetres ft = feet m = metres Other = user defined size AGA Material Selection The Drop Down Menu displays the material options. The temperature thermal expansion coefficients are selected with the material. AGA requires a thermal correction for both pipe and orifice plate Either make a new selection (Double click or click then click OK). Or click Cancel to return with no change

The program will return to the calculation AGA Calculation Data Printout This program will print the input and output calculation data and one associated comment. The comment is included in the data sheet for reference purposes It also creates the default printout headings. The headings are printed at the top of all printouts. They are saved in the HEADINGS.DAT file. This is the third default path. If all programs are set to the same path, this becomes the default headings for all program printouts Save. Saves the headings Cancel. Returns to the calculation form without printing OK. Prints the headings and calculation using the Windows Print Manager, then returns to the calculation form AGA Gas Engineering Units The screen shows the process variables used in a liquid calculation and list the available options. To assure full coverage each (Except Flow Time Base) has an Other option. This is a user defined unit. Double click the option and it will display the name and multiplier to convert it to the standard units. The standard unit is always the first item in the list. The screen shows the current selection. Any unit may be chosen and will be used in the calculation if OK is selected. To create a User File for the User File Unit option in the calculation, select the desired units and click the save button A double click on any unit option selects that option and returns to the calculation. Data Conversion For all items except flow, the unit change represents only a multiplier to convert the input data and the data is always converted. The Flow Quantity option has Mass and Volume options. The relationship between mass flow and volume flow is a multiplier and the molecular weight of the gas, conversion can only be made when the molecular weight has been entered. Conversion factors and units are based on API 2564 Definition of units Mass flow units : lb = pounds kg = kilograms tonne = 1000 kg = 1Mg g = gram UKton = 2240 lb USton = 2000 lb Other = user defined mass unit

Volume flow units : sft3 = standard cubic feet sdm3 = standard cubic decimetres sm3 = standard cubic metres Msft3 = million standard cubic feet Other = user defined volume unit Time base : /s = per second /m = per minute /h = per hour /d = per day Gauge pressure : psig = pounds per square inch gauge kPag = kiloPascals gauge atg = atmospheres gauge inhgg = inches of mercury gauge MPag = megaPascals gauge inH2Og = inches of water gauge mmhgg = millimetres of mercury gauge barg = bars gage kg/cm2g = kilograms per square centimetre gauge Other = user defined gauge pressure unit Absolute pressure : psia = pounds per square inch absolute kPaa = kiloPascals absolute ata = atmospheres absolute bara = bars absolute Mpaa = megaPascals absolute kg/cm2a = kilograms per square centimetre absolute inhga = inches of mercury absolute mmhga = millimetres of mercury absolute Other = user defined absolute pressure unit Temperature : degF = degrees Fahrenheit degF = degrees Centigrade degR = degrees Rankine degK = degrees Kelvin Other = user defined temperature unit Viscosity : cp = centipoises Pa.s = Pascal seconds cs = centistokes kPa.s = kiloPascal seconds Other = user defined viscosity unit Differential pressure :

inH2O = inches of water kPa = kiloPascals inhg = inches of mercury mmH2O = millimetres of water mBar = millibars Other = user defined differential Pipe and orifice diameter : in = inches mm = millimetres cm = centimetres ft = feet m = metres Other = user defined size Density lb/ft3 = pounds per cubic foot kg/m3 = kilograms per cubic metre g/cm3 = grams per cubic centimetre lb/in3 = pounds per cubic inch Other = user defined density unit

Data Files INSTRUCALC V4 Random access file specification for AGA flow elements AGADAT.Dat. Tag Numbers are stored in the sequential file AGADAT.TAG. Its number in the file is the record number in the random access file. ________________________________________________________________ Type FileData Calculation info ProgNum As Integer 2 bytes.Program number Liq<4:Gas>20 ElemMatlNom As Integer 2 bytes.Element material number PipeMatlNum As Integer 2 bytes Pipe material FloBasis As String * 3 3 bytes."Mas" denotes a mass calculation, "Vol" a volume Vent As String * 3 3 bytes Byte 1 Y=Standard hole size, C=Custom hole size Byte 2 V= Vent hole required, N=Vent not required

Byte 3 required FS(1 To 15) As Single

D=Drain hole required, N=Drain not

60 bytes.Units conversion factor

GS(1 To 20) As Single 80 bytes.(1-15) UnS(1 To 15) As String * 8 120 bytes.Unit Name 'Data sheet info SdS(1 To 7) As Single 28 bytes. AraS(1 To 16) As String * 25 400 bytes.Data sheet array selections Txt1(1 To 3) As String * 25 75 bytes.Data sheet service,line num, fluid Txt2(1 To 3) As String * 60 180 bytes.Data sheet notes TXT3(1 To 7) As String * 10 70 bytes.Data sheet num,spec,rev,date,req,by,appr End Type Record len=1025 __________________________________________ All Elements ElemMatlNom and PipeMatlNum If material number = 1 Then Material = "301 stainless steel" If material number = 2 Then Material = "304 stainless steel" If material number = 3 Then Material = "310 stainless steel" If material number = 4 Then Material = "316 stainless steel" If material number = 5 Then Material = "330 stainless steel" If material number = 6 Then Material = "347 stainless steel" If material number = 7 Then Material = "Aluminum bronze" If material number = 8 Then Material = "Beryllium copper" If material number = 9 Then Material = "Carbon steel" If material number = 10 Then Material = "Copper" If material number = 11 Then Material = "Cupronickel" If material number = 12 Then Material = "Hastelloy B" If material number = 13 Then Material = "Hastelloy C" If material number = 14 Then Material = "Haynes stellite 25" If material number = 15 Then Material = "Inconel X" If material number = 16 Then Material = "K - Monel" If material number = 17 Then Material = "Nickel" If material number = 18 Then Material = "Pyrex glass" If material number = 19 Then Material = "Tantalum" If material number = 20 Then Material = "Titanium" FloBasis "Mas" denotes a mass calculation, "Vol" a volume _____________________________________________ Liquid _____ - AGA - Liquid" If ProgNum = 3 Then Program = "Concentric Orifice Plate - Corner taps - If ProgNum = 1 Then Program = "Concentric Orifice Plate - FlangeTaps - AGA Liquid"

If ProgNum = 2 Then Program = "Concentric Orifice Plate - D and D/2 taps AGA Liquid" GS(1) = Maximum flow FS(1) UnS(10 GS(2) = Flow temperature UnS(2) GS(3) = Inlet pressure FS(3) UnS(3) GS(4) = Differential range FS(4) UnS(4) GS(5) = Specific gravity at flow conditions GS(6) = Specific gravity at standard conditions GS(7) = Viscosity FS(7) UnS(7) GS(8) = Pipe inside diameter FS(8) UnS(8) GS(12) = Orifice size FS(12) UnS(12) GS(13) = Base pressure FS(13) UnS(13) GS(14) = Base temperature UnS(14) GS(15) = Barometric pressure FS(15) UnS(15) GS(16) = Calibration temperature UnS(14) GS(18) = Normal flow FS(1) UnS(1) GS(19) = Drain hole size FS(12) UnS(12) SDS(1) = Normal flow differential FS(4) UnS(4) SDS(3) = Plate thickness FS(12) UnS(12) SDS(4) = Beta ratio SDS(5) = Chart multiplier _________________________________________ Gas ___ If ProgNum = 21 Then Program = "Concentric Orifice Plate - FlangeTaps - AGA Gas" If ProgNum = 22 Then Program = "Concentric Orifice Plate - D and D/2 taps - AGA - Gas" If ProgNum = 23 Then Program = "Concentric Orifice Plate - Corner taps - AGA Gas" GS(1) = Maximum flow GS(2) = Flow temperature GS(3) = Inlet pressure GS(4) = Differential range GS(5) = Molecular weight GS(6) = Ratio of specific heats GS(7) = Viscosity GS(8) = Pipe inside diameter GS(9) = Density GS(10) = Critical pressure GS(11) = Critical temperature GS(12) = Orifice size GS(13) = Base pressure GS(14) = Base temperature FS(1) UnS(1) UnS(2) FS(3) UnS(3) FS(4) UnS(4) FS(7) UnS(7) FS(8) UnS(8) FS(9) UnS(9) FS(10) UnS(10) UnS(11) FS(12) UnS(12) FS(13) UnS(13) UnS(14)

GS(15) = Barometric pressure FS(15) UnS(15) GS(16) = Calibration temperature UnS(14) GS(18) = Normal flow FS(1) UnS(1) GS(19) = Drain hole size FS(12) UnS(12) SDS(1) = Normal flow differential FS(4) UnS(4) SDS(3) = Plate thickness FS(12) UnS(12) SDS(4) = Beta ratio SDS(5) = Chart multiplier _______________________________________ Miscellaneous Files AGADAT.UNS Sequential file. User unit data AGADAT.STP Sequential file. Base conditions AGASPEC.TXT Sequential file. Data sheet item selections HEADINGS.DAT AGASUM.DAT AGACALC.DRV AGACALC.COL Sequential file. Printout titles Sequential file. Standard summary selections Sequential file. Default drives and paths Sequential file. Color selections

AGA Import Orifice Process Data To Import process data into a calculation Make a sequential file for each calculation. Files to have a filename(Suggest the tag number) with no extension (ie FE-100.). After INSTRUCALC reads the file it will rename the file to "FILENAME.OK". This will divide the files into two lists, those which have been processed and those which have not. To read a file. 1. Go to the required calculation and select the matching units. 2. Take the Import data menu option. 3. Find the required file. (Using standard Windows procedures) 4. Select the file and the data will be loaded. 5. Proceed with the calculation and save the data. (Now in the INSTRUCALC file) 6. The sequential file will be assigned the extension ".OK". and will disappear from the list. 7. If a review is required, use the Windows file procedures for files with an extension ".OK" 8. Revised process data should be provided without extensions. (The Instrument engineer will then have an instant review of work not yet performed.) Data input sequential file requirements (In input order) __________________________________ Gas Flow elements Variable name

1 Tag number (Seq file) 2 Fluid name Txt1(3) 3 Maximum flow G(1) 4 Normal flow G(18) 5 Temperature G(2) 6 Inlet pressure G(3) 7 Barometric pressure G(15) 8 Differential range G(4) 9 MW G(5) 10 Cp/Cv G(6) 11 Viscosity G(7) 12 Pipe size G(8) 13 Density G(9) 14 Critical pressure G(10) 15 Critical temperature G(11) 16 Line number Txt1(2) 17 Service Txt1(1) __________________________________ Liquid flow elements Variable name 1 Tag number (Seq file) 2 Fluid name Txt1(3) 3 Maximum flow G(1) 4 Normal flow G(18) 5 Temperature G(2) 6 Inlet pressure G(3) 7 Barometric pressure G(15) 8 Differential range G(4) 9 SG @ FTP G(5) 10 SG@ Base G(6) 11 Viscosity G(7) 12 Pipe size G(8) 13 Line number Txt1(2) 14 Service Txt1(2) AGA Meter Tube Data The meter tube is the straight sections of pipe, upstream and downstream of the orifice plate, as specified in AGA Report No.3, part 2. The meter tube inside diameter is the inside diameter of the upstream section of the meter tube measured at a temperature of 68degF as specified by report No.3, part 2. Intitially, in most cases, the meter tube is not available and the standard size is used. This is available in a program look-up table. To find the size, select the meter run size button to display the pipe size screen, enter the nominal size of the pipe and select the search button. The available wall thickness and the

corresponding inside diameters for the nominal size are displayed. Select the required size and it will be downloaded to the calculation. When the meter tube becomes available, measure the inside diameter and back-calculate either the amended flow rate or differential pressure. Metric dimensions are in millimeters and nominal sizes are base on 25 mm per nominal inch. If units other than inches or millimeters are used, the data transfered back to the calculation will be converted to the calculation units.