A method and system for calculating oil-gas-water three-phase equilibrium at nanoscale

By constructing a three-phase equilibrium calculation method for oil-gas-water at the nanoscale, and coupling fluid-wall forces and capillary forces, the problem of three-phase coexistence behavior in nanopores was solved, enabling efficient development of shale oil reservoirs.

CN122087225APending Publication Date: 2026-05-26SOUTHWEST PETROLEUM UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610172523.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-02-06
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

Existing technologies cannot accurately describe the phase behavior of oil, gas and water coexisting in nanopores, and existing models fail to fully couple the complex thermodynamic behavior under the combined action of multiple nano-effects.

Method used

A method for calculating the three-phase equilibrium of oil, gas, and water at the nanoscale is constructed. By integrating fluid-wall forces, adsorption effects, and capillary forces, a three-phase pressure equilibrium model is established, and phase separation is determined and phase fraction is calculated through iterative solution.

Benefits of technology

It has achieved accurate prediction of the phase behavior of oil, gas and water, providing technical support for shale oil reservoir development and accurately describing the evolution law of phase behavior under the nanoconfinement effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122087225A_ABST
    Figure CN122087225A_ABST
Patent Text Reader

Abstract

This invention discloses a method for calculating the three-phase phase equilibrium of oil, gas, and water at the nanoscale, relating to the field of shale oil reservoir development technology. The method includes the following steps: receiving input parameters; constructing a total pressure model of the confined fluid at the nanoscale based on the input parameters; constructing a three-phase pressure equilibrium model among the oil, gas, and water phases at the nanoscale based on the total pressure model; constructing a phase stability test model, and determining whether phase separation occurs in the system under given temperature and pressure conditions based on the tangent plane distance function; when the phase stability test model determines that phase separation has occurred, calculating the phase fraction and composition of the oil-gas-water three phases by iteratively solving for the conditions satisfying the three-phase pressure equilibrium model and the equality of the fugacity of each phase component, and outputting the results. This invention can accurately and stably predict the fluid phase state in the nanopores of shale oil reservoirs, providing key technical support for its component simulation and efficient development.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of shale oil reservoir development technology, and in particular to a method and system for calculating the three-phase phase equilibrium of oil-gas-water at the nanoscale. Background Technology

[0002] With the increasing depletion of conventional oil and gas resources, the development of unconventional oil reservoirs, especially shale oil resources, has become an important direction of global energy strategy. These reservoirs are dominated by nanoscale pores, whose confinement effect significantly alters the occurrence state and thermodynamic behavior of fluids. Within nanopores, fluids are not only affected by stronger intermolecular forces and fluid-wall interactions, but also by capillary pressure control, leading to shifts in critical properties and strong nonlinear phase behavior. Furthermore, shale reservoirs generally contain large amounts of bound water, which further increases the complexity of component miscibility and interphase mass transfer processes, making the phase behavior under three-phase coexistence conditions of oil, gas, and water even more difficult to accurately describe.

[0003] Currently, research on phase equilibrium models for nanopores still has significant limitations. Most existing models are based on the assumption of a two-phase oil-gas system, generally neglecting the formation water that is widely present in reservoirs, and failing to truly reflect the occurrence environment of three-phase coexistence of oil, gas, and water. At the same time, these models often only consider a single mechanism, such as only introducing capillary pressure effects or only focusing on fluid adsorption behavior, failing to fully couple the complex thermodynamic behavior under the combined action of multiple nano-effects. Summary of the Invention

[0004] The purpose of this invention is to provide a method and system for calculating the three-phase equilibrium of oil, gas and water at the nanoscale, which can accurately predict the behavior of oil, gas and water phases and provide technical support for the efficient development of shale oil reservoirs.

[0005] To achieve the above objectives, the present invention provides the following technical solution: On the one hand, this invention provides a method for calculating the three-phase equilibrium of oil-gas-water at the nanoscale, comprising the following steps: It receives input parameters including system temperature, system pressure, system composition, and pore radius. Based on the input parameters, a total pressure model for confined fluids at the nanoscale is constructed. Based on the total pressure model, a three-phase pressure balance model between the oil, gas and water phases at the nanoscale is constructed. A phase stability test model is constructed to determine whether phase separation occurs in the system under given temperature and pressure conditions based on the tangent plane distance function. When the phase stability test model determines that phase separation has occurred in the system, the phase fraction and composition of the oil-gas-water three phases are calculated by iteratively solving the conditions that satisfy the three-phase pressure balance model and the equal fugacity of each phase component, and the results are output.

[0006] On the other hand, the present invention provides a three-phase equilibrium calculation system for oil-gas-water at the nanoscale, which uses the above method and includes the following modules: Data input module: used to receive input parameters including system temperature, system pressure, system composition, and pore radius; Phase equilibrium calculation module: Communicatively connected to the data input module, used to perform phase equilibrium calculations based on the input parameters; including a total pressure model of the confined fluid at the nanoscale, used to calculate the total pressure of the confined fluid; Three-phase pressure balance module: Based on the total pressure model, establish the three-phase pressure balance relationship between the oil phase, gas phase and water phase at the nanoscale; Phase stability testing module: Under given temperature and pressure conditions, it determines whether phase separation occurs in the system based on the tangential plane distance function; Iterative solution unit: It is communicatively connected to the three-phase pressure balance module and the phase balance calculation module respectively. When the phase stability test model determines that the system has phase separation, it iteratively solves the conditions that satisfy the three-phase pressure balance model and the equal fugacity of each phase component to calculate the phase fraction and composition of the oil-gas-water three-phase system. Result output module: Communicatively connected to the phase balance calculation module, used to output the calculation results of the phase balance calculation module.

[0007] Compared with the prior art, the present invention has the following beneficial effects: This invention integrates fluid-wall forces, adsorption effects, and capillary forces to construct a three-phase phase equilibrium calculation model for oil-gas-water at the nanoscale. The invention has been verified to have good reliability and has been used to systematically reveal the evolution of phase behavior under nanoscale confinement effects. This invention can accurately and stably predict the fluid phase state in the nanopores of shale oil reservoirs, providing key technical support for its component simulation and efficient development. Attached Figure Description

[0008] Figure 1 This is a schematic diagram of the overall process of Embodiment 1 of the present invention; Figure 2 This is a schematic diagram of the critical pressure fitting under different pore radii in Embodiment 1 of the present invention; Figure 3 This is a schematic diagram of the critical temperature fitting under different pore radii in Embodiment 1 of the present invention; Figure 4This is a schematic diagram comparing the calculation results with experimental data in Embodiment 1 of the present invention; Figure 5 This is a schematic diagram of the three-phase PT phase under different pore radii in Embodiment 1 of the present invention; Figure 6 This is a schematic diagram of the overall structure of Embodiment 2 of the present invention; Figure 7 This is a schematic diagram of the electronic device structure in Embodiment 2 of the present invention. Detailed Implementation

[0009] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.

[0010] Example 1: Please see Figures 1-5 A method for calculating the three-phase equilibrium of oil-gas-water at the nanoscale includes the following steps: Step 1: Input basic parameters, including: Temperature range: 0℃~300℃; Pressure range: 0.1 MPa~35 MPa Mole fraction of each component: , , , , , , , , , The molar numbers of the components were 0.5000, 0.0122, 0.0037, 0.1756, 0.0417, 0.0205, 0.0897, 0.0832, and 0.0448, respectively. By referring to the table, we can obtain the following information for each component: critical temperature, critical pressure, eccentricity factor, molecular weight, and isotonic volume. Pore ​​radius range: 5nm, 10nm, 15nm, 20nm, 50nm, 100nm.

[0011] Step 2: Construct the offset relationship between critical temperature and critical pressure at the nanoscale; First, using the input data from step 1, the offset relationship between critical temperature and critical pressure at the nanoscale can be obtained through fitting: (1) (2) In the formula, , These are the critical temperatures at the nanoscale and in the bulk phase, respectively. , These represent the critical pressures at the nanoscale and in the bulk phase, respectively. Where is the pore radius; The Lennard-Jones radius parameter; The correlation coefficient between the critical temperature offset and the dimensionless aperture relationship; This is the correlation coefficient between the critical pressure offset and the dimensionless orifice diameter relationship.

[0012] The fitting results are as follows Figure 2 , Figure 3 As shown.

[0013] Then, the equation of state for confined fluids at the nanoscale is constructed; Under nanoconfined conditions, the total pressure of the system is considered to be composed of both bulk thermodynamic pressure and confinement-induced pressure. Based on the concept of free energy decomposition in statistical thermodynamics, the Helmholtz free energy of the system is expressed as the sum of bulk free energy and confinement free energy. The bulk free energy is given by the free energy expression corresponding to the Peng-Robinson equation of state; the confinement free energy is used to characterize the fluid-wall interaction, adsorption effects, and the additional free energy contribution caused by spatial confinement. According to the thermodynamic definition, the system pressure is determined by the partial derivative of the free energy with respect to volume, thus yielding the model expression for the total pressure under nanoconfined conditions: (3) in, (4) In the formula, The bulk pressure given by the Peng-Robinson equation of state; For confined induced pressure; This is the universal gas constant; The system temperature; The volume of the system; The system is composed of components; Where is the pore radius; The system density; The intensity of the confinement effect caused by fluid-wall interaction; This is due to the adsorption layer and the effective repulsive volume effect; The critical density of the bulk phase is used as a scaling parameter.

[0014] Finally, based on the critical temperature and critical pressure conditions at the nanoscale, the parameters are adjusted by applying thermodynamic constraints where the first and second derivatives of the pressure are zero. and Calibration is performed to ensure that the total pressure model satisfies the basic thermodynamic definitions under critical conditions: (5) The expressions for A and B obtained by solving are: (6) in, (7) In the formula, the subscript This is a critical condition; Let be the gravitational constant of the mixed system; Let be the repulsive constant of the mixed system.

[0015] For rich in Due to the highly non-ideal nature of oil-water systems, the classic van der Waals mixing rule cannot accurately describe their phase equilibrium. Therefore, the Huron-Vidal (HV) mixing rule is used to describe the three-phase equilibrium of oil, gas, and water. - The thermodynamic properties of water, and the mixing rules of the gas and liquid phases are based on the classical van der Waals rules.

[0016] Therefore, the gravitational constant of the mixed system is: (8) The repulsive constant of the mixed system is: (9) In the formula, In the liquid phase Similarly, the mole fraction of the components, In the middle of the gas phase mole fraction of the component In the aqueous phase Mole fraction of the component; It is the excess Gibbs free energy under infinite pressure.

[0017] Formula 8-Formula 9, (10) (11) (12) in, (13) In the formula, , They are respectively The critical temperature and critical pressure of the components are functions of the eccentricity factor (Peng and Robinson, 1978). (14) In the formula, It is the eccentricity factor; In formula 8, The calculations were performed using the modified NRTL model (Renon and Prausnitz, 1968): (15) in, (16) (17) (18) (19) In the formula, Components in the liquid phase mole fraction; Components in the liquid phase mole fraction; , A temperature-dependent, adjustable parameter; , Components , Between and components , Non-random parameters between ( ); Components and components Binary interaction parameters in the NRTL model; , All are intermolecular interactions; , These are the Boltzmann factors for interactions between different molecules and between the same molecules, respectively. The coefficient represents the binary interaction coefficient. Components The repulsive force parameters; Components The repulsive force parameters; Components The repulsive force parameters; Components gravitational parameters; Components and components Temperature-dependent binary interaction parameters in the NRTL model.

[0018] The corresponding activity coefficient model is established as follows (Renon and Prausnitz, 1968): (20) In the formula, for The activity coefficient of the component; , A temperature-dependent, adjustable parameter; Components and components Temperature-related binary interaction parameters in the NRTL model; Components and components Binary interaction parameters in the NRTL model; Components in the liquid phase mole fraction; Components and components Binary interaction parameters in the NRTL model; Components and components Temperature-dependent binary interaction parameters in the NRTL model.

[0019] Step 3: Construct a three-phase pressure balance model of oil, gas and water phases at the nanoscale; Based on the Young-Laplace equation, the three-phase pressure balance model for the gas, liquid, and aqueous phases is established as follows: (twenty one) In the formula, This refers to the interphase capillary pressure between the gas and aqueous phases; This refers to the interphase capillary pressure between the gas and oil phases; , , These are the pressures of the gas phase, water phase, and oil phase, respectively. , These are the interfacial tensions between the gas phase and the oil phase, and between the gas phase and the water phase, respectively. , Both are contact angles. Assuming the capillary radius remains constant and the liquid phase is completely wetted, then we have: .

[0020] in, (twenty two) (twenty three) (twenty four) In the formula, Components Equal volume; , , In the oil phase, gas phase and water phase respectively Number of moles of components; , , These are the densities of the oil phase, gas phase, and water phase, respectively. Molecular weight; This represents the total group score.

[0021] Step 4: Construct a phase stability test model. Under given temperature and pressure conditions, determine whether phase separation occurs in the system based on the tangent plane distance function.

[0022] In stability testing, the sign of the tangent-plane distance function (TPD) value is used to determine whether the system is stable at the current temperature and pressure. like If the system is currently stable, then the system is stable; if If the system is currently unstable, then the tangent plane distance function is: (25) in, (26) In the formula, represents the total group score. ; For the first in the liquid phase Number of moles of components; The overall fluid composition of the system; This is the fugacity coefficient.

[0023] Step 5: When the phase stability test model determines that phase separation has occurred in the system, the phase fraction and composition of the oil-gas-water three phases are calculated by iteratively solving the conditions that satisfy the three-phase pressure balance model and the equal fugacity of each phase component, and the results are output.

[0024] When the TPD function determines that the system is currently unstable, the following steps are performed: S501. Initial value estimation: Initial prediction of the equilibrium ratio of the gas phase and the aqueous phase, and the number of moles of water in each phase. (27) (28) (29) (30) In the formula, for The equilibrium ratio of components in the gas phase relative to their equilibrium ratio in the oil phase; for The equilibrium ratio of components in the aqueous phase compared to the oil phase; for The equilibrium ratio of components in the gas phase relative to their equilibrium ratio in the oil phase; for The equilibrium ratio of components in the aqueous phase compared to the oil phase; for The equilibrium ratio of components in the aqueous phase compared to the oil phase; , and for Mole fraction of the component in the oil phase, gas phase, and aqueous phase; for The critical temperature; for Critical pressure; for saturated vapor pressure; for Critical pressure of the component; for The eccentricity factor of the component.

[0025] S502. The phase fractions of the gas and water phases are solved using the simplified Rachford-Rice equation. Because nitrogen and alkanes have much lower solubility in water than... Furthermore, to simplify the model and improve computational stability, this embodiment only considers the aqueous phase. It participates in phase equilibrium calculations as a soluble gaseous component (i.e., only in the aqueous phase). and The oil phase and gas phase contain , , (and alkanes, etc.). Therefore, the simplified Rachford-Rice equation is: (30) In the aqueous phase, only water and carbon dioxide are considered as soluble components; the oil and gas phases contain... , , and alkanes; In the formula, The objective function is... Components Total mole fraction; The phase fraction of the gas phase; for The equilibrium ratio of components in the gas phase relative to their equilibrium ratio in the oil phase; The phase fraction of the aqueous phase; for Total mole fraction; for The total mole fraction.

[0026] S503. Fugacity solution: Solve for the fugacity of each phase based on the modified state equation (Formula 3); First, the phase fractions are calculated based on the Rachford-Rice equation, yielding the mole fractions of each component in the oil, gas, and aqueous phases: (31) To meet the mole fraction normalization condition, the mole fractions of components in each phase need to be normalized: (32) Then, the normalized oil, gas, and water phase compositions are substituted into the mixing parameters (a and b) and activity coefficients of each phase in the aforementioned mixing rule formulas (8)-(20), and the fugacity coefficients of the components in each phase are further calculated. In this embodiment, taking the oil phase as an example, its fugacity coefficient expression is: (34) in, (35) (36) (37) In the formula, In the oil phase Fugacity of components; Components The repulsive force parameters; Components gravitational parameters; It is the eccentricity factor.

[0027] S504. Check the fugacity error of each phase. If the error exceeds the set threshold... Then update the balance ratio (Formula (38) and Formula (39)) and return to S502; when the error is less than If so, proceed to the next step; (38) (39) S505: Determine whether the gas phase pressure, liquid phase pressure, and water phase pressure are equal; if the gas phase pressure, liquid phase pressure, and water phase pressure are not equal, output the result; if the gas phase pressure, liquid phase pressure, and water phase pressure are equal, use the Young-Laplace equation to solve the capillary pressure and return to step S502. S506: Output results.

[0028] Step 6: Verification and analysis of the influence of fluid phase state at the nanoscale.

[0029] Model validation: Comparing experimental data on saturation pressure at the nanoscale with the calculation results of this invention, such as... Figure 4 As shown, the error between the calculation results of this invention and the experimental data is less than 5%.

[0030] PT phase diagram drawing and analysis: such as Figure 5 As shown, a nanoscale three-phase phase equilibrium calculation model for oil, gas, and water is applied. Starting from relatively small temperatures and pressures (e.g., 0.1 MPa and 273.15 K), the temperature variation interval is set to 0.1 K and the pressure variation interval to 0.01 MPa. When the mole fraction of a certain phase is 0, the corresponding P and T values ​​are points on the envelope. A PT phase diagram is then plotted based on these points. The figure shows that as the pore size decreases, the nanoscale confinement effect gradually strengthens, significantly increasing its influence on the oil-gas-water three-phase envelope. Furthermore, the nanoscale confinement effect is particularly pronounced in the low-pressure region. When the system transitions from bulk to 5 nm pore size, the maximum offset of the pressure point on the envelope in the low-pressure region decreases from 2.93 MPa to 0.45 MPa, representing an 82.99% suppression of the three-phase envelope. This model can accurately predict the phase behavior of oil, gas, and water in shale reservoirs at the nanoscale, providing technical support for the efficient development of shale reservoirs.

[0031] Example 2 A three-phase equilibrium calculation system for oil-gas-water at the nanoscale, using the above method, includes the following modules: Data input module: used to receive input parameters including system temperature, system pressure, system composition, and pore radius; Phase equilibrium calculation module: Communicatively connected to the data input module, used to perform phase equilibrium calculations based on the input parameters; including a total pressure model of the confined fluid at the nanoscale, used to calculate the total pressure of the confined fluid; Three-phase pressure balance module: Based on the total pressure model, establish the three-phase pressure balance relationship between the oil phase, gas phase and water phase at the nanoscale; Phase stability testing module: Under given temperature and pressure conditions, it determines whether phase separation occurs in the system based on the tangential plane distance function; Iterative solution unit: It is communicatively connected to the three-phase pressure balance module and the phase balance calculation module respectively. When the phase stability test model determines that the system has phase separation, it iteratively solves the conditions that satisfy the three-phase pressure balance model and the equal fugacity of each phase component to calculate the phase fraction and composition of the oil-gas-water three-phase system. Result output module: Communicatively connected to the phase balance calculation module, used to output the calculation results of the phase balance calculation module.

[0032] The nanoscale oil-gas-water three-phase equilibrium calculation system of the present invention can be installed in a computer device.

[0033] The module described in this invention refers to a series of computer program segments that can be executed by the processor of a computer device and can perform a fixed function, and which are stored in the memory of the computer device.

[0034] The system provided in this embodiment of the invention has the same implementation principle and technical effects as the aforementioned method embodiment, and the corresponding content in the aforementioned method embodiment can be referred to.

[0035] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

[0036] Figure 7 A block diagram is shown that is suitable for implementing embodiments of the present application. Figure 7 The electronic device shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.

[0037] like Figure 7 As shown, the electronic device is represented in the form of a general-purpose computing device. The components of the electronic device may include, but are not limited to: one or more processors 410, memory 430, and communication bus 440 connecting different system components (including memory 430 and processing unit 410).

[0038] Communication bus 440 represents one or more of several bus architectures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of the various bus architectures. For example, these architectures include, but are not limited to, Industry Standard Architecture (ISA) buses, Micro Channel Architecture (MAC) buses, Enhanced ISA buses, Video Electronics Standards Association (VESA) local buses, and Peripheral Component Interconnect (PCI) buses.

[0039] Electronic devices typically include a variety of computer-readable media. These media can be any available media that can be accessed by the electronic device, including volatile and non-volatile media, and removable and non-removable media.

[0040] Memory 430 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) and / or cache memory. The electronic device may further include other removable / non-removable, volatile / non-volatile computer system storage media. Memory 430 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the embodiments of this application.

[0041] A program / utility having a set (at least one) of program modules can be stored in memory 430. Such program modules include—but are not limited to—an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. The program modules typically perform the functions and / or methods described in the embodiments of this application.

[0042] Processor 410 executes various functional applications and data processing by running programs stored in memory 430, such as implementing embodiments of this application. Figure 1 The embodiment shown provides a method for calculating the three-phase equilibrium of oil-gas-water at the nanoscale.

[0043] This application provides a non-transitory computer-readable storage medium that stores computer instructions, which cause the computer to execute embodiments of this application. Figure 1 The embodiment shown provides a method for calculating the three-phase equilibrium of oil-gas-water at the nanoscale.

[0044] The aforementioned computer-readable storage medium may be any combination of one or more computer-readable media. A computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium may be, for example—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), or flash memory, optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in connection with an instruction execution system, apparatus, or device.

[0045] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including—but not limited to—electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, capable of transmitting, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device.

[0046] The program code contained on a computer-readable medium may be transmitted using any suitable medium, including—but not limited to—wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.

[0047] Computer program code for performing the operations of the embodiments of this application can be written in one or more programming languages ​​or a combination thereof. These programming languages ​​include object-oriented programming languages—such as Java, Smalltalk, and C++—and conventional procedural programming languages—such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN), or it can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0048] The foregoing has described specific embodiments of this application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps described in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0049] The above examples illustrate the present invention only to aid in understanding it and are not intended to limit the scope of the invention. Those skilled in the art can make various simple deductions, modifications, or substitutions based on the principles of this invention.

Claims

1. A method for calculating the three-phase equilibrium of oil-gas-water at the nanoscale, characterized in that, Includes the following steps: Receive input parameters; Based on the input parameters, a total pressure model for confined fluids at the nanoscale is constructed. Based on the total pressure model, a three-phase pressure balance model between the oil, gas and water phases at the nanoscale is constructed. A phase stability test model is constructed to determine whether phase separation occurs in the system under given temperature and pressure conditions based on the tangent plane distance function. When the phase stability test model determines that phase separation has occurred in the system, the phase fraction and composition of the oil-gas-water three phases are calculated by iteratively solving the conditions that satisfy the three-phase pressure balance model and the equal fugacity of each phase component, and the results are output.

2. The method for calculating the three-phase equilibrium of oil-gas-water at the nanoscale according to claim 1, characterized in that, The input parameters are obtained using experimental data on the critical point of confined fluid in the nanopores of the target shale oil reservoir, including system temperature, system pressure, system composition, and pore radius.

3. The method for calculating the three-phase equilibrium of oil-gas-water at the nanoscale according to claim 1, characterized in that, The method further includes obtaining the critical temperature shift relationship of the fluid at the nanoscale based on the output parameters: ; ; In the formula, , These are the critical temperatures at the nanoscale and in the bulk phase, respectively. , These represent the critical pressures at the nanoscale and in the bulk phase, respectively. Where is the pore radius; This refers to the Lennard-Jones radius parameter.

4. The method for calculating the three-phase equilibrium of oil-gas-water at the nanoscale according to claim 1, characterized in that, The total pressure model is constructed in the following manner: The Helmholtz free energy of the system is decomposed into the sum of the bulk free energy and the confinement free energy. The bulk free energy is given by the free energy expression corresponding to the Peng-Robinson equation of state. The confinement free energy is used to characterize the fluid-wall interaction, adsorption effect and additional free energy contribution caused by spatial confinement. The total pressure model is composed of the bulk thermodynamic pressure and the confinement-induced pressure.

5. The method for calculating the three-phase equilibrium of oil-gas-water at the nanoscale according to claim 4, characterized in that, By taking the partial derivative of the Helmholtz free energy with respect to volume, the calculation expression for the total pressure model is obtained as follows: ; in, ; In the formula, The bulk pressure given by the Peng-Robinson equation of state; For confined induced pressure; The system temperature; The volume of the system; The system is composed of components; Where is the pore radius; The system density; The intensity of the confinement effect caused by fluid-wall interaction; This is due to the adsorption layer and the effective repulsive volume effect; The critical density of the bulk phase is used as a scaling parameter.

6. The method for calculating the three-phase equilibrium of oil-gas-water at the nanoscale according to claim 1, characterized in that, The three-phase pressure balance model is as follows: ; In the formula, This refers to the interphase capillary pressure between the gas and aqueous phases; This refers to the interphase capillary pressure between the gas and oil phases; , , These represent the pressures of the gas phase, water phase, and oil phase, respectively.

7. The method for calculating the three-phase equilibrium of oil-gas-water at the nanoscale according to claim 6, characterized in that, The tangent plane distance function is: ; in, ; In the formula, represents the total group score. ; In the liquid phase Number of moles of components; The overall fluid composition of the system; This is the fugacity coefficient.

8. The method for calculating the three-phase equilibrium of oil-gas-water at the nanoscale according to claim 1, characterized in that, The iterative solution includes the following steps: S1. After the phase stability test model determines that the system is unstable, the gas phase equilibrium ratio, water phase equilibrium ratio and the mole fraction of water in each phase are initially estimated. S2. Based on the initial estimate in S1, the gas phase fraction and water phase fraction are solved using the Rachford-Rice equation; S3. Based on the gas phase fraction and water phase fraction obtained from S2, update the mole fraction of each component in the oil phase, gas phase and water phase. S4. Using the updated mole fractions of each component in the oil, gas, and water phases, calculate the pressure of each phase and the fugacity of each component in each phase. S5. Determine whether the fugacity of each component in each phase is equal to a preset precision; if not, update the gas phase equilibrium ratio and water phase equilibrium ratio, and return to S2. S6: If yes, determine whether the pressure balance relationship is valid; if no, update the capillary pressure and return to S2. S7: If so, complete the iteration.

9. The method for calculating the three-phase equilibrium of oil-gas-water at the nanoscale according to claim 8, characterized in that, The Rachford-Rice equation is: ; In the aqueous phase, only water and carbon dioxide are considered as soluble components; the oil and gas phases contain... , , and alkanes; In the formula, The objective function is... Components Total mole fraction; The phase fraction of the gas phase; for The equilibrium ratio of components in the gas phase relative to their equilibrium ratio in the oil phase; The phase fraction of the aqueous phase; for Total mole fraction; for The equilibrium ratio of components in the gas phase relative to their equilibrium ratio in the oil phase; for The equilibrium ratio of components in the aqueous phase compared to the oil phase; for Total mole fraction; for The equilibrium ratio of components in the gas phase relative to their equilibrium ratio in the oil phase; for The equilibrium ratio of the components in the aqueous phase to that in the oil phase.

10. A three-phase equilibrium calculation system for oil-gas-water at the nanoscale, using the method described in any one of claims 1-9, characterized in that, Includes the following modules: Data input module: used to receive input parameters; Phase equilibrium calculation module: Communicatively connected to the data input module, used to perform phase equilibrium calculations based on the input parameters; including a total pressure model of the confined fluid at the nanoscale, used to calculate the total pressure of the confined fluid; Three-phase pressure balance module: Based on the total pressure model, establish the three-phase pressure balance relationship between the oil phase, gas phase and water phase at the nanoscale; Phase stability testing module: Under given temperature and pressure conditions, it determines whether phase separation occurs in the system based on the tangential plane distance function; Iterative solution unit: It is communicatively connected to the three-phase pressure balance module and the phase balance calculation module respectively. When the phase stability test model determines that the system has phase separation, it iteratively solves the conditions that satisfy the three-phase pressure balance model and the equal fugacity of each phase component to calculate the phase fraction and composition of the oil-gas-water three-phase system. Result output module: Communicatively connected to the phase balance calculation module, used to output the calculation results of the phase balance calculation module.