Utilizing natural gas flaring byproducts for liquid unloading in gas wells

A production stream is received from a well formed in a subterranean formation. The production stream includes a gaseous portion and a liquid portion. The liquid portion has a base sediment and water (BS&W) percentage. At least a portion of the gaseous portion of the production stream is combusted to produce a flaring byproduct stream. The flaring byproduct stream is flowed through a coiled tubing to the well. The BS&W percentage of the liquid portion of the production stream is measured. The flow of the flaring byproduct stream to the well is decreased in response to the BS&W percentage reaching a threshold BS&W percentage.

TECHNICAL FIELD

This disclosure relates to liquid unloading in gas wells.

BACKGROUND

As natural gas is produced from a well formed in a subterranean formation, liquids (for example, oil, condensate, and/or water) may accumulate over time. Liquids may accumulate due to a variety of factors, for example, a decrease in gas velocity in the well, a decrease in reservoir pressure, and/or a change in gas-to-liquid ratio. In some cases, liquid that is used to stimulate a well accumulates in the well due to the limited capability of the reservoir's pressure to carry the stimulation liquid out of the well. The accumulated liquids can negatively impact production of natural gas from the well. For example, as liquids accumulate in the well, natural gas production from the well may decline due to an increase in hydrostatic pressure in the well caused by the accumulation of liquid.

SUMMARY

This disclosure describes technologies relating to utilizing natural gas flaring byproducts for liquid unloading in gas wells. Certain aspects of the subject matter described can be implemented as a method. A quantity of a nitrogen stream is flowed through a coiled tubing to a well formed in a subterranean formation to begin a liquid unloading process in the well. A production stream is received from the well in response to flowing the nitrogen stream. At least a portion of the production stream is combusted to produce a flaring byproduct stream. A quantity of the flaring byproduct stream is flowed with the nitrogen stream through the coiled tubing to the well to continue the liquid unloading process in the well. A flow rate of the flaring byproduct stream is measured. The flow of the nitrogen stream to the well is decreased in response to the flow rate of the flaring byproduct stream reaching a threshold flow rate. A base sediment and water (BS&W) percentage of the production stream is measured. The flow of the flaring byproduct stream to the well is decreased in response to the BS&W percentage reaching a threshold BS&W percentage.

This, and other aspects, can include one or more of the following features. In some implementations, the threshold flow rate is about 700 standard cubic feet per minute (SCFM). In some implementations, the threshold BS&W percentage is about 10%. In some implementations, the flaring byproduct stream includes about 99 volume percent (vol. %) of carbon dioxide. In some implementations, the flaring byproduct stream is cooled before flowing the flaring byproduct stream with the nitrogen stream through the coiled tubing to the well. In some implementations, the flow of the nitrogen stream to the well is decreased until the flow of the nitrogen stream to the well stops. In some implementations, the flow of the flaring byproduct stream to the well is decreased until the flow of the flaring byproduct stream to the well stops. In some implementations, the well is fluidically connected to a gas processing plant after the flow of the flaring byproduct stream to the well stops. In some implementations, the well is fluidically connected to a gas pipeline after the flow of the flaring byproduct stream to the well stops.

Certain aspects of the subject matter described can be implemented as a method. A production stream is received from a well formed in a subterranean formation. The production stream includes a gaseous portion and a liquid portion. The liquid portion has a BS&W percentage. At least a portion of the gaseous portion of the production stream is combusted to produce a flaring byproduct stream. The flaring byproduct stream is flowed through a coiled tubing to the well. The BS&W percentage of the liquid portion of the production stream is measured. The flow of the flaring byproduct stream to the well is decreased in response to the BS&W percentage reaching a threshold BS&W percentage.

This, and other aspects, can include one or more of the following features. In some implementations, the threshold BS&W percentage is about 10%. In some implementations, the flaring byproduct stream includes about 99 volume percent (vol. %) of carbon dioxide. In some implementations, the flaring byproduct stream is cooled before flowing the flaring byproduct stream through the coiled tubing to the well. In some implementations, the flow of the flaring byproduct stream to the well is decreased until the flow of the flaring byproduct stream to the well stops. In some implementations, the well is fluidically connected to a gas processing plant after the flow of the flaring byproduct stream to the well stops. In some implementations, the well is fluidically connected to a gas pipeline after the flow of the flaring byproduct stream to the well stops.

DETAILED DESCRIPTION

This disclosure describes technologies relating to utilizing natural gas flaring byproducts for liquid unloading in gas wells. Natural gas flaring byproducts during flowback from a gas well can be used to perform post-stimulation liquid unloading and condensate unloading in the same gas well. Natural gas produced during the post-stimulation clean-up process before connecting the well to a production line is typically flared and released to the atmosphere. As described in this disclosure, the otherwise wasted flaring byproducts can be used by pumping the byproducts through a coiled tubing into a gas well to facilitate liquid unloading from the gas well. The flaring byproducts are therefore circulated through the gas well to unload liquids from the well. The subject matter described in this disclosure can be implemented in particular implementations, so as to realize one or more of the following advantages. The use of such flaring byproducts for this purpose can reduce the demand of nitrogen, which is typically used in liquid unloading processes. Further, the use of the flaring byproducts into a gas well to displace liquid from the same gas well can improve clean-up processes in preparation for hydrocarbon recovery.

FIG.1depicts an example well100constructed in accordance with the concepts herein. The well100extends from the surface106through the Earth108to one more subterranean zones of interest110(one shown). The well100enables access to the subterranean zones of interest110to allow recovery (that is, production) of fluids to the surface106(represented by flow arrows inFIG.1) and, in some implementations, additionally or alternatively allows fluids to be placed in the Earth108. In some implementations, the subterranean zone110is a formation within the Earth108defining a reservoir, but in other instances, the zone110can be multiple formations or a portion of a formation. The subterranean zone can include, for example, a formation, a portion of a formation, or multiple formations in a hydrocarbon-bearing reservoir from which recovery operations can be practiced to recover trapped hydrocarbons. In some implementations, the subterranean zone includes an underground formation of naturally fractured or porous rock containing hydrocarbons (for example, oil, gas, or both). In some implementations, the well can intersect other types of formations, including reservoirs that are not naturally fractured. For simplicity's sake, the well100is shown as a vertical well, but in other instances, the well100can be a deviated well with a wellbore deviated from vertical (for example, horizontal or slanted), the well100can include multiple bores forming a multilateral well (that is, a well having multiple lateral wells branching off another well or wells), or both.

In some implementations, the well100is a gas well that is used in producing hydrocarbon gas (such as natural gas) from the subterranean zones of interest110to the surface106. While termed a “gas well,” the well can produce dry gas and may incidentally, or in much smaller quantities, produce liquid including oil, water, or both. In some implementations, the production from the well100can be multiphase in any ratio. In some implementations, the production from the well100can produce mostly or entirely liquid at certain times and mostly or entirely gas at other times. For example, in certain types of wells it is common to produce water for a period of time to gain access to the gas in the subterranean zone. The concepts herein, though, are not limited in applicability to gas wells, oil wells, or even production wells, and could be used in wells for producing other gas or liquid resources or could be used in injection wells, disposal wells, or other types of wells used in placing fluids into the Earth.

The wellbore of the well100is typically, although not necessarily, cylindrical. All or a portion of the wellbore is lined with a tubing, such as casing112. The casing112connects with a wellhead at the surface106and extends downhole into the wellbore. The casing112operates to isolate the bore of the well100, defined in the cased portion of the well100by the inner bore116of the casing112, from the surrounding Earth108. The casing112can be formed of a single continuous tubing or multiple lengths of tubing joined (for example, threadedly) end-to-end. InFIG.1, the casing112is perforated in the subterranean zone of interest110to allow fluid communication between the subterranean zone of interest110and the bore116of the casing112. In some implementations, the casing112is omitted or ceases in the region of the subterranean zone of interest110. This portion of the well100without casing is often referred to as “open hole.” The wellhead defines an attachment point for other equipment to be attached to the well100. For example,FIG.1shows well100being produced with a Christmas tree attached to the wellhead. The Christmas tree includes valves used to regulate flow into or out of the well100. In some implementations, the well100includes a combustion chamber203. The combustion chamber203can be used to combust a gas and is described in more detail later.

FIG.2Ais a schematic diagram of a system200for liquid unloading in a well (for example, the well100). In some implementations, the well100has already been stimulated to promote hydrocarbon recovery from the well100. As natural gas is produced from the well100, liquids (for example, oil, condensate, and/or water) may accumulate over time. Liquids may accumulate due to a variety of factors, for example, a decrease in gas velocity in the well100, a decrease in reservoir pressure, a change in gas-to-liquid ratio, or a combination of these. The accumulated liquids can negatively impact production of natural gas from the well100. For example, as liquids accumulate in the well100, natural gas production from the well100may decline due to the increase in hydrostatic pressure in the well100. In some cases, liquid is used to stimulate the well100, and the liquid used to stimulate the well100needs to be unloaded from the well100. In some cases, the gas reservoir near the well100is saturated with stimulation liquid, and the liquid needs to be unloaded via the well100. A liquid unloading process can be implemented to unload the liquid and restore natural gas production from the well100. In some cases, gas (such as nitrogen) is pumped into the well100to facilitate the liquid unloading process. In this disclosure, during a liquid unloading process, natural gas produced from the well100is flared, and the flaring byproducts are pumped into the same well100to facilitate the liquid unloading process. In this way, the flaring byproducts are used instead of simply being wasted and released to the atmosphere. The use of the flaring byproducts can also reduce the use of nitrogen.

A production stream201is produced from the well100. The production stream201includes a gaseous portion and a liquid portion. The gaseous portion can include, for example, natural gas. The liquid portion can include, for example, crude oil, gas condensate, an aqueous phase (that is, fluid including water), or a combination of these. The liquid portion has a base sediment and water (BS&W) percentage that can be measured, for example, at the surface106. In some implementations, phases of the production stream201(such as the gaseous portion and the liquid portion) are separated at the surface106.

During the liquid unloading process, at least a portion of the gaseous portion of the production stream201is flowed to a combustion chamber203and combusted in the combustion chamber203. A source of oxygen (for example, air) can be flowed to the combustion chamber203to facilitate combustion of the gaseous portion of the production stream201. Combustion of the gaseous portion of the production stream201produces a flaring byproduct stream205. The flaring byproduct stream205can be made of mostly carbon dioxide (CO2). In some implementations, the flaring byproduct stream205is at least 99 volume percent (vol. %) CO2, at least 99.1 vol. % CO2, at least 99.2 vol. % CO2, at least 99.3 vol. % CO2, at least 99.4 vol. % CO2, at least 99.5 vol. % CO2, at least 99.6 vol. % CO2, or at least 99.7 vol. % CO2. CO2is a well-known greenhouse gas. Typically, flaring byproducts are simply released to the atmosphere and therefore contribute to overall emissions of a facility. Instead of releasing the flaring byproduct stream205to the atmosphere, some or all of the flaring byproduct stream205is flowed to the well100through a coiled tubing207. At least a portion of the flaring byproduct stream205can be flowed to the well100using, for example, a pump209. A tubing fluidically connects the combustion chamber203to the pump209, and at least a portion of the flaring byproduct stream205flows from the combustion chamber203to the pump209via the tubing. In some implementations, at least a portion of the flaring byproduct stream205is cooled before it is pumped into the well100. In some implementations, the system200includes a cooler211that cools the flaring byproduct stream205before it is pumped into the well100by pump209. The cooler211can be, for example, an air cooler or a shell-and-tube heat exchanger. The coiled tubing207is fluidically connected to the pump209. The pump209facilitates flow of the flaring byproduct stream205from the combustion chamber203and into the well100.

Flowing the flaring byproduct stream205to the well100can facilitate liquid unloading from the well100. The production stream201continues to flow from the well100throughout the liquid unloading process. During the liquid unloading process, the BS&W percentage of the liquid portion of the production stream201can be measured, for example, using a sampler and/or a sensor. In some implementations, the system200includes a controller400that periodically communicates with the sampler and/or sensor to determine the BS&W percentage of the liquid portion of the production stream201. The controller400is described in more detail later. As the liquid unloading process progresses, the BS&W percentage of the liquid portion of the production stream201can decrease. The BS&W percentage can be correlated to an extent of liquid accumulation in the well100. Once the BS&W percentage has decreased enough to reach a threshold BS&W percentage, the liquid unloading process can be terminated. In some implementations, the threshold BS&W percentage is about 15%, about 10%, about 5%, about 4%, about 3%, about 2%, about 1%, or less than 1%. In some implementations, the flow rate and the pressure of the gas portion of the production stream201are measured. In cases where the production stream201is dry, once the flow rate of the gas portion of the production stream201has reached a threshold gas flow rate and/or the pressure of the gas portion of the production stream201has reached a threshold gas pressure, the liquid unloading process can be terminated.

Termination of the liquid unloading process can include stopping combustion of the gaseous portion of the production stream201. Stopping combustion of the gaseous portion of the production stream201halts the production of the flaring byproduct stream205and therefore decreases the flow of the flaring byproduct stream205to the well100. Eventually, the flow of the flaring byproduct stream205to the well100stops. Termination of the liquid unloading process can include decreasing and/or stopping pumping of the flaring byproduct stream205by the pump209to the well100. In some implementations, the controller400is communicatively coupled to the pump209. In some implementations, the controller400is configured to transmit a stop signal to the pump209to decrease and/or stop pumping of the flaring byproduct stream205by the pump209to the well100in response to determining that the BS&W percentage measured by the sampler and/or sensor has reached the threshold BS&W percentage. In some implementations, the well100is connected to a gas processing plant after flow of the flaring byproduct stream205to the well100stops. Then the production stream201flows to the gas processing plant instead of being flowed to the combustion chamber203and back into the well100. In some implementations, the well100is connected to a gas pipeline (for example, for transport to a gas processing plant) after flow of the flaring byproduct stream205to the well100stops. Then the production stream201flows to the gas pipeline instead of being flowed to the combustion chamber203and back into the well100.

FIG.2Bis a flow chart for a liquid unloading process250for a well (for example, the well100). The system200can implement the liquid unloading process250. As described previously, the well100is formed in a subterranean formation. In some implementations, the well100has been stimulated (for example, by using a stimulation liquid) before implementing the liquid unloading process250. At block252, a production stream (201) is received from the well100. As described previously, the production stream201includes a gaseous portion and a liquid portion. The liquid portion has a BS&W percentage that can be measured. At block254, at least a portion of gaseous portion of the production stream201is combusted to produce a flaring byproduct stream (205). At block256, the flaring byproduct stream205is flowed through a coiled tubing (207) to the well100. In some implementations, the flaring byproduct stream205is cooled before being flowed to the well100at block256.

At block258, a BS&W percentage of the liquid portion of the production stream201is measured. At block260, the flow of the flaring byproduct stream205to the well100is decreased in response to the BS&W percentage reaching a threshold BS&W percentage. In some implementations, the threshold BS&W percentage is about 15%, about 10%, about 5%, about 4%, about 3%, about 2%, about 1%, or less than 1%. The flow of the flaring byproduct stream205to the well100can be decreased at block260by decreasing the amount of the gaseous portion of the production stream201that is combusted at block254. By decreasing the amount of the production stream201that is combusted, the amount of flaring byproducts produced is decreased. In some implementations, the flow of the flaring byproduct stream205to the well100is decreased at block260until the flow of the flaring byproduct stream205to the well100stops (that is, the flow rate of the flaring byproduct stream205reaches zero). In some implementations, the well100is connected to a gas processing plant after flow of the flaring byproduct stream205to the well100stops. Then the production stream201flows to the gas processing plant instead of being flowed to the combustion chamber203and back into the well100. In some implementations, the well100is connected to a gas pipeline (for example, for transport to a gas processing plant) after flow of the flaring byproduct stream205to the well100stops. Then the production stream201flows to the gas pipeline instead of being flowed to the combustion chamber203and back into the well100.

FIG.3Ais a schematic diagram of a system300for liquid unloading in a well (for example, the well100). A production stream301is produced from the well100. In some implementations, the production stream301is substantially the same as the production stream201shown inFIG.2A. The production stream301includes a gaseous portion and a liquid portion. The gaseous portion can include, for example, natural gas. The liquid portion can include, for example, crude oil, gas condensate, an aqueous phase (that is, fluid including water), or a combination of these. The liquid portion has a base sediment and water (BS&W) percentage that can be measured, for example, at the surface106. In some implementations, phases of the production stream301(such as the gaseous portion and the liquid portion) are separated at the surface106. In some cases, pressure in the reservoir (also referred as reservoir pressure) is insufficient to meet a desired flow rate from the well100during the liquid unloading process. To promote flow of the production stream301from the well100, a nitrogen stream302is flowed to the well100through a coiled tubing307. The nitrogen stream302includes nitrogen (N2). In some implementations, the coiled tubing307is substantially the same as the coiled tubing207shown inFIG.2A. The nitrogen stream302can be flowed to the well100using, for example, a pump309. In some implementations, the pump309is substantially the same as the pump209shown inFIG.2A.

During the liquid unloading process, at least a portion of the gaseous portion of the production stream301is flowed to a combustion chamber303and combusted in the combustion chamber303. In some implementations, the combustion chamber303is substantially the same as the combustion chamber203shown inFIG.2A. A source of oxygen (for example, air) can be flowed to the combustion chamber303to facilitate combustion of the gaseous portion of the production stream301. Combustion of the gaseous portion of the production stream301produces a flaring byproduct stream305. In some implementations, the flaring byproduct stream305is substantially the same as the flaring byproduct stream205shown inFIG.2A. The flaring byproduct stream305can be made of mostly CO2. In some implementations, the flaring byproduct stream305is about 99 vol. % CO2, at least 99 vol. % CO2, at least 99.1 vol. % CO2, at least 99.2 vol. % CO2, at least 99.3 vol. % CO2, at least 99.4 vol. % CO2, at least 99.5 vol. % CO2, at least 99.6 vol. % CO2, or at least 99.7 vol. % CO2. Instead of releasing the flaring byproduct stream305to the atmosphere, some or all of the flaring byproduct stream305is flowed to the well100through the coiled tubing307. At least a portion of the flaring byproduct stream305can be flowed with the nitrogen stream302to the well100through the coiled tubing307. A tubing fluidically connects the combustion chamber303to the pump309, and at least a portion of the flaring byproduct stream305flows from the combustion chamber303to the pump309via the tubing. At least a portion of the flaring byproduct stream305can be flowed to the well100using, for example, the pump309. In some implementations, at least a portion of the flaring byproduct stream305is cooled before it is pumped into the well100. In some implementations, the system300includes a cooler311that cools the flaring byproduct stream305before it is pumped into the well100by pump309. In some implementations, the cooler311is substantially the same as the cooler211shown inFIG.2A. The coiled tubing307is fluidically connected to the pump309. The pump309facilitates flow of the flaring byproduct stream305from the combustion chamber303and into the well100.

Flowing the flaring byproduct stream305and the nitrogen stream302to the well100can facilitate liquid unloading from the well100. The production stream301continues to flow from the well100throughout the liquid unloading process. Because the flaring byproduct stream305is produced by combustion of the gaseous portion of the production stream301, the flow rate of the production stream301from the well100is directly related to the flow rate of the flaring byproduct stream305. The flow rate of the flaring byproduct stream305can be measured, for example, using a flowmeter. In some implementations, the controller400is communicatively coupled to the flowmeter and periodically communicates with the flowmeter to determine the flow rate of the flaring byproduct stream305. Once the flow rate of the flaring byproduct stream305reaches a threshold flow rate, the flow of the nitrogen stream302to the well100can be decreased. In some implementations, the controller400is communicatively coupled to a control valve that can be adjusted to control the flow rate of the nitrogen stream302. In some implementations, the controller400is configured to transmit a signal to the control valve to decrease and/or stop the flow of the nitrogen stream302to the pump309in response to determining that the flow rate of the flaring byproduct stream305has reached the threshold flow rate. In some implementations, the threshold flow rate is about 700 standard cubic feet per minute (SCFM). In some implementations, the flow rate of the nitrogen stream302is adjusted (for example, by the controller400), such that the total flow rate of the nitrogen stream302and the flaring byproduct stream305equals the threshold flow rate. As one example, at the beginning of the liquid unloading process, the nitrogen stream302is flowed at a flow rate equal to the threshold flow rate. As the production stream301flows from the well100and is combusted to produce the flaring byproduct stream305, the flaring byproduct stream305contributes to the overall flow along with the nitrogen stream302to the well100through the coiled tubing307. As the flow rate of the flaring byproduct stream305increases, the flow rate of the nitrogen stream302can be decreased, such that the total flow rate of the nitrogen stream302and the flaring byproduct stream305equals the threshold flow rate. Once the flow rate of the flaring byproduct stream305reaches the threshold flow rate, the flow of the nitrogen stream302to the well100can be terminated (that is, the flow rate of the nitrogen stream302reaches zero). The flow rate of the nitrogen stream302throughout these steps can be automatically controlled, for example, by the controller400.

During the liquid unloading process, the BS&W percentage of the liquid portion of the production stream301can be measured, for example, using a sampler and/or a sensor. In some implementations, the system300includes a controller400that periodically communicates with the sampler and/or sensor to determine the BS&W percentage of the liquid portion of the production stream301. As the liquid unloading process progresses, the BS&W percentage of the liquid portion of the production stream301can decrease. Once the BS&W percentage has decreased enough to reach a threshold BS&W percentage, the liquid unloading process can be terminated. In some implementations, the threshold BS&W percentage is about 15%, about 10%, about 5%, about 4%, about 3%, about 2%, about 1%, or less than 1%. Termination of the liquid unloading process can include stopping combustion of the gaseous portion of the production stream301. Stopping combustion of the gaseous portion of the production stream301halts the production of the flaring byproduct stream305and therefore decreases the flow of the flaring byproduct stream305to the well100. Eventually, the flow of the flaring byproduct stream305to the well100stops. Termination of the liquid unloading process can include decreasing and/or stopping pumping of the flaring byproduct stream305by the pump309to the well100. In some implementations, the controller400is communicatively coupled to the pump309. In some implementations, the controller400is configured to transmit a stop signal to the pump309to decrease and/or stop pumping of the flaring byproduct stream305by the pump309to the well100in response to determining that the BS&W percentage measured by the sampler and/or sensor has reached the threshold BS&W percentage. In some implementations, the well100is connected to a gas processing plant after flow of the flaring byproduct stream305to the well100stops. Then the production stream301flows to the gas processing plant instead of being flowed to the combustion chamber303and back into the well100. In some implementations, the well100is connected to a gas pipeline (for example, for transport to a gas processing plant) after flow of the flaring byproduct stream305to the well100stops. Then the production stream301flows to the gas pipeline instead of being flowed to the combustion chamber303and back into the well100.

FIG.3Bis a flow chart for a liquid unloading process350for a well (for example, the well100). The system300can implement the liquid unloading process350. As described previously, the well100is formed in a subterranean formation. In some implementations, the well100has been stimulated (for example, by using a stimulation liquid) before implementing the liquid unloading process350. At block352, a quantity of a nitrogen stream (302) is flowed through a coiled tubing (307) to the well100to begin the liquid unloading process350. At block354, a production stream (301) is received from the well100in response to flowing the nitrogen stream302at block352. At block356, at least a portion of the production stream301(for example, a gaseous portion of the production stream301) is combusted to produce a flaring byproduct stream (305). At block358, a quantity of the flaring byproduct stream305is flowed with the nitrogen stream302through the coiled tubing307to the well100to continue the liquid unloading process350. In some implementations, the flaring byproduct stream305is cooled before being flowed to the well100at block358.

At block360, a flow rate of the flaring byproduct stream305is measured (for example, using a flowmeter). At block362, the flow of the nitrogen stream302to the well100is decreased in response to the flow rate of the flaring byproduct stream305reaching a threshold flow rate. In some implementations, the threshold flow rate is about 700 SCFM. In some implementations, the quantity by which the flow rate of the nitrogen stream302to the well100is decreased at block362is equal to an increase in the flow rate of the flaring byproduct stream305to the well100from block358to block362(for example, a difference between the threshold flow rate and an initial flow rate of the flaring byproduct stream305). In some implementations, the flow of the nitrogen stream302to the well100is decreased at block362until the flow of the nitrogen stream302to the well100stops (that is, the flow rate of the nitrogen stream302reaches zero).

At block364, a BS&W percentage of the production stream301is measured. In some implementations, the BS&W percentage of the liquid portion of the production stream301is measured at block364. At block368, the flow of the flaring byproduct stream305to the well100is decreased in response to the BS&W percentage reaching a threshold BS&W percentage. In some implementations, the threshold BS&W percentage is about 15%, about 10%, about 5%, about 4%, about 3%, about 2%, about 1%, or less than 1%. The flow of the flaring byproduct stream305to the well100can be decreased at block368by decreasing the amount of the production stream301that is combusted. By decreasing the amount of the production stream301that is combusted, the amount of flaring byproducts produced is decreased. In some implementations, the flow of the flaring byproduct stream305to the well100is decreased at block368until the flow of the flaring byproduct stream305to the well100stops (that is, the flow rate of the flaring byproduct stream305reaches zero). In some implementations, the well100is connected to a gas processing plant after flow of the flaring byproduct stream305to the well100stops. Then the production stream301flows to the gas processing plant instead of being flowed to the combustion chamber303and back into the well100. In some implementations, the well100is connected to a gas pipeline (for example, for transport to a gas processing plant) after flow of the flaring byproduct stream305to the well100stops. Then the production stream301flows to the gas pipeline instead of being flowed to the combustion chamber303and back into the well100.

FIG.4is a block diagram of an implementation of the controller400used to provide computational functionalities associated with described algorithms, methods, functions, processes, flows, and procedures, as described in this specification, according to an implementation. The illustrated computer402is intended to encompass any computing device such as a server, desktop computer, laptop/notebook computer, one or more processors within these devices, or any other processing device, including physical or virtual instances (or both) of the computing device. Additionally, the computer402can include a computer that includes an input device, such as a keypad, keyboard, touch screen, or other device that can accept user information, and an output device that conveys information associated with the operation of the computer402, including digital data, visual, audio information, or a combination of information.

The computer402includes an interface404. Although illustrated as a single interface404inFIG.4, two or more interfaces404may be used according to particular needs, desires, or particular implementations of the computer402. Although not shown inFIG.4, the computer402can be communicably coupled with a network. The interface404is used by the computer402for communicating with other systems that are connected to the network in a distributed environment. Generally, the interface404comprises logic encoded in software or hardware (or a combination of software and hardware) and is operable to communicate with the network. More specifically, the interface404may comprise software supporting one or more communication protocols associated with communications such that the network or interface's hardware is operable to communicate physical signals within and outside of the illustrated computer402.

The computer402includes a processor405. Although illustrated as a single processor405inFIG.4, two or more processors may be used according to particular needs, desires, or particular implementations of the computer402. Generally, the processor405executes instructions and manipulates data to perform the operations of the computer402and any algorithms, methods, functions, processes, flows, and procedures as described in this specification.

The computer402can also include a database406that can hold data for the computer402or other components (or a combination of both) that can be connected to the network. Although illustrated as a single database406inFIG.4, two or more databases (of the same or combination of types) can be used according to particular needs, desires, or particular implementations of the computer402and the described functionality. While database406is illustrated as an integral component of the computer402, database406can be external to the computer402.

The computer402also includes a memory407that can hold data for the computer402or other components (or a combination of both) that can be connected to the network. Although illustrated as a single memory407inFIG.4, two or more memories407(of the same or combination of types) can be used according to particular needs, desires, or particular implementations of the computer402and the described functionality. While memory407is illustrated as an integral component of the computer402, memory407can be external to the computer402. The memory407can be a transitory or non-transitory storage medium.

The memory407stores computer-readable instructions executable by the processor405that, when executed, cause the processor405to perform operations, such as communicate with a sampler and/or a sensor to measure a flow rate of the production stream (201or301), communicate with a sampler and/or sensor to measure a flow rate of the flaring byproduct stream (205or305), communicate with a sampler and/or a sensor to measure a BS&W percentage of the production stream (201or301), any of the blocks of the process250, any of the blocks of the process350, or any combination of these. The computer402can also include a power supply414. The power supply414can include a rechargeable or non-rechargeable battery that can be configured to be either user- or non-user-replaceable. The power supply414can be hard-wired. There may be any number of computers402associated with, or external to, a computer system containing computer402, each computer402communicating over the network. Further, the term “client,” “user,” “operator,” and other appropriate terminology may be used interchangeably, as appropriate, without departing from this specification. Moreover, this specification contemplates that many users may use one computer402, or that one user may use multiple computers402.

As used in this disclosure, the term “about” or “approximately” can allow for a degree of variability in a value or range, for example, within 10%, within 5%, or within 1% of a stated value or of a stated limit of a range.

Values expressed in a range format should be interpreted in a flexible manner to include not only the numerical values explicitly recited as the limits of the range, but also to include all the individual numerical values or sub-ranges encompassed within that range as if each numerical value and sub-range is explicitly recited. For example, a range of “0.1% to about 5%” or “0.1% to 5%” should be interpreted to include about 0.1% to about 5%, as well as the individual values (for example, 1%, 2%, 3%, and 4%) and the sub-ranges (for example, 0.1% to 0.5%, 1.1% to 2.2%, 3.3% to 4.4%) within the indicated range. The statement “X to Y” has the same meaning as “about X to about Y,” unless indicated otherwise. Likewise, the statement “X, Y, or Z” has the same meaning as “about X, about Y, or about Z,” unless indicated otherwise.

Moreover, the separation or integration of various system modules and components in the previously described implementations should not be understood as requiring such separation or integration in all implementations, and it should be understood that the described components and systems can generally be integrated together or packaged into multiple products.