Oil and Gas Flow Computer Library

The dual flow computer library provides gas and crude oil flow computer features for Wago PFC200 controllers.

The library performs API 12 crude oil calculations for custody-transfer meters or API 20.1 calculations for allocation meters, and AGA-3/AGA-8 orifice meter calculations. Events, alarms, and hourly history are maintained in a manner consistent with API 21.1. Data is extracted from the PLC using industry-standard .cfx files.

Gas Flow Computer Feature Summary

For gas calculations, the library uses the concept of stations and meters. Stations describe gas properties and base conditions. Meters are assigned to Stations. At present, only orifice meters are supported.

Meter Calculations Orifice flow calculations per AGA-3 (2013)
Meter calculation frequency Full once per second
Calculated parameters Volume, Mass, Energy
Aggregated values available Flow Rate, Current Hour Total, Last Hour Total, Today Total, Yesterday Total, Current Month Total, Prior Hour Total, Lifetime Total
Gas Property Calculations Supercompressibility and density per AGA-8 GERG (2017)
Gas property calculation frequency Full calc once per second
Gas Property Calculation Frequency Full calc during each PLC task cycle
Supported Meter Configurations Orifice Meter Flange taps
Upstream static pressure tap
Contract Hour Configurable Per station
Units of Measure Customary U.S. units only Inches, psi, inches of water (68 degrees), degrees F, flow rates per day, volumes in MSCF, energy in MMBTU, mass in Mlbs
Diagnostics Station calculations Zs, Densitys, Zb, Densityb, Gas Gravity from Composition – corrected for standard conditions
Meter configuration Zf, Densityf, , Re, Cd, Ev, Y1, Fpv , Temperature-corrected Orifice size, Tube size, Beta
Configuration validation features Library validates configuration and provides error/warning messages


Oil Flow Computer Feature Summary

For oil calculations, the library supports meter input as either a flow rate or an accumulated volume. Input can be related to either mass or indicated volume. This arrangement accommodates Coriolis, Turbine, and Positive Displacement meters. The meter can be configured as either a custody-transfer meter or an allocation meter.

Meter Calculations per API 12.2 for custody transfer or API 20.1 for allocation
Meter calculation frequency Full calc once per second
Calculated parameters: custody transfer Indicated Quantity, Indicated Volume, Gross Volume, Gross Standard Volume, Net Standard Volume, S&W Volume, Gross Mass
Calculated Parameters: allocation Indicated Quantity, Indicated Volume, Gross Volume, Gross Theoretical Oil Volume, Net Theoretical Oil Volume, Gross Theoretical Water Volume, Theoretical Flash Gas Volume
Aggregated values available Flow Rate, Current Hour Total, Last Hour Total, Today Total, Yesterday Total, Current Month Total, Prior Hour Total, Lifetime Total
Oil Property Calculations Liquid Correction Factors (CRUDE OIL ONLY) per API 11.1 Table A (2004)
Water Property Calculations Water Correction Factors per API 20.1
Supported Meter Configurations Coriolis, Turbine, Positive Displacement
Contract Hour Configurable Per meter
Units of Measure Customary U.S. units only psig, degrees F, API gravity, barrels per day, mass in lbs
Diagnostics Correction Factors Corrected Density, CTL, CPL, CTPL, CSW, Standard Density


Generic Feature Summary

Data Retention per API 21.1 Periodic (hourly) history, events, alarms
Periodic history retention Configurable by meter. Minimum of 35 days – ranging to file system capacity
Event retention 256 events per meter per “day”
Alarm retention 64 alarms per meter per “day”
Data Transfer Method (Collection) Via CFX files Quorum/FLOWCAL Common File Exchange Format 8.5.0
Minimum of 1 CFX per day
CFX file stored on PLC file system (password protected)
Manual/Local collection Users with limited permissions and network access can copy CFX files from the PLC to another computer for transfer to hydrocarbon accounting system
Remote/SCADA collection Via secure FTP or SSH
SCADA Interface Implemented in PLC program
Configuration Loading/Transfer Via text file Library provides features to save configuration to file
Library provides features to load all or part of the configuration from file
Power Loss Behavior Configuration is retained PLC persistent memory
Flow History is retained PLC persistent memory and file system
Flow that occurs while PLC is not powered Not measured
When power is restored Broken day is saved as CFX file and calculations resume
Licensing Free for developer Library file is free and can be added to any Wago e!COCKPIT instance
Runtime Licensed Library generates a site code on the PLC
Beyond HMI, Inc. generates a license file from site code
License file is installed on the PLC. License is perpetual but only usable on that PLC.
Library features will execute for about 4 days after restart in trial mode. License must be installed before this period expires or data will be lost (unrecoverable).


Licensing

The BhiLibDualFc library is available at no cost to e!COCKPIT users. The library uses runtime licensing. A license is required for each PLC which executes the library code. The program will run for approximately 4 days in trial mode before a license is required. Licenses must be purchased from Beyond HMI, Inc.