Evaluation method and device for gradient-optimized fluid engineering model and computer program product
By adopting the least squares gradient format of extended template format in the fluid engineering model, dynamically adjusting the weight factor and optimizing the weight allocation of neighboring units, the accuracy problem of the large aspect ratio grid model is solved, the calculation accuracy and stability are improved, the development cycle is shortened, and the cost is reduced.
Patent Information
- Application Number
- CN202510920734.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-04
- Publication Date
- 2025-08-01
- Estimated Expiration
- 2045-07-04
AI Technical Summary
In fluid engineering design, when using structured mesh division, the mesh model with large aspect ratio characteristics leads to accuracy problems during gradient reconstruction, resulting in inaccurate calculation results and inability to converge, which affects the performance evaluation of the fluid engineering model.
The least squares gradient format of the extended template format is adopted, and the weight allocation of adjacent units is optimized by dynamically adjusting the weight factor, error propagation in the long axis direction is suppressed, and numerical accuracy and robustness are improved.
The calculation accuracy of the large aspect ratio grid model is improved, the chessboard phenomenon is solved, the stability of numerical solutions is enhanced, the development cycle is shortened, and the R&D cost is reduced.
Smart Images

Figure CN120409361A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of this specification relate to the field of fluid mechanics engineering, and in particular, to an evaluation method, device, and computer program product for a fluid engineering model with gradient optimization. Background Art
[0002] In the industrial field, traditional fluid engineering design follows a cyclic pattern of "design - prototype - test - modification". This R & D process relying on physical experiments often has a long cycle, and engineers need to spend a lot of time waiting for experimental results and making repeated modifications. With the development of Computational Fluid Dynamics (CFD) technology, this situation has been fundamentally changed. CFD constructs a complete "virtual experiment" system, uses a computer to simulate complex physical phenomena such as the flow, heat transfer, and mass transfer of fluids (including liquids and gases), and transforms physical processes that are difficult to directly observe in actual engineering into computable and analyzable mathematical models. With the help of a powerful numerical solver and advanced post - processing technology, CFD can provide engineers with in - depth product performance analysis and optimization means at an acceptable cost and time cost in a virtual environment.
[0003] Although the above - mentioned simulation results help designers conduct data analysis, including the influence of different working conditions on target parameters for a specific model; whether the model meets the design requirements under the required working conditions; the advantages and disadvantages of different design models and the optimization direction, etc. However, the achievement of the above - mentioned expected effects depends on the accuracy of the CFD numerical calculation results. And the accuracy and robustness of the numerical algorithm of the solver will directly affect the accuracy. For this geometric model, due to its characteristics of large - size span and the co - existence of large channels and small channels, when using structured grid division, the grid model has obvious characteristics of large aspect ratio. During numerical solution, accuracy problems will occur in the gradient reconstruction process due to the grid characteristics. When solving algebraic equations, through continuous iteration, the accuracy error gradually accumulates, which is reflected in Figure 14a and Figure 14b the velocity contour and time - averaged velocity contour shown as a checkerboard phenomenon. The calculation cannot converge, and thus the calculation results are inaccurate, making it impossible to accurately evaluate the performance of the fluid engineering model. Summary of the Invention
[0004] To solve the problems existing in the prior art, the embodiments of this specification provide an evaluation method, device, and computer program product for a fluid engineering model with gradient optimization. An example problem of numerical solution is carried out using the least - squares gradient format in an extended template format, a variable weight function is developed, the weight factor is dynamically adjusted, and by optimizing the weight distribution of adjacent cells, the error propagation in the long - axis direction is suppressed, the checkerboard phenomenon is eliminated, and the numerical accuracy and robustness are improved.
[0005] The specific technical solutions of the embodiments of this specification are as follows:
[0006] On the one hand, the embodiments of this specification provide an evaluation method for a gradient-optimized fluid engineering model, and the method includes:
[0007] Perform mesh discretization on the fluid engineering model to obtain a mesh model, where the mesh model includes a plurality of meshes. Each mesh in the mesh model is respectively used as a target mesh, and the meshes adjacent to the target mesh in the mesh model are used as the adjacent meshes of the target mesh;
[0008] For each target mesh, calculate the weight factor of each adjacent mesh according to the aspect ratio of each adjacent mesh of the target mesh, and calculate the weight between the target mesh and each adjacent mesh according to the weight factor of each adjacent mesh and the geometric distance between the center of the target mesh and the center of each adjacent mesh;
[0009] Calculate the first gradient of the target mesh according to the first field quantity of the target mesh and each adjacent mesh respectively and the weight between the target mesh and each adjacent mesh;
[0010] Calculate the second field quantity of each target mesh according to the first gradient of each target mesh;
[0011] Judge whether the second field quantity of each target mesh converges;
[0012] If not converged, for each target mesh, use the second field quantity of the target mesh as the first field quantity of the target mesh, and use the second field quantity of the adjacent mesh of the target mesh as the first field quantity of the adjacent mesh, and repeat the step of calculating the first gradient of the target mesh according to the first field quantity of the target mesh and each adjacent mesh respectively and the weight between the target mesh and each adjacent mesh;
[0013] If converged, use the second field quantity of the target mesh as the target field quantity of the target mesh;
[0014] Calculate the evaluation index of the fluid engineering model according to the target field quantity of at least one mesh of the mesh model, so as to evaluate the fluid engineering model according to the evaluation index.
[0015] Further, calculating the weight factor of each adjacent mesh according to the aspect ratio of each adjacent mesh of the target mesh further includes:
[0016] Calculate the weight factor of an adjacent mesh according to the formula n = C · AR α where n represents the weight factor, C represents the proportionality constant, AR represents the aspect ratio of the adjacent mesh, and α represents the weight exponent; or,
[0017] Calculate the weight factor of an adjacent grid according to the formula n = 1 + βAR, where n represents the weight factor, β represents the linear adjustment factor, and AR represents the aspect ratio of the adjacent grid; or,
[0018] According to the formula Calculate the weight factor of an adjacent grid, where n represents the weight factor, AR represents the aspect ratio of the adjacent grid, AR low and AR high are the lower and upper threshold values of the aspect ratio.
[0019] Furthermore, the formula for calculating the weight between the target grid and each adjacent grid according to the weight factor of each adjacent grid and the geometric distance between the center of the target grid and the center of each adjacent grid is:
[0020] ;
[0021] where, ω k represents the weight of the k-th adjacent grid, and Δr fk represents the geometric distance between the center of the target grid and the center of the k-th adjacent grid.
[0022] Furthermore, calculating the first gradient of the target grid according to the first field quantity of the target grid and each adjacent grid and the weight between the target grid and each adjacent grid further includes:
[0023] Construct an error function using the least squares method Solve to obtain the first gradient of the target grid, where G c represents the error value, NB(C) represents the number of adjacent grids of the target grid C, φ Fk represents the first field quantity of the k-th adjacent grid, φ C represents the first field quantity of the target grid C, ▽φ C represents the first gradient of the target grid C, and r CFk represents the geometric vector from the center of the target grid C to the center of the k-th adjacent grid.
[0024] Furthermore, calculating the second field quantity of each target grid according to the first gradient of each target grid further includes:
[0025] For each target grid, convert the first gradient of the target grid to the face gradient on the unit surface between the target grid and each of its adjacent grids by interpolation;
[0026] Construct a discretization model for each target grid according to the face gradient of each target grid: , where faces(Vc) represents the total number of cell faces of the target mesh C, ρ f represents the fluid density on the f-th cell face, represents the fluid velocity vector on the f-th cell face, φ f represents the flux on the f-th cell face of the target mesh C obtained by interpolating the second field quantity of the target mesh, represents the area vector on the f-th cell face, Γ φ f represents the diffusion coefficient on the f-th cell face, ▽φ f represents the first gradient on the f-th cell face, Q c φ represents the source term coefficient, and V represents the volume of the target mesh C;
[0027] Convert the discretization model of each target mesh into an algebraic model to obtain an algebraic equation system composed of the second field quantities of all target meshes, where the second field quantity is the variable to be solved in the algebraic equation system;
[0028] Solve the algebraic equation system to obtain the second field quantity of each target mesh.
[0029] Further, the steps for determining whether the second field quantity of each target mesh converges include:
[0030] After solving the algebraic equation system to obtain the second field quantity of each target mesh, calculate the field quantity change rate of each target mesh respectively;
[0031] Determine whether the field quantity change rates of all target meshes are less than the threshold;
[0032] If so, the second field quantity of each target mesh converges.
[0033] Further, calculating the evaluation index of the fluid engineering model according to the target field quantity of at least one mesh of the mesh model further includes:
[0034] Perform surface integral or volume integral on the target field quantity of the specified mesh to obtain the evaluation index.
[0035] Further, the field quantity is a velocity value or a pressure value;
[0036] If the mesh is an internal mesh in the mesh model, the first field quantity of this mesh is the initial velocity value or initial pressure value inside the fluid engineering model;
[0037] If the mesh is a boundary mesh in the mesh model, the first field quantity of this mesh is the velocity boundary value or pressure boundary value at the boundary of the fluid engineering model.
[0038] On the other hand, an embodiment of this specification also provides an evaluation device for a fluid engineering model with gradient optimization. The device includes:
[0039] A mesh generation unit for generating a mesh model by meshing the fluid engineering model. The mesh model includes a plurality of meshes. Each mesh in the mesh model is used as a target mesh, and the meshes adjacent to the target mesh in the mesh model are used as the adjacent meshes of the target mesh.
[0040] A weight calculation unit for calculating a weight factor for each adjacent mesh of each target mesh according to the aspect ratio of each adjacent mesh of the target mesh, and calculating the weight between the target mesh and each adjacent mesh according to the weight factor of each adjacent mesh and the geometric distance between the center of the target mesh and the center of each adjacent mesh.
[0041] A first gradient calculation unit for calculating the first gradient of the target mesh according to the first field quantity of the target mesh and each adjacent mesh respectively and the weight between the target mesh and each adjacent mesh.
[0042] A field quantity iterative calculation unit for calculating the second field quantity of each target mesh according to the first gradient of each target mesh; determining whether the second field quantity of each target mesh converges; if not, for each target mesh, using the second field quantity of the target mesh as the first field quantity of the target mesh, and using the second field quantity of the adjacent mesh of the target mesh as the first field quantity of the adjacent mesh, and triggering the first gradient calculation unit to repeat the step of calculating the first gradient of the target mesh according to the first field quantity of the target mesh and each adjacent mesh respectively and the weight between the target mesh and each adjacent mesh; if it converges, using the second field quantity of the target mesh as the target field quantity of the target mesh.
[0043] An evaluation index calculation unit for calculating an evaluation index of the fluid engineering model according to the target field quantity of at least one mesh of the mesh model, so as to evaluate the fluid engineering model according to the evaluation index.
[0044] On the other hand, an embodiment of this specification also provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the above method is implemented.
[0045] The methods in the embodiments of this specification employ a variable weight function and set weight factors, resolving the checkerboard and numerical precision issues of the least squares extended template format when applied to high-aspect-ratio grid models. By providing a dynamic adjustment strategy based on an aspect-ratio-adaptive distance-weighted weight function, this approach offers excellent applicability for scenarios involving high-aspect-ratio grids and boundary layer effects, improving computational accuracy. The requirements of different grid models and application scenarios are also considered, along with the software's ease of use. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to more clearly illustrate the embodiments of this specification or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the embodiments of this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0047] Figure 1 It is a schematic flow chart of a method for evaluating a gradient-optimized fluid engineering model in an embodiment of this specification; Figure 2a Shown is an axonometric view of a fluid engineering model of a combustion chamber in an embodiment of this specification; Figure 2b Shown is a cross-sectional view of the fluid engineering model of the combustion chamber at Y=0 in the embodiment of this specification; Figure 2c Shown is a cross-sectional view of the fluid engineering model of the combustion chamber at X=0 in the embodiment of this specification; Figure 3a The figure shows a cross-sectional view of the hexahedral mesh model at Y=0 in the embodiment of this specification; Figure 3b Shown is a cross-sectional view of the hexahedral mesh model X=0 in the embodiment of this specification; Figure 4 Shown is a schematic diagram of a least squares gradient reconstruction unit template in an embodiment of this specification; Figure 5 Shown is a schematic diagram of a grid with a large aspect ratio in an embodiment of this specification; Figure 6 The figure shows a schematic diagram of the calculation process of the adaptive weight in the embodiment of this specification; Figure 7a and Figure 7b Schematic diagram of a method for calculating a three-dimensional aspect ratio in an embodiment of this specification; Figure 8 The figure shows a schematic diagram of a discrete grid in an embodiment of this specification; Figure 9 Shown is a schematic diagram of flux on a unit surface in an embodiment of this specification; Figure 10 The figure shows a schematic diagram of the coupling process of gradient calculation and matrix assembly in the embodiments of this specification; Figure 11 The figure shows a schematic diagram of the calculation results of field quantities in the three-dimensional combustion chamber model based on the least-squares gradient format according to multiple set weight factors in the embodiments of this specification; Figure 12 The figure shows a schematic diagram of the structure of an evaluation device for a fluid engineering model with gradient optimization in the embodiments of this specification; Figure 13 The figure shows a schematic diagram of the structure of a computer device in the embodiments of this specification; Figure 14a The figure shows the checkerboard phenomenon reflected in the velocity contour map in the embodiments of this specification; Figure 14b The figure shows the checkerboard phenomenon reflected in the time-averaged velocity contour map in the embodiments of this specification.
[0048]
Explanation of the reference numerals
[0049] 1201, grid division unit;
[0050] 1202, weight calculation unit;
[0051] 1203, first gradient calculation unit;
[0052] 1204, field quantity iterative calculation unit;
[0053] 1205, evaluation index calculation unit;
[0054] 1302, computer device;
[0055] 1304, processing device;
[0056] 1306, storage resource;
[0057] 1308, driving mechanism;
[0058] 1310, input / output module;
[0059] 1312, input device;
[0060] 1314, output device;
[0061] 1316, presentation device;
[0062] 1318, graphical user interface;
[0063] 1320, network interface;
[0064] 1322, communication link;
[0065] 1324. Communication bus. Specific implementation manner
[0066] The following will clearly and completely describe the technical solutions in the embodiments of this specification with reference to the accompanying drawings in the embodiments of this specification. Obviously, the described embodiments are only a part of the embodiments of this specification, rather than all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the scope of protection of the embodiments of this specification.
[0067] It should be noted that the terms "first", "second", etc. in the description and claims of the embodiments of this specification and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily need to be used to describe a specific order or sequence. It should be understood that such used data can be interchanged under appropriate circumstances so that the embodiments of the embodiments of this specification described here can be implemented in an order other than those illustrated or described here. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, device, product or equipment including a series of steps or units does not necessarily have to be limited to those clearly listed steps or units, but may include other steps or units not clearly listed or inherent to these processes, methods, products or equipment.
[0068] It should be noted that in the technical solutions of the embodiments of this specification, the acquisition, storage, use, processing, etc. of data all comply with the relevant regulations of national laws and regulations.
[0069] It should be noted that in the embodiments of this specification, some industry-existing solutions such as certain software, components, models, etc. may be mentioned. They should be regarded as exemplary. The purpose is only to illustrate the feasibility in the implementation of the technical solutions of this application, but it does not mean that the applicant has already or necessarily used this solution.
[0070] Aiming at the problems existing in the prior art, the embodiments of this specification provide an evaluation method for a gradient-optimized fluid engineering model, which uses a least-squares gradient format in an extended template format to solve numerical example problems, develops a variable weight function, dynamically adjusts the weight factor, suppresses the error propagation in the long-axis direction by optimizing the weight distribution of adjacent units, eliminates the checkerboard phenomenon, and improves the numerical accuracy and robustness. Figure 1The figure shows a flowchart of an evaluation method for a gradient-optimized fluid engineering model according to an embodiment of the present specification. In this figure, the processes of adaptive weight calculation, iterative calculation of field quantities based on the weights calculated adaptively, and calculation of evaluation indicators based on the converged field quantities are described. The order of steps listed in the embodiment is only one way among the execution orders of numerous steps and does not represent the only execution order. When the actual system or device product executes, it can be executed sequentially or in parallel according to the method order shown in the embodiment or the drawings. Specifically, as Figure 1 shown, the method can be executed by a computer, and the method may include:
[0071] Step 101: Perform mesh division on the fluid engineering model to obtain a mesh model. The mesh model includes a plurality of meshes. Each mesh in the mesh model is respectively used as a target mesh, and the meshes adjacent to the target mesh in the mesh model are used as the adjacent meshes of the target mesh;
[0072] Step 102: For each target mesh, calculate the weight factor of each adjacent mesh according to the aspect ratio of each adjacent mesh of the target mesh, and calculate the weight between the target mesh and each adjacent mesh according to the weight factor of each adjacent mesh and the geometric distance between the center of the target mesh and the center of each adjacent mesh;
[0073] Step 103: Calculate the first gradient of the target mesh according to the first field quantity of the target mesh and each adjacent mesh respectively and the weight between the target mesh and each adjacent mesh;
[0074] Step 104: Calculate the second field quantity of each target mesh according to the first gradient of each target mesh;
[0075] Step 105: Determine whether the second field quantity of each target mesh converges;
[0076] Step 1051: If not converged, for each target mesh, use the second field quantity of the target mesh as the first field quantity of the target mesh, and use the second field quantity of the adjacent mesh of the target mesh as the first field quantity of the adjacent mesh, and repeat the step of calculating the first gradient of the target mesh according to the first field quantity of the target mesh and each adjacent mesh respectively and the weight between the target mesh and each adjacent mesh;
[0077] Step 1052: If converged, use the second field quantity of the target mesh as the target field quantity of the target mesh;
[0078] Step 106: Calculate the evaluation index of the fluid engineering model according to the target field quantity of at least one mesh of the mesh model, so as to evaluate the fluid engineering model according to the evaluation index.
[0079] Through the method of the embodiments of this specification, by adopting a variable weight function and setting a weight factor, the checkerboard and numerical accuracy problems in the application of the least squares extended template format to a large aspect ratio grid model are solved. By providing a strategy method of dynamically adjusting based on an aspect ratio adaptive distance weighted weight function, it has good applicability to scenarios of large aspect ratio grids and boundary layer effects, and can improve the calculation accuracy. At the same time, the requirements of different grid models and application scenarios, as well as the ease of use of the software, are also considered.
[0080] In the embodiments of this specification, the fluid engineering model can be a combustion chamber model designed by developers. Engineers construct multiple conceptual models according to the actual working condition requirements and existing design defects. With the help of CFD software, different required working conditions (design working conditions, experimental working conditions, etc.) and different physical models are input for these models for simulation analysis. By monitoring the residuals and paying attention to characteristic parameters (such as inlet and outlet pressure differences, outlet flow rates, etc.), the optimization direction is determined through parameter sensitivity analysis, and a multi-objective evaluation system is established for scheme optimization. The optimal design model is evaluated from a large number of simulation results for product prototype production and experimental verification, and finally promoted for application. A complete closed-loop from virtual simulation to physical verification is achieved, which can shorten the development cycle by more than 40% compared with the traditional trial-and-error method, and at the same time significantly reduce the R & D cost through digital means.
[0081] For the physical problems of combustion chamber flow, its mathematical method can be described and the control equations can be established through the mass and momentum equations and the derived k-omega-SST turbulence equation.
[0082] According to the CFD method, the process of numerically solving the above equations is as follows:
[0083] (1) Create a fluid engineering model
[0084] According to the design size requirements of actual industrial products, the isometric view of the fluid engineering model of the combustion chamber is as Figure 2a , this fluid engineering model includes large size span characteristics, and at the same time has obvious large-channel and small-channel structures. Its front view (Y = 0) is as Figure 2b shown, and the cross-sectional view (X = 0) is as Figure 2c shown.
[0085] Figure 2a The boundary conditions shown in Table 1 are shown in
[0086] Table 1 Boundary Conditions
[0087]
[0088] (2) Create a grid model
[0089] Using grid drawing software, the above fluid engineering model was meshed, and a hexahedral grid model was drawn using a structured grid discretization method, ensuring high-precision numerical calculations (as Figure 3a and Figure 3b shown, where Figure 3a the figure shows the cross-sectional view of the hexahedral grid model at Y = 0, Figure 3b and the figure shows the cross-sectional view of the hexahedral grid model at X = 0). The grid model contains discrete grid information, including grid cell coordinate information (node coordinates), the adjacency relationship of the grid, and logical index information.
[0090] (3)Physical model
[0091] According to the working conditions required by the designer, initial conditions were set, and boundary conditions as shown in Table 1 were set, where the corresponding positions of the boundaries are as Figure 2a shown. The central difference method was used to process the convection terms of each equation, and the least squares gradient format was used to process the gradient terms; the simple algorithm was used to handle the pressure-velocity coupling, and the algebraic equations were solved iteratively until the convergence criterion was met (the residuals were small enough and the key physical quantities were stable). At this time, the solution vector of the physical problem, that is, the target field quantity of each grid, was obtained and stored. In the embodiments of this specification, the field quantities include but are not limited to velocity values and pressure values.
[0092] (4)Result analysis
[0093] After the above calculations converge, the designer uses post-processing software for result visualization analysis, which specifically includes:
[0094] 1) Flow field visualization analysis
[0095] Determine the generated velocity / pressure field contour map at the position of the characteristic section Plane (such as X = 1) determined by the design value, and identify features such as flow separation and recirculation zones; draw streamline diagrams to analyze the three-dimensional flow structure; draw vorticity isosurfaces to display the swirling structure in the combustion chamber, etc.;
[0096] 2) Extraction of characteristic data
[0097] The field quantity values (velocity values, pressure values, etc.) after the calculation converges are stored. The designer can extract key parameters, such as velocity components (u, v, w) and their gradients, static pressure / total pressure distribution, turbulence intensity field, etc., by determining the positions of the characteristic section Plane: the symmetry plane of y = 0, the characteristic line Line: L1 ((0, 2, 1), (0, 4, 1)), and the coordinate X: (0, 2, 1), etc.;
[0098] 3) Quantification calculation of engineering parameters
[0099] The designer can calculate relevant statistical values (such as the pressure difference before and after, the inlet and outlet flow rates, the mass flow rate, etc.), and the calculation formulas are shown in Table 2. Further, engineering parameters can be calculated according to the designer's functional requirements.
[0100] Table 2 Calculation Formulas for Statistical Values
[0101]
[0102] In Table 2, φ represents the target field quantity of the grid for matrix solution (such as scalar pressure, vector shear stress, etc.). represents the mass flow rate, ρ represents the fluid density. represents the fluid velocity vector, S represents the area, I represents the surface integral of a physical quantity, V represents the volume integral of a physical quantity. represents the average value of the surface integral of a physical quantity. represents the average value of the volume integral of a physical quantity, μ represents the fluid viscosity coefficient, Re represents the Reynolds number, Ma represents the Mach number, Δ P represents the pressure difference, P1 represents the pressure at the specified position 1, and P2 represents the pressure at the specified position 2.
[0103] The above parameters constitute a complete index system for the performance evaluation of the combustion chamber. The quantitative results obtained through CFD post-processing can support the objectification and refinement of design decisions. (Modern combustion chamber design usually requires the prediction error of key parameters to be controlled within: mass flow rate ±1.5%, pressure difference ±3%).
[0104] The above simulation results help the designer to conduct data analysis, including the influence of specific models and different working conditions on the target parameters; whether the model meets the design requirements under the required working conditions; the advantages and disadvantages of different design models and the optimization direction, etc.
[0105] However, the achievement of the above expected results depends on the accuracy of the CFD numerical calculation results. The accuracy and robustness of the solver numerical algorithm will directly affect the accuracy.
[0106] For the combustion chamber model, due to its characteristics of large size span and the coexistence of large and small channels, when using structured grid division, the grid model has obvious characteristics of large aspect ratio. During numerical solution, accuracy problems will occur during the gradient reconstruction process due to the grid characteristics. When solving the algebraic equations, through continuous iteration, the accuracy error gradually accumulates, which is manifested as the checkerboard phenomenon described above in the contour map. The calculation cannot converge, resulting in inaccurate calculation results and cannot be used for the performance evaluation of the combustion chamber.
[0107] In the embodiments of this specification, each grid is used as a target grid, and the grids adjacent to the target grid are used as adjacent grids. In the embodiments of this specification, the adjacent grids of the target grid can be determined by the coplanar template LSQ and the copoint template LSQ_EXTENDED. For example, Figure 4 as shown, the middle white part is the target grid. Under the coplanar template, the black grid adjacent to the white target grid is the adjacent grid. Under the copoint template, the directly adjacent black grid and the surrounding gray grids (i.e., Figure 4 all grids except the target grid in
[0108] are adjacent grids. The coplanar template unit is the simplest and most direct. Its calculation accuracy depends on good grid quality and is applicable to areas where the geometric relationship between adjacent units is relatively simple. When the grid quality is poor, the copoint template with more units is introduced to obtain more flow field information and improve the gradient reconstruction accuracy. This is a common method in numerical solutions. Given the template unit, the weight function is used to give the weights of adjacent template units, which affects the specific form and characteristics of the interpolation coefficient matrix calculated by the least squares method.
[0109] In actual engineering applications, for example, in areas with boundary layer effects, near the wall surface (such as wings, turbine blades, etc.), the flow velocity gradient is extremely large. Dense grids need to be arranged in the direction perpendicular to the wall surface to resolve the velocity profile, while the grid density can be appropriately relaxed along the flow direction. In flows with long pipelines or narrow channels (such as combustion chambers), the flow mainly develops axially, and the radial flow changes little. Longer grid units are used axially. When dealing with such three-dimensional problems with grid models having a large aspect ratio (such as Figure 5 ), it is found that when using LSQ_EXTENDED to solve complex problems, there will be a decrease in accuracy and problems such as the checkerboard phenomenon shown in Figure 14a and Figure 14b and the calculation cannot converge.
[0110] In the CFD calculation, for scenarios that need to consider local fine features, especially those involving high Reynolds number flows, thin-walled structures, and drastic changes in velocity gradients, grid models with a large aspect ratio are inevitable (such as Figure 3a and Figure 3b). For such grid models, according to their geometric properties, when using the LSQ_EXTENDED extended template gradient format, the distance from the target cell to the cells that only share points is greater than that to the cells that only share planes. Specifically, in terms of the weight ratio in the local area, it is reflected in the numerical solution process through the weight function. The specific manifestations of its role include: (1) distributing the influence of adjacent cells; (2) improving the error caused by the large differences in the shape and size of cells and smoothing the numerical error; (3) distributing weights to suppress numerical oscillations and checkerboard phenomena in scenarios such as grids with large aspect ratios and boundary layer flows. Once the weight function is set inappropriately, it will directly affect the suppression of numerical oscillations and numerical stability.
[0111] For the checkerboard phenomenon in the actual engineering calculation examples of the method in this embodiment, a weight function is developed to be applicable to the above complex application scenarios.
[0112] The self-developed software develops a variable weight format. The formula for calculating the weight in the embodiments of this specification is ; where ω k represents the weight of the k-th adjacent grid, Δr fk represents the geometric distance between the center of the target grid and the center of the k-th adjacent grid, and n represents the weight factor. The least squares gradient format is applied to the entire field, including internal cells and boundary cells, and for the above three-dimensional combustion chamber model calculation example with an aspect ratio of 1.3 - 23, a tuning test is carried out. The results are as Figure 11 shown. Now, when n = 2 - 4, the checkerboard phenomenon can be significantly improved.
[0113] During the refinement test, it is found that there will be a checkerboard phenomenon when n is set too large or too small; setting n = 2.5 is a relatively reasonable parameter, and there is no checkerboard phenomenon in the calculation results, and the time-averaged velocity results are symmetric.
[0114] Therefore, when using the LSQ_EXTENDED gradient format for calculation examples of grid models with large aspect ratios, by re - considering the weight ratio of adjacent cells, problems such as Figure 14a and Figure 14b shown checkerboard problems can be solved. So the choice of the weight function directly affects the suppression of numerical oscillations and numerical stability, and is the main cause of the checkerboard problem.
[0115] In practical applications, the value of the weight factor n is usually manually tuned through experience or numerical experiments. However, the process of gradually adjusting to determine the optimal n value will incur additional costs. For users who are not familiar with the algorithm details, it increases the application cost in terms of how to set it and what value to set. Different values may need to be set for different mesh models, resulting in an exploration period and lacking an adaptive mechanism, making it difficult to adapt to complex three-dimensional scenarios. Multiple trials will also significantly increase the workload of the staff. Therefore, the embodiments of this specification have also improved the weight calculation and proposed an adaptive weight method.
[0116] As Figure 6 shown, the improved weight calculation steps in the embodiments of this specification include:
[0117] Step 601: For each target mesh, calculate the weight factor of each adjacent mesh according to the aspect ratio of each adjacent mesh of the target mesh.
[0118] In this step, three methods for calculating the weight factor are provided:
[0119] (1) Calculate the weight factor of an adjacent mesh according to the formula n = C · AR α where n represents the weight factor; C represents the proportionality constant, which is used to control the overall scale of the weight and ensure that the weight function generates a suitable weight value range in numerical calculations. This parameter is usually adjusted according to numerical experiments; AR represents the aspect ratio of the adjacent mesh; α represents the weight exponent, which determines the impact of the aspect ratio change on the weight adjustment. A larger α will make the weight more sensitive to the change in the aspect ratio.
[0120] (2) Calculate the weight factor of an adjacent mesh according to the formula n = 1 + βAR, where n represents the weight factor and β represents the linear adjustment factor, which is mainly used to quickly attenuate the influence of distant elements when the aspect ratio is large. It can be used as a basic adaptive model to automatically adjust the weight under different aspect ratios.
[0121] (3) Calculate the weight factor of an adjacent mesh according to the formula where n represents the weight factor, AR represents the aspect ratio of the adjacent mesh, AR low and AR high are the lower and upper threshold values of the aspect ratio. In this way, the weight factor can be adaptively adjusted according to the specific aspect ratio to control the influence of distant elements, which is a common method for dealing with highly distorted meshes.
[0122] The adaptive weight method requires a module for calculating the aspect ratio;
[0123] The aspect ratio is only related to geometry and is calculated through the grid geometry parameters. For a two-dimensional structure, the aspect ratio can be directly determined by the ratio of the long side to the short side of the grid. However, for a three-dimensional structure, the grid is complex, and two calculation methods are provided:
[0124] As Figure 7a shown, create the border of the adjacent grid to obtain the largest area (Largest Box Area) and the smallest area (Smallest Box Area) in the border, and then calculate the ratio of the largest area to the smallest area to obtain the aspect ratio;
[0125] As Figure 7b shown, when meshing the grid, there will be the node coordinates of each grid. Use this information to calculate the center coordinates of the grid, and then obtain the longest distance (Largest Distance) and the shortest distance (Smallest Distance) from the center point of the grid to the grid edge. Then calculate the ratio of the longest distance to the shortest distance to obtain the aspect ratio.
[0126] Step 602: Calculate the weight between the target grid and each adjacent grid according to the weight factor of each adjacent grid and the geometric distance between the center of the target grid and the center of each adjacent grid;
[0127] In this step, the formula for calculating the weight is ; where ω k represents the weight of the k-th adjacent grid, and Δr fk represents the geometric distance between the center of the target grid and the center of the k-th adjacent grid.
[0128] In the embodiments of this specification, after obtaining the weight between the target grid and each of its adjacent grids, the first gradient of the target grid can be calculated according to the first field quantity of the target grid and each adjacent grid and the weight between the target grid and each adjacent grid.
[0129] In the embodiments of this specification, if the grid is an internal grid in the grid model, the first field quantity of this grid is the initial velocity value or the initial pressure value inside the fluid engineering model; if the grid is a boundary grid in the grid model, the first field quantity of this grid is the velocity boundary value or the pressure boundary value at the boundary of the fluid engineering model.
[0130] Calculating the first gradient of the target grid according to the first field quantity of the target grid and each adjacent grid and the weight between the target grid and each adjacent grid further includes:
[0131] Construct an error function using the least squares method for solution to obtain the first gradient of the target grid, where G cDenote the error value, NB(C) denote the number of adjacent grids of the target grid C, φ F Denote the first field quantity of the k-th adjacent grid, φ C Denote the first field quantity of the target grid C, ▽φ C Denote the first gradient of the target grid C, r CFk Denote the geometric vector from the center of the target grid C to the center of the k-th adjacent grid.
[0132] Based on the error function, by minimizing the error value G c , that is, G c The partial derivative with respect to the variable to be solved (the first gradient ▽φ C ) is 0, that is , to the linear equation system ▽φ C ·C c = R c . Among them, the coefficient matrix , d CFk = r CFk ·i k Denote the projection in the direction of the line connecting the centers of the target grid C and the adjacent grid F, r CFk Denote the vector from the center of the target grid to the adjacent grid k, i k Used to identify the direction, d CFk T Is the transpose of d CFk , the right-hand side , for each cell C, solve the 3×3 linear system, that is, obtain the first gradient ▽φ C .
[0133] After obtaining the first gradients of all grids, calculate the second field quantity of each target grid according to the first gradient of each target grid.
[0134] (1)Mathematical modeling of physical problems
[0135] In the embodiments of this specification, for actual engineering problems, first establish a physical model including geometric features, and establish a control equation set based on the three major conservation laws of fluid mechanics (mass conservation, momentum conservation, and energy conservation), including:
[0136] Continuity equation: ;
[0137] Momentum equation: ;
[0138] Energy equation: ;
[0139] Among them, t represents time, ρ represents fluid density, Denote the fluid velocity vector, p represents pressure, μ represents fluid viscosity coefficient, fb represents the body force, C p represents the specific heat capacity, T represents the temperature, k is the thermal conductivity, φ represents the variable to be solved (such as velocity, temperature, etc.), ▽ represents the gradient operator, describing the spatial variation rate of physical quantities, and ▽φ represents the gradient of the variable φ to be solved.
[0140] Rewriting the above equation, the general conservation equation of the variable φ to be solved is as follows:
[0141] ;
[0142] where, Γ φ represents the diffusion coefficient, Q b represents the source term, represents the velocity vector. This equation represents: transient (the first term on the left), convective term (the second term on the left): the flux of φ carried by the fluid, diffusive term (the first term on the right): the flux of φ caused by molecular transport, source term (the second term on the right): generation or dissipation within the cell. According to specific engineering problems, additional models need to be introduced: such as turbulence models: RANS (k-ε, k-ω, SST, etc.), LES, DES, etc., heat transfer models: energy equation, radiation model, etc.
[0143] (2) Discretization of the computational domain
[0144] Mesh generation is performed on the geometric model, dividing the continuous physical space into a large number of tiny and interconnected control volumes (mesh cells). The mesh quality (orthogonality, aspect ratio, skewness, etc.) directly affects the calculation accuracy and efficiency. Common mesh types include structured meshes, unstructured meshes, hybrid meshes, adaptive meshes, etc. As Figure 8 shown, C represents the target mesh, F represents the adjacent mesh, and f represents the cell face between the target mesh and the adjacent mesh.
[0145] (3) Discretization and solution of the equation
[0146] The core of CFD lies in discretizing the continuous fluid control equations (partial differential equations, PDEs) into algebraic equation systems that can be solved on a computer. This part details the discretization process of the Finite Volume Method (FVM), including semi-discretization, construction of algebraic equations, treatment of boundary conditions, and solution of linear systems:
[0147] 1) Discretization methods for control equations
[0148] The core idea of the finite volume method is to satisfy the conservation law on discrete mesh cells. Its discretization process consists of two key steps:
[0149] Semi-discretization: transforming the integral form of the control equation into a discrete algebraic relation on the mesh cell;
[0150] Algebraic equation construction: The physical quantities on the cell faces are approximated using a numerical format, and finally a system of linear equations is formed;
[0151] 2) Semi-discretization process
[0152] For steady-state problems, the governing equations are integrated over each cell, and the volume integral expression on the target grid C is:
[0153] ;
[0154] Using Gauss's divergence theorem, the volume integrals of the convective term and the diffusion term are replaced by surface integrals, and the integral form of the general conservation equation for the variable φ is:
[0155] ;
[0156] Vc represents the volume of the control volume C (i.e., the target grid C), The area vector of the face that constitutes the control volume C (the direction is from the cell to the adjacent cell), Represents the surface integral of Vc. In the finite volume method, the surface integral is numerically approximated as the sum of the fluxes at the face centers (replacing the surface integral of the control volume C with the sum of the integrals over the faces of the cell), realizing the conversion of the volume integral to the surface fluxes of the conserved quantities on the cell faces, as Figure 9 shown.
[0157] Using Gauss's quadrature rule, the equation can be discretized as:
[0158] ;
[0159] ;
[0160] where, faces(Vc) represents the total number of cell faces of the target grid C, ρ f represents the fluid density on the f-th cell face, represents the fluid velocity vector on the f-th cell face, φ f represents converting the second field quantity of the target grid C to the flux on the f-th cell face of the target grid through interpolation, represents the area vector on the f-th cell face, Γ φ f represents the diffusion coefficient on the f-th cell face, ▽φ f represents the first gradient on the f-th cell face, Q c φ represents the source term coefficient, and V represents the volume of the target grid C.
[0161] 3) Construction of algebraic equations
[0162] To transform the discretized equation into an algebraic equation, it is necessary to calculate the face flux and volume flux of the current cell by means of the variable values at the centers of adjacent cells.
[0163] The face flux can be decomposed into linear and non-linear parts. The linear part is expressed as a function of the variable values (φ C and φ F ) at the center points on both sides of the cell face. The non-linear part is the part that cannot be expressed as a function of φ C and φ F .
[0164] The face flux is written as:
[0165] ;
[0166] fluxφ f represents the total flux through the cell face f. fluxC f and fluxF f and fluxV f depend on the discretized term and its discretization scheme.
[0167] The volume flux is written as:
[0168] ;
[0169] Substitute the face flux and volume flux into the discretized equation and perform this operation for all cell faces to obtain:
[0170] ;
[0171] To calculate the total face flux and volume flux, numerical approximation of each term is required:
[0172] a) Convection term:
[0173] The calculation of f depends on the interpolation of φ at the cell face. Common schemes include
[0174] first-order upwind ;
[0175] second-order central differencing ;
[0176] For high-order schemes (such as second-order upwind, QUICK, etc.), it is necessary to use the gradient to reconstruct the value of φ on the cell face f , , where is the vector from the target grid center C to the face center f.
[0177] b) Diffusion term:
[0178] The calculation of depends on the approximation of the gradient ▽φ. It is necessary to know the gradient on the face f. By applying the interpolation format, the first gradient of the target grid is converted into the face gradient on the cell face between the target grid and each of its adjacent grids.
[0179] c) Linearization of the source term:
[0180] The source term Q φ is usually linearized as Q φ = Q con + Q C φ C ;
[0181] Q con The constant part, Q C is the coefficient related to φ C For source terms that depend on the gradient, such as Q φ = Q(▽φ), gradient calculation is also required when discretizing the source term, where Q con and Q C can depend on the gradient (for example, in turbulence models).
[0182] When different discretization methods are adopted for the above discrete terms, the application of the gradient is involved, that is, the gradient is calculated based on the weights calculated by the adaptive weight method shown in this specification Figure 6 shown.
[0183] After integrating all terms, the discrete results of each term are substituted into the semi-discrete equation, and the discrete equation can be further arranged into a linear form with respect to φ C and the adjacent cell φ F ;
[0184] ;
[0185] where:
[0186] ;
[0187] ;
[0188] ;
[0189] φ C and φ F are the variables to be solved, a C is the central coefficient (including convection, diffusion, time derivative, and source term coefficients), a F is the neighbor coefficient (usually contributed by the diffusion term or convection term), b Cis the constant part of the source term or the historical value. Thus, the semi-discrete integral equation is transformed into an algebraic system of equations that can be numerically solved.
[0190] 4) Assembly of algebraic equations
[0191] For the entire grid model, all grid cells have similar expressions, resulting in a set of algebraic equations. Each algebraic equation relates the current cell variable values to the adjacent cell variable values. Assembling these algebraic equations gives the global matrix and global vector:
[0192] A[φ]=b;
[0193] A is the coefficient matrix of the variable to be solved (sparse, usually asymmetric. The coefficient filling matrix A of the target grid C is in the diagonal position A CC , and the coefficients of its adjacent grid F are filled in the non-diagonal positions of the matrix A, A CF ). φ is the solution vector to be solved, b is the right-hand side term, including all sources, constants, boundary conditions, etc. Among them, the boundary conditions directly affect the construction of the discrete equations. Common types include Dirichlet boundary (given the φ value, directly substituted into the boundary node equation), Neumann boundary (given the flux of φ, correcting the diffusion term or convection term of the boundary surface through the flux), and mixed boundary (Robin condition)
[0194] The following schematic matrix is given, and the coefficient matrix is of size [N × N]:
[0195] ;
[0196] 5) Solving the linear system
[0197] Since A is a large sparse matrix, iterative methods are usually used for solving (iterative methods use the prediction-correction steps to repeatedly solve the discrete equations to gradually improve the estimated solution), such as Gauss-Seidel: simple but slow to converge, conjugate gradient method (CG): applicable to symmetric positive definite matrices, GMRES: applicable to non-symmetric matrices, algebraic multigrid (AMG): an efficient method to accelerate convergence.
[0198] Taking Gauss-Seidel as an example, the solution process is described as follows. (1) Guess the discrete values of φ on all grid cells in the computational domain. (2) Visit each grid cell in turn and update the φ value using the following formula:
[0199] ;
[0200] φ CThe update of the value requires the use of the φ values on its adjacent cells, and these values are assumed to be equal to those of the previous iteration step, so the cells that have been traversed have the updated φ values, while the cells that have not been traversed store the old values. (3) Traverse the entire computational domain until all grid cells are reached, thus completing one iteration step. (4) Check whether the appropriate convergence criterion is met (whether the rate of change of the field quantities of all target grids is less than the threshold). If satisfied, stop the calculation; otherwise, go back to (2) and repeat the calculation.
[0201] After the solution is obtained, the numerical solution of the solution vector φ is obtained and stored for subsequent flow field visualization and data analysis.
[0202] After obtaining the target field quantity φ of all grids, the area integral or volume integral of the target field quantity of the specified grid can be performed to obtain the evaluation index. The exemplary process of calculating the evaluation index can be shown in Table 2 and will not be elaborated here.
[0203] The solution vector obtained from the above numerical simulation is transformed into intuitive graphics of massive data through visualization techniques in the post-processing stage to reveal the laws of fluid flow, heat transfer, and mass transfer. It mainly includes (1) contour plot: showing the spatial distribution of scalars such as pressure and temperature, and quickly identifying high / low value areas through color gradients; (2) vector plot / streamline plot: using arrows or curves to characterize the velocity direction and flow path, and revealing features such as vortices and separated flows; (3) isosurface: marking specific physical quantity values (such as temperature threshold) in three-dimensional space to assist in analyzing structural boundaries or critical states; (4) animation: dynamically presenting the transient evolution of unsteady processes (such as vortex shedding and combustion fluctuations); (5) quantitative analysis: extracting key indicators such as drag coefficient, efficiency, and pressure difference, and generating reports to support engineering decisions or optimize designs.
[0204] Simplify complex data into understandable visual information, taking into account both qualitative observation and quantitative evaluation, so as to connect the simulation results with practical applications and achieve the role of the above numerical simulation.
[0205] Numerical discretization is the core of the entire CFD simulation, and the correctness of the discretization method determines the reliability of providing data support.
[0206] The gradient calculated based on the adaptive weight in the embodiments of this specification is a key step in numerical discretization and the core link in constructing matrix A and vector b. It directly affects the discretization accuracy of the diffusion term, high-order convection term, and source term, and indirectly affects the calculation of coefficients a C 、a F and b C , and determines the accuracy of the matrix coefficients. Furthermore, it determines the solution quality of the final algebraic equation. The influence of the gradient on the matrix coefficients is specifically manifested as follows:
[0207] (1)Calculation position of gradient ▽φ
[0208] The gradients need to be calculated at two types of locations, as shown in Table 3:
[0209] Table 3 Computational Locations of Gradients in CFD
[0210]
[0211] (2) The coupling process of gradient calculation and matrix assembly is as Figure 10 shown.
[0212] For the computational modules involved in the weight function, the implementation methods are described below:
[0213] The aspect-ratio adaptive gradient reconstruction method aims to adapt to such highly stretched grids by adjusting weights or computational templates, reduce errors, and improve the computational accuracy.
[0214] Such embodiments provide function interfaces for calculating the aspect ratio computeAR and reducing the aspect ratio reduceAR based on the aspect ratio AR; inside the function, by obtaining the grid geometric information, using the above-mentioned aspect ratio calculation method of Scheme II, calculate the AR values of all cells, reduce and calculate the maximum and minimum aspect ratios of the user's grid model, and store them; for quick access during weight factor calculation.
[0215] Weight factor calculation:
[0216] For two-dimensional laminar flow or heat conduction problems, typical empirical values are: C = 1.0, α = 0.5 - 1.0, β = 0.5 - 1.0;
[0217] The change of this weight function is relatively gentle and is suitable for grids with small aspect ratios.
[0218] For boundary layer flow or highly stretched grids, in order to effectively handle large aspect ratio grids, larger α and β are usually adopted, and typical values are: C = 1.0, α = 0.5 - 2.0, β = 1.0 - 2.0;
[0219] This setting can quickly reduce the influence of far-away cells and enhance the contribution of neighboring cells to gradient reconstruction.
[0220] In addition, in complex three-dimensional problems or scenarios with large grid distortions, an adaptive adjustment algorithm can be adopted to automatically optimize the values of α, β, and C. The adaptive formula is usually designed as:
[0221] ;
[0222] where: α0 and β0 are initial values, usually taking α0 = 1.0 and β0 = 1.0; AR ref is the reference aspect ratio; p and q are adjustment coefficients, and their values are usually 0.5 - 2.0.
[0223] The aspect-ratio-based adaptivity can effectively reduce the error propagation in the long-axis direction, with a simple algorithm and being suitable for numerical implementation of large-scale three-dimensional meshes.
[0224] Based on the same inventive concept, an embodiment of this specification also provides an evaluation device for a fluid engineering model with gradient optimization, as Figure 12 shown, including:
[0225] A mesh generation unit 1201, configured to perform mesh generation on the fluid engineering model to obtain a mesh model, where the mesh model includes a plurality of meshes, each mesh in the mesh model is respectively used as a target mesh, and the meshes adjacent to the target mesh in the mesh model are used as the adjacent meshes of the target mesh;
[0226] A weight calculation unit 1202, configured to calculate a weight factor for each adjacent mesh according to the aspect ratio of each adjacent mesh of each target mesh, and calculate the weight between the target mesh and each adjacent mesh according to the weight factor of each adjacent mesh and the geometric distance between the center of the target mesh and the center of each adjacent mesh;
[0227] A first gradient calculation unit 1203, configured to calculate a first gradient of the target mesh according to the first field quantity of the target mesh and each adjacent mesh respectively and the weight between the target mesh and each adjacent mesh;
[0228] A field quantity iterative calculation unit 1204, configured to calculate a second field quantity of each target mesh according to the first gradient of each target mesh; determine whether the second field quantity of each target mesh converges; if not, for each target mesh, use the second field quantity of the target mesh as the first field quantity of the target mesh, and use the second field quantity of the adjacent mesh of the target mesh as the first field quantity of the adjacent mesh, and trigger the first gradient calculation unit to repeat the step of calculating the first gradient of the target mesh according to the first field quantity of the target mesh and each adjacent mesh respectively and the weight between the target mesh and each adjacent mesh; if it converges, use the second field quantity of the target mesh as the target field quantity of the target mesh;
[0229] An evaluation index calculation unit 1205, configured to calculate an evaluation index of the fluid engineering model according to the target field quantity of at least one mesh of the mesh model, so as to evaluate the fluid engineering model according to the evaluation index.
[0230] The beneficial effects obtained by the above device are the same as those obtained by the above method, and the embodiments of this specification will not elaborate.
[0231] As Figure 13The following is a schematic structural diagram of a computer device according to an embodiment of this specification. The system in the embodiment of this specification may be the computer device in this embodiment, which executes the method of the present invention. The computer device 1302 may include one or more processing devices 1304, such as one or more central processing units (CPUs), and each processing unit may implement one or more hardware threads. The computer device 1302 may also include any storage resource 1306 for storing any kind of information such as code, settings, data, etc. Non-limiting examples include any combination of any type of RAM, any type of ROM, flash memory devices, hard disks, optical discs, etc. More generally, any storage resource may store information using any technology. Further, any storage resource may provide volatile or non-volatile retention of information. Further, any storage resource may represent a fixed or removable component of the computer device 1302. In one case, when the processing device 1304 executes the associated instructions stored in any storage resource or combination of storage resources, the computer device 1302 may perform any operation of the associated instructions. The computer device 1302 also includes one or more drive mechanisms 1308 for interacting with any storage resource, such as a hard disk drive mechanism, an optical disc drive mechanism, etc.
[0232] The computer device 1302 may also include an input / output module 1310 (I / O) for receiving various inputs (via the input device 1312) and for providing various outputs (via the output device 1314). A specific output mechanism may include a presentation device 1316 and an associated graphical user interface 1318. In other embodiments, the input / output module 1310 (I / O), the input device 1312, and the output device 1314 may not be included, and it may only be a computer device in a network. The computer device 1302 may also include one or more network interfaces 1320 for exchanging data with other devices via one or more communication links 1322. One or more communication buses 1324 couple the components described above together.
[0233] The communication link 1322 may be implemented in any way, for example, through a local area network, a wide area network (e.g., the Internet), a point-to-point connection, etc., or any combination thereof. The communication link 1322 may include any combination of hardwired links, wireless links, routers, gateway functions, name servers, etc. governed by any protocol or combination of protocols.
[0234] The embodiment of this specification also provides a computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, the above method is implemented.
[0235] The embodiments of this specification also provide a computer-readable instruction. When a processor executes the instruction, the program therein causes the processor to execute the above method.
[0236] It should be understood that in various embodiments of the embodiments of this specification, the magnitudes of the sequence numbers of the above processes do not mean the order of execution. The order of execution of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of this specification.
[0237] It should also be understood that in the embodiments of this specification, the term "and / or" is only a description of the association relationship of associated objects, indicating that three relationships can exist. For example, A and / or B can represent three situations: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " in the embodiments of this specification generally represents an "or" relationship between the associated objects before and after.
[0238] Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in combination with the embodiments disclosed in the embodiments of this specification can be implemented by electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described according to functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the embodiments of this specification.
[0239] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the systems, devices, and units described above can refer to the corresponding processes in the foregoing method embodiments, and will not be elaborated herein.
[0240] In several embodiments provided by the embodiments of this specification, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there can be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed couplings, direct couplings, or communication connections to each other can be indirect couplings or communication connections through some interfaces, devices, or units, and can also be electrical, mechanical, or other forms of connection.
[0241] The unit described as a separation component may or may not be physically separated. The component shown as a unit may or may not be a physical unit, that is, it may be located in one place or distributed over multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiments of this specification.
[0242] In addition, in each of the embodiments of this specification, each functional unit may be integrated into a processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The above integrated units can be implemented in the form of hardware or in the form of software functional units.
[0243] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the embodiments of this specification, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the embodiments of this specification. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical discs that can store program codes.
[0244] In the embodiments of this specification, specific embodiments are used to elaborate on the principles and implementation manners of the embodiments of this specification. The descriptions of the above embodiments are only used to help understand the methods and their core ideas of the embodiments of this specification; at the same time, for those of ordinary skill in the art, according to the ideas of the embodiments of this specification, there will be changes in the specific implementation manners and application scopes. In summary, the content of this specification should not be construed as a limitation on the embodiments of this specification.
Claims
1. An evaluation method for a gradient-optimized fluid engineering model, characterized in that, The method includes: Performing mesh division on a fluid engineering model to obtain a mesh model, where the mesh model includes a plurality of meshes, taking each mesh in the mesh model as a target mesh, and taking the meshes adjacent to the target mesh in the mesh model as the adjacent meshes of the target mesh; For each target mesh, calculating the weight factor of each adjacent mesh according to the aspect ratio of each adjacent mesh of the target mesh, and calculating the weight between the target mesh and each adjacent mesh according to the weight factor of each adjacent mesh and the geometric distance between the center of the target mesh and the center of each adjacent mesh; Calculating the first gradient of the target mesh according to the first field quantity of the target mesh and each adjacent mesh respectively and the weight between the target mesh and each adjacent mesh; Calculating the second field quantity of each target mesh according to the first gradient of each target mesh; Judging whether the second field quantity of each target mesh converges; If not converged, for each target mesh, taking the second field quantity of the target mesh as the first field quantity of the target mesh, taking the second field quantity of the adjacent mesh of the target mesh as the first field quantity of the adjacent mesh, and repeating the step of calculating the first gradient of the target mesh according to the first field quantity of the target mesh and each adjacent mesh respectively and the weight between the target mesh and each adjacent mesh; If converged, taking the second field quantity of the target mesh as the target field quantity of the target mesh; Calculating an evaluation index of the fluid engineering model according to the target field quantity of at least one mesh of the mesh model, so as to evaluate the fluid engineering model according to the evaluation index.
2. The method according to claim 1, characterized in that, Calculating the weight factor of each adjacent mesh according to the aspect ratio of each adjacent mesh of the target mesh further includes: Calculate the weight factor of an adjacent grid according to the formula n = C · AR α where n represents the weight factor, C represents the proportionality constant, AR represents the aspect ratio of the adjacent grid, and α represents the weight exponent; or, Calculating the weight factor of an adjacent mesh according to the formula n = 1 + βAR, where n represents the weight factor, β represents the linear adjustment factor, and AR represents the aspect ratio of the adjacent mesh; or, According to the formula calculate the weight factor of an adjacent grid, where n represents the weight factor, AR represents the aspect ratio of the adjacent grid, AR low and AR high are the lower and upper threshold values of the aspect ratio.
3. The method according to claim 2, wherein The formula for calculating the weight between the target mesh and each adjacent mesh according to the weight factor of each adjacent mesh and the geometric distance between the center of the target mesh and the center of each adjacent mesh is: ; where ω k represents the weight of the k-th adjacent grid, and Δr fk represents the geometric distance between the center of the target grid and the center of the k-th adjacent grid.
4. The method according to claim 3, characterized in that Calculating the first gradient of the target mesh according to the first field quantity of the target mesh and each adjacent mesh respectively and the weight between the target mesh and each adjacent mesh further includes: Construct an error function using the least squares method Solve it to obtain the first gradient of the target grid, where G c represents the error value, NB(C) represents the number of adjacent grids of the target grid C, and φ Fk represents the first field quantity of the k-th adjacent grid, and φ C represents the first field quantity of the target grid C, and ▽φ C represents the first gradient of the target grid C, and r CFk represents the geometric vector from the center of the target grid C to the center of the k-th adjacent grid.
5. The method according to claim 4, characterized in that, Calculating the second field quantity of each target mesh according to the first gradient of each target mesh further includes: For each target mesh, converting the first gradient of the target mesh into a face gradient on the unit face between the target mesh and each of its adjacent meshes by interpolation; Construct a discretization model for each target grid according to the face gradients of each target grid: , where faces(Vc) represents the total number of cell faces of target grid C, ρ f represents the fluid density on the f-th cell face, represents the fluid velocity vector on the f-th cell face, φ f represents the flux on the f-th cell face of target grid C obtained by interpolating the second field quantity of the target grid into the f-th cell face, represents the area vector on the f-th cell face, Γ φ f represents the diffusion coefficient on the f-th cell face, ▽φ f represents the first gradient on the f-th cell face, Q c φ represents the source term coefficient, and V represents the volume of the target grid c; Converting the discretized model of each target mesh into an algebraic model to obtain an algebraic equation system composed of the second field quantities of all target meshes, where the second field quantity is the variable to be solved in the algebraic equation system; Solving the algebraic equation system to obtain the second field quantity of each target mesh.
6. The method according to claim 5, characterized in that The step of judging whether the second field quantity of each target mesh converges includes: After solving the algebraic equation system to obtain the second field quantity of each target mesh, calculating the field quantity change rate of each target mesh respectively; Determine whether the rate of change of the field quantity of all target grids is less than the threshold value; If so, the second field quantity of each target grid converges.
7. The method according to claim 1, characterized in that, Calculating the evaluation index of the fluid engineering model according to the target field quantity of at least one grid of the grid model further includes: Performing area integration or volume integration on the target field quantity of the specified grid to obtain the evaluation index.
8. The method according to claim 1, characterized in that, The field quantity is a velocity value or a pressure value; If the grid is an internal grid in the grid model, the first field quantity of the grid is the initial velocity value or the initial pressure value inside the fluid engineering model; If the grid is a boundary grid in the grid model, the first field quantity of the grid is the velocity boundary value or the pressure boundary value at the boundary of the fluid engineering model.
9. An evaluation device for a gradient-optimized fluid engineering model, characterized in that, The device includes: A grid meshing unit for meshing a fluid engineering model to obtain a grid model, where the grid model includes a plurality of grids, each grid in the grid model is respectively used as a target grid, and the grids adjacent to the target grid in the grid model are used as the adjacent grids of the target grid; A weight calculation unit for, for each target grid, calculating the weight factor of each adjacent grid according to the aspect ratio of each adjacent grid of the target grid, and calculating the weight between the target grid and each adjacent grid according to the weight factor of each adjacent grid and the geometric distance between the center of the target grid and the center of each adjacent grid; A first gradient calculation unit for calculating the first gradient of the target grid according to the first field quantity of the target grid and each adjacent grid respectively and the weight between the target grid and each adjacent grid; A field quantity iterative calculation unit for calculating the second field quantity of each target grid according to the first gradient of each target grid; determining whether the second field quantity of each target grid converges; if not converging, for each target grid, using the second field quantity of the target grid as the first field quantity of the target grid, and using the second field quantity of the adjacent grid of the target grid as the first field quantity of the adjacent grid, triggering the first gradient calculation unit to repeat the step of calculating the first gradient of the target grid according to the first field quantity of the target grid and each adjacent grid respectively and the weight between the target grid and each adjacent grid; if converging, using the second field quantity of the target grid as the target field quantity of the target grid; An evaluation index calculation unit for calculating the evaluation index of the fluid engineering model according to the target field quantity of at least one grid of the grid model, so as to evaluate the fluid engineering model according to the evaluation index.
10. A computer program product, characterized in that, The computer program product includes a computer program, and when the computer program is executed by a processor, it implements the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Loss function calculation method based on grid shape learning and grid generation method
CN117710605A
Method, device and computer program product for determining an electromagnetic near-field of a field excitation source of an electrical system
US20110251832A1