Login| Sign Up| Help| Contact|

Patent Searching and Data


Title:
ASSESSING WHETHER TO MODIFY A PIPE SYSTEM
Document Type and Number:
WIPO Patent Application WO/2016/073418
Kind Code:
A1
Abstract:
Disclosed techniques for deciding whether to modify a pipe system accessing a petroleum reservoir include: measuring at least one characteristic of a flow of fluid in the pipe system; representing the at least one characteristic of the flow of fluid as an unrestricted pipe flow equation that is active when a constriction device is not active; representing a constraint on the flow of fluid provided by the at least one constriction device by a constraint equation that is active when the constriction device is active; introducing a first slack variable into the unrestricted pipe flow equation and a second slack variable into the constraint equation; iteratively solving a system of equations including the unrestricted pipe flow and constraint equations; modeling a potential modification of the pipe system; and determining, based on the modeling, whether to implement the potential modification of the pipe system.

Inventors:
EDWARDS DAVID A (GB)
GEIGER CLEMENT (FR)
Application Number:
PCT/US2015/058736
Publication Date:
May 12, 2016
Filing Date:
November 03, 2015
Export Citation:
Click for automatic bibliography generation   Help
Assignee:
SCHLUMBERGER CA LTD (CA)
SCHLUMBERGER SERVICES PETROL (FR)
LOGINED BV (NL)
PRAD RES & DEV LTD
SCHLUMBERGER TECHNOLOGY CORP (US)
International Classes:
E21B43/00; E21B43/12; F17D1/00; F17D3/00
Domestic Patent References:
WO2013187915A22013-12-19
Foreign References:
US20110320047A12011-12-29
US20100131257A12010-05-27
US20080140369A12008-06-12
US20110040536A12011-02-17
Attorney, Agent or Firm:
WIER, Colin et al. (IP Administration Center of ExcellenceRoom 472, Houston Texas, US)
Download PDF:
Claims:
CLAIMS

What is claimed is:

1. A method for deciding whether to modify a pipe system accessing a petroleum reservoir, the method comprising:

obtaining at least one characteristic of a flow of fluid in the pipe system, wherein the pipe system comprises at least one wellbore pipe accessing contents of the petroleum reservoir, wherein the pipe system comprises at least one constriction device;

representing the at least one characteristic of the flow of fluid as an unrestricted pipe flow equation, wherein the an unrestricted pipe flow equation is active when the constriction device is not active;

representing a constraint on the flow of fluid provided by the at least one constriction device by a constraint equation, wherein the constraint equation is active when the constriction device is active;

introducing a first slack variable into the unrestricted pipe flow equation and a second slack variable into the constraint equation, wherein the first slack variable has a value that is zero when the unrestricted pipe flow equation is active, and wherein the second slack variable has a value that is zero when the constraint equation is active;

iteratively solving a system of equations comprising the unrestricted pipe flow and constraint equations to determine an initial solution, wherein the iteratively solving comprises adjusting at least one of the first and second slack variables, wherein the iteratively solving comprises fixing a value of one of the first and second slack variables, wherein a value of the other one of the first and second slack variables is free;

modeling, based on the initial solution, a potential modification of the pipe system; and determining, based on the modeling, whether to implement the potential modification of the pipe system.

2. The method of claim 1, wherein the potential modification of the pipe system comprises drilling an additional borehole to the petroleum reservoir and connecting the additional borehole to the pipe system, wherein the determining comprises deciding to perform the drilling the additional borehole to the petroleum reservoir.

3. The method of claim 1, wherein the at least one characteristic of the fluid flow is selected from the group consisting of: total volume flow rate, specified phase flow rate, and pressure.

4. The method of claim 1, wherein the unrestricted pipe flow and constraint equations are mutually exclusive and concurrent.

5. The method of claim 1, wherein iteratively solving comprises:

solving the unrestricted pipe flow and constraint equations;

determining that the free one of the first and second slack variables is negative; and in response to determining that the free one of the first and second slack variables is negative, modifying the fixed one of the first and second slack variables.

6. The method of claim 5, wherein modifying the fixed one of the first and second slack variables comprises moving the value of the fixed one of the first and second slack variables toward zero.

7. The method of claim 1, wherein iteratively solving comprises:

solving the unrestricted pipe flow and constraint equations;

determining that the free one of the first and second slack variables is positive; and in response to determining that the free one of the first and second slack variables is positive, fixing the value of the free one of the first and second slack variables and freeing the value of the fixed one of the first and second slack variables.

8. A computing system for deciding whether to modify a pipe system accessing a petroleum reservoir, the computing system comprising:

one or more processors; and

a memory system comprising one or more computer-readable media storing instructions that, when executed by at least one of the one or more processors, cause the computing system to perform operations, the operations comprising: obtaining a measurement of at least one characteristic of a flow of fluid in the pipe system, wherein the pipe system comprises at least one wellbore pipe accessing contents of the petroleum reservoir, wherein the pipe system comprises at least one constriction device;

representing the at least one characteristic of the flow of fluid as an unrestricted pipe flow equation, wherein the an unrestricted pipe flow equation is active when the constriction device is not active;

representing a constraint on the flow of fluid provided by the at least one constriction device by a constraint equation, wherein the constraint equation is active when the constriction device is active;

introducing a first slack variable into the unrestricted pipe flow equation and a second slack variable into the constraint equation, wherein the first slack variable has a value that is zero when the unrestricted pipe flow equation is active, and wherein the second slack variable has a value that is zero when the constraint equation is active;

iteratively solving a system of equations comprising the unrestricted pipe flow and constraint equations to determine an initial solution, wherein the iteratively solving comprises adjusting at least one of the first and second slack variables, wherein the iteratively solving comprises fixing a value of one of the first and second slack variables, wherein a value of the other one of the first and second slack variables is free; and

modeling, based on the initial solution, a potential modification of the pipe system, whereby a user may determine, based on the modeling, whether to implement the potential modification of the pipe system.

9. The system of claim 8, wherein the potential modification of the pipe system comprises drilling an additional borehole to the petroleum reservoir and connecting the additional borehole to the pipe system, wherein the determining comprises deciding to perform the drilling the additional borehole to the petroleum reservoir.

10. The system of claim 8, wherein the at least one characteristic of the fluid flow is selected from the group consisting of: total volume flow rate, specified phase flow rate, and pressure.

11. The system of claim 8, wherein the unrestricted pipe flow and constraint equations are mutually exclusive and concurrent.

12. The system of claim 8, wherein iteratively solving comprises:

solving the unrestricted pipe flow and constraint equations;

determining that the free one of the first and second slack variables is negative; and in response to determining that the free one of the first and second slack variables is negative, modifying the fixed one of the first and second slack variables.

13. The system of claim 12, wherein modifying the fixed one of the first and second slack variables comprises moving the value of the fixed one of the first and second slack variables toward zero.

14. The system of claim 8, wherein iteratively solving comprises:

solving the unrestricted pipe flow and constraint equations;

determining that the free one of the first and second slack variables is positive; and in response to determining that the free one of the first and second slack variables is positive, fixing the value of the free one of the first and second slack variables and freeing the value of the fixed one of the first and second slack variables.

15. A computer-readable media comprising instructions that, when executed by one or more processors, cause the one or more processors to perform operations for deciding whether to modify a pipe system accessing a petroleum reservoir, the operations comprising:

obtaining at least one characteristic of a flow of fluid in the pipe system, wherein the pipe system comprises at least one wellbore pipe accessing contents of the petroleum reservoir, wherein the pipe system comprises at least one constriction device;

representing the at least one characteristic of the flow of fluid as an unrestricted pipe flow equation, wherein the an unrestricted pipe flow equation is active when the constriction device is not active; representing a constraint on the flow of fluid provided by the at least one constriction device by a constraint equation, wherein the constraint equation is active when the constriction device is active;

introducing a first slack variable into the unrestricted pipe flow equation and a second slack variable into the constraint equation, wherein the first slack variable has a value that is zero when the unrestricted pipe flow equation is active and negative otherwise, and wherein the second slack variable has a value that is zero when the constraint equation is active and negative otherwise;

iteratively solving a system of equations comprising the unrestricted pipe flow and constraint equations to determine an initial solution, wherein the iteratively solving comprises adjusting at least one of the first and second slack variables, wherein the iteratively solving comprises fixing a value of one of the first and second slack variables, wherein a value of the other one of the first and second slack variables is free; and

modeling, based on the initial solution, a potential modification of the pipe system, whereby a user may determine, based on the modeling, whether to implement the potential modification of the pipe system.

16. The media of claim 15, wherein the potential modification of the pipe system comprises drilling an additional borehole to the petroleum reservoir and connecting the additional borehole to the pipe system, wherein the determining comprises deciding to perform the drilling the additional borehole to the petroleum reservoir.

17. The media of claim 15, wherein the at least one characteristic of the fluid flow is selected from the group consisting of: total volume flow rate, specified phase flow rate, and pressure.

18. The media of claim 15, wherein the unrestricted pipe flow and constraint equations are mutually exclusive and concurrent.

19. The media of claim 15, wherein iteratively solving comprises:

solving the unrestricted pipe flow and constraint equations;

determining that the free one of the first and second slack variables is negative; and in response to determining that the free one of the first and second slack variables is negative, modifying the fixed one of the first and second slack variables by moving the value of the fixed one of the first and second slack variables toward zero.

20. The media of claim 15, wherein iteratively solving comprises:

solving the unrestricted pipe flow and constraint equations;

determining that the free one of the first and second slack variables is positive; and in response to determining that the free one of the first and second slack variables is positive, fixing the value of the free one of the first and second slack variables and freeing the value of the fixed one of the first and second slack variables.

Description:
ASSESSING WHETHER TO MODIFY A PIPE SYSTEM

Cross-Reference to Related Application

[0001] The present application claims the benefit of, and priority to, U.S. Provisional Patent Application No. 62/074,267 filed November 3, 2014, which is hereby incorporated by reference in its entirety.

Background

[0002] Extracting petroleum from the ground involves the use of wellbore pipes to reach the petroleum, as well as other pipes, e.g., surface networks, to move the petroleum once extracted. Static and dynamic devices are used to control both inflow/outflow and flow along surface networks and/or in wellbore pipes and tubing strings. Wells may be extended reach (ER), multilateral (MLT), horizontal, or vertical and may cross multiple reservoir zones. Surface networks may include several branches

[0003] In reservoir simulators, well, surface-network, and combined well/network models are employed to find the most limiting constraints for constraints placed at various points in the network and wellbore pipes. Well constraints may include flow rate and pressure constraints, e.g., at the tubing head and bottom hole positions. Within the well, multiple tubing strings may require other individual controls depending on their entry and exit points. The well model may include boundary segments, which may allow control of a tubing string, segment, and/or wellbore branch to an external point within a pressure or rate limit. Further, internal to the well or network, there may be a number of flow control valves with limiting rates or pressures.

Summary

[0004] According to various embodiments, a method for deciding whether to modify a pipe system accessing a petroleum reservoir is disclosed. The method includes obtaining at least one characteristic of a flow of fluid in the pipe system, where the pipe system includes at least one wellbore pipe accessing contents of the petroleum reservoir, where the pipe system includes at least one constriction device; representing the at least one characteristic of the flow of fluid as an unrestricted pipe flow equation, where the an unrestricted pipe flow equation is active when the constriction device is not active; representing a constraint on the flow of fluid provided by the at least one constriction device by a constraint equation, where the constraint equation is active when the constriction device is active; introducing a first slack variable into the unrestricted pipe flow equation and a second slack variable into the constraint equation, where the first slack variable has a value that is zero when the unrestricted pipe flow equation is active, and where the second slack variable has a value that is zero when the constraint equation is active; iteratively solving a system of equations including the unrestricted pipe flow and constraint equations to determine an initial solution, where the iteratively solving includes adjusting at least one of the first and second slack variables, where the iteratively solving includes fixing a value of one of the first and second slack variables, where a value of the other one of the first and second slack variables is free; modeling, based on the initial solution, a potential modification of the pipe system; and determining, based on the modeling, whether to implement the potential modification of the pipe system.

[0005] Various optional features of the above embodiments include the following. The potential modification of the pipe system may include drilling an additional borehole to the petroleum reservoir and connecting the additional borehole to the pipe system, where the determining includes deciding to perform the drilling the additional borehole to the petroleum reservoir. The at least one characteristic of the fluid flow may be selected from the group consisting of: total volume flow rate, specified phase flow rate, and pressure. The unrestricted pipe flow and constraint equations may be mutually exclusive and concurrent. The iteratively solving may include: solving the unrestricted pipe flow and constraint equations; determining that the free one of the first and second slack variables is negative; and in response to determining that the free one of the first and second slack variables is negative, modifying the fixed one of the first and second slack variables. The modifying the fixed one of the first and second slack variables may include moving the value of the fixed one of the first and second slack variables toward zero. The iteratively solving may include: solving the unrestricted pipe flow and constraint equations; determining that the free one of the first and second slack variables is positive; and in response to determining that the free one of the first and second slack variables is positive, fixing the value of the free one of the first and second slack variables and freeing the value of the fixed one of the first and second slack variables.

[0006] According to various embodiments, a computing system for deciding whether to modify a pipe system accessing a petroleum reservoir is disclosed. The computing system includes one or more processors; and a memory system including one or more computer- readable media storing instructions that, when executed by at least one of the one or more processors, cause the computing system to perform operations, the operations including: obtaining a measurement of at least one characteristic of a flow of fluid in the pipe system, where the pipe system includes at least one wellbore pipe accessing contents of the petroleum reservoir, where the pipe system includes at least one constriction device; representing the at least one characteristic of the flow of fluid as an unrestricted pipe flow equation, where the an unrestricted pipe flow equation is active when the constriction device is not active; representing a constraint on the flow of fluid provided by the at least one constriction device by a constraint equation, where the constraint equation is active when the constriction device is active; introducing a first slack variable into the unrestricted pipe flow equation and a second slack variable into the constraint equation, where the first slack variable has a value that is zero when the unrestricted pipe flow equation is active, and where the second slack variable has a value that is zero when the constraint equation is active; iteratively solving a system of equations including the unrestricted pipe flow and constraint equations to determine an initial solution, where the iteratively solving includes adjusting at least one of the first and second slack variables, where the iteratively solving includes fixing a value of one of the first and second slack variables, where a value of the other one of the first and second slack variables is free; and modeling, based on the initial solution, a potential modification of the pipe system, whereby a user may determine, based on the modeling, whether to implement the potential modification of the pipe system.

[0007] Various optional features of the above embodiments include the following. The potential modification of the pipe system may include drilling an additional borehole to the petroleum reservoir and connecting the additional borehole to the pipe system, where the determining includes deciding to perform the drilling the additional borehole to the petroleum reservoir. The at least one characteristic of the fluid flow may be selected from the group consisting of: total volume flow rate, specified phase flow rate, and pressure. The unrestricted pipe flow and constraint equations may be mutually exclusive and concurrent. The iteratively solving may include: solving the unrestricted pipe flow and constraint equations; determining that the free one of the first and second slack variables is negative; and in response to determining that the free one of the first and second slack variables is negative, modifying the fixed one of the first and second slack variables. The modifying the fixed one of the first and second slack variables may include moving the value of the fixed one of the first and second slack variables toward zero. The iteratively solving may include: solving the unrestricted pipe flow and constraint equations; determining that the free one of the first and second slack variables is positive; and in response to determining that the free one of the first and second slack variables is positive, fixing the value of the free one of the first and second slack variables and freeing the value of the fixed one of the first and second slack variables.

[0008] According to some embodiments, computer-readable media including instructions that, when executed by one or more processors, cause the one or more processors to perform operations for deciding whether to modify a pipe system accessing a petroleum reservoir, are disclosed. The operations include obtaining at least one characteristic of a flow of fluid in the pipe system, where the pipe system includes at least one wellbore pipe accessing contents of the petroleum reservoir, where the pipe system includes at least one constriction device; representing the at least one characteristic of the flow of fluid as an unrestricted pipe flow equation, where the an unrestricted pipe flow equation is active when the constriction device is not active; representing a constraint on the flow of fluid provided by the at least one constriction device by a constraint equation, where the constraint equation is active when the constriction device is active; introducing a first slack variable into the unrestricted pipe flow equation and a second slack variable into the constraint equation, where the first slack variable has a value that is zero when the unrestricted pipe flow equation is active and negative otherwise, and where the second slack variable has a value that is zero when the constraint equation is active and negative otherwise; iteratively solving a system of equations including the unrestricted pipe flow and constraint equations to determine an initial solution, where the iteratively solving includes adjusting at least one of the first and second slack variables, where the iteratively solving includes fixing a value of one of the first and second slack variables, where a value of the other one of the first and second slack variables is free; and modeling, based on the initial solution, a potential modification of the pipe system, whereby a user may determine, based on the modeling, whether to implement the potential modification of the pipe system.

[0009] Various optional features of the above embodiments include the following. The potential modification of the pipe system may include drilling an additional borehole to the petroleum reservoir and connecting the additional borehole to the pipe system, where the determining includes deciding to perform the drilling the additional borehole to the petroleum reservoir. The at least one characteristic of the fluid flow may be selected from the group consisting of: total volume flow rate, specified phase flow rate, and pressure. The unrestricted pipe flow and constraint equations may be mutually exclusive and concurrent. The iteratively solving may include: solving the unrestricted pipe flow and constraint equations; determining that the free one of the first and second slack variables is negative; and in response to determining that the free one of the first and second slack variables is negative, modifying the fixed one of the first and second slack variables by moving the value of the fixed one of the first and second slack variables toward zero. The iteratively solving may include: solving the unrestricted pipe flow and constraint equations; determining that the free one of the first and second slack variables is positive; and in response to determining that the free one of the first and second slack variables is positive, fixing the value of the free one of the first and second slack variables and freeing the value of the fixed one of the first and second slack variables.

[0010] Operators of petroleum wells are frequently faced with a decision as to whether to modify a pipe system of the wells. Many factors may come into play for such decisions, but an understanding of how the pipe system will behave subsequent to the modification is particularly helpful. In particular, the pipe system might have a plurality of constraints on pressure and/or flow rate at various points. Understanding how a proposed modification will affect such constraints can lead to better decision making. Thus, some embodiments provide information about how pipe system constraints will be affected by a proposed modification, such that an operator may base the decision upon such information.

[0011] The foregoing summary is presented merely to introduce some of the aspects of the disclosure, which are described in greater detail below. Accordingly, the present summary is not intended to be limiting.

Brief Description of the Drawings

[0012] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments of the present teachings and together with the description, serve to explain the principles of the present teachings. In the figures:

[0013] Figure 1 illustrates a simplified, schematic view of a segment, including a node and a pipe according to some embodiments. [0014] Figure 2 illustrates a schematic diagram of a simple example pipe system according to some embodiments.

[0015] Figure 3 illustrates a flowchart of a method for determining whether to modify a pipe system according to some embodiments.

[0016] Figure 4 illustrates a schematic view of a computing system, according to some embodiments.

Detailed Description

[0017] The following detailed description refers to the accompanying drawings. Wherever convenient, the same reference numbers are used in the drawings and the following description to refer to the same or similar parts. While several embodiments and features of the present disclosure are described herein, modifications, adaptations, and other implementations are possible, without departing from the spirit and scope of the present disclosure.

I. Introduction: Pipe Networks and Constraints

[0018] Figure 1 schematically depicts a pipe segment, or simply "segment" 100. Segment 100 may include node 102 and pipe 104, as depicted in Figure 1, together with any number of additional pipes of which a single additional pipe 106 (chord) is noted also in Figure 1. A segment (e.g., 104) may connect to another segment (e.g., 106) at a node (e.g., 102). In looped networks, there may be additional pipes.

[0019] Each segment 100 may have an associated set of primary variables, e.g., a single total flow rate variable at a point located in the segment's 100 pipe 104, as well as other variables describing the pressure, enthalpy and contents of the segment located at the segment's node 102. Thus, each segment may have associated values for the following variables:

[0020] P represents the segment's actual pressure, located at node 102;

[0021] misrepresents the actual total molar flow rate towards the surface (negative for injection), located in pipe 104;

[0022] Zc represents the actual component mole fractions of the segment fluid, located at node 102; and

[0023] h represents the actual segment fluid enthalpy (BTU/mole), located at node 102. [0024] In general, one or more physical devices imposing rate or pressure constraints may be placed on segment 100 in a pipe system, e.g., a well and/or surface network including a collection of segments 100. One or more pressure constraints may be placed on node 102, while separate flow rate constraints may be placed on each pipe 104, 106, etc.

[0025] Figure 2 illustrates a schematic diagram of a simple example pipe system 200 according to some embodiments. Pipe system 200 is divided into segments 202, an example of which shown and described above in isolation in reference to Figure 1. Pipe system 200 may thus include a network of segments 202. Some or all such segments 202 may be subterranean, under water, above water, or above ground. According to some embodiments, a simplifying, though unnecessary, assumption is that the network 200 forms a tree structure. Segments, e.g., 204, representing perforated lengths of the well may contain one or more well-to-cell connections, represented by squares in Figure 2. Other segments, e.g., 202, representing unperforated lengths of tubing or specific devices, may contain no well-to-cell connections.

[0026] A rate or pressure constraint in a segment is said to be "active" when its limit is broken. When a constraint is active, the limit becomes a target and the pressures and flows in the well may be altered such that the target pressure or rate is honored. For example, a maximum rate constraint may be active if the unconstrained rate is greater than the limit; otherwise, the maximum rate constraint may be deemed "inactive."

[0027] A difficulty may then be to determine which constraints are active in a well. This may be problematic in situations where the well's structure is complex and the number of segments and the number of constraints (as well as number of constraint types) are relatively high. Further, certain constraints may be mutually incompatible {e.g., there can be no more than one active rate constraint on a single flow-line that contains no connections to other flow-lines or reservoir grid cells)).

[0028] Some methods have a priori determined which constraints are active, and selected the appropriate equations and solved the system. For complex systems, this may be unreliable even if done iteratively. Other methods, such as an embodiment of the present disclosure, may include determining which constraints are active as part of an algorithm that finds a self- consistent solution to a system of equations representing flow through the respective pipe system. II. Pairs of concurrent equations

[0029] Figure 3 illustrates a flowchart of a method 300 for determining whether to modify a pipe system accessing a petroleum reservoir, according to an embodiment. Example such modifications include: adding a new wellbore pipe (i.e., adding an additional well), injecting water or other drilling fluid (e.g., at a node), extracting more fluids that are currently being extracted, etc. Each potential modification may change fluid flow within the pipe system, thereby altering pressures and flow characteristics in one or more segments. In complex pipe systems, such changes may be difficult to predict. Thus, such modifications can result in relatively complex changes to the pipe system's flow and pressure.

[0030] The technique of Figure 3 aims to produce an accurate model of a pipe system such that proposed changes thereof may be modeled in silico, that is, simulated on a computer system. If the simulation that incorporates the proposed modification displays suitable properties, e.g., profitability after accounting for the modification's expense, the pipe system itself may be modified by implementing the proposed modification. The following description of Figure 3 elaborates on this overview.

[0031] At block 302, method 300 obtains a characteristic of a flow of a fluid in the pipe system. The characteristic may be for a segment, more particularly for a pipe comprising a segment, for example. The method 300 may obtain the characteristic by performing an actual measurement, e.g., as obtained by a downhole measurement device. The characteristic may be, e.g., a total volume flow rate, a specified phase flow rate, or a pressure. Note that "volume" may refer to either or both of two types of volume: volume at local conditions (e.g., at the segment pressure and enthalpy) and volume at surface conditions. According to some embodiments, the characteristic may be mf pe , that is, the actual total molar flow rate towards the surface.

[0032] At block 304, method 300 represents a flow characteristic in a pipe by a base equation. The base equation may be, for example, a pressure drop equation along the pipe. In operation, the pressure drop equation may be applied in place of the constraint equation(s) if and only if the constraint(s) for the respective segment is (are) inactive. Thus, the base equation is active except in segments where a constraint is active. The base equation relates the pressure drop (in unconstrained pipe flow from segment node s to the neighboring segment node 5-1) to the sum of the hydrostatic, friction and acceleration pressure gradients, which are functions of the primary variables of the segment and its neighbor ( X S S _ X ). In residual form, the base equation may be represented as, for example:

Ps - Ps-i - APH(X S ) - APF(XS ) - APA(XS ) = RP,*

In the above base equation, the terms Pi represent pressure in segment i. The terms APH( S,S-I), APF(X S ,S-I), and APA( S,S-I) represent hydrostatic, friction, and acceleration pressure gradients, respectively, for segment s and its neighbor s-l . The term Rp, s represents the residual pressure for the base equation for segment s.

[0033] At block 306, method 300 represents at least one constraint on a flow through a pipe by a constraint equation. In operation, one or more constraint equation may apply instead of the base equation if and only if the respective constraint is active. Each constraint equation may depend on the type of constraint applied to the pipe flow. For example, an active constraint (upper limit) on the flow through the pipe of segment s may be represented by a constraint equation, which replaces the above pressure drop equation in operation when a constraint is violated. In residual form, the constraint equation may be represented as, for example:

C(X S ^ ) - C TR8 = R C,S

In the above constraint equation, the term C(X s , s -i) represents a constraint on fluid flow between segment s and neighboring segment s-l. The term C rg represents the target constraint value. The term RQ S represents the residual for the constraint equation. For example, if the flow through the segment s is controlled by a target water volume rate, then C(X s , s -i) is a current water volume rate that depends on the total molar rate in the pipe mp pe and the composition z c at the upstream node.

[0034] Note that according to some embodiments, a limit that implicates a constraint may be a function of parameters, such as a local phase flowing ratio. Such a limit may be implemented via a simple look-up table, for example. For example, the total fluid volume rate limit may be a function of the local segment water cut, which may be calculated according to water volume rate / water_&_oil_volume_rate. Such a technique may be used to model the effect of a smart valve that would become increasingly restrictive as the water cut increased. Such a valve may be used so that the pipe system does not produce too much water because water is not economically viable to obtain in this manner and because water can be is difficult to deal with in a dirty state. [0035] As another example, in embodiments in which the base equation is a pressure drop equation, the base equation may represent a pressure loss in homogenous or non-homogeneous (e.g., drift-flux) flow along an unconstricted length of pipe. Each constraint equation may represent pressure loss through a valve, choke, or other physical device that limits the pressure or flow. In general, the base equation may be mutually exclusive with the constraint equations; unaltered, both the base equation and a constraint equation cannot be honored at the same time.

[0036] At block 308, method 300 introduces two (or more) slack variables, one for each equation. The introduction of the slack variables may allow for simultaneously honoring the equations, e.g., by altering the equations such that one at a time is inoperative. The slack variable S p is associated with the base or pressure drop equation, while a separate slack variable S c is associated with each constraint equation. The slack variables may be introduced to their respective equations as shown in the following examples.

P s - P s _, - AP H X s ^ ) - AP F X s ^ ) - AP A X s ^ ) + S P = R jS

C(X, t ,_ 1 ) - C*> - S c = R Ct ,

[0037] As discussed, S p and S c (and potentially other constraint slack variables) are added to the equations such that the disclosed expedient of the inactive equation having active slack is true. For example, if the constraint acts as an upper limit on the water flow through the segment pipe and the current water flow is less than that limit, then at convergence, S c may be negative to ensure the residual of this inactive equation is zero. The slack in the active pressure drop equations for unconstrained flow (S p ) will correspondingly be zero. If, however, the current flow exceeds the limit, then the active slack in the inactive pressure drop equations ( S p ) acts as an extra pressure drop and chokes back the flow such that the active constraint equation(s) (with zero slack) is honored. When the well's equations are in a converged state, the active equation's slack variable may be zero, and the inactive equation's slack may be non-zero (e.g., to take up the slack). Thus, determining which constraint is active may be equivalent to determining which of S p and S c will be zero.

III. Calculating the slack variables

[0038] The method 300 may then proceed to iteratively calculating the slack variables. For each constraint type introduced, one extra equation is gained along with two extra slack variables, one for the base or pressure drop equation (which is already in the system) and another one for the newly-added constraint equation. Computing the slack variables thus cannot be done directly, because there are more unknowns than equations (i.e., the system is under determined).

[0039] At block 310, accordingly, method 300 fixes one of the two slack variables, leaving the other of the two slack variables free. The method 300 may also include electing one of the equations to contain the fixed slack and set its value to a positive number, e.g., as part of fixing one of the slack variables at 310. An iterative procedure may then be followed.

IV. Solving the system

[0040] At block 312, method 300 proceeds by solving the base and constraint equations as described presently. Thus, a slack variable may be a constraint or a pressure drop slack, and a free or fixed slack. The well model equations may be setup such that, at convergence, one of the slack variables is zero (e.g., the slack variable associated with the active equation) and the other(s) is (are) negative. The slack in the active equation may ultimately be zero (or within a tolerance interval of zero); thus, the method 300 may include choosing the fixed slack variable to be in the active equation. Then the free slack variable(s) is (are) in the inactive equation(s), and ultimately it (they) will be negative.

[0041] At block 314, after solving the base and constraint equations as a system, method 300 may include determining whether the free slack variable is negative. If so, then method 300 branches to block 318, at which the fixed slack variable is modified. Of note, the fixed slack may be modified by multiplying it by a constant between zero (0) and one (1). The constant may be selected and adjusted by the user. Otherwise, if the free slack variable is not negative, the free and fixed slack variables may be switched, as at block 316. That is, the fixed variable becomes free to change value, whereas the free variable becomes fixed at a value. Regardless as to whether control passed through block 316 or 318, method 300 proceeds to block 320.

[0042] The use of two or more slack variables and their switching in the disclosed manner has advantages over techniques that utilize a single slack variable. In particular, using multiple slack variables in the disclosed manner makes it easy to model multiple constraints imposed on the flow through a particular segment. For example, the inventors have successfully tested an embodiment that implements a pressure limit, an oil volume rate limit, and a total fluid volume rate limit all imposed on one segment. In such an embodiment, there may be only one equation with a zero slack, and all others typically have a non-zero negative slack at a converged state. Such embodiments extend more readily than techniques that utilize a single slack variable.

[0043] At block 320, method 300 determines whether the convergence has occurred. Note that the action of block 320 may occur before, during, or after the modifying of block 318 and/or the switching of block 316. At this block, method 300 may determine whether the base and/or constraint equations have reached convergence, e.g., within a predefined threshold. A condition to convergence may, in some embodiments, also include the free slack variable being negative.

[0044] As an illustrative example, the following pseudocode represents a portion of method 300 and includes explanatory notes that are not part of the code, as indicated by a double slash mark ('//'). In particular, the following pseudocode relates to blocks 312-320.

Pseudocode for the iterative procedure

While not converged

Solve the system of equations //thus calculating the free slack variable

If the free slack is negative

Modify the fixed slack //moving the fixed slack towards zero // see note 1

Else

Switch free and fixed slacks //switching which equation is active

Check for convergence //see note 2

End while

[0045] In the box above, note 1 relates as follows. The fixed slack is modified by multiplying it by a constant between zero (0) and one (1). Note 2 relates as follows. Convergence of the overall method may be achieved when the fixed slack is zero (possibly with a defined tolerance, i.e., within a small interval of zero) and the free slack is negative.

[0046] At block 322, method 300 proceeds to model the potential modification. In more detail, at block 322, the method 300 uses the solution obtained upon convergence at block 320 to model the existing pipe system. The existing pipe system may be modeled based on flow and pressure data collected over a historic time period, ranging from months to decades. The generated model may specify flow rates and pressure values at designated locations within the pipe system for any point in time. Then the model for the existing pipe system is modified to represent a proposed modification to the pipe system. The modification may include utilizing additional base and/or constraint equations. The modification may represent adding an additional well, injecting water or another drilling fluid, or increasing the extraction of the product fluid, e.g., a petroleum mixture. The modified solution may be implemented on an electronic computing system, and may predict flow rates and pressures within the pipe system at any moment in time.

[0047] At block 324, method 300 determines whether to implement the potential modification in the actual pipe system. To make such a determination, the modified solution may indicate that a pipe system so modified would produce an increase or decrease in be the actual total molar flow rate towards the surface, represented herein by the term mp pe . If the increased total molar flow rate to the surface over the economically usable lifetime of pipe system would correspond to more financial value than an estimated cost to implement the modification in the actual pipe system, then method 300 may determine that the propose modification is to be implemented. Otherwise, if the increased total molar flow rate to the surface decreases, remains the same, or does not increase sufficiently to justify implementing the actual modification, then method 300 may conclude at block 324 that the proposed modification should not be implemented.

[0048] More particularly, if the increased total molar flow rate to the surface over the economically usable lifetime of pipe system would correspond to more financial value than an estimated cost to implement the modification in the actual pipe system, then method 300 may determine that the propose modification will be implemented. Otherwise, if the increased total molar flow rate to the surface decreases, remains the same, or does not increase sufficiently to justify implementing the actual modification, then method 300 may conclude at block 324 that the proposed modification will not be implemented.

[0049] Note that some embodiments repeat blocks 308-320 multiple times. In such embodiments, the actions of these blocks may be applied in order to discover suitable slack variable values. The process may then be repeated using the discovered slack variables until the repeating converges, e.g., within a specified interval.

[0050] The following summarizes method 300 according to some embodiments. The start of the iterative process includes estimating which equation might be the active base/constraint equation and assigning it a positive fixed slack. Next, the equations modelling the well are solved (such equations may be as disclosed herein and possibly including other equations representing mass conservation). The solving results in determining the values of the all the free slack variables. If they are all negative, then it is likely that the equation with the positive slack is a good candidate for being the active one. The positive valued slack variable is reduced and the solving is repeated. If all free slacks are still negative, the fixed slack variable reduction and solving is repeated until this value is (or is near to) zero. At this point, the system is converged. If, during this process, the free slacks becomes positive, then the free and fixed slack variables are swapped, and the process continues as above with repeatedly solving the system of equations, checking the sign of the free slack variables, and either reducing the fixed slack variable or swapping the free and fixed slack variables again.

V. Computer Hardware Implementation Examples

[0051] Embodiments of the disclosure may also include one or more systems for implementing one or more embodiments of the method of the present disclosure. Figure 4 illustrates a schematic view of such a computing or processor system 400, according to an embodiment. The processor system 400 may include one or more processors 402 of varying core (including multi- core) configurations and clock frequencies. The one or more processors 402 may be operable to execute instructions, apply logic, etc. It will be appreciated that these functions may be provided by multiple processors or multiple cores on a single chip operating in parallel and/or communicably linked together.

[0052] The processor system 400 may also include a memory system, which may be or include one or more memory devices and/or computer-readable media 404 of varying physical dimensions, accessibility, storage capacities, etc. such as flash drives, hard drives, disks, random access memory, etc., for storing data, such as images, files, and program instructions for execution by the processor 402. In an embodiment, the computer-readable media 404 may store instructions that, when executed by the processor 402, are configured to cause the processor system 400 to perform operations. For example, execution of such instructions may cause the processor system 400 to implement one or more portions and/or embodiments of the method(s) described above, e.g., method 300.

[0053] The processor system 400 may also include one or more network interfaces 406. The network interfaces 406 may include any hardware, applications, and/or other software. Accordingly, the network interfaces 406 may include Ethernet adapters, wireless transceivers, PCI interfaces, and/or serial network components, for communicating over wired or wireless media using protocols, such as Ethernet, wireless Ethernet, etc. [0054] As an example, the processor system 400 may be a mobile device that includes one or more network interfaces for communication of information. For example, a mobile device may include a wireless network interface (e.g., operable via IEEE 802.11, ETSI GSM, BLUETOOTH®, satellite, etc.). As an example, a mobile device may include components such as a main processor, memory, a display, display graphics circuitry (e.g., optionally including touch and gesture circuitry), a SIM slot, audio/video circuitry, motion processing circuitry (e.g., accelerometer, gyroscope), wireless LAN circuitry, smart card circuitry, transmitter circuitry, GPS circuitry, and a battery. As an example, a mobile device may be configured as a cell phone, a tablet, etc. As an example, a method may be implemented (e.g., wholly or in part) using a mobile device. As an example, a system may include one or more mobile devices.

[0055] The processor system 400 may further include one or more peripheral interfaces 408, for communication with a display screen, projector, keyboards, mice, touchpads, sensors, other types of input and/or output peripherals, and/or the like. In some implementations, the components of processor system 400 need not be enclosed within a single enclosure or even located in close proximity to one another, but in other implementations, the components and/or others may be provided in a single enclosure. As an example, a system may be a distributed environment, for example, a so-called "cloud" environment where various devices, components, etc. interact for purposes of data storage, communications, computing, etc. As an example, a method may be implemented in a distributed environment (e.g., wholly or in part as a cloud- based service).

[0056] As an example, information may be input from a display (e.g., a touchscreen), output to a display or both. As an example, information may be output to a projector, a laser device, a printer, etc. such that the information may be viewed. As an example, information may be output stereographically or holographically.

[0057] The memory device 404 may be physically or logically arranged or configured to store data on one or more storage devices 410. The storage device 410 may include one or more file systems or databases in any suitable format. The storage device 410 may also include one or more software programs 412, which may contain interpretable or executable instructions for performing one or more of the disclosed processes. When requested by the processor 402, one or more of the software programs 412, or a portion thereof, may be loaded from the storage devices 410 to the memory devices 404 for execution by the processor 402. [0058] Those skilled in the art will appreciate that the above-described componentry is merely one example of a hardware configuration, as the processor system 400 may include any type of hardware components, including any necessary accompanying firmware or software, for performing the disclosed implementations. The processor system 400 may also be implemented in part or in whole by electronic circuit components or processors, such as application-specific integrated circuits (ASICs) or field-programmable gate arrays (FPGAs).

[0059] The foregoing description of the present disclosure, along with its associated embodiments and examples, has been presented for purposes of illustration only. It is not exhaustive and does not limit the present disclosure to the precise form disclosed. Those skilled in the art will appreciate from the foregoing description that modifications and variations are possible in light of the above teachings or may be acquired from practicing the disclosed embodiments.

[0060] For example, the same techniques described herein with reference to the processor system 400 may be used to execute programs according to instructions received from another program or from another processor system altogether. Similarly, commands may be received, executed, and their output returned entirely within the processing and/or memory of the processor system 400. Accordingly, neither a visual interface command terminal nor any terminal at all is strictly necessary for performing the described embodiments.

[0061] Likewise, the steps described need not be performed in the same sequence discussed or with the same degree of separation. Various steps may be omitted, repeated, combined, or divided, as necessary to achieve the same or similar objectives or enhancements. Accordingly, the present disclosure is not limited to the above-described embodiments, but instead is defined by the appended claims in light of their full scope of equivalents. Further, in the above description and in the below claims, unless specified otherwise, the term "execute" and its variants are to be interpreted as pertaining to any operation of program code or instructions on a device, whether compiled, interpreted, or run using other techniques.