Multi-phase medium random filling method, electronic equipment, storage medium and device
By establishing the scale and density distribution trend chart of multiphase media, randomly generating fill coordinates and angles, the problem of random filling and distribution control of various media in the prior art is solved, and the controllability of media types, sizes, density and shapes is achieved, and the simulation needs of complex geological structures and material characteristics is met.
Patent Information
- Application Number
- CN202311686185.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-08
- Publication Date
- 2025-06-10
- Estimated Expiration
- 2043-12-08
AI Technical Summary
The prior art is difficult to achieve random filling of multiple media in seismic wave fields or numerical simulation of material mechanics, and the size, density and shape of the media are limited to meet the simulation needs of complex geological structures and material characteristics.
By establishing a scale distribution trend chart and density distribution trend chart of multiphase media, a standard fill graph database is established, and the filling coordinates and angles of the media are randomly generated, and whether overlap is determined based on adjacent coordinate points is determined, so that the random filling and distribution density of the media are controlled.
It is realized that in seismic wave field or material mechanics numerical simulation, random filling schemes for a variety of media are provided, with controllable media types, sizes, density and shapes, meeting the simulation needs of complex geological structures and material characteristics.
Smart Images

Figure CN120125708A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of applied geophysics, and more specifically, relates to a method for randomly filling multi-phase media, an electronic device, a storage medium, and a device. Background Art
[0002] In geological mapping and other engineering drawing software, it is usually necessary to fill media of different colors or shapes to represent different information such as minerals, rocks, and strata. However, in all current software, most can only draw the same color or regular patterns in a closed area. Even if there is a scheme for randomly filling patterns, due to limited parameters, only single-factor control can be performed, and the parameters such as the number of styles, size, and distribution density of the filled media are limited.
[0003] In addition, in the research of disciplines such as material mechanics and seismic wave fields, it is also necessary to design models with various media filling styles to carry out finite element numerical simulations and other studies to analyze their mechanical properties or seismic wave field response characteristics. However, there is no random media filling method constrained by scale fields and density fields.
[0004] The information disclosed in the background art section of the present invention is only intended to deepen the understanding of the general background art of the present invention, and should not be regarded as an admission or any form of suggestion that this information constitutes the prior art known to those skilled in the art. Summary of the Invention
[0005] The object of the present invention is to propose a method for randomly filling multi-phase media, an electronic device, a storage medium, and a device, so as to provide a simulation scheme including multiple media, having a random distribution characteristic, conforming to statistical laws, and with controllable media types, sizes, densities, and a flexible selection of graphic libraries when carrying out finite element numerical simulations of seismic wave fields or mechanical properties for the distributions of different rock masses, geological structures, or materials and mineral compositions in seismic wave field or material mechanics numerical simulation analysis.
[0006] To achieve the above object, the present invention proposes a method for randomly filling multi-phase media, an electronic device, a storage medium, and a device.
[0007] According to a first aspect of the present invention, a method for randomly filling multi-phase media is proposed, including:
[0008] Establish a scale distribution trend chart of different multi-phase media, and each coordinate point on the scale distribution trend chart is marked with a numerical value representing the size of the multi-phase media corresponding to the position of the coordinate point;
[0009] Determine the distribution density values of different multi-phase media based on the density distribution trend chart;
[0010] Establish a standard filling pattern database that stores arrays of boundary point coordinates for different contour styles, with each array corresponding to a standard filling pattern, and different multiphase media corresponding to different standard filling patterns;
[0011] Determine the filling quantity of different multiphase media, and randomly generate a filling coordinate for each multiphase media;
[0012] Read the standard filling pattern corresponding to the multiphase media from the pattern database;
[0013] Determine the magnification factor of the standard filling pattern based on the filling coordinate and the array corresponding to the standard filling pattern, and determine the size of the filling pattern of the multiphase media based on the magnification factor;
[0014] Randomly determine the filling angle of the filling pattern, and determine the rotation angle of the filling pattern based on the filling angle;
[0015] Based on the coordinate values and marker values of the filling coordinate and adjacent coordinate points, determine whether the filling pattern overlaps with the filling patterns of adjacent coordinate points. If there is an overlap, delete the filling coordinate and randomly generate a new filling coordinate for the multiphase media;
[0016] If there is no overlap, fill the multiphase media into the multiphase media simulation model based on the filling coordinate, the size of the filling pattern, and the filling angle;
[0017] Calculate the filling distribution density value of the multiphase media in the multiphase media simulation model, and determine whether the filling distribution density value is less than the corresponding distribution density value. If so, continue filling; if not, complete the filling.
[0018] Optionally, the multiphase media includes at least two media.
[0019] Optionally, the coordinate range of the array is between -1 and 1 to serve as the standard filling pattern.
[0020] Optionally, the generation range of the filling coordinate is the coordinate range of the multiphase media scale distribution trend diagram.
[0021] Optionally, the array is represented in the form of an m×2 matrix, i.e., [x i ,y i , where i ∈ [1, m];
[0022] where [x i ,y i represents the coordinate of the i-th inflection point of the polyline of the particle contour, and m is the number of inflection points.
[0023] Optionally, determining the rotation angle of the filling pattern based on the filling angle includes:
[0024]
[0025] where θ is the filling angle, [Zx i , Zy i are the coordinates of the boundary contour of the filling pattern, Z is the magnification factor of the standard filling pattern, [u i , v i are the coordinates of the filling pattern after rotating by θ in [Zx i , Zy i .
[0026] Optionally, filling the multiphase medium into the multiphase medium scale distribution trend diagram based on the filling coordinates, the size of the filling pattern, and the filling angle includes:
[0027] Taking the filling coordinates as the center, draw the rotated filling pattern on the multiphase medium simulation model based on the size of the filling pattern and the filling angle.
[0028] According to the second aspect of the present invention, a multiphase medium random filling device is proposed, including:
[0029] A first establishment module, configured to establish a scale distribution trend diagram of different multiphase media, and the marked value of each coordinate point on the scale distribution trend diagram represents the size of the multiphase medium corresponding to the position of the coordinate point;
[0030] A first determination module, configured to determine the distribution density values of different multiphase media based on the density distribution trend diagram;
[0031] A second establishment module, configured to establish a standard filling pattern database, where the standard filling pattern database stores an array of boundary point coordinates of different contour styles, each array corresponding to a standard filling pattern, and different multiphase media corresponding to different standard filling patterns;
[0032] A determination and random generation module, configured to determine the filling quantity of different multiphase media, and randomly generate a filling coordinate for each multiphase medium;
[0033] A random selection and reading module, configured to read the standard filling pattern corresponding to the multiphase medium based on the graphic database;
[0034] A second determination module, configured to determine the magnification factor of the standard filling pattern based on the filling coordinates and the array corresponding to the standard filling pattern, and determine the size of the filling pattern of the multiphase medium based on the magnification factor;
[0035] A random determination and rotation module for randomly determining the filling angle of the filled graphic and determining the rotation angle of the filled graphic based on the filling angle;
[0036] A judgment module for judging whether the filled graphic overlaps with the filled graphics of adjacent coordinate points based on the coordinate values and marked numerical values of the filling coordinates and adjacent coordinate points. If there is an overlap, the filling coordinates are deleted and the filling coordinates of the multiphase medium are randomly generated again;
[0037] A filling module for, if there is no overlap, filling the multiphase medium into the multiphase medium simulation model based on the filling coordinates, the size of the filled graphic, and the filling angle;
[0038] A calculation and filling module for calculating the filling distribution density value of the multiphase medium in the scale distribution trend graph, and judging whether the filling distribution density value is less than the corresponding distribution density value. If so, continue filling; if not, complete filling.
[0039] According to a third aspect of the present invention, an electronic device is provided. The electronic device includes:
[0040] At least one processor; and a memory communicatively connected to the at least one processor. Wherein, the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute any of the multiphase medium random filling methods described in the first aspect.
[0041] According to a fourth aspect of the present invention, a non-transitory computer-readable storage medium is provided. The non-transitory computer-readable storage medium stores computer instructions for causing a computer to execute any of the multiphase medium random filling methods described in the first aspect.
[0042] The beneficial effects of the present invention are as follows: By establishing a multi-phase medium scale distribution trend diagram where the marked value of each coordinate point represents the size of the multi-phase medium corresponding to that coordinate point, establishing a density distribution trend diagram of different multi-phase media to determine the distribution density values of different multi-phase media, establishing a standard filling graphic database where different standard filling graphics of different shapes correspond to different multi-phase media, determining the filling position, filling graphic, and size of the filling graphic of the multi-phase medium by randomly generating the coordinate points of the multi-phase medium and randomly selecting the multi-phase medium to be filled, and determining the filling angle of the filling graphic, deciding whether to fill according to whether the filling graphic of the multi-phase medium overlaps with the filling graphics of adjacent coordinate points, and judging whether the filling is completed according to the filling distribution density value of the multi-phase medium after filling; in the seismic wave field or numerical simulation analysis of material mechanics, for the distribution of different rock masses, geological structures, or materials and mineral compositions, when carrying out finite element numerical simulation of the seismic wave field or mechanical properties, the present invention provides a simulation scheme that includes multiple media, has both random distribution characteristics and conforms to statistical laws, and the types, sizes, and densities of the media are controllable, and the graphic library can be flexibly selected. The present invention can conveniently modify the distribution density, shape, and size of each of the multiple media. The present invention can conveniently change the simulation effect by adjusting parameters such as the simulation medium graphic library, medium scale field, and distribution density value. The present invention can also realize the simulation of more than three media by increasing the types of media, and be extended to three-dimensional space by increasing the dimension of parameters. It can also be conveniently applied in other similar industrial or engineering application fields.
[0043] The system of the present invention has other characteristics and advantages, which will be obvious from the accompanying drawings incorporated herein and the subsequent detailed description, or will be described in detail in the accompanying drawings incorporated herein and the subsequent detailed description. These accompanying drawings and detailed description are used together to explain the specific principles of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] By describing the exemplary embodiments of the present invention in more detail in conjunction with the accompanying drawings, the above and other objects, features, and advantages of the present invention will become more obvious. In the exemplary embodiments of the present invention, the same reference numerals generally represent the same components.
[0045] Figure 1 A flowchart showing the steps of a method for randomly filling multi-phase media according to the present invention is shown.
[0046] Figure 2 A flowchart showing the steps of a method for randomly filling multi-phase media according to Embodiment 2 of the present invention is shown.
[0047] Figure 3 A scale distribution trend diagram of Medium A according to Embodiment 2 of the present invention is shown.
[0048] Figure 4 Shows the scale distribution trend diagram of medium B according to Embodiment 2 of the present invention.
[0049] Figure 5 Shows the schematic diagram of the simulation results of medium A (elliptical scale 4 - 60m, density 100) and medium B (irregular polygon scale 10 - 30m, density 300) according to Embodiment 2 of the present invention.
[0050] Figure 6 Shows the schematic diagram of the simulation results of medium A (elliptical scale 4 - 60m, density 300) and medium B (irregular polygon scale 10 - 30m, density 100) according to Embodiment 2 of the present invention.
[0051] Figure 7 Shows the schematic diagram of the simulation results of medium A (elliptical scale 4 - 40m, density 500) and medium B (irregular polygon scale 30m, density 40) according to Embodiment 2 of the present invention.
[0052] Figure 8 Shows the schematic diagram of the simulation results of medium A (elliptical scale 4 - 60m, density 200) and medium B (irregular polygon scale 10 - 40m, density 200) according to Embodiment 2 of the present invention.
[0053] Figure 9 Shows the schematic diagram of the simulation results of medium A (elliptical scale 40m, density 50) and medium B (irregular polygon scale 40m, density 50) according to Embodiment 2 of the present invention.
[0054] Figure 10 Shows the schematic diagram of the simulation results of medium A (elliptical scale 20m, density 150) and medium B (irregular polygon scale 20m, density 150) according to Embodiment 2 of the present invention.
[0055] Figure 11 Shows the schematic diagram of the simulation results of medium A (triangular scale 4 - 60m, density 100) and medium B (irregular pentagon scale 10 - 30m, density 300) according to Embodiment 2 of the present invention.
[0056] Figure 12 Shows the schematic diagram of the simulation results of medium A (circular scale 4 - 60m, density 300) and medium B (rectangular scale 10 - 30m, density 100) according to Embodiment 2 of the present invention. Detailed implementation manners
[0057] The present invention will be described in more detail below with reference to the accompanying drawings. Although the preferred embodiments of the present invention are shown in the drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to make the present invention more thorough and complete, and to fully convey the scope of the present invention to those skilled in the art.
[0058] As Figure 1 shown, a multiphase medium random filling method according to the present invention includes:
[0059] Establish a scale distribution trend chart of different multiphase media, and the marked value of each coordinate point on the scale distribution trend chart represents the size of the multiphase medium corresponding to the coordinate point position;
[0060] Determine the distribution density values of different multiphase media based on the density distribution trend chart;
[0061] Establish a standard filling graphic database, which stores the boundary point coordinate arrays of different contour styles, each array corresponding to a standard filling graphic, and different multiphase media corresponding to different standard filling graphics;
[0062] Determine the filling quantity of different multiphase media, and randomly generate a filling coordinate for each multiphase medium;
[0063] Read the standard filling graphic corresponding to the multiphase medium based on the graphic database;
[0064] Determine the magnification factor of the standard filling graphic based on the filling coordinate and the array corresponding to the standard filling graphic, and determine the size of the filling graphic of the multiphase medium based on the magnification factor;
[0065] Randomly determine the filling angle of the filling graphic, and determine the rotation angle of the filling graphic based on the filling angle;
[0066] Judge whether the filling graphic overlaps with the filling graphics of adjacent coordinate points based on the filling coordinate and the coordinate values and marked values of adjacent coordinate points. If there is an overlap, delete the filling coordinate and randomly generate a new filling coordinate for the multiphase medium;
[0067] If there is no overlap, fill the multiphase medium into the multiphase medium simulation model based on the filling coordinate, the size of the filling graphic, and the filling angle;
[0068] Calculate the filling distribution density value of the multiphase medium in the multiphase medium simulation model, and judge whether the filling distribution density value is less than the corresponding distribution density value. If so, continue filling; if not, complete the filling.
[0069] Specifically, the present invention establishes trend charts of different multi-phase medium scale distributions, where the marked numerical value of a coordinate point represents the size of the multi-phase medium corresponding to that coordinate point, and each multi-phase medium corresponds to a scale distribution trend chart; determines the distribution density values of different multi-phase media by establishing density distribution trend charts of different multi-phase media, that is, determines the number of distributions of the medium per unit area in the density distribution trend chart through the density distribution trend chart of the multi-phase medium; establishes a standard filling graphic database with standard filling graphics of different shapes corresponding to different multi-phase media, determines the filling position, filling graphic and size of the filling graphic of the multi-phase medium by randomly generating coordinate points of the multi-phase medium and randomly selecting the multi-phase medium to be filled, and determines the filling angle of the filling graphic. Whether to perform filling is determined based on whether the filling graphic of the multi-phase medium overlaps with the filling graphics of adjacent coordinate points, that is, calculates the shortest distance between two coordinate points according to the filling coordinates and the coordinate values of adjacent coordinate points, and then determines whether the filling graphics corresponding to these two coordinate points overlap based on the marked numerical values of these two coordinate points. For example, the filling coordinate is (1, 2), and its corresponding marked numerical value is 2, and an adjacent coordinate point is (1, 5), and its corresponding marked numerical value is 2, then the shortest distance between these two coordinate points is 3. The filling graphic is centered on the filling coordinate. Assuming the filling graphic is a circle, the radius of the filling graphic is 1, and the radius of the filling graphic of the other coordinate point is also 1, 1 + 1 = 2 < 3, then the filling graphics of the filling coordinate and the adjacent coordinate point do not overlap; if they overlap, delete the filling coordinate and randomly generate the filling coordinate of the multi-phase medium again; if they do not overlap, fill the multi-phase medium into the multi-phase medium simulation model based on the filling coordinate, the size and filling angle of the filling graphic, and then determine whether the filling is completed according to the filling distribution density value of the multi-phase medium after filling. Calculate the filling distribution density value of the multi-phase medium in the multi-phase medium simulation model, and determine whether the filling distribution density value is less than the corresponding distribution density value. If so, continue filling until the filling distribution density value is greater than or equal to the corresponding distribution density value. If not, the filling is completed.
[0070] In one example, the multi-phase medium includes at least two media.
[0071] In one example, the coordinate range of the array is between -1 and 1 to serve as the standard filling graphic.
[0072] In one example, the generation range of the filling coordinates is the coordinate range of the multi-phase medium scale distribution trend chart.
[0073] In one example, the array is represented in the form of an m×2 matrix, that is, [x i , y i , i ∈ [1, m];
[0074] where [x i , y iThe coordinates of the $i$-th inflection point representing the polyline of the particle outer contour, and $m$ is the number of inflection points.
[0075] In one example, determining the rotation angle of the filling pattern based on the filling angle includes:
[0076]
[0077] where $\theta$ is the rotation angle of the filling pattern, $[Z_x$ i , $Z_y$ i are the coordinates of the boundary contour of the filling pattern, $Z$ is the magnification factor of the standard filling pattern, $[u$ i , $v$ i are the coordinates of the filling pattern after rotating $\theta$ at $[Z_x$ i , $Z_y$ i .
[0078] In one example, filling the multiphase medium into the multiphase medium scale distribution trend diagram based on the filling coordinates, the size of the filling pattern, and the filling angle includes:
[0079] Taking the filling coordinates as the center, draw the rotated filling pattern in the multiphase medium simulation model based on the size of the filling pattern and the filling angle.
[0080] The present invention will be further described below in conjunction with the accompanying drawings and specific embodiments, but it is not a limitation of the present invention. It should be noted that, without conflict, the embodiments in the present invention and the features in the embodiments can be combined with each other.
[0081] Embodiment 1
[0082] This embodiment provides a method for randomly filling a multiphase medium, including:
[0083] Establish a scale distribution trend diagram and a density distribution trend diagram of different multiphase media. The marked value of each coordinate point on the scale distribution trend diagram represents the size of the multiphase medium corresponding to the position of the coordinate point. The multiphase medium includes at least two media; determine the distribution density values of different multiphase media according to the density distribution trend diagram; establish a standard filling pattern database. The standard filling pattern database stores the boundary point coordinate arrays of different outer contour styles. Each array corresponds to a standard filling pattern. The coordinate range of the array is between -1 and 1 to serve as the standard filling pattern. The array is represented in the form of an $m\times2$ matrix, that is, $[x$ i , $y$ i , $i\in[1,m]$, where $[x$ i , $y$ iThe coordinates of the $i$-th inflection point representing the polyline of the particle's outer contour, where $m$ is the number of inflection points, and different multiphase media correspond to different standard filling patterns; determine the filling quantity of different multiphase media, and for each multiphase media, randomly generate a filling coordinate, where the generation range of the filling coordinate is the coordinate range of the scale distribution trend diagram of the multiphase media; based on the graphic database, read the standard filling pattern corresponding to the multiphase media; determine the magnification factor of the standard filling pattern based on the filling coordinate and the array corresponding to the standard filling pattern, and determine the size of the filling pattern of the multiphase media based on the magnification factor; randomly determine the filling angle of the filling pattern, and determine the rotation angle of the filling pattern based on the filling angle. where $\theta$ is the rotation angle of the filling pattern, and $[Z_x$ i , $Z_y$ i are the coordinates of the boundary contour of the filling pattern, $Z$ is the magnification factor of the standard filling pattern, and $[u$ i , $v$ i are the coordinates of the filling pattern after rotating by $\theta$ in $[Z_x$ i , $Z_y$ i ; based on the filling coordinate, the coordinate values of adjacent coordinate points, and the marked values, determine whether the filling pattern overlaps with the filling patterns of adjacent coordinate points. If there is an overlap, delete the filling coordinate and randomly generate a new filling coordinate for the multiphase media; if there is no overlap, fill the multiphase media into the multiphase media simulation model based on the filling coordinate, the size of the filling pattern, and the filling angle. With the filling coordinate as the center, draw the rotated filling pattern in the scale distribution trend diagram based on the size and filling angle of the filling pattern; calculate the filling distribution density value of the multiphase media in the multiphase media simulation model, and determine whether the filling distribution density value is less than the corresponding distribution density value. If so, continue filling; if not, complete the filling.
[0084] Example 2
[0085] As Figure 2 shown, this example provides a method for randomly filling multiphase media, including:
[0086] In the first step, first create the scale distribution field diagrams and density distribution trend diagrams of medium A and medium B, that is, the distribution trends of the shapes and sizes of medium A and medium B. The coordinate range of this distribution field is the same as the range to be simulated. The marked value corresponding to each coordinate point position on this scale distribution field represents the size of the medium shape at that position. This scale distribution field can be provided through actual measurement or through a mathematical formula, and it is in the form of a two-dimensional plane matrix, denoted as $Z_A(X, Y)$ and $Z_B(X, Y)$, where $(X, Y)$ is the coordinate position of the matrix, and $Z_A$ and $Z_B$ respectively represent the sizes of medium A and medium B at this point.
[0087] In the second step, determine the distribution density values DA and DB of medium A and medium B according to the density distribution trend diagram, which respectively represent the number of distributions of medium A and medium B per unit area in the density distribution trend diagram.
[0088] In the third step, establish a graphic database of the medium shapes. This database stores the coordinate arrays of boundary points of different contour styles, with the coordinate range between -1 and 1, regarded as the standard size, i.e., (x, y) ∈ [-1, 1], and it can be considered that the center of the medium is at the position of (0, 0). The number of inflection points of the boundary coordinates of each medium shape is not limited. This graphic library can be increased or decreased as needed. For the two-phase media A and B, their corresponding graphic contour arrays are specified respectively.
[0089] In the fourth step, initialize the statistical numbers ai = 1, bi = 1 of the medium to be simulated, where ai and bi respectively represent the statistical quantity values of medium A and medium B. And randomly generate a coordinate point (X, Y), with the coordinate range being the same as that of the medium scale field and density field.
[0090] In the fifth step, randomly select the medium A or B to be simulated, and read the coordinate array of this medium shape from the medium graphic library. This array is in the form of an m×2 matrix, i.e., [x i , y i , i ∈ [1, m], and [x i , y i represents the coordinate of the i-th inflection point of the polyline of the medium outline, and m is the number of inflection points.
[0091] In the sixth step, read the scale information ZA or ZB of the point (X, Y) from the corresponding medium scale field. This value reflects the scale size of the selected medium at (X, Y), and can also be understood as the magnification factor of the coordinates in the medium graphic library.
[0092] In the seventh step, magnify the selected medium boundary contour size by ZA or ZB times, i.e., the array (ZA or ZB) × [x i , y i = [Zx i , Zy i .
[0093] In the eighth step, generate a random angle value θ, θ ∈ [0, 2π], and use the following formula 1 to rotate the medium boundary contour coordinates [Zx i , Zy i to obtain the transformed coordinates [u i , v i .
[0094]
[0095] Step 9: Taking (X, Y) as the center point, obtain the boundary contour of the rotated medium, that is, a closed polyline range with endpoints [X + u i , Y + v i , where i ∈ [1, m].
[0096] Step 10: Calculate the distances from the point (X, Y) to the centers of all adjacent media, and determine whether there is an overlap based on the sizes of the two media. If there is an overlap between the two media, execute Step 5 above; otherwise, execute Step 11 below; when ai = 1 or bi = 1 (only one medium), skip this step and execute Step 11.
[0097] Step 11: Increment the medium simulation counter by 1, that is, ai = ai + 1, or bi = bi + 1;
[0098] Step 12: Draw the shape contour of Medium A or Medium B at (X, Y) and fill it with the corresponding color.
[0099] Step 13: Calculate the density da or db of the current Medium A or Medium B (the number of media divided by the area of the simulation region), and judge the magnitudes of da or db and the corresponding position density values DA or DB of Medium A or B: When da < DA or db < DB, execute Step 5 above; otherwise, the simulation process ends.
[0100] The following uses the multiphase medium random filling method of this embodiment for filling.
[0101] There are two media, A and B. Create their scale fields as shown in Figure 3 and Figure 4 respectively. Among them, the size of the scale field ZA of Medium A is between 4 - 60m, and the scale distribution shows a linearly increasing trend from top to bottom; while the scale field ZB of Medium B ranges from 10 - 30m, and the scale distribution shows a linearly decreasing trend from top to bottom. When Medium A selects an elliptical contour and the density is 100, and Medium B selects an irregular polygon contour and the density is 300, the simulation results are as shown in Figure 5 . When the scale fields of Medium A and Medium B remain unchanged, but the density ratio is changed, that is, when the density of Medium A is 300 and the density of Medium B is 100, the simulation results are shown in Figure 6 .
[0102] Still use the above elliptical Medium A and irregular polygon Medium B. When Medium B adopts a fixed scale field, that is, all elements of the ZB matrix are the same value, such as ZB = 30m, and the density is taken as 40; while the scale field distribution of Medium A shows a linearly increasing trend from bottom to top, with the range ZA between 4 - 40m, and the density is taken as 500. The simulation results are as shown in Figure 7 .
[0103] Still use the above-mentioned elliptical medium A and irregular polygon medium B. When the scale fields of medium A and medium B maintain the same direction change trend, that is, the medium scale becomes larger from top to bottom, where the scale field range of ZA is from 4 - 60m, the scale field range of ZB is from 10 - 40m, and the densities of both medium A and medium B are 200. The simulation results are as Figure 8 shown.
[0104] Still use the above-mentioned elliptical medium A and irregular polygon medium B. When the scale fields of medium A and medium B adopt fixed scales, both ZA and ZB are 40m, and the densities are both 50, the simulation results are as Figure 9 shown.
[0105] Still use the above-mentioned elliptical medium A and irregular polygon medium B. When the scale fields of medium A and medium B adopt fixed scales, both ZA and ZB are 20m, and the densities are both 150, the simulation results are as Figure 10 shown.
[0106] The contour arrays of different media can be selected from the graphics library to achieve the simulation of different media shapes. Figure 11 and Figure 12 are both the simulation results using the Figure 3 and Figure 4 scale fields. Among them, Figure 11 in, medium A adopts a triangle and medium B adopts a pentagon; Figure 12 in, medium A adopts a circle and medium B adopts a rectangle. It can be seen that different simulation effects can be achieved by flexibly selecting the shapes of the media.
[0107] Example 3
[0108] A multi-phase medium random filling device is proposed, including:
[0109] The first establishment module is used to establish the scale distribution trend diagram and density distribution trend diagram of different multi-phase media. The marked value of each coordinate point on the scale distribution trend diagram represents the size of the multi-phase medium corresponding to the position of this coordinate point;
[0110] The first determination module is used to determine the distribution density values of different multi-phase media based on the density distribution trend diagram;
[0111] The second establishment module is used to establish a standard filling graphics database. The standard filling graphics database stores the boundary point coordinate arrays of different external contour styles. Each array corresponds to a standard filling graphic, and different multi-phase media correspond to different standard filling graphics;
[0112] The determination and random generation module is used to determine the filling quantity of different multi-phase media and randomly generate a filling coordinate for each multi-phase medium;
[0113] A random selection and reading module, configured to read a standard filling pattern corresponding to a multiphase medium based on a graph database;
[0114] A second determination module, configured to determine the magnification factor of the standard filling pattern based on the filling coordinates and an array corresponding to the standard filling pattern, and determine the size of the filling pattern of the multiphase medium based on the magnification factor;
[0115] A random determination and rotation module, configured to randomly determine the filling angle of the filling pattern, and determine the rotation angle of the filling pattern based on the filling angle;
[0116] A judgment module, configured to judge whether the filling pattern overlaps with the filling patterns of adjacent coordinate points based on the filling coordinates, the coordinate values of adjacent coordinate points, and the marking values. If there is an overlap, delete the filling coordinates and randomly generate the filling coordinates of the multiphase medium again;
[0117] A filling module, configured to, if there is no overlap, fill the multiphase medium into the multiphase medium simulation model based on the filling coordinates, the size of the filling pattern, and the filling angle;
[0118] A calculation and filling module, calculates the filling distribution density value of the multiphase medium in the scale distribution trend graph, judges whether the filling distribution density value is less than the corresponding distribution density value. If so, continue filling. If not, complete the filling.
[0119] Embodiment 4
[0120] This embodiment provides an electronic device, which includes:
[0121] At least one processor; and a memory communicatively connected to the at least one processor; wherein, the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the random filling method of the multiphase medium in Embodiment 1.
[0122] The electronic device according to an embodiment of the present disclosure includes a memory and a processor, and the memory is used to store non-temporary computer-readable instructions. Specifically, the memory may include one or more computer program products, and the computer program products may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory, etc. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc.
[0123] The processor can be a central processing unit (CPU) or other forms of processing units with data processing capabilities and / or instruction execution capabilities, and can control other components in the electronic device to perform desired functions. In one embodiment of the present disclosure, the processor is used to run the computer-readable instructions stored in the memory.
[0124] Those skilled in the art should understand that, in order to solve the technical problem of how to obtain good user experience effects, this embodiment may also include well-known structures such as communication buses, interfaces, etc., and these well-known structures should also be included in the protection scope of the present disclosure.
[0125] For a detailed description of this embodiment, reference may be made to the corresponding descriptions in the foregoing embodiments, and details will not be repeated here.
[0126] Embodiment 5
[0127] This embodiment provides a non-transitory computer-readable storage medium that stores computer instructions for causing a computer to execute the multi-phase medium random filling method in Embodiment 1.
[0128] According to an embodiment of the present disclosure, a non-transitory computer-readable instruction is stored on a computer-readable storage medium. When the non-transitory computer-readable instruction is run by a processor, all or part of the steps of the methods of the foregoing embodiments of the present disclosure are executed.
[0129] The above-mentioned computer-readable storage media include, but are not limited to: optical storage media (e.g., CD-ROM and DVD), magneto-optical storage media (e.g., MO), magnetic storage media (e.g., magnetic tapes or external hard drives), media with built-in rewritable non-volatile memories (e.g., memory cards), and media with built-in ROMs (e.g., ROM cartridges).
[0130] The embodiments of the present invention have been described above. The above description is exemplary and not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations are obvious to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments.
[0131] The embodiments of the present invention have been described above. The above description is exemplary and not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations are obvious to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments.
Claims
1. A method for randomly filling a multiphase medium, characterized in that, it includes: establishing a scale distribution trend diagram and a density distribution trend diagram of different multiphase media, wherein the marked value of each coordinate point on the scale distribution trend diagram represents the size of the multiphase medium corresponding to the position of the coordinate point; determining the distribution density values of different multiphase media based on the density distribution trend diagram; establishing a standard filling graphic database, which stores boundary point coordinate arrays of different contour styles, each array corresponding to a standard filling graphic, and different multiphase media corresponding to different standard filling graphics; determining the filling quantities of different multiphase media, and randomly generating a filling coordinate for each multiphase medium; randomly selecting a multiphase medium, and reading the standard filling graphic corresponding to the multiphase medium based on the graphic database; determining the magnification factor of the standard filling graphic based on the filling coordinate and the array corresponding to the standard filling graphic, and determining the size of the filling graphic of the multiphase medium based on the magnification factor; randomly determining the filling angle of the filling graphic, and determining the rotation angle of the filling graphic based on the filling angle; judging whether the filling graphic overlaps with the filling graphics of adjacent coordinate points based on the coordinate values and marked values of the filling coordinate and adjacent coordinate points. If there is an overlap, delete the filling coordinate and randomly generate a filling coordinate of the multiphase medium again; if there is no overlap, filling the multiphase medium into the multiphase medium simulation model based on the filling coordinate, the size of the filling graphic, and the filling angle; calculating the filling distribution density value of the multiphase medium in the multiphase medium simulation model, and judging whether the filling distribution density value is less than the corresponding distribution density value. If so, randomly select a multiphase medium to continue filling. If not, complete the filling.
2. The method for randomly filling a multiphase medium according to claim 1, characterized in that, the multiphase medium includes at least two media.
3. The method for randomly filling a multiphase medium according to claim 1, characterized in that, the coordinate range of the array is between -1 and 1 to serve as the standard filling graphic.
4. The method for randomly filling a multiphase medium according to claim 1, characterized in that, the generation range of the filling coordinate is the coordinate range of the scale distribution trend diagram of the multiphase medium.
5. The method for randomly filling a multiphase medium according to claim 1, characterized in that, The array is represented in the form of an m×2 matrix, i.e., [x i , y i , where i ∈ [1, m]; where [x i , y i represents the coordinates of the i-th inflection point of the polyline of the particle outer contour, and m is the number of inflection points.
6. The method for randomly filling a multiphase medium according to claim 1, characterized in that, the determining the rotation angle of the filling graphic based on the filling angle includes: where θ is the rotation angle of the filled figure, [Zx i , Zy i are the coordinates of the boundary contour of the filled figure, Z is the magnification factor of the standard filled figure, [u i , v i are the coordinates of the filled figure after rotating by θ in [Zx i , Zy i .
7. The method for randomly filling a multiphase medium according to claim 1, characterized in that, the filling the multiphase medium into the scale distribution trend diagram of the multiphase medium based on the filling coordinate, the size of the filling graphic, and the filling angle includes: drawing the rotated filling graphic in the multiphase medium simulation model with the filling coordinate as the center, based on the size of the filling graphic and the filling angle.
8. An electronic device, characterized in that, the electronic device includes: At least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the multiphase medium random filling method according to any one of claims 1-7.
9. A non-transitory computer-readable storage medium, characterized in that, the non-transitory computer-readable storage medium stores computer instructions for causing a computer to execute the multiphase medium random filling method according to any one of claims 1-7.
10. A multiphase medium random filling device, characterized in that, comprising: a first establishing module for establishing a scale distribution trend graph of different multiphase media, wherein the marked value of each coordinate point on the scale distribution trend graph represents the size of the multiphase medium corresponding to the position of the coordinate point; a first determining module for determining the distribution density values of different multiphase media based on the density distribution trend graph; a second establishing module for establishing a standard filling graphic database, the standard filling graphic database storing boundary point coordinate arrays of different contour styles, each array corresponding to a standard filling graphic, and different multiphase media corresponding to different standard filling graphics; a determining and randomly generating module for determining the filling quantities of different multiphase media and randomly generating a filling coordinate for each multiphase medium; a randomly selecting and reading module for randomly selecting a multiphase medium and reading the standard filling graphic corresponding to the multiphase medium based on the graphic database; a second determining module for determining the magnification factor of the standard filling graphic based on the filling coordinate and the array corresponding to the standard filling graphic, and determining the size of the filling graphic of the multiphase medium based on the magnification factor; a randomly determining and rotating module for randomly determining the filling angle of the filling graphic and determining the rotation angle of the filling graphic based on the filling angle; a judging module for judging whether the filling graphic overlaps with the filling graphics of adjacent coordinate points based on the coordinate values and marked values of the filling coordinate and adjacent coordinate points, and if so, deleting the filling coordinate and randomly generating the filling coordinate of the multiphase medium again; a filling module for, if not overlapping, filling the multiphase medium into the multiphase medium simulation model based on the filling coordinate, the size of the filling graphic, and the filling angle; a calculating and filling module for calculating the filling distribution density value of the multiphase medium in the multiphase medium simulation model, judging whether the filling distribution density value is less than the corresponding distribution density value, and if so, continuing to fill, and if not, completing the filling.
Citation Information
Patent Citations
Method and system for randomly generating porous medium model based on Fourier series
CN116882255A
Pore-scale geometric models for interpretation of downhole formation evaluation data
US20060276969A1
Variable voxel size in non-continuous deposition process
US20230321916A1
Improved terrain rendering in a three-dimentsional environment
WO2003081537A1