A method for determining natural gas deviation factor

By calculating the critical parameters of natural gas and iterative solution, combined with the steepest descent method and numerical difference, the problem of low efficiency and poor stability of the natural gas deviation factor determination method in the existing technology is solved, and accurate and efficient determination under different conditions is achieved.

CN113515724BActive Publication Date: 2024-09-17CHINA PETROLEUM & CHEMICAL CORP +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010280155.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-04-10
Publication Date
2024-09-17
Estimated Expiration
2040-04-10

AI Technical Summary

Technical Problem

When determining the natural gas deviation factor using existing technology, it is difficult to simultaneously consider the effects of gas type and relative density, resulting in a lack of data under different temperatures and pressure conditions, and the iterative solution method has low efficiency and poor stability.

Method used

By calculating the critical temperature and critical pressure of natural gas, the contrast pressure and contrast temperature are obtained. The Dranchuk-Abu-Kassem equation or the BWRS state equation is used for iterative solution. The steepest descent method and the numerical difference method are combined to avoid obtaining complex partial derivatives and improve the stability of the solution. sex.

Benefits of technology

A more targeted, efficient, and stable natural gas deviation factor determination method has been implemented, which simplifies programming implementation, reduces costs, and avoids iterative divergence problems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113515724B
    Figure CN113515724B
Patent Text Reader

Abstract

The present invention relates to a method for determining a natural gas deviation factor, which belongs to the field of gas field development research. The method includes calculating and determining the critical temperature and critical pressure of the natural gas according to its relative density, determining the comparative pressure and comparative temperature of the natural gas in combination with the working pressure and the working temperature, and obtaining the value of the natural gas deviation factor under the working pressure and the working temperature by iteratively solving the nonlinear relationship equation between the deviation factor and the comparative pressure and the comparative temperature. The method of the present invention can simultaneously consider the influence of the gas type and the relative density, and is used to more specifically determine the natural gas deviation factor under different working temperatures and different working pressures, so it is more targeted; compared with the traditional deviation factor determination method, the method of the present invention has the characteristics of being simple and convenient, easy to program, more targeted, and more practical, so it has a good value for promotion and use.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of gas field development research, and in particular relates to a method for determining a natural gas deviation factor. Background Art

[0002] The natural gas deviation factor is one of the most widely used basic parameters in the field of natural gas development. In the prior art, there are many methods for determining the natural gas deviation factor, mainly experimental method, plate checking method and nonlinear equation iterative solution method. The experimental method is costly and the data is difficult to meet the work needs of determining the deviation factor under different temperatures and pressures. On the one hand, it is impossible to conduct PVT experiments on the natural gas of all gas wells in the gas field to obtain relevant data. On the other hand, the PVT experiment is mainly conducted on the formation temperature conditions, and the relationship data between the deviation factor and the pressure under the formation temperature conditions is obtained. Therefore, there is a great lack of deviation factor data under different temperature and pressure conditions.

[0003] The chart checking method is mainly based on the relationship chart between the deviation factor and the contrast temperature and contrast pressure. The deviation factor value at the target working pressure and target working temperature is obtained by manual search. This method is very cumbersome and inconvenient to use. Regarding the iterative solution method of nonlinear equations, the trial and error method and the Newton iteration method are mainly used. The trial and error method requires manual calculation of each value. If the interval between two adjacent assumed values ​​is large, the accuracy of the iterative solution is difficult to guarantee; if the interval between two adjacent assumed values ​​is small, the trial calculation workload is large and the efficiency is low.

[0004] For the iterative solution of nonlinear equations, the existing technology generally solves the nonlinear equations through the Newton iteration method to obtain the deviation factor. When this method is iteratively solving, the analytical expression of the implicit function partial derivative required is difficult to obtain. Even if the specific expression of the partial derivative is given, the form of the expression is very complicated, the programming implementation is cumbersome, and it is difficult to determine whether the analytical expression of the implicit function partial derivative is correct. In addition, when the initial value of the iteration deviates far from the true solution, the use of the Newton iteration method will cause the solution to fail due to iterative divergence, and the convergence stability of the solution is difficult to guarantee. Summary of the invention

[0005] The purpose of the present invention is to provide a method for determining a natural gas deviation factor, which can simultaneously consider the influence of natural gas type and relative density, and can more specifically determine the natural gas deviation factor under different working temperatures and different working pressures.

[0006] Based on the above purpose, a technical solution of a method for determining a natural gas deviation factor is as follows:

[0007] (1) According to the relative density of natural gas γ g, calculate and determine its critical temperature TC and critical pressure PC;

[0008] For dry gas, when γ g When ≥0.7, PC=4.88-0.39×γ g , TC=92.2+176.6×γ g ;

[0009] When γ g <0.7, PC = 4.78-0.25×γ g ,TC=92.2+176.6×γ g ;

[0010] For moisture, when γ g When ≥0.7, PC=5.10-0.69×γ g ,TC=132.2+116.7×γ g ;

[0011] When γ g <0.7, PC = 4.78-0.25×γ g , TC=106.1+152.2×γ g ;

[0012] (2) Calculate the relative pressure P of natural gas based on the working pressure Press, working temperature Temp, and the critical temperature TC and critical pressure PC obtained in step (1). pr and the contrast temperature T pr ;

[0013] P pr =Press / PC, T pr =Temp / TC;

[0014] (3) By iteratively solving the deviation factor Z and the contrast pressure P pr and the contrast temperature T pr The nonlinear relationship equation between them is used to obtain the value of the natural gas deviation factor under the working pressure Press and working temperature Temp conditions;

[0015] In the iterative solution process of the nonlinear equation, the following formula is used to estimate the iterative assumption initial value Z of the natural gas deviation factor: k :

[0016]

[0017] Where P pr is the relative pressure of natural gas, T pr is the relative temperature of natural gas.

[0018] The beneficial effects of the above technical solution are:

[0019] The method of the present invention can simultaneously consider the influence of gas type and relative density to determine its critical temperature TC and critical pressure PC, and then determine the relative pressure P of natural gas. pr and the contrast temperature T pr , which is used to more specifically determine the natural gas deviation factor under different working temperatures and working pressures, and is therefore more targeted; compared with the traditional method for determining the deviation factor, the method of the present invention is simple and convenient, easy to program, more targeted, and more practical, and therefore has a good value for promotion and use.

[0020] In order to solve the deviation factor, further, the deviation factor Z and the comparison pressure P are solved in step (3) pr and the contrast temperature T pr When a nonlinear relationship equation is used between the two, the nonlinear relationship equation adopts the Dranchuk-Abu-Kassem equation or the BWRS state equation.

[0021] Further, in step (3), the deviation factor Z and the comparison pressure P are solved pr and the contrast temperature T pr When solving the nonlinear relationship equation between two parameters, the steepest descent method is used for iterative solution to increase the stability of the solution.

[0022] Furthermore, in the process of iteratively solving nonlinear equations using the steepest descent method, in order to avoid the complex work of obtaining the analytical expression of the partial derivative of the implicit function in the traditional solution, the partial derivative of the implicit function with respect to the deviation factor is calculated by numerical difference method. The expression of the numerical difference method is as follows:

[0023]

[0024] In the formula, PF(Z k ) represents the working function in the iterative solution process; F(Z) = 0, which is the implicit function expression of the nonlinear relationship equation of the natural gas deviation factor, h is the intermediate parameter in the iterative solution process, and Z k is the iterative assumption value of the natural gas deviation factor. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Figure 1 This is a flow chart of a method for determining a natural gas deviation factor according to Example 1 of the present invention. DETAILED DESCRIPTION

[0026] The specific implementation of the present invention will be further described below in conjunction with the accompanying drawings.

[0027] (I) Introduction to the Dranchuk-Abou-Kassem nonlinear equation with deviation factor

[0028] Dranchuk et al. established the functional relationship between the deviation factor and temperature and pressure based on the deviation factor plate relationship data. The nonlinear equation expression of the Dranchuk-Abou-Kassem deviation factor is as follows

[0029]

[0030] In the formula, Z g : natural gas deviation factor, dimensionless; A 1 =0.3265, A 2 =-1.0700, A 3 =-0.5339, A 4 =0.01569, A 5 =-0.05165, A 6 =0.5475, A 7 =-0.7361, A 8 =0.1844, A 9 =0.1056, A 10 =0.6134, A 11 =0.7210;

[0031] ρ pr =0.27P pr / (Z g T pr ) (2)

[0032] P pr =Pres / PC (3)

[0033] T pr =Temp / TC (4)

[0034] Where ρ pr : Pseudo-comparative density of natural gas, dimensionless; P pr : Pseudo-relative pressure of natural gas, dimensionless; T pr : Pseudo-comparative temperature of natural gas, dimensionless; PC: Pseudo-critical pressure of natural gas, MPa; TC: Pseudo-critical temperature of natural gas, K; Pres: Working pressure of natural gas, MPa; Temp: Working temperature of natural gas, K.

[0035] (II) Introduction to the Steepest Descent Iterative Solution Correction Method

[0036] For nonlinear equations:

[0037] f(x)=0 (5)

[0038] F(x)=f(x) 2 (6)

[0039] Let it iterate and assume the value x k , then the correction algorithm of the iterative solution is:

[0040]

[0041] (III) Introduction to the derivation of the steepest descent iterative solution correction method for the Dranchuk-Abou-Kassem deviation factor nonlinear equation

[0042] Let Eq L (Z)=Z (8)

[0043]

[0044] Then, the nonlinear equation expression of the Dranchuk-Abou-Kassem deviation factor in formula (1) is transformed into:

[0045] Eq L (Z)-Eq R (Z)=0 (10)

[0046] Let f(Z) = Eq L (Z)-Eq R (Z) (11)

[0047] From equation (6) and equation (11), we can get:

[0048] F(Z)=f(Z) 2 =[Eq L (Z)-Eq R (Z)] 2 (12)

[0049] The partial derivatives are obtained by difference method Perform numerical calculations, that is,

[0050]

[0051] In the formula, h is a sufficiently small number, which is usually 10 in practical applications. -6 .

[0052] From equation (12) and equation (13), we can get:

[0053]

[0054] Replace the variable Z in equations (12) and (14) with its iterative assumption value Z k have to:

[0055] F(Z k )=f(Z k ) 2 =[Eq L(Z k )-Eq R (Z k )] 2 (15)

[0056]

[0057] Replace the unknown variable x in equation (7) with Z and replace the iterative assumption value x k Replace with Z k have to:

[0058]

[0059] Formula (17) is the steepest descent iterative solution correction expression of the Dranchuk-Abou-Kassem deviation factor nonlinear equation, where F(Z k ) is calculated by formula (15), Calculated by formula (16).

[0060] A method for determining the natural gas deviation factor, such as Figure 1 As shown, the specific implementation manner is described as follows:

[0061] (1) According to the relative density of natural gas γ g , calculate and determine its critical temperature TC and critical pressure PC;

[0062] For dry gas, when γ g When ≥0.7, PC=4.88-0.39×γ g , TC=92.2+176.6×γ g ;

[0063] When γ g <0.7, PC = 4.78-0.25×γ g ,TC=92.2+176.6×γ g ;

[0064] For moisture, when γ g When ≥0.7, PC=5.10-0.69×γ g ,TC=132.2+116.7×γ g ;

[0065] When γ g <0.7, PC = 4.78-0.25×γ g , TC=106.1+152.2×γ g ;

[0066] (2) Calculate the comparative pressure P based on the working pressure Press and working temperature Temp prand the contrast temperature T pr ;

[0067] P p =Pres / PC, T pr =Temp / TC;

[0068] (3) According to the natural gas relative pressure P obtained in step (2) pr Compared with natural gas temperature T pr , by formula Determine the iterative assumption value Z of the deviation factor k ;

[0069] (4) Iterate the hypothesis value Z according to the deviation factor k and the comparative pressure P obtained in step (2) pr Compared with temperature T pr , calculate the relative density ρ of natural gas pr ;

[0070] ρ pr =0.27×P pr / (Z k ×T pr )

[0071] (5) Calculate the iterative assumption value Z of the deviation factor k The left-hand side term of the Dranchuk-Abou-Kassem deviation factor nonlinear equation Eq. L (Z k ) and the right-hand side of Eq R (Z k );

[0072] Eq L (Z k )=Z k

[0073]

[0074] In the formula, A 1 =0.3265, A 2 =-1.0700, A 3 =-0.5339, A 4 =0.01569, A 5 =-0.05165, A 6 =0.5475, A 7 =-0.7361, A 8 =0.1844, A 9 =0.1056, A 10 =0.6134, A 11 =0.7210;

[0075] (6) Convergence judgment of the iterative solution of the Dranchuk-Abou-Kassem deviation factor nonlinear equation is performed. If the iterative solution converges, the iterative assumption value Z at this time is k As the value of the natural gas deviation factor at the working pressure Press and the working temperature Temp;

[0076] The convergence condition of the iterative solution is:

[0077] |Eq L (Z k )-Eq R (Z k )|≤Tol

[0078] Or use the following convergence conditions:

[0079] |(Eq L (Z k )-Eq R (Z k )) / Eq L (Z k )|≤Tol,

[0080] Where Tol is the iterative convergence error tolerance, which is generally taken as 0.001;

[0081] (7) If the convergence condition is not met, the iterative solution is corrected and Z is assigned k The new iteration value;

[0082] (8) Repeat steps (4) to (7) until the solution converges;

[0083] Specifically, in step 7), the steepest descent method is used to perform iterative solution correction;

[0084]

[0085] In the formula, F(Z k )=[Eq L (Z k )-Eq R (Z k )] 2 ;

[0086] The meanings of the symbols in the above formulas are as follows:

[0087] γ g : relative density of natural gas, dimensionless; TC: critical temperature of natural gas, K; PC: critical pressure of natural gas, MPa; Press: working pressure of natural gas, MPa; Temp: working temperature of natural gas, K; P pr: natural gas relative pressure, dimensionless; T pr : natural gas relative temperature, dimensionless; Z k : Iterative assumption value of deviation factor, dimensionless; ρ pr : natural gas relative density, dimensionless; Tol: iterative convergence error tolerance, dimensionless, generally taken as 0.001; Eq. L (Z k ): Deviation factor equals Z k When , the value of the left-hand side of the Dranchuk-Abou-Kassem deviation factor nonlinear equation; Eq R (Z k ): Deviation factor equals Z k When , the value of the right-hand side of the Dranchuk-Abou-Kassem deviation factor nonlinear equation; F(Z k ): a working function in the iterative solution process; PF(Z k ): a working function in the iterative solution process; h: a sufficiently small intermediate parameter in the iterative solution process, dimensionless, generally 10 -6 .

[0088] In this embodiment, the coefficients in the calculation formulas for the critical temperature TC and the critical pressure PC under the dry gas type / wet gas type are obtained by statistical analysis and fitting based on the relationship data between the critical temperature, critical pressure and relative density of natural gas obtained from a large number of experiments.

[0089] In this embodiment, the iterative assumption value Z of the deviation factor k The coefficients in the initial value formula are obtained by curve fitting based on the data of the Standing-Katz deviation factor chart. Through this initial value formula, it can be ensured that the deviation between the initial value of the iteration and the true value is not too far.

[0090] Verification Example 1

[0091] After experimental testing, the relative density of natural gas in a well was measured to be 0.605, and the natural gas type was dry gas. The critical pressure of natural gas was 4.58MPa and the critical temperature of natural gas was 198.3K by analyzing its components. Under the conditions of working pressure of 13.78MPa and working temperature of 366.48K, the corresponding P pr is 3.01, compared with the temperature T pr It is 1.848. Using the Standing-Katz Z coefficient chart, it is found that the deviation factor is 0.925 under the working pressure of 13.78MPa and the working temperature of 366.48K.

[0092] (1) According to the relative density of natural gas γ g=0.605, since the gas type is dry gas and γ g <0.7, so PC=4.78-0.25×γ g The critical pressure PC is calculated to be 4.629 MPa, using TC = 92.2 + 176.6 × γ g The critical temperature TC is obtained as 199.043K.

[0093] (2) Based on the working pressure Pres = 13.78 MPa and the working temperature Temp = 366.48 K, calculate the relative pressure P pr and the contrast temperature T pr as follows:

[0094] P pr =Pres / PC=2.977

[0095] T pr =Temp / TC=1.841

[0096] (3) According to the natural gas relative pressure P obtained in step (2) pr =2.977 and natural gas temperature T pr =1.841, according to the formula Determine the iterative assumption value Z of the deviation factor k =0.77442.

[0097] (4) Iterate the hypothesis value Z according to the deviation factor k and the comparative pressure P obtained in step (2) pr Compared with temperature T pr , calculate the relative density ρ of natural gas pr =0.27×P pr / (Z k ×T pr )=0.5637.

[0098] (5) Calculate the iterative assumption value Z of the deviation factor k The left-hand side term of the Dranchuk-Abou-Kassem deviation factor nonlinear equation Eq. L (Z k ) and the right-hand side of Eq R (Z k ).

[0099] Eq L (Z k )=Z k =0.77442

[0100]

[0101] In the formula, A 1 =0.3265, A 2 =-1.0700, A 3 =-0.5339, A 4 =0.01569, A 5 =-0.05165, A 6 =0.5475, A 7 =-0.7361, A 8 =0.1844, A 9 =0.1056, A 10 =0.6134, A 11 =0.7210.

[0102] (6) Make a convergence judgment on the iterative solution of the Dranchuk-Abou-Kassem deviation factor nonlinear equation.

[0103] |Eq L (Z k )-Eq R (Z k )|=0.1301, and|(Eq L (Z k )-Eq R (Z k )) / Eq L (Z k )|=0.1680 is obviously larger than the error convergence tolerance Tol=0.001, so the iteration does not converge, and iterative solution correction and further iterative solution are required.

[0104] (7) Perform iterative solution correction acceleration, specifically:

[0105] Calculate the intermediate parameter F(0.77442) = [Eq L (0.77442)-Eq R (0.77442)] 2 =1.6908×10 -2

[0106] Calculate intermediate parameters

[0107] Perform accelerated correction of iterative solutions

[0108] (8) Get the new iterative hypothesis value Z k = 0.8390, repeat steps (4)-(7), and finally after 8 iterations, the calculated value of the deviation factor is Z 3 =0.905.

[0109] The value of the deviation factor obtained by iterative solution of the present invention is 0.905, which is very close to the value 0.925 obtained by searching the Z coefficient plate using the Standing-Katz method, and the relative error between the two is 2.16%, which verifies the reliability of the method of the present invention.

[0110] In this embodiment, the Dranchuk-Abu-Kassem equation is used to solve the deviation factor Z and the relative pressure P. pr and the contrast temperature T pr Alternatively, other nonlinear relationship equations in the prior art may be used to solve the nonlinear relationship equation, such as the BWRS state equation.

[0111] Verification Example 2

[0112] Through experimental detection, it was found that the relative density of natural gas in a well was 0.5884, the type of natural gas was dry gas, and the deviation factor was 0.9811 under the working pressure of 8MPa and the working temperature of 419.85K (146.7℃); while the natural gas deviation factor calculated by the method of the present invention was 0.9635, and the relative error between the two was 1.79%, thereby verifying the reliability of the method of the present invention.

[0113] Verification Example 3

[0114] Through experimental detection, it was found that the relative density of natural gas in a well was 0.6256, the type of natural gas was wet gas, and the deviation factor was 0.9961 under the working pressure of 32.979MPa and the working temperature of 371.57K (98.42℃); while the natural gas deviation factor calculated by the method of the present invention was 0.9995, and the relative error between the two was 0.34%, which further verified the reliability of the method of the present invention.

[0115] In summary, the method of the present invention is lower in cost than the experimental method, and is more convenient and faster than the plate checking method and the trial calculation iterative solution method; compared with the determination method based on Newton iterative solution reported in the literature, it can simultaneously consider the influence of different gas types and relative density sizes, and is more targeted; and there is no need to obtain the analytical expression of the partial derivative of the implicit function, so programming is easier to implement; in addition, the steepest descent method is used to solve nonlinear equations. When the initial value of the iteration deviates greatly from the true solution, there is no problem of solution failure caused by iterative divergence. Compared with the traditional deviation factor determination method, the method of the present invention has the characteristics of simplicity and convenience, easy programming implementation, stable and reliable solution, stronger targeting, better practicality, etc., and therefore has a good value for promotion and use.

[0116] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.

Claims

1. A method for determining a natural gas deviation factor, characterized in that: The following steps are involved: (1) Based on the relative density γg of natural gas, calculate and determine its critical temperature TC and critical pressure PC; For dry gas, when γg≥0.7, PC=4.88-0.39×γg, TC=92.2+176.6×γg; When γg<0.7, PC=4.78-0.25×γg, TC=92.2+176.6×γg; For moisture, when γg≥0.7, PC=5.10-0.69×γg, TC=132.2+116.7×γg; When γg<0.7, PC=4.78-0.25×γg, TC=106.1+152.2×γg; (2) Based on the working pressure Press, the working temperature Temp and the critical temperature TC and the critical pressure PC obtained in step (1), Calculate the relative pressure Ppr and relative temperature Tpr of natural gas; Ppr=Press / PC, Tpr=Temp / TC; (3) by iteratively solving the nonlinear relationship equation between the natural gas deviation factor Z and the comparative pressure Ppr and the comparative temperature Tpr, the value of the natural gas deviation factor under the working pressure Press and the working temperature Temp is obtained; In the iterative solution process of the nonlinear equation, the iterative assumption value Z of the natural gas deviation factor is estimated by the following formula: k : Where Ppr is the relative pressure of natural gas, Tpr is the relative temperature of natural gas; When solving the nonlinear relationship equation between the natural gas deviation factor Z and the comparative pressure Ppr and the comparative temperature Tpr, the steepest descent method is used for iterative solution; In the process of iteratively solving the nonlinear equation using the steepest descent method, the partial derivative of the implicit function of the deviation factor is calculated using the numerical difference method. The expression of the numerical difference method is as follows: In the formula, PF(Z k ) represents the working function in the iterative solution process; F(Z) = 0, which is the implicit function expression of the nonlinear relationship equation of the natural gas deviation factor, h is the intermediate parameter in the iterative solution process, and Z k is the iterative assumption initial value Zk of the natural gas deviation factor, Z is the natural gas deviation factor, and F(Zk) is the iterative assumption initial value Z of the natural gas deviation factor k The implicit function expression of the nonlinear relationship equation.

2. The method for determining the natural gas deviation factor according to claim 1, characterized in that: When solving the nonlinear relationship equation between the deviation factor Z and the comparative pressure Ppr and the comparative temperature Tpr in step (3), the nonlinear relationship equation adopts the Dranchuk-Abu-Kassem equation or the BWRS state equation.