Liquid Flow
Introduction
The PLC Shift Liquid Flow application allows you to calculate temperature and pressure corrected flow for oil, natural gas liquids (NGL) and water. The application can be run in batch mode for well testing, loading and other applications where discontinuous measurement is required, or in continuous mode, where daily records are generated at the configured contract hour.
The Liquid Flow application is API (American Petroleum Institute) compliant and will generate event, alarm, configuration and flow history records. Records can retrieved and viewed locally, or exported directly to other systems.
View the 'Liquid Flow' section under the PLC Shift Manager topic for application specific features in Manager, including setting all units at once and working with gas flow history.
Measurement Type
The flow computer allows for two types of measurement. Use the 'Measurement Type' setting in the 'Flow Calculation' group to choose between liquid or water measurement. Choose 'Liquid' to correct for oil or a mixture of oil and water or choose 'Water' when the product is only water.
When the measurement type is liquid and when the water cut is non-zero, the water portion of the emulsion can either be uncorrected, corrected by AP1 11.4.1 (Water), or corrected by API 20.1 (Produced Water). When the water cut is 0, there is no water in the product and the water flow rate and accumulations will be 0.
Algorithms
The Liquid Flow application supports the following algorithms:
-
API 11.1, Temperature and pressure correction for crude oil, fuel oil, jet fuel, gasoline and lubrication oil.
-
API 11.2.2, Pressure correction for NGL.
-
API 11.2.4, Temperature correction for NGL/
-
API 11.4.1, Temperature and pressure correction for water.
-
API 20.1, Temperature correction for produced water.
Use settings in the 'Flow Calculation' group to select the algorithms used.
Setting the Clock
Accurate measurement depends on accurate timing. Linux computers support the Network Time Protocol (NTP). This protocol has been in use for many years and is provably robust. It keeps the clock on the local machine to within a few milliseconds of UTC and also avoids making large adjustments. Large clock adjustments of many seconds at a time will cause accumulated volumes to be incorrect. NTP must be configured correctly for accurate measurement.
NTP must be configured correctly for accurate measurement.
|
Direct Sensor Polling
The PLC Shift Liquid Flow application can get input values from a PLC that is connected to IO, or it can poll supported Coriolis meters directly. Configure direct Coriolis meter polling using settings in the 'Inputs' and 'Direct Polling' group. Supported sensors include:
-
Micro Motion 1000, 2000, 3000 and 5000 series meters.
-
Endress + Hauser Promass 83, 100, 3000 and 500 series meters.
-
Khrone MFC 400
Supported protocols include:
-
Modbus RTU
-
Modbus TCP
-
Modbus RTU in TCP
When a Coriolis meter is polled directly, the mass flow rate and volume flow rate inputs will always be taken from the Coriolis meter. The temperature and density inputs to the flow computer can optionally come from the Coriolis meter, or they can be fixed, or they can come from the PLC. The pressure input will always come from the PLC.
Status bits are read back from the Coriolis meter, but the bits are different for each type of meter. Status bit changes are logged in the flow computer's event journal.
When multiple Liquid Flow applications exist on a single device, and applications are configured to use the 'Modbus RTU' or 'Modbus RTU in TCP' protocols, applications that are configured to use the same serial port or IP address will be polled sequentially. Depending on the baud rate, the sensor response time, and the number of registers that are polled, having too many sensors on a single port will prevent all applications from getting sensor updates once per second.
Care must be taken when polling many sensors sequentially so that all Liquid Flow applications will get sensor data once per second.
|
Alarms
Use settings in the 'Input Alarms' group to configure input alarms. Enabled alarms will be logged when they are set and cleared.
Freeze Inputs
Use the 'Freeze Inputs' control parameter in the 'Control' group to fix the inputs at their current value. When using a pulse input, the counts will internally continue to be incremented at their current rate so that the flow rate remains unchanged. When 'Freeze Inputs' is active, any sensor direct polling will be suspended. Polling will resume once 'Freeze Input's is deselected.
Batch
Configure a Liquid Flow application for batch measurement using the 'Operation Mode' parameter in the 'Flow Calculation' group. When in batch mode, the application will will continue to generate and log flow history, alarms, events and configurations, but it will also generate batch records. A single batch record contains flow history and other information from the time that a batch was started until the batch is stopped.
Use the 'Batch Control' to start and stop a batch or to enter the 'Purge' state. Purge time is not recorded and is excluded from batch records.
Flow History
The Liquid Flow application generates the following types of records:
-
Minute Data. Each record has accumulated volume, average input values, alarm count, event count and other values for every minute. 2048 minute records are stored by the application.
-
Hour Data. Each record has accumulated volume, average input values, alarm count, event count and other values for every hour. The last 24 hours of hourly history is available as tags in the 'Hourly History' group. 14 days of hourly history is stored by the application.
-
Day Data. Each record has accumulated volume, average input values, alarm count, event count and other values for every contract day. The last 24 days of daily history is available as tags in the 'Daily History' group. 64 days of daily history is stored by the application.
-
Event Record. Event records are generated when the application configuration is updated or when certain control actions happen, like 'Freeze Inputs' becoming active or inactive. Each event record contains information for a single action. 64 days of event records are stored by the application.
-
Alarm Record. Alarm records are generated when an alarm occurs. Alarms can be configured in the application or read directly from the sensor. 64 days of alarm records are stored by the application.
-
Configuration Record. A configuration record is generated when a contract day ends, when batch is started or stopped, or when a complete configuration download occurs. A configuration record contains the entire configuration of the application, not just the values that changed. Only values that are relevant to the flow calculation are in the configuration record, however.
-
Configuration Change Records. Starting in version 1.2, configuration change records are generated. A record is created when the configuration of a parameter that affects measurement is changed. For example a record will not be generated if export is enabled, but a record will be generated if the measurement algorithm changes.
Version 1.1 and earlier
Version 1.2 and later
Data Export
See the 'Liquid Flow' section for local data retrieval, visualization and export using PLC Shift Manager.
Set the 'Data Export' section for tabular data export to Azure Table Storage or using MQTT.
Troubleshooting
View the application's diagnostic for detailed troubleshooting information. See the 'Log Files' section for more details.