Two-phase flow relative permeability curve boundary processing method and system based on lattice Boltzmann method
By introducing volumetric force correction and periodic boundary conditions into the lattice Boltzmann method, the problem that the changes in boundary pressure and injection speed are difficult to reflect when simulating the steady-state phase permeability curve is solved, and the accuracy of the simulation results and the ability to reflect flow characteristics are improved.
Patent Information
- Application Number
- CN202411631223.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-15
- Publication Date
- 2025-03-07
- Estimated Expiration
- 2044-11-15
AI Technical Summary
When simulating the steady-state phase permeability curve, it is difficult for the prior art to accurately reflect the changes in boundary pressure and injection speed during the experiment, resulting in inaccurate simulation results.
The two-phase flow phase permeability curve boundary treatment method based on the lattice Boltzmann method is used to calculate the pressure difference and volume force between the inlet and outlet, and correct the volume force to ensure the constant inlet flow velocity, and simulate it under periodic boundary conditions.
The accuracy of phase permeability curve calculation is improved, the import flow rate is constant, and the accuracy and flexibility of porous medium flow simulation are enhanced.
Smart Images

Figure CN119578290A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of fluid mechanics and multiphase flow simulation, and in particular to a two-phase flow permeability curve boundary processing method and system based on a lattice Boltzmann method. Background Art
[0002] The phase permeability curve is an important indicator that describes the flow capacity of multiphase fluid in porous media of reservoirs under different fluid saturation conditions. It is a key parameter to reveal the law of multiphase flow and plays a vital role in the development of oil and gas reservoirs. As an important input parameter of reservoir numerical simulation, the phase permeability curve directly affects the prediction of reservoir recovery, the formulation of development plans and the evaluation of oil and gas reservoir development benefits.
[0003] At present, the main methods for obtaining relative permeability curves include experimental methods, numerical simulation methods, and theoretical derivation methods. The experimental method is widely regarded as the "gold standard" for obtaining relative permeability curves because of its high accuracy and reliability. However, the experimental method faces many challenges in practical applications, especially for unconventional tight reservoirs. Due to the extremely low permeability, complex pore structure, and complex flow mechanism of these reservoirs, it becomes extremely difficult to inject multiphase fluids into the reservoir core, and the injection flow rate is difficult to accurately control. These factors make the process of experimentally determining the relative permeability curve very time-consuming and complicated, and even impossible to implement in some cases. Therefore, there is an urgent need for a new method to obtain relative permeability curves.
[0004] In this context, pore-scale simulation methods, as an effective supplementary means, have gradually attracted widespread attention from researchers. This method, combined with a real digital model of porous media, can provide accurate relative permeability curves in a short time and display microscopic flow behavior through visualization technology. By analyzing the pore structure, fluid properties and their interactions, pore-scale simulation can not only reveal the 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 the many pore-scale simulation methods, the lattice Boltzmann method (LBM) has been widely used due to its natural parallelism, simplicity of boundary condition processing, and its superiority in studying porous media flow problems. Many researchers use LBM to simulate the flow of multiphase fluids in porous media and obtain relative permeability curves. However, when using LBM to simulate steady-state relative permeability curves, researchers usually need to define a new capillary number. The volume force form is used to achieve periodic boundary conditions and simulate fluid flow. This method can simulate steady-state flow to a certain extent, but it is different from the operation of the steady-state method in the experiment. Specifically, the steady-state method experiment usually requires the injection of two-phase fluid at a constant flow rate at the injection end and the setting of a constant back pressure. Before the steady-state flow is achieved, the pressure at the injection end is constantly changing. Therefore, during the experiment, the pressure cannot remain constant, which is significantly different from the phase permeability curve simulation method based on the volume force format, which may lead to inaccurate simulation results.
[0006] Therefore, how to more accurately reflect the experimental process in pore-scale simulation, especially to solve the steady-state relative permeability curve under constant injection flow rate and periodic boundary conditions, has become an important issue to be solved urgently. To this end, the present invention proposes a new lattice Boltzmann method for boundary processing of two-phase flow phase permeability curve, which can accurately simulate the steady-state phase permeability curve under periodic boundary conditions while ensuring a constant injection flow rate, thereby improving the accuracy of phase permeability curve prediction and better reflecting the flow characteristics under experimental conditions. Summary of the invention
[0007] In view of the defects of the prior art, the present invention provides a two-phase flow permeability curve boundary processing method and system based on the lattice Boltzmann method.
[0008] In order to achieve the above invention object, the technical solution adopted by the present invention is as follows:
[0009] A two-phase flow permeability curve boundary processing method based on the lattice Boltzmann method comprises the following steps:
[0010] S1: Calculate the average density of the inlet boundary fluid by setting the injection speed, 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 (equivalent pressure gradient). The magnitude of the volume force is calculated by the following formula:
[0011]
[0012] Among them, ρ in and ρ out are the average densities of the inlet and outlet fluids, is the square of the speed of sound, Ny is the distance between the inlet and outlet of the model;
[0013] S2: Using the lattice Boltzmann method, combined with the calculation results of the volume force, the macroscopic quantities of the fluid are solved, including the velocity and density of the fluid. The fluid viscosity is calculated by the following formula:
[0014]
[0015] Where η k k is the fluid viscosity, τ k is the relaxation time of the fluid;
[0016] S3: According to the updated fluid velocity and density, the volume force is corrected to ensure that the inlet flow rate is consistent with the set value. The correction formula is:
[0017]
[0018] Among them, v j is the set injection flow rate, F b is the initial calculated inlet and outlet pressure gradient, is the average flow velocity at the inlet boundary at the current moment;
[0019] S4: Using the corrected body force and fluid density, continue with other steps to update the fluid velocity distribution according to the lattice Boltzmann method.
[0020] S5: For the fluid grid points near the boundary, the distribution state of the fluid 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, a migration step is performed to transfer the updated fluid distribution to neighboring grid points, ensuring that the macroscopic quantities of the fluid are updated on the entire grid.
[0023] S8: Repeat steps S1 to S7 until the simulation converges or reaches the set number of time steps to obtain stable simulation results.
[0024] Furthermore, the capillary number Ca of the fluid in S1 is calculated as follows:
[0025] Among them, μ t is the geometric mean viscosity of the two fluids, v in is a constant injection velocity, σ is the interfacial tension between the two phase fluids;
[0026] Furthermore, ρ in S1 in The calculation formula is as follows:
[0027]
[0028] Among them, e i is a discrete set of velocities in different directions, m i is the average value of the density distribution function of the fluid in the inlet boundary area, v in is the inlet injection velocity, n is the unit vector in the direction of the inlet external normal, e iis 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 area, f i k (x) is the density distribution function of fluid k in the ith direction, and x is the fluid grid position.
[0032] Furthermore, in S3 The calculation formula is:
[0033]
[0034] Among them, u j (x) is the fluid velocity at the inlet boundary position x, The import boundary area.
[0035] The present invention also discloses a two-phase flow permeability curve boundary processing system, which can be used to implement the above-mentioned two-phase flow permeability curve boundary processing method, specifically comprising:
[0036] Input data module: used to receive and pre-process external input data, including but not limited to model size, injection speed, and fluid characteristics;
[0037] Volume force calculation module: used to calculate the average density of the inlet boundary fluid according to the set injection speed, and calculate the pressure difference between the inlet and outlet according to the density difference between the inlet fluid and the outlet fluid, and then deduce the volume force.
[0038] Macro-quantity solving module: uses the lattice Boltzmann method and the volume force calculation results to solve the macro-quantities of the fluid, including the velocity and density of the fluid. The fluid viscosity is calculated by the relaxation time parameter.
[0039] Body force correction module: Based on the updated fluid velocity and density, the body force is corrected to ensure that the inlet flow rate is consistent with the set value.
[0040] Migration step update module: uses the corrected volume force and fluid density to update the fluid velocity distribution according to the migration step of the lattice Boltzmann method;
[0041] Boundary fluid correction module: For fluid grid points close to the boundary, the distribution state of the fluid is corrected according to the color gradient to ensure a smooth transition of the fluid interface;
[0042] Perturbation step adjustment module: Substitute the fluid interfacial tension and the corrected volume force into the perturbation step to adjust the dynamic behavior of the fluid and optimize the simulation of the phase permeability curve;
[0043] Fluid distribution update module: After completing the perturbation step, a migration step is executed to transfer the updated fluid distribution to the adjacent grid points to ensure that the macroscopic quantity of the fluid is updated on the entire grid;
[0044] Result output module: used to output and visualize the final simulation results, including the distribution state of the fluid, phase permeability curve, pressure gradient, etc., and provide 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 implements the above-mentioned two-phase flow permeability curve boundary processing method when executing the program.
[0046] The present invention also discloses a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the two-phase flow permeability curve boundary processing method is implemented.
[0047] Compared with the prior art, the advantages of the present invention are:
[0048] Improved accuracy of phase permeability curve calculation: By converting velocity-pressure boundary conditions into periodic boundary conditions in volume force format, the present invention can reproduce the changes in boundary pressure and injection velocity in the experimental method when simulating the steady-state phase permeability curve, thereby making the calculation of the phase permeability curve in the simulation process more accurate. This method effectively avoids the problem that the traditional steady-state simulation method cannot accurately reflect the changes in pressure and flow rate during the experiment, and improves the credibility and accuracy of the simulation results.
[0049] Ensure constant inlet flow rate: The boundary processing method used in the present invention has the characteristic of keeping the average flow rate of the porous medium inlet constant, which is crucial for the simulation of two-phase flow. By correcting the volume force, it is ensured that under the condition of constant injection flow rate, the flow rate of the inlet boundary fluid is consistent with the set value, thereby maintaining the consistency of fluid dynamics during the simulation process and reducing simulation deviation.
[0050] Improve the accuracy and flexibility of porous media flow simulation: By using the lattice Boltzmann method for multiphase flow simulation, the present invention can more 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 the fields of oil and gas reservoir development and groundwater flow. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1Flow chart of the boundary processing method of two-phase flow permeability curve based on lattice Boltzmann method of the present invention;
[0052] Figure 2 Schematic diagram of fluid distribution of two-phase flow in a flat plate according to embodiment 1 of the present invention;
[0053] Figure 3 Comparison diagram of the simulation results of the flat plate velocity profile and the analytical solution under the two processing methods of Example 1 of the present invention; (a) is the present invention, and (b) is the traditional body force format;
[0054] Figure 4 A graph showing the change of the average flow velocity of the flat plate inlet over time under the boundary treatment method of Example 1 of the present invention;
[0055] Figure 5 Schematic diagram of the porous medium bonding model used in the simulation of Example 2 of the present invention, where white represents solid lattice points and black represents fluid lattice points;
[0056] Figure 6 Distribution diagram of two-phase fluid in porous medium at the end of simulation of Example 2 of the present invention, where dots represent solids and other parts represent two fluids;
[0057] Figure 7 A graph showing the change of the average flow rate at the inlet and the pressure difference at the inlet and outlet of the model in Example 2 of the present invention over time; wherein (a) is the average flow rate and (b) is the inlet pressure. DETAILED DESCRIPTION
[0058] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below with reference to the accompanying drawings and examples.
[0059] A two-phase flow permeability curve boundary processing method based on the lattice Boltzmann method, the process is as follows Figure 1 As shown, the specific steps include:
[0060] The capillary number reflects the ratio of fluid viscosity to capillary force during displacement, and is originally defined as:
[0061]
[0062] Where μ is the fluid viscosity, v in is the injection velocity, and σ is the interfacial tension between the two phase fluids.
[0063] The definition in the formula is generally applied to the scenario of injecting one fluid into a reservoir to displace another fluid, and μ is the viscosity of the injected fluid. However, this definition has an ambiguous definition problem when applied to obtain the phase permeability curve of porous media, because the two fluids are injected into the porous media at the same time, and there is controversy over which fluid viscosity to use to calculate the capillary number. The present invention first defines a new capillary number to solve the problem of ambiguous definition of viscosity when calculating the phase permeability curve, that is,
[0064]
[0065] In the formula, μ t Defined as is the geometric mean of the two fluids.
[0066] In the lattice Boltzmann theory, common inlet / outlet boundary conditions include: (1) velocity-pressure boundary; (2) pressure-pressure boundary; and (3) using a driving force (volume force) to impart an inlet and outlet pressure gradient to achieve fluid flow. If velocity-pressure and pressure-pressure boundary conditions are used, it is impossible to achieve periodic flow in the model and inlet and outlet. If periodic boundary conditions in the volume force format are used, it is impossible to maintain a constant flow rate at the model inlet. Therefore, it is necessary to change the idea and use periodic boundary conditions to solve the steady-state relative permeability curve under the condition of a given constant injection flow rate.
[0067] For the inlet boundary, the constant injection velocity is first converted to the average density of all fluids at the inlet boundary,
[0068]
[0069] In the formula, ρ in is the average density of the inlet boundary fluid, v in is the inlet injection velocity (vector, usually only injected in one direction, so the velocity in the other direction is 0), n is the unit vector of the inlet external normal direction, e i Defined as a set of discrete velocities in different directions, m i Defined as,
[0070]
[0071] In the formula, Ω in is the inlet boundary fluid region, N is the number of fluid grid points in the inlet boundary region, and f i k is the density distribution function of fluid k in the ith direction, and x is the fluid grid position.
[0072] For the outlet boundary, the density definition is directly used for calculation to obtain the average density of the outlet boundary fluid.
[0073]
[0074] After obtaining the average density of the inlet and outlet boundary fluids, the inlet and outlet pressure gradient F at time t can be obtained. b for,
[0075]
[0076] In the formula, It is the square of the speed of sound, generally 1 / 3 (grid unit); Ny is the distance between the inlet and outlet of the model.
[0077] Through the above calculations, the equivalent pressure gradient of the model inlet and outlet under the condition of the set inlet injection velocity is preliminarily obtained, so the velocity-pressure boundary format is converted into a volume force format that can implement periodic boundary conditions. However, during the simulation process, since the density of the outlet boundary fluid is not constrained, the average injection velocity of the model inlet may not necessarily be equal to the set injection flow rate. Therefore, the pressure gradient still needs to be corrected. Considering that the flow of underground porous media fluid is mostly laminar, the average flow velocity is positively correlated with the pressure gradient at this time. Therefore, by real-time calculation of the current average inlet injection velocity v j,now , and establish the modified body force and the current body force F b And set the injection speed v j The relationship between
[0078]
[0079] In the formula, F b,now is the pressure gradient of the model inlet and outlet at the current moment when the average injection rate is the set injection rate. The calculation formula is,
[0080]
[0081] Through the above steps, it is possible to achieve a constant injection rate while also achieving periodic boundary conditions to meet the needs of solving the steady-state phase permeability curve. Figure 1 , it can be seen that the difference from the traditional lattice Boltzmann multiphase flow simulation framework is that it is necessary to correct the size of the volume force and recalculate the fluid density and viscosity. The 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 macro quantities; (2) collision step; (3) perturbation step; (4) migration step; (5) boundary conditions. The boundary processing method for simulating the permeability curve of two-phase flow proposed in the present invention, before the calculation of macro quantities (density and velocity) in step (1), the average density of the inlet boundary fluid is obtained from the injection velocity, and combined with the average density of the outlet fluid, the inlet and outlet pressure gradient F is obtained. b Get the volume force (equivalent pressure gradient), then calculate the macroscopic quantity, and get the average flow rate of the inlet fluid in the current time step, and then get the corrected volume force, and then calculate the fluid macroscopic quantity again, update the fluid velocity and density, and the remaining steps are as follows Figure 1 shown.
[0083] Two calculation examples are provided below to illustrate the algorithm characteristics of the present invention.
[0084] Embodiment 1:
[0085] Take the flat plate two-phase flow as an example ( Figure 2 ), one fluid is located in the center of the plate, and the other fluid is located in other areas. In this configuration, since only one fluid is in contact with the solid wall, the phase permeability curves of the two fluids have nothing to do with wettability, but only with viscosity ratio and saturation. The size of the plate is 231×77, with solid boundaries above and below. The viscosity ratio of the two-phase fluid is taken as 1.0, the interfacial tension is taken as 0.001, and the capillary number is taken as 1.0×10 -2 It should be noted that an important reason for setting the viscosity ratio to 1:1 is to verify whether the definition of capillary number with body force used in the literature is reasonable compared with the original definition of capillary number. The body force F is calculated to be 1.0×10 -5 ; Using the method proposed in the present invention, the average injection velocity of 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] Where η k is the relaxation time of k fluid. Since the viscosity ratio is 1.0, η k The value is 1.0, and the geometric mean of the viscosity of the two-phase fluid is 1 / 6.
[0089] For two-phase flow on a flat plate, there is an analytical solution for the velocity profile, which can be expressed in the form of body force and average velocity, respectively.
[0090]
[0091] In the formula, is the pressure gradient, is the average injection flow rate.
[0092] The above two equations are equivalent, but they are different in form, and the velocity is parabolic. Under the same capillary number conditions, the simulation results obtained by using the body force format and the boundary treatment method proposed by the present invention are shown in Figure 3 It is found that the velocity profiles obtained by the two methods are consistent with the analytical solution, which verifies the accuracy of the algorithm. However, the comparison of the two processing methods shows that the velocity magnitudes differ by several orders of magnitude. The average velocity calculated by the volume force periodic boundary condition algorithm is much larger than the average velocity set by the original capillary number definition. This shows that the definition of capillary number in the form of volume force is It's unreasonable.
[0093] Furthermore, the boundary processing method proposed in the present invention was used to carry out a flow simulation with 100,000 time steps. The average flow velocity at the inlet of the statistical model was found to quickly reach the set value of 6.0×10 -5 , which is consistent with expectations. That is, while ensuring that the average flow velocity at the model inlet reaches the set average flow velocity, the model inlet and outlet can also use periodic boundaries, so that the overall two-phase fluid saturation of the model does not change. Figure 4 shown.
[0094] Embodiment 2:
[0095] A porous medium model is used to further illustrate the characteristics of the boundary processing method proposed in the present invention. The model size is 410×202, the upper and lower parts are solid boundaries, and the rest of the area is filled with non-contact solid particles.
[0096] like Figure 5 As shown, the porous media bonding model used in the simulation, white represents solid grid points, and black represents fluid grid points.
[0097] The viscosity ratio of the two-phase fluids was taken as 1:1, the saturation of the two fluids was 50%, the contact angle was taken as 60°, the interfacial tension was taken as 0.01, and the capillary number was taken as 1.3×10 -3 According to calculations, the average velocity of the model inlet is 1.0×10 -4 , the boundary processing method proposed in this invention is used to modify the volume force format, and the two-phase fluid distribution of the model is obtained by simulating 100,000 steps (see Figure 6 ), as well as the average inlet velocity and inlet and outlet pressure difference of the model (see Figure 7 ).
[0098] It can be found that the simulation results can also achieve the expected effect by using the complex porous media model. The average flow rate at the model inlet stabilizes in a short time and is consistent with the set value. At the same time, the pressure difference between the inlet and outlet of the model fluctuates over time. The changes in the average flow rate and pressure difference are consistent with the changes in pressure and average injection speed (flow rate) during the actual steady-state phase permeability experiment.
[0099] In yet another embodiment of the present invention, a two-phase flow permeability curve boundary processing system is provided. The system can be used to implement the above-mentioned two-phase flow permeability curve boundary processing method, specifically comprising:
[0100] Input data module: used to receive and pre-process external input data, including but not limited to model size, injection speed, fluid properties (such as density, viscosity, interfacial tension, etc.);
[0101] Volume force calculation module: used to calculate the average density of the inlet boundary fluid according to the set injection speed, and calculate the pressure difference between the inlet and outlet according to the density difference between the inlet fluid and the outlet fluid, and then deduce the volume force (equivalent pressure gradient).
[0102] Macro-quantity solving module: uses the lattice Boltzmann method and the volume force calculation results to solve the macro-quantities of the fluid, including the velocity and density of the fluid. The fluid viscosity is calculated by the relaxation time parameter.
[0103] Body force correction module: Based on the updated fluid velocity and density, the body force is corrected to ensure that the inlet flow rate is consistent with the set value.
[0104] Migration step update module: uses the corrected volume force and fluid density to update the fluid velocity distribution according to the migration step of the lattice Boltzmann method;
[0105] Boundary fluid correction module: For fluid grid points close to the boundary, the distribution state of the fluid is corrected according to the color gradient to ensure a smooth transition of the fluid interface;
[0106] Perturbation step adjustment module: Substitute the fluid interfacial tension and the corrected volume force into the perturbation step to adjust the dynamic behavior of the fluid and optimize the simulation of the phase permeability curve;
[0107] Fluid distribution update module: After completing the perturbation step, a migration step is executed to transfer the updated fluid distribution to the adjacent grid points to ensure that the macroscopic quantity of the fluid is updated on the entire grid;
[0108] Result output module: used to output and visualize the final simulation results, including the distribution state of the fluid, phase permeability curve, pressure gradient, etc., and provide numerical data and graphical displays for analysis and verification.
[0109] In another embodiment of the present invention, a terminal device is provided, which includes a processor and a memory, wherein the memory is used to store a computer program, the computer program includes program instructions, and the processor is used to execute 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 (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc., which are the computing core and control core of the terminal, which are suitable for implementing one or more instructions, and are specifically suitable for loading and executing one or more instructions to implement the corresponding method flow or corresponding functions; the processor described in the embodiment of the present invention can be used for the operation of the boundary processing method of the two-phase flow permeability curve.
[0110] In another embodiment of the present invention, the present invention further provides a storage medium, specifically a computer-readable storage medium (Memory), which is a memory device in a terminal device for storing programs and data. It can be understood that the computer-readable storage medium here can include both the built-in storage medium in the terminal device and the extended storage medium supported by the terminal device. The computer-readable storage medium provides a storage space, which stores the operating system of the terminal. In addition, one or more instructions suitable for being loaded and executed by the processor are also stored in the storage space, and these instructions can be one or more computer programs (including program codes). It should be noted that the computer-readable storage medium here can be a high-speed RAM memory or a non-volatile memory, such as at least one disk memory.
[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 permeability curve boundary processing method in the above embodiment; one or more instructions in the computer-readable storage medium are loaded and executed by the processor.
[0112] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented 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] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks 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 produce 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.
[0114] 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.
[0115] 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.
[0116] Those skilled in the art will appreciate that the embodiments described herein are intended to help readers understand the implementation methods of the present invention, and should be understood that the protection scope of the present invention is not limited to such special statements and embodiments. Those skilled in the art can make various other specific variations and combinations that do not deviate from the essence of the present invention based on the technical revelations disclosed by the present invention, and these variations and combinations are still within the protection scope of the present invention.
Claims
1. A two-phase flow permeability curve boundary processing method based on the lattice Boltzmann method, characterized in that: The following steps are involved: S1: The average density of the inlet boundary fluid is calculated by the set injection speed, and the pressure difference between the inlet and outlet is calculated based on the density difference between the inlet fluid and the outlet fluid, and the volume force is further calculated; the magnitude of the volume force is calculated by the following formula: Among them, ρ in and ρ out are the average densities of the inlet and outlet fluids, is the square of the speed of sound, Ny is the distance between the inlet and outlet of the model; S2: Using the lattice Boltzmann method, combined with the calculation results of the volume force, the macroscopic quantities of the fluid are solved, including the velocity and density of the fluid. The fluid viscosity is calculated by the following formula: Where η k k is the fluid viscosity, τ k is the relaxation time of the fluid; S3: According to the updated fluid velocity and density, the volume force is corrected to ensure that the inlet flow rate is consistent with the set value. The correction formula is: Among them, v j is the set injection flow rate, F b is the initial calculated inlet and outlet pressure gradient, is the average flow velocity at the inlet boundary at the current moment; S4: Update the fluid velocity distribution according to the migration step of the lattice Boltzmann method using the corrected body force and fluid density; S5: For the fluid grid points close to the boundary, the distribution state of the fluid is corrected according to the color gradient to ensure a smooth transition of the fluid interface; S6: Substitute the fluid interfacial tension and the corrected volume force into the kneading step to optimize the simulation of the phase permeability curve; S7: After completing the pinching step, a migration step is performed to transfer the updated fluid distribution to the neighboring grid points to ensure that the macroscopic quantities of the fluid are updated on the entire grid; S8: Repeat steps S1 to S7 until the simulation converges or reaches the set number of time steps to obtain stable simulation results.
2. The two-phase flow permeability curve boundary processing method according to claim 1 is characterized in that: The capillary number Ca of the fluid in S1 is calculated as follows: Among them, μ t is the geometric mean viscosity of the two fluids, v in is a constant injection velocity, and σ is the interfacial tension between the two phase fluids.
3. The two-phase flow permeability curve boundary processing method according to claim 1 is characterized in that: S1 in The calculation formula is as follows: Among them, e i is a discrete set of velocities in different directions, m i is the average value of the density distribution function of the fluid in the inlet boundary area, v in is the inlet injection velocity, n is the unit vector in the direction of the inlet external normal, e i is a set of discrete velocities in different directions.
4. The two-phase flow permeability curve boundary processing method according to claim 3 is characterized in that: S1 out The calculation formula is as follows: Where N is the number of fluid grid points in the outlet boundary region, is the density distribution function of fluid k in the ith direction, and x is the fluid grid position.
5. The two-phase flow permeability curve boundary processing method according to claim 4 is characterized in that: S3 The calculation formula is: Among them, u j (x) is the fluid velocity at the inlet boundary position x, The import boundary area.
6. A two-phase flow permeability curve boundary processing system, characterized by: The system can be used to implement the two-phase flow permeability curve boundary processing method according to any one of claims 1 to 5, specifically comprising: Input data module: used to receive and pre-process external input data, including but not limited to model size, injection speed, and fluid characteristics; Volume force calculation module: used to calculate the average density of the inlet boundary fluid according to the set injection speed, and calculate the pressure difference between the inlet and outlet according to the density difference between the inlet fluid and the outlet fluid, and then deduce the volume force; Macro-quantity solving module: uses the lattice Boltzmann method and the volume force calculation results to solve the macro-quantities of the fluid, including the velocity and density of the fluid. The fluid viscosity is calculated by the relaxation time parameter. Body force correction module: according to the updated fluid velocity and density, the body force is corrected to ensure that the inlet flow rate is consistent with the set value; Migration step update module: uses the corrected volume force and fluid density to update the fluid velocity distribution according to the lattice Boltzmann method; Boundary fluid correction module: For fluid grid points close to the boundary, the distribution state of the fluid is corrected according to the color gradient to ensure a smooth transition of the fluid interface; Pinch step adjustment module: Substitute the fluid interfacial tension and the corrected volume force into the pinch step to optimize the simulation of the phase permeability curve; Fluid distribution update module: After completing the pinch step, a migration step is executed to transfer the updated fluid distribution to the neighboring grid points to ensure that the macroscopic amount of the fluid is updated on the entire grid; Result output module: used to output and visualize the final simulation results, including the distribution state of the fluid, phase permeability curve, pressure gradient, etc., and provide numerical data and graphical displays for analysis and verification.
7. A computer device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method for processing the boundary of the two-phase flow permeability curve as claimed in one of claims 1 to 5 is implemented.
8. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the program is executed by a processor, the boundary processing method of the two-phase flow permeability curve described in one of claims 1 to 5 is implemented.
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
Calculation method of shale gas-water relative permeability curve
CN117910185A
Method For Evaluating Relative Permeability For Fractional Multi-Phase, Multi-Component Fluid Flow Through Porous Media
US20140019053A1
Cited By
Large-density-ratio two-phase boiling heat transfer simulation method based on lattice Boltzmann algorithm
CN120373186A