A real-time cutting and three-dimensional visualization method of a corner point mesh geological model
By describing the geological model using a corner grid format, calculating the grid spatial coordinates, eliminating irrelevant surfaces, and reconstructing a three-dimensional geological grid, the problem of irrelevant information affecting display efficiency in reservoir research is solved, and efficient real-time segmentation and display of the geological model is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHANGZHOU UNIV
- Filing Date
- 2022-11-24
- Publication Date
- 2026-04-14
AI Technical Summary
In reservoir research, existing technologies struggle to efficiently eliminate a large amount of irrelevant information, which affects the target information, resulting in low display efficiency and difficulty in arbitrarily dividing and displaying geological models in real time.
The geological model is described using a corner grid format. By calculating the spatial coordinates of the grid, irrelevant grid surfaces are eliminated, a three-dimensional geological grid is reconstructed, and the segmented model is displayed in real time.
It effectively eliminates irrelevant data, improves display efficiency, reduces the resource usage of computer graphics processing units, and enables real-time segmentation of arbitrary polygons in geological models and real-time display of global appearance and internal details.
Smart Images

Figure CN115908733B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of geological model visualization technology, and in particular to a method for real-time segmentation and three-dimensional visualization of a corner grid geological model. Background Technology
[0002] In reservoir research, geological models described using corner grids are widely used because they can easily simulate faults, pinch-outs, and boundaries, overcoming the inflexibility of models described using orthogonal grids. Corner grid models can more accurately depict depth variations, fluid distribution, and fluid seepage characteristics on both sides of faults. Therefore, the corner grid method is widely applied in geological modeling and reservoir numerical simulation, and is compatible with most modeling and numerical simulation software.
[0003] With the development of refined reservoir description technology, geological models used in reservoir geological modeling and numerical simulation studies are becoming increasingly larger and more detailed. This results in increasingly larger and more refined grids. If all grid data is displayed in the view, the presence of much irrelevant information will lead to low display efficiency and interface lag. Therefore, before displaying the grid data, a hidden-hiding operation is necessary to remove irrelevant information from the display view.
[0004] In the post-processing of reservoir simulation, in order to conduct more in-depth research on local areas in the strata, it is necessary to divide the overall geological model. It is also necessary to perform a hidden-hiding operation on the grid data in the selected area before displaying it, so as to remove irrelevant information in the display view. Summary of the Invention
[0005] Addressing the shortcomings of existing algorithms, this invention efficiently displays the global appearance and internal details of strata, arbitrarily segments geological models, and displays them in real time. It effectively solves the problem that a large amount of irrelevant data is displayed in in-depth local studies of three-dimensional geological models, causing the target information to be affected. It has practical significance for establishing and implementing post-processing in reservoir simulation.
[0006] The technical solution adopted in this invention is: a method for real-time segmentation and three-dimensional visualization of a corner grid geological model, comprising the following steps:
[0007] Step 1: Generate a data file describing the geological model in corner grid format:
[0008] Step 2: Read the data file to obtain the number of grids NX, NY and NZ in each direction, the top and bottom coordinates of the vertical lines, the depth coordinates of the 8 vertices of all grids, and the grid attribute values;
[0009] Step 3: Traverse all grids and calculate P in a single grid.i Spatial coordinates (P) i x,P i y,P i z), and the calculated result (P) i x,P i y,P i z) Store a three-dimensional coordinate matrix until the matrix can represent the spatial coordinates of all grids in the geological model;
[0010] Furthermore, calculate P in a single grid. i Spatial coordinates (P) i x,P i y,P i The formula for z) is:
[0011]
[0012] in, These represent the three-dimensional coordinates of the top endpoint of the k-th line. P represents the three-dimensional coordinates of the bottom endpoint of the k-th line; i z represents the depth value of the i-th vertex in a grid.
[0013] Furthermore, the size of the three-dimensional coordinate matrix is (NX*NY*NZ)*8*3; where (NX*NY*NZ) represents the total number of grids in the geological model, 8 represents the number of vertices in a single grid, and 3 represents the number of variables required to describe the three-dimensional coordinates.
[0014] Step 4: Eliminate irrelevant mesh surfaces;
[0015] Furthermore, an irrelevant mesh face refers to a face in two meshes where all four vertices completely overlap; for a single mesh, only the faces around the mesh are considered, and if there are irrelevant mesh faces around the mesh, then the irrelevant mesh faces are not displayed.
[0016] Furthermore, the formula for determining irrelevant mesh surfaces is:
[0017]
[0018] in, This represents the spatial coordinates of the nth face of cell A. This represents the spatial coordinates of the nth face of cell B.
[0019] Step 5: Reconstruct the 3D geological mesh;
[0020] Furthermore, specifically including:
[0021] Loop through all the grids, obtaining 8 spatial coordinates and the state values of the surrounding unrelated grid faces during the traversal;
[0022] The 8 spatial coordinates of the grid correspond to the coordinate matrix [K*NY*NX+J*NX+I,:,:], where ":" represents all the data in that dimension;
[0023] The state values of the independent mesh faces correspond to the state matrix [K*NY*NX+J*NX+I]. The state values of the independent mesh faces are bitwise ANDed with 1, 2, 4, and 8 respectively. If the value is true, it means that the left, right, front, and back of the mesh are independent mesh faces respectively. If the value is false, no operation is performed. The non-independent mesh faces are added to the drawing dataset to draw the four sides and internal fault planes of the geological model.
[0024] Traverse all grids in the bottom and top layers of the geological model. For each traversed grid, the 8 spatial coordinates are [K*NY*NX+J*NX+I,:,:]. Add all the spatial coordinates corresponding to the top face of the top layer grid and the bottom face of the bottom layer grid to the drawing dataset, and draw the top and bottom faces of the geological model.
[0025] Step 6: Traverse the top-level mesh of the geological model and add the spatial coordinates of the top surface of the top-level mesh and the corresponding topological relationships to the drawing dataset;
[0026] Furthermore, specifically including:
[0027] Use rays to determine whether the coordinates of each center are within the segmented region;
[0028] Create a two-dimensional matrix of size NX×NY to record the I and J values of the center coordinates of the segmented region;
[0029] Iterate through the positions with a value of 1 in the two-dimensional matrix, and create a temporary array [1, 1, 1, 1] to represent the top, bottom, left, and right positions respectively;
[0030] During the traversal, if the top, bottom, left, and right positions of the traversed grid are 1, then the corresponding positions in the temporary array are changed to 0; otherwise, no changes are made. If the sum of all numbers in the temporary array is not 0, then the corresponding I, J values and the temporary array are saved as matrix M. If the sum of all numbers in the temporary array is 0, then the corresponding I, J values and the temporary array are saved as matrix N.
[0031] Step 7: Establish a three-dimensional geological grid for the divided areas;
[0032] Furthermore, specifically including:
[0033] Iterate through the grid in the divided region, and add the spatial coordinates and corresponding topological relationships of the faces to be drawn to the drawing dataset according to matrix M; add the spatial coordinates and corresponding topological relationships of the faces to be drawn to the drawing dataset according to matrix N.
[0034] Next, traverse the top and bottom grids, adding the spatial coordinates of the top of the top grid and the bottom of the bottom grid, along with their corresponding topological relationships, to the drawing dataset.
[0035] The beneficial effects of this invention are:
[0036] 1. In the 3D visualization of geological models described by corner grids, a large amount of irrelevant data is eliminated, solving the problem that the display of a large amount of irrelevant information affects the target information;
[0037] 2. When displaying large-scale geological models, it can significantly reduce the resource usage of computer graphics processing units and improve visualization efficiency;
[0038] 3. Real-time segmentation of geological models into arbitrary polygons and real-time display of the global appearance and internal details of the segmented geological models. Attached Figure Description
[0039] Figure 1 This is a flowchart of a method for real-time segmentation and 3D visualization of a corner grid geological model;
[0040] Figure 2 This is a spatial diagram of a single cell;
[0041] Figure 3 This is a schematic diagram of the surface and closed polygonal surface division regions of the top surface of the top grid or the bottom grid of the geological model;
[0042] Figure 4 It is a schematic diagram of the grid that is retained after the surface of the top grid of the top layer or the ground of the bottom grid of the geological model is divided into closed polygons;
[0043] Figure 5 This is a schematic diagram of the two-dimensional matrix operation process;
[0044] Figure 6 This is a rendering of the geological model after real-time segmentation. Detailed Implementation
[0045] The present invention will be further described below with reference to the accompanying drawings and embodiments. The drawings are simplified schematic diagrams, which only illustrate the basic structure of the present invention in a schematic manner, and therefore only show the components related to the present invention.
[0046] like Figure 1 As shown, a method for real-time segmentation and 3D visualization of a corner grid geological model includes the following steps:
[0047] Step 1: Generate a data file describing the geological model in corner grid format;
[0048] Using Petrel meshing software (this embodiment only exemplifies Petrel meshing software; other software that generates data volumes that meet the corner mesh file specifications also applies), a data file describing the geological model is created.
[0049] Step 2: The geological model's data file mainly consists of point data, including: the top and bottom coordinates of the vertical lines, the depth coordinates of the eight vertices of all grids, and the grid's attribute values. The grid's attribute values mainly describe parameters such as the geological model's permeability and saturation. In addition, it also includes parameters NX, NY, and NZ that describe the number of grids in the X, Y, and Z directions.
[0050] Step 3: Traverse all grids in the geological model. For the space of a single cell, such as... Figure 2 As shown, P in a single grid i Spatial coordinates (P) i x,P i y,P i z) is calculated as follows:
[0051]
[0052] in, These represent the three-dimensional coordinates of the top endpoint of the k-th line. P represents the three-dimensional coordinates of the bottom endpoint of the k-th line; i z represents the depth value of the i-th vertex in a grid;
[0053] The calculated result (P) i x,P i y,P i z) Store a three-dimensional coordinate matrix with a size of (NX*NY*NZ)*8*3; where (NX*NY*NZ) represents the total number of grids in the geological model, 8 represents the number of vertices in a single grid, and 3 represents the number of variables required to describe the three-dimensional coordinates.
[0054] Step 4: Eliminate irrelevant mesh faces; where an irrelevant mesh face is a face in two meshes where all four vertices completely overlap, i.e., a face that is not displayed in 3D visualization; for a single mesh, only the faces around the mesh are considered, and if there are irrelevant mesh faces around the mesh, then the irrelevant mesh faces will not be displayed.
[0055] The formula for determining an irrelevant mesh surface is as follows:
[0056]
[0057] In the formula, This represents the spatial coordinates of the nth face of cell A. This represents the spatial coordinates of the nth face in cell B. If the value is 0, it means that the face is considered the same as the face; otherwise, it means that the face is different.
[0058] The state value is used to describe the situation where there are irrelevant grid faces around the grid. The initial value of the state value is 0, which means that there are no irrelevant grid faces around the grid in the initial state. If there are irrelevant grid faces on the left, right, front and back, the state value is incremented by 1, 2, 4 and 8 respectively. If there are no irrelevant grid faces, no operation is performed on the state value. Finally, the state value is stored in a one-dimensional state matrix with a size of (NX*NY*NZ). The size of this dimension represents the total number of grids in the geological model.
[0059] Step 5: Reconstruct the three-dimensional geological mesh;
[0060] Specifically, it includes:
[0061] I, J, K represent the position of the grid within the entire grid, i.e., the grid in row I, column J, and layer K, where 0 ≤ I < NX, 0 ≤ J < NY, and 0 ≤ K < NZ. The entire grid is iterated through, obtaining its 8 spatial coordinates and the state values of its surrounding independent grid surfaces during the iteration. The 8 spatial coordinates of the grid correspond to the coordinate matrix [K*NY*NX+J*NX+I,:,:], where ":" represents all data in that dimension. The state values of the independent grid surfaces correspond to the state matrix [K*NY*NX+J*NX+I]. The state values of the independent grid surfaces are bitwise ANDed with 1, 2, 4, and 8 respectively. If the value is true, it indicates that the left, right, front, and back of the grid are independent grid surfaces, respectively; if the value is false, no operation is performed. The non-independent grid surfaces are added to the drawing dataset to draw the four sides and internal fault planes of the geological model.
[0062] Next, all grids from K=0 to K=NZ-1 are traversed, that is, all grids in the bottom and top layers of the geological model are traversed. For a single traversed grid, the 8 spatial coordinates are [K*NY*NX+J*NX+I,:,:]. The spatial coordinates corresponding to the top face of the top layer grid and the bottom face of the bottom layer grid are added to the drawing dataset to draw the top and bottom faces of the geological model. The drawing dataset contains two parts: one is the four spatial coordinates of the drawing face; the other is the topological relationship of the drawing face.
[0063] Step Six: Traverse the top-level mesh of the geological model, adding the spatial coordinates of the top surface of the top-level mesh and the corresponding topological relationships to the drawing dataset; after drawing, select the segmentation region, the segmentation region being a closed polygon, as shown in the image. Figure 3 As shown;
[0064] Obtain the spatial coordinates of the top face of the top grid in the drawing dataset, calculate and record the center coordinates of the top face of each grid.
[0065] Determine if each center coordinate is within the segmentation region; the method is ray casting, i.e., draw a straight line (two rays in opposite directions) through the target point. If the number of intersections between each ray and the polygon edge is odd, the point is within the segmentation region; otherwise, it is outside the segmentation region. If the center coordinates are within the segmentation region, draw the face to which those center coordinates belong. The mesh within the segmentation region is as follows: Figure 4 As shown;
[0066] Create a two-dimensional matrix of size NX×NY, and record the I and J values of the center coordinates of the segmented region; set the value of the [I,J] position in the two-dimensional matrix corresponding to the recorded I and J values to 1, and set the other unrecorded values to 0; then expand the two-dimensional matrix outward by one unit, and set the value of the expanded part to 0.
[0067] Iterate through the positions with a value of 1 in the 2D matrix, creating a temporary array [1, 1, 1, 1] to represent the top, bottom, left, and right positions, respectively. This array indicates whether the four sides of a single grid cell need to be drawn. In the temporary array, 1 indicates that the cell needs to be drawn, and 0 indicates that it does not. If the top, bottom, left, and right positions of a grid cell are all 1 during the iteration, then... Figure 5 As shown, if the sum of all numbers in the temporary array is not 0, then the corresponding I, J values and the temporary array are saved as matrix M, which is used to indicate whether the four sides of all layers of the edge grid in the I row and J column of the segmented region need to be drawn; if the sum of all numbers in the temporary array is 0, then the corresponding I, J values and the temporary array are saved as matrix N, which is used to indicate whether the four sides of all layers of the non-edge grid in the I row and J column of the segmented region need to be drawn.
[0068] Step 7: Establish a three-dimensional geological grid for the divided region:
[0069] The algorithm iterates through the grid within the divided region. During the iteration, for each traversed grid, its eight spatial coordinates are obtained by looking up the coordinate matrix. Based on matrix M, the spatial coordinates and corresponding topological relationships of the faces to be drawn are added to the drawing dataset. This part corresponds to the four sides of the edge grid and the edge grid fault plane of the segmented geological model. Based on matrix N, the spatial coordinates and corresponding topological relationships of the faces to be drawn are added to the drawing dataset. This part corresponds to the non-edge grid fault plane of the segmented geological model.
[0070] Next, the top and bottom meshes are traversed, and the spatial coordinates of the top of the top mesh and the bottom of the bottom mesh, along with their corresponding topological relationships, are added to the rendering dataset. This part corresponds to the top and bottom surfaces of the segmented geological model. The final effect of segmenting the geological model is displayed in real time, such as... Figure 6 As shown.
[0071] Based on the above-described preferred embodiments of the present invention, and through the foregoing description, those skilled in the art can make various changes and modifications without departing from the inventive concept. The technical scope of this invention is not limited to the contents of the specification, but must be determined according to the scope of the claims.
Claims
1. A method for real-time segmentation and 3D visualization of a corner grid geological model, characterized in that, Includes the following steps: Step 1: Generate a data file describing the geological model in corner grid format; Step 2: Obtain the number of grids NX, NY and NZ in each direction, the coordinate data of the top and bottom of the vertical line, the depth coordinate data of the 8 vertices of all grids and the grid attribute values; Step 3: Traverse all grids and calculate the value in a single grid. spatial coordinates and the calculated results Store a three-dimensional coordinate matrix until the matrix can represent the spatial coordinates of all grids in the geological model; Represents the first in a grid i The depth value of each vertex; Step 4: Eliminate irrelevant mesh surfaces; An unrelated mesh face is a face in which all four vertices of two meshes completely overlap. The formula for determining an unrelated mesh surface is: ; in, Represents a cell A A face n Each corresponding spatial coordinate Represents a cell B A face n Each corresponding spatial coordinate; Step 5: Reconstruct the 3D geological mesh; Step five specifically includes: Loop through all the grids, obtaining 8 spatial coordinates and the state values of the surrounding unrelated grid faces during the traversal; The state matrix corresponding to the state values of the independent mesh surfaces. The state values of the independent mesh faces are bitwise ANDed with 1, 2, 4 and 8 respectively; if the value is true, it means that the left, right, front and back of the mesh are independent mesh faces respectively; if the value is false, no operation is performed; the non-independent mesh faces are added to the drawing dataset to draw the four sides and internal fault planes of the geological model. I , J These represent the I-th row and J-th column of the edge grid of the segmented region, respectively; Traversing all grids in the bottom and top layers of the geological model, for each traversed grid, the 8 spatial coordinates are... Add all the spatial coordinates corresponding to the top surface of the top layer mesh and the bottom surface of the bottom layer mesh to the drawing dataset to draw the top and bottom surfaces of the geological model; Step 6: Traverse the top-level mesh of the geological model and add the spatial coordinates of the top surface of the top-level mesh and the corresponding topological relationships to the drawing dataset; Step 7: Establish a three-dimensional geological grid for the divided areas.
2. The method for real-time segmentation and three-dimensional visualization of a corner grid geological model according to claim 1, characterized in that, Calculate in a single grid spatial coordinates The formula is: ; in, They represent the first The three-dimensional coordinates of the top endpoint of the line. They represent the first The three-dimensional coordinates of the bottom endpoint of the line.
3. The method for real-time segmentation and three-dimensional visualization of corner grid geological models according to claim 1, characterized in that: The size of the three-dimensional coordinate matrix is ; in, 8 represents the total number of grids in the geological model, 8 represents the number of vertices in a single grid, and 3 represents the number of variables required to describe the three-dimensional coordinates.
4. The method for real-time segmentation and three-dimensional visualization of a corner grid geological model according to claim 1, characterized in that, Step six specifically includes: Use rays to determine whether the coordinates of each center are within the segmented region; Create size A two-dimensional matrix that records the center coordinates of the segmented region. value; Iterate through the positions with a value of 1 in the two-dimensional matrix, and create a temporary array [1, 1, 1, 1] to represent the top, bottom, left, and right positions respectively; During traversal, if the top, bottom, left, and right positions of the traversed grid are 1, then the corresponding positions in the temporary array are changed to 0; otherwise, no changes are made. If the sum of all numbers in the temporary array is not 0, then the corresponding... Values and temporary arrays are stored as matrices If the sum of all numbers in the temporary array is 0, then the corresponding... Values and temporary arrays are stored as matrices .
5. The method for real-time segmentation and three-dimensional visualization of a corner grid geological model according to claim 1, characterized in that, Step seven specifically includes: Iterate through the grid in the divided region, based on the matrix. Add the spatial coordinates of the faces to be drawn and their corresponding topological relationships to the drawing dataset; based on the matrix Add the spatial coordinates of the faces to be drawn and their corresponding topological relationships to the drawing dataset; Next, traverse the top and bottom grids, adding the spatial coordinates of the top of the top grid and the bottom of the bottom grid, along with their corresponding topological relationships, to the drawing dataset.
Citation Information
Patent Citations
Block model building method for complex geological structure
CN101582173A
Method for establishing complex geologic model quickly
CN103606191A