Cross-validation training method, device and equipment for large-scale flow field proxy model
Through the cross-verification training method of large-scale flow field agent model, the shape parameters are optimized using recursive arrangement and particle swarm optimization algorithm, the contradiction between verification efficiency and computing resource consumption in flow field prediction is solved, and fast and reliable flow field prediction is achieved.
Patent Information
- Application Number
- CN202510703450.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-29
- Publication Date
- 2025-08-15
- Estimated Expiration
- 2045-05-29
AI Technical Summary
In the prior art, in large-scale flow field prediction, there is a contradiction between the verification efficiency of the agent model and the consumption of computing resources, making it difficult to achieve fast and reliable flow field prediction.
The cross-validation training method of large-scale flow field agent model is adopted, and sample points are generated through recursively arranged evolution experiment design, proxy model is constructed and basis function matrix is calculated, and the cross-validation error sum is minimized using particle swarm optimization algorithm, and shape parameters are optimized to reduce the calculation amount.
It realizes fast and reliable verification of large-scale flow field agent models, improves the efficiency and accuracy of flow field prediction, and reduces the computational complexity.
Smart Images

Figure CN120278036B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of flow field prediction for aircraft design, and in particular to a cross-validation training method, apparatus, and equipment for a large-scale flow field proxy model. Background Art
[0002] In the field of fluid dynamics, accurate prediction of complex flow behavior is crucial for engineering design and performance improvement. While traditional computational fluid dynamics (CFD) techniques can produce highly accurate simulation results, they typically require significant computational resources and time, particularly when solving large-scale and complex flow problems. Therefore, finding efficient and accurate flow prediction methods is crucial for accelerating the resolution of engineering problems.
[0003] Large-scale flow field prediction technology based on surrogate models deeply integrates computational fluid dynamics numerical simulation methods with data-driven models, and can significantly reduce computing resource consumption while ensuring prediction accuracy. However, model verification, as a core link in evaluating the reliability of surrogate models, requires physical field reconstruction through global matrix operations in a multi-dimensional parameter space. This process faces the bottleneck problem of exponentially increasing computational complexity. How to overcome the contradiction between verification efficiency and scale under the constraints of limited resources has become a key challenge currently restricting the engineering application of this technology. Summary of the Invention
[0004] Based on this, it is necessary to provide a cross-validation training method, device and equipment for a large-scale flow field proxy model to address the above technical problems, so as to achieve rapid and reliable verification of the large-scale flow field proxy model, and thus achieve efficient and accurate flow field prediction.
[0005] A cross-validation training method for a large-scale flow field proxy model, the method comprising:
[0006] Step 1: determine the range of design variables for aircraft optimization and perform normalization;
[0007] Step 2: recursively permutate the design variables to perform evolutionary experimental design and generate sample points of the design variables;
[0008] Step 3: Perform numerical simulation of the flow field at the sample points to obtain large-scale flow field data of the aircraft as the response value of each node in the flow field;
[0009] Step 4: Use the radial basis function algorithm to construct a proxy model for each node in the large-scale flow field, and calculate the basis function matrix corresponding to the proxy model based on the same shape parameters in each proxy model;
[0010] Step 5: Use the samples of each subspace in the recursive permutation evolution experiment design process as the test set, and extract the overlapping elements corresponding to the current test set from the inverse matrix of the basis function matrix and form a submatrix. The submatrices corresponding to all test sets are integrated to form a first intermediate matrix. After constructing a second intermediate matrix related only to shape parameters and design variables based on the first intermediate matrix, the cross-validation error sum of squares of each surrogate model is constructed according to the second intermediate matrix and the global matrix related only to the node response values. The cross-validation error sum of squares corresponding to each node in the large-scale flow field is integrated to construct the cross-validation error sum of squares of the entire flow field.
[0011] In step 6, the particle swarm optimization algorithm is used to optimize the shape parameters with the optimization goal of minimizing the sum of squares of the cross-validation error of the entire flow field. During the optimization process, the global matrix remains unchanged. The proxy model is updated based on the optimized shape parameters and the sum of squares of the cross-validation error of the entire flow field is recalculated until the error converges. The optimal proxy model based on the optimal shape parameters is output to perform the flow field prediction task.
[0012] In one embodiment, step 2 includes:
[0013] Step 2.1, define the number of samples required for aircraft optimization as , for the inclusion The space of samples is recursively split until each subspace contains or samples; among them, the number of splits is and get subspaces;
[0014] Step 2.2, use the optimized Latin hypercube experimental design algorithm to generate the sample number The initial sample set ;in, Indicates the samples;
[0015] Step 2.3: Perform cyclic deletion on the samples in the initial sample set and select the one with the best uniformity after deletion. samples as the evolution sample set ;
[0016] Step 2.4, evolve the sample set in Samples are filled into each subspace, and PIO optimization is performed on the filled samples to obtain the optimized sample points.
[0017] In one embodiment, step 3 includes:
[0018] Step 3.1, geometric modeling, includes: defining the flow field calculation domain based on the physical characteristics of the aircraft, simplifying the complex structure of the aircraft and repairing geometric defects, and applying periodic or mirror boundary conditions for the symmetric flow field, and outputting it to a universal geometric format;
[0019] Step 3.2, structured mesh generation, includes: optimizing the topology after importing the geometric model, placing a high-precision boundary layer mesh near the wall, using O-type meshing technology to process curved surface areas to reduce mesh distortion, performing mesh quality verification, and outputting to a universal mesh format;
[0020] Step 3.3, flow field solution and post-processing, includes: first, using the pressure-velocity coupling algorithm to activate the energy equation and turbulence model, and setting material properties and boundary conditions; then using the second-order discrete format to solve the energy equation and turbulence model, and setting a 1e-6 residual convergence standard, and monitoring the force coefficient and heat flux during the solution process to ensure the stability of the solution results; finally, using an adaptive time step to accelerate convergence, and extracting flow field cloud maps, streamlines and quantitative data as the response values of each node in the flow field.
[0021] In one embodiment, step 4 includes:
[0022] The radial basis function algorithm is used to construct the proxy model of each node in the large-scale flow field, which can be expressed as:
[0023] ;
[0024] in, Point to be predicted The model output value of is the number of samples in the training set, which is equal to the number of samples required for aircraft optimization; is the sample number in the training set, For the The weight coefficients of the Gaussian basis functions are For the Gaussian basis function, the specific expression is:
[0025] ;
[0026] in, The sample point to be predicted With known sample points The Euclidean distance between is the shape parameter, and the proxy model of each node in the large-scale flow field selects the same shape parameter. After determining the shape parameter, the proxy model is inferred and the corresponding weight coefficient is calculated. , and then the basis function matrix corresponding to each proxy model is calculated, which is expressed as:
[0027] ;
[0028] in, Represents the weight coefficient matrix, which is composed of the weight coefficients of the Gaussian basis function corresponding to all samples in the training set; is the basis function matrix The inverse matrix of is the physical quantity in the training set.
[0029] In one embodiment, in step 5, the samples of each subspace in the recursive permutation evolution experiment design process are used as a test set, and the overlapping elements corresponding to the current test set are extracted from the inverse matrix of the basis function matrix and formed into a submatrix. The submatrices corresponding to all test sets are combined to construct a first intermediate matrix, including:
[0030] Each time, a subspace in the recursive permutation evolution experiment design process is taken or samples as the test set, and the rest as the training set;
[0031] From the inverse matrix of the basis function matrix In the current test set, extract r OK r Elements in a column overlap r Matrices of order are combined into sub-matrices ;
[0032] Comprehensive sub-matrices corresponding to all test sets Constructed as the first intermediate matrix , expressed as:
[0033] ;
[0034] in, is the number of subspace splits.
[0035] In one embodiment, in step 5, after constructing a second intermediate matrix related only to shape parameters and design variables based on the first intermediate matrix, constructing a cross-validation error sum of squares for each surrogate model based on the second intermediate matrix and a global matrix related only to node response values includes:
[0036] The calculation formula for the cross-validation error sum of squares of the proxy model for each node in the large-scale flow field is defined as:
[0037] ;
[0038] in, Represents the first intermediate matrix The second intermediate matrix constructed is related only to the shape parameters and design variables, is a global matrix related only to the node response value, T Represents matrix transpose;
[0039] Furthermore, the cross-validation error sum of squares at each node Expressed as: ;in, It means finding the trace of a matrix.
[0040] In one embodiment, in step 5, the cross-validation error sum of squares corresponding to each node in the large-scale flow field is integrated to construct the cross-validation error sum of squares of the entire flow field. , expressed as:
[0041] ;
[0042] in, N represents the number of nodes in the flow field, Indicates the flow field The response value of each node, Indicates the The sum of squares of the cross-validation errors corresponding to the nodes is Indicates the The second intermediate matrix of nodes; Storage and Global Matrix In the global matrix The shape parameters are kept constant in each optimization iteration.
[0043] In one embodiment, step 6 includes:
[0044] Step 6.1, initialize the particle swarm, including the number of particles, positions and velocities;
[0045] Step 6.2, define the iterative parameter update rules, including the position update formula and the velocity update formula, which are expressed as:
[0046] ;
[0047] ;
[0048] in, Indicates the The particle iteration to the The speed of generation; Indicates the The particle iteration to the The position of the generation; is the inertia weight; and is the learning factor; rand() is a random number between [0,1]; For the The individual historical optimal position of each particle; is the historical optimal position of the group;
[0049] Step 6.3: Minimizing the sum of squared errors of the full flow field cross validation is the optimization objective. The shape parameters are used as iterative parameters for optimization. During the optimization process, the global matrix remains unchanged. The surrogate model is updated based on the optimized shape parameters, and the sum of squared errors of the full flow field cross validation is recalculated.
[0050] In step 6.4, if the relative rate of change of the sum of squares of the cross-validation errors of the entire flow field is lower than the preset threshold in several consecutive iterations, the error is considered to have converged; otherwise, the iteration is continued, and the optimal shape parameters are continuously approached until the error converges, and the optimal proxy model based on the optimal shape parameters is output to perform the flow field prediction task.
[0051] A cross-validation training device for a large-scale flow field proxy model, the device comprising:
[0052] A design variable determination module is used to determine the range of design variables for aircraft optimization and perform normalization processing;
[0053] Experimental design module, used to recursively permutate the design variables to evolve the experimental design and generate sample points of the design variables;
[0054] Numerical simulation module, used to perform numerical simulation of the flow field at the sample points and obtain large-scale flow field data of the aircraft as the response value of each node in the flow field;
[0055] The proxy model construction module is used to construct a proxy model of each node in the large-scale flow field using the radial basis function algorithm, and calculate the basis function matrix corresponding to the proxy model based on the same shape parameters in each proxy model;
[0056] A cross-validation error calculation module is used to use the samples of each subspace in the recursive permutation evolution experiment design process as a test set, and extract the overlapping elements corresponding to the current test set from the inverse matrix of the basis function matrix and form them into a submatrix, and construct the submatrices corresponding to all test sets into a first intermediate matrix. After constructing a second intermediate matrix related only to shape parameters and design variables based on the first intermediate matrix, the cross-validation error sum of squares of each surrogate model is constructed according to the second intermediate matrix and a global matrix related only to node response values. The cross-validation error sum of squares corresponding to each node in the large-scale flow field is then combined to construct the cross-validation error sum of squares of the entire flow field.
[0057] The iterative optimization module is used to optimize the shape parameters with the goal of minimizing the sum of squares of the cross-validation error of the entire flow field. The particle swarm optimization algorithm is used to optimize the shape parameters. During the optimization process, the global matrix remains unchanged. The proxy model is updated based on the optimized shape parameters and the sum of squares of the cross-validation error of the entire flow field is recalculated until the error converges. The optimal proxy model based on the optimal shape parameters is output to perform the flow field prediction task.
[0058] A computer device includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0059] Step 1: determine the range of design variables for aircraft optimization and perform normalization;
[0060] Step 2: recursively permutate the design variables to perform evolutionary experimental design and generate sample points of the design variables;
[0061] Step 3: Perform numerical simulation of the flow field at the sample points to obtain large-scale flow field data of the aircraft as the response value of each node in the flow field;
[0062] Step 4: Use the radial basis function algorithm to construct a proxy model for each node in the large-scale flow field, and calculate the basis function matrix corresponding to the proxy model based on the same shape parameters in each proxy model;
[0063] Step 5: Use the samples of each subspace in the recursive permutation evolution experiment design process as the test set, and extract the overlapping elements corresponding to the current test set from the inverse matrix of the basis function matrix and form a submatrix. The submatrices corresponding to all test sets are integrated to form a first intermediate matrix. After constructing a second intermediate matrix related only to shape parameters and design variables based on the first intermediate matrix, the cross-validation error sum of squares of each surrogate model is constructed according to the second intermediate matrix and the global matrix related only to the node response values. The cross-validation error sum of squares corresponding to each node in the large-scale flow field is integrated to construct the cross-validation error sum of squares of the entire flow field.
[0064] In step 6, the particle swarm optimization algorithm is used to optimize the shape parameters with the optimization goal of minimizing the sum of squares of the cross-validation error of the entire flow field. During the optimization process, the global matrix remains unchanged. The proxy model is updated based on the optimized shape parameters and the sum of squares of the cross-validation error of the entire flow field is recalculated until the error converges. The optimal proxy model based on the optimal shape parameters is output to perform the flow field prediction task.
[0065] The cross-validation training method, device and equipment of the above-mentioned large-scale flow field proxy model, in order to solve the problem that the cross-validation error calculation of a single node in a large-scale flow field has repeated calculations and high computational complexity, provides a "one-time construction, multiple reuse" matrix pre-calculation strategy. On the one hand, this strategy takes into account that the basis function matrix of each proxy model contains a large amount of repeated information. By extracting the overlapping elements corresponding to the test set from the inverse matrix of the basis function matrix and constructing a second intermediate matrix related only to the shape parameters and design variables, it is possible to reduce the repeated calculation of the basis function matrix; on the other hand, only in the initialization stage of the proxy model optimization iteration, the global matrix related only to the node response value is solved once and the global matrix is directly called in subsequent iterations to calculate the cross-validation error sum of squares. For the verification calculation of the proxy model of a large-scale flow field containing millions of grids, the amount of calculation can be effectively reduced. Therefore, the present application can realize the rapid and reliable verification of the large-scale flow field proxy model and improve the practicality of the large-scale flow field proxy model prediction. BRIEF DESCRIPTION OF THE DRAWINGS
[0066] Figure 1 Schematic diagram of a process for a cross-validation training method of a large-scale flow field proxy model in one embodiment;
[0067] Figure 2 A schematic diagram of the calculation time of different cross-validation methods in each round of optimization iteration in one embodiment;
[0068] Figure 3 is a flow field cloud diagram of CFD (Computational Fluid Dynamics) simulation in one embodiment; wherein, Figure 3 (a) is the CFD simulation cloud diagram of the horizontal velocity field of the flow field. Figure 3 (b) is the CFD simulation cloud diagram of the vertical velocity field of the flow field. Figure 3 (c) CFD simulation cloud map of flow and pressure fields;
[0069] Figure 4 This is a flow field cloud map predicted by the proxy model optimized by the present application in one embodiment; wherein, Figure 4 (a) Horizontal velocity field cloud map predicted by the proxy model optimized for this application, Figure 4 (b) The vertical velocity field cloud map of the flow field predicted by the proxy model optimized for this application, Figure 4 (c) Flow and pressure field cloud map predicted by the proxy model optimized for this application;
[0070] Figure 5 This is a cloud diagram of the flow field prediction error of the proxy model optimized by the present application in one embodiment; wherein, Figure 5 (a) Cloud diagram of the horizontal velocity field prediction error of the proxy model optimized for this application. Figure 5(b) Cloud diagram of the vertical velocity field prediction error of the proxy model optimized for this application. Figure 5 (c) Cloud diagram of the flow and pressure field prediction error of the proxy model optimized for this application;
[0071] Figure 6 FIG. 1 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0072] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0073] In one embodiment, Figure 1 As shown, a cross-validation training method for a large-scale flow field agent model is provided, comprising the following steps:
[0074] Step 1: Determine the range of design variables for aircraft optimization and perform normalization.
[0075] Specifically, determine the set of design variables and its lower limit set and the upper limit set . Through design variables Normalize each dimension parameter to obtain the normalized design variable set .in, D is the number of design variables, and Respectively represent design variables The lower and upper limits of the value of After normalization, design variables.
[0076] Step 2: Perform recursive permutation evolutionary experimental design on the design variables to generate sample points of the design variables.
[0077] Specifically, step 2 includes:
[0078] Step 2.1, define the number of samples required for aircraft optimization as n , for the inclusion n The space of samples is recursively split until each subspace contains or samples; among them, the number of splits is and get subspaces.
[0079] Step 2.2, use the optimized Latin hypercube experimental design algorithm to generate the sample number The initial sample set ;in, Indicates the samples.
[0080] Step 2.3: Perform a cyclic deletion operation on the samples in the initial sample set and select the one with the best uniformity after the deletion operation. samples as the evolution sample set .
[0081] Step 2.4, evolve the sample set in Samples are filled into each subspace, and the filled samples are optimized using PIO (Pigeon-Inspired Optimization) to obtain the optimized sample points.
[0082] Step 3: Perform numerical simulation of the flow field at the sample points to obtain large-scale flow field data of the aircraft as the response value of each node in the flow field.
[0083] Specifically, step 3 includes:
[0084] Step 3.1, geometric modeling, includes: defining the flow field calculation domain based on the physical characteristics of the aircraft (for example, extending the external flow field by 5-10 times the characteristic length), simplifying the complex structure of the aircraft (for example, removing non-critical details such as fillets <0.1mm and bolt holes) and repairing geometric defects (for example, eliminating small gaps and overlapping surfaces), ensuring surface smoothness, and applying periodic or mirror boundary conditions for symmetric flow fields (such as flow around a cylinder), and outputting them in a universal geometric format.
[0085] Step 3.2, structured network generation, includes: optimizing the topology after importing the geometric model, arranging a high-precision boundary layer mesh near the wall (meeting the requirement of y+ < 1, where y+ is a dimensionless parameter representing the distance from the first mesh cell to the surface wall), using O-type meshing technology to process curved surface areas to reduce mesh distortion, and performing mesh quality verification (i.e., verifying indicators such as orthogonality and aspect ratio), and outputting to a universal mesh format.
[0086] Step 3.3, flow field solution and post-processing, includes: first, using the pressure-velocity coupling algorithm to activate the energy equation and turbulence model (specifically, using the Realizable k-ε turbulence model combined with the enhanced wall function), and setting material properties and boundary conditions (velocity inlet / pressure outlet); then, using a second-order discrete format to solve the energy equation and turbulence model, setting a 1e-6 residual convergence criterion, and monitoring the force coefficient and heat flux during the solution process to ensure the stability of the solution results; finally, using an adaptive time step to accelerate convergence, and extracting flow field cloud maps, streamlines, and quantitative data as the response values of each node in the flow field.
[0087] Step 4: Use the radial basis function algorithm to construct a proxy model for each node in the large-scale flow field, and calculate the basis function matrix corresponding to the proxy model based on the same shape parameters in each proxy model.
[0088] Specifically, step 4 includes:
[0089] The radial basis function algorithm is used to construct a proxy model for each node in a large-scale flow field. The radial basis function uses a simple odd function for weighted superposition to achieve the prediction of new sample points, which can be expressed as:
[0090] ;
[0091] in, Point to be predicted The model output value of is the number of samples in the training set, which is equal to the number of samples required for aircraft optimization; is the sample number in the training set, For the The weight coefficients of the Gaussian basis function, For the A Gaussian basis function is used to take the Euclidean distance from the unknown sample to the known sample as the independent variable. The specific expression is:
[0092] ;
[0093] in, The sample point to be predicted With known sample points The Euclidean distance between is the shape parameter, and the proxy model of each node in the large-scale flow field selects the same shape parameter. After determining the shape parameter, the proxy model is inferred and the corresponding weight coefficient is calculated. , and then the basis function matrix corresponding to each proxy model is calculated, which is expressed as:
[0094] ;
[0095] in, Represents the weight coefficient matrix, which is composed of the weight coefficients of the Gaussian basis function corresponding to all samples in the training set; is the basis function matrix The inverse matrix of is the physical quantity in the training set.
[0096] Step 5: Use the samples of each subspace in the recursive permutation evolution experiment design process as the test set, and extract the overlapping elements corresponding to the current test set from the inverse matrix of the basis function matrix and form them into a submatrix. The submatrices corresponding to all test sets are integrated to form a first intermediate matrix. After constructing a second intermediate matrix related only to shape parameters and design variables based on the first intermediate matrix, the cross-validation error sum of squares of each proxy model is constructed according to the second intermediate matrix and the global matrix related only to the node response values. The cross-validation error sum of squares corresponding to each node in the large-scale flow field is integrated to construct the cross-validation error sum of squares of the entire flow field.
[0097] Specifically, step 5 includes:
[0098] Step 5.1, each time take a subspace in the recursive permutation evolution experiment design process or samples as the test set, and the rest as the training set.
[0099] Step 5.2, from the inverse matrix of the basis function matrix In the current test set, extract OK Elements in a column overlap Matrices of order are combined into sub-matrices .
[0100] Step 5.3: Synthesize the sub-matrices corresponding to all test sets Constructed as the first intermediate matrix , expressed as:
[0101] ;
[0102] in, is the number of subspace splits.
[0103] In step 5.4, the formula for calculating the sum of squared cross-validation errors of the proxy model for each node in the large-scale flow field is defined as:
[0104] ;
[0105] in, Represents the first intermediate matrix The second intermediate matrix constructed is related only to the shape parameters and design variables, is a global matrix related only to the node response value, T Represents matrix transpose;
[0106] Furthermore, the cross-validation error sum of squares at each node Expressed as: ;in, Indicates finding the trace of a matrix;
[0107] Based on this, the cross-validation error sum of squares corresponding to each node in the large-scale flow field is constructed to obtain the cross-validation error sum of squares of the entire flow field. , expressed as:
[0108] ;
[0109] in, N represents the number of nodes in the flow field, Indicates the flow field The response value of each node, Indicates the The sum of squares of the cross-validation errors corresponding to the nodes is Indicates the The second intermediate matrix of nodes; Storage and Global Matrix In the global matrix The shape parameters remain unchanged in each optimization iteration, eliminating the need for repeated calculations and significantly reducing the computational complexity of cross-validation of large-scale flow field proxy models.
[0110] In step 6, the particle swarm optimization algorithm is used to optimize the shape parameters with the optimization goal of minimizing the sum of squares of the cross-validation error of the entire flow field. During the optimization process, the global matrix remains unchanged. The proxy model is updated based on the optimized shape parameters and the sum of squares of the cross-validation error of the entire flow field is recalculated until the error converges. The optimal proxy model based on the optimal shape parameters is output to perform the flow field prediction task.
[0111] Specifically, step 6 includes:
[0112] Step 6.1, initialize the particle swarm, including the number of particles, position and velocity.
[0113] Step 6.2, define the iterative parameter update rules, including the position update formula and the velocity update formula, which are expressed as:
[0114] ;
[0115] ;
[0116] in, Indicates the The particle iteration to the The speed of generation; Indicates the The particle iteration to the The position of the generation; is the inertia weight; and is the learning factor; rand() is a random number between [0,1]; For the The individual historical optimal position of each particle; is the historical optimal position of the group.
[0117] In step 6.3, the optimization goal is to minimize the sum of squares of the cross-validation error of the entire flow field, and the shape parameters are optimized as iterative parameters. During the optimization process, the global matrix remains unchanged. The proxy model is updated based on the optimized shape parameters and the sum of squares of the cross-validation error of the entire flow field is recalculated. The sum of squares of the cross-validation error of the entire flow field is used as the fitness evaluation individual and the global optimum.
[0118] In step 6.4, if the relative rate of change of the sum of squares of the cross-validation errors of the entire flow field is lower than the preset threshold in several consecutive iterations, the error is considered to have converged; otherwise, the iteration is continued, and the optimal shape parameters are continuously approached until the error converges, and the optimal proxy model based on the optimal shape parameters is output to perform the flow field prediction task.
[0119] In summary, the cross-validation training method for a large-scale flow field proxy model provided by the present application considers that a large amount of repeated information is contained in the basis function matrix of each proxy model. By extracting overlapping elements corresponding to the test set from the inverse matrix of the basis function matrix and constructing a second intermediate matrix related only to shape parameters and design variables, it is possible to reduce the repeated calculation of the basis function matrix; and the method proposed in the present application only solves the global matrix related only to the node response value once in the proxy model optimization iterative initialization stage and directly calls the global matrix in subsequent iterations to calculate the sum of squares of the cross-validation error. For the verification calculation of the proxy model of a large-scale flow field containing millions of grids, the amount of calculation can be effectively reduced, thereby enabling efficient and reliable verification of the proxy model of a large-scale flow field.
[0120] In one embodiment, the method proposed in this application is applied to a two-dimensional NACA0012 airfoil flow field to perform a proxy model rapid cross-validation to verify the reliability and efficiency of the method proposed in this application. The specific steps include: first, determining the design variables as the angle of attack and the Mach number, and clarifying the design variable range as , , and normalize the two design variables. Then, the recursive permutation evolution experimental design algorithm is used to conduct experimental design on the two design variables, and a total of 64 sample points are generated. Numerical simulation analysis is performed on the two-dimensional NACA0012 airfoil under these 64 working conditions, and the velocity and pressure data of the flow field are obtained as the response values of each node in the flow field. A proxy model of each node in the two-dimensional NACA0012 airfoil flow field is constructed, and the training set and test set are divided based on K-fold cross-validation. The cross-validation training method of the large-scale flow field proxy model proposed in this application is used to calculate the sum of squares of the cross-validation error of the entire flow field, and the particle swarm optimization algorithm is used to optimize the shape parameters with the minimization of the sum of squares of the cross-validation error of the entire flow field as the optimization goal, until the optimization converges, and the optimal proxy model based on the optimal shape parameters is output to perform the flow field prediction task.
[0121] Table 1 shows a comparison of the mean absolute errors of flow field predictions for different proxy models. The results show that the prediction accuracy of the proxy model optimized by the method proposed in this application is significantly improved compared to the initial proxy model, verifying the reliability of the optimization guided by the method proposed in this application. Figure 2 The calculation time of each optimization iteration of different cross-validation methods is shown in Table 1. It can be seen that the method proposed in this application saves 84% of the time compared with the traditional cross-validation method, which shows the efficiency of this method. u 、 v and p They represent the horizontal velocity field, vertical velocity field and pressure field of the flow field respectively.
[0122] Table 1 Comparison of mean absolute errors of flow field predictions of different surrogate models
[0123]
[0124] Figure 3 and Figure 4 The flow field cloud diagrams of CFD simulation under randomly generated test conditions and the flow field cloud diagram predicted by the proxy model optimized in this application are compared. Figure 3 and Figure 4 It can be found that the flow field cloud map predicted by the optimized proxy model of this application is indistinguishable from the high-fidelity CFD results, which shows that the optimized proxy model successfully predicts the main flow characteristics around the airfoil. Figure 5 Further quantitative error analysis revealed that the velocity field prediction errors of the optimized surrogate model were primarily concentrated in two key regions: the wake and leading edge. This localized error distribution is consistent with known flow separation phenomena in the transonic regime, confirming the optimized surrogate model's ability to capture key aerodynamic features and achieve accurate flow field predictions.
[0125] In one embodiment, a cross-validation training apparatus for a large-scale flow field proxy model is provided, comprising:
[0126] A design variable determination module is used to determine the range of design variables for aircraft optimization and perform normalization processing;
[0127] Experimental design module, used to recursively permutate the design variables to evolve the experimental design and generate sample points of the design variables;
[0128] Numerical simulation module, used to perform numerical simulation of the flow field at the sample points and obtain large-scale flow field data of the aircraft as the response value of each node in the flow field;
[0129] The proxy model construction module is used to construct a proxy model of each node in the large-scale flow field using the radial basis function algorithm, and calculate the basis function matrix corresponding to the proxy model based on the same shape parameters in each proxy model;
[0130] A cross-validation error calculation module is used to use the samples of each subspace in the recursive permutation evolution experiment design process as a test set, and extract the overlapping elements corresponding to the current test set from the inverse matrix of the basis function matrix and form them into a submatrix, and construct the submatrices corresponding to all test sets into a first intermediate matrix. After constructing a second intermediate matrix related only to shape parameters and design variables based on the first intermediate matrix, the cross-validation error sum of squares of each surrogate model is constructed according to the second intermediate matrix and a global matrix related only to node response values. The cross-validation error sum of squares corresponding to each node in the large-scale flow field is then combined to construct the cross-validation error sum of squares of the entire flow field.
[0131] The iterative optimization module is used to optimize the shape parameters with the goal of minimizing the sum of squares of the cross-validation error of the entire flow field. The particle swarm optimization algorithm is used to optimize the shape parameters. During the optimization process, the global matrix remains unchanged. The proxy model is updated based on the optimized shape parameters and the sum of squares of the cross-validation error of the entire flow field is recalculated until the error converges. The optimal proxy model based on the optimal shape parameters is output to perform the flow field prediction task.
[0132] The specific definition of the cross-validation training device for a large-scale flow field proxy model can be found in the definition of the cross-validation training method for a large-scale flow field proxy model described above, and will not be repeated here. The various modules in the cross-validation training device for a large-scale flow field proxy model can be implemented in whole or in part through software, hardware, or a combination thereof. The aforementioned modules can be embedded in or independent of a processor in a computer device in hardware form, or can be stored in a memory in a computer device in software form, so that the processor can call and execute the operations corresponding to the aforementioned modules.
[0133] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 6 As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a cross-validation training method for a large-scale flow field proxy model is implemented. The display screen of the computer device can be a liquid crystal display or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad provided on the computer device housing, or an external keyboard, touchpad or mouse.
[0134] Those skilled in the art will understand that Figure 6 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0135] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0136] Step 1: determine the range of design variables for aircraft optimization and perform normalization;
[0137] Step 2: recursively permutate the design variables to perform evolutionary experimental design and generate sample points of the design variables;
[0138] Step 3: Perform numerical simulation of the flow field at the sample points to obtain large-scale flow field data of the aircraft as the response value of each node in the flow field;
[0139] Step 4: Use the radial basis function algorithm to construct a proxy model for each node in the large-scale flow field, and calculate the basis function matrix corresponding to the proxy model based on the same shape parameters in each proxy model;
[0140] Step 5: Use the samples of each subspace in the recursive permutation evolution experiment design process as the test set, and extract the overlapping elements corresponding to the current test set from the inverse matrix of the basis function matrix and form a submatrix. The submatrices corresponding to all test sets are integrated to form a first intermediate matrix. After constructing a second intermediate matrix related only to shape parameters and design variables based on the first intermediate matrix, the cross-validation error sum of squares of each surrogate model is constructed according to the second intermediate matrix and the global matrix related only to the node response values. The cross-validation error sum of squares corresponding to each node in the large-scale flow field is integrated to construct the cross-validation error sum of squares of the entire flow field.
[0141] In step 6, the particle swarm optimization algorithm is used to optimize the shape parameters with the optimization goal of minimizing the sum of squares of the cross-validation error of the entire flow field. During the optimization process, the global matrix remains unchanged. The proxy model is updated based on the optimized shape parameters and the sum of squares of the cross-validation error of the entire flow field is recalculated until the error converges. The optimal proxy model based on the optimal shape parameters is output to perform the flow field prediction task.
[0142] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0143] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.
Claims
1. A cross-validation training method for a large-scale flow field proxy model, characterized in that: The method comprises: Step 1: determine the range of design variables for aircraft optimization and perform normalization; Step 2: recursively permutate the design variables to perform evolutionary experimental design and generate sample points of the design variables; Step 3: performing flow field numerical simulation on the sample points to obtain large-scale flow field data of the aircraft as response values of each node in the flow field; Step 4: Use the radial basis function algorithm to construct a proxy model for each node in the large-scale flow field, and calculate the basis function matrix corresponding to the proxy model based on the same shape parameters in each proxy model; Step 5, taking the samples of each subspace in the recursive permutation evolution experiment design process as a test set, and extracting the overlapping elements corresponding to the current test set from the inverse matrix of the basis function matrix and forming them into a submatrix, and integrating the submatrices corresponding to all test sets to construct a first intermediate matrix, and after constructing a second intermediate matrix related only to shape parameters and design variables based on the first intermediate matrix, constructing the cross-validation error sum of squares of each proxy model according to the second intermediate matrix and the global matrix related only to the node response value, and integrating the cross-validation error sum of squares corresponding to each node in the large-scale flow field to construct the cross-validation error sum of squares of the entire flow field; Step 6, optimizing the shape parameters using a particle swarm optimization algorithm with the goal of minimizing the sum of squares of the cross-validation error of the entire flow field. During the optimization process, the global matrix remains unchanged. The proxy model is updated based on the optimized shape parameters and the sum of squares of the cross-validation error of the entire flow field is recalculated until the error converges. The optimal proxy model based on the optimal shape parameters is output to perform the flow field prediction task. Wherein, the step 2 includes: Step 2.1, define the number of samples required for aircraft optimization as n , for the n The space of samples is recursively split until each subspace contains or samples; among them, the number of splits is and get subspaces; Step 2.2, use the optimized Latin hypercube experimental design algorithm to generate the sample number The initial sample set ;in, Indicates the i samples; Step 2.3: perform a cyclic deletion operation on the samples in the initial sample set, and select the sample with the best uniformity after the deletion operation. samples as the evolution sample set ; Step 2.4, evolve the sample set in Samples are filled into each subspace, and PIO optimization is performed on the filled samples to obtain the optimized sample points.
2. A cross-validation training method for a large-scale flow field proxy model according to claim 1, characterized in that: The step 3 includes: Step 3.1, geometric modeling, includes: defining the flow field calculation domain based on the physical characteristics of the aircraft, simplifying the complex structure of the aircraft and repairing geometric defects, and applying periodic or mirror boundary conditions for the symmetric flow field, and outputting it to a universal geometric format; Step 3.2, structured mesh generation, includes: optimizing the topology after importing the geometric model, placing a high-precision boundary layer mesh near the wall, using O-type meshing technology to process curved surface areas to reduce mesh distortion, performing mesh quality verification, and outputting to a universal mesh format; Step 3.3, flow field solution and post-processing, includes: first, using the pressure-velocity coupling algorithm to activate the energy equation and turbulence model, and setting material properties and boundary conditions; then using the second-order discrete format to solve the energy equation and turbulence model, and setting a 1e-6 residual convergence standard, and monitoring the force coefficient and heat flux during the solution process to ensure the stability of the solution results; finally, using an adaptive time step to accelerate convergence, and extracting flow field cloud maps, streamlines and quantitative data as the response values of each node in the flow field.
3. The cross-validation training method for a large-scale flow field proxy model according to claim 1, characterized in that: The step 4 comprises: The radial basis function algorithm is used to construct the proxy model of each node in the large-scale flow field, which can be expressed as: ; in, Point to be predicted The model output value of n is the number of samples in the training set, which is equal to the number of samples required for aircraft optimization; i is the sample number in the training set, For the i The weight coefficients of the Gaussian basis function, For the i Gaussian basis function, the specific expression is: ; in, The sample point to be predicted With known sample points The Euclidean distance between The shape parameter is the same as the shape parameter of the proxy model of each node in the large-scale flow field. After determining the shape parameter, the proxy model is reversed to calculate the corresponding weight coefficient. , and then the basis function matrix corresponding to each proxy model is calculated, which is expressed as: ; in, Represents the weight coefficient matrix, which is composed of the weight coefficients of the Gaussian basis function corresponding to all samples in the training set; is the basis function matrix The inverse matrix of is the physical quantity in the training set.
4. The cross-validation training method for a large-scale flow field proxy model according to claim 1, characterized in that: In step 5, the samples of each subspace in the recursive permutation evolution experiment design process are used as the test set, and the overlapping elements corresponding to the current test set are extracted from the inverse matrix of the basis function matrix and formed into a submatrix. The submatrices corresponding to all test sets are integrated to construct a first intermediate matrix, including: Each time, a subspace in the recursive permutation evolution experiment design process is taken or samples as the test set, and the rest as the training set; From the inverse matrix of the basis function matrix In the current test set, extract r OK r Elements in a column overlap r Matrices of order are combined into sub-matrices ; Comprehensive sub-matrices corresponding to all test sets Constructed as the first intermediate matrix , expressed as: ; in, is the number of subspace splits.
5. The cross-validation training method for a large-scale flow field proxy model according to claim 4, characterized in that: In step 5, after constructing a second intermediate matrix related only to shape parameters and design variables based on the first intermediate matrix, constructing a cross-validation error sum of squares for each surrogate model based on the second intermediate matrix and a global matrix related only to node response values, including: The calculation formula for the cross-validation error sum of squares of the proxy model for each node in the large-scale flow field is defined as: ; in, Represents the first intermediate matrix The second intermediate matrix constructed is related only to the shape parameters and design variables, is a global matrix related only to the node response value, T Represents matrix transpose; Furthermore, the cross-validation error sum of squares at each node Expressed as: ;in, It means finding the trace of a matrix.
6. A cross-validation training method for a large-scale flow field proxy model according to claim 5, characterized in that: In step 5, the cross-validation error sum of squares corresponding to each node in the large-scale flow field is integrated to construct the cross-validation error sum of squares of the entire flow field. , expressed as: ; in, N represents the number of nodes in the flow field, Indicates the flow field j The response value of each node, Indicates the j The sum of squares of the cross-validation errors corresponding to the nodes is Indicates the j The second intermediate matrix of nodes; Storage and Global Matrix In the global matrix The shape parameters are kept constant in each optimization iteration.
7. The cross-validation training method for a large-scale flow field proxy model according to claim 1, characterized in that: The step 6 comprises: Step 6.1, initialize the particle swarm, including the number of particles, positions and velocities; Step 6.2, define the iterative parameter update rules, including the position update formula and the velocity update formula, which are expressed as: ; ; in, Indicates the i The particle iteration to the t +1 generation speed; Indicates the i The particle iteration to the t The position of the generation; is the inertia weight; and is the learning factor; rand() is a random number between [0,1]; For the i The individual historical optimal position of each particle; is the historical optimal position of the group; Step 6.3, with minimizing the sum of squared cross-validation errors of the entire flow field as the optimization objective, optimize the shape parameters as iterative parameters. During the optimization process, the global matrix remains unchanged. The surrogate model is updated based on the optimized shape parameters, and the sum of squared cross-validation errors of the entire flow field is recalculated. In step 6.4, if the relative rate of change of the sum of squares of the cross-validation errors of the entire flow field is lower than the preset threshold in several consecutive iterations, the error is considered to have converged; otherwise, the iteration is continued, and the optimal shape parameters are continuously approached until the error converges, and the optimal proxy model based on the optimal shape parameters is output to perform the flow field prediction task.
8. A cross-validation training device for a large-scale flow field proxy model, characterized in that: The device comprises: A design variable determination module is used to determine the range of design variables for aircraft optimization and perform normalization processing; Experimental design module, used to recursively permutate the design variables to evolve the experimental design and generate sample points of the design variables; A numerical simulation module is used to perform flow field numerical simulation on the sample points and obtain large-scale flow field data of the aircraft as the response value of each node in the flow field; The proxy model construction module is used to construct a proxy model of each node in the large-scale flow field using the radial basis function algorithm, and calculate the basis function matrix corresponding to the proxy model based on the same shape parameters in each proxy model; a cross-validation error calculation module, configured to use the samples of each subspace in the recursive permutation evolution experiment design process as a test set, extract the overlapping elements corresponding to the current test set from the inverse matrix of the basis function matrix and form them into a submatrix, construct a first intermediate matrix by integrating the submatrices corresponding to all test sets, and after constructing a second intermediate matrix related only to shape parameters and design variables based on the first intermediate matrix, construct the cross-validation error sum of squares of each proxy model according to the second intermediate matrix and a global matrix related only to node response values, and integrate the cross-validation error sum of squares corresponding to each node in the large-scale flow field to construct the cross-validation error sum of squares of the entire flow field; an iterative optimization module for optimizing the shape parameters using a particle swarm optimization algorithm with the goal of minimizing the sum of squared cross-validation errors of the entire flow field. During the optimization process, the global matrix remains unchanged, the proxy model is updated based on the optimized shape parameters, and the sum of squared cross-validation errors of the entire flow field is recalculated until the errors converge. An optimal proxy model based on the optimal shape parameters is then output to perform the flow field prediction task. Wherein, the experimental design module is specifically used for: The number of samples required to define the aircraft optimization is n , for the inclusion n The space of samples is recursively split until each subspace contains or samples; among them, the number of splits is and get subspaces; The number of samples generated by the optimized Latin hypercube experimental design algorithm is The initial sample set ;in, Indicates the i samples; Perform a cyclic deletion operation on the samples in the initial sample set, and select the sample with the best uniformity after the deletion operation. samples as the evolution sample set ; Evolution sample set in Samples are filled into each subspace, and PIO optimization is performed on the filled samples to obtain the optimized sample points.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Flapping wing flow field reconstruction and performance prediction method, device, equipment and medium
CN118246366A
Fluid control intelligent adjusting method and system of micro-fluidic chip
CN119620624A