Gas Flow Measurement Software A Report for



Similar documents
FLOW MEASUREMENT 2001 INTERNATIONAL CONFERENCE DERIVATION OF AN EXPANSIBILITY FACTOR FOR THE V-CONE METER

Grant Agreement No SFERA. Solar Facilities for the European Research Area SEVENTH FRAMEWORK PROGRAMME. Capacities Specific Programme

Michael Montgomery Marketing Product Manager Rosemount Inc. Russ Evans Manager of Engineering and Design Rosemount Inc.

Theory overview of flow measurement using differential pressure devices based on ISO-5167 standard.

Custody Transfer Measurement. with the V-Cone Flowmeter

HEAVY OIL FLOW MEASUREMENT CHALLENGES

Valve Sizing. Te chnic al Bulletin. Flow Calculation Principles. Scope. Sizing Valves. Safe Product Selection.

BASIC UNDERSTANDING OF FLOW CALCULATIONS AND ESTIMATES MAKES SIZING VALVES SIMPLER

Examination syllabuses for Manual Stack emissions monitoring. Environment Agency Version 9 January 2015

Net-Pipe: Hydraulic Analysis of Flow in Liquid Pipe Networks

Aeration Air & Digester Gas Flow Metering Using Thermal Mass Technology. HWEA 2011 Conference Craig S. Johnson

RITTER Multiple Sonic Nozzle Calibration System

FLUID FLOW Introduction General Description

191: Calibration and Standards in Flow Measurement. Richard Paton National Engineering Laboratory, Scotland, UK 1 GENERAL PRINCIPLES

INTRODUCTION TO FLUID MECHANICS

Chapter 10. Flow Rate. Flow Rate. Flow Measurements. The velocity of the flow is described at any

Advances in Thermal Dispersion Mass Flow Meter Accuracy

Flow System Calibration in Medical and Bio-medical Production Processes.

THE HUMIDITY/MOISTURE HANDBOOK

FUNDAMENTALS OF ENGINEERING THERMODYNAMICS

OVERVIEW. Toolbox for Thermodynamic Modeling and Simulation with MATLAB /Simulink. Key Features:

Testing methods applicable to refrigeration components and systems

THEORETICAL UNCERTAINTY OF ORIFICE FLOW MEASUREMENT page 1 THEORETICAL UNCERTAINTY OF ORIFICE FLOW MEASUREMENT INTRODUCTION COEFFICIENT OF DISCHARGE

Take total control of your HVAC system with cost-saving flow and thermal energy meters

User s Manual Laminar Flow Elements

A drop forms when liquid is forced out of a small tube. The shape of the drop is determined by a balance of pressure, gravity, and surface tension

PSAC/SAIT Well Testing Training Program Learning Outcomes/Objectives Level B

ENHANCEMENTS AND NEW FUNCTIONS IN CONVAL 9

OIL & GAS PRODUCTION AUDITING

APPLIED THERMODYNAMICS TUTORIAL 1 REVISION OF ISENTROPIC EFFICIENCY ADVANCED STEAM CYCLES

Learning Module 4 - Thermal Fluid Analysis Note: LM4 is still in progress. This version contains only 3 tutorials.

Directorate for the Built Environment Building Standards Division

Flow Measurement in Pipes and Ducts. Flow Measurement in Pipes and Ducts, Course #503. Presented by:

Routefinder Testing and reporting for emergency lighting systems

Examples of pressure systems and equipment are:

Carbon Dioxide and an Argon + Nitrogen Mixture. Measurement of C p /C v for Argon, Nitrogen, Stephen Lucas 05/11/10

COMBUSTION. In order to operate a heat engine we need a hot source together with a cold sink

A Code of Practice for Pressure Equipment in the Department of Physics

MTI10 Insertion and MTL10 In-line Thermal Mass Flowmeter and Temperature Transmitter

Heavy Fuel Oil supply units. The world s best selling HFO supply unit. The right choice for any conditions

Correcting a Coriolis Meter for Two Phase Oil & Gas Flow

Particle testing in cleanroom high-pressure gas lines to ISO made easy with the MET ONE 3400 gas calibrations

1. A belt pulley is 3 ft. in diameter and rotates at 250 rpm. The belt which is 5 ins. wide makes an angle of contact of 190 over the pulley.

Fluid Flow Instrumentation

Manage Software Development in LabVIEW with Professional Tools

The Electrical Equipment (Safety) Regulations

CO MPa (abs) 20 C

Delivering Efficiency Through Collaborative Working

F ox W hi t e Paper. Reduce Energy Costs and Enhance Emissions Monitoring Systems

Fiscal Measurement Natural Gas

HOW TO SIZE A PRESSURE REGULATOR

Agilent Evolution of Test Automation Using the Built-In VBA with the ENA Series RF Network Analyzers

Stack Sampling Stack sampling or source sampling

IGEM/UP/16 Communication 1756

For the Design, Installation, Commissioning & Maintenance of Fixed Gaseous Fire Suppression Systems

Check-list for auditors. Audit visit at candidate registered laboratories

Calibration of flow meters for liquids and gases

ANNUBAR FLOW CALCULATION PROGRAM (For the FloBoss 103) User Manual (QER 04Q019)

Air Flow Optimization via a Venturi Type Air Restrictor

Cloud Sourcing G-Cloud 5 Framework

Effects of Atmospheric Pressure on Gas Measurement

Application of the Orifice Meter for Accurate Gas Flow Measurement page 1. Application of the Orifice Meter for Accurate Gas Flow Measurement.

Medical Market Laboratory EMEA

CAD for Electrical Engineering. CAD for Automation Technologies. English Version

Fundamentals of THERMAL-FLUID SCIENCES

Head Loss in Pipe Flow ME 123: Mechanical Engineering Laboratory II: Fluids

Performance of the Boiler and To Improving the Boiler Efficiency Using Cfd Modeling

Creating Dynamics User Model Dynamic Linked Library (DLL) for Various PSS E Versions

Sheet 5:Chapter 5 5 1C Name four physical quantities that are conserved and two quantities that are not conserved during a process.

EXPLANATORY MEMORANDUM TO THE CONTRACTS FOR DIFFERENCE (ELECTRICITY SUPPLIER OBLIGATIONS) REGULATIONS No. [XXXX]

Everything you need for protection scheme testing

High-efficient gas boiler CompactGas

Kemet DIAMOND PRODUCTS

Solar energy e-learning laboratory - Remote experimentation over the Internet

Suggested Application Options Settings for Autodesk Inventor

Commercial refrigeration has been in the environmental. Refrigerant. as a. Basics Considerations PART 1:

Job Description. As directed by the Group Laboratory Director, to include, but not be restricted to, the following duties:

Electricity Market Reform:

CMAS NITROX BLENDER STANDARDS AND REQUIREMENTS TRAINING PROGRAMME VERSION 2008/01 ( CA /01/08 )

1. Standard conditions are in. Hg (760 mm Hg, psia) and 68 F (20 C).

Module 5: Combustion Technology. Lecture 34: Calculation of calorific value of fuels

Gap Analysis of ISO 15189:2012 and ISO 15189:2007 in the field of Medical Testing

Gas Flowmeter Calibrations with the Working Gas Flow Standard

INDIAN STANDARDS FOR NATURAL GAS PIPELINE SYSTEM

Romanian International Conference on Chemistry and Chemical Engineering RICCCE XIV

Thermal Values. Melting-, Dropping- and Softening Point Simple, fast and reliable

Appendix A Oxymax Calculations

18 LITER VOLUME STERILISATION MATERIALS TESTING MEDIA PREPARATION

GE Oil & Gas. Air cooled heat exchangers Robust and reliable for all loads and applications

lighting road markings Part 2 td 89/08 use of passively safe signposts, lighting columns and traffic signal posts to bs en 12767: 2007

Brunei Gallery, SOAS Exhibition Proposal Details & Form

The Unique Accelabar Flow Meter

AVL FUEL MASS FLOW METER & FUEL TEMPERATURE CONTROL

Guide to in situ leak testing of HEPA filter configurations that cannot be conventionally scan tested

Reference Manual. Pressure/Temperature Compensated Flow (P_PTComp) Version 3.1

LNG Monitoring. Fiber-Optic Leakage Detection System. Pipeline leakage detection. Regasification and liquefaction monitoring

Transcription:

Gas Flow Measurement Software A Report for National Measurement System Directorate Department of Trade & Industry 151 Buckingham Palace Road London, SW1W 9SS Report No: 332/99 Date: September 1999

The work described in this report was carried out under contract to the Department of Trade & Industry ( the Department ) as part of the National Measurement System s 1999-2002 Flow Programme. The Department has a free licence to copy, circulate and use the contents of this report within any United Kingdom Government Department, and to issue or copy the contents of the report to a supplier or potential supplier to the United Kingdom Government for a contract for the services of the Crown. For all other use, the prior written consent of TÜV NEL Ltd shall be obtained before reproducing all or any part of this report. Applications for permission to publish should be made to: Contracts Manager TÜV NEL Ltd Scottish Enterprise Technology Park East Kilbride G75 0QU E-mail: jduff@nel.uk Tel: +44 (0) 1355-272096 TÜV NEL Ltd 2003

Flow Centre National Engineering Laboratory East Kilbride Glasgow G75 0QU Tel: 01355 220222 Fax: 01355 272999 Gas Flow Measurement Software Final Report for NMSPU, DTI 151 Buckingham Palace Road London SW1W 9SS S U M M A R Y This report outlines the work that has been undertaken to produce a user friendly software package for the evaluation of gas flow measurement calculations. Details are provided of the design and development of the software which builds on existing methods for the accurate evaluation of the critical flow factor for sonic nozzles and the evaluation of accurate thermodynamic data for a number of pure gases and natural gas mixtures. This latest software extends the implementations to include orifice plates, sub-sonic nozzles and Venturi tubes. Prepared by: Mr G Ryan Approved by: Dr W C Pursley Date: 28 September 1999 for Dr F C Kinghorn Director Report No: 332/99 Page 1 of 10

C O N T E N T S Page SUMMARY... 1 1 INTRODUCTION... 3 2 DELIVERABLES... 3 3 SOFTWARE DESIGN... 4 3.1 Computation Engine... 4 3.2 User Interface... 5 4 DEVELOPMENT TOOLS... 6 5 DYNAMIC LINKED LIBRARIES... 7 6 WINDOWS APPLICATION... 8 7 ADVISORY GROUP... 9 8 DISSEMINATION... 9 REFERENCES... 9 APPENDIX A: EXAMPLE OF CALLING DLL FUNCTIONS FROM C/C ++ & EXCEL (VBA) APPENDIX B: GASFLO USER MANUAL Report No: 332/99 Page 2 of 10

1 INTRODUCTION The objective of this project was to produce a software package to enable users of sonic and subsonic nozzles, Venturi meters and orifice plates to undertake calculations of mass and volumetric flow for a range of pure gases and natural gas mixtures over a wide range of physical conditions. This development took advantage of NEL s extensive expertise in both flow measurement technology and the thermophysical properties of fluids, thus maximising the benefit to UK industry of past and present DTI investment in the Flow Programme. Development of reliable and robust software such as this has proven to be an efficient and effective means of transferring technical information from research organisations to industry. This current project was based on previous work at NEL during the 1996-1999 Flow Programme to develop methods and software for the accurate evaluation of the critical flow factor for sonic nozzles and the evaluation of accurate thermodynamic data for a number of pure gases and natural gas mixtures 1,2,3,4. The existing knowledge gained along with further work to develop routines for sub-sonic nozzles, orifice plates and Venturi tubes was encapsulated into one Microsoft Windows based software application for use on personal computers (PCs). This report summaries the work carried out and gives an outline of the functionality and operation of the software produced. 2 DELIVERABLES All of the planned deliverables have been produced on schedule and within budget. These were as follows: A software package for use by users of sonic nozzles and sub-sonic nozzles, Venturi meters and orifice plates with the following features: Providing accurate calculations of mass and volumetric flow rates to be made for these devices for a range of pure gases and for natural gas mixtures over a wide range of physical conditions. Enabling accurate calibrations of these devices to be made with a number of pure gases and gas mixtures from the results generated by the package. Designed to run on IBM compatible personal computers (PCs) executing under the Windows 95 operating system. Production of a user handbook detailing both the installation and operation of the package. An industrial group established to advise on the content, requirements and operation of the software package. Selected components of the package to be made available in the form of a Microsoft Windows compatible Dynamic Link Libraries (DLLs) enabling users to implement the same in their own in-house programs or other applications such as Microsoft Excel. Report No: 332/99 Page 3 of 10

3 SOFTWARE DESIGN The overall design of the software was based on the original requirements specification and was split into two phases: Design of the computation engine Design of the graphical user interface The complete development cycle for this project from design and implementation through to testing and validation was performed within the procedures described by the NEL software quality system. Although outwith the remit of this project a desirable long term aim would be to achieve external 'TickIt' approval for the package. 3.1 Computation Engine The basic structure adopted for this software was to have the computational engine separate from the user interface. This processing element encapsulates all of the functions to perform the flow measurement and physical properties calculations. The functions were grouped into five basic types: Sonic Nozzles Orifice Plates Sub-sonic Nozzles (ISA 1932, Long radius & Venturi Nozzles) Venturi Tubes Physical Properties Additional functional was also required within the engine to perform unit conversion for the properties relevant to the flow measurement calculations. The sonic nozzle and physical properties calculations are based on the implementations developed by Watson 1,2,3,4 in an earlier project. The remaining calculations were on new implementations of the differential pressure flow measurement standard, BS EN ISO 5167 5,6. In addition to providing flow rate calculations this group of implementations also include functionality for performing design calculations for differential pressure, orifice/throat and pipe diameter. To enable the computational engine to be used with Microsoft Windows based applications the code was written in FORTRAN and compiled into a dynamic linked library (DLL). A DLL is an executable file that acts as a shared library of functions. Dynamic linking provides a way for a process to call an external function that is not part of its own executable code. The following diagram shows the basic structure of the DLL and how it is used as the foundation for the main Windows application and user defined solutions. Report No: 332/99 Page 4 of 10

GASFLO WINDOWS APPLICATION DYNAMIC LINKED LIBRARIES USER DEFINED APPLICATIONS FORTRAN ENGINE SONIC NOZZLE CODE ORIFICE CODE VENTURI CODE UNIT CONVERSION CODE PROPERTIES CODE Reference Quality Physical Property Formulations ARGON DRY AIR CARBON DIOXIDE METHANE NITROGEN STEAM NATURAL GAS MIXTURES A major advantage of structuring the software in this manner is that the underlying computational engine can be enhanced without affecting the user interface, and conversely the user interface can be improved at any time without requiring modifications to the DLL functions. 3.2 User Interface In the design of the user interface for the Windows application two basic factors had to be addressed; linking up with the computational engine to give access to all of the functions within, and to produce a front end that was intuitive and easy to use yet flexible enough to meet all of the users requirements. The following diagram illustrates the principal elements of the user interface. Report No: 332/99 Page 5 of 10

COMPUTATION ENGINE (DLL) CALCULATION INPUT VIEW MIXTURE INPUT VIEW RESULTS VIEW REPORT VIEW MENUS TOOLBARS FILE MANAGEMENT PRINT MANAGEMENT User Interface Main Frame In designing the front end for this software reference was made to the available guidelines 7 to produce an interface which was consistent with the look and feel of the Microsoft Windows operating system. This was important to present the operator with an interface which is both familiar and predictable. 4 DEVELOPMENT TOOLS The principal development tools used to generate the software for this project are given below: Operating System Windows 95 Development Platforms Microsoft FORTRAN PowerStation V4.0 compiler Microsoft Visual C++ Professional, V5.0 Application Installation/Setup InstallShield Professional Edition, V5.1 Software Protection Microcosm CopyControl, V1.73 Configuration Management Microsoft Visual SourceSafe, V5.0 Report No: 332/99 Page 6 of 10

User Documentation / Help Files Microsoft Word, V7.0 Microsoft Help Workshop, V4.01 Although the install requirements specified that the software should execute within the Microsoft Windows 95 operating system, checks have been done with Windows 98 and Windows NT V4 and it also appears that the program functions correctly within these additional platforms. 5 DYNAMIC LINKED LIBRARIES (DLLs) As explained in the software design section, the dynamic linked libraries (DLLs) are the foundation upon which the main Windows based application is built. In addition they can be used within a user's own software implementation using different development platforms. For this project two DLLs were generated; one containing all of the flow measurement and physical properties functions, the other providing unit conversion routines. Functions within the main DLL, GasFlo.dll Orifice - Orifice plate flow rate, differential pressure, and sizing calculations function. Nozzle - Sub-sonic nozzle flow rate, differential pressure, and sizing calculations function. Venturi - Venturi tube flow rate, differential pressure, and sizing calculations function. Sonic - Sonic nozzle flow rate calculation function PhysProps - Physical properties of gas and natural gas mixtures routine Functions within the unit conversion DLL, Gunitsdll.dll GUNDEN - Density unit conversion GUNVOL - Volume unit conversion GUNENT - Enthalpy unit conversion GUNSCP - Entropy unit conversion GUNPRE - Pressure unit conversion GUNTEM - Temperature unit conversion GUNLEN - Length unit conversion GUNTCD - Thermal conductivity unit conversion GUNVIS - Viscosity unit conversion GUNSUR - Surface tension unit conversion GUNMFR - Mass flow rate unit conversion GUNVFR - Volume flow rate unit conversion GUNEFR - Energy flow rate unit conversion GUNCAV - Calorific value unit conversion Appendix A details how a DLL would be used within a user based application. Two examples are given:- the first shows how to make calls from a C/C++ program, the second illustrates calling the DLL functions from within a Visual Basic (VBA) executing from Microsoft Excel. Report No: 332/99 Page 7 of 10

6 WINDOWS APPLICATION As stated earlier the principal deliverable of this project was a standalone Windows based application which would give users a convenient processing tool for performing gas flow measurement calculations. The principal features of the software package developed are: Five types of calculations : Orifice plate calculations of flow rate, differential pressure, orifice diameter and pipeline diameter. Venturi tube calculations of flow rate, differential pressure, orifice diameter and pipeline diameter. Nozzle calculations of flow rate, differential pressure, orifice diameter and pipeline diameter. Sonic nozzle calculations of flow rate. Physical properties calculations of gas and natural gas mixtures. Unit conversion of input and output properties. File management options for saving and loading existing calculations. Print and print preview features for producing reports. Support for saving and loading banks of gas mixtures. A calculation manager window for handling multiple calculations within the one file. Each of the five main calculation types listed above has associated with it an Input View through which the user enters input parameters such as temperature, pressure and differential pressure. A secondary input view called the Summary View is available for entering details such as the operator's name and date on which the calculation was performed. If the calculation is to be performed on a gas mixture then the Mixture View is used to specify the composition. From this view the user can add and remove individual components and enter the mole fraction of each. Once the calculation has been run the output is displayed in a window called the Results View. Again each type of calculation has its own specific Results view. The calculation results can also be viewed using the Report View which formats the data into a more convenient layout. From the Report View a hard copy of the results can be sent to a printer. Prior to printing, a preview feature is available to view the report on-screen as it would appear on a printed page. An additional feature of the program is a link to a help file which provides the user with assistance on how to operate the software. The main contents of the help file are: Details of the user interface elements including input/output views, menus and toolbars. Details of each type of calculation and the relevant standards/formulations used to implement them. Explanations on how to perform each of the available calculations. Report No: 332/99 Page 8 of 10

The help file was used to form the basis of the user manual which supports the package. A copy of the user manual is included in Appendix B for reference. 7 ADVISORY GROUP An industrial advisory group was established to advise on the content, requirements and functionality of the software package. The principal aim of this group was to ensure effective transfer of knowledge to the end user. The members of the advisory group were as follows : Bill Priddy, BP Amoco Exploration Richard Stevenson, Rolls Royce Michael Reader-Harris, NEL Jim Watson, NEL In addition to providing advice the group members assisted in the testing and validation of the product prior to final release. Further advice was also sought from other NEL Flow Centre staff in particular those involved with the Gas Flow Facility. 8 DISSEMINATION The completed software is currently going under the product title of "GasFlo" and will be licensed to end users by the Flow Centre at NEL. The standalone Windows application along with the supporting dynamic linked libraries are distributed on CD-ROM. Full installation instructions are provided along with a copy of the user manual. REFERENCES 1. WATSON J.T.R. The Determination of Critical Flow Factors for Natural Gas Mixtures, Part 1: The Thermodynamic Properties of the Components of Natural Gas and Natural Gas Mixtures in the Ideal State. Flow Centre Report No 72/96 produced for the NMSPU. East Kilbride, Glasgow: National Engineering Laboratory, December 1996. 2. WATSON J.T.R. The Determination of Critical Flow Factors for Natural Gas Mixtures, Part 2: The Real Gas Contribution to the Thermodynamic Properties of the Components of Natural Gas Mixtures in the Ideal State. Flow Centre Report No 117/96 produced for the NMSPU. East Kilbride, Glasgow: National Engineering Laboratory, February 1997. 3. WATSON J.T.R. The Determination of Critical Flow Factors for Natural Gas Mixtures, Part 3: The calculation of C* for Natural Gas Mixtures in the Ideal State. Flow Centre Report No 162/96 produced for the NMSPU. East Kilbride, Glasgow: National Engineering Laboratory, April 1997. 4. WATSON J.T.R. The Determination of Critical Flow Factors for Natural Gas Mixtures, Part 4: Final Report. Flow Centre Report No 303/96 produced for the NMSPU. East Kilbride, Glasgow: National Engineering Laboratory, September 1997. Report No: 332/99 Page 9 of 10

5. BS EN ISO 5167-1 : 1997 Measurement of fluid flow by means of pressure differential devices. Part 1. Orifice plate, nozzles and Venturi tubes inserted in circular cross-section conduits running full. 6. BS EN ISO 5167-1 : 1998 Amendment to the above. 7. MICROSOFT PRESS Windows Interface Guidelines for Software Design, ISBN 1-55615-679-0. Report No: 332/99 Page 10 of 10

APPENDIX A Examples of calling DLL functions from C/C++ & Excel(VBA) Report No: 332/99

APPENDIX B GasFlo User Manual Report No: 332/99