Flow field gradient determination method and device based on iterative diffusion, equipment, medium and product

By dividing the flow field region into shock wave and smooth regions, and updating the gradient value using iterative diffusion and anisotropic diffusion weights, the oscillation and error problems in the flow field gradient calculation are solved, improving the calculation accuracy and stability. This CFD solver is suitable for complex flow fields and high-precision requirements.

CN122046853BActive Publication Date: 2026-06-23CHINA AERODYNAMICS RES AND DEV CENT ULTRA-HIGH SPEED AERODYNAMICS RES INST

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA AERODYNAMICS RES AND DEV CENT ULTRA-HIGH SPEED AERODYNAMICS RES INST
Filing Date
2026-04-20
Publication Date
2026-06-23

AI Technical Summary

Technical Problem

Existing methods for calculating flow field gradients suffer from oscillations, overshoots, and order reductions in non-smooth regions such as unstructured/non-orthogonal grids, high aspect ratio grids, and shock waves/turbulent flows. This leads to errors, contamination of pressure back-substitution, and inaccurate aerodynamic characteristic assessments.

Method used

The flow field region is divided into a shock wave region and a smooth region. Prior units are selected and their gradient values ​​are calculated for each region. The gradient values ​​of non-prior units are updated using iterative diffusion and anisotropic diffusion weights until the convergence condition is met.

Benefits of technology

It improves the accuracy and stability of flow field gradient calculation, suppresses non-physical smoothing across shock waves, is suitable for complex flow fields and high-precision requirements, and is applicable to gradient reconstruction in CFD solvers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122046853B_ABST
    Figure CN122046853B_ABST
Patent Text Reader

Abstract

The application discloses a flow field gradient determination method and device based on iterative diffusion, equipment, medium and product, and belongs to the technical field of numerical simulation. The method comprises the following steps: dividing a flow field region into a shock region and a smooth region; selecting prior units from the shock region and the smooth region respectively, and calculating gradient values of the prior units; marking the gradient values of the prior units as a frozen state as reference values for neighborhood diffusion, so as to iteratively update gradient values of non-prior units; in the diffusion process, based on the geometric relationship between the non-prior unit and each adjacent unit, the anisotropic diffusion weight between the non-prior unit and each adjacent unit is calculated; the gradient value of the non-prior unit is iteratively updated by using the diffusion weight and the gradient value of each adjacent unit until a convergence condition is reached; and the gradient value of each unit after convergence is determined as the flow field gradient. The application can improve the accuracy and stability of gradient calculation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of numerical simulation technology, and in particular to a method, apparatus, equipment, medium and product for determining flow field gradient based on iterative diffusion. Background Technology

[0002] With the continuous advancement of science and technology, fluid mechanics research plays an increasingly important role in various fields such as aerospace, environmental engineering, and mechanical manufacturing. Among these, the calculation of flow field gradients is a crucial step in the finite volume method (FVM) of computational fluid dynamics (CFD), especially under high-precision requirements such as complex flow fields and shock wave fields. The accuracy of gradient calculation directly affects the reliability of the results and the effectiveness of engineering applications. In numerical calculations of fluid dynamics, gradient calculation is one of the key steps, directly impacting the accuracy and stability of calculation results in aerodynamic characteristic analysis and turbulence simulation.

[0003] Commonly used engineering methods such as Green-Gauss (GG) and Least-Squares (LSQ / WLSQ) are robust in regular and smooth regions, but they are prone to oscillations, overshoot, and order reduction in unstructured / non-orthogonal grids, high aspect ratio grids, and non-smooth regions such as shock waves / turbulence. These errors further contaminate pressure back-substitution and aerodynamic characteristic assessment. Although hybrid reconstruction, PDE uniformity, and data-driven extensions have emerged in recent years, there is still a significant gap in general gradient calculation schemes that do not rely on training data, can be generalized to discontinuous regions, and are efficient.

[0004] Therefore, it is necessary to provide a more accurate method for determining the flow field gradient. Summary of the Invention

[0005] This invention provides a method, apparatus, device, medium, and product for determining flow field gradients based on iterative diffusion, which can solve the problem of low accuracy in determining flow field gradients in related technologies. The technical solution is as follows:

[0006] On the one hand, a method for determining flow field gradients based on iterative diffusion is provided, the method comprising:

[0007] Obtain the mesh topology and corresponding physical quantity distribution of the aerodynamic flow field;

[0008] Based on the distribution of the physical quantities, the flow field region is divided into a shock wave region and a smooth region.

[0009] Prior units are selected from the shock wave region and the smooth region respectively, and the gradient value of each prior unit is calculated.

[0010] The gradient value of each prior unit is marked as frozen and used as a reference value for neighborhood diffusion to iteratively update the gradient values ​​of non-prior units.

[0011] During the diffusion process, for each non-prior unit, the following steps are performed: construct a set of neighboring units for the non-prior unit; calculate the anisotropic diffusion weight between the non-prior unit and each neighboring unit based on the geometric relationship between the non-prior unit and each neighboring unit; and iteratively update the gradient value of the non-prior unit using the calculated diffusion weight and the gradient value of each neighboring unit until the convergence condition is met.

[0012] The gradient value of each unit after convergence is determined as the flow field gradient.

[0013] On the other hand, a flow field gradient determination device based on iterative diffusion is provided, the device comprising:

[0014] Acquisition unit, used to acquire the grid topology and corresponding physical quantity distribution of the aerodynamic flow field;

[0015] A partitioning unit is used to divide the flow field region into a shock wave region and a smooth region based on the distribution of the physical quantities.

[0016] A calculation unit is configured to select prior units from the shock wave region and the smooth region respectively, and calculate the gradient value of each prior unit;

[0017] An update unit is used to mark the gradient value of each prior unit as frozen and use it as a reference value for neighborhood diffusion to iteratively update the gradient values ​​of non-prior units. During the diffusion process, for each non-prior unit, the following steps are performed: constructing a set of neighboring units for the non-prior unit; calculating the anisotropic diffusion weight between the non-prior unit and each neighboring unit based on the geometric relationship between the non-prior unit and each neighboring unit; and iteratively updating the gradient value of the non-prior unit using the calculated diffusion weight and the gradient value of each neighboring unit until the convergence condition is met.

[0018] The defined element is used to determine the gradient value of each element after convergence as the flow field gradient.

[0019] On the other hand, a computer device is provided, the computer device including a memory and a processor, the memory for storing computer programs, and the processor for executing the computer programs stored in the memory to implement the steps of the flow field gradient determination method based on iterative diffusion described above.

[0020] On the other hand, a computer-readable storage medium is provided, wherein a computer program is stored therein, and when the computer program is executed by a processor, it implements the steps of the flow field gradient determination method based on iterative diffusion described above.

[0021] On the other hand, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps of the flow field gradient determination method based on iterative diffusion described above.

[0022] The technical solution provided by this invention can bring at least the following beneficial effects:

[0023] First, the flow field is divided into a shock wave region and a smooth region. Then, prior units are selected from both regions, and the gradient value of each prior unit is calculated. These gradient values ​​are used as reference values ​​for neighborhood diffusion. Finally, non-prior units are iteratively updated through diffusion. During the diffusion process, the anisotropic diffusion weight is calculated using the geometric relationship between the non-prior unit and its neighboring units, and the gradient value of the non-prior unit is iteratively updated using this weight. This scheme improves the accuracy and stability of gradient calculation in high-gradient regions like the shock wave and effectively suppresses non-physical smoothing across the shock wave. Attached Figure Description

[0024] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0025] Figure 1 This is a flowchart of a flow field gradient determination method based on iterative diffusion provided by an embodiment of the present invention;

[0026] Figure 2 This is a structural diagram of a flow field gradient determination device based on iterative diffusion provided in an embodiment of the present invention;

[0027] Figure 3 This is a hardware architecture diagram of a computer device provided in an embodiment of the present invention. Detailed Implementation

[0028] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are some embodiments of the present invention, but not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.

[0029] Please refer to Figure 1 The present invention provides a method for determining flow field gradients based on iterative diffusion, the method comprising:

[0030] Step 100: Obtain the grid topology of the aerodynamic flow field and the corresponding physical quantity distribution;

[0031] Step 102: Based on the distribution of the physical quantities, the flow field region is divided into a shock wave region and a smooth region;

[0032] Step 104: Select prior units from the shock wave region and the smooth region respectively, and calculate the gradient value of each prior unit;

[0033] Step 106: Mark the gradient value of each prior unit as frozen and use it as a reference value for neighborhood diffusion to iteratively update the gradient values ​​of non-prior units.

[0034] During the diffusion process, for each non-prior unit, the following steps are performed: construct a set of neighboring units for the non-prior unit; calculate the anisotropic diffusion weight between the non-prior unit and each neighboring unit based on the geometric relationship between the non-prior unit and each neighboring unit; and iteratively update the gradient value of the non-prior unit using the calculated diffusion weight and the gradient value of each neighboring unit until the convergence condition is met.

[0035] Step 108: Determine the gradient value of each unit after convergence as the flow field gradient.

[0036] In this embodiment of the invention, the flow field region is first divided into a shock wave region and a smooth region. Then, prior units are selected from both the shock wave region and the smooth region, and the gradient value of each prior unit is calculated. The gradient value of the prior unit is used as a reference value for neighborhood diffusion. Finally, non-prior units are iteratively diffused and updated. During the diffusion process, the anisotropic diffusion weight is calculated using the geometric relationship between the non-prior unit and its neighboring units, and the gradient value of the non-prior unit is iteratively updated using the anisotropic diffusion weight. This scheme improves the accuracy and stability of gradient calculation in high gradient regions such as shock waves and can effectively suppress non-physical smoothing across shock waves.

[0037] The following description Figure 1 The execution method of each step is shown.

[0038] First, for step 100, the grid topology of the aerodynamic flow field and the corresponding physical quantity distribution are obtained.

[0039] In this embodiment of the invention, the aerodynamic flow field refers to the spatial distribution and temporal evolution of physical quantities such as velocity, pressure, density, and temperature formed by air or other gases during their movement.

[0040] In computational fluid dynamics, a mesh is a geometric partition obtained by discretizing the physical computational domain, and a cell is the basic geometric shape that makes up the mesh. Specifically, a mesh is composed of a large number of cells connected by sharing vertices, edges, or faces. Each cell corresponds to a control volume in the computational domain, and its shape is determined by the cell type, such as triangle, quadrilateral (two-dimensional), tetrahedron, hexahedron, polyhedron (three-dimensional), etc. The topology of the mesh (structured or unstructured) describes how these cells are connected.

[0041] In the finite volume method, physical quantities are typically defined at the center (or nodes) of the element. Therefore, each element is associated with a set of physical quantity values, constituting a discrete distribution of the entire flow field. Flux exchange between elements depends on the physical quantities stored in adjacent elements and the gradient calculated through shared surfaces.

[0042] In this embodiment of the invention, the distribution of physical quantities includes at least unit space coordinates and pressure; it may also include information such as density, velocity components, and temperature.

[0043] Then, for step 102, the flow field region is divided into a shock wave region and a smooth region based on the distribution of the physical quantities.

[0044] In one embodiment of the present invention, dividing the flow field region into a shock wave region and a smooth region based on the distribution of the physical quantities includes:

[0045] For each element in the flow field region, the following steps are performed: calculate the pressure difference characteristic between the element and all its adjacent elements, and statistically analyze the distribution of the pressure difference characteristic within the flow field region. Elements with pressure difference characteristic values ​​higher than a specified threshold are classified as shock wave regions, and elements with pressure difference characteristic values ​​lower than a specified threshold are classified as smooth regions.

[0046] After calculating the pressure difference characteristic between the element and all its adjacent elements, the largest pressure difference characteristic is taken as the pressure difference characteristic corresponding to that element. In this way, the pressure difference characteristic of each element in the flow field region can be obtained.

[0047] The specified threshold can be set based on the distribution of the statistically analyzed pressure difference characteristics. This setting method involves selecting a set quantile value as the specified threshold, such as the 95th percentile. Cells with pressure difference characteristics higher than the specified threshold are classified as candidate cells for shock wave regions, while cells with pressure difference characteristics lower than the specified threshold are classified as candidate cells for smooth regions.

[0048] Furthermore, connectivity and size filtering can be applied to the candidate elements of the shock wave region and the candidate elements of the smooth region to remove isolated noise elements, thereby obtaining the final shock wave region and smooth region and completing the flow field region division.

[0049] Finally, regarding step 104, "selecting prior units from the shock wave region and the smooth region respectively, and calculating the gradient value of each prior unit" and step 106, "marking the gradient value of each prior unit as a frozen state and using it as a reference value for neighborhood diffusion to iteratively update the gradient values ​​of non-prior units".

[0050] In this embodiment of the invention, the prior unit can be selected randomly, and a specified proportion needs to be specified. That is, a specified proportion of units are selected from the shock wave region and the smooth region as prior units.

[0051] In one implementation, the specified ratio can be 20% to 30%.

[0052] In one embodiment of the present invention, the gradient value of each prior unit is calculated as follows:

[0053] For prior units in smooth regions, the second-order least squares method (LSQ-2) is used for gradient reconstruction, and the accuracy of local gradient calculation is improved by fitting a second-order polynomial.

[0054] For the prior cells in the shock wave region, the first-order least squares method (LSQ-1) is used for gradient reconstruction to avoid excessive smoothing of the second-order reconstruction near the shock wave and to preserve the sharp gradient changes at the shock wave surface.

[0055] In this embodiment of the invention, the gradient value of the prior unit is marked as frozen, so that the prior unit does not participate in the updating of the gradient value in the subsequent iterative diffusion process to keep the gradient value unchanged, and the gradient value of the prior unit is used as the reference value for neighborhood diffusion.

[0056] In this embodiment of the invention, during the diffusion process, it is necessary to iteratively update the gradient value of each non-prior unit. Specifically, for each non-prior unit, the following steps are performed: constructing a set of neighboring units for the non-prior unit; calculating the anisotropic diffusion weight between the non-prior unit and each neighboring unit based on the geometric relationship between the non-prior unit and each neighboring unit; and iteratively updating the gradient value of the non-prior unit using the calculated diffusion weight and the gradient value of each neighboring unit until the convergence condition is met.

[0057] In this embodiment of the invention, the anisotropic diffusion weight takes into account at least the following factors:

[0058] 1. The angle between the vector connecting the centers of two units and the direction of the local gradient;

[0059] 2. The distance or characteristic scale between the geometric centers of two units;

[0060] 3. Are the two units located on the same side or opposite sides of the shock wave surface?

[0061] In this embodiment of the invention, for adjacent units that are aligned with the streamline direction or the gradient direction, their diffusion weight can be increased, so that the gradient has a relatively fast propagation speed in the streamline / tangential direction; for adjacent units that are close to the shock wave normal direction, especially adjacent units located on the other side of the shock wave surface, their diffusion weight can be reduced or the weight can be directly truncated, so as to achieve cross-shock wave diffusion restriction and avoid the gradient being overly smoothed in the shock wave normal direction.

[0062] Therefore, calculating the anisotropic diffusion weight between the non-prior unit and each adjacent unit based on the geometric relationship between the non-prior unit and each adjacent unit can include:

[0063] For this non-prior element and each adjacent element:

[0064] Determine the angle between the vector connecting the centers of the non-prior unit and the adjacent unit and the local gradient direction;

[0065] Determine the distance between the geometric center of the non-prior element and the adjacent element;

[0066] Determine whether the non-prior element and the adjacent element are located on the same side or opposite side of the shock surface;

[0067] Based on the determined included angle, distance, and same-side or opposite-side relationship, calculate the anisotropic diffusion weight between the non-prior element and the adjacent element.

[0068] It should be noted that there can be one or more adjacent units; when there are multiple adjacent units, when calculating the anisotropic diffusion weight between the non-prior unit and the first adjacent unit, "the adjacent unit" is the first adjacent unit; when calculating the anisotropic diffusion weight between the non-prior unit and the second adjacent unit, "the adjacent unit" is the second adjacent unit, and so on.

[0069] Specifically, the step of calculating the anisotropic diffusion weight between the non-prior unit and the adjacent unit based on the determined included angle, distance, and same-side or opposite-side relationship includes:

[0070] Calculate the directional weight using the cosine of the included angle;

[0071] The distance weight is determined using the reciprocal of the distance.

[0072] Determine the corresponding threshold by utilizing the same-side or opposite-side relationship;

[0073] The product of the direction weight, distance weight, and threshold is determined as the anisotropic diffusion weight between the non-prior unit and the adjacent unit.

[0074] In one implementation, the direction weight is calculated using the cosine of the included angle, which can be:

[0075]

[0076]

[0077]

[0078] in, Let be the angle between the line vector connecting the centers of the i-th non-prior unit and the j-th adjacent unit and the local gradient direction of the i-th non-prior unit; Let be the angle between the line vector connecting the centers of the i-th non-prior unit and the j-th adjacent unit and the local gradient direction of the j-th non-prior unit; Let be the gradient direction vector of the i-th non-prior unit. Let be the gradient direction vector of the j-th non-prior unit. The distance between the geometric centers of the i-th non-prior unit and the j-th adjacent unit; The orientation weights of the i-th non-prior unit are... Let j be the orientation weight of the non-prior unit. Here, P represents the final calculated directional weight; P is an exponential parameter controlling the shape of the weight distribution, determining the amplification effect of directional consistency on the weights; ε is a local minimum value used to prevent directional weights from being zero, typically taken as 10. -6 .

[0079] In one implementation, the distance weight is determined using the reciprocal of the distance, which can be:

[0080]

[0081] in, For distance weights.

[0082] In one implementation, the corresponding threshold is determined by the same-side or opposite-side relationship. For example, if they are on the same side, then drop=1; if they are on opposite sides, then drop=0 or a minimum value.

[0083] Thus, the anisotropic diffusion weight between the non-prior unit and the adjacent unit is:

[0084]

[0085] in, It represents the anisotropic diffusion weight between the i-th non-prior unit and the j-th adjacent unit.

[0086] In this embodiment of the invention, when iteratively updating the gradient value of the non-prior unit using the calculated diffusion weights and the gradient value of each adjacent unit, the process may include:

[0087] The gradient value of the non-prior unit in this iteration is calculated using the following formula:

[0088]

[0089] in, Let be the gradient value of the i-th non-prior unit after this iteration. Let be the gradient value of the i-th non-prior unit before this iteration update. As a smoothing factor, Let be the anisotropic diffusion weight between the i-th non-prior element and its j-th neighboring element, where j takes values ​​of 1, 2, ..., n, and n is the total number of neighboring elements of the i-th non-prior element. Let be the gradient value of the j-th adjacent unit.

[0090] By introducing a smoothing factor, the old gradient and the weighted neighborhood gradient can be updated using linear interpolation to control the step size of each iteration and ensure numerical stability.

[0091] Since the gradient value of the prior unit serves as a reference value for neighborhood diffusion, it is necessary to gradually diffuse the gradient value of the prior unit to non-prior units in each iteration until the convergence condition is met and the iteration stops. This convergence condition can include at least: the norm of the overall gradient update is less than a threshold, or the number of iterations reaches a preset upper limit.

[0092] Furthermore, embodiments of the present invention may also include: introducing physical constraints during the diffusion process, so as to couple the penalty term of the physical constraints with the iterative update of the gradient value, so that the gradient value satisfies mass conservation and momentum balance.

[0093] In one implementation, the physical constraints may include: the continuity equation of fluid mechanics, the momentum conservation equation, and boundary conditions.

[0094] After the iteration begins, the difference norm of the gradient fields between two adjacent iterations is calculated in each round to determine whether the convergence condition is met: whether the difference is less than the threshold or whether the number of iterations has reached the upper limit; if not, the iteration continues; if it is met, subsequent evaluation and visualization are performed.

[0095] Furthermore, the anisotropic weights and relaxation factors can be dynamically adjusted based on physical quantities such as shock wave intensity, local Mach number, and Reynolds number to further improve the stability of the algorithm in high gradient regions.

[0096] Once the convergence condition is met, the gradient value of each converged element can be determined as the flow field gradient.

[0097] In this embodiment of the invention, determining the flow field gradient is a crucial step in the finite volume method of computational fluid dynamics. Especially under high-precision requirements such as complex flow fields and shock wave fields, the accuracy of the calculated flow field gradient directly affects the reliability of the results and the effectiveness of engineering applications. Specifically, the flow field gradient determination method based on iterative diffusion provided in this embodiment of the invention can be used in CFD solvers to reconstruct the gradients of physical fields (such as pressure, velocity, and temperature fields) to solve the Navier-Stokes equations.

[0098] The embodiments of the present invention have at least the following beneficial effects:

[0099] First, by introducing a shock wave detector, the aerodynamic flow field is divided into a shock wave region and a smooth region. Then, prior units are selected in the two types of regions respectively, and gradient initialization is performed using LSQ reconstruction of different orders. This avoids the excessive smoothing and non-physical oscillations that occur near the shock wave in the traditional uniform-order LSQ method, making the shock wave intensity, position and shape closer to the true solution.

[0100] Secondly, the embodiments of the present invention construct anisotropic weights by the relationship between the inter-unit distance vector and the local gradient direction, and combine the exponential parameter to amplify the directional consistency, so that the gradient spreads more strongly along the streamline / shock tangential direction, while the spread in the shock normal direction, especially across the shock direction, is significantly suppressed, thereby effectively smoothing noise while maintaining the sharp characteristics of the high gradient structure such as the shock wave.

[0101] Furthermore, during the iterative diffusion process, embodiments of the present invention can introduce the continuity equation, momentum conservation equation, and boundary conditions in the form of penalty terms or projections to physically constrain and correct the intermediate gradient field, so that the final gradient field is not only numerically smooth, but also has higher consistency in terms of mass conservation and momentum balance, making it more suitable as input for subsequent pressure back substitution, turbulence modeling, and engineering analysis.

[0102] In summary, the embodiments of the present invention, through the above-described overall framework, improve the accuracy and stability of gradient calculation in high gradient regions such as shock waves, and can effectively suppress non-physical smoothing across shock waves; at the same time, the algorithm structure is local, easy to combine with fluid physics constraints and GPU parallel computing, applicable to large-scale unstructured meshes, and has good engineering portability.

[0103] In practical applications, this invention has completed preliminary tests to simulate a regularized grid of 200,000 elements for a bow-shaped shock wave, verifying the effectiveness of the flow field gradient determination method based on iterative diffusion in the shock wave region.

[0104] Please refer to Figure 2 This invention provides a flow field gradient determination device based on iterative diffusion, the device comprising:

[0105] Acquisition unit 200 is used to acquire the grid topology and corresponding physical quantity distribution of the aerodynamic flow field;

[0106] The partitioning unit 202 is used to divide the flow field region into a shock wave region and a smooth region based on the distribution of the physical quantities.

[0107] The calculation unit 204 is used to select prior units from the shock wave region and the smooth region respectively, and calculate the gradient value of each prior unit;

[0108] Update unit 206 is used to mark the gradient value of each prior unit as frozen and use it as a reference value for neighborhood diffusion to iteratively update the gradient values ​​of non-prior units. During the diffusion process, for each non-prior unit, the following steps are performed: constructing a set of neighboring units for the non-prior unit; calculating the anisotropic diffusion weight between the non-prior unit and each neighboring unit based on the geometric relationship between the non-prior unit and each neighboring unit; and iteratively updating the gradient value of the non-prior unit using the calculated diffusion weight and the gradient value of each neighboring unit until the convergence condition is met.

[0109] Unit 208 is defined as the gradient value of each unit after convergence, which is used to determine the flow field gradient.

[0110] In one embodiment of the present invention, the step of dividing the flow field region into a shock wave region and a smooth region based on the distribution of the physical quantities includes: for each unit in the flow field region, performing the following: calculating the pressure difference characteristic quantity between the unit and all its adjacent units, and statistically analyzing the distribution of the pressure difference characteristic quantity in the flow field region, classifying units with pressure difference characteristic quantities higher than a specified threshold as shock wave regions, and classifying units with pressure difference characteristic quantities lower than a specified threshold as smooth regions.

[0111] In one embodiment of the present invention, calculating the anisotropic diffusion weight between the non-prior unit and each adjacent unit based on the geometric relationship between the non-prior unit and each adjacent unit includes:

[0112] For the non-prior element and each adjacent element: determine the angle between the vector connecting the centers of the non-prior element and the adjacent element and the local gradient direction; determine the distance between the geometric centers of the non-prior element and the adjacent element; determine whether the non-prior element and the adjacent element are located on the same side or opposite side of the shock surface; and calculate the anisotropic diffusion weight between the non-prior element and the adjacent element based on the determined angle, distance, and same-side or opposite-side relationship.

[0113] In one embodiment of the present invention, the step of calculating the anisotropic diffusion weight between the non-prior unit and the adjacent unit based on the determined included angle, distance, and same-side or opposite-side relationship includes: calculating the direction weight using the cosine of the included angle; determining the distance weight using the reciprocal of the distance; determining the corresponding threshold using the same-side or opposite-side relationship; and determining the anisotropic diffusion weight between the non-prior unit and the adjacent unit by multiplying the direction weight, the distance weight, and the threshold.

[0114] In one embodiment of the present invention, the step of iteratively updating the gradient value of the non-prior unit using the calculated diffusion weight and the gradient value of each adjacent unit includes: calculating the gradient value of the non-prior unit for this iteration using the following formula:

[0115]

[0116] in, Let be the gradient value of the i-th non-prior unit after this iteration. Let be the gradient value of the i-th non-prior unit before this iteration update. As a smoothing factor, Let be the anisotropic diffusion weight between the i-th non-prior element and its j-th neighboring element, where j takes values ​​of 1, 2, ..., n, and n is the total number of neighboring elements of the i-th non-prior element. Let be the gradient value of the j-th adjacent unit.

[0117] In one embodiment of the present invention, the device may further include:

[0118] The coupling unit is used to introduce physical constraints during the diffusion process, so as to couple the penalty term of the physical constraints with the iterative update of the gradient value, so that the gradient value satisfies the mass conservation and momentum balance.

[0119] It should be noted that the flow field gradient determination device based on iterative diffusion provided in the above embodiments is only an example of the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the flow field gradient determination device based on iterative diffusion provided in the above embodiments and the flow field gradient determination method embodiments based on iterative diffusion belong to the same concept. The specific implementation process is detailed in the method embodiments and will not be repeated here.

[0120] Embodiments of this application also provide a computer device, please refer to... Figure 3 The computer device includes a processor and a memory, the memory storing at least one instruction, at least one program, code set or instruction set, the at least one instruction, at least one program, code set or instruction set being loaded and executed by the processor to implement the flow field gradient determination method based on iterative diffusion provided in the above-described method embodiments.

[0121] Embodiments of this application also provide a computer-readable storage medium storing at least one instruction, at least one program, code set, or instruction set, wherein the at least one instruction, at least one program, code set, or instruction set is loaded and executed by a processor to implement the flow field gradient determination method based on iterative diffusion provided in the above-described method embodiments.

[0122] Embodiments of this application also provide a computer program product, which includes a computer program. A processor of a computer device reads the computer program from a computer-readable storage medium and executes the computer program, causing the computer device to perform any of the iterative diffusion-based flow field gradient determination methods described in the above embodiments.

[0123] For ease of description, the above systems or devices are described separately as various modules or units based on their functions. Of course, in implementing this application, the functions of each unit can be implemented in one or more software and / or hardware components.

[0124] As can be seen from the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in various embodiments or some parts of the embodiments of this application.

[0125] Finally, it should be noted that in this document, relational terms such as first, second, third, and fourth are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0126] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. A method for determining flow field gradients based on iterative diffusion, characterized in that, The method includes: Obtain the mesh topology and corresponding physical quantity distribution of the aerodynamic flow field; Based on the distribution of the physical quantities, the flow field region is divided into a shock wave region and a smooth region. Prior units are selected from the shock wave region and the smooth region respectively, and the gradient value of each prior unit is calculated. The gradient value of each prior unit is marked as frozen and used as a reference value for neighborhood diffusion to iteratively update the gradient values ​​of non-prior units. During the diffusion process, for each non-prior unit, the following steps are performed: construct a set of neighboring units for the non-prior unit; calculate the anisotropic diffusion weight between the non-prior unit and each neighboring unit based on the geometric relationship between the non-prior unit and each neighboring unit; and iteratively update the gradient value of the non-prior unit using the calculated diffusion weight and the gradient value of each neighboring unit until the convergence condition is met. The gradient value of each unit after convergence is determined as the flow field gradient; The calculation of the anisotropic diffusion weight between the non-prior unit and each adjacent unit based on the geometric relationship between the non-prior unit and each adjacent unit includes: for the non-prior unit and each adjacent unit: determining the angle between the vector connecting the centers of the non-prior unit and the adjacent unit and the local gradient direction; determining the distance between the geometric centers of the non-prior unit and the adjacent unit; determining whether the non-prior unit and the adjacent unit are located on the same side or opposite side of the shock surface; and calculating the anisotropic diffusion weight between the non-prior unit and the adjacent unit based on the determined angle, distance, and same-side or opposite-side relationship. The step of calculating the anisotropic diffusion weight between the non-prior unit and the adjacent unit based on the determined included angle, distance, and same-side or opposite-side relationship includes: calculating the direction weight using the cosine of the included angle; determining the distance weight using the reciprocal of the distance; determining the corresponding threshold using the same-side or opposite-side relationship; and determining the anisotropic diffusion weight between the non-prior unit and the adjacent unit by multiplying the direction weight, the distance weight, and the threshold.

2. The method according to claim 1, characterized in that, The division of the flow field region into a shock wave region and a smooth region based on the distribution of the physical quantities includes: For each element in the flow field region, the following steps are performed: calculate the pressure difference characteristic between the element and all its adjacent elements, and statistically analyze the distribution of the pressure difference characteristic within the flow field region. Elements with pressure difference characteristic values ​​higher than a specified threshold are classified as shock wave regions, and elements with pressure difference characteristic values ​​lower than a specified threshold are classified as smooth regions.

3. The method according to claim 1, characterized in that, The step of iteratively updating the gradient value of the non-prior unit using the calculated diffusion weights and the gradient value of each adjacent unit includes: The gradient value of the non-prior unit in this iteration is calculated using the following formula: in, Let be the gradient value of the i-th non-prior unit after this iteration. Let be the gradient value of the i-th non-prior unit before this iteration update. As a smoothing factor, Let be the anisotropic diffusion weight between the i-th non-prior element and its j-th neighboring element, where j takes values ​​of 1, 2, ..., n, and n is the total number of neighboring elements of the i-th non-prior element. Let be the gradient value of the j-th adjacent unit.

4. The method according to any one of claims 1-3, characterized in that, Also includes: Physical constraints are introduced during the diffusion process to couple the penalty term of the physical constraints with the iterative update of the gradient value, so that the gradient value satisfies mass conservation and momentum balance.

5. A flow field gradient determination device based on iterative diffusion, characterized in that, The apparatus for performing the method as described in any one of claims 1-4 above, the apparatus comprising: Acquisition unit, used to acquire the grid topology and corresponding physical quantity distribution of the aerodynamic flow field; A partitioning unit is used to divide the flow field region into a shock wave region and a smooth region based on the distribution of the physical quantities. A calculation unit is configured to select prior units from the shock wave region and the smooth region respectively, and calculate the gradient value of each prior unit; An update unit is used to mark the gradient value of each prior unit as frozen and use it as a reference value for neighborhood diffusion to iteratively update the gradient values ​​of non-prior units. During the diffusion process, for each non-prior unit, the following steps are performed: constructing a set of neighboring units for the non-prior unit; calculating the anisotropic diffusion weight between the non-prior unit and each neighboring unit based on the geometric relationship between the non-prior unit and each neighboring unit; and iteratively updating the gradient value of the non-prior unit using the calculated diffusion weight and the gradient value of each neighboring unit until the convergence condition is met. The defined element is used to determine the gradient value of each element after convergence as the flow field gradient.

6. A computer device, characterized in that, The computer device includes a memory and a processor. The memory is used to store computer programs, and the processor is used to execute the computer programs stored in the memory to implement the steps of the method according to any one of claims 1-4.

7. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, which, when executed by a processor, implements the steps of the method described in any one of claims 1-4.

8. A computer program product, characterized in that, Includes a computer program, which, when executed by a processor, implements the steps of the method according to any one of claims 1-4.