A method and system for automatically calculating gas reservoir formation pressure

The method and system automatically calculate gas reservoir formation pressure using gas well production data, addressing inaccuracies and inefficiencies in existing methods by employing intelligent data analysis and fitting techniques, thereby improving calculation accuracy and efficiency.

CN111506863BInactive Publication Date: 2024-12-27SICHUANZHONG OIL & GAS MINE OF PETROCHINA SOUTHWEST OIL & GAS FIELD BRANCH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010478890.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-05-29
Publication Date
2024-12-27
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing methods for calculating gas reservoir formation pressure are either inaccurate due to reliance on manual data collection or impractical for low permeability reservoirs, leading to economic losses and inefficiencies, especially in middle and late-stage development.

Method used

A method and system that utilize gas well production data under standard conditions to automatically calculate formation pressure, distinguishing between open and closed wellhead states, and employing nonlinear or linear fitting based on well parameters to determine formation pressure values.

Benefits of technology

Enables accurate and efficient calculation of gas reservoir formation pressure, reducing manual workload and enhancing the applicability and intelligence of pressure calculation processes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111506863B_ABST
    Figure CN111506863B_ABST
Patent Text Reader

Abstract

The present invention provides a method and system for automatically calculating gas reservoir formation pressure, specifically including: collecting the wellhead oil pressure, wellhead temperature, and gas well production data under standard conditions of the gas well at a fixed frequency, and recording the measurement time point, judging the switch state of the gas well, combining the storage gas reservoir and well parameters, respectively calculating the first gas reservoir formation pressure and the second gas reservoir formation pressure, and selecting the first gas reservoir formation pressure or the second gas reservoir formation pressure as the gas reservoir formation pressure value output according to the target instruction input by the user. The method and system provided by the present invention can automatically realize the calculation of gas reservoir formation pressure, have wide applicability and intelligence, can greatly reduce the manual labor required for calculating gas reservoir formation pressure in the prior art, and improve the efficiency of gas reservoir development.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of gas reservoir exploitation, and in particular to a method and system for automatically calculating gas reservoir formation pressure. Background Art

[0002] As the driving force of gas reservoir development, gas reservoir formation pressure determines the gas production and economic benefits of gas wells. It is crucial to keep abreast of changes in formation pressure to ensure the increase in production, stable production and later development adjustments of gas wells and gas reservoirs. At present, people calculate gas reservoir formation pressure mainly for the purpose of well repair design, gas well productivity calculation, reserve review, development potential assessment, etc. However, in the existing technology, formation pressure acquisition technology includes two categories: actual measurement method and calculation method. The actual measurement method is the most accurate but requires a long time to shut in the well. For low permeability gas reservoirs, the shut-in time may even take more than half a year before the bottom hole pressure can reach stability and the measured formation pressure value can reflect the real formation pressure. Long-term shut-in will bring economic losses to gas wells with production tasks. For gas reservoirs in the middle and late stages of development, due to the limitations of conditions such as the inner diameter of the oil pipe, wellbore corrosion, and blockage, some gas wells do not have the conditions to lower the pressure gauge to the middle of the production layer for pressure measurement. Gas well production data is often the only source of calculation data. The calculation method has wide applicability, but it is all based on manually collecting complex data on site and gradually deriving the formation pressure of the gas reservoir, which leads to heavy workload and low efficiency for researchers when conducting well repair design and reserve review. At the same time, the existing calculation method usually only uses gas well shut-in data or gas well opening data to calculate the formation pressure, which fails to fully utilize the gas well production data and the calculation accuracy is insufficient.

[0003] Therefore, how to realize automatic calculation of gas reservoir formation pressure with universal applicability and high calculation accuracy is a technical problem that needs to be solved urgently. Summary of the invention

[0004] In view of this, the present invention provides a method and system for automatically calculating gas reservoir formation pressure, which can use gas well production data under standard conditions to judge the wellhead status, and obtain different gas reservoir formation pressures under different wellhead conditions, and automatically output the gas reservoir formation pressure value according to the usage scenario of the gas reservoir formation pressure data, thereby achieving automatic calculation of gas reservoir formation pressure with applicability and high calculation accuracy, improving the efficiency of gas reservoir formation pressure calculation and reducing the workload of manual operation.

[0005] The present invention solves the above problem through the following technical solution: A method for automatically calculating gas reservoir formation pressure, characterized in that it comprises the following steps:

[0006] Step a, collecting the wellhead oil pressure, wellhead temperature, and gas well production data under standard conditions of the gas well at a fixed frequency, and recording the measurement time points; judging the state corresponding to the wellhead according to the gas well production data under the standard state; when the gas well production data is greater than 0, marking the wellhead state as open well; when the gas well production data is not greater than 0, marking the wellhead state as closed well;

[0007] Step b, if the wellhead status is closed, then obtain the well closing time and determine whether the well closing time has exceeded 120 hours. If not, return to step a to continue collecting data. If it has exceeded, calculate the formation pressure of the first gas reservoir; if the wellhead status is open, calculate the formation pressure of the second gas reservoir;

[0008] Step c, storing and updating the first gas reservoir formation pressure and the second gas reservoir formation pressure, and storing the pressure data in a retrieval database;

[0009] Step d: receiving a target instruction input by a user, and selecting the first gas reservoir formation pressure or the second gas reservoir formation pressure as the gas reservoir formation pressure value output according to the target instruction.

[0010] Preferably, the calculation of the first gas reservoir formation pressure in step b specifically comprises the following steps:

[0011] Step b11, detecting and obtaining or presetting gas reservoir and well parameters;

[0012] Step b12, calculate each shut-in time point t within the shut-in duration s The corresponding bottom hole static pressure p of the gas well ws (t s ),

[0013]

[0014] Among them, p ts (t s ) is the shut-in time t s Corresponding wellhead oil pressure when shutting in, MPa; r g is the relative density of natural gas; H is the depth of the gas layer; Z is the average deviation coefficient of the wellbore gas; is the average absolute temperature of the gas in the wellbore;

[0015] Step b13, for each well shut-in time point t s The corresponding bottom hole static pressure p ws (t s) to obtain its corresponding derivative; if the derivative is less than or equal to 0.001, the bottom hole static pressure of the gas well corresponding to the last shut-in time point is the formation pressure of the first gas reservoir; if the derivative is greater than 0.001, it is determined whether the bottom hole static pressure of the gas well corresponding to the last shut-in time point is less than or equal to 21MPa; if it is less than or equal to 21MPa, nonlinear fitting is performed. a, b, and c are all constants generated during the fitting process. The formation pressure of the first gas reservoir is If it is greater than 21MPa, a linear fit is performed. a, b, and c are all constants generated during the fitting process, and the formation pressure value of the first gas reservoir is a.

[0016] Preferably, the calculation of the second gas reservoir formation pressure in step b specifically comprises the following steps:

[0017] Step b21, detecting and obtaining or presetting gas reservoir and well parameters;

[0018] Step b22, according to the gas reservoir and well parameters, obtain each well opening time point t by calculation f The corresponding bottom hole pressure p of the gas well wf (t f );Given the initial value of well controlled reserves G 0 , accuracy requirement e and maximum number of cycles K;

[0019] Step b23, calculate each well opening time point t f The corresponding initial value of gas reservoir formation pressure

[0020]

[0021] Among them, G p (t f ) is each well opening time point t f The corresponding cumulative gas production, p i is the original formation pressure of the gas reservoir, Zi is the deviation factor under the original formation pressure of the gas reservoir, and Z' is the deviation factor under the current formation pressure of the gas reservoir, which is obtained by looking up the table after the apparent formation pressure is calculated;

[0022] Step b24, if the original formation pressure p i If the pressure is less than or equal to 21 MPa, a nonlinear relationship is used to calculate each well opening time point t f The corresponding normalized output and normalized cumulative yield Where Q sc (t f ) is each well opening time point t fThe gas well production under the corresponding standard conditions; if the original formation pressure of the gas reservoir p i If the pressure is greater than 21 MPa, a linear relationship is used to calculate each well opening time point t f The corresponding normalized output and normalized cumulative yield Where Q sc (t f ) is each well opening time point t f The corresponding gas well production under standard conditions;

[0023] Step b25, make x=Q N (t), y = q N (t), the scattered points with linear relationship are fitted into a straight line, and the intersection of the straight line and the X-axis is the calculated value of well controlled reserves G 1 ; If |G 1 -G 0 |<e, then the well controlled reserves G=G 0 Otherwise, G 0 Reset to G 1 , repeat the above steps until the calculation accuracy requirement is met or the maximum number of cycles k is reached;

[0024] Step b26, substitute the well controlled reserves G into the following formula to obtain the second gas reservoir formation pressure p r (t f ),

[0025]

[0026] , where G p (t f ) is each well opening time point t f The corresponding cumulative gas production, p i is the original formation pressure of the gas reservoir, Zi is the deviation factor under the original formation pressure of the gas reservoir, and Z' is the deviation factor under the current formation pressure of the gas reservoir, which is obtained by looking up the table after the apparent formation pressure is calculated.

[0027] Preferably, the fitting is achieved by a fitting module in MATLAB.

[0028] Preferably, in step d, if the target instruction is a well repair design type, the larger value between the first gas reservoir formation pressure and the second gas reservoir formation pressure is selected as the gas reservoir formation pressure value output; if the target instruction is a gas well productivity calculation, reserve review or development potential assessment type, the smaller value between the first gas reservoir formation pressure and the second gas reservoir formation pressure is selected as the gas reservoir formation pressure value output.

[0029] The present invention also provides a system for automatically calculating the formation pressure of a gas reservoir, characterized in that it comprises: a server, an input module, an output module, a wellhead thermometer, a wellhead flowmeter and a wellhead pressure gauge; the server comprises a processor and a database; the wellhead thermometer, the wellhead flowmeter and the wellhead pressure gauge are all arranged at the wellhead of the gas well and connected to the server, and are respectively used to collect the wellhead temperature, the gas well production data under the standard state and the wellhead oil pressure; the gas reservoir and well parameters are stored in the database; the processor comprises a first calculation module, a second calculation module, a timer and a logic judgment module; the logic judgment module judges whether the gas well production data collected by the wellhead flowmeter is greater than 0 The wellhead status is open or closed; when the logic judgment module determines that the wellhead status is closed, the first calculation module calculates the first gas reservoir formation pressure and stores the calculation result in the database; when the logic judgment module determines that the wellhead status is open, the second calculation module calculates the second gas reservoir formation pressure and stores the calculation result in the database; the input module is used for the user to input measured or pre-set gas reservoir and well parameters, and target instructions; the logic judgment module selects to output the first gas reservoir formation pressure or the second gas reservoir formation pressure stored in the database as the target gas reservoir formation pressure according to the target instruction input by the user, and outputs it to the user through the output module.

[0030] Preferably, it also includes a safety device arranged at the wellhead, which collects wellhead gas information and completes combustible gas and / or toxic gas leakage detection and alarm; the safety device is also connected to the server, receives the well shut-in command issued by the server, executes the operation of shutting in the well and shutting down the system for automatically calculating the gas reservoir formation pressure.

[0031] Preferably, the output module comprises a user terminal, and the user terminal can display the target gas reservoir formation pressure.

[0032] Preferably, the input module and / or the output module is connected to the server via wired or wireless means.

[0033] Preferably, the frequency of data collection by the wellhead thermometer, wellhead flowmeter and wellhead pressure gauge is once a day or once an hour, and the timer is used to record the time of data collection.

[0034] The beneficial effects of the present invention are as follows: by means of a measuring instrument arranged at the wellhead of a gas well, combined with pre-stored gas reservoir and well parameters, the calculation of the gas reservoir formation pressure can be automatically realized, which has wide applicability and intelligence, can greatly reduce the manual labor required for calculating the gas reservoir formation pressure in the prior art, and improves the efficiency of gas reservoir development. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Figure 1A flow chart of a method for automatically calculating gas reservoir formation pressure provided by an embodiment of the present invention;

[0036] Figure 2 A flow chart of a method for calculating the bottom pressure of a first gas reservoir provided by an embodiment of the present invention;

[0037] Figure 3 A flow chart of a method for calculating the bottom pressure of a second gas reservoir provided by an embodiment of the present invention;

[0038] Figure 4 is a fitting diagram for exemplary calculation of the first gas reservoir formation pressure;

[0039] Figure 5 The fitting diagram for exemplary calculation of the second gas reservoir formation pressure;

[0040] Figure 6 A block diagram of a system for automatically calculating gas reservoir formation pressure provided by an embodiment of the present invention;

[0041] Figure 7 It is a schematic diagram of arranging the sensor device in the system of the present invention at the wellhead. DETAILED DESCRIPTION

[0042] The present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only partial embodiments of the present invention, which are used to allow those skilled in the art to have a more complete and accurate understanding of the technical solutions of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative work are within the scope of protection of the present invention.

[0043] In one embodiment, a method for automatically calculating gas reservoir formation pressure is provided, and its flow chart is as follows: Figure 1 Specific examples include:

[0044] Step a, collect the wellhead oil pressure Pt, wellhead temperature Tempt, and gas well production data Qsc under standard conditions of the gas well at a fixed frequency and record the measurement time point t. The collection frequency can be 1 time / day or 1 time / hour, etc. According to the gas well production data under standard conditions, determine the state corresponding to the wellhead. Obtain the gas well production data Qsc under standard conditions corresponding to the measurement time point t, and determine whether the gas well production data Qsc under standard conditions is greater than 0. When Qsc is greater than 0, mark the wellhead state as open well, and mark the measurement time point t as the opening well time point tf, and the corresponding wellhead oil pressure Pt and wellhead temperature Temp as the wellhead oil pressure Ptf when opening well and the wellhead temperature Tempf when opening well; otherwise, mark the wellhead state as closed well, mark the measurement time point t as the closing well time point ts, and mark the wellhead oil pressure Pt and wellhead temperature Temp corresponding to the measurement time point t as the wellhead oil pressure Pts when closing well and the wellhead temperature Temps when closing well.

[0045] Step b, if the wellhead status is closed, obtain the closing time and determine whether the closing time has exceeded 120 hours. If not, return to step a to continue collecting data. If it has exceeded, calculate the formation pressure of the first gas reservoir; if the wellhead status is open, calculate the formation pressure of the second gas reservoir.

[0046] Step c, storing and updating the first gas reservoir formation pressure and the second gas reservoir formation pressure, and storing the pressure data in a retrieval database.

[0047] Step d, receiving the target instruction input by the user, and outputting the target gas reservoir formation pressure value according to the target instruction input by the user. The target instruction is related to the research purpose, including but not limited to well repair design, gas well productivity calculation, reserve review or development potential assessment. Determine the type of the target instruction. When the target instruction is a well repair design type, retrieve the latest first gas reservoir formation pressure and the second gas reservoir formation pressure stored in the database, output the gas reservoir formation pressure data with the larger value between the two, and output it as the target gas reservoir formation pressure value. Providing gas reservoir formation pressure data with a large value during well repair design can ensure the safety of subsequent well repair design. When the target instruction is a gas well productivity calculation, reserve review or development potential assessment type, retrieve the latest first gas reservoir formation pressure and the second gas reservoir formation pressure stored in the database, output the gas reservoir formation pressure data with the smaller value between the two, and output it as the target gas reservoir formation pressure value. Avoid overestimation of gas wells and gas reservoir potential during productivity calculation, reserve review or development potential assessment, and ensure the economy of subsequent development adjustment of gas wells and gas wells.

[0048] In another embodiment, a method for calculating the formation pressure of a first gas reservoir is also provided, and its flow chart is as follows: Figure 2 Specific examples include:

[0049] When it is detected that the wellhead state is shut-in and the shut-in days exceed 120 hours, the gas reservoir and well parameters are detected and obtained or preset, including the relative density of natural gas rg, the gas layer depth H, the gas reservoir temperature Tempr, the gas layer depth H, the wellhead oil pressure Pts when shutting in, the wellhead temperature Temps when shutting in, and the shut-in time point ts, and the bottom hole static pressure Pws of the gas well corresponding to each shut-in time point ts within the shut-in duration is calculated. The bottom hole static pressure Pws is calculated by formula (1):

[0050]

[0051] Wherein, Pws(ts) is the bottom hole static pressure of the gas well corresponding to the measurement time point ts, MPa; Pts(ts) is the wellhead oil pressure Pts when the well is shut in corresponding to the shut-in time point ts, MPa; Z is the average deviation coefficient of the wellbore gas;

[0052] is the average absolute temperature of the gas in the wellbore, expressed by the following formula (2):

[0053]

[0054] Among them, Temps(ts) is the wellhead temperature at the shut-in time ts, and Tempr is the gas reservoir temperature.

[0055] The bottom hole static pressure Pws(ts) corresponding to each shut-in time point ts is differentiated to obtain its corresponding derivative dPws(ts) / dts to determine whether the bottom hole static pressure has returned to a horizontal state. If dPws(ts) / dts is less than or equal to 0.001, the bottom hole static pressure has returned to stability. At this time, the bottom hole static pressure Pws(ts_last) of the gas well corresponding to the last shut-in time point ts_last is the formation pressure of the first gas reservoir.

[0056] If dPws(ts) / dts is greater than 0.001, then determine whether the bottom hole static pressure Pws(ts_last) of the gas well corresponding to the last shut-in time point ts_last is less than or equal to 21MPa. The value of 21MPa comes from a study of a typical natural gas. The study shows that when the gas pressure is greater than 21MPa, the pseudo-pressure is approximately linearly related to the pressure; when the gas pressure is less than or equal to 21MPa, the pseudo-pressure is approximately linearly related to the square of the pressure.

[0057] Therefore, if the bottom hole static pressure Pws(ts_last) of the gas well corresponding to the last shut-in time point ts_last is less than or equal to 21MPa, the square of the bottom hole static pressure Pws(ts) of the gas well corresponding to the shut-in time point ts is nonlinearly fitted by (Formula 3):

[0058]

[0059] Among them, t s is the shut-in time point, Pws(ts) is the bottom hole static pressure Pws of the gas well corresponding to the shut-in time point ts, and a, b, and c are all constants generated during the fitting process. The square of the bottom hole static pressure of all the shut-in time points ts and their corresponding gas wells is calculated using (Equation 3). By performing nonlinear fitting on the data, we can get the values ​​of constants a, b, and c. For (Equation 3), assuming that the shut-in time lasts infinitely, will approach a, at which point the bottom static pressure of the gas well has also returned to stability, so It can represent the gas reservoir formation pressure value. Thus, the first gas reservoir formation pressure is obtained, and the first gas reservoir formation pressure value is

[0060] If the bottom hole static pressure Pws(ts_last) of the gas well corresponding to the last shut-in time point ts is greater than 21MPa, a linear fit is performed on the shut-in time point ts and the corresponding bottom hole static pressure Pws(ts) of the gas well using formula (4):

[0061]

[0062] Among them, ts is the shut-in time point ts, Pws(ts) is the bottom hole static pressure Pws of the gas well corresponding to the shut-in time point ts, and a, b, and c are all constants generated during the fitting process. The square p of the bottom hole static pressure of all the shut-in time points ts and the corresponding gas wells collected is calculated using (Formula 4). ws (t s ) data by linear fitting, we can get the values ​​of constants a, b, c. For (Equation 4), assuming that the shut-in time lasts infinitely, p ws (t s ) will approach a, at which time the bottom hole static pressure of the gas well has also returned to stability, so a can represent the formation pressure value of the gas reservoir. Thus, the first gas reservoir formation pressure is obtained, and the first gas reservoir formation pressure value is a.

[0063] The above nonlinear fitting and linear fitting processes can be performed through the fitting module in MATLAB.

[0064] In another embodiment, a method for calculating the formation pressure of the second gas reservoir is also provided, and its flow chart is as follows: Figure 3 Specific examples include:

[0065] The gas reservoir and well parameters are obtained by measuring or presetting, including gas layer depth H, gas reservoir temperature Tempr, gas reservoir original formation pressure Pi, natural gas relative density rg, natural gas critical pressure Ppc, natural gas critical temperature Tpc, pressure-apparent pressure-deviation factor relationship table, friction resistance coefficient f, and tubing inner diameter rw. Based on these gas reservoir and well parameters, the bottom hole flow pressure p of the gas well corresponding to each well opening time point tf can be obtained by calculation. wf (t f ). At the same time, the initial value of well controlled reserves G is given 0 , accuracy requirement e and maximum number of cycles K.

[0066] The initial value of well controlled reserves G 0 Substitute into the gas reservoir material balance formula (Equation 5) and calculate the initial value of the gas reservoir formation pressure corresponding to each well opening time point tf

[0067]

[0068] Among them, G p (t f ) is the cumulative gas production corresponding to each well opening time point tf, p i is the original formation pressure of the gas reservoir, Zi is the deviation factor under the original formation pressure of the gas reservoir, and Z' is the deviation factor under the current formation pressure of the gas reservoir. It is obtained by looking up the table after the apparent formation pressure is calculated by formula (5).

[0069] If the original formation pressure Pi of the gas reservoir is less than or equal to 21 MPa, the normalized production and normalized cumulative production corresponding to each well opening time point tf are calculated using (Equation 6) and (Equation 7).

[0070] Normalized output

[0071] Normalized Cumulative Yield

[0072] , where Q sc (t f ) is the gas well production under standard conditions corresponding to each well opening time point tf.

[0073] If the original formation pressure Pi of the gas reservoir is greater than 21 MPa, the normalized production and normalized cumulative production corresponding to each well opening time point tf are calculated using the linear relationship (Equation 8) and (Equation 9).

[0074] Normalized output

[0075] Normalized Cumulative Yield

[0076] , where Qsc (t f ) is the gas well production under standard conditions corresponding to each well opening time point tf.

[0077] Under quasi-steady-state conditions, the normalized yield and the normalized cumulative yield satisfy the following relationship:

[0078]

[0079] Where b pss is the pseudo-seepage resistance, which is a constant under pseudo-steady-state conditions, and the above formula satisfies the linear relationship.

[0080] Substituting the initial value, we can get x = Q N (t), y = q N (t), the scattered points with linear relationship are fitted into a straight line, and the intersection of the straight line and the X-axis is the calculated value of well controlled reserves G 1 .

[0081] If |G 1 -G 0 |<e, then the well controlled reserves G=G 0 ; otherwise reset G0 to G 1 , repeat the above steps until the calculation accuracy requirement is met or the maximum number of cycles is reached.

[0082] After obtaining the well-controlled reserves G, substitute it into (Equation 11) to obtain the formation pressure of the second gas reservoir:

[0083]

[0084] , where G p (t f ) is the cumulative gas production corresponding to each well opening time point tf, p i is the original formation pressure of the gas reservoir, Zi is the deviation factor under the original formation pressure of the gas reservoir, and Z' is the deviation factor under the current formation pressure of the gas reservoir, which is obtained by looking up the table after the apparent formation pressure is calculated by formula (11).

[0085] Through the above method, it is possible to obtain different gas reservoir formation pressures under different wellhead conditions, and automatically output gas reservoir formation pressure values ​​according to the usage scenarios of the gas reservoir formation pressure data.

[0086] Exemplarily, the above method is applied to an actual gas reservoir well.

[0087] Taking the M38H well in the LeiYi1 gas reservoir in the central Sichuan Basin as an example, the well was put into production in January 2004 and the latest shut-in time was August 2019. The well was shut-in for 31 days, more than 120 hours. The formation pressure of the first gas reservoir was calculated.

[0088] According to the gas layer depth H, gas reservoir temperature Tempr, gas layer depth H, wellhead oil pressure Pts when shutting in, wellhead temperature Temps when shutting in, and shut-in time ts, calculate the bottom hole static pressure Pws of the gas well corresponding to each shut-in time ts during the shut-in duration, as shown in the following table

[0089]

[0090]

[0091] There is no case where dPws(ts) / dts is less than or equal to 0.001 and the bottom hole static pressure Pws(ts_last) of the gas well corresponding to the last shut-in time point ts is less than 21MPa. The nonlinear fitting is performed by formula (3), and the fitting diagram is shown as follows: Figure 4 shown.

[0092] The fitting result is a=92.05, and the formation pressure of the first gas reservoir is obtained

[0093] According to the gas well production data Qsc under standard conditions at the time of well opening, the well opening time tf, the gas layer depth H, the gas reservoir temperature Tempr, the original formation pressure Pi, the natural gas relative density rg, the natural gas critical pressure Ppc, the natural gas critical temperature Tpc, the friction coefficient f, and the inner diameter rw of the oil pipe, the cumulative gas production Gp and the bottom hole flow pressure Pwf of the gas well corresponding to each well opening time tf are calculated. Given the initial reserves G0=1×10 8 m 3 , and perform iterative calculation. The final step of the iteration is shown in the figure below. Figure 5 shown.

[0094] Under the condition of meeting the preset accuracy requirement e and the maximum number of cycles K, the iterative calculation obtains G = 1.35 × 10 8 m 3 , and obtain the latest second gas reservoir formation pressure P r2 =11.84MPa.

[0095] According to the target instruction input by the user, the target gas reservoir formation pressure value is received and displayed as max[P r1 ,P r2 ]=11.84MPa.

[0096] In yet another embodiment, a system for automatically calculating gas reservoir formation pressure is provided. Figure 6 shown. Figure 7 A schematic diagram of arranging the sensor device in the above system at the wellhead is shown in FIG.

[0097] See also Figure 6 , a system for automatically calculating the formation pressure of a gas reservoir, comprising: a server 8, an input module 11, an output module 12, a wellhead thermometer 5, a wellhead flowmeter 6 and a wellhead pressure gauge 7. Among them, the wellhead thermometer 5, the wellhead flowmeter 6 and the wellhead pressure gauge 7 are all arranged at the wellhead of the gas well, such as Figure 7 As shown in . The gas reservoir formation 2 is located below the surface 1, and the oil pipe 4 located in the casing 3 is lowered into the gas reservoir formation 2. The wellhead thermometer 5, the wellhead flowmeter 6 and the wellhead pressure gauge 7 are all arranged at the end of the oil pipe 4 at the wellhead, and are used to collect the wellhead temperature Tempt, the gas well production data Qsc under the standard state and the wellhead oil pressure Pt respectively.

[0098] The wellhead thermometer 5 , the wellhead flowmeter 6 and the wellhead pressure gauge 7 are respectively connected to the server 8 to transmit the collected data to the server 8 . The frequency of collection may be once a day or once an hour, etc. The server 8 includes a processor 9 and a database 10 .

[0099] The processor 9 includes a first calculation module 901, a second calculation module 902, a timer 903 and a logic judgment module 904. The logic judgment module 904 determines whether the wellhead state is open or closed according to whether the gas well production data Qsc collected by the wellhead flowmeter 6 is greater than 0. When the logic judgment module determines that the wellhead state is closed, the first calculation module calculates the first gas reservoir formation pressure according to the wellhead oil pressure at the time of closing the well collected by the wellhead pressure gauge 7, and the gas reservoir temperature, the average deviation coefficient of the wellbore gas, the gas layer depth and other gas reservoir and well parameters stored in the database 10, and stores the calculation result in the database 10. When the logic judgment module determines that the wellhead state is open, the second calculation module calculates the second gas reservoir formation pressure according to the wellhead oil pressure at the time of opening the well collected by the wellhead pressure gauge 7, the gas well production data Qsc collected by the wellhead flowmeter 6, and the gas reservoir temperature, pressure-apparent pressure-deviation factor relationship table and gas layer depth and other gas reservoir and well parameters stored in the database 10, and stores the calculation result in the database 10. The timer 903 is used to record the time of data collection.

[0100] The input module 11 is used for the user to input various gas reservoir and well parameters measured or preset, as well as target instructions. The logic judgment module 904 selects the first gas reservoir formation pressure or the second gas reservoir formation pressure stored in the output database 10 as the target gas reservoir formation pressure value according to the target instruction input by the user, and outputs it to the user through the output module 12. The output module 12 includes a user terminal, and the user terminal can display the target gas reservoir formation pressure value. The input module 11 and / or the output module 12 are connected to the server 8 by wire or wireless means.

[0101] In another embodiment, a safety device 13 is also provided at the wellhead, which can collect wellhead gas information and complete combustible gas and / or toxic gas leakage detection and alarm through the safety device 13 on the one hand, and on the other hand, it is also connected to the server 8 to receive the well shut-in command issued by the server 8 to execute the operation of shutting in the well and shutting down the system for automatically calculating the gas reservoir formation pressure.

[0102] Those skilled in the art will appreciate that the embodiments described herein are intended to help readers understand the principles of the present invention, and should be understood that the protection scope of the present invention is not limited to such specific statements and embodiments. Those skilled in the art can make various other specific variations and combinations that do not deviate from the essence of the present invention based on the technical revelations disclosed by the present invention, and these variations and combinations are still within the protection scope of the present invention.

Claims

1. A method for automatically calculating gas reservoir formation pressure, characterized in that: The steps include: Step a, collecting the wellhead oil pressure, wellhead temperature, and gas well production data under standard conditions of the gas well at a fixed frequency, and recording the measurement time points; judging the state corresponding to the wellhead according to the gas well production data under the standard state; when the gas well production data is greater than 0, marking the wellhead state as open well; when the gas well production data is not greater than 0, marking the wellhead state as closed well; Step b, if the wellhead status is shut-in, then obtain the shut-in time and determine whether the shut-in time has exceeded 120 hours. If not, return to step a to continue collecting data. If it has exceeded, calculate the formation pressure of the first gas reservoir. If the wellhead state is open, the formation pressure of the second gas reservoir is calculated; Step c, storing and updating the first gas reservoir formation pressure and the second gas reservoir formation pressure, and storing the pressure data in a retrieval database; Step d, receiving a target instruction input by a user, and selecting the first gas reservoir formation pressure or the second gas reservoir formation pressure as the gas reservoir formation pressure value output according to the target instruction; The calculation of the first gas reservoir formation pressure in step b specifically includes the following steps: Step b11, detecting and obtaining or presetting gas reservoir and well parameters; Step b12, calculate each shut-in time point t within the shut-in duration s The corresponding bottom hole static pressure p of the gas well ws (t s ), Among them, p ts (t s ) is the shut-in time t s Corresponding wellhead oil pressure when shutting in, MPa; r g is the relative density of natural gas; H is the depth of the gas layer; Z is the average deviation coefficient of the wellbore gas; is the average absolute temperature of the gas in the wellbore; Step b13, for each well shut-in time point t s The corresponding bottom hole static pressure p ws (t s ) to obtain its corresponding derivative; if the derivative is less than or equal to 0.001, the bottom hole static pressure of the gas well corresponding to the last shut-in time point is the formation pressure of the first gas reservoir; if the derivative is greater than 0.001, it is determined whether the bottom hole static pressure of the gas well corresponding to the last shut-in time point is less than or equal to 21MPa; if it is less than or equal to 21MPa, nonlinear fitting is performed. a, b, and c are all constants generated during the fitting process. The formation pressure of the first gas reservoir is If it is greater than 21MPa, a linear fit is performed. a, b, and c are all constants generated during the fitting process, and the formation pressure of the first gas reservoir is a; The calculation of the second gas reservoir formation pressure in step b specifically includes the following steps: Step b21, detecting and obtaining or presetting gas reservoir and well parameters; Step b22, according to the gas reservoir and well parameters, obtain each well opening time point t by calculation f The corresponding bottom hole pressure p of the gas well wf (t f );Given the initial value of well controlled reserves G 0 , accuracy requirement e and maximum number of cycles K; Step b23, calculate each well opening time point t f The corresponding initial value of gas reservoir formation pressure Among them, G p (t f ) is each well opening time point t f The corresponding cumulative gas production, p i is the original formation pressure of the gas reservoir, Zi is the deviation factor under the original formation pressure of the gas reservoir, and Z' is the deviation factor under the current formation pressure of the gas reservoir, which is obtained by looking up the table after the apparent formation pressure is calculated; Step b24, if the original formation pressure p i If the pressure is less than or equal to 21 MPa, a nonlinear relationship is used to calculate each well opening time point t f The corresponding normalized output and normalized cumulative yield Where Q sc (t f ) is each well opening time point t f The gas well production under the corresponding standard conditions; if the original formation pressure of the gas reservoir p i If the pressure is greater than 21 MPa, a linear relationship is used to calculate each well opening time point t f The corresponding normalized output and normalized cumulative yield Where Q sc (t f ) is each well opening time point t f The corresponding gas well production under standard conditions; Step b25, make x=Q N (t), y = q N (t), the scattered points with linear relationship are fitted into a straight line, and the intersection of the straight line and the X-axis is the calculated value of well controlled reserves G 1 ; If |G 1 -G 0 |<e, then the well controlled reserves G=G 0 Otherwise, G 0 Reset to G 1 , repeat the above steps until the calculation accuracy requirement is met or the maximum number of cycles k is reached; Step b26, substituting the well-controlled reserves G into the following formula, the second gas reservoir formation pressure p can be obtained: r (t f ), , Among them, G p (t f ) is each well opening time point t f The corresponding cumulative gas production, p i is the original formation pressure of the gas reservoir, Zi is the deviation factor under the original formation pressure of the gas reservoir, and Z' is the deviation factor under the current formation pressure of the gas reservoir, which is obtained by looking up the table after the apparent formation pressure is calculated.

2. A method for automatically calculating gas reservoir formation pressure according to claim 1, characterized in that: The fitting is achieved through the fitting module in MATLAB.

3. The method for automatically calculating gas reservoir formation pressure according to claim 1, characterized in that: In step d, if the target instruction is a well repair design type, the larger value between the first gas reservoir formation pressure and the second gas reservoir formation pressure is selected as the gas reservoir formation pressure value output; if the target instruction is a gas well productivity calculation, reserve review or development potential assessment type, the smaller value between the first gas reservoir formation pressure and the second gas reservoir formation pressure is selected as the gas reservoir formation pressure value output.

4. A system for automatically calculating gas reservoir formation pressure, characterized in that: include: Server, input module, output module, wellhead temperature meter, wellhead flow meter and wellhead pressure gauge; The server includes a processor and a database; The wellhead thermometer, wellhead flowmeter and wellhead pressure gauge are all arranged at the wellhead of the gas well and connected to the server, and are used to collect the wellhead temperature, gas well production data under standard conditions and wellhead oil pressure respectively; The database stores gas reservoir and well parameters; The processor includes a first calculation module, a second calculation module, a timer and a logic judgment module; the logic judgment module determines whether the wellhead state is open or closed according to whether the gas well production data collected by the wellhead flowmeter is greater than 0; When the logic judgment module determines that the wellhead state is shut-in, the first calculation module calculates the formation pressure of the first gas reservoir and stores the calculation result in the database; When the logic judgment module determines that the wellhead state is open, the second calculation module calculates the second gas reservoir formation pressure and stores the calculation result in the database; The input module is used for the user to input measured or pre-set gas reservoir and well parameters, as well as target instructions; the logic judgment module selects and outputs the first gas reservoir formation pressure or the second gas reservoir formation pressure stored in the database as the target gas reservoir formation pressure according to the target instruction input by the user, and outputs it to the user through the output module; It also includes a safety device arranged at the wellhead, which collects wellhead gas information and completes combustible gas and / or toxic gas leakage detection and alarm; the safety device is also connected to the server, receives the well shut-in command issued by the server, executes the operation of shutting in the well and shutting down the system for automatically calculating the gas reservoir formation pressure; the output module includes a user terminal, and the user terminal can display the target gas reservoir formation pressure.

5. A system for automatically calculating gas reservoir formation pressure according to claim 4, characterized in that: The input module and / or the output module is connected to the server via wired or wireless means.

6. A system for automatically calculating gas reservoir formation pressure according to claim 4, characterized in that: The frequency of data collection by the wellhead thermometer, wellhead flowmeter and wellhead pressure gauge is once a day or once an hour, and the timer is used to record the time of data collection.