COMSOL-based self-iterative rock damage calculation method and medium
By self-iteratively calculating rock damage in COMSOL, the problem of low efficiency of simulated rock damage and inconvenient research in the existing technology is solved, and efficient rock damage simulation and multi-field coupling research is realized, simplifying the calculation process and improving the Simulation accuracy and efficiency.
Patent Information
- Application Number
- CN202410936922.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-12
- Publication Date
- 2024-11-08
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The prior art is inefficient and inconvenient for multi-field coupling research when simulating rock damage, especially the need to calculate damage variables with the help of MATLAB, which affects the simulation accuracy and efficiency of rock damage.
Using COMSOL-based self-iteration method, the non-uniform material parameter distribution is generated in MATLAB by determining the mechanical and permeability parameters of rocks, and parameters and variables are defined in COMSOL to simulate seepage and mechanical fields, and damage is calculated using state variables. , and perform grid division and steady-state initial condition setting to realize the process of performing calculations completely in COMSOL.
It improves the solution efficiency of rock damage simulation, can effectively conduct multi-field coupling research, simplifies the calculation process, saves calculation time, and supports the research on rock damage mechanism under complex conditions.
Smart Images

Figure CN118917060A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of energy extraction and underground storage, and more specifically, relates to a method and medium for calculating rock damage based on COMSOL self-iteration. Background Art
[0002] To exploit unconventional energy resources, such as shale gas, which often resides in low-permeability reservoirs, fracture networks must be created through techniques such as hydraulic fracturing. Fractures formed by different mechanisms can affect energy extraction. Furthermore, to reduce greenhouse gas levels in the atmosphere, carbon dioxide (CO2) must be sequestered in formations. Large amounts of CO2 injection can damage formation rocks and compromise the integrity of the caprock. Other examples of fluid injection into formations include wastewater disposal, which also damages rock. Experimental simulation of rock damage has limitations because the damage process in formations involves complex thermal-fluid-solid-damage (THMD) multi-field interactions. Simulating real-world conditions during experiments is difficult, so numerical simulation is necessary. While many simulation software and methods are currently available for rock damage simulation, most are limited to fluid-solid coupling and lack the ease of development associated with multi-field coupling, such as in the finite element software COMSOL Multiphysics. COMSOL Multiphysics is a powerful multiphysics coupling software offering a rich set of interfaces and extensive custom development capabilities. Currently, simulation of rock damage based on COMSOL requires the use of MATLAB for stress transfer to calculate the rock damage factor. The interaction between COMSOL and MATLAB makes this method inefficient and inconvenient for multi-field coupling and considering more complex conditions. Summary of the Invention
[0003] In response to the above-mentioned defects or improvement needs of the existing technology, the present invention proposes a method and medium for simulating rock damage based on COMSOL self-iteration, so as to solve the disadvantage that the existing technology needs to use MATLAB to calculate damage variables, improve the solution efficiency, and facilitate multi-field coupling research.
[0004] To achieve the above object, according to one aspect of the present invention, a method for calculating rock damage based on COMSOL self-iteration is provided, comprising:
[0005] Determine the mechanical and permeability parameters of simulated rocks;
[0006] In MATLAB, the non-uniform material parameter distribution is generated by Weibull distribution and imported into COMSOL by interpolation.
[0007] Define parameters and variables in COMSOL, draw geometry, add seepage and mechanical fields, and set boundary conditions;
[0008] The damage at each step is calculated using state variables, and the mechanical and permeability parameters of the material are reduced;
[0009] The model is meshed using the Delaunay method, and the mesh at the injection port is locally encrypted.
[0010] Initialize the model stress and strain to simulate the actual stress state before injection;
[0011] Add a transient calculation and select Steady State as the initial value calculation model.
[0012] In some optional embodiments, the rock mechanical parameters include elastic modulus, Poisson's ratio, internal friction angle, tensile strength and compressive strength, and the rock permeability parameters include permeability and porosity.
[0013] In some optional embodiments, generating a non-uniform material parameter distribution by Weibull distribution in MATLAB and importing it into COMSOL by interpolation includes:
[0014] Write code in MATLAB to calculate the parameters of a Weibull-distributed heterogeneous material, determine the heterogeneity index of the Weibull distribution, and determine which parameters follow the Weibull distribution;
[0015] Set the MATLAB export format to Excel, with the first column being the x-coordinate, the second column being the y-coordinate, and the third column being the material parameter values corresponding to the coordinates;
[0016] Select the interpolation function in COMSOL to insert the material parameter values.
[0017] In some optional embodiments, the parameters defined in COMSOL include internal friction angle, model size, and injection pressure, and the variables include custom relationships between permeability and porosity as a function of pressure.
[0018] In some optional implementation schemes, the seepage field in COMSOL is simulated using Darcy's law, and the mechanical field is simulated using solid mechanics. The two are coupled through a poroelastic module, wherein the poroelastic coupling calculation formula of the model is: Where ρ is the fluid density, S is the water storage coefficient, p is the fluid pressure, μ is the fluid dynamic viscosity, k is the rock permeability, Q is the source term, α is the Biot coefficient, and ε vol is the volume strain, t is the time, σ' is the effective stress, I is the identity matrix, and F is the body force.
[0019] In some optional embodiments, for rectangular rock samples, the left and lower sides of the model are set as roller supports to limit vertical deformation, and the upper and right sides are set to corresponding stress values.
[0020] In some optional embodiments, the calculation of the damage at each step using state variables and the reduction of the mechanical parameters and permeation parameters of the material include:
[0021] The damage of each time step is calculated using state variables, and the influence of damage on the mechanical parameters of the material is calculated before each calculation step, thereby reducing the mechanical parameters and permeability parameters of the material. The strength calculation formula used to determine rock damage and the defined damage variables are as follows:
[0022]
[0023] Among them, F1 represents the tensile strength criterion, F2 represents the compressive strength criterion, σ1 and σ3 are the maximum and minimum principal stresses, respectively, and f t is the tensile strength, D is the damage variable, ε t and ε c are the tensile strain and compressive strain of the rock, ε1 and ε3 are the maximum principal strain and minimum principal strain of the rock, φ is the internal friction angle, and f c is the compressive strength, E0 is the initial elastic modulus, and E is the elastic modulus after damage.
[0024] In some optional embodiments, steady-state initial conditions are set to initialize the model, where the initial conditions include stress and strain, simulating the stress state before actual injection without considering fluid injection.
[0025] In some optional embodiments, the adding of transient calculation and selecting steady state as the initial value calculation model include:
[0026] Add a transient calculation, select steady state as the initial value, set the total time and time step according to the material parameters and injection pressure, calculate the model, and set the results to be displayed during the calculation. Adjust the model in time according to the calculation results; if no damage occurs or the expected target is not achieved when the set time is reached, adjust the injection pressure or the non-uniformity index of the Weibull distribution and recalculate.
[0027] According to another aspect of the present invention, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of any one of the above methods are implemented.
[0028] In general, the above technical solutions conceived by the present invention can achieve the following beneficial effects compared with the prior art:
[0029] This paper provides a COMSOL-based self-iterative rock damage simulation method. This method eliminates the need for MATLAB to calculate damage variables; the calculation process is performed entirely within COMSOL software. This improves solution efficiency and can solve for damage at any time step. It also facilitates multi-field coupling studies and provides technical support for studying rock damage mechanisms under complex conditions. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] To make the implementation objectives, technical solutions, and advantages of the present invention more clear, the technical solutions of the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings herein can be arranged and designed in a variety of different configurations.
[0031] In the attached figure:
[0032] Figure 1 This is a flow chart of a calculation method provided by an embodiment of the present invention;
[0033] Figure 2 This is a window diagram of a COMSOL setting provided by an embodiment of the present invention;
[0034] Figure 3 is a mesh diagram of a COMSOL model provided by an embodiment of the present invention;
[0035] Figure 4 This is a final moment rock damage map provided by an embodiment of the present invention;
[0036] Figure 5 This is a pore pressure distribution diagram of rock after damage at the final moment provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0037] In order to make the objectives, 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 embodiments. It should be understood that the specific embodiments described herein are merely for the purpose of explaining the present invention and are not intended to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below may be combined with each other as long as they do not conflict with each other.
[0038] The present invention provides a method for calculating rock damage based on COMSOL self-iteration, comprising:
[0039] Step 1: Determine the mechanical parameters and permeability parameters of the simulated rock based on experiments or literature research;
[0040] Step 2: To take into account the heterogeneity of rock properties, a non-uniform material parameter distribution is generated in MATLAB using Weibull distribution according to the size of the model, and then imported into COMSOL using interpolation.
[0041] Step 3: Define parameters and variables in COMSOL, draw the geometry, add the seepage field and mechanical field, and set the boundary conditions;
[0042] Step 4: Use state variables to calculate the damage at each step, and adjust it to calculate the impact of damage on material mechanical parameters before each step of calculation, and reduce the material parameters;
[0043] Step 5: To simulate non-uniform damage, the model is meshed using the Delaunay method, mainly using triangular meshes, and the mesh at the injection port is locally encrypted.
[0044] Step 6: To improve the convergence of the model, the steady-state initial conditions are set to initialize the model stress and strain, simulating the stress state before the actual injection without considering the injection;
[0045] Step 7. Add transient calculation, select steady state as the initial value, set the total time and time step according to the material parameters and injection pressure, calculate the model, and set the results to be displayed during calculation. Adjust the model in time according to the calculation results.
[0046] Furthermore, in step 1, the rock mechanical parameters include elastic modulus, Poisson's ratio, internal friction angle, tensile strength and compressive strength, and the rock permeability parameters include permeability and porosity.
[0047] Furthermore, in step 2, code for the Weibull distribution heterogeneous material parameters is written in MATLAB; based on literature research, the heterogeneity index of the Weibull distribution and which parameters obey the Weibull distribution are determined, and whether the generated distribution meets the requirements is judged; the export format of MATLAB is set to Excel, with the first column as the x-coordinate, the second column as the y-coordinate, and the third column as the material parameter values of the corresponding coordinates; and the interpolation function is selected in COMSOL to insert the material parameters.
[0048] Furthermore, in step 3, the parameters are defined including the internal friction angle, model size and injection pressure, and the variables include the custom relationship between permeability and porosity and pressure.
[0049] In COMSOL, the seepage field is simulated using Darcy's law, and the mechanical field is simulated using solid mechanics. The two are coupled through the poroelastic module. The poroelastic coupling calculation formula of the model is:
[0050]
[0051]
[0052] Where ρ is the fluid density, S is the water storage coefficient, p is the fluid pressure, μ is the fluid dynamic viscosity, k is the rock permeability, Q is the source term, α is the Biot coefficient, and ε vol is the volume strain, t is the time, σ' is the effective stress, I is the identity matrix, and F is the body force.
[0053] For rectangular rock samples, the left and lower sides of the model are set as roller supports to limit vertical deformation, and the upper and right sides are set to corresponding stress values.
[0054] Furthermore, in step 4, the state variables are used to calculate the damage of each time step, and it is set to calculate the impact of the damage on the material mechanical parameters before each step of calculation. Through this step, the damage variables are stored, updated and transferred.
[0055] The strength calculation formula used to judge rock damage and the defined damage variables are:
[0056] F1=σ1-f t
[0057]
[0058]
[0059] E=(1-D)E0
[0060] Where F1 represents the tensile strength criterion, F2 represents the compressive strength criterion, σ1 and σ3 are the maximum and minimum principal stresses, respectively, and f t is the tensile strength, D is the damage variable, ε t and ε c are the tensile strain and compressive strain of the rock, ε1 and ε3 are the maximum principal strain and minimum principal strain of the rock, φ is the internal friction angle, and f c is the compressive strength, E0 is the initial elastic modulus, and E is the elastic modulus after damage.
[0061] Furthermore, in step 5, in order to simulate non-uniform damage, the Delaunay triangular meshing method is adopted, and the mesh at the injection port is locally encrypted.
[0062] Furthermore, in step 6, in order to improve the convergence of the model, steady-state initial conditions are set to initialize the model. The initial conditions include stress and strain, simulating the stress state before the actual injection without considering the fluid injection.
[0063] Furthermore, step 7 can be implemented as follows:
[0064] 7.1. Preliminarily set the total time and time step according to the material parameters and injection pressure, and set the display of damage results during the calculation process;
[0065] 7.2. If no damage occurs or the expected target is not achieved within the set time, adjust the injection pressure or the non-uniformity index of the Weibull distribution and recalculate.
[0066] This example uses laboratory granite as the research object. The technical solution of the present invention is further described in detail below with reference to the accompanying drawings.
[0067] like Figure 1 As shown in the flowchart, the calculation of rock damage under water injection conditions includes the following steps:
[0068] S1. Determine the mechanical parameters and permeability parameters of granite based on literature research. Here, the elastic modulus of granite is taken as 35 GPa, Poisson's ratio is 0.2, internal friction angle is 40°, tensile strength is 12 MPa, compressive strength is 170 MPa, and permeability is 1×10 -19 m 2 , porosity 0.01.
[0069] For S2, the model dimensions were determined to be 0.3 m x 0.3 m, with an injection hole radius of 0.015 m. The Weibull distributions for elastic modulus and tensile strength were generated using MATLAB, exported to Excel, and imported into COMSOL using interpolation.
[0070] S3, define parameters in COMSOL, including compressive strength, internal friction angle, porosity, permeability, and injection pressure. Then draw the geometry, first draw a 0.3m*0.3m rectangle, then draw a circle with a radius of 0.015m, and finally use Boolean operations to obtain the calculation model. Add Darcy's law and solid mechanics, and couple the two through multi-physics poroelasticity, see Figure 2 The left and lower sides of the model are set as roller supports to limit vertical deformation, and the upper and right sides are set to corresponding stress values, which are set to 10 MPa and 15 MPa respectively, and the injection pressure is set to 25 MPa.
[0071] S4 uses state variables to calculate damage at each time step and is configured to calculate the effect of damage on the material mechanical parameters before each calculation step. This step allows the damage variables to be stored, updated, and transferred, eliminating the need for MATLAB calculations.
[0072] S5, using Delaunay meshing method, and at the same time encrypting the mesh at the injection port, see Figure 3 .
[0073] S6, set the steady state to initialize the stress and strain of the model, simulate the actual stress state, and do not consider injection. This setting can greatly improve the convergence and calculation speed of the model.
[0074] In S7, a transient calculation was added. The transient solver used the steady-state results as initial conditions, fully coupled the entire model, and performed a transient solve with a total time of 2000 seconds and a time step of 10 seconds. Finally, the model was calculated. This model had 10,994 meshes and 66,468 degrees of freedom, and the calculation time was only 16 seconds, significantly reducing the computation time compared to previous methods. Figure 4 The damage cloud at the final moment is displayed. Due to the non-uniform material parameters, the corresponding damage is also non-uniform. A damage variable of 1 indicates complete damage, and 0 indicates no damage. Figure 5 The pore pressure distribution cloud map after rock damage at the final moment is displayed. The pore pressure at the damaged part increases, which is consistent with the damage result.
[0075] The present application also provides a computer-readable storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory (for example, an SD or DX memory, etc.), a random access memory (RAM), a static random access memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a disk, an optical disk, a server, an App application store, etc., on which a computer program is stored. When the program is executed by a processor, the method for calculating rock damage based on COMSOL self-iteration in the method embodiment is implemented.
[0076] It should be pointed out that, according to the needs of implementation, the various steps / components described in this application can be split into more steps / components, or two or more steps / components or partial operations of steps / components can be combined into new steps / components to achieve the purpose of the present invention.
[0077] It will be easily understood by those skilled in the art that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A method for calculating rock damage based on COMSOL self-iteration, characterized in that: include: Determine the mechanical parameters and permeability parameters of simulated rocks; In MATLAB, the non-uniform material parameter distribution is generated by Weibull distribution and imported into COMSOL by interpolation. Define parameters and variables in COMSOL, draw geometry, add seepage and mechanical fields, and set boundary conditions; The damage at each step is calculated using state variables, and the mechanical parameters and permeability parameters of the material are reduced; The model is meshed using the Delaunay method, and the mesh at the injection port is locally encrypted; Initialize the model stress and strain to simulate the actual stress state before injection; Add a transient calculation and select Steady State as the initial value calculation model.
2. The method according to claim 1, characterized in that: Rock mechanical parameters include elastic modulus, Poisson's ratio, internal friction angle, tensile strength and compressive strength; rock permeability parameters include permeability and porosity.
3. The method according to claim 2, characterized in that The non-uniform material parameter distribution is generated by Weibull distribution in MATLAB and imported into COMSOL by interpolation, including: Write code in MATLAB for the Weibull distribution of heterogeneous material parameters, determine the heterogeneity index of the Weibull distribution, and which parameters follow the Weibull distribution; Set the MATLAB export format to Excel, with the first column being the x-coordinate, the second column being the y-coordinate, and the third column being the material parameter values for the corresponding coordinates; Select the interpolation function in COMSOL to insert material parameter values.
4. The method according to claim 3, characterized in that The parameters defined in COMSOL include the internal friction angle, model size, and injection pressure, and the variables include custom relationships between permeability and porosity as a function of pressure.
5. The method according to claim 4, characterized in that In COMSOL, the seepage field is simulated by Darcy's law, and the mechanical field is simulated by solid mechanics. The two are coupled through the poroelastic module. The poroelastic coupling calculation formula of the model is: Where ρ is the fluid density, S is the water storage coefficient, p is the fluid pressure, μ is the fluid dynamic viscosity, k is the rock permeability, Q is the source term, α is the Biot coefficient, ε vol is the volume strain, t is the time, σ' is the effective stress, I is the identity matrix, and F is the volume force.
6. The method according to claim 5, characterized in that For rectangular rock samples, the left and lower sides of the model were set as roller supports to limit vertical deformation, and the upper and right sides were set to corresponding stress values.
7. The method according to claim 6, characterized in that The state variables are used to calculate the damage at each step, and the mechanical parameters and permeability parameters of the material are reduced, including: The state variables are used to calculate the damage of each time step, and the influence of damage on the mechanical parameters of the material is calculated before each step of calculation, so as to reduce the mechanical parameters and permeability parameters of the material. The strength calculation formula used to judge rock damage and the defined damage variable are: F1 = σ1-f t , E=(1-D)E0, where F1 represents the tensile strength criterion, F2 represents the compressive strength criterion, σ1 and σ3 are the maximum and minimum principal stresses, respectively, and f t is the tensile strength, D is the damage variable, ε t and ε c are the tensile strain and compressive strain of the rock, ε1 and ε3 are the maximum principal strain and minimum principal strain of the rock, φ is the internal friction angle, and f c is the compressive strength, E0 is the initial elastic modulus, and E is the elastic modulus after damage.
8. The method according to claim 7, characterized in that The steady-state initial conditions are set to initialize the model. The initial conditions include stress and strain, simulating the stress state before the actual injection without considering the fluid injection.
9. The method according to claim 8, characterized in that The adding of transient calculation and selecting steady state as the initial value calculation model includes: Add transient calculation, select steady state as the initial value, set the total time and time step according to the material parameters and injection pressure, calculate the model, and set the display results during calculation, and adjust the model in time according to the calculation results; if no damage occurs or the expected goal is not achieved when the set time is reached, adjust the injection pressure or the non-uniformity index of the Weibull distribution and recalculate.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 9 are implemented.
Citation Information
Patent Citations
Fluid-solid-heat coupling simulation method for progressive collapse process of well wall of heterogeneous stratum
CN113324840A
Hot dry rock hydraulic fracture propagation calculation method considering water-cooling impact effect
CN115630509A
Permeability analysis method in rock shearing process, computer equipment and storage medium
CN118013703A
