Method for selecting internal layer sequence of dam
By automatically generating internal layers based on the element topology relationship of the three-dimensional finite element mesh model in the finite element analysis of dams, the problem of low efficiency in manual selection in existing technologies is solved, and the efficient and accurate identification and generation of internal layers of dams is realized, thus improving the level of automation of analysis.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA INST OF WATER RESOURCES & HYDROPOWER RES
- Filing Date
- 2025-10-23
- Publication Date
- 2026-06-09
AI Technical Summary
In existing finite element analysis of dams, the selection of internal layers requires manual operation, which is inefficient, difficult to guarantee accuracy, and has poor repeatability, making it difficult to generate continuous internal surfaces that conform to topological relationships in batches.
By acquiring a three-dimensional finite element mesh model, upstream and downstream boundary condition surfaces are identified, and internal layers are iteratively generated based on element topology relationships. Continuous internal layers from upstream to downstream are automatically identified and generated using element-face orientation mapping rules.
It enables automated, rapid, and accurate identification and generation of the internal layers of the dam, improving the efficiency and accuracy of finite element post-processing analysis and providing an accurate and complete foundation of layer mesh data.
Smart Images

Figure CN121389263B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of finite element calculation and computer-aided engineering technology for water conservancy projects, and in particular to a method for selecting the internal layer sequence of a dam. Background Technology
[0002] In finite element analysis of dams, to gain a deeper understanding of their operational behavior, engineers need to focus not only on the overall stress and deformation of the dam body, but also on the distribution patterns of physical quantities such as stress and temperature at different locations within the dam body (e.g., along the dam thickness direction). This type of analysis typically requires the mesh to consist of regularly shaped, similar prismatic elements along the dam thickness direction to accurately capture gradient changes in physical parameters. On such regular mesh models, selecting a series of internal sections (also called "layers") for result viewing and analysis is a common requirement.
[0003] Currently, in mainstream finite element pre- and post-processing software (such as ANSYS, ABAQUS, and GiD), the function of selecting internal surfaces typically relies on manual operation. Even for meshes that meet the above-mentioned regularity conditions, engineers still need to manually create cutting planes / surfaces to truncate the model based on coordinate positions, or select element surfaces inside the model based on experience. The above methods have significant drawbacks: first, they are extremely inefficient, requiring manual selection of each surface; second, accuracy is difficult to guarantee, as it is difficult to accurately locate internal surfaces connected by topological relationships manually; and third, repeatability is poor, as different operators may select inconsistent surfaces, and it is difficult to generate a series of continuous internal surfaces that conform to topological relationships in batches.
[0004] Therefore, there is an urgent need for a method that can automatically, quickly, and accurately identify and generate all internal layers from the upstream to the downstream surface to solve the above-mentioned technical problems, improve the efficiency and accuracy of post-processing analysis, and is especially suitable for dam mesh models with regular unit characteristics in the upstream and downstream directions. Summary of the Invention
[0005] This invention provides a method for selecting the sequence of internal layers of a dam, which addresses the shortcomings of existing technologies. It enables the automatic and iterative generation of all continuous internal layers from the upstream boundary layer to the downstream boundary layer based on grid topology, thus completely solving the problems of difficulty and inefficiency in manually selecting internal layers.
[0006] This invention provides a method for selecting the internal layer sequence of a dam, comprising the following steps:
[0007] Obtain a three-dimensional finite element mesh model and identify the upstream and downstream boundary condition surfaces in the three-dimensional finite element mesh model;
[0008] The current internal layer is determined, and a series of internal layers are continuously generated through iteration until the newly generated internal layer coincides with or is adjacent to the downstream boundary condition surface. Each iteration includes: based on the element topology relationship of the three-dimensional finite element mesh model, identifying the opposing element surfaces of each element on the current internal layer facing the downstream side of the dam, and combining all the identified downstream opposing element surfaces into a new internal layer; the upstream boundary condition surface is the initial internal layer.
[0009] Output the grid data of the layer sequence, which consists of the initial internal layer and all generated internal layers.
[0010] According to a method for selecting the internal layer sequence of a dam provided by the present invention, the step of identifying the opposing element faces of each element on the current internal layer facing the downstream side of the dam body based on the element topology relationship of the three-dimensional finite element mesh model includes:
[0011] Traverse each unit face on the current internal level, and query the predefined unit face orientation mapping rule according to the unit number and face number of each unit face to obtain the orientation face number of each unit face in its own unit; the unit face orientation mapping rule is constructed based on the unit topology relationship;
[0012] Based on the opposing face number of each unit face, identify the opposing unit face of each unit on the current internal level that faces the downstream side of the dam body.
[0013] According to the method for selecting the internal layer sequence of a dam provided by the present invention, the unit-plane orientation mapping rule is constructed based on the following steps:
[0014] Based on the aforementioned element topology, the geometric topology of the prism elements in the three-dimensional finite element mesh model is determined;
[0015] Based on the aforementioned geometric topology, determine the numbering rules for each unit face and the geometric symmetry or arrangement pattern of each unit face in the upstream and downstream directions;
[0016] Based on the unit face number and the geometric symmetry or arrangement pattern of each unit face in the upstream and downstream directions, determine the number of the opposing face within the unit.
[0017] Establish a mapping relationship between the unit face number and the opposite face number to form the unit face orientation mapping rule.
[0018] According to the method for selecting the internal layer sequence of a dam provided by the present invention, the three-dimensional finite element mesh model is constructed using hexahedral prism elements, and the element face-to-face mapping rule is as follows:
[0019] Unit face number 1 corresponds to opposite face number 2;
[0020] Element face number 2 corresponds to oriented face number 1;
[0021] Unit surface number 3 corresponds to facing surface number 4;
[0022] Unit face number 4 corresponds to opposite face number 3;
[0023] Unit face number 5 corresponds to opposite face number 6;
[0024] Unit surface number 6 corresponds to facing surface number 5.
[0025] According to the present invention, a method for selecting the internal layer sequence of a dam is provided, wherein the grid data includes at least one of a series of independent layer grid files, an integrated grid file, and a node sequence file, wherein the units of different layers in the integrated grid file are distinguished by attribute values, and the node sequence file records the node numbering relationship at corresponding positions between the downstream boundary layer and the upstream boundary layer.
[0026] According to a method for selecting the internal layer sequence of a dam provided by the present invention, the step of outputting grid data of the layer sequence composed of the initial internal layer and all generated internal layers further includes:
[0027] Generate a node mapping relationship file, which records the numbering correspondence of nodes in the same physical location in each internal layer grid in the layer sequence from upstream to downstream.
[0028] According to the present invention, a method for selecting the internal layer sequence of a dam is provided, wherein the grid data is used for visualization and analysis of the internal layer calculation results in finite element post-processing.
[0029] The present invention also 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 program to implement the selection method for the internal layer sequence of a dam as described above.
[0030] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method for selecting the internal layer sequence of a dam as described above.
[0031] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the method for selecting the internal layer sequence of a dam as described above.
[0032] The method for selecting the internal layer sequence of a dam provided by this invention acquires a three-dimensional finite element mesh model and identifies its upstream and downstream boundary condition surfaces. Using the upstream boundary condition surface as the initial internal layer, a series of continuous internal layers from upstream to downstream are automatically identified and generated iteratively based on the element topology relationship. Finally, complete layer sequence mesh data is output, achieving automated and intelligent extraction of internal layers along the dam thickness direction. Because this invention eliminates the need for manual selection and definition of each internal section, but instead automatically advances the identification layer by layer based on the mesh topology relationship, it greatly improves the efficiency and accuracy of layer generation. It avoids problems such as inaccurate layer positions, discontinuous layers, and omissions of key sections caused by cumbersome and error-prone manual operations in traditional methods. This provides an accurate, complete, and standardized layer mesh data foundation for subsequent finite element post-processing analysis, significantly improving the automation level and work efficiency of dam engineering analysis. Attached Figure Description
[0033] To more clearly illustrate the technical solution of the present invention, the embodiments will be briefly described below in conjunction with the accompanying drawings.
[0034] Figure 1 This is a flowchart illustrating the method for selecting the internal layer sequence of a dam provided by the present invention.
[0035] Figure 2 This is a schematic diagram of the internal layer sequence provided by the present invention.
[0036] Figure 3 This is a schematic diagram of the hexahedral prism unit provided by the present invention.
[0037] Figure 4 This is a flowchart illustrating the principle of the mapping rules provided by this invention.
[0038] Figure 5 This is a flowchart illustrating another method for selecting the internal layer sequence of a dam provided by the present invention.
[0039] Figure 6 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation
[0040] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0041] Currently, mainstream finite element pre- and post-processing software (such as ANSYS, ABAQUS, GiD, etc.) often rely heavily on manual operation for selecting internal layers when handling such requirements. Specifically, even on models that meet the above-mentioned regular mesh conditions, engineers must manually create cutting planes or surfaces based on coordinate positions to cut the model, or rely on personal experience to select each element surface inside the model to form a layer.
[0042] However, the aforementioned manual operation-based method is extremely inefficient. When there are a large number of internal layers to be analyzed, manually creating or selecting them one by one will consume a significant amount of repetitive labor and time. Furthermore, manual operation makes it difficult to accurately locate and select unit faces that are completely continuous in topological relationships, easily leading to omissions or incorrect selections, thus affecting the accuracy of the analysis results. At the same time, this manual method is also difficult to generate a series of continuous internal layer sequences that conform to topological logic in a batch and repeatably.
[0043] In response, this invention provides a method for selecting the internal layer sequence of a dam, aiming to solve the technical problems of low efficiency, difficulty in guaranteeing accuracy, and poor repeatability when manually selecting the internal layers of a dam finite element model. It realizes the automatic, fast, and accurate identification and generation of all internal layers in the dam model from the upstream boundary to the downstream boundary, thereby significantly improving the efficiency and accuracy of finite element post-processing analysis.
[0044] in, Figure 1 This is a flowchart illustrating the method for selecting the internal layer sequence of a dam provided by the present invention, as shown below. Figure 1 As shown, the method includes steps 110, 120 and 130.
[0045] Step 110: Obtain the three-dimensional finite element mesh model and identify the upstream and downstream boundary condition surfaces in the three-dimensional finite element mesh model.
[0046] Here, the three-dimensional finite element mesh model refers to a three-dimensional spatial discretized numerical model used for dam structural analysis. This model approximates the continuous geometry of the dam using a finite number of elements and nodes. In this embodiment, the three-dimensional finite element mesh model is preferably constructed using prism elements, such as hexahedral prism elements. These elements have similar shapes in the upstream and downstream directions. That is, the geometric shapes of each layer of elements along the upstream and downstream directions of the dam body are basically consistent, which facilitates the automatic identification and generation of layers based on topological relationships.
[0047] This can be achieved by using specialized finite element preprocessing software such as ANSYS, ABAQUS, and GiD to construct a three-dimensional finite element mesh model. During the construction process, the dam structure needs to be discretized into several elements based on the actual geometry, material distribution, boundary conditions, and other information of the dam, and each element needs to be assigned corresponding material properties, element type, and other parameters.
[0048] Furthermore, in this embodiment, the upstream boundary condition surface refers to the boundary surface located on the upstream side of the dam, which typically bears the upstream water pressure or serves as a heat dissipation surface. The downstream boundary condition surface refers to the boundary surface located on the downstream side of the dam, which typically bears the downstream water pressure or serves as a heat dissipation surface.
[0049] The methods for identifying upstream and downstream boundary condition surfaces may include:
[0050] The topological relationship data of elements and nodes in the 3D finite element mesh model is read. This data records information such as the node number, element face number, and element face attributes of each element in the model. Based on the preset element face attribute identifiers, such as assigning specific identifiers or material numbers to different types of boundary faces during model construction, element faces with the attribute of upstream water pressure surface or heat dissipation surface are selected as upstream boundary condition surfaces, and element faces with the attribute of downstream water pressure surface or heat dissipation surface are selected as downstream boundary condition surfaces.
[0051] For example, by reading the boundary condition markers in the mesh file, the set of cell faces marked "upstream water pressure" or "upstream heat dissipation" can be extracted to form the upstream boundary condition surface. Simultaneously, the set of cell faces marked "downstream water pressure" or "downstream heat dissipation" can be extracted to form the downstream boundary condition surface.
[0052] Step 120: Determine the current internal layer and continuously generate a series of internal layers through iteration until the newly generated internal layer coincides with or is adjacent to the downstream boundary condition surface. Each iteration includes: based on the element topology relationship of the three-dimensional finite element mesh model, identifying the opposing element surfaces of each element on the current internal layer facing the downstream side of the dam, and combining all the identified downstream opposing element surfaces into a new internal layer; the upstream boundary condition surface is the initial internal layer.
[0053] Specifically, the internal layers refer to the intermediate sections located between the upstream and downstream boundary condition surfaces of the dam. These sections are composed of several element surfaces and are used to observe the distribution and changes of physical quantities along the dam thickness. This embodiment automatically generates a series of continuous internal layers from upstream to downstream through an iterative process.
[0054] The initial internal layer is set as the upstream boundary condition surface identified in step 110. That is, the upstream boundary condition surface is used as the first internal layer (denoted as S0) as the starting point of the iteration.
[0055] Each iteration includes the following operations: Based on the element topology of the 3D finite element mesh model, identify the opposing faces of each element at the current internal level facing the downstream side of the dam. Here, the element topology records information such as the adjacency relationships between elements in the 3D finite element mesh model, and the correspondence between the face numbers and node numbers of each element. For example, for a hexahedral element, each element has 6 faces, and the element topology can determine which nodes make up each face and which adjacent element it shares with.
[0056] The specific method for identifying the opposing element faces of each element at the current internal level towards the downstream side of the dam body can include: traversing all element faces at the current internal level. For the current internal level S i (i=0, 1, 2, ...), this layer consists of several unit faces, each of which belongs to a face of a certain unit.
[0057] For each element face, based on its element number and face number, the predefined element face orientation mapping rule is queried to obtain the opposing face number of that element face within its parent element. Here, the opposing face refers to another face within the element that is spatially opposite the current element face.
[0058] Next, based on the opposing surface number, the opposing surface is identified as the opposing unit surface facing the downstream side of the dam. All identified downstream opposing unit surfaces are aggregated, duplicate unit surfaces are removed, and they are combined into a new internal layer S. i+1 .
[0059] In another implementation, the downstream adjacent cells and cell faces can be determined by global cell traversal and node number matching, as follows:
[0060] For each element face at the current internal level, extract all node numbers for that element face; for example, for a quadrilateral element face, extract the numbers of all four nodes. Then, traverse all elements globally and check if any other element face also contains these nodes. If such an element face is found, determine if it is located downstream, for example, by comparing the coordinates of the element face's center with the relative position of the current level. If so, designate that element face as the opposite element face downstream.
[0061] Using the methods described above, we can analyze S from the current internal level. i Starting from this point, it automatically identifies and generates the next internal layer S. i+1 .
[0062] The iteration stops when the newly generated internal layer coincides with or is adjacent to the downstream boundary condition surface. That is, when a new internal layer S is generated in a given iteration... n If the downstream boundary condition surface identified in step 110 is the same, or if there are no other unit layers between them, the iteration stops. Alternatively, the iteration stops after a preset number of iterations has been reached.
[0063] After n iterations, a series of internal layer sequences [S0, S1, S2, ..., S...] are finally obtained. n ], where S0 is the upstream boundary condition surface, S n This refers to the downstream boundary condition surface or the last internal layer adjacent to it. Figure 2 This is a schematic diagram of the internal layer sequence provided by the present invention.
[0064] In addition, the element-face orientation mapping rule is implemented through a predefined mapping matrix, which specifies the index correspondence between each face on the element and its opposing face. Figure 3 This is a schematic diagram of the hexahedral prism unit provided by the present invention, as shown below. Figure 3 As shown, this element has 6 faces, which can be numbered M1, M2, M3, M4, M5, and M6. Based on the geometric symmetry of the element and the definition of upstream and downstream directions, the following mapping rules can be established: Face 1 (M1, upstream face) ↔ Face 2 (M2, downstream face), Face 2 (M2, downstream face) ↔ Face 1 (M1, upstream face), Face 3 (M3, left side face) ↔ Face 4 (M4, right side face), Face 4 (M4, right side face) ↔ Face 3 (M3, left side face), Face 5 (M5, top face) ↔ Face 6 (M6, bottom face), Face 6 (M6, bottom face) ↔ Face 5 (M5, top face).
[0065] The steps for constructing the above mapping rules may include: determining the geometric topology of the prism element based on the element topology relationship, such as the 8 nodes and 6 faces of a hexahedral element; determining the numbering rules for each element face and the geometric symmetry or arrangement pattern of each element face in the upstream and downstream directions; determining the numbering of the opposing face of each element face within the element based on the numbering of each element face and the geometric symmetry or arrangement pattern of each element face in the upstream and downstream directions; and establishing the mapping relationship between the numbering of each element face and the numbering of the opposing face to form the element face orientation mapping rules.
[0066] By using predefined mapping rules, the opposite face of any unit face can be found quickly and uniformly without the need for complex geometric calculations or global searches, which greatly improves the efficiency of the algorithm.
[0067] It should be noted that this embodiment requires the mesh elements to have similar shapes in the upstream and downstream directions, such as prisms, to ensure consistency in mapping relationships and feasibility of lookup. If the mesh elements differ greatly in shape in this direction, such as containing strongly distorted elements or tetrahedral elements, a unified mapping rule cannot be established.
[0068] Step 130: Output the grid data of the layer sequence consisting of the initial internal layer and all generated internal layers.
[0069] After completing the iterative generation in step 120, a complete layer sequence [S0, S1, S2, ..., S] is obtained. n The sequence includes the upstream boundary condition surface as the starting point, all intermediate internal layers generated during the iteration process, and the downstream boundary condition surface or the last adjacent internal layer as the ending point. This step outputs the mesh data of this layer sequence for subsequent finite element post-processing analysis. The mesh data may include, but is not limited to, a series of independent layer mesh files, an integrated mesh file, and a node sequence file.
[0070] The method for selecting the internal layer sequence of a dam provided in this embodiment acquires a three-dimensional finite element mesh model and identifies its upstream and downstream boundary condition surfaces. Using the upstream boundary condition surface as the initial internal layer, a series of continuous internal layers from upstream to downstream are automatically identified and generated iteratively based on the element topology relationship. Finally, complete layer sequence mesh data is output, achieving automated and intelligent extraction of internal layers along the dam thickness direction. Since this embodiment eliminates the need for manual selection and definition of each internal section, but instead automatically advances the identification layer by layer based on the mesh topology relationship, it greatly improves the efficiency and accuracy of layer generation. It avoids problems such as inaccurate layer positions, discontinuous layers, and omissions of key sections caused by cumbersome and error-prone manual operations in traditional methods. This provides an accurate, complete, and standardized layer mesh data foundation for subsequent finite element post-processing analysis, significantly improving the automation level and work efficiency of dam engineering analysis.
[0071] Based on the above embodiments, and based on the element topology relationship of the three-dimensional finite element mesh model, the opposing element faces of each element at the current internal level facing the downstream side of the dam are identified, including:
[0072] Traverse all cell faces at the current internal level, and query the predefined cell face orientation mapping rules based on the cell number and face number of each cell face to obtain the orientation face number of each cell face within its own cell; the cell face orientation mapping rules are constructed based on the cell topology relationship;
[0073] Based on the opposing face number of each unit face, identify the opposing unit face of each unit on the current internal level that faces the downstream side of the dam body.
[0074] Specifically, an element number is a unique identifier assigned to each element in a 3D finite element mesh model, typically a sequence of positive integers, used to distinguish and index different elements. A face number is a number assigned to each face of an element in its local coordinate system, used to identify different faces of the element.
[0075] The cell number and face number can be directly extracted from the current internal layer data structure. Typically, during the iteration in step 120, the recorded internal layer data includes the cell number and face number corresponding to each cell / face.
[0076] After obtaining the element number and face number, the predefined element-face orientation mapping rule is queried to obtain the opposing face number of each element face within its parent element. The element-face orientation mapping rule is a mapping table or mapping matrix that specifies the correspondence between the face number of each element and its opposing face number.
[0077] In this context, the opposing face is the side of the corresponding element within its element, facing upstream and downstream. Since prism elements have similar shapes in the upstream and downstream directions, this opposing face is the opposite element facing downstream of the dam body.
[0078] For example, if there is a unit surface (A, 1) on the current internal level, representing surface 1 of unit A, surface 1 is the upstream surface. According to the mapping rule, its opposite surface is numbered 2, so the opposite surface can be represented as (A, 2), that is, surface 2 of unit A. Surface 2 is the opposite unit surface facing the downstream side of the dam.
[0079] For all unit surfaces at the current internal level, the above identification process is performed one by one to obtain a set of opposing surfaces. Considering that different unit surfaces may correspond to the same opposing surface, it is necessary to remove duplicates from this set to obtain a unique set of opposing surfaces.
[0080] The deduplicated sets of opposing faces are combined into a new internal layer. The data structure of the new internal layer is the same as that of the current internal layer, recording information such as the cell number and face number of each cell face.
[0081] In one possible implementation, the set of object faces can be deduplicated by using the uniqueness of the node numbers of the unit face. For each opposing face, all node numbers of that face are extracted, and the sorted node numbers are used as the unique identifier of that face. For example, the sorted node numbers can be combined into a string or hash value. The unique identifiers of different opposing faces are compared. If the identifiers are the same, they are considered to be the same unit face and are only kept once.
[0082] Based on any of the above embodiments, the unit-plane orientation mapping rule is constructed based on the following steps:
[0083] Based on the element topology relationship, the geometric topology of the prism element in the three-dimensional finite element mesh model is determined;
[0084] Based on the geometric topology, determine the numbering rules for each unit face and the geometric symmetry or arrangement pattern of each unit face in the upstream and downstream directions;
[0085] Based on the unit face number and the geometric symmetry or arrangement pattern of each unit face in the upstream and downstream directions, determine the number of the opposing face within the unit.
[0086] Establish a mapping relationship between the unit face number and the opposite face number to form the unit face opposite mapping rule.
[0087] Specifically, element topology refers to data describing the geometric composition and connection relationships of each element in a three-dimensional finite element mesh model, including the node number list, element type identifier, and element face-node correspondence. In this embodiment, prism elements refer to three-dimensional elements with similar shapes in the upstream and downstream directions. Common prism elements include hexahedral prism elements and pentahedral prism elements. Preferably, this embodiment uses hexahedral prism elements to construct the three-dimensional finite element mesh model. Geometric topology refers to the geometric components of an element and their interrelationships, including the number and positional relationships of nodes, the number of element faces and face-node correspondences, the number of element edges and edge-node correspondences, and the spatial orientation of the element.
[0088] First, by reading the element topology relationship data and combining it with the standard element definition, the geometric topology of the prism element can be completely determined.
[0089] Next, based on the geometric topology, the numbering rules for each element face and the geometric symmetry or arrangement pattern of each element face in the upstream and downstream directions are determined. The numbering rules for each element face refer to the rules for assigning unique numbers to each face of the element. In one implementation, standard element face numbering rules can be used. In another implementation, face numbers can be automatically determined based on the order of node numbers. Furthermore, the geometric symmetry or arrangement pattern of each element face in the upstream and downstream directions refers to the spatial distribution characteristics of each face of the element in the upstream and downstream directions. The geometric symmetry and arrangement pattern can be obtained based on node coordinate analysis, through the definition of standard elements, or derived from the node numbering order.
[0090] Then, based on the unit face number and the geometric symmetry or arrangement pattern of each unit face in the upstream and downstream directions, the opposing face number of each unit face inside the unit is determined.
[0091] Finally, based on the determined opposing face numbers of each unit face, a mapping relationship data structure is established. This data structure can quickly output the opposing face number based on the input unit face number. The mapping relationship data structure can take the form of a mapping matrix, hash table, or two-dimensional mapping matrix.
[0092] in, Figure 4 This is a flowchart illustrating the principle of the mapping rules provided by this invention, as shown below. Figure 4 As shown, firstly, for any element surface on the current reference plane, its element number and its own surface number are obtained as known input information.
[0093] Then, based on the known face number, the pre-built cell face-to-face mapping rule is queried. This rule specifies the index correspondence between each face on the cell and its opposite face, thereby directly calculating or finding its opposite face number or related index inside the cell.
[0094] Next, by combining the element number with the opposing surface information obtained in the previous step, the element topology relationship data of the three-dimensional finite element mesh model is located, and the node numbers of all nodes constituting the opposing surface are extracted, thus uniquely identifying the opposing element surface facing the downstream side of the dam.
[0095] This embodiment determines the geometric topology of prism elements based on element topological relationships, then determines the opposing face numbers of each element face according to geometric symmetry or arrangement rules, and finally establishes a mapping relationship to form element face opposing mapping rules, realizing the automated construction of the opposing face lookup mechanism. Because this embodiment is based on the inherent geometric topology and symmetry rules of the elements, it eliminates the need for complex global searches or extensive geometric calculations, thus significantly improving the computational efficiency of internal layer generation and avoiding the inefficiency and error-prone problems caused by relying on manual definition or element-by-element traversal in traditional methods.
[0096] Based on any of the above embodiments, the three-dimensional finite element mesh model is constructed using hexahedral prism elements, and the element face-to-face mapping rule is as follows:
[0097] Unit face number 1 corresponds to opposite face number 2;
[0098] Element face number 2 corresponds to oriented face number 1;
[0099] Unit surface number 3 corresponds to facing surface number 4;
[0100] Unit face number 4 corresponds to opposite face number 3;
[0101] Unit face number 5 corresponds to opposite face number 6;
[0102] Unit surface number 6 corresponds to facing surface number 5.
[0103] In this embodiment, the three-dimensional finite element mesh model is constructed using hexahedral prism elements. A hexahedral prism element is an eight-node three-dimensional solid element with six quadrilateral faces.
[0104] In this embodiment, the cell face-to-face mapping rule explicitly defines the index correspondence between each cell face and its opposing face within the cell.
[0105] In this context, element face number 1 corresponds to opposite face number 2, indicating that the opposite face of element face 1 is face 2. During the iteration process of step 120, when it is necessary to find the opposite element face downstream from a certain element face at the current internal level, if the element face number is 1, then according to the mapping rule, its opposite face number can be directly determined to be 2, and thus face 2 can be identified as the opposite element face downstream.
[0106] Similarly, element face number 2 corresponds to opposite face number 1, indicating that the opposite face of element face 2 is face 1. Element face number 3 corresponds to opposite face number 4, indicating that the opposite face of element face 3 is face 4. Element face number 4 corresponds to opposite face number 3, indicating that the opposite face of element face 4 is face 3. Element face number 5 corresponds to opposite face number 6, indicating that the opposite face of element face 5 is face 6. Element face number 6 corresponds to opposite face number 5, indicating that the opposite face of element face 6 is face 5.
[0107] Based on any of the above embodiments, the grid data includes at least one of a series of independent layer grid files, an integrated grid file, and a node sequence file. In the integrated grid file, the cells of different layers are distinguished by attribute values, and the node sequence file records the node numbering relationship between the corresponding positions of the downstream boundary layer and the upstream boundary layer.
[0108] Specifically, a series of independent layer mesh files refers to generating an independent mesh file for each internal layer in the layer sequence, with each file containing complete mesh information for that layer.
[0109] For example, for a layer sequence [S0, S1, S2, ..., S] containing n+1 layers. n This generates n+1 independent mesh files, each recording the mesh data for each layer.
[0110] A series of independent layered mesh files are used, with one file corresponding to each layer. This makes it easy to view and process mesh data of a specific layer individually, and allows for parallel reading and analysis of mesh files from different layers, thereby improving processing efficiency.
[0111] An integrated mesh file refers to merging the mesh data of all internal layers in a layer sequence into a single file, forming a unified mesh dataset. To distinguish between different layers, cells in different layers are differentiated by attribute values.
[0112] The use of an integrated mesh file allows all layer data to be centralized in one file, which facilitates storage, transmission and backup. All layers can also be loaded at once in the post-processing software, and different layers can be flexibly displayed through the attribute filtering function, which facilitates overall 3D visualization and comparative analysis.
[0113] The node sequence file records the node numbering relationship between corresponding positions on the downstream and upstream boundary levels. Specifically, the file records the node numbering sequence at the same or corresponding physical positions on each level from the upstream to the downstream boundary condition surface. Here, "corresponding position" refers to a one-to-one correspondence between nodes on different levels in the physical space along the upstream and downstream directions of the dam.
[0114] Based on any of the above embodiments, the output is mesh data consisting of a layer sequence composed of the initial internal layers and all generated internal layers, followed by:
[0115] Generate a node mapping file, which records the numbering correspondence of nodes in the same physical location in each internal layer grid in the layer sequence from upstream to downstream.
[0116] Here, the node mapping file refers to a data file that records the node number correspondence between nodes in the same physical location in different layer grids from upstream to downstream. "Same physical location" means that these nodes are at the same coordinate position in the cross-sectional plane of the dam, but belong to different internal layers in the upstream and downstream directions.
[0117] Based on any of the above embodiments, mesh data is used for the visualization and analysis of internal level calculation results in finite element post-processing.
[0118] Figure 5 This is a flowchart illustrating another method for selecting the internal layer sequence of a dam provided by the present invention, as shown below. Figure 5 As shown, firstly, a three-dimensional finite element mesh model of the dam is obtained, and the upstream and downstream boundary condition surfaces in the model are identified by reading the unit surface properties.
[0119] Then, using the upstream boundary condition surface as the initial current layer, iterative generation begins. In each iteration, based on the cell topology and mapping matrix of the mesh model, starting from each cell surface on the current layer, its opposing cell surface facing the downstream side of the dam is automatically identified and determined; subsequently, all identified downstream opposing cell surfaces are combined into a new internal layer. This iterative process is repeated until the newly generated layer coincides with or is adjacent to the downstream boundary condition surface.
[0120] Finally, after the iteration process is complete, output all the generated layer mesh data, such as... Figure 4 The layer sequence mesh file, the integrated layer mesh file, and the node sequence file shown are provided for subsequent visualization analysis and use.
[0121] Figure 6 This is a schematic diagram of the structure of the electronic device provided by the present invention, such as... Figure 6 As shown, the electronic device may include a processor 610, a communications interface 620, a memory 630, and a communication bus 640. The processor 610, communications interface 620, and memory 630 communicate with each other via the communication bus 640. The processor 610 can call logical instructions from the memory 630 to execute a method for selecting the internal layer sequence of the dam.
[0122] Furthermore, the logical instructions in the aforementioned memory 630 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0123] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer is able to execute the selection method for the internal layer sequence of the dam provided by the above methods.
[0124] In another aspect, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method for selecting the sequence of internal layers of a dam provided by the methods described above.
[0125] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0126] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for selecting the internal layer sequence of a dam, characterized in that, include: A three-dimensional finite element mesh model is obtained, and the upstream and downstream boundary condition surfaces in the three-dimensional finite element mesh model are identified; the three-dimensional finite element mesh model is constructed using prism elements with similar shapes in the upstream and downstream directions; The current internal layer is determined, and a series of internal layers are continuously generated iteratively until the newly generated internal layer is the same as the downstream boundary condition surface or there are no other unit layers between them. Each iteration includes: based on the unit topology relationship of the three-dimensional finite element mesh model, identifying the opposing unit surfaces of each unit on the current internal layer facing the downstream side of the dam, and combining all the identified downstream opposing unit surfaces into a new internal layer; the upstream boundary condition surface is the initial internal layer. Output the grid data of the layer sequence, which consists of the initial internal layer and all generated internal layers.
2. The method for selecting the internal layer sequence of a dam according to claim 1, characterized in that, The element topology relationship based on the three-dimensional finite element mesh model, identifying the opposing element faces of each element at the current internal level facing the downstream side of the dam, includes: Traverse each unit face on the current internal level, and query the predefined unit face orientation mapping rule according to the unit number and face number of each unit face to obtain the orientation face number of each unit face in its own unit; the unit face orientation mapping rule is constructed based on the unit topology relationship; Based on the opposing face number of each unit face, identify the opposing unit face of each unit on the current internal level that faces the downstream side of the dam body.
3. The method for selecting the internal layer sequence of a dam according to claim 2, characterized in that, The unit-plane orientation mapping rule is constructed based on the following steps: Based on the aforementioned element topology, the geometric topology of the prism elements in the three-dimensional finite element mesh model is determined; Based on the aforementioned geometric topology, determine the numbering rules for each unit face and the geometric symmetry or arrangement pattern of each unit face in the upstream and downstream directions; Based on the unit face number and the geometric symmetry or arrangement pattern of each unit face in the upstream and downstream directions, determine the number of the opposing face within the unit. Establish a mapping relationship between the unit face number and the opposite face number to form the unit face orientation mapping rule.
4. The method for selecting the internal layer sequence of a dam according to claim 2, characterized in that, The three-dimensional finite element mesh model is constructed using hexahedral prism elements, and the element face-to-face mapping rule is as follows: Unit face number 1 corresponds to opposite face number 2; Element face number 2 corresponds to oriented face number 1; Unit surface number 3 corresponds to facing surface number 4; Unit face number 4 corresponds to opposite face number 3; Unit face number 5 corresponds to opposite face number 6; Unit face number 6 corresponds to facing face number 5; Element 1 is the upstream face, Element 2 is the downstream face, Element 3 is the left face, Element 4 is the right face, Element 5 is the top face, and Element 6 is the bottom face.
5. The method for selecting the internal layer sequence of a dam according to any one of claims 1 to 4, characterized in that, The grid data includes at least one of a series of independent layer grid files, an integrated grid file, and a node sequence file. In the integrated grid file, cells at different layers are distinguished by attribute values. The node sequence file records the node numbering relationship between corresponding positions of the downstream boundary layer and the upstream boundary layer.
6. The method for selecting the internal layer sequence of a dam according to any one of claims 1 to 4, characterized in that, The output consists of grid data of a layer sequence composed of the initial inner layer and all generated inner layers, and then includes: Generate a node mapping relationship file, which records the numbering correspondence of nodes in the same physical location in each internal layer grid in the layer sequence from upstream to downstream.
7. The method for selecting the internal layer sequence of a dam according to any one of claims 1 to 4, characterized in that, The mesh data is used for the visualization and analysis of internal level calculation results in finite element post-processing.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the method for selecting the internal layer sequence of the dam as described in any one of claims 1 to 7.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the method for selecting the internal layer sequence of the dam as described in any one of claims 1 to 7.