Patent Description:
This application relates to flowlines carrying fluids, for example, fluids produced from subsurface reservoirs through wellbores.

Different types of fluids can be entrapped in subsurface reservoirs. The fluids can include hydrocarbons, for example, petroleum, crude oil, water, natural gas or mixtures of them. Such fluids can be produced, that is, raised to a surface of the Earth from the subsurface reservoirs through wellbores formed from the surface to the subsurface reservoirs. The fluids rise to the surface under the pressure of the subterranean zone in which the subsurface reservoirs reside or can be raised using secondary or tertiary production techniques. The produced fluids can include multiple phases, for example, an oil phase, a water phase, a gas phase, or a combination of any two or all three of them. For example, water produced through the wellbore can include hydrocarbons dispersed in the water in the form of emulsions. The produced water can satisfy use conditions for certain industrial applications if a quantity of the oil phase in the produced water is below a certain threshold. <CIT> describes an oil analyzing method, oil components in liquid are extracted by the oil extractant thereby making an oil extract, and then the oil extractant is vaporized from the oil extract, and residual components are burned up thereby generating carbon dioxide for measuring the oil components therefrom. The method uses a combustion furnace having an opening section at one edge side, a heating section at the other edge side and a carrier gas introducing opening for introducing carrier gas between the opening section and the heating section. In the combustion furnace, the carrier gas being introduced from the carrier gas introducing opening is separated so as to flow in the both edge sides of the combustion furnace, and the vaporization of the oil extractant is carried out at a position closer to the one edge side than the carrier gas introducing opening, and the combustion of the residual components is carried out at the heating section. <CIT> describes a non-halogenated solvent mixture for gravimetric determination of grease and oil in an aqueous or a solid matrix comprising a mixture of n-hexane and methyl tertiary-butyl ether present in a volume ratio of <NUM>% to <NUM>% respectively. <CIT> describes that normal hexane after extraction can be introduced by a capillary in a succeeding analysis process, a chemical is added in the state of the capillary, and further heating is made to break an emulsion state where oil content has been dissolved to the normal hexane heterogeneously. <CIT> describes oil-in-water measurement, in particular for the oil industry. In an electric measuring cell a capacitance is measured as a measure of an oil concentration in the water flowing through or in the accumulation filter. In order to reduce the maintenance requirement, the measuring cell is automatically calibrated at recurring time intervals with clean water and/or flushed with water, possibly oil-contaminated, in the back-flushing direction. <CIT> describes that the real part of the complex dielectric constant of natural gas stream from a producing gas well can be accurately measured at the well head by avoiding even minute effects of dispersion and water absorption by driving the capacitance probe at a frequency in a range of <NUM> to <NUM> megahertz. <CIT> describes in-situ capacitive condition monitoring of grease within a mechanical system, such as a sealed bearing, uses a pair of electrodes separated by and at least partially in contact with the grease, such that the grease acts as a dielectric between the electrodes. A multi-frequency alternating voltage is applied between the electrodes and the resulting current is measured to determine the complex impedance of the equivalent circuit formed by the electrodes and the grease. This is compared with preset values to determine a composition of the grease.

This specification describes technologies relating to online measurement of dispersed oil phase in produced water.

Certain implementations of the subject matter described here can be implemented as a method on-site of a flowline transporting a fluid that includes an oil phase and a water phase, for example, dispersed oil in water. A sample of the fluid flowed through the flowline is obtained. The sample includes the oil phase and the water phase. For example, the sample is drawn from the water phase and includes dispersed oil. The sample is combined with a chemical element that can separate the oil phase in is measured. An increase in electrical resistance indicates a transition from presence of the separated water phase to presence of the chemical element.

An aspect combinable with any of the other aspects includes the following features. Detecting, at the outlet of the sample cell, the presence of the chemical element includes measuring a dielectric constant of fluid flowed through the three-way micro-valve. A decrease in the dielectric constant indicates a transition from presence of the separated water phase to presence of the chemical element.

An aspect combinable with any of the other aspects includes the following features. The separated water phase is flowed to the flowline.

An aspect combinable with any of the other aspects includes the following features. The oil phase in the sample is separated from the water phase in the sample by maintaining the sample cell in which the sample is combined with the chemical element at a temperature of <NUM>.

An aspect combinable with any of the other aspects includes the following features. To remove the chemical element from the measurement cell, the separated oil phase and the chemical element in the measurement cell are boiled. The boiling removes the chemical element from the measurement cell.

An aspect combinable with any of the other aspects includes the following features. To determine the quantity of the oil phase in the sample in the measurement cell by capacitive measurement technique, an electrical excitation is applied to the oil phase from which the chemical element has been removed. A capacitance of the oil phase to which the electrical excitation has been applied varies until an entirety of the chemical element has been removed. After the capacitance of the oil phase stabilizes, a leavel of the oil phase is measured.

An aspect combinable with any of the other aspects includes the following features. After measuring the level of the oil phase, a fluid is injected through the measurement cell to purge the measurement cell of the separated oil phase and the chemical element.

Certain aspects of the subject matter described here can be implemented as a system implemented on-site of a flowline transporting a fluid that includes an oil phase and a water phase. The system includes a fluid sampling system configured to fluidically couple to the flowline. The fluid sampling system is configured to obtain a sample of the fluid flowed through the flowline. The sample includes the oil phase and the water phase. The system includes a sample cell fluidically coupled to the fluid sampling system. The sample cell is configured to receive the sample within an internal volume defined by the sample cell and receive a chemical element within the internal volume. When mixed with the sample, the chemical element is configured to separate the oil phase in the sample from the water phase in the sample. The system includes a measurement cell fluidically coupled to the sample cell. The measurement cell is configured to receive the separated oil phase and the chemical element from the sample cell, and remove the chemical element. The system includes a capacitive measurement system connected to the measurement cell. The capacitive measurement system is configured to implement a capacitive measurement technique to determine a quantity of oil in the separated oil phase in the measurement cell. The system includes one or more flow control devices fluidically coupled to each of the fluid sampling system, the sample cell and the measurement cell. The one or more flow control devices are configured to flow fluids through the system.

An aspect combinable with any of the other aspects includes the following features. The system includes a sample recovery cell separate from the measurement cell to which the separated water phase is transferred. The one or more flow control devices includes a three-way micro-valve fluidically coupled to an inlet of the sample recovery cell through a first flow pathway and an inlet of the measurement cell through a second flow pathway. The system includes a controller connected to the three-way micro-valve. The controller is configured to cause the three-way micro-valve to close the second flow pathway and open the first flow pathway to flow the separated water phase from the outlet of the sample cell to the inlet of the sample recovery cell through the first flow pathway. The controller is configured to detect, at the outlet of the sample cell, the presence of the chemical element. In response to detecting the presence of the chemical element at the outlet of the sample cell, the controller is configured to close the first flow pathway and open the second flow pathway to flow the separated oil phase and the chemical element to the measurement cell through the second flow pathway.

An aspect combinable with any of the other aspects includes the following features. To detect, at the outlet of the sample cell, the presence of the chemical element, the controller is configured to measure an electrical resistance of fluid flowed through the three-way micro-valve. An increase in the electrical resistance indicates a transition from presence of the separated water phase to presence of the chemical element.

An aspect combinable with any of the other aspects includes the following features. To detect, at the outlet of the sample cell, the presence of the chemical element, the controller is configured to measure a dielectric constant of fluid flowed through the three-way micro-valve. A decrease in the dielectric constant indicates a transition from presence of the separated water phase to presence of the chemical element.

An aspect combinable with any of the other aspects includes the following features. The measurement cell includes electrical heaters mounted within the measurement cell. The electrical heaters are configured to boil the separated oil phase and the chemical element within the measurement cell to remove the chemical element.

An aspect combinable with any of the other aspects includes the following features. The measurement cell includes an outlet. The capacitive measurement system includes a pair of electrodes disposed on either side of the outlet. The pair of electrodes can apply an electrical excitation to the oil phase from which the chemical element has been removed. A capacitance of the oil phase to which the electrical excitation has been applied varies until an entirety of the chemical element has been removed. Then, the capacitance stabilizes.

An aspect combinable with any of the other aspects includes the following features. A water-oil separator is fluidically coupled to the outlet of the measurement chamber. The one or more flow control devices flow fluid within the measurement cell to the water-oil separator.

An aspect combinable with any of the other aspects includes the following features. The one or more flow control devices include a naphtha injection pump fluidically connected to the measurement cell and configured to inject naphtha into the measurement cell to flow the fluid within the measurement cell to the water-oil separator.

Water produced from subsurface reservoirs has multiple applications for example, the injection in the subterranean zone to maintain reservoir pressure, recovery and injection in disposal wells or overboard discharge. Knowing a quantity of dispersed hydrocarbons, that is, the oil phase, in the produced water enables determining if the water is suitable for one or more of such applications. Oil phase content beyond certain thresholds can result in reduced injectivity of the disposal wells due to pores plugging. In case of overboard discharge, exceeding the thresholds can lead to severe damage to marine life and to the environment in general.

The oil phase in the produced water can be determined by obtaining a sample of the produced water and testing the sample in a laboratory, for example, by implementing the liquid/liquid partition-gravimetric method 5520B or the Environmental Protection Agency (EPA) method 1164A. Laser induced fluorescence (LIF) or ultraviolet induced fluorescence techniques can also be implemented to determine the oil phase in water.

The present disclosure describes an online and on-site technique to determine the quantity of the oil phase in produced water. The techniques described here implement volumetric measurement instead of gravimetric or fluorescence-based measurements. The techniques are described on-site where the flowline carrying the produced water is installed. The techniques are implemented online by obtaining a sample of produced water directly from the flowline, providing the produced sample directly to a measurement system (described later), and providing the determined oil phase quantity as an output of the measurement system. Consequently, the need to transport the sample to a laboratory or to set up an extensive laboratory on-site is negated. Also, a quantity of the produced water sample is decreased. In addition, the measurement system can continuously determine the quantity of oil phase in multiple samples of produced water obtained over a period of time, and can generate a profile showing the quantity of the oil phase in the produced water over that period. Moreover, the use of the volumetric technique offers advantages over fluorescence-based techniques in which continuous cleaning of the measurement system is needed. Implementing the techniques described here can provide an accurate assessment of the most relevant fraction of oil in water by overcoming the limitations of other measurement principles, for example, ultraviolet or infrared-based measurement, and by overcoming the inability to differentiate aromatic measurement elements, which are harmless to injectivity, from aliphatic measurement elements, which are not soluble in water and cause great concern when injected. The techniques described here can be implemented continuously and in real-time to provide oil content in produced water content measurements which can alert operators on changes in the produced water outlet streams and to enable appropriate changes in the process operation, or to alert operators of any malfunction of upstream equipment. Implementing the subject matter described here enables monitoring water quality after any process to remove oil, signaling replacement of cartridge or membrane removing oil and providing monitoring to minimize hydrocarbon losses with water.

The measurement techniques described here include the following steps. A sample of produced water is drawn by means of an insertion probe from a flowline transporting a well homogenized mixture (for example, by using a static mixer, shear valve, or similar). The sample is then transferred to the measurement cell using electro passivated tubing to preserve the integrity of the sample. The sample includes a water phase and an oil phase. The sample is mixed with a chemical element (for example, n-hexane, specifically, dry n-hexane) which separates the oil phase from the water phase, resulting in two immiscible fluids. The chemical element is attached to the oil phase, which is lighter than the water phase. The oil phase and the chemical element are separated from the water phase. The chemical element is then separated from the oil phase, for example, by evaporation or boiling. The quantity of the oil phase is then determined by capacitive measurement techniques. By combining the quantity of the oil phase with the quantity of the sample that was drawn from the flowline, a measure of oil in water in the sample is determined.

<FIG> is a schematic diagram of a system <NUM> for online measurement of oil phase in produced water flowed through a flowline <NUM>. The system <NUM> is implemented on-site of the flowline <NUM> transporting a fluid that includes an oil phase and a water phase. For example, the fluid is produced water received from a wellbore. In some instances, the produced water can be transported to a gas-oil separation plant (GOSP) for processing, to another location at the well site for the injection, for disposal above the surface of the Earth, or for other applications. The fluid in the flowline <NUM> is a multi-phase fluid that includes an oil phase and a water phase. The system <NUM> can be fluidically coupled to the flowline <NUM> to draw measured samples of the fluid for the purposes described here. The sample drawn from the flowline <NUM> also includes the oil phase and the water phase. The ratio of the oil phase and the water phase in the sample is substantially equal to the ratio of the oil phase and the water phase in the fluid in the flowline <NUM>. By "substantially equal to," it is meant that a measurement of the ratio of the oil phase and the water phase in the sample is a nearly accurate measurement (for example, within a <NUM>% variance) of the ratio of the oil phase and the water phase in the fluid in the flowline <NUM>. To accomplish this purpose, the multi-phase fluid can be effectively homogenized (e.g. by using a static mixer, shear valve, or similar).

In some implementations, the system <NUM> includes a fluid sampling system <NUM> to obtain a sample of the fluid flow through the flowline <NUM>. This is achieved by inserting a probe into flowline <NUM>, in a location where the multi-phase fluid is homogenous. The sample is then transferred using electro passivated tubing to the measurement cell. As described earlier, the sample includes the oil phase and the water phase, similar to the oil phase and the water phase, respectively, in the fluid flow through the flowline <NUM>. For example, the fluid sampling system <NUM> includes a fluid flow pathway (for example, one or more tubes) fluidically coupled to the flowline <NUM> by one or more flow valves or flow pumps or both. The flow valves and the flow pumps are operated to draw a known quantity of the fluid sample (for example, the produced water) from the flowline <NUM> through the one or more tubes. In some implementations, the fluid sampling system <NUM> can include fluid flow pathways to return the sample fluid to the flowline <NUM> without processing. In some implementations, the fluid sampling system <NUM> can continuously draw and return fluid samples from the flowline <NUM>, without providing any sample for processing. When activated by a controller <NUM> (described later), the fluid sampling system <NUM> can transfer a sample of the fluid for processing.

In some implementations, the system <NUM> includes a sample cell <NUM> fluidically coupled to the fluid sampling system <NUM>. The sample cell <NUM> can be a container or similar chamber that defines an internal volume that is sufficient to carry the quantity of sample drawn by the fluid sampling system <NUM> from the flowline <NUM>. For example, the sample cell <NUM> can have a volume of around <NUM> liter. Assuming oil concentration in a range between <NUM> parts per million (ppm) and <NUM> ppm, volumetric measurements on a <NUM> liter sample can be done in the range between <NUM> milliliters (ml) and <NUM>, which is compatible with capacitive level assessment. The fluid sampling system <NUM> and the sample cell <NUM> can be fluidically connected by a flow pathway (for example, a tube). In some implementations, a valve can be disposed in the flow pathway that connects the fluid sampling system <NUM> and the sample cell <NUM>. The valve can be connected to and controlled by the controller <NUM>. When the valve is closed, fluid drawn by the fluid sampling system <NUM> from the flowline <NUM> can be reinjected into the flowline <NUM>. When the valve is open, the fluid drawn by the fluid sampling system <NUM> can be flowed to the sample cell <NUM>. The controller <NUM> can control the valve to open for a duration sufficient to draw a quantity of the fluid needed to perform the oil phase measurement described here.

In addition to the sample, the sample cell <NUM> can receive a chemical element within the internal volume defined by the sample cell <NUM>. When mixed with the sample, the chemical element can separate the oil phase in the sample from the water phase in the sample. In some implementations, the chemical element is n-hexane. In general, any chemical that is incompatible with water, with the ability to solubilize crude oil and with a boiling point sufficiently lower than crude oil to enable boiling off, can be used. Examples include pentane, hexane and heptane.

In some implementations, the system <NUM> includes a mixer to mix the sample with the chemical element, for example, mix the produced water sample with the n-hexane. <FIG> is a schematic diagram of a sample cell <NUM> of the system of <FIG> with a mixer <NUM>. In some implementations, the mixer <NUM> can be a mechanical mixer that resides within the sample cell <NUM> and, for example, is affixed to a bottom surface of the sample cell <NUM>. The mixer <NUM> can include multiple blades that spin to mix the sample with the chemical element. The mixer <NUM> can be operatively connected to the controller <NUM>, which can control operational parameters of the mixer <NUM>, for example, a duration of mixing, a rate of spinning of the blades, and similar operational parameters. <FIG> is a schematic diagram of the sample cell <NUM> of the system of <FIG> with another mixer <NUM>. In some implementations, the mixer <NUM> can be a bubbling mixer that includes a gas storage tank and a flow pathway (for example, a tube) that couples the gas storage tank to the internal volume of the sample cell <NUM>. Gas from the gas storage tank can be flowed through the flow pathway to the internal volume of the sample cell <NUM> to mix the sample with the chemical element. The mixer <NUM> can be operatively connected to the controller <NUM>, which can control operational parameters of the mixer <NUM>, for example, opening or closing of the gas storage tank, a rate of flow of the gas, and similar operational parameters.

The controller <NUM> can operate the mixer (for example, the mixer <NUM>, the mixer <NUM>, or another mixer), for a duration sufficient for the phase separation of the oil phase and the water phase in the sample in the presence of n-hexane. In some implementations, the controller <NUM> can operate for a duration, ranging between <NUM> seconds and <NUM> seconds. In some implementations, the system described here can be operated without a mixer. In such implementations, sufficient duration is allowed for the oil to be solubilized by the solvent, that is, the n-hexane.

Mixing of the sample and the chemical element can be implemented by maintaining the sample cell <NUM> at a temperature, for example, <NUM>. To do so, in some implementations, the system <NUM> includes a heater (not shown) operatively coupled to the sample cell <NUM>. For example, the heater can include plates positioned within the internal volume of the sample cell <NUM> that can be electrically actuated to emit heat. A temperature sensor can be connected to the internal volume of the sample cell <NUM>. The heater and the temperature sensor can be operatively connected to the controller <NUM>, which can control the operation of the heater based on the temperature at which the internal volume of the sample cell <NUM> is to be maintained to facilitate the mixing of the sample in the chemical element.

In some implementations, the system <NUM> includes a chemical element storage tank <NUM> in which the chemical element, for example, the n-hexane, is stored. The chemical element storage tank <NUM> and the sample cell <NUM> can be fluidically coupled by a flow pathway (for example, a tube). In some implementations, a valve can be disposed in the flow pathway that connects the chemical element storage tank <NUM> and the sample cell <NUM>. The valve can be connected to and controlled by the controller <NUM>. When the valve is open, the chemical element flows from the chemical element storage tank <NUM> to the sample cell. When the valve is open, the flow of the chemical element to the sample cell <NUM> ceases. The controller <NUM> can control the valve to open for a duration sufficient to draw a quantity of the chemical element needed to mix with the quantity of the sample fluid such that the water phase and the oil phase can separate.

The quantity of n-hexane mixed with a unit volume of the sample to separate the oil phase and the water phase depends on a few factors. One is the oil solubility in the solvent. Another is the volume of solvent in relation to the volume of sample. In general, the quantity of solvent (that is, n-hexane) should be sufficient to ensure that all oil homogeneously dispersed in the sample is contacted and solubilized. In some implementations, the ratio of solvents versus sample is at least <NUM>% (for example, between <NUM>% and <NUM>%). In some implementations, the ratio can be lower, for example, <NUM>% or <NUM>%.

In some implementations, the system <NUM> includes a measurement cell <NUM> fluidically coupled to the sample cell <NUM>. The measurement cell <NUM> can receive the separated oil phase and the chemical element from the sample cell <NUM>. In particular, the water phase is not flowed to the measurement cell <NUM>. Within the measurement cell <NUM>, the chemical element is removed. In some implementations, the system includes a sample recovery cell <NUM> separate from the measurement cell <NUM> to which the separated water phase is transferred. For example, each of the measurement cell <NUM> and the sample recovery cell <NUM> is a container or similar chamber that defines an internal volume that is sufficient to carry the quantity of separated oil phase and the chemical element or the separated water phase, respectively. Each of the measurement cell <NUM> and the sample recovery cell <NUM> can be fluidically connected to the sample cell <NUM> by a respective flow pathway (for example, a tube).

Flow from the sample cell <NUM> to the measurement cell <NUM> or the sample recovery cell <NUM> can be controlled by a three-way micro-valve positioned in the flow pathways between the sample cell <NUM>, the measurement cell <NUM>, and the sample recovery cell <NUM>. <FIG> is a schematic diagram of a three-way micro-valve <NUM> fluidically coupling the sample cell <NUM>, the measurement cell <NUM> and a sample recovery cell <NUM> of the system <NUM>. The micro-valve <NUM> couples an outlet <NUM> of the sample cell <NUM> to an inlet <NUM> of the measurement cell <NUM> through one fluid pathway, and couples the outlet <NUM> of the sample cell <NUM> to an inlet <NUM> of the sample recovery cell <NUM>. At any given time, the micro-valve <NUM> can permit flow either from the outlet <NUM> of the sample cell <NUM> to the inlet <NUM> of the measurement cell <NUM> or from the outlet <NUM> of the sample cell <NUM> to the inlet <NUM> of the sample recovery cell <NUM>, but not both. The micro-valve <NUM> is connected to the controller <NUM>, which can control the opening and closing of the micro-valve <NUM> to implement the flows from the sample cell <NUM> to the measurement cell <NUM> or the sample cell <NUM> to the sample recovery cell <NUM>.

As described earlier, when the oil phase and the water phase separate, the denser oil phase settles at the bottom of the sample cell <NUM>. Consequently, the water phase first flows out of the outlet <NUM> of the sample cell <NUM>. In some implementations, a pump or similar flow control device can be fluidically connected to the sample cell <NUM> to flow the fluid out of the sample cell <NUM> and into the measurement cell <NUM> or the sample recovery cell <NUM>.

In some implementations, the system <NUM> includes one or more sensors (not shown) fluidically coupled to the outlet <NUM> of the sample cell <NUM> and the controller <NUM>. When the fluid within the sample cell <NUM> flows out of the outlet <NUM>, the one or more sensors can determine fluid properties of the fluid and transmit a signal representing the properties to the controller <NUM>. For example, the one or more sensors can measure an electrical resistance (such as an inductive resistance) of the fluid that flows out of the outlet <NUM>. In the produced water, the water phase is more conductive and has less electrical resistance compared to the combination of the oil phase and the n-hexane. As long as the one or more sensors measure an electrical resistance representative of the water phase, the controller <NUM> opens the flow pathway from the outlet <NUM> of the sample cell <NUM> to the inlet <NUM> of the sample recovery cell <NUM> and closes the flow pathway from the outlet <NUM> of the sample cell to the inlet <NUM> of the measurement cell <NUM>. In response, the fluid in the sample cell <NUM> begins to flow from the sample cell <NUM> to the sample recovery cell <NUM> while avoiding the measurement cell <NUM>. When all or most of the water phase has flowed out of the outlet <NUM>, then the one or more sensors detect an increase in the electrical resistance as the combination of the oil phase and the n-hexane begins to flow from the outlet <NUM>. In response to the one or more sensors detecting the increase in the electrical resistance, the controller closes the flow pathway from the outlet <NUM> of the sample cell to the inlet <NUM> of the sample recovery cell and opens the flow pathway from the outlet <NUM> of the sample cell <NUM> to the inlet <NUM> of the sample recovery cell <NUM>.

In some implementations, the one or more sensors can measure a level, for example, a dielectric constant, of the fluid that flows out of the outlet <NUM>. The dielectric constant of produced water (approximately <NUM>) is higher than that of n-hexane (approximately <NUM>). The one or more sensors can transmit the sensed dielectric constant to the controller <NUM>, which can open and close the flow pathways to flow the water phase to the sample recovery cell <NUM> and the combination of the oil phase and the n-hexane to the measurement cell <NUM>. In some implementations, any residual water in the fluid that flows out of the outlet <NUM> can be removed prior to the fluid flowing to the measurement cell <NUM> by passing the fluid through a molecular sieve (for example, the molecular sieve <NUM>, described later). The molecular sieve absorbs the residual water and allows the remaining fluid to flow through.

After residual water has been removed from the combination of the oil phase and the chemical element (for example, the n-hexane) and the combination has flowed to the measurement cell <NUM>, the chemical element can be separated from the oil phase. To do so, the combination of the oil phase and the chemical element is heated. <FIG> is a schematic diagram of the measurement cell <NUM> with a heater <NUM>. In some implementations, the heater <NUM> includes electrical heaters mounted within the measurement cell <NUM>. The electrical heaters can heat the combination of the oil phase at the chemical element within the measurement cell <NUM> to remove the chemical element. For example, the electrical heaters can be mounted to the walls of the measurement cell <NUM> and can heat the combination of the oil phase and the n-hexane to at least a temperature at which the n-hexane boils and evaporates (for example, at least <NUM>). Because the boiling point of the oil phase is greater than that of the n-hexane, only the n-hexane evaporates while the oil phase remains in the measurement cell <NUM>. A duration for which the combination needs to be boiled depends on a quantity of the combination in the measurement cell <NUM>.

In some implementations, the system <NUM> can recover the chemical element (for example, the n-hexane) that is separated from the oil phase by the boiling described earlier. For example, the system <NUM> can include a chemical element storage tank <NUM> (for example, n-hexane storage) that is fluidically connected to the measurement cell <NUM> by a fluid flow pathway with a valve controlled by the controller <NUM>. During the boiling process described earlier, the controller <NUM> can cause the valve to be open to allow the separated chemical element to flow through the flow pathway for storage in the chemical element storage tank <NUM>. In some implementations, cooling elements (for example, a heat exchanger, a Peltier type or similar cooling elements) can be positioned in the flow path of the chemical element so that the chemical element can be cooled (for example, to between <NUM> - <NUM>) before it reaches the chemical element storage tank <NUM>. In some implementations, the system <NUM> can include a molecular sieve <NUM> (for example, a 3Angstrom protective cartridge) between the measurement cell <NUM> and the chemical element storage tank <NUM>. The chemical element can be flowed through the molecular sieve <NUM> to remove any moisture from the chemical element. The moisture level need not be zero; a low level of moisture is acceptable. In some implementations, the system <NUM> includes a moisture analyzer to quantify a quantity of moisture in the recovered n-hexane.

In some implementations, a quantity of oil in the oil phase in the chemical or solvent that remains in the measurement cell <NUM> can be determined by implementing capacitive measurement techniques. <FIG> is a schematic diagram of a capacitive measurement system operatively connected to the measurement cell <NUM>. The measurement cell <NUM> includes an outlet <NUM> at which the combination of the oil phase and the chemical element accumulates. The capacitive measurement system includes a pair of electrodes (a first electrode 504a, a second electrode 504b) disposed on either side of the outlet <NUM>. While the electrical heater is heating the combination of the oil phase and the chemical element, the pair of electrodes can apply an electrical excitation (for example, a frequency of <NUM> kilo Hertz) to the combination at the outlet <NUM>. As the chemical element boils off from the combination, its concentration in the combination decreases. Responsively, the capacitance of the oil phase varies. Once all of the chemical element has been boiled off or evaporated from the combination, only the oil phase remains and the capacitance stabilizes. The quantity of the oil in the remaining oil phase can then be determined from the stabilized capacitance value. In some implementations, the oil quantity can be determined by calibration of the system, by mapping the capacitance output at different levels (that is, volumes) of oil in the cell.

The controller <NUM> is operatively coupled to the pair of electrodes and is configured to transmit a control signal to cause the pair of electrodes to apply the electrical excitation at the outlet <NUM> of the measurement cell <NUM>. In addition, the controller <NUM> is operatively coupled to a capacitor (not shown) that can measure the capacitance across the pair of electrodes. The controller <NUM> is also configured to compare capacitance values over the period of time to determine capacitance stabilization. For example, the controller <NUM> can determine that the capacitance values have stabilized when a difference between a greatest and least capacitance values measured by the capacitor over a pre-defined period of time is less than a threshold value.

In some implementations, the outlet <NUM> of the measurement cell <NUM> can be fluidically connected to the sample recovery cell <NUM>. After the capacitance measurements described earlier, the oil phase can be flowed out of the measurement cell <NUM> through the outlet <NUM> and into the sample recovery cell <NUM>. In some implementations, a valve can be disposed in the flow pathway that connects the outlet <NUM> of the measurement cell <NUM> and the sample recovery cell <NUM>. The valve can be connected to and controlled by the controller <NUM>. The controller <NUM> can control the valve to remain closed during the capacitance measurement described earlier, and to open after the capacitance measurement has been completed to allow the oil phase to flow through the outlet <NUM> to the sample recovery cell <NUM>.

In some implementations, after the oil phase has been flowed out of the measurement cell <NUM>, the internal volume of the measurement cell <NUM> can be cleaned. To do so, a naphtha storage tank <NUM> can be fluidically connected to the measurement cell <NUM> by a fluid flow pathway with a valve controlled by the controller <NUM>. The controller <NUM> can cause naphtha from the naphtha storage tank <NUM> to be flowed into the measurement cell <NUM> to purge any residual contents in the measurement cell <NUM>. After purging, the naphtha can be flowed to the sample recovery cell <NUM> through the outlet <NUM> of the measurement cell <NUM>.

In some implementations, the system <NUM> includes a vessel <NUM> fluidically connected to an outlet of the sample recovery cell <NUM> by a fluid flow pathway with a valve controlled by the controller <NUM>. The contents of the sample recovery cell <NUM> can be flowed to the vessel <NUM> for subsequent disposal. For example, the vessel <NUM> can be a water-oil separator (WOSEP), which is a produced water treatment unit found in oil and gas processing facilities. The contents of the sample recovery cell <NUM> are sent to the WOSEP because the contents are mostly composed of produced water and trace of crude oil, and the WOSEP is best suited to treat such a composition and ensure its removal from the produced water. Water in the WOSEP can be injected in the subterranean zone to maintain reservoir pressure or recovered and reinjected in disposal wells or discharged overboard. The techniques described here are implemented downstream of the WOSEP. Disposal streams are then sent back to the WOSEP to ensure removal of measured oil, naphtha used to clean the cell and slip hexane.

In some implementations, the system <NUM> includes one or more flow control devices <NUM> fluidically coupled to flow pathways throughout the system <NUM>, for example, to each of the sample cell <NUM>, the measurement cell <NUM>, the sample recovery cell <NUM> and other components described earlier. The one or more flow control devices include pumps that can flow fluids through the system <NUM>. In some implementations, flow through the system <NUM> can be implemented by creating pressure differentials that cause fluids to flow in the desired direction. For example, the n-hexane can be injected through a pump or the chemical element storage tank <NUM> can be pressurized with an inert and dry gas, for example, nitrogen. Fixed volume sampling loops can be used to control the volume fractions of the oil and water phases.

<FIG> is a flowchart of an example of a process <NUM> implemented by the system of <FIG>. Some or all of the steps of the process <NUM> can be implemented by a controller, for example, the controller <NUM>. In some implementations, the controller includes one or more processors and a computer-readable medium (for example, a non-transitory, computer-readable medium) storing instructions executable by the one or more processors to perform operations described with reference to the process <NUM> as well as those described generally in this disclosure. In some implementations, the controller can be implemented as software, firmware, hardware, processing circuitry, or any combination of them together with or independently of the one or more processors, and the computer-readable medium. As described earlier, the method can be implemented on-site of a flowline, for example, the flowline <NUM>, transporting the fluid, for example, produced water, that includes an oil phase and a water phase.

At <NUM>, a sample of the fluid flowed through the flowline is obtained. The sample includes the oil phase and the water phase, specifically, oil dispersed in water. For example, the controller <NUM> can control the fluid sampling system <NUM> to obtain a quantity of the sample from the flowline <NUM>. At <NUM>, the sample is combined with a chemical element configured to separate the oil phase in the sample from the water phase in the sample. For example, the controller <NUM> can flow the sample obtained by the fluid sampling system <NUM> to the sample cell <NUM>. The controller <NUM> can flow n-hexane from the chemical element storage tank <NUM> into the sample cell <NUM>. The controller <NUM> can operate a mixer (for example, the mixer <NUM> or the mixer <NUM>). To mix the sample and the n-hexane. In some implementations, the controller <NUM> can operate the heater installed in the sample cell <NUM> to heat the internal volume of the sample cell during the mixing. As described earlier, mixing the sample with the n-hexane causes the oil phase and the water phase to separate. At <NUM>, the separated oil phase and the chemical element are transferred into a measurement cell. For example, the controller <NUM> can flow the water phase from the sample cell <NUM> to the sample recovery cell <NUM>, and flow the separated oil phase and the n-hexane from the sample cell <NUM> to the measurement cell <NUM>. At <NUM>, the chemical element is removed from the measurement cell. For example, the controller <NUM> can operate the electrical heaters installed in the measurement cell <NUM> to heat the combination of the oil phase and the n-hexane, thereby boiling off or evaporating the n-hexane out of the measurement cell <NUM>. At <NUM>, a quantity of the oil phase in the sample in the measurement cell <NUM> is determined. For example, the controller <NUM> can implement the capacitive measurement technique described earlier to determine the quantity of the oil phase in the sample that remains in the measurement cell <NUM> after the n-hexane has been removed from the measurement cell <NUM>. At <NUM>, the determined quantity is provided. For example, the controller <NUM> can include, or be operatively connected to a display device. The controller <NUM> can transmit the determined oil phase quantity to be displayed in the display device. Alternatively or in addition, the controller <NUM> can determine an oil in water quantity for the obtained sample. For example, if the quantity of sample obtained is one liter (<NUM>) and the quantity of oil phase in the sample is <NUM>µL, then the oil in water quantity for the sample is <NUM>µL divided by <NUM>, which is <NUM> parts per million by volume (ppmv).

After the quantity of the oil phase has been determined, the oil phase and any remaining sample can be purged from the measurement cell <NUM> by a naphtha flow from the naphtha storage tank <NUM>. The purged sample flows to the sample recovery cell <NUM> from which it can be flowed to the WOSEP <NUM>. In some implementations, the measurement cell can be calibrated using a known amount of mineral oil and water, followed by the measurement of the remaining volume of the mineral oil after extraction and evaporation of the n-hexane, as described earlier. In some implementations, a mixer (not shown) can be implemented in the flowline <NUM> upstream of the sampling point at which the fluid sampling system <NUM> draws the sample. Doing so can ensure that the oil phase and the water phase ratio in the sample is representative of the corresponding ratio in the fluid flowed through the flowline <NUM>. In some implementations, the flow pathways (that is, the tubes) through which the fluid sampling system <NUM> draws fluid from the flowline <NUM> can be treated (for example, an electro polish treatment or similar chemical treatment) to prevent water from adhering to the inner walls of the flow pathways.

In sum, the techniques described here implement a volumetric measurement cell that replaces equipment used in a gravimetric approach. The measurement cell does not need a glass window or similar transparent surface to induce and measure sample fluorescence, thereby avoiding the risk of fouling. Because the measurement system is online and on-site, and is fed by a side stream retrieved directly from the flowline, more than one measurement cell can be implemented in parallel. At every time instant, one cell can perform the measurement described earlier, one cell can be cleaned with a crude oil solvent, for example, naphtha or toluene, and one cell is in standby for redundancy. The measurement system described here can increase the measurement range from a few parts per million (ppm) to <NUM> ppm, to few ppm to percentage as the measurement cell of the measurement system can be designed to carry different volumes of the oil phase remaining after n-hexane evaporation. The evaporated n-hexane can be recovered, thereby reducing n-hexane consumption.

Claim 1:
A method (<NUM>) implemented on-site of a flowline transporting a fluid comprising an oil phase and a water phase, the method comprising:
obtaining (<NUM>) a sample of the fluid flowed through the flowline, wherein the sample comprises the oil phase and the water phase;
combining (<NUM>) the sample with a chemical element configured to separate the oil phase in the sample from the water phase in the sample;
transferring (<NUM>) the separated oil phase and the chemical element into a measurement cell;
removing (<NUM>) the chemical element from the measurement cell;
after removing the chemical element from the measurement cell, determining (<NUM>) a quantity of the oil phase in the sample in the measurement cell; and
providing (<NUM>) the determined quantity of the oil phase in the sample,
characterised in that
the step of determining the quantity of the oil phase in the sample in the measurement cell is performed by a capacitive measurement technique.