A reservoir capacity calculation method, device, equipment and medium
By employing a hierarchical reservoir capacity calculation strategy, and utilizing attribute data such as the centroid coordinates and surface normal vectors of triangles, the reservoir capacity is calculated, solving the problem of low efficiency in traditional methods and achieving more efficient and accurate reservoir capacity calculation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA WATER RESOURCES PEARL RIVER PLANNING SURVERYING & DESIGNING
- Filing Date
- 2026-03-13
- Publication Date
- 2026-06-16
AI Technical Summary
Traditional methods for calculating reservoir capacity generate complex, irregular geometric shapes when dealing with triangles cut by the water surface, resulting in low computational efficiency and failing to meet the needs of engineering applications for fast and accurate calculations.
A layered reservoir capacity calculation strategy is adopted. By obtaining the vertex coordinates, centroid coordinates, surface normal vectors, and area of the triangle, the volume of the effective triangle projected onto the horizontal plane where the target water level is located is determined and transformed into a regularized calculation, avoiding the direct processing of irregular geometric shapes.
It significantly improves the efficiency and accuracy of reservoir capacity calculation, simplifies the calculation process for complex irregular volumes, and enhances the operability and accuracy of the calculation.
Smart Images

Figure CN122220652A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of water conservancy engineering technology, and more specifically, to a method, apparatus, equipment, and medium for calculating reservoir capacity. Background Technology
[0002] Traditional reservoir capacity calculations rely on triangulation of the terrain model, summing the volumes of the projections of each triangle onto a designated water surface. However, calculating the volume of a single triangular projection requires considering the positional relationship between the triangle's vertices and the water surface, categorizing it as either fully underwater or partially underwater. Furthermore, irregular projections are geometrically divided into triangular prisms, square pyramids, irregular pentahedrons, etc., and their volumes are calculated separately and then summed to obtain the reservoir capacity. This method suffers from several drawbacks. For instance, processing numerous triangles cut by the water surface generates various complex irregular geometric shapes; relying solely on triangle vertex coordinates makes it difficult to accurately calculate the volume of such geometric shapes; and the cumbersome calculation process results in low overall reservoir capacity calculation efficiency, failing to meet the demands of engineering applications for rapid and accurate calculations. Summary of the Invention
[0003] In view of this, the purpose of the present invention is to provide a method, apparatus, equipment and medium for calculating reservoir capacity, so as to improve calculation efficiency and accuracy.
[0004] Firstly, this application provides a method for calculating the capacity of a reservoir, including: Obtain the attribute data of all triangles in the 3D terrain model of the target reservoir and at least one target water level elevation; wherein, the attribute data includes the vertex coordinates of each triangle; Based on all attribute data and the target water level elevation, a tiered reservoir capacity calculation strategy is adopted to determine the volume of the projection of each triangle onto the horizontal plane containing the target water level elevation. The tiered reservoir capacity calculation strategy is as follows: based on the vertex coordinates of the target triangle and the target water level elevation, the effective triangles within the target triangle are determined. Then, based on the centroid coordinates, surface normals, and area of the effective triangles, the volume of the projection of each effective triangle onto the horizontal plane containing the target water level elevation is determined, which serves as the volume of the projection of the target triangle onto the horizontal plane containing the target water level elevation. The effective triangles are those located below the target water level elevation. The centroid coordinates, surface normals, and area of the effective triangles are calculated based on the vertex coordinates of the effective triangles. The reservoir capacity is determined based on the volume of all triangles projected onto the horizontal plane containing the target water level.
[0005] Optionally, valid triangles include first-type valid triangles and second-type valid triangles; The first type of valid triangle is one in which the coordinates of all three vertices of the target triangle are below the target water level. The second type of valid triangle is the triangle formed by the portion of the target triangle that lies below the target water level after the target triangle is cut by the horizontal plane where the target water level is located.
[0006] Optionally, determining the second type of valid triangles includes: Based on the target triangle and the horizontal plane where the target water level is located, determine the intersection point of the horizontal plane where the target water level is located and the side of the target triangle; Based on the intersection point and the vertex of the target triangle that is below the target water level, a polygon below the target water level is obtained; When the polygon is a triangle, the polygon is determined as a second type of valid triangle.
[0007] Optionally, the method for calculating reservoir capacity provided in this application further includes: When the polygon is a quadrilateral, the quadrilateral is divided into two triangles along any diagonal, and both triangles are considered as valid triangles of the second type.
[0008] Optionally, based on the centroid coordinates, surface normal vectors, and area of the effective triangle, the volume of the projection of the effective triangle onto the horizontal plane containing the target water level is determined, including: The volume of the effective triangle projected onto the horizontal plane containing the target water level is determined using preset volume calculation rules. The preset volume calculation rules are as follows: the absolute value of the elevation difference of the effective triangle is determined based on the centroid elevation coordinates of the effective triangle and the target water level; the angle between the surface normal vector of the effective triangle and the vertical direction is determined based on the surface normal vector of the effective triangle and the vertical direction; and the volume of the effective triangle projected onto the horizontal plane containing the target water level is determined based on the area of the effective triangle, the absolute value of the elevation difference, and the angle.
[0009] Optionally, the method for calculating reservoir capacity provided in this application further includes: When the effective triangle is a first-class effective triangle, the area, surface normal vector, and centroid elevation coordinates of the first-class effective triangle itself are used as the area, surface normal vector, and centroid elevation coordinates of the effective triangle. The volume of the effective triangle projected onto the horizontal plane where the target water level is located is determined according to the preset volume calculation rules.
[0010] Optionally, the method for calculating reservoir capacity provided in this application further includes: When the effective triangle is a second type of effective triangle, the area, surface normal vector, and centroid elevation coordinates of each second type of effective triangle are used as the area, surface normal vector, and centroid elevation coordinates of the effective triangle. The volume of the projection of each second type of effective triangle is determined according to the preset volume calculation rules, and the sum of the volumes of the projections of all second type of effective triangles is used as the volume of the projection of the target triangle onto the horizontal plane where the target water level is located.
[0011] Secondly, this application provides a device for calculating the capacity of a reservoir, comprising: The data acquisition module is used to acquire the attribute data of all triangles in the three-dimensional terrain model of the target reservoir and at least one target water level elevation; wherein, the attribute data includes vertex coordinates; The reservoir capacity calculation module is used to determine the volume of the projection of each triangle onto the horizontal plane containing the target water level, based on all attribute data and the target water level elevation, using a layered reservoir capacity calculation strategy. The layered reservoir capacity calculation strategy is as follows: based on the vertex coordinates of the target triangle and the target water level elevation, the effective triangles within the target triangle are determined; based on the centroid coordinates, surface normals, and areas of the effective triangles, the volume of the projection of the effective triangles onto the horizontal plane containing the target water level elevation is determined as the volume of the projection of the target triangle onto the horizontal plane containing the target water level elevation; the effective triangles are triangles located below the target water level elevation; and the reservoir capacity of the target reservoir is determined based on the volumes of the projections of all triangles onto the horizontal plane containing the target water level elevation.
[0012] Thirdly, this application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the above-mentioned method for calculating the reservoir capacity.
[0013] Fourthly, this application provides a computer-readable storage medium storing computer instructions, which, when executed by a processor, implement the above-mentioned method for calculating the reservoir capacity.
[0014] This invention provides a method, apparatus, equipment, and medium for calculating reservoir capacity. It involves obtaining the vertex coordinates of all triangles in a three-dimensional terrain model of the target reservoir and at least one target water level elevation. Based on the vertex coordinates and target water level elevation of the target triangles, effective triangles are determined. Then, based on the centroid coordinates, surface normals, and area of the effective triangles, the volume of the projection of the effective triangles onto the horizontal plane containing the target water level elevation is determined, which serves as the volume of the projection of the target triangles onto the horizontal plane containing the target water level elevation. The effective triangles are triangles located below the target water level elevation. The centroid coordinates, surface normals, and area of the effective triangles are calculated based on the vertex coordinates of the effective triangles. Based on the volumes of the projections of all triangles onto the horizontal plane containing the target water level elevation, the reservoir capacity is determined, thereby improving computational efficiency and accuracy.
[0015] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0016] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0017] Figure 1 A schematic diagram of the structure of the projector provided in an embodiment of the present invention is shown; Figure 2 A flowchart illustrating the method for calculating reservoir capacity provided in an embodiment of the present invention is shown; Figure 3 This invention provides a schematic diagram of the structure of a three-dimensional terrain model of a target reservoir. Figure 4 This invention provides a schematic diagram of the structure of the inner triangle of the target reservoir's volume and water level elevation, as shown in an embodiment of the invention. Figure 5 This diagram illustrates the structure of an effective triangle divided by a target water level elevation, as provided in an embodiment of the present invention. Figure 6 This invention provides a schematic diagram illustrating the elevation difference between the horizontal plane containing the target elevation and the centroid of the effective triangle, as shown in an embodiment of the invention. Figure 7 This diagram illustrates the structure of an effective triangle divided by the horizontal plane containing the centroid, as provided in an embodiment of the present invention. Figure 8A schematic diagram of a structure with equal volumes of the projected bodies of a triangle provided in an embodiment of the present invention is shown; Figure 9 A schematic diagram of the structure of the equivalent body of the irregular prism provided in the embodiment of the present invention is shown; Figure 10 This diagram illustrates the structure of the angle between the effective triangle and the projection plane provided in an embodiment of the present invention. Figure 11 A schematic diagram of the structure of a reservoir capacity calculation device provided in an embodiment of the present invention is shown; Figure 12 A schematic diagram of the structure of an electronic device provided in an embodiment of the present invention is shown. Detailed Implementation
[0018] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.
[0019] In existing technologies, when calculating reservoir capacity, the reservoir topography is divided into triangular meshes based on the water level elevation plane required for capacity calculation. The triangles and their vertex coordinates within the subsurface topographic triangular mesh are extracted, and the projection of each triangle △ABC onto the water level elevation plane is calculated. The volume of all projections is then summed to obtain the reservoir capacity. However, when calculating the volume of the projections, numerous irregular square pyramids exist. and irregular pentahedron ,like Figure 1As shown, calculating the volume of an irregular body is difficult when only the vertex coordinates are known. For example, it is necessary to calculate the base area and height of an irregular prism. If the projected body is an irregular pentahedron, the volume calculation method is complex, and existing technologies only use symbols to represent specific calculation methods. Therefore, in the process of calculating reservoir capacity by accumulating the volume of the projected triangles onto the water surface, the presence of a large number of irregular bodies and the fact that only the vertex coordinates of the irregular bodies are known leads to the technical problems of high difficulty and low efficiency in volume calculation. This application provides a method for calculating reservoir capacity. By obtaining the vertex coordinates of all triangles in the three-dimensional terrain model of the target reservoir and the target water level elevation, the effective triangles located below the target water level elevation are determined based on the vertex coordinates and target water level elevation of the target triangles. The volume of the projected body of the effective triangles onto the horizontal plane where the target water level elevation is located is calculated based on the centroid coordinates, surface normal vectors, and areas of the effective triangles. This transforms the complex volume calculation of irregular projected bodies in the prior art into a regularized calculation based on the centroid, avoiding the calculation difficulties caused by directly dealing with a large number of irregular square pyramids and irregular pentahedrons, and significantly improving the efficiency and accuracy of reservoir capacity calculation.
[0020] This application provides a method for calculating reservoir capacity, see embodiments. Figure 2 As shown, the method for calculating reservoir capacity provided in this application includes at least the following steps: Step 110: Obtain the attribute data of all triangles in the three-dimensional terrain model of the target reservoir and at least one target water level elevation; wherein, the attribute data includes the vertex coordinates of each triangle.
[0021] In this embodiment, the three-dimensional terrain model of the target reservoir can be generated by using UAV oblique photogrammetry technology to take aerial photos of the reservoir's terrain, acquiring high-resolution image data. After processing such as aerial triangulation and point cloud dense matching, a digital surface model of the target reservoir's terrain is generated. For the underwater terrain of the target reservoir, an unmanned surface vessel equipped with a multibeam echo sounder or a single-beam echo sounder can be used to collect underwater terrain data along a preset route to obtain underwater elevation point clouds. The acquired land point clouds and underwater echo sounder data are fused, noise points are removed, and after coordinate unification and data stitching, a high-precision three-dimensional terrain model integrating land and water covering the entire target reservoir is finally generated. Alternatively, a three-dimensional terrain model can be generated based on existing digital elevation model data or topographic map contour data through interpolation algorithms and irregular triangular network construction methods. Furthermore, the 3D terrain model is a digital surface model composed of multiple triangles, used to represent the topography of the target reservoir area. Each triangle serves as a basic building block of the terrain model. The attribute data includes at least the vertex coordinates of each triangle. The vertex coordinates are the positional data of the three corner points of the triangle in 3D space, uniquely determining the spatial location and geometric shape of the triangle. Figure 3The three-dimensional terrain model shown is composed of a triangular mesh. The reservoir capacity corresponding to a certain water level is equal to the volume 340 of the entity formed by the water surface 310 at that water level, the three-dimensional terrain model 330, and the dam axis 320. Figure 4 As shown.
[0022] The target water level elevation is one or more water level values specified by the user for calculating reservoir capacity. For example, it could be the reservoir's normal storage level, design flood level, or check flood level. In this application, by obtaining the vertex coordinates of all triangles, basic data is provided for subsequent selection of triangles to participate in the reservoir capacity calculation based on the water level elevation. This ensures that the reservoir capacity calculation process covers the entire reservoir area's topography and avoids calculation errors caused by missing data. Simultaneously, obtaining at least one target water level elevation enables the reservoir capacity calculation method provided in this application to support both single-point water level reservoir capacity calculation and multi-point layered reservoir capacity calculation, enhancing the method's flexibility and applicability.
[0023] Furthermore, the attribute data also includes the centroid coordinates, face normal vectors, and area of the triangle. The centroid coordinates are the coordinates of a spatial point determined by the arithmetic mean of the coordinates of the three vertices of the triangle. This point is located inside the triangle and is its geometric center. The face normal vector is a vector perpendicular to the plane containing the triangle, used to describe the triangle's orientation in space; its direction is determined by the right-hand rule based on the arrangement of the three vertices. The area is the actual surface area of the triangle in three-dimensional space, i.e., the size of the region enclosed by the three sides of the triangle. By using the attribute data of the triangle, the volume calculation of complex projected objects can be transformed into a regularized calculation based on the centroid, avoiding the computational difficulties caused by directly processing irregular geometric shapes, thereby improving the efficiency and accuracy of storage capacity calculation.
[0024] Step 120: Based on all attribute data and the target water level elevation, a layered reservoir capacity calculation strategy is adopted to determine the volume of the projection of each triangle onto the horizontal plane where the target water level elevation is located. The layered reservoir capacity calculation strategy is as follows: based on the vertex coordinates of the target triangle and the target water level elevation, the effective triangles within the target triangle are determined. Based on the centroid coordinates, surface normal vectors, and area of the effective triangles, the volume of the projection of the effective triangles onto the horizontal plane where the target water level elevation is located is determined, which serves as the volume of the projection of the target triangles onto the horizontal plane where the target water level elevation is located. The effective triangles are triangles located below the target water level elevation. The centroid coordinates, surface normal vectors, and area of the effective triangles are calculated based on the vertex coordinates of the effective triangles.
[0025] In this embodiment of the application, the effective triangle includes a first type of effective triangle and a second type of effective triangle; wherein, the first type of effective triangle is the triangle in which the coordinates of the three vertices of the target triangle are all below the target water level elevation; the second type of effective triangle is the triangle formed by the part of the target triangle below the target water level elevation after it is cut by the horizontal plane where the target water level elevation is located.
[0026] Specifically, based on the target water level elevation, the configuration of all triangles in the three-dimensional terrain model of the target reservoir is determined: When the coordinates of all vertices of a triangle are below the target water level, that is, when the coordinates of all three vertices of the triangle are less than the target water level, it is called a first-type valid triangle. A triangle is considered a second-type valid triangle when it is cut by the horizontal plane containing the target water level, meaning that the coordinates of one or two of the three vertices of the triangle are lower than the target water level, while the coordinates of the remaining vertices are higher than the target water level.
[0027] In this embodiment of the application, the valid triangles in the target triangle are determined to be second-type valid triangles by the following method: Based on the target triangle and the horizontal plane where the target water level is located, determine the intersection points of the horizontal plane where the target water level is located and the sides of the target triangle; based on the intersection points and the vertices of the target triangle that are below the target water level, obtain the polygons that are below the target water level; when the polygon is a triangle, determine the polygon as a second type of valid triangle; when the polygon is a quadrilateral, divide the quadrilateral into two triangles along any diagonal, and both of the resulting triangles are considered as second type of valid triangles.
[0028] Specifically, such as Figure 5 As shown, when the target water level elevation boundary lines EFG, △ABC, and △BCD intersect, △ABC is divided into a portion above the water surface (△EBF) and a portion below the water surface (quadrilateral AEFC). Quadrilateral AEFC is transformed into △AFE and △AFC (or △CEA and △CEF) along its diagonal. △BCD is divided into a portion above the water surface (quadrilateral BFGD) and a portion below the water surface (△CFG). Quadrilateral BFGD is transformed into △BFD and △BGD (or △BDG and △DFG) along its diagonal.
[0029] In this embodiment of the application, the volume of the projection of the effective triangle onto the horizontal plane containing the target water level is determined based on the centroid coordinates, surface normal vector, and area of the effective triangle, including: The volume of the effective triangle projected onto the horizontal plane containing the target water level is determined using preset volume calculation rules. The preset volume calculation rules are as follows: the absolute value of the elevation difference of the effective triangle is determined based on the centroid elevation coordinates of the effective triangle and the target water level; the angle between the surface normal vector of the effective triangle and the vertical direction is determined based on the surface normal vector of the effective triangle and the vertical direction; and the volume of the effective triangle projected onto the horizontal plane containing the target water level is determined based on the area of the effective triangle, the absolute value of the elevation difference, and the angle.
[0030] Furthermore, the volume of the effective triangle projected onto the horizontal plane containing the target water level can be determined using the following formula:
[0031] In the formula, The volume of the effective triangle projected onto the horizontal plane containing the target water level. For the area of the effective triangle, Let be the angle between the face normal vector of the effective triangle and the vertical direction. For the target water level elevation, The elevation coordinates of the centroid of the effective triangle.
[0032] Specifically, such as Figure 6 As shown, △ For a valid triangle, For the centroid of an effective triangle, △ For △ The projection plane of the plane containing the centroid elevation, △ For △ Projected onto the horizontal plane where the target elevation is located. From the horizontal plane where the target elevation is located to △ Centroid The elevation difference at that location. △ The projection of the target water level onto the horizontal plane is: Irregular prism, i.e. The volume of an irregular prism is △ The volume of the projection onto the horizontal plane where the target water level is located, such as Figure 7 As shown.
[0033] like Figure 7 As shown, the horizontal plane passing through the centroid of the effective triangle Divide the effective triangle to obtain two figures that are projected onto the horizontal plane containing the centroid along the Z-axis (i.e., the vertical direction). The volumes of the projected volumes of the two figures are equal, i.e., △ Centroid horizontal plane The quadrilaterals ABED and △DEC formed after the division are respectively directed towards the plane. The projection formed is and projection body Equal in volume, such as Figure 8 As shown. Therefore, an irregular prism Its volume is equal to that of a regular triangular prism. The volume of a regular triangular prism It is an irregular prism The volume equivalent volume, such as Figure 9 As shown.
[0034] Furthermore, a regular triangular prism can be determined using the following formula. The volume can be used to obtain an irregular prism. The volume of △ABC is obtained by calculating the volume of its projection onto the horizontal plane where the target water level is located:
[0035] In the formula, It is the volume of the projection of △ABC onto the horizontal plane where the target water level is located (i.e., the volume of the effective triangle projected onto the horizontal plane where the target water level is located). Let △ABC lie on the horizontal plane where its centroid is located. area, From the horizontal plane where the target elevation is located to △ Centroid The absolute value of the elevation difference at the location.
[0036] The determination is made through the following process. Let △ABC lie on the horizontal plane where its centroid is located. The area and target elevation are located on the horizontal plane to △ Centroid absolute value of elevation difference at location : Since the 3D terrain model is a triangular mesh model, the vertex coordinates, centroid coordinates, face normals, and areas of any triangle in the triangular mesh are used as attribute data for each triangular mesh and can be extracted from the triangular mesh model. In this application, taking any △ABC as an example, the vertex coordinates of the attribute data of △ABC are: point A ( Point B ) and point C ( The centroid coordinates are: point ( The surface normal vector is: ( ) and area The target elevation is Then the horizontal plane where the target elevation is located is △ Centroid absolute value of elevation difference at location for:
[0037] like Figure 10 As shown, in determining Let △ABC lie on the horizontal plane where its centroid is located. When calculating the area, the Z-direction (i.e., elevation direction) vector is needed, and the unit vector in the Z-direction is taken as denoted as . , △ Let triangle ABC be at its centroid. The projection triangle of the horizontal plane, vector Let be the normal vector of triangle ABC (i.e. );vector For △ Normal vector, because △ Since it lies in the horizontal plane, its normal vector can be represented by a vector in the Z direction, i.e., vector. Available vectors It is represented that, where, vector sum vector Used to calculate the included angle, therefore it is independent of the magnitude of each vector, so the Z-direction vector... Let the unit vector be (0,0,1). The angle between two intersecting planes in space is equal to the angle between their normal vectors, i.e., △ABC and △... The included angle is equal to the vector ( ) and vector The included angle, as can be seen from the formula for calculating the included angle of a vector, is ∠. The calculation formula is as follows:
[0038] like use If we express this, then we can know the included angle. The cosine value can be:
[0039] Therefore, △ABC lies on the horizontal plane where its centroid is located. area It equals the area of triangle ABC multiplied by the sum of the areas of triangle ABC and triangle ABC. The cosine of the included angle is:
[0040] Furthermore, the formula for calculating the volume of the projection of any triangle △ABC in the three-dimensional terrain model onto the horizontal plane containing the target water level elevation is as follows:
[0041] Step 130: Determine the reservoir capacity based on the volume of all triangles projected onto the horizontal plane where the target water level is located.
[0042] In this embodiment of the application, the volumes of all triangles in the three-dimensional terrain model projected onto the horizontal plane where the target water level is located are accumulated to finally obtain the reservoir capacity of the target reservoir.
[0043] The specific process of calculating reservoir capacity provided in this application embodiment is as follows: Step 1: Create a three-dimensional terrain model consisting of multiple triangular meshes using contour lines, digital elevation models (DEMs), or other surveying techniques; Step 2: Obtain the attribute data of all triangular meshes in the 3D terrain model. The attribute data of the triangular meshes includes vertex coordinates, centroid coordinates, face normals, and area. Step 3: Determine the water surface elevation for which the target reservoir capacity needs to be calculated. The water surface elevation can be a specific water surface elevation, or a range of water surface elevations (i.e., the lowest elevation and the highest elevation) and the elevation difference. In this application, after determining the range of water surface elevations and the elevation difference, a series of water surface elevations are determined based on the range of water surface elevations and the elevation difference, and the series of water surface elevations are sorted in ascending order to obtain a list of water surface elevations. Step 4: Based on the attribute data of the triangular mesh and the list of water surface elevations, determine the reservoir capacity corresponding to each water surface elevation (i.e., the stratified capacity of the target reservoir). Specifically, by traversing the list of water surface elevations, calculate the volume of the projection of all triangular meshes corresponding to each water surface elevation (i.e., the target water level elevation) onto the horizontal plane where the water surface elevation is located. Specifically, if the number of water surface elevations to be calculated is n, and the number of triangular meshes in the 3D terrain model is m, when determining the stratified capacity of the target reservoir, the volume is determined by traversing the list of water surface elevations. For each value in the 3D terrain model, calculate the volume of the projection of each triangular mesh onto the horizontal plane containing the water surface elevation. Where, if the calculation of the ... The reservoir capacity corresponding to a given water level elevation can be determined using the following formula:
[0044] In the formula, For the first Water level elevation Corresponding storage capacity For the first The first water level elevation corresponds to the first The storage capacity corresponding to the triangular mesh in a 3D terrain model; Among them, the The first water level elevation corresponds to the first The reservoir capacity corresponding to the triangular mesh in the three-dimensional terrain model can be determined in the following way: First, determine the... The relationship between the triangular mesh and the horizontal plane containing the water level elevation in the three-dimensional terrain model, when the... The coordinates of the three vertices of a triangular mesh in a 3D terrain model If all vertices are greater than or equal to the water level elevation, or if two vertices have coordinates equal to the water level elevation and the coordinates of the third vertex are greater than the water level elevation, then the... In the three-dimensional terrain model, the triangular mesh is completely located above the water level elevation, thus determining the first... In a 3D terrain model, triangular meshes are not included in the reservoir capacity statistics, i.e. =0; When the The coordinates of the three vertices of a triangular mesh in a 3D terrain model If all vertices are less than the water level elevation, or if two vertices have coordinates equal to the water level elevation and the coordinates of the other vertex are less than the water level elevation, then the 1st vertex... In the three-dimensional terrain model, the triangular mesh is completely below the water level elevation, thus determining the first... In a 3D terrain model, triangular meshes are used for reservoir capacity statistics, that is:
[0045] When the The coordinates of the three vertices of a triangular mesh in a 3D terrain model If at least one elevation is lower than the water level and at least one elevation is higher than the water level, then the... In a 3D terrain model, a triangular mesh is divided into an above-water portion and a below-water portion by the horizontal plane representing the water level elevation. The portion of the triangular mesh above the horizontal plane is not included in the reservoir capacity calculation, while the portion below the horizontal plane is. Furthermore, the portion of the triangular mesh below the horizontal plane may be either triangular or quadrilateral; therefore, in the calculation... When the horizontal plane is divided by the horizontal plane, it can be done in the following way: First, determine the coordinates of the intersection point between the horizontal plane and the triangular mesh. When the triangular mesh is divided by the horizontal plane, the horizontal plane intersects any two of the three sides of the triangular mesh, and there are exactly two intersection points. Given the coordinates of the three vertices of the triangular mesh... , , and water level elevation If the three sides of the triangular mesh , , Does there exist a Z-coordinate value equal to The point where the boundary lines meet is the intersection point. For example, the methods for determining whether an intersection point exists and for calculating the coordinates of the intersection point are as follows: Set the boundary line Let P be the coordinates of any point on the graph (X, Y, Z). Introduce parameters. Where t=0 corresponds to the endpoint t=1 corresponds to the endpoint Then the parameterized equation for point P is:
[0046] In the above parameterized equations, let ,if If, then the intersection point does not exist. Then the value of parameter t is:
[0047] if If the intersection point exists, its coordinates can be determined using the following formula:
[0048] Then, determine the capacity of the portion of the triangular mesh located below the horizontal plane. When the portion below the horizontal plane is triangular, assume the coordinates of a vertex in the triangular mesh. Located below the horizontal plane, and the coordinates of the two intersection points of the triangular mesh and the horizontal plane are... and Then the triangle that needs to be included in the storage capacity calculation is △ The attribute data of a triangle can be determined from the coordinates of its three vertices. Centroid coordinates of the triangle :
[0049] normal vector of a triangle :
[0050] Area of a triangle :
[0051] Based on the volume calculation formula of a triangular projection, △ The attribute data is input into the volume calculation formula to obtain △ Storage volume :
[0052] When the portion below the horizontal plane is a quadrilateral, assume the coordinates of a vertex in the triangular mesh. and Located below the horizontal plane, and the coordinates of the two intersection points of the triangular mesh and the horizontal plane are... and Then the quadrilateral that needs to participate in the storage capacity calculation is Divide the quadrilateral into two triangles along any diagonal. For example, along the diagonal... If divided, the resulting triangle is △ and △ Based on the method described above, the triangle attribute data is calculated using the coordinates of the triangle vertices to obtain △ centroid coordinates Surface normal vector and area , and △ centroid coordinates Surface normal vector and area Based on the volume calculation formula of a triangular projection, △ and △ The attribute data is input into the volume calculation formula to obtain the quadrilateral. Storage volume :
[0053] Finally, the volumes of all the triangular meshes of the target reservoir's 3D terrain model are projected onto the horizontal plane where the water surface elevation is located, and the volumes of all the projected volumes are summed to obtain the reservoir's capacity.
[0054] The reservoir capacity calculation method provided in this application improves operability and calculation efficiency by converting the volume of an irregular prism into the volume of a regular triangular prism and accumulating the volumes of the regular triangular prisms.
[0055] This application provides a device for calculating reservoir capacity, such as... Figure 11 As shown, the reservoir capacity calculation device provided in this application includes: The data acquisition module 210 is used to acquire the attribute data of all triangles in the three-dimensional terrain model of the target reservoir and at least one target water level elevation; wherein, the attribute data includes vertex coordinates; The reservoir capacity calculation module 220 is used to determine the volume of the projection of each triangle onto the horizontal plane where the target water level is located, based on all attribute data and the target water level elevation, using a layered reservoir capacity calculation strategy. The layered reservoir capacity calculation strategy is as follows: based on the vertex coordinates of the target triangle and the target water level elevation, the effective triangles within the target triangle are determined; based on the centroid coordinates, surface normals, and areas of the effective triangles, the volume of the projection of the effective triangles onto the horizontal plane where the target water level is located is determined as the volume of the projection of the target triangle onto the horizontal plane where the target water level is located; the effective triangles are triangles located below the target water level elevation; and the reservoir capacity of the target reservoir is determined based on the volumes of the projections of all triangles onto the horizontal plane where the target water level is located.
[0056] It should be noted that the principle of the reservoir capacity calculation device provided in this application embodiment to solve the technical problem is similar to the reservoir capacity calculation method provided in this application embodiment. Therefore, the implementation of the reservoir capacity calculation device provided in this application embodiment can refer to the implementation of the reservoir capacity calculation method provided in this application embodiment, and the repeated parts will not be described again.
[0057] After introducing the method and apparatus for calculating reservoir capacity provided in the embodiments of this application, the electronic equipment provided in the embodiments of this application will be briefly introduced next.
[0058] See Figure 12 As shown, the electronic device 500 provided in this application embodiment includes at least a processor 501, a memory 502, and a computer program stored in the memory 502 and executable on the processor 501. When the processor 501 executes the computer program, it implements the method for calculating the reservoir capacity provided in this application embodiment.
[0059] The electronic device 500 provided in this application embodiment may further include a bus 503 connecting different components (including processor 501 and memory 502). The bus 503 represents one or more types of bus structures, including memory bus, peripheral bus, local area bus, etc.
[0060] Memory 502 may include a readable storage medium in the form of volatile memory, such as random access memory (RAM) 5021 and / or cache memory 5022, and may further include read-only memory (ROM) 5023. Memory 502 may also include a program tool 5025 having a set (at least one) of program modules 5024, including but not limited to an operating subsystem, one or more application programs, other program modules, and program data, each or some combination of these examples may include an implementation of a network environment.
[0061] Processor 501 can be a single processing element or a collective term for multiple processing elements. For example, processor 501 can be a central processing unit (CPU) or one or more integrated circuits configured to implement the reservoir capacity calculation method provided in the embodiments of this application. Specifically, processor 501 can be a general-purpose processor, including but not limited to CPUs, application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
[0062] Electronic device 500 can communicate with one or more external devices 504 (e.g., keyboard, remote control, etc.), and also with one or more devices that enable a user to interact with electronic device 500 (e.g., mobile phone, computer, etc.), and / or with devices that enable electronic device 500 to communicate with one or more other electronic devices 500 (e.g., router, modem, etc.). This communication can be performed through input / output (I / O) interface 505. Furthermore, electronic device 500 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) through network adapter 506. Figure 12 As shown, network adapter 506 communicates with other modules of electronic device 500 via bus 503. It should be understood that, although... Figure 12 As not shown, other hardware and / or software modules may be used in conjunction with the electronic device 500, including but not limited to microcode, device drivers, redundant processors, external disk drive arrays, Redundant Arrays of Independent Disks (RAID) subsystems, tape drives, and data backup storage subsystems.
[0063] It should be noted that, Figure 12 The electronic device 500 shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.
[0064] The following describes the computer-readable storage medium provided in the embodiments of this application. The computer-readable storage medium provided in the embodiments of this application stores computer instructions, which, when executed by a processor, implement the method for calculating the reservoir capacity provided in the embodiments of this application. Specifically, the computer instructions can be built into or installed in the processor, so that the processor can implement the method for calculating the reservoir capacity provided in the embodiments of this application by executing the built-in or installed computer instructions.
[0065] In addition, the method for calculating reservoir capacity provided in this application embodiment can also be implemented as a computer program product, which includes program code. The program code implements the method for calculating reservoir capacity provided in this application embodiment when it is run on a processor.
[0066] The computer program product provided in this application embodiment may employ one or more computer-readable storage media, which may be, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination thereof. Specifically, more specific examples (a non-exhaustive list) of computer-readable storage media include electrical connections with one or more wires, portable disks, hard disks, RAM, ROM, erasable programmable read-only memory (EPROM), optical fibers, portable compact disc read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0067] The computer program product provided in this application embodiment can be a CD-ROM and include program code, and can also run on electronic devices such as computers. However, the computer program product provided in this application embodiment is not limited thereto. In this application embodiment, the computer-readable storage medium can be any tangible medium that contains or stores program code, which can be used by or in conjunction with an instruction execution system, device, or apparatus.
[0068] It should be noted that although several units or sub-units of the device have been mentioned in the detailed description above, this division is merely exemplary and not mandatory. In fact, according to embodiments of this application, the features and functions of two or more units described above can be embodied in one unit. Conversely, the features and functions of one unit described above can be further divided and embodied by multiple units.
[0069] Furthermore, although the operations of the method of this application are described in a specific order in the accompanying drawings, this does not require or imply that these operations must be performed in that specific order, or that all the operations shown must be performed to achieve the desired result. Additionally or alternatively, certain steps may be omitted, multiple steps may be combined into one step, and / or one step may be broken down into multiple steps.
[0070] Although preferred embodiments of this application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this application.
[0071] Obviously, those skilled in the art can make various modifications and variations to the embodiments of this application without departing from the spirit and scope of the embodiments of this application. Therefore, if these modifications and variations to the embodiments of this application fall within the scope of the claims of this application and their equivalents, this application also intends to include these modifications and variations.
Claims
1. A method for calculating the capacity of a reservoir, characterized in that, include: Obtain the attribute data of all triangles in the three-dimensional terrain model of the target reservoir and at least one target water level elevation; wherein, the attribute data includes the vertex coordinates of each triangle; Based on all the attribute data and the target water level elevation, a layered reservoir capacity calculation strategy is adopted to determine the volume of the projection of each triangle onto the horizontal plane containing the target water level elevation. The layered reservoir capacity calculation strategy involves: determining the effective triangles within the target triangle based on the vertex coordinates and the target water level elevation; and determining the volume of the projection of each effective triangle onto the horizontal plane containing the target water level elevation based on the centroid coordinates, face normals, and area of the effective triangles. The effective triangles are those located below the target water level elevation. The centroid coordinates, face normals, and area of the effective triangles are calculated based on the vertex coordinates of the effective triangles. The reservoir capacity is determined based on the volume of the projection of all the triangles onto the horizontal plane containing the target water level.
2. The method for calculating reservoir capacity according to claim 1, characterized in that, The valid triangles include first-type valid triangles and second-type valid triangles; The first type of valid triangle is one in which the coordinates of all three vertices of the target triangle are located below the target water level. The second type of valid triangle is the triangle formed by the portion of the target triangle that is cut by the horizontal plane where the target water level is located and lies below the target water level.
3. The method for calculating reservoir capacity according to claim 2, characterized in that, Determining the second type of valid triangles includes: Based on the target triangle and the horizontal plane where the target water level is located, determine the intersection point of the horizontal plane where the target water level is located and the side of the target triangle; Based on the intersection point and the vertex of the target triangle that is below the target water level elevation, a polygon located below the target water level elevation is obtained; When the polygon is a triangle, the polygon is determined as a second type of valid triangle.
4. The method for calculating reservoir capacity according to claim 3, characterized in that, Also includes: When the polygon is a quadrilateral, the quadrilateral is divided into two triangles along any one of its diagonals, and both triangles are considered as the second type of valid triangles.
5. The method for calculating reservoir capacity according to claim 2, characterized in that, Based on the effective triangle and its centroid coordinates, surface normal vector, and area, the volume of the effective triangle projected onto the horizontal plane containing the target water level is determined, including: The volume of the projection of the effective triangle onto the horizontal plane containing the target water level is determined using a preset volume calculation rule. The preset volume calculation rule is as follows: based on the centroid elevation coordinates of the effective triangle and the target water level, the absolute value of the elevation difference of the effective triangle is determined; based on the surface normal vector of the effective triangle and the unit vector in the vertical direction, the angle between the surface normal vector of the effective triangle and the vertical direction is determined; based on the area of the effective triangle, the absolute value of the elevation difference, and the angle, the volume of the projection of the effective triangle onto the horizontal plane containing the target water level is determined.
6. The method for calculating reservoir capacity according to claim 5, characterized in that, Also includes: When the effective triangle is the first type of effective triangle, the area, surface normal vector, and centroid elevation coordinates of the first type of effective triangle are used as the area, surface normal vector, and centroid elevation coordinates of the effective triangle, and the volume of the projection of the effective triangle onto the horizontal plane where the target water level is located is determined according to the preset volume calculation rules.
7. The method for calculating reservoir capacity according to claim 5, characterized in that, Also includes: When the effective triangle is a second type of effective triangle, the area, surface normal vector, and centroid elevation coordinates of each second type of effective triangle are used as the area, surface normal vector, and centroid elevation coordinates of the effective triangle, respectively. The volume of the projection of each second type of effective triangle is determined according to the preset volume calculation rules, and the sum of the volumes of the projections of all second type of effective triangles is used as the volume of the projection of the target triangle onto the horizontal plane where the target water level is located.
8. A device for calculating the capacity of a reservoir, characterized in that, include: The data acquisition module is used to acquire the attribute data of all triangles in the three-dimensional terrain model of the target reservoir and at least one target water level elevation; wherein, the attribute data includes vertex coordinates; The reservoir capacity calculation module is used to determine the volume of the projection of each triangle onto the horizontal plane where the target water level is located, based on all the attribute data and the target water level elevation, using a layered reservoir capacity calculation strategy. The layered reservoir capacity calculation strategy is as follows: based on the vertex coordinates of the target triangle and the target water level elevation, a valid triangle is determined within the target triangle; based on the centroid coordinates, surface normal vectors, and areas of the valid triangles, the volume of the projection of each valid triangle onto the horizontal plane where the target water level is located is determined as the volume of the projection of the target triangle onto the horizontal plane where the target water level is located; the valid triangle is a triangle located below the target water level elevation; and the reservoir capacity of the target reservoir is determined based on the volumes of the projections of all the triangles onto the horizontal plane where the target water level is located.
9. An electronic device, characterized in that, It includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method for calculating the reservoir capacity as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that, when executed by a processor, implement the method for calculating the reservoir capacity as described in any one of claims 1 to 7.