Patent Description:
One problem facing separators handling multi-phase flows is that of entrained fluids in downstream processing, particularly gas blow-by. In a separator receiving gas and liquid flows, if liquid is completely drained from a vessel, gas can freely flow to downstream equipment designed to handle only liquid flows. This can result in damage, and potential hazards for the system, often requiring activation of relief devices to remove the entrained gas from the system.

Documents <CIT> and <CIT> relate to magnetic flow meters capable of detecting the presence of entrained air and solid particles.

A magnetic flowmeter includes at least one coil configured to generate a magnetic field within a process fluid flow. A pair of electrodes is configured to detect an electromotive force within the flowing process fluid in response to the magnetic field. Measurement circuitry is coupled to the pair of electrodes and is configured to provide an indication of the detected electromotive force. A processor is coupled to the measurement circuitry and configured to receive the indication of the detected electromotive force and determine a flow-related output based on the detected electromotive force. A diagnostics component is coupled to the measurement circuitry and is configured to detect entrained fluid based on analysis of a process variable measurement obtained by the magnetic flowmeter. The processor is configured to communicate the process variable measurement over a communication bus. The processor is further configured to automatically provide an alert when the process variable measurement is detected by the diagnostics component to be above a set threshold, wherein the alert includes an identification of a type of entrained fluid. The process variable measurement includes at least an empty pipe value. When sustained increases of the empty pipe value are detected the entrained fluid is identified as entrained oil and when rapid increased and decreases of the empty pipe value are detected the entrained fluid is identified as entrained gas.

These and various other features and advantages that characterize the claimed embodiments will become apparent upon reading the following detailed description and upon reviewing the associated drawings.

<FIG> illustrates a simplified exemplary process environment in which embodiments of the present invention are particularly useful. A process fluid may circulate within, or be generated by, an exemplary process environment <NUM>. The process fluid may be natural gas, oil or another fluid. The fluid originates from an exemplary fluid source <NUM>, such as a well head, and is provided to separator <NUM>, which is configured to separate the fluid from non-productive material, for example separating natural gas from tracking fluid or processed water. In one embodiment, once the fluid has passed through the separator <NUM>, the product moves on in a process stream <NUM> for further downstream processing. The non-product material may instead be directed to a waste stream <NUM>. A flowmeter <NUM> is configured to measure one or more process variables or parameters relating to the waste stream <NUM> leaving the separator <NUM>.

Early detection of entrained fluids in a process stream may minimize gas or oil entering a waste line or storage system. When gas is detected within a waste stream, it either must be recaptured or flared. Early detection of entrained gas may reduce flare. Minimizing flaring reduces environmental impacts as well as increasing overall gas production. In a typical installation, entrained gas is either vented through a pressure relief vent to the atmosphere, or if a flare system is installed within the process environment, the entrained gas is burned. If there is a vapor recovery unit installed, a process environment may be able to recapture that gas, however if this is not the case, the revenue from the gas may be lost. In addition to lost revenue, the released gas may also result in non-compliance with regulations concerning carbon emissions for a particular process environment.

Entrained gas within a process stream may cause an increase in costs. Entrained gas in a process stream will typically cause a volumetric flow meter to over-register the volume of the water produced. This could result in additional trips to the field by the pumper when the storage tank is not full. Therefore, detection and removal of entrained gas within a system is important to managing waste treatment costs and detecting other potential problems.

Therefore, it is desired for a magnetic flowmeter <NUM> to be able to detect entrained gas and / or oil within a process stream in order to take corrective action as soon as possible.

<FIG> illustrates an exemplary magnetic flowmeter within a process control or monitoring system. Magnetic flowmeter <NUM> is configured to monitor flow related process variables associated with fluids within a process plant. Examples of such fluids include slurries and liquids in chemicals, pulp, petroleum, gas, pharmaceutical, food and other fluid processing plants. In environment <NUM>, magnetic flowmeter <NUM> is coupled to process piping <NUM> that is also coupled to a control valve <NUM>.

In a magnetic flowmeter, such as flowmeter <NUM>, the monitored process variables relates to the velocity of the process fluid flowing through process piping and flow tube <NUM>. The measurements taken by the flowmeter <NUM> are used to provide other information to an operator, for example an indication of entrained gas or oil in a waste stream, as described in greater detail below. Magnetic flowmeter <NUM> includes electronics housing <NUM> connected to flow tube <NUM>. Magnetic flowmeter <NUM> outputs are configured for transmission over long distances to a controller, for example controller <NUM>, or an indicator via communication bus <NUM>. In a typical processing plant, communication bus <NUM> can be a <NUM>-<NUM> mA current loop, a FOUNDATION™ Fieldbus segment, a pulse output/frequency output, a Highway Addressable Remote Transducer (HART®) protocol communication, a wireless communication connection, such as that in accordance with IEC <NUM>, Ethernet, or a fiber optic connection to a controller such as system controller/monitor <NUM>, or other suitable device. System controller <NUM> may be programmed as a process monitor, to display flow information and provide potential indications for a human operator of a problem in the system, or as a process controller to control the process using control valve <NUM> over communication bus <NUM>.

<FIG> is a simplified block diagram of a magnetic flowmeter in accordance with one embodiment of the present invention. Coils <NUM> are configured to apply an external magnetic field in the fluid flow in response to an applied drive current from coil drive circuitry <NUM>. EMF sensors (electrodes) <NUM> electrically couple to the fluid flow and provide an EMF signal output <NUM> to measurement circuitry that includes amplifier <NUM> and analog to digital converter <NUM>. The signal provided to amplifier <NUM> is related to an EMF generated in the fluid flow due to the applied magnetic field, and fluid velocity. Analog to digital converter <NUM> provides a digitized EMF signal to microprocessor system <NUM>. A signal processor <NUM> is implemented in microprocessor system <NUM> of flowmeter electronics <NUM> which couples to the EMF output <NUM> to provide an output <NUM> related to fluid velocity. Memory <NUM> can be used to store program instructions or other information as discussed below. Flowmeter <NUM> also includes diagnostics component <NUM>, configured to execute digital signal processing algorithms to detect entrained air or oil within the process fluid stream in accordance with embodiments described herein.

In one embodiment, flowmeter <NUM> may communicate with one or more remote devices using digital communications circuit <NUM>, which, in one embodiment, can operate on a wireless process communication loop or segment. In which case, digital communication circuit includes a wireless transceiver, such that it is capable of interacting with external wireless devices, based upon commands and/or data from microprocessor system <NUM>.

Entrained gas and/or oil may be detectable within a process stream, in one embodiment, by tracking and analyzing a variety of measurements or parameters of magnetic flowmeter <NUM>. The measurements include at least an empty pipe value; some the measurements or parameters additionally include: a flow value, a differential electrode voltage value, and a signal to noise ratio. The flowmeter <NUM> may also calculate a statistic associated with the received value, for example standard deviation or a coefficient of variation. By monitoring these variables over time, flowmeter <NUM> can detect when the process stream contains entrained gas or oil. Entrained gas is detected by rapid increases and decreases of the empty pipe value. Additionally, for example, as discussed in greater detail below, entrained gas can be detected, in one embodiment, by rapid increases and decreases in measured or calculated variable values related to flow value, differential electrode voltage. Entrained oil, on the other hand, is detected, in one embodiment, by sustained increases in measurements related to empty pipe value, empty pipe phase angle and empty pipe magnitude. Having a diagnostic method that can alert an operator to the presence entrained gas or oil in a system may allow for more rapid corrective action.

<FIG> illustrate a number of process variables that may be useful for detecting entrained gas in a process stream in accordance with one embodiment of the present invention. When gas is entrained within a fluid stream, a signal to noise ratio will decrease due to the gas bubble coming in contact with the electrodes <NUM> as they flow through the stream. This rapid change in variable output may be visible in the signals reported from the flowmeter <NUM>. The results shown in <FIG> illustrate different process variable measurements that may be obtained, in one embodiment, by the magnetic flowmeter <NUM>, or calculated based on the received signals and provided for analysis to the controller <NUM>. In one embodiment, the results presented in <FIG> are normalized results.

As shown in <FIG>, at various points in time during the exemplary process, air was introduced to the fluid stream. The air injection points <NUM> correspond to entrained air introduced into a flow stream. The entrained air was introduced approximately at <NUM> seconds, <NUM> seconds, <NUM> seconds, and <NUM> seconds.

<FIG> illustrates graph <NUM>, graph <NUM>, and graph <NUM>, which show raw signals, calculated standard deviation, and the calculated coefficient of variation, respectively, of flow measurements of magnetic flowmeter <NUM>. Graph <NUM> shows exemplary raw flow value measurements <NUM> and average flow value measurements <NUM> of flowmeter <NUM>, as air was injected into the process stream at air injection points <NUM>. Graph <NUM> shows calculated standard deviation <NUM> of the raw flow value over time. Graph <NUM> shows the coefficient of variation <NUM> of the raw signal value over time. The coefficient of variation <NUM> is calculated from the standard deviation <NUM> divided by the average <NUM>. One advantage of using a coefficient of variation <NUM> is that the produced detection is indifferent to changes in flow value. Therefore, entrained gas can be detected by the received flow value signal <NUM>, the calculated standard deviation value <NUM> and/or the calculated coefficient of variation <NUM>. As shown in graph <NUM>, the standard deviation value <NUM> shows an increase of over <NUM> times the baseline value, where the baseline was taken when no entrained air was in the system. The coefficient of variation <NUM> also shows an increase of over <NUM> times that of the baseline value. The significant increase and decrease in calculated standard deviation <NUM> and coefficient of variation <NUM>, as the entrained air contacts and passes by electrodes <NUM>, provides a distinctive and recognizable diagnostic tool for detecting entrained gas in the process stream.

<FIG> illustrates graph <NUM>, graph <NUM>, and graph <NUM>, which show raw signals, calculated standard deviation, and the calculated coefficient of variation, respectively, of differential electrode voltage measurements of magnetic flowmeter <NUM>. Graph <NUM> shows exemplary raw differential electrode voltage measurements <NUM>, and average differential electrode data <NUM> acquired by magnetic flowmeter <NUM>, as air was injected into the system at various air injection points <NUM>. Graph <NUM> provides a calculated standard deviation <NUM> of the received differential electrode voltage over time. Graph <NUM> shows the coefficient of variation <NUM> of the differential electrode voltage over time. As shown in graph <NUM>, the standard of deviation <NUM>, at a minimum, rapidly increased to over <NUM> times the baseline value, where the baseline taken when no entrained gas was present in the system, and then rapid returned to the baseline value. Similarly, the coefficient of variation <NUM> also showed very large increase over the baseline, and rapid decrease back to the baseline. The rapid increase and decrease of the standard deviation <NUM> and coefficient of variation <NUM> provides a detectable indication that entrained gas may be present in the process stream.

<FIG> illustrates graph <NUM>, graph <NUM>, and graph <NUM>, which correspond to the raw signals, calculated standard deviation, and the calculated coefficient of variation, respectively, of empty pipe value measurements of magnetic flowmeter <NUM>. Graph <NUM> provides exemplary raw empty pipe value measurements <NUM>, and average empty pipe value measurements <NUM> of magnetic flowmeter <NUM>, as air was injected into the system at various air injection points <NUM>. Graph <NUM> shows a calculated standard deviation <NUM> of the received empty pipe value measurements over time. Graph <NUM> provides the coefficient of variation <NUM> of the empty pipe value measurements over time. The empty pipe value, as shown in graphs <NUM>, <NUM> and <NUM>, successfully detected three out the four occurrences of air injected into the system. In the example illustrated by <FIG>, the empty pipe value was only measured once per second. Taking the empty pipe value measurement more frequently, for example twice per second or four times per second, may result in an empty pipe value-based diagnostic successfully detecting all occurrences of air entrained in the process stream. In one embodiment, using a common mode electrode voltage-based diagnostic instead of an empty pipe value-based diagnostic may also provide a tool capable of detecting all of the entrained air occurrences. As shown in <FIG>, measuring the empty pipe value over time may be able to detect a significant number of occurrences of gas entrained in the system.

<FIG> illustrates graph <NUM>, graph <NUM>, and graph <NUM>, which correspond to the raw signals, calculated standard deviation, and the calculated coefficient of variation, respectively, of signal-to-noise ratio measurements of magnetic flowmeter <NUM> taken at <NUM>. Graph <NUM> provides exemplary raw signal-to-noise ratio measurements <NUM>, and average raw signal-to-noise ratio measurements <NUM> of magnetic flowmeter <NUM>, as air was injected into the system at various air injection points <NUM>. Graph <NUM> provides a calculated standard deviation <NUM> of the signal-to-noise ratio measurements over time. Graph <NUM> provide the coefficient of variation <NUM> of the signal-to-noise ratio measurements over time. When gas becomes entrained in a fluid, the signal to noise ratio should decrease over time, due to gas bubbles coming into contact with electrodes. This may be seen, over a long period of time, in a system with or without cavitation. However, as shown in <FIG> over a short period of time, use of the signal to noise ratio does not show a significant change when entrained gas is present in the system.

<FIG> illustrate results of measuring a number of parameters over time that may be useful for detecting entrained oil in a process stream in accordance with one embodiment of the present invention. Entrained oil may be detected, in one embodiment, as the conductivity of the fluid in the process fluid stream changes due to the introduction of oil. Detection of entrained oil is important as it may be indicative of a leak and thus be useful in identifying the source of the leak. In obtaining the results shown in <FIG>, an oil, canola oil, was injected into a stream of water. The oil was slowly injected into the stream over time, starting at injection point <NUM>, corresponding to roughly <NUM> seconds. In one example, the results presented in <FIG> are normalized.

<FIG> illustrates graph <NUM>, graph <NUM> and graph <NUM>, which correspond to the raw signals, calculated standard deviation, and the calculated coefficient of variation, respectively, of flow value measurements of magnetic flowmeter <NUM>. Graph <NUM> shows exemplary raw flow value measurements <NUM>, and average flow value measurements <NUM> of magnetic flowmeter <NUM>, as the oil was introduced to the system, starting at oil introduction point <NUM>. Graph <NUM> provides a calculated standard deviation <NUM> of the flow value measurement over time. Graph <NUM> provides a coefficient of variation <NUM> of the flow value measurement over time. As shown in <FIG>, the flow measurement value and the calculated standard deviation did not vary significantly as oil was introduced into the system. This contrasts to the significant and rapid spike in flow value measurements seen in <FIG> when entrained air was introduced to the system. A diagnostic system in accordance with embodiment described herein may, therefore, be able to detect and identify entrained gas in a process stream.

<FIG> illustrates graph <NUM>, graph <NUM> and graph <NUM>, which correspond to the raw signals, calculated standard deviation, and the calculated coefficient of variation, respectively, of empty pipe value measurements of magnetic flowmeter <NUM>. Graph <NUM> provides exemplary raw empty pipe value measurements <NUM>, and average empty pipe value measurements <NUM> of magnetic flowmeter <NUM>, as oil was introduced to the system over time, starting at oil introduction point <NUM>. Graph <NUM> shows a calculated standard deviation <NUM> of the empty pipe value measurement over time. Graph <NUM> provides a coefficient of variation <NUM> of the received empty pipe value measurement over time. As shown in <FIG>, the empty pipe value measurements show a rapid and sustained increase over time after the oil is introduced into the system. As shown in graph <NUM>, the raw signal of the empty pipe value measurements starts to fluctuate significantly around <NUM> seconds. The standard deviation of the empty pipe value also shows a significant and sustained increase starting at around <NUM> seconds, which corresponds to <NUM> seconds after the oil has entered the fluid stream. Additionally, the coefficient of variation <NUM> shows a significant increase, as compared to a previously-measured baseline, around <NUM> seconds. Also, as shown in graph <NUM>, the standard deviation <NUM> does not just increase but it increases to over <NUM> times that of the pre-entrained oil condition. The standard deviation also remains at least <NUM> times greater than the baseline over time. The coefficient of variation <NUM> also shows significant and detectable increases rising to over <NUM> times that of the baseline and consistently staying at over <NUM> times the baseline.

The results shown in <FIG> indicate that empty pipe value measurements can reliably provide an indication as to when entrained oil enters a system. Additionally, when compared to the empty pipe value measurements seen in <FIG>, corresponding to entrained air in the system, the empty pipe value measurements of <FIG> show a sustained increase when entrained oil is present. Thus, the empty pipe value measurement provides a reliable indication of an entrained foreign fluid in the process stream, and can reliably identify the foreign fluid as entrained air or entrained oil based on the received or calculated variable measurements.

<FIG> illustrates graph <NUM>, which corresponds to the standard deviation of the empty pipe phase angle <NUM>, and empty pipe value magnitude <NUM> measurements calculated from the empty pipe values of magnetic flowmeter <NUM>, as oil was introduced to the system over time, starting at oil introduction point <NUM>. The left-hand side axis shows the phase angle <NUM>, measured in degrees, and the right-hand side axis shows the magnitude <NUM> in kOhms. As shown, the phase angle <NUM> shows a rapid and significant decrease just after the entrained oil has been introduced into the process fluid stream. Additionally, the phase angle magnitude <NUM> shows a significant increase just after the entrained oil has entered the system. The phase angle <NUM> and the magnitude <NUM> see a significant change due to the conductivity and dielectric constant changing as the oil enters the process fluid stream.

<FIG> illustrates graph <NUM>, graph <NUM> and graph <NUM>, which correspond to the raw signals, calculated standard deviation, and the calculated coefficient of variation, respectively, of empty pipe value phase angle measurements of magnetic flowmeter <NUM>. Graph <NUM> shows exemplary raw empty pipe value phase angle measurements <NUM>, and average empty pipe value phase angle measurements <NUM> of magnetic flowmeter <NUM>, as oil was introduced to the system over time, starting at oil introduction point <NUM>. Graph <NUM> provides a calculated standard deviation <NUM> of the received empty pipe value phase angle measurement over time. Graph <NUM> provides a coefficient of variation <NUM> of the received empty pipe phase angle value measurement over time. In each of graphs <NUM>, <NUM> and <NUM> the point at which oil enters the system is shown by entrained oil injection point <NUM>. As clearly shown at about <NUM> seconds, the average empty pipe phase angle signal shows a dramatic decrease and then the beginning of an increase again at <NUM> seconds. The raw empty pipe phase angle signal also starts to show dramatically larger variations in values over time. The standard deviation <NUM> of the empty pipe phase angle also shows a significant increase starting around <NUM> seconds, increasing to over <NUM> times of that of the baseline. Additionally, the coefficient of variation <NUM> of the empty pipe phase angle also shows a significant increase around <NUM> seconds as shown by graph <NUM>. The graphs <NUM>, <NUM> and <NUM> provide evidence that an empty pipe phase angle measurement-based diagnostic tool can provide an indication of entrained oil in a process stream.

The different variable measurements and calculations shown in <FIG> and <FIG> illustrate a variety of reliable indicators of entrained foreign fluids within a process fluid stream. Additionally, several of these indicators provide identifiable trends to identify an entrained fluid as either entrained gas or entrained oil. In one embodiment, flowmeter <NUM> may process all or a subset of the process variable measurements: flow value, empty pipe measurement, empty pipe phase angle, empty pipe value magnitude, differential electrode voltage, common mode voltage, and/or signal-to-noise ratio to provide a useful diagnostic output. However, it is also contemplated, according to examples not encompassed by the wording of the claims, that at least some of the parameters / data could be transmitted to a process controller or other suitable device, and that such diagnostics could be performed by that device. The flowmeter, Z or, according to examples not encompassed by the wording of the claims, other process device, may then calculate either, or both of, a standard deviation or a coefficient of variation for each of process variable measurements. The flowmeter is also programmed with a threshold value for each of the variables or parameters, their standard deviation, and / or their coefficient of variation. When the flowmeter detects that a received signal is above the set threshold, it is be programmed to deliver an alert. The threshold value may be selectable by an operator, pre-set by a manufacturer, or based on historical data indicating a baseline value for a process fluid stream without any entrained fluid.

In one embodiment, a graphical representation of the raw variable measurements and / or the calculated statistics may be presented to an operator on an external display. In another embodiment, the standard deviation and / or the coefficient of variation is provided to the operator with or without the raw signals on an external display. In another embodiment, none of the signals are provided on a display, but the flowmeter, or other process device, is configured to analyze the received signals and provide an alert of entrained oil or air within the process stream, e.g. an audible alarm or a flashing light. In one embodiment, the signals are provided on an external display along with an alerting mechanism when entrained oil and / or gas is detected. In one embodiment, the alert may be an audible alert. In another embodiment, the alert may be a visual alert, for example an indication on a display or a flashing light located within the process environment. Alternatively, the alert could be displayed at a remote location to an operator.

<FIG> illustrates an exemplary method of providing an indication of an entrained fluid in a process environment in accordance with one embodiment of the present invention. In block <NUM>, method <NUM> obtains process variable measurements using a magnetic flowmeter. The process variable measurements may include any of a flow value, empty pipe value, differential electrode voltage value, empty pipe phase angle or magnitude value, a common mode value, or any combination thereof. Additionally, any one or more of these values may be obtained over time and stored. In one embodiment, a controller, such as microprocessor system <NUM> (shown in <FIG>), compares the obtained signals to a threshold value. The controller may also store the obtained process values in memory in order to perform statistical analyses on such data.

In block <NUM>, the controller calculates one or more statistics from the process variable measurement(s) obtained at block <NUM>. The calculated statistic may be, for example, a standard deviation, and/or a coefficient of variation. In one embodiment, the controller stores the calculated statistic in conjunction with the raw process variable in a memory component, such as memory <NUM>.

At block <NUM>, the controller compares the obtained process variable and/or the calculated statistics against a preset threshold. In one embodiment, the threshold is preset by a manufacturer and may be selectable by a user, for example depending on the anticipated components of the fluid in the process stream. In one embodiment, the process variable and the calculated statistic may be normalized and the threshold may correspond to an increase as compared to a known baseline. For example, the threshold could be, in one embodiment, a detection of a standard deviation value more than <NUM> times. However, other multiples, such as more than <NUM> times or more than <NUM> times a known baseline can also be used. As seen in <FIG> and <FIG>, entrained gas provides a detectable change from a baseline when plotted over time. In another embodiment, the threshold value may correspond not to a prescribed value, but a prescribed change, for example, a detected increase in the standard deviation and/or coefficient of variation of more than <NUM> times from a value detected in the previous <NUM> second. However, other multiples, such as more than <NUM> times, or more than <NUM> times a value detected in the previous <NUM> seconds can be used. Additionally, other time windows, such as the last <NUM> seconds, or in the last few minutes can also be used.

At block <NUM>, the controller determines that entrained gas or oil is present in the process stream, for example based on a detected change in received process variable information or calculated statistic(s) over time. When sustained increases of the empty pipe value is detected the entrained fluid is identified as entrained oil and when rapid increases and decreases of the empty pipe value are detected the entrained fluid is identified as entrained gas. Additionally, for example, if a change is detected in the standard deviation of the flow value, this indicates that entrained gas and not entrained oil is present. Additionally, for example, a sudden increase and decrease in differential electrode voltage may indicate that entrained gas is present. However, in another example not encompassed by the wording of the claims, the controller does not detect whether the foreign fluid is entrained oil or gas, but only determines that a foreign fluid is present.

As shown in <FIG> and <FIG>, tracking and analyzing different diagnostic measurements over time allows an operator to detect and identify an entrained foreign fluid within the process stream. Entrained oil may be detectable by a change in the standard deviation of an empty pipe value and a common mode voltage. The common mode voltage standard deviation may also indicate entrained air over a period of time. Additionally, if the concentration of entrained oil is high enough, using a measurement of a differential electrical voltage, may detect the entrained oil.

In block <NUM>, the method provides an alert to the operator. In one embodiment, the alert may comprise an indication that something is wrong with the process environment based on the obtained process variables and/or the calculated statistic, suggesting that an operator of the flowmeter check the process and determine what is causing the error. However, in another embodiment, based on the detected change in process variables and calculated statistics the controller may determine that entrained gas or oil is present within the system and provide a more detailed alert in block <NUM> for example providing an alert to an operator of the system that entrained oil is present in the system. Additionally, based on the location of the specific flowmeter <NUM>, the method <NUM> may also indicate a potential location of the entrained fluid within the system. For example, entrained oil may indicate a leaky valve. Based on the location of the flowmeter <NUM> within the environment <NUM>, the controller may be able to indicate that a leak is most likely upstream. In an exemplary environment with multiple flowmeters <NUM>, an alert from a second flowmeter <NUM> downstream from a non-alerting first flowmeter <NUM> may indicate that the leak is from a valve located in between the two flowmeters <NUM>.

In one embodiment, in block <NUM>, after the controller determines an alert is needed, the context of the alert may be displayed on a suitable display. This may comprise, in one embodiment, a visual alert indicating that an entrained fluid is present. In another embodiment, the alert may comprise an identification of the entrained fluid as either entrained air or entrained oil. In another embodiment, the alert may indicate a potential location for the source of the entrained fluid.

Claim 1:
A magnetic flowmeter (<NUM>) for detecting and identifying entrained fluid in a process stream from a separator, the magnetic flowmeter (<NUM>) comprising:
at least one coil (<NUM>) configured to generate a magnetic field within a process fluid flow;
a pair of electrodes (<NUM>) configured to detect an electromotive force within the flowing process fluid in response to the magnetic field;
measurement circuitry coupled to the pair of electrodes (<NUM>) and configured to provide an indication of the detected electromotive force;
a processor (<NUM>) coupled to the measurement circuitry and configured to receive the indication of the detected electromotive force and to determine a flow-related output based on the indication of the detected electromotive force;
a diagnostics component (<NUM>) coupled to the measurement circuitry and configured to detect entrained fluid based on analysis of a process variable measurement obtained by the magnetic flowmeter (<NUM>); and
wherein the processor (<NUM>) is configured to communicate the process variable measurement over a communication bus (<NUM>), the processor (<NUM>) being configured to automatically provide an alert when the process variable measurement is detected by the diagnostics component (<NUM>) to be above a set threshold, wherein the alert includes an identification of a type of entrained fluid;
characterised in that the process variable measurement includes at least an empty pipe value, wherein when sustained increases of the empty pipe value are detected the entrained fluid is identified as entrained oil and when rapid increases and decreases of the empty pipe value are detected the entrained fluid is identified as entrained gas.