US20250264010A1
2025-08-21
19/054,272
2025-02-14
Smart Summary: A method has been developed to improve the process of treating underground formations with acid. It starts by choosing a specific wellbore for the treatment and planning how to pump the fluid. Information about the metal pipes in the well and their limits for corrosion is gathered. Then, the right mix and amount of a corrosion inhibitor are determined to protect the metal surfaces during treatment. Finally, the pumping schedule is adjusted based on this information before carrying out the acid treatment. 🚀 TL;DR
The present disclosure relates to a method for stimulating a subterranean formation that includes selecting a wellbore for an acid stimulation treatment and initial pumping schedule using a wellbore treatment fluid system; obtaining information on metal used for pipe in the wellbore and a maximum corrosion rate threshold and/or a pitting index threshold to perform the acid stimulation treatment; determining composition and concentration of a corrosion inhibitor package for the wellbore treatment fluid system to obtain a corrosion rate and/or a pitting index of surfaces of the metal; updating the pumping schedule based on the determined composition and concentration of the corrosion inhibitor package; and performing hydraulic acid fracturing or an acidizing treatment using the updated pumping schedule.
Get notified when new applications in this technology area are published.
E21B43/27 » CPC main
Methods or apparatus for obtaining oil, gas, water, soluble or meltable materials or a slurry of minerals from wells; Methods for stimulating production by forming crevices or fractures by use of eroding chemicals, e.g. acids
E21B41/02 » CPC further
Equipment or details not covered by groups - inhibition of corrosion in boreholes or wells
E21B2200/20 » CPC further
Special features related to earth drilling for obtaining oil, gas or water Computer models or simulations, e.g. for reservoirs under production, drill bits
E21B2200/22 » CPC further
Special features related to earth drilling for obtaining oil, gas or water Fuzzy logic, artificial intelligence, neural networks or the like
This application claims priority to and the benefit of U.S. Provisional Patent Application Ser. No. 63/554,366, entitled “Methods for Selection of Composition and Concentration of a Corrosion Inhibitor Package Used in Stimulation of Subterranean Formations Involving Acid-Containing Fluids,” filed Feb. 16, 2024, which is hereby incorporated by reference in its entirety for all purposes.
The present disclosure generally relates to systems and methods for stimulating a subterranean formation by updating pumping schedules (e.g., including compositions and concentrations of a corrosion inhibitor package) of a hydraulic acid fracturing or an acidizing treatment job based on a corrosion rate and/or a pitting index of surfaces of metal pipe of a wellbore treatment fluid system.
This section is intended to introduce the reader to various aspects of art that may be related to various aspects of the present techniques, which are described and/or claimed below. This discussion is believed to be helpful in providing the reader with background information to facilitate a better understanding of the various aspects of the present disclosure. Accordingly, it should be understood that these statements are to be read in this light, and not as admission of prior art.
Acid stimulation treatments are widely used methods to stimulate productivity of hydrocarbon-producing wells in carbonate and sandstone reservoirs. Matrix acidizing and acid fracturing are two examples of these methods. Matrix acidizing is pumped below fracturing closure pressures and the mechanism of hydrocarbon delivery from reservoir to wellbore is the wormhole created by acid systems. This treatment is applicable in sandstones and carbonates. Acid fracturing is pumped above fracturing closure pressure to create fractures in the reservoir. The main function of acid is to increase conductivity of the created fractures by etching their walls. It is applicable in carbonate reservoirs.
Depending on the specific set of reservoir characteristics and well parameters, designs for acid stimulation treatments may vary. Thus, some designs are more favorable based on existing requirements, including operational costs, well productivity index, total amount of hydrocarbons extracted per time per expenses, and so forth. This way, designs may be ranked based on the characteristic defining the requirement, and top-ranked designs might be called optimal.
In carbonate reservoirs, optimal designs for hydraulic fracturing would often include use of fluid systems composed with acids. Such acids may include hydrochloric acid, organic acid, and mixtures of the said acids with one another and with different functional chemicals that are called additives. Obtaining an optimal treatment design for a specific reservoir can be done with aid of special simulation software. In-situ created fracture geometry, or wormhole penetration and density, could be far from optimal and depends on multiple parameters such as reservoir properties, pressure in the treated interval, geomechanical properties of formation, rock minerology, damage in the critical matrix and treatment fluids utilized. To get closer to the optimal treatment parameters, an acid fracturing or matrix acidizing job may be scheduled in a special way considering geomechanical, lithological, and other properties of the reservoir. Concentrations of propping agents and/or acid components in the fracturing fluid, pumping rates, and pumping time are the primary parameters of the treatment schedule.
At the same time, it is likely that acid fracturing and matrix acidizing designs will benefit from increasing the concentrations of the active etching fluids (e.g., acids). While carrying benefits like better etching, more concentrated acids also imply disadvantages, including dissolution of the surface and downhole equipment and tubulars due to corrosion. Corrosion is an inevitable process that cannot be stopped completely. However, reasonably low levels of corrosion can be achieved based on proper selection of fracturing fluids, additives, and treatment parameters with given surface equipment and tubulars. One of the main means of mitigating corrosion is application of corrosion inhibitors, for example, special additives that either shield metallic surfaces of equipment and tubulars from acid, thus reducing the number of molecular collisions between reactant metal and acids, or decrease acid reactivity towards metals and alloys chemically, physically, or thermodynamically. The design of a corrosion inhibitor package (CIP) in an acid fluid system may be conducted based on physical experiments with the reference acid system and reference metal type by sensitizing the additive concentrations to study the corrosion rate and pitting index until composition and optimal concentrations are found. These experiments may be conducted days to weeks before the treatment execution happens on the wellsite.
However, selecting the right composition of a fracturing and matrix acidizing fluid that is optimal in terms of etching activity is a process that itself can be optimized. Most importantly, this means limiting the corrosion inhibitor concentration to the concentration that will sufficiently protect metallic surfaces of equipment and tubulars while not diminishing the acid strength towards the formation, limiting the costs of using the additives, and reducing the environmental footprint associated with the corrosion inhibitor use.
A summary of certain embodiments disclosed herein is set forth below. It should be understood that these aspects are presented merely to provide the reader with a brief summary of these certain embodiments and that these aspects are not intended to limit the scope of this disclosure. Indeed, this disclosure may encompass a variety of aspects that may not be set forth below.
The embodiments described herein include a method for stimulating a subterranean formation that includes updating pumping schedules of a hydraulic acid fracturing or an acidizing treatment job based on a corrosion rate and/or a pitting index of surfaces of metal pipe of a wellbore treatment fluid system. In certain embodiments, the method includes selecting a wellbore for an acid stimulation treatment and initial pumping schedule using a wellbore treatment fluid system; obtaining information on metal used for pipe in the wellbore and a maximum corrosion rate threshold and/or a pitting index threshold to perform the acid stimulation treatment; determining composition and concentration of a corrosion inhibitor package for the wellbore treatment fluid system to obtain a corrosion rate and/or a pitting index of surfaces of the metal; updating the pumping schedule based on the determined composition and concentration of the corrosion inhibitor package; and performing hydraulic acid fracturing or an acidizing treatment using the updated pumping schedule.
These and other features, aspects, and advantages of the present invention will become better understood when the following detailed description is read with reference to the accompanying drawings in which like characters represent like parts throughout the drawings, wherein:
FIG. 1 illustrates a wellbore treatment fluid operation, in accordance with aspects of the present disclosure;
FIG. 2 illustrates a diagram illustrating a perforation being made with a perforation gun, in accordance with aspects of the present disclosure;
FIG. 3 illustrates a diagram illustrating a perforation and a tunnel made with a shaped charge, in accordance with aspects of the present disclosure;
FIG. 4 illustrates a well system that may employ certain analytic approaches, in accordance with aspects of the present disclosure;
FIG. 5 illustrates certain components that may be used in a laboratory test, in accordance with aspects of the present disclosure;
FIG. 6 illustrates examples of pitting indexes of coupons after corrosion tests, in accordance with aspects of the present disclosure;
FIG. 7 illustrates dependencies of tables in a corrosion inhibitor database (CIDB), in accordance with aspects of the present disclosure;
FIG. 8 illustrates a processed dataframe view where each composition is a set of individual additives as rows, in accordance with aspects of the present disclosure;
FIG. 9 illustrates distributions of corrosion rate distribution: (a) before transformation, and (b) after adding e−9.2 and the natural logarithm transformation, in accordance with aspects of the present disclosure;
FIG. 10 illustrates an example of experiments performed for the same conditions (a) and have different corrosion rates (b), in accordance with aspects of the present disclosure;
FIG. 11 illustrates target distributions in the similar tests, where both target values change from acceptable to unacceptable values, in accordance with aspects of the present disclosure;
FIG. 12 illustrates a true vs. predicted corrosion rate heatmap, and bins contain a number of predicted corrosion rates in the same interval with true values, in accordance with aspects of the present disclosure;
FIG. 13 illustrates Random Forest feature importance, in accordance with aspects of the present disclosure;
FIG. 14 illustrates a Confusion Matrix for pitting index group predictions with Random Forest (96% of all predicted values are 0), in accordance with aspects of the present disclosure;
FIGS. 15 and 16 illustrate CatBoost regressor results, in accordance with aspects of the present disclosure;
FIG. 17 illustrates a Confusion Matrix for a CatBoost classifier (94% of all predicted values are 0), in accordance with aspects of the present disclosure;
FIG. 18 illustrates a neural network with embeddings architecture, in accordance with aspects of the present disclosure;
FIG. 19 illustrates a multilabel binarization technique, where the additives from the compound have positive concentrations, in accordance with aspects of the present disclosure;
FIG. 20 illustrates a neural network with binarization architecture, in accordance with aspects of the present disclosure;
FIGS. 21 and 22 illustrate training and validation loss curves for regression and classification, respectively, in accordance with aspects of the present disclosure;
FIG. 23 illustrates a confusion matrix for predicted pitting index groups, in accordance with aspects of the present disclosure;
FIG. 24 illustrates predictions of corrosion rates in the test set, where the hover template shows additional test information, in accordance with aspects of the present disclosure;
FIG. 25 illustrates corrosion rates with corresponding pitting index groups, where color and shape of the point represents classification outcomes, in accordance with aspects of the present disclosure;
FIG. 26 illustrates corrosion rate depending on temperature (left) and HCl concentration (right), in accordance with aspects of the present disclosure;
FIG. 27 illustrates multiparameter corrosion rate inspection, where red color means unacceptable pitting, in accordance with aspects of the present disclosure; and
FIG. 28 illustrates a method for stimulating a subterranean formation that includes updating pumping schedules of a hydraulic acid fracturing or an acidizing treatment job based on a corrosion rate and/or a pitting index of surfaces of metal pipe of a wellbore treatment fluid system, in accordance with aspects of the present disclosure.
One or more specific embodiments will be described below. In an effort to provide a concise description of these embodiments, not all features of an actual implementation are described in the specification. It should be appreciated that in the development of any such actual implementation, as in any engineering or design project, numerous implementation-specific decisions must be made to achieve the developers' specific goals, such as compliance with system-related and business-related constraints, which may vary from one implementation to another. Moreover, it should be appreciated that such a development effort might be complex and time consuming, but would nevertheless be a routine undertaking of design, fabrication, and manufacture for those of ordinary skill having the benefit of this disclosure.
When introducing elements of various embodiments of the present disclosure, the articles “a,” “an,” and “the” are intended to mean that there are one or more of the elements. The terms “comprising,” “including,” and “having” are intended to be inclusive and mean that there may be additional elements other than the listed elements. Additionally, it should be understood that references to “one embodiment” or “an embodiment” of the present disclosure are not intended to be interpreted as excluding the existence of additional embodiments that also incorporate the recited features.
In addition, as used herein, the terms “real time”, “real-time”, or “substantially real time” may be used interchangeably and are intended to described operations (e.g., computing operations) that are performed without any human-perceivable interruption between operations. For example, as used herein, data relating to the systems described herein may be collected, transmitted, and/or used in control computations in “substantially real time” such that data readings, data transfers, and/or data processing steps occur once every second, once every 0.1 second, once every 0.01 second, or even more frequent, during operations of the systems (e.g., while the systems are operating). In addition, as used herein, the terms “automatic”, “automatically”, and “automated” are intended to describe operations that are performed or caused to be performed, for example, by a data processing system (i.e., solely by the data processing system, without human intervention). In addition, as used herein, the term “approximately equal to” may be used to mean values that are relatively close to each other (e.g., within 5%, within 2%, within 1%, within 0.5%, or even closer, of each other).
As discussed above, acid fracturing is widely used method to stimulate productivity of hydrocarbon-producing wells in carbonate and sandstone reservoirs. The main function of acid is to increase conductivity of the created fractures by etching their walls. While increased acid concentration benefits fracturing designs, it also introduces several disadvantages, including corrosion of tubulars, surface and download equipment. Therefore, before fracturing it is necessary to select an appropriate acid corrosion inhibitor (ACI) package, that will sufficiently protect metal surfaces while not diminishing the acid strength towards formation.
Currently, the ACI package is determined by conducting time-consuming (24-72 hours) laboratory tests until composition and optimal concentrations are found. Our aim is to build a model capable to predict corrosion rate (CR) and pitting index (PI) of metal coupon under the specified conditions without conducting laboratory experiment. Engineers can use these values to adjust additive concentrations or composition.
The embodiments described herein present a data science approach for predicting a corrosion rate and a pitting index for a metal surface in acid-containing fluids with arbitrary additives and experiment conditions (e.g., pressure, temperature, test duration, and so forth). The present disclosure describes creating a machine learning (ML) model based on information available in a corrosion inhibitor database (CIDB) which includes the followings steps.
To estimate the quality of corrosion rate predictions, a binary metric is introduced based on predicted values. If a model predicts corrosion rate above 0.05 lb/ft2 and true corrosion rate is above this value too, it is considered as true positive. Likewise, when both true and predicted corrosion rates are below 0.05 lb/ft2, it is labeled as true negative. All other outcomes are considered as errors either false negative or false positive. 89% accuracy was achieved in predicting corrosion rate and 0.82 F1-weighted score in classifying pitting indexes.
In addition, the present disclosure introduces methods of optimizing an acid corrosion inhibitor composition and concentration for use in hydraulic fracturing and matrix acidizing operations where acid-containing fluids are employed within the treatment schedules. The methods described herein are based on a model capable of predicting corrosion rate and pitting index of a metal coupon under specified conditions without conducting laboratory experiments. Engineers may then use these values to adjust additive concentrations or compositions.
With reference to FIG. 1, after a well system 10 is drilled, a casing 12 is typically run in the well system 10 and cemented to the well system 10 in order to maintain well integrity. After the casing 12 has been cemented in the well system 10, one or more sections of the casing 12 that are adjacent to the formation zones of interest (e.g., target well zone 13) may be perforated to allow fluid from the formation zones to flow into the well for production to the surface or to allow injection fluids to be applied into the formation zones. To perforate a casing section, a perforating gun string may be lowered into the well system 10 to a desired depth (e.g., at target zone 13), and one or more perforation guns 15 may be fired to create openings in the casing 12 and to extend perforations into the surrounding formation 16. Production fluids in the perforated formation 16 can then flow through the perforations and the casing openings into the wellbore 11.
Typically, perforating guns 15 (which include gun carriers and shaped charges mounted on or in the gun carriers or, alternatively, include sealed capsule charges) are lowered through tubing or other pipes to the desired formation interval on a line 17 (e.g., wireline, e-line, slickline, coiled tubing, and so forth). The charges carried in a perforating gun 15 may be phased to fire in multiple directions around the circumference of the wellbore 11. Alternatively, the charges may be aligned in a straight line. When fired, the charges create perforating jets that form holes in the surrounding casing 12 as well as extend perforation tunnels into the surrounding formation 16.
With reference to FIG. 1, certain embodiments of the present disclosure include a perforation system comprising: (1) a perforating gun 15 (or gun string), wherein each gun may be a carrier gun (as shown) or a capsule gun (not shown); and (2) one or more improved shaped charges 20 loaded into the perforating gun 15 (or into each gun of the gun string), each charge having a liner member, as described herein; and (3) a conveyance mechanism 17 for deploying the perforating gun 15 (or gun string) into a wellbore 11 to align at least one of said shaped charges 20 within a target formation interval 13, wherein the conveyance mechanism may be a wireline, tubing, or other conventional perforating deployment structure; among other components.
Referring to FIGS. 2 and 3, the material from a collapsed liner of the shaped charge 20 forms a perforating jet 28 that shoots through the front of the shaped charge and penetrates the casing 12 and underlying formation 16 to form a perforated tunnel (or perforation tunnel) 40. Around the surface region adjacent to the perforated tunnel 40, a layer of residue 30 from the charge liner is deposited. The charge liner residue 30 includes “wall” residue 30A deposited on the wall of the perforating tunnel 40 and “tip” residue 30B deposited at the tip of the perforating tunnel 40.
After perforating a formation interval of a well system 10, it is sometimes necessary or desired to pump a fluid into well to contact the formation 16. One example of such a fluid is an acid used in well acidizing operations. Well acidizing is a term well-known to those skilled in the art of petroleum engineering and includes various techniques such as “acid washing”, “acid fracturing”, and “matrix acidizing”. Acid washing involves the pumping of acid into the wellbore 11 to remove near-well formation damage and other damaging substances. This procedure commonly enhances production by increasing the effective well radius. When performed at pressures above the pressure required to fracture the formation 16, the procedure is often referred to as acid fracturing. In acid fracturing operations, flowing acid tends to etch the fracture faces of the formation 16 in a non-uniform pattern, thus forming conductive channels that remain open without a propping agent after the fracture closes. Finally, matrix acidizing involves the treatment of a reservoir formation with a stimulation fluid containing a reactive acid. For instance, in sandstone formations 16, the acid reacts with the soluble substances in the formation matrix to enlarge the pore spaces, and in carbonate formations 16, the acid dissolves the entire formation matrix. In each case, the matrix acidizing treatment improves the formation permeability to enable enhanced production of reservoir fluids. Matrix acidizing operations are ideally performed at high rate, but at treatment pressures below the fracture pressure of the formation. This enables the acid to penetrate the formation 16 and extend the depth of treatment while avoiding damage to the reservoir formation 16. Examples of acids to be used include, but are not limited to: hydrochloric acid, hydrofluoric acid, acetic acid, and formic acid.
FIG. 4 illustrates a well system 10 that may employ the systems and methods of this disclosure. As illustrated, a perforating gun 15 may be conveyed through a wellbore 11 extending through a geological formation 16 via a conveyance mechanism 17 (e.g., wireline, e-line, slickline, coiled tubing, and so forth) that is deployed into the wellbore 11 using a winch system 42. Although the winch system 42 is schematically shown in FIG. 4 as a mobile winch system carried by a truck, in other embodiments, the winch system 42 may be substantially fixed (e.g., a long-term installation that is substantially permanent or modular). The conveyance mechanism 17 may be spooled and unspooled on a drum 44 and an auxiliary power source 46 may provide energy to the winch system 42 and/or the perforating gun 15.
As illustrated, in certain embodiments, a data processing system 48 may be configured to perform the data processing techniques described herein, and to send and receive signals 50 from the winch system 42 and/or the perforating gun 15 to enable control of the well system 10 described herein. In certain embodiments, the data processing system 48 may include a processor 52, which may execute instructions stored in memory 54 and/or storage 56. As such, the memory 54 and/or the storage 56 of the data processing system 48 may be any suitable article of manufacture that can store the instructions. For example, the memory 54 and/or the storage 56 may be ROM memory, random-access memory (RAM), flash memory, an optical storage medium, or a hard disk drive, to name a few examples. In certain embodiments, a display 58, which may be any suitable electronic display, may provide a visualization, a well log, or other indication of properties in the geological formation 16 or the wellbore 11. As such, the data processing system 48 may be configured to perform the data modeling, analysis, and control techniques described in greater detail herein.
In general, certain compositions of different corrosion additives may be used as part of a corrosion inhibitor, which may be applied to suppress corrosion of a corrodible metal surface such as tubular components used in a well system 10. Certain of these methods vary in additive concentrations; aggregate state: aqueous, foam, or steam; application approach: when to start and finish of applying the composition, and so forth. In addition, in general, corrosion rates may be predicted. However, in general, conventional well systems and methods do not selectively determine a package of additives to achieve a required corrosion rate in tubular components while stimulation of the subterranean formations 16 involves acid-containing fluids.
The embodiments described herein present methods that provide numerous benefits as compared to conventional methods. For example, the embodiments described herein are configured to predict a corrosion rate and a pitting index for a metal surface, for a given corrosion inhibitor additive package in acid-containing fluids, without conducting physical experiments. In addition, the embodiments described herein are configured to select a composition of a corrosion inhibitor package to minimize corrosion of a corrodible metal surface. An obtained formulation of acid-containing fluids and a corrosion inhibitor package may then be used for stimulation of subterranean formations 16. In addition, the embodiments described herein are configured to predict a composition of a corrosion inhibitor package for an acid stimulation treatment when providing the conditions of a particular subterranean formation 16. In addition, the embodiments described herein are configured to predict the composition of a corrosion inhibitor package that meets the corrosion rate and the pitting index requirements of an acid stimulation treatment while optimizing the cost of the formulation.
As discussed above, currently, to determine if a given ACI package reduces corrosion rate below a required level, a laboratory test has to be performed. An example of laboratory test procedure will now be discussed. An objective of the embodiments described herein is to construct a model that can predict the outcome of such a laboratory test. Input and output parameters to be used in the model are described below.
FIG. 5 illustrates certain components that may be used in such a laboratory test. The inhibition performance of the desired corrosion inhibitor package may be evaluated by a corrosion test with a steel coupon 60 in a specified acid or brine (e.g., in a coupon container 62 storable in a coupon rack 64) and at the desired temperatures up to 400° F. Protection times up to 24 hours are typically determined. A pressurized corrosion test autoclave 66 may be used to simulate down-hole conditions (e.g., with the coupon rack 64 attached thereto).
Metal coupons 60 may be obtained from N80, J55, or other desired oilfield tubing and may be prepared by standard coupon machining preparation procedures. Inhibitors used may be chemical formulations that form a protective film, thus reducing the reaction rate of acid with steel. In addition, inhibitor aids used may be additives that are used synergistically with the inhibitors to decrease corrosion.
The corrosion rate for each test may be calculated as follows:
Corrosion Rate [ lb / ft 2 ] = ( W 0 - W f ) [ g ] W 0 [ g ] × SF [ lb / ft 2 ] ( 1 )
Here, W0—initial weight, Wf—final weight, SF—strip factor.
SF [ lb / ft 2 ] = Coupon Weight [ g ] Coupon Area [ cm 2 ] × 2.05 [ cm 2 lb g ft 2 ] ( 2 )
The corrosion test procedure enables analysts to evaluate and digitize the results of the experiment by: (1) measuring the weight loss of the metal in a sample, and (2) visual inspection of pitting. The corrosion test procedure also enables determination of the concentration of an inhibitor required to achieve acceptable corrosion inhibition.
A pitting index (PI) may be determined by the following descriptions (Table 1).
| TABLE 1 |
| Pitting Index description. |
| Description (1 mil = 0.001 inch) | Pitting Index | |
| none | 0 | |
| minor edge corrosion | 1 | |
| pitting on edge only | 2 | |
| pin points pit on surface < 25 | 3 | |
| pin points pit on surface > 25 | 4 | |
| pits - 16 to 31 mils diameter and 8 | 5 | |
| to 16 mils depth. Total 10 or less | ||
| 11-25 pits of Pitting Index 5 | 6 | |
| More than 25 pits of Pitting Index 5 | 7 | |
| Large pits - 63 to 126 mils diameter, | 8 | |
| more than 31 mils depth | ||
| More severe pitting than rating 8 | 9 | |
FIG. 6 illustrates examples of pitting indexes of coupons 60 after corrosion tests. In general, to meet specifications, a corrosion rate less than threshold value of 0.05 lb/ft2 and pitting index less than 2 are required.
Such a traditional approach based on laboratory measurements includes certain positives and negatives. The positives include precise corrosion rate estimation, and filling the database with new experiment outcomes. However, the negatives include that each experiment consumes time (e.g., up to three days) and money, that many experiments may be required to match inhibition rate, and that pitting index selection depends on the opinion of the particular analyst and may differ significantly from analyst to analyst.
The embodiments described herein, which apply machine learning techniques, are intended to address the shortcomings of such conventional laboratory testing. Positives of the embodiments described herein include zero monetary costs and almost instant target values prediction, the use of outcomes of all conducted experiments for prediction, and acting as an “average” analyst (e.g., substantially removing subjectivity of analysis). However, the negatives of the embodiments described herein include requiring feedback from subject matter experts for fine-tuning, and that model predictions are constrained to existing additives. Objectives of the embodiments described herein include training a ML model that can predict the outcome of a laboratory test, and implementing an interactive tool for additives set tuning.
Taking into account available parameters for laboratory testing, the model should be sensitive to the following input parameters (or their subset):
The expected output values of the model may include:
Additional outputs may also be considered, for example:
As described above, the embodiments presented herein utilize ML techniques to solve the problem. Relatively large amounts of collected data stored in the CIDB allows the ML algorithms to learn dependencies between input parameters and output (target) values to make predictions without being explicitly programmed to do so. In particular, the model may be trained in this way so that it is capable of capturing general interconnections and predict corrosion rate and pitting index on compositions. The following sections described relationships between tables in the CIDB, features analysis and data preprocessing before model training, variants of the input data organization and their pros and cons, and details about the training process, the model's API, and obtained metrics.
This section describes the procedure for obtaining and preprocessing data before training of the ML model. The CIDB contains more than 10,000 experiments over almost 40 years of testing. Despite some of the old products now possibly being obsolete, this database still represents a significant body of knowledge which continues to be replenished with 300-400 experiments every year. FIG. 7 illustrates dependencies of tables in the CIDB, then tables including Coupons, Sets, Experiments, Metals, Fluids, and Additives. It will be appreciated that the training of the ML model will be based on one or more of the dependencies depicted as being part of the CIDB data structure. For example, one non-limiting example of a relationship that may be trained is the relationship between the acceptability of an experiment of the Experiments table and additive type of the Additives table.
Main table in the CIDB is the Sets table. HCl concentration and strip factor values are already in this table. The table contains external ID keys to connect:
Primary Sets. A SetID key is used to connect the Coupons and Additives tables.
After the merging of the tables, the resulting table has a multi-index structure, where the top level index is ExperimentID. This unique ID corresponds to an individual customer's order and typically includes several SetIDs. Each SetID represents a set of physical conditions and additives composition with corresponding loadings for which the laboratory test was performed. Most of the sets in its turn differ only in temperature, test length, or particular additive concentration. Each SetID includes one or two CouponIDs for reproducibility.
The next step was to bring all units of measurement for concentrations to one type. The fact is that some dry additives presented in the table have different unit names. For example, units like Wt % or gram/100 ml were converted to ppt as:
1 g / 100 ml = 10 g / l = 10 kg / m 3 = 10 0.1198264 ppt = 83.4540445 ppt ( 3 ) 1 Wt % = 1 g / 100 g ≈ 10 g / l = 83.4540445 ppt ( 4 )
which constitute majority of unit name examples. One may find in other documents an alternative conversion factor:
1 g / 100 ml = 83.33 ppt ( 5 )
This value obtained when the conversion factor 0.1198264 is substituted by 0.120.
1 g / 100 ml = 10 0.12 ppt = 83.33 ppt ( 6 )
A processed dataset represents a table with multi-index rows, where experiments are represented in rows 1 to 10, and each row includes a separate additive with its own name and loading, as shown in FIG. 8.
For each acid in the table, there is a separate column with corresponding concentrations in it, so it was necessary to understand the distribution of acid type in the experiments. First, all fluid mixes were grouped by their fluid type names. Table 2 contains example percentages of each fluid type.
| TABLE 2 |
| Fluid type distribution. Most of them contain HCl. |
| Fluid Type Name | % of tests | |
| HCl | 66.46 | |
| HCl Special | 15.78 | |
| Mud Acid | 10.64 | |
| Clay Acid | 2.22 | |
| Organic | 1.79 | |
| Chelants | 1.30 | |
| Other | 1.30 | |
| Organic MA | 0.43 | |
| Unknown | 0.08 | |
As expected, most of the fluid types belong to hydrochloric acids, which are used for stimulation in carbonate reservoirs. Other fluids are mostly used in sandstone reservoirs and made up just 18% of the total. The top two fluid types were focused in HCl acids. For other experiments, there should be an individual model with extended dataset.
In certain embodiments, there is a boolean column in the dataframe for each separate acid, showing presence of this acid in the fluid mixture. More detailed analysis showed (Table 3) that more than 95% of experiments were conducted with HCl as the only acid in the mixture. HCit and HBF4 containing acids have already been removed because of previous fluid type filtration (see Table 2).
| TABLE 3 |
| Acids presence in HCl related fluids. Pure |
| HCl experiments are in the first row. |
| % of | |||||||
| HCl | HF | HAc | HFor | HCit | HBF4 | Brine | tests |
| True | False | False | False | False | False | False | 95.12 |
| True | False | False | False | 2.34 | |||
| True | False | False | False | False | 2.10 | ||
| True | False | False | False | 0.33 | |||
| False | False | False | False | False | False | False | 0.06 |
| True | False | False | False | False | False | True | 0.03 |
| True | False | False | False | False | False | 0.02 | |
In addition, all experiments with any other acid except HCl and all corresponding columns for acids were dropped.
Most of the test procedure guidelines have changed significantly since the first tests performed 30 years ago. After discussion with subject matter experts, it was determined that only data from the last ten years should be used going forward. This subset of data, however, is still representative because it contains approximately 7,500 unique experiments conditions from an initial 10,000 experiments.
Table 4 illustrates a distribution of pitting index values. Classes are relatively imbalanced. So, if samples are added to train the subset as is, predictions will be biased to 0 class. In order to prevent such behavior, either oversampling for rare cases, or just merging values to meaningful classes, may be used. The minimal difference that needs to be revealed is if the predicted pitting index is acceptable or not. It was decided to group pitting indexes PI≤1 to an acceptable group, marked as “0” and all other values PI≥2 to the unacceptable group, marked as “1”. Such 2-classes approach balances targets more accurately than a 3-classes split. It can be seen in Table 4 that nearly 75% of values should be acceptable in these terms.
| TABLE 4 |
| Distribution of Pitting Index values. |
| 75% of the tests are acceptable. |
| Pitting Index | % of values |
| 0 | 69.17 |
| 1 | 6.12 |
| 2 | 6.10 |
| 3 | 5.79 |
| 4 | 3.78 |
| 5 | 3.47 |
| 6 | 1.27 |
| 7 | 1.34 |
| 8 | 2.95 |
FIG. 9(a) illustrates corrosion rate distribution. Values are distributed exponentially and most of them are located near 0. Thus, switching to natural logarithmic values will help the model to learn faster. Some rates are equal to 0, so we added small value of 104 (≈e−9.2) to all corrosion rates to prevent infinity in log charts. FIG. 9(b) illustrates corrosion rates after transformation. In this chart: zero corrosion rate is transformed into x=−9.2.
Next, important observation could easily have been missed because it is quite difficult to notice before the machine learning model training process. The fact is that some unique test conditions (HCL concentration, temperature, additives set, and so forth) repeat several times in the database and even have different SetIDs and ExperimentIDs. FIG. 10 illustrates one of the most repeatable cases. There are five different sets with two coupons in each. The coupons in one set are made from the same metal. Most of them (eight lab tests) belong to the same ExperimentID #7715 with corrosion rate values in the range from 0.039 to 0.048, but the other two lab tests from another order (ExperimentID #7718) have twice as much rate of 0.084 and 0.089. Again, all of these experiments were performed for the same conditions (FIG. 10(a)). Pitting index in all of these lab tests remains the same and is equal to 2.
If strip factor is varied slightly (from 2.75 to 2.77), even more tests match such conditions. For example, there were 73 of them with corrosion rate in the range from 0.03 to 0.09, but this time pitting index also changes. Two-thirds of acceptable corrosion rate values are with acceptable pitting indexes of 0 or 1. However, the remaining cases (about a third) have unacceptable values of 2. FIG. 11 illustrates corrosion rates sorted in ascending order and grouped by pitting index values.
Table 5 illustrates remaining ratio of samples after each step of data cleaning. The resulting dataset contains 7,747 unique experiments conditions for the last ten years. It is desirable to avoid dropping duplicates to use all 13,081 experiments. If the data is split by CouponID, the same set-up could fall into both training and testing subsets (known as data leakage) that would lead to an overestimated model's metrics. To avoid such undesirable split, the standard procedure is to either drop such duplicated tests (except one) or take their mean value. Instead, another approach was used to prevent dropping duplicates, where all experiments were grouped by their input conditions and each group was given a unique ID. After that, these IDs were split into an 80/20 ratio in a stratified way by pitting index values. Then, all coupons were selected as training and testing coupons, correspondingly. Thus, no duplicated experiments will fall simultaneously into both subsets.
| TABLE 5 |
| Remaining samples amount after each step of data cleaning. |
| remaining samples |
| Step | Data cleaning procedure | percent | number |
| 1 | Initial Dataset size | 100% | 20 |
| 2 | Carbonates related experiments | 87.2% | 18 |
| 3 | Selecting last 10 years data | 65.5% | 14 |
| 4 | Dropping conflicting data | 62.9% | 13 |
| 5 | Dropping duplicates same test conditions | 37.3% | 7 |
This section provides a summary of two types of input data organization with a description of their strengths and weaknesses. A standard set of metrics was chosen to compare models quality:
All of the data was split into training and testing subsets into a ratio of 80/20 considering pitting index groups distributed equally.
The first approach was to implement a simple model that did not take into account the relationships between individual additives. In other words, each row in the dataset (FIG. 8) was considered as an independent sample of data with their own target values. The main goal of this approach was to adjust the pipeline and see general predictive power of the simplest model.
The first type of models that were used were Sci-Kit Learn models. The Sci-Kit Learn package has a set of already implemented machine learning models like Linear/Logistic regression, SVM based algorithms, and Random Forest models for classification and regression. However, it cannot handle categorical features out-of-the-box. Thus, to turn categories into numbers, a category encoder was used. The most effective turned out to be the CatBoost Encoder from the category encoders package. This encoder works as an ML model itself, and learns numerical representations of category values based on target.
A pipeline was prepared that allows the training of different kinds of models with hyperparameters optimization in a Bayesian way. Such fine tuning was done with the help of Optuna python package.
Random Forest models for classification and regression showed the best results compared to the rest of the models. These ensemble learning methods construct a multitude of decision trees at training time and return the class selected by most trees for the classification task and mean or average prediction of the individual trees for the regression problem. FIG. 12 presents a density heatmap of true and predicted corrosion rate values.
Although the heatmap seems diagonal, MAE of 0.06 lb/ft2 exceeds the threshold 0.05 lb/ft2 of corrosion rate. This means most of predicted values may become unacceptable. Feature analysis of this model (FIG. 13) illustrates a strong dependence on temperature and test length.
To estimate classification model quality, a confusion matrix (FIG. 14) was calculated, which illustrates pitting index group classification errors. Cells which are off the main diagonal means errors with their percentage share from all predicted values of corresponding class. This model could not distinguish individual additive impact and just predicted the most frequent value of 0. Although this simple approach did not show a good result, its feature importance analysis showed that temperature and test length are the most important input features.
The next type of models that was tried was Gradient Boosting on decision trees. The main idea of this approach is to train a sequence of simple models, each of which predicts errors of the previous model in the sequence. Compared to previous methods, this algorithm can handle categorical features without additional encoding.
A CatBoost Regressor was trained for corrosion rate prediction to see which input parameters affect predicted values the most. The resulting metrics (e.g., a predictions heatmap in FIG. 15 and the relative importance of features in FIG. 16) are not very different from those of the previous model (see FIG. 12). Temperature and duration of the experiment (TestLength) are on the top of features importance list, with StripFactor, MetalClassName, HCLConc (HCL concentration), and Pressure also being relatively important.
A CatBoost Classifier as well as the previous model is not able to recognize differences between additives. FIG. 17 illustrates its confusion matrix. Most of the predicted pitting index group values are 0. The approach could not predict inhibition of each individual additive because synergy between inhibitors and inhibitor aids can greatly impact the outcome.
Two additional models differ from the previous ones in that each individual sample is a mixture of additives with corresponding loadings at particular conditions. In such models, the training function takes vector representations of such mixtures as an input. These representations are often called embeddings. They could be learned as well as other model parameters, or set manually.
First, the focus was shifted to embedding based neural network, which learns vector representations of the mixtures as a function of embeddings of each component. A neural network, implemented in Tensorflow, has a special embedding layer for categorical data at the beginning. This layer provides learnable parameters for each known additive, linear combinations of which would be passed to fully connected layers with other numerical features later. Coefficients of linear combinations are precisely the loadings of corresponding additives. FIG. 18 illustrates the model architecture.
All numerical features related to experiments except loadings were scaled with a Standard Scaler. However, because of difference in individual additive concentrations, an embedding of mixture was not representative. Some of them may differ by several orders of magnitude as shown in Table 6.
| TABLE 6 |
| CouponID #106,967 additive loadings magnitude. |
| Relative difference is more than 2000 times. |
| Additive name | Additive loading | |
| A153 | 11 | ppt | |
| L001 | 70 | ppt | |
| L036 | 6 | Vol % | |
| U051 | 27 | Vol % | |
| U108 | 3 | Vol % | |
| Thioacet | 91.7 | ppt | |
| A262A | 1.1 | Vol % | |
| Fresh water | 46 | Vol % | |
| H031 | 9.8 | Vol % | |
| S001 | 2387 | ppt | |
Then, in order to balance each additive loading, another approach was provided. Multilabel binarization was used to encode mixtures. As illustrated in FIG. 19, the main idea is to mark all additives presented in the composition with their loadings while other additives remain zero. Thus, each additive has its own column and features standardization before the training process applies for them independently, thereby solving the inherent issue of the previous approach.
This approach is taken as a basis for training the final model. The final model is a fully connected four block neural network, implemented with a Fast AI framework. The first block takes the following features as inputs.
The full model scheme is illustrated in FIG. 20. The space between columns of squares (numbered as 1-4) in the FIG. 20 means one block of the neural network. It consists of three consecutive layers:
The last two layers introduce regularization and increase the generalizing ability of the model. The blue columns are outputs after each block. The number above it is the number of neurons in linear layer. The last (e.g., 4th) block transforms the hidden vector of size 256 to the target values and has different output size depending on problem type: 2—for classification, 1—for regression.
Pitting index prediction can also be solved as a regression problem. In this case, the predicted value is perceived as a measure of model fidelity. For example, if a value of 0.9 was predicted, then the model is confident that the pitting index is unacceptable. In contrast, a value of 0.5 shows model uncertainty between 0 and 1. To get integer value for confusion matrices, the predicted values may be rounded to the nearest integer. This approach was selected as the final one because it prevents fast model overfitting with a cross entropy loss function. For each target, individual models were trained. Loss functions for true/predicted pairs are standard:
In this section, all training hyperparameters, which can affect metrics very much, are described. A common observation for classification and regression models training is that small batch sizes not only increase training time, but lead to strong validation loss oscillating. So, batch size was fixed to 1024. The neural network has 1024/512/256 neurons in each layer, correspondingly.
The learning rate was selected to perform some training iterations with different learning rates and select one that will reduce the loss function value faster. Commonly, the learning rate is about 10−3 in the beginning of the training process, but at the fine tuning phase, it could drop to 10−5. Average learning cycle takes 300 epochs in total. Special callback is set to save model state in the case of a better validation score. The model state with best score is selected as final. Training and validation loss curves for regression and classification are shown in FIGS. 21 and 22, respectively.
Another important hyperparameter of training is the oversampling procedure. It was noted earlier that corrosion rates distribution as well as pitting indexes distribution represent exponential law, so it is obvious that model prediction would be shifted towards the predominant class while optimizing loss function. To change this behavior, either sample weights may be introduced, allowing focus on rare cases, or they may simply be duplicated in proportion to their number. Two models were trained, with and without this technique, for pitting index prediction and compared confusion matrices (FIG. 23). As expected, oversampling helps the model to recognize unacceptable PI groups better.
An objective of the embodiments described herein is not only to accurately predict the corrosion values themselves, but to determine if corrosion rate is above or below a threshold value 0.05 lb/ft2. Therefore, minimization of two kinds of errors was involved:
The areas with FP and FN could be pictured in the plot “true”-“predicted” corrosion rates if true values were previously sorted in ascending order. After that, all dots for individual laboratory tests, lying in corresponding quadrant show whether they were predicted correctly or not (FIG. 24). The corresponding plotter function in notebook is fully interactive and allows a user to see all input and output data along with some meta information.
Mean absolute error of 0.04 lb/ft2 seems relatively large, but this is not critical if the quadrant to which the value belongs is correctly predicted. All corrosion rate values below or above threshold are equally acceptable or unacceptable. MAE obtained is slightly greater than corrosion rate variance across all dataset is equal to 0.0368 lb/ft2. FIG. 23 illustrates confusion matrices with and without oversampling. The model with oversampling has a higher F1-weighted score and 11% more correctly predicted high pitting index values.
Further extension of visualization (FIG. 25) includes plotting pitting index group values by color. The graph legend explains all four possible variations. Correctly predicted values are green, errors are red. As shown, most acceptable pitting index group values were predicted relatively well. The errors ratio increases at higher true corrosion rates. This was because the higher true corrosion rate, the fewer corresponding experiments were conducted in the original dataset. For unacceptable cases, more than 77% of values were predicted correctly.
The embodiments described herein allow a user to examine model behavior while changing several input parameters. For example, a user can build a univariate plot (FIG. 26) for any numerical features like temperature or concentration. All parameters except one that is varying are fixed and equal to the values on the left. FIG. 26 also shows exponential corrosion rate behavior, as mentioned above. Alternatively, a user can explore three-parameter dependencies and their impact on target values simultaneously (FIG. 27). Here, the first dimension is on the X axis, the second is implemented as multiplot, and the third varies with help of a slider. The tool may also allow a user to perform a sensitivity study and to quickly find the composition with corrosion rate and pitting index below required level.
With the foregoing in mind, FIG. 28 illustrates a method 100 for stimulating a subterranean formation that includes updating pumping schedules of a hydraulic acid fracturing or an acidizing treatment job based on a corrosion rate and/or a pitting index of surfaces of metal pipe of a wellbore treatment fluid system. In certain embodiments, the method 100 includes selecting a wellbore for an acid stimulation treatment and initial pumping schedule using a wellbore treatment fluid system (step 102); obtaining information on metal used for pipe in the wellbore and a maximum corrosion rate threshold and/or a pitting index threshold to perform the acid stimulation treatment (step 104); determining composition and concentration of a corrosion inhibitor package for the wellbore treatment fluid system to obtain a corrosion rate and/or a pitting index of surfaces of the metal (step 106); updating the pumping schedule based on the determined composition and concentration of the corrosion inhibitor package (step 108); and performing hydraulic acid fracturing or an acidizing treatment using the updated pumping schedule (step 110). For example, in certain embodiments, step 110 of the method 100 may include automatically controlling operating parameters of the hydraulic acid fracturing or the acidizing treatment using the updated pumping schedule by, for example, automatically adjusting valve settings, pump settings, and so forth, of surface and/or downhole equipment of the well system 10 illustrated in FIG. 1 by, for example, automatically actuating such equipment in a manner to implement the updated pumping schedule.
In addition, in certain embodiments, the method 100 includes setting an initial composition and an initial concentration of the corrosion inhibitor package; executing an algorithm to predict the corrosion rate and/or the pitting index of surfaces of the metal; wherein:
In certain embodiments, the algorithm includes finding, in a database, a nearest fluid system composition associated with a known corrosion rate and pitting index; using the known corrosion rate and pitting index as initial predictions; determining whether distances between the selected fluid system and available fluid systems in the database (e.g., deviations of values for the selected fluid system and the available fluid systems) are above a tolerance; and performing an experiment and updating the database by using an obtained value as the predicted value. In addition, in certain embodiments, the algorithm includes building a proxy model based on a machine learning algorithm, as described in greater detail herein; and predicting the corrosion rate and/or the pitting index for a given fluid system composition using the proxy model.
In certain embodiments, determining the composition and the concentration of the corrosion inhibitor package for the wellbore treatment fluid system (e.g., step 106 of the method 100) includes setting the fluid system composition to include an acid-containing fluid with a known set of chemical additives, wherein concentrations of the acid-containing fluid and the set of chemical additives are not known; executing an algorithm to find all compositions of the fluid system (e.g., including additive names and concentrations) that confirm that the predicted corrosion rate and/or the predicted pitting index are below respective thresholds; and selecting a fluid composition from the compositions based on availability of chemical components to perform stimulation in the subterranean formation. In addition, in certain embodiments, determining the composition and the concentration of the corrosion inhibitor package for the wellbore treatment fluid system (e.g., step 106 of the method 100) includes selecting the fluid composition from the compositions based on an associated cost and/or environmental considerations.
In addition, in certain embodiments, determining the composition and the concentration of the corrosion inhibitor package for the wellbore treatment fluid system to obtain a corrosion rate and/or a pitting index of surfaces of the metal (e.g., step 106 of the method 100) includes setting the fluid system composition to include an acid-containing fluid with a known set of chemical additives, wherein concentrations of the acid-containing fluid and the set of chemical additives are known and defined as input to an algorithm; and executing the algorithm to find the corrosion rate and/or the pitting index for different metal types.
In certain embodiments, determining the composition and the concentration of the corrosion inhibitor package for the wellbore treatment fluid system to obtain a corrosion rate and/or a pitting index of surfaces of the metal is performed in substantially real-time at a wellsite for situations inclusive of, but not limited to, low rate, long periods of acid pumping due to limited formation injectivity; and acid cycling where pumps are turned on and off at intervals due to lack of stable rate injectivity into the subterranean formation.
In addition, in certain embodiments, determining the composition and the concentration of the corrosion inhibitor package for the wellbore treatment fluid system to obtain a corrosion rate and/or a pitting index of surfaces of the metal is performed using a machine learning based algorithm or a predictive modeling architecture inclusive of, but not limited to, regression, classification, clustering techniques based on bagging, boosting, and so forth, which shows reasonable agreement with the experimental data.
In addition, in certain embodiments, determining the composition and the concentration of the corrosion inhibitor package for the wellbore treatment fluid system to obtain a corrosion rate and/or a pitting index of surfaces of the metal (e.g., step 106 of the method 100) includes utilizing an artificial intelligence model for all types and environments of fracturing, stimulation treatments, inclusive of, but not limited to:
In addition, in certain embodiments, determining the composition and the concentration of the corrosion inhibitor package for the wellbore treatment fluid system to obtain a corrosion rate and/or a pitting index of surfaces of the metal (e.g., step 106 of the method 100) includes optimizing the cost of the corrosion inhibitor package. In addition, in certain embodiments, determining the composition and the concentration of the corrosion inhibitor package for the wellbore treatment fluid system to obtain a corrosion rate and/or a pitting index of surfaces of the metal (e.g., step 106 of the method 100) includes reducing the formation damage caused due to precipitation occurring the reservoir rock due to saturation of some chemical species caused by a sub-optimal corrosion inhibitor concentrations.
While only certain features of the invention have been illustrated and described herein, many modifications and changes will occur to those skilled in the art. It is, therefore, to be understood that the appended claims are intended to cover all such modifications and changes as fall within the true spirit of the invention.
The techniques presented and claimed herein are referenced and applied to material objects and concrete examples of a practical nature that demonstrably improve the present technical field and, as such, are not abstract, intangible or purely theoretical. Further, if any claims appended to the end of this specification contain one or more elements designated as “means for (perform)ing (a function) . . . ” or “step for (perform)ing (a function) . . . ”, it is intended that such elements are to be interpreted under 35 U.S.C. § 112(f). However, for any claims containing elements designated in any other manner, it is intended that such elements are not to be interpreted under 35 U.S.C. § 112(f).
1. A method for stimulating a subterranean formation, comprising:
(a) selecting a wellbore for an acid stimulation treatment and initial pumping schedule using a wellbore treatment fluid system;
(b) obtaining information on metal used for pipe in the wellbore and a maximum corrosion rate threshold and/or a pitting index threshold to perform the acid stimulation treatment;
(c) determining composition and concentration of a corrosion inhibitor package for the wellbore treatment fluid system to obtain a corrosion rate and/or a pitting index of surfaces of the metal;
(d) updating the pumping schedule based on the determined composition and concentration of the corrosion inhibitor package; and
(e) performing hydraulic acid fracturing or an acidizing treatment using the updated pumping schedule.
2. The method of claim 1, wherein step (c) comprises:
setting an initial composition and an initial concentration of the corrosion inhibitor package;
executing an algorithm to predict the corrosion rate and/or the pitting index of surfaces of the metal;
if the predicted corrosion rate is above a threshold, then the fluid system composition is automatically modified by increasing or decreasing concentrations of additives or adding or removing additives until the fluid system confirms that the predicted corrosion rate and/or the predicted pitting index are below respective thresholds; and
if the predicted corrosion rate is below the threshold, then the required fluid system is confirmed.
3. The method of claim 2, wherein the algorithm comprises:
finding, in a database, a nearest fluid system composition associated with a known corrosion rate and pitting index;
using the known corrosion rate and pitting index as initial predictions;
determining whether distances between the selected fluid system and available fluid systems in the database are above a tolerance; and
performing an experiment and updating the database by using an obtained value as the predicted value.
4. The method of claim 2, wherein the algorithm comprises:
building a proxy model based on a machine learning algorithm; and
predicting the corrosion rate and/or the pitting index for a given fluid system composition using the proxy model.
5. The method of claim 1, wherein step (c) comprises:
setting the fluid system composition to include an acid-containing fluid with a known set of chemical additives, wherein concentrations of the acid-containing fluid and the set of chemical additives are not known;
executing an algorithm to find all compositions of the fluid system that confirm that the predicted corrosion rate and/or the predicted pitting index are below respective thresholds; and
selecting a fluid composition from the compositions based on availability of chemical components to perform stimulation in the subterranean formation.
6. The method of claim 5, wherein step (c) comprises selecting the fluid composition from the compositions based on an associated cost and/or environmental considerations.
7. The method of claim 1, wherein step (c) comprises:
setting the fluid system composition to include an acid-containing fluid with a known set of chemical additives, wherein concentrations of the acid-containing fluid and the set of chemical additives are known and defined as input to an algorithm; and
executing the algorithm to find the corrosion rate and/or the pitting index for different metal types.
8. The method of claim 1, wherein step (c) is performed in substantially real-time at a wellsite for situations inclusive of:
a) low rate, long periods of acid pumping due to limited formation injectivity; and
b) acid cycling where pumps are turned on and off at intervals due to lack of stable rate injectivity into the subterranean formation.
9. The method of claim 1, wherein step (c) is performed using a machine learning based algorithm or a predictive modeling architecture inclusive of regression, classification, clustering techniques based on bagging, boosting, or some combination thereof.
10. The method of claim 1, wherein step (c) comprises utilizing an artificial intelligence model for all types and environments of fracturing, stimulation treatments, inclusive of:
a) proppant fracturing, acid fracturing, matrix acidizing, sand control, or water control treatments;
b) all clastic, carbonate, and volcanic rock geologic sequences;
c) geothermal wells where power is extracted from the subsurface steam/heat extraction;
d) vertical, deviated, and horizontal wells; and
e) all completion types such as cemented cased hole, open hole, open hole with fracturing sleeves and isolation packers, and pre-perforated liners.
11. The method of claim 1, wherein step (c) comprises optimizing a cost of the corrosion inhibitor package.
12. The method of claim 1, wherein step (c) comprises reducing formation damage incurred by the corrosion inhibitor chemistry.
13. A data processing system, comprising:
one or more processors configured to execute processor-executable instructions stored in memory media, wherein the processor-executable instructions, when executed by the one or more processors, cause the data processing system to:
(a) select a wellbore for an acid stimulation treatment and initial pumping schedule using a wellbore treatment fluid system;
(b) obtain information on metal used for pipe in the wellbore and a maximum corrosion rate threshold and/or a pitting index threshold to perform the acid stimulation treatment;
(c) determine composition and concentration of a corrosion inhibitor package for the wellbore treatment fluid system to obtain a corrosion rate and/or a pitting index of surfaces of the metal;
(d) update the pumping schedule based on the determined composition and concentration of the corrosion inhibitor package; and
(e) automatically control operating parameters of hydraulic acid fracturing or an acidizing treatment using the updated pumping schedule.
14. The data processing system of claim 13, wherein step (c) comprises:
setting an initial composition and an initial concentration of the corrosion inhibitor package;
executing an algorithm to predict the corrosion rate and/or the pitting index of surfaces of the metal;
if the predicted corrosion rate is above a threshold, then the fluid system composition is automatically modified by increasing or decreasing concentrations of additives or adding or removing additives until the fluid system confirms that the predicted corrosion rate and/or the predicted pitting index are below respective thresholds; and
if the predicted corrosion rate is below the threshold, then the required fluid system is confirmed.
15. The data processing system of claim 14, wherein the algorithm comprises:
finding, in a database, a nearest fluid system composition associated with a known corrosion rate and pitting index;
using the known corrosion rate and pitting index as initial predictions;
determining whether distances between the selected fluid system and available fluid systems in the database are above a tolerance; and
performing an experiment and updating the database by using an obtained value as the predicted value.
16. The data processing system of claim 14, wherein the algorithm comprises:
building a proxy model based on a machine learning algorithm; and
predicting the corrosion rate and/or the pitting index for a given fluid system composition using the proxy model.
17. The data processing system of claim 13, wherein step (c) comprises:
setting the fluid system composition to include an acid-containing fluid with a known set of chemical additives, wherein concentrations of the acid-containing fluid and the set of chemical additives are not known;
executing an algorithm to find all compositions of the fluid system that confirm that the predicted corrosion rate and/or the predicted pitting index are below respective thresholds; and
selecting a fluid composition from the compositions based on availability of chemical components to perform stimulation in the subterranean formation.
18. The data processing system of claim 17, wherein step (c) comprises selecting the fluid composition from the compositions based on an associated cost and/or environmental considerations.
19. The data processing system of claim 13, wherein step (c) comprises:
setting the fluid system composition to include an acid-containing fluid with a known set of chemical additives, wherein concentrations of the acid-containing fluid and the set of chemical additives are known and defined as input to an algorithm; and
executing the algorithm to find the corrosion rate and/or the pitting index for different metal types.
20. A data processing system configured to:
select a wellbore for an acid stimulation treatment and initial pumping schedule using a wellbore treatment fluid system;
obtain information on metal used for pipe in the wellbore and a maximum corrosion rate threshold and/or a pitting index threshold to perform the acid stimulation treatment;
determine composition and concentration of a corrosion inhibitor package for the wellbore treatment fluid system to obtain a corrosion rate and/or a pitting index of surfaces of the metal;
update the pumping schedule based on the determined composition and concentration of the corrosion inhibitor package; and
automatically control operating parameters of hydraulic acid fracturing or an acidizing treatment using the updated pumping schedule.