Unstructured grid orientation template selection method and flow field solution method

Through global direction template selection and area weighted center correction, the problems of complex selection of non-structural grid direction templates and poor numerical performance are solved, the calculation efficiency and flow field capture accuracy are improved, the grid skew phenomenon is overcome, and efficient Numerical simulation of flow field.

CN111783343BActive Publication Date: 2024-12-24NAT UNIV OF DEFENSE TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010649763.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-07-08
Publication Date
2024-12-24
Estimated Expiration
2040-07-08

AI Technical Summary

Technical Problem

The existing non-structural grid direction template selection process is complicated and the numerical performance is poor, resulting in low computational efficiency and inaccurate flow field feature capture.

Method used

The global direction template selection method is adopted to find the intersecting template units along the wall normal and flow direction through the geometric center of the grid element, and the geometric center of the grid element is corrected in combination with the area weighting center to improve the directionality and calculation accuracy of the template element.

Benefits of technology

It significantly reduces the number of template units, improves the calculation efficiency, accurately captures flow field characteristics and flow anisotropy, reduces calculation errors, and effectively overcomes the grid skew problem on the large compression ratio triangle grid.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111783343B_ABST
    Figure CN111783343B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for selecting a direction template of an unstructured grid and a method for solving a flow field. For any grid unit j in an unstructured grid, the corresponding direction template selection method includes: A1, taking the grid unit j as the central unit, and taking the grid unit with the same vertex as the central unit in the unstructured grid as the template unit; A2, making two straight lines through the geometric center of the central unit, one of which is parallel to the wall normal, and the other is parallel to the flow direction; A3, taking the template unit obtained in step A1 that intersects with one of the two straight lines in step A2 as the direction template corresponding to the grid unit j. The present invention is simple and effective, and corrects the geometric center of the grid unit by an area weighted method, effectively overcoming the grid deflection problem on the triangular grid unit with a large compression ratio; the calculation accuracy is high, the number of template units can be effectively reduced, the number of template units is controllable, the calculation time is short, the convergence efficiency is high, and the flow field characteristics and flow anisotropy can be accurately captured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of fluid mechanics calculation, and particularly relates to a non-structured grid direction template selection method and a flow field solving method. Background Art

[0002] The differential finite volume method means that the control equation is in differential form, and the advantage of this method is that for the variables to be solved and the source terms, the concept is no longer the average value, but the point value. Therefore, the complicated source term integration process is avoided, and the steps of discretizing the control equation are effectively simplified.

[0003] The differential governing equation is in the form of,

[0004]

[0005] In the formula, u j is the variable to be solved for the jth grid unit, f n is the convection flux along the normal vector outside the element surface, V j and represent the integration domain and the integration domain boundary respectively, S is the unit area of ​​the grid unit, and s j is the source term of the jth grid cell. In the high-order finite volume discretization process, equation (1) can usually be discretized as:

[0006]

[0007] In equation (2), N f Represents the number of unit faces, N G Represents the number of Gaussian integration points on the current unit surface, ω k With Φ jk are the weight coefficient and numerical flux at each Gaussian integration point, n j is the external normal vector at the jth element surface, S j is the area of ​​the jth unit face.

[0008] u j is a conserved variable, which can be expressed as: j =[ρ ρU ρE] T ;

[0009] Among them, ρ is the density, U is its velocity vector, and E is the energy.

[0010] Calculating the flow field actually means calculating the density, velocity, energy and other information of the flow field. Therefore, the conserved variable u j It is the quantity to be solved, which contains the flow information.

[0011] Continuing to analyze equation (1), where fn It is called the convection flux and its expression is

[0012] Among them, V n represents the velocity at the element surface, p n is the pressure at the cell surface, H is the total enthalpy, and

[0013] When solving, we use the discrete solution method. Based on the variables obtained at each time step, the corresponding flux can be calculated, and then the variables of the next time step can be calculated by iterating through time.

[0014] Finally, after the calculation converges, the variable u j What is contained in it is the real flow field information.

[0015] Figure 1 The basic process of high-order precision unstructured finite volume discretization is given, where C i and C j Represents grid cell i, grid cell j, r i is the vector from the geometric center of grid cell i to the Gaussian integration point, r j is the vector from the geometric center of grid cell j to the Gaussian integration point, and u L with u R are the left and right state vectors at the Gaussian integration point. jk , the left and right state vectors are needed to construct the numerical flux.

[0016] from Figure 1 It is obvious that the key to calculating the numerical flux through finite volume discretization is to obtain the variable gradient information of the grid unit, but the result of gradient reconstruction depends entirely on the different template unit selection methods. Therefore, a reasonable template unit selection method is an important part of unstructured finite volume discretization.

[0017] Compared with multi-block structured grids and Cartesian grids, unstructured grids have gradually become the focus of academic research and industrial applications due to their adaptability to complex shapes, the degree of automation of grid generation, and their ability to simulate problems such as moving boundaries, multi-body separation, and flow field adaptation. However, with the widespread use of unstructured grids, a contradiction involving grid generation and simulation accuracy has become increasingly prominent. Therefore, scholars have continuously tried to improve the discrete algorithm based on unstructured grids to achieve the unity of automated grid generation and precise numerical simulation.

[0018] At present, the most commonly used numerical method for unstructured grids is the finite volume method with second-order accuracy. This method has been applied to many well-known commercial software due to its good numerical performance, such as the commercial software Fluent developed by ANSYS and the in-house software FUN3D developed by NASA.

[0019] In the discretization process of second-order precision unstructured finite volume, different template units have a more direct impact on the actual calculation. Since the unstructured grid does not have the Cartesian index of the structured grid, the template unit can only be found by relying on certain criteria during the gradient reconstruction process. Figure 2 As shown in the figure, currently the most common method is to select grid cells that are coplanar or co-point with the central cell to act as template cells. Figure 2 The number marked on the grid unit is the number of template unit layers. For example, the first layer of common point template units refers to all template units that share the same vertex with the central unit, while the second layer of common point template units refers to all grid units that share the same fixed point with the first layer of template units.

[0020] Although the number of co-point template units and co-planar template units is controllable, the number of template units increases dramatically with the increase in the number of template layers, which significantly increases the processing time and reduces the computational efficiency. At the same time, these two template selection methods are overly dependent on fixed grid topology. For different flows, they cannot reflect the flow characteristics and flow field information in the process of template unit selection.

[0021] On this basis, in 2018, Xiong Min et al. proposed a direction template search method based on the local direction of the solution domain. Figure 3 As shown in (a), this local direction template selection method can ensure that the template unit is approximately along the wall normal and flow direction on a small compression ratio triangular mesh, and the template unit is expanded in two local directions in sequence. Compared with the commonly used co-point and co-planar templates, the number of template units can be controlled more accurately. Although this local direction template search method preliminarily considers the characteristics of the flow field, the process of determining the local direction of the template unit is relatively complicated. In addition, Figure 3 As shown in (b), when the mesh unit has a large compression ratio, one of the local directions deviates greatly from the wall normal, thus causing its directional failure. Its numerical performance is worse than that of the commonly used common point template unit and common edge template unit. Figure 4 As shown in the figure, there are three possible local direction combinations of triangular grid units. The final combination needs to be determined based on the front advancement process. This process is very cumbersome and involves issues such as local direction judgment and direction transmission. Therefore, it significantly increases the complexity of the pre-processing process of template unit selection. Summary of the invention

[0022] The purpose of the present invention is to provide a simple and effective unstructured grid direction template selection method and flow field solution method to address the shortcomings of the prior art, such as the complex direction template selection process and poor numerical performance.

[0023] In order to solve the above technical problems, the technical solution adopted by the present invention is:

[0024] A method for selecting a direction template for an unstructured grid includes obtaining direction templates corresponding to all grid cells in the unstructured grid, wherein the grid cells are all triangular grids; wherein, for any grid cell j in the unstructured grid, the method for selecting a direction template corresponding to the grid cell j includes:

[0025] Step A1, taking grid unit j as the central unit and taking grid units in the unstructured grid that share vertices with the central unit as template units;

[0026] Its characteristic is that the direction template selection method corresponding to the grid unit j also includes:

[0027] Step A2, draw two straight lines through the geometric center of the central unit, one of which is parallel to the wall normal and the other is parallel to the flow direction;

[0028] Step A3: Use the template unit obtained in step A1 that intersects one of the two straight lines in step A2 as the direction template corresponding to grid unit j.

[0029] Based on the same inventive concept, the present invention also provides a flow field solving method, comprising:

[0030] Step B1, generating an unstructured grid, wherein all grid cells in the unstructured grid are triangular grids;

[0031] Step B2, bringing the unstructured grid into the solver;

[0032] Its features also include:

[0033] Step B3, determining the direction template of the unstructured grid using the unstructured grid direction template selection method according to claim 1;

[0034] Step B4, the solver calculates the flow field.

[0035] Furthermore, between step B2 and step B4, the method further includes: correcting the geometric center of each grid unit.

[0036] As a preferred method, the coordinates (x f ,y f )for:

[0037]

[0038] in, A jk is the length of the kth edge of the grid unit j to be corrected, p is the weighting coefficient, (x mk ,y mk ) is the coordinate of the midpoint of the kth edge of the grid cell j to be corrected in the unstructured grid coordinate system.

[0039] As a preferred embodiment, in step B4, a differential solver is used to calculate the flow field.

[0040] Compared with the prior art, the present invention provides a simple and effective directional template selection method for non-structured volume discretization, and at the same time corrects the geometric center of the grid unit through the area weighted method, effectively overcoming the grid skew problem on the triangular grid unit with a large compression ratio; the calculation accuracy is high, and the number of template units can be effectively reduced. The number of template units is controllable, saving calculation time, and at the same time, the convergence efficiency is high, and the flow field characteristics and flow anisotropy can be accurately captured. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Figure 1 Schematic diagram of the high-order accuracy unstructured finite volume discretization process.

[0042] Figure 2 Schematic diagram of co-point template unit and co-planar template unit. Figure 2 (a) is a schematic diagram of a common point template unit; Figure 2 (b) is a schematic diagram of the coplanar template unit.

[0043] Figure 3 Select a schematic diagram for an existing local orientation template. Figure 3 (a) Schematic diagram of the selection principle of the existing local direction template on a triangle mesh with a small compression ratio; Figure 3 (b) Schematic diagram of the selection principle of existing local direction templates on triangular meshes with high compression ratio.

[0044] Figure 4 Schematic diagram of three local direction combinations of triangular grid units.

[0045] Figure 5 This is a schematic diagram of the principle of the direction template selection method described in the present invention.

[0046] Figure 6 Schematic diagram of grid deflection.

[0047] Figure 7 A diagram showing locations where grid skew is evident in the Cartesian coordinate system.

[0048] Figure 8 This is a comparison chart of the effects before and after geometric center correction. Figure 8(a) is the effect diagram before geometric center correction; Figure 8 (b) is the effect diagram after geometric center correction.

[0049] Fig. 9 This is a comparison chart of the global direction template effect before and after geometric center correction. Fig. 9 (a) is the effect diagram of the global direction template before geometric center correction; Fig. 9 (b) is the effect diagram of the global direction template after geometric center correction.

[0050] Fig.10 It is a schematic diagram of the overall flow of the flow field solving method of the present invention.

[0051] Fig.11 Schematic diagram of the flow field under different parameters μ.

[0052] Fig.12 Schematic diagram of the test grid for the example. Fig.12 (a) is a schematic diagram of a regular network; Fig.12 (b) is a schematic diagram of the perturbation network.

[0053] Fig.13 is the L2 error of different templates on the regular grid and L ∞ Error curve graph.

[0054] Fig.14 is the L2 error and L of different templates on the perturbation network ∞ Error curve graph.

[0055] Fig.15 Comparison of the number of template units required for different template selection methods.

[0056] Fig.16 Schematic diagram of the computational network used for the NACA0012 airfoil spoiler test. Fig.16 (a) is the overall calculation domain; Fig.16 (b) is the network near the wall.

[0057] Fig.17 Schematic diagram of the NACA0012 airfoil spoiler flow field.

[0058] Fig.18 This is a comparison chart of the lift-drag coefficient convergence curve. Fig.18 (a) is a comparison diagram of the lift coefficient convergence curve; Fig.18 (b) is a comparison diagram of the drag coefficient convergence curve.

[0059] Fig.19 Comparison diagram of residual convergence curves. DETAILED DESCRIPTION

[0060] Compared with the prior art, the present invention proposes a simpler way to find the directional template. This directional template search method also expands the template unit along two directions, but at this time it no longer relies on the independent local direction of each template unit, but on the global direction of the solution domain. The so-called global direction is actually the wall normal and flow direction with obvious flow anisotropy characteristics.

[0061] Simply put, when looking for a directional template, first a set is given for a specific central unit, and this set consists of grid units that share vertices with the central unit. Secondly, through the geometric center of the central unit, the grid units that intersect with the given set are found along the wall normal and the flow direction. We name this template unit selection method as a global directional template. Compared with the local directional template, the global directional template of the present invention can capture the changes in the flow more accurately. Even if the grid unit is highly anisotropic, the template unit found is always along the two global directions of the flow field. After numerical verification, the calculation error obtained using the global directional template is significantly lower than the calculation error of the local directional template, and is lower than or close to the two commonly used co-point and co-planar templates. Secondly, in highly anisotropic unstructured grids, the global directional template requires the least number of template units compared to the co-point template and the co-planar template, thereby effectively improving the calculation efficiency.

[0062] Specifically, the unstructured grid direction template selection method of the present invention needs to obtain the direction templates corresponding to all grid cells in the unstructured grid, and the grid cells are all triangular grids; wherein, for any grid cell j in the unstructured grid, the direction template selection method corresponding to the grid cell j includes:

[0063] Step A1, taking grid unit j as the central unit and taking grid units in the unstructured grid that share vertices with the central unit as template units;

[0064] Step A2, draw two straight lines through the geometric center of the central unit, one of which is parallel to the wall normal and the other is parallel to the flow direction;

[0065] Step A3: Use the template unit obtained in step A1 that intersects one of the two straight lines in step A2 as the direction template corresponding to grid unit j.

[0066] Since the template unit found by the method of the present invention is along the direction of the wall normal or the flow direction (perpendicular to the wall normal), the change characteristics of the flow field can be better captured.

[0067] like Figure 5As shown in the figure, the use of global directional template can effectively avoid the "deformation" phenomenon of local directional template on triangular mesh with large compression ratio. The number of template units can be controlled more accurately, and the overall process of template unit selection does not introduce any complexity.

[0068] The present invention also provides a flow field solving method, comprising:

[0069] Step B1, generating an unstructured grid, wherein the grid units in the unstructured grid are all triangular grids; the function of the grid is to discretize the entire calculation space to facilitate the subsequent discrete solution of the control equation.

[0070] Step B2, bringing the unstructured grid into the solver; the solver reads and stores the information of the unstructured grid.

[0071] Step B3, using the unstructured grid direction template selection method of the present invention to determine the direction template of the unstructured grid. For each grid cell in the unstructured grid, its template cell must be searched once, because in the calculation process, the variable gradient information of each grid cell must be calculated, and the calculation gradient must be calculated by relying on its template cell.

[0072] Step B4: the solver calculates the flow field to obtain the flow information of the fluid in the flow field.

[0073] Usually, when calculating boundary layer flows, large compression ratio grid elements are required. Near the wall, the compression ratio often exceeds 10. 3 The order of magnitude is large enough to capture the anisotropy of the flow field inside the boundary layer, but the mesh deflection of the triangle with large compression ratio is obvious, which is not conducive to the accuracy of numerical simulation and flow field solution.

[0074] On triangular mesh units with a large compression ratio, along the wall normal, even if the template unit is basically along the wall normal or flow direction, for the second-order accuracy unstructured finite volume method, the variables of the template unit used in the reconstruction process are stored in the unit reference point, and the reference point is usually located at the center of the unit. Therefore, on such triangular mesh units with a large compression ratio, the deflection between the unit centers of the template units along the wall normal is still large. Even if the template unit and the flow field characteristics are matched, it can be seen from the deflection phenomenon between the reference points that there is still a large difference from the actual wall normal, and it is difficult to fully capture the flow field information. This phenomenon is called mesh deflection, which is a common problem on triangular meshes with a large compression ratio. Mesh deflection is not conducive to the accuracy and stability of the solution.

[0075] Therefore, based on the selection of the global directional template, the present invention further refers to the area weighted center to fully overcome the mesh skew phenomenon on the triangular mesh with a large compression ratio and the problem of capturing the flow field characteristics, and ensure that the connection lines between the unit reference points are consistent with the wall normal.

[0076] The grid skew is defined as Figure 6 As shown in the figure, represents the unit vector along the line connecting the geometric centers of grid cells i and j, represents the unit external normal vector passing through the cell faces of grid cell i and grid cell j, and the grid skew is measured by the inner product of these two unit vectors. If the inner product is 1, it means there is no skew, otherwise if the inner product approaches 0, it means that the grid cell skew has reached the maximum. Figure 6 It can be clearly seen that when the compression ratio of the grid cell is close to 1, the absolute value of the inner product of the two unit vectors However, when the mesh is highly anisotropic or has a large compression ratio, the absolute value of the inner product of two unit vectors Therefore, if the geometric center of the unit is still used as the reference point at this time, the mesh deflection is inevitable. In order to reduce the deflection of the mesh, the intuitive consideration is to avoid using triangular mesh units with large compression ratios. However, usually in boundary layer flows, the variables change very drastically along the wall normal, so a large compression ratio mesh needs to be arranged near the wall to improve the resolution of the flow field in the boundary layer. Therefore, we can only consider moving the unit reference point to effectively reduce the mesh deflection. Here, we adopt a simple and effective solution, that is, introducing the area weighted center to suppress the mesh deflection. Since there is no mesh deflection in the quadrilateral mesh, but its generation process is complicated, especially for complex shapes, the present invention is oriented to triangular meshes, which can usually be automatically generated without excessive human intervention, so it has the advantage of convenient and fast generation. However, the triangular mesh in the boundary layer flow usually has a large compression ratio, and its mesh deflection is obvious, which has an adverse effect on the numerical performance of the solver, and the deflection between the reference points is serious, which is not conducive to capturing the flow field change characteristics. Therefore, the present invention is aimed at two-dimensional triangular meshes with a large compression ratio, and introduces area-weighted centers and combines them with a global direction template with more obvious directionality to fully improve the numerical performance of the solver.

[0077] Therefore, between step B2 and step B4, the following step is also included: correcting the geometric center of each grid unit.

[0078] Usually, the geometric center of the mesh cell is chosen as the reference point. For a two-dimensional triangular mesh, the geometric center of the mesh cell can be expressed mathematically as:

[0079]

[0080] In the formula, (x j ,y j ) represents the coordinates of the geometric center point of the triangular mesh unit j, (x mk ,y mk ) is the coordinate of the midpoint of the kth edge of triangular mesh unit j in the unstructured mesh coordinate system, which represents the midpoint of the mesh edge in two dimensions.

[0081] In order to reduce the deflection of the grid cells, the coordinates of the corrected geometric center in the unstructured grid coordinate system (x f ,y f )for:

[0082]

[0083] in, A jk is the length of the kth edge of the grid unit j to be corrected, p is the weighting coefficient, (x mk ,y mk ) is the coordinate of the midpoint of the kth edge of the grid cell j to be corrected in the unstructured grid coordinate system.

[0084] In step B4, a differential solver is used to calculate the flow field.

[0085] like Figure 2 As shown in , for any grid unit, the grid deflection phenomenon is more obvious between normal units. Figure 2 The shown are between template unit 1 and template unit 2, and between template unit 2 and template unit 3. For the mesh units in the flow direction, the mesh deflection is not obvious and can be ignored.

[0086] After using the area-weighted center, the mesh skew between normal mesh cells can be significantly reduced, especially when the mesh compression is large. When the parameter p = 2, the mesh cell skew can be completely eliminated. Figure 3 As shown in the figure, after the area weighted center is introduced, the reference point deflection phenomenon between the traditional unit geometric centers can be completely avoided, and the line between the area weighted centers is approximately parallel to the wall normal, thus achieving effective reduction of the grid deflection without changing the grid. According to numerical verification, the global direction template based on the area weighted center has higher calculation accuracy than the global direction template based on the unit geometric center, and its calculation error remains the lowest among all the tested templates, truly realizing the unification of grid generation automation and numerical simulation precision in unstructured grids.

[0087] The present invention further combines the global directional template with the area weighted center to further enhance its ability to capture the anisotropy of the flow field. Figure 7As shown in the figure, although the template units all use global direction templates, it can be clearly seen that the introduction of area weighted center can effectively improve the grid deflection and enhance the ability to capture flow field features.

[0088] If the position of the geometric center is not corrected, the effect will be as follows Figure 8 (a) As shown. After introducing the area weighted center to correct the geometric center, the skew phenomenon between the grid unit reference points is immediately eliminated, and the grid skew is also significantly reduced. Fig. 9 As shown in the figure, although the template unit is not affected in any way, the reference points are arranged more regularly after the area weighted center is introduced. In short, the template unit selection only preliminarily ensures that the variables involved in the actual operation can be basically located inside the template unit along the wall normal and flow direction. However, further, the introduction of the area weighted center once again optimizes the position of the reference points in the template unit, so that it can fit the template unit more effectively. In this way, the reference points in the template unit are all area weighted centers, which can effectively capture the anisotropic characteristics of the flow.

[0089] The area weighted center correction process can be completed before or after the direction template is selected. The overall flow diagram of the flow field solution method of the present invention is as follows: Fig.10 As shown (showing the situation where the direction template is selected first and then the geometric center is corrected).

[0090] Below we give the calculation results of two typical numerical examples to compare the calculation results of different methods.

[0091] First, we use the manufacturing solution method and the scalar Euler equation to simulate the boundary layer flow. This kind of boundary layer flow has obvious stratification along the wall normal, and the gradient of its variable along the wall normal is large, and the solution is as follows:

[0092]

[0093] The parameter c = 0.59, and the parameter μ is used to control the thickness of the boundary layer. The flow field under different parameters μ is as follows: Fig.11 As shown. The tests were conducted when μ was 10 -6 The calculation results of the five methods under the condition of . The scalar equation used can be written as:

[0094]

[0095] Substituting the solution form given by equation (5) into equation (6) we can obtain:

[0096]

[0097] Therefore, the obtained equation (7) is taken as the modified equation, and the solution Q(x, y) given in equation (5) is the analytical solution of this equation.

[0098] The test grid of the example is as follows Fig.12 As shown, the calculation results obtained on the regular and perturbed grids are as follows Fig.13 and Fig.14 As shown. Fig.13 and Fig.14 It can be clearly seen that the calculation error obtained by using the global direction template is lower than that of the co-point and co-planar templates. After introducing the area weighted center, it can be seen that the error of the improved global direction template is further greatly reduced, and the L2 and L ∞ The error (average error and maximum error) remains the lowest among all the methods tested. Fig.15 It can be seen that the number of template units required by the global direction template selection method is less than that of the co-point and co-planar template selection methods, so it can effectively improve the calculation efficiency while having higher calculation accuracy.

[0099] On the basis of verifying the calculation accuracy of the method, the numerical performance of the method described in the present invention in the NACA0012 airfoil spoiler was further tested. Fig.16 As shown in the figure, the computational grid adopts O-type grid topology, with 201 and 71 grid points distributed in the circumferential and normal directions respectively, and the first layer of grid distance on the wall is 0.001. In addition, the initial incoming flow is a uniform subsonic flow with a Mach number of Ma = 0.5. The flow field is as follows Fig.17 As shown in , we have calculated the lift and drag coefficients and residual convergence curves of the common point, coplanar template, global directional template, and global directional template based on area weighted center. The calculation results are shown in Fig.18 and 19 shown.

[0100] When the lift coefficient and drag coefficient are given, we use the calculation results under quadrilateral grid as a comparison. Fig.17 In addition, Fig.18 It can be seen from the local enlarged figure given in that among the four methods, the global directional template and the global directional template combined with the "area weighted center" converge faster. When the time step approaches 20000, both the lift coefficient and the drag coefficient approach a constant value without obvious fluctuation; however, the convergence of the coplanar template is poor, and there is still a certain degree of fluctuation when the other three methods tend to converge. Moreover, whether it is the lift coefficient or the drag coefficient, the final convergence value of the global directional template and its improved method is closer to the reference convergence value. Therefore, the advantages of the improved method can be better explained from the convergence curves of the lift coefficient and the drag coefficient.

[0101] In addition, from Fig.19 It can be further seen that among the four methods, the convergence of the coplanar template is the worst, and its corresponding residual is the highest when the time step reaches 20,000; on the other hand, the convergence of the global direction template is close to that of the copoint template among the three methods based on traditional centroids. In addition, the global direction template improved based on the "area weighted center" has the best convergence, and its residual is the lowest at a uniform time step, and can be reduced to 10 -6 Therefore, the advantages of the improved method can be more clearly seen from the residual curve. At the same time, referring to the results of the three examples tested, the method of the present invention has been significantly improved compared with the traditional method in terms of both calculation accuracy and calculation convergence.

[0102] In summary, two numerical examples respectively illustrate that the global directional template and the improved global directional template based on area weighted center have higher calculation accuracy, significantly improve the solution accuracy, and require fewer templates, effectively saving CPU time and improving calculation efficiency; at the same time, combined with the airfoil spoiler example, it can be seen that the lift and drag coefficients obtained by the global directional template and the improved global directional template are closer to the reference value, and have higher convergence efficiency. In the same time step, the residual decreases faster.

[0103] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the enlightenment of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the present invention and the claims, which all belong to the protection scope of the present invention.

Claims

1. A method for selecting a direction template of an unstructured grid, comprising obtaining direction templates corresponding to all grid cells in the unstructured grid, wherein the grid cells are all triangular grids; wherein: For any grid cell j in the unstructured grid, the direction template selection method corresponding to the grid cell j includes: Step A1, taking grid unit j as the central unit, and taking the grid unit whose center and the central unit share the same vertex as the template unit; It is characterized in that the method for selecting the direction template corresponding to the grid unit j also includes: Step A2, draw two straight lines through the geometric center of the central unit, one of which is parallel to the wall normal and the other is parallel to the flow direction; The geometric center of grid cell j is corrected, and the coordinates of the corrected geometric center in the unstructured grid coordinate system (x f ,y f )for: in, A jk is the length of the kth edge of the grid unit j to be corrected, p is the weighting coefficient, (x mk ,y mk ) is the coordinate of the midpoint of the k-th edge of the grid cell j to be corrected in the unstructured grid coordinate system; Step A3: Use the template unit obtained in step A1 that intersects one of the two straight lines in step A2 as the direction template corresponding to grid unit j.

2. A flow field solving method, comprising: Step B1, generating an unstructured grid, wherein all grid cells in the unstructured grid are triangular grids; Step B2, bringing the unstructured grid into the solver; It is characterized by further comprising: Step B3, determining the direction template of the unstructured grid using the unstructured grid direction template selection method according to claim 1; Step B4, the solver calculates the flow field.

3. The flow field solving method according to claim 2, characterized in that: In step B4, a differential solver is used to calculate the flow field.