Method and device for placing seed points on three-dimensional surface
By triangulating the three-dimensional surface mesh and identifying the critical point type, combined with the three-unicom area algorithm, seed points are reasonably arranged on the three-dimensional non-structural surface, solving the problem of incomplete reflection of the flow field characteristics and achieving accurate visualization of the flow field.
Patent Information
- Application Number
- CN202510804449.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-17
- Publication Date
- 2025-07-18
- Estimated Expiration
- 2045-06-17
AI Technical Summary
The prior art is difficult to reasonably arrange seed points on three-dimensional unstructured surfaces, resulting in the local and global characteristics of the flow field being unable to be accurately reflected.
By reading the three-dimensional surface mesh and triangulating, the critical point is determined through the triangular mesh element, the seed point placement method is determined according to the critical point type, and the seed point is placed in the flow field. The three-universal area algorithm is used to find the connecting area, determine whether the area and shape meet the seed point placement conditions, and finally place the seed point in the center of the connecting area.
It accurately reflects the local and global characteristics of the flow field on the three-dimensional non-structural surface, and improves the accuracy and stability of the flow field visualization.
Smart Images

Figure CN120337822A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of scientific visualization technology, and in particular, to a method and device for placing seed points on a three-dimensional surface. Background Art
[0002] Flow field visualization helps analyze flow field characteristics by converting the results of fluid dynamics simulations into graphics. Surface streamlines show the fluid flow on the object surface and affect the aerodynamic performance. The arrangement of seed points is crucial for the streamline effect. A reasonable arrangement can ensure that the streamlines evenly cover and accurately reflect the flow field characteristics. However, the complexity of three-dimensional unstructured surface meshes makes it difficult to apply traditional methods, resulting in problems such as insufficient critical point detection accuracy and incomplete seed point coverage. Therefore, how to reasonably arrange seed points on a three-dimensional unstructured surface so that it can accurately express the local and global characteristics of the flow field remains a key challenge in current flow field visualization.
[0003] In the existing technology, the influence range of grid points is determined according to the local grid density and the Poisson ellipse sampling method. Then, the local maximum point of information entropy is selected as the initial seed point to highlight significant flow field characteristics. Finally, non-interfering seed points are supplemented through the influence range of grid points to comprehensively depict the overall situation of the surface flow field. However, the existing technology is only applicable to structured grids and cannot be applied to unstructured grids. Therefore, how to optimize the arrangement of seed points on a three-dimensional unstructured surface to ensure that it can comprehensively and accurately reflect the local and global characteristics of the flow field remains a major problem in current flow field visualization. Summary of the Invention
[0004] Based on the above deficiencies of the existing technology, the present application provides a method and device for placing seed points on a three-dimensional surface to solve the problem of how to optimize the arrangement of seed points on a three-dimensional unstructured surface to ensure that it can comprehensively and accurately reflect the local and global characteristics of the flow field.
[0005] To achieve the above objective, the present application provides the following technical solutions:
[0006] The first aspect of the present application provides a method for placing seed points on a three-dimensional surface, including:
[0007] Read a three-dimensional surface mesh and perform triangulation processing on the three-dimensional surface mesh to obtain a target three-dimensional surface mesh;
[0008] Traverse all triangular mesh elements in the target three-dimensional surface mesh to determine the positions of multiple critical points in the triangular mesh elements in the flow field;
[0009] For each of the critical points, determine the type of the critical point according to the position of the critical point in the triangular mesh element where it is located;
[0010] Based on the type of the critical point, determine the placement method of the seed points around the critical point, and place the seed points in the flow field according to the seed point placement method to obtain a target flow field;
[0011] Uniformly place seed points in the non-feature region of the target flow field, and generate streamlines according to all the seed points in the non-feature region and all the seed points in the feature region; wherein, the non-feature region refers to the blank region; the feature region refers to the region in the target flow field other than the non-feature region;
[0012] According to the triangular mesh cells passed by the streamlines, use the three-connected region algorithm to find the connected regions from all the triangular mesh cells;
[0013] For each of the connected regions, determine whether the area and shape of the connected region meet the placement conditions of the seed points;
[0014] If the area and shape of the connected region meet the placement conditions of the seed points, place a seed point at the center of the connected region.
[0015] Optionally, in the above method for placing seed points on the three-dimensional surface, the traversing all the triangular mesh cells in the target three-dimensional surface mesh to determine the positions of multiple critical points in the triangular mesh cells in the flow field includes:
[0016] For each of the triangular mesh cells, calculate the included angle between the velocity vectors of two adjacent vertices of the triangular mesh cell;
[0017] According to the included angle, calculate the Poincaré index of the triangular mesh cell;
[0018] Judge whether the Poincaré index is a preset threshold;
[0019] If the Poincaré index is the preset threshold, determine that there is a critical point in the triangular mesh cell, and calculate the centroid coordinates of the triangular mesh cell;
[0020] Based on the centroid coordinates, calculate the velocity component of any point in the triangular mesh cell;
[0021] Use the gradient descent method to determine the position of the critical point in the triangular mesh cell according to the velocity component and the centroid coordinates, and determine the position of the critical point in the triangular mesh cell as the position of the critical point in the triangular mesh cell in the flow field.
[0022] Optionally, in the above method for placing seed points on a three-dimensional surface, the step of using the gradient descent method to determine the position of the critical point in the triangular mesh cell according to the velocity component and the centroid coordinates includes:
[0023] Taking the centroid coordinates as the current point;
[0024] Calculating the gradient of the current point according to the velocity component, and calculating the position of the updated point based on the gradient, the centroid coordinates, and a preset step size;
[0025] Calculating the gradient of the updated point based on the velocity component corresponding to the position of the updated point;
[0026] Determining whether the gradient is less than a preset threshold;
[0027] If the gradient is less than the preset threshold, determining the position in the triangular mesh cell where the updated point is located as the position of the critical point in the triangular mesh cell;
[0028] If the gradient is not less than the preset threshold, taking the updated point as the current point, and returning to execute the step of calculating the gradient of the current point according to the velocity component.
[0029] Optionally, in the above method for placing seed points on a three-dimensional surface, the step of respectively determining the type of each critical point according to the position of the critical point in the triangular mesh cell where it is located includes:
[0030] For each critical point, performing coordinate mapping on the position in the triangular mesh cell where the critical point is located to obtain the mapping coordinate system corresponding to the triangular mesh cell;
[0031] Calculating the position of the critical point in the mapping coordinate system;
[0032] Calculating the distances between the position and the three sides of the triangular mesh cell;
[0033] Extracting the shortest distance from all the distances, and taking the shortest distance as the interpolation radius;
[0034] Interpolating four preset points corresponding to the position according to the interpolation radius to obtain the coordinates of four direction points and their corresponding velocity components;
[0035] Constructing a Jacobian matrix based on the coordinates of the four direction points and their corresponding velocity components, and solving the Jacobian matrix to obtain the eigenvalues of the Jacobian matrix;
[0036] Determining the type of the critical point according to the real part and the imaginary part of the eigenvalues.
[0037] Optionally, in the above method for placing seed points on the three-dimensional surface, determining the placement method of seed points around the critical point based on the type of the critical point includes:
[0038] When the type of the critical point is the center point type, determining the placement method of seed points around the critical point as a linear placement method according to the center point type;
[0039] When the type of the critical point is any one of an attracting focus, a repelling focus, an attracting node, and a repelling node, determining the placement method of seed points around the critical point as a circular placement method according to the type of the critical point;
[0040] When the type of the critical point is the saddle point type, determining the placement method of seed points around the critical point as a bisector placement method according to the saddle point type.
[0041] Optionally, in the above method for placing seed points on the three-dimensional surface, placing seed points in the flow field according to the placement method to obtain a target flow field includes:
[0042] When the placement method of the flow field is a linear placement method, emitting a straight line along the critical point in the flow field according to the linear placement method, and placing seed points on the straight line to obtain a target flow field;
[0043] When the placement method of the flow field is a circular placement method, placing seed points on a circle with the critical point in the flow field as the center according to the circular placement method to obtain a target flow field;
[0044] When the placement method of the flow field is a bisector placement method, placing seed points along the bisector of the main characteristic direction in the flow field according to the bisector placement method to obtain a target flow field; wherein, the main characteristic direction refers to the dominant direction of the critical point.
[0045] Optionally, in the above method for placing seed points on the three-dimensional surface, placing seed points in the non-characteristic region of the target flow field includes:
[0046] Obtain the seed points around all critical points;
[0047] Create a target set and a candidate set, and place the seed points around all critical points in the target set;
[0048] Traverse all grid points in all triangular mesh cells to obtain the coordinates of all grid points;
[0049] For each of the grid points, calculate the first distance between the coordinates of the grid point and all the seed points in the target set;
[0050] Determine whether the first distance corresponding to the grid point satisfies a preset threshold;
[0051] If the first distance corresponding to the grid point satisfies the preset threshold, place the grid point as a seed point into the candidate set;
[0052] Calculate the second distance between the coordinates of the grid point and all the seed points other than the grid point in the candidate set;
[0053] For each grid point in the candidate set, determine whether the second distance corresponding to the grid point satisfies the preset threshold;
[0054] If the second distance corresponding to the grid point satisfies the preset threshold, place the grid point as a seed point in the non-feature region of the target flow field.
[0055] Optionally, in the above method for placing seed points on a three-dimensional surface, the step of using the three-connected region algorithm to find multiple connected regions from all the triangular mesh cells according to the triangular mesh cells passed by the streamline includes:
[0056] Mark the triangular mesh cells passed by the streamline, and filter the marked triangular mesh cells from the non-feature region to obtain a target non-feature region;
[0057] For each triangular mesh cell in the target non-feature region, define a vertex set and a cell set in the triangular mesh cell, and construct a vertex adjacency list of the triangular mesh cell according to the vertex set and the cell set;
[0058] For each of all the vertex adjacency lists, determine whether there is a target vertex set in the vertex adjacency list; wherein, the target vertex set is composed of at least two identical vertices;
[0059] If there is a target vertex set in the vertex adjacency list, obtain the multiple triangular mesh cells corresponding to the target vertex set, and use the multiple triangular mesh cells corresponding to the target vertex set as the connected region.
[0060] The second aspect of the present application provides a device for placing seed points on a three-dimensional surface, including:
[0061] A triangulation processing unit, configured to read a three-dimensional surface mesh and perform triangulation processing on the three-dimensional surface mesh to obtain a target three-dimensional surface mesh;
[0062] A traversal unit for traversing all triangular mesh cells in the target three-dimensional surface mesh to determine the positions of multiple critical points in the triangular mesh cells in the flow field;
[0063] A type determination unit for determining the type of each critical point according to the position of the critical point in the triangular mesh cell where it is located;
[0064] A processing unit for determining the placement method of seed points around the critical point based on the type of the critical point, and placing seed points in the flow field according to the seed point placement method to obtain a target flow field;
[0065] A streamline generation unit for uniformly placing seed points in the non-feature region of the target flow field and generating streamlines according to all the seed points in the non-feature region and all the seed points in the feature region; wherein, the non-feature region refers to a blank region; the feature region refers to the region in the target flow field other than the non-feature region;
[0066] A region search unit for searching for a connected region from all the triangular mesh cells by using a three-connected region algorithm according to the triangular mesh cells passed by the streamline;
[0067] A condition judgment unit for judging whether the area and shape of each connected region satisfy the placement conditions of the seed points;
[0068] A seed point placement unit for placing a seed point at the center of the connected region if the area and shape of the connected region satisfy the placement conditions of the seed points.
[0069] Optionally, in the above seed point placement device for the three-dimensional surface, the traversal unit includes:
[0070] An included angle calculation unit for calculating the included angle between the velocity vectors of two adjacent vertices of each triangular mesh cell;
[0071] An index calculation unit for calculating the Poincaré index of the triangular mesh cell according to the included angle;
[0072] A threshold judgment unit for judging whether the Poincaré index is a preset threshold;
[0073] A coordinate calculation unit for determining that there is a critical point in the triangular mesh cell and calculating the centroid coordinates of the triangular mesh cell if the Poincaré index is the preset threshold;
[0074] A velocity component calculation unit for calculating the velocity component of any point in the triangular mesh cell based on the centroid coordinates;
[0075] A position determination unit, which is configured to use the gradient descent method to determine the position of the critical point in the triangular grid cell according to the velocity component and the barycentric coordinate, and determine the position of the critical point in the triangular grid cell as the position of the triangular grid cell where the critical point is located in the flow field.
[0076] Optionally, in the above-mentioned seed point placement device for a three-dimensional surface, the position determination unit includes:
[0077] A first acting unit, which is configured to use the barycentric coordinate as the current point;
[0078] A first calculation unit, which is configured to calculate the gradient of the current point according to the velocity component, and calculate the position of the updated point based on the gradient, the barycentric coordinate, and a preset step size;
[0079] A gradient calculation unit, which is configured to calculate the gradient of the updated point based on the velocity component corresponding to the position of the updated point;
[0080] A first determination unit, which is configured to determine whether the gradient is less than a preset threshold;
[0081] A position determination subunit, which is configured to, if the gradient is less than the preset threshold, determine the position in the triangular grid cell where the updated point is located as the position of the critical point in the triangular grid cell;
[0082] A return execution unit, which is configured to, if the gradient is not less than the preset threshold, use the updated point as the current point and return to execute the calculation of the gradient of the current point according to the velocity component.
[0083] Optionally, in the above-mentioned seed point placement device for a three-dimensional surface, the type determination unit includes:
[0084] A coordinate mapping unit, which is configured to perform coordinate mapping on the position in the triangular grid cell where each critical point is located respectively to obtain the mapping coordinate system corresponding to the triangular grid cell;
[0085] A position calculation unit, which is configured to calculate the position of the critical point in the mapping coordinate system;
[0086] A distance calculation unit, which is configured to calculate the distances between the position and the three sides of the triangular grid cell;
[0087] An extraction unit, which is configured to extract the shortest distance from all the distances and use the shortest distance as the interpolation radius;
[0088] An interpolation unit for interpolating four preset points corresponding to the position according to the interpolation radius to obtain the coordinates of four direction points and their corresponding velocity components;
[0089] A solution unit for constructing a Jacobian matrix based on the coordinates of the four direction points and their corresponding velocity components and solving the Jacobian matrix to obtain the eigenvalues of the Jacobian matrix;
[0090] A type sub-determination unit for determining the type of the critical point according to the real part and the imaginary part in the eigenvalues.
[0091] Optionally, in the above seed point placement device for a three-dimensional surface, the processing unit includes:
[0092] A first determination unit for determining, when the type of the critical point is the center point type, the placement mode of the seed points around the critical point as a linear placement mode according to the center point type;
[0093] A second determination unit for determining, when the type of the critical point is any one of an attracting focus, a repelling focus, an attracting node, and a repelling node, the placement mode of the seed points around the critical point as a circular center placement mode according to the type of the critical point;
[0094] A third determination unit for determining, when the type of the critical point is the saddle point type, the placement mode of the seed points around the critical point as a bisector placement mode according to the saddle point type.
[0095] Optionally, in the above seed point placement device for a three-dimensional surface, the processing unit includes:
[0096] A first placement unit for, when the placement mode of the flow field is the linear placement mode, emitting a straight line along the critical point in the flow field and placing seed points on the straight line to obtain a target flow field;
[0097] A second placement unit for, when the placement mode of the flow field is the circular center placement mode, placing seed points on a circle with the critical point in the flow field as the center to obtain a target flow field;
[0098] A third placement unit for, when the placement mode of the flow field is the bisector placement mode, placing seed points along the bisector of the main eigen-direction in the flow field to obtain a target flow field; wherein, the main eigen-direction refers to the dominant direction of the critical point.
[0099] Optionally, in the above seed point placement device for a three-dimensional surface, the streamline generation unit includes:
[0100] An acquisition unit for acquiring seed points around all critical points;
[0101] A creation unit for creating a target set and a candidate set, and placing the seed points around all the critical points in the target set;
[0102] A coordinate acquisition unit for traversing all grid points in all triangular grid cells to acquire the coordinates of all the grid points;
[0103] A second calculation unit for calculating, for each of the grid points, a first distance between the coordinates of the grid point and all the seed points in the target set;
[0104] A second judgment unit for judging whether the first distance corresponding to the grid point meets a preset threshold;
[0105] A second action unit for, if the first distance corresponding to the grid point meets the preset threshold, placing the grid point as a seed point into the candidate set;
[0106] A third calculation unit for calculating a second distance between the coordinates of the grid point and all the seed points other than the grid point itself in the candidate set;
[0107] A third judgment unit for judging, for all the grid points in the candidate set, whether the second distance corresponding to the grid point meets the preset threshold;
[0108] A third action unit for, if the second distance corresponding to the grid point meets the preset threshold, taking the grid point as a seed point and placing it in the non-feature region of the target flow field.
[0109] Optionally, in the above seed point placement device for a three-dimensional surface, the region search unit includes:
[0110] A marking unit for marking the triangular grid cells passed by the streamline and filtering the marked triangular grid cells from the non-feature region to obtain a target non-feature region;
[0111] A definition unit for, for each triangular grid cell in the target non-feature region, defining a vertex set and a cell set in the triangular grid cell, and constructing a vertex adjacency list of the triangular grid cell according to the vertex set and the cell set;
[0112] A fourth judgment unit for judging, for all the vertex adjacency lists, whether there is a target vertex set in the vertex adjacency list; wherein the target vertex set is composed of at least two identical vertices combined;
[0113] The region is used as a unit to obtain multiple triangular mesh units corresponding to the target vertex set if the target vertex set exists in the vertex adjacency list, and use the multiple triangular mesh units corresponding to the target vertex set as the connected region.
[0114] A method for placing seed points on a three-dimensional surface provided by the present application reads a three-dimensional surface mesh, triangulates the three-dimensional surface mesh to obtain a target three-dimensional surface mesh, then traverses all triangular mesh units in the target three-dimensional surface mesh to determine the triangular mesh units where multiple critical points in the flow field are located. Then, for each critical point, based on the triangular mesh unit where the critical point is located, determine the type of the critical point. Then, based on the type of the critical point, determine the placement method of the seed points around the critical point, and place the seed points in the flow field according to the placement method to obtain a target flow field. Subsequently, uniformly place seed points in the non-feature region of the target flow field, and generate streamlines based on all the seed points in the non-feature region and all the seed points in the feature region, where the non-feature region refers to the blank region, and the feature region refers to the region other than the non-feature region in the target flow field. Then, according to the triangular mesh units passed by the streamlines, use the three-connected region algorithm to find the connected region from all the triangular mesh units. Finally, for each connected region, determine whether the area and shape of the connected region meet the placement conditions of the seed points. If the area and shape of the connected region meet the placement conditions of the seed points, place the seed points at the center of the connected region. Thus, by identifying the critical points in the flow field and reasonably arranging the seed points in the feature region, and adopting a two-stage method to arrange the seed points in the non-feature region, the key features and global information of the surface flow field can be effectively and accurately characterized. Description of the Drawings
[0115] To more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for description in the embodiments or the prior art. Obviously, the drawings in the following description are only the embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained according to the provided drawings without creative efforts.
[0116] Figure 1 It is a flowchart showing a method for placing seed points on a three-dimensional surface provided by an embodiment of the present application;
[0117] Figure 2 It is a flowchart showing a method for determining the mesh unit where a critical point is located provided by another embodiment of the present application;
[0118] Figure 3 It is a flowchart showing a method for determining the position of a critical point provided by another embodiment of the present application;
[0119] Figure 4Schematic flowchart of a method for determining the type of critical point provided by another embodiment of the present application;
[0120] Figure 5 Schematic structural diagram of a coordinate mapping provided by another embodiment of the present application;
[0121] Figure 6 Schematic structural diagram of the distribution of interpolation positions of critical points provided by another embodiment of the present application;
[0122] Figure 7 Schematic structural diagram of the classification of critical points in a flow field provided by another embodiment of the present application;
[0123] Figure 8 Schematic structural diagram of a critical point placement template provided by another embodiment of the present application;
[0124] Figure 9 Schematic flowchart of a method for placing seed points in a non-feature region provided by another embodiment of the present application;
[0125] Figure 10 Schematic flowchart of a method for finding connected regions provided by another embodiment of the present application;
[0126] Figure 11 Schematic structural diagram of a three-connected structure provided by another embodiment of the present application;
[0127] Figure 12 Schematic structural diagram of a seed point placement device for a three-dimensional surface provided by another embodiment of the present application;
[0128] Wherein, O-XYZ is a three-dimensional coordinate system, O'-X'Y' is a plane rectangular coordinate system with the centroid of the triangle as the origin, A, B, and C are the coordinates of the three vertices of the triangle in the three-dimensional coordinate system respectively, is the unit vector of the OX axis, is the unit vector of the OY axis, ON is an axis in the plane rectangular coordinate system, (x, y-r) is offset upward by r units, (x, y+r) is offset downward by r units, (x-r, y) is offset leftward by r units, (x+r, y) is offset rightward by r units, and both R1 and R2 are two real parts of the eigenvalues, and both I1 and I2 are two imaginary parts of the eigenvalues. Detailed implementation manners
[0129] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.
[0130] In the present application, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements not only includes those elements, but also includes other elements not expressly listed, or elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising a..." does not exclude the existence of additional identical elements in the process, method, article or device comprising the element.
[0131] The embodiment of the present application provides a method for placing seed points on a three-dimensional surface, as Figure 1 shown, specifically including the following steps:
[0132] S101. Read the three-dimensional surface mesh and perform triangulation on the three-dimensional surface mesh to obtain a target three-dimensional surface mesh.
[0133] It can be understood that to read the three-dimensional surface mesh, it is necessary to first obtain the point cloud data, and then extract the three-dimensional surface mesh from the point cloud data.
[0134] It should be noted that in order to ensure the consistency of the mesh structure, when the three-dimensional surface mesh is read, it is necessary to perform appropriate triangulation on the three-dimensional surface mesh. Specifically, for structured meshes, by diagonal cutting of rectangular elements, triangular elements can be easily formed. This method is simple and efficient in calculation and is suitable for regular mesh structures. For unstructured meshes, due to the irregularity of their topological structures, the Delaunay triangulation method is usually adopted. By this method, by optimizing the quality of triangular elements, the generation of deformed or "hollow" regions can be avoided, thereby ensuring the rationality and accuracy of the mesh. Therefore, through the triangulation process of the three-dimensional surface mesh, different types of meshes can be effectively unified for processing, improving the stability and accuracy of subsequent calculations.
[0135] S102. Traverse all triangular mesh elements in the target three-dimensional surface mesh to determine the positions of multiple critical points in the flow field in the triangular mesh elements.
[0136] Specifically, after obtaining the target three-dimensional surface mesh, in order to locate and accurately analyze the key regions in the flow field, ensure that the treatment of critical points in the simulation process receives sufficient attention, and avoid large simulation errors caused by the roughness or inaccuracy of mesh division, it is necessary to traverse all triangular mesh elements on the target three-dimensional surface mesh to determine the specific positions of the critical points in the triangular mesh elements in the flow field.
[0137] The flow field refers to the motion state and distribution of a fluid (such as air, water, or other gases and liquids) in space, mainly used to reveal the structure, direction, and dynamic characteristics of fluid motion, and is an essential part of computational fluid dynamics (CFD).
[0138] Optionally, in another embodiment of the present application, a specific implementation manner of step S102 is as Figure 2 shown, and specifically includes the following steps:
[0139] S201. For each triangular mesh element, calculate the included angle between the velocity vectors of two adjacent vertices of the triangular mesh element.
[0140] Specifically, first obtain the velocity vectors of the coordinates of two adjacent vertices of the triangular mesh element, that is, and , and then use the included angle calculation formula to calculate the included angle between the velocity vectors of two adjacent vertices of the triangular mesh element. The specific calculation formula is:
[0141]
[0142] where represents the vector product of two vertices, and represents the modulus lengths of two vertices.
[0143] The calculation formula for the vector product of two vertices is: .
[0144] The calculation formula for the modulus lengths of two vertices is:
[0145]
[0146]
[0147] It should be noted that since there are three vertices of the triangular mesh element, there will be three groups of coordinates for obtaining the coordinates of two adjacent vertices of the triangular mesh element. Therefore, the included angles between the velocity vectors of two adjacent vertices of the triangular mesh element include and , and both are calculated through the included angle It can be obtained from the calculation formula.
[0148] S202. Calculate the Poincaré index of the triangular mesh element according to the included angle.
[0149] Specifically, the Poincaré index The calculation formula is:
[0150]
[0151] where and both represent the included angle.
[0152] S203. Determine whether the Poincaré index is a preset threshold.
[0153] It should be noted that in the embodiments of the present application, the Poincaré index is used to determine whether there is a critical point in the triangular mesh element. Therefore, it will be determined by setting a threshold, that is, to determine whether the Poincaré index is a preset threshold. If the Poincaré index is the preset threshold, it means that there is a critical point in the triangular mesh element corresponding to the Poincaré index. Therefore, step S204 is executed.
[0154] Optionally, if the Poincaré index is a non-preset threshold, it means that there is no critical point in the triangular mesh element corresponding to the Poincaré index. Then it is necessary to determine whether there is a critical point in the next triangular mesh element until all triangular mesh elements are determined.
[0155] Optionally, the preset threshold is 1 or -1.
[0156] S204. Determine that there is a critical point in the triangular mesh element and calculate the centroid coordinates of the triangular mesh element.
[0157] Specifically, when the Poincaré index is 1 or -1, it means that there is a critical point in the triangular mesh element. At this time, it is necessary to accurately determine the specific position in the triangular mesh element where the critical point is located. Therefore, it is necessary to first calculate the centroid coordinates of the triangular mesh element, that is, the calculation formula of the centroid coordinates is:
[0158]
[0159]
[0160]
[0161] where P0, P1, and P2 all represent the three vertices P0(x0, y0, z0), P1(x1, y1, z1), and P2(x2, y2, z2) of the triangular mesh element.
[0162] S205. Calculate the velocity component of any point in the triangular mesh element based on the centroid coordinates.
[0163] It should be noted that under discrete data conditions, the three vertices P0(x0, y0, z0), P1(x1, y1, z1) and P2(x2, y2, z2) of the triangular mesh element can be obtained, as well as the velocity components (u0, v0, w0), (u1, v1, w1) and (u2, v2, w2) corresponding to the three vertex coordinates respectively. Then, the velocity components of any point P can be calculated by virtue of the barycentric coordinates and the velocity components of the three vertex coordinates, that is, the velocity of any point in the triangular mesh element, so that the exact position of the critical point can be determined subsequently by virtue of the velocity components and the barycentric coordinates.
[0164] S206. Use the gradient descent method to determine the position of the critical point in the triangular mesh element according to the velocity components and the barycentric coordinates, and determine the position of the critical point in the triangular mesh element as the position of the triangular mesh element where the critical point is located in the flow field.
[0165] It should be noted that in the embodiment of the present application, for the triangular mesh element with a critical point, the gradient descent method can be used in combination with the interpolation method to iterate the position of the critical point, so that the specific position of the exact critical point in the triangular mesh element can be obtained.
[0166] Optionally, in another embodiment of the present application, a specific implementation manner of using the gradient descent method to determine the position of the critical point in the triangular mesh element in step S206 is as Figure 3 shown, and specifically includes the following steps:
[0167] S301. Take the barycentric coordinates as the current point.
[0168] Specifically, take the barycentric coordinates of the triangular mesh element as the initial position of the iteration, because it is geometrically stable and suitable for use as the starting point of the iteration.
[0169] S302. Calculate the gradient of the current point according to the velocity components, and calculate the position of the updated point based on the gradient, the barycentric coordinates and the preset step size.
[0170] It should be noted that after obtaining the velocity information of the current point, that is, the velocity components in step S205, the gradient of the current point can be calculated by virtue of the velocity components. The calculation formula of the gradient is:
[0171]
[0172] where d {x, y, z}, represents the velocity component at the point that is, the velocity components in step S205, and is the point perturbed in the d direction . is a very small value, 1e - 5, used to approximate the derivative.
[0173] After calculating the gradient of the current point, the gradient descent method can be used to start from the initial point and iteratively calculate the position P of the updated point new . Specifically, the position P of the updated point new is calculated by the formula:[[]]
[0174]
[0175] where refers to the barycentric coordinate,[[]] is the preset step size, controlling the amplitude of each update,[[]] is the gradient.
[0176] S303. Calculate the gradient of the updated point based on the velocity component corresponding to the position of the updated point.
[0177] It can be understood that when a new point is obtained after each iteration, that is, the updated point, it is necessary to calculate the gradient of the updated point so that it can be determined whether the updated point is stable at the critical point based on the gradient of the updated point in the subsequent steps.
[0178] In addition, the calculation formula for the gradient of the updated point can refer to the calculation formula for the gradient of the current point in step S302, which will not be elaborated here.
[0179] S304. Determine whether the gradient is less than the preset threshold.
[0180] Specifically, the threshold method is used to determine whether the updated point is stable at the critical point based on the gradient of the updated point, that is, the threshold is . If the gradient is less than the preset threshold, it means that the iteration can be stopped. At this time, the updated point has been stable at the critical point, so step S305 is executed. If the gradient is not less than the preset threshold, it means that the iteration cannot be stopped yet. At this time, the updated point has not been stable at the critical point, so step S306 is executed.
[0181] S305. Determine the position of the critical point in the triangular mesh cell as the position in the triangular mesh cell where the updated point is located.
[0182] Specifically, when the gradient is less than the preset threshold, it is necessary to stop iterating the position of the updated point. At this time, the position of the updated point is the position where the critical point is located. Therefore, the position in the triangular mesh cell where the updated point is located can be determined as the position of the critical point in the triangular mesh cell.
[0183] S306. Take the updated point as the current point.
[0184] It can be understood that when the gradient is not less than the preset threshold, it is necessary to continue to iteratively update the position of the point until it stabilizes at the critical point. At this time, that is, taking the position of the updated point as the starting point of the iteration, and returning to execute step S302 until the gradient is less than the preset threshold.
[0185] S103. For each critical point, determine the type of the critical point according to its position in the triangular grid cell where it is located.
[0186] It should be noted that in the embodiments of the present application, different methods need to be adopted to arrange the seed points according to the type of the critical point, so as to ensure that the flow field characteristics can be accurately expressed. Therefore, it is necessary to first determine the type of the critical point.
[0187] Optionally, in another embodiment of the present application, a specific implementation manner of step S103 is as Figure 4 shown, and specifically includes the following steps:
[0188] S401. For each critical point, perform coordinate mapping on the position in the triangular grid cell where the critical point is located to obtain the corresponding mapping coordinate system of the triangular grid cell.
[0189] It can be understood that in order to improve the accuracy, stability and adaptability of subsequent calculations, and ensure that more accurate and effective solutions can be obtained in complex physical simulations and numerical analyses, it is necessary to perform coordinate mapping on the position in the triangular grid cell where the critical point is located, that is, convert the three-dimensional coordinate system O-XYZ into a plane rectangular coordinate system O'-X'Y' with the centroid of the triangle as the origin.
[0190] S402. Calculate the position of the critical point in the mapping coordinate system.
[0191] Specifically, using the coordinate transformation formula, convert the position of the critical point in the original coordinate system into the coordinates in the mapping coordinate system. Assume that the position of the critical point in the original coordinate system is (x c , y c , z c ), and then the coordinate transformation formula can be used for conversion to obtain the mapped critical point coordinates (x' c , y' c , z' c ).
[0192] Specifically, it can be as Figure 5 shown. It is necessary to set the point coordinates of the triangular grid cell ABC as (x i , y i , z i ), and its corresponding velocity vector V i is (u i , vi , w i ), after coordinate mapping, the vertex coordinates of triangle ABC are transformed into (x' i , y' i , z' i ), and the corresponding velocity vector V' i is (u' i , v' i , w' i ). First, let the axis OX be in the same direction as AB. Through this calculation formula, the normal vector ON of the triangular grid element can be obtained. After obtaining OX and ON, the axis OY can be calculated through calculation.
[0193] After obtaining OX, OY, and ON, it is necessary to set the unit vectors of OX, OY, and ON as , , , respectively, and then use the coordinate transformation matrix M for transformation. The specific expression is:
[0194]
[0195] Therefore, the coordinate transformation at the vertex of the triangular grid element can be obtained through calculation.
[0196] At the same time, the velocity vector at the vertex of the triangular grid element can also be transformed into the two-dimensional plane coordinate system, which can be obtained through calculation.
[0197] S403. Calculate the distances between the position and the three sides of the triangular grid element.
[0198] Specifically, in order to find the shortest distance between a position and a triangular grid element later, the distance formula from a point to a line can be used, and combined with the geometric characteristics of the triangle to solve the distances between the position and the three sides of the triangular grid element.
[0199] S404. Extract the shortest distance from all the distances and use the shortest distance as the interpolation radius.
[0200] It can be understood that in order to dynamically adjust the interpolation range in the local area to achieve more accurate interpolation, the shortest distance among the three distances needs to be used as the interpolation radius r.
[0201] S405. Interpolate the four preset points corresponding to the position according to the interpolation radius to obtain the coordinates of the four direction points and their corresponding velocity components.
[0202] It should be noted that after finding the interpolation radius, interpolation needs to be performed by offsetting r units along the four directions of the position, so that the coordinates of the four direction points (x, y - r), (x, y + r), (x - r, y), and (x + r, y) can be obtained. Among them, the four directions are: (x, y - r) is offset r units upward, (x, y + r): is offset r units downward, (x - r, y): is offset r units to the left, (x + r, y): is offset r units to the right. Specifically, reference can be made to Figure 6 the content shown.
[0203] S406. Based on the coordinates of the four direction points and their corresponding velocity components, construct the Jacobian matrix and solve the Jacobian matrix to obtain the eigenvalues of the Jacobian matrix.
[0204] Specifically, after obtaining the coordinates of the four direction points and their corresponding velocity components, the central difference method can be used to construct the Jacobian matrix J at the critical point, that is, the construction expression of the Jacobian matrix J is:
[0205]
[0206] Then, after obtaining the Jacobian matrix, the Jacobian matrix needs to be differentiated, and at this time, the eigenvalues of the Jacobian matrix can be obtained.
[0207] S407. Determine the type of the critical point according to the real part and the imaginary part in the eigenvalues.
[0208] It should be noted that the dynamic characteristics of the fluid in this region can be judged according to the positive and negative of the real part R and the imaginary part I included in the eigenvalues, so as to classify the critical points. Then, according to the different properties of the flow field, the critical points can include six types. Specifically, the six types can be seen in Figure 7 the content shown, Figure 7 where (a) is the type of the center point, (b) is the type of the repulsive focus, (c) is the type of the attractive focus, (d) is the type of the saddle point, (e) is the type of the repulsive node, and (f) is the type of the attractive node.
[0209] S104. Based on the type of the critical point, determine the placement method of the seed points around the critical point, and according to the placement method of the seed points, place the seed points in the flow field to obtain the target flow field.
[0210] It should be noted that in the embodiment of the present application, according to the six types of critical points, three placement methods of the seed points are summarized. Therefore, it is necessary to select a suitable seed point placement strategy according to the identified critical point type and arrange the seed points in the flow field, so that a target flow field with the seed points placed can be obtained.
[0211] Optionally, in another embodiment of the present application, a specific implementation manner of determining the placement method of seed points around a critical point based on the type of the critical point in step S104 specifically includes the following steps:
[0212] When the type of the critical point is the center point type, according to the center point type, determine that the placement method of the seed points around the critical point is the linear placement method.
[0213] Specifically, the eigenvalue contains two real parts (R1 and R2) and two imaginary parts (I1 and I2). Therefore, when R1 = R2 = 0 and I1 = -I2 ≠ 0, it can be determined that the type of the critical point is the center point type at this time. Then, the placement method of the seed points corresponding to the center point type is the linear placement method.
[0214] When the type of the critical point is any one of the attracting focus, repelling focus, attracting node, and repelling node, according to the type of the critical point, determine that the placement method of the seed points around the critical point is the circular center placement method.
[0215] Specifically, if R1 = R2 > 0 and I1 = -I2 ≠ 0, it can be determined that the type of the critical point is the repelling focus at this time. If R1 = R2 < 0 and I1 = -I2 ≠ 0, it can be determined that the type of the critical point is the attracting focus at this time. If R1, R2 < 0 and I1 = I2 = 0, it can be determined that the type of the critical point is the attracting node at this time. If R1, R2 > 0 and I1 = I2 = 0, it can be determined that the type of the critical point is the repelling node at this time. Then, the placement methods of the seed points for the attracting focus, repelling focus, attracting node, and repelling node are all the circular center placement method.
[0216] When the type of the critical point is the saddle point type, according to the saddle point type, determine that the placement method of the seed points around the critical point is the bisector placement method.
[0217] Specifically, if R1 < 0, R2 > 0, and I1 = I2 = 0, it can be determined that the type of the critical point is the saddle point type at this time. Then, the placement method of the seed points for the saddle point type is the bisector placement method.
[0218] Optionally, in another embodiment of the present application, a specific implementation manner of placing seed points in the flow field according to the placement method to obtain the target flow field in step S104 specifically includes the following steps:
[0219] When the placement method of the flow field is the linear placement method, according to the linear placement method, emit a straight line along the critical point in the flow field and place seed points on the straight line to obtain the target flow field.
[0220] It should be noted that the placement methods of the three types of seed points can be referred to Figure 8 the content shown in, where the bold points represent the seed templates and the dotted lines are the streamlines traced by the seeds in the template.
[0221] Specifically, when it is determined that the placement method of the flow field is the linear placement method, first, it is necessary to select an appropriate direction for linear emission according to the type of the center point in the flow field. Usually, the center point position in the flow field is selected. Therefore, at this time, there are obvious changes in the flow characteristics near the center point position. So, arranging seed points on the straight lines around these areas can effectively capture the main characteristics of the flow field. Then, once the appropriate direction is determined, a straight line is emitted along the direction of the critical point next. The starting point of this straight line is usually selected near the center point, and the direction of the straight line is adjusted according to the flow direction of the flow field. For a steady state point, a straight line can be emitted along the main flow direction, and then, on the emitted straight line, multiple seed points are placed at a certain interval. The positions of these seed points can be adjusted according to the characteristics of the flow field. Usually, the appropriate interval can be determined by calculating the change gradient of physical quantities such as velocity or pressure in the flow field. Where the interval is smaller, the flow field characteristics change more significantly. Therefore, the seed points can be placed densely. While in the relatively stable area of the flow field, the number of seed points can be appropriately reduced. Finally, by evenly distributing the seed points on the straight line or according to the characteristics of the flow field, the flow characteristics of the entire flow field can be effectively described. The obtained target flow field contains the streamline information emitted along the straight line and can reflect the physical characteristics of each area in the flow field, especially the flow conditions around the critical point. Among them Figure 8 in (a) represents the linear placement method.
[0222] When the placement method of the flow field is the center - circle placement method, according to the center - circle placement method, seed points are placed on the circle with the critical point in the flow field as the center to obtain the target flow field.
[0223] It can be understood that when it is determined that the placement method of the flow field is the center - circle placement method, first, it is necessary to select the critical point in the flow field as the center. It is the point with special flow characteristics in the flow field and can effectively capture the flow characteristics of the flow field in these areas. Secondly, after the center is determined, then the radius of the circle needs to be selected. The size of the radius is usually determined according to the scale of the flow field or the change range in the flow field. A circle with a smaller radius can observe the flow characteristics near the critical point more finely, while a circle with a larger radius can cover a larger range of flow field changes. Then, the seed points are evenly distributed along the edge of the circle. The number of seed points can be set as needed. Usually, a certain interval is selected to ensure covering the main characteristics of the flow field. The interval of the seed points can be adjusted according to the change rate of the flow field. In the area where the flow field changes more violently, the density of the seed points can be increased. Finally, by evenly placing the seed points on the circular path, the target flow field is generated. Each seed point is used to trace the streamlines in the flow field, and finally a complete description of the flow field is obtained. Through these seed points, the distribution characteristics of the flow field can be obtained, especially the flow state near the critical point. Among them Figure 8 in (b) represents the center - circle placement method.
[0224] When the placement mode of the flow field is the bisector placement mode, according to the bisector placement mode, seed points are placed along the bisector of the main feature direction in the flow field to obtain the target flow field. Herein, the main feature direction refers to the dominant direction of the critical point.
[0225] Specifically, when it is determined that the placement mode of the flow field is the bisector placement mode, it is necessary to first determine the main feature direction, which generally refers to the dominant direction of the flow field near the critical point. This direction can be determined by the following methods:
[0226] Streamline direction: For a critical point, the dominant streamline direction of the flow field can be identified by the shape of the streamline.
[0227] Velocity field direction: Observe the distribution of velocity vectors in the flow field and select the dominant flow direction, that is, the direction in which the velocity vector distribution is most concentrated.
[0228] Gradient direction: If there is a gradient distribution of the velocity field, the direction with the most obvious gradient can be selected as the main feature direction.
[0229] Secondly, determine the bisector. That is, the bisector refers to the symmetric dividing line of the direction delimited by the critical point and its surrounding flow characteristics in the flow field. Generally, around the critical point, the characteristics of the flow field are symmetric along a certain specific direction, and the bisector is the axis of symmetry of the flow field along this feature direction.
[0230] Then, seed points are evenly placed along the bisector of the main feature direction. The seed points should be distributed along the bisector at a certain interval so as to be able to track the flow of the flow field along this direction. These seed points usually concentrate near the critical point to better observe the flow changes in the main feature direction.
[0231] Finally, through these seed points, the streamlines in the flow field can be tracked, thereby depicting the overall structure of the target flow field. The streamlines of these seed points will help describe the evolution of the flow field along the main feature direction, especially near the critical point where the changes in the flow field are more significant. Among them Figure 8 (c) represents the bisector placement mode.
[0232] S105. Uniformly place seed points in the non-feature area of the target flow field, and generate streamlines according to all the seed points in the non-feature area and all the seed points in the feature area.
[0233] It is understandable that after the seed points are placed in the feature region, there may still be some non-feature regions. Herein, the feature region refers to the region in the target flow field other than the non-feature region. The non-feature region refers to the blank region in the target flow field. Therefore, in order to accurately depict the key features and global information of the surface flow field, it is also necessary to place seed points in the non-feature region, and generate streamlines based on the seed points in the non-feature region and the seed points around the critical points of the feature region. The streamlines are used to clearly reflect the flow direction, velocity distribution, and local vortices and other features of the fluid on the surface of the complex geometric structure.
[0234] Optionally, in another embodiment of the present application, a specific implementation manner of placing seed points in the non-feature region of the target flow field in step S105 is as Figure 9 shown, and specifically includes the following steps:
[0235] S901. Obtain the seed points around all critical points.
[0236] It is understandable that in order to be able to place seed points in the non-feature region, there are requirements for the selection of the seed points placed in the non-feature region. Therefore, according to the selection requirements, the seed points around the critical points will be selected first.
[0237] S902. Create a target set and a candidate set, and place all the seed points around the critical points in the target set.
[0238] It should be noted that in order to be able to select the seed points that meet the requirements, two sets will be created in advance, namely the target set and the candidate set. Then, the seed points around the critical points will be placed in the target set, and the grid points as candidate seed points will be placed in the candidate set subsequently.
[0239] S903. Traverse all the grid points in all triangular mesh cells to obtain the coordinates of all grid points.
[0240] It should be noted that in the embodiment of the present application, the seed points that meet the conditions are selected by the distance between points. Therefore, it is necessary to first traverse all the vertices in all triangular mesh cells, and then obtain the coordinates of all vertices as the coordinates of the grid points.
[0241] S904. For each grid point, calculate the first distance between the coordinates of the grid point and all the seed points in the target set.
[0242] Specifically, the Euclidean distance is used to calculate the distance between points. Assume that the coordinates of the grid point are P i (x i , y i , z i ), i represents the index of the point, P j (xj , y j , z j ) represents the coordinates of the seed points in the target set. At this time, the Euclidean distance d can be used to calculate P i (x i , y i , z i ) and P j (x j , y j , z j ) The first distance between them:
[0243]
[0244] Among them, P i represents the i-th grid point, and P j represents the j-th seed point in the target set.
[0245] S905. Determine whether the first distance corresponding to the grid point meets the preset threshold.
[0246] Specifically, in order to know whether the grid point meets the seed points placed in the candidate set, it can be determined by means of a threshold, that is, to determine whether the first distance corresponding to the grid point meets the preset threshold. If the first distance corresponding to the grid point meets the preset threshold, it means that the grid point meets the seed points placed in the candidate set. Therefore, step S906 is executed at this time.
[0247] Optionally, if the first distance corresponding to the grid point does not meet the preset threshold, it means that the grid point does not meet the seed points placed in the candidate set, and the grid point will be deleted to avoid repeated calculation.
[0248] S906. Place the grid point as a seed point into the candidate set.
[0249] It can be understood that when the first distance corresponding to the grid point meets the preset threshold, the grid point needs to be placed in the candidate set as a candidate seed point, so as to ensure that all selected seed points are not too close and repeated.
[0250] S907. Calculate the second distance between the coordinates of the grid point and all the seed points in the candidate set except the grid point.
[0251] It should be noted that when all the first distances corresponding to the grid points have been judged, it means that all the seed points that meet the candidate conditions have been stored in the candidate set. At this time, it is still necessary to further judge the seed points that meet the candidate conditions in order to place the seed points in the non-feature area, so as to accurately depict the key features of the surface flow field.
[0252] Therefore, it is necessary to calculate the second distance between the coordinates of all grid points and all the seed points in the candidate set except this grid point as the seed point again by using the coordinates of all grid points, and the Euclidean distance is also used for calculation.
[0253] S908. For each grid point in the candidate set, determine whether the second distance corresponding to the grid point meets a preset threshold.
[0254] It can be understood that after obtaining all the second distances, it is necessary to then determine whether the second distance corresponding to the grid point meets the preset threshold, so as to determine the seed points placed in the non-feature region. Therefore, if the second distance corresponding to the grid point meets the preset threshold, it ultimately indicates that the grid point meets the condition for being placed in the non-feature region, so step S909 is executed.
[0255] Optionally, if the second distance corresponding to the grid point does not meet the preset threshold, it ultimately indicates that the grid point does not meet the condition for being placed in the non-feature region. At this time, the grid point needs to be deleted, and then the next grid point is judged.
[0256] S909. Take the grid point as a seed point and place it in the non-feature region of the target flow field.
[0257] Specifically, when the second distance corresponding to the grid point meets the preset threshold, obtain all the grid points that meet the preset threshold and use them as seed points, and then place all the seed points in the non-feature region.
[0258] S106. According to the triangular grid cells passed by the streamline, use the three-connected region algorithm to find the connected region from all the triangular grid cells.
[0259] It should be noted that after placing the candidate seed points in the non-feature region, there may still be some blank areas in the non-feature region. Therefore, to solve this situation, it is necessary to use connectivity analysis to identify the remaining uncovered connected regions, that is, use the three-connected region algorithm to find the uncovered connected regions according to the triangular grid cells passed by the streamline, so as to place seed points in the uncovered connected regions.
[0260] Optionally, in another embodiment of the present application, a specific implementation manner of step S106 is as Figure 10 shown, and specifically includes the following steps:
[0261] S1001. Mark the triangular grid cells passed by the streamline, and filter the marked triangular grid cells from the non-feature region to obtain the target non-feature region.
[0262] It can be understood that in order to solve the problem that there will still be blank areas after placing seed points in non-feature areas, all triangular mesh elements in the non-feature areas will be traversed first to mark the triangular mesh elements through which streamlines pass, so that the status of the triangular mesh elements is status = 1. Then, the marked triangular mesh elements will be filtered from the non-feature areas, and thus the blank areas not covered by seed points, that is, the target non-feature areas, can be obtained.
[0263] S1002. For each triangular mesh element in the target non-feature area, define the vertex set and element set in the triangular mesh element, and construct the vertex adjacency list of the triangular mesh element according to the vertex set and element set.
[0264] It should be noted that in the embodiment of the present application, according to the proposed three-connected region algorithm based on triangular mesh topology, as Figure 11 shown, the remaining uncovered connected regions are identified by using connectivity analysis, that is, based on the adjacency relationship of triangular mesh elements, the connected regions are constructed by using each triangular mesh element and its neighbors sharing edges. The specific process is as follows:
[0265] First, traverse all triangular mesh elements. For the triangular mesh elements that have not been visited (that is, the triangular mesh elements through which no streamline passes), use depth-first search (DFS) or breadth-first search (BFS) to recursively expand, and classify all adjacent triangular mesh elements with shared edges into the same connected region.
[0266] In addition, in order to accelerate the search for the elements adjacent to the target element, we construct a vertex adjacency list for each data block, that is, first define the vertex set V and element set C in the triangular mesh element, where each element C i ∈C, and C is composed of three vertices {v1, v2, v3}. The vertex adjacency list T v is a hash table, where the key is the vertex ID and the value is the set of element IDs involved by the vertex. For example, for vertex v1, its adjacency list T v1 contains all the element IDs containing vertex v1. Therefore, when constructing the vertex adjacency list, for each element C i ∈C, each vertex v j ∈V i , where V refers to the vertex set in all triangular mesh elements, and V i is the i-th point in the vertex set. Add the ID of the element C i to the adjacency list of the vertex, that is: T vj =T vj ∪{C i}.
[0267] where vj ∈ V i is one of the vertices of unit C i And subsequently, using this structure, the adjacent unit N of the target unit can be efficiently obtained by querying the vertex adjacency list T v to obtain the connected region. v
[0268] S1003. For each vertex adjacency list, determine whether there is a target vertex set in the vertex adjacency list.
[0269] It should be noted that in order to find the unit adjacent to a certain unit C i the adjacent unit can be found by checking whether there is a target vertex set in each vertex adjacency list, where the target vertex set is composed of at least two identical vertices. The specific search process is as follows:
[0270] It is necessary to first extract the vertex set V i of this unit C i = {v1, v2, v3}, and then for each vertex v j ∈ V i query its adjacency list T vj , and filter out the units adjacent to unit C i . The determination condition for adjacent units is that when two units share more than two vertices, they are considered adjacent units. The mathematical expression is:
[0271]
[0272] where shared_vertices(C i , C j ) represents the number of vertices shared by unit C i and C j .
[0273] Therefore, if there is a target vertex set in the vertex adjacency list, it means that there may be triangular mesh units adjacent to the target mesh unit in the target non-feature region. Therefore, step S1004 is executed at this time.
[0274] Optionally, if there is no target vertex set in the vertex adjacency list, it means that there are no adjacent triangular mesh units for the C i unit corresponding to this vertex adjacency list. Therefore, this C i unit needs to be ignored and the judgment of the next C i unit continues.
[0275] S1004. Obtain multiple triangular mesh units corresponding to the target vertex set, and use the multiple triangular mesh units corresponding to the target vertex set as the connected region.
[0276] Specifically, when there is a target vertex set in the vertex adjacency list, it is considered that there may be adjacent cells in the C i unit corresponding to the vertex adjacency list. Therefore, it is necessary to obtain all triangular mesh cells corresponding to each vertex in the target vertex set, and regard the triangular mesh cells adjacent to the target cell as the same connected region for subsequent placement of seed points.
[0277] S107. For each connected region, determine whether the area and shape of the connected region meet the placement conditions of the seed points.
[0278] It should be noted that in order to eliminate slender and overly small connected regions, because they do not contain enough pixels or space for subsequent seed point propagation or region growth, for each connected region, it is necessary to determine whether the area and shape of the connected region meet the placement conditions of the seed points. If the area and shape of the connected region meet the placement conditions of the seed points, then step S108 is executed.
[0279] Optionally, if both the area and shape of the connected region do not meet the placement conditions of the seed points, it means that the connected region is a slender and overly small region. Therefore, it is necessary to eliminate this connected region.
[0280] S108. Place a seed point at the center of the connected region.
[0281] It can be understood that when the area and shape of the connected region meet the placement conditions of the seed points, it is necessary to arrange seed points at the center of the connected region and generate streamlines based on the arranged seed points until no new seed points are added, that is, until all connected regions are judged completely.
[0282] A method for placing seed points on a three-dimensional surface provided by the present application reads a three-dimensional surface mesh, performs triangulation on the three-dimensional surface mesh to obtain a target three-dimensional surface mesh, then traverses all triangular mesh elements in the target three-dimensional surface mesh to determine the triangular mesh elements where multiple critical points in the flow field are located. Next, for each critical point, according to the triangular mesh element where the critical point is located, the type of the critical point is determined. Then, based on the type of the critical point, the placement method of the seed points around the critical point is determined, and according to the placement method, seed points are placed in the flow field to obtain a target flow field. Subsequently, seed points are evenly placed in the non-feature area of the target flow field, and streamlines are generated according to all the seed points in the non-feature area and all the seed points in the feature area, where the non-feature area refers to the blank area, and the feature area refers to the area other than the non-feature area in the target flow field. Then, according to the triangular mesh elements passed by the streamlines, the three-connected region algorithm is used to find the connected regions from all the triangular mesh elements. Finally, for each connected region, it is judged whether the area and shape of the connected region meet the placement conditions of the seed points. If the area and shape of the connected region meet the placement conditions of the seed points, seed points are placed at the center of the connected region. Thus, by identifying the critical points in the flow field and reasonably arranging seed points in the feature area, and at the same time using a two-stage method to arrange seed points in the non-feature area, the key features and global information of the surface flow field can be effectively and accurately characterized.
[0283] Another embodiment of the present application provides a seed point placement device for a three-dimensional surface, as Figure 12 shown, including the following units:
[0284] The triangulation processing unit 1201 is configured to read a three-dimensional surface mesh and perform triangulation on the three-dimensional surface mesh to obtain a target three-dimensional surface mesh.
[0285] The traversal unit 1202 is configured to traverse all triangular mesh elements in the target three-dimensional surface mesh to determine the positions in the triangular mesh elements where multiple critical points in the flow field are located.
[0286] The type determination unit 1203 is configured to, for each critical point, determine the type of the critical point according to the position in the triangular mesh element where the critical point is located.
[0287] The processing unit 1204 is configured to, based on the type of the critical point, determine the placement method of the seed points around the critical point, and according to the seed point placement method, place seed points in the flow field to obtain a target flow field.
[0288] A streamline generation unit 1205 is configured to uniformly place seed points in a non-feature region of a target flow field and generate streamlines based on all the seed points in the non-feature region and all the seed points in the feature region. Herein, the non-feature region refers to a blank region, and the feature region refers to a region other than the non-feature region in the target flow field.
[0289] A region searching unit 1206 is configured to search for a connected region from all triangular mesh elements according to the triangular mesh elements passed by the streamline by using a three-connected region algorithm.
[0290] A condition judgment unit 1207 is configured to respectively judge whether the area and shape of each connected region meet the placement condition of the seed points.
[0291] A seed point placement unit 1208 is configured to place a seed point at the center of the connected region if the area and shape of the connected region meet the placement condition of the seed points.
[0292] It should be noted that the specific working process of the above modules in the embodiments of the present application may refer to steps S101 to S108 in the above method embodiments correspondingly, and details are not described herein again.
[0293] Optionally, in a seed point placement device for a three-dimensional surface provided in another embodiment of the present application, a traversal unit 1202 includes:
[0294] An included angle calculation unit is configured to respectively calculate the included angle between the velocity vectors of two adjacent vertices of each triangular mesh element.
[0295] An index calculation unit is configured to calculate the Poincaré index of each triangular mesh element according to the included angle.
[0296] A threshold judgment unit is configured to judge whether the Poincaré index is a preset threshold.
[0297] A coordinate calculation unit is configured to determine that there is a critical point in the triangular mesh element and calculate the barycentric coordinates of the triangular mesh element if the Poincaré index is the preset threshold.
[0298] A velocity component calculation unit is configured to calculate the velocity component of any point in the triangular mesh element based on the barycentric coordinates.
[0299] A position determination unit is configured to determine the position of the critical point in the triangular mesh element by using the gradient descent method according to the velocity component and the barycentric coordinates, and determine the position of the critical point in the triangular mesh element as the position of the triangular mesh element where the critical point in the flow field is located.
[0300] Optionally, in a seed point placement device for a three-dimensional surface provided in another embodiment of the present application, the position determination unit includes:
[0301] The first unit serves to use the barycentric coordinates as the current point.
[0302] The first calculation unit is used to calculate the gradient of the current point according to the velocity components, and calculate the position of the updated point based on the gradient, the barycentric coordinates, and a preset step size.
[0303] The gradient calculation unit is used to calculate the gradient of the updated point based on the velocity components corresponding to the position of the updated point.
[0304] The first judgment unit is used to judge whether the gradient is less than a preset threshold.
[0305] The position determination subunit is used to, if the gradient is less than the preset threshold, determine the position in the triangular mesh cell where the updated point is located as the position of the critical point in the triangular mesh cell.
[0306] The return execution unit is used to, if the gradient is not less than the preset threshold, use the updated point as the current point and return to execute the calculation of the gradient of the current point according to the velocity components.
[0307] Optionally, in a seed point placement device for a three-dimensional surface provided in another embodiment of the present application, the type determination unit 1203 includes:
[0308] The coordinate mapping unit is used to, for each critical point, perform coordinate mapping on the position in the triangular mesh cell where the critical point is located to obtain the mapping coordinate system corresponding to the triangular mesh cell.
[0309] The position calculation unit is used to calculate the position of the critical point in the mapping coordinate system.
[0310] The distance calculation unit is used to calculate the distances between the position and the three sides of the triangular mesh cell.
[0311] The extraction unit is used to extract the shortest distance from all the distances and use the shortest distance as the interpolation radius.
[0312] The interpolation unit is used to perform interpolation on four preset points corresponding to the position according to the interpolation radius to obtain the coordinates of the four direction points and their corresponding velocity components.
[0313] The solution unit is used to construct a Jacobian matrix based on the coordinates of the four direction points and their corresponding velocity components, and solve the Jacobian matrix to obtain the eigenvalues of the Jacobian matrix.
[0314] The type sub-determination unit is used to determine the type of the critical point according to the real part and the imaginary part in the eigenvalues.
[0315] Optionally, in a seed point placement device for a three-dimensional surface provided in another embodiment of the present application, the processing unit 1204 includes:
[0316] The first determination unit is configured to, when the type of the critical point is the center point type, determine, according to the center point type, that the placement mode of the seed points around the critical point is the linear placement mode.
[0317] The second determination unit is configured to, when the type of the critical point is any one of the attracting focus point, the repelling focus point, the attracting node point, and the repelling node point, determine, according to the type of the critical point, that the placement mode of the seed points around the critical point is the circular center placement mode.
[0318] The third determination unit is configured to, when the type of the critical point is the saddle point type, determine, according to the saddle point type, that the placement mode of the seed points around the critical point is the bisector placement mode.
[0319] Optionally, in a seed point placement device for a three-dimensional surface provided in another embodiment of the present application, the processing unit 1204 includes:
[0320] The first placement unit is configured to, when the placement mode of the flow field is the linear placement mode, emit a straight line along the critical point in the flow field according to the linear placement mode, and place seed points on the straight line to obtain a target flow field.
[0321] The second placement unit is configured to, when the placement mode of the flow field is the circular center placement mode, place seed points on a circle centered on the critical point in the flow field according to the circular center placement mode to obtain a target flow field.
[0322] The third placement unit is configured to, when the placement mode of the flow field is the bisector placement mode, place seed points along the bisector of the main feature direction in the flow field according to the bisector placement mode to obtain a target flow field. Wherein, the main feature direction refers to the dominant direction of the critical point.
[0323] Optionally, in a seed point placement device for a three-dimensional surface provided in another embodiment of the present application, the streamline generation unit 1205 includes:
[0324] The acquisition unit is configured to acquire the seed points around all the critical points.
[0325] The creation unit is configured to create a target set and a candidate set, and place the seed points around all the critical points in the target set.
[0326] The coordinate acquisition unit is configured to traverse all the grid points in all the triangular mesh units to acquire the coordinates of all the grid points.
[0327] The second calculation unit is configured to calculate, for each grid point, the first distance between the coordinate of the grid point and all the seed points in the target set.
[0328] The second judgment unit is configured to judge whether the first distance corresponding to the grid point meets a preset threshold.
[0329] A second acting unit, configured to, if a first distance corresponding to a grid point meets a preset threshold, place the grid point into a candidate set as a seed point.
[0330] A third calculating unit, configured to calculate a second distance between the coordinates of the grid point and all seed points other than the grid point in the candidate set.
[0331] A third judging unit, configured to respectively judge, for all grid points in the candidate set, whether the second distance corresponding to the grid point meets the preset threshold.
[0332] A third acting unit, configured to, if the second distance corresponding to the grid point meets the preset threshold, place the grid point as a seed point in a non-feature area of the target flow field.
[0333] Optionally, in a seed point placement device for a three-dimensional surface provided in another embodiment of the present application, a region searching unit 1206 includes:
[0334] A marking unit, configured to mark triangular grid units passed by streamlines, and filter the marked triangular grid units from the non-feature area to obtain a target non-feature area.
[0335] A defining unit, configured to respectively define a vertex set and a cell set in a triangular grid unit for each triangular grid unit in the target non-feature area, and construct a vertex adjacency list of the triangular grid unit according to the vertex set and the cell set.
[0336] A fourth judging unit, configured to respectively judge, for all vertex adjacency lists, whether a target vertex set exists in the vertex adjacency list. Wherein, the target vertex set is at least composed of a combination of two identical vertices.
[0337] A region acting unit, configured to, if a target vertex set exists in the vertex adjacency list, obtain a plurality of triangular grid units corresponding to the target vertex set, and use the plurality of triangular grid units corresponding to the target vertex set as a connected region.
[0338] It should be noted that the specific working processes of the respective modules provided in the above embodiments of the present application may correspondingly refer to the corresponding steps in the above method embodiments, which will not be elaborated here.
[0339] It should also be noted that a seed point placement device for a three-dimensional surface provided in an embodiment of the present application has the technical effects of any one of the above embodiments, which will not be elaborated here.
[0340] Those skilled in the art may further realize that the units and algorithm steps of each example described in connection with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of each example have been generally described according to their functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods for each specific application to implement the described functions, but such implementation should not be considered to exceed the scope of this application.
[0341] The foregoing description of the disclosed embodiments enables those skilled in the art to practice or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application will not be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for placing seed points on a three-dimensional surface, characterized in that, Including: Read a three-dimensional surface mesh and perform triangulation on the three-dimensional surface mesh to obtain a target three-dimensional surface mesh; Traverse all triangular mesh cells in the target three-dimensional surface mesh to determine the positions of multiple critical points in the triangular mesh cells in the flow field; For each of the critical points, determine the type of the critical point according to the position in the triangular mesh cell where the critical point is located; Based on the type of the critical point, determine the placement method of seed points around the critical point, and place seed points in the flow field according to the placement method to obtain a target flow field; Uniformly place seed points in the non-feature region of the target flow field, and generate streamlines according to all the seed points in the non-feature region and all the seed points in the feature region; wherein, the non-feature region refers to the blank region; the feature region refers to the region in the target flow field other than the non-feature region; According to the triangular mesh cells passed by the streamlines, use the three-connected region algorithm to find connected regions from all the triangular mesh cells; For each of the connected regions, determine whether the area and shape of the connected region meet the placement conditions of the seed points; If the area and shape of the connected region meet the placement conditions of the seed points, place a seed point at the center of the connected region.
2. The method according to claim 1, characterized in that, The traversing all the triangular mesh cells in the target three-dimensional surface mesh to determine the positions of multiple critical points in the triangular mesh cells in the flow field includes: For each of the triangular mesh cells, calculate the included angle between the velocity vectors of two adjacent vertices of the triangular mesh cell; Calculate the Poincaré index of the triangular mesh cell according to the included angle; Judge whether the Poincaré index is a preset threshold; If the Poincaré index is the preset threshold, determine that there is a critical point in the triangular mesh cell and calculate the centroid coordinates of the triangular mesh cell; Based on the centroid coordinates, calculate the velocity component of any point in the triangular mesh cell; Use the gradient descent method to determine the position of the critical point in the triangular mesh cell according to the velocity component and the centroid coordinates, and determine the position of the critical point in the triangular mesh cell as the position of the critical point in the triangular mesh cell in the flow field.
3. The method according to claim 2, wherein The using the gradient descent method to determine the position of the critical point in the triangular mesh cell according to the velocity component and the centroid coordinates includes: Take the centroid coordinates as the current point; Calculate the gradient of the current point according to the velocity component, and calculate the position of the updated point based on the gradient, the centroid coordinates and a preset step size; Calculate the gradient of the updated point based on the velocity component corresponding to the position of the updated point; Judge whether the gradient is less than a preset threshold; If the gradient is less than the preset threshold, determine the position of the updated point in the triangular mesh cell as the position of the critical point in the triangular mesh cell; If the gradient is not less than the preset threshold, take the updated point as the current point and return to execute calculating the gradient of the current point according to the velocity component.
4. The method according to claim 1, wherein For each of the critical points, determining the type of the critical point according to the position in the triangular grid cell where the critical point is located, includes: For each of the critical points, performing coordinate mapping on the position in the triangular grid cell where the critical point is located to obtain the corresponding mapping coordinate system of the triangular grid cell; Calculating the position of the critical point in the mapping coordinate system; Calculating the distances between the position and the three sides of the triangular grid cell; Extracting the shortest distance from all the distances and taking the shortest distance as the interpolation radius; According to the interpolation radius, interpolating the four preset points corresponding to the position to obtain the coordinates of the four direction points and their corresponding velocity components; Based on the coordinates of the four direction points and their corresponding velocity components, constructing a Jacobian matrix and solving the Jacobian matrix to obtain the eigenvalues of the Jacobian matrix; Determining the type of the critical point according to the real part and the imaginary part in the eigenvalues.
5. The method according to claim 1, wherein The determining the placement method of the seed points around the critical point based on the type of the critical point, includes: When the type of the critical point is the center point type, determining the placement method of the seed points around the critical point as the linear placement method according to the center point type; When the type of the critical point is any one of the attracting focus, repelling focus, attracting node, and repelling node, determining the placement method of the seed points around the critical point as the circular placement method according to the type of the critical point; When the type of the critical point is the saddle point type, determining the placement method of the seed points around the critical point as the bisector placement method according to the saddle point type.
6. The method according to claim 5, characterized in that, The placing the seed points in the flow field according to the placement method to obtain the target flow field, includes: When the placement method of the flow field is the linear placement method, according to the linear placement method, emitting a straight line along the critical point in the flow field and placing seed points on the straight line to obtain the target flow field; When the placement method of the flow field is the circular placement method, according to the circular placement method, placing seed points on a circle with the critical point in the flow field as the center to obtain the target flow field; When the placement method of the flow field is the bisector placement method, according to the bisector placement method, placing seed points along the bisector of the main eigen direction in the flow field to obtain the target flow field; wherein, the main eigen direction refers to the dominant direction of the critical point.
7. The method according to claim 1, characterized in that The uniformly placing seed points in the non-feature region of the target flow field, includes: Obtaining the seed points around all the critical points; Creating a target set and a candidate set, and placing all the seed points around the critical points in the target set; Traversing all the grid points in all the triangular grid cells to obtain the coordinates of all the grid points; For each of the grid points, calculating the first distance between the coordinate of the grid point and all the seed points in the target set; Judging whether the first distance corresponding to the grid point meets a preset threshold; If the first distance corresponding to the grid point meets the preset threshold, then taking the grid point as a seed point and placing it in the candidate set; Calculate the second distance between the coordinates of the grid point and all the seed points in the candidate set except the grid point itself; For each grid point in the candidate set, determine whether the second distance corresponding to the grid point meets the preset threshold; If the second distance corresponding to the grid point meets the preset threshold, then use the grid point as a seed point and place it in the non-feature area of the target flow field.
8. The method according to claim 1, wherein The step of using the three-connected region algorithm to find multiple connected regions from all the triangular mesh elements according to the triangular mesh elements passed by the streamline includes: Mark the triangular mesh elements passed by the streamline, and filter the marked triangular mesh elements from the non-feature area to obtain the target non-feature area; For each triangular mesh element in the target non-feature area, define the vertex set and element set in the triangular mesh element, and construct the vertex adjacency list of the triangular mesh element according to the vertex set and the element set; For each of the vertex adjacency lists, determine whether there is a target vertex set in the vertex adjacency list; wherein, the target vertex set is composed of at least two identical vertices; If there is a target vertex set in the vertex adjacency list, then obtain the multiple triangular mesh elements corresponding to the target vertex set, and use the multiple triangular mesh elements corresponding to the target vertex set as the connected region.
9. A seed point placement device for a three-dimensional surface, characterized in that, A method for placing seed points on a three-dimensional surface applied to the above-mentioned claim 1, including: A triangulation processing unit, configured to read a three-dimensional surface mesh and perform triangulation processing on the three-dimensional surface mesh to obtain a target three-dimensional surface mesh; A traversal unit, configured to traverse all the triangular mesh elements in the target three-dimensional surface mesh to determine the positions of multiple critical points in the triangular mesh elements in the flow field; A type determination unit, configured to, for each of the critical points, determine the type of the critical point according to the position of the critical point in the triangular mesh element; A processing unit, configured to determine the placement method of the seed points around the critical point based on the type of the critical point, and place seed points in the flow field according to the seed point placement method to obtain a target flow field; A streamline generation unit, configured to uniformly place seed points in the non-feature area of the target flow field, and generate streamlines according to all the seed points in the non-feature area and all the seed points in the feature area; wherein, the non-feature area refers to the blank area; the feature area refers to the area in the target flow field except the non-feature area; A region search unit, configured to use the three-connected region algorithm to search for connected regions from all the triangular mesh elements according to the triangular mesh elements passed by the streamline; A condition judgment unit, configured to, for each of the connected regions, judge whether the area and shape of the connected region meet the placement conditions of the seed points; A seed point placement unit, configured to place a seed point at the center of the connected region if the area and shape of the connected region meet the placement conditions of the seed points.
10. The device according to claim 9, characterized in that, The traversal unit includes: An included angle calculation unit, configured to calculate, for each of the triangular mesh units, an included angle between velocity vectors of two adjacent vertices of the triangular mesh unit; An exponent calculation unit, configured to calculate a Poincaré exponent of the triangular mesh unit according to the included angle; A threshold judgment unit, configured to judge whether the Poincaré exponent is a preset threshold; A coordinate calculation unit, configured to, if the Poincaré exponent is the preset threshold, determine that there is a critical point in the triangular mesh unit and calculate a centroid coordinate of the triangular mesh unit; A velocity component calculation unit, configured to calculate a velocity component of any point in the triangular mesh unit based on the centroid coordinate; A position determination unit, configured to use the gradient descent method to determine a position of the critical point in the triangular mesh unit according to the velocity component and the centroid coordinate, and determine the position of the critical point in the triangular mesh unit as the position of the critical point in the triangular mesh unit where the critical point is located in the flow field.
Citation Information
Patent Citations
Multi-layer texture generation method based on streamline growth method and metamorphic particle method
CN109147019A
Underground water flow field streamline drawing method and system based on information entropy feature extraction
CN110211224A
Spent Flow Discharge Apparatus for an Instream Fluid Power-Extraction Machine
US20150086327A1