Predicting Subsurface Safety Valve Leak Rates

Machine learning models enhance the accuracy of SSSV leak rate predictions by accounting for thermodynamic changes, reducing testing duration and safety risks in hydrocarbon wells.

US20260210236A1Pending Publication Date: 2026-07-23SAUDI ARABIAN OIL CO
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
US · United States
Patent Type
Applications(United States)
Current Assignee / Owner
SAUDI ARABIAN OIL CO
Filing Date
2025-01-17
Publication Date
2026-07-23

AI Technical Summary

Technical Problem

Traditional methods for predicting subsurface safety valve (SSSV) leak rates in hydrocarbon wells are inaccurate due to the exclusion of thermodynamic changes and wellbore cooling effects, leading to prolonged testing periods and potential safety risks.

Method used

Employing machine learning models to predict pressure changes, offset temperatures, and gas compressibility factors, integrating these predictions into the API RP 14B calculation to enhance the accuracy of SSSV leak rate estimation.

Benefits of technology

Improves the accuracy of SSSV leak rate calculations, reducing testing duration and minimizing safety and environmental risks, while ensuring compliance with industry standards.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure US20260210236A1-D00000_ABST
    Figure US20260210236A1-D00000_ABST
Patent Text Reader

Abstract

A computer-implemented method that predicts a subsurface safety valve leak rate is described. The method includes predicting pressure changes at a trapped cavity associated with a subsurface safety valve of a shut-in well, an offset temperature at a depth of the subsurface safety valve, and gas compressibility factors over time. A leak rate at the subsurface safety valve is calculated in real time based on the predicted pressure changes, the predicted offset temperature, and the predicted gas compressibility factors.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] This disclosure relates generally to hydrocarbon drilling and production, and more particularly, predicting subsurface safety valve (SSSV) leak rates.BACKGROUND

[0002] In hydrocarbon production, a wellbore is drilled into a hydrocarbon-rich geological formation. After the wellbore is partially or completely drilled, a completion system is installed to secure the wellbore in preparation for production or injection. The completion system can include casing cemented in the wellbore to help control the well and maintain well integrity, and a production tubing positioned within the casing through which oil, gas, or other produced fluids can flow from the producing formation to the surface. A subsurface safety valve can be installed to shut off production flow in case of an emergency.BRIEF DESCRIPTION OF DRAWINGS

[0003] FIG. 1 shows a well system.

[0004] FIG. 2A and FIG. 2B show testing scenarios.

[0005] FIG. 3A shows a system for predicting gas leak rates.

[0006] FIG. 3B shows modeled temperatures at the true vertical depth (TVD) of the SSSV.

[0007] FIG. 4 is a process flow diagram that enables the prediction of subsurface safety valve gas leak rates.

[0008] FIG. 5 illustrates hydrocarbon production operations that include both one or more field operations and one or more computational operations.

[0009] FIG. 6 is a block diagram of an example computer system.DETAILED DESCRIPTION

[0010] Subsurface safety valves are installed in the wellbore of oil and gas wells. A subsurface safety valve (SSSV) can shut off the production flow of oil or gas to the surface in case of an emergency, such as leaks, equipment failure, structural failure, fire, or other destructive environmental conditions. Two types of SSSVs include surface controlled subsurface safety valves and subsurface controlled subsurface safety valves. In examples, a surface-controlled subsurface safety valve is operated from the surface using hydraulic or electric signals. A subsurface-controlled subsurface safety valve operates automatically based on well conditions. These valves ensure the safety of both the well and the surrounding environment by preventing uncontrolled flow from a well.

[0011] SSSVs serve as a downhole well barrier element. Industry practices dictate verification and testing of SSSVs after installation during production at the well as part of mandatory integrity monitoring. One of the measures used to monitor SSSVs is a leak rate (e.g., gas leak rate). The leak rate associated with the SSSV governs decisions on well operability status, thus accuracy of it is imperative. Traditionally, leak rates associated with SSSVs are measured indirectly through calculations based on data captured at a well in a production phase. Indirect measurements include performing an in-situ leak test at a well that is shut-in, and measuring a pressure build-up (PBU) in a trapped cavity volume (e.g., isolated volume) above the closed SSSV flapper to the closed valve at surface. Traditionally, a leak rate is computed using static equations promulgated by the American Petroleum Institute (API) Recommended Practice (RP) 14B Annex A formula. The API RP 14B is based on the Ideal gas law, modified to include gas deviation / compressibility factors that simulate real gas behavior with a single temperature at the SSSV depth. For example, a detailed description of SSSV testing can be found in API RP 14B, the entire contents of which are incorporated herein by reference.

[0012] Complications arise during leak tests due to the limited capabilities of traditional testing facilities. The traditional testing facilities observe pressure and temperature at surface and not downhole at the SSSV and fail to consider thermodynamics observed during the test evaluation period. Thermodynamics observed during the test evaluation period include, for example, wellbore cooling during well shut-in, which can impact the gas deviation / compressibility factor. The accuracy of data captured during a leak test significantly affects the calculated leak rate, which will impacts well safety and operability.

[0013] Embodiments described herein enable prediction of subsurface safety valve leak rates. The present techniques increase the accuracy of an SSSV leak rate calculation used in gas wells, incorporating thermodynamics observed during the test period, along with dynamic temperatures as determined by an offset temperature model at the SSSV depth. A first machine learning model is trained to predict pressure change due to dynamic temperatures (reduction or increment). A second machine learning model is trained to predict an offset temperature model at the SSSV depth. A third machine learning model is trained to predict a gas deviation / compressibility factor (z) based on various gas densities and compositions. The three trained machine learning models / predictions are used to calibrate the final data variables captured during the SSSV real time test that are applied to the API RP 14B calculation to produce a final leak rate.

[0014] Some advantages of the present techniques include an improvement to well operability by avoiding prolonged production interruptions to satisfy mandated SSSV testing. Inflow testing according to the present techniques is more accurate while using data captured within a shorter test period when compared to traditional leak tests. During SSSV tests there is a risk of hydrocarbon leaks, which can lead to environmental contamination. Further, high-pressure testing can sometimes lead to uncontrolled pressure build-up, which might result in equipment failure or blowouts, potentially releasing harmful substances into the environment. The testing process may involve chemicals that, if not handled correctly, can cause environmental harm. For offshore wells, testing activities can disturb marine ecosystems. The present techniques increase human safety and environmental safety by reducing the time that personnel is present at the well site for testing and reducing the time period over which SSSV testing occurs. Moreover, the present techniques improve the functioning of simulators and models that rely on leak rates associated with SSSVs by providing accurate leak rates.

[0015] FIG. 1 shows a well system in accordance with an embodiment of the present disclosure. Referring to FIG. 1, well system 100 includes a wellbore 102 drilled into a subterranean zone 104 from the Earth's surface 106. Casing string 110 can include multiple nested casings of different diameters. For example, in some embodiments, casing string 110 can include an 18⅝″ conductor nearest the wellhead at the uphole end with progressively smaller diameter casing segments extending downhole. For example, a 13⅜″ casing can be cemented within 18⅝″ conductor. Further downhole, a 9⅝″ casing is cemented within the 13⅜″ casing. Further downhole, a 7″ casing is cemented within the 9⅝″ casing. Furthest downhole, a 4½″ casing reaches down to the producing reservoir, and can be perforated so as to allow produced fluids to flow into the cased wellbore. The casing dimensions provided herein are for exemplary purposes, and other casing dimensions can be used. For example, the casing reaching the reservoir may also be 7″, 9⅝″, etc.

[0016] Production tubing 112 is positioned within casing string 110 and provides a passageway through which produced fluid 108 from production zone 114 can reach the surface 106. In some embodiments, production tubing 112 can be a 3½″ production tubing string. The production tubing dimensions provided herein are for exemplary purposes, and other production tubing dimensions can be used. For example, the production tubing may also be 4½″, 7″, 9⅝″, etc. A production packer 116 anchors and isolates the bottom of the production tubing string.

[0017] The inner surface of casing string 110 and the outer surface of production tubing 112 define an annulus, known as the tubing-casing annulus (TCA) 120. A lower boundary of TCA 120 is defined by the upper surface of the packer elements of production packer 116. A fluid 122 fills or substantially fills the volume of the TCA 120 and can be composed of brine or diesel or other suitable fluid. In some embodiments, a corrosion inhibitor can be added to fluid 122 (such that fluid 122 can be referred to as “inhibited fluid.”)

[0018] Well system 100 also includes a wellhead assembly 130 which can include hangers for casing string 110 and production tubing 112 and can include various valves, spools, pressure gauges and chokes to regulate and control production of produced fluids 108 fluids from wellbore 102. Produced fluids 108 can be conveyed towards pipelines or other surface treatment, gathering, or conveyance facilities via production line 132.

[0019] Well system 100 also includes a subsurface safety valve (SSSV) 150 connected to production tubing 112. Subsurface safety valve 150 has an open state in which produced fluid 108 is permitted through production tubing 112 to a closed state in which produced fluid 108 and any other fluids within production tubing 112 are prevented from flowing through production tubing 112. Well system 100 can be configured such that, in normal operations, the subsurface safety valve 150 is in the open state. In an emergency, the subsurface safety valve 150 can be switched to the closed state. For example, the subsurface safety valve 150 switches between the closed state and the open state responsive to controls at the surface using a controller at the surface (e.g., a surface controlled subsurface safety valve). In some examples, subsurface safety valve 150 switches between the closed state and the open state automatically in response to a change in control fluid pressure of hydraulic fluid controlled by hydraulic power unit (HPU) 180. As shown in FIG. 1, the HPU 180 is a surface controlled subsurface safety valve. In examples, a subsurface safety valve 150 opens in response to application of sufficient hydraulic control fluid pressure. If hydraulic control fluid pressure drops below a specified hold open pressure value, subsurface safety valve 150 closes.

[0020] Control fluid pressure can be added or released from HPU 180 at the wellhead from tank 182. A pump within the HPU 180 can pump fluid 122 from tank 182 into an SSSV tubing control line 186 via fluid input line 194. In some embodiments, by adding or releasing fluid from HPU 180, the fluid pressure within tubing control line 194 and 186 can be controlled so as to operate subsurface safety valve 150.

[0021] Well system 100 also includes emergency shut-down (ESD) / control unit 195. Control unit 195 can be or can include a computer system that comprises one or more processors, and a computer-readable medium (for example, a non-transitory computer-readable medium) storing computer instructions executable by the one or more processors to perform operations. Control unit 195 can be (or can include) a computer system 600 as shown, and described in more detail, in FIG. 6. In some embodiments, control unit 195 is at the wellsite proximate to wellhead assembly 130 and other wellsite equipment. In other embodiments, control unit 195 can be remote from the wellsite. In some embodiments, control unit 195 can be in communication with other remote or wellsite monitoring and control systems. In some embodiments, control unit 195 can be (or can be part of, or be connected to) a supervisory control and data acquisition (SCADA) system.

[0022] Well system 100 can include various sensors. In the illustrated embodiment, system 100 includes temperature sensor 184 and pressure sensor 190 positioned within production flow line as it exits wellhead assembly 130. Temperature sensor 184 and pressure sensor 190 can measure the temperature and pressure of the well fluid 108 at the surface, including the trapped cavity during SSSV inflow test.

[0023] Control unit 195 can be configured to determine whether an emergency condition in well system 100 has occurred or is occurring. Control unit 195 can, in response to such a detection of an emergency condition (or other condition in which closure of subsurface safety valve 150 is desirable), transmit a signal to HPU 180 to release fluid from tubing control line 194 and 186 in a volume sufficient to reduce fluid pressure to zero where the subsurface safety valve 150 closes.

[0024] The American Petroleum Institute (API) mandates testing of SSSVs. API Recommended Practice 14B provides guidelines for the design, installation, testing, operation, and documentation of SSSVs. In particular, API RP 14B includes guidelines for the configuration and installation of SSSVs in well systems (e.g., well system 100 of FIG. 1) to ensure safe and optimal performance. API RP 14B includes procedures for testing SSSVs to verify their functionality and reliability, and describes best practices for operating SSSVs to maintain safety and efficiency in Annex A. Further, API RP 14B provides mandates for maintaining detailed records of SSSVs, including selection, handling, and redress of downhole production equipment. Adherence with API RP 14B ensures that SSSV systems are designed and maintained with high safety and performance standards.

[0025] API RP 14B Annex A includes formulas for calculating leak rates during the testing of SSSVs. In examples, the API RP 14B Annex A provides methods of testing that infers leak rates by use of pressure build-up in a trapped cavity. For example, the following equation is provided for calculating the gas leak rate from pressure build-up.q=3⁢5.3⁢7⁢(PZ-PiZi)⁢(1t)⁢(VT)Equation⁢ 1where Zi is the initial compressibility factor; Z is the compressibility factor at a specific interval; and T is the absolute temperature at the SSSV depth, in Celsius+273. This calculation uses a single temperature, T, as associated with both the initial compressibility factor Zi and the compressibility factor at a specific interval Z.

[0027] The data for calculating the gas leak rate is captured during the pressure rise in a trapped cavity (e.g., an isolated test volume) during an inflow test. A trapped cavity 199 is shown in FIG. 1. In examples, an inflow test is a procedure used to verify the integrity of SSSVs by checking for leaks. The inflow test ensures that the SSSV can effectively prevent the uncontrolled flow of fluids from the wellbore when closed. During the inflow test, the wellbore above the SSSV is shut in (e.g., isolated), and the pressure is monitored.

[0028] The inflow test measures the pressure build up in the trapped cavity 199, which indicates whether there is any leakage through the SSSV. In examples, the results of the inflow test are compared against predefined acceptance criteria to determine if the valve meets the standards associated with leak rates. In examples, an acceptable leak rate for gas is 0.43 m3 / min (900 scf / hr / 15 scf / min). Inferring leak rates according to pressure build-up in a trapped cavity excludes a wellbore cooling effect from shutting in the well. Further, to successfully complete an inflow test, the pressure should be greater than or equal to the initial pressure. In some embodiments, a wellbore cooling effect occurs when a well is shut in, leading to a drop in temperature within the wellbore. Wellbore cooling occurs because the wellbore fluids, which are typically warmer due to production activities, begin to lose heat to the surrounding formations through conduction back to the initial geothermal / surrounding temperature.

[0029] In traditional leak tests, the wellbore is allowed to naturally cool down until the temperature stabilizes and stops decreasing prior to starting the SSSV inflow test and leak test. An ideal leak test begins when the wellbore temperature stabilizes (e.g., at a constant value), and continues until an evaluation period is complete, where the initial and end temperature shall be the same. In practice, the ideal case rarely occurs since wellbore cooling takes a prolonged period. For example, a stable, constant temperature may occur after the well is shut-in for a period of time greater than a month. A shutting in a well for a period greater than one month is not practical for a flowing, producing well.

[0030] When wells are flowing, the well is heated by the hotter fluid coming from downhole and the flow friction. A gas wellbore with a high flow rate can reach up to approximately two-hundred fifty degrees Fahrenheit at the surface. For wellbore cooling to reach temperature stabilization, it is dependent on tubular, completion fluid, cement thermal conductivities, and the like. In examples, a stable temperature refers to a temperature that is constant such that the initial temperature and end temperature during a testing or evaluation period are equivalent. Surface environmental conditions also can affect the surface temperature stability during test evaluation period, including impacts on temperature from adjacent wells. Waiting a prolonged period to cool a well to a stabilized temperature will lead to operational challenges. For example, in hazardous geographical locations, such as an offshore environment, environmental conditions change quickly and prolonged activities at the well site are frequently interrupted by hazardous conditions, including sudden rough weather and the like. Those risks are dangerous to human safety due to the time which personnel is present at the well site for testing, during which the hazardous conditions can occur. Further, shutting in a producing well causes production interruptions. Industry practice implements inflow testing at SSSVs as part of well integrity programs, where inflow testing is performed periodically (e.g., up to four times per year), to confirm healthiness of the SSSV. Industry practice in accordance with API RP 14B indicates a maximum testing interval of every six months (e.g., twice per year) unless local regulations, conditions and / or documented historical evidence indicate a different testing interval not to exceed 12 months (e.g., once per year). Wells are shut in periodically for compliance with API RP 14B.

[0031] FIG. 2A shows testing scenarios with accurate results according to the API RP 14B standard. In the example of FIG. 2A, the testing scenario shows the values of variables during testing of an SSSV, such as when performing inflow testing. Inflow testing includes, for example, performing an in-situ leak test at a well that is shut-in and measuring the pressure build-up in a trapped cavity volume above the closed SSSV flapper to the closed valve at surface. As shown in the example of FIG. 2A at reference number 210, a testing scenario shows a leak rate calculated according to the API RP 14B standard is accurate when conditions at the well include increasing pressure and a constant temperature over time, resulting in an increasing pressure build up over the well test period. Additionally, as shown in the example of FIG. 2A at reference number 220, a testing scenario shows a leak rate calculated according to the API RP 14B standard is accurate when conditions at the well include constant pressure and constant temperature over time, resulting in a constant pressure build up over the well test period. The calculation of a gas leak rate in accordance with API RP 14B excludes variations in temperature over time, such as when temperature varies in response to wellbore cooling when the well is shut in. In traditional inflow testing, the temperature is stabilized prior to capturing data to calculate the gas leak rate.

[0032] FIG. 2B shows testing scenarios with inaccurate results according to the API RP 14B standard. As shown in the example of FIG. 2B at reference number 230, a testing scenario shows conditions at the well as a constant pressure and a decreasing temperature over time, resulting in an increasing pressure build up over the well test period. As shown in the example of FIG. 2B at reference number 240, a testing scenario shows conditions at the well as an increasing pressure and a decreasing temperature over time, resulting in an increasing pressure build up over the well test period. Additionally, as shown in the example of FIG. 2B at reference number 250, a testing scenario shows conditions at the well as an increasing pressure and an increasing temperature over time, resulting in a constant pressure build up over the well test period. The calculation of a gas leak rate in accordance with API RP 14B can be inaccurate during testing scenarios 230, 240, and 250.

[0033] In the example of FIG. 2B, the testing scenarios 230, 240, and 250 show the values of variables during testing of an SSSV, such as when performing an in-situ leak test at a well that is shut-in and measuring the pressure build-up in a trapped cavity volume above the closed SSSV flapper to the closed valve at surface. The temperature T as shown in the testing scenarios 230, 240, and 250 reflects the real-world temperature at the SSSV, including the effects of wellbore cooling that occur when a well is shut in. In examples, a pressure differential across the closed SSSV is measured and the leak rate is monitored from the pressure build up occurrence on the trapped cavity above the closed SSSV during test period. When the well is still cooling down / temperature decrease, the pressure on the trapped cavity will also decrease. For example, pressure on the trapped cavity decreases according to Gay-Lussac's Law. This pressure decrease will mask at least a portion of pressure build up that occurs due to SSSV leak, and the resulting net pressure build up (PBU) over time may be different from the initial PBU if temperature is not constant. Accordingly, FIG. 2B shows surface environmental conditions can affect the surface temperature stability during test evaluation period, including impacts on temperature from adjacent wells.

[0034] In some embodiments, leak rate calculations used in gas wells are modified to include thermodynamic changes and also incorporate an offset temperature model. In examples, the offset temperature model determines temperature at the depth of the SSSV. In some embodiments, a leak rate for an SSSV is predicted in compliance with API RP 14B, such that the leak rate calculations are consistently applied and repeatable, can be used in different scenarios by different operators. On the other hand, API RP 14B also states that alternate methods to calculate indirect leak measurements are acceptable when testing results conform to the defined requirements and documented procedures, provided they are verifiable and repeatable. The present techniques increase human safety by minimizing the personnel presence at a well site to perform in-situ leak testing. Further, the present techniques also minimize production interruptions due to in-situ SSSV tests.

[0035] FIG. 3A shows a system 300A for predicting gas leak rates. Input data 310 includes pressure and temperature data. Input data 320 includes pressure, temperature, and total volume depth data. Input data 330 includes pressure, temperature, and gas compressibility (Z-factor).

[0036] A first trained machine learning model 312 obtains input data 310. In examples, input data 310 includes surface well pressure data captured by at least one real time digital pressure transmitter gauge (e.g., pressure sensor 190 of FIG. 1) installed on each well. Input data 310 also includes temperature data captured by at least one real time digital temperature transmitter gauge (e.g., temperature sensor 184 of FIG. 1) installed on each well. In examples, the input data 310 also includes a respective well size and gas composition as parameters used to train the first trained machine learning model 312. The first trained machine learning model is trained to predict pressure changes due to changes in temperature using empirical data as observed in the input data 310. The first trained machine learning model 312 outputs a predicted pressure change due to temperature (reduction or increment) shown at block 314. In examples, the predicted pressure change is a rate of pressure change due to temperature.

[0037] A second trained machine learning model 322 obtains input data 320. In examples, input data 320 includes surface well pressure data captured by at least one real time digital pressure transmitter gauge installed on each well. Input data 320 also includes temperature data captured by at least one real time digital temperature transmitter gauge installed on each well. In examples, the input data 320 also includes a respective well size and gas composition as parameters used to train the second trained machine learning model 322. The second trained machine learning model is trained to predict an offset temperature in the subsurface at the SSSV depth. The second trained machine learning model 322 outputs a predicted temperature at the SSSV depth. In examples, the temperature data at SSSV depth is simulated based on surface temperature data from the onsite well transmitter gauge.

[0038] For example, a simulator calculates downhole temperature and pressure profiles in view of transient thermal analysis during production and well shut-in, taking into account thermal conductivity on cement, well completion / TCA fluid, and geothermal temperatures. In examples, the simulator is based on a model that implements transient thermal analysis to generate temperature and pressure profiles. The model defines the geometry, material properties (like thermal conductivity, specific heat, and density), and initial conditions of a wellbore represented by the model. In some embodiments, simulators use solve transient heat transfer equations over a number of time intervals. For example, the total simulation time is divided into smaller time steps with respect to the total simulation time, the equations are solved iteratively for each time step.

[0039] FIG. 3B shows modeled temperatures 300B at the true vertical depth (TVD) of the SSSV. Examples of temperatures are shown at shut in 380, after 6 hours shut in 382, after 12 hours shut in 384, and an undisturbed condition 386. As shown in the example of FIG. 3B, temperature decreases at the depth of the SSSV at a slower rate when compared to the temperature decreases at depths higher than the SSSV. The second trained machine learning model is trained to predict temperature at the SSSV depth using the simulated data.

[0040] Referring again to FIG. 3A, a third trained machine learning model 332 obtains input data 330. In examples, input data 330 includes pressure, temperature, and gas compressibility factor (Z) data. In examples, input data 330 includes surface well pressure data captured by at least one real time digital pressure transmitter gauge installed on each well. Input data 330 also includes temperature data captured by at least one real time digital temperature transmitter gauge installed on each well. The third trained machine learning model is trained to output a predicted gas compressibility factor (Z) 340 as function of pressure and temperature.

[0041] In examples, the third trained machine learning model is trained using known temperature, pressure and a Z-factor for natural gas with a predetermined composition according to density. The gas composition can include, for example, N2, H2S, and CO2. In examples, lookup charts are used to show the relationships between the known temperature, pressure and a Z-factor for natural gas. For example, a Standing-Katz chart is a graphical tool used to estimate the compressibility factor (Z). The Standing-Katz chart predicts how real gases deviate from ideal gas behavior under various pressures and temperatures. In examples, the chart uses pseudo-reduced pressure and pseudo-reduced temperature to generalize the behavior of different gases. The pseudo-reduced properties are dimensionless ratios used to simplify the analysis of real gas behavior by normalizing the actual properties of a gas with respect to its critical properties. A pseudo-reduced pressure is a ratio of the actual pressure of the gas to its critical pressure; a pseudo-reduced temperature is a ratio of the actual temperature of the gas to its critical temperature. By locating the pseudo-reduced pressure on the x-axis and the pseudo-reduced temperature on the y-axis of the chart, the corresponding Z-factor is obtained.

[0042] Data 350 captured during a real time inflow test is combined with the predicted data 360 and applied to a leak rate calculation at block 370. In examples, real time inflow test data 350 includes empirical data such as flow rates, fluid types, time intervals, and valve positions. For example, the flow rates include a measured rate at which fluids enter the wellbore, such as at the trapped cavity. The fluid type identifies the type of fluid, such as oil, gas, or water, entering the trapped cavity. Time intervals include a duration of the test and the time intervals associated with predictions of pressure, offset temperature, and the gas compressibility factor. The predicted data 360 is obtained from the first, second, the third trained machine learning models. In examples, the present techniques enable a leak test over a duration of thirty minutes, beginning when the wellbore temperature stabilizes (e.g., at a constant value), and continues until an evaluation period is complete, where the initial and end temperature shall be the same.

[0043] The final leak rate calculation at block 370 is based on the real-time inflow test data 350 and the predicted data 360 including: (1) the combined final pressure discounting any thermodynamic change output by the first trained machine learning model, (2) offset temperature at SSSV depth output by the second trained machine learning model, and (3) gas compressibility factors output by the third trained machine learning model. For example, the real-time inflow test data 350 and the predicted data 360 are applied to Equation 1 at block 370 to calculate a gas leak rate, in real time.

[0044] FIG. 4 is a workflow 400 that enables the prediction of subsurface safety valve gas leak rates.

[0045] At block 402 the well is prepared for an SSSV leak rate test. The well is shut in, and the SSSV is closed. The cavity (e.g., trapped cavity 199 of FIG. 1) above the SSSV is depressurized to create a differential pressure. The cavity volume above the SSSV is trapped (e.g., isolated) during the test.

[0046] At block 404, the starting and ending pressure and temperature is recorded the trapped cavity above the closed SSSV. In examples, the temperatures are recorded via the in-situ well surface digital transmitter gauge, within the test duration period.

[0047] At block 406, the first trained machine learning model is used to determine thermal pressure change (due to any dynamic temperature change occurrence) during test period. In examples, a first machine learning model to is trained predict the accurate pressure change due to a dynamic temperature scenario (reduction or increment) using machine learning algorithms.

[0048] At block 408, the second trained machine learning model is used to determine the offset temperature at the depth of the SSSV. A second machine learning model is trained to predict offset temperature model in the SSSV depth.

[0049] At block 410, the third trained machine learning model is used to determine a gas compressibility Z factor, for the initial and ending pressures at the trapped cavity and temperature. The third machine learning model is trained to predict the gas deviation / compressibility factor (z) based on various gas density and composition.

[0050] At block 412, the SSSV leak rate is determined from the results of the initial and ending pressures, offset temperature, gas compressibility Z factor from the first, second, and third trained machine learning models. Thereafter, the three machine learning models will be used to calibrate the empirical data variables taken from the SSSV real time test for the API RP 14B calculation, to produce the final leak rate. The parameters to be utilized to determine the leak rate value include empirical data such as temperature, pressure, containment volume, gas properties and composition such as density, N2, H2S, and CO2 content associated with the gas compressibility factor. In examples, the API RP 14B Annex A formula states that if the leak rate exceeds 0.43 m3 / min (15 SCF / min) gas, the well shall remain shut-in until corrective actions has been performed.

[0051] The present techniques elevate the accuracy of SSSV leak rate calculations and extend the SSSV leak rate calculation used in gas wells to include (if any) thermodynamic changes, along with the offset temperature model in the SSSV depth. The present techniques prevent unnecessary well shut-in due to inaccurate calculated values beyond the allowable leak rate, as well as reduce operational inflow test activity time, resulting in maintaining operational safety, productivity, and profitability. The existing API RP 14B Annex A provides testing that infers leak rates by use of pressure build-up in a trapped cavity. However, inferring leak rates is limited in accuracy to when the temperature is constant (isothermal), with no pressure decrement. The present techniques enable accuracy of SSSV's leak rate calculation when temperature varies, such as described by an offset temperature model at the SSSV depth.

[0052] FIG. 5 illustrates hydrocarbon production operations 500 that include both one or more field operations 510 and one or more computational operations 512, which exchange information and control exploration for the production of hydrocarbons. In some implementations, outputs of techniques of the present disclosure can be performed before, during, or in combination with the hydrocarbon production operations 500, specifically, for example, either as field operations 510 or computational operations 512, or both.

[0053] Examples of field operations 510 include forming / drilling a wellbore, hydraulic fracturing, producing through the wellbore, injecting fluids (such as water) through the wellbore, to name a few. In some implementations, methods of the present disclosure can trigger or control the field operations 510. For example, the methods of the present disclosure can generate data from hardware / software including sensors and physical data gathering equipment (e.g., seismic sensors, well logging tools, flow meters, and temperature and pressure sensors). The methods of the present disclosure can include transmitting the data from the hardware / software to the field operations 510 and responsively triggering the field operations 510 including, for example, generating plans and signals that provide feedback to and control physical components of the field operations 510. Alternatively or in addition, the field operations 510 can trigger the methods of the present disclosure. For example, implementing physical components (including, for example, hardware, such as sensors) deployed in the field operations 510 can generate plans and signals that can be provided as input or feedback (or both) to the methods of the present disclosure.

[0054] Examples of computational operations 512 include one or more computer systems 520 that include one or more processors and computer-readable media (e.g., non-transitory computer-readable media) operatively coupled to the one or more processors to execute computer operations to perform the methods of the present disclosure. The computational operations 512 can be implemented using one or more databases 518, which store data received from the field operations 510 and / or generated internally within the computational operations 512 (e.g., by implementing the methods of the present disclosure) or both. For example, the one or more computer systems 520 process inputs from the field operations 510 to assess conditions in the physical world, the outputs of which are stored in the databases 518. For example, seismic sensors of the field operations 510 can be used to perform a seismic survey to map subterranean features, such as facies and faults. In performing a seismic survey, seismic sources (e.g., seismic vibrators or explosions) generate seismic waves that propagate in the earth and seismic receivers (e.g., geophones) measure reflections generated as the seismic waves interact with boundaries between layers of a subsurface formation. The source and received signals are provided to the computational operations 512 where they are stored in the databases 518 and analyzed by the one or more computer systems 520.

[0055] In some implementations, one or more outputs 522 generated by the one or more computer systems 520 can be provided as feedback / input to the field operations 510 (either as direct input or stored in the databases 518). The field operations 510 can use the feedback / input to control physical components used to perform the field operations 510 in the real world.

[0056] For example, the computational operations 512 can process the seismic data to generate three-dimensional (3D) maps of the subsurface formation. The computational operations 512 can use these 5D maps to provide plans for locating and drilling exploratory wells. In some operations, the exploratory wells are drilled using logging-while-drilling (LWD) techniques which incorporate logging tools into the drill string. LWD techniques can enable the computational operations 512 to process new information about the formation and control the drilling to adjust to the observed conditions in real-time.

[0057] The one or more computer systems 520 can update the 5D maps of the subsurface formation as information from one exploration well is received and the computational operations 512 can adjust the location of the next exploration well based on the updated 5D maps. Similarly, the data received from production operations can be used by the computational operations 512 to control components of the production operations. For example, production well and pipeline data can be analyzed to predict slugging in pipelines leading to a refinery and the computational operations 512 can control machine operated valves upstream of the refinery to reduce the likelihood of plant disruptions that run the risk of taking the plant offline.

[0058] In some implementations of the computational operations 512, customized user interfaces can present intermediate or final results of the above-described processes to a user. Information can be presented in one or more textual, tabular, or graphical formats, such as through a dashboard. The information can be presented at one or more on-site locations (such as at an oil well or other facility), on the Internet (such as on a webpage), on a mobile application (or app), or at a central processing facility.

[0059] The presented information can include feedback, such as changes in parameters or processing inputs, that the user can select to improve a production environment, such as in the exploration, production, and / or testing of petrochemical processes or facilities. For example, the feedback can include parameters that, when selected by the user, can cause a change to, or an improvement in, drilling parameters (including drill bit speed and direction) or overall production of a gas or oil well. The feedback, when implemented by the user, can improve the speed and accuracy of calculations, streamline processes, improve models, and solve problems related to efficiency, performance, safety, reliability, costs, downtime, and the need for human interaction.

[0060] In some implementations, the feedback can be implemented in real-time, such as to provide an immediate or near-immediate change in operations or in a model. The term real-time (or similar terms as understood by one of ordinary skill in the art) means that an action and a response are temporally proximate such that an individual perceives the action and the response occurring substantially simultaneously. For example, the time difference for a response to display (or for an initiation of a display) of data following the individual's action to access the data can be less than 1 millisecond (ms), less than 1 second(s), or less than 5 s. While the requested data need not be displayed (or initiated for display) instantaneously, it is displayed (or initiated for display) without any intentional delay, taking into account processing limitations of a described computing system and time required to, for example, gather, accurately measure, analyze, process, store, or transmit the data.

[0061] Events can include readings or measurements captured by downhole equipment such as sensors, pumps, bottom hole assemblies, or other equipment. The readings or measurements can be analyzed at the surface, such as by using applications that can include modeling applications and machine learning. The analysis can be used to generate changes to settings of downhole equipment, such as drilling equipment. In some implementations, values of parameters or other variables that are determined can be used automatically (such as through using rules) to implement changes in oil or gas well exploration, production / drilling, or testing. For example, outputs of the present disclosure can be used as inputs to other equipment and / or systems at a facility. This can be especially useful for systems or various pieces of equipment that are located several meters or several miles apart, or are located in different countries or other jurisdictions.

[0062] FIG. 6 is a block diagram of an example computer system 600 that can be used to provide computational functionalities associated with described algorithms, methods, functions, processes, flows, and procedures, according to some implementations of the present disclosure. In some implementations, the system 100 can be the computer system 600, include the computer system 600, or the system 100 can communicate with the computer system 600.

[0063] The illustrated computer 602 is intended to encompass any computing device such as a server, a desktop computer, an embedded computer, a laptop / notebook computer, a wireless data port, a smart phone, a personal data assistant (PDA), a tablet computing device, or one or more processors within these devices, including physical instances, virtual instances, or both. The computer 602 can include input devices such as keypads, keyboards, and touch screens that can accept user information. Also, the computer 602 can include output devices that can convey information associated with the operation of the computer 602. The information can include digital data, visual data, audio information, or a combination of information. The information can be presented in a graphical user interface (UI) (or GUI). In some implementations, the inputs and outputs include display ports (such as DVI-I+2x display ports), USB 3.0, GbE ports, isolated DI / O, SATA-III (6.0 Gb / s) ports, mPCIe slots, a combination of these, or other ports. In instances of an edge gateway, the computer 602 can include a Smart Embedded Management Agent (SEMA), such as a built-in ADLINK SEMA 2.2, and a video sync technology, such as Quick Sync Video technology supported by ADLINK MSDK+. In some examples, the computer 602 can include the MXE-5400 Series processor-based fanless embedded computer by ADLINK, though the computer 602 can take other forms or include other components.

[0064] The computer 602 can serve in a role as a client, a network component, a server, a database, a persistency, or components of a computer system for performing the subject matter described in the present disclosure. The illustrated computer 602 is communicably coupled with a network 630. In some implementations, one or more components of the computer 602 can be configured to operate within different environments, including cloud-computing-based environments, local environments, global environments, and combinations of environments.

[0065] At a high level, the computer 602 is an electronic computing device operable to receive, transmit, process, store, and manage data and information associated with the described subject matter. According to some implementations, the computer 602 can also include, or be communicably coupled with, an application server, an email server, a web server, a caching server, a streaming data server, or a combination of servers.

[0066] The computer 602 can receive requests over network 630 from a client application (for example, executing on another computer 602). The computer 602 can respond to the received requests by processing the received requests using software applications. Requests can also be sent to the computer 602 from internal users (for example, from a command console), external (or third) parties, automated applications, entities, individuals, systems, and computers.

[0067] Each of the components of the computer 602 can communicate using a system bus 603. In some implementations, any or all of the components of the computer 602, including hardware or software components, can interface with each other or the interface 604 (or a combination of both), over the system bus. Interfaces can use an application programming interface (API) 612, a service layer 613, or a combination of the API 612 and service layer 613. The API 612 can include specifications for routines, data structures, and object classes. The API 612 can be either computer-language independent or dependent. The API 612 can refer to a complete interface, a single function, or a set of APIs 612.

[0068] The service layer 613 can provide software services to the computer 602 and other components (whether illustrated or not) that are communicably coupled to the computer 602. The functionality of the computer 602 can be accessible for all service consumers using this service layer 613. Software services, such as those provided by the service layer 613, can provide reusable, defined functionalities through a defined interface. For example, the interface can be software written in JAVA, C++, or a language providing data in extensible markup language (XML) format. While illustrated as an integrated component of the computer 602, in alternative implementations, the API 612 or the service layer 613 can be stand-alone components in relation to other components of the computer 602 and other components communicably coupled to the computer 602. Moreover, any or all parts of the API 612 or the service layer 613 can be implemented as child or sub-modules of another software module, enterprise application, or hardware module without departing from the scope of the present disclosure.

[0069] The computer 602 can include an interface 604. Although illustrated as a single interface 604 in FIG. 6, two or more interfaces 604 can be used according to particular needs, desires, or particular implementations of the computer 602 and the described functionality. The interface 604 can be used by the computer 602 for communicating with other systems that are connected to the network 630 (whether illustrated or not) in a distributed environment. Generally, the interface 604 can include, or be implemented using, logic encoded in software or hardware (or a combination of software and hardware) operable to communicate with the network 630. More specifically, the interface 604 can include software supporting one or more communication protocols associated with communications. As such, the network 630 or the interface's hardware can be operable to communicate physical signals within and outside of the illustrated computer 602.

[0070] The computer 602 includes a processor 605. Although illustrated as a single processor 605 in FIG. 6, two or more processors 605 can be used according to particular needs, desires, or particular implementations of the computer 602 and the described functionality. Generally, the processor 605 can execute instructions and manipulate data to perform the operations of the computer 602, including operations using algorithms, methods, functions, processes, flows, and procedures as described in the present disclosure.

[0071] The computer 602 can also include a database 606 that can hold data for the computer 602 and other components connected to the network 630 (whether illustrated or not). For example, database 606 can be an in-memory, conventional, or a database storing data consistent with the present disclosure. In some implementations, the database 606 can be a combination of two or more different database types (for example, hybrid in-memory and conventional databases) according to particular needs, desires, or particular implementations of the computer 602 and the described functionality. Although illustrated as a single database 606 in FIG. 6, two or more databases (of the same, different, or combination of types) can be used according to particular needs, desires, or particular implementations of the computer 602 and the described functionality. While database 606 is illustrated as an internal component of the computer 602, in alternative implementations, database 606 can be external to the computer 602.

[0072] The computer 602 also includes a memory 607 that can hold data for the computer 602 or a combination of components connected to the network 630 (whether illustrated or not). Memory 607 can store any data consistent with the present disclosure. In some implementations, memory 607 can be a combination of two or more different types of memory (for example, a combination of semiconductor and magnetic storage) according to particular needs, desires, or particular implementations of the computer 602 and the described functionality. Although illustrated as a single memory 607 in FIG. 6, two or more memories 607 (of the same, different, or combination of types) can be used according to particular needs, desires, or particular implementations of the computer 602 and the described functionality. While memory 607 is illustrated as an internal component of the computer 602, in alternative implementations, memory 607 can be external to the computer 602.

[0073] An application 608 can be an algorithmic software engine providing functionality according to particular needs, desires, or particular implementations of the computer 602 and the described functionality. For example, an application 608 can serve as one or more components, modules, or applications 608. Multiple applications 608 can be implemented on the computer 602. Each application 608 can be internal or external to the computer 602.

[0074] The computer 602 can also include a power supply 614. The power supply 614 can include a rechargeable or non-rechargeable battery that can be configured to be either user- or non-user-replaceable. In some implementations, the power supply 614 can include power-conversion and management circuits, including recharging, standby, and power management functionalities. In some implementations, the power-supply 614 can include a power plug to allow the computer 602 to be plugged into a wall socket or a power source to, for example, power the computer 602 or recharge a rechargeable battery.

[0075] There can be any number of computers 602 associated with, or external to, a computer system including computer 602, with each computer 602 communicating over network 630. Further, the terms “client,”“user,” and other appropriate terminology can be used interchangeably without departing from the scope of the present disclosure. Moreover, the present disclosure contemplates that many users can use one computer 602 and one user can use multiple computers 602.Embodiments

[0076] According to some non-limiting embodiments or examples, provided is a computer-implemented method that predicts a subsurface safety valve leak rate, including: predicting pressure changes at a trapped cavity associated with a subsurface safety valve of a shut-in well based on a pressure and a temperature captured at the well, where the pressure changes include an initial pressure and an ending pressure at the trapped cavity; predicting an offset temperature at a depth of the subsurface safety valve; predicting gas compressibility factors over time based on the initial pressure at the trapped cavity and the ending pressure at the trapped cavity; and calculating a leak rate at the subsurface safety valve based on the predicted pressure changes, the predicted offset temperature, and the predicted gas compressibility factors.

[0077] According to some non-limiting embodiments or examples, provided is an apparatus including a non-transitory, computer readable, storage medium that stores instructions that, when executed by at least one processor, cause the at least one processor to perform operations including: predicting pressure changes at a trapped cavity associated with a subsurface safety valve of a shut-in well based on a pressure and a temperature captured at the well, where the pressure changes include an initial pressure and an ending pressure at the trapped cavity; predicting an offset temperature at a depth of the subsurface safety valve; predicting gas compressibility factors over time based on the initial pressure at the trapped cavity and the ending pressure at the trapped cavity; and calculating a leak rate at the subsurface safety valve based on the predicted pressure changes, the predicted offset temperature, and the predicted gas compressibility factors.

[0078] According to some non-limiting embodiments or examples, provided is a system, including: one or more memory modules; one or more hardware processors communicably coupled to the one or more memory modules, the one or more hardware processors configured to execute instructions stored on the one or more memory modules to perform operations including: predicting pressure changes at a trapped cavity associated with a subsurface safety valve of a shut-in well based on a pressure and a temperature captured at the well, where the pressure changes include an initial pressure and an ending pressure at the trapped cavity; predicting an offset temperature at a depth of the subsurface safety valve; predicting gas compressibility factors over time based on the initial pressure at the trapped cavity and the ending pressure at the trapped cavity; and calculating a leak rate at the subsurface safety valve based on the predicted pressure changes, the predicted offset temperature, and the predicted gas compressibility factors.

[0079] Further non-limiting aspects or embodiments are set forth in the following numbered embodiments:

[0080] Embodiment 1: A computer-implemented method that predicts a subsurface safety valve leak rate, including: predicting pressure changes at a trapped cavity associated with a subsurface safety valve of a shut-in well based on a pressure and a temperature captured at the well, where the pressure changes include an initial pressure and an ending pressure at the trapped cavity; predicting an offset temperature at a depth of the subsurface safety valve; predicting gas compressibility factors over time based on the initial pressure at the trapped cavity and the ending pressure at the trapped cavity; and calculating a leak rate at the subsurface safety valve based on the predicted pressure changes, the predicted offset temperature, and the predicted gas compressibility factors.

[0081] Embodiment 2: The computer-implemented method of any preceding embodiment, where a first machine learning model is trained to predict pressure changes at the trapped cavity as a rate of pressure change at the trapped cavity due to temperature.

[0082] Embodiment 3: The computer-implemented method of any preceding embodiment, where a second machine learning model is trained to predict the offset temperature using downhole temperature and pressure profiles over time output by a simulator.

[0083] Embodiment 4: The computer-implemented method of any preceding embodiment, where a third machine learning model is trained to predict the gas compressibility factors over time based on a lookup chart including known pressures, temperatures, and gas compressibility factors for predetermined gas compositions.

[0084] Embodiment 5: The computer-implemented method of any preceding embodiment, where the pressure changes, offset temperature, and gas compressibility factors are predicted over a time period beginning when a measured wellbore temperature stabilizes and continuing unit an initial temperature and an end temperature at the well are substantially the same.

[0085] Embodiment 6: The computer-implemented method of any preceding embodiment, where data for calculating the leak rate is captured during a pressure rise in the trapped cavity during an inflow test.

[0086] Embodiment 7: The computer-implemented method of any preceding embodiment, where the leak rate at the subsurface safety valve is calculated according to the following equation:q=35.3⁢7⁢(PZ-PiZi)⁢(1t)⁢(VT).Embodiment 8: An apparatus including a non-transitory, computer readable, storage medium that stores instructions that, when executed by at least one processor, cause the at least one processor to perform operations including: predicting pressure changes at a trapped cavity associated with a subsurface safety valve of a shut-in well based on a pressure and a temperature captured at the well, where the pressure changes include an initial pressure and an ending pressure at the trapped cavity; predicting an offset temperature at a depth of the subsurface safety valve; predicting gas compressibility factors over time based on the initial pressure at the trapped cavity and the ending pressure at the trapped cavity; and calculating a leak rate at the subsurface safety valve based on the predicted pressure changes, the predicted offset temperature, and the predicted gas compressibility factors.

[0088] Embodiment 9: The apparatus of any preceding embodiment, where a first machine learning model is trained to predict pressure changes at the trapped cavity as a rate of pressure change at the trapped cavity due to temperature.

[0089] Embodiment 10: The apparatus of any preceding embodiment, where a second machine learning model is trained to predict the offset temperature using downhole temperature and pressure profiles over time output by a simulator.

[0090] Embodiment 11: The apparatus of any preceding embodiment, where a third machine learning model is trained to predict the gas compressibility factors over time based on a lookup chart including known pressures, temperatures, and gas compressibility factors for predetermined gas compositions.

[0091] Embodiment 12: The apparatus of any preceding embodiment, where the pressure changes, offset temperature, and gas compressibility factors are predicted over a time period beginning when a measured wellbore temperature stabilizes and continuing unit an initial temperature and an end temperature at the well are substantially the same.

[0092] Embodiment 13: The apparatus of any preceding embodiment, where data for calculating the leak rate is captured during a pressure rise in the trapped cavity during an inflow test.

[0093] Embodiment 14: The apparatus of any preceding embodiment, where the leak rate at the subsurface safety valve is calculated according to the following equation:q=35.3⁢7⁢(PZ-PiZi)⁢(1t)⁢(VT).Embodiment 15: A system, including: one or more memory modules; one or more hardware processors communicably coupled to the one or more memory modules, the one or more hardware processors configured to execute instructions stored on the one or more memory modules to perform operations including: predicting pressure changes at a trapped cavity associated with a subsurface safety valve of a shut-in well based on a pressure and a temperature captured at the well, where the pressure changes include an initial pressure and an ending pressure at the trapped cavity; predicting an offset temperature at a depth of the subsurface safety valve; predicting gas compressibility factors over time based on the initial pressure at the trapped cavity and the ending pressure at the trapped cavity; and calculating a leak rate at the subsurface safety valve based on the predicted pressure changes, the predicted offset temperature, and the predicted gas compressibility factors.

[0095] Embodiment 16: The system of any preceding embodiment, where a first machine learning model is trained to predict pressure changes at the trapped cavity as a rate of pressure change at the trapped cavity due to temperature.

[0096] Embodiment 17: The system of any preceding embodiment, where a second machine learning model is trained to predict the offset temperature using downhole temperature and pressure profiles over time output by a simulator.

[0097] Embodiment 18: The system of any preceding embodiment, where a third machine learning model is trained to predict the gas compressibility factors over time based on a lookup chart including known pressures, temperatures, and gas compressibility factors for predetermined gas compositions.

[0098] Embodiment 19: The system of any preceding embodiment, where the pressure changes, offset temperature, and gas compressibility factors are predicted over a time period beginning when a measured wellbore temperature stabilizes and continuing unit an initial temperature and an end temperature at the well are substantially the same.

[0099] Embodiment 20: The system of any preceding embodiment, where data for calculating the leak rate is captured during a pressure rise in the trapped cavity during an inflow test.

[0100] Implementations of the subject matter and the functional operations described in this specification can be implemented in digital electronic circuitry, in tangibly embodied computer software or firmware, in computer hardware, including the structures disclosed in this specification and their structural equivalents, or in combinations of one or more of them. Software implementations of the described subject matter can be implemented as one or more computer programs. Each computer program can include one or more modules of computer program instructions encoded on a tangible, non-transitory, computer-readable computer-storage medium for execution by, or to control the operation of, data processing apparatus. Alternatively, or additionally, the program instructions can be encoded in / on an artificially generated propagated signal. The example, the signal can be a machine-generated electrical, optical, or electromagnetic signal that is generated to encode information for transmission to suitable receiver apparatus for execution by a data processing apparatus. The computer-storage medium can be a machine-readable storage device, a machine-readable storage substrate, a random or serial access memory device, or a combination of computer-storage mediums.

[0101] The terms “data processing apparatus,”“computer,” and “electronic computer device” (or equivalent as understood by one of ordinary skill in the art) refer to data processing hardware. For example, a data processing apparatus can encompass all kinds of apparatus, devices, and machines for processing data, including by way of example, a programmable processor, a computer, or multiple processors or computers. The apparatus can also include special purpose logic circuitry including, for example, a central processing unit (CPU), a field programmable gate array (FPGA), or an application specific integrated circuit (ASIC). In some implementations, the data processing apparatus or special purpose logic circuitry (or a combination of the data processing apparatus or special purpose logic circuitry) can be hardware- or software-based (or a combination of both hardware- and software-based). The apparatus can optionally include code that creates an execution environment for computer programs, for example, code that constitutes processor firmware, a protocol stack, a database management system, an operating system, or a combination of execution environments. The present disclosure contemplates the use of data processing apparatuses with or without conventional operating systems, for example, LINUX, UNIX, WINDOWS, MAC OS, ANDROID, or IOS.

[0102] A computer program, which can also be referred to or described as a program, software, a software application, a module, a software module, a script, or code, can be written in any form of programming language. Programming languages can include, for example, compiled languages, interpreted languages, declarative languages, or procedural languages. Programs can be deployed in any form, including as stand-alone programs, modules, components, subroutines, or units for use in a computing environment. A computer program can, but need not, correspond to a file in a file system. A program can be stored in a portion of a file that holds other programs or data, for example, one or more scripts stored in a markup language document, in a single file dedicated to the program in question, or in multiple coordinated files storing one or more modules, sub programs, or portions of code. A computer program can be deployed for execution on one computer or on multiple computers that are located, for example, at one site or distributed across multiple sites that are interconnected by a communication network. While portions of the programs illustrated in the various figures may be shown as individual modules that implement the various features and functionality through various objects, methods, or processes, the programs can instead include a number of sub-modules, third-party services, components, and libraries. Conversely, the features and functionality of various components can be combined into single components as appropriate. Thresholds used to make computational determinations can be statically, dynamically, or both statically and dynamically determined.

[0103] The methods, processes, or logic flows described in this specification can be performed by one or more programmable computers executing one or more computer programs to perform functions by operating on input data and generating output. The methods, processes, or logic flows can also be performed by, and apparatus can also be implemented as, special purpose logic circuitry, for example, a CPU, an FPGA, or an ASIC.

[0104] Computers suitable for the execution of a computer program can be based on one or more of general and special purpose microprocessors and other kinds of CPUs. The elements of a computer are a CPU for performing or executing instructions and one or more memory devices for storing instructions and data. Generally, a CPU can receive instructions and data from (and write data to) a memory. A computer can also include, or be operatively coupled to, one or more mass storage devices for storing data. In some implementations, a computer can receive data from, and transfer data to, the mass storage devices including, for example, magnetic, magneto optical disks, or optical disks. Moreover, a computer can be embedded in another device, for example, a mobile telephone, a personal digital assistant (PDA), a mobile audio or video player, a game console, a global positioning system (GPS) receiver, or a portable storage device such as a universal serial bus (USB) flash drive.

[0105] Computer readable media (transitory or non-transitory, as appropriate) suitable for storing computer program instructions and data can include all forms of permanent / non-permanent and volatile / non-volatile memory, media, and memory devices. Computer readable media can include, for example, semiconductor memory devices such as random access memory (RAM), read only memory (ROM), phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), and flash memory devices. Computer readable media can also include, for example, magnetic devices such as tape, cartridges, cassettes, and internal / removable disks. Computer readable media can also include magneto optical disks and optical memory devices and technologies including, for example, digital video disc (DVD), CD ROM, DVD+ / −R, DVD-RAM, DVD-ROM, HD-DVD, and BLURAY. The memory can store various objects or data, including caches, classes, frameworks, applications, modules, backup data, jobs, web pages, web page templates, data structures, database tables, repositories, and dynamic information. Types of objects and data stored in memory can include parameters, variables, algorithms, instructions, rules, constraints, and references. Additionally, the memory can include logs, policies, security or access data, and reporting files. The processor and the memory can be supplemented by, or incorporated in, special purpose logic circuitry.

[0106] Implementations of the subject matter described in the present disclosure can be implemented on a computer having a display device for providing interaction with a user, including displaying information to (and receiving input from) the user. Types of display devices can include, for example, a cathode ray tube (CRT), a liquid crystal display (LCD), a light-emitting diode (LED), and a plasma monitor. Display devices can include a keyboard and pointing devices including, for example, a mouse, a trackball, or a trackpad. User input can also be provided to the computer through the use of a touchscreen, such as a tablet computer surface with pressure sensitivity or a multi-touch screen using capacitive or electric sensing. Other kinds of devices can be used to provide for interaction with a user, including to receive user feedback including, for example, sensory feedback including visual feedback, auditory feedback, or tactile feedback. Input from the user can be received in the form of acoustic, speech, or tactile input. In addition, a computer can interact with a user by sending documents to, and receiving documents from, a device that is used by the user. For example, the computer can send web pages to a web browser on a user's client device in response to requests received from the web browser.

[0107] Particular implementations of the subject matter have been described. Other implementations, alterations, and permutations of the described implementations are within the scope of the following claims as will be apparent to those skilled in the art. While operations are depicted in the drawings or claims in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order, or that all illustrated operations be performed (some operations may be considered optional), to achieve desirable results. In certain circumstances, multitasking or parallel processing (or a combination of multitasking and parallel processing) may be advantageous and performed as deemed appropriate.

Examples

embodiments

[0076]According to some non-limiting embodiments or examples, provided is a computer-implemented method that predicts a subsurface safety valve leak rate, including: predicting pressure changes at a trapped cavity associated with a subsurface safety valve of a shut-in well based on a pressure and a temperature captured at the well, where the pressure changes include an initial pressure and an ending pressure at the trapped cavity; predicting an offset temperature at a depth of the subsurface safety valve; predicting gas compressibility factors over time based on the initial pressure at the trapped cavity and the ending pressure at the trapped cavity; and calculating a leak rate at the subsurface safety valve based on the predicted pressure changes, the predicted offset temperature, and the predicted gas compressibility factors.

[0077]According to some non-limiting embodiments or examples, provided is an apparatus including a non-transitory, computer readable, storage medium that stor...

Claims

1. A computer-implemented method that predicts a subsurface safety valve leak rate, comprising:predicting pressure changes at a trapped cavity associated with a subsurface safety valve of a shut-in well based on a pressure and a temperature captured at the well, wherein the pressure changes comprise an initial pressure and an ending pressure at the trapped cavity;predicting an offset temperature at a depth of the subsurface safety valve;predicting gas compressibility factors over time based on the initial pressure at the trapped cavity and the ending pressure at the trapped cavity; andcalculating a leak rate at the subsurface safety valve based on the predicted pressure changes, the predicted offset temperature, and the predicted gas compressibility factors.

2. The computer-implemented method of claim 1, wherein a first machine learning model is trained to predict pressure changes at the trapped cavity as a rate of pressure change at the trapped cavity due to temperature.

3. The computer-implemented method of claim 1, wherein a second machine learning model is trained to predict the offset temperature using downhole temperature and pressure profiles over time output by a simulator.

4. The computer-implemented method of claim 1, wherein a third machine learning model is trained to predict the gas compressibility factors over time based on a lookup chart comprising known pressures, temperatures, and gas compressibility factors for predetermined gas compositions.

5. The computer-implemented method of claim 1, wherein the pressure changes, offset temperature, and gas compressibility factors are predicted over a time period beginning when a measured wellbore temperature stabilizes and continuing unit an initial temperature and an end temperature at the well are substantially the same.

6. The computer-implemented method of claim 1, wherein data for calculating the leak rate is captured during a pressure rise in the trapped cavity during an inflow test.

7. The computer-implemented method of claim 1, wherein the leak rate at the subsurface safety valve is calculated in real-time according to the following equation:q=35.3⁢7⁢(PZ-PiZi)⁢(1t)⁢(VT).

8. An apparatus comprising a non-transitory, computer readable, storage medium that stores instructions that, when executed by at least one processor, cause the at least one processor to perform operations comprising:predicting pressure changes at a trapped cavity associated with a subsurface safety valve of a shut-in well based on a pressure and a temperature captured at the well, wherein the pressure changes comprise an initial pressure and an ending pressure at the trapped cavity;predicting an offset temperature at a depth of the subsurface safety valve;predicting gas compressibility factors over time based on the initial pressure at the trapped cavity and the ending pressure at the trapped cavity; andcalculating a leak rate at the subsurface safety valve based on the predicted pressure changes, the predicted offset temperature, and the predicted gas compressibility factors.

9. The apparatus of claim 8, wherein a first machine learning model is trained to predict pressure changes at the trapped cavity as a rate of pressure change at the trapped cavity due to temperature.

10. The apparatus of claim 8, wherein a second machine learning model is trained to predict the offset temperature using downhole temperature and pressure profiles over time output by a simulator.

11. The apparatus of claim 8, wherein a third machine learning model is trained to predict the gas compressibility factors over time based on a lookup chart comprising known pressures, temperatures, and gas compressibility factors for predetermined gas compositions.

12. The apparatus of claim 8, wherein the pressure changes, offset temperature, and gas compressibility factors are predicted over a time period beginning when a measured wellbore temperature stabilizes and continuing unit an initial temperature and an end temperature at the well are substantially the same.

13. The apparatus of claim 8, wherein data for calculating the leak rate is captured during a pressure rise in the trapped cavity during an inflow test.

14. The apparatus of claim 8, wherein the leak rate at the subsurface safety valve is calculated in real-time according to the following equation:q=35.3⁢7⁢(PZ-PiZi)⁢(1t)⁢(VT).

15. A system, comprising:one or more memory modules;one or more hardware processors communicably coupled to the one or more memory modules, the one or more hardware processors configured to execute instructions stored on the one or more memory modules to perform operations comprising:predicting pressure changes at a trapped cavity associated with a subsurface safety valve of a shut-in well based on a pressure and a temperature captured at the well, wherein the pressure changes comprise an initial pressure and an ending pressure at the trapped cavity;predicting an offset temperature at a depth of the subsurface safety valve;predicting gas compressibility factors over time based on the initial pressure at the trapped cavity and the ending pressure at the trapped cavity; andcalculating a leak rate at the subsurface safety valve based on the predicted pressure changes, the predicted offset temperature, and the predicted gas compressibility factors.

16. The system of claim 15, wherein a first machine learning model is trained to predict pressure changes at the trapped cavity as a rate of pressure change at the trapped cavity due to temperature.

17. The system of claim 15, wherein a second machine learning model is trained to predict the offset temperature using downhole temperature and pressure profiles over time output by a simulator.

18. The system of claim 15, wherein a third machine learning model is trained to predict the gas compressibility factors over time based on a lookup chart comprising known pressures, temperatures, and gas compressibility factors for predetermined gas compositions.

19. The system of claim 15, wherein the pressure changes, offset temperature, and gas compressibility factors are predicted over a time period beginning when a measured wellbore temperature stabilizes and continuing unit an initial temperature and an end temperature at the well are substantially the same.

20. The system of claim 15, wherein data for calculating the leak rate is captured during a pressure rise in the trapped cavity during an inflow test.