Method and device for determining water dew point of natural gas
By combining the state equation and phase stability analysis, the dew point of natural gas is determined, which solves the problem of insufficient accuracy in the existing technology under low pressure conditions, and achieves higher accuracy and wider range of dew point calculations.
Patent Information
- Application Number
- CN202411869632.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-18
- Publication Date
- 2025-04-04
AI Technical Summary
The accuracy of the existing natural gas water dew point calculation method under low pressure conditions is difficult to meet the design requirements, and the traditional cubic equation of state fails to fully consider the hydrogen bonding cooperation between polar molecules, resulting in low calculation accuracy.
By combining the equation of state and phase stability analysis, the water dew point of natural gas is determined. The specific steps include determining the remaining Gibbs free energy of the system based on the pre-formed equation of state, minimizing the free energy to determine the stability boundary, and thus determining the water dew point.
It improves the accuracy and range of natural gas water dew point calculation, and can more accurately consider the interaction between polar molecules, and is suitable for a variety of natural gas components and complex working conditions.
Smart Images

Figure CN119761025A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of natural gas gathering and transportation, in particular to the technical field of safety in the process of natural gas gathering and transportation, and specifically to a method and device for determining the water dew point of natural gas. Background Art
[0002] In recent years, many algorithms have been developed for the calculation and prediction of natural gas water dew point temperature, such as artificial intelligence calculation, traditional state equation calculation, etc. However, there are still some problems in these methods that need to be solved:
[0003] (1) Limitations of AI applications: Although AI technology is increasingly used in natural gas processing, existing methods still have shortcomings in dealing with data fluctuations and diverse scenarios. For example, some prediction methods reduce the accuracy of results due to data fluctuations caused by sensor errors. At the same time, such data models usually have high requirements for large amounts of training data and require customized configurations in different application scenarios. These problems show that how to robustly and efficiently apply AI technology to meet the complex needs of natural gas processing remains a challenge to be solved.
[0004] (2) Limited calculation area coverage: The accuracy of existing natural gas water dew point calculation methods under low pressure conditions is difficult to meet design requirements. Although the "Conversion between Natural Gas Water Content and Water Dew Point" standard and ISO specification provide a calculation method based on the PR state equation and fit the gas-liquid phase interaction coefficient through temperature, there is still a deviation between the calculation results and the experimental data in the low-pressure area. In addition, although the relevant commercial software has a rich database, the internal parameters cannot be optimized, which limits its calculation accuracy under low pressure conditions and makes it difficult to meet high-precision requirements. This problem highlights the technical needs for accurate prediction of water dew point in low-pressure environments.
[0005] (3) The accuracy of the traditional cubic state equation is not high: The SRK and PR state equations commonly used in the prior art describe the characteristics of the gas phase and the liquid phase, and the binary interaction coefficient is corrected by associating it with the temperature. However, this type of cubic state equation does not take into account the hydrogen bond association between polar molecules such as water molecules. Under pressure, the distance between polar molecules decreases and the association is enhanced, resulting in the low calculation accuracy of the traditional cubic state equation for the water-containing natural gas system. Summary of the invention
[0006] The present application provides a method and device for determining the water dew point of natural gas, the purpose of which is to improve the technical accuracy of the water dew point of natural gas and to provide a method for determining the water dew point of natural gas with a wider range of applications.
[0007] In order to achieve the above objectives, in a first aspect, this party provides a method for determining the water dew point of natural gas, comprising:
[0008] Based on a pre-generated state equation of the natural gas system, the residual Gibbs free energy of the system is determined according to the set experimental phase and the test phase; wherein the state equation includes the physical terms of the system and the pre-set association terms;
[0009] Finding the minimum value of the residual Gibbs free energy of the system;
[0010] The stability boundary of the system is determined according to the minimum value of the residual Gibbs free energy of the system to determine the water dew point of the natural gas.
[0011] In some embodiments of the present invention, the state equation of the system in which the natural gas is located is pre-generated, and the residual Gibbs free energy of the system is determined according to the set test phase and the test phase, including:
[0012] Based on the equation of state, determining the residual Gibbs free energy of the test phase according to the mole fraction of each component of the test phase;
[0013] Determining the residual Gibbs free energy of the test phase according to the mole fraction of each component of the test phase based on the equation of state;
[0014] The residual Gibbs free energy of the system is determined from the residual Gibbs free energy of the test phase and the residual Gibbs free energy of the test phase.
[0015] In some embodiments of the present invention, obtaining the minimum value of the residual Gibbs free energy of the system comprises:
[0016] generating a tangent plane distance function of the residual Gibbs free energy of the system based on the residual Gibbs free energy of the test phase, the residual Gibbs free energy of the test phase, and the fugacity coefficient of the equation of state;
[0017] The minimum value of the tangent plane distance function is obtained to obtain the minimum value of the residual Gibbs free energy.
[0018] In some embodiments of the present invention, obtaining the minimum value of the tangent plane distance function includes:
[0019] Setting the phase composition, temperature and pressure of the test phase;
[0020] Based on the setting of the phase composition, temperature and pressure of the test phase, the initial value of the test phase is set multiple times to obtain the minimum value of the tangent plane distance function.
[0021] In some embodiments of the present invention, the association terms include: system pressure, energy parameters, equation volume parameters, molar volume, radial distribution function and the molar fraction of the component at the association site A that does not participate in the association.
[0022] In a second aspect, the present application provides a device for determining a water dew point of natural gas, the device comprising:
[0023] A residual free energy determination module, for determining the residual Gibbs free energy of the system based on a pre-generated state equation of the natural gas system according to a set experimental phase and a test phase; wherein the state equation is generated by including physical terms of the system and pre-set association terms;
[0024] A residual free energy minimum value obtaining module is used to obtain the minimum value of the residual Gibbs free energy of the system;
[0025] The natural gas water dew point determination module is used to determine the stability boundary of the system according to the minimum value of the residual Gibbs free energy of the system, so as to determine the natural gas water dew point.
[0026] In some embodiments of the present invention, the residual free energy determination module includes:
[0027] a test phase free energy determination unit, for determining the residual Gibbs free energy of the test phase according to the mole fraction of each component of the test phase based on the equation of state;
[0028] a test phase free energy determination unit, for determining the residual Gibbs free energy of the test phase according to the mole fraction of each component of the test phase based on the equation of state;
[0029] The residual free energy determination unit is used to determine the residual Gibbs free energy of the system according to the residual Gibbs free energy of the test phase and the residual Gibbs free energy of the test phase.
[0030] In some embodiments of the present invention, the residual free energy minimum value obtaining module includes:
[0031] A TPD function generating unit, for generating a tangent plane distance function of the residual Gibbs free energy of the system according to the residual Gibbs free energy of the test phase, the residual Gibbs free energy of the test phase and the fugacity coefficient of the state equation;
[0032] The TPD function minimum value obtaining unit is used to obtain the minimum value of the tangent plane distance function to obtain the minimum value of the residual Gibbs free energy.
[0033] In some embodiments of the present invention, the TPD function minimum value obtaining unit includes:
[0034] A test phase parameter setting unit, used to set the phase composition, temperature and pressure of the test phase;
[0035] The test phase initial value setting unit is used to obtain the minimum value of the tangent plane distance function by setting the initial value of the test phase multiple times based on the phase composition, temperature and pressure of the test phase.
[0036] In some embodiments of the present invention, the association terms include: system pressure, energy parameters, equation volume parameters, molar volume, radial distribution function and the molar fraction of the component at the association site A that does not participate in the association.
[0037] In a third aspect, the present application provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps of a method for determining the water dew point of natural gas.
[0038] In a fourth aspect, the present application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of a method for determining the water dew point of natural gas when executing the program.
[0039] In a fifth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of a method for determining a water dew point of natural gas.
[0040] From the above description, it can be seen that the embodiment of the present application provides a method and device for determining the water dew point of natural gas, and the corresponding method includes: first, based on the state equation of the natural gas system generated in advance, the residual Gibbs free energy of the system is determined according to the set experimental phase and the test phase; wherein the state equation includes the physical terms of the system and the pre-set association terms generated; then, the minimum value of the residual Gibbs free energy of the system is obtained; finally, the stability boundary of the system is determined according to the minimum value of the residual Gibbs free energy of the system to determine the water dew point of the natural gas.
[0041] The method provided in the present application combines the natural gas state equation with phase stability analysis, better considers the hydrogen bonding between polar molecules in natural gas, and has better calculation accuracy and a larger calculation range. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0043] Figure 1 A schematic flow chart of a method for determining the water dew point of natural gas provided in an embodiment of the present application;
[0044] Figure 2 This is a flow chart of step 100 of a method for determining the water dew point of natural gas provided in an embodiment of the present application;
[0045] Figure 3 This is a flow chart of step 200 of a method for determining the water dew point of natural gas provided in an embodiment of the present application;
[0046] Figure 4 This is a flow chart of step 202 of a method for determining the water dew point of natural gas provided in an embodiment of the present application;
[0047] Figure 5 A flow chart of a method for determining the water dew point of natural gas provided in a specific application example of this application;
[0048] Figure 6 A technical roadmap for a method for determining the water dew point of natural gas provided in a specific application example of this application;
[0049] Figure 7 This is a flow chart for calculating the water dew point temperature of natural gas provided in a specific application example of this application;
[0050] Figure 8 A schematic diagram showing the comparison between the predicted temperature of the water dew point of natural gas sample A provided in the specific application example of this application and the experimental data;
[0051] Fig. 9 A schematic diagram showing the comparison between the predicted temperature of the water dew point of natural gas sample B provided in the specific application example of this application and the experimental data;
[0052] Fig.10 A schematic diagram showing the comparison between the model prediction and the dew point curve experimental data in the gas sample C system provided in the specific application example of this application;
[0053] Fig.11 A schematic diagram showing the comparison between the model prediction and the dew point curve experimental data in the gas sample D system provided in the specific application example of this application;
[0054] Fig.12 A schematic diagram showing the comparison between the model prediction and the dew point curve experimental data in the gas sample E system provided in the specific application example of this application;
[0055] Fig.13 This is a schematic diagram of the structure of a device for determining the water dew point of natural gas provided in an embodiment of the present application;
[0056] Fig.14This is a schematic diagram of the structure of the residual free energy determination module 10 provided in an embodiment of the present application;
[0057] Fig.15 It is a structural schematic diagram of the residual free energy minimum value obtaining module 20 provided in the embodiment of the present application;
[0058] Fig.16 It is a structural schematic diagram of the TPD function minimum value obtaining unit 20b provided in the embodiment of the present application;
[0059] Fig.17 It is a schematic diagram of the structure of an electronic device in an embodiment of the present application. DETAILED DESCRIPTION
[0060] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0061] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0062] It should be noted that the terms "including" and "having" and any variations thereof in the specification and claims of the present application and the above-mentioned drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, product or apparatus comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or apparatuses.
[0063] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0064] It is understandable that the water dew point of natural gas is one of the important parameters to ensure the safe transportation of natural gas pipelines. The water dew point temperature is defined as the critical temperature at which the water component begins to condense from the natural gas under a given pressure. Since natural gas processing plants often use low-temperature dehydration processes, it is often necessary to add alcohol inhibitors such as methanol and ethylene glycol to prevent the formation of hydrates caused by excessive temperature drop. The actual natural gas components may also contain trace amounts of alcohol components. Water and alcohol components have a strong association reaction. Accurately predicting the water dew point temperature of natural gas with strong polar components is a prerequisite for formulating a safe transportation plan.
[0065] Based on this, the embodiment of the present application provides a specific implementation method of a method for determining the water dew point of natural gas, see Figure 1 , the method specifically includes the following contents:
[0066] Step 100: Based on a pre-generated state equation of the natural gas system, determine the residual Gibbs free energy of the system according to a set experimental phase and a test phase; wherein the state equation includes physical terms of the system and pre-set association terms;
[0067] Step 200: Calculating the minimum value of the residual Gibbs free energy of the system;
[0068] Step 300: Determine the stability boundary of the system according to the minimum value of the residual Gibbs free energy of the system to determine the water dew point of the natural gas.
[0069] From the above description, it can be seen that the embodiment of the present application provides a method for determining the water dew point of natural gas, including: first, based on the state equation of the system in which the natural gas is located in advance, determine the residual Gibbs free energy of the system according to the set test phase and the test phase; wherein the state equation includes the physical terms of the system and the pre-set association terms generated; then, find the minimum value of the residual Gibbs free energy of the system; finally, determine the stability boundary of the system according to the minimum value of the residual Gibbs free energy of the system to determine the water dew point of the natural gas. The method provided by the present application has the following advantages over the prior art:
[0070] (1) Improve the accuracy of water dew point calculation.
[0071] By combining stability analysis with the CPA equation, the interaction of natural gas components and their thermodynamic properties can be more comprehensively considered, thereby significantly improving the accuracy of water dew point calculation. Compared with the traditional state equation calculation method, this method shows higher reliability in complex environments, is applicable to a variety of natural gas component combinations and temperature and pressure conditions, and meets industrial needs.
[0072] (2) Improve the prediction range of water dew point.
[0073] By introducing the association term in the CPA equation, the hydrogen bond association between polar molecules is better considered, so that this model can predict the water dew point of natural gas systems containing strong polar components, with better calculation accuracy and a larger calculation range, providing a more universal and adaptable prediction method.
[0074] Regarding step 100, it should be pointed out that the test phase is the phase being evaluated for its ability to remain stable under specific conditions (such as temperature, pressure, composition, etc.), and is the phase existing in the current system (the system in which the natural gas is located). The test phase is a candidate phase or hypothetical phase used to test the stability of the test phase, and the test phase is used to compare with the test phase to evaluate whether the current system tends to transform into other phases.
[0075] The state equation of the natural gas system is a mathematical expression used to describe the physical state of natural gas under different temperature, pressure and volume conditions. The state equation in step 100 includes physical and associative terms.
[0076] Preferably, the physical terms are described using the SRK state equation (SRK (Soave-Redlich-Kwong) state equation is a thermodynamic state equation used to describe the thermodynamic properties of a mixture), and the association terms are described using the following method:
[0077] The calculation is performed by applying thermodynamic phase equilibrium conditions, especially the chemical potential and relative chemical potential of substances, to a given system (gas-liquid or liquid-liquid equilibrium). Specifically, it includes:
[0078] Chemical potential balance: For a multi-component system, the chemical potential of the same component in the gas phase and the liquid phase must be equal (i.e., satisfy the thermodynamic equilibrium condition). By establishing the corresponding equilibrium equation, the distribution of components in the gas phase and the liquid phase can be obtained.
[0079] Iterative solution: Solve the equations related to chemical potential through iterative methods to obtain the phase equilibrium point (i.e. conditions such as gas-liquid phase composition and pressure).
[0080] The specific steps include: first, it is necessary to select a suitable thermodynamic model to describe the gas-liquid equilibrium system. Preferred models include the Peng-Robinson equation, the SRK equation, the Redlich-Kwong equation, and the like.
[0081] First, make an initial estimate: determine the initial estimate of the gas-liquid phase equilibrium, including the composition of the gas and liquid phases and the pressure and temperature of the system (initial pressure or temperature and other conditions).
[0082] Solve the phase equilibrium equation: Use the chemical potential equilibrium condition, which requires that the chemical potential of a component in the gas phase and the liquid phase be equal:
[0083]
[0084] in, and are the chemical potentials of component i in the gas phase and liquid phase, respectively. y is the mole fraction of each component in the gas phase, and x is the mole fraction of each component in the liquid phase. T is the system temperature, and P is the system pressure.
[0085] For a multi-component system, multiple such equilibrium equations can be established and solved iteratively until the chemical potential equilibrium conditions are met.
[0086] Calculate gas-liquid equilibrium: Through iterative calculations, the gas-liquid equilibrium state at different temperatures and pressures can be obtained. These results can be used for subsequent thermodynamic calculations, such as the composition of the gas-liquid phase, phase distribution coefficient, phase equilibrium pressure, etc.
[0087] Optimized calculation: reasonable initial estimation and fast convergence iterative method can make the solution process efficient and accurate.
[0088] For step 200, the residual Gibbs free energy is used to describe the difference between the Gibbs free energy of a real gas or liquid and that of an ideal gas or liquid, which reflects the deviation caused by intermolecular interactions and non-ideal behaviors.
[0089] It should be pointed out that in the actual calculation process of step 200, the residual Gibbs free energy of the system in which the natural gas is located is not directly calculated (this process is too complicated), but the phase stability is judged according to the value of the tangential plane distance function (TPD), thereby determining the water dew point. That is, according to the principle of minimization of Gibbs free energy and the test phase and the set experimental phase, the tangential plane distance function (TPD) is determined, and then the phase stability is judged, and the residual Gibbs free energy of the system in which the natural gas is located is characterized.
[0090] For step 300, the phase stability analysis of the system in which the natural gas is located is performed. Specifically, when the Gibbs free energy of the system reaches the minimum, the system is in a stable state. Based on this principle, the tangent plane distance function (TPD) is used to determine whether a new phase is formed in the system. In the residual Gibbs free energy expression of the TPD function, the residual Gibbs free energy of the test phase and the test phase is divided. Under the given test phase composition and p and T conditions, the minimum energy that the system can reach is determined by finding the minimum value of the tangent plane distance function through the given test phase initial value, and then the stability of the test phase is determined. The dew point temperature expression is defined according to the stability of the two phases, and the dew point temperature is solved.
[0091] In some embodiments of the present invention, see Figure 2 , step 100 comprises:
[0092] Step 101: determining the residual Gibbs free energy of the test phase according to the mole fraction of each component of the test phase based on the equation of state;
[0093] Step 102: determining the residual Gibbs free energy of the test phase based on the equation of state and according to the mole fraction of each component of the test phase;
[0094] Step 103: Determine the residual Gibbs free energy of the system according to the residual Gibbs free energy of the test phase and the residual Gibbs free energy of the test phase.
[0095] In some embodiments of the present invention, see Figure 3 , step 200 comprises:
[0096] Step 201: generating a tangent plane distance function of the residual Gibbs free energy of the system according to the residual Gibbs free energy of the test phase, the residual Gibbs free energy of the test phase and the fugacity coefficient of the state equation;
[0097] Step 202: Find the minimum value of the tangent plane distance function to find the minimum value of the residual Gibbs free energy.
[0098] In step 201 and step 202, based on the Gibbs free energy minimization principle, the expression of the TPD function is:
[0099]
[0100] Where: G(Y) is the residual Gibbs energy of the system composed of the test phase and the test phase; Y is the amount of the test phase component substance, which is calculated by Y i Composition; Z is the amount of the test phase component substance, composed of z i Composition; i is the mole fraction of component i in the test phase, y i =Y i / ΣY i ;z i is the mole fraction of component i in the test phase; φ i is the fugacity coefficient of the state equation of component i; N C is the number of components.
[0101] For natural gas system, at a certain pressure and temperature (P, T), the feed component can be assumed to be the test phase, and the composition of the test phase can be given by the following formula:
[0102]
[0103] The phase stability analysis process is the process of finding the minimum value of G(Y) under given test phase composition and p, T conditions by giving the initial value of the test phase to determine the minimum energy that the system can reach.
[0104] In some embodiments of the present invention, see Figure 4 , obtaining the minimum value of the tangent plane distance function in step 202 includes:
[0105] Step 2021: setting the phase composition, temperature and pressure of the test phase;
[0106] Step 2022: Based on the setting of the phase composition, temperature and pressure of the test phase, the initial value of the test phase is set multiple times to obtain the minimum value of the tangent plane distance function.
[0107] In step 2021 and step 2022, when equation (2) is at its minimum value, its partial derivative is 0, and the stationary point equation can be obtained:
[0108] LqCy i +lnφ i (Y)-(lnz i +lnφ i (z))=0 (3)
[0109] At this point, the stability of the test phase system can be determined by the variable Y:
[0110]
[0111] Therefore, under a given pressure P, by associating equation (4) with temperature T, the expression for the dew point temperature can be defined as:
[0112]
[0113] If equation (5) is less than 0, the system is stable; otherwise, the natural gas system is unstable and water droplets are precipitated. The critical temperature corresponding to f(T) = 0 is the water dew point temperature.
[0114] The existing calculation method generally uses the fugacity equality to solve the water dew point, while formula (5) uses phase stability analysis. If the phase stability condition is not met, water will be precipitated, and the temperature that meets this condition is the water dew point temperature.
[0115] In some embodiments of the present invention, the association terms include: system pressure, energy parameters, equation volume parameters, molar volume, radial distribution function, and the molar fraction of the component not participating in the association at the association site A. For polar components, H2O molecules adopt the 4C association rule; alcohol molecules adopt the 2B association rule; CO2 molecules have only one electron donor site.
[0116] From the above description, it can be seen that the embodiment of the present application provides a method for calculating the water dew point of a natural gas system based on stability analysis. The method uses the CPA equation to describe the gas-liquid phase characteristics containing polar components and is coupled with the stability analysis process. The method mainly includes the following contents:
[0117] Introduction of the CPA state equation model: 1) The CPA state equation combines the characteristics of the cubic state equation with the intermolecular correlation effect, and can more accurately describe the hydrogen bonds and dipole interactions between polar molecules such as water and carbon dioxide in natural gas. This is especially important for water dew point calculations, because the polarity of water has a significant effect on the phase equilibrium in natural gas, and the introduction of the CPA equation significantly improves the calculation accuracy. 2) Natural gas is usually a multi-component mixture, containing components such as methane, ethane, carbon dioxide and water vapor. The CPA equation shows higher reliability and accuracy when dealing with multi-component systems. Compared with traditional cubic state equations (such as SRK or PR equations), the CPA equation can better cope with the complex phase behavior of multi-component natural gas, and improves the applicability of the model under different gas compositions and operating conditions. 3) The CPA equation has good adaptability under extreme conditions such as low temperature and high pressure, and is suitable for the actual calculation needs of water dew point in the natural gas industry.
[0118] Phase stability analysis: 1) In a multi-component natural gas system, phase changes become more complex as temperature and pressure change. Phase stability analysis can effectively deal with complex components and multiphase equilibrium situations, ensuring high-precision predictions of the calculation model under different gas compositions, extreme temperatures and pressures, and is suitable for water dew point calculations under special conditions such as high pressure and low temperature. 2) Through phase stability analysis, the calculation model can quickly determine whether there is a gas-liquid phase change, avoiding the trial-and-error calculation process. This not only improves the calculation efficiency, but also reduces unnecessary complex calculation steps, making the water dew point prediction more concise and fast, suitable for real-time monitoring needs in industrial applications. 3) Phase stability analysis can enhance the reliability of the model under different environmental conditions, making it applicable to a variety of natural gas compositions and climatic conditions. Compared with the traditional water dew point calculation method, the introduction of phase stability analysis ensures the adaptability and stability of the model.
[0119] The calculation process of the stability analysis coupled with the CPA equation: 1) The CPA state equation provides an accurate description of the interaction between polar molecules and multiple components in natural gas, while the phase stability analysis can determine the stability of the gas-liquid phase. The coupling of the two can more accurately capture the phase changes under different temperature, pressure and natural gas composition conditions, thereby improving the accuracy of water dew point calculation, which is particularly suitable for complex working conditions such as multi-component, high pressure and low temperature. 2) The coupled calculation method combines the wide applicability of the CPA equation and the phase judgment ability of phase stability analysis, and is suitable for water dew point calculation under different gas compositions and environmental conditions. Compared with traditional methods, this coupling method is more versatile in a variety of application scenarios. 3) The coupling method can quickly determine whether there is a phase change through phase stability analysis, thereby avoiding the complex iterative calculation steps in the CPA equation.
[0120] To further illustrate the present invention, the present application also provides a specific application example of a method for determining the water dew point of natural gas, see Figure 5 as well as Figure 6 , specifically including the following contents.
[0121] S1: Establish the state equation of natural gas.
[0122] The state equations in step S1 include CPA equation, PR equation and SRK equation, and the CPA equation is preferred. The CPA equation contains physical terms and association terms, and its basic form is as follows:
[0123]
[0124] Where: p is the system pressure, kPa; a m is the energy parameter, kPa·(m 3 / kmol) 2 ; b m is the volume parameter of the equation, m 3 / kmol; V is the molar volume, m 3 / kmol; g is the radial distribution function (RDF), using the simplified form proposed by Kontogeorgis et al. (Formula 7); x i is the mole fraction of component i; X Ai is the molar fraction of molecule i that does not participate in the association at the association site A, which needs to be solved iteratively.
[0125]
[0126] Where: η is the residual density of the fluid, which can be calculated by formula (8):
[0127]
[0128] For polar components, the 4C association rule is used for H2O molecules; the 2B association rule is used for alcohol molecules; and the CO2 molecule has only one electron donor site. Given the molecular association rule, the difference between the true pressure and the calculated pressure is used as the objective function to solve the residual density (volume).
[0129] In addition, given the molecular association rule, the difference between the actual pressure and the calculated pressure is used as the objective function to solve the residual density (volume). After solving the phase volume, the fugacity coefficient obtained by the CPA equation can be obtained. Specifically, after solving the phase volume, the fugacity coefficient expression of the CPA equation can be obtained:
[0130]
[0131] Where: φ i is the fugacity coefficient of the CPA equation of component i, kPa; φ i SRK is the fugacity coefficient of the SRK equation for component i, kPa.
[0132] S2: Analyze the phase stability of the natural gas system.
[0133] Specifically, when the Gibbs free energy of the system reaches the minimum, the system is in a stable state. Based on this principle, the TPD function is used to determine whether a new phase is formed in the system. In the residual Gibbs free energy expression of the TPD function, the residual Gibbs free energy of the test phase and the test phase is divided. Under the given test phase composition and p, T conditions, the minimum energy that the system can reach is determined by finding the minimum value of G(Y) with the given initial value of the test phase, and then the stability of the test phase is determined. The dew point temperature expression is defined based on the stability of the two phases, and the dew point temperature is solved.
[0134] S3: Coupled solution model.
[0135] The TPD function mentioned above includes: calculating the residual Gibbs free energy of the test phase and the test phase respectively. First, under the given test phase composition and p, T conditions, the minimum free energy of the system is found through the given test phase. When the free energy is minimum, the partial derivative of the TPD function is 0, and the stationary point equation is obtained. At this time, the stability of the test phase system can be judged and the dew point temperature expression can be obtained.
[0136] See also Figure 7 The calculation process adopts the successive iteration method (SSI), which includes an inner loop and an outer loop. The inner loop searches for the stationary point of the TPD function under given pressure and temperature conditions, and the outer loop searches for the dew point temperature under the corresponding pressure p. The specific calculation process is:
[0137] Step (1): Input system pressure p, test phase (feed) composition z i and initial temperature value T0;
[0138] Step (2): Calculate the test phase fugacity coefficient φ from the CPA state equation i (z i );
[0139] Step (3): Calculate the composition Y of the test phase using formula (2): i If the water content in natural gas is greater than the alcohol content, the formula on the left side of formula (2) is used for calculation; otherwise, the formula on the right side of formula (2) is used for calculation;
[0140] Step (4): Based on the experimental phase composition Y i , use formula (9) to calculate the fugacity coefficient φ of this phase i (Y i );
[0141] Step (5): Update the composition Y of the test phase using formula (3) i , and judge whether the calculation errors of the previous and next steps satisfy |Y i k +1 -Y i k |<∈1(1×10 -10 ). If the error ∈ 1 is not satisfied, then Y i k+1 Assign to Y i , return to step (4); if the error ∈ 1 is satisfied, proceed to step (6);
[0142] Step (6): Calculate formula (1) to determine whether the error f(T)<∈2(1×10 -10 ). If it does not satisfy ∈2, then use the secant method to update T and return to step (2); if it satisfies the error ∈2, then exit the loop.
[0143] According to the above calculation process, the water dew point temperature T under the corresponding pressure p can be obtained.
[0144] The method provided in the present application can be applied to the prediction of water dew point of natural gas containing water components and alcohol components. In order to verify the prediction effect of the prediction method of the present invention compared with other existing prediction methods, the accuracy of the model is evaluated based on the experimental data of water dew point temperature of natural gas containing water / alcohol components.
[0145] The relative error between the model prediction and the experimental value (D R ) and the average relative error (D AR ) are defined as follows:
[0146]
[0147] Where N is the number of experimental data points; T cal,i is the water dew point temperature model prediction value; Texp,i A measurement of the water dew point temperature.
[0148] In order to verify the accuracy of the prediction results of the water dew point of natural gas containing water components, the experimental data of the water dew point of natural gas measured in Group 2 of GB 22634-2008 are selected. The components of natural gas samples A and B are shown in Table 1, and the water mass concentration is 60 mg / m 3 , the model prediction results are compared with the experimental data. Figure 8 as well as Fig. 9 shown.
[0149] Table 1 Mole fraction of gas sample A and B components %
[0150]
[0151] Figure 8 as well as Fig. 9 In the system pressure range of 2.0-8.0MPa, the model prediction results are in good agreement with the experimental data. For the water component of gas sample A, the CPA equation only considers the self-association between H2O molecules. The average relative temperature deviation between the model prediction and the experimental data is 0.061%. The water component of gas sample B contains CO2 molecules. The CPA equation also considers the cross-association between CO2 and H2O molecules. Due to the complexity of the system, the average relative temperature deviation of the model in this paper is 0.16%, which is larger than that of the water component of gas sample A, especially at 5.0MPa, the average relative deviation is 0.22%.
[0152] In order to further verify the prediction accuracy of the model in this paper for the water dew point temperature of natural gas containing alcohol components, the water dew point phase equilibrium data measured by Avila et al. using synthetic natural gas was used as a reference to compare six groups of experimental systems. The composition of the three natural gas samples is shown in Table 2.
[0153] Table 2 Mole fraction of three natural gas samples (%)
[0154] Components Gas Sample C Gas Sample D Gas Sample E <![CDATA[N2]]> 0.618 0.313 2.8 <![CDATA[CO2]]> 0.187 0.202 0.2 <![CDATA[C1]]> 98.943 90.4183 96.62 <![CDATA[C2]]> 0.082 8.038 0.18 <![CDATA[C3]]> 0.065 0.801 0.1029 <![CDATA[i-C4]]> 0.05 0.081 0.0499 <![CDATA[n-C4]]> 0.123 0.0095 <![CDATA[i-C5]]> 0.017 0.01 0.0166 <![CDATA[n-C5]]> 0.0079 <![CDATA[n-C6]]> 0.032 0.0047 0.016 <![CDATA[n-C7]]> 0.0027 0.0011 0.0054 <![CDATA[n-C8]]> 0.0033 0.0038
[0155] For gas sample C system, the model prediction results are compared with the dew point curve experimental data. Fig.10 shown. Fig.10 The average mass concentration of water in mixture 1 is 79.0×10 -6 kg / m 3 The average concentration of methanol was 1098.9×10 -6 kg / m 3 The mixture is composed of: mixture 2 has an average water concentration of 40.5×10 -6 kg / m 3 The average concentration of methanol was 3030.5×10 -6 kg / m3 The mixture composed. Fig.10 It shows that the average relative deviation between the model and the experimental data is 0.15% for the system composed of gas sample C and mixture 1; the average relative deviation between the model and the experimental data is 0.42% for the system composed of mixture 1. For this mixed system, the cross-association between methanol and polar molecules such as H2O and CO2 needs to be further considered. As the methanol content increases, the prediction accuracy decreases. From the analysis of physical phenomena, as the methanol content increases, the system is more likely to precipitate liquid under a certain pressure, which is consistent with the actual situation.
[0156] In the mixture system containing water and methanol in gas samples D and E, the model prediction results are compared with the experimental data of dew point curve. Fig.11 and Fig.12 shown. Fig.11 In the mixture, the average mass concentration of water is 82.8×10 -6 kg / m 3 The average concentration of methanol was 991.7×10 -6 kg / m 3 The mixture 2 consists of water with an average mass concentration of 69.8×10 -6 kg / m 3 The average concentration of methanol was 2493.6×10 -6 kg / m 3 The average relative deviations between the calculated and experimental values of the two system models are 0.20% and 0.54%, respectively.
[0157] like Fig.12 As shown, the average mass concentration of water in mixture 1 is 128.3×10 -6 kg / m 3 The average concentration of methanol is 891.3×10 -6 kg / m 3 ; The average mass concentration of water in mixture 2 is 146.7×10 -6 kg / m 3 The average concentration of methanol is 3459.9×10 -6 kg / m 3 The average relative deviations between the model calculation and the experimental values for the system composed of the two mixtures and gas sample E are 0.12% and 0.60%, respectively.
[0158] From the comparison of the above six experimental systems, it can be seen that within the pressure range of 0.14-7.26MPa, the average relative deviation between the prediction and experimental values based on the stability analysis method combined with the CPA equation model is 0.12%-0.60%. Since the CPA equation takes into account the self-association and cross-association of polar molecules, the description of the gas-liquid phase is more reasonable. Combined with the dew point calculation framework of the stability analysis, the model prediction results have a small deviation from the experiment.
[0159] The average relative errors of the model and Avila model in this paper and experimental values under different methanol-containing mixture systems are summarized. Unlike the CPA equation, Avila et al. use a state equation derived based on excess functions, whose parameters are related to the functional groups of pure components, and the equation form is more complicated. As can be seen from Table 3, the prediction results using the method provided in this application are generally better than those of the Avila model.
[0160] Table 3 Comparison of relative errors of dew point temperature of different mixture systems
[0161]
[0162] Based on the same inventive concept, the embodiments of the present application also provide a device for determining the water dew point of natural gas, which can be used to implement the method described in the above embodiments, such as the following embodiments. Since the principle of solving the problem by the device for determining the water dew point of natural gas is similar to that of the method for determining the water dew point of natural gas, the implementation of the device for determining the water dew point of natural gas can refer to the implementation of the method for determining the water dew point of natural gas, and the repeated parts will not be repeated. As used below, the term "unit" or "module" can be a combination of software and / or hardware that implements a predetermined function. Although the system described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0163] The embodiment of the present application provides a specific implementation of a natural gas water dew point determination device capable of implementing a natural gas water dew point determination method, see Fig.13 , a device for determining the water dew point of natural gas specifically includes the following contents:
[0164] The residual free energy determination module 10 is used to determine the residual Gibbs free energy of the system based on the state equation of the natural gas system generated in advance and according to the set test phase and the test phase; wherein the state equation includes the physical terms of the system and the pre-set association terms;
[0165] The residual free energy minimum value obtaining module 20 is used to obtain the minimum value of the residual Gibbs free energy of the system;
[0166] The natural gas water dew point determination module 30 is used to determine the stability boundary of the system according to the minimum value of the residual Gibbs free energy of the system, so as to determine the natural gas water dew point.
[0167] In some embodiments of the present invention, see Fig.14 , the residual free energy determination module 10 comprises:
[0168] A test phase free energy determination unit 10a, for determining the residual Gibbs free energy of the test phase according to the mole fraction of each component of the test phase based on the state equation;
[0169] A test phase free energy determination unit 10b, used to determine the residual Gibbs free energy of the test phase according to the mole fraction of each component of the test phase based on the state equation;
[0170] The residual free energy determination unit 10c is used to determine the residual Gibbs free energy of the system according to the residual Gibbs free energy of the test phase and the residual Gibbs free energy of the test phase.
[0171] In some embodiments of the present invention, see Fig.15 , the residual free energy minimum value obtaining module 20 comprises:
[0172] A TPD function generating unit 20a, for generating a tangent plane distance function of the residual Gibbs free energy of the system according to the residual Gibbs free energy of the test phase, the residual Gibbs free energy of the test phase and the fugacity coefficient of the state equation;
[0173] The TPD function minimum value obtaining unit 20b is used to obtain the minimum value of the tangent plane distance function to obtain the minimum value of the residual Gibbs free energy.
[0174] In some embodiments of the present invention, see Fig.16 , the TPD function minimum value obtaining unit 20b includes:
[0175] A test phase parameter setting unit 20b1, used to set the phase composition, temperature and pressure of the test phase;
[0176] The test phase initial value setting unit 20b2 is used to obtain the minimum value of the tangent plane distance function by setting the initial value of the test phase multiple times based on the phase composition, temperature and pressure of the test phase.
[0177] In some embodiments of the present invention, the association terms include: system pressure, energy parameters, equation volume parameters, molar volume, radial distribution function and the molar fraction of the component at the association site A that does not participate in the association.
[0178] From the above description, it can be seen that an embodiment of the present application provides a device for determining the water dew point of natural gas, including: a residual free energy determination module, which is used to determine the residual Gibbs free energy of the system based on a pre-generated state equation of the natural gas system according to a set experimental phase and a test phase; wherein the state equation includes physical terms of the system and pre-set associated terms; a residual free energy minimum value obtaining module, which is used to obtain the minimum value of the residual Gibbs free energy of the system; a natural gas water dew point determination module, which is used to determine the stability boundary of the system according to the minimum value of the residual Gibbs free energy of the system, so as to determine the water dew point of the natural gas.
[0179] The device for determining the water dew point of natural gas provided in the present application combines the natural gas state equation with phase stability analysis, better considers the hydrogen bonding between polar molecules in natural gas, and has better calculation accuracy and a larger calculation range.
[0180] The embodiment of the present application also provides a specific implementation of an electronic device capable of implementing all steps in the method for determining the water dew point of natural gas in the above embodiment, see Fig.17 , electronic equipment specifically includes the following:
[0181] Processor (processor) 1201, memory (memory) 1202, communication interface (CommunicationsInterface) 1203 and bus 1204;
[0182] The processor 1201 , the memory 1202 , and the communication interface 1203 communicate with each other via the bus 1204 ; the communication interface 1203 is used to realize information transmission between relevant devices such as the server-side device, the power measurement device, and the user-side device.
[0183] The processor 1201 is used to call the computer program in the memory 1202. When the processor executes the computer program, all the steps in the method for determining the water dew point of natural gas in the above embodiment are implemented. For example, when the processor executes the computer program, the following steps are implemented:
[0184] Step 100: Based on a pre-generated state equation of the natural gas system, determine the residual Gibbs free energy of the system according to a set experimental phase and a test phase; wherein the state equation includes physical terms of the system and pre-set association terms;
[0185] Step 200: Calculating the minimum value of the residual Gibbs free energy of the system;
[0186] Step 300: Determine the stability boundary of the system according to the minimum value of the residual Gibbs free energy of the system to determine the water dew point of the natural gas.
[0187] The embodiments of the present application also provide a computer-readable storage medium capable of implementing all the steps of the method for determining the water dew point of natural gas in the above embodiments. The computer-readable storage medium stores a computer program. When the computer program is executed by a processor, all the steps of the method for determining the water dew point of natural gas in the above embodiments are implemented. For example, when the processor executes the computer program, the following steps are implemented:
[0188] Step 100: Based on a pre-generated state equation of the natural gas system, determine the residual Gibbs free energy of the system according to a set experimental phase and a test phase; wherein the state equation includes physical terms of the system and pre-set association terms;
[0189] Step 200: Calculating the minimum value of the residual Gibbs free energy of the system;
[0190] Step 300: Determine the stability boundary of the system according to the minimum value of the residual Gibbs free energy of the system to determine the water dew point of the natural gas.
[0191] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the hardware + program embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0192] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0193] Although the present application provides method operation steps such as embodiments or flow charts, more or fewer operation steps may be included based on conventional or non-creative labor. The order of steps listed in the embodiments is only one way of executing the order of many steps and does not represent the only execution order. When the actual device or client product is executed, it can be executed in the order of the method shown in the embodiments or the drawings or in parallel (for example, in a parallel processor or multi-threaded processing environment).
[0194] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0195] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0196] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0197] Specific embodiments are used in this application to illustrate the principles and implementation methods of this application. The description of the above embodiments is only used to help understand the method and core idea of this application. At the same time, for those skilled in the art, according to the idea of this application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on this application.
Claims
1. A method for determining the water dew point of natural gas, characterized in that: include: Based on a pre-generated state equation of the natural gas system, the residual Gibbs free energy of the system is determined according to the set experimental phase and the test phase; wherein the state equation includes the physical terms of the system and the pre-set association terms; Finding the minimum value of the residual Gibbs free energy of the system; The stability boundary of the system is determined according to the minimum value of the residual Gibbs free energy of the system to determine the water dew point of the natural gas.
2. The determination method according to claim 1, characterized in that: The state equation of the system in which the natural gas is located is generated in advance, and the residual Gibbs free energy of the system is determined according to the set test phase and the test phase, including: Based on the equation of state, determining the residual Gibbs free energy of the test phase according to the mole fraction of each component of the test phase; Determining the residual Gibbs free energy of the test phase according to the mole fraction of each component of the test phase based on the equation of state; The residual Gibbs free energy of the system is determined from the residual Gibbs free energy of the test phase and the residual Gibbs free energy of the test phase.
3. The determination method according to claim 2, characterized in that: Finding the minimum value of the residual Gibbs free energy of the system includes: generating a tangent plane distance function of the residual Gibbs free energy of the system based on the residual Gibbs free energy of the test phase, the residual Gibbs free energy of the test phase, and the fugacity coefficient of the equation of state; The minimum value of the tangent plane distance function is obtained to obtain the minimum value of the residual Gibbs free energy.
4. The determination method according to claim 3, characterized in that: Obtaining the minimum value of the tangent plane distance function includes: Setting the phase composition, temperature and pressure of the test phase; Based on the setting of the phase composition, temperature and pressure of the test phase, the initial value of the test phase is set multiple times to obtain the minimum value of the tangent plane distance function.
5. The determination method according to any one of claims 1 to 4, characterized in that: The association terms include: system pressure, energy parameters, equation volume parameters, molar volume, radial distribution function and the molar fraction of the component at the association position A that does not participate in the association.
6. A device for determining the water dew point of natural gas, characterized in that: include: A residual free energy determination module, for determining the residual Gibbs free energy of the system based on a pre-generated state equation of the natural gas system according to a set experimental phase and a test phase; wherein the state equation is generated by including physical terms of the system and pre-set association terms; A residual free energy minimum value obtaining module is used to obtain the minimum value of the residual Gibbs free energy of the system; The natural gas water dew point determination module is used to determine the stability boundary of the system according to the minimum value of the residual Gibbs free energy of the system, so as to determine the natural gas water dew point.
7. The determination device according to claim 6, characterized in that: The residual free energy determination module comprises: a test phase free energy determination unit, for determining the residual Gibbs free energy of the test phase according to the mole fraction of each component of the test phase based on the equation of state; a test phase free energy determination unit, for determining the residual Gibbs free energy of the test phase according to the mole fraction of each component of the test phase based on the equation of state; The residual free energy determination unit is used to determine the residual Gibbs free energy of the system according to the residual Gibbs free energy of the test phase and the residual Gibbs free energy of the test phase.
8. The determination device according to claim 7, characterized in that: The residual free energy minimum value obtaining module comprises: A TPD function generating unit, for generating a tangent plane distance function of the residual Gibbs free energy of the system according to the residual Gibbs free energy of the test phase, the residual Gibbs free energy of the test phase and the fugacity coefficient of the state equation; The TPD function minimum value obtaining unit is used to obtain the minimum value of the tangent plane distance function to obtain the minimum value of the residual Gibbs free energy.
9. The determination device according to claim 8, characterized in that: The TPD function minimum value obtaining unit comprises: A test phase parameter setting unit, used to set the phase composition, temperature and pressure of the test phase; The test phase initial value setting unit is used to obtain the minimum value of the tangent plane distance function by setting the initial value of the test phase multiple times based on the phase composition, temperature and pressure of the test phase.
10. The determination device according to any one of claims 6 to 9, characterized in that: The association terms include: system pressure, energy parameters, equation volume parameters, molar volume, radial distribution function and the molar fraction of the component at the association position A that does not participate in the association.
11. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the method for determining the water dew point of natural gas according to any one of claims 1 to 5 are implemented.
12. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of the method for determining the water dew point of natural gas according to any one of claims 1 to 5 are implemented.
13. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for determining the water dew point of natural gas according to any one of claims 1 to 5 are implemented.