Particle source output method, device and equipment based on flow field edge interface and storage medium
By obtaining the triangular mesh data of the flow field boundary interface and calculating feature parameters, the particle source characteristic parameters are output, which solves the problem of inaccurate flow line analysis caused by fluid particles penetrating the flow field boundary interface, and improves the accuracy of flow line analysis and Distribution uniformity.
Patent Information
- Application Number
- CN202411320077.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-20
- Publication Date
- 2025-01-10
AI Technical Summary
In computational fluid mechanics simulation, the position of the particle source affects the accuracy of the flow line. In the prior art, fluid particles are prone to penetrate the flow field boundary interface, resulting in inaccurate flow line analysis results.
By obtaining the triangular mesh data of the flow field boundary interface, calculating characteristic parameters, and outputting particle source characteristic parameters based on the preset number of streamlines, ensuring the uniformity and accuracy of particle source distribution and avoiding particles penetrating the flow field boundary interface.
It effectively reduces the actual number of particles required to calculate the streamline, improves the accuracy and distribution uniformity of streamline analysis, and avoids the problem of particle sources penetrating the flow field boundary interface.
Smart Images

Figure CN119294288A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computational fluid dynamics technology, and in particular to a particle source output method, device, equipment and storage medium based on a flow field boundary surface. Background Art
[0002] In the field of CFD (Computational Fluid Dynamics) simulation, when performing streamline analysis on a flow field, it is necessary to add a particle source with a specified number of streamlines on the boundary surface of the flow field to generate the corresponding streamlines. Therefore, the position of the particle source significantly affects the accuracy of the streamlines.
[0003] In related technologies, the inlet, outlet, wall, etc. of the flow field are usually identified first. Then the particle source is arranged at the inlet. For the internal flow of the flow field, the particle source is arranged near corners, obstacles, or other complex flow areas. However, the above-mentioned solution for generating streamlines and arranging particles may cause fluid particles to penetrate the boundary surface of the flow field during the calculation process, resulting in uneven particle distribution, which leads to inaccurate streamline analysis results. Summary of the invention
[0004] The main purpose of the present application is to provide a particle source output method, device, equipment and storage medium based on flow field boundary surface, aiming to solve the technical problem that the created particle source has fluid particles penetrating the flow field boundary surface, resulting in inaccurate streamline analysis results.
[0005] To achieve the above-mentioned purpose, the present application provides a particle source output method based on a flow field boundary surface, and the particle source output method based on a flow field boundary surface includes:
[0006] Acquire triangular mesh data of the flow field boundary surface, wherein the triangular mesh data includes the mesh area and vertex coordinates of each triangular mesh of the flow field boundary surface;
[0007] Calculate characteristic parameters of the flow field boundary surface according to the vertex coordinates and the grid area;
[0008] Calculating the particle source characteristic parameters of the flow field boundary surface based on the characteristic parameters and a preset number of streamlines;
[0009] The particle source corresponding to the flow field boundary surface is output according to the particle source characteristic parameter.
[0010] In one embodiment, the step of obtaining triangular mesh data of the flow field boundary surface includes:
[0011] Acquire grid data corresponding to the flow field boundary surface;
[0012] Converting the flow field boundary surface into a triangular mesh expression according to the mesh data;
[0013] The mesh area and the vertex coordinates of each of the triangular meshes are determined as the triangular mesh data.
[0014] In one embodiment, the step of calculating the characteristic parameters of the flow field boundary surface according to the vertex coordinates and the grid area includes:
[0015] Determine the surface normal vector and the surface center point coordinates of the flow field boundary surface according to the vertex coordinates and the grid area;
[0016] Calculate a first unit vector and a second unit vector perpendicular to each other on the flow field boundary surface according to the surface normal vector;
[0017] Determine the range of the horizontal coordinate and the range of the vertical coordinate according to the bounding box of the flow field boundary surface;
[0018] The characteristic parameter is determined according to the horizontal coordinate range, the vertical coordinate range, the coordinates of the surface center point, the first unit vector and the second unit vector.
[0019] In one embodiment, the step of determining the surface normal vector and the surface center point coordinates of the flow field boundary surface according to the vertex coordinates and the grid area includes:
[0020] Calculate the corresponding normal vector and center point coordinates of each triangular mesh according to the vertex coordinates;
[0021] Calculate the flow field boundary surface area according to the grid area;
[0022] Calculate the surface normal vector based on the normal vector and the mesh area;
[0023] The surface center point coordinates are calculated based on the center point coordinates, the grid area, and the flow field boundary surface area.
[0024] In one embodiment, the horizontal coordinate range includes a horizontal minimum value and a horizontal maximum value, the vertical coordinate range includes a vertical minimum value and a vertical maximum value, and the step of determining the characteristic parameter according to the horizontal coordinate range, the vertical coordinate range, the coordinates of the center point of the surface, the first unit vector, and the second unit vector includes:
[0025] Determine the origin of the flow field boundary surface according to the coordinates of the surface center point, the first unit vector, the second unit vector, the transverse minimum value, and the longitudinal minimum value;
[0026] Determine a horizontal feature point based on the origin, the first unit vector and the horizontal coordinate range;
[0027] A longitudinal feature point is determined based on the origin, the second unit vector, and the longitudinal coordinate range.
[0028] In one embodiment, the step of calculating the particle source characteristic parameters of the flow field boundary surface based on the characteristic parameters and a preset number of streamlines includes:
[0029] determining an estimation coefficient according to the number of streamlines;
[0030] Creating a temporary plane data source based on the flow field boundary surface type, the estimated coefficients, and the characteristic parameters;
[0031] Traversing each point in the temporary plane data source, and selecting target seed points within the flow field boundary surface;
[0032] Adjusting the estimation coefficient according to the number of the target seed points and the number of streamlines, and determining the number of seed points corresponding to each type of the flow field boundary surface according to the adjusted estimation coefficient;
[0033] The target flow field boundary surface type corresponding to the number of seed points that has the smallest difference from the number of streamlines is selected to determine the particle source characteristic parameters.
[0034] In one embodiment, the step of determining the number of seed points corresponding to each type of the flow field boundary surface according to the adjusted estimation coefficient comprises:
[0035] Execute the step of creating a temporary plane data source based on the flow field boundary surface type, the estimation coefficient and the characteristic parameter according to the adjusted estimation coefficient to determine the estimation coefficient range;
[0036] Determining a target estimation coefficient according to the estimation coefficient range;
[0037] The number of seed points corresponding to each type of flow field boundary surface is determined according to the target estimation coefficient.
[0038] In addition, to achieve the above-mentioned purpose, the present application also provides a particle source output device based on a flow field boundary surface, the particle source output device based on a flow field boundary surface comprises:
[0039] A mesh acquisition module, used to acquire triangular mesh data of a flow field boundary surface, wherein the triangular mesh data includes a mesh area and vertex coordinates of each triangular mesh of the flow field boundary surface;
[0040] A feature calculation module is used to calculate the feature parameters of the flow field boundary surface according to the vertex coordinates and the grid area; and calculate the particle source feature parameters of the flow field boundary surface based on the feature parameters and a preset number of streamlines:
[0041] An output module is used to output the particle source corresponding to the flow field boundary surface according to the particle source characteristic parameters.
[0042] In addition, to achieve the above-mentioned purpose, the present application also provides a particle source output device based on a flow field boundary surface, and the particle source output device based on a flow field boundary surface includes: a memory, a processor, and a computer program stored on the memory and executable on the processor, and the computer program is configured to implement the steps of the particle source output method based on a flow field boundary surface as described above.
[0043] In addition, to achieve the above-mentioned purpose, the present application also provides a storage medium, which is a computer-readable storage medium, and the computer-readable storage medium stores a program for implementing the particle source output method based on the flow field boundary surface. The program for implementing the particle source output method based on the flow field boundary surface is executed by a processor to implement the steps of the particle source output method based on the flow field boundary surface as described above.
[0044] The present application provides a particle source output method based on a flow field boundary surface. The present application obtains triangular mesh data of the flow field boundary surface, wherein the triangular mesh data includes the mesh area and vertex coordinates of each triangular mesh of the flow field boundary surface; calculates characteristic parameters of the flow field boundary surface according to the triangular mesh data; calculates particle source characteristic parameters of the flow field boundary surface based on the characteristic parameters and a preset number of streamlines; outputs the particle source corresponding to the flow field boundary surface according to the particle source characteristic parameters, effectively reducing the actual number of particles required to calculate the streamlines, thereby improving the distribution uniformity and accuracy of the planar particle source, and avoiding the particle source from penetrating the flow field boundary surface. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0046] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0047] Figure 1 A schematic flow chart of the particle source output method based on the flow field boundary surface in the first embodiment of the present application;
[0048] Figure 2 A schematic flow chart of the second embodiment of the particle source output method based on the flow field boundary surface of the present application;
[0049] Figure 3 A schematic diagram of a flow chart of a third embodiment of a particle source output method based on a flow field boundary surface of the present application;
[0050] Figure 4 This is a schematic diagram of the hardware structure involved in an embodiment of a particle source output device based on a flow field boundary surface of the present application.
[0051] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0052] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0053] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0054] At present, streamlines are curves composed of different fluid particles at the same time. They give the velocity direction of different fluid particles at that time. Streamline analysis of flow field is a common CFD post-processing method. Before generating streamlines, it is necessary to add a particle source with a specified number of streamlines to the boundary surface of the flow field. The position of the particle source will affect the accuracy of the streamlines. Common post-processing methods for generating streamlines on the boundary surface of the flow field have slow calculation speed and low accuracy, and the distribution is uneven. During the calculation process, the problem of fluid particles penetrating the boundary surface of the flow field may be encountered.
[0055] The main solution of the present application is: to obtain triangular mesh data of the flow field boundary surface, wherein the triangular mesh data includes the mesh area and vertex coordinates of each triangular mesh of the flow field boundary surface; to calculate the characteristic parameters of the flow field boundary surface according to the vertex coordinates and the mesh area; to calculate the particle source characteristic parameters of the flow field boundary surface based on the characteristic parameters and a preset number of streamlines; and to output the particle source corresponding to the flow field boundary surface according to the particle source characteristic parameters.
[0056] The present application avoids the situation where particles penetrate the flow field boundary surface by judging the relative position of the particle source and the flow field boundary surface.
[0057] It should be noted that the execution subject of this embodiment can be a particle source output system based on the flow field boundary surface, or a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or a particle source output device based on the flow field boundary surface that can achieve the above functions, etc. This embodiment does not specifically limit this. The following takes the particle source output device based on the flow field boundary surface as the execution subject as an example to illustrate this embodiment and the following embodiments.
[0058] Based on this, the present application proposes a particle source output method based on a flow field boundary surface in the first embodiment, please refer to Figure 1 The particle source output method based on the flow field boundary surface includes steps S110-S140:
[0059] Step S110, obtaining triangular mesh data of the flow field boundary surface, wherein the triangular mesh data includes the mesh area and vertex coordinates of each triangular mesh of the flow field boundary surface.
[0060] It should be noted that the flow field boundary surface refers to the boundary area of the fluid flow, which is usually composed of several polygonal meshes. Triangular mesh data refers to mesh data composed of multiple triangles, including the mesh area and vertex coordinates of each triangle.
[0061] In this embodiment, the triangular mesh data of the flow field boundary surface is first obtained, which includes the mesh area and vertex coordinates of each triangular mesh, ensuring that the basic data for subsequent calculations is accurate and reliable.
[0062] If the flow field boundary surface is expressed by a triangular mesh, the corresponding mesh area and three vertex coordinates are determined based on the information of each triangular mesh.
[0063] If the flow field boundary surface is not expressed by a triangular mesh, the complex flow field boundary surface mesh is first converted into a triangular mesh, and then the data of each triangular mesh is determined.
[0064] Step S120, calculating characteristic parameters of the flow field boundary surface according to the vertex coordinates and the grid area.
[0065] In this embodiment, the characteristic parameters include but are not limited to the origin, transverse characteristic points and longitudinal characteristic points of the flow field boundary surface. The characteristic parameters of the flow field boundary surface are calculated based on the acquired triangular mesh data. The origin is defined as a specific point on the flow field boundary surface, such as the lower left corner vertex of the flow field boundary surface. The transverse characteristic points and longitudinal characteristic points are determined by analyzing the distribution and shape of the triangular mesh.
[0066] As an optional implementation, the surface feature data of the flow field boundary surface is calculated based on the triangular mesh data, including but not limited to the surface normal vector, the coordinates of the surface center point and the area of the flow field boundary surface, and then the characteristic parameters of the flow field boundary surface are determined based on the surface feature data and the bounding box of the flow field boundary surface.
[0067] Step S130, calculating the particle source characteristic parameters of the flow field boundary surface based on the characteristic parameters and the preset number of streamlines.
[0068] In this embodiment, the particle source characteristic parameters are parameters that describe the characteristics of the particle source, including but not limited to the plane center point coordinates of the particle source, the lateral characteristic points of the particle source, the longitudinal characteristic points of the particle source, the lateral resolution and the longitudinal resolution.
[0069] As an optional implementation, the particle source characteristic parameters define a rectangle, the origin is the lower left vertex of the rectangle, the horizontal feature point is the lower right vertex of the rectangle, the vertical feature point is the upper left vertex of the rectangle, the horizontal resolution is the number of horizontal divisions of the rectangle, and the vertical resolution is the number of vertical divisions of the rectangle.
[0070] As an optional implementation, based on the calculated characteristic parameters and the preset number of streamlines, the particle source characteristic parameters are further calculated.
[0071] As another optional implementation, the estimation coefficient is determined according to the preset number of streamlines, and then the characteristic coefficient and the temporary plane data source corresponding to the characteristic coefficient are determined according to the characteristic parameters and the estimation coefficient, and then the target seed points belonging to the flow field boundary surface range are screened out according to the temporary plane data source, and the estimation coefficient is continuously adjusted to compare the number of target seed points with the number of streamlines to finally obtain an estimation coefficient range adapted to the flow field boundary surface characteristics, and then the final target estimation coefficient is determined according to the estimation coefficient range. Finally, the characteristic coefficient under each flow field boundary surface type is determined according to the target estimation coefficient, and the flow field boundary surface type is corresponding to the number of target seed points closest to the preset number of streamlines, and the corresponding characteristic coefficient is used as the particle source characteristic parameter.
[0072] Step S140: outputting the particle source corresponding to the flow field boundary surface according to the particle source characteristic parameters.
[0073] In this embodiment, according to the particle source characteristic parameters calculated in step S130, the corresponding particle source is output to ensure that the particles generated in the flow field can accurately reflect the motion characteristics of the fluid.
[0074] In summary, in this embodiment, the flow field boundary surface is first clarified, which is usually composed of multiple polygonal meshes. If the flow field boundary surface has been expressed in the form of a triangular mesh, the mesh area and vertex coordinates of each triangle are directly extracted. If the flow field boundary surface is not expressed in a triangular mesh, a meshing algorithm is required to convert the complex flow field boundary surface into a triangular mesh. This process ensures that the mesh area and vertex coordinates of each triangle are accurately calculated. The obtained triangular mesh data is stored in a data structure for use in subsequent steps. The characteristic parameters include the origin, lateral feature points, and longitudinal feature points of the flow field boundary surface.
[0075] The present application provides a particle source output method based on a flow field boundary surface. The present application obtains triangular mesh data of the flow field boundary surface, wherein the triangular mesh data includes the mesh area and vertex coordinates of each triangular mesh of the flow field boundary surface; calculates characteristic parameters of the flow field boundary surface according to the triangular mesh data; calculates particle source characteristic parameters of the flow field boundary surface based on the characteristic parameters and a preset number of streamlines; and outputs the particle source corresponding to the flow field boundary surface according to the particle source characteristic parameters, thereby effectively reducing the actual number of particles required to calculate the streamlines, making the particle distribution more uniform, thereby improving the accuracy of the planar particle source and preventing the particle source from penetrating the flow field boundary surface.
[0076] Based on the first embodiment, the second embodiment of the present application proposes a particle source output method based on a flow field boundary surface, step S110, including:
[0077] Step S210, obtaining grid data corresponding to the flow field boundary surface.
[0078] In this embodiment, the flow field refers to the state of fluid movement in space, including the distribution of physical quantities such as flow velocity, pressure, and temperature. The flow field boundary surface is the interface in contact with solid objects in the flow field, which is usually the boundary condition of fluid flow. Extract the mesh data of the flow field boundary surface. Ensure that the acquired data format is a common mesh format, such as VTK format, for subsequent processing.
[0079] Step S220: converting the flow field boundary surface into a triangular mesh expression according to the mesh data.
[0080] As an optional implementation, a meshing algorithm is used to divide the flow field boundary surface into a plurality of triangular meshes, the vertex coordinates of each triangular mesh on the flow field boundary surface are extracted, and then a triangular mesh is generated according to the division result.
[0081] Furthermore, after the triangle mesh is generated, mesh optimization is performed to ensure that the triangles have good shapes and avoid overly distorted triangles.
[0082] Step S230: determining the mesh area and the vertex coordinates of each of the triangular meshes as the triangular mesh data.
[0083] In this embodiment, the area of each triangle is calculated using the formula: [area = 0.5 × | (x1 (y2-y3) + x2 (y3-y1) + x3 (y1-y2)) |], where (x1, y1), (x2, y2), and (x3, y3) are the coordinates of the three vertices of the triangle. The three vertex coordinates of each triangle are recorded to form a vertex coordinate list.
[0084] In the formula, A is the area of the triangle. This formula is used to calculate the area of a triangle defined by three vertices. (x1, y1) are the coordinates of the first vertex of the triangle, where x1 is the coordinate of the vertex on the x-axis and y1 is the coordinate of the vertex on the y-axis. (x2, y2) are the coordinates of the second vertex of the triangle, where x2 is the coordinate of the vertex on the x-axis and y2 is the coordinate of the vertex on the y-axis. (x3, y3) are the coordinates of the third vertex of the triangle, where x3 is the coordinate of the vertex on the x-axis and y3 is the coordinate of the vertex on the y-axis. Use absolute value to ensure that the result is non-negative. The area of a triangle is the product of the base and the height divided by 2.
[0085] Since the mesh of the flow field boundary surface is determined to be expressed as a triangular mesh, and then the mesh area and vertex coordinates of the triangular mesh are obtained, the calculation complexity of the characteristic parameters of the flow field boundary surface is simplified and the calculation efficiency is improved.
[0086] Based on any of the above embodiments, the third embodiment of the present application proposes a particle source output method based on a flow field boundary surface, referring to Figure 2 , step S120, comprising:
[0087] Step S310, determining the surface normal vector and the surface center point coordinates of the flow field boundary surface according to the vertex coordinates and the grid area.
[0088] In this embodiment, the flow field boundary surface area of the flow field boundary surface is determined based on the triangular mesh data, and then the surface normal vector and the surface center point coordinates of the flow field boundary surface are determined based on the flow field boundary surface area, the mesh area in the triangular mesh data and the vertex coordinates.
[0089] Optionally, step S310 includes:
[0090] Step S311, calculating the corresponding normal vector and center point coordinates of each of the triangular meshes according to the vertex coordinates.
[0091] In this embodiment, the coordinates of the vertices of the triangle are first defined: point A (x1, y1, z1), point B (x2, y2, z2), and point C (x3, y3, z3).
[0092] Next, calculate the two edge vectors and
[0093] Normal vector By calculating the edge vector and The cross product of gives:
[0094]
[0095] Furthermore, a unit normal vector is used as the normal vector finally calculated in this embodiment, wherein the modulus length of the normal vector is:
[0096]
[0097] Among them, Nx, Ny, Nz are normal vectors The amount.
[0098] Finally, the unit normal vector is calculated by dividing each component of the normal vector by its magnitude
[0099]
[0100] Then the unit normal vector of the triangular mesh is obtained.
[0101] Finally, calculate the coordinates of the center point. The coordinates of the center point (C) can be calculated by the average value of the three vertices of the triangle: center point = ((x1+x2+x3) / 3, (y1+y2+y3) / 3, (z1+z2+z3) / 3). Finally, output the normal vector and center point coordinates of each triangle mesh.
[0102] Step S312, calculating the flow field boundary surface area according to the grid area.
[0103] In this embodiment, the sum of the mesh areas of each triangular mesh is used as the flow field boundary surface area. The flow field boundary surface area A is calculated as follows:
[0104] Where: N-number of triangular meshes; A i - the area of each triangle mesh; i - the triangle mesh number.
[0105] Step S313: Calculate the surface normal vector based on the normal vector and the mesh area.
[0106] In this embodiment, the product of the normalized normal vector corresponding to each triangular mesh and its mesh area is determined, and then the mean of the products is determined, and the surface normal vector is determined based on the mean.
[0107] The calculation formula of the flow field boundary surface normal vector n3 is as follows:
[0108]
[0109] Where: N-number of triangular meshes;
[0110] n i,3 - Normal vector of each triangle face, 3-x, y, z directions;
[0111] A i - Area of each triangle mesh;
[0112] i - triangle mesh number.
[0113] Step S314, calculating the coordinates of the center point of the surface based on the coordinates of the center point, the area of the grid, and the area of the flow field boundary surface.
[0114] In this embodiment, the coordinates of the center point of the flow field boundary surface are calculated according to the product of the coordinates of the center point of each triangular mesh and its mesh area.
[0115] The calculation formula of the center point c3 of the flow field boundary surface is as follows:
[0116]
[0117] Where: N-number of triangular meshes;
[0118] c i,3 -Coordinates of the center point of each triangle face, 3-x, y, z directions;
[0119] A i - Area of each triangle mesh;
[0120] i - triangle mesh number;
[0121] A-flow field boundary surface area.
[0122] Step S320, calculating a first unit vector and a second unit vector that are perpendicular to each other on the boundary surface of the flow field according to the surface normal vector.
[0123] In this embodiment, two mutually perpendicular unit vectors on the flow field boundary surface are calculated based on the surface normal vector of the entire flow field boundary surface, namely, the first unit vector in the X direction, that is, the horizontal direction, and the second unit vector in the Y direction, that is, the vertical direction.
[0124] Step S330 , determining a horizontal coordinate range and a vertical coordinate range according to a bounding box of the flow field boundary surface.
[0125] In this embodiment, the bounding box is a cube or a cuboid that encloses the target object in three-dimensional space. The bounding box is a rectangle or a square that encloses the target object in a two-dimensional plane. The bounding box of the flow field boundary surface expressed by the simplified triangular mesh is calculated, and the bounding box range is appropriately reduced to avoid touching the flow field boundary surface, and then the horizontal coordinate range and the vertical coordinate range are determined according to the bounding box range, so that the horizontal coordinate of any point on the flow field boundary surface is within the horizontal coordinate range, and the vertical coordinate of any point on the flow field boundary surface is within the vertical coordinate range.
[0126] As an optional implementation, the bounding box of the flow field boundary surface is a bounding box composed of the bounding boxes of each triangular mesh of the flow field boundary surface.
[0127] As another optional implementation, the bounding box of the flow field boundary surface is determined according to the expression of the flow field boundary surface and is the smallest cuboid that encloses the entire flow field boundary surface.
[0128] As another optional implementation, if the flow field boundary surface is simplified to a plane, the bounding box of the flow field boundary surface is determined according to the expression of the flow field boundary surface and is the minimum rectangle that encloses the entire flow field boundary surface.
[0129] Step S340, determining the characteristic parameter according to the horizontal coordinate range, the vertical coordinate range, the coordinates of the surface center point, the first unit vector and the second unit vector.
[0130] In this embodiment, the characteristic parameters of the flow field boundary surface include the origin of the flow field boundary surface, the transverse characteristic points of the flow field boundary surface, and the longitudinal characteristic points of the flow field boundary surface. The horizontal coordinate range includes the horizontal minimum value and the horizontal maximum value, and the vertical coordinate range includes the vertical minimum value and the vertical maximum value. The horizontal direction refers to the X-axis direction, and the vertical direction refers to the Y-axis direction.
[0131] As an optional implementation, the origin of the flow field boundary surface, the lateral characteristic points of the flow field boundary surface, and the longitudinal characteristic points of the flow field boundary surface are determined respectively based on the horizontal coordinate range, the vertical coordinate range, the coordinates of the surface center point, the first unit vector, and at least two of the second unit vectors.
[0132] Optionally, step S340 includes:
[0133] Step S341, determining the origin of the flow field boundary surface according to the coordinates of the surface center point, the first unit vector, the second unit vector, the transverse minimum value, and the longitudinal minimum value.
[0134] In this embodiment, the minimum horizontal value x is determined according to the horizontal axis range. min And the maximum horizontal value x max ; Determine the minimum vertical value y according to the vertical coordinate range min and the maximum vertical value y max The origin of the flow field boundary surface is determined according to the product of the first unit vector and the transverse minimum value, the product of the second unit vector and the longitudinal minimum value, and the coordinates of the center point of the surface.
[0135] The origin o3 of the flow field boundary surface is expressed as: o3 = c3-p1 ′ 3*|x min |-p2 ′ 3*|y min |, where p1 ′ 3 is the first unit vector; p2 ′ 3 is the second unit vector. c3 is the coordinate of the center point of the surface.
[0136] Step S342: determining a horizontal feature point based on the origin, the first unit vector and the horizontal coordinate range.
[0137] In this embodiment, after determining the origin of the flow field boundary surface, the product of the x-axis value interval corresponding to the horizontal coordinate range and the first unit vector is determined, and the lateral feature point is determined based on the product and the origin of the flow field boundary surface. Horizontal feature point p13 = o3 + p1 ′ 3*(x max -x min ).
[0138] Step S343: determining a longitudinal feature point based on the origin, the second unit vector and the longitudinal coordinate range.
[0139] In this embodiment, after determining the origin of the flow field boundary surface, the product between the y-axis value interval corresponding to the vertical coordinate range and the second unit vector is determined, and the longitudinal feature point is determined based on the product and the origin of the flow field boundary surface. ′ 3*(y max -y min ).
[0140] In the above embodiment, c3-coordinates of the center point of the flow field boundary surface; p1 ′ 3-X-axis unit vector perpendicular to the flow field boundary surface normal vector n3; p2 ′ 3-Y-axis unit vector perpendicular to the normal vector n3 of the flow field boundary surface; x min -The minimum value of the bounding box of the simplified flow field boundary surface in the X direction; x max -The maximum value of the bounding box of the simplified flow field boundary surface in the X direction; y min-The minimum value of the bounding box of the simplified flow field boundary surface in the Y direction; y max -The maximum value of the bounding box of the simplified flow field boundary surface in the Y direction. The X direction is the horizontal direction, and the Y direction is the vertical direction.
[0141] As an optional implementation of this embodiment, first, obtain mesh data containing multiple triangular meshes, each triangular mesh is represented by three vertex coordinates. The total area of the flow field boundary surface is obtained by summing the areas of all triangular meshes. The area of each triangular mesh can be calculated by its vertex coordinates, and the formula is: area = 0.5 × | (x1 (y2-y3) + x2 (y3-y1) + x3 (y1-y2)) | Wherein, (x1, y1), (x2, y2), (x3, y3) are the three vertex coordinates of the triangle. According to the normal vector formula of the triangular mesh, the normal vector of each triangular mesh is calculated, and the normal vectors of all triangular meshes are weighted averaged to obtain the normal vector of the flow field boundary surface. The calculation formula of the normal vector is: Normal vector = (v2-v1) × (v3-v1) Wherein, v1, v2, v3 are the three vertices of the triangular mesh. Calculate the coordinates of the center point of the surface: The coordinates of the center point of the flow field boundary surface can be obtained by the weighted average of the coordinates of the center points of all triangular meshes. The coordinates of the center point of each triangular mesh are: center point = ((x1+x2+x3) / 3, (y1+y2+y3) / 3, (z1+z2+z3) / 3).
[0142] Then, calculate the first unit vector, and select a vector perpendicular to it as the first unit vector according to the surface normal vector. Let the normal vector be N = (nx, ny, nz), select any vector that is not parallel to N, such as (1, 0, 0), calculate its cross product with N, and obtain the first unit vector X. Calculate the second unit vector: By the cross product of the first unit vector X and the normal vector N, obtain the second unit vector Y: Y = N × X. Normalize X and Y so that their length is 1. According to the triangular mesh data, calculate the minimum cuboid or cube that encloses the flow field boundary surface, and its boundary is determined by the minimum and maximum coordinate points. In order to avoid touching the flow field boundary surface, the range of the bounding box can be appropriately reduced in each direction. For example, a small constant value ε can be reduced in each coordinate axis direction. According to the reduced bounding box, determine the horizontal coordinate range to be [min_x, max_x] and the vertical coordinate range to be [min_y, max_y]. The origin of the flow field boundary surface can be set to the coordinates of the center point of the surface. Select a feature point within the horizontal coordinate range, and the midpoint of the horizontal coordinate range can be selected as the horizontal feature point. Select a feature point within the ordinate range, and select the midpoint of the ordinate range as the longitudinal feature point. Finally, the feature parameters of the flow field boundary surface include: origin coordinates, transverse feature points, and longitudinal feature points.
[0143] Through the above steps, the characteristic parameters of the flow field boundary surface are effectively extracted from the triangular mesh data, thereby improving the accuracy of determining the particle source.
[0144] Based on any of the above embodiments, the fourth embodiment of the present application proposes a particle source output method based on a flow field boundary surface, referring to Figure 3 , step S130, comprising:
[0145] Step S410, determining an estimation coefficient according to the number of streamlines.
[0146] As an optional implementation, the estimation coefficient is a plurality of coefficient sequences, each of which has eight elements. Two of them are associated with the center point coordinates, two are associated with the lateral feature points, two are associated with the longitudinal feature points, and two are associated with the resolution. Three estimation coefficients are determined according to the number of streamlines, and the three estimation coefficients correspond to the three types of flow field boundary surfaces respectively.
[0147] As another optional implementation, the estimation coefficient is a single value.
[0148] Step S420: creating a temporary plane data source based on the flow field boundary surface type, the estimated coefficients and the characteristic parameters.
[0149] In this embodiment, the flow field boundary surface types include the first type: a square grid with a node in the center. The second type: a square grid that allows a vacant center. The third type: a square grid at a 45-degree angle. Each flow field boundary surface type has a corresponding estimation coefficient. The temporary plane data source is dynamically generated during the analysis process rather than extracted from a static data set, that is, the temporary plane data source changes dynamically during the process of adjusting the estimation coefficient and has different performances in each iteration. The temporary plane data source is represented by a temporarily created particle source, that is, the starting point of each streamline particle.
[0150] As an optional implementation, if the estimated coefficient is a coefficient sequence, the corresponding estimated coefficient is selected as the characteristic coefficient according to the flow field boundary surface type, and then the center point coordinates of the local cutting plane, the lateral characteristic points of the local cutting plane and the longitudinal characteristic points of the local cutting plane are determined according to the characteristic coefficient and the characteristic parameters, and then a temporary plane data source is created according to the center point coordinates of the local cutting plane, the lateral characteristic points of the local cutting plane, the longitudinal characteristic points of the local cutting plane and the lateral resolution and longitudinal resolution in the characteristic coefficients.
[0151] As another optional implementation, if the estimated coefficient is a single value, a sequence with 8 elements is determined as the characteristic coefficient according to the estimated coefficient, the flow field boundary surface type, and a preset mapping relationship.
[0152] Optionally, step S420 includes:
[0153] Step S421, selecting characteristic coefficients from the estimation coefficients according to the flow field boundary surface type.
[0154] In this embodiment, the corresponding characteristic coefficient is selected from the estimation coefficient according to the type of the flow field boundary surface, and the characteristic coefficient includes a1, a2, b1, b2, c1, c2, res1 and res2. Among them, a1 and a2 are used to calculate the coordinates of the center point of the local tangent plane. b1 and b2 are used to calculate the transverse coordinates of the local tangent plane. c1 and c2 are used to calculate the longitudinal coordinates of the local tangent plane. res1 is used as the transverse resolution, and res2 is used as the longitudinal resolution.
[0155] Step S422, determining the coordinates of the center point of the local tangent plane, the first feature point and the second feature point according to the feature coefficient and the feature parameter.
[0156] In this embodiment, the first feature point is a transverse feature point of the local tangent plane, and the second feature point is a longitudinal feature point of the local tangent plane.
[0157] As an optional implementation, the coordinates of the center point of the local tangent plane are determined according to the first formula, characteristic coefficients and characteristic parameters; the first characteristic point is determined according to the second formula, characteristic coefficients and characteristic parameters; and the second characteristic point is determined according to the third formula, characteristic coefficients and characteristic parameters.
[0158] Exemplarily, the first formula is: lc3=o3+a1*(p13-o3)+a2*(p23-o3).
[0159] The second formula is: lp13=o3+b1*(p13-o3)+b2*(p23-o3).
[0160] The third formula is: lp23=o3+c1*(p13-o3)+c2*(p23-o3).
[0161] Where: o3-the coordinate of the origin of the flow field boundary surface; p13-the transverse characteristic point of the flow field boundary surface; p23-the longitudinal characteristic point of the flow field boundary surface. a1, a2, b1, b2, c1, c2 are characteristic coefficients related to the estimated coefficient f and the type of flow field boundary surface. The coordinates of the center point of the local tangent plane lc3, the transverse characteristic point of the local tangent plane lp13, and the longitudinal characteristic point of the local tangent plane lp23.
[0162] Step S423: Create the temporary plane data source based on the coordinates of the center point of the local cutting plane, the first feature point, and the second feature point.
[0163] In this embodiment, a temporary plane data source is created based on lc3, lp13, lp23, res1, and res2 calculated as above as temporary particle source characteristic parameters.
[0164] Step S430, traversing each point in the temporary plane data source, and screening target seed points within the flow field boundary surface.
[0165] In this embodiment, the shape of the flow field boundary surface is determined based on the origin o3 of the flow field boundary surface, the transverse characteristic point p13 of the flow field boundary surface, the longitudinal characteristic point p23 of the flow field boundary surface, and the area A of the flow field boundary surface. The shapes include rectangle and ellipse. The emission point of each particle in the temporary plane data source is traversed, and the point is determined whether it is within the rectangular or elliptical area according to the shape of the flow field boundary surface, and the point in the flow field boundary surface is used as the target seed point. Thus, the technical effect of ensuring that the calculated particle source will not pass through the flow field boundary surface is achieved.
[0166] Step S440: adjusting the estimation coefficient according to the number of the target seed points and the number of streamlines, and determining the number of seed points corresponding to each type of the flow field boundary surface according to the adjusted estimation coefficient.
[0167] In this embodiment, step S440 is a loop step. That is, according to the number of target seed points calculated in the previous loop, the estimated coefficient of this loop is adjusted, and then steps S420-S430 are repeated according to the estimated coefficient, that is, the characteristic coefficient of this loop is determined according to the estimated coefficient, and then the coordinates of the center point of the local tangent plane, the first characteristic point and the second characteristic point are calculated according to the characteristic coefficient, and then a temporary plane particle source is created, and then the target seed point of this loop is determined, and then the estimated coefficient is adjusted according to the number of target seed points of this loop as the estimated coefficient of the next loop iteration. Repeat the above process, in each iteration, by adjusting the estimated coefficient, the number of target seed points gradually approaches the preset number of streamlines. Then determine the interval corresponding to the estimated coefficient. Then determine the optimal value of the estimated coefficient according to the interval as the target estimated coefficient, and perform steps S420 and S430 for the three types of flow field boundary surfaces according to the target estimated coefficient, determine the target seed points corresponding to each type of flow field boundary surface, and use the number of target seed points as the number of seed points.
[0168] Furthermore, for each flow field boundary surface type, steps S410 to S430 are executed. The specific execution steps are as described above and are not repeated here. The target estimation coefficient corresponding to each flow field boundary surface type is determined, and then the number of seed points corresponding to each flow field boundary surface type is determined based on the target estimation coefficient.
[0169] Optionally, step S440 includes:
[0170] Step S441, executing the step of creating a temporary plane data source based on the flow field boundary surface type, the estimation coefficient and the characteristic parameter according to the adjusted estimation coefficient to determine the estimation coefficient range.
[0171] In this embodiment, the characteristic parameters and the adjusted estimation coefficients are used to create a temporary plane data source under the flow field boundary surface type. The creation steps are as described above and are not repeated here, and the process is then looped to determine the numerical interval of the estimation coefficient, that is, the estimation coefficient range.
[0172] Step S442, determining a target estimation coefficient according to the estimation coefficient range.
[0173] In this embodiment, the estimated coefficient f value is continuously adjusted to compare the number of target seed points with the number of streamlines to finally obtain an f value range that is adapted to the characteristics of the flow field boundary surface, that is, the maximum value f max and the minimum value f min , select the final f value according to the following formula:
[0174]
[0175] Where: f max - Maximum estimated coefficient; f min -Minimum estimated coefficient.
[0176] Step S443, determining the number of seed points corresponding to each flow field boundary surface type according to the target estimation coefficient.
[0177] In this embodiment, the characteristic coefficient corresponding to each type of flow field boundary surface is determined according to the target estimation coefficient, that is, the first characteristic coefficient corresponding to the first type, the second characteristic coefficient corresponding to the second type, and the third characteristic coefficient corresponding to the third type, and then the corresponding temporary plane data source is constructed according to the first characteristic coefficient, the second characteristic coefficient and the third characteristic coefficient, respectively, and then the number of target seed points corresponding to the three types of flow field boundary surfaces is determined as the corresponding number of seed points.
[0178] Step S450, selecting the target flow field boundary surface type corresponding to the number of seed points that has the smallest difference from the number of streamlines, and determining the particle source characteristic parameters.
[0179] In this embodiment, the target flow field boundary surface type is the selected flow field boundary surface type, and the number of expected seed points is close to the preset number of streamlines.
[0180] The number of seed points with the smallest difference from the number of streamlines is determined as the target number of seed points, and the flow field boundary surface type corresponding to the target number of seed points is used as the target flow field boundary surface type. Then, the lateral resolution and longitudinal resolution associated with the resolution in the characteristic coefficient calculated according to the target flow field boundary surface type are determined, as well as the coordinates of the center point of the local tangent plane, the lateral characteristic points of the local tangent plane, and the longitudinal characteristic points of the local tangent plane as the particle source characteristic parameters.
[0181] Optionally, step S450 includes:
[0182] Step S451, determining the target number of seed points with the minimum difference according to the difference between the number of seed points and the number of streamlines.
[0183] In this embodiment, a first difference between the number of seed points corresponding to the first type and the number of streamlines is determined, a second difference between the number of seed points corresponding to the second type and the number of streamlines is determined, a third difference between the number of seed points corresponding to the third type and the number of streamlines is determined, and the number of seed points corresponding to the smallest difference among the three differences is determined as the target number of seed points.
[0184] Step S452: determining the target flow field boundary surface type according to the number of target seed points.
[0185] The flow field boundary surface type corresponding to the target number of seed points is determined as the target flow field boundary surface type.
[0186] Step S453, determining the characteristic coefficient corresponding to the target flow field boundary surface type as the particle source characteristic parameter, the particle source characteristic parameter includes the plane center point coordinates of the particle source, the lateral characteristic points of the particle source, the longitudinal characteristic points of the particle source, the lateral resolution and the longitudinal resolution.
[0187] In this embodiment, since a temporary plane particle source corresponding to the target flow field boundary surface type has been created, that is, various parameters related to the temporary plane particle source have been determined, the center point coordinates lc3 of the local tangent plane corresponding to the target flow field boundary surface type, the lateral feature points lp13 of the local tangent plane, the longitudinal feature points lp23 of the local tangent plane, the lateral resolution res1, and the longitudinal resolution res2 are determined. With lc3 as the plane center point coordinates of the particle source, the lateral feature points lp13 of the local tangent plane as the lateral feature points of the particle source, and the longitudinal feature points lp23 of the local tangent plane as the longitudinal feature points of the particle source, the lateral resolution res1 and the longitudinal resolution res2 are determined.
[0188] In summary, in this embodiment, the origin can be defined as the geometric center of the flow field boundary surface, and the horizontal and vertical feature points are determined by analyzing the distribution and shape of the triangular mesh. Face normal vector: The normal vector is calculated by the vertex coordinates of the triangular mesh, using the cross multiplication rule. Face center point coordinates: The center point coordinates of all triangles are calculated and averaged. Flow field boundary surface area: The areas of all triangles are added to obtain the total area of the flow field boundary surface. Then the characteristic parameters are calculated based on the face normal vector and the face center point coordinates. The particle source characteristic parameters include the plane center point coordinates, the horizontal feature points, the vertical feature points, the horizontal resolution and the vertical resolution. Feature parameter weighted average: The plane center point coordinates are calculated based on the weighted average of the feature parameters. Feature point distribution: According to the preset number of streamlines, the horizontal and vertical feature points are evenly distributed. Resolution derivation: The horizontal and vertical resolutions are derived based on the geometric characteristics of the flow field boundary surface and the number of streamlines. Estimation coefficient determination: The estimation coefficient is determined based on the preset number of streamlines, and the characteristic coefficient is calculated based on the feature parameters and the estimation coefficient. Target seed point screening: Filter the target seed points that belong to the flow field boundary surface range according to the temporary plane data source, and continuously adjust the estimation coefficient until the number of target seed points matches the number of streamlines. Generate the corresponding particle source according to the calculated particle source characteristic parameters.
[0189] In this embodiment, the characteristic parameters of the flow field boundary surface are calculated according to the data source of the flow field boundary surface position. After repeated trials, the center point coordinate value lc3 of the final particle source closest to the set number of streamlines, the X-direction unit vector lp13 perpendicular to the flow field boundary surface normal vector n3, the Y-direction unit vector lp23 perpendicular to the flow field boundary surface normal vector n3, the X-direction resolution res1, and the Y-direction resolution res2 are obtained to create a planar particle source, which can effectively reduce the actual number of particles required to calculate the streamlines, improve the accuracy of the planar particle source, and avoid the problem of the particle source penetrating the flow field boundary surface.
[0190] The present application provides a particle source output device based on a flow field boundary surface, characterized in that the particle source output device based on a flow field boundary surface comprises:
[0191] A mesh acquisition module, used to acquire triangular mesh data of a flow field boundary surface, wherein the triangular mesh data includes a mesh area and vertex coordinates of each triangular mesh of the flow field boundary surface;
[0192] A feature calculation module is used to calculate the feature parameters of the flow field boundary surface according to the vertex coordinates and the grid area; and calculate the particle source feature parameters of the flow field boundary surface based on the feature parameters and a preset number of streamlines:
[0193] An output module is used to output the particle source corresponding to the flow field boundary surface according to the particle source characteristic parameters.
[0194] Optionally, the mesh acquisition module is also used to obtain mesh data corresponding to the flow field boundary surface; convert the flow field boundary surface into a triangular mesh expression according to the mesh data; and determine the mesh area and the vertex coordinates of each triangular mesh as the triangular mesh data.
[0195] Optionally, the feature calculation module is also used to determine the surface normal vector and the surface center point coordinates of the flow field boundary surface according to the vertex coordinates and the grid area; calculate the first unit vector and the second unit vector that are perpendicular to each other on the flow field boundary surface according to the surface normal vector; determine the horizontal coordinate range and the vertical coordinate range according to the bounding box of the flow field boundary surface; determine the feature parameters according to the horizontal coordinate range, the vertical coordinate range, the surface center point coordinates, the first unit vector and the second unit vector.
[0196] Optionally, the feature calculation module is also used to calculate the corresponding normal vector and center point coordinates of each triangular mesh according to the vertex coordinates of each triangular mesh; calculate the flow field boundary surface area according to the mesh area; calculate the surface normal vector based on the normal vector and the mesh area; calculate the surface center point coordinates based on the center point coordinates, the mesh area and the flow field boundary surface area.
[0197] Optionally, the feature calculation module is also used to determine the origin of the flow field boundary surface based on the coordinates of the surface center point, the first unit vector, the second unit vector, the horizontal minimum and the vertical minimum; determine the horizontal feature point based on the origin, the first unit vector and the horizontal coordinate range; determine the vertical feature point based on the origin, the second unit vector and the vertical coordinate range.
[0198] Optionally, the feature calculation module is also used to determine the estimation coefficient according to the number of streamlines; create a temporary plane data source based on the flow field boundary surface type, the estimation coefficient and the characteristic parameters; traverse each point in the temporary plane data source to screen the target seed points within the flow field boundary surface; adjust the estimation coefficient according to the number of target seed points and the number of streamlines, and determine the number of seed points corresponding to each flow field boundary surface type according to the adjusted estimation coefficient; select the target flow field boundary surface type corresponding to the number of seed points that has the smallest difference with the number of streamlines, and determine the particle source characteristic parameters.
[0199] Optionally, the feature calculation module is also used to execute the step of creating a temporary plane data source based on the flow field boundary surface type, the estimation coefficient and the feature parameters according to the adjusted estimation coefficient to determine the estimation coefficient range; determine the target estimation coefficient according to the estimation coefficient range; determine the number of seed points corresponding to each flow field boundary surface type according to the target estimation coefficient.
[0200] The present application provides a particle source output device based on a flow field boundary surface, and the particle source output device based on a flow field boundary surface includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the particle source output method based on the flow field boundary surface in the above-mentioned embodiment one.
[0201] Reference below Figure 4 , which shows a schematic diagram of the structure of a particle source output device based on a flow field boundary surface suitable for implementing an embodiment of the present application. The particle source output device based on a flow field boundary surface in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 4 The particle source output device based on the flow field boundary surface shown is only an example and should not bring any limitation to the function and scope of use of the embodiments of the present application.
[0202] like Figure 4As shown, the particle source output device based on the flow field boundary surface can include a processing device 1001 (such as a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to the program stored in a read-only memory (ROM: Read Only Memory) 1002 or the program loaded into a random access memory (RAM: Random Access Memory) 1004 from a storage device 1003. In RAM1004, various programs and data required for the operation of the particle source output device based on the flow field boundary surface are also stored. Processing device 1001, ROM1002 and RAM1004 are connected to each other through bus 1005. Input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to the I / O interface 1006: input devices 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 1003 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 1009. The communication device 1009 can allow the particle source output device based on the flow field boundary surface to communicate wirelessly or wired with other devices to exchange data. Although the particle source output device based on the flow field boundary surface with various systems is shown in the figure, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.
[0203] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0204] The particle source output device based on the flow field boundary surface provided by the present application adopts the particle source output method based on the flow field boundary surface in the above-mentioned embodiment, which can solve the technical problem that the created particle source has fluid particles penetrating the flow field boundary surface, resulting in inaccurate streamline analysis results. Compared with the prior art, the beneficial effects of the particle source output device based on the flow field boundary surface provided by the present application are the same as the beneficial effects of the particle source output device based on the flow field boundary surface provided by the above-mentioned embodiment, and the other technical features of the particle source output device based on the flow field boundary surface are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0205] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0206] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0207] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, wherein the computer-readable program instructions are used to execute the particle source output method based on the flow field boundary surface in the above-mentioned embodiment.
[0208] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.
[0209] The computer-readable storage medium may be included in the particle source output device based on the flow field boundary surface; or may exist independently without being assembled into the particle source output device based on the flow field boundary surface.
[0210] The above-mentioned computer-readable storage medium carries one or more programs. When the above-mentioned one or more programs are executed by a particle source output device based on a flow field boundary surface, the particle source output device based on the flow field boundary surface: obtains triangular mesh data of the flow field boundary surface, wherein the triangular mesh data includes the mesh area and vertex coordinates of each triangular mesh of the flow field boundary surface; calculates characteristic parameters of the flow field boundary surface according to the vertex coordinates and the mesh area; calculates characteristic parameters of the particle source of the flow field boundary surface based on the characteristic parameters and a preset number of streamlines; and outputs the particle source corresponding to the flow field boundary surface according to the particle source characteristic parameters.
[0211] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0212] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0213] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0214] The readable storage medium provided by the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned particle source output method based on the flow field boundary surface, and can solve the technical problems of uneven distribution of the created particle source and the presence of fluid particles penetrating the flow field boundary surface, resulting in inaccurate streamline analysis results. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present application are the same as the beneficial effects of the particle source output method based on the flow field boundary surface provided by the above-mentioned embodiment, and will not be repeated here.
[0215] An embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the above-mentioned particle source output method based on the flow field boundary surface.
[0216] The computer program product provided by the present application can solve the technical problem that the created particle source has fluid particles penetrating the flow field boundary surface, resulting in inaccurate streamline analysis results. Compared with the prior art, the beneficial effects of the computer program product provided by the embodiment of the present application are the same as the beneficial effects of the particle source output method based on the flow field boundary surface provided by the above embodiment, and will not be repeated here.
[0217] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent processing scope of the present application.
Claims
1. A particle source output method based on a flow field boundary surface, characterized in that: The particle source output method based on the flow field boundary surface includes: Acquire triangular mesh data of the flow field boundary surface, wherein the triangular mesh data includes the mesh area and vertex coordinates of each triangular mesh of the flow field boundary surface; Calculate characteristic parameters of the flow field boundary surface according to the vertex coordinates and the grid area; Calculating the particle source characteristic parameters of the flow field boundary surface based on the characteristic parameters and a preset number of streamlines; The particle source corresponding to the flow field boundary surface is output according to the particle source characteristic parameter.
2. The particle source output method based on flow field boundary surface according to claim 1, characterized in that: The step of obtaining the triangular mesh data of the flow field boundary surface comprises: Acquire grid data corresponding to the flow field boundary surface; Converting the flow field boundary surface into a triangular mesh expression according to the mesh data; The mesh area and the vertex coordinates of each of the triangular meshes are determined as the triangular mesh data.
3. The particle source output method based on flow field boundary surface according to claim 1, characterized in that: The step of calculating the characteristic parameters of the flow field boundary surface according to the vertex coordinates and the grid area comprises: Determine the surface normal vector and the surface center point coordinates of the flow field boundary surface according to the vertex coordinates and the grid area; Calculate a first unit vector and a second unit vector perpendicular to each other on the flow field boundary surface according to the surface normal vector; Determine the range of the horizontal coordinate and the range of the vertical coordinate according to the bounding box of the flow field boundary surface; The characteristic parameter is determined according to the horizontal coordinate range, the vertical coordinate range, the coordinates of the surface center point, the first unit vector and the second unit vector.
4. The particle source output method based on flow field boundary surface as claimed in claim 3, characterized in that: The step of determining the surface normal vector and the surface center point coordinates of the flow field boundary surface according to the vertex coordinates and the grid area comprises: Calculate the corresponding normal vector and center point coordinates of each triangular mesh according to the vertex coordinates; Calculate the flow field boundary surface area according to the grid area; Calculate the surface normal vector based on the normal vector and the mesh area; The surface center point coordinates are calculated based on the center point coordinates, the grid area, and the flow field boundary surface area.
5. The particle source output method based on flow field boundary surface as claimed in claim 3, characterized in that: The horizontal coordinate range includes a horizontal minimum value and a horizontal maximum value, the vertical coordinate range includes a vertical minimum value and a vertical maximum value, and the step of determining the characteristic parameter according to the horizontal coordinate range, the vertical coordinate range, the coordinates of the center point of the surface, the first unit vector, and the second unit vector includes: Determine the origin of the flow field boundary surface according to the coordinates of the surface center point, the first unit vector, the second unit vector, the transverse minimum value, and the longitudinal minimum value; Determine a horizontal feature point based on the origin, the first unit vector and the horizontal coordinate range; A longitudinal feature point is determined based on the origin, the second unit vector, and the longitudinal coordinate range.
6. The particle source output method based on flow field boundary surface according to claim 1, characterized in that: The step of calculating the particle source characteristic parameters of the flow field boundary surface based on the characteristic parameters and the preset number of streamlines includes: determining an estimation coefficient according to the number of streamlines; Creating a temporary plane data source based on the flow field boundary surface type, the estimated coefficients, and the characteristic parameters; Traversing each point in the temporary plane data source, and selecting target seed points within the flow field boundary surface; Adjusting the estimation coefficient according to the number of the target seed points and the number of streamlines, and determining the number of seed points corresponding to each type of the flow field boundary surface according to the adjusted estimation coefficient; The target flow field boundary surface type corresponding to the number of seed points that has the smallest difference from the number of streamlines is selected to determine the particle source characteristic parameters.
7. The particle source output method based on flow field boundary surface according to claim 6, characterized in that: The step of determining the number of seed points corresponding to each type of flow field boundary surface according to the adjusted estimation coefficient comprises: Execute the step of creating a temporary plane data source based on the flow field boundary surface type, the estimation coefficient and the characteristic parameter according to the adjusted estimation coefficient to determine the estimation coefficient range; Determining a target estimation coefficient according to the estimation coefficient range; The number of seed points corresponding to each flow field boundary surface type is determined according to the target estimation coefficient.
8. A particle source output device based on a flow field boundary surface, characterized in that: The particle source output device based on the flow field boundary surface comprises: A mesh acquisition module, used to acquire triangular mesh data of a flow field boundary surface, wherein the triangular mesh data includes a mesh area and vertex coordinates of each triangular mesh of the flow field boundary surface; A feature calculation module is used to calculate the feature parameters of the flow field boundary surface according to the vertex coordinates and the grid area; and calculate the particle source feature parameters of the flow field boundary surface based on the feature parameters and a preset number of streamlines: An output module is used to output the particle source corresponding to the flow field boundary surface according to the particle source characteristic parameters.
9. A particle source output device based on a flow field boundary surface, characterized in that: The particle source output device based on the flow field boundary surface comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the particle source output method based on the flow field boundary surface as described in any one of claims 1 to 7.
10. A storage medium, characterized in that: The storage medium is a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the particle source output method based on the flow field boundary surface as described in any one of claims 1 to 7 are implemented.