Two-phase flow relative permeability curve boundary processing method and system based on lattice boltzmann method

By transforming boundary conditions using the lattice Boltzmann method and correcting volume forces to achieve constant injection velocity and periodic boundaries, the accuracy problem in two-phase fluid simulation is solved, and the accuracy and flexibility of porous media flow simulation are improved.

CN119578290BActive Publication Date: 2025-11-25XI'AN PETROLEUM UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411631223.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-15
Publication Date
2025-11-25
Estimated Expiration
2044-11-15

AI Technical Summary

Technical Problem

Existing technologies cannot accurately reflect the constant injection flow rate and periodic boundary conditions during the experiment when simulating the steady-state phase permeation curve of two-phase fluids in porous media, resulting in inaccurate simulation results.

Method used

Using the lattice-based Boltzmann method, the velocity-pressure boundary condition is converted into a volume force scheme by calculating the average density difference between the inlet and outlet fluids. The volume force is modified to ensure a constant inlet velocity, and the fluid interface is modified by combining color gradient to realize the simulation of steady-state phase permeation curves under periodic boundary conditions.

Benefits of technology

It improves the accuracy of relative permeability curve calculation and flow simulation precision, ensures constant inlet flow velocity, reproduces pressure and flow velocity changes during the experiment, and enhances the reliability and accuracy of simulation results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119578290B_ABST
    Figure CN119578290B_ABST
Patent Text Reader

Abstract

The application discloses a kind of two-phase flow phase permeability curve boundary processing method and system based on lattice Boltzmann method, comprising: the average density of import boundary fluid is calculated and import and export pressure difference is calculated, and then volume force is calculated;Using lattice Boltzmann method to solve the velocity and density of fluid;According to fluid velocity, correct volume force, ensure that import flow rate is consistent with set value;According to the velocity distribution of fluid that is updated by corrected volume force and fluid density, then optimize and perfect the simulation of steady phase permeability curve.The application has the advantages that: by converting velocity-pressure boundary condition into periodic boundary condition of volume force format, the change of boundary pressure and injection flow rate can be accurately simulated when simulating steady phase permeability curve, ensure that import flow rate remains constant, so as to improve the calculation accuracy of phase permeability curve.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of fluid mechanics and multiphase flow simulation technology, and in particular to a method and system for handling the boundary of two-phase flow interpenetration curves based on the lattice Boltzmann method. Background Technology

[0002] Relative permeability curves are important indicators describing the flow capacity of multiphase fluids in porous reservoir media under different fluid saturation conditions. They are key parameters for revealing multiphase flow patterns and play a crucial role in oil and gas reservoir development. As an important input parameter for reservoir numerical simulation, relative permeability curves directly affect the prediction of reservoir recovery, the formulation of development plans, and the evaluation of oil and gas reservoir development benefits.

[0003] Currently, the main methods for obtaining relative permeability curves include experimental methods, numerical simulation methods, and theoretical derivation methods. Experimental methods are widely considered the "gold standard" for obtaining relative permeability curves because of their high accuracy and reliability. However, experimental methods face many challenges in practical applications, especially for unconventional tight reservoirs. Due to the extremely low permeability, complex pore structure, and complex flow mechanisms of these reservoirs, injecting multiphase fluids into reservoir cores becomes extremely difficult, and the injection flow rate is hard to control precisely. These factors make the experimental determination of relative permeability curves very time-consuming and complex, and in some cases, even impossible. Therefore, a new method for obtaining relative permeability curves is urgently needed.

[0004] Against this backdrop, pore-scale simulation, as an effective supplementary method, has gradually attracted widespread attention from researchers. This method, combined with a realistic digital model of porous media, can provide accurate relative permeability curves in a short time and visualize microscopic flow behavior through visualization techniques. By analyzing pore structure, fluid properties, and their interactions, pore-scale simulation can not only reveal fluid flow behavior in complex porous media but also provide important support for the prediction and control of oil and gas reservoir development processes.

[0005] Among numerous pore-scale simulation methods, the Lattice Boltzmann Method (LBM) has been widely used due to its inherent parallelism, ease of boundary condition handling, and superior performance in studying flow problems in porous media. Many researchers employ LBM to simulate the flow of multiphase fluids in porous media and obtain relative permeability curves. However, when applying LBM to simulate steady-state relative permeability curves, researchers typically need to define a new capillary number. A volume force approach is used to achieve periodic boundary conditions, thereby simulating fluid flow. This method can simulate steady-state flow to some extent, but it differs from the operation of the steady-state method in experiments. Specifically, steady-state experiments typically require injecting a two-phase fluid at a constant flow rate at the injection point and setting a constant back pressure. However, the pressure at the injection point is constantly changing before steady-state flow is achieved. Therefore, the pressure cannot remain constant during the experiment, which differs significantly from the phase permeation curve simulation method based on the volume force scheme, potentially leading to inaccurate simulation results.

[0006] Therefore, how to more accurately reflect the experimental process in pore-scale simulations, especially in solving steady-state relative permeability curves under constant injection velocity and periodic boundary conditions, has become an important issue that urgently needs to be addressed. To this end, this invention proposes a novel lattice Boltzmann method for boundary treatment of two-phase flow relative permeability curves. This method can accurately simulate steady-state relative permeability curves using periodic boundary conditions while maintaining a constant injection velocity, thereby improving the accuracy of relative permeability curve prediction and better reflecting the flow characteristics under experimental conditions. Summary of the Invention

[0007] To address the shortcomings of existing technologies, this invention provides a method and system for processing the boundary of two-phase flow phase permeation curves based on the lattice Boltzmann method.

[0008] To achieve the above-mentioned objectives, the technical solution adopted by the present invention is as follows:

[0009] A method for handling the boundary of two-phase flow phase permeation curves based on the lattice Boltzmann method includes the following steps:

[0010] S1: Calculate the average density of the fluid at the inlet boundary using the set injection rate, and calculate the pressure difference between the inlet and outlet fluids based on the density difference, further estimating the volumetric force (equivalent pressure gradient). The magnitude of the volumetric force is calculated using the following formula:

[0011]

[0012] Where, ρ in and ρ out These are the average densities of the inlet and outlet fluids, respectively. Let Ny be the square of the speed of sound, and Ny be the distance between the model's inlet and outlet.

[0013] S2: Using the lattice Boltzmann method, combined with the calculation results of volume forces, the macroscopic quantities of the fluid are solved, including the fluid velocity and density. The fluid viscosity is calculated using the following formula:

[0014]

[0015] In the formula, η k For fluid viscosity k, τ k The relaxation time of the fluid;

[0016] S3: Based on the updated fluid velocity and density, adjust the volumetric force to ensure that the inlet flow rate is consistent with the set value. The adjustment formula is as follows:

[0017]

[0018] Among them, v j For the set injection flow rate, F b For the preliminary calculation of the inlet and outlet pressure gradient, The average flow velocity at the import boundary at the current moment;

[0019] S4: Using the corrected volume forces and fluid density, continue with other steps to update the fluid velocity distribution according to the lattice Boltzmann method.

[0020] S5: For fluid grid points near the boundary, the fluid distribution is corrected according to the color gradient to ensure a smooth transition of the fluid interface.

[0021] S6: Substitute the fluid interfacial tension and the corrected volume force into the perturbation step.

[0022] S7: After completing the perturbation step, execute the migration step to transfer the updated fluid distribution to neighboring grid points, ensuring that the macroscopic quantity of fluid is updated across the entire grid.

[0023] S8: Repeat steps S1 to S7 until the simulation converges or the set number of time steps are reached to obtain stable simulation results.

[0024] Furthermore, the formula for calculating the capillary number Ca of the fluid in S1 is as follows:

[0025] Where, μ t Let v be the geometric mean viscosity of the two fluids. in For a constant injection rate, σ is the interfacial tension of the two-phase fluid;

[0026] Furthermore, ρ in S1 in The calculation formula is as follows:

[0027]

[0028] Among them, e i For discrete velocity sets in different directions, m i v is the average value of the density distribution function of the fluid in the inlet boundary region. in Let n be the inlet injection velocity, n be the unit vector in the direction of the inlet outward normal, and e be the inlet injection velocity. iIt is a set of discrete velocities in different directions;

[0029] Furthermore, ρ in S1 out The calculation formula is as follows:

[0030]

[0031] Where N is the number of fluid grid points in the outlet boundary region, f i k (x) is the fluid density distribution function in the i-th direction k, and x is the position of the fluid grid point.

[0032] Furthermore, in S3 The calculation formula is:

[0033]

[0034] Among them, u j (x) The fluid velocity at the inlet boundary position x. This is the import border area.

[0035] This invention also discloses a two-phase flow phase permeation curve boundary treatment system, which can be used to implement the above-mentioned two-phase flow phase permeation curve boundary treatment method, specifically including:

[0036] Input data module: Used to receive and preprocess external input data, including but not limited to model size, injection speed, and fluid properties;

[0037] Volumetric force calculation module: It is used to calculate the average density of the fluid at the inlet boundary based on the set injection speed, and to calculate the pressure difference between the inlet and outlet fluids based on the density difference between the inlet and outlet fluids, thereby deriving the volumetric force.

[0038] Macroscopic quantity solution module: Using the lattice Boltzmann method and combining the results of volume force calculations, the macroscopic quantities of the fluid are solved, including the fluid velocity and density. The fluid viscosity is calculated using the relaxation time parameter.

[0039] Volumetric force correction module: Corrects volumetric force based on updated fluid velocity and density to ensure inlet flow rate matches the set value.

[0040] Migration step update module: Updates the fluid velocity distribution based on the migration step of the lattice Boltzmann method using the corrected volume force and fluid density;

[0041] Boundary fluid correction module: For fluid grid points near the boundary, the fluid distribution is corrected according to the color gradient to ensure a smooth transition of the fluid interface;

[0042] Perturbation step adjustment module: Substitutes the fluid interfacial tension and the corrected volume force into the perturbation step to adjust the fluid dynamics and optimize the simulation of the phase permeation curve;

[0043] Fluid distribution update module: After completing the perturbation step, the migration step is executed to transfer the updated fluid distribution to neighboring grid points, ensuring that the macroscopic quantities of fluid are updated across the entire grid.

[0044] Results output module: Used to output and visualize the final simulation results, including fluid distribution, relative permeability curves, pressure gradients, etc., providing numerical data and graphical displays for analysis and verification.

[0045] The present invention also discloses a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the above-described two-phase flow phase permeation curve boundary processing method.

[0046] The present invention also discloses a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method for handling the boundary of the two-phase flow phase permeation curve.

[0047] Compared with the prior art, the advantages of the present invention are as follows:

[0048] This invention improves the accuracy of relative permeability curve calculations by transforming the velocity-pressure boundary conditions into periodic boundary conditions in a volume force scheme. This allows for the reproduction of changes in boundary pressure and injection velocity in experimental methods when simulating steady-state relative permeability curves, resulting in more accurate calculations. This method effectively avoids the problem of traditional steady-state simulation methods failing to accurately reflect pressure and velocity changes during experiments, thus enhancing the reliability and accuracy of simulation results.

[0049] Ensuring a constant inlet flow velocity: The boundary treatment method employed in this invention has the characteristic of maintaining a constant average inlet flow velocity for porous media, which is crucial for the simulation of two-phase flows. By correcting for volume forces, it ensures that the inlet boundary fluid velocity is consistent with the set value under constant injection flow rate conditions, thereby maintaining fluid dynamic consistency during the simulation and reducing simulation deviations.

[0050] Improving the accuracy and flexibility of flow simulation in porous media: By using the lattice Boltzmann method for multiphase flow simulation, this invention can accurately simulate the flow behavior of fluids in porous media, reveal complex flow mechanisms and phase permeability characteristics, and promote the progress of simulation research in fields such as oil and gas reservoir development and groundwater flow. Attached Figure Description

[0051] Figure 1The flowchart of the two-phase flow permeation curve boundary treatment method based on the lattice Boltzmann method of this invention;

[0052] Figure 2 Schematic diagram of two-phase flow distribution in a flat plate according to Embodiment 1 of the present invention;

[0053] Figure 3 Comparison of simulation results and analytical solutions of plate velocity profiles under two processing methods in Embodiment 1 of the present invention; wherein (a) is the result of the present invention, and (b) is the traditional body force scheme;

[0054] Figure 4 The graph shows the variation of the average flow velocity at the inlet of the flat plate over time under the boundary treatment method of Embodiment 1 of the present invention.

[0055] Figure 5 A schematic diagram of the porous media combined model used in the simulation of Embodiment 2 of the present invention, where white represents solid grid points and black represents fluid grid points;

[0056] Figure 6 The two-phase fluid distribution diagram in the porous medium at the end of the simulation in Embodiment 2 of the present invention, where the dots represent solids and the other parts represent the two fluids;

[0057] Figure 7 The graph shows the variation of the average inlet velocity and the inlet-outlet pressure difference over time in the model of Embodiment 2 of this invention; where (a) is the average velocity and (b) is the inlet pressure. Detailed Implementation

[0058] To make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and examples.

[0059] A method for handling the boundary conditions of two-phase flow phase permeation curves based on the lattice Boltzmann method, the process of which is as follows: Figure 1 As shown, the specific steps include:

[0060] The capillary number reflects the ratio of viscous force to capillary force during displacement, and is originally defined as follows:

[0061]

[0062] In the formula, μ is the fluid viscosity, and v in σ represents the injection velocity, and σ represents the interfacial tension of the two-phase fluid.

[0063] The definition in the formula is generally applied to scenarios where one fluid is injected into the reservoir to displace another fluid, and μ is the viscosity of the injected fluid. However, this definition has a problem of ambiguity when applied to obtaining the phase permeability curve of porous media, because the two fluids are injected into the porous media simultaneously, and there is controversy over which fluid viscosity to use to calculate the capillary number. This invention first defines a new capillary number, which solves the problem of ambiguity in the viscosity definition when calculating the phase permeability curve, that is,

[0064]

[0065] In the formula, μ t Defined as This represents the geometric mean of the two fluids.

[0066] In lattice Boltzmann theory, common inlet / outlet boundary conditions include: (1) velocity-pressure boundary; (2) pressure-pressure boundary; and (3) fluid flow achieved by using a driving force (volume force) to impart pressure gradients to the inlet and outlet. If velocity-pressure and pressure-pressure boundary conditions are used, periodic flow at the model and inlet / outlet cannot be achieved. If periodic boundary conditions using volume force schemes are used, a constant inlet velocity cannot be maintained. Therefore, a change in approach is needed to solve for the steady-state relative permeability curve using periodic boundary conditions under a given constant injection velocity.

[0067] For the inlet boundary, the constant injection rate is first converted to the average density of all fluids at the inlet boundary.

[0068]

[0069] In the formula, ρ in v is the average density of the inlet boundary fluid. in Let n be the inlet injection velocity (vector; typically, injection occurs only in one direction, so the velocity in the other direction is 0), and e be the unit vector in the direction of the inlet outward normal. i Defined as a set of discrete velocities in different directions, m i Defined as,

[0070]

[0071] In the formula, Ω in The inlet boundary fluid region is N, where N is the number of fluid grid points in the inlet boundary region, and f is... i k Let be the fluid density distribution function in the i-th direction, and x be the location of the fluid grid point.

[0072] For the outlet boundary, the density definition is directly used for calculation to obtain the average density of the fluid at the outlet boundary.

[0073]

[0074] After obtaining the average density of the fluid at the inlet and outlet boundaries, the pressure gradient F at time t can be calculated. b for,

[0075]

[0076] In the formula, is the square of the speed of sound, typically 1 / 3 (grid unit); Ny is the distance between the model's inlet and outlet.

[0077] Based on the above calculations, the equivalent pressure gradients at the model inlet and outlet under the condition of a set inlet injection velocity were initially obtained. Therefore, the velocity-pressure boundary scheme was transformed into a volume force scheme capable of implementing periodic boundary conditions. However, during the simulation, since the fluid density at the outlet boundary was not constrained, the average injection velocity at the model inlet may not necessarily be equal to the set injection velocity. Therefore, correction of the pressure gradient is still necessary. Considering that the fluid flow in underground porous media is mostly laminar, the average velocity is positively correlated with the pressure gradient. Therefore, the average inlet injection velocity v at the current moment is calculated in real time. j,now And establish the corrected volume force and the current volume force F. b And setting the injection speed v j The relationship between them

[0078]

[0079] In the formula, F b,now This represents the magnitude of the inlet and outlet pressure gradients of the model at the current moment, assuming the average injection rate is the set injection rate. The calculation formula is as follows:

[0080]

[0081] By following the steps above, a constant injection rate can be maintained while simultaneously achieving periodic boundary conditions, thus meeting the requirements for solving the steady-state phase permeability curve. See below for detailed implementation steps. Figure 1 As can be seen, the difference between this and the traditional lattice Boltzmann multiphase flow simulation framework is that it requires correction of the volume force magnitude and recalculation of fluid density and viscosity. Other steps are consistent with the traditional lattice Boltzmann model algorithm.

[0082] Taking the color gradient multiphase flow lattice Boltzmann simulation method as an example, the actual program compilation includes five steps: (1) calculation of macroscopic quantities; (2) collision step; (3) perturbation step; (4) migration step; and (5) boundary conditions. The boundary treatment method for simulating the two-phase flow phase permeation curve proposed in this invention, before the calculation of macroscopic quantities (density and velocity) in step (1), obtains the average density of the inlet boundary fluid from the injection velocity, and combines it with the average density of the outlet fluid, and calculates the inlet and outlet pressure gradient F. b After obtaining the volumetric force (equivalent pressure gradient), the macroscopic quantities are calculated, and the average inlet fluid velocity at the current time step is obtained. This leads to the corrected volumetric force. The macroscopic fluid quantities are then calculated again, and the fluid velocity and density are updated. The remaining steps are as follows: Figure 1 As shown.

[0083] Two computational examples are provided below to illustrate the characteristics of the algorithm of the present invention.

[0084] Example 1:

[0085] Taking two-phase flow in a flat plate as an example ( Figure 2 In this configuration, one fluid is located at the center of a flat plate, while the other fluid is located in other areas. Since only one fluid is in contact with the solid wall, the interphase permeability curves of the two fluids are independent of wettability and depend only on the viscosity ratio and saturation. The flat plate is 231 × 77 mm in size, with solid boundaries at the top and bottom. The viscosity ratio of the two fluids is taken as 1.0, the interfacial tension as 0.001, and the capillary number as 1.0 × 10⁻⁶. -2 It should be noted that a key reason for setting the viscosity ratio to 1:1 is to verify whether the definition of capillary number using the volumetric force-inclusive method adopted in the literature is reasonable compared to the original definition of capillary number. Two algorithms were implemented to address the widely used volumetric force-inclusive capillary number in the literature. The volume force F is calculated to be 1.0 × 10⁻⁶. -5 Using the method proposed in this invention, the average injection velocity at the model inlet is 6.0 × 10⁻⁶. -5 .

[0086] According to the lattice Boltzmann model algorithm, the formula for calculating fluid viscosity is:

[0087]

[0088] In the formula, η k Let k be the relaxation time of the fluid. Since the viscosity ratio is 1.0, η k The value is 1.0, and the geometric mean viscosity of the two-phase fluid is 1 / 6.

[0089] For two-phase flow on a flat plate, the velocity profile has analytical solutions, which can be written in both the form containing body forces and the average velocity form.

[0090]

[0091] In the formula, For pressure gradient, The average injection flow rate.

[0092] The two equations above are equivalent, differing only in form; both exhibit parabolic velocities. Under the same capillary number condition, simulation results obtained using the volume force scheme and the boundary treatment method proposed in this invention are shown below. Figure 3 The results showed that the velocity profiles obtained by both methods were consistent with the analytical solutions, verifying the accuracy of the algorithms. However, a comparison of the two processing methods revealed that the velocities differed by several orders of magnitude. The average flow velocity calculated by the volume force periodic boundary condition algorithm was much larger than the average flow velocity set according to the original capillary number definition. This indicates that defining the capillary number using volume force is not ideal. That is unreasonable.

[0093] Furthermore, using the boundary treatment method proposed in this invention, a flow simulation was conducted for 100,000 time steps. Statistical analysis of the inlet average velocity of the model revealed that the average velocity quickly reached the set value of 6.0 × 10⁻⁶. -5 As expected, while ensuring the model inlet average velocity reaches the set average velocity, it also achieves periodic boundaries at the model inlet and outlet, ensuring that the overall two-phase fluid saturation of the model remains unchanged. Figure 4 As shown.

[0094] Example 2:

[0095] The characteristics of the boundary treatment method proposed in this invention are further illustrated by a porous media model. The model size is 410×202, with solid boundaries at the top and bottom and the remaining area filled with non-contact solid particles.

[0096] like Figure 5 As shown, the porous media combined model used in the simulation is illustrated, with white representing solid grid points and black representing fluid grid points.

[0097] The viscosity ratio of the two-phase fluids is taken as 1:1, the saturation of both fluids is 50%, the contact angle is taken as 60°, the interfacial tension is taken as 0.01, and the capillary number is taken as 1.3 × 10⁻⁶. -3 According to calculations, the average inlet velocity of the model is 1.0 × 10⁻⁶. -4 Using the boundary treatment method proposed in this invention, the volume force scheme is corrected, and 100,000 simulation steps are performed to obtain the two-phase fluid distribution of the model (see...). Figure 6 ), and the changes in the model's inlet average velocity and inlet / outlet pressure difference (see Figure 7 ).

[0098] It can be observed that the simulation results using the complex porous media model can achieve the expected results. The average flow velocity at the model inlet stabilizes in a short time, consistent with the set value. At the same time, the pressure difference between the model inlet and outlet fluctuates over time, and the changes in average flow velocity and pressure difference are consistent with the changes in pressure and average injection rate (flow rate) during the actual steady-state phase permeation experiment.

[0099] In another embodiment of the present invention, a two-phase flow phase permeation curve boundary treatment system is provided. This system can be used to implement the above-described two-phase flow phase permeation curve boundary treatment method, specifically including:

[0100] Input data module: Used to receive and preprocess external input data, including but not limited to model size, injection speed, fluid properties (such as density, viscosity, interfacial tension, etc.);

[0101] Volumetric force calculation module: It is used to calculate the average density of the fluid at the inlet boundary based on the set injection speed, and to calculate the pressure difference between the inlet and outlet fluids based on the density difference between the inlet and outlet fluids, thereby deriving the volumetric force (equivalent pressure gradient).

[0102] Macroscopic quantity solution module: Using the lattice Boltzmann method and combining the results of volume force calculations, the macroscopic quantities of the fluid are solved, including the fluid velocity and density. The fluid viscosity is calculated using the relaxation time parameter.

[0103] Volumetric force correction module: Corrects volumetric force based on updated fluid velocity and density to ensure inlet flow rate matches the set value.

[0104] Migration step update module: Updates the fluid velocity distribution based on the migration step of the lattice Boltzmann method using the corrected volume force and fluid density;

[0105] Boundary fluid correction module: For fluid grid points near the boundary, the fluid distribution is corrected according to the color gradient to ensure a smooth transition of the fluid interface;

[0106] Perturbation step adjustment module: Substitutes the fluid interfacial tension and the corrected volume force into the perturbation step to adjust the fluid dynamics and optimize the simulation of the phase permeation curve;

[0107] Fluid distribution update module: After completing the perturbation step, the migration step is executed to transfer the updated fluid distribution to neighboring grid points, ensuring that the macroscopic quantities of fluid are updated across the entire grid.

[0108] Results output module: Used to output and visualize the final simulation results, including fluid distribution, relative permeability curves, pressure gradients, etc., providing numerical data and graphical displays for analysis and verification.

[0109] In another embodiment of the present invention, a terminal device is provided, comprising a processor and a memory. The memory stores a computer program, which includes program instructions. The processor executes the program instructions stored in the computer storage medium. The processor may be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. It is the computing and control core of the terminal, suitable for implementing one or more instructions, specifically suitable for loading and executing one or more instructions to achieve a corresponding method flow or corresponding function. The processor described in this embodiment of the present invention can be used for the operation of a two-phase flow phase permeation curve boundary processing method.

[0110] In another embodiment of the present invention, a storage medium is provided, specifically a computer-readable storage medium (Memory), which is a memory device in a terminal device used to store programs and data. It is understood that the computer-readable storage medium here can include both the built-in storage medium in the terminal device and extended storage media supported by the terminal device. The computer-readable storage medium provides storage space that stores the terminal's operating system. Furthermore, the storage space also stores one or more instructions suitable for loading and execution by a processor, which can be one or more computer programs (including program code). It should be noted that the computer-readable storage medium here can be high-speed RAM or non-volatile memory, such as at least one disk storage device.

[0111] One or more instructions stored in a computer-readable storage medium can be loaded and executed by a processor to implement the corresponding steps of the two-phase flow phase permeation curve boundary treatment method in the above embodiments; one or more instructions in the computer-readable storage medium are loaded and executed by a processor.

[0112] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0113] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0114] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0115] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0116] Those skilled in the art will recognize that the embodiments described herein are intended to help the reader understand the implementation methods of the present invention, and should be understood that the scope of protection of the present invention is not limited to such specific statements and embodiments. Those skilled in the art can make various other specific modifications and combinations based on the technical teachings disclosed in this invention without departing from the spirit of the invention, and these modifications and combinations are still within the scope of protection of the present invention.

Claims

1. A method for boundary treatment of two-phase flow relative permeability curves based on lattice Boltzmann method, characterized in that, The method comprises the following steps: S1: Calculate the average density of the inlet boundary fluid by the set injection rate, and calculate the pressure difference between the inlet and outlet according to the density difference between the inlet fluid and the outlet fluid, and further calculate the volume force; the size of the volume force is calculated by the following formula: where p in and p out are the average densities of the inlet and outlet fluids, respectively, is the square of the sound speed, and Nyis the model inlet-outlet distance; S2: Use the lattice Boltzmann method to solve the macroscopic quantities of the fluid, including the velocity and density of the fluid, and the viscosity of the fluid is calculated by the following formula: In the formula, η k For fluid viscosity k, τ k The relaxation time of the fluid; S3: According to the updated fluid velocity and density, correct the volume force to ensure that the inlet flow rate is consistent with the set value, and the correction formula is: where v j is the set injection flow rate, F b is the preliminary calculated import / export pressure gradient, is the average flow rate of the import border at the current time. S4: Use the corrected volume force and fluid density to update the fluid velocity distribution according to the migration step of the lattice Boltzmann method; S5: For the fluid grid points close to the boundary, correct the distribution state of the fluid according to the color gradient to ensure smooth transition of the fluid interface; S6: Substitute the fluid interface tension and the corrected volume force into the squeeze step to optimize the simulation of the relative permeability curve; S7: After completing the squeeze step, perform the migration step to transfer the updated fluid distribution to the adjacent grid points to ensure that the macroscopic quantities of the fluid are updated throughout the grid; S8: Repeat steps S1 to S7 until the simulation converges or reaches the set time step, and obtain stable simulation results.

2. The two-phase fluid phase permeability curve boundary processing method of claim 1, wherein: The formula for calculating the capillary number Ca of the fluid in S1 is as follows: where μ t is the geometric mean viscosity of the two fluids, v in is the constant injection rate, and σ is the interfacial tension of the two-phase fluid.

3. The two-phase fluid phase permeability curve boundary processing method of claim 1, wherein: S1 in p in The calculation formula is as follows: where e i is a set of discrete velocities in different directions, m i is the average value of the density distribution function of the fluid at the inlet boundary region, v in is the injection velocity at the inlet, n is the unit vector in the outward normal direction at the inlet, e i is a set of discrete velocities in different directions.

4. The two-phase fluid phase permeability curve boundary processing method of claim 3, wherein: S1 in p out The formula for the calculation is as follows: where N is the number of fluid cells in the exit boundary region, is the density distribution function of fluid k in the i-th direction, and x is the fluid cell position.

5. The two-phase fluid phase permeability curve boundary processing method of claim 4, wherein: In S3 The calculation formula is: where u j (x) the fluid velocity at the inlet boundary location x, is the inlet boundary region.

6. A two-phase flow phase permeability curve boundary processing system, characterized by: The system can be used to implement the two-phase flow relative permeability curve boundary processing method of any one of claims 1 to 5, specifically comprising: An input data module: for receiving and preprocessing external input data, including but not limited to model size, injection rate, fluid characteristics; A volume force calculation module: for calculating the average density of the inlet boundary fluid according to the set injection rate, and calculating the pressure difference between the inlet and outlet according to the density difference between the inlet fluid and the outlet fluid, and further calculating the volume force; A macroscopic quantity solving module: using the lattice Boltzmann method, combined with the calculation result of the volume force, to solve the macroscopic quantities of the fluid, including the velocity and density of the fluid, and the viscosity of the fluid is calculated by the relaxation time parameter; A volume force correction module: according to the updated fluid velocity and density, correct the volume force to ensure that the inlet flow rate is consistent with the set value; A migration step update module: using the corrected volume force and fluid density, update the fluid velocity distribution according to the lattice Boltzmann method; A boundary fluid correction module: for the fluid grid points close to the boundary, correct the distribution state of the fluid according to the color gradient to ensure smooth transition of the fluid interface; A squeeze step adjustment module: substitute the fluid interface tension and the corrected volume force into the squeeze step to optimize the simulation of the relative permeability curve; A fluid distribution update module: after completing the squeeze step, perform the migration step to transfer the updated fluid distribution to the adjacent grid points to ensure that the macroscopic quantities of the fluid are updated throughout the grid; A result output module: for outputting and visualizing the final simulation results, including the distribution state of the fluid, the relative permeability curve, the pressure gradient, etc., providing numerical data and graphical display for analysis and verification.

7. A computer device, characterized by: A computer program product, comprising a memory, a processor, and a computer program stored on the memory and loadable on the processor, the processor implementing the method of determining the boundary of a two-phase flow relative permeability curve according to one of claims 1 to 5 when running the program.

8. A computer-readable storage medium, characterized in that: A computer program product, comprising a memory, a processor, and a computer program stored on the memory and loadable on the processor, the processor implementing the method of determining the boundary of a two-phase flow relative permeability curve according to one of claims 1 to 5 when running the program.

Citation Information

Patent Citations

  • Method for evaluating influence of loose sandstone structure on relative permeability curve form

    CN113588513A

  • Lattice Boltzmann-finite volume mixed numerical method for continuous-scale two-phase seepage

    CN116911211A